(Window Frame Parameters): Explain pixel=char on tty.
[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
19650fd6
AS
859 --enable-maintainer-mode enable make rules and dependencies not useful
860 (and sometimes confusing) to the casual installer
503d2be0
AS
861 --disable-largefile omit support for large files
862
863Optional Packages:
864 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
865 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
866 --without-gcc don't use GCC to compile Emacs if GCC is found
867 --without-pop don't support POP mail retrieval with movemail
868 --with-kerberos support Kerberos-authenticated POP
869 --with-kerberos5 support Kerberos version 5 authenticated POP
870 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 871 --without-sound don't compile with sound support
488dd4c4
JD
872 --with-x-toolkit=KIT use an X toolkit
873 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
874 --with-xpm use -lXpm for displaying XPM images
875 --with-jpeg use -ljpeg for displaying JPEG images
876 --with-tiff use -ltiff for displaying TIFF images
877 --with-gif use -lungif for displaying GIF images
878 --with-png use -lpng for displaying PNG images
488dd4c4
JD
879 --with-gtk use GTK (same as --with-x-toolkit=gtk)
880 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 881 --without-toolkit-scroll-bars
cc227489
MB
882 don't use Motif or Xaw3d scroll bars
883 --without-xim don't use X11 XIM
e0f712ba 884 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
885 --with-x use the X Window System
886
887Some influential environment variables:
888 CC C compiler command
889 CFLAGS C compiler flags
890 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
891 nonstandard directory <lib dir>
892 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
893 headers in a nonstandard directory <include dir>
894 CPP C preprocessor
895
896Use these variables to override the choices made by `configure' or to help
897it to find libraries and programs with nonstandard names/locations.
898
c0d27fcc 899_ACEOF
503d2be0
AS
900fi
901
902if test "$ac_init_help" = "recursive"; then
903 # If there are subdirs, report their specific --help.
904 ac_popdir=`pwd`
c0d27fcc
MR
905 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
906 test -d $ac_dir || continue
907 ac_builddir=.
908
909if test "$ac_dir" != .; then
910 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
911 # A "../" for each directory in $ac_dir_suffix.
912 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
913else
914 ac_dir_suffix= ac_top_builddir=
915fi
503d2be0 916
c0d27fcc
MR
917case $srcdir in
918 .) # No --srcdir option. We are building in place.
919 ac_srcdir=.
920 if test -z "$ac_top_builddir"; then
921 ac_top_srcdir=.
922 else
923 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
924 fi ;;
925 [\\/]* | ?:[\\/]* ) # Absolute path.
926 ac_srcdir=$srcdir$ac_dir_suffix;
927 ac_top_srcdir=$srcdir ;;
928 *) # Relative path.
929 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
930 ac_top_srcdir=$ac_top_builddir$srcdir ;;
931esac
35996d22
AS
932
933# Do not use `cd foo && pwd` to compute absolute paths, because
934# the directories may not exist.
935case `pwd` in
936.) ac_abs_builddir="$ac_dir";;
937*)
938 case "$ac_dir" in
939 .) ac_abs_builddir=`pwd`;;
940 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
941 *) ac_abs_builddir=`pwd`/"$ac_dir";;
942 esac;;
943esac
944case $ac_abs_builddir in
945.) ac_abs_top_builddir=${ac_top_builddir}.;;
946*)
947 case ${ac_top_builddir}. in
948 .) ac_abs_top_builddir=$ac_abs_builddir;;
949 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
950 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
951 esac;;
952esac
953case $ac_abs_builddir in
954.) ac_abs_srcdir=$ac_srcdir;;
955*)
956 case $ac_srcdir in
957 .) ac_abs_srcdir=$ac_abs_builddir;;
958 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
959 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
960 esac;;
961esac
962case $ac_abs_builddir in
963.) ac_abs_top_srcdir=$ac_top_srcdir;;
964*)
965 case $ac_top_srcdir in
966 .) ac_abs_top_srcdir=$ac_abs_builddir;;
967 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
968 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
969 esac;;
970esac
c0d27fcc
MR
971
972 cd $ac_dir
503d2be0 973 # Check for guested configure; otherwise get Cygnus style configure.
c0d27fcc 974 if test -f $ac_srcdir/configure.gnu; then
503d2be0 975 echo
c0d27fcc
MR
976 $SHELL $ac_srcdir/configure.gnu --help=recursive
977 elif test -f $ac_srcdir/configure; then
503d2be0 978 echo
c0d27fcc
MR
979 $SHELL $ac_srcdir/configure --help=recursive
980 elif test -f $ac_srcdir/configure.ac ||
35996d22 981 test -f $ac_srcdir/configure.in; then
503d2be0
AS
982 echo
983 $ac_configure --help
984 else
c0d27fcc 985 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
503d2be0 986 fi
551ffc27 987 cd $ac_popdir
503d2be0
AS
988 done
989fi
990
991test -n "$ac_init_help" && exit 0
992if $ac_init_version; then
c0d27fcc 993 cat <<\_ACEOF
503d2be0 994
35996d22 995Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
996This configure script is free software; the Free Software Foundation
997gives unlimited permission to copy, distribute and modify it.
c0d27fcc 998_ACEOF
503d2be0
AS
999 exit 0
1000fi
1001exec 5>config.log
c0d27fcc 1002cat >&5 <<_ACEOF
503d2be0
AS
1003This file contains any messages produced by compilers while
1004running configure, to aid debugging if configure makes a mistake.
1005
1006It was created by $as_me, which was
35996d22 1007generated by GNU Autoconf 2.59. Invocation command line was
503d2be0
AS
1008
1009 $ $0 $@
1010
c0d27fcc 1011_ACEOF
503d2be0
AS
1012{
1013cat <<_ASUNAME
c0d27fcc
MR
1014## --------- ##
1015## Platform. ##
1016## --------- ##
503d2be0
AS
1017
1018hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1019uname -m = `(uname -m) 2>/dev/null || echo unknown`
1020uname -r = `(uname -r) 2>/dev/null || echo unknown`
1021uname -s = `(uname -s) 2>/dev/null || echo unknown`
1022uname -v = `(uname -v) 2>/dev/null || echo unknown`
1023
1024/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1025/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1026
1027/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1028/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1029/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1030hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1031/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1032/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1033/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1034
925c2f3f 1035_ASUNAME
c0d27fcc
MR
1036
1037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1038for as_dir in $PATH
1039do
1040 IFS=$as_save_IFS
1041 test -z "$as_dir" && as_dir=.
1042 echo "PATH: $as_dir"
1043done
1044
503d2be0
AS
1045} >&5
1046
c0d27fcc
MR
1047cat >&5 <<_ACEOF
1048
1049
1050## ----------- ##
1051## Core tests. ##
1052## ----------- ##
1053
1054_ACEOF
503d2be0 1055
503d2be0
AS
1056
1057# Keep a trace of the command line.
1058# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1059# Strip out --silent because we don't want to record it for future runs.
503d2be0 1060# Also quote any args containing shell meta-characters.
19650fd6 1061# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1062ac_configure_args=
19650fd6
AS
1063ac_configure_args0=
1064ac_configure_args1=
503d2be0 1065ac_sep=
19650fd6
AS
1066ac_must_keep_next=false
1067for ac_pass in 1 2
503d2be0 1068do
19650fd6
AS
1069 for ac_arg
1070 do
1071 case $ac_arg in
1072 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1073 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1074 | -silent | --silent | --silen | --sile | --sil)
1075 continue ;;
1076 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1077 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1078 esac
1079 case $ac_pass in
1080 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1081 2)
1082 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1083 if test $ac_must_keep_next = true; then
35996d22 1084 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1085 else
35996d22
AS
1086 case $ac_arg in
1087 *=* | --config-cache | -C | -disable-* | --disable-* \
1088 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1089 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1090 | -with-* | --with-* | -without-* | --without-* | --x)
1091 case "$ac_configure_args0 " in
1092 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1093 esac
1094 ;;
1095 -* ) ac_must_keep_next=true ;;
1096 esac
19650fd6
AS
1097 fi
1098 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1099 # Get rid of the leading space.
1100 ac_sep=" "
1101 ;;
1102 esac
1103 done
503d2be0 1104done
19650fd6
AS
1105$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1106$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1107
1108# When interrupted or exit'd, cleanup temporary files, and complete
1109# config.log. We remove comments because anyway the quotes in there
1110# would cause problems or look ugly.
c0d27fcc
MR
1111# WARNING: Be sure not to use single quotes in there, as some shells,
1112# such as our DU 5.0 friend, will then `close' the trap.
503d2be0
AS
1113trap 'exit_status=$?
1114 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1115 {
1116 echo
6bae0ccf 1117
c0d27fcc
MR
1118 cat <<\_ASBOX
1119## ---------------- ##
1120## Cache variables. ##
1121## ---------------- ##
1122_ASBOX
1123 echo
1124 # The following way of writing the cache mishandles newlines in values,
503d2be0
AS
1125{
1126 (set) 2>&1 |
1127 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1128 *ac_space=\ *)
1129 sed -n \
35996d22
AS
1130 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1131 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
503d2be0
AS
1132 ;;
1133 *)
1134 sed -n \
35996d22 1135 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
1136 ;;
1137 esac;
c0d27fcc
MR
1138}
1139 echo
6bae0ccf
DL
1140
1141 cat <<\_ASBOX
1142## ----------------- ##
1143## Output variables. ##
1144## ----------------- ##
1145_ASBOX
1146 echo
1147 for ac_var in $ac_subst_vars
1148 do
1149 eval ac_val=$`echo $ac_var`
1150 echo "$ac_var='"'"'$ac_val'"'"'"
1151 done | sort
1152 echo
1153
1154 if test -n "$ac_subst_files"; then
1155 cat <<\_ASBOX
1156## ------------- ##
1157## Output files. ##
1158## ------------- ##
1159_ASBOX
1160 echo
1161 for ac_var in $ac_subst_files
1162 do
1163 eval ac_val=$`echo $ac_var`
35996d22 1164 echo "$ac_var='"'"'$ac_val'"'"'"
6bae0ccf
DL
1165 done | sort
1166 echo
1167 fi
1168
c0d27fcc
MR
1169 if test -s confdefs.h; then
1170 cat <<\_ASBOX
1171## ----------- ##
1172## confdefs.h. ##
1173## ----------- ##
1174_ASBOX
1175 echo
6bae0ccf 1176 sed "/^$/d" confdefs.h | sort
c0d27fcc
MR
1177 echo
1178 fi
1179 test "$ac_signal" != 0 &&
1180 echo "$as_me: caught signal $ac_signal"
1181 echo "$as_me: exit $exit_status"
1182 } >&5
35996d22 1183 rm -f core *.core &&
c0d27fcc 1184 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0
AS
1185 exit $exit_status
1186 ' 0
1187for ac_signal in 1 2 13 15; do
1188 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1189done
1190ac_signal=0
1191
1192# confdefs.h avoids OS command line length limits that DEFS can exceed.
1193rm -rf conftest* confdefs.h
1194# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1195echo >confdefs.h
ba4481b5 1196
c0d27fcc
MR
1197# Predefined preprocessor variables.
1198
1199cat >>confdefs.h <<_ACEOF
1200#define PACKAGE_NAME "$PACKAGE_NAME"
1201_ACEOF
1202
1203
1204cat >>confdefs.h <<_ACEOF
1205#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1206_ACEOF
1207
1208
1209cat >>confdefs.h <<_ACEOF
1210#define PACKAGE_VERSION "$PACKAGE_VERSION"
1211_ACEOF
1212
1213
1214cat >>confdefs.h <<_ACEOF
1215#define PACKAGE_STRING "$PACKAGE_STRING"
1216_ACEOF
1217
1218
1219cat >>confdefs.h <<_ACEOF
1220#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1221_ACEOF
1222
1223
503d2be0 1224# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
1225# Prefer explicitly selected file to automatically selected ones.
1226if test -z "$CONFIG_SITE"; then
1227 if test "x$prefix" != xNONE; then
1228 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1229 else
1230 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1231 fi
1232fi
1233for ac_site_file in $CONFIG_SITE; do
1234 if test -r "$ac_site_file"; then
c0d27fcc 1235 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1236echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1237 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1238 . "$ac_site_file"
1239 fi
1240done
1241
1242if test -r "$cache_file"; then
503d2be0
AS
1243 # Some versions of bash will fail to source /dev/null (special
1244 # files actually), so we avoid doing that.
1245 if test -f "$cache_file"; then
c0d27fcc 1246 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1247echo "$as_me: loading cache $cache_file" >&6;}
1248 case $cache_file in
1249 [\\/]* | ?:[\\/]* ) . $cache_file;;
1250 *) . ./$cache_file;;
1251 esac
1252 fi
ba4481b5 1253else
c0d27fcc 1254 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1255echo "$as_me: creating cache $cache_file" >&6;}
1256 >$cache_file
1257fi
1258
1259# Check that the precious variables saved in the cache have kept the same
1260# value.
1261ac_cache_corrupted=false
1262for ac_var in `(set) 2>&1 |
35996d22 1263 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
503d2be0
AS
1264 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1265 eval ac_new_set=\$ac_env_${ac_var}_set
1266 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1267 eval ac_new_val="\$ac_env_${ac_var}_value"
1268 case $ac_old_set,$ac_new_set in
1269 set,)
c0d27fcc 1270 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1271echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1272 ac_cache_corrupted=: ;;
1273 ,set)
c0d27fcc 1274 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1275echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1276 ac_cache_corrupted=: ;;
1277 ,);;
1278 *)
1279 if test "x$ac_old_val" != "x$ac_new_val"; then
35996d22 1280 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1281echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
35996d22 1282 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1283echo "$as_me: former value: $ac_old_val" >&2;}
35996d22 1284 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1285echo "$as_me: current value: $ac_new_val" >&2;}
35996d22 1286 ac_cache_corrupted=:
503d2be0
AS
1287 fi;;
1288 esac
c0d27fcc 1289 # Pass precious variables to config.status.
503d2be0
AS
1290 if test "$ac_new_set" = set; then
1291 case $ac_new_val in
1292 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
c0d27fcc
MR
1293 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1294 *) ac_arg=$ac_var=$ac_new_val ;;
1295 esac
1296 case " $ac_configure_args " in
1297 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1298 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1299 esac
1300 fi
1301done
1302if $ac_cache_corrupted; then
c0d27fcc 1303 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1304echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1305 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1306echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1307 { (exit 1); exit 1; }; }
ba4481b5
DL
1308fi
1309
1310ac_ext=c
ba4481b5 1311ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
1312ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1313ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1314ac_compiler_gnu=$ac_cv_c_compiler_gnu
1315
c0d27fcc
MR
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
ba4481b5 1332
6bae0ccf
DL
1333
1334 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1335
c0d27fcc 1336
ba5da88a
PJ
1337test "$program_prefix" != NONE &&
1338 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1339# Use a double $ so make ignores it.
1340test "$program_suffix" != NONE &&
1341 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1342# Double any \ or $. echo might interpret backslashes.
1343# By default was `s,x,x', remove it if useless.
1344cat <<\_ACEOF >conftest.sed
1345s/[\\$]/&&/g;s/;s,x,x,$//
1346_ACEOF
1347program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1348rm conftest.sed
1349
c0d27fcc 1350
ba4481b5
DL
1351lispdir='${datadir}/emacs/${version}/lisp'
1352locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1353'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1354lisppath='${locallisppath}:${lispdir}'
1355etcdir='${datadir}/emacs/${version}/etc'
1356archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1357docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1358gamedir='${localstatedir}/games/emacs'
98418dba
CW
1359
1360gameuser=games
1361
c0d27fcc 1362
ba4481b5
DL
1363# Check whether --with-gcc or --without-gcc was given.
1364if test "${with_gcc+set}" = set; then
1365 withval="$with_gcc"
503d2be0
AS
1366
1367fi;
ba4481b5
DL
1368
1369# Check whether --with-pop or --without-pop was given.
1370if test "${with_pop+set}" = set; then
1371 withval="$with_pop"
243cf185 1372 if test "$withval" = yes; then
c0d27fcc 1373 cat >>confdefs.h <<\_ACEOF
ba4481b5 1374#define MAIL_USE_POP 1
c0d27fcc 1375_ACEOF
ba4481b5 1376
243cf185
DL
1377else :
1378fi
3d9fec71 1379else
c0d27fcc 1380 cat >>confdefs.h <<\_ACEOF
3d9fec71 1381#define MAIL_USE_POP 1
c0d27fcc 1382_ACEOF
3d9fec71 1383
503d2be0 1384fi;
ba4481b5 1385
c0d27fcc 1386
a21616bd
KR
1387# Check whether --with-kerberos or --without-kerberos was given.
1388if test "${with_kerberos+set}" = set; then
1389 withval="$with_kerberos"
c0d27fcc 1390 cat >>confdefs.h <<\_ACEOF
a21616bd 1391#define KERBEROS 1
c0d27fcc 1392_ACEOF
a21616bd 1393
503d2be0 1394fi;
a21616bd 1395
c0d27fcc 1396
a21616bd
KR
1397# Check whether --with-kerberos5 or --without-kerberos5 was given.
1398if test "${with_kerberos5+set}" = set; then
1399 withval="$with_kerberos5"
1400 if test "${with_kerberos5+set}" = set; then
1401 if test "${with_kerberos+set}" != set; then
1402 with_kerberos=yes
c0d27fcc 1403 cat >>confdefs.h <<\_ACEOF
a21616bd 1404#define KERBEROS 1
c0d27fcc 1405_ACEOF
a21616bd
KR
1406
1407 fi
1408fi
b936fae4 1409
c0d27fcc 1410cat >>confdefs.h <<\_ACEOF
a21616bd 1411#define KERBEROS5 1
c0d27fcc 1412_ACEOF
a21616bd 1413
503d2be0 1414fi;
a21616bd 1415
ba4481b5
DL
1416# Check whether --with-hesiod or --without-hesiod was given.
1417if test "${with_hesiod+set}" = set; then
1418 withval="$with_hesiod"
b936fae4 1419
c0d27fcc 1420cat >>confdefs.h <<\_ACEOF
ba4481b5 1421#define HESIOD 1
c0d27fcc 1422_ACEOF
ba4481b5 1423
503d2be0 1424fi;
ba4481b5 1425
c0d27fcc 1426
2c9dccc9
PJ
1427# Check whether --with-sound or --without-sound was given.
1428if test "${with_sound+set}" = set; then
1429 withval="$with_sound"
1430
1431fi;
1432
c0d27fcc 1433
ba4481b5
DL
1434# Check whether --with-x-toolkit or --without-x-toolkit was given.
1435if test "${with_x_toolkit+set}" = set; then
1436 withval="$with_x_toolkit"
1437 case "${withval}" in
1438 y | ye | yes ) val=athena ;;
1439 n | no ) val=no ;;
1440 l | lu | luc | luci | lucid ) val=lucid ;;
1441 a | at | ath | athe | athen | athena ) val=athena ;;
1442 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1443 g | gt | gtk ) val=gtk ;;
ba4481b5 1444 * )
c0d27fcc 1445{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1446this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1447Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1448echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1449this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1450Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1451 { (exit 1); exit 1; }; }
ba4481b5
DL
1452 ;;
1453 esac
1454 with_x_toolkit=$val
1455
503d2be0 1456fi;
ba4481b5
DL
1457
1458# Check whether --with-xpm or --without-xpm was given.
1459if test "${with_xpm+set}" = set; then
1460 withval="$with_xpm"
503d2be0
AS
1461
1462fi;
ba4481b5
DL
1463
1464# Check whether --with-jpeg or --without-jpeg was given.
1465if test "${with_jpeg+set}" = set; then
1466 withval="$with_jpeg"
503d2be0
AS
1467
1468fi;
ba4481b5
DL
1469
1470# Check whether --with-tiff or --without-tiff was given.
1471if test "${with_tiff+set}" = set; then
1472 withval="$with_tiff"
503d2be0
AS
1473
1474fi;
ba4481b5
DL
1475
1476# Check whether --with-gif or --without-gif was given.
1477if test "${with_gif+set}" = set; then
1478 withval="$with_gif"
503d2be0
AS
1479
1480fi;
ba4481b5
DL
1481
1482# Check whether --with-png or --without-png was given.
1483if test "${with_png+set}" = set; then
1484 withval="$with_png"
503d2be0
AS
1485
1486fi;
ba4481b5 1487
488dd4c4
JD
1488# Check whether --with-gtk or --without-gtk was given.
1489if test "${with_gtk+set}" = set; then
1490 withval="$with_gtk"
1491
1492fi;
1493
1494# Check whether --with-pkg-config-prog or --without-pkg-config-prog was given.
1495if test "${with_pkg_config_prog+set}" = set; then
1496 withval="$with_pkg_config_prog"
1497
1498fi;
1499
ba4481b5
DL
1500# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1501if test "${with_toolkit_scroll_bars+set}" = set; then
1502 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1503
1504fi;
ba4481b5 1505
1d36487c
GM
1506# Check whether --with-xim or --without-xim was given.
1507if test "${with_xim+set}" = set; then
1508 withval="$with_xim"
1d36487c 1509
503d2be0 1510fi;
ba4481b5 1511
e0f712ba
AC
1512# Check whether --with-carbon or --without-carbon was given.
1513if test "${with_carbon+set}" = set; then
1514 withval="$with_carbon"
1515
1516fi;
6a3a24fa
JD
1517# Check whether --enable-carbon-app or --disable-carbon-app was given.
1518if test "${enable_carbon_app+set}" = set; then
1519 enableval="$enable_carbon_app"
1520 carbon_appdir_x=${enableval}
1521fi;
e0f712ba 1522
19650fd6
AS
1523# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1524if test "${enable_maintainer_mode+set}" = set; then
1525 enableval="$enable_maintainer_mode"
1526 USE_MAINTAINER_MODE=$enableval
1527else
1528 USE_MAINTAINER_MODE=no
1529fi;
1530if test $USE_MAINTAINER_MODE = yes; then
1531 MAINT=
1532else
1533 MAINT=#
1534fi
1535
1536
ba4481b5 1537#### Make srcdir absolute, if it isn't already. It's important to
17494071 1538#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1539#### give you automounter prefixes, which can go away. We do all this
1540#### so Emacs can find its files when run uninstalled.
17494071
GM
1541## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1542unset CDPATH
ba4481b5
DL
1543case "${srcdir}" in
1544 /* ) ;;
1545 . )
1546 ## We may be able to use the $PWD environment variable to make this
1547 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
1548 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1549 ## but that tested only for a well-formed and valid PWD,
1550 ## it did not object when PWD was well-formed and valid but just wrong.
1551 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
1552 then
1553 srcdir="$PWD"
1554 else
1555 srcdir="`(cd ${srcdir}; pwd)`"
1556 fi
1557 ;;
1558 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1559esac
1560
1561#### Check if the source directory already has a configured system in it.
1562if test `pwd` != `(cd ${srcdir} && pwd)` \
1563 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 1564 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1565 as a build directory right now; it has been configured in its own
1566 right. To configure in another directory as well, you MUST
1567 use GNU make. If you do not have GNU make, then you must
1568 now do \`make distclean' in ${srcdir},
1569 and then run $0 again." >&5
1570echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1571 as a build directory right now; it has been configured in its own
1572 right. To configure in another directory as well, you MUST
1573 use GNU make. If you do not have GNU make, then you must
1574 now do \`make distclean' in ${srcdir},
503d2be0 1575 and then run $0 again." >&2;}
ba4481b5
DL
1576fi
1577
1578#### Given the configuration name, set machfile and opsysfile to the
1579#### names of the m/*.h and s/*.h files we should use.
1580
1581### Canonicalize the configuration name.
1582
1583ac_aux_dir=
1584for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1585 if test -f $ac_dir/install-sh; then
1586 ac_aux_dir=$ac_dir
1587 ac_install_sh="$ac_aux_dir/install-sh -c"
1588 break
1589 elif test -f $ac_dir/install.sh; then
1590 ac_aux_dir=$ac_dir
1591 ac_install_sh="$ac_aux_dir/install.sh -c"
1592 break
503d2be0
AS
1593 elif test -f $ac_dir/shtool; then
1594 ac_aux_dir=$ac_dir
1595 ac_install_sh="$ac_aux_dir/shtool install -c"
1596 break
ba4481b5
DL
1597 fi
1598done
1599if test -z "$ac_aux_dir"; then
c0d27fcc 1600 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1601echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1602 { (exit 1); exit 1; }; }
ba4481b5 1603fi
503d2be0
AS
1604ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1605ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1606ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1607
1608# Make sure we can run config.sub.
503d2be0 1609$ac_config_sub sun4 >/dev/null 2>&1 ||
c0d27fcc 1610 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1611echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1612 { (exit 1); exit 1; }; }
1613
c0d27fcc 1614echo "$as_me:$LINENO: checking build system type" >&5
503d2be0
AS
1615echo $ECHO_N "checking build system type... $ECHO_C" >&6
1616if test "${ac_cv_build+set}" = set; then
1617 echo $ECHO_N "(cached) $ECHO_C" >&6
1618else
1619 ac_cv_build_alias=$build_alias
1620test -z "$ac_cv_build_alias" &&
1621 ac_cv_build_alias=`$ac_config_guess`
1622test -z "$ac_cv_build_alias" &&
c0d27fcc 1623 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1624echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1625 { (exit 1); exit 1; }; }
1626ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
c0d27fcc
MR
1627 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1628echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
503d2be0
AS
1629 { (exit 1); exit 1; }; }
1630
1631fi
c0d27fcc 1632echo "$as_me:$LINENO: result: $ac_cv_build" >&5
503d2be0
AS
1633echo "${ECHO_T}$ac_cv_build" >&6
1634build=$ac_cv_build
1635build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1636build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1637build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1638
c0d27fcc
MR
1639
1640echo "$as_me:$LINENO: checking host system type" >&5
503d2be0
AS
1641echo $ECHO_N "checking host system type... $ECHO_C" >&6
1642if test "${ac_cv_host+set}" = set; then
1643 echo $ECHO_N "(cached) $ECHO_C" >&6
1644else
1645 ac_cv_host_alias=$host_alias
1646test -z "$ac_cv_host_alias" &&
1647 ac_cv_host_alias=$ac_cv_build_alias
1648ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
c0d27fcc 1649 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1650echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1651 { (exit 1); exit 1; }; }
1652
1653fi
c0d27fcc 1654echo "$as_me:$LINENO: result: $ac_cv_host" >&5
503d2be0
AS
1655echo "${ECHO_T}$ac_cv_host" >&6
1656host=$ac_cv_host
1657host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1658host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1659host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5 1660
c0d27fcc 1661
ba4481b5 1662canonical=$host
531a3336 1663configuration=${host_alias-$host}
ba4481b5 1664
c0d27fcc 1665
22044edf 1666
ba4481b5
DL
1667### If you add support for a new configuration, add code to this
1668### switch statement to recognize your configuration name and select
1669### the appropriate operating system and machine description files.
1670
1671### You would hope that you could choose an m/*.h file pretty much
1672### based on the machine portion of the configuration name, and an s-
1673### file based on the operating system portion. However, it turns out
1674### that each m/*.h file is pretty manufacturer-specific - for
1675### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1676### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1677### machines. So we basically have to have a special case for each
1678### configuration name.
1679###
1680### As far as handling version numbers on operating systems is
1681### concerned, make sure things will fail in a fixable way. If
1682### /etc/MACHINES doesn't say anything about version numbers, be
1683### prepared to handle anything reasonably. If version numbers
1684### matter, be sure /etc/MACHINES says something about it.
1685###
1686### Eric Raymond says we should accept strings like "sysvr4" to mean
1687### "System V Release 4"; he writes, "The old convention encouraged
1688### confusion between `system' and `release' levels'."
1689
1690machine='' opsys='' unported=no
1691case "${canonical}" in
1692
1096bcc0
GM
1693 ## FreeBSD ports
1694 *-*-freebsd* )
1695 opsys=freebsd
1696 case "${canonical}" in
1697 alpha*-*-freebsd*) machine=alpha ;;
1698 i[3456]86-*-freebsd*) machine=intel386 ;;
1699 esac
1700 ;;
1701
ba4481b5
DL
1702 ## NetBSD ports
1703 *-*-netbsd* )
1704 opsys=netbsd
dd038e26 1705 if test -f /usr/lib/crti.o; then
f57bd967
DL
1706
1707cat >>confdefs.h <<\_ACEOF
1708#define HAVE_CRTIN
dd038e26
AS
1709_ACEOF
1710
1711 fi
1712
ba4481b5
DL
1713 case "${canonical}" in
1714 alpha*-*-netbsd*) machine=alpha ;;
1715 i[3456]86-*-netbsd*) machine=intel386 ;;
1716 m68k-*-netbsd*)
1717 # This is somewhat bogus.
1718 machine=hp9000s300 ;;
1719 powerpc-apple-netbsd*) machine=macppc ;;
1720 mips-*-netbsd*) machine=pmax ;;
2df636f4 1721 mipsel-*-netbsd*) machine=pmax ;;
97836269 1722 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 1723 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1724 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1725 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1726 vax-*-netbsd*) machine=vax ;;
2df636f4 1727 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1728 esac
1729 ;;
1730
1731 ## OpenBSD ports
1732 *-*-openbsd* )
1733 opsys=openbsd
1734 case "${canonical}" in
1735 alpha*-*-openbsd*) machine=alpha ;;
1736 i386-*-openbsd*) machine=intel386 ;;
1737 m68k-*-openbsd*) machine=hp9000s300 ;;
1738 mipsel-*-openbsd*) machine=pmax ;;
1739 ns32k-*-openbsd*) machine=ns32000 ;;
1740 sparc-*-openbsd*) machine=sparc ;;
1741 vax-*-openbsd*) machine=vax ;;
1742 esac
1743 ;;
1744
1745 ## Acorn RISCiX:
1746 arm-acorn-riscix1.1* )
1747 machine=acorn opsys=riscix1-1
1748 ;;
1749 arm-acorn-riscix1.2* | arm-acorn-riscix )
1750 ## This name is riscix12 instead of riscix1.2
1751 ## to avoid a file name conflict on MSDOS.
1752 machine=acorn opsys=riscix12
1753 ;;
1754
1755 ## BSDI ports
1756 *-*-bsdi* )
1757 opsys=bsdi
1758 case "${canonical}" in
1759 i[345]86-*-bsdi*) machine=intel386 ;;
1760 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1761 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1762 esac
1763 case "${canonical}" in
1764 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1765 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1766 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1767 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1768 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1769 esac
1770 ;;
1771
1772 ## Alliant machines
1773 ## Strictly speaking, we need the version of the alliant operating
1774 ## system to choose the right machine file, but currently the
1775 ## configuration name doesn't tell us enough to choose the right
1776 ## one; we need to give alliants their own operating system name to
1777 ## do this right. When someone cares, they can help us.
1778 fx80-alliant-* )
1779 machine=alliant4 opsys=bsd4-2
1780 ;;
1781 i860-alliant-* )
1782 machine=alliant-2800 opsys=bsd4-3
1783 ;;
1784
1785 ## Alpha (DEC) machines.
1786 alpha*-dec-osf* )
1787 machine=alpha opsys=osf1
1788 # This is needed to find X11R6.1 libraries for certain tests.
1789 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1790 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1791 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1792 # due to non-traditional preprocessing with the current compiler
1793 # defaults. OSF 4 can also have that compiler version, and there
1794 # seems always to have been a usable /usr/bin/cpp.
1795 NON_GNU_CPP=/usr/bin/cpp
ca512671 1796 case "${canonical}" in
a55b799a 1797 alpha*-dec-osf[5-9]*)
bb17930d 1798 opsys=osf5-0 ;;
ca512671 1799 esac
ba4481b5
DL
1800 ;;
1801
1802 alpha*-*-linux-gnu* )
1803 machine=alpha opsys=gnu-linux
1804 ;;
1805
c4bb2108
DL
1806 arm*-*-linux-gnu* )
1807 machine=arm opsys=gnu-linux
1808 ;;
1809
1810 ppc-*-linux | \
1811 powerpc-*-linux* )
3aeecf97 1812 machine=macppc opsys=gnu-linux
c4bb2108
DL
1813 ;;
1814
ba4481b5
DL
1815 ## Altos 3068
1816 m68*-altos-sysv* )
1817 machine=altos opsys=usg5-2
1818 ;;
1819
1820 ## Amdahl UTS
1821 580-amdahl-sysv* )
1822 machine=amdahl opsys=usg5-2-2
1823 ;;
1824
1825 ## Apollo, Domain/OS
1826 m68*-apollo-* )
1827 machine=apollo opsys=bsd4-3
1828 ;;
1829
1830 ## AT&T 3b2, 3b5, 3b15, 3b20
1831 we32k-att-sysv* )
1832 machine=att3b opsys=usg5-2-2
1833 ;;
1834
1835 ## AT&T 3b1 - The Mighty Unix PC!
1836 m68*-att-sysv* )
1837 machine=7300 opsys=usg5-2-2
1838 ;;
1839
1840 ## Bull dpx20
1841 rs6000-bull-bosx* )
1842 machine=ibmrs6000 opsys=aix3-2
1843 ;;
1844
1845 ## Bull dpx2
1846 m68*-bull-sysv3* )
1847 machine=dpx2 opsys=usg5-3
1848 ;;
1849
1850 ## Bull sps7
1851 m68*-bull-sysv2* )
1852 machine=sps7 opsys=usg5-2
1853 ;;
1854
1855 ## CCI 5/32, 6/32 -- see "Tahoe".
1856
1857 ## Celerity
1858 ## I don't know what configuration name to use for this; config.sub
1859 ## doesn't seem to know anything about it. Hey, Celerity users, get
1860 ## in touch with us!
1861 celerity-celerity-bsd* )
1862 machine=celerity opsys=bsd4-2
1863 ;;
1864
1865 ## Clipper
1866 ## What operating systems does this chip run that Emacs has been
1867 ## tested on?
1868 clipper-* )
1869 machine=clipper
1870 ## We'll use the catch-all code at the bottom to guess the
1871 ## operating system.
1872 ;;
1873
df645f7c
AS
1874 ## Compaq Nonstop
1875 mips-compaq-nonstopux* )
1876 machine=nonstopux opsys=nonstopux
1877 ;;
1878
ba4481b5
DL
1879 ## Convex
1880 *-convex-bsd* | *-convex-convexos* )
1881 machine=convex opsys=bsd4-3
1882 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1883 NON_GNU_CPP="cc -E -P"
1884 ;;
1885
1886 ## Cubix QBx/386
1887 i[3456]86-cubix-sysv* )
1888 machine=intel386 opsys=usg5-3
1889 ;;
1890
1891 ## Cydra 5
1892 cydra*-cydrome-sysv* )
1893 machine=cydra5 opsys=usg5-3
1894 ;;
1895
1896 ## Data General AViiON Machines
1897 ## DG changed naming conventions with the release of 5.4.4.10, they
1898 ## dropped the initial 5.4 but left the intervening R. Because of the
1899 ## R this shouldn't conflict with older versions of the OS (which I
1900 ## think were named like dgux4.*). In addition, DG new AViiONs series
1901 ## uses either Motorola M88k or Intel Pentium CPUs.
1902 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1903 machine=aviion opsys=dgux4
1904 ;;
1905 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1906 ## This name is dgux5-4-3 instead of dgux5-4r3
1907 ## to avoid a file name conflict on MSDOS.
1908 machine=aviion opsys=dgux5-4-3
1909 ;;
1910 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1911 machine=aviion opsys=dgux5-4r2
1912 ;;
1913 m88k-dg-dgux* )
1914 machine=aviion opsys=dgux
1915 ;;
1916
1917 ## Data General AViiON Intel (x86) Machines
1918 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1919 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1920 i[345]86-dg-dguxR4* )
1921 machine=aviion-intel opsys=dgux4
1922 ;;
1923
1924 ## DECstations
1925 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1926 machine=pmax opsys=bsd4-2
1927 ;;
1928 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1929 machine=pmax opsys=bsd4-3
1930 ;;
1931 mips-dec-ultrix* )
1932 machine=pmax opsys=ultrix4-3
1933 ;;
1934 mips-dec-osf* )
1935 machine=pmax opsys=osf1
1936 ;;
1937 mips-dec-mach_bsd4.3* )
1938 machine=pmax opsys=mach-bsd4-3
1939 ;;
1940
cd890796
JD
1941 ## Motorola Delta machines
1942 m68k-motorola-sysv* | m68000-motorola-sysv* )
1943 machine=delta opsys=usg5-3
1944 if test -z "`type gnucc | grep 'not found'`"
1945 then
1946 if test -s /etc/167config
1947 then CC="gnucc -m68040"
1948 else CC="gnucc -m68881"
1949 fi
1950 else
1951 if test -z "`type gcc | grep 'not found'`"
1952 then CC=gcc
1953 else CC=cc
1954 fi
1955 fi
1956 ;;
ba4481b5
DL
1957 m88k-motorola-sysv4* )
1958 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1959 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1960 # I hope there are not other 4.0 versions for this machine
1961 # which really need usg5-4 instead.
1962 machine=delta88k opsys=usg5-4-2
1963 ;;
1964 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1965 machine=delta88k opsys=usg5-3
1966 ;;
1967
1968 ## Dual machines
1969 m68*-dual-sysv* )
1970 machine=dual opsys=usg5-2
1971 ;;
1972 m68*-dual-uniplus* )
1973 machine=dual opsys=unipl5-2
1974 ;;
1975
1976 ## Elxsi 6400
1977 elxsi-elxsi-sysv* )
1978 machine=elxsi opsys=usg5-2
1979 ;;
1980
1981 ## Encore machines
1982 ns16k-encore-bsd* )
1983 machine=ns16000 opsys=umax
1984 ;;
1985
65171e3a
DL
1986 ## The GEC 63 - apparently, this port isn't really finished yet.
1987 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
1988
1989 ## Gould Power Node and NP1
1990 pn-gould-bsd4.2* )
1991 machine=gould opsys=bsd4-2
1992 ;;
1993 pn-gould-bsd4.3* )
1994 machine=gould opsys=bsd4-3
1995 ;;
1996 np1-gould-bsd* )
1997 machine=gould-np1 opsys=bsd4-3
1998 ;;
1999
2000 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2001 ## as far as Emacs is concerned).
2002 m88k-harris-cxux* )
2003 # Build needs to be different on 7.0 and later releases
2004 case "`uname -r`" in
2005 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2006 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2007 esac
2008 NON_GNU_CPP="/lib/cpp"
2009 ;;
2010 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2011 m68k-harris-cxux* )
2012 machine=nh3000 opsys=cxux
2013 ;;
2014 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2015 powerpc-harris-powerunix )
2016 machine=nh6000 opsys=powerunix
2017 NON_GNU_CPP="cc -Xo -E -P"
2018 ;;
2019 ## SR2001/SR2201 running HI-UX/MPP
2020 hppa1.1-hitachi-hiuxmpp* )
2021 machine=sr2k opsys=hiuxmpp
2022 ;;
89a336fa
GM
2023 hppa1.1-hitachi-hiuxwe2* )
2024 machine=sr2k opsys=hiuxwe2
2025 ;;
ba4481b5
DL
2026 ## Honeywell XPS100
2027 xps*-honeywell-sysv* )
2028 machine=xps100 opsys=usg5-2
2029 ;;
2030
2031 ## HP 9000 series 200 or 300
2032 m68*-hp-bsd* )
2033 machine=hp9000s300 opsys=bsd4-3
2034 ;;
2035 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2036 m68*-hp-hpux* )
2037 case "`uname -r`" in
2038 ## Someone's system reports A.B8.05 for this.
2039 ## I wonder what other possibilities there are.
2040 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2041 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2042 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2043 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2044 *) machine=hp9000s300 opsys=hpux ;;
2045 esac
2046 ;;
2047
2048 ## HP 9000 series 700 and 800, running HP/UX
2049 hppa*-hp-hpux7* )
2050 machine=hp800 opsys=hpux
2051 ;;
2052 hppa*-hp-hpux8* )
2053 machine=hp800 opsys=hpux8
2054 ;;
2055 hppa*-hp-hpux9shr* )
2056 machine=hp800 opsys=hpux9shr
2057 ;;
2058 hppa*-hp-hpux9* )
2059 machine=hp800 opsys=hpux9
2060 ;;
b0e44248
RB
2061 hppa*-hp-hpux10.2* )
2062 machine=hp800 opsys=hpux10-20
2063 ;;
cc227489 2064 hppa*-hp-hpux10* )
ba4481b5
DL
2065 machine=hp800 opsys=hpux10
2066 ;;
cc227489
MB
2067 hppa*-hp-hpux1[1-9]* )
2068 machine=hp800 opsys=hpux11
2069 ;;
ba4481b5 2070
409d9577
GM
2071 hppa*-*-linux-gnu* )
2072 machine=hp800 opsys=gnu-linux
2073 ;;
2074
ba4481b5
DL
2075 ## HP 9000 series 700 and 800, running HP/UX
2076 hppa*-hp-hpux* )
2077 ## Cross-compilation? Nah!
2078 case "`uname -r`" in
2079 ## Someone's system reports A.B8.05 for this.
2080 ## I wonder what other possibilities there are.
2081 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2082 *.08.* ) machine=hp800 opsys=hpux8 ;;
2083 *.09.* ) machine=hp800 opsys=hpux9 ;;
2084 *) machine=hp800 opsys=hpux10 ;;
2085 esac
2086 ;;
2087 hppa*-*-nextstep* )
2088 machine=hp800 opsys=nextstep
2089 ;;
2090
2091 ## Orion machines
2092 orion-orion-bsd* )
2093 machine=orion opsys=bsd4-2
2094 ;;
2095 clipper-orion-bsd* )
2096 machine=orion105 opsys=bsd4-2
2097 ;;
2098
2099 ## IBM machines
2100 i[3456]86-ibm-aix1.1* )
2101 machine=ibmps2-aix opsys=usg5-2-2
2102 ;;
2103 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2104 machine=ibmps2-aix opsys=usg5-3
2105 ;;
2106 i370-ibm-aix*)
2107 machine=ibm370aix opsys=usg5-3
2108 ;;
55597d70 2109 s390-*-linux-gnu* )
138f0859
GM
2110 machine=ibms390 opsys=gnu-linux
2111 ;;
ba4481b5
DL
2112 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2113 machine=ibmrs6000 opsys=aix3-1
2114 ;;
2115 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2116 machine=ibmrs6000 opsys=aix3-2-5
2117 ;;
2118 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2119 machine=ibmrs6000 opsys=aix4-1
2120 ;;
2121 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2122 machine=ibmrs6000 opsys=aix4-2
2123 ;;
55597d70 2124 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2125 machine=ibmrs6000 opsys=aix4-2
2126 ;;
ba4481b5
DL
2127 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2128 machine=ibmrs6000 opsys=aix4
2129 ;;
2130 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2131 machine=ibmrs6000 opsys=aix4-1
2132 ;;
2133 rs6000-ibm-aix* | powerpc-ibm-aix* )
2134 machine=ibmrs6000 opsys=aix3-2
2135 ;;
2136 romp-ibm-bsd4.3* )
2137 machine=ibmrt opsys=bsd4-3
2138 ;;
2139 romp-ibm-bsd4.2* )
2140 machine=ibmrt opsys=bsd4-2
2141 ;;
2142 romp-ibm-aos4.3* )
2143 machine=ibmrt opsys=bsd4-3
2144 ;;
2145 romp-ibm-aos4.2* )
2146 machine=ibmrt opsys=bsd4-2
2147 ;;
2148 romp-ibm-aos* )
2149 machine=ibmrt opsys=bsd4-3
2150 ;;
2151 romp-ibm-bsd* )
2152 machine=ibmrt opsys=bsd4-3
2153 ;;
2154 romp-ibm-aix* )
2155 machine=ibmrt-aix opsys=usg5-2-2
2156 ;;
2157
2158 ## Integrated Solutions `Optimum V'
2159 m68*-isi-bsd4.2* )
2160 machine=isi-ov opsys=bsd4-2
2161 ;;
2162 m68*-isi-bsd4.3* )
2163 machine=isi-ov opsys=bsd4-3
2164 ;;
2165
2166 ## Intel 386 machines where we do care about the manufacturer
2167 i[3456]86-intsys-sysv* )
2168 machine=is386 opsys=usg5-2-2
2169 ;;
2170
2171 ## Prime EXL
2172 i[3456]86-prime-sysv* )
2173 machine=i386 opsys=usg5-3
2174 ;;
2175
2176 ## Sequent Symmetry running Dynix
2177 i[3456]86-sequent-bsd* )
2178 machine=symmetry opsys=bsd4-3
2179 ;;
2180
2181 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2182 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2183 machine=sequent-ptx opsys=ptx4
2184 NON_GNU_CPP=/lib/cpp
2185 ;;
2186
2187 ## Sequent Symmetry running DYNIX/ptx
2188 ## Use the old cpp rather than the newer ANSI one.
2189 i[3456]86-sequent-ptx* )
2190 machine=sequent-ptx opsys=ptx
2191 NON_GNU_CPP="/lib/cpp"
2192 ;;
2193
2194 ## ncr machine running svr4.3.
2195 i[3456]86-ncr-sysv4.3 )
2196 machine=ncr386 opsys=usg5-4-3
2197 ;;
2198
2199 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2200 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2201 i[3456]86-ncr-sysv* )
2202 machine=ncr386 opsys=usg5-4-2
2203 ;;
2204
2205 ## Intel Paragon OSF/1
2206 i860-intel-osf1* )
2207 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2208 ;;
2209
2210 ## Intel 860
2211 i860-*-sysv4* )
2212 machine=i860 opsys=usg5-4
2213 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2214 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2215 ;;
2216
c76e04a8
GM
2217 ## Macintosh PowerPC
2218 powerpc*-*-linux-gnu* )
2219 machine=macppc opsys=gnu-linux
2220 ;;
2221
ba4481b5
DL
2222 ## Masscomp machines
2223 m68*-masscomp-rtu* )
2224 machine=masscomp opsys=rtu
2225 ;;
2226
2227 ## Megatest machines
2228 m68*-megatest-bsd* )
2229 machine=mega68 opsys=bsd4-2
2230 ;;
2231
2232 ## Workstations sold by MIPS
2233 ## This is not necessarily all workstations using the MIPS processor -
2234 ## Irises are produced by SGI, and DECstations by DEC.
2235
2236 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2237 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2238 ## it gives for choosing between the alternatives seems to be "Use
2239 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2240 ## the BSD world." I'll assume that these are instructions for
2241 ## handling two odd situations, and that every other situation
2242 ## should use mips.h and usg5-2-2, they being listed first.
2243 mips-mips-usg* )
2244 machine=mips4
2245 ## Fall through to the general code at the bottom to decide on the OS.
2246 ;;
2247 mips-mips-riscos4* )
2248 machine=mips4 opsys=bsd4-3
2249 NON_GNU_CC="cc -systype bsd43"
2250 NON_GNU_CPP="cc -systype bsd43 -E"
2251 ;;
2252 mips-mips-riscos5* )
2253 machine=mips4 opsys=riscos5
2254 NON_GNU_CC="cc -systype bsd43"
2255 NON_GNU_CPP="cc -systype bsd43 -E"
2256 ;;
2257 mips-mips-bsd* )
2258 machine=mips opsys=bsd4-3
2259 ;;
2260 mips-mips-* )
2261 machine=mips opsys=usg5-2-2
2262 ;;
2263
2264 ## NeXT
2265 m68*-next-* | m68k-*-nextstep* )
2266 machine=m68k opsys=nextstep
2267 ;;
2268
2269 ## The complete machine from National Semiconductor
2270 ns32k-ns-genix* )
2271 machine=ns32000 opsys=usg5-2
2272 ;;
2273
2274 ## NCR machines
2275 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2276 machine=tower32 opsys=usg5-2-2
2277 ;;
2278 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2279 machine=tower32v3 opsys=usg5-3
2280 ;;
2281
2282 ## NEC EWS4800
2283 mips-nec-sysv4*)
2284 machine=ews4800 opsys=ux4800
2285 ;;
2286
2287 ## Nixdorf Targon 31
2288 m68*-nixdorf-sysv* )
2289 machine=targon31 opsys=usg5-2-2
2290 ;;
2291
2292 ## Nu (TI or LMI)
2293 m68*-nu-sysv* )
2294 machine=nu opsys=usg5-2
2295 ;;
2296
2297 ## Plexus
2298 m68*-plexus-sysv* )
2299 machine=plexus opsys=usg5-2
2300 ;;
2301
ba4481b5
DL
2302 ## Pyramid machines
2303 ## I don't really have any idea what sort of processor the Pyramid has,
2304 ## so I'm assuming it is its own architecture.
2305 pyramid-pyramid-bsd* )
2306 machine=pyramid opsys=bsd4-2
2307 ;;
2308
2309 ## Sequent Balance
2310 ns32k-sequent-bsd4.2* )
2311 machine=sequent opsys=bsd4-2
2312 ;;
2313 ns32k-sequent-bsd4.3* )
2314 machine=sequent opsys=bsd4-3
2315 ;;
2316
2317 ## Siemens Nixdorf
2318 mips-siemens-sysv* | mips-sni-sysv*)
2319 machine=mips-siemens opsys=usg5-4
2320 NON_GNU_CC=/usr/ccs/bin/cc
2321 NON_GNU_CPP=/usr/ccs/lib/cpp
2322 ;;
2323
2324 ## Silicon Graphics machines
2325 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2326 m68*-sgi-iris3.5* )
2327 machine=irist opsys=iris3-5
2328 ;;
2329 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2330 machine=irist opsys=iris3-6
2331 ;;
2332 ## Iris 4D
2333 mips-sgi-irix3* )
2334 machine=iris4d opsys=irix3-3
2335 ;;
2336 mips-sgi-irix4* )
2337 machine=iris4d opsys=irix4-0
2338 ;;
2339 mips-sgi-irix6.5 )
2340 machine=iris4d opsys=irix6-5
946173ad
DL
2341 # Without defining _LANGUAGE_C, things get masked out in the headers
2342 # so that, for instance, grepping for `free' in stdlib.h fails and
2343 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2344 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2345 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2346 ;;
2347 mips-sgi-irix6* )
2348 machine=iris4d opsys=irix6-0
c4bb2108 2349 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2350 # but presumably it does no harm.
2351 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2352 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2353 NON_GCC_TEST_OPTIONS=-32
2354 ;;
2355 mips-sgi-irix5.[01]* )
2356 machine=iris4d opsys=irix5-0
2357 ;;
2358 mips-sgi-irix5* | mips-sgi-irix* )
2359 machine=iris4d opsys=irix5-2
2360 ;;
2361
2362 ## SONY machines
2363 m68*-sony-bsd4.2* )
2364 machine=news opsys=bsd4-2
2365 ;;
2366 m68*-sony-bsd4.3* )
2367 machine=news opsys=bsd4-3
2368 ;;
2369 m68*-sony-newsos3* | m68*-sony-news3*)
2370 machine=news opsys=bsd4-3
2371 ;;
2372 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2373 machine=news-risc opsys=bsd4-3
2374 ;;
2375 mips-sony-newsos6* )
2376 machine=news-r6 opsys=newsos6
2377 ;;
2378 mips-sony-news* )
2379 machine=news-risc opsys=newsos5
2380 ;;
2381
2382 ## Stride
2383 m68*-stride-sysv* )
2384 machine=stride opsys=usg5-2
2385 ;;
2386
2387 ## Suns
2388 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2389 machine=sparc opsys=gnu-linux
2390 ;;
2391
d054101f 2392 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2393 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2394 | rs6000-*-solaris2*)
2395 case "${canonical}" in
2396 m68*-sunos1* ) machine=sun1 ;;
2397 m68*-sunos2* ) machine=sun2 ;;
2398 m68* ) machine=sun3 ;;
2399 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2400 i[3456]86-*-* ) machine=intel386 ;;
2401 powerpcle* ) machine=powerpcle ;;
2402 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2403 sparc* ) machine=sparc ;;
2404 * ) unported=yes ;;
2405 esac
2406 case "${canonical}" in
2407 ## The Sun386 didn't get past 4.0.
2408 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2409 *-sunos4.0* ) opsys=sunos4-0 ;;
2410 *-sunos4.1.[3-9]*noshare )
2411 ## This name is sunos413 instead of sunos4-1-3
2412 ## to avoid a file name conflict on MSDOS.
2413 opsys=sunos413
2414 NON_GNU_CPP=/usr/lib/cpp
2415 NON_GCC_TEST_OPTIONS=-Bstatic
2416 GCC_TEST_OPTIONS=-static
2417 ;;
2418 *-sunos4.1.[3-9]* | *-sunos4shr*)
2419 opsys=sunos4shr
2420 NON_GNU_CPP=/usr/lib/cpp
2421 ;;
2422 *-sunos4* | *-sunos )
2423 opsys=sunos4-1
2424 NON_GCC_TEST_OPTIONS=-Bstatic
2425 GCC_TEST_OPTIONS=-static
2426 ;;
2427 *-sunos5.3* | *-solaris2.3* )
2428 opsys=sol2-3
2429 NON_GNU_CPP=/usr/ccs/lib/cpp
2430 ;;
2431 *-sunos5.4* | *-solaris2.4* )
2432 opsys=sol2-4
2433 NON_GNU_CPP=/usr/ccs/lib/cpp
2434 RANLIB="ar -ts"
2435 ;;
2436 *-sunos5.5* | *-solaris2.5* )
2437 opsys=sol2-5
2438 NON_GNU_CPP=/usr/ccs/lib/cpp
2439 RANLIB="ar -ts"
2440 ;;
8e967cf7
MR
2441 *-sunos5.6* | *-solaris2.6* )
2442 opsys=sol2-6
2443 NON_GNU_CPP=/usr/ccs/lib/cpp
2444 RANLIB="ar -ts"
2445 ;;
ba4481b5 2446 *-sunos5* | *-solaris* )
9e71690e 2447 opsys=sol2-6
ba4481b5
DL
2448 NON_GNU_CPP=/usr/ccs/lib/cpp
2449 ;;
2450 * ) opsys=bsd4-2 ;;
2451 esac
2452 ## Watch out for a compiler that we know will not work.
2453 case "${canonical}" in
2454 *-solaris* | *-sunos5* )
2455 if [ "x$CC" = x/usr/ucb/cc ]; then
2456 ## /usr/ucb/cc doesn't work;
2457 ## we should find some other compiler that does work.
2458 unset CC
2459 fi
2460 ;;
2461 *) ;;
2462 esac
2463 ;;
2464 sparc-*-nextstep* )
2465 machine=sparc opsys=nextstep
2466 ;;
2467
2468 ## Tadpole 68k
2469 m68*-tadpole-sysv* )
2470 machine=tad68k opsys=usg5-3
2471 ;;
2472
2473 ## Tahoe machines
2474 tahoe-tahoe-bsd4.2* )
2475 machine=tahoe opsys=bsd4-2
2476 ;;
2477 tahoe-tahoe-bsd4.3* )
2478 machine=tahoe opsys=bsd4-3
2479 ;;
2480
2481 ## Tandem Integrity S2
2482 mips-tandem-sysv* )
2483 machine=tandem-s2 opsys=usg5-3
2484 ;;
2485
2486 ## Tektronix XD88
2487 m88k-tektronix-sysv3* )
2488 machine=tekxd88 opsys=usg5-3
2489 ;;
2490
2491 ## Tektronix 16000 box (6130?)
2492 ns16k-tektronix-bsd* )
2493 machine=ns16000 opsys=bsd4-2
2494 ;;
2495 ## Tektronix 4300
2496 ## src/m/tek4300.h hints that this is a m68k machine.
2497 m68*-tektronix-bsd* )
2498 machine=tek4300 opsys=bsd4-3
2499 ;;
2500
2501 ## Titan P2 or P3
2502 ## We seem to have lost the machine-description file titan.h!
2503 titan-titan-sysv* )
2504 machine=titan opsys=usg5-3
2505 ;;
2506
2507 ## Ustation E30 (SS5E)
2508 m68*-unisys-uniplus* )
2509 machine=ustation opsystem=unipl5-2
2510 ;;
2511
2512 ## Vaxen.
2513 vax-dec-* )
2514 machine=vax
2515 case "${canonical}" in
2516 *-bsd4.1* ) opsys=bsd4-1 ;;
2517 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2518 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2519 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2520 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2521 *-vms* ) opsys=vms ;;
2522 * ) unported=yes
2523 esac
2524 ;;
2525
2526 ## Whitechapel MG1
2527 ns16k-whitechapel-* )
2528 machine=mg1
2529 ## We don't know what sort of OS runs on these; we'll let the
2530 ## operating system guessing code below try.
2531 ;;
2532
2533 ## Wicat
2534 m68*-wicat-sysv* )
2535 machine=wicat opsys=usg5-2
2536 ;;
2537
f4988be7
GM
2538 ## IA-64
2539 ia64*-*-linux* )
2540 machine=ia64 opsys=gnu-linux
2541 ;;
2542
ba4481b5
DL
2543 ## Intel 386 machines where we don't care about the manufacturer
2544 i[3456]86-*-* )
2545 machine=intel386
2546 case "${canonical}" in
c60ee5e7 2547 *-cygwin ) opsys=cygwin ;;
9f817ea4 2548 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2549 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2550 *-isc2.2* ) opsys=isc2-2 ;;
2551 *-isc4.0* ) opsys=isc4-0 ;;
2552 *-isc4.* ) opsys=isc4-1
2553 GCC_TEST_OPTIONS=-posix
2554 NON_GCC_TEST_OPTIONS=-Xp
2555 ;;
2556 *-isc* ) opsys=isc3-0 ;;
2557 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2558 *-esix* ) opsys=esix ;;
2559 *-xenix* ) opsys=xenix ;;
2560 *-linux-gnu* ) opsys=gnu-linux ;;
2561 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2562 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2563 NON_GNU_CPP=/lib/cpp
2564 # Prevent -belf from being passed to $CPP.
2565 # /lib/cpp does not accept it.
2566 OVERRIDE_CPPFLAGS=" "
2567 ;;
2568 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2569 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2570 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2571 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2572 *-nextstep* ) opsys=nextstep ;;
2573 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2574 esac
2575 ;;
2576
2577 ## m68k Linux-based GNU system
2578 m68k-*-linux-gnu* )
2579 machine=m68k opsys=gnu-linux
2580 ;;
2581
2582 ## Mips Linux-based GNU system
cd958eb3 2583 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2584 machine=mips opsys=gnu-linux
2585 ;;
2586
2587 ## UXP/DS
2588 sparc-fujitsu-sysv4* )
2589 machine=sparc opsys=uxpds
2590 NON_GNU_CPP=/usr/ccs/lib/cpp
2591 RANLIB="ar -ts"
2592 ;;
2593
2594 ## UXP/V
2595 f301-fujitsu-uxpv4.1)
2596 machine=f301 opsys=uxpv
2597 ;;
2598
e0f712ba
AC
2599 ## Darwin / Mac OS X
2600 powerpc-apple-darwin* )
2601 machine=powermac opsys=darwin
2602 # Define CPP as follows to make autoconf work correctly.
2a75d75d 2603 CPP="${CC-cc} -E -no-cpp-precomp"
c14dc0ed
AS
2604 # Use fink packages if available.
2605 if test -d /sw/include && test -d /sw/lib; then
2606 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2607 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2608 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2609 fi
e0f712ba
AC
2610 ;;
2611
598a2813
AS
2612 ## AMD x86-64 Linux-based GNU system
2613 x86_64-*-linux-gnu* )
24b01ec4 2614 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2615 ;;
2616
ba4481b5
DL
2617 * )
2618 unported=yes
2619 ;;
2620esac
2621
2622### If the code above didn't choose an operating system, just choose
2623### an operating system based on the configuration name. You really
2624### only want to use this when you have no idea what the right
2625### operating system is; if you know what operating systems a machine
2626### runs, it's cleaner to make it explicit in the case statement
2627### above.
2628if test x"${opsys}" = x; then
2629 case "${canonical}" in
2630 *-gnu* ) opsys=gnu ;;
2631 *-bsd4.[01] ) opsys=bsd4-1 ;;
2632 *-bsd4.2 ) opsys=bsd4-2 ;;
2633 *-bsd4.3 ) opsys=bsd4-3 ;;
2634 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2635 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2636 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2637 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2638 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2639 *-sysv5uw* ) opsys=unixware ;;
2640 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2641 *-sysv4.1* | *-sysvr4.1* )
2642 NON_GNU_CPP=/usr/lib/cpp
2643 opsys=usg5-4 ;;
2644 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2645 if [ x$NON_GNU_CPP = x ]; then
2646 if [ -f /usr/ccs/lib/cpp ]; then
2647 NON_GNU_CPP=/usr/ccs/lib/cpp
2648 else
2649 NON_GNU_CPP=/lib/cpp
2650 fi
2651 fi
2652 opsys=usg5-4-2 ;;
2653 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2654 * )
2655 unported=yes
2656 ;;
2657 esac
2658fi
2659
c0d27fcc 2660
22044edf 2661
ba4481b5 2662if test $unported = yes; then
c0d27fcc 2663 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2664Check \`etc/MACHINES' for recognized configuration names." >&5
2665echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2666Check \`etc/MACHINES' for recognized configuration names." >&2;}
2667 { (exit 1); exit 1; }; }
ba4481b5
DL
2668fi
2669
2670machfile="m/${machine}.h"
2671opsysfile="s/${opsys}.h"
2672
c0d27fcc 2673
ba4481b5
DL
2674#### Choose a compiler.
2675test -n "$CC" && cc_specified=yes
2676
2677# Save the value of CFLAGS that the user specified.
2678SPECIFIED_CFLAGS="$CFLAGS"
2679
2680case ${with_gcc} in
2681 "yes" ) CC="gcc" GCC=yes ;;
2682 "no" ) : ${CC=cc} ;;
503d2be0
AS
2683 * )
2684esac
2685ac_ext=c
2686ac_cpp='$CPP $CPPFLAGS'
2687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689ac_compiler_gnu=$ac_cv_c_compiler_gnu
2690if test -n "$ac_tool_prefix"; then
2691 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2692set dummy ${ac_tool_prefix}gcc; ac_word=$2
c0d27fcc 2693echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2694echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2695if test "${ac_cv_prog_CC+set}" = set; then
2696 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2697else
2698 if test -n "$CC"; then
2699 ac_cv_prog_CC="$CC" # Let the user override the test.
2700else
c0d27fcc
MR
2701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2702for as_dir in $PATH
2703do
2704 IFS=$as_save_IFS
2705 test -z "$as_dir" && as_dir=.
2706 for ac_exec_ext in '' $ac_executable_extensions; do
2707 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2708 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2709 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2710 break 2
2711 fi
2712done
503d2be0
AS
2713done
2714
ba4481b5
DL
2715fi
2716fi
503d2be0 2717CC=$ac_cv_prog_CC
ba4481b5 2718if test -n "$CC"; then
c0d27fcc 2719 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2720echo "${ECHO_T}$CC" >&6
2721else
c0d27fcc 2722 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2723echo "${ECHO_T}no" >&6
2724fi
2725
2726fi
2727if test -z "$ac_cv_prog_CC"; then
2728 ac_ct_CC=$CC
2729 # Extract the first word of "gcc", so it can be a program name with args.
2730set dummy gcc; ac_word=$2
c0d27fcc 2731echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2732echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2733if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2734 echo $ECHO_N "(cached) $ECHO_C" >&6
2735else
2736 if test -n "$ac_ct_CC"; then
2737 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2738else
c0d27fcc
MR
2739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2740for as_dir in $PATH
2741do
2742 IFS=$as_save_IFS
2743 test -z "$as_dir" && as_dir=.
2744 for ac_exec_ext in '' $ac_executable_extensions; do
2745 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2746 ac_cv_prog_ac_ct_CC="gcc"
2747 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2748 break 2
2749 fi
2750done
503d2be0
AS
2751done
2752
2753fi
2754fi
2755ac_ct_CC=$ac_cv_prog_ac_ct_CC
2756if test -n "$ac_ct_CC"; then
c0d27fcc 2757 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0 2758echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2759else
c0d27fcc 2760 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2761echo "${ECHO_T}no" >&6
2762fi
2763
2764 CC=$ac_ct_CC
2765else
2766 CC="$ac_cv_prog_CC"
ba4481b5
DL
2767fi
2768
2769if test -z "$CC"; then
503d2be0
AS
2770 if test -n "$ac_tool_prefix"; then
2771 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2772set dummy ${ac_tool_prefix}cc; ac_word=$2
c0d27fcc 2773echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2774echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2775if test "${ac_cv_prog_CC+set}" = set; then
2776 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2777else
2778 if test -n "$CC"; then
2779 ac_cv_prog_CC="$CC" # Let the user override the test.
2780else
c0d27fcc
MR
2781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2782for as_dir in $PATH
2783do
2784 IFS=$as_save_IFS
2785 test -z "$as_dir" && as_dir=.
2786 for ac_exec_ext in '' $ac_executable_extensions; do
2787 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2788 ac_cv_prog_CC="${ac_tool_prefix}cc"
2789 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2790 break 2
2791 fi
2792done
503d2be0
AS
2793done
2794
2795fi
2796fi
2797CC=$ac_cv_prog_CC
2798if test -n "$CC"; then
c0d27fcc 2799 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2800echo "${ECHO_T}$CC" >&6
2801else
c0d27fcc 2802 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2803echo "${ECHO_T}no" >&6
2804fi
2805
2806fi
2807if test -z "$ac_cv_prog_CC"; then
2808 ac_ct_CC=$CC
2809 # Extract the first word of "cc", so it can be a program name with args.
2810set dummy cc; ac_word=$2
c0d27fcc 2811echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2812echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2813if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2814 echo $ECHO_N "(cached) $ECHO_C" >&6
2815else
2816 if test -n "$ac_ct_CC"; then
2817 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2818else
c0d27fcc
MR
2819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2820for as_dir in $PATH
2821do
2822 IFS=$as_save_IFS
2823 test -z "$as_dir" && as_dir=.
2824 for ac_exec_ext in '' $ac_executable_extensions; do
2825 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2826 ac_cv_prog_ac_ct_CC="cc"
2827 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2828 break 2
2829 fi
2830done
503d2be0
AS
2831done
2832
2833fi
2834fi
2835ac_ct_CC=$ac_cv_prog_ac_ct_CC
2836if test -n "$ac_ct_CC"; then
c0d27fcc 2837 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2838echo "${ECHO_T}$ac_ct_CC" >&6
2839else
c0d27fcc 2840 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2841echo "${ECHO_T}no" >&6
2842fi
2843
2844 CC=$ac_ct_CC
2845else
2846 CC="$ac_cv_prog_CC"
2847fi
2848
2849fi
2850if test -z "$CC"; then
2851 # Extract the first word of "cc", so it can be a program name with args.
2852set dummy cc; ac_word=$2
c0d27fcc 2853echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2854echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2855if test "${ac_cv_prog_CC+set}" = set; then
2856 echo $ECHO_N "(cached) $ECHO_C" >&6
2857else
2858 if test -n "$CC"; then
2859 ac_cv_prog_CC="$CC" # Let the user override the test.
2860else
2861 ac_prog_rejected=no
c0d27fcc
MR
2862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2863for as_dir in $PATH
2864do
2865 IFS=$as_save_IFS
2866 test -z "$as_dir" && as_dir=.
2867 for ac_exec_ext in '' $ac_executable_extensions; do
2868 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2869 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2870 ac_prog_rejected=yes
2871 continue
2872 fi
2873 ac_cv_prog_CC="cc"
2874 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2875 break 2
2876 fi
2877done
503d2be0
AS
2878done
2879
ba4481b5
DL
2880if test $ac_prog_rejected = yes; then
2881 # We found a bogon in the path, so make sure we never use it.
2882 set dummy $ac_cv_prog_CC
2883 shift
503d2be0 2884 if test $# != 0; then
ba4481b5
DL
2885 # We chose a different compiler from the bogus one.
2886 # However, it has the same basename, so the bogon will be chosen
2887 # first if we set CC to just the basename; use the full file name.
2888 shift
6bae0ccf 2889 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2890 fi
2891fi
2892fi
2893fi
503d2be0 2894CC=$ac_cv_prog_CC
ba4481b5 2895if test -n "$CC"; then
c0d27fcc 2896 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2897echo "${ECHO_T}$CC" >&6
ba4481b5 2898else
c0d27fcc 2899 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2900echo "${ECHO_T}no" >&6
ba4481b5
DL
2901fi
2902
503d2be0
AS
2903fi
2904if test -z "$CC"; then
2905 if test -n "$ac_tool_prefix"; then
2906 for ac_prog in cl
2907 do
2908 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2909set dummy $ac_tool_prefix$ac_prog; ac_word=$2
c0d27fcc 2910echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2911echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2912if test "${ac_cv_prog_CC+set}" = set; then
2913 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2914else
2915 if test -n "$CC"; then
2916 ac_cv_prog_CC="$CC" # Let the user override the test.
2917else
c0d27fcc
MR
2918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2919for as_dir in $PATH
2920do
2921 IFS=$as_save_IFS
2922 test -z "$as_dir" && as_dir=.
2923 for ac_exec_ext in '' $ac_executable_extensions; do
2924 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2925 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2926 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2927 break 2
2928 fi
2929done
503d2be0
AS
2930done
2931
c4bb2108
DL
2932fi
2933fi
503d2be0 2934CC=$ac_cv_prog_CC
c4bb2108 2935if test -n "$CC"; then
c0d27fcc 2936 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2937echo "${ECHO_T}$CC" >&6
c4bb2108 2938else
c0d27fcc 2939 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2940echo "${ECHO_T}no" >&6
2941fi
2942
2943 test -n "$CC" && break
2944 done
2945fi
2946if test -z "$CC"; then
2947 ac_ct_CC=$CC
2948 for ac_prog in cl
2949do
2950 # Extract the first word of "$ac_prog", so it can be a program name with args.
2951set dummy $ac_prog; ac_word=$2
c0d27fcc 2952echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2953echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2954if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2955 echo $ECHO_N "(cached) $ECHO_C" >&6
2956else
2957 if test -n "$ac_ct_CC"; then
2958 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2959else
c0d27fcc
MR
2960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2961for as_dir in $PATH
2962do
2963 IFS=$as_save_IFS
2964 test -z "$as_dir" && as_dir=.
2965 for ac_exec_ext in '' $ac_executable_extensions; do
2966 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2967 ac_cv_prog_ac_ct_CC="$ac_prog"
2968 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2969 break 2
2970 fi
2971done
503d2be0
AS
2972done
2973
c4bb2108 2974fi
503d2be0
AS
2975fi
2976ac_ct_CC=$ac_cv_prog_ac_ct_CC
2977if test -n "$ac_ct_CC"; then
c0d27fcc 2978 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2979echo "${ECHO_T}$ac_ct_CC" >&6
2980else
c0d27fcc 2981 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2982echo "${ECHO_T}no" >&6
ba4481b5
DL
2983fi
2984
503d2be0
AS
2985 test -n "$ac_ct_CC" && break
2986done
ba4481b5 2987
503d2be0
AS
2988 CC=$ac_ct_CC
2989fi
2990
2991fi
ba4481b5 2992
c0d27fcc 2993
19650fd6
AS
2994test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2995See \`config.log' for more details." >&5
2996echo "$as_me: error: no acceptable C compiler found in \$PATH
2997See \`config.log' for more details." >&2;}
503d2be0 2998 { (exit 1); exit 1; }; }
c4bb2108 2999
503d2be0 3000# Provide some information about the compiler.
c0d27fcc 3001echo "$as_me:$LINENO:" \
503d2be0
AS
3002 "checking for C compiler version" >&5
3003ac_compiler=`set X $ac_compile; echo $2`
c0d27fcc 3004{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
3005 (eval $ac_compiler --version </dev/null >&5) 2>&5
3006 ac_status=$?
c0d27fcc 3007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3008 (exit $ac_status); }
c0d27fcc 3009{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
3010 (eval $ac_compiler -v </dev/null >&5) 2>&5
3011 ac_status=$?
c0d27fcc 3012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3013 (exit $ac_status); }
c0d27fcc 3014{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
3015 (eval $ac_compiler -V </dev/null >&5) 2>&5
3016 ac_status=$?
c0d27fcc 3017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3018 (exit $ac_status); }
3019
3020cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3021/* confdefs.h. */
3022_ACEOF
3023cat confdefs.h >>conftest.$ac_ext
3024cat >>conftest.$ac_ext <<_ACEOF
3025/* end confdefs.h. */
c4bb2108 3026
503d2be0
AS
3027int
3028main ()
3029{
3030
3031 ;
3032 return 0;
3033}
3034_ACEOF
3035ac_clean_files_save=$ac_clean_files
19650fd6 3036ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3037# Try to create an executable without -o first, disregard a.out.
3038# It will help us diagnose broken compilers, and finding out an intuition
3039# of exeext.
35996d22
AS
3040echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3041echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
503d2be0 3042ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
c0d27fcc 3043if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
503d2be0
AS
3044 (eval $ac_link_default) 2>&5
3045 ac_status=$?
c0d27fcc 3046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3047 (exit $ac_status); }; then
3048 # Find the output, starting from the most likely. This scheme is
3049# not robust to junk in `.', hence go to wildcards (a.*) only as a last
3050# resort.
c0d27fcc
MR
3051
3052# Be careful to initialize this variable, since it used to be cached.
3053# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
3054ac_cv_exeext=
19650fd6
AS
3055# b.out is created by i960 compilers.
3056for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
3057do
6bae0ccf 3058 test -f "$ac_file" || continue
503d2be0 3059 case $ac_file in
19650fd6 3060 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
35996d22 3061 ;;
19650fd6 3062 conftest.$ac_ext )
35996d22
AS
3063 # This is the source file.
3064 ;;
19650fd6 3065 [ab].out )
35996d22
AS
3066 # We found the default executable, but exeext='' is most
3067 # certainly right.
3068 break;;
19650fd6 3069 *.* )
35996d22
AS
3070 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3071 # FIXME: I believe we export ac_cv_exeext for Libtool,
3072 # but it would be cool to find out if it's true. Does anybody
3073 # maintain Libtool? --akim.
3074 export ac_cv_exeext
3075 break;;
19650fd6 3076 * )
35996d22 3077 break;;
503d2be0
AS
3078 esac
3079done
3080else
3081 echo "$as_me: failed program was:" >&5
19650fd6
AS
3082sed 's/^/| /' conftest.$ac_ext >&5
3083
6bae0ccf 3084{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3085See \`config.log' for more details." >&5
6bae0ccf 3086echo "$as_me: error: C compiler cannot create executables
19650fd6 3087See \`config.log' for more details." >&2;}
503d2be0
AS
3088 { (exit 77); exit 77; }; }
3089fi
3090
3091ac_exeext=$ac_cv_exeext
c0d27fcc 3092echo "$as_me:$LINENO: result: $ac_file" >&5
503d2be0
AS
3093echo "${ECHO_T}$ac_file" >&6
3094
3095# Check the compiler produces executables we can run. If not, either
3096# the compiler is broken, or we cross compile.
c0d27fcc 3097echo "$as_me:$LINENO: checking whether the C compiler works" >&5
503d2be0
AS
3098echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
3099# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3100# If not cross compiling, check that we can run a simple program.
3101if test "$cross_compiling" != yes; then
3102 if { ac_try='./$ac_file'
c0d27fcc 3103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3104 (eval $ac_try) 2>&5
3105 ac_status=$?
c0d27fcc 3106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3107 (exit $ac_status); }; }; then
3108 cross_compiling=no
ba4481b5 3109 else
503d2be0
AS
3110 if test "$cross_compiling" = maybe; then
3111 cross_compiling=yes
3112 else
c0d27fcc 3113 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3114If you meant to cross compile, use \`--host'.
3115See \`config.log' for more details." >&5
503d2be0 3116echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3117If you meant to cross compile, use \`--host'.
3118See \`config.log' for more details." >&2;}
503d2be0
AS
3119 { (exit 1); exit 1; }; }
3120 fi
ba4481b5 3121 fi
503d2be0 3122fi
c0d27fcc 3123echo "$as_me:$LINENO: result: yes" >&5
503d2be0
AS
3124echo "${ECHO_T}yes" >&6
3125
19650fd6 3126rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0
AS
3127ac_clean_files=$ac_clean_files_save
3128# Check the compiler produces executables we can run. If not, either
3129# the compiler is broken, or we cross compile.
c0d27fcc 3130echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
503d2be0 3131echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
c0d27fcc 3132echo "$as_me:$LINENO: result: $cross_compiling" >&5
503d2be0
AS
3133echo "${ECHO_T}$cross_compiling" >&6
3134
c0d27fcc
MR
3135echo "$as_me:$LINENO: checking for suffix of executables" >&5
3136echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3137if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
3138 (eval $ac_link) 2>&5
3139 ac_status=$?
c0d27fcc 3140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3141 (exit $ac_status); }; then
3142 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3143# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3144# work properly (i.e., refer to `conftest.exe'), while it won't with
3145# `rm'.
6bae0ccf
DL
3146for ac_file in conftest.exe conftest conftest.*; do
3147 test -f "$ac_file" || continue
503d2be0 3148 case $ac_file in
6bae0ccf 3149 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
503d2be0 3150 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
35996d22
AS
3151 export ac_cv_exeext
3152 break;;
503d2be0
AS
3153 * ) break;;
3154 esac
3155done
ba4481b5 3156else
19650fd6
AS
3157 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3158See \`config.log' for more details." >&5
3159echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3160See \`config.log' for more details." >&2;}
503d2be0 3161 { (exit 1); exit 1; }; }
ba4481b5 3162fi
ba4481b5 3163
503d2be0 3164rm -f conftest$ac_cv_exeext
c0d27fcc 3165echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
503d2be0 3166echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 3167
503d2be0
AS
3168rm -f conftest.$ac_ext
3169EXEEXT=$ac_cv_exeext
3170ac_exeext=$EXEEXT
c0d27fcc
MR
3171echo "$as_me:$LINENO: checking for suffix of object files" >&5
3172echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
503d2be0
AS
3173if test "${ac_cv_objext+set}" = set; then
3174 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3175else
503d2be0 3176 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3177/* confdefs.h. */
3178_ACEOF
3179cat confdefs.h >>conftest.$ac_ext
3180cat >>conftest.$ac_ext <<_ACEOF
3181/* end confdefs.h. */
ba4481b5 3182
503d2be0
AS
3183int
3184main ()
3185{
ba4481b5 3186
503d2be0
AS
3187 ;
3188 return 0;
3189}
3190_ACEOF
3191rm -f conftest.o conftest.obj
c0d27fcc 3192if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3193 (eval $ac_compile) 2>&5
3194 ac_status=$?
c0d27fcc 3195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3196 (exit $ac_status); }; then
3197 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3198 case $ac_file in
6bae0ccf 3199 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
503d2be0
AS
3200 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3201 break;;
3202 esac
3203done
c4bb2108 3204else
503d2be0 3205 echo "$as_me: failed program was:" >&5
19650fd6
AS
3206sed 's/^/| /' conftest.$ac_ext >&5
3207
3208{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3209See \`config.log' for more details." >&5
3210echo "$as_me: error: cannot compute suffix of object files: cannot compile
3211See \`config.log' for more details." >&2;}
503d2be0 3212 { (exit 1); exit 1; }; }
c4bb2108
DL
3213fi
3214
503d2be0
AS
3215rm -f conftest.$ac_cv_objext conftest.$ac_ext
3216fi
c0d27fcc 3217echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
503d2be0
AS
3218echo "${ECHO_T}$ac_cv_objext" >&6
3219OBJEXT=$ac_cv_objext
3220ac_objext=$OBJEXT
c0d27fcc 3221echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
3222echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3223if test "${ac_cv_c_compiler_gnu+set}" = set; then
3224 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3225else
503d2be0 3226 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3227/* confdefs.h. */
3228_ACEOF
3229cat confdefs.h >>conftest.$ac_ext
3230cat >>conftest.$ac_ext <<_ACEOF
3231/* end confdefs.h. */
503d2be0
AS
3232
3233int
3234main ()
3235{
3236#ifndef __GNUC__
3237 choke me
3238#endif
3239
3240 ;
3241 return 0;
3242}
3243_ACEOF
3244rm -f conftest.$ac_objext
c0d27fcc 3245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3246 (eval $ac_compile) 2>conftest.er1
503d2be0 3247 ac_status=$?
35996d22
AS
3248 grep -v '^ *+' conftest.er1 >conftest.err
3249 rm -f conftest.er1
3250 cat conftest.err >&5
c0d27fcc 3251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3252 (exit $ac_status); } &&
551ffc27
ST
3253 { ac_try='test -z "$ac_c_werror_flag"
3254 || test ! -s conftest.err'
35996d22
AS
3255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3256 (eval $ac_try) 2>&5
3257 ac_status=$?
3258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3259 (exit $ac_status); }; } &&
3260 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3262 (eval $ac_try) 2>&5
3263 ac_status=$?
c0d27fcc 3264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3265 (exit $ac_status); }; }; then
3266 ac_compiler_gnu=yes
3267else
3268 echo "$as_me: failed program was:" >&5
19650fd6
AS
3269sed 's/^/| /' conftest.$ac_ext >&5
3270
503d2be0
AS
3271ac_compiler_gnu=no
3272fi
35996d22 3273rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3274ac_cv_c_compiler_gnu=$ac_compiler_gnu
3275
3276fi
c0d27fcc 3277echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
3278echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3279GCC=`test $ac_compiler_gnu = yes && echo yes`
3280ac_test_CFLAGS=${CFLAGS+set}
3281ac_save_CFLAGS=$CFLAGS
3282CFLAGS="-g"
c0d27fcc 3283echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
503d2be0
AS
3284echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3285if test "${ac_cv_prog_cc_g+set}" = set; then
3286 echo $ECHO_N "(cached) $ECHO_C" >&6
3287else
3288 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3289/* confdefs.h. */
3290_ACEOF
3291cat confdefs.h >>conftest.$ac_ext
3292cat >>conftest.$ac_ext <<_ACEOF
3293/* end confdefs.h. */
503d2be0
AS
3294
3295int
3296main ()
3297{
3298
3299 ;
3300 return 0;
3301}
3302_ACEOF
3303rm -f conftest.$ac_objext
c0d27fcc 3304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3305 (eval $ac_compile) 2>conftest.er1
503d2be0 3306 ac_status=$?
35996d22
AS
3307 grep -v '^ *+' conftest.er1 >conftest.err
3308 rm -f conftest.er1
3309 cat conftest.err >&5
c0d27fcc 3310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3311 (exit $ac_status); } &&
551ffc27
ST
3312 { ac_try='test -z "$ac_c_werror_flag"
3313 || test ! -s conftest.err'
35996d22
AS
3314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3315 (eval $ac_try) 2>&5
3316 ac_status=$?
3317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3318 (exit $ac_status); }; } &&
3319 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3321 (eval $ac_try) 2>&5
3322 ac_status=$?
c0d27fcc 3323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3324 (exit $ac_status); }; }; then
ba4481b5
DL
3325 ac_cv_prog_cc_g=yes
3326else
503d2be0 3327 echo "$as_me: failed program was:" >&5
19650fd6
AS
3328sed 's/^/| /' conftest.$ac_ext >&5
3329
503d2be0 3330ac_cv_prog_cc_g=no
ba4481b5 3331fi
35996d22 3332rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 3333fi
c0d27fcc 3334echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
503d2be0 3335echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 3336if test "$ac_test_CFLAGS" = set; then
503d2be0 3337 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3338elif test $ac_cv_prog_cc_g = yes; then
3339 if test "$GCC" = yes; then
ba4481b5
DL
3340 CFLAGS="-g -O2"
3341 else
c4bb2108 3342 CFLAGS="-g"
ba4481b5 3343 fi
22afa6e8 3344else
c4bb2108
DL
3345 if test "$GCC" = yes; then
3346 CFLAGS="-O2"
3347 else
3348 CFLAGS=
3349 fi
ba4481b5 3350fi
6bae0ccf
DL
3351echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3352echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3353if test "${ac_cv_prog_cc_stdc+set}" = set; then
3354 echo $ECHO_N "(cached) $ECHO_C" >&6
3355else
3356 ac_cv_prog_cc_stdc=no
3357ac_save_CC=$CC
3358cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3359/* confdefs.h. */
3360_ACEOF
3361cat confdefs.h >>conftest.$ac_ext
3362cat >>conftest.$ac_ext <<_ACEOF
3363/* end confdefs.h. */
6bae0ccf
DL
3364#include <stdarg.h>
3365#include <stdio.h>
3366#include <sys/types.h>
3367#include <sys/stat.h>
3368/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3369struct buf { int x; };
3370FILE * (*rcsopen) (struct buf *, struct stat *, int);
3371static char *e (p, i)
3372 char **p;
3373 int i;
3374{
3375 return p[i];
3376}
3377static char *f (char * (*g) (char **, int), char **p, ...)
3378{
3379 char *s;
3380 va_list v;
3381 va_start (v,p);
3382 s = g (p, va_arg (v,int));
3383 va_end (v);
3384 return s;
3385}
35996d22
AS
3386
3387/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3388 function prototypes and stuff, but not '\xHH' hex character constants.
3389 These don't provoke an error unfortunately, instead are silently treated
3390 as 'x'. The following induces an error, until -std1 is added to get
3391 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3392 array size at least. It's necessary to write '\x00'==0 to get something
3393 that's true only with -std1. */
3394int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3395
6bae0ccf
DL
3396int test (int i, double x);
3397struct s1 {int (*f) (int a);};
3398struct s2 {int (*f) (double a);};
3399int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3400int argc;
3401char **argv;
3402int
3403main ()
3404{
3405return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3406 ;
3407 return 0;
3408}
3409_ACEOF
3410# Don't try gcc -ansi; that turns off useful extensions and
3411# breaks some systems' header files.
3412# AIX -qlanglvl=ansi
3413# Ultrix and OSF/1 -std1
3414# HP-UX 10.20 and later -Ae
3415# HP-UX older versions -Aa -D_HPUX_SOURCE
3416# SVR4 -Xc -D__EXTENSIONS__
3417for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3418do
3419 CC="$ac_save_CC $ac_arg"
3420 rm -f conftest.$ac_objext
3421if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3422 (eval $ac_compile) 2>conftest.er1
6bae0ccf 3423 ac_status=$?
35996d22
AS
3424 grep -v '^ *+' conftest.er1 >conftest.err
3425 rm -f conftest.er1
3426 cat conftest.err >&5
6bae0ccf
DL
3427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3428 (exit $ac_status); } &&
551ffc27
ST
3429 { ac_try='test -z "$ac_c_werror_flag"
3430 || test ! -s conftest.err'
35996d22
AS
3431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3432 (eval $ac_try) 2>&5
3433 ac_status=$?
3434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3435 (exit $ac_status); }; } &&
3436 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
3437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3438 (eval $ac_try) 2>&5
3439 ac_status=$?
3440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3441 (exit $ac_status); }; }; then
3442 ac_cv_prog_cc_stdc=$ac_arg
3443break
3444else
3445 echo "$as_me: failed program was:" >&5
19650fd6
AS
3446sed 's/^/| /' conftest.$ac_ext >&5
3447
6bae0ccf 3448fi
35996d22 3449rm -f conftest.err conftest.$ac_objext
6bae0ccf
DL
3450done
3451rm -f conftest.$ac_ext conftest.$ac_objext
3452CC=$ac_save_CC
3453
3454fi
3455
3456case "x$ac_cv_prog_cc_stdc" in
3457 x|xno)
3458 echo "$as_me:$LINENO: result: none needed" >&5
3459echo "${ECHO_T}none needed" >&6 ;;
3460 *)
3461 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3462echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3463 CC="$CC $ac_cv_prog_cc_stdc" ;;
3464esac
3465
503d2be0
AS
3466# Some people use a C++ compiler to compile C. Since we use `exit',
3467# in C++ we need to declare it. In case someone uses the same compiler
3468# for both compiling C and C++ we need to have the C++ compiler decide
3469# the declaration of exit, since it's the most demanding environment.
3470cat >conftest.$ac_ext <<_ACEOF
3471#ifndef __cplusplus
3472 choke me
3473#endif
3474_ACEOF
3475rm -f conftest.$ac_objext
c0d27fcc 3476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3477 (eval $ac_compile) 2>conftest.er1
503d2be0 3478 ac_status=$?
35996d22
AS
3479 grep -v '^ *+' conftest.er1 >conftest.err
3480 rm -f conftest.er1
3481 cat conftest.err >&5
c0d27fcc 3482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3483 (exit $ac_status); } &&
551ffc27
ST
3484 { ac_try='test -z "$ac_c_werror_flag"
3485 || test ! -s conftest.err'
35996d22
AS
3486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3487 (eval $ac_try) 2>&5
3488 ac_status=$?
3489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3490 (exit $ac_status); }; } &&
3491 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3493 (eval $ac_try) 2>&5
3494 ac_status=$?
c0d27fcc 3495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3496 (exit $ac_status); }; }; then
3497 for ac_declaration in \
35996d22 3498 '' \
503d2be0
AS
3499 'extern "C" void std::exit (int) throw (); using std::exit;' \
3500 'extern "C" void std::exit (int); using std::exit;' \
3501 'extern "C" void exit (int) throw ();' \
3502 'extern "C" void exit (int);' \
cffcede7 3503 'void exit (int);'
503d2be0
AS
3504do
3505 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3506/* confdefs.h. */
3507_ACEOF
3508cat confdefs.h >>conftest.$ac_ext
3509cat >>conftest.$ac_ext <<_ACEOF
3510/* end confdefs.h. */
57669b57 3511$ac_declaration
35996d22 3512#include <stdlib.h>
503d2be0
AS
3513int
3514main ()
3515{
3516exit (42);
3517 ;
3518 return 0;
3519}
3520_ACEOF
3521rm -f conftest.$ac_objext
c0d27fcc 3522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3523 (eval $ac_compile) 2>conftest.er1
503d2be0 3524 ac_status=$?
35996d22
AS
3525 grep -v '^ *+' conftest.er1 >conftest.err
3526 rm -f conftest.er1
3527 cat conftest.err >&5
c0d27fcc 3528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3529 (exit $ac_status); } &&
551ffc27
ST
3530 { ac_try='test -z "$ac_c_werror_flag"
3531 || test ! -s conftest.err'
35996d22
AS
3532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3533 (eval $ac_try) 2>&5
3534 ac_status=$?
3535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3536 (exit $ac_status); }; } &&
3537 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3539 (eval $ac_try) 2>&5
3540 ac_status=$?
c0d27fcc 3541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3542 (exit $ac_status); }; }; then
3543 :
3544else
3545 echo "$as_me: failed program was:" >&5
19650fd6
AS
3546sed 's/^/| /' conftest.$ac_ext >&5
3547
503d2be0
AS
3548continue
3549fi
35996d22 3550rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 3551 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3552/* confdefs.h. */
3553_ACEOF
3554cat confdefs.h >>conftest.$ac_ext
3555cat >>conftest.$ac_ext <<_ACEOF
3556/* end confdefs.h. */
503d2be0
AS
3557$ac_declaration
3558int
3559main ()
3560{
3561exit (42);
3562 ;
3563 return 0;
3564}
3565_ACEOF
3566rm -f conftest.$ac_objext
c0d27fcc 3567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3568 (eval $ac_compile) 2>conftest.er1
503d2be0 3569 ac_status=$?
35996d22
AS
3570 grep -v '^ *+' conftest.er1 >conftest.err
3571 rm -f conftest.er1
3572 cat conftest.err >&5
c0d27fcc 3573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3574 (exit $ac_status); } &&
551ffc27
ST
3575 { ac_try='test -z "$ac_c_werror_flag"
3576 || test ! -s conftest.err'
35996d22
AS
3577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3578 (eval $ac_try) 2>&5
3579 ac_status=$?
3580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3581 (exit $ac_status); }; } &&
3582 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3584 (eval $ac_try) 2>&5
3585 ac_status=$?
c0d27fcc 3586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3587 (exit $ac_status); }; }; then
3588 break
3589else
3590 echo "$as_me: failed program was:" >&5
19650fd6
AS
3591sed 's/^/| /' conftest.$ac_ext >&5
3592
503d2be0 3593fi
35996d22 3594rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3595done
3596rm -f conftest*
3597if test -n "$ac_declaration"; then
3598 echo '#ifdef __cplusplus' >>confdefs.h
3599 echo $ac_declaration >>confdefs.h
3600 echo '#endif' >>confdefs.h
3601fi
ba4481b5 3602
503d2be0
AS
3603else
3604 echo "$as_me: failed program was:" >&5
19650fd6
AS
3605sed 's/^/| /' conftest.$ac_ext >&5
3606
503d2be0 3607fi
35996d22 3608rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3609ac_ext=c
3610ac_cpp='$CPP $CPPFLAGS'
3611ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3612ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3613ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3614
c0d27fcc 3615
ba4481b5
DL
3616# On Suns, sometimes $CPP names a directory.
3617if test -n "$CPP" && test -d "$CPP"; then
3618 CPP=
3619fi
3620
3621#### Some systems specify a CPP to use unless we are using GCC.
3622#### Now that we know whether we are using GCC, we can decide whether
3623#### to use that one.
3624if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3625then
3626 CPP="$NON_GNU_CPP"
3627fi
3628
3629#### Some systems specify a CC to use unless we are using GCC.
3630#### Now that we know whether we are using GCC, we can decide whether
3631#### to use that one.
3632if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3633 test x$cc_specified != xyes
3634then
3635 CC="$NON_GNU_CC"
3636fi
3637
3638if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3639then
3640 CC="$CC $GCC_TEST_OPTIONS"
3641fi
3642
3643if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3644then
3645 CC="$CC $NON_GCC_TEST_OPTIONS"
3646fi
3647
6a3a24fa 3648#### Some other nice autoconf tests.
ba4481b5 3649
c0d27fcc 3650echo "$as_me:$LINENO: checking whether ln -s works" >&5
503d2be0
AS
3651echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3652LN_S=$as_ln_s
3653if test "$LN_S" = "ln -s"; then
c0d27fcc 3654 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 3655echo "${ECHO_T}yes" >&6
ba4481b5 3656else
c0d27fcc 3657 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
503d2be0 3658echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
3659fi
3660
503d2be0
AS
3661ac_ext=c
3662ac_cpp='$CPP $CPPFLAGS'
3663ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3664ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3665ac_compiler_gnu=$ac_cv_c_compiler_gnu
c0d27fcc 3666echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
503d2be0 3667echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
3668# On Suns, sometimes $CPP names a directory.
3669if test -n "$CPP" && test -d "$CPP"; then
3670 CPP=
3671fi
3672if test -z "$CPP"; then
503d2be0
AS
3673 if test "${ac_cv_prog_CPP+set}" = set; then
3674 echo $ECHO_N "(cached) $ECHO_C" >&6
3675else
3676 # Double quotes because CPP needs to be expanded
3677 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3678 do
3679 ac_preproc_ok=false
3680for ac_c_preproc_warn_flag in '' yes
3681do
3682 # Use a header file that comes with gcc, so configuring glibc
3683 # with a fresh cross-compiler works.
19650fd6
AS
3684 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3685 # <limits.h> exists even on freestanding compilers.
ba4481b5 3686 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3687 # not just through cpp. "Syntax error" is here to catch this case.
3688 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3689/* confdefs.h. */
3690_ACEOF
3691cat confdefs.h >>conftest.$ac_ext
3692cat >>conftest.$ac_ext <<_ACEOF
3693/* end confdefs.h. */
3694#ifdef __STDC__
3695# include <limits.h>
3696#else
3697# include <assert.h>
3698#endif
35996d22 3699 Syntax error
503d2be0 3700_ACEOF
c0d27fcc 3701if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3702 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3703 ac_status=$?
6bae0ccf 3704 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3705 rm -f conftest.er1
3706 cat conftest.err >&5
c0d27fcc 3707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3708 (exit $ac_status); } >/dev/null; then
3709 if test -s conftest.err; then
3710 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3711 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3712 else
3713 ac_cpp_err=
3714 fi
3715else
3716 ac_cpp_err=yes
3717fi
3718if test -z "$ac_cpp_err"; then
ba4481b5
DL
3719 :
3720else
503d2be0 3721 echo "$as_me: failed program was:" >&5
19650fd6
AS
3722sed 's/^/| /' conftest.$ac_ext >&5
3723
503d2be0
AS
3724 # Broken: fails on valid input.
3725continue
3726fi
3727rm -f conftest.err conftest.$ac_ext
3728
3729 # OK, works on sane cases. Now check whether non-existent headers
3730 # can be detected and how.
3731 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3732/* confdefs.h. */
3733_ACEOF
3734cat confdefs.h >>conftest.$ac_ext
3735cat >>conftest.$ac_ext <<_ACEOF
3736/* end confdefs.h. */
503d2be0
AS
3737#include <ac_nonexistent.h>
3738_ACEOF
c0d27fcc 3739if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3740 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3741 ac_status=$?
6bae0ccf 3742 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3743 rm -f conftest.er1
3744 cat conftest.err >&5
c0d27fcc 3745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3746 (exit $ac_status); } >/dev/null; then
3747 if test -s conftest.err; then
3748 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3749 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3750 else
3751 ac_cpp_err=
3752 fi
3753else
3754 ac_cpp_err=yes
3755fi
3756if test -z "$ac_cpp_err"; then
3757 # Broken: success on invalid input.
3758continue
c4bb2108 3759else
503d2be0 3760 echo "$as_me: failed program was:" >&5
19650fd6
AS
3761sed 's/^/| /' conftest.$ac_ext >&5
3762
503d2be0
AS
3763 # Passes both tests.
3764ac_preproc_ok=:
3765break
3766fi
3767rm -f conftest.err conftest.$ac_ext
3768
3769done
3770# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3771rm -f conftest.err conftest.$ac_ext
3772if $ac_preproc_ok; then
3773 break
3774fi
3775
3776 done
3777 ac_cv_prog_CPP=$CPP
3778
3779fi
3780 CPP=$ac_cv_prog_CPP
3781else
3782 ac_cv_prog_CPP=$CPP
3783fi
c0d27fcc 3784echo "$as_me:$LINENO: result: $CPP" >&5
503d2be0
AS
3785echo "${ECHO_T}$CPP" >&6
3786ac_preproc_ok=false
3787for ac_c_preproc_warn_flag in '' yes
3788do
3789 # Use a header file that comes with gcc, so configuring glibc
3790 # with a fresh cross-compiler works.
19650fd6
AS
3791 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3792 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
3793 # On the NeXT, cc -E runs the code through the compiler's parser,
3794 # not just through cpp. "Syntax error" is here to catch this case.
3795 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3796/* confdefs.h. */
3797_ACEOF
3798cat confdefs.h >>conftest.$ac_ext
3799cat >>conftest.$ac_ext <<_ACEOF
3800/* end confdefs.h. */
3801#ifdef __STDC__
3802# include <limits.h>
3803#else
3804# include <assert.h>
3805#endif
35996d22 3806 Syntax error
503d2be0 3807_ACEOF
c0d27fcc 3808if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3809 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3810 ac_status=$?
6bae0ccf 3811 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3812 rm -f conftest.er1
3813 cat conftest.err >&5
c0d27fcc 3814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3815 (exit $ac_status); } >/dev/null; then
3816 if test -s conftest.err; then
3817 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3818 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3819 else
3820 ac_cpp_err=
3821 fi
3822else
3823 ac_cpp_err=yes
3824fi
3825if test -z "$ac_cpp_err"; then
ba4481b5
DL
3826 :
3827else
503d2be0 3828 echo "$as_me: failed program was:" >&5
19650fd6
AS
3829sed 's/^/| /' conftest.$ac_ext >&5
3830
503d2be0
AS
3831 # Broken: fails on valid input.
3832continue
3833fi
3834rm -f conftest.err conftest.$ac_ext
3835
3836 # OK, works on sane cases. Now check whether non-existent headers
3837 # can be detected and how.
3838 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3839/* confdefs.h. */
3840_ACEOF
3841cat confdefs.h >>conftest.$ac_ext
3842cat >>conftest.$ac_ext <<_ACEOF
3843/* end confdefs.h. */
503d2be0
AS
3844#include <ac_nonexistent.h>
3845_ACEOF
c0d27fcc 3846if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3847 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3848 ac_status=$?
6bae0ccf 3849 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3850 rm -f conftest.er1
3851 cat conftest.err >&5
c0d27fcc 3852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3853 (exit $ac_status); } >/dev/null; then
3854 if test -s conftest.err; then
3855 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3856 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3857 else
3858 ac_cpp_err=
3859 fi
3860else
3861 ac_cpp_err=yes
c4bb2108 3862fi
503d2be0
AS
3863if test -z "$ac_cpp_err"; then
3864 # Broken: success on invalid input.
3865continue
3866else
3867 echo "$as_me: failed program was:" >&5
19650fd6
AS
3868sed 's/^/| /' conftest.$ac_ext >&5
3869
503d2be0
AS
3870 # Passes both tests.
3871ac_preproc_ok=:
3872break
ba4481b5 3873fi
503d2be0
AS
3874rm -f conftest.err conftest.$ac_ext
3875
3876done
3877# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3878rm -f conftest.err conftest.$ac_ext
3879if $ac_preproc_ok; then
3880 :
ba4481b5 3881else
19650fd6
AS
3882 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3883See \`config.log' for more details." >&5
3884echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3885See \`config.log' for more details." >&2;}
503d2be0 3886 { (exit 1); exit 1; }; }
ba4481b5 3887fi
503d2be0
AS
3888
3889ac_ext=c
3890ac_cpp='$CPP $CPPFLAGS'
3891ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3892ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3893ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3894
3895# Find a good install program. We prefer a C program (faster),
3896# so one script is as good as another. But avoid the broken or
3897# incompatible versions:
3898# SysV /etc/install, /usr/sbin/install
3899# SunOS /usr/etc/install
3900# IRIX /sbin/install
3901# AIX /bin/install
503d2be0 3902# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3903# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3904# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3905# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
35996d22 3906# OS/2's system install, which has a completely different semantic
ba4481b5 3907# ./install, which can be erroneously created by make from ./install.sh.
c0d27fcc
MR
3908echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3909echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
ba4481b5 3910if test -z "$INSTALL"; then
503d2be0
AS
3911if test "${ac_cv_path_install+set}" = set; then
3912 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3913else
c0d27fcc
MR
3914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3915for as_dir in $PATH
3916do
3917 IFS=$as_save_IFS
3918 test -z "$as_dir" && as_dir=.
3919 # Account for people who put trailing slashes in PATH elements.
3920case $as_dir/ in
3921 ./ | .// | /cC/* | \
3922 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
35996d22 3923 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
3924 /usr/ucb/* ) ;;
3925 *)
3926 # OSF1 and SCO ODT 3.0 have their own names for install.
3927 # Don't use installbsd from OSF since it installs stuff as root
3928 # by default.
3929 for ac_prog in ginstall scoinst install; do
3930 for ac_exec_ext in '' $ac_executable_extensions; do
35996d22
AS
3931 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3932 if test $ac_prog = install &&
3933 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3934 # AIX install. It has an incompatible calling convention.
3935 :
3936 elif test $ac_prog = install &&
3937 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3938 # program-specific install script used by HP pwplus--don't use.
3939 :
3940 else
3941 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3942 break 3
3943 fi
3944 fi
ba4481b5 3945 done
c0d27fcc
MR
3946 done
3947 ;;
3948esac
3949done
3950
ba4481b5
DL
3951
3952fi
3953 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3954 INSTALL=$ac_cv_path_install
ba4481b5
DL
3955 else
3956 # As a last resort, use the slow shell script. We don't cache a
3957 # path for INSTALL within a source directory, because that will
3958 # break other packages using the cache if that directory is
3959 # removed, or if the path is relative.
503d2be0 3960 INSTALL=$ac_install_sh
ba4481b5
DL
3961 fi
3962fi
c0d27fcc 3963echo "$as_me:$LINENO: result: $INSTALL" >&5
503d2be0 3964echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3965
3966# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3967# It thinks the first close brace ends the variable substitution.
3968test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3969
503d2be0 3970test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3971
ba4481b5
DL
3972test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3973
c0d27fcc
MR
3974if test "x$RANLIB" = x; then
3975 if test -n "$ac_tool_prefix"; then
3976 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3977set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3978echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0 3979echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c0d27fcc 3980if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 3981 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3982else
3983 if test -n "$RANLIB"; then
3984 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3985else
c0d27fcc
MR
3986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3987for as_dir in $PATH
3988do
3989 IFS=$as_save_IFS
3990 test -z "$as_dir" && as_dir=.
3991 for ac_exec_ext in '' $ac_executable_extensions; do
3992 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3993 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3994 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3995 break 2
3996 fi
3997done
503d2be0
AS
3998done
3999
7397acc4
DL
4000fi
4001fi
503d2be0 4002RANLIB=$ac_cv_prog_RANLIB
7397acc4 4003if test -n "$RANLIB"; then
c0d27fcc 4004 echo "$as_me:$LINENO: result: $RANLIB" >&5
503d2be0
AS
4005echo "${ECHO_T}$RANLIB" >&6
4006else
c0d27fcc 4007 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4008echo "${ECHO_T}no" >&6
4009fi
4010
4011fi
4012if test -z "$ac_cv_prog_RANLIB"; then
4013 ac_ct_RANLIB=$RANLIB
4014 # Extract the first word of "ranlib", so it can be a program name with args.
4015set dummy ranlib; ac_word=$2
c0d27fcc 4016echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
4017echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4018if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4019 echo $ECHO_N "(cached) $ECHO_C" >&6
4020else
4021 if test -n "$ac_ct_RANLIB"; then
4022 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4023else
c0d27fcc
MR
4024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4025for as_dir in $PATH
4026do
4027 IFS=$as_save_IFS
4028 test -z "$as_dir" && as_dir=.
4029 for ac_exec_ext in '' $ac_executable_extensions; do
4030 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4031 ac_cv_prog_ac_ct_RANLIB="ranlib"
4032 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4033 break 2
4034 fi
4035done
503d2be0
AS
4036done
4037
4038 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4039fi
4040fi
4041ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4042if test -n "$ac_ct_RANLIB"; then
c0d27fcc 4043 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
503d2be0
AS
4044echo "${ECHO_T}$ac_ct_RANLIB" >&6
4045else
c0d27fcc 4046 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4047echo "${ECHO_T}no" >&6
4048fi
4049
4050 RANLIB=$ac_ct_RANLIB
7397acc4 4051else
503d2be0 4052 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
4053fi
4054
4055fi
9e71690e
DK
4056# Extract the first word of "install-info", so it can be a program name with args.
4057set dummy install-info; ac_word=$2
4058echo "$as_me:$LINENO: checking for $ac_word" >&5
4059echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4060if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4061 echo $ECHO_N "(cached) $ECHO_C" >&6
4062else
4063 case $INSTALL_INFO in
4064 [\\/]* | ?:[\\/]*)
4065 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4066 ;;
4067 *)
4068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4069for as_dir in $PATH
4070do
4071 IFS=$as_save_IFS
4072 test -z "$as_dir" && as_dir=.
4073 for ac_exec_ext in '' $ac_executable_extensions; do
4074 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4075 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4076 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4077 break 2
4078 fi
4079done
4080done
4081
4082 ;;
4083esac
4084fi
4085INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4086
4087if test -n "$INSTALL_INFO"; then
4088 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4089echo "${ECHO_T}$INSTALL_INFO" >&6
4090else
4091 echo "$as_me:$LINENO: result: no" >&5
4092echo "${ECHO_T}no" >&6
4093fi
4094
4095# Extract the first word of "install-info", so it can be a program name with args.
4096set dummy install-info; ac_word=$2
4097echo "$as_me:$LINENO: checking for $ac_word" >&5
4098echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4099if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4100 echo $ECHO_N "(cached) $ECHO_C" >&6
4101else
4102 case $INSTALL_INFO in
4103 [\\/]* | ?:[\\/]*)
4104 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4105 ;;
4106 *)
4107 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4108for as_dir in /usr/sbin
4109do
4110 IFS=$as_save_IFS
4111 test -z "$as_dir" && as_dir=.
4112 for ac_exec_ext in '' $ac_executable_extensions; do
4113 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4114 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4115 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4116 break 2
4117 fi
4118done
4119done
4120
4121 ;;
4122esac
4123fi
4124INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4125
4126if test -n "$INSTALL_INFO"; then
4127 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4128echo "${ECHO_T}$INSTALL_INFO" >&6
4129else
4130 echo "$as_me:$LINENO: result: no" >&5
4131echo "${ECHO_T}no" >&6
4132fi
4133
4134# Extract the first word of "install-info", so it can be a program name with args.
4135set dummy install-info; ac_word=$2
4136echo "$as_me:$LINENO: checking for $ac_word" >&5
4137echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4138if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4139 echo $ECHO_N "(cached) $ECHO_C" >&6
4140else
4141 case $INSTALL_INFO in
4142 [\\/]* | ?:[\\/]*)
4143 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4144 ;;
4145 *)
4146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4147for as_dir in /sbin
4148do
4149 IFS=$as_save_IFS
4150 test -z "$as_dir" && as_dir=.
4151 for ac_exec_ext in '' $ac_executable_extensions; do
4152 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4153 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4154 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4155 break 2
4156 fi
4157done
4158done
4159
4160 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4161 ;;
4162esac
4163fi
4164INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4165
4166if test -n "$INSTALL_INFO"; then
4167 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4168echo "${ECHO_T}$INSTALL_INFO" >&6
4169else
4170 echo "$as_me:$LINENO: result: no" >&5
4171echo "${ECHO_T}no" >&6
4172fi
4173
ba4481b5 4174
c0d27fcc 4175
8e967cf7
MR
4176if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4177then
4178 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4179fi
4180
4181if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4182then
4183 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4184fi
4185
c0d27fcc 4186
fe239f0f 4187late_LDFLAGS=$LDFLAGS
4af002d6 4188if test "$GCC" = yes; then
fe239f0f
AS
4189 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
4190else
4191 LDFLAGS="$LDFLAGS -znocombreloc"
4192fi
4193
4194echo "$as_me:$LINENO: checking For -znocombreloc" >&5
4195echo $ECHO_N "checking For -znocombreloc... $ECHO_C" >&6
4196
4197cat >conftest.$ac_ext <<_ACEOF
4198main(){return 0;}
4199_ACEOF
4200rm -f conftest.$ac_objext conftest$ac_exeext
4201if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4202 (eval $ac_link) 2>conftest.er1
4203 ac_status=$?
4204 grep -v '^ *+' conftest.er1 >conftest.err
4205 rm -f conftest.er1
4206 cat conftest.err >&5
4207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4208 (exit $ac_status); } &&
551ffc27
ST
4209 { ac_try='test -z "$ac_c_werror_flag"
4210 || test ! -s conftest.err'
fe239f0f
AS
4211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4212 (eval $ac_try) 2>&5
4213 ac_status=$?
4214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4215 (exit $ac_status); }; } &&
4216 { ac_try='test -s conftest$ac_exeext'
4217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4218 (eval $ac_try) 2>&5
4219 ac_status=$?
4220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4221 (exit $ac_status); }; }; then
4222 echo "$as_me:$LINENO: result: yes" >&5
4223echo "${ECHO_T}yes" >&6
4224else
4225 echo "$as_me: failed program was:" >&5
4226sed 's/^/| /' conftest.$ac_ext >&5
4227
4228LDFLAGS=$late_LDFLAGS
4229 echo "$as_me:$LINENO: result: no" >&5
4230echo "${ECHO_T}no" >&6
4231fi
4232rm -f conftest.err conftest.$ac_objext \
4233 conftest$ac_exeext conftest.$ac_ext
4234
c0d27fcc 4235
6bae0ccf
DL
4236echo "$as_me:$LINENO: checking for egrep" >&5
4237echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4238if test "${ac_cv_prog_egrep+set}" = set; then
4239 echo $ECHO_N "(cached) $ECHO_C" >&6
4240else
4241 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4242 then ac_cv_prog_egrep='grep -E'
4243 else ac_cv_prog_egrep='egrep'
4244 fi
4245fi
4246echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4247echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4248 EGREP=$ac_cv_prog_egrep
4249
4250
c0d27fcc
MR
4251
4252echo "$as_me:$LINENO: checking for AIX" >&5
503d2be0
AS
4253echo $ECHO_N "checking for AIX... $ECHO_C" >&6
4254cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4255/* confdefs.h. */
4256_ACEOF
4257cat confdefs.h >>conftest.$ac_ext
4258cat >>conftest.$ac_ext <<_ACEOF
4259/* end confdefs.h. */
ba4481b5
DL
4260#ifdef _AIX
4261 yes
4262#endif
4263
503d2be0 4264_ACEOF
ba4481b5 4265if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4266 $EGREP "yes" >/dev/null 2>&1; then
c0d27fcc 4267 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 4268echo "${ECHO_T}yes" >&6
c0d27fcc 4269cat >>confdefs.h <<\_ACEOF
ba4481b5 4270#define _ALL_SOURCE 1
c0d27fcc 4271_ACEOF
ba4481b5
DL
4272
4273else
c0d27fcc 4274 echo "$as_me:$LINENO: result: no" >&5
503d2be0 4275echo "${ECHO_T}no" >&6
ba4481b5
DL
4276fi
4277rm -f conftest*
4278
c0d27fcc
MR
4279
4280
4489ece2 4281
3b33a005
DL
4282#### Extract some information from the operating system and machine files.
4283
c0d27fcc 4284{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 4285 - which libraries the lib-src programs will want, and
503d2be0
AS
4286 - whether the GNU malloc routines are usable..." >&5
4287echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 4288 - which libraries the lib-src programs will want, and
503d2be0 4289 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
4290
4291### First figure out CFLAGS (which we use for running the compiler here)
4292### and REAL_CFLAGS (which we use for real compilation).
4293### The two are the same except on a few systems, where they are made
4294### different to work around various lossages. For example,
4295### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
4296### as implying static linking.
4297
4298### If the CFLAGS env var is specified, we use that value
4299### instead of the default.
4300
4301### It's not important that this name contain the PID; you can't run
4302### two configures in the same directory and have anything work
4303### anyway.
4304tempcname="conftest.c"
4305
4306echo '
4307#include "'${srcdir}'/src/'${opsysfile}'"
4308#include "'${srcdir}'/src/'${machfile}'"
4309#ifndef LIBS_MACHINE
4310#define LIBS_MACHINE
4311#endif
4312#ifndef LIBS_SYSTEM
4313#define LIBS_SYSTEM
4314#endif
4315#ifndef C_SWITCH_SYSTEM
4316#define C_SWITCH_SYSTEM
4317#endif
4318#ifndef C_SWITCH_MACHINE
4319#define C_SWITCH_MACHINE
4320#endif
4321configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
4322configure___ c_switch_system=C_SWITCH_SYSTEM
4323configure___ c_switch_machine=C_SWITCH_MACHINE
4324
4325#ifndef LIB_X11_LIB
4326#define LIB_X11_LIB -lX11
4327#endif
4328
4329#ifndef LIBX11_MACHINE
4330#define LIBX11_MACHINE
4331#endif
4332
4333#ifndef LIBX11_SYSTEM
4334#define LIBX11_SYSTEM
4335#endif
4336configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
4337
4338#ifdef UNEXEC
4339configure___ unexec=UNEXEC
4340#else
4341configure___ unexec=unexec.o
4342#endif
4343
4344#ifdef SYSTEM_MALLOC
4345configure___ system_malloc=yes
4346#else
4347configure___ system_malloc=no
4348#endif
4349
ef9e4345
GM
4350#ifdef USE_MMAP_FOR_BUFFERS
4351configure___ use_mmap_for_buffers=yes
73b77ee5 4352#else
ef9e4345 4353configure___ use_mmap_for_buffers=no
73b77ee5
GM
4354#endif
4355
3b33a005
DL
4356#ifndef C_DEBUG_SWITCH
4357#define C_DEBUG_SWITCH -g
4358#endif
4359
4360#ifndef C_OPTIMIZE_SWITCH
4361#ifdef __GNUC__
4362#define C_OPTIMIZE_SWITCH -O2
4363#else
4364#define C_OPTIMIZE_SWITCH -O
4365#endif
4366#endif
4367
4368#ifndef LD_SWITCH_MACHINE
4369#define LD_SWITCH_MACHINE
4370#endif
4371
4372#ifndef LD_SWITCH_SYSTEM
4373#define LD_SWITCH_SYSTEM
4374#endif
4375
4376#ifndef LD_SWITCH_X_SITE_AUX
4377#define LD_SWITCH_X_SITE_AUX
503d2be0 4378#endif
3b33a005
DL
4379
4380configure___ ld_switch_system=LD_SWITCH_SYSTEM
4381configure___ ld_switch_machine=LD_SWITCH_MACHINE
4382
4383#ifdef THIS_IS_CONFIGURE
4384
4385/* Get the CFLAGS for tests in configure. */
4386#ifdef __GNUC__
4387configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4388#else
4389configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4390#endif
4391
4392#else /* not THIS_IS_CONFIGURE */
4393
4394/* Get the CFLAGS for real compilation. */
4395#ifdef __GNUC__
4396configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4397#else
4398configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4399#endif
4400
4401#endif /* not THIS_IS_CONFIGURE */
4402' > ${tempcname}
4403
4404# The value of CPP is a quoted variable reference, so we need to do this
4405# to get its actual value...
4406CPP=`eval "echo $CPP"`
4407eval `${CPP} -Isrc ${tempcname} \
4408 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4409if test "x$SPECIFIED_CFLAGS" = x; then
4410 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
4411 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4412else
4413 REAL_CFLAGS="$CFLAGS"
4414fi
4415rm ${tempcname}
4416
4417ac_link="$ac_link $ld_switch_machine $ld_switch_system"
4418
4419### Make sure subsequent tests use flags consistent with the build flags.
4420
4421if test x"${OVERRIDE_CPPFLAGS}" != x; then
4422 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
4423else
4424 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
4425fi
4426
6bae0ccf
DL
4427
4428
22044edf
DL
4429
4430cat >>confdefs.h <<\_ACEOF
4431#define _GNU_SOURCE 1
4432_ACEOF
4433
4434
4435
503d2be0 4436# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
4437if test "${enable_largefile+set}" = set; then
4438 enableval="$enable_largefile"
f4988be7 4439
503d2be0
AS
4440fi;
4441if test "$enable_largefile" != no; then
f4988be7 4442
c0d27fcc 4443 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
503d2be0
AS
4444echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4445if test "${ac_cv_sys_largefile_CC+set}" = set; then
4446 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4447else
f4988be7 4448 ac_cv_sys_largefile_CC=no
503d2be0
AS
4449 if test "$GCC" != yes; then
4450 ac_save_CC=$CC
4451 while :; do
4452 # IRIX 6.2 and later do not support large files by default,
4453 # so use the C compiler's -n32 option if that helps.
35996d22 4454 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4455/* confdefs.h. */
4456_ACEOF
4457cat confdefs.h >>conftest.$ac_ext
4458cat >>conftest.$ac_ext <<_ACEOF
4459/* end confdefs.h. */
f4988be7 4460#include <sys/types.h>
503d2be0
AS
4461 /* Check that off_t can represent 2**63 - 1 correctly.
4462 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4463 since some C++ compilers masquerading as C compilers
4464 incorrectly reject 9223372036854775807. */
4465#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4466 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4467 && LARGE_OFF_T % 2147483647 == 1)
4468 ? 1 : -1];
4469int
4470main ()
4471{
f4988be7 4472
503d2be0
AS
4473 ;
4474 return 0;
4475}
4476_ACEOF
4477 rm -f conftest.$ac_objext
c0d27fcc 4478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4479 (eval $ac_compile) 2>conftest.er1
503d2be0 4480 ac_status=$?
35996d22
AS
4481 grep -v '^ *+' conftest.er1 >conftest.err
4482 rm -f conftest.er1
4483 cat conftest.err >&5
c0d27fcc 4484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4485 (exit $ac_status); } &&
551ffc27
ST
4486 { ac_try='test -z "$ac_c_werror_flag"
4487 || test ! -s conftest.err'
35996d22
AS
4488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4489 (eval $ac_try) 2>&5
4490 ac_status=$?
4491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4492 (exit $ac_status); }; } &&
4493 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4495 (eval $ac_try) 2>&5
4496 ac_status=$?
c0d27fcc 4497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4498 (exit $ac_status); }; }; then
4499 break
b192d653 4500else
503d2be0 4501 echo "$as_me: failed program was:" >&5
19650fd6
AS
4502sed 's/^/| /' conftest.$ac_ext >&5
4503
503d2be0 4504fi
35996d22 4505rm -f conftest.err conftest.$ac_objext
503d2be0
AS
4506 CC="$CC -n32"
4507 rm -f conftest.$ac_objext
c0d27fcc 4508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4509 (eval $ac_compile) 2>conftest.er1
503d2be0 4510 ac_status=$?
35996d22
AS
4511 grep -v '^ *+' conftest.er1 >conftest.err
4512 rm -f conftest.er1
4513 cat conftest.err >&5
c0d27fcc 4514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4515 (exit $ac_status); } &&
551ffc27
ST
4516 { ac_try='test -z "$ac_c_werror_flag"
4517 || test ! -s conftest.err'
35996d22
AS
4518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4519 (eval $ac_try) 2>&5
4520 ac_status=$?
4521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4522 (exit $ac_status); }; } &&
4523 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4525 (eval $ac_try) 2>&5
4526 ac_status=$?
c0d27fcc 4527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4528 (exit $ac_status); }; }; then
4529 ac_cv_sys_largefile_CC=' -n32'; break
4530else
4531 echo "$as_me: failed program was:" >&5
19650fd6
AS
4532sed 's/^/| /' conftest.$ac_ext >&5
4533
503d2be0 4534fi
35996d22
AS
4535rm -f conftest.err conftest.$ac_objext
4536 break
503d2be0
AS
4537 done
4538 CC=$ac_save_CC
4539 rm -f conftest.$ac_ext
4540 fi
b192d653 4541fi
c0d27fcc 4542echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
4543echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4544 if test "$ac_cv_sys_largefile_CC" != no; then
4545 CC=$CC$ac_cv_sys_largefile_CC
4546 fi
b192d653 4547
c0d27fcc 4548 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
4549echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4550if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4551 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4552else
503d2be0 4553 while :; do
f4988be7 4554 ac_cv_sys_file_offset_bits=no
503d2be0 4555 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4556/* confdefs.h. */
4557_ACEOF
4558cat confdefs.h >>conftest.$ac_ext
4559cat >>conftest.$ac_ext <<_ACEOF
4560/* end confdefs.h. */
f4988be7 4561#include <sys/types.h>
503d2be0
AS
4562 /* Check that off_t can represent 2**63 - 1 correctly.
4563 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4564 since some C++ compilers masquerading as C compilers
4565 incorrectly reject 9223372036854775807. */
4566#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4567 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4568 && LARGE_OFF_T % 2147483647 == 1)
4569 ? 1 : -1];
4570int
4571main ()
4572{
f4988be7 4573
503d2be0
AS
4574 ;
4575 return 0;
4576}
4577_ACEOF
4578rm -f conftest.$ac_objext
c0d27fcc 4579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4580 (eval $ac_compile) 2>conftest.er1
503d2be0 4581 ac_status=$?
35996d22
AS
4582 grep -v '^ *+' conftest.er1 >conftest.err
4583 rm -f conftest.er1
4584 cat conftest.err >&5
c0d27fcc 4585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4586 (exit $ac_status); } &&
551ffc27
ST
4587 { ac_try='test -z "$ac_c_werror_flag"
4588 || test ! -s conftest.err'
35996d22
AS
4589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4590 (eval $ac_try) 2>&5
4591 ac_status=$?
4592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4593 (exit $ac_status); }; } &&
4594 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4596 (eval $ac_try) 2>&5
4597 ac_status=$?
c0d27fcc 4598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4599 (exit $ac_status); }; }; then
4600 break
f4988be7 4601else
503d2be0 4602 echo "$as_me: failed program was:" >&5
19650fd6
AS
4603sed 's/^/| /' conftest.$ac_ext >&5
4604
503d2be0 4605fi
35996d22 4606rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4607 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4608/* confdefs.h. */
4609_ACEOF
4610cat confdefs.h >>conftest.$ac_ext
4611cat >>conftest.$ac_ext <<_ACEOF
4612/* end confdefs.h. */
f4988be7
GM
4613#define _FILE_OFFSET_BITS 64
4614#include <sys/types.h>
503d2be0
AS
4615 /* Check that off_t can represent 2**63 - 1 correctly.
4616 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4617 since some C++ compilers masquerading as C compilers
4618 incorrectly reject 9223372036854775807. */
4619#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4620 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4621 && LARGE_OFF_T % 2147483647 == 1)
4622 ? 1 : -1];
4623int
4624main ()
4625{
4626
4627 ;
4628 return 0;
4629}
4630_ACEOF
4631rm -f conftest.$ac_objext
c0d27fcc 4632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4633 (eval $ac_compile) 2>conftest.er1
503d2be0 4634 ac_status=$?
35996d22
AS
4635 grep -v '^ *+' conftest.er1 >conftest.err
4636 rm -f conftest.er1
4637 cat conftest.err >&5
c0d27fcc 4638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4639 (exit $ac_status); } &&
551ffc27
ST
4640 { ac_try='test -z "$ac_c_werror_flag"
4641 || test ! -s conftest.err'
35996d22
AS
4642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4643 (eval $ac_try) 2>&5
4644 ac_status=$?
4645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4646 (exit $ac_status); }; } &&
4647 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4649 (eval $ac_try) 2>&5
4650 ac_status=$?
c0d27fcc 4651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4652 (exit $ac_status); }; }; then
4653 ac_cv_sys_file_offset_bits=64; break
4654else
4655 echo "$as_me: failed program was:" >&5
19650fd6
AS
4656sed 's/^/| /' conftest.$ac_ext >&5
4657
503d2be0 4658fi
35996d22 4659rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
4660 break
4661done
ba4481b5 4662fi
c0d27fcc 4663echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
4664echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
4665if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 4666
c0d27fcc 4667cat >>confdefs.h <<_ACEOF
f4988be7 4668#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 4669_ACEOF
f4988be7 4670
503d2be0
AS
4671fi
4672rm -f conftest*
c0d27fcc 4673 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
4674echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
4675if test "${ac_cv_sys_large_files+set}" = set; then
4676 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4677else
503d2be0 4678 while :; do
f4988be7 4679 ac_cv_sys_large_files=no
503d2be0 4680 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4681/* confdefs.h. */
4682_ACEOF
4683cat confdefs.h >>conftest.$ac_ext
4684cat >>conftest.$ac_ext <<_ACEOF
4685/* end confdefs.h. */
503d2be0
AS
4686#include <sys/types.h>
4687 /* Check that off_t can represent 2**63 - 1 correctly.
4688 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4689 since some C++ compilers masquerading as C compilers
4690 incorrectly reject 9223372036854775807. */
4691#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4692 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4693 && LARGE_OFF_T % 2147483647 == 1)
4694 ? 1 : -1];
4695int
4696main ()
4697{
ba4481b5 4698
503d2be0
AS
4699 ;
4700 return 0;
4701}
4702_ACEOF
4703rm -f conftest.$ac_objext
c0d27fcc 4704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4705 (eval $ac_compile) 2>conftest.er1
503d2be0 4706 ac_status=$?
35996d22
AS
4707 grep -v '^ *+' conftest.er1 >conftest.err
4708 rm -f conftest.er1
4709 cat conftest.err >&5
c0d27fcc 4710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4711 (exit $ac_status); } &&
551ffc27
ST
4712 { ac_try='test -z "$ac_c_werror_flag"
4713 || test ! -s conftest.err'
35996d22
AS
4714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4715 (eval $ac_try) 2>&5
4716 ac_status=$?
4717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4718 (exit $ac_status); }; } &&
4719 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4721 (eval $ac_try) 2>&5
4722 ac_status=$?
c0d27fcc 4723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4724 (exit $ac_status); }; }; then
4725 break
ba4481b5 4726else
503d2be0 4727 echo "$as_me: failed program was:" >&5
19650fd6
AS
4728sed 's/^/| /' conftest.$ac_ext >&5
4729
503d2be0 4730fi
35996d22 4731rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4732 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4733/* confdefs.h. */
4734_ACEOF
4735cat confdefs.h >>conftest.$ac_ext
4736cat >>conftest.$ac_ext <<_ACEOF
4737/* end confdefs.h. */
f4988be7 4738#define _LARGE_FILES 1
503d2be0
AS
4739#include <sys/types.h>
4740 /* Check that off_t can represent 2**63 - 1 correctly.
4741 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4742 since some C++ compilers masquerading as C compilers
4743 incorrectly reject 9223372036854775807. */
4744#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4745 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4746 && LARGE_OFF_T % 2147483647 == 1)
4747 ? 1 : -1];
4748int
4749main ()
4750{
f4988be7 4751
503d2be0
AS
4752 ;
4753 return 0;
4754}
4755_ACEOF
4756rm -f conftest.$ac_objext
c0d27fcc 4757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4758 (eval $ac_compile) 2>conftest.er1
503d2be0 4759 ac_status=$?
35996d22
AS
4760 grep -v '^ *+' conftest.er1 >conftest.err
4761 rm -f conftest.er1
4762 cat conftest.err >&5
c0d27fcc 4763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4764 (exit $ac_status); } &&
551ffc27
ST
4765 { ac_try='test -z "$ac_c_werror_flag"
4766 || test ! -s conftest.err'
35996d22
AS
4767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4768 (eval $ac_try) 2>&5
4769 ac_status=$?
4770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4771 (exit $ac_status); }; } &&
4772 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4774 (eval $ac_try) 2>&5
4775 ac_status=$?
c0d27fcc 4776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4777 (exit $ac_status); }; }; then
4778 ac_cv_sys_large_files=1; break
4779else
4780 echo "$as_me: failed program was:" >&5
19650fd6
AS
4781sed 's/^/| /' conftest.$ac_ext >&5
4782
503d2be0 4783fi
35996d22 4784rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
4785 break
4786done
ba4481b5 4787fi
c0d27fcc 4788echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
4789echo "${ECHO_T}$ac_cv_sys_large_files" >&6
4790if test "$ac_cv_sys_large_files" != no; then
ba4481b5 4791
c0d27fcc 4792cat >>confdefs.h <<_ACEOF
f4988be7 4793#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 4794_ACEOF
ba4481b5 4795
503d2be0
AS
4796fi
4797rm -f conftest*
4798fi
ba4481b5 4799
c0d27fcc 4800
2c9dccc9
PJ
4801if test "${with_sound}" != "no"; then
4802 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
4803 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4804echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4805if test "${ac_cv_header_stdc+set}" = set; then
4806 echo $ECHO_N "(cached) $ECHO_C" >&6
4807else
4808 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4809/* confdefs.h. */
4810_ACEOF
4811cat confdefs.h >>conftest.$ac_ext
4812cat >>conftest.$ac_ext <<_ACEOF
4813/* end confdefs.h. */
c0d27fcc
MR
4814#include <stdlib.h>
4815#include <stdarg.h>
4816#include <string.h>
4817#include <float.h>
98418dba 4818
19650fd6
AS
4819int
4820main ()
4821{
4822
4823 ;
4824 return 0;
4825}
c0d27fcc 4826_ACEOF
19650fd6
AS
4827rm -f conftest.$ac_objext
4828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4829 (eval $ac_compile) 2>conftest.er1
cd958eb3 4830 ac_status=$?
35996d22
AS
4831 grep -v '^ *+' conftest.er1 >conftest.err
4832 rm -f conftest.er1
4833 cat conftest.err >&5
cd958eb3 4834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 4835 (exit $ac_status); } &&
551ffc27
ST
4836 { ac_try='test -z "$ac_c_werror_flag"
4837 || test ! -s conftest.err'
35996d22
AS
4838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4839 (eval $ac_try) 2>&5
4840 ac_status=$?
4841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4842 (exit $ac_status); }; } &&
4843 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
4844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4845 (eval $ac_try) 2>&5
4846 ac_status=$?
4847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4848 (exit $ac_status); }; }; then
c0d27fcc
MR
4849 ac_cv_header_stdc=yes
4850else
4851 echo "$as_me: failed program was:" >&5
19650fd6
AS
4852sed 's/^/| /' conftest.$ac_ext >&5
4853
4854ac_cv_header_stdc=no
c0d27fcc 4855fi
35996d22 4856rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4857
4858if test $ac_cv_header_stdc = yes; then
4859 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4860 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4861/* confdefs.h. */
4862_ACEOF
4863cat confdefs.h >>conftest.$ac_ext
4864cat >>conftest.$ac_ext <<_ACEOF
4865/* end confdefs.h. */
c0d27fcc
MR
4866#include <string.h>
4867
4868_ACEOF
4869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4870 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
4871 :
4872else
4873 ac_cv_header_stdc=no
4874fi
4875rm -f conftest*
4876
4877fi
4878
4879if test $ac_cv_header_stdc = yes; then
4880 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4881 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4882/* confdefs.h. */
4883_ACEOF
4884cat confdefs.h >>conftest.$ac_ext
4885cat >>conftest.$ac_ext <<_ACEOF
4886/* end confdefs.h. */
c0d27fcc
MR
4887#include <stdlib.h>
4888
4889_ACEOF
4890if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4891 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
4892 :
4893else
4894 ac_cv_header_stdc=no
4895fi
4896rm -f conftest*
4897
4898fi
4899
4900if test $ac_cv_header_stdc = yes; then
4901 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4902 if test "$cross_compiling" = yes; then
4903 :
4904else
4905 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4906/* confdefs.h. */
4907_ACEOF
4908cat confdefs.h >>conftest.$ac_ext
4909cat >>conftest.$ac_ext <<_ACEOF
4910/* end confdefs.h. */
c0d27fcc
MR
4911#include <ctype.h>
4912#if ((' ' & 0x0FF) == 0x020)
4913# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4914# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4915#else
19650fd6 4916# define ISLOWER(c) \
35996d22
AS
4917 (('a' <= (c) && (c) <= 'i') \
4918 || ('j' <= (c) && (c) <= 'r') \
4919 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
4920# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4921#endif
4922
4923#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4924int
4925main ()
4926{
4927 int i;
4928 for (i = 0; i < 256; i++)
4929 if (XOR (islower (i), ISLOWER (i))
35996d22 4930 || toupper (i) != TOUPPER (i))
c0d27fcc
MR
4931 exit(2);
4932 exit (0);
4933}
4934_ACEOF
4935rm -f conftest$ac_exeext
4936if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4937 (eval $ac_link) 2>&5
4938 ac_status=$?
4939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4940 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4942 (eval $ac_try) 2>&5
4943 ac_status=$?
4944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4945 (exit $ac_status); }; }; then
4946 :
4947else
4948 echo "$as_me: program exited with status $ac_status" >&5
4949echo "$as_me: failed program was:" >&5
19650fd6
AS
4950sed 's/^/| /' conftest.$ac_ext >&5
4951
c0d27fcc
MR
4952( exit $ac_status )
4953ac_cv_header_stdc=no
4954fi
35996d22 4955rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4956fi
4957fi
4958fi
4959echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4960echo "${ECHO_T}$ac_cv_header_stdc" >&6
4961if test $ac_cv_header_stdc = yes; then
4962
4963cat >>confdefs.h <<\_ACEOF
4964#define STDC_HEADERS 1
4965_ACEOF
4966
4967fi
4968
4969# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
35996d22 4980 inttypes.h stdint.h unistd.h
98418dba
CW
4981do
4982as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc 4983echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
4984echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4985if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 4986 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4987else
925c2f3f 4988 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4989/* confdefs.h. */
4990_ACEOF
4991cat confdefs.h >>conftest.$ac_ext
4992cat >>conftest.$ac_ext <<_ACEOF
4993/* end confdefs.h. */
c0d27fcc
MR
4994$ac_includes_default
4995
4996#include <$ac_header>
4997_ACEOF
4998rm -f conftest.$ac_objext
4999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5000 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5001 ac_status=$?
35996d22
AS
5002 grep -v '^ *+' conftest.er1 >conftest.err
5003 rm -f conftest.er1
5004 cat conftest.err >&5
c0d27fcc
MR
5005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5006 (exit $ac_status); } &&
551ffc27
ST
5007 { ac_try='test -z "$ac_c_werror_flag"
5008 || test ! -s conftest.err'
35996d22
AS
5009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5010 (eval $ac_try) 2>&5
5011 ac_status=$?
5012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5013 (exit $ac_status); }; } &&
5014 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5016 (eval $ac_try) 2>&5
5017 ac_status=$?
5018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5019 (exit $ac_status); }; }; then
5020 eval "$as_ac_Header=yes"
5021else
5022 echo "$as_me: failed program was:" >&5
19650fd6
AS
5023sed 's/^/| /' conftest.$ac_ext >&5
5024
c0d27fcc
MR
5025eval "$as_ac_Header=no"
5026fi
35996d22 5027rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5028fi
5029echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5030echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5031if test `eval echo '${'$as_ac_Header'}'` = yes; then
5032 cat >>confdefs.h <<_ACEOF
5033#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5034_ACEOF
5035
5036fi
5037
5038done
5039
5040
5041
5042
5043
5044for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5045do
5046as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5047if eval "test \"\${$as_ac_Header+set}\" = set"; then
5048 echo "$as_me:$LINENO: checking for $ac_header" >&5
5049echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5050if eval "test \"\${$as_ac_Header+set}\" = set"; then
5051 echo $ECHO_N "(cached) $ECHO_C" >&6
5052fi
5053echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5054echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5055else
5056 # Is the header compilable?
5057echo "$as_me:$LINENO: checking $ac_header usability" >&5
5058echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5059cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5060/* confdefs.h. */
5061_ACEOF
5062cat confdefs.h >>conftest.$ac_ext
5063cat >>conftest.$ac_ext <<_ACEOF
5064/* end confdefs.h. */
c0d27fcc 5065$ac_includes_default
98418dba 5066#include <$ac_header>
503d2be0 5067_ACEOF
c0d27fcc
MR
5068rm -f conftest.$ac_objext
5069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5070 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5071 ac_status=$?
35996d22
AS
5072 grep -v '^ *+' conftest.er1 >conftest.err
5073 rm -f conftest.er1
5074 cat conftest.err >&5
c0d27fcc
MR
5075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5076 (exit $ac_status); } &&
551ffc27
ST
5077 { ac_try='test -z "$ac_c_werror_flag"
5078 || test ! -s conftest.err'
35996d22
AS
5079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5080 (eval $ac_try) 2>&5
5081 ac_status=$?
5082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5083 (exit $ac_status); }; } &&
5084 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5086 (eval $ac_try) 2>&5
5087 ac_status=$?
5088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5089 (exit $ac_status); }; }; then
5090 ac_header_compiler=yes
5091else
5092 echo "$as_me: failed program was:" >&5
19650fd6
AS
5093sed 's/^/| /' conftest.$ac_ext >&5
5094
c0d27fcc
MR
5095ac_header_compiler=no
5096fi
35996d22 5097rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5098echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5099echo "${ECHO_T}$ac_header_compiler" >&6
5100
5101# Is the header present?
5102echo "$as_me:$LINENO: checking $ac_header presence" >&5
5103echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5104cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5105/* confdefs.h. */
5106_ACEOF
5107cat confdefs.h >>conftest.$ac_ext
5108cat >>conftest.$ac_ext <<_ACEOF
5109/* end confdefs.h. */
c0d27fcc
MR
5110#include <$ac_header>
5111_ACEOF
5112if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5113 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5114 ac_status=$?
6bae0ccf 5115 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5116 rm -f conftest.er1
5117 cat conftest.err >&5
c0d27fcc 5118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5119 (exit $ac_status); } >/dev/null; then
5120 if test -s conftest.err; then
5121 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5122 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5123 else
5124 ac_cpp_err=
5125 fi
5126else
5127 ac_cpp_err=yes
5128fi
5129if test -z "$ac_cpp_err"; then
c0d27fcc 5130 ac_header_preproc=yes
f4988be7 5131else
503d2be0 5132 echo "$as_me: failed program was:" >&5
19650fd6
AS
5133sed 's/^/| /' conftest.$ac_ext >&5
5134
c0d27fcc 5135 ac_header_preproc=no
f4988be7 5136fi
98418dba 5137rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5138echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5139echo "${ECHO_T}$ac_header_preproc" >&6
5140
5141# So? What about this header?
35996d22
AS
5142case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5143 yes:no: )
c0d27fcc
MR
5144 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5145echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
5146 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5147echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5148 ac_header_preproc=yes
19650fd6 5149 ;;
35996d22 5150 no:yes:* )
c0d27fcc
MR
5151 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5152echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
5153 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5154echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5155 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5156echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5157 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5158echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5159 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5160echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
5161 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5162echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5163 (
5164 cat <<\_ASBOX
35996d22
AS
5165## ------------------------------------------ ##
5166## Report this to the AC_PACKAGE_NAME lists. ##
5167## ------------------------------------------ ##
19650fd6
AS
5168_ASBOX
5169 ) |
5170 sed "s/^/$as_me: WARNING: /" >&2
5171 ;;
c0d27fcc
MR
5172esac
5173echo "$as_me:$LINENO: checking for $ac_header" >&5
5174echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5175if eval "test \"\${$as_ac_Header+set}\" = set"; then
5176 echo $ECHO_N "(cached) $ECHO_C" >&6
5177else
35996d22 5178 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 5179fi
c0d27fcc 5180echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5181echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5182
5183fi
98418dba 5184if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5185 cat >>confdefs.h <<_ACEOF
98418dba 5186#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5187_ACEOF
f4988be7
GM
5188
5189fi
c0d27fcc 5190
98418dba
CW
5191done
5192
5193 # Emulation library used on NetBSD.
c0d27fcc 5194 echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
5195echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
5196if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 5197 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5198else
98418dba
CW
5199 ac_check_lib_save_LIBS=$LIBS
5200LIBS="-lossaudio $LIBS"
5201cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5202/* confdefs.h. */
5203_ACEOF
5204cat confdefs.h >>conftest.$ac_ext
5205cat >>conftest.$ac_ext <<_ACEOF
5206/* end confdefs.h. */
98418dba
CW
5207
5208/* Override any gcc2 internal prototype to avoid an error. */
5209#ifdef __cplusplus
5210extern "C"
f4988be7 5211#endif
98418dba
CW
5212/* We use char because int might match the return type of a gcc2
5213 builtin and then its argument prototype would still apply. */
5214char _oss_ioctl ();
503d2be0
AS
5215int
5216main ()
5217{
98418dba 5218_oss_ioctl ();
503d2be0
AS
5219 ;
5220 return 0;
5221}
5222_ACEOF
98418dba 5223rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 5224if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 5225 (eval $ac_link) 2>conftest.er1
503d2be0 5226 ac_status=$?
35996d22
AS
5227 grep -v '^ *+' conftest.er1 >conftest.err
5228 rm -f conftest.er1
5229 cat conftest.err >&5
c0d27fcc 5230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5231 (exit $ac_status); } &&
551ffc27
ST
5232 { ac_try='test -z "$ac_c_werror_flag"
5233 || test ! -s conftest.err'
35996d22
AS
5234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5235 (eval $ac_try) 2>&5
5236 ac_status=$?
5237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5238 (exit $ac_status); }; } &&
5239 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 5240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5241 (eval $ac_try) 2>&5
5242 ac_status=$?
c0d27fcc 5243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5244 (exit $ac_status); }; }; then
98418dba 5245 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 5246else
503d2be0 5247 echo "$as_me: failed program was:" >&5
19650fd6
AS
5248sed 's/^/| /' conftest.$ac_ext >&5
5249
98418dba 5250ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 5251fi
35996d22
AS
5252rm -f conftest.err conftest.$ac_objext \
5253 conftest$ac_exeext conftest.$ac_ext
98418dba 5254LIBS=$ac_check_lib_save_LIBS
f4988be7 5255fi
c0d27fcc 5256echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
5257echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
5258if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
5259 LIBSOUND=-lossaudio
5260else
5261 LIBSOUND=
5262fi
5263
c0d27fcc 5264
f4988be7 5265fi
c0d27fcc
MR
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
22044edf
DL
5284
5285
973a76b1 5286
cffcede7 5287
551ffc27 5288
c0d27fcc 5289
f4988be7 5290
98418dba
CW
5291for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5292 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5293 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27
ST
5294 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
5295 sys/utsname.h
98418dba
CW
5296do
5297as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5298if eval "test \"\${$as_ac_Header+set}\" = set"; then
5299 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5300echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5301if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5302 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5303fi
5304echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5305echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5306else
c0d27fcc
MR
5307 # Is the header compilable?
5308echo "$as_me:$LINENO: checking $ac_header usability" >&5
5309echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5310cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5311/* confdefs.h. */
5312_ACEOF
5313cat confdefs.h >>conftest.$ac_ext
5314cat >>conftest.$ac_ext <<_ACEOF
5315/* end confdefs.h. */
c0d27fcc
MR
5316$ac_includes_default
5317#include <$ac_header>
5318_ACEOF
5319rm -f conftest.$ac_objext
5320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5321 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5322 ac_status=$?
35996d22
AS
5323 grep -v '^ *+' conftest.er1 >conftest.err
5324 rm -f conftest.er1
5325 cat conftest.err >&5
c0d27fcc
MR
5326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5327 (exit $ac_status); } &&
551ffc27
ST
5328 { ac_try='test -z "$ac_c_werror_flag"
5329 || test ! -s conftest.err'
35996d22
AS
5330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5331 (eval $ac_try) 2>&5
5332 ac_status=$?
5333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5334 (exit $ac_status); }; } &&
5335 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5337 (eval $ac_try) 2>&5
5338 ac_status=$?
5339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5340 (exit $ac_status); }; }; then
5341 ac_header_compiler=yes
5342else
5343 echo "$as_me: failed program was:" >&5
19650fd6
AS
5344sed 's/^/| /' conftest.$ac_ext >&5
5345
c0d27fcc
MR
5346ac_header_compiler=no
5347fi
35996d22 5348rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5349echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5350echo "${ECHO_T}$ac_header_compiler" >&6
5351
5352# Is the header present?
5353echo "$as_me:$LINENO: checking $ac_header presence" >&5
5354echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5355cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5356/* confdefs.h. */
5357_ACEOF
5358cat confdefs.h >>conftest.$ac_ext
5359cat >>conftest.$ac_ext <<_ACEOF
5360/* end confdefs.h. */
98418dba 5361#include <$ac_header>
503d2be0 5362_ACEOF
c0d27fcc 5363if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5364 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5365 ac_status=$?
6bae0ccf 5366 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5367 rm -f conftest.er1
5368 cat conftest.err >&5
c0d27fcc 5369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5370 (exit $ac_status); } >/dev/null; then
5371 if test -s conftest.err; then
5372 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5373 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5374 else
5375 ac_cpp_err=
5376 fi
5377else
5378 ac_cpp_err=yes
5379fi
5380if test -z "$ac_cpp_err"; then
c0d27fcc 5381 ac_header_preproc=yes
34ec9ebe 5382else
503d2be0 5383 echo "$as_me: failed program was:" >&5
19650fd6
AS
5384sed 's/^/| /' conftest.$ac_ext >&5
5385
c0d27fcc 5386 ac_header_preproc=no
34ec9ebe 5387fi
98418dba 5388rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5389echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5390echo "${ECHO_T}$ac_header_preproc" >&6
5391
5392# So? What about this header?
35996d22
AS
5393case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5394 yes:no: )
c0d27fcc
MR
5395 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5396echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
5397 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5398echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5399 ac_header_preproc=yes
19650fd6 5400 ;;
35996d22 5401 no:yes:* )
c0d27fcc
MR
5402 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5403echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
5404 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5405echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5406 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5407echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5408 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5409echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5410 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5411echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
5412 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5413echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5414 (
5415 cat <<\_ASBOX
35996d22
AS
5416## ------------------------------------------ ##
5417## Report this to the AC_PACKAGE_NAME lists. ##
5418## ------------------------------------------ ##
19650fd6
AS
5419_ASBOX
5420 ) |
5421 sed "s/^/$as_me: WARNING: /" >&2
5422 ;;
c0d27fcc
MR
5423esac
5424echo "$as_me:$LINENO: checking for $ac_header" >&5
5425echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5426if eval "test \"\${$as_ac_Header+set}\" = set"; then
5427 echo $ECHO_N "(cached) $ECHO_C" >&6
5428else
35996d22 5429 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 5430fi
c0d27fcc 5431echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5432echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5433
5434fi
98418dba 5435if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5436 cat >>confdefs.h <<_ACEOF
98418dba 5437#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5438_ACEOF
34ec9ebe 5439
98418dba 5440fi
c0d27fcc 5441
98418dba
CW
5442done
5443
22044edf 5444
f17e308a
JD
5445echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
5446echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6
5447cat >conftest.$ac_ext <<_ACEOF
5448/* confdefs.h. */
5449_ACEOF
5450cat confdefs.h >>conftest.$ac_ext
5451cat >>conftest.$ac_ext <<_ACEOF
5452/* end confdefs.h. */
5453#include <sys/personality.h>
5454int
5455main ()
5456{
5457personality (PER_LINUX32)
5458 ;
5459 return 0;
5460}
5461_ACEOF
5462rm -f conftest.$ac_objext
5463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5464 (eval $ac_compile) 2>conftest.er1
5465 ac_status=$?
5466 grep -v '^ *+' conftest.er1 >conftest.err
5467 rm -f conftest.er1
5468 cat conftest.err >&5
5469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5470 (exit $ac_status); } &&
551ffc27
ST
5471 { ac_try='test -z "$ac_c_werror_flag"
5472 || test ! -s conftest.err'
f17e308a
JD
5473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5474 (eval $ac_try) 2>&5
5475 ac_status=$?
5476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5477 (exit $ac_status); }; } &&
5478 { ac_try='test -s conftest.$ac_objext'
5479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5480 (eval $ac_try) 2>&5
5481 ac_status=$?
5482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5483 (exit $ac_status); }; }; then
5484 emacs_cv_personality_linux32=yes
5485else
5486 echo "$as_me: failed program was:" >&5
5487sed 's/^/| /' conftest.$ac_ext >&5
5488
5489emacs_cv_personality_linux32=no
5490fi
5491rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5492echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
5493echo "${ECHO_T}$emacs_cv_personality_linux32" >&6
5494
5495if test $emacs_cv_personality_linux32 = yes; then
5496
5497cat >>confdefs.h <<\_ACEOF
5498#define HAVE_PERSONALITY_LINUX32 1
5499_ACEOF
5500
5501fi
5502
5503
22044edf
DL
5504for ac_header in term.h
5505do
5506as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5507echo "$as_me:$LINENO: checking for $ac_header" >&5
5508echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5509if eval "test \"\${$as_ac_Header+set}\" = set"; then
5510 echo $ECHO_N "(cached) $ECHO_C" >&6
5511else
5512 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5513/* confdefs.h. */
5514_ACEOF
5515cat confdefs.h >>conftest.$ac_ext
5516cat >>conftest.$ac_ext <<_ACEOF
5517/* end confdefs.h. */
22044edf
DL
5518#include <$ac_header>
5519_ACEOF
5520if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5521 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5522 ac_status=$?
5523 grep -v '^ *+' conftest.er1 >conftest.err
5524 rm -f conftest.er1
5525 cat conftest.err >&5
5526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5527 (exit $ac_status); } >/dev/null; then
5528 if test -s conftest.err; then
5529 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5530 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22044edf
DL
5531 else
5532 ac_cpp_err=
5533 fi
5534else
5535 ac_cpp_err=yes
5536fi
5537if test -z "$ac_cpp_err"; then
5538 eval "$as_ac_Header=yes"
5539else
5540 echo "$as_me: failed program was:" >&5
19650fd6
AS
5541sed 's/^/| /' conftest.$ac_ext >&5
5542
22044edf
DL
5543 eval "$as_ac_Header=no"
5544fi
5545rm -f conftest.err conftest.$ac_ext
5546fi
5547echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5548echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5549if test `eval echo '${'$as_ac_Header'}'` = yes; then
5550 cat >>confdefs.h <<_ACEOF
5551#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5552_ACEOF
5553
5554fi
5555
5556done
5557
c0d27fcc 5558echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
5559echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5560if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 5561 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5562else
503d2be0 5563 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5564/* confdefs.h. */
5565_ACEOF
5566cat confdefs.h >>conftest.$ac_ext
5567cat >>conftest.$ac_ext <<_ACEOF
5568/* end confdefs.h. */
98418dba
CW
5569#include <stdlib.h>
5570#include <stdarg.h>
5571#include <string.h>
5572#include <float.h>
5573
19650fd6
AS
5574int
5575main ()
5576{
5577
5578 ;
5579 return 0;
5580}
98418dba 5581_ACEOF
19650fd6
AS
5582rm -f conftest.$ac_objext
5583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5584 (eval $ac_compile) 2>conftest.er1
cd958eb3 5585 ac_status=$?
35996d22
AS
5586 grep -v '^ *+' conftest.er1 >conftest.err
5587 rm -f conftest.er1
5588 cat conftest.err >&5
cd958eb3 5589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 5590 (exit $ac_status); } &&
551ffc27
ST
5591 { ac_try='test -z "$ac_c_werror_flag"
5592 || test ! -s conftest.err'
35996d22
AS
5593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5594 (eval $ac_try) 2>&5
5595 ac_status=$?
5596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5597 (exit $ac_status); }; } &&
5598 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
5599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5600 (eval $ac_try) 2>&5
5601 ac_status=$?
5602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5603 (exit $ac_status); }; }; then
98418dba 5604 ac_cv_header_stdc=yes
ba4481b5 5605else
503d2be0 5606 echo "$as_me: failed program was:" >&5
19650fd6
AS
5607sed 's/^/| /' conftest.$ac_ext >&5
5608
5609ac_cv_header_stdc=no
ba4481b5 5610fi
35996d22 5611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
5612
5613if test $ac_cv_header_stdc = yes; then
5614 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5615 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5616/* confdefs.h. */
5617_ACEOF
5618cat confdefs.h >>conftest.$ac_ext
5619cat >>conftest.$ac_ext <<_ACEOF
5620/* end confdefs.h. */
98418dba
CW
5621#include <string.h>
5622
5623_ACEOF
5624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5625 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
5626 :
5627else
5628 ac_cv_header_stdc=no
ba4481b5 5629fi
98418dba 5630rm -f conftest*
ba4481b5
DL
5631
5632fi
5633
98418dba
CW
5634if test $ac_cv_header_stdc = yes; then
5635 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5636 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5637/* confdefs.h. */
5638_ACEOF
5639cat confdefs.h >>conftest.$ac_ext
5640cat >>conftest.$ac_ext <<_ACEOF
5641/* end confdefs.h. */
98418dba
CW
5642#include <stdlib.h>
5643
5644_ACEOF
5645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5646 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
5647 :
5648else
5649 ac_cv_header_stdc=no
5650fi
5651rm -f conftest*
5652
5653fi
5654
5655if test $ac_cv_header_stdc = yes; then
5656 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5657 if test "$cross_compiling" = yes; then
5658 :
d42122a3 5659else
503d2be0 5660 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5661/* confdefs.h. */
5662_ACEOF
5663cat confdefs.h >>conftest.$ac_ext
5664cat >>conftest.$ac_ext <<_ACEOF
5665/* end confdefs.h. */
98418dba
CW
5666#include <ctype.h>
5667#if ((' ' & 0x0FF) == 0x020)
5668# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5669# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5670#else
19650fd6 5671# define ISLOWER(c) \
35996d22
AS
5672 (('a' <= (c) && (c) <= 'i') \
5673 || ('j' <= (c) && (c) <= 'r') \
5674 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
5675# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5676#endif
5677
5678#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
5679int
5680main ()
5681{
98418dba
CW
5682 int i;
5683 for (i = 0; i < 256; i++)
5684 if (XOR (islower (i), ISLOWER (i))
35996d22 5685 || toupper (i) != TOUPPER (i))
98418dba
CW
5686 exit(2);
5687 exit (0);
503d2be0
AS
5688}
5689_ACEOF
98418dba 5690rm -f conftest$ac_exeext
c0d27fcc 5691if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 5692 (eval $ac_link) 2>&5
503d2be0 5693 ac_status=$?
c0d27fcc 5694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 5695 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 5696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5697 (eval $ac_try) 2>&5
5698 ac_status=$?
c0d27fcc 5699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5700 (exit $ac_status); }; }; then
98418dba 5701 :
d42122a3 5702else
98418dba
CW
5703 echo "$as_me: program exited with status $ac_status" >&5
5704echo "$as_me: failed program was:" >&5
19650fd6
AS
5705sed 's/^/| /' conftest.$ac_ext >&5
5706
c0d27fcc 5707( exit $ac_status )
98418dba 5708ac_cv_header_stdc=no
d42122a3 5709fi
35996d22 5710rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 5711fi
98418dba
CW
5712fi
5713fi
c0d27fcc 5714echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
98418dba
CW
5715echo "${ECHO_T}$ac_cv_header_stdc" >&6
5716if test $ac_cv_header_stdc = yes; then
5717
c0d27fcc 5718cat >>confdefs.h <<\_ACEOF
98418dba 5719#define STDC_HEADERS 1
c0d27fcc 5720_ACEOF
d42122a3
DL
5721
5722fi
5723
c0d27fcc 5724echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
5725echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5726if test "${ac_cv_header_time+set}" = set; then
503d2be0 5727 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5728else
503d2be0 5729 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5730/* confdefs.h. */
5731_ACEOF
5732cat confdefs.h >>conftest.$ac_ext
5733cat >>conftest.$ac_ext <<_ACEOF
5734/* end confdefs.h. */
ba4481b5 5735#include <sys/types.h>
98418dba 5736#include <sys/time.h>
ba4481b5 5737#include <time.h>
503d2be0
AS
5738
5739int
5740main ()
5741{
98418dba
CW
5742if ((struct tm *) 0)
5743return 0;
503d2be0
AS
5744 ;
5745 return 0;
5746}
5747_ACEOF
5748rm -f conftest.$ac_objext
c0d27fcc 5749if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5750 (eval $ac_compile) 2>conftest.er1
503d2be0 5751 ac_status=$?
35996d22
AS
5752 grep -v '^ *+' conftest.er1 >conftest.err
5753 rm -f conftest.er1
5754 cat conftest.err >&5
c0d27fcc 5755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5756 (exit $ac_status); } &&
551ffc27
ST
5757 { ac_try='test -z "$ac_c_werror_flag"
5758 || test ! -s conftest.err'
35996d22
AS
5759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5760 (eval $ac_try) 2>&5
5761 ac_status=$?
5762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5763 (exit $ac_status); }; } &&
5764 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5766 (eval $ac_try) 2>&5
5767 ac_status=$?
c0d27fcc 5768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5769 (exit $ac_status); }; }; then
98418dba 5770 ac_cv_header_time=yes
ba4481b5 5771else
503d2be0 5772 echo "$as_me: failed program was:" >&5
19650fd6
AS
5773sed 's/^/| /' conftest.$ac_ext >&5
5774
98418dba 5775ac_cv_header_time=no
ba4481b5 5776fi
35996d22 5777rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 5778fi
c0d27fcc 5779echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
5780echo "${ECHO_T}$ac_cv_header_time" >&6
5781if test $ac_cv_header_time = yes; then
503d2be0 5782
c0d27fcc 5783cat >>confdefs.h <<\_ACEOF
98418dba 5784#define TIME_WITH_SYS_TIME 1
c0d27fcc 5785_ACEOF
ba4481b5
DL
5786
5787fi
5788
cd958eb3
MB
5789echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
5790echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
5791if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 5792 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5793else
503d2be0 5794 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5795/* confdefs.h. */
5796_ACEOF
5797cat confdefs.h >>conftest.$ac_ext
5798cat >>conftest.$ac_ext <<_ACEOF
5799/* end confdefs.h. */
cd958eb3
MB
5800$ac_includes_default
5801int
5802main ()
5803{
5804#ifndef sys_siglist
5805 char *p = (char *) sys_siglist;
98418dba 5806#endif
503d2be0 5807
cd958eb3
MB
5808 ;
5809 return 0;
5810}
5811_ACEOF
5812rm -f conftest.$ac_objext
5813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5814 (eval $ac_compile) 2>conftest.er1
cd958eb3 5815 ac_status=$?
35996d22
AS
5816 grep -v '^ *+' conftest.er1 >conftest.err
5817 rm -f conftest.er1
5818 cat conftest.err >&5
cd958eb3
MB
5819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820 (exit $ac_status); } &&
551ffc27
ST
5821 { ac_try='test -z "$ac_c_werror_flag"
5822 || test ! -s conftest.err'
35996d22
AS
5823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5824 (eval $ac_try) 2>&5
5825 ac_status=$?
5826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5827 (exit $ac_status); }; } &&
5828 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
5829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5830 (eval $ac_try) 2>&5
5831 ac_status=$?
5832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5833 (exit $ac_status); }; }; then
5834 ac_cv_have_decl_sys_siglist=yes
5835else
5836 echo "$as_me: failed program was:" >&5
19650fd6
AS
5837sed 's/^/| /' conftest.$ac_ext >&5
5838
cd958eb3
MB
5839ac_cv_have_decl_sys_siglist=no
5840fi
35996d22 5841rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
5842fi
5843echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
5844echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
5845if test $ac_cv_have_decl_sys_siglist = yes; then
5846
5847cat >>confdefs.h <<_ACEOF
5848#define HAVE_DECL_SYS_SIGLIST 1
5849_ACEOF
5850
5851
5852else
5853 cat >>confdefs.h <<_ACEOF
5854#define HAVE_DECL_SYS_SIGLIST 0
5855_ACEOF
5856
5857
5858fi
5859
5860
5861if test $ac_cv_have_decl_sys_siglist != yes; then
5862 # For Tru64, at least:
5863 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
5864echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
5865if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
5866 echo $ECHO_N "(cached) $ECHO_C" >&6
5867else
5868 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5869/* confdefs.h. */
5870_ACEOF
5871cat confdefs.h >>conftest.$ac_ext
5872cat >>conftest.$ac_ext <<_ACEOF
5873/* end confdefs.h. */
cd958eb3 5874$ac_includes_default
503d2be0
AS
5875int
5876main ()
5877{
cd958eb3
MB
5878#ifndef __sys_siglist
5879 char *p = (char *) __sys_siglist;
5880#endif
5881
503d2be0
AS
5882 ;
5883 return 0;
5884}
5885_ACEOF
5886rm -f conftest.$ac_objext
c0d27fcc 5887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5888 (eval $ac_compile) 2>conftest.er1
503d2be0 5889 ac_status=$?
35996d22
AS
5890 grep -v '^ *+' conftest.er1 >conftest.err
5891 rm -f conftest.er1
5892 cat conftest.err >&5
c0d27fcc 5893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5894 (exit $ac_status); } &&
551ffc27
ST
5895 { ac_try='test -z "$ac_c_werror_flag"
5896 || test ! -s conftest.err'
35996d22
AS
5897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5898 (eval $ac_try) 2>&5
5899 ac_status=$?
5900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5901 (exit $ac_status); }; } &&
5902 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5904 (eval $ac_try) 2>&5
5905 ac_status=$?
c0d27fcc 5906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5907 (exit $ac_status); }; }; then
cd958eb3 5908 ac_cv_have_decl___sys_siglist=yes
ba4481b5 5909else
503d2be0 5910 echo "$as_me: failed program was:" >&5
19650fd6
AS
5911sed 's/^/| /' conftest.$ac_ext >&5
5912
cd958eb3 5913ac_cv_have_decl___sys_siglist=no
ba4481b5 5914fi
35996d22 5915rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5916fi
cd958eb3
MB
5917echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
5918echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6
5919if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 5920
cd958eb3
MB
5921cat >>confdefs.h <<_ACEOF
5922#define HAVE_DECL___SYS_SIGLIST 1
5923_ACEOF
5924
5925
5926else
5927 cat >>confdefs.h <<_ACEOF
5928#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 5929_ACEOF
503d2be0 5930
cd958eb3 5931
ba4481b5
DL
5932fi
5933
cd958eb3
MB
5934
5935 if test $ac_cv_have_decl___sys_siglist = yes; then
5936
5937cat >>confdefs.h <<\_ACEOF
5938#define sys_siglist __sys_siglist
5939_ACEOF
5940
5941 fi
5942fi
c0d27fcc 5943echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
5944echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
5945if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 5946 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5947else
503d2be0 5948 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5949/* confdefs.h. */
5950_ACEOF
5951cat confdefs.h >>conftest.$ac_ext
5952cat >>conftest.$ac_ext <<_ACEOF
5953/* end confdefs.h. */
98418dba
CW
5954#include <sys/types.h>
5955#include <sys/wait.h>
5956#ifndef WEXITSTATUS
5957# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5958#endif
5959#ifndef WIFEXITED
5960# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 5961#endif
503d2be0
AS
5962
5963int
5964main ()
5965{
98418dba
CW
5966 int s;
5967 wait (&s);
5968 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
5969 ;
5970 return 0;
5971}
5972_ACEOF
98418dba 5973rm -f conftest.$ac_objext
c0d27fcc 5974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5975 (eval $ac_compile) 2>conftest.er1
503d2be0 5976 ac_status=$?
35996d22
AS
5977 grep -v '^ *+' conftest.er1 >conftest.err
5978 rm -f conftest.er1
5979 cat conftest.err >&5
c0d27fcc 5980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5981 (exit $ac_status); } &&
551ffc27
ST
5982 { ac_try='test -z "$ac_c_werror_flag"
5983 || test ! -s conftest.err'
35996d22
AS
5984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5985 (eval $ac_try) 2>&5
5986 ac_status=$?
5987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5988 (exit $ac_status); }; } &&
5989 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5991 (eval $ac_try) 2>&5
5992 ac_status=$?
c0d27fcc 5993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5994 (exit $ac_status); }; }; then
98418dba 5995 ac_cv_header_sys_wait_h=yes
ba4481b5 5996else
503d2be0 5997 echo "$as_me: failed program was:" >&5
19650fd6
AS
5998sed 's/^/| /' conftest.$ac_ext >&5
5999
98418dba 6000ac_cv_header_sys_wait_h=no
ba4481b5 6001fi
35996d22 6002rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6003fi
c0d27fcc 6004echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
6005echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
6006if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 6007
c0d27fcc 6008cat >>confdefs.h <<\_ACEOF
98418dba 6009#define HAVE_SYS_WAIT_H 1
c0d27fcc 6010_ACEOF
ba4481b5 6011
ba4481b5
DL
6012fi
6013
c0d27fcc
MR
6014
6015echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
6016echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
6017if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 6018 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 6019else
503d2be0 6020 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6021/* confdefs.h. */
6022_ACEOF
6023cat confdefs.h >>conftest.$ac_ext
6024cat >>conftest.$ac_ext <<_ACEOF
6025/* end confdefs.h. */
98418dba
CW
6026#ifdef TIME_WITH_SYS_TIME
6027#include <sys/time.h>
6028#include <time.h>
6029#else
6030#ifdef HAVE_SYS_TIME_H
6031#include <sys/time.h>
6032#else
1113b624 6033#include <time.h>
98418dba
CW
6034#endif
6035#endif
6036#ifdef HAVE_UTIME_H
6037#include <utime.h>
6038#endif
503d2be0
AS
6039int
6040main ()
6041{
98418dba 6042static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
6043 ;
6044 return 0;
6045}
6046_ACEOF
98418dba 6047rm -f conftest.$ac_objext
c0d27fcc 6048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6049 (eval $ac_compile) 2>conftest.er1
503d2be0 6050 ac_status=$?
35996d22
AS
6051 grep -v '^ *+' conftest.er1 >conftest.err
6052 rm -f conftest.er1
6053 cat conftest.err >&5
c0d27fcc 6054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6055 (exit $ac_status); } &&
551ffc27
ST
6056 { ac_try='test -z "$ac_c_werror_flag"
6057 || test ! -s conftest.err'
35996d22
AS
6058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6059 (eval $ac_try) 2>&5
6060 ac_status=$?
6061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6062 (exit $ac_status); }; } &&
6063 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6065 (eval $ac_try) 2>&5
6066 ac_status=$?
c0d27fcc 6067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6068 (exit $ac_status); }; }; then
98418dba 6069 emacs_cv_struct_utimbuf=yes
1113b624 6070else
503d2be0 6071 echo "$as_me: failed program was:" >&5
19650fd6
AS
6072sed 's/^/| /' conftest.$ac_ext >&5
6073
98418dba 6074emacs_cv_struct_utimbuf=no
1113b624 6075fi
35996d22 6076rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 6077fi
c0d27fcc 6078echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
6079echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
6080if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 6081
c0d27fcc 6082cat >>confdefs.h <<\_ACEOF
98418dba 6083#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 6084_ACEOF
1113b624
PE
6085
6086fi
ba4481b5 6087
c0d27fcc 6088echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
6089echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6090if test "${ac_cv_type_signal+set}" = set; then
503d2be0 6091 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6092else
98418dba 6093 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6094/* confdefs.h. */
6095_ACEOF
6096cat confdefs.h >>conftest.$ac_ext
6097cat >>conftest.$ac_ext <<_ACEOF
6098/* end confdefs.h. */
7397acc4 6099#include <sys/types.h>
98418dba
CW
6100#include <signal.h>
6101#ifdef signal
6102# undef signal
6103#endif
6104#ifdef __cplusplus
6105extern "C" void (*signal (int, void (*)(int)))(int);
6106#else
6107void (*signal ()) ();
6108#endif
6109
503d2be0
AS
6110int
6111main ()
6112{
98418dba 6113int i;
503d2be0
AS
6114 ;
6115 return 0;
6116}
6117_ACEOF
98418dba 6118rm -f conftest.$ac_objext
c0d27fcc 6119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6120 (eval $ac_compile) 2>conftest.er1
503d2be0 6121 ac_status=$?
35996d22
AS
6122 grep -v '^ *+' conftest.er1 >conftest.err
6123 rm -f conftest.er1
6124 cat conftest.err >&5
c0d27fcc 6125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6126 (exit $ac_status); } &&
551ffc27
ST
6127 { ac_try='test -z "$ac_c_werror_flag"
6128 || test ! -s conftest.err'
35996d22
AS
6129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6130 (eval $ac_try) 2>&5
6131 ac_status=$?
6132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6133 (exit $ac_status); }; } &&
6134 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6136 (eval $ac_try) 2>&5
6137 ac_status=$?
c0d27fcc 6138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6139 (exit $ac_status); }; }; then
98418dba 6140 ac_cv_type_signal=void
503d2be0
AS
6141else
6142 echo "$as_me: failed program was:" >&5
19650fd6
AS
6143sed 's/^/| /' conftest.$ac_ext >&5
6144
98418dba 6145ac_cv_type_signal=int
503d2be0 6146fi
35996d22 6147rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6148fi
c0d27fcc 6149echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 6150echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 6151
c0d27fcc 6152cat >>confdefs.h <<_ACEOF
98418dba 6153#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
6154_ACEOF
6155
503d2be0 6156
c0d27fcc
MR
6157
6158echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
6159echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
6160if test "${emacs_cv_speed_t+set}" = set; then
6161 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6162else
98418dba 6163 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6164/* confdefs.h. */
6165_ACEOF
6166cat confdefs.h >>conftest.$ac_ext
6167cat >>conftest.$ac_ext <<_ACEOF
6168/* end confdefs.h. */
98418dba 6169#include <termios.h>
98418dba
CW
6170int
6171main ()
6172{
6173speed_t x = 1;
6174 ;
6175 return 0;
6176}
6177_ACEOF
6178rm -f conftest.$ac_objext
c0d27fcc 6179if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6180 (eval $ac_compile) 2>conftest.er1
98418dba 6181 ac_status=$?
35996d22
AS
6182 grep -v '^ *+' conftest.er1 >conftest.err
6183 rm -f conftest.er1
6184 cat conftest.err >&5
c0d27fcc 6185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6186 (exit $ac_status); } &&
551ffc27
ST
6187 { ac_try='test -z "$ac_c_werror_flag"
6188 || test ! -s conftest.err'
35996d22
AS
6189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6190 (eval $ac_try) 2>&5
6191 ac_status=$?
6192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6193 (exit $ac_status); }; } &&
6194 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6196 (eval $ac_try) 2>&5
6197 ac_status=$?
c0d27fcc 6198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6199 (exit $ac_status); }; }; then
6200 emacs_cv_speed_t=yes
6201else
6202 echo "$as_me: failed program was:" >&5
19650fd6
AS
6203sed 's/^/| /' conftest.$ac_ext >&5
6204
98418dba
CW
6205emacs_cv_speed_t=no
6206fi
35996d22 6207rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 6208fi
c0d27fcc 6209echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
6210echo "${ECHO_T}$emacs_cv_speed_t" >&6
6211if test $emacs_cv_speed_t = yes; then
b936fae4 6212
c0d27fcc 6213cat >>confdefs.h <<\_ACEOF
98418dba 6214#define HAVE_SPEED_T 1
c0d27fcc 6215_ACEOF
98418dba 6216
7397acc4
DL
6217fi
6218
c0d27fcc 6219echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
6220echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
6221if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 6222 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6223else
503d2be0 6224 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6225/* confdefs.h. */
6226_ACEOF
6227cat confdefs.h >>conftest.$ac_ext
6228cat >>conftest.$ac_ext <<_ACEOF
6229/* end confdefs.h. */
98418dba
CW
6230#ifdef TIME_WITH_SYS_TIME
6231#include <sys/time.h>
6232#include <time.h>
6233#else
6234#ifdef HAVE_SYS_TIME_H
6235#include <sys/time.h>
6236#else
6237#include <time.h>
6238#endif
6239#endif
503d2be0
AS
6240int
6241main ()
6242{
98418dba 6243static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
6244 ;
6245 return 0;
6246}
6247_ACEOF
6248rm -f conftest.$ac_objext
c0d27fcc 6249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6250 (eval $ac_compile) 2>conftest.er1
503d2be0 6251 ac_status=$?
35996d22
AS
6252 grep -v '^ *+' conftest.er1 >conftest.err
6253 rm -f conftest.er1
6254 cat conftest.err >&5
c0d27fcc 6255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6256 (exit $ac_status); } &&
551ffc27
ST
6257 { ac_try='test -z "$ac_c_werror_flag"
6258 || test ! -s conftest.err'
35996d22
AS
6259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6260 (eval $ac_try) 2>&5
6261 ac_status=$?
6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6263 (exit $ac_status); }; } &&
6264 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6266 (eval $ac_try) 2>&5
6267 ac_status=$?
c0d27fcc 6268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6269 (exit $ac_status); }; }; then
98418dba 6270 emacs_cv_struct_timeval=yes
7397acc4 6271else
503d2be0 6272 echo "$as_me: failed program was:" >&5
19650fd6
AS
6273sed 's/^/| /' conftest.$ac_ext >&5
6274
98418dba 6275emacs_cv_struct_timeval=no
7397acc4 6276fi
35996d22 6277rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6278fi
c0d27fcc 6279echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
6280echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
6281HAVE_TIMEVAL=$emacs_cv_struct_timeval
6282if test $emacs_cv_struct_timeval = yes; then
b936fae4 6283
c0d27fcc 6284cat >>confdefs.h <<\_ACEOF
98418dba 6285#define HAVE_TIMEVAL 1
c0d27fcc 6286_ACEOF
7397acc4
DL
6287
6288fi
6289
c0d27fcc 6290echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
6291echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
6292if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 6293 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6294else
503d2be0 6295 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6296/* confdefs.h. */
6297_ACEOF
6298cat confdefs.h >>conftest.$ac_ext
6299cat >>conftest.$ac_ext <<_ACEOF
6300/* end confdefs.h. */
98418dba 6301#include <math.h>
503d2be0
AS
6302int
6303main ()
6304{
98418dba 6305static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
6306 ;
6307 return 0;
ba4481b5 6308}
503d2be0
AS
6309_ACEOF
6310rm -f conftest.$ac_objext
c0d27fcc 6311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6312 (eval $ac_compile) 2>conftest.er1
503d2be0 6313 ac_status=$?
35996d22
AS
6314 grep -v '^ *+' conftest.er1 >conftest.err
6315 rm -f conftest.er1
6316 cat conftest.err >&5
c0d27fcc 6317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6318 (exit $ac_status); } &&
551ffc27
ST
6319 { ac_try='test -z "$ac_c_werror_flag"
6320 || test ! -s conftest.err'
35996d22
AS
6321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6322 (eval $ac_try) 2>&5
6323 ac_status=$?
6324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6325 (exit $ac_status); }; } &&
6326 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6328 (eval $ac_try) 2>&5
6329 ac_status=$?
c0d27fcc 6330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6331 (exit $ac_status); }; }; then
98418dba 6332 emacs_cv_struct_exception=yes
ba4481b5 6333else
503d2be0 6334 echo "$as_me: failed program was:" >&5
19650fd6
AS
6335sed 's/^/| /' conftest.$ac_ext >&5
6336
98418dba 6337emacs_cv_struct_exception=no
ba4481b5 6338fi
35996d22 6339rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6340fi
c0d27fcc 6341echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
6342echo "${ECHO_T}$emacs_cv_struct_exception" >&6
6343HAVE_EXCEPTION=$emacs_cv_struct_exception
6344if test $emacs_cv_struct_exception != yes; then
b936fae4 6345
c0d27fcc 6346cat >>confdefs.h <<\_ACEOF
98418dba 6347#define NO_MATHERR 1
c0d27fcc 6348_ACEOF
ba4481b5
DL
6349
6350fi
6351
7862d3a8
AS
6352
6353for ac_header in sys/socket.h
6354do
6355as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6356if eval "test \"\${$as_ac_Header+set}\" = set"; then
6357 echo "$as_me:$LINENO: checking for $ac_header" >&5
6358echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6359if eval "test \"\${$as_ac_Header+set}\" = set"; then
6360 echo $ECHO_N "(cached) $ECHO_C" >&6
6361fi
6362echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6363echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6364else
6365 # Is the header compilable?
6366echo "$as_me:$LINENO: checking $ac_header usability" >&5
6367echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6368cat >conftest.$ac_ext <<_ACEOF
6369/* confdefs.h. */
6370_ACEOF
6371cat confdefs.h >>conftest.$ac_ext
6372cat >>conftest.$ac_ext <<_ACEOF
6373/* end confdefs.h. */
6374$ac_includes_default
6375#include <$ac_header>
6376_ACEOF
6377rm -f conftest.$ac_objext
6378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6379 (eval $ac_compile) 2>conftest.er1
6380 ac_status=$?
6381 grep -v '^ *+' conftest.er1 >conftest.err
6382 rm -f conftest.er1
6383 cat conftest.err >&5
6384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6385 (exit $ac_status); } &&
551ffc27
ST
6386 { ac_try='test -z "$ac_c_werror_flag"
6387 || test ! -s conftest.err'
7862d3a8
AS
6388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6389 (eval $ac_try) 2>&5
6390 ac_status=$?
6391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6392 (exit $ac_status); }; } &&
6393 { ac_try='test -s conftest.$ac_objext'
6394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6395 (eval $ac_try) 2>&5
6396 ac_status=$?
6397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6398 (exit $ac_status); }; }; then
6399 ac_header_compiler=yes
6400else
6401 echo "$as_me: failed program was:" >&5
6402sed 's/^/| /' conftest.$ac_ext >&5
6403
6404ac_header_compiler=no
6405fi
6406rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6407echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6408echo "${ECHO_T}$ac_header_compiler" >&6
6409
6410# Is the header present?
6411echo "$as_me:$LINENO: checking $ac_header presence" >&5
6412echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6413cat >conftest.$ac_ext <<_ACEOF
6414/* confdefs.h. */
6415_ACEOF
6416cat confdefs.h >>conftest.$ac_ext
6417cat >>conftest.$ac_ext <<_ACEOF
6418/* end confdefs.h. */
6419#include <$ac_header>
6420_ACEOF
6421if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6422 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6423 ac_status=$?
6424 grep -v '^ *+' conftest.er1 >conftest.err
6425 rm -f conftest.er1
6426 cat conftest.err >&5
6427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6428 (exit $ac_status); } >/dev/null; then
6429 if test -s conftest.err; then
6430 ac_cpp_err=$ac_c_preproc_warn_flag
6431 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6432 else
6433 ac_cpp_err=
6434 fi
6435else
6436 ac_cpp_err=yes
6437fi
6438if test -z "$ac_cpp_err"; then
6439 ac_header_preproc=yes
6440else
6441 echo "$as_me: failed program was:" >&5
6442sed 's/^/| /' conftest.$ac_ext >&5
6443
6444 ac_header_preproc=no
6445fi
6446rm -f conftest.err conftest.$ac_ext
6447echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6448echo "${ECHO_T}$ac_header_preproc" >&6
6449
6450# So? What about this header?
6451case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6452 yes:no: )
6453 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6454echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6455 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6456echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6457 ac_header_preproc=yes
6458 ;;
6459 no:yes:* )
6460 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6461echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6462 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6463echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6464 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6465echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6466 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6467echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6468 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6469echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6470 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6471echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6472 (
6473 cat <<\_ASBOX
6474## ------------------------------------------ ##
6475## Report this to the AC_PACKAGE_NAME lists. ##
6476## ------------------------------------------ ##
6477_ASBOX
6478 ) |
6479 sed "s/^/$as_me: WARNING: /" >&2
6480 ;;
6481esac
6482echo "$as_me:$LINENO: checking for $ac_header" >&5
6483echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6484if eval "test \"\${$as_ac_Header+set}\" = set"; then
6485 echo $ECHO_N "(cached) $ECHO_C" >&6
6486else
6487 eval "$as_ac_Header=\$ac_header_preproc"
6488fi
6489echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6490echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6491
6492fi
6493if test `eval echo '${'$as_ac_Header'}'` = yes; then
6494 cat >>confdefs.h <<_ACEOF
6495#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6496_ACEOF
6497
6498fi
6499
6500done
6501
6502
6503for ac_header in net/if.h
6504do
6505as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6506echo "$as_me:$LINENO: checking for $ac_header" >&5
6507echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6508if eval "test \"\${$as_ac_Header+set}\" = set"; then
6509 echo $ECHO_N "(cached) $ECHO_C" >&6
6510else
6511 cat >conftest.$ac_ext <<_ACEOF
6512/* confdefs.h. */
6513_ACEOF
6514cat confdefs.h >>conftest.$ac_ext
6515cat >>conftest.$ac_ext <<_ACEOF
6516/* end confdefs.h. */
6517$ac_includes_default
6518#if HAVE_SYS_SOCKET_H
6519#include <sys/socket.h>
6520#endif
6521
6522#include <$ac_header>
6523_ACEOF
6524rm -f conftest.$ac_objext
6525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6526 (eval $ac_compile) 2>conftest.er1
6527 ac_status=$?
6528 grep -v '^ *+' conftest.er1 >conftest.err
6529 rm -f conftest.er1
6530 cat conftest.err >&5
6531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6532 (exit $ac_status); } &&
551ffc27
ST
6533 { ac_try='test -z "$ac_c_werror_flag"
6534 || test ! -s conftest.err'
7862d3a8
AS
6535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6536 (eval $ac_try) 2>&5
6537 ac_status=$?
6538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6539 (exit $ac_status); }; } &&
6540 { ac_try='test -s conftest.$ac_objext'
6541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6542 (eval $ac_try) 2>&5
6543 ac_status=$?
6544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6545 (exit $ac_status); }; }; then
6546 eval "$as_ac_Header=yes"
6547else
6548 echo "$as_me: failed program was:" >&5
6549sed 's/^/| /' conftest.$ac_ext >&5
6550
6551eval "$as_ac_Header=no"
6552fi
6553rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6554fi
6555echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6556echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6557if test `eval echo '${'$as_ac_Header'}'` = yes; then
6558 cat >>confdefs.h <<_ACEOF
6559#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6560_ACEOF
6561
6562fi
6563
6564done
6565
6566
c0d27fcc 6567echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
6568echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
6569if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 6570 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6571else
503d2be0 6572 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6573/* confdefs.h. */
6574_ACEOF
6575cat confdefs.h >>conftest.$ac_ext
6576cat >>conftest.$ac_ext <<_ACEOF
6577/* end confdefs.h. */
98418dba
CW
6578#include <sys/types.h>
6579#include <time.h>
7397acc4 6580
503d2be0
AS
6581int
6582main ()
6583{
98418dba 6584struct tm *tp; tp->tm_sec;
503d2be0
AS
6585 ;
6586 return 0;
6587}
6588_ACEOF
6589rm -f conftest.$ac_objext
c0d27fcc 6590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6591 (eval $ac_compile) 2>conftest.er1
503d2be0 6592 ac_status=$?
35996d22
AS
6593 grep -v '^ *+' conftest.er1 >conftest.err
6594 rm -f conftest.er1
6595 cat conftest.err >&5
c0d27fcc 6596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6597 (exit $ac_status); } &&
551ffc27
ST
6598 { ac_try='test -z "$ac_c_werror_flag"
6599 || test ! -s conftest.err'
c0d27fcc 6600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6601 (eval $ac_try) 2>&5
6602 ac_status=$?
c0d27fcc 6603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
6604 (exit $ac_status); }; } &&
6605 { ac_try='test -s conftest.$ac_objext'
6606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6607 (eval $ac_try) 2>&5
6608 ac_status=$?
6609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6610 (exit $ac_status); }; }; then
6611 ac_cv_struct_tm=time.h
6612else
503d2be0 6613 echo "$as_me: failed program was:" >&5
19650fd6
AS
6614sed 's/^/| /' conftest.$ac_ext >&5
6615
98418dba 6616ac_cv_struct_tm=sys/time.h
7397acc4 6617fi
35996d22 6618rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6619fi
c0d27fcc 6620echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
6621echo "${ECHO_T}$ac_cv_struct_tm" >&6
6622if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 6623
c0d27fcc 6624cat >>confdefs.h <<\_ACEOF
98418dba 6625#define TM_IN_SYS_TIME 1
c0d27fcc 6626_ACEOF
7397acc4
DL
6627
6628fi
ba4481b5 6629
c0d27fcc 6630echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
6631echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
6632if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 6633 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6634else
98418dba 6635 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6636/* confdefs.h. */
6637_ACEOF
6638cat confdefs.h >>conftest.$ac_ext
6639cat >>conftest.$ac_ext <<_ACEOF
6640/* end confdefs.h. */
98418dba
CW
6641#include <sys/types.h>
6642#include <$ac_cv_struct_tm>
ba4481b5 6643
c0d27fcc 6644
98418dba
CW
6645int
6646main ()
6647{
6648static struct tm ac_aggr;
6649if (ac_aggr.tm_zone)
6650return 0;
6651 ;
6652 return 0;
6653}
6654_ACEOF
6655rm -f conftest.$ac_objext
c0d27fcc 6656if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6657 (eval $ac_compile) 2>conftest.er1
98418dba 6658 ac_status=$?
35996d22
AS
6659 grep -v '^ *+' conftest.er1 >conftest.err
6660 rm -f conftest.er1
6661 cat conftest.err >&5
c0d27fcc 6662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6663 (exit $ac_status); } &&
551ffc27
ST
6664 { ac_try='test -z "$ac_c_werror_flag"
6665 || test ! -s conftest.err'
35996d22
AS
6666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6667 (eval $ac_try) 2>&5
6668 ac_status=$?
6669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6670 (exit $ac_status); }; } &&
6671 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6673 (eval $ac_try) 2>&5
6674 ac_status=$?
c0d27fcc 6675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6676 (exit $ac_status); }; }; then
6677 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 6678else
98418dba 6679 echo "$as_me: failed program was:" >&5
19650fd6
AS
6680sed 's/^/| /' conftest.$ac_ext >&5
6681
6bae0ccf 6682cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6683/* confdefs.h. */
6684_ACEOF
6685cat confdefs.h >>conftest.$ac_ext
6686cat >>conftest.$ac_ext <<_ACEOF
6687/* end confdefs.h. */
6bae0ccf
DL
6688#include <sys/types.h>
6689#include <$ac_cv_struct_tm>
6690
6691
6692int
6693main ()
6694{
6695static struct tm ac_aggr;
6696if (sizeof ac_aggr.tm_zone)
6697return 0;
6698 ;
6699 return 0;
6700}
6701_ACEOF
6702rm -f conftest.$ac_objext
6703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6704 (eval $ac_compile) 2>conftest.er1
6bae0ccf 6705 ac_status=$?
35996d22
AS
6706 grep -v '^ *+' conftest.er1 >conftest.err
6707 rm -f conftest.er1
6708 cat conftest.err >&5
6bae0ccf
DL
6709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6710 (exit $ac_status); } &&
551ffc27
ST
6711 { ac_try='test -z "$ac_c_werror_flag"
6712 || test ! -s conftest.err'
35996d22
AS
6713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6714 (eval $ac_try) 2>&5
6715 ac_status=$?
6716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6717 (exit $ac_status); }; } &&
6718 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
6719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6720 (eval $ac_try) 2>&5
6721 ac_status=$?
6722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6723 (exit $ac_status); }; }; then
6724 ac_cv_member_struct_tm_tm_zone=yes
6725else
6726 echo "$as_me: failed program was:" >&5
19650fd6
AS
6727sed 's/^/| /' conftest.$ac_ext >&5
6728
98418dba 6729ac_cv_member_struct_tm_tm_zone=no
ba4481b5 6730fi
35996d22 6731rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6732fi
35996d22 6733rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 6734fi
c0d27fcc 6735echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
6736echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
6737if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 6738
c0d27fcc 6739cat >>confdefs.h <<_ACEOF
98418dba 6740#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
6741_ACEOF
6742
ba4481b5 6743
98418dba 6744fi
ba4481b5 6745
98418dba 6746if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 6747
c0d27fcc 6748cat >>confdefs.h <<\_ACEOF
98418dba 6749#define HAVE_TM_ZONE 1
c0d27fcc 6750_ACEOF
ba4481b5 6751
ba4481b5 6752else
c0d27fcc 6753 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
6754echo $ECHO_N "checking for tzname... $ECHO_C" >&6
6755if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 6756 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6757else
98418dba 6758 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6759/* confdefs.h. */
6760_ACEOF
6761cat confdefs.h >>conftest.$ac_ext
6762cat >>conftest.$ac_ext <<_ACEOF
6763/* end confdefs.h. */
98418dba
CW
6764#include <time.h>
6765#ifndef tzname /* For SGI. */
6766extern char *tzname[]; /* RS6000 and others reject char **tzname. */
6767#endif
6768
98418dba
CW
6769int
6770main ()
6771{
6772atoi(*tzname);
6773 ;
6774 return 0;
6775}
6776_ACEOF
6777rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6778if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 6779 (eval $ac_link) 2>conftest.er1
98418dba 6780 ac_status=$?
35996d22
AS
6781 grep -v '^ *+' conftest.er1 >conftest.err
6782 rm -f conftest.er1
6783 cat conftest.err >&5
c0d27fcc 6784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6785 (exit $ac_status); } &&
551ffc27
ST
6786 { ac_try='test -z "$ac_c_werror_flag"
6787 || test ! -s conftest.err'
35996d22
AS
6788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6789 (eval $ac_try) 2>&5
6790 ac_status=$?
6791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6792 (exit $ac_status); }; } &&
6793 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6795 (eval $ac_try) 2>&5
6796 ac_status=$?
c0d27fcc 6797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6798 (exit $ac_status); }; }; then
6799 ac_cv_var_tzname=yes
6800else
6801 echo "$as_me: failed program was:" >&5
19650fd6
AS
6802sed 's/^/| /' conftest.$ac_ext >&5
6803
98418dba 6804ac_cv_var_tzname=no
ba4481b5 6805fi
35996d22
AS
6806rm -f conftest.err conftest.$ac_objext \
6807 conftest$ac_exeext conftest.$ac_ext
98418dba 6808fi
c0d27fcc 6809echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
6810echo "${ECHO_T}$ac_cv_var_tzname" >&6
6811 if test $ac_cv_var_tzname = yes; then
ba4481b5 6812
c0d27fcc 6813cat >>confdefs.h <<\_ACEOF
98418dba 6814#define HAVE_TZNAME 1
c0d27fcc 6815_ACEOF
503d2be0 6816
98418dba
CW
6817 fi
6818fi
503d2be0 6819
c0d27fcc 6820echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
6821echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
6822if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
6823 echo $ECHO_N "(cached) $ECHO_C" >&6
6824else
6825 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6826/* confdefs.h. */
6827_ACEOF
6828cat confdefs.h >>conftest.$ac_ext
6829cat >>conftest.$ac_ext <<_ACEOF
6830/* end confdefs.h. */
98418dba 6831#include <time.h>
b936fae4 6832
98418dba
CW
6833int
6834main ()
6835{
b936fae4
AS
6836static struct tm ac_aggr;
6837if (ac_aggr.tm_gmtoff)
6838return 0;
98418dba
CW
6839 ;
6840 return 0;
6841}
6842_ACEOF
b936fae4 6843rm -f conftest.$ac_objext
c0d27fcc 6844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6845 (eval $ac_compile) 2>conftest.er1
98418dba 6846 ac_status=$?
35996d22
AS
6847 grep -v '^ *+' conftest.er1 >conftest.err
6848 rm -f conftest.er1
6849 cat conftest.err >&5
c0d27fcc 6850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6851 (exit $ac_status); } &&
551ffc27
ST
6852 { ac_try='test -z "$ac_c_werror_flag"
6853 || test ! -s conftest.err'
35996d22
AS
6854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6855 (eval $ac_try) 2>&5
6856 ac_status=$?
6857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6858 (exit $ac_status); }; } &&
6859 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6861 (eval $ac_try) 2>&5
6862 ac_status=$?
c0d27fcc 6863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6864 (exit $ac_status); }; }; then
b936fae4 6865 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
6866else
6867 echo "$as_me: failed program was:" >&5
19650fd6
AS
6868sed 's/^/| /' conftest.$ac_ext >&5
6869
8799b3e4 6870cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6871/* confdefs.h. */
6872_ACEOF
6873cat confdefs.h >>conftest.$ac_ext
6874cat >>conftest.$ac_ext <<_ACEOF
6875/* end confdefs.h. */
6bae0ccf
DL
6876#include <time.h>
6877
8799b3e4
CW
6878int
6879main ()
6880{
6bae0ccf
DL
6881static struct tm ac_aggr;
6882if (sizeof ac_aggr.tm_gmtoff)
6883return 0;
8799b3e4
CW
6884 ;
6885 return 0;
6886}
6887_ACEOF
6bae0ccf 6888rm -f conftest.$ac_objext
c0d27fcc 6889if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6890 (eval $ac_compile) 2>conftest.er1
8799b3e4 6891 ac_status=$?
35996d22
AS
6892 grep -v '^ *+' conftest.er1 >conftest.err
6893 rm -f conftest.er1
6894 cat conftest.err >&5
c0d27fcc 6895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6896 (exit $ac_status); } &&
551ffc27
ST
6897 { ac_try='test -z "$ac_c_werror_flag"
6898 || test ! -s conftest.err'
35996d22
AS
6899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6900 (eval $ac_try) 2>&5
6901 ac_status=$?
6902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6903 (exit $ac_status); }; } &&
6904 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
6906 (eval $ac_try) 2>&5
6907 ac_status=$?
c0d27fcc 6908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6909 (exit $ac_status); }; }; then
6bae0ccf 6910 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
6911else
6912 echo "$as_me: failed program was:" >&5
19650fd6
AS
6913sed 's/^/| /' conftest.$ac_ext >&5
6914
6bae0ccf 6915ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 6916fi
35996d22 6917rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 6918fi
35996d22 6919rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 6920fi
6bae0ccf
DL
6921echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
6922echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
6923if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
6924
6925cat >>confdefs.h <<\_ACEOF
6926#define HAVE_TM_GMTOFF 1
6927_ACEOF
6928
6929fi
6930
96f3a036
DL
6931echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
6932echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6
6933if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
6934 echo $ECHO_N "(cached) $ECHO_C" >&6
6935else
6936 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
6937/* confdefs.h. */
6938_ACEOF
6939cat confdefs.h >>conftest.$ac_ext
6940cat >>conftest.$ac_ext <<_ACEOF
6941/* end confdefs.h. */
7862d3a8
AS
6942$ac_includes_default
6943#if HAVE_SYS_SOCKET_H
6944#include <sys/socket.h>
6945#endif
6946#if HAVE_NET_IF_H
96f3a036 6947#include <net/if.h>
7862d3a8 6948#endif
96f3a036
DL
6949
6950int
6951main ()
6952{
6953static struct ifreq ac_aggr;
6954if (ac_aggr.ifr_flags)
6955return 0;
6956 ;
6957 return 0;
6958}
6959_ACEOF
6960rm -f conftest.$ac_objext
6961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6962 (eval $ac_compile) 2>conftest.er1
96f3a036 6963 ac_status=$?
35996d22
AS
6964 grep -v '^ *+' conftest.er1 >conftest.err
6965 rm -f conftest.er1
6966 cat conftest.err >&5
96f3a036
DL
6967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6968 (exit $ac_status); } &&
551ffc27
ST
6969 { ac_try='test -z "$ac_c_werror_flag"
6970 || test ! -s conftest.err'
35996d22
AS
6971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6972 (eval $ac_try) 2>&5
6973 ac_status=$?
6974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6975 (exit $ac_status); }; } &&
6976 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
6977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6978 (eval $ac_try) 2>&5
6979 ac_status=$?
6980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6981 (exit $ac_status); }; }; then
6982 ac_cv_member_struct_ifreq_ifr_flags=yes
6983else
6984 echo "$as_me: failed program was:" >&5
6985sed 's/^/| /' conftest.$ac_ext >&5
6986
6987cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
6988/* confdefs.h. */
6989_ACEOF
6990cat confdefs.h >>conftest.$ac_ext
6991cat >>conftest.$ac_ext <<_ACEOF
6992/* end confdefs.h. */
7862d3a8
AS
6993$ac_includes_default
6994#if HAVE_SYS_SOCKET_H
6995#include <sys/socket.h>
6996#endif
6997#if HAVE_NET_IF_H
96f3a036 6998#include <net/if.h>
7862d3a8 6999#endif
96f3a036
DL
7000
7001int
7002main ()
7003{
7004static struct ifreq ac_aggr;
7005if (sizeof ac_aggr.ifr_flags)
7006return 0;
7007 ;
7008 return 0;
7009}
7010_ACEOF
7011rm -f conftest.$ac_objext
7012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7013 (eval $ac_compile) 2>conftest.er1
96f3a036 7014 ac_status=$?
35996d22
AS
7015 grep -v '^ *+' conftest.er1 >conftest.err
7016 rm -f conftest.er1
7017 cat conftest.err >&5
96f3a036
DL
7018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7019 (exit $ac_status); } &&
551ffc27
ST
7020 { ac_try='test -z "$ac_c_werror_flag"
7021 || test ! -s conftest.err'
35996d22
AS
7022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7023 (eval $ac_try) 2>&5
7024 ac_status=$?
7025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7026 (exit $ac_status); }; } &&
7027 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7029 (eval $ac_try) 2>&5
7030 ac_status=$?
7031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7032 (exit $ac_status); }; }; then
7033 ac_cv_member_struct_ifreq_ifr_flags=yes
7034else
7035 echo "$as_me: failed program was:" >&5
7036sed 's/^/| /' conftest.$ac_ext >&5
7037
7038ac_cv_member_struct_ifreq_ifr_flags=no
7039fi
35996d22 7040rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7041fi
35996d22 7042rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7043fi
7044echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
7045echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6
7046if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
7047
7048cat >>confdefs.h <<_ACEOF
7049#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
7050_ACEOF
7051
7052
7053fi
7054echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
7055echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6
7056if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
7057 echo $ECHO_N "(cached) $ECHO_C" >&6
7058else
7059 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7060/* confdefs.h. */
7061_ACEOF
7062cat confdefs.h >>conftest.$ac_ext
7063cat >>conftest.$ac_ext <<_ACEOF
7064/* end confdefs.h. */
7862d3a8
AS
7065$ac_includes_default
7066#if HAVE_SYS_SOCKET_H
7067#include <sys/socket.h>
7068#endif
7069#if HAVE_NET_IF_H
96f3a036 7070#include <net/if.h>
7862d3a8 7071#endif
96f3a036
DL
7072
7073int
7074main ()
7075{
7076static struct ifreq ac_aggr;
7077if (ac_aggr.ifr_hwaddr)
7078return 0;
7079 ;
7080 return 0;
7081}
7082_ACEOF
7083rm -f conftest.$ac_objext
7084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7085 (eval $ac_compile) 2>conftest.er1
96f3a036 7086 ac_status=$?
35996d22
AS
7087 grep -v '^ *+' conftest.er1 >conftest.err
7088 rm -f conftest.er1
7089 cat conftest.err >&5
96f3a036
DL
7090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7091 (exit $ac_status); } &&
551ffc27
ST
7092 { ac_try='test -z "$ac_c_werror_flag"
7093 || test ! -s conftest.err'
35996d22
AS
7094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7095 (eval $ac_try) 2>&5
7096 ac_status=$?
7097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7098 (exit $ac_status); }; } &&
7099 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7101 (eval $ac_try) 2>&5
7102 ac_status=$?
7103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7104 (exit $ac_status); }; }; then
7105 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7106else
7107 echo "$as_me: failed program was:" >&5
7108sed 's/^/| /' conftest.$ac_ext >&5
7109
7110cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7111/* confdefs.h. */
7112_ACEOF
7113cat confdefs.h >>conftest.$ac_ext
7114cat >>conftest.$ac_ext <<_ACEOF
7115/* end confdefs.h. */
7862d3a8
AS
7116$ac_includes_default
7117#if HAVE_SYS_SOCKET_H
7118#include <sys/socket.h>
7119#endif
7120#if HAVE_NET_IF_H
96f3a036 7121#include <net/if.h>
7862d3a8 7122#endif
96f3a036
DL
7123
7124int
7125main ()
7126{
7127static struct ifreq ac_aggr;
7128if (sizeof ac_aggr.ifr_hwaddr)
7129return 0;
7130 ;
7131 return 0;
7132}
7133_ACEOF
7134rm -f conftest.$ac_objext
7135if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7136 (eval $ac_compile) 2>conftest.er1
96f3a036 7137 ac_status=$?
35996d22
AS
7138 grep -v '^ *+' conftest.er1 >conftest.err
7139 rm -f conftest.er1
7140 cat conftest.err >&5
96f3a036
DL
7141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7142 (exit $ac_status); } &&
551ffc27
ST
7143 { ac_try='test -z "$ac_c_werror_flag"
7144 || test ! -s conftest.err'
35996d22
AS
7145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7146 (eval $ac_try) 2>&5
7147 ac_status=$?
7148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7149 (exit $ac_status); }; } &&
7150 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7152 (eval $ac_try) 2>&5
7153 ac_status=$?
7154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7155 (exit $ac_status); }; }; then
7156 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7157else
7158 echo "$as_me: failed program was:" >&5
7159sed 's/^/| /' conftest.$ac_ext >&5
7160
7161ac_cv_member_struct_ifreq_ifr_hwaddr=no
7162fi
35996d22 7163rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7164fi
35996d22 7165rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7166fi
7167echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
7168echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6
7169if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
7170
7171cat >>confdefs.h <<_ACEOF
7172#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
7173_ACEOF
7174
7175
7176fi
7177echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
7178echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6
7179if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
7180 echo $ECHO_N "(cached) $ECHO_C" >&6
7181else
7182 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7183/* confdefs.h. */
7184_ACEOF
7185cat confdefs.h >>conftest.$ac_ext
7186cat >>conftest.$ac_ext <<_ACEOF
7187/* end confdefs.h. */
7862d3a8
AS
7188$ac_includes_default
7189#if HAVE_SYS_SOCKET_H
7190#include <sys/socket.h>
7191#endif
7192#if HAVE_NET_IF_H
96f3a036 7193#include <net/if.h>
7862d3a8 7194#endif
96f3a036
DL
7195
7196int
7197main ()
7198{
7199static struct ifreq ac_aggr;
7200if (ac_aggr.ifr_netmask)
7201return 0;
7202 ;
7203 return 0;
7204}
7205_ACEOF
7206rm -f conftest.$ac_objext
7207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7208 (eval $ac_compile) 2>conftest.er1
96f3a036 7209 ac_status=$?
35996d22
AS
7210 grep -v '^ *+' conftest.er1 >conftest.err
7211 rm -f conftest.er1
7212 cat conftest.err >&5
96f3a036
DL
7213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7214 (exit $ac_status); } &&
551ffc27
ST
7215 { ac_try='test -z "$ac_c_werror_flag"
7216 || test ! -s conftest.err'
35996d22
AS
7217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7218 (eval $ac_try) 2>&5
7219 ac_status=$?
7220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7221 (exit $ac_status); }; } &&
7222 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7224 (eval $ac_try) 2>&5
7225 ac_status=$?
7226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7227 (exit $ac_status); }; }; then
7228 ac_cv_member_struct_ifreq_ifr_netmask=yes
7229else
7230 echo "$as_me: failed program was:" >&5
7231sed 's/^/| /' conftest.$ac_ext >&5
7232
7233cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7234/* confdefs.h. */
7235_ACEOF
7236cat confdefs.h >>conftest.$ac_ext
7237cat >>conftest.$ac_ext <<_ACEOF
7238/* end confdefs.h. */
7862d3a8
AS
7239$ac_includes_default
7240#if HAVE_SYS_SOCKET_H
7241#include <sys/socket.h>
7242#endif
7243#if HAVE_NET_IF_H
96f3a036 7244#include <net/if.h>
7862d3a8 7245#endif
96f3a036
DL
7246
7247int
7248main ()
7249{
7250static struct ifreq ac_aggr;
7251if (sizeof ac_aggr.ifr_netmask)
7252return 0;
7253 ;
7254 return 0;
7255}
7256_ACEOF
7257rm -f conftest.$ac_objext
7258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7259 (eval $ac_compile) 2>conftest.er1
96f3a036 7260 ac_status=$?
35996d22
AS
7261 grep -v '^ *+' conftest.er1 >conftest.err
7262 rm -f conftest.er1
7263 cat conftest.err >&5
96f3a036
DL
7264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7265 (exit $ac_status); } &&
551ffc27
ST
7266 { ac_try='test -z "$ac_c_werror_flag"
7267 || test ! -s conftest.err'
35996d22
AS
7268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7269 (eval $ac_try) 2>&5
7270 ac_status=$?
7271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7272 (exit $ac_status); }; } &&
7273 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7275 (eval $ac_try) 2>&5
7276 ac_status=$?
7277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7278 (exit $ac_status); }; }; then
7279 ac_cv_member_struct_ifreq_ifr_netmask=yes
7280else
7281 echo "$as_me: failed program was:" >&5
7282sed 's/^/| /' conftest.$ac_ext >&5
7283
7284ac_cv_member_struct_ifreq_ifr_netmask=no
7285fi
35996d22 7286rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7287fi
35996d22 7288rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7289fi
7290echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
7291echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6
7292if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
7293
7294cat >>confdefs.h <<_ACEOF
7295#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
7296_ACEOF
7297
7298
7299fi
7300echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
7301echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6
7302if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
7303 echo $ECHO_N "(cached) $ECHO_C" >&6
7304else
7305 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7306/* confdefs.h. */
7307_ACEOF
7308cat confdefs.h >>conftest.$ac_ext
7309cat >>conftest.$ac_ext <<_ACEOF
7310/* end confdefs.h. */
7862d3a8
AS
7311$ac_includes_default
7312#if HAVE_SYS_SOCKET_H
7313#include <sys/socket.h>
7314#endif
7315#if HAVE_NET_IF_H
96f3a036 7316#include <net/if.h>
7862d3a8 7317#endif
96f3a036
DL
7318
7319int
7320main ()
7321{
7322static struct ifreq ac_aggr;
7323if (ac_aggr.ifr_broadaddr)
7324return 0;
7325 ;
7326 return 0;
7327}
7328_ACEOF
7329rm -f conftest.$ac_objext
7330if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7331 (eval $ac_compile) 2>conftest.er1
96f3a036 7332 ac_status=$?
35996d22
AS
7333 grep -v '^ *+' conftest.er1 >conftest.err
7334 rm -f conftest.er1
7335 cat conftest.err >&5
96f3a036
DL
7336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7337 (exit $ac_status); } &&
551ffc27
ST
7338 { ac_try='test -z "$ac_c_werror_flag"
7339 || test ! -s conftest.err'
35996d22
AS
7340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7341 (eval $ac_try) 2>&5
7342 ac_status=$?
7343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7344 (exit $ac_status); }; } &&
7345 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7347 (eval $ac_try) 2>&5
7348 ac_status=$?
7349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7350 (exit $ac_status); }; }; then
7351 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7352else
7353 echo "$as_me: failed program was:" >&5
7354sed 's/^/| /' conftest.$ac_ext >&5
7355
7356cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7357/* confdefs.h. */
7358_ACEOF
7359cat confdefs.h >>conftest.$ac_ext
7360cat >>conftest.$ac_ext <<_ACEOF
7361/* end confdefs.h. */
7862d3a8
AS
7362$ac_includes_default
7363#if HAVE_SYS_SOCKET_H
7364#include <sys/socket.h>
7365#endif
7366#if HAVE_NET_IF_H
96f3a036 7367#include <net/if.h>
7862d3a8 7368#endif
96f3a036
DL
7369
7370int
7371main ()
7372{
7373static struct ifreq ac_aggr;
7374if (sizeof ac_aggr.ifr_broadaddr)
7375return 0;
7376 ;
7377 return 0;
7378}
7379_ACEOF
7380rm -f conftest.$ac_objext
7381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7382 (eval $ac_compile) 2>conftest.er1
96f3a036 7383 ac_status=$?
35996d22
AS
7384 grep -v '^ *+' conftest.er1 >conftest.err
7385 rm -f conftest.er1
7386 cat conftest.err >&5
96f3a036
DL
7387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7388 (exit $ac_status); } &&
551ffc27
ST
7389 { ac_try='test -z "$ac_c_werror_flag"
7390 || test ! -s conftest.err'
35996d22
AS
7391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7392 (eval $ac_try) 2>&5
7393 ac_status=$?
7394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7395 (exit $ac_status); }; } &&
7396 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7398 (eval $ac_try) 2>&5
7399 ac_status=$?
7400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7401 (exit $ac_status); }; }; then
7402 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7403else
7404 echo "$as_me: failed program was:" >&5
7405sed 's/^/| /' conftest.$ac_ext >&5
7406
7407ac_cv_member_struct_ifreq_ifr_broadaddr=no
7408fi
35996d22 7409rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7410fi
35996d22 7411rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7412fi
7413echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
7414echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6
7415if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
7416
7417cat >>confdefs.h <<_ACEOF
7418#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
7419_ACEOF
7420
7421
7422fi
7423echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
7424echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6
7425if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
7426 echo $ECHO_N "(cached) $ECHO_C" >&6
7427else
7428 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7429/* confdefs.h. */
7430_ACEOF
7431cat confdefs.h >>conftest.$ac_ext
7432cat >>conftest.$ac_ext <<_ACEOF
7433/* end confdefs.h. */
7862d3a8
AS
7434$ac_includes_default
7435#if HAVE_SYS_SOCKET_H
7436#include <sys/socket.h>
7437#endif
7438#if HAVE_NET_IF_H
96f3a036 7439#include <net/if.h>
7862d3a8 7440#endif
96f3a036
DL
7441
7442int
7443main ()
7444{
7445static struct ifreq ac_aggr;
7446if (ac_aggr.ifr_addr)
7447return 0;
7448 ;
7449 return 0;
7450}
7451_ACEOF
7452rm -f conftest.$ac_objext
7453if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7454 (eval $ac_compile) 2>conftest.er1
96f3a036 7455 ac_status=$?
35996d22
AS
7456 grep -v '^ *+' conftest.er1 >conftest.err
7457 rm -f conftest.er1
7458 cat conftest.err >&5
96f3a036
DL
7459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7460 (exit $ac_status); } &&
551ffc27
ST
7461 { ac_try='test -z "$ac_c_werror_flag"
7462 || test ! -s conftest.err'
35996d22
AS
7463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7464 (eval $ac_try) 2>&5
7465 ac_status=$?
7466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7467 (exit $ac_status); }; } &&
7468 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7470 (eval $ac_try) 2>&5
7471 ac_status=$?
7472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7473 (exit $ac_status); }; }; then
7474 ac_cv_member_struct_ifreq_ifr_addr=yes
7475else
7476 echo "$as_me: failed program was:" >&5
7477sed 's/^/| /' conftest.$ac_ext >&5
7478
7479cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7480/* confdefs.h. */
7481_ACEOF
7482cat confdefs.h >>conftest.$ac_ext
7483cat >>conftest.$ac_ext <<_ACEOF
7484/* end confdefs.h. */
7862d3a8
AS
7485$ac_includes_default
7486#if HAVE_SYS_SOCKET_H
7487#include <sys/socket.h>
7488#endif
7489#if HAVE_NET_IF_H
96f3a036 7490#include <net/if.h>
7862d3a8 7491#endif
96f3a036
DL
7492
7493int
7494main ()
7495{
7496static struct ifreq ac_aggr;
7497if (sizeof ac_aggr.ifr_addr)
7498return 0;
7499 ;
7500 return 0;
7501}
7502_ACEOF
7503rm -f conftest.$ac_objext
7504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7505 (eval $ac_compile) 2>conftest.er1
96f3a036 7506 ac_status=$?
35996d22
AS
7507 grep -v '^ *+' conftest.er1 >conftest.err
7508 rm -f conftest.er1
7509 cat conftest.err >&5
96f3a036
DL
7510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7511 (exit $ac_status); } &&
551ffc27
ST
7512 { ac_try='test -z "$ac_c_werror_flag"
7513 || test ! -s conftest.err'
35996d22
AS
7514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7515 (eval $ac_try) 2>&5
7516 ac_status=$?
7517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7518 (exit $ac_status); }; } &&
7519 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7521 (eval $ac_try) 2>&5
7522 ac_status=$?
7523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7524 (exit $ac_status); }; }; then
7525 ac_cv_member_struct_ifreq_ifr_addr=yes
7526else
7527 echo "$as_me: failed program was:" >&5
7528sed 's/^/| /' conftest.$ac_ext >&5
7529
7530ac_cv_member_struct_ifreq_ifr_addr=no
7531fi
35996d22 7532rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7533fi
35996d22 7534rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7535fi
7536echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
7537echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6
7538if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
7539
7540cat >>confdefs.h <<_ACEOF
7541#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
7542_ACEOF
7543
7544
7545fi
7546
8799b3e4 7547
8799b3e4 7548
c0d27fcc 7549echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
7550echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
7551if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 7552 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7553echo "${ECHO_T}yes" >&6
7554
c0d27fcc 7555cat >>confdefs.h <<\_ACEOF
98418dba 7556#define PROTOTYPES 1
c0d27fcc
MR
7557_ACEOF
7558
7559
7560cat >>confdefs.h <<\_ACEOF
7561#define __PROTOTYPES 1
7562_ACEOF
98418dba
CW
7563
7564else
c0d27fcc 7565 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7566echo "${ECHO_T}no" >&6
7567fi
7568
c0d27fcc 7569echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
7570echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
7571if test "${ac_cv_c_volatile+set}" = set; then
7572 echo $ECHO_N "(cached) $ECHO_C" >&6
7573else
7574 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7575/* confdefs.h. */
7576_ACEOF
7577cat confdefs.h >>conftest.$ac_ext
7578cat >>conftest.$ac_ext <<_ACEOF
7579/* end confdefs.h. */
98418dba 7580
98418dba
CW
7581int
7582main ()
7583{
7584
7585volatile int x;
7586int * volatile y;
7587 ;
7588 return 0;
7589}
7590_ACEOF
7591rm -f conftest.$ac_objext
c0d27fcc 7592if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7593 (eval $ac_compile) 2>conftest.er1
98418dba 7594 ac_status=$?
35996d22
AS
7595 grep -v '^ *+' conftest.er1 >conftest.err
7596 rm -f conftest.er1
7597 cat conftest.err >&5
c0d27fcc 7598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7599 (exit $ac_status); } &&
551ffc27
ST
7600 { ac_try='test -z "$ac_c_werror_flag"
7601 || test ! -s conftest.err'
35996d22
AS
7602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7603 (eval $ac_try) 2>&5
7604 ac_status=$?
7605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7606 (exit $ac_status); }; } &&
7607 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7609 (eval $ac_try) 2>&5
7610 ac_status=$?
c0d27fcc 7611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7612 (exit $ac_status); }; }; then
7613 ac_cv_c_volatile=yes
7614else
7615 echo "$as_me: failed program was:" >&5
19650fd6
AS
7616sed 's/^/| /' conftest.$ac_ext >&5
7617
98418dba
CW
7618ac_cv_c_volatile=no
7619fi
35996d22 7620rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7621fi
c0d27fcc 7622echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
7623echo "${ECHO_T}$ac_cv_c_volatile" >&6
7624if test $ac_cv_c_volatile = no; then
7625
c0d27fcc 7626cat >>confdefs.h <<\_ACEOF
98418dba 7627#define volatile
c0d27fcc 7628_ACEOF
98418dba
CW
7629
7630fi
7631
c0d27fcc 7632echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
7633echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
7634if test "${ac_cv_c_const+set}" = set; then
7635 echo $ECHO_N "(cached) $ECHO_C" >&6
7636else
7637 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7638/* confdefs.h. */
7639_ACEOF
7640cat confdefs.h >>conftest.$ac_ext
7641cat >>conftest.$ac_ext <<_ACEOF
7642/* end confdefs.h. */
98418dba 7643
98418dba
CW
7644int
7645main ()
7646{
7647/* FIXME: Include the comments suggested by Paul. */
7648#ifndef __cplusplus
7649 /* Ultrix mips cc rejects this. */
7650 typedef int charset[2];
7651 const charset x;
7652 /* SunOS 4.1.1 cc rejects this. */
7653 char const *const *ccp;
7654 char **p;
7655 /* NEC SVR4.0.2 mips cc rejects this. */
7656 struct point {int x, y;};
7657 static struct point const zero = {0,0};
7658 /* AIX XL C 1.02.0.0 rejects this.
7659 It does not let you subtract one const X* pointer from another in
7660 an arm of an if-expression whose if-part is not a constant
7661 expression */
7662 const char *g = "string";
7663 ccp = &g + (g ? g-g : 0);
7664 /* HPUX 7.0 cc rejects these. */
7665 ++ccp;
7666 p = (char**) ccp;
7667 ccp = (char const *const *) p;
7668 { /* SCO 3.2v4 cc rejects this. */
7669 char *t;
7670 char const *s = 0 ? (char *) 0 : (char const *) 0;
7671
7672 *t++ = 0;
7673 }
7674 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
7675 int x[] = {25, 17};
7676 const int *foo = &x[0];
7677 ++foo;
7678 }
7679 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7680 typedef const int *iptr;
7681 iptr p = 0;
7682 ++p;
7683 }
7684 { /* AIX XL C 1.02.0.0 rejects this saying
7685 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7686 struct s { int j; const int *ap[3]; };
7687 struct s *b; b->j = 5;
7688 }
7689 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7690 const int foo = 10;
7691 }
7692#endif
7693
7694 ;
7695 return 0;
7696}
7697_ACEOF
7698rm -f conftest.$ac_objext
c0d27fcc 7699if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7700 (eval $ac_compile) 2>conftest.er1
98418dba 7701 ac_status=$?
35996d22
AS
7702 grep -v '^ *+' conftest.er1 >conftest.err
7703 rm -f conftest.er1
7704 cat conftest.err >&5
c0d27fcc 7705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7706 (exit $ac_status); } &&
551ffc27
ST
7707 { ac_try='test -z "$ac_c_werror_flag"
7708 || test ! -s conftest.err'
35996d22
AS
7709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7710 (eval $ac_try) 2>&5
7711 ac_status=$?
7712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7713 (exit $ac_status); }; } &&
7714 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7716 (eval $ac_try) 2>&5
7717 ac_status=$?
c0d27fcc 7718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7719 (exit $ac_status); }; }; then
7720 ac_cv_c_const=yes
7721else
7722 echo "$as_me: failed program was:" >&5
19650fd6
AS
7723sed 's/^/| /' conftest.$ac_ext >&5
7724
98418dba
CW
7725ac_cv_c_const=no
7726fi
35996d22 7727rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7728fi
c0d27fcc 7729echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
7730echo "${ECHO_T}$ac_cv_c_const" >&6
7731if test $ac_cv_c_const = no; then
7732
c0d27fcc 7733cat >>confdefs.h <<\_ACEOF
98418dba 7734#define const
c0d27fcc 7735_ACEOF
98418dba
CW
7736
7737fi
7738
c0d27fcc 7739echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
7740echo $ECHO_N "checking for void * support... $ECHO_C" >&6
7741if test "${emacs_cv_void_star+set}" = set; then
7742 echo $ECHO_N "(cached) $ECHO_C" >&6
7743else
7744 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7745/* confdefs.h. */
7746_ACEOF
7747cat confdefs.h >>conftest.$ac_ext
7748cat >>conftest.$ac_ext <<_ACEOF
7749/* end confdefs.h. */
98418dba 7750
98418dba
CW
7751int
7752main ()
7753{
7754void * foo;
7755 ;
7756 return 0;
7757}
7758_ACEOF
7759rm -f conftest.$ac_objext
c0d27fcc 7760if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7761 (eval $ac_compile) 2>conftest.er1
98418dba 7762 ac_status=$?
35996d22
AS
7763 grep -v '^ *+' conftest.er1 >conftest.err
7764 rm -f conftest.er1
7765 cat conftest.err >&5
c0d27fcc 7766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7767 (exit $ac_status); } &&
551ffc27
ST
7768 { ac_try='test -z "$ac_c_werror_flag"
7769 || test ! -s conftest.err'
35996d22
AS
7770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7771 (eval $ac_try) 2>&5
7772 ac_status=$?
7773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7774 (exit $ac_status); }; } &&
7775 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7777 (eval $ac_try) 2>&5
7778 ac_status=$?
c0d27fcc 7779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7780 (exit $ac_status); }; }; then
7781 emacs_cv_void_star=yes
7782else
7783 echo "$as_me: failed program was:" >&5
19650fd6
AS
7784sed 's/^/| /' conftest.$ac_ext >&5
7785
98418dba
CW
7786emacs_cv_void_star=no
7787fi
35996d22 7788rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7789fi
c0d27fcc 7790echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
7791echo "${ECHO_T}$emacs_cv_void_star" >&6
7792if test $emacs_cv_void_star = yes; then
c0d27fcc 7793 cat >>confdefs.h <<\_ACEOF
98418dba 7794#define POINTER_TYPE void
c0d27fcc 7795_ACEOF
98418dba
CW
7796
7797else
c0d27fcc 7798 cat >>confdefs.h <<\_ACEOF
98418dba 7799#define POINTER_TYPE char
c0d27fcc 7800_ACEOF
98418dba
CW
7801
7802fi
7803
c0d27fcc 7804
4494a266
JD
7805
7806
cd958eb3 7807
19650fd6
AS
7808echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7809echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
35996d22 7810set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
98418dba
CW
7811if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
7812 echo $ECHO_N "(cached) $ECHO_C" >&6
7813else
c0d27fcc 7814 cat >conftest.make <<\_ACEOF
98418dba 7815all:
19650fd6 7816 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 7817_ACEOF
98418dba
CW
7818# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7819eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
7820if test -n "$ac_maketemp"; then
7821 eval ac_cv_prog_make_${ac_make}_set=yes
7822else
7823 eval ac_cv_prog_make_${ac_make}_set=no
7824fi
7825rm -f conftest.make
7826fi
7827if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 7828 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7829echo "${ECHO_T}yes" >&6
7830 SET_MAKE=
7831else
c0d27fcc 7832 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7833echo "${ECHO_T}no" >&6
7834 SET_MAKE="MAKE=${MAKE-make}"
7835fi
7836
c0d27fcc
MR
7837
7838echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
7839echo $ECHO_N "checking for long file names... $ECHO_C" >&6
7840if test "${ac_cv_sys_long_file_names+set}" = set; then
7841 echo $ECHO_N "(cached) $ECHO_C" >&6
7842else
7843 ac_cv_sys_long_file_names=yes
7844# Test for long file names in all the places we know might matter:
7845# . the current directory, where building will happen
7846# $prefix/lib where we will be installing things
7847# $exec_prefix/lib likewise
7848# eval it to expand exec_prefix.
7849# $TMPDIR if set, where it might want to write temporary files
7850# if $TMPDIR is not set:
7851# /tmp where it might want to write temporary files
7852# /var/tmp likewise
7853# /usr/tmp likewise
7854if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
7855 ac_tmpdirs=$TMPDIR
7856else
7857 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
7858fi
7859for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
7860 test -d $ac_dir || continue
7861 test -w $ac_dir || continue # It is less confusing to not echo anything here.
7862 ac_xdir=$ac_dir/cf$$
7863 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
7864 ac_tf1=$ac_xdir/conftest9012345
7865 ac_tf2=$ac_xdir/conftest9012346
7866 (echo 1 >$ac_tf1) 2>/dev/null
7867 (echo 2 >$ac_tf2) 2>/dev/null
7868 ac_val=`cat $ac_tf1 2>/dev/null`
7869 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
7870 ac_cv_sys_long_file_names=no
7871 rm -rf $ac_xdir 2>/dev/null
7872 break
7873 fi
7874 rm -rf $ac_xdir 2>/dev/null
7875done
7876fi
c0d27fcc 7877echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
7878echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
7879if test $ac_cv_sys_long_file_names = yes; then
7880
c0d27fcc 7881cat >>confdefs.h <<\_ACEOF
98418dba 7882#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 7883_ACEOF
98418dba
CW
7884
7885fi
7886
c0d27fcc 7887
98418dba
CW
7888#### Choose a window system.
7889
c0d27fcc 7890echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
7891echo $ECHO_N "checking for X... $ECHO_C" >&6
7892
c0d27fcc 7893
98418dba
CW
7894# Check whether --with-x or --without-x was given.
7895if test "${with_x+set}" = set; then
7896 withval="$with_x"
7897
7898fi;
7899# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7900if test "x$with_x" = xno; then
7901 # The user explicitly disabled X.
7902 have_x=disabled
7903else
7904 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
7905 # Both variables are already set.
7906 have_x=yes
7907 else
7908 if test "${ac_cv_have_x+set}" = set; then
7909 echo $ECHO_N "(cached) $ECHO_C" >&6
7910else
7911 # One or both of the vars are not set, and there is no cached value.
7912ac_x_includes=no ac_x_libraries=no
7913rm -fr conftest.dir
7914if mkdir conftest.dir; then
7915 cd conftest.dir
7916 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 7917 cat >Imakefile <<'_ACEOF'
98418dba
CW
7918acfindx:
7919 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 7920_ACEOF
98418dba
CW
7921 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
7922 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7923 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7924 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7925 for ac_extension in a so sl; do
7926 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
35996d22
AS
7927 test -f $ac_im_libdir/libX11.$ac_extension; then
7928 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
7929 fi
7930 done
7931 # Screen out bogus values from the imake configuration. They are
7932 # bogus both because they are the default anyway, and because
7933 # using them would break gcc on systems where it needs fixed includes.
7934 case $ac_im_incroot in
7935 /usr/include) ;;
7936 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7937 esac
7938 case $ac_im_usrlibdir in
7939 /usr/lib | /lib) ;;
7940 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7941 esac
7942 fi
7943 cd ..
7944 rm -fr conftest.dir
7945fi
7946
7947# Standard set of common directories for X headers.
7948# Check X11 before X11Rn because it is often a symlink to the current release.
7949ac_x_header_dirs='
7950/usr/X11/include
7951/usr/X11R6/include
7952/usr/X11R5/include
7953/usr/X11R4/include
7954
7955/usr/include/X11
7956/usr/include/X11R6
7957/usr/include/X11R5
7958/usr/include/X11R4
7959
7960/usr/local/X11/include
7961/usr/local/X11R6/include
7962/usr/local/X11R5/include
7963/usr/local/X11R4/include
7964
7965/usr/local/include/X11
7966/usr/local/include/X11R6
7967/usr/local/include/X11R5
7968/usr/local/include/X11R4
7969
7970/usr/X386/include
7971/usr/x386/include
7972/usr/XFree86/include/X11
7973
7974/usr/include
7975/usr/local/include
7976/usr/unsupported/include
7977/usr/athena/include
7978/usr/local/x11r5/include
7979/usr/lpp/Xamples/include
7980
7981/usr/openwin/include
7982/usr/openwin/share/include'
7983
7984if test "$ac_x_includes" = no; then
551ffc27 7985 # Guess where to find include files, by looking for Intrinsic.h.
98418dba
CW
7986 # First, try using that file with no special directory specified.
7987 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7988/* confdefs.h. */
7989_ACEOF
7990cat confdefs.h >>conftest.$ac_ext
7991cat >>conftest.$ac_ext <<_ACEOF
7992/* end confdefs.h. */
98418dba
CW
7993#include <X11/Intrinsic.h>
7994_ACEOF
c0d27fcc 7995if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7996 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7997 ac_status=$?
6bae0ccf 7998 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
7999 rm -f conftest.er1
8000 cat conftest.err >&5
c0d27fcc 8001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8002 (exit $ac_status); } >/dev/null; then
8003 if test -s conftest.err; then
8004 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 8005 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8006 else
8007 ac_cpp_err=
8008 fi
8009else
8010 ac_cpp_err=yes
8011fi
8012if test -z "$ac_cpp_err"; then
8013 # We can compile using X headers with no special include directory.
8014ac_x_includes=
8015else
8016 echo "$as_me: failed program was:" >&5
19650fd6
AS
8017sed 's/^/| /' conftest.$ac_ext >&5
8018
98418dba
CW
8019 for ac_dir in $ac_x_header_dirs; do
8020 if test -r "$ac_dir/X11/Intrinsic.h"; then
8021 ac_x_includes=$ac_dir
8022 break
8023 fi
8024done
8025fi
8026rm -f conftest.err conftest.$ac_ext
8027fi # $ac_x_includes = no
8028
8029if test "$ac_x_libraries" = no; then
8030 # Check for the libraries.
8031 # See if we find them without any special options.
8032 # Don't add to $LIBS permanently.
8033 ac_save_LIBS=$LIBS
8034 LIBS="-lXt $LIBS"
8035 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8036/* confdefs.h. */
8037_ACEOF
8038cat confdefs.h >>conftest.$ac_ext
8039cat >>conftest.$ac_ext <<_ACEOF
8040/* end confdefs.h. */
98418dba 8041#include <X11/Intrinsic.h>
98418dba
CW
8042int
8043main ()
8044{
8045XtMalloc (0)
8046 ;
8047 return 0;
8048}
8049_ACEOF
8050rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8052 (eval $ac_link) 2>conftest.er1
98418dba 8053 ac_status=$?
35996d22
AS
8054 grep -v '^ *+' conftest.er1 >conftest.err
8055 rm -f conftest.er1
8056 cat conftest.err >&5
c0d27fcc 8057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8058 (exit $ac_status); } &&
551ffc27
ST
8059 { ac_try='test -z "$ac_c_werror_flag"
8060 || test ! -s conftest.err'
35996d22
AS
8061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8062 (eval $ac_try) 2>&5
8063 ac_status=$?
8064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8065 (exit $ac_status); }; } &&
8066 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8068 (eval $ac_try) 2>&5
8069 ac_status=$?
c0d27fcc 8070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8071 (exit $ac_status); }; }; then
8072 LIBS=$ac_save_LIBS
8073# We can link X programs with no special library path.
8074ac_x_libraries=
8075else
8076 echo "$as_me: failed program was:" >&5
19650fd6
AS
8077sed 's/^/| /' conftest.$ac_ext >&5
8078
98418dba
CW
8079LIBS=$ac_save_LIBS
8080for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8081do
8082 # Don't even attempt the hair of trying to link an X program!
8083 for ac_extension in a so sl; do
8084 if test -r $ac_dir/libXt.$ac_extension; then
8085 ac_x_libraries=$ac_dir
8086 break 2
8087 fi
8088 done
8089done
8090fi
35996d22
AS
8091rm -f conftest.err conftest.$ac_objext \
8092 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8093fi # $ac_x_libraries = no
8094
8095if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8096 # Didn't find X anywhere. Cache the known absence of X.
8097 ac_cv_have_x="have_x=no"
8098else
8099 # Record where we found X for the cache.
8100 ac_cv_have_x="have_x=yes \
35996d22 8101 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
98418dba
CW
8102fi
8103fi
8104
8105 fi
8106 eval "$ac_cv_have_x"
8107fi # $with_x != no
8108
8109if test "$have_x" != yes; then
c0d27fcc 8110 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
8111echo "${ECHO_T}$have_x" >&6
8112 no_x=yes
8113else
8114 # If each of the values was on the command line, it overrides each guess.
8115 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8116 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8117 # Update the cache value to reflect the command line values.
8118 ac_cv_have_x="have_x=yes \
8119 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
551ffc27
ST
8120 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
8121echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
98418dba
CW
8122fi
8123
8124if test "$no_x" = yes; then
8125 window_system=none
8126else
8127 window_system=x11
8128fi
8129
8130if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8131 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
8132 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
8133 x_default_search_path=""
8134 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
8135 x_search_path="\
8136${x_library}/X11/%L/%T/%N%C%S:\
8137${x_library}/X11/%l/%T/%N%C%S:\
8138${x_library}/X11/%T/%N%C%S:\
8139${x_library}/X11/%L/%T/%N%S:\
8140${x_library}/X11/%l/%T/%N%S:\
8141${x_library}/X11/%T/%N%S"
8142 if test x"${x_default_search_path}" = x; then
8143 x_default_search_path=${x_search_path}
8144 else
8145 x_default_search_path="${x_search_path}:${x_default_search_path}"
8146 fi
8147 done
8148fi
8149if test "${x_includes}" != NONE && test -n "${x_includes}"; then
8150 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
8151fi
8152
8153if test x"${x_includes}" = x; then
8154 bitmapdir=/usr/include/X11/bitmaps
8155else
8156 # accumulate include directories that have X11 bitmap subdirectories
8157 bmd_acc="dummyval"
8158 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
8159 if test -d "${bmd}/X11/bitmaps"; then
8160 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
8161 fi
8162 if test -d "${bmd}/bitmaps"; then
8163 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
8164 fi
8165 done
8166 if test ${bmd_acc} != "dummyval"; then
8167 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
8168 fi
8169fi
8170
8171case "${window_system}" in
8172 x11 )
8173 HAVE_X_WINDOWS=yes
8174 HAVE_X11=yes
8175 case "${with_x_toolkit}" in
8176 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
8177 motif ) USE_X_TOOLKIT=MOTIF ;;
488dd4c4
JD
8178 gtk ) with_gtk=yes
8179 USE_X_TOOLKIT=none ;;
98418dba
CW
8180 no ) USE_X_TOOLKIT=none ;;
8181 * ) USE_X_TOOLKIT=maybe ;;
8182 esac
8183 ;;
8184 none )
8185 HAVE_X_WINDOWS=no
8186 HAVE_X11=no
8187 USE_X_TOOLKIT=none
8188 ;;
8189esac
8190
8191### If we're using X11, we should use the X menu package.
8192HAVE_MENUS=no
8193case ${HAVE_X11} in
8194 yes ) HAVE_MENUS=yes ;;
8195esac
8196
8197if test "${opsys}" = "hpux9"; then
8198 case "${x_libraries}" in
8199 *X11R4* )
8200 opsysfile="s/hpux9-x11r4.h"
8201 ;;
8202 esac
8203fi
8204
8205if test "${opsys}" = "hpux9shr"; then
8206 case "${x_libraries}" in
8207 *X11R4* )
8208 opsysfile="s/hpux9shxr4.h"
8209 ;;
8210 esac
8211fi
8212
8213### Compute the unexec source name from the object name.
8214UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
8215
8216# Do the opsystem or machine files prohibit the use of the GNU malloc?
8217# Assume not, until told otherwise.
8218GNU_MALLOC=yes
8219doug_lea_malloc=yes
c0d27fcc 8220echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
8221echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
8222if test "${ac_cv_func_malloc_get_state+set}" = set; then
8223 echo $ECHO_N "(cached) $ECHO_C" >&6
8224else
8225 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8226/* confdefs.h. */
8227_ACEOF
8228cat confdefs.h >>conftest.$ac_ext
8229cat >>conftest.$ac_ext <<_ACEOF
8230/* end confdefs.h. */
35996d22
AS
8231/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
8232 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8233#define malloc_get_state innocuous_malloc_get_state
8234
98418dba 8235/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8236 which can conflict with char malloc_get_state (); below.
8237 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8238 <limits.h> exists even on freestanding compilers. */
35996d22 8239
19650fd6
AS
8240#ifdef __STDC__
8241# include <limits.h>
8242#else
8243# include <assert.h>
8244#endif
35996d22
AS
8245
8246#undef malloc_get_state
8247
98418dba
CW
8248/* Override any gcc2 internal prototype to avoid an error. */
8249#ifdef __cplusplus
8250extern "C"
19650fd6 8251{
98418dba
CW
8252#endif
8253/* We use char because int might match the return type of a gcc2
8254 builtin and then its argument prototype would still apply. */
8255char malloc_get_state ();
98418dba
CW
8256/* The GNU C library defines this for functions which it implements
8257 to always fail with ENOSYS. Some functions are actually named
8258 something starting with __ and the normal name is an alias. */
8259#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
8260choke me
8261#else
19650fd6
AS
8262char (*f) () = malloc_get_state;
8263#endif
8264#ifdef __cplusplus
8265}
98418dba
CW
8266#endif
8267
19650fd6
AS
8268int
8269main ()
8270{
8271return f != malloc_get_state;
98418dba
CW
8272 ;
8273 return 0;
8274}
8275_ACEOF
8276rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8277if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8278 (eval $ac_link) 2>conftest.er1
98418dba 8279 ac_status=$?
35996d22
AS
8280 grep -v '^ *+' conftest.er1 >conftest.err
8281 rm -f conftest.er1
8282 cat conftest.err >&5
c0d27fcc 8283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8284 (exit $ac_status); } &&
551ffc27
ST
8285 { ac_try='test -z "$ac_c_werror_flag"
8286 || test ! -s conftest.err'
35996d22
AS
8287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8288 (eval $ac_try) 2>&5
8289 ac_status=$?
8290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8291 (exit $ac_status); }; } &&
8292 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8294 (eval $ac_try) 2>&5
8295 ac_status=$?
c0d27fcc 8296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8297 (exit $ac_status); }; }; then
8298 ac_cv_func_malloc_get_state=yes
8299else
8300 echo "$as_me: failed program was:" >&5
19650fd6
AS
8301sed 's/^/| /' conftest.$ac_ext >&5
8302
98418dba
CW
8303ac_cv_func_malloc_get_state=no
8304fi
35996d22
AS
8305rm -f conftest.err conftest.$ac_objext \
8306 conftest$ac_exeext conftest.$ac_ext
98418dba 8307fi
c0d27fcc 8308echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
8309echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
8310if test $ac_cv_func_malloc_get_state = yes; then
8311 :
8312else
8313 doug_lea_malloc=no
8314fi
8315
c0d27fcc 8316echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
8317echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
8318if test "${ac_cv_func_malloc_set_state+set}" = set; then
8319 echo $ECHO_N "(cached) $ECHO_C" >&6
8320else
8321 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8322/* confdefs.h. */
8323_ACEOF
8324cat confdefs.h >>conftest.$ac_ext
8325cat >>conftest.$ac_ext <<_ACEOF
8326/* end confdefs.h. */
35996d22
AS
8327/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
8328 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8329#define malloc_set_state innocuous_malloc_set_state
8330
98418dba 8331/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8332 which can conflict with char malloc_set_state (); below.
8333 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8334 <limits.h> exists even on freestanding compilers. */
35996d22 8335
19650fd6
AS
8336#ifdef __STDC__
8337# include <limits.h>
8338#else
8339# include <assert.h>
8340#endif
35996d22
AS
8341
8342#undef malloc_set_state
8343
98418dba
CW
8344/* Override any gcc2 internal prototype to avoid an error. */
8345#ifdef __cplusplus
8346extern "C"
19650fd6 8347{
98418dba
CW
8348#endif
8349/* We use char because int might match the return type of a gcc2
8350 builtin and then its argument prototype would still apply. */
8351char malloc_set_state ();
98418dba
CW
8352/* The GNU C library defines this for functions which it implements
8353 to always fail with ENOSYS. Some functions are actually named
8354 something starting with __ and the normal name is an alias. */
8355#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
8356choke me
8357#else
19650fd6
AS
8358char (*f) () = malloc_set_state;
8359#endif
8360#ifdef __cplusplus
8361}
98418dba
CW
8362#endif
8363
19650fd6
AS
8364int
8365main ()
8366{
8367return f != malloc_set_state;
98418dba
CW
8368 ;
8369 return 0;
8370}
8371_ACEOF
8372rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8373if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8374 (eval $ac_link) 2>conftest.er1
98418dba 8375 ac_status=$?
35996d22
AS
8376 grep -v '^ *+' conftest.er1 >conftest.err
8377 rm -f conftest.er1
8378 cat conftest.err >&5
c0d27fcc 8379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8380 (exit $ac_status); } &&
551ffc27
ST
8381 { ac_try='test -z "$ac_c_werror_flag"
8382 || test ! -s conftest.err'
35996d22
AS
8383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8384 (eval $ac_try) 2>&5
8385 ac_status=$?
8386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8387 (exit $ac_status); }; } &&
8388 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8390 (eval $ac_try) 2>&5
8391 ac_status=$?
c0d27fcc 8392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8393 (exit $ac_status); }; }; then
8394 ac_cv_func_malloc_set_state=yes
8395else
8396 echo "$as_me: failed program was:" >&5
19650fd6
AS
8397sed 's/^/| /' conftest.$ac_ext >&5
8398
98418dba
CW
8399ac_cv_func_malloc_set_state=no
8400fi
35996d22
AS
8401rm -f conftest.err conftest.$ac_objext \
8402 conftest$ac_exeext conftest.$ac_ext
98418dba 8403fi
c0d27fcc 8404echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
8405echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
8406if test $ac_cv_func_malloc_set_state = yes; then
8407 :
8408else
8409 doug_lea_malloc=no
8410fi
8411
c0d27fcc 8412echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
8413echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
8414if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
8415 echo $ECHO_N "(cached) $ECHO_C" >&6
8416else
8417 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8418/* confdefs.h. */
8419_ACEOF
8420cat confdefs.h >>conftest.$ac_ext
8421cat >>conftest.$ac_ext <<_ACEOF
8422/* end confdefs.h. */
98418dba 8423extern void (* __after_morecore_hook)();
98418dba
CW
8424int
8425main ()
8426{
8427__after_morecore_hook = 0
8428 ;
8429 return 0;
8430}
8431_ACEOF
8432rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8433if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8434 (eval $ac_link) 2>conftest.er1
98418dba 8435 ac_status=$?
35996d22
AS
8436 grep -v '^ *+' conftest.er1 >conftest.err
8437 rm -f conftest.er1
8438 cat conftest.err >&5
c0d27fcc 8439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8440 (exit $ac_status); } &&
551ffc27
ST
8441 { ac_try='test -z "$ac_c_werror_flag"
8442 || test ! -s conftest.err'
35996d22
AS
8443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8444 (eval $ac_try) 2>&5
8445 ac_status=$?
8446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8447 (exit $ac_status); }; } &&
8448 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8450 (eval $ac_try) 2>&5
8451 ac_status=$?
c0d27fcc 8452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8453 (exit $ac_status); }; }; then
8454 emacs_cv_var___after_morecore_hook=yes
8455else
8456 echo "$as_me: failed program was:" >&5
19650fd6
AS
8457sed 's/^/| /' conftest.$ac_ext >&5
8458
98418dba
CW
8459emacs_cv_var___after_morecore_hook=no
8460fi
35996d22
AS
8461rm -f conftest.err conftest.$ac_objext \
8462 conftest$ac_exeext conftest.$ac_ext
98418dba 8463fi
c0d27fcc 8464echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
8465echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
8466if test $emacs_cv_var___after_morecore_hook = no; then
8467 doug_lea_malloc=no
8468fi
8469if test "${system_malloc}" = "yes"; then
8470 GNU_MALLOC=no
8471 GNU_MALLOC_reason="
8472 (The GNU allocators don't work with this system configuration.)"
8473fi
8474if test "$doug_lea_malloc" = "yes" ; then
8475 if test "$GNU_MALLOC" = yes ; then
8476 GNU_MALLOC_reason="
8477 (Using Doug Lea's new malloc from the GNU C Library.)"
8478 fi
b936fae4 8479
c0d27fcc 8480cat >>confdefs.h <<\_ACEOF
98418dba 8481#define DOUG_LEA_MALLOC 1
c0d27fcc 8482_ACEOF
98418dba
CW
8483
8484fi
8485
8486if test x"${REL_ALLOC}" = x; then
8487 REL_ALLOC=${GNU_MALLOC}
8488fi
8489
8490
c0d27fcc
MR
8491
8492
8493for ac_header in stdlib.h unistd.h
98418dba
CW
8494do
8495as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
8496if eval "test \"\${$as_ac_Header+set}\" = set"; then
8497 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
8498echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8499if eval "test \"\${$as_ac_Header+set}\" = set"; then
8500 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
8501fi
8502echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8503echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 8504else
c0d27fcc
MR
8505 # Is the header compilable?
8506echo "$as_me:$LINENO: checking $ac_header usability" >&5
8507echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8508cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8509/* confdefs.h. */
8510_ACEOF
8511cat confdefs.h >>conftest.$ac_ext
8512cat >>conftest.$ac_ext <<_ACEOF
8513/* end confdefs.h. */
98418dba
CW
8514$ac_includes_default
8515#include <$ac_header>
8516_ACEOF
8517rm -f conftest.$ac_objext
c0d27fcc 8518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 8519 (eval $ac_compile) 2>conftest.er1
98418dba 8520 ac_status=$?
35996d22
AS
8521 grep -v '^ *+' conftest.er1 >conftest.err
8522 rm -f conftest.er1
8523 cat conftest.err >&5
c0d27fcc 8524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8525 (exit $ac_status); } &&
551ffc27
ST
8526 { ac_try='test -z "$ac_c_werror_flag"
8527 || test ! -s conftest.err'
35996d22
AS
8528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8529 (eval $ac_try) 2>&5
8530 ac_status=$?
8531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8532 (exit $ac_status); }; } &&
8533 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8535 (eval $ac_try) 2>&5
8536 ac_status=$?
c0d27fcc 8537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8538 (exit $ac_status); }; }; then
c0d27fcc 8539 ac_header_compiler=yes
98418dba
CW
8540else
8541 echo "$as_me: failed program was:" >&5
19650fd6
AS
8542sed 's/^/| /' conftest.$ac_ext >&5
8543
c0d27fcc 8544ac_header_compiler=no
98418dba 8545fi
35996d22 8546rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
8547echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8548echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 8549
c0d27fcc
MR
8550# Is the header present?
8551echo "$as_me:$LINENO: checking $ac_header presence" >&5
8552echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8553cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8554/* confdefs.h. */
8555_ACEOF
8556cat confdefs.h >>conftest.$ac_ext
8557cat >>conftest.$ac_ext <<_ACEOF
8558/* end confdefs.h. */
98418dba
CW
8559#include <$ac_header>
8560_ACEOF
c0d27fcc 8561if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8562 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8563 ac_status=$?
6bae0ccf 8564 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8565 rm -f conftest.er1
8566 cat conftest.err >&5
c0d27fcc 8567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8568 (exit $ac_status); } >/dev/null; then
8569 if test -s conftest.err; then
8570 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 8571 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8572 else
8573 ac_cpp_err=
8574 fi
8575else
8576 ac_cpp_err=yes
8577fi
8578if test -z "$ac_cpp_err"; then
c0d27fcc 8579 ac_header_preproc=yes
98418dba
CW
8580else
8581 echo "$as_me: failed program was:" >&5
19650fd6
AS
8582sed 's/^/| /' conftest.$ac_ext >&5
8583
c0d27fcc 8584 ac_header_preproc=no
98418dba
CW
8585fi
8586rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
8587echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8588echo "${ECHO_T}$ac_header_preproc" >&6
8589
8590# So? What about this header?
35996d22
AS
8591case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8592 yes:no: )
c0d27fcc
MR
8593 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8594echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
8595 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8596echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8597 ac_header_preproc=yes
19650fd6 8598 ;;
35996d22 8599 no:yes:* )
c0d27fcc
MR
8600 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8601echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
8602 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8603echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8604 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8605echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8606 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8607echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 8608 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 8609echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
8610 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8611echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
8612 (
8613 cat <<\_ASBOX
35996d22
AS
8614## ------------------------------------------ ##
8615## Report this to the AC_PACKAGE_NAME lists. ##
8616## ------------------------------------------ ##
19650fd6
AS
8617_ASBOX
8618 ) |
8619 sed "s/^/$as_me: WARNING: /" >&2
8620 ;;
c0d27fcc
MR
8621esac
8622echo "$as_me:$LINENO: checking for $ac_header" >&5
8623echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8624if eval "test \"\${$as_ac_Header+set}\" = set"; then
8625 echo $ECHO_N "(cached) $ECHO_C" >&6
8626else
35996d22 8627 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 8628fi
c0d27fcc 8629echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 8630echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
8631
8632fi
98418dba 8633if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 8634 cat >>confdefs.h <<_ACEOF
98418dba 8635#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 8636_ACEOF
98418dba
CW
8637
8638fi
c0d27fcc 8639
98418dba
CW
8640done
8641
c0d27fcc 8642
98418dba
CW
8643for ac_func in getpagesize
8644do
8645as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 8646echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
8647echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8648if eval "test \"\${$as_ac_var+set}\" = set"; then
8649 echo $ECHO_N "(cached) $ECHO_C" >&6
8650else
8651 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8652/* confdefs.h. */
8653_ACEOF
8654cat confdefs.h >>conftest.$ac_ext
8655cat >>conftest.$ac_ext <<_ACEOF
8656/* end confdefs.h. */
35996d22
AS
8657/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8658 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8659#define $ac_func innocuous_$ac_func
8660
98418dba 8661/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8662 which can conflict with char $ac_func (); below.
8663 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8664 <limits.h> exists even on freestanding compilers. */
35996d22 8665
19650fd6
AS
8666#ifdef __STDC__
8667# include <limits.h>
8668#else
8669# include <assert.h>
8670#endif
35996d22
AS
8671
8672#undef $ac_func
8673
98418dba
CW
8674/* Override any gcc2 internal prototype to avoid an error. */
8675#ifdef __cplusplus
8676extern "C"
19650fd6 8677{
98418dba
CW
8678#endif
8679/* We use char because int might match the return type of a gcc2
8680 builtin and then its argument prototype would still apply. */
8681char $ac_func ();
98418dba
CW
8682/* The GNU C library defines this for functions which it implements
8683 to always fail with ENOSYS. Some functions are actually named
8684 something starting with __ and the normal name is an alias. */
8685#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8686choke me
8687#else
19650fd6
AS
8688char (*f) () = $ac_func;
8689#endif
8690#ifdef __cplusplus
8691}
98418dba
CW
8692#endif
8693
19650fd6
AS
8694int
8695main ()
8696{
8697return f != $ac_func;
98418dba
CW
8698 ;
8699 return 0;
8700}
8701_ACEOF
8702rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8703if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8704 (eval $ac_link) 2>conftest.er1
98418dba 8705 ac_status=$?
35996d22
AS
8706 grep -v '^ *+' conftest.er1 >conftest.err
8707 rm -f conftest.er1
8708 cat conftest.err >&5
c0d27fcc 8709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8710 (exit $ac_status); } &&
551ffc27
ST
8711 { ac_try='test -z "$ac_c_werror_flag"
8712 || test ! -s conftest.err'
35996d22
AS
8713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8714 (eval $ac_try) 2>&5
8715 ac_status=$?
8716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8717 (exit $ac_status); }; } &&
8718 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8720 (eval $ac_try) 2>&5
8721 ac_status=$?
c0d27fcc 8722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8723 (exit $ac_status); }; }; then
8724 eval "$as_ac_var=yes"
8725else
8726 echo "$as_me: failed program was:" >&5
19650fd6
AS
8727sed 's/^/| /' conftest.$ac_ext >&5
8728
98418dba
CW
8729eval "$as_ac_var=no"
8730fi
35996d22
AS
8731rm -f conftest.err conftest.$ac_objext \
8732 conftest$ac_exeext conftest.$ac_ext
98418dba 8733fi
c0d27fcc 8734echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
8735echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8736if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 8737 cat >>confdefs.h <<_ACEOF
98418dba 8738#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 8739_ACEOF
98418dba
CW
8740
8741fi
8742done
8743
c0d27fcc 8744echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
8745echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
8746if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8747 echo $ECHO_N "(cached) $ECHO_C" >&6
8748else
8749 if test "$cross_compiling" = yes; then
8750 ac_cv_func_mmap_fixed_mapped=no
8751else
8752 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8753/* confdefs.h. */
8754_ACEOF
8755cat confdefs.h >>conftest.$ac_ext
8756cat >>conftest.$ac_ext <<_ACEOF
8757/* end confdefs.h. */
98418dba 8758$ac_includes_default
c0d27fcc
MR
8759/* malloc might have been renamed as rpl_malloc. */
8760#undef malloc
8761
98418dba
CW
8762/* Thanks to Mike Haertel and Jim Avera for this test.
8763 Here is a matrix of mmap possibilities:
8764 mmap private not fixed
8765 mmap private fixed at somewhere currently unmapped
8766 mmap private fixed at somewhere already mapped
8767 mmap shared not fixed
8768 mmap shared fixed at somewhere currently unmapped
8769 mmap shared fixed at somewhere already mapped
8770 For private mappings, we should verify that changes cannot be read()
8771 back from the file, nor mmap's back from the file at a different
8772 address. (There have been systems where private was not correctly
8773 implemented like the infamous i386 svr4.0, and systems where the
8774 VM page cache was not coherent with the file system buffer cache
8775 like early versions of FreeBSD and possibly contemporary NetBSD.)
8776 For shared mappings, we should conversely verify that changes get
c0d27fcc 8777 propagated back to all the places they're supposed to be.
98418dba
CW
8778
8779 Grep wants private fixed already mapped.
8780 The main things grep needs to know about mmap are:
8781 * does it exist and is it safe to write into the mmap'd area
8782 * how to use it (BSD variants) */
8783
8784#include <fcntl.h>
8785#include <sys/mman.h>
8786
8787#if !STDC_HEADERS && !HAVE_STDLIB_H
8788char *malloc ();
8789#endif
8790
8791/* This mess was copied from the GNU getpagesize.h. */
8792#if !HAVE_GETPAGESIZE
8793/* Assume that all systems that can run configure have sys/param.h. */
8794# if !HAVE_SYS_PARAM_H
8795# define HAVE_SYS_PARAM_H 1
8796# endif
8797
8798# ifdef _SC_PAGESIZE
8799# define getpagesize() sysconf(_SC_PAGESIZE)
8800# else /* no _SC_PAGESIZE */
8801# if HAVE_SYS_PARAM_H
8802# include <sys/param.h>
8803# ifdef EXEC_PAGESIZE
8804# define getpagesize() EXEC_PAGESIZE
8805# else /* no EXEC_PAGESIZE */
8806# ifdef NBPG
8807# define getpagesize() NBPG * CLSIZE
8808# ifndef CLSIZE
8809# define CLSIZE 1
8810# endif /* no CLSIZE */
8811# else /* no NBPG */
8812# ifdef NBPC
8813# define getpagesize() NBPC
8814# else /* no NBPC */
8815# ifdef PAGESIZE
8816# define getpagesize() PAGESIZE
8817# endif /* PAGESIZE */
8818# endif /* no NBPC */
8819# endif /* no NBPG */
8820# endif /* no EXEC_PAGESIZE */
8821# else /* no HAVE_SYS_PARAM_H */
8822# define getpagesize() 8192 /* punt totally */
8823# endif /* no HAVE_SYS_PARAM_H */
8824# endif /* no _SC_PAGESIZE */
8825
8826#endif /* no HAVE_GETPAGESIZE */
8827
8828int
8829main ()
8830{
8831 char *data, *data2, *data3;
8832 int i, pagesize;
8833 int fd;
8834
8835 pagesize = getpagesize ();
8836
8837 /* First, make a file with some known garbage in it. */
8838 data = (char *) malloc (pagesize);
8839 if (!data)
8840 exit (1);
8841 for (i = 0; i < pagesize; ++i)
8842 *(data + i) = rand ();
8843 umask (0);
8844 fd = creat ("conftest.mmap", 0600);
8845 if (fd < 0)
8846 exit (1);
8847 if (write (fd, data, pagesize) != pagesize)
8848 exit (1);
8849 close (fd);
8850
8851 /* Next, try to mmap the file at a fixed address which already has
8852 something else allocated at it. If we can, also make sure that
8853 we see the same garbage. */
8854 fd = open ("conftest.mmap", O_RDWR);
8855 if (fd < 0)
8856 exit (1);
8857 data2 = (char *) malloc (2 * pagesize);
8858 if (!data2)
8859 exit (1);
35996d22 8860 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 8861 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
35996d22 8862 MAP_PRIVATE | MAP_FIXED, fd, 0L))
98418dba
CW
8863 exit (1);
8864 for (i = 0; i < pagesize; ++i)
8865 if (*(data + i) != *(data2 + i))
8866 exit (1);
8867
8868 /* Finally, make sure that changes to the mapped area do not
8869 percolate back to the file as seen by read(). (This is a bug on
8870 some variants of i386 svr4.0.) */
8871 for (i = 0; i < pagesize; ++i)
8872 *(data2 + i) = *(data2 + i) + 1;
8873 data3 = (char *) malloc (pagesize);
8874 if (!data3)
8875 exit (1);
8876 if (read (fd, data3, pagesize) != pagesize)
8877 exit (1);
8878 for (i = 0; i < pagesize; ++i)
8879 if (*(data + i) != *(data3 + i))
8880 exit (1);
8881 close (fd);
8882 exit (0);
8883}
8884_ACEOF
8885rm -f conftest$ac_exeext
c0d27fcc 8886if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8887 (eval $ac_link) 2>&5
8888 ac_status=$?
c0d27fcc 8889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8890 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 8891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8892 (eval $ac_try) 2>&5
8893 ac_status=$?
c0d27fcc 8894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8895 (exit $ac_status); }; }; then
8896 ac_cv_func_mmap_fixed_mapped=yes
8897else
8898 echo "$as_me: program exited with status $ac_status" >&5
8899echo "$as_me: failed program was:" >&5
19650fd6
AS
8900sed 's/^/| /' conftest.$ac_ext >&5
8901
c0d27fcc 8902( exit $ac_status )
98418dba
CW
8903ac_cv_func_mmap_fixed_mapped=no
8904fi
35996d22 8905rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
8906fi
8907fi
c0d27fcc 8908echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
8909echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
8910if test $ac_cv_func_mmap_fixed_mapped = yes; then
8911
c0d27fcc 8912cat >>confdefs.h <<\_ACEOF
98418dba 8913#define HAVE_MMAP 1
c0d27fcc 8914_ACEOF
98418dba
CW
8915
8916fi
8917rm -f conftest.mmap
8918
8919if test $use_mmap_for_buffers = yes; then
8920 REL_ALLOC=no
8921fi
8922
8923LIBS="$libsrc_libs $LIBS"
8924
c0d27fcc
MR
8925
8926echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
8927echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
8928if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
8929 echo $ECHO_N "(cached) $ECHO_C" >&6
8930else
8931 ac_check_lib_save_LIBS=$LIBS
8932LIBS="-ldnet $LIBS"
8933cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8934/* confdefs.h. */
8935_ACEOF
8936cat confdefs.h >>conftest.$ac_ext
8937cat >>conftest.$ac_ext <<_ACEOF
8938/* end confdefs.h. */
98418dba
CW
8939
8940/* Override any gcc2 internal prototype to avoid an error. */
8941#ifdef __cplusplus
8942extern "C"
8943#endif
8944/* We use char because int might match the return type of a gcc2
8945 builtin and then its argument prototype would still apply. */
8946char dnet_ntoa ();
98418dba
CW
8947int
8948main ()
8949{
8950dnet_ntoa ();
8951 ;
8952 return 0;
8953}
8954_ACEOF
8955rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8956if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8957 (eval $ac_link) 2>conftest.er1
98418dba 8958 ac_status=$?
35996d22
AS
8959 grep -v '^ *+' conftest.er1 >conftest.err
8960 rm -f conftest.er1
8961 cat conftest.err >&5
c0d27fcc 8962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8963 (exit $ac_status); } &&
551ffc27
ST
8964 { ac_try='test -z "$ac_c_werror_flag"
8965 || test ! -s conftest.err'
35996d22
AS
8966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8967 (eval $ac_try) 2>&5
8968 ac_status=$?
8969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8970 (exit $ac_status); }; } &&
8971 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8973 (eval $ac_try) 2>&5
8974 ac_status=$?
c0d27fcc 8975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8976 (exit $ac_status); }; }; then
8977 ac_cv_lib_dnet_dnet_ntoa=yes
8978else
8979 echo "$as_me: failed program was:" >&5
19650fd6
AS
8980sed 's/^/| /' conftest.$ac_ext >&5
8981
98418dba
CW
8982ac_cv_lib_dnet_dnet_ntoa=no
8983fi
35996d22
AS
8984rm -f conftest.err conftest.$ac_objext \
8985 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8986LIBS=$ac_check_lib_save_LIBS
8987fi
c0d27fcc 8988echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
8989echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
8990if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 8991 cat >>confdefs.h <<_ACEOF
98418dba 8992#define HAVE_LIBDNET 1
c0d27fcc 8993_ACEOF
98418dba
CW
8994
8995 LIBS="-ldnet $LIBS"
8996
8997fi
8998
c0d27fcc
MR
8999
9000echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
9001echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
9002if test "${ac_cv_lib_Xbsd_main+set}" = set; then
9003 echo $ECHO_N "(cached) $ECHO_C" >&6
9004else
9005 ac_check_lib_save_LIBS=$LIBS
9006LIBS="-lXbsd $LIBS"
9007cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9008/* confdefs.h. */
9009_ACEOF
9010cat confdefs.h >>conftest.$ac_ext
9011cat >>conftest.$ac_ext <<_ACEOF
9012/* end confdefs.h. */
98418dba 9013
c0d27fcc 9014
98418dba
CW
9015int
9016main ()
9017{
9018main ();
9019 ;
9020 return 0;
9021}
9022_ACEOF
9023rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9024if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9025 (eval $ac_link) 2>conftest.er1
98418dba 9026 ac_status=$?
35996d22
AS
9027 grep -v '^ *+' conftest.er1 >conftest.err
9028 rm -f conftest.er1
9029 cat conftest.err >&5
c0d27fcc 9030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9031 (exit $ac_status); } &&
551ffc27
ST
9032 { ac_try='test -z "$ac_c_werror_flag"
9033 || test ! -s conftest.err'
35996d22
AS
9034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9035 (eval $ac_try) 2>&5
9036 ac_status=$?
9037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9038 (exit $ac_status); }; } &&
9039 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9041 (eval $ac_try) 2>&5
9042 ac_status=$?
c0d27fcc 9043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9044 (exit $ac_status); }; }; then
9045 ac_cv_lib_Xbsd_main=yes
9046else
9047 echo "$as_me: failed program was:" >&5
19650fd6
AS
9048sed 's/^/| /' conftest.$ac_ext >&5
9049
98418dba
CW
9050ac_cv_lib_Xbsd_main=no
9051fi
35996d22
AS
9052rm -f conftest.err conftest.$ac_objext \
9053 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9054LIBS=$ac_check_lib_save_LIBS
9055fi
c0d27fcc 9056echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
9057echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
9058if test $ac_cv_lib_Xbsd_main = yes; then
9059 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
9060fi
9061
c0d27fcc
MR
9062
9063
9064echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
9065echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
9066if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
9067 echo $ECHO_N "(cached) $ECHO_C" >&6
9068else
9069 ac_check_lib_save_LIBS=$LIBS
9070LIBS="-lpthreads $LIBS"
9071cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9072/* confdefs.h. */
9073_ACEOF
9074cat confdefs.h >>conftest.$ac_ext
9075cat >>conftest.$ac_ext <<_ACEOF
9076/* end confdefs.h. */
98418dba
CW
9077
9078/* Override any gcc2 internal prototype to avoid an error. */
9079#ifdef __cplusplus
9080extern "C"
9081#endif
9082/* We use char because int might match the return type of a gcc2
9083 builtin and then its argument prototype would still apply. */
9084char cma_open ();
98418dba
CW
9085int
9086main ()
9087{
9088cma_open ();
9089 ;
9090 return 0;
9091}
9092_ACEOF
9093rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9094if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9095 (eval $ac_link) 2>conftest.er1
98418dba 9096 ac_status=$?
35996d22
AS
9097 grep -v '^ *+' conftest.er1 >conftest.err
9098 rm -f conftest.er1
9099 cat conftest.err >&5
c0d27fcc 9100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9101 (exit $ac_status); } &&
551ffc27
ST
9102 { ac_try='test -z "$ac_c_werror_flag"
9103 || test ! -s conftest.err'
35996d22
AS
9104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9105 (eval $ac_try) 2>&5
9106 ac_status=$?
9107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9108 (exit $ac_status); }; } &&
9109 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9111 (eval $ac_try) 2>&5
9112 ac_status=$?
c0d27fcc 9113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9114 (exit $ac_status); }; }; then
9115 ac_cv_lib_pthreads_cma_open=yes
9116else
9117 echo "$as_me: failed program was:" >&5
19650fd6
AS
9118sed 's/^/| /' conftest.$ac_ext >&5
9119
98418dba
CW
9120ac_cv_lib_pthreads_cma_open=no
9121fi
35996d22
AS
9122rm -f conftest.err conftest.$ac_objext \
9123 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9124LIBS=$ac_check_lib_save_LIBS
9125fi
c0d27fcc 9126echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
9127echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
9128if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 9129 cat >>confdefs.h <<_ACEOF
98418dba 9130#define HAVE_LIBPTHREADS 1
c0d27fcc 9131_ACEOF
98418dba
CW
9132
9133 LIBS="-lpthreads $LIBS"
9134
9135fi
9136
c0d27fcc
MR
9137
9138echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
9139echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
9140if test -d /usr/X386/include; then
9141 HAVE_XFREE386=yes
9142 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
9143else
9144 HAVE_XFREE386=no
9145fi
c0d27fcc 9146echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
9147echo "${ECHO_T}$HAVE_XFREE386" >&6
9148
55597d70
DL
9149
9150case ${host_os} in
9151aix*)
9152 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
9153echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
9154if test "${gdb_cv_bigtoc+set}" = set; then
9155 echo $ECHO_N "(cached) $ECHO_C" >&6
9156else
9157
9158 case $GCC in
9159 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9160 *) gdb_cv_bigtoc=-bbigtoc ;;
9161 esac
9162
9163 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9164 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9165/* confdefs.h. */
9166_ACEOF
9167cat confdefs.h >>conftest.$ac_ext
9168cat >>conftest.$ac_ext <<_ACEOF
9169/* end confdefs.h. */
55597d70
DL
9170
9171int
9172main ()
9173{
9174int i;
9175 ;
9176 return 0;
9177}
9178_ACEOF
9179rm -f conftest.$ac_objext conftest$ac_exeext
9180if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9181 (eval $ac_link) 2>conftest.er1
55597d70 9182 ac_status=$?
35996d22
AS
9183 grep -v '^ *+' conftest.er1 >conftest.err
9184 rm -f conftest.er1
9185 cat conftest.err >&5
55597d70
DL
9186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9187 (exit $ac_status); } &&
551ffc27
ST
9188 { ac_try='test -z "$ac_c_werror_flag"
9189 || test ! -s conftest.err'
35996d22
AS
9190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9191 (eval $ac_try) 2>&5
9192 ac_status=$?
9193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9194 (exit $ac_status); }; } &&
9195 { ac_try='test -s conftest$ac_exeext'
55597d70
DL
9196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9197 (eval $ac_try) 2>&5
9198 ac_status=$?
9199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9200 (exit $ac_status); }; }; then
9201 :
9202else
9203 echo "$as_me: failed program was:" >&5
19650fd6
AS
9204sed 's/^/| /' conftest.$ac_ext >&5
9205
55597d70
DL
9206gdb_cv_bigtoc=
9207fi
35996d22
AS
9208rm -f conftest.err conftest.$ac_objext \
9209 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
9210
9211fi
9212echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
9213echo "${ECHO_T}$gdb_cv_bigtoc" >&6
9214 ;;
9215esac
9216
ae1a998c
RS
9217# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
9218# used for the tests that follow. We set them back to REAL_CFLAGS and
9219# REAL_CPPFLAGS later on.
98418dba
CW
9220
9221REAL_CPPFLAGS="$CPPFLAGS"
9222
9223if test "${HAVE_X11}" = "yes"; then
9224 DEFS="$C_SWITCH_X_SITE $DEFS"
9225 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
9226 LIBS="$LIBX $LIBS"
9227 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
9228 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
9229
9230 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
9231 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
9232 # but it's more convenient here to set LD_RUN_PATH
9233 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
9234 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
9235 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
9236 export LD_RUN_PATH
9237 fi
9238
9239 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 9240 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
9241echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
9242 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9243/* confdefs.h. */
9244_ACEOF
9245cat confdefs.h >>conftest.$ac_ext
9246cat >>conftest.$ac_ext <<_ACEOF
9247/* end confdefs.h. */
98418dba 9248
98418dba
CW
9249int
9250main ()
9251{
9252XOpenDisplay ("foo");
9253 ;
9254 return 0;
9255}
9256_ACEOF
9257rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9258if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9259 (eval $ac_link) 2>conftest.er1
98418dba 9260 ac_status=$?
35996d22
AS
9261 grep -v '^ *+' conftest.er1 >conftest.err
9262 rm -f conftest.er1
9263 cat conftest.err >&5
c0d27fcc 9264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9265 (exit $ac_status); } &&
551ffc27
ST
9266 { ac_try='test -z "$ac_c_werror_flag"
9267 || test ! -s conftest.err'
c0d27fcc 9268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9269 (eval $ac_try) 2>&5
9270 ac_status=$?
c0d27fcc 9271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
9272 (exit $ac_status); }; } &&
9273 { ac_try='test -s conftest$ac_exeext'
9274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9275 (eval $ac_try) 2>&5
9276 ac_status=$?
9277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9278 (exit $ac_status); }; }; then
9279 xlinux_first_failure=no
98418dba
CW
9280else
9281 echo "$as_me: failed program was:" >&5
19650fd6
AS
9282sed 's/^/| /' conftest.$ac_ext >&5
9283
98418dba
CW
9284xlinux_first_failure=yes
9285fi
35996d22
AS
9286rm -f conftest.err conftest.$ac_objext \
9287 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9288 if test "${xlinux_first_failure}" = "yes"; then
9289 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
9290 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
9291 OLD_CPPFLAGS="$CPPFLAGS"
9292 OLD_LIBS="$LIBS"
9293 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
9294 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
9295 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
9296 LIBS="$LIBS -b i486-linuxaout"
9297 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9298/* confdefs.h. */
9299_ACEOF
9300cat confdefs.h >>conftest.$ac_ext
9301cat >>conftest.$ac_ext <<_ACEOF
9302/* end confdefs.h. */
98418dba 9303
98418dba
CW
9304int
9305main ()
9306{
9307XOpenDisplay ("foo");
9308 ;
9309 return 0;
9310}
9311_ACEOF
9312rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9313if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9314 (eval $ac_link) 2>conftest.er1
98418dba 9315 ac_status=$?
35996d22
AS
9316 grep -v '^ *+' conftest.er1 >conftest.err
9317 rm -f conftest.er1
9318 cat conftest.err >&5
c0d27fcc 9319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9320 (exit $ac_status); } &&
551ffc27
ST
9321 { ac_try='test -z "$ac_c_werror_flag"
9322 || test ! -s conftest.err'
35996d22
AS
9323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9324 (eval $ac_try) 2>&5
9325 ac_status=$?
9326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9327 (exit $ac_status); }; } &&
9328 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9330 (eval $ac_try) 2>&5
9331 ac_status=$?
c0d27fcc 9332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9333 (exit $ac_status); }; }; then
9334 xlinux_second_failure=no
9335else
9336 echo "$as_me: failed program was:" >&5
19650fd6
AS
9337sed 's/^/| /' conftest.$ac_ext >&5
9338
98418dba
CW
9339xlinux_second_failure=yes
9340fi
35996d22
AS
9341rm -f conftest.err conftest.$ac_objext \
9342 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9343 if test "${xlinux_second_failure}" = "yes"; then
9344 # If we get the same failure with -b, there is no use adding -b.
9345 # So take it out. This plays safe.
9346 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
9347 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
9348 CPPFLAGS="$OLD_CPPFLAGS"
9349 LIBS="$OLD_LIBS"
c0d27fcc 9350 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9351echo "${ECHO_T}no" >&6
9352 else
c0d27fcc 9353 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
9354echo "${ECHO_T}yes" >&6
9355 fi
9356 else
c0d27fcc 9357 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9358echo "${ECHO_T}no" >&6
9359 fi
9360 fi
9361
9362 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
9363 # header files included from there.
c0d27fcc 9364 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
9365echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
9366 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9367/* confdefs.h. */
9368_ACEOF
9369cat confdefs.h >>conftest.$ac_ext
9370cat >>conftest.$ac_ext <<_ACEOF
9371/* end confdefs.h. */
98418dba
CW
9372#include <X11/Xlib.h>
9373#include <X11/XKBlib.h>
98418dba
CW
9374int
9375main ()
9376{
9377XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
9378 ;
9379 return 0;
9380}
9381_ACEOF
9382rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9383if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9384 (eval $ac_link) 2>conftest.er1
98418dba 9385 ac_status=$?
35996d22
AS
9386 grep -v '^ *+' conftest.er1 >conftest.err
9387 rm -f conftest.er1
9388 cat conftest.err >&5
c0d27fcc 9389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9390 (exit $ac_status); } &&
551ffc27
ST
9391 { ac_try='test -z "$ac_c_werror_flag"
9392 || test ! -s conftest.err'
35996d22
AS
9393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9394 (eval $ac_try) 2>&5
9395 ac_status=$?
9396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9397 (exit $ac_status); }; } &&
9398 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9400 (eval $ac_try) 2>&5
9401 ac_status=$?
c0d27fcc 9402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9403 (exit $ac_status); }; }; then
9404 emacs_xkb=yes
9405else
9406 echo "$as_me: failed program was:" >&5
19650fd6
AS
9407sed 's/^/| /' conftest.$ac_ext >&5
9408
98418dba
CW
9409emacs_xkb=no
9410fi
35996d22
AS
9411rm -f conftest.err conftest.$ac_objext \
9412 conftest$ac_exeext conftest.$ac_ext
c0d27fcc 9413 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
9414echo "${ECHO_T}$emacs_xkb" >&6
9415 if test $emacs_xkb = yes; then
b936fae4 9416
c0d27fcc 9417cat >>confdefs.h <<\_ACEOF
98418dba 9418#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 9419_ACEOF
98418dba
CW
9420
9421 fi
9422
c0d27fcc
MR
9423
9424
9425
9426
98418dba
CW
9427for ac_func in XrmSetDatabase XScreenResourceString \
9428XScreenNumberOfScreen XSetWMProtocols
9429do
9430as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 9431echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
9432echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9433if eval "test \"\${$as_ac_var+set}\" = set"; then
9434 echo $ECHO_N "(cached) $ECHO_C" >&6
9435else
9436 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9437/* confdefs.h. */
9438_ACEOF
9439cat confdefs.h >>conftest.$ac_ext
9440cat >>conftest.$ac_ext <<_ACEOF
9441/* end confdefs.h. */
35996d22
AS
9442/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9443 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9444#define $ac_func innocuous_$ac_func
9445
98418dba 9446/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9447 which can conflict with char $ac_func (); below.
9448 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9449 <limits.h> exists even on freestanding compilers. */
35996d22 9450
19650fd6
AS
9451#ifdef __STDC__
9452# include <limits.h>
9453#else
9454# include <assert.h>
9455#endif
35996d22
AS
9456
9457#undef $ac_func
9458
98418dba
CW
9459/* Override any gcc2 internal prototype to avoid an error. */
9460#ifdef __cplusplus
9461extern "C"
19650fd6 9462{
98418dba
CW
9463#endif
9464/* We use char because int might match the return type of a gcc2
9465 builtin and then its argument prototype would still apply. */
9466char $ac_func ();
98418dba
CW
9467/* The GNU C library defines this for functions which it implements
9468 to always fail with ENOSYS. Some functions are actually named
9469 something starting with __ and the normal name is an alias. */
9470#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9471choke me
9472#else
19650fd6
AS
9473char (*f) () = $ac_func;
9474#endif
9475#ifdef __cplusplus
9476}
98418dba
CW
9477#endif
9478
19650fd6
AS
9479int
9480main ()
9481{
9482return f != $ac_func;
98418dba
CW
9483 ;
9484 return 0;
9485}
9486_ACEOF
9487rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9488if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9489 (eval $ac_link) 2>conftest.er1
98418dba 9490 ac_status=$?
35996d22
AS
9491 grep -v '^ *+' conftest.er1 >conftest.err
9492 rm -f conftest.er1
9493 cat conftest.err >&5
c0d27fcc 9494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9495 (exit $ac_status); } &&
551ffc27
ST
9496 { ac_try='test -z "$ac_c_werror_flag"
9497 || test ! -s conftest.err'
35996d22
AS
9498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9499 (eval $ac_try) 2>&5
9500 ac_status=$?
9501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9502 (exit $ac_status); }; } &&
9503 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9505 (eval $ac_try) 2>&5
9506 ac_status=$?
c0d27fcc 9507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9508 (exit $ac_status); }; }; then
9509 eval "$as_ac_var=yes"
9510else
9511 echo "$as_me: failed program was:" >&5
19650fd6
AS
9512sed 's/^/| /' conftest.$ac_ext >&5
9513
98418dba
CW
9514eval "$as_ac_var=no"
9515fi
35996d22
AS
9516rm -f conftest.err conftest.$ac_objext \
9517 conftest$ac_exeext conftest.$ac_ext
98418dba 9518fi
c0d27fcc 9519echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
9520echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9521if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9522 cat >>confdefs.h <<_ACEOF
98418dba 9523#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9524_ACEOF
98418dba
CW
9525
9526fi
9527done
9528
9529fi
9530
9531if test "${window_system}" = "x11"; then
c0d27fcc 9532 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
9533echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
9534 if test "${emacs_cv_x11_version_6+set}" = set; then
9535 echo $ECHO_N "(cached) $ECHO_C" >&6
9536else
9537 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9538/* confdefs.h. */
9539_ACEOF
9540cat confdefs.h >>conftest.$ac_ext
9541cat >>conftest.$ac_ext <<_ACEOF
9542/* end confdefs.h. */
98418dba 9543#include <X11/Xlib.h>
98418dba
CW
9544int
9545main ()
9546{
9547#if XlibSpecificationRelease < 6
9548fail;
9549#endif
9550
9551 ;
9552 return 0;
9553}
9554_ACEOF
9555rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9557 (eval $ac_link) 2>conftest.er1
98418dba 9558 ac_status=$?
35996d22
AS
9559 grep -v '^ *+' conftest.er1 >conftest.err
9560 rm -f conftest.er1
9561 cat conftest.err >&5
c0d27fcc 9562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9563 (exit $ac_status); } &&
551ffc27
ST
9564 { ac_try='test -z "$ac_c_werror_flag"
9565 || test ! -s conftest.err'
35996d22
AS
9566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9567 (eval $ac_try) 2>&5
9568 ac_status=$?
9569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9570 (exit $ac_status); }; } &&
9571 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9573 (eval $ac_try) 2>&5
9574 ac_status=$?
c0d27fcc 9575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9576 (exit $ac_status); }; }; then
9577 emacs_cv_x11_version_6=yes
9578else
9579 echo "$as_me: failed program was:" >&5
19650fd6
AS
9580sed 's/^/| /' conftest.$ac_ext >&5
9581
98418dba
CW
9582emacs_cv_x11_version_6=no
9583fi
35996d22
AS
9584rm -f conftest.err conftest.$ac_objext \
9585 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9586fi
9587
9588 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 9589 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 9590echo "${ECHO_T}6 or newer" >&6
b936fae4 9591
c0d27fcc 9592cat >>confdefs.h <<\_ACEOF
98418dba 9593#define HAVE_X11R6 1
c0d27fcc 9594_ACEOF
98418dba
CW
9595
9596 else
c0d27fcc 9597 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
9598echo "${ECHO_T}before 6" >&6
9599 fi
9600fi
9601
9602if test "${window_system}" = "x11"; then
c0d27fcc 9603 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
9604echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
9605 if test "${emacs_cv_x11_version_5+set}" = set; then
9606 echo $ECHO_N "(cached) $ECHO_C" >&6
9607else
9608 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9609/* confdefs.h. */
9610_ACEOF
9611cat confdefs.h >>conftest.$ac_ext
9612cat >>conftest.$ac_ext <<_ACEOF
9613/* end confdefs.h. */
98418dba 9614#include <X11/Xlib.h>
98418dba
CW
9615int
9616main ()
9617{
9618#if XlibSpecificationRelease < 5
9619fail;
9620#endif
9621
9622 ;
9623 return 0;
9624}
9625_ACEOF
9626rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9627if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9628 (eval $ac_link) 2>conftest.er1
98418dba 9629 ac_status=$?
35996d22
AS
9630 grep -v '^ *+' conftest.er1 >conftest.err
9631 rm -f conftest.er1
9632 cat conftest.err >&5
c0d27fcc 9633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9634 (exit $ac_status); } &&
551ffc27
ST
9635 { ac_try='test -z "$ac_c_werror_flag"
9636 || test ! -s conftest.err'
35996d22
AS
9637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9638 (eval $ac_try) 2>&5
9639 ac_status=$?
9640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9641 (exit $ac_status); }; } &&
9642 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9644 (eval $ac_try) 2>&5
9645 ac_status=$?
c0d27fcc 9646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9647 (exit $ac_status); }; }; then
9648 emacs_cv_x11_version_5=yes
9649else
9650 echo "$as_me: failed program was:" >&5
19650fd6
AS
9651sed 's/^/| /' conftest.$ac_ext >&5
9652
98418dba
CW
9653emacs_cv_x11_version_5=no
9654fi
35996d22
AS
9655rm -f conftest.err conftest.$ac_objext \
9656 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9657fi
9658
9659 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 9660 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
9661echo "${ECHO_T}5 or newer" >&6
9662 HAVE_X11R5=yes
b936fae4 9663
c0d27fcc 9664cat >>confdefs.h <<\_ACEOF
98418dba 9665#define HAVE_X11R5 1
c0d27fcc 9666_ACEOF
98418dba
CW
9667
9668 else
9669 HAVE_X11R5=no
c0d27fcc 9670 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
9671echo "${ECHO_T}before 5" >&6
9672 fi
9673fi
9674
488dd4c4
JD
9675
9676
9677HAVE_GTK=no
9678if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 9679 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
9680 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
9681echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
9682 { (exit 1); exit 1; }; };
9683 fi
9684 GLIB_REQUIRED=2.0.1
e512ece1 9685 GTK_REQUIRED=2.0.1
488dd4c4
JD
9686 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
9687
9688 if test "X${with_pkg_config_prog}" != X; then
9689 PKG_CONFIG="${with_pkg_config_prog}"
9690 fi
9691
9692 succeeded=no
9693
9694 if test -z "$PKG_CONFIG"; then
9695 # Extract the first word of "pkg-config", so it can be a program name with args.
9696set dummy pkg-config; ac_word=$2
9697echo "$as_me:$LINENO: checking for $ac_word" >&5
9698echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9699if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9700 echo $ECHO_N "(cached) $ECHO_C" >&6
9701else
9702 case $PKG_CONFIG in
9703 [\\/]* | ?:[\\/]*)
9704 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9705 ;;
9706 *)
9707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9708for as_dir in $PATH
9709do
9710 IFS=$as_save_IFS
9711 test -z "$as_dir" && as_dir=.
9712 for ac_exec_ext in '' $ac_executable_extensions; do
9713 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9714 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9715 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9716 break 2
9717 fi
9718done
9719done
9720
9721 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9722 ;;
9723esac
9724fi
9725PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9726
9727if test -n "$PKG_CONFIG"; then
9728 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
9729echo "${ECHO_T}$PKG_CONFIG" >&6
9730else
9731 echo "$as_me:$LINENO: result: no" >&5
9732echo "${ECHO_T}no" >&6
9733fi
9734
9735 fi
9736
9737 if test "$PKG_CONFIG" = "no" ; then
9738 echo "*** The pkg-config script could not be found. Make sure it is"
9739 echo "*** in your path, or give the full path to pkg-config with"
9740 echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog."
9741 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
9742 else
9743 PKG_CONFIG_MIN_VERSION=0.9.0
9744 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9745 echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
9746echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6
9747
9748 if $PKG_CONFIG --exists "$GTK_MODULES" ; then
9749 echo "$as_me:$LINENO: result: yes" >&5
9750echo "${ECHO_T}yes" >&6
9751 succeeded=yes
9752
9753 echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
9754echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
9755 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
9756 echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
9757echo "${ECHO_T}$GTK_CFLAGS" >&6
9758
9759 echo "$as_me:$LINENO: checking GTK_LIBS" >&5
9760echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
9761 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
9762 echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
9763echo "${ECHO_T}$GTK_LIBS" >&6
9764 else
9765 GTK_CFLAGS=""
9766 GTK_LIBS=""
9767 ## If we have a custom action on failure, don't print errors, but
9768 ## do set a variable so people can do so.
9769 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
9770 echo $GTK_PKG_ERRORS
9771 fi
9772
9773
9774
9775 else
9776 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9777 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9778 fi
9779 fi
9780
9781 if test $succeeded = yes; then
9782 :
9783 else
9784 { { 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
9785echo "$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;}
9786 { (exit 1); exit 1; }; }
9787 fi
9788
9789
9790
9791 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
9792 CFLAGS="$CFLAGS $GTK_CFLAGS"
9793 LIBS="$GTK_LIBS $LIBS"
488dd4c4
JD
9794 HAVE_GTK=yes
9795
9796cat >>confdefs.h <<\_ACEOF
9797#define HAVE_GTK 1
9798_ACEOF
9799
9800 USE_X_TOOLKIT=none
9801
d0a80c21
JD
9802 if test "$with_toolkit_scroll_bars" != no; then
9803 with_toolkit_scroll_bars=yes
9804 fi
57669b57
JD
9805
9806 HAVE_GTK_MULTIDISPLAY=no
9807
9808for ac_func in gdk_display_open
9809do
9810as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9811echo "$as_me:$LINENO: checking for $ac_func" >&5
9812echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9813if eval "test \"\${$as_ac_var+set}\" = set"; then
9814 echo $ECHO_N "(cached) $ECHO_C" >&6
9815else
9816 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
9817/* confdefs.h. */
9818_ACEOF
9819cat confdefs.h >>conftest.$ac_ext
9820cat >>conftest.$ac_ext <<_ACEOF
9821/* end confdefs.h. */
35996d22
AS
9822/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9823 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9824#define $ac_func innocuous_$ac_func
9825
57669b57
JD
9826/* System header to define __stub macros and hopefully few prototypes,
9827 which can conflict with char $ac_func (); below.
9828 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9829 <limits.h> exists even on freestanding compilers. */
35996d22 9830
57669b57
JD
9831#ifdef __STDC__
9832# include <limits.h>
9833#else
9834# include <assert.h>
9835#endif
35996d22
AS
9836
9837#undef $ac_func
9838
57669b57
JD
9839/* Override any gcc2 internal prototype to avoid an error. */
9840#ifdef __cplusplus
9841extern "C"
9842{
9843#endif
9844/* We use char because int might match the return type of a gcc2
9845 builtin and then its argument prototype would still apply. */
9846char $ac_func ();
9847/* The GNU C library defines this for functions which it implements
9848 to always fail with ENOSYS. Some functions are actually named
9849 something starting with __ and the normal name is an alias. */
9850#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9851choke me
9852#else
9853char (*f) () = $ac_func;
9854#endif
9855#ifdef __cplusplus
9856}
9857#endif
9858
9859int
9860main ()
9861{
9862return f != $ac_func;
9863 ;
9864 return 0;
9865}
9866_ACEOF
9867rm -f conftest.$ac_objext conftest$ac_exeext
9868if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9869 (eval $ac_link) 2>conftest.er1
57669b57 9870 ac_status=$?
35996d22
AS
9871 grep -v '^ *+' conftest.er1 >conftest.err
9872 rm -f conftest.er1
9873 cat conftest.err >&5
57669b57
JD
9874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9875 (exit $ac_status); } &&
551ffc27
ST
9876 { ac_try='test -z "$ac_c_werror_flag"
9877 || test ! -s conftest.err'
35996d22
AS
9878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9879 (eval $ac_try) 2>&5
9880 ac_status=$?
9881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9882 (exit $ac_status); }; } &&
9883 { ac_try='test -s conftest$ac_exeext'
57669b57
JD
9884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9885 (eval $ac_try) 2>&5
9886 ac_status=$?
9887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9888 (exit $ac_status); }; }; then
9889 eval "$as_ac_var=yes"
9890else
9891 echo "$as_me: failed program was:" >&5
9892sed 's/^/| /' conftest.$ac_ext >&5
9893
9894eval "$as_ac_var=no"
9895fi
35996d22
AS
9896rm -f conftest.err conftest.$ac_objext \
9897 conftest$ac_exeext conftest.$ac_ext
57669b57
JD
9898fi
9899echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9900echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9901if test `eval echo '${'$as_ac_var'}'` = yes; then
9902 cat >>confdefs.h <<_ACEOF
9903#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9904_ACEOF
9905 HAVE_GTK_MULTIDISPLAY=yes
9906fi
9907done
9908
9909 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
9910
9911cat >>confdefs.h <<\_ACEOF
9912#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
9913_ACEOF
9914
9915 fi
9916 HAVE_GTK_FILE_SELECTION=no
9917
9918for ac_func in gtk_file_selection_new
9919do
9920as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9921echo "$as_me:$LINENO: checking for $ac_func" >&5
9922echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9923if eval "test \"\${$as_ac_var+set}\" = set"; then
9924 echo $ECHO_N "(cached) $ECHO_C" >&6
9925else
9926 cat >conftest.$ac_ext <<_ACEOF
9927/* confdefs.h. */
9928_ACEOF
9929cat confdefs.h >>conftest.$ac_ext
9930cat >>conftest.$ac_ext <<_ACEOF
9931/* end confdefs.h. */
9932/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9933 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9934#define $ac_func innocuous_$ac_func
9935
9936/* System header to define __stub macros and hopefully few prototypes,
9937 which can conflict with char $ac_func (); below.
9938 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9939 <limits.h> exists even on freestanding compilers. */
9940
9941#ifdef __STDC__
9942# include <limits.h>
9943#else
9944# include <assert.h>
9945#endif
9946
9947#undef $ac_func
9948
9949/* Override any gcc2 internal prototype to avoid an error. */
9950#ifdef __cplusplus
9951extern "C"
9952{
9953#endif
9954/* We use char because int might match the return type of a gcc2
9955 builtin and then its argument prototype would still apply. */
9956char $ac_func ();
9957/* The GNU C library defines this for functions which it implements
9958 to always fail with ENOSYS. Some functions are actually named
9959 something starting with __ and the normal name is an alias. */
9960#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9961choke me
9962#else
9963char (*f) () = $ac_func;
9964#endif
9965#ifdef __cplusplus
9966}
9967#endif
9968
9969int
9970main ()
9971{
9972return f != $ac_func;
9973 ;
9974 return 0;
9975}
9976_ACEOF
9977rm -f conftest.$ac_objext conftest$ac_exeext
9978if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9979 (eval $ac_link) 2>conftest.er1
9980 ac_status=$?
9981 grep -v '^ *+' conftest.er1 >conftest.err
9982 rm -f conftest.er1
9983 cat conftest.err >&5
9984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9985 (exit $ac_status); } &&
9986 { ac_try='test -z "$ac_c_werror_flag"
9987 || test ! -s conftest.err'
9988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9989 (eval $ac_try) 2>&5
9990 ac_status=$?
9991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9992 (exit $ac_status); }; } &&
9993 { ac_try='test -s conftest$ac_exeext'
9994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9995 (eval $ac_try) 2>&5
9996 ac_status=$?
9997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9998 (exit $ac_status); }; }; then
9999 eval "$as_ac_var=yes"
10000else
10001 echo "$as_me: failed program was:" >&5
10002sed 's/^/| /' conftest.$ac_ext >&5
10003
10004eval "$as_ac_var=no"
10005fi
10006rm -f conftest.err conftest.$ac_objext \
10007 conftest$ac_exeext conftest.$ac_ext
10008fi
10009echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10010echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10011if test `eval echo '${'$as_ac_var'}'` = yes; then
10012 cat >>confdefs.h <<_ACEOF
10013#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10014_ACEOF
10015 HAVE_GTK_FILE_SELECTION=yes
10016fi
10017done
10018
10019
10020 HAVE_GTK_FILE_CHOOSER=no
10021
10022for ac_func in gtk_file_chooser_dialog_new
10023do
10024as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10025echo "$as_me:$LINENO: checking for $ac_func" >&5
10026echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10027if eval "test \"\${$as_ac_var+set}\" = set"; then
10028 echo $ECHO_N "(cached) $ECHO_C" >&6
10029else
10030 cat >conftest.$ac_ext <<_ACEOF
10031/* confdefs.h. */
10032_ACEOF
10033cat confdefs.h >>conftest.$ac_ext
10034cat >>conftest.$ac_ext <<_ACEOF
10035/* end confdefs.h. */
10036/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10037 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10038#define $ac_func innocuous_$ac_func
10039
10040/* System header to define __stub macros and hopefully few prototypes,
10041 which can conflict with char $ac_func (); below.
10042 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10043 <limits.h> exists even on freestanding compilers. */
10044
10045#ifdef __STDC__
10046# include <limits.h>
10047#else
10048# include <assert.h>
10049#endif
10050
10051#undef $ac_func
10052
10053/* Override any gcc2 internal prototype to avoid an error. */
10054#ifdef __cplusplus
10055extern "C"
10056{
10057#endif
10058/* We use char because int might match the return type of a gcc2
10059 builtin and then its argument prototype would still apply. */
10060char $ac_func ();
10061/* The GNU C library defines this for functions which it implements
10062 to always fail with ENOSYS. Some functions are actually named
10063 something starting with __ and the normal name is an alias. */
10064#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10065choke me
10066#else
10067char (*f) () = $ac_func;
10068#endif
10069#ifdef __cplusplus
10070}
10071#endif
10072
10073int
10074main ()
10075{
10076return f != $ac_func;
10077 ;
10078 return 0;
10079}
10080_ACEOF
10081rm -f conftest.$ac_objext conftest$ac_exeext
10082if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10083 (eval $ac_link) 2>conftest.er1
10084 ac_status=$?
10085 grep -v '^ *+' conftest.er1 >conftest.err
10086 rm -f conftest.er1
10087 cat conftest.err >&5
10088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10089 (exit $ac_status); } &&
10090 { ac_try='test -z "$ac_c_werror_flag"
10091 || test ! -s conftest.err'
10092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10093 (eval $ac_try) 2>&5
10094 ac_status=$?
10095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10096 (exit $ac_status); }; } &&
10097 { ac_try='test -s conftest$ac_exeext'
10098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10099 (eval $ac_try) 2>&5
10100 ac_status=$?
10101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10102 (exit $ac_status); }; }; then
10103 eval "$as_ac_var=yes"
10104else
10105 echo "$as_me: failed program was:" >&5
10106sed 's/^/| /' conftest.$ac_ext >&5
10107
10108eval "$as_ac_var=no"
10109fi
10110rm -f conftest.err conftest.$ac_objext \
10111 conftest$ac_exeext conftest.$ac_ext
10112fi
10113echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10114echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10115if test `eval echo '${'$as_ac_var'}'` = yes; then
10116 cat >>confdefs.h <<_ACEOF
10117#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10118_ACEOF
10119 HAVE_GTK_FILE_CHOOSER=yes
10120fi
10121done
10122
10123
10124 if test "$HAVE_GTK_FILE_SELECTION" = yes \
10125 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10126
10127cat >>confdefs.h <<\_ACEOF
10128#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
10129_ACEOF
10130
b8bdffbe
JD
10131 fi
10132
10133 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10134 HAVE_GTK_AND_PTHREAD=no
10135
10136for ac_header in pthread.h
10137do
10138as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10139if eval "test \"\${$as_ac_Header+set}\" = set"; then
10140 echo "$as_me:$LINENO: checking for $ac_header" >&5
10141echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10142if eval "test \"\${$as_ac_Header+set}\" = set"; then
10143 echo $ECHO_N "(cached) $ECHO_C" >&6
10144fi
10145echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10146echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10147else
10148 # Is the header compilable?
10149echo "$as_me:$LINENO: checking $ac_header usability" >&5
10150echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10151cat >conftest.$ac_ext <<_ACEOF
10152/* confdefs.h. */
10153_ACEOF
10154cat confdefs.h >>conftest.$ac_ext
10155cat >>conftest.$ac_ext <<_ACEOF
10156/* end confdefs.h. */
10157$ac_includes_default
10158#include <$ac_header>
10159_ACEOF
10160rm -f conftest.$ac_objext
10161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10162 (eval $ac_compile) 2>conftest.er1
10163 ac_status=$?
10164 grep -v '^ *+' conftest.er1 >conftest.err
10165 rm -f conftest.er1
10166 cat conftest.err >&5
10167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10168 (exit $ac_status); } &&
10169 { ac_try='test -z "$ac_c_werror_flag"
10170 || test ! -s conftest.err'
10171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10172 (eval $ac_try) 2>&5
10173 ac_status=$?
10174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10175 (exit $ac_status); }; } &&
10176 { ac_try='test -s conftest.$ac_objext'
10177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10178 (eval $ac_try) 2>&5
10179 ac_status=$?
10180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10181 (exit $ac_status); }; }; then
10182 ac_header_compiler=yes
10183else
10184 echo "$as_me: failed program was:" >&5
10185sed 's/^/| /' conftest.$ac_ext >&5
10186
10187ac_header_compiler=no
10188fi
10189rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10190echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10191echo "${ECHO_T}$ac_header_compiler" >&6
10192
10193# Is the header present?
10194echo "$as_me:$LINENO: checking $ac_header presence" >&5
10195echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10196cat >conftest.$ac_ext <<_ACEOF
10197/* confdefs.h. */
10198_ACEOF
10199cat confdefs.h >>conftest.$ac_ext
10200cat >>conftest.$ac_ext <<_ACEOF
10201/* end confdefs.h. */
10202#include <$ac_header>
10203_ACEOF
10204if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10205 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10206 ac_status=$?
10207 grep -v '^ *+' conftest.er1 >conftest.err
10208 rm -f conftest.er1
10209 cat conftest.err >&5
10210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10211 (exit $ac_status); } >/dev/null; then
10212 if test -s conftest.err; then
10213 ac_cpp_err=$ac_c_preproc_warn_flag
10214 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10215 else
10216 ac_cpp_err=
10217 fi
10218else
10219 ac_cpp_err=yes
10220fi
10221if test -z "$ac_cpp_err"; then
10222 ac_header_preproc=yes
10223else
10224 echo "$as_me: failed program was:" >&5
10225sed 's/^/| /' conftest.$ac_ext >&5
10226
10227 ac_header_preproc=no
10228fi
10229rm -f conftest.err conftest.$ac_ext
10230echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10231echo "${ECHO_T}$ac_header_preproc" >&6
10232
10233# So? What about this header?
10234case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10235 yes:no: )
10236 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10237echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10238 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10239echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10240 ac_header_preproc=yes
10241 ;;
10242 no:yes:* )
10243 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10244echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10245 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10246echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10247 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10248echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10249 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10250echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
10251 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10252echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10253 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10254echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10255 (
10256 cat <<\_ASBOX
10257## ------------------------------------------ ##
10258## Report this to the AC_PACKAGE_NAME lists. ##
10259## ------------------------------------------ ##
10260_ASBOX
10261 ) |
10262 sed "s/^/$as_me: WARNING: /" >&2
10263 ;;
10264esac
10265echo "$as_me:$LINENO: checking for $ac_header" >&5
10266echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10267if eval "test \"\${$as_ac_Header+set}\" = set"; then
10268 echo $ECHO_N "(cached) $ECHO_C" >&6
10269else
10270 eval "$as_ac_Header=\$ac_header_preproc"
10271fi
10272echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10273echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10274
10275fi
10276if test `eval echo '${'$as_ac_Header'}'` = yes; then
10277 cat >>confdefs.h <<_ACEOF
10278#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10279_ACEOF
10280
10281fi
10282
10283done
10284
10285 if test "$ac_cv_header_pthread_h"; then
10286 echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
10287echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6
10288if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
10289 echo $ECHO_N "(cached) $ECHO_C" >&6
10290else
10291 ac_check_lib_save_LIBS=$LIBS
10292LIBS="-lpthread $LIBS"
10293cat >conftest.$ac_ext <<_ACEOF
10294/* confdefs.h. */
10295_ACEOF
10296cat confdefs.h >>conftest.$ac_ext
10297cat >>conftest.$ac_ext <<_ACEOF
10298/* end confdefs.h. */
10299
10300/* Override any gcc2 internal prototype to avoid an error. */
10301#ifdef __cplusplus
10302extern "C"
10303#endif
10304/* We use char because int might match the return type of a gcc2
10305 builtin and then its argument prototype would still apply. */
10306char pthread_self ();
10307int
10308main ()
10309{
10310pthread_self ();
10311 ;
10312 return 0;
10313}
10314_ACEOF
10315rm -f conftest.$ac_objext conftest$ac_exeext
10316if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10317 (eval $ac_link) 2>conftest.er1
10318 ac_status=$?
10319 grep -v '^ *+' conftest.er1 >conftest.err
10320 rm -f conftest.er1
10321 cat conftest.err >&5
10322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10323 (exit $ac_status); } &&
10324 { ac_try='test -z "$ac_c_werror_flag"
10325 || test ! -s conftest.err'
10326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10327 (eval $ac_try) 2>&5
10328 ac_status=$?
10329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10330 (exit $ac_status); }; } &&
10331 { ac_try='test -s conftest$ac_exeext'
10332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10333 (eval $ac_try) 2>&5
10334 ac_status=$?
10335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10336 (exit $ac_status); }; }; then
10337 ac_cv_lib_pthread_pthread_self=yes
10338else
10339 echo "$as_me: failed program was:" >&5
10340sed 's/^/| /' conftest.$ac_ext >&5
10341
10342ac_cv_lib_pthread_pthread_self=no
10343fi
10344rm -f conftest.err conftest.$ac_objext \
10345 conftest$ac_exeext conftest.$ac_ext
10346LIBS=$ac_check_lib_save_LIBS
10347fi
10348echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
10349echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6
10350if test $ac_cv_lib_pthread_pthread_self = yes; then
10351 HAVE_GTK_AND_PTHREAD=yes
10352fi
10353
10354 fi
10355 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
10356 GTK_LIBS="$GTK_LIBS -lpthread"
10357
10358cat >>confdefs.h <<\_ACEOF
10359#define HAVE_GTK_AND_PTHREAD 1
10360_ACEOF
10361
10362 fi
57669b57 10363 fi
488dd4c4
JD
10364fi
10365
98418dba
CW
10366if test x"${USE_X_TOOLKIT}" = xmaybe; then
10367 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 10368 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
10369echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
10370 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
10371 echo $ECHO_N "(cached) $ECHO_C" >&6
10372else
10373 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10374/* confdefs.h. */
10375_ACEOF
10376cat confdefs.h >>conftest.$ac_ext
10377cat >>conftest.$ac_ext <<_ACEOF
10378/* end confdefs.h. */
98418dba
CW
10379
10380#include <X11/Intrinsic.h>
10381#include <X11/Xaw/Simple.h>
98418dba
CW
10382int
10383main ()
10384{
10385
10386 ;
10387 return 0;
10388}
10389_ACEOF
10390rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10391if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10392 (eval $ac_link) 2>conftest.er1
98418dba 10393 ac_status=$?
35996d22
AS
10394 grep -v '^ *+' conftest.er1 >conftest.err
10395 rm -f conftest.er1
10396 cat conftest.err >&5
c0d27fcc 10397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10398 (exit $ac_status); } &&
551ffc27
ST
10399 { ac_try='test -z "$ac_c_werror_flag"
10400 || test ! -s conftest.err'
35996d22
AS
10401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10402 (eval $ac_try) 2>&5
10403 ac_status=$?
10404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10405 (exit $ac_status); }; } &&
10406 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10408 (eval $ac_try) 2>&5
10409 ac_status=$?
c0d27fcc 10410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10411 (exit $ac_status); }; }; then
10412 emacs_cv_x11_version_5_with_xaw=yes
10413else
10414 echo "$as_me: failed program was:" >&5
19650fd6
AS
10415sed 's/^/| /' conftest.$ac_ext >&5
10416
98418dba
CW
10417emacs_cv_x11_version_5_with_xaw=no
10418fi
35996d22
AS
10419rm -f conftest.err conftest.$ac_objext \
10420 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10421fi
10422
10423 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 10424 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
10425echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
10426 USE_X_TOOLKIT=LUCID
10427 else
c0d27fcc 10428 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
10429echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
10430 USE_X_TOOLKIT=none
10431 fi
10432 else
10433 USE_X_TOOLKIT=none
10434 fi
10435fi
10436
10437X_TOOLKIT_TYPE=$USE_X_TOOLKIT
10438
10439if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 10440 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
10441echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
10442 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
10443 echo $ECHO_N "(cached) $ECHO_C" >&6
10444else
10445 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10446/* confdefs.h. */
10447_ACEOF
10448cat confdefs.h >>conftest.$ac_ext
10449cat >>conftest.$ac_ext <<_ACEOF
10450/* end confdefs.h. */
98418dba 10451#include <X11/Intrinsic.h>
98418dba
CW
10452int
10453main ()
10454{
10455#if XtSpecificationRelease < 6
10456fail;
10457#endif
10458
10459 ;
10460 return 0;
10461}
10462_ACEOF
10463rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10464if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10465 (eval $ac_link) 2>conftest.er1
98418dba 10466 ac_status=$?
35996d22
AS
10467 grep -v '^ *+' conftest.er1 >conftest.err
10468 rm -f conftest.er1
10469 cat conftest.err >&5
c0d27fcc 10470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10471 (exit $ac_status); } &&
551ffc27
ST
10472 { ac_try='test -z "$ac_c_werror_flag"
10473 || test ! -s conftest.err'
35996d22
AS
10474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10475 (eval $ac_try) 2>&5
10476 ac_status=$?
10477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10478 (exit $ac_status); }; } &&
10479 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10481 (eval $ac_try) 2>&5
10482 ac_status=$?
c0d27fcc 10483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10484 (exit $ac_status); }; }; then
10485 emacs_cv_x11_toolkit_version_6=yes
10486else
10487 echo "$as_me: failed program was:" >&5
19650fd6
AS
10488sed 's/^/| /' conftest.$ac_ext >&5
10489
98418dba
CW
10490emacs_cv_x11_toolkit_version_6=no
10491fi
35996d22
AS
10492rm -f conftest.err conftest.$ac_objext \
10493 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10494fi
10495
10496 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
10497 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 10498 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 10499echo "${ECHO_T}6 or newer" >&6
b936fae4 10500
c0d27fcc 10501cat >>confdefs.h <<\_ACEOF
98418dba 10502#define HAVE_X11XTR6 1
c0d27fcc 10503_ACEOF
98418dba
CW
10504
10505 else
c0d27fcc 10506 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
10507echo "${ECHO_T}before 6" >&6
10508 fi
10509
10510 OLDLIBS="$LIBS"
10511 if test x$HAVE_X11XTR6 = xyes; then
10512 LIBS="-lXt -lSM -lICE $LIBS"
10513 else
10514 LIBS="-lXt $LIBS"
10515 fi
10516
c0d27fcc 10517echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
10518echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
10519if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
10520 echo $ECHO_N "(cached) $ECHO_C" >&6
10521else
10522 ac_check_lib_save_LIBS=$LIBS
10523LIBS="-lXmu $LIBS"
10524cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10525/* confdefs.h. */
10526_ACEOF
10527cat confdefs.h >>conftest.$ac_ext
10528cat >>conftest.$ac_ext <<_ACEOF
10529/* end confdefs.h. */
98418dba
CW
10530
10531/* Override any gcc2 internal prototype to avoid an error. */
10532#ifdef __cplusplus
10533extern "C"
10534#endif
10535/* We use char because int might match the return type of a gcc2
10536 builtin and then its argument prototype would still apply. */
10537char XmuConvertStandardSelection ();
98418dba
CW
10538int
10539main ()
10540{
10541XmuConvertStandardSelection ();
10542 ;
10543 return 0;
10544}
10545_ACEOF
10546rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10547if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10548 (eval $ac_link) 2>conftest.er1
98418dba 10549 ac_status=$?
35996d22
AS
10550 grep -v '^ *+' conftest.er1 >conftest.err
10551 rm -f conftest.er1
10552 cat conftest.err >&5
c0d27fcc 10553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10554 (exit $ac_status); } &&
551ffc27
ST
10555 { ac_try='test -z "$ac_c_werror_flag"
10556 || test ! -s conftest.err'
35996d22
AS
10557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10558 (eval $ac_try) 2>&5
10559 ac_status=$?
10560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10561 (exit $ac_status); }; } &&
10562 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10564 (eval $ac_try) 2>&5
10565 ac_status=$?
c0d27fcc 10566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10567 (exit $ac_status); }; }; then
10568 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
10569else
10570 echo "$as_me: failed program was:" >&5
19650fd6
AS
10571sed 's/^/| /' conftest.$ac_ext >&5
10572
98418dba
CW
10573ac_cv_lib_Xmu_XmuConvertStandardSelection=no
10574fi
35996d22
AS
10575rm -f conftest.err conftest.$ac_objext \
10576 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10577LIBS=$ac_check_lib_save_LIBS
10578fi
c0d27fcc 10579echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
10580echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
10581if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 10582 cat >>confdefs.h <<_ACEOF
98418dba 10583#define HAVE_LIBXMU 1
c0d27fcc 10584_ACEOF
98418dba
CW
10585
10586 LIBS="-lXmu $LIBS"
10587
10588fi
10589
10590 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
10591fi
10592
10593# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
10594if test "${HAVE_X11}" = "yes"; then
10595 if test "${USE_X_TOOLKIT}" != "none"; then
10596
c0d27fcc 10597echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
10598echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
10599if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
10600 echo $ECHO_N "(cached) $ECHO_C" >&6
10601else
10602 ac_check_lib_save_LIBS=$LIBS
10603LIBS="-lXext $LIBS"
10604cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10605/* confdefs.h. */
10606_ACEOF
10607cat confdefs.h >>conftest.$ac_ext
10608cat >>conftest.$ac_ext <<_ACEOF
10609/* end confdefs.h. */
98418dba
CW
10610
10611/* Override any gcc2 internal prototype to avoid an error. */
10612#ifdef __cplusplus
10613extern "C"
10614#endif
10615/* We use char because int might match the return type of a gcc2
10616 builtin and then its argument prototype would still apply. */
10617char XShapeQueryExtension ();
98418dba
CW
10618int
10619main ()
10620{
10621XShapeQueryExtension ();
10622 ;
10623 return 0;
10624}
10625_ACEOF
10626rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10627if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10628 (eval $ac_link) 2>conftest.er1
98418dba 10629 ac_status=$?
35996d22
AS
10630 grep -v '^ *+' conftest.er1 >conftest.err
10631 rm -f conftest.er1
10632 cat conftest.err >&5
c0d27fcc 10633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10634 (exit $ac_status); } &&
551ffc27
ST
10635 { ac_try='test -z "$ac_c_werror_flag"
10636 || test ! -s conftest.err'
35996d22
AS
10637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10638 (eval $ac_try) 2>&5
10639 ac_status=$?
10640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10641 (exit $ac_status); }; } &&
10642 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10644 (eval $ac_try) 2>&5
10645 ac_status=$?
c0d27fcc 10646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10647 (exit $ac_status); }; }; then
10648 ac_cv_lib_Xext_XShapeQueryExtension=yes
10649else
10650 echo "$as_me: failed program was:" >&5
19650fd6
AS
10651sed 's/^/| /' conftest.$ac_ext >&5
10652
98418dba
CW
10653ac_cv_lib_Xext_XShapeQueryExtension=no
10654fi
35996d22
AS
10655rm -f conftest.err conftest.$ac_objext \
10656 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10657LIBS=$ac_check_lib_save_LIBS
10658fi
c0d27fcc 10659echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
10660echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
10661if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 10662 cat >>confdefs.h <<_ACEOF
98418dba 10663#define HAVE_LIBXEXT 1
c0d27fcc 10664_ACEOF
98418dba
CW
10665
10666 LIBS="-lXext $LIBS"
10667
10668fi
10669
10670 fi
10671fi
10672
10673if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 10674 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
8e967cf7
MR
10675echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
10676if test "${emacs_cv_lesstif+set}" = set; then
10677 echo $ECHO_N "(cached) $ECHO_C" >&6
10678else
ae1a998c
RS
10679 # We put this in CFLAGS temporarily to precede other -I options
10680 # that might be in CFLAGS temporarily.
10681 # We put this in CPPFLAGS where it precedes the other -I options.
10682 OLD_CPPFLAGS=$CPPFLAGS
10683 OLD_CFLAGS=$CFLAGS
10684 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
10685 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
8e967cf7 10686 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10687/* confdefs.h. */
10688_ACEOF
10689cat confdefs.h >>conftest.$ac_ext
10690cat >>conftest.$ac_ext <<_ACEOF
10691/* end confdefs.h. */
8e967cf7
MR
10692#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
10693int
10694main ()
10695{
10696int x = 5;
10697 ;
10698 return 0;
10699}
10700_ACEOF
10701rm -f conftest.$ac_objext
c0d27fcc 10702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 10703 (eval $ac_compile) 2>conftest.er1
8e967cf7 10704 ac_status=$?
35996d22
AS
10705 grep -v '^ *+' conftest.er1 >conftest.err
10706 rm -f conftest.er1
10707 cat conftest.err >&5
c0d27fcc 10708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7 10709 (exit $ac_status); } &&
551ffc27
ST
10710 { ac_try='test -z "$ac_c_werror_flag"
10711 || test ! -s conftest.err'
35996d22
AS
10712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10713 (eval $ac_try) 2>&5
10714 ac_status=$?
10715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10716 (exit $ac_status); }; } &&
10717 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 10718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8e967cf7
MR
10719 (eval $ac_try) 2>&5
10720 ac_status=$?
c0d27fcc 10721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7
MR
10722 (exit $ac_status); }; }; then
10723 emacs_cv_lesstif=yes
10724else
10725 echo "$as_me: failed program was:" >&5
19650fd6
AS
10726sed 's/^/| /' conftest.$ac_ext >&5
10727
8e967cf7
MR
10728emacs_cv_lesstif=no
10729fi
35996d22 10730rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8e967cf7 10731fi
c0d27fcc 10732echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
8e967cf7
MR
10733echo "${ECHO_T}$emacs_cv_lesstif" >&6
10734 if test $emacs_cv_lesstif = yes; then
ae1a998c
RS
10735 # Make sure this -I option remains in CPPFLAGS after it is set
10736 # back to REAL_CPPFLAGS.
10737 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
10738 # have those other -I options anyway. Ultimately, having this
10739 # directory ultimately in CPPFLAGS will be enough.
10740 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
8e967cf7 10741 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
ae1a998c
RS
10742 else
10743 CFLAGS=$OLD_CFLAGS
10744 CPPFLAGS=$OLD_CPPFLAGS
8e967cf7 10745 fi
c0d27fcc 10746 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
10747echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
10748if test "${emacs_cv_motif_version_2_1+set}" = set; then
10749 echo $ECHO_N "(cached) $ECHO_C" >&6
10750else
10751 cat >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 10757#include <Xm/Xm.h>
98418dba
CW
10758int
10759main ()
10760{
10761#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
10762int x = 5;
10763#else
10764Motif version prior to 2.1.
10765#endif
10766 ;
10767 return 0;
10768}
10769_ACEOF
10770rm -f conftest.$ac_objext
c0d27fcc 10771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 10772 (eval $ac_compile) 2>conftest.er1
98418dba 10773 ac_status=$?
35996d22
AS
10774 grep -v '^ *+' conftest.er1 >conftest.err
10775 rm -f conftest.er1
10776 cat conftest.err >&5
c0d27fcc 10777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10778 (exit $ac_status); } &&
551ffc27
ST
10779 { ac_try='test -z "$ac_c_werror_flag"
10780 || test ! -s conftest.err'
35996d22
AS
10781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10782 (eval $ac_try) 2>&5
10783 ac_status=$?
10784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10785 (exit $ac_status); }; } &&
10786 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 10787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10788 (eval $ac_try) 2>&5
10789 ac_status=$?
c0d27fcc 10790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10791 (exit $ac_status); }; }; then
10792 emacs_cv_motif_version_2_1=yes
10793else
10794 echo "$as_me: failed program was:" >&5
19650fd6
AS
10795sed 's/^/| /' conftest.$ac_ext >&5
10796
98418dba
CW
10797emacs_cv_motif_version_2_1=no
10798fi
35996d22 10799rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 10800fi
c0d27fcc 10801echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
10802echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
10803 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
10804 if test $emacs_cv_motif_version_2_1 = yes; then
10805 HAVE_LIBXP=no
b936fae4 10806
c0d27fcc 10807cat >>confdefs.h <<\_ACEOF
98418dba 10808#define HAVE_MOTIF_2_1 1
c0d27fcc 10809_ACEOF
98418dba 10810
c0d27fcc 10811 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
10812echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
10813if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
10814 echo $ECHO_N "(cached) $ECHO_C" >&6
10815else
10816 ac_check_lib_save_LIBS=$LIBS
10817LIBS="-lXp $LIBS"
10818cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10819/* confdefs.h. */
10820_ACEOF
10821cat confdefs.h >>conftest.$ac_ext
10822cat >>conftest.$ac_ext <<_ACEOF
10823/* end confdefs.h. */
98418dba
CW
10824
10825/* Override any gcc2 internal prototype to avoid an error. */
10826#ifdef __cplusplus
10827extern "C"
10828#endif
10829/* We use char because int might match the return type of a gcc2
10830 builtin and then its argument prototype would still apply. */
10831char XpCreateContext ();
98418dba
CW
10832int
10833main ()
10834{
10835XpCreateContext ();
10836 ;
10837 return 0;
10838}
10839_ACEOF
10840rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10841if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10842 (eval $ac_link) 2>conftest.er1
98418dba 10843 ac_status=$?
35996d22
AS
10844 grep -v '^ *+' conftest.er1 >conftest.err
10845 rm -f conftest.er1
10846 cat conftest.err >&5
c0d27fcc 10847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10848 (exit $ac_status); } &&
551ffc27
ST
10849 { ac_try='test -z "$ac_c_werror_flag"
10850 || test ! -s conftest.err'
35996d22
AS
10851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10852 (eval $ac_try) 2>&5
10853 ac_status=$?
10854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10855 (exit $ac_status); }; } &&
10856 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10858 (eval $ac_try) 2>&5
10859 ac_status=$?
c0d27fcc 10860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10861 (exit $ac_status); }; }; then
10862 ac_cv_lib_Xp_XpCreateContext=yes
10863else
10864 echo "$as_me: failed program was:" >&5
19650fd6
AS
10865sed 's/^/| /' conftest.$ac_ext >&5
10866
98418dba
CW
10867ac_cv_lib_Xp_XpCreateContext=no
10868fi
35996d22
AS
10869rm -f conftest.err conftest.$ac_objext \
10870 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10871LIBS=$ac_check_lib_save_LIBS
10872fi
c0d27fcc 10873echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
10874echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
10875if test $ac_cv_lib_Xp_XpCreateContext = yes; then
10876 HAVE_LIBXP=yes
10877fi
503d2be0 10878
98418dba 10879 if test ${HAVE_LIBXP} = yes; then
b936fae4 10880
c0d27fcc 10881cat >>confdefs.h <<\_ACEOF
98418dba 10882#define HAVE_LIBXP 1
c0d27fcc 10883_ACEOF
503d2be0 10884
98418dba
CW
10885 fi
10886 fi
10887fi
10888
10889### Is -lXaw3d available?
10890HAVE_XAW3D=no
10891if test "${HAVE_X11}" = "yes"; then
10892 if test "${USE_X_TOOLKIT}" != "none"; then
22044edf 10893 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
10894echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
10895if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
10896 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 10897else
22044edf 10898 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10899/* confdefs.h. */
10900_ACEOF
10901cat confdefs.h >>conftest.$ac_ext
10902cat >>conftest.$ac_ext <<_ACEOF
10903/* end confdefs.h. */
98418dba 10904#include <X11/Xaw3d/Scrollbar.h>
503d2be0 10905_ACEOF
c0d27fcc 10906if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10907 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10908 ac_status=$?
6bae0ccf 10909 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
10910 rm -f conftest.er1
10911 cat conftest.err >&5
c0d27fcc 10912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10913 (exit $ac_status); } >/dev/null; then
10914 if test -s conftest.err; then
10915 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 10916 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
10917 else
10918 ac_cpp_err=
10919 fi
10920else
10921 ac_cpp_err=yes
10922fi
10923if test -z "$ac_cpp_err"; then
22044edf 10924 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 10925else
503d2be0 10926 echo "$as_me: failed program was:" >&5
19650fd6
AS
10927sed 's/^/| /' conftest.$ac_ext >&5
10928
22044edf 10929 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 10930fi
503d2be0 10931rm -f conftest.err conftest.$ac_ext
98418dba 10932fi
c0d27fcc 10933echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 10934echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 10935if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 10936 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
10937echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
10938if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
10939 echo $ECHO_N "(cached) $ECHO_C" >&6
10940else
10941 ac_check_lib_save_LIBS=$LIBS
10942LIBS="-lXaw3d $LIBS"
10943cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10944/* confdefs.h. */
10945_ACEOF
10946cat confdefs.h >>conftest.$ac_ext
10947cat >>conftest.$ac_ext <<_ACEOF
10948/* end confdefs.h. */
98418dba
CW
10949
10950/* Override any gcc2 internal prototype to avoid an error. */
10951#ifdef __cplusplus
10952extern "C"
10953#endif
10954/* We use char because int might match the return type of a gcc2
10955 builtin and then its argument prototype would still apply. */
10956char XawScrollbarSetThumb ();
503d2be0
AS
10957int
10958main ()
10959{
98418dba 10960XawScrollbarSetThumb ();
503d2be0
AS
10961 ;
10962 return 0;
10963}
10964_ACEOF
10965rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10966if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10967 (eval $ac_link) 2>conftest.er1
503d2be0 10968 ac_status=$?
35996d22
AS
10969 grep -v '^ *+' conftest.er1 >conftest.err
10970 rm -f conftest.er1
10971 cat conftest.err >&5
c0d27fcc 10972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10973 (exit $ac_status); } &&
551ffc27
ST
10974 { ac_try='test -z "$ac_c_werror_flag"
10975 || test ! -s conftest.err'
35996d22
AS
10976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10977 (eval $ac_try) 2>&5
10978 ac_status=$?
10979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10980 (exit $ac_status); }; } &&
10981 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10983 (eval $ac_try) 2>&5
10984 ac_status=$?
c0d27fcc 10985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10986 (exit $ac_status); }; }; then
98418dba 10987 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 10988else
503d2be0 10989 echo "$as_me: failed program was:" >&5
19650fd6
AS
10990sed 's/^/| /' conftest.$ac_ext >&5
10991
98418dba 10992ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 10993fi
35996d22
AS
10994rm -f conftest.err conftest.$ac_objext \
10995 conftest$ac_exeext conftest.$ac_ext
98418dba 10996LIBS=$ac_check_lib_save_LIBS
ba4481b5 10997fi
c0d27fcc 10998echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
10999echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
11000if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
11001 HAVE_XAW3D=yes
ba4481b5 11002fi
503d2be0 11003
ba4481b5
DL
11004fi
11005
c0d27fcc 11006
98418dba 11007 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 11008
c0d27fcc 11009cat >>confdefs.h <<\_ACEOF
98418dba 11010#define HAVE_XAW3D 1
c0d27fcc 11011_ACEOF
98418dba 11012
ba4481b5 11013 fi
98418dba 11014 fi
ba4481b5
DL
11015fi
11016
c0d27fcc
MR
11017
11018
98418dba
CW
11019USE_TOOLKIT_SCROLL_BARS=no
11020if test "${with_toolkit_scroll_bars}" != "no"; then
11021 if test "${USE_X_TOOLKIT}" != "none"; then
11022 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 11023 cat >>confdefs.h <<\_ACEOF
98418dba 11024#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11025_ACEOF
98418dba
CW
11026
11027 HAVE_XAW3D=no
11028 USE_TOOLKIT_SCROLL_BARS=yes
11029 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 11030 cat >>confdefs.h <<\_ACEOF
98418dba 11031#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11032_ACEOF
98418dba
CW
11033
11034 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 11035 fi
488dd4c4
JD
11036 elif test "${HAVE_GTK}" = "yes"; then
11037 cat >>confdefs.h <<\_ACEOF
11038#define USE_TOOLKIT_SCROLL_BARS 1
11039_ACEOF
11040
11041 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
11042 fi
11043fi
11044
abd39b57 11045cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
11046/* confdefs.h. */
11047_ACEOF
11048cat confdefs.h >>conftest.$ac_ext
11049cat >>conftest.$ac_ext <<_ACEOF
11050/* end confdefs.h. */
11051
11052 #include <X11/Xlib.h>
11053 #include <X11/Xresource.h>
11054int
11055main ()
11056{
11057XIMProc callback;
11058 ;
11059 return 0;
11060}
11061_ACEOF
11062rm -f conftest.$ac_objext
11063if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11064 (eval $ac_compile) 2>conftest.er1
abd39b57 11065 ac_status=$?
35996d22
AS
11066 grep -v '^ *+' conftest.er1 >conftest.err
11067 rm -f conftest.er1
11068 cat conftest.err >&5
abd39b57
AC
11069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11070 (exit $ac_status); } &&
551ffc27
ST
11071 { ac_try='test -z "$ac_c_werror_flag"
11072 || test ! -s conftest.err'
35996d22
AS
11073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11074 (eval $ac_try) 2>&5
11075 ac_status=$?
11076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11077 (exit $ac_status); }; } &&
11078 { ac_try='test -s conftest.$ac_objext'
abd39b57
AC
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); }; }; then
11084 HAVE_XIM=yes
11085
11086cat >>confdefs.h <<\_ACEOF
11087#define HAVE_XIM 1
11088_ACEOF
11089
11090else
11091 echo "$as_me: failed program was:" >&5
11092sed 's/^/| /' conftest.$ac_ext >&5
11093
11094HAVE_XIM=no
11095fi
35996d22 11096rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 11097
c0d27fcc 11098
98418dba 11099if test "${with_xim}" != "no"; then
b936fae4 11100
c0d27fcc 11101cat >>confdefs.h <<\_ACEOF
98418dba 11102#define USE_XIM 1
c0d27fcc 11103_ACEOF
98418dba 11104
793fa0d7 11105fi
abd39b57
AC
11106
11107
11108if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
11109 late_CFLAGS=$CFLAGS
11110 if test "$GCC" = yes; then
11111 CFLAGS="$CFLAGS --pedantic-errors"
11112 fi
cffcede7 11113 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11114/* confdefs.h. */
11115_ACEOF
11116cat confdefs.h >>conftest.$ac_ext
11117cat >>conftest.$ac_ext <<_ACEOF
11118/* end confdefs.h. */
cffcede7
JD
11119
11120#include <X11/Xlib.h>
11121#include <X11/Xresource.h>
11122int
11123main ()
11124{
11125Display *display;
11126XrmDatabase db;
11127char *res_name;
11128char *res_class;
11129XIMProc callback;
11130XPointer *client_data;
849d80cf
DL
11131#ifndef __GNUC__
11132/* If we're not using GCC, it's probably not XFree86, and this is
11133 probably right, but we can't use something like --pedantic-errors. */
11134extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11135 char*, XIMProc, XPointer*);
11136#endif
cffcede7
JD
11137(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11138 client_data);
11139 ;
11140 return 0;
11141}
11142_ACEOF
11143rm -f conftest.$ac_objext
11144if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11145 (eval $ac_compile) 2>conftest.er1
cffcede7 11146 ac_status=$?
35996d22
AS
11147 grep -v '^ *+' conftest.er1 >conftest.err
11148 rm -f conftest.er1
11149 cat conftest.err >&5
cffcede7
JD
11150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11151 (exit $ac_status); } &&
551ffc27
ST
11152 { ac_try='test -z "$ac_c_werror_flag"
11153 || test ! -s conftest.err'
35996d22
AS
11154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11155 (eval $ac_try) 2>&5
11156 ac_status=$?
11157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11158 (exit $ac_status); }; } &&
11159 { ac_try='test -s conftest.$ac_objext'
cffcede7
JD
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); }; }; then
11165 emacs_cv_arg6_star=yes
11166else
11167 echo "$as_me: failed program was:" >&5
19650fd6
AS
11168sed 's/^/| /' conftest.$ac_ext >&5
11169
cffcede7 11170fi
35996d22 11171rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
11172
11173 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 11174 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11175#define XRegisterIMInstantiateCallback_arg6 XPointer*
11176_ACEOF
11177
11178 else
f57bd967 11179 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11180#define XRegisterIMInstantiateCallback_arg6 XPointer
11181_ACEOF
11182
11183 fi
849d80cf 11184 CFLAGS=$late_CFLAGS
98418dba
CW
11185fi
11186
11187### Use -lXpm if available, unless `--with-xpm=no'.
11188HAVE_XPM=no
11189if test "${HAVE_X11}" = "yes"; then
11190 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
11191 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11192 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
11193echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11194if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11195 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11196fi
11197echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
11198echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 11199else
c0d27fcc
MR
11200 # Is the header compilable?
11201echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
11202echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
11203cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11204/* confdefs.h. */
11205_ACEOF
11206cat confdefs.h >>conftest.$ac_ext
11207cat >>conftest.$ac_ext <<_ACEOF
11208/* end confdefs.h. */
c0d27fcc
MR
11209$ac_includes_default
11210#include <X11/xpm.h>
11211_ACEOF
11212rm -f conftest.$ac_objext
11213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11214 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11215 ac_status=$?
35996d22
AS
11216 grep -v '^ *+' conftest.er1 >conftest.err
11217 rm -f conftest.er1
11218 cat conftest.err >&5
c0d27fcc
MR
11219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11220 (exit $ac_status); } &&
551ffc27
ST
11221 { ac_try='test -z "$ac_c_werror_flag"
11222 || test ! -s conftest.err'
35996d22
AS
11223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11224 (eval $ac_try) 2>&5
11225 ac_status=$?
11226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11227 (exit $ac_status); }; } &&
11228 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
11234 ac_header_compiler=yes
11235else
11236 echo "$as_me: failed program was:" >&5
19650fd6
AS
11237sed 's/^/| /' conftest.$ac_ext >&5
11238
c0d27fcc
MR
11239ac_header_compiler=no
11240fi
35996d22 11241rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11242echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11243echo "${ECHO_T}$ac_header_compiler" >&6
11244
11245# Is the header present?
11246echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
11247echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
11248cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11249/* confdefs.h. */
11250_ACEOF
11251cat confdefs.h >>conftest.$ac_ext
11252cat >>conftest.$ac_ext <<_ACEOF
11253/* end confdefs.h. */
98418dba
CW
11254#include <X11/xpm.h>
11255_ACEOF
c0d27fcc 11256if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11257 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11258 ac_status=$?
6bae0ccf 11259 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11260 rm -f conftest.er1
11261 cat conftest.err >&5
c0d27fcc 11262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11263 (exit $ac_status); } >/dev/null; then
11264 if test -s conftest.err; then
11265 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11266 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11267 else
11268 ac_cpp_err=
11269 fi
11270else
11271 ac_cpp_err=yes
11272fi
11273if test -z "$ac_cpp_err"; then
c0d27fcc 11274 ac_header_preproc=yes
98418dba
CW
11275else
11276 echo "$as_me: failed program was:" >&5
19650fd6
AS
11277sed 's/^/| /' conftest.$ac_ext >&5
11278
c0d27fcc 11279 ac_header_preproc=no
98418dba
CW
11280fi
11281rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11282echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11283echo "${ECHO_T}$ac_header_preproc" >&6
11284
11285# So? What about this header?
35996d22
AS
11286case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11287 yes:no: )
c0d27fcc
MR
11288 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
11289echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11290 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
11291echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
11292 ac_header_preproc=yes
19650fd6 11293 ;;
35996d22 11294 no:yes:* )
c0d27fcc
MR
11295 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
11296echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
35996d22
AS
11297 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
11298echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
11299 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
11300echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
11301 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
11302echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 11303 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
19650fd6 11304echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11305 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
11306echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11307 (
11308 cat <<\_ASBOX
35996d22
AS
11309## ------------------------------------------ ##
11310## Report this to the AC_PACKAGE_NAME lists. ##
11311## ------------------------------------------ ##
19650fd6
AS
11312_ASBOX
11313 ) |
11314 sed "s/^/$as_me: WARNING: /" >&2
11315 ;;
c0d27fcc
MR
11316esac
11317echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
11318echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11319if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11320 echo $ECHO_N "(cached) $ECHO_C" >&6
11321else
11322 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 11323fi
c0d27fcc 11324echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 11325echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
11326
11327fi
98418dba 11328if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 11329 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
11330echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
11331if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 11332 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11333else
98418dba
CW
11334 ac_check_lib_save_LIBS=$LIBS
11335LIBS="-lXpm -lX11 $LIBS"
11336cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11337/* confdefs.h. */
11338_ACEOF
11339cat confdefs.h >>conftest.$ac_ext
11340cat >>conftest.$ac_ext <<_ACEOF
11341/* end confdefs.h. */
98418dba 11342
ba4481b5 11343/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11344#ifdef __cplusplus
11345extern "C"
11346#endif
ba4481b5 11347/* We use char because int might match the return type of a gcc2
503d2be0 11348 builtin and then its argument prototype would still apply. */
98418dba 11349char XpmReadFileToPixmap ();
503d2be0
AS
11350int
11351main ()
11352{
98418dba 11353XpmReadFileToPixmap ();
503d2be0
AS
11354 ;
11355 return 0;
11356}
11357_ACEOF
11358rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11359if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11360 (eval $ac_link) 2>conftest.er1
503d2be0 11361 ac_status=$?
35996d22
AS
11362 grep -v '^ *+' conftest.er1 >conftest.err
11363 rm -f conftest.er1
11364 cat conftest.err >&5
c0d27fcc 11365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11366 (exit $ac_status); } &&
551ffc27
ST
11367 { ac_try='test -z "$ac_c_werror_flag"
11368 || test ! -s conftest.err'
35996d22
AS
11369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11370 (eval $ac_try) 2>&5
11371 ac_status=$?
11372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11373 (exit $ac_status); }; } &&
11374 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11376 (eval $ac_try) 2>&5
11377 ac_status=$?
c0d27fcc 11378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11379 (exit $ac_status); }; }; then
98418dba 11380 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
11381else
11382 echo "$as_me: failed program was:" >&5
19650fd6
AS
11383sed 's/^/| /' conftest.$ac_ext >&5
11384
98418dba 11385ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 11386fi
35996d22
AS
11387rm -f conftest.err conftest.$ac_objext \
11388 conftest$ac_exeext conftest.$ac_ext
98418dba 11389LIBS=$ac_check_lib_save_LIBS
503d2be0 11390fi
c0d27fcc 11391echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
11392echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
11393if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
11394 HAVE_XPM=yes
ba4481b5
DL
11395fi
11396
98418dba
CW
11397fi
11398
c0d27fcc 11399
98418dba 11400 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11401 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
11402echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
11403 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11404/* confdefs.h. */
11405_ACEOF
11406cat confdefs.h >>conftest.$ac_ext
11407cat >>conftest.$ac_ext <<_ACEOF
11408/* end confdefs.h. */
98418dba
CW
11409#include "X11/xpm.h"
11410#ifndef XpmReturnAllocPixels
11411no_return_alloc_pixels
503d2be0 11412#endif
ba4481b5 11413
98418dba
CW
11414_ACEOF
11415if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11416 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
11417 HAVE_XPM=no
11418else
11419 HAVE_XPM=yes
11420fi
11421rm -f conftest*
ba4481b5 11422
c0d27fcc 11423
98418dba 11424 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11425 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
11426echo "${ECHO_T}yes" >&6
11427 else
c0d27fcc 11428 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
11429echo "${ECHO_T}no" >&6
11430 fi
11431 fi
11432 fi
11433
11434 if test "${HAVE_XPM}" = "yes"; then
b936fae4 11435
c0d27fcc 11436cat >>confdefs.h <<\_ACEOF
98418dba 11437#define HAVE_XPM 1
c0d27fcc 11438_ACEOF
98418dba
CW
11439
11440 fi
11441fi
11442
11443### Use -ljpeg if available, unless `--with-jpeg=no'.
11444HAVE_JPEG=no
11445if test "${HAVE_X11}" = "yes"; then
11446 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
11447 if test "${ac_cv_header_jerror_h+set}" = set; then
11448 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
11449echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11450if test "${ac_cv_header_jerror_h+set}" = set; then
11451 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11452fi
11453echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
11454echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 11455else
c0d27fcc
MR
11456 # Is the header compilable?
11457echo "$as_me:$LINENO: checking jerror.h usability" >&5
11458echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
11459cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11460/* confdefs.h. */
11461_ACEOF
11462cat confdefs.h >>conftest.$ac_ext
11463cat >>conftest.$ac_ext <<_ACEOF
11464/* end confdefs.h. */
c0d27fcc
MR
11465$ac_includes_default
11466#include <jerror.h>
11467_ACEOF
11468rm -f conftest.$ac_objext
11469if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11470 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11471 ac_status=$?
35996d22
AS
11472 grep -v '^ *+' conftest.er1 >conftest.err
11473 rm -f conftest.er1
11474 cat conftest.err >&5
c0d27fcc
MR
11475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11476 (exit $ac_status); } &&
551ffc27
ST
11477 { ac_try='test -z "$ac_c_werror_flag"
11478 || test ! -s conftest.err'
35996d22
AS
11479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11480 (eval $ac_try) 2>&5
11481 ac_status=$?
11482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11483 (exit $ac_status); }; } &&
11484 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
11490 ac_header_compiler=yes
11491else
11492 echo "$as_me: failed program was:" >&5
19650fd6
AS
11493sed 's/^/| /' conftest.$ac_ext >&5
11494
c0d27fcc
MR
11495ac_header_compiler=no
11496fi
35996d22 11497rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11498echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11499echo "${ECHO_T}$ac_header_compiler" >&6
11500
11501# Is the header present?
11502echo "$as_me:$LINENO: checking jerror.h presence" >&5
11503echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
11504cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11505/* confdefs.h. */
11506_ACEOF
11507cat confdefs.h >>conftest.$ac_ext
11508cat >>conftest.$ac_ext <<_ACEOF
11509/* end confdefs.h. */
98418dba
CW
11510#include <jerror.h>
11511_ACEOF
c0d27fcc 11512if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11513 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11514 ac_status=$?
6bae0ccf 11515 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11516 rm -f conftest.er1
11517 cat conftest.err >&5
c0d27fcc 11518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11519 (exit $ac_status); } >/dev/null; then
11520 if test -s conftest.err; then
11521 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11522 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11523 else
11524 ac_cpp_err=
11525 fi
11526else
11527 ac_cpp_err=yes
503d2be0 11528fi
98418dba 11529if test -z "$ac_cpp_err"; then
c0d27fcc 11530 ac_header_preproc=yes
ba4481b5 11531else
98418dba 11532 echo "$as_me: failed program was:" >&5
19650fd6
AS
11533sed 's/^/| /' conftest.$ac_ext >&5
11534
c0d27fcc 11535 ac_header_preproc=no
98418dba
CW
11536fi
11537rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11538echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11539echo "${ECHO_T}$ac_header_preproc" >&6
11540
11541# So? What about this header?
35996d22
AS
11542case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11543 yes:no: )
c0d27fcc
MR
11544 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
11545echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11546 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
11547echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
11548 ac_header_preproc=yes
19650fd6 11549 ;;
35996d22 11550 no:yes:* )
c0d27fcc
MR
11551 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
11552echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
35996d22
AS
11553 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
11554echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
11555 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
11556echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
11557 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
11558echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 11559 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 11560echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11561 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
11562echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11563 (
11564 cat <<\_ASBOX
35996d22
AS
11565## ------------------------------------------ ##
11566## Report this to the AC_PACKAGE_NAME lists. ##
11567## ------------------------------------------ ##
19650fd6
AS
11568_ASBOX
11569 ) |
11570 sed "s/^/$as_me: WARNING: /" >&2
11571 ;;
c0d27fcc
MR
11572esac
11573echo "$as_me:$LINENO: checking for jerror.h" >&5
11574echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11575if test "${ac_cv_header_jerror_h+set}" = set; then
11576 echo $ECHO_N "(cached) $ECHO_C" >&6
11577else
11578 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 11579fi
c0d27fcc 11580echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 11581echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
11582
11583fi
98418dba 11584if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 11585 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
11586echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
11587if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 11588 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11589else
98418dba
CW
11590 ac_check_lib_save_LIBS=$LIBS
11591LIBS="-ljpeg $LIBS"
11592cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11593/* confdefs.h. */
11594_ACEOF
11595cat confdefs.h >>conftest.$ac_ext
11596cat >>conftest.$ac_ext <<_ACEOF
11597/* end confdefs.h. */
98418dba
CW
11598
11599/* Override any gcc2 internal prototype to avoid an error. */
11600#ifdef __cplusplus
11601extern "C"
11602#endif
11603/* We use char because int might match the return type of a gcc2
11604 builtin and then its argument prototype would still apply. */
11605char jpeg_destroy_compress ();
503d2be0
AS
11606int
11607main ()
11608{
98418dba 11609jpeg_destroy_compress ();
503d2be0
AS
11610 ;
11611 return 0;
11612}
11613_ACEOF
11614rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11615if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11616 (eval $ac_link) 2>conftest.er1
503d2be0 11617 ac_status=$?
35996d22
AS
11618 grep -v '^ *+' conftest.er1 >conftest.err
11619 rm -f conftest.er1
11620 cat conftest.err >&5
c0d27fcc 11621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11622 (exit $ac_status); } &&
551ffc27
ST
11623 { ac_try='test -z "$ac_c_werror_flag"
11624 || test ! -s conftest.err'
35996d22
AS
11625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11626 (eval $ac_try) 2>&5
11627 ac_status=$?
11628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11629 (exit $ac_status); }; } &&
11630 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11632 (eval $ac_try) 2>&5
11633 ac_status=$?
c0d27fcc 11634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11635 (exit $ac_status); }; }; then
98418dba 11636 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 11637else
503d2be0 11638 echo "$as_me: failed program was:" >&5
19650fd6
AS
11639sed 's/^/| /' conftest.$ac_ext >&5
11640
98418dba 11641ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 11642fi
35996d22
AS
11643rm -f conftest.err conftest.$ac_objext \
11644 conftest$ac_exeext conftest.$ac_ext
98418dba 11645LIBS=$ac_check_lib_save_LIBS
ba4481b5 11646fi
c0d27fcc 11647echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
11648echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
11649if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
11650 HAVE_JPEG=yes
ba4481b5 11651fi
98418dba 11652
ba4481b5 11653fi
98418dba 11654
c0d27fcc 11655
ba4481b5 11656 fi
ba4481b5 11657
c0d27fcc 11658
98418dba 11659 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 11660 cat >>confdefs.h <<\_ACEOF
98418dba 11661#define HAVE_JPEG 1
c0d27fcc 11662_ACEOF
98418dba
CW
11663
11664 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11665/* confdefs.h. */
11666_ACEOF
11667cat confdefs.h >>conftest.$ac_ext
11668cat >>conftest.$ac_ext <<_ACEOF
11669/* end confdefs.h. */
22044edf 11670#include <jpeglib.h>
98418dba
CW
11671 version=JPEG_LIB_VERSION
11672
11673_ACEOF
11674if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11675 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 11676 cat >>confdefs.h <<\_ACEOF
98418dba 11677#define HAVE_JPEG 1
c0d27fcc 11678_ACEOF
ba4481b5 11679
98418dba 11680else
c0d27fcc 11681 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
11682echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
11683 HAVE_JPEG=no
ba4481b5 11684fi
98418dba 11685rm -f conftest*
ba4481b5 11686
98418dba
CW
11687 fi
11688fi
503d2be0 11689
98418dba
CW
11690### Use -lpng if available, unless `--with-png=no'.
11691HAVE_PNG=no
11692if test "${HAVE_X11}" = "yes"; then
11693 if test "${with_png}" != "no"; then
f57bd967
DL
11694 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
11695 # in /usr/include/libpng.
11696
11697
11698for ac_header in png.h libpng/png.h
11699do
11700as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11701if eval "test \"\${$as_ac_Header+set}\" = set"; then
11702 echo "$as_me:$LINENO: checking for $ac_header" >&5
11703echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11704if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 11705 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 11706fi
f57bd967
DL
11707echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11708echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
503d2be0 11709else
c0d27fcc 11710 # Is the header compilable?
f57bd967
DL
11711echo "$as_me:$LINENO: checking $ac_header usability" >&5
11712echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
c0d27fcc 11713cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11714/* confdefs.h. */
11715_ACEOF
11716cat confdefs.h >>conftest.$ac_ext
11717cat >>conftest.$ac_ext <<_ACEOF
11718/* end confdefs.h. */
c0d27fcc 11719$ac_includes_default
f57bd967 11720#include <$ac_header>
c0d27fcc
MR
11721_ACEOF
11722rm -f conftest.$ac_objext
11723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11724 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11725 ac_status=$?
35996d22
AS
11726 grep -v '^ *+' conftest.er1 >conftest.err
11727 rm -f conftest.er1
11728 cat conftest.err >&5
c0d27fcc
MR
11729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11730 (exit $ac_status); } &&
551ffc27
ST
11731 { ac_try='test -z "$ac_c_werror_flag"
11732 || test ! -s conftest.err'
35996d22
AS
11733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11734 (eval $ac_try) 2>&5
11735 ac_status=$?
11736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11737 (exit $ac_status); }; } &&
11738 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
11744 ac_header_compiler=yes
11745else
11746 echo "$as_me: failed program was:" >&5
19650fd6
AS
11747sed 's/^/| /' conftest.$ac_ext >&5
11748
c0d27fcc
MR
11749ac_header_compiler=no
11750fi
35996d22 11751rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11752echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11753echo "${ECHO_T}$ac_header_compiler" >&6
11754
11755# Is the header present?
f57bd967
DL
11756echo "$as_me:$LINENO: checking $ac_header presence" >&5
11757echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
c0d27fcc 11758cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11759/* confdefs.h. */
11760_ACEOF
11761cat confdefs.h >>conftest.$ac_ext
11762cat >>conftest.$ac_ext <<_ACEOF
11763/* end confdefs.h. */
f57bd967 11764#include <$ac_header>
503d2be0 11765_ACEOF
c0d27fcc 11766if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11767 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11768 ac_status=$?
6bae0ccf 11769 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11770 rm -f conftest.er1
11771 cat conftest.err >&5
c0d27fcc 11772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11773 (exit $ac_status); } >/dev/null; then
11774 if test -s conftest.err; then
11775 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11776 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
11777 else
11778 ac_cpp_err=
11779 fi
11780else
11781 ac_cpp_err=yes
11782fi
11783if test -z "$ac_cpp_err"; then
c0d27fcc 11784 ac_header_preproc=yes
503d2be0
AS
11785else
11786 echo "$as_me: failed program was:" >&5
19650fd6
AS
11787sed 's/^/| /' conftest.$ac_ext >&5
11788
c0d27fcc 11789 ac_header_preproc=no
ba4481b5 11790fi
503d2be0 11791rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11792echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11793echo "${ECHO_T}$ac_header_preproc" >&6
11794
11795# So? What about this header?
35996d22
AS
11796case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11797 yes:no: )
f57bd967
DL
11798 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11799echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11800 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11801echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11802 ac_header_preproc=yes
19650fd6 11803 ;;
35996d22 11804 no:yes:* )
f57bd967
DL
11805 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11806echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
11807 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11808echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11809 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11810echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11811 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11812echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 11813 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 11814echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11815 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11816echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11817 (
11818 cat <<\_ASBOX
35996d22
AS
11819## ------------------------------------------ ##
11820## Report this to the AC_PACKAGE_NAME lists. ##
11821## ------------------------------------------ ##
19650fd6
AS
11822_ASBOX
11823 ) |
11824 sed "s/^/$as_me: WARNING: /" >&2
11825 ;;
c0d27fcc 11826esac
f57bd967
DL
11827echo "$as_me:$LINENO: checking for $ac_header" >&5
11828echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11829if eval "test \"\${$as_ac_Header+set}\" = set"; then
c0d27fcc
MR
11830 echo $ECHO_N "(cached) $ECHO_C" >&6
11831else
35996d22 11832 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967
DL
11833fi
11834echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11835echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11836
ba4481b5 11837fi
f57bd967
DL
11838if test `eval echo '${'$as_ac_Header'}'` = yes; then
11839 cat >>confdefs.h <<_ACEOF
11840#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11841_ACEOF
c0d27fcc
MR
11842
11843fi
f57bd967
DL
11844
11845done
11846
11847 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
11848 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
11849echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
11850if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 11851 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11852else
98418dba
CW
11853 ac_check_lib_save_LIBS=$LIBS
11854LIBS="-lpng -lz -lm $LIBS"
11855cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11856/* confdefs.h. */
11857_ACEOF
11858cat confdefs.h >>conftest.$ac_ext
11859cat >>conftest.$ac_ext <<_ACEOF
11860/* end confdefs.h. */
98418dba 11861
ba4481b5 11862/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11863#ifdef __cplusplus
11864extern "C"
11865#endif
ba4481b5 11866/* We use char because int might match the return type of a gcc2
503d2be0 11867 builtin and then its argument prototype would still apply. */
98418dba 11868char png_get_channels ();
503d2be0
AS
11869int
11870main ()
11871{
98418dba 11872png_get_channels ();
503d2be0
AS
11873 ;
11874 return 0;
11875}
11876_ACEOF
11877rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11878if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11879 (eval $ac_link) 2>conftest.er1
503d2be0 11880 ac_status=$?
35996d22
AS
11881 grep -v '^ *+' conftest.er1 >conftest.err
11882 rm -f conftest.er1
11883 cat conftest.err >&5
c0d27fcc 11884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11885 (exit $ac_status); } &&
551ffc27
ST
11886 { ac_try='test -z "$ac_c_werror_flag"
11887 || test ! -s conftest.err'
35996d22
AS
11888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11889 (eval $ac_try) 2>&5
11890 ac_status=$?
11891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11892 (exit $ac_status); }; } &&
11893 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11895 (eval $ac_try) 2>&5
11896 ac_status=$?
c0d27fcc 11897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11898 (exit $ac_status); }; }; then
98418dba 11899 ac_cv_lib_png_png_get_channels=yes
73b77ee5 11900else
98418dba 11901 echo "$as_me: failed program was:" >&5
19650fd6
AS
11902sed 's/^/| /' conftest.$ac_ext >&5
11903
98418dba 11904ac_cv_lib_png_png_get_channels=no
73b77ee5 11905fi
35996d22
AS
11906rm -f conftest.err conftest.$ac_objext \
11907 conftest$ac_exeext conftest.$ac_ext
98418dba 11908LIBS=$ac_check_lib_save_LIBS
73b77ee5 11909fi
c0d27fcc 11910echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
11911echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
11912if test $ac_cv_lib_png_png_get_channels = yes; then
11913 HAVE_PNG=yes
73b77ee5 11914fi
503d2be0 11915
f57bd967 11916 fi
98418dba
CW
11917 fi
11918
11919 if test "${HAVE_PNG}" = "yes"; then
b936fae4 11920
c0d27fcc 11921cat >>confdefs.h <<\_ACEOF
98418dba 11922#define HAVE_PNG 1
c0d27fcc 11923_ACEOF
73b77ee5 11924
98418dba 11925 fi
73b77ee5
GM
11926fi
11927
98418dba
CW
11928### Use -ltiff if available, unless `--with-tiff=no'.
11929HAVE_TIFF=no
11930if test "${HAVE_X11}" = "yes"; then
11931 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
11932 if test "${ac_cv_header_tiffio_h+set}" = set; then
11933 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
11934echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
11935if test "${ac_cv_header_tiffio_h+set}" = set; then
11936 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11937fi
11938echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
11939echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 11940else
c0d27fcc
MR
11941 # Is the header compilable?
11942echo "$as_me:$LINENO: checking tiffio.h usability" >&5
11943echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
11944cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11945/* confdefs.h. */
11946_ACEOF
11947cat confdefs.h >>conftest.$ac_ext
11948cat >>conftest.$ac_ext <<_ACEOF
11949/* end confdefs.h. */
c0d27fcc
MR
11950$ac_includes_default
11951#include <tiffio.h>
11952_ACEOF
11953rm -f conftest.$ac_objext
11954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11955 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11956 ac_status=$?
35996d22
AS
11957 grep -v '^ *+' conftest.er1 >conftest.err
11958 rm -f conftest.er1
11959 cat conftest.err >&5
c0d27fcc
MR
11960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11961 (exit $ac_status); } &&
551ffc27
ST
11962 { ac_try='test -z "$ac_c_werror_flag"
11963 || test ! -s conftest.err'
35996d22
AS
11964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11965 (eval $ac_try) 2>&5
11966 ac_status=$?
11967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11968 (exit $ac_status); }; } &&
11969 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
11975 ac_header_compiler=yes
11976else
11977 echo "$as_me: failed program was:" >&5
19650fd6
AS
11978sed 's/^/| /' conftest.$ac_ext >&5
11979
c0d27fcc
MR
11980ac_header_compiler=no
11981fi
35996d22 11982rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11983echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11984echo "${ECHO_T}$ac_header_compiler" >&6
11985
11986# Is the header present?
11987echo "$as_me:$LINENO: checking tiffio.h presence" >&5
11988echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
11989cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11990/* confdefs.h. */
11991_ACEOF
11992cat confdefs.h >>conftest.$ac_ext
11993cat >>conftest.$ac_ext <<_ACEOF
11994/* end confdefs.h. */
98418dba
CW
11995#include <tiffio.h>
11996_ACEOF
c0d27fcc 11997if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11998 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11999 ac_status=$?
6bae0ccf 12000 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12001 rm -f conftest.er1
12002 cat conftest.err >&5
c0d27fcc 12003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12004 (exit $ac_status); } >/dev/null; then
12005 if test -s conftest.err; then
12006 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12007 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12008 else
12009 ac_cpp_err=
12010 fi
12011else
12012 ac_cpp_err=yes
12013fi
12014if test -z "$ac_cpp_err"; then
c0d27fcc 12015 ac_header_preproc=yes
98418dba
CW
12016else
12017 echo "$as_me: failed program was:" >&5
19650fd6
AS
12018sed 's/^/| /' conftest.$ac_ext >&5
12019
c0d27fcc 12020 ac_header_preproc=no
98418dba
CW
12021fi
12022rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12023echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12024echo "${ECHO_T}$ac_header_preproc" >&6
12025
12026# So? What about this header?
35996d22
AS
12027case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12028 yes:no: )
c0d27fcc
MR
12029 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
12030echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12031 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
12032echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
12033 ac_header_preproc=yes
19650fd6 12034 ;;
35996d22 12035 no:yes:* )
c0d27fcc
MR
12036 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
12037echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
35996d22
AS
12038 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
12039echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
12040 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
12041echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
12042 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
12043echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12044 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 12045echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12046 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
12047echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12048 (
12049 cat <<\_ASBOX
35996d22
AS
12050## ------------------------------------------ ##
12051## Report this to the AC_PACKAGE_NAME lists. ##
12052## ------------------------------------------ ##
19650fd6
AS
12053_ASBOX
12054 ) |
12055 sed "s/^/$as_me: WARNING: /" >&2
12056 ;;
c0d27fcc
MR
12057esac
12058echo "$as_me:$LINENO: checking for tiffio.h" >&5
12059echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12060if test "${ac_cv_header_tiffio_h+set}" = set; then
12061 echo $ECHO_N "(cached) $ECHO_C" >&6
12062else
12063 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 12064fi
c0d27fcc 12065echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 12066echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
12067
12068fi
98418dba
CW
12069if test $ac_cv_header_tiffio_h = yes; then
12070 tifflibs="-lz -lm"
12071 # At least one tiff package requires the jpeg library.
12072 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 12073 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
12074echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
12075if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 12076 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12077else
503d2be0 12078 ac_check_lib_save_LIBS=$LIBS
98418dba 12079LIBS="-ltiff $tifflibs $LIBS"
503d2be0 12080cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12081/* confdefs.h. */
12082_ACEOF
12083cat confdefs.h >>conftest.$ac_ext
12084cat >>conftest.$ac_ext <<_ACEOF
12085/* end confdefs.h. */
503d2be0 12086
73b77ee5 12087/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12088#ifdef __cplusplus
12089extern "C"
12090#endif
73b77ee5 12091/* We use char because int might match the return type of a gcc2
503d2be0 12092 builtin and then its argument prototype would still apply. */
98418dba 12093char TIFFGetVersion ();
503d2be0
AS
12094int
12095main ()
12096{
98418dba 12097TIFFGetVersion ();
503d2be0
AS
12098 ;
12099 return 0;
12100}
12101_ACEOF
12102rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12103if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12104 (eval $ac_link) 2>conftest.er1
503d2be0 12105 ac_status=$?
35996d22
AS
12106 grep -v '^ *+' conftest.er1 >conftest.err
12107 rm -f conftest.er1
12108 cat conftest.err >&5
c0d27fcc 12109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12110 (exit $ac_status); } &&
551ffc27
ST
12111 { ac_try='test -z "$ac_c_werror_flag"
12112 || test ! -s conftest.err'
35996d22
AS
12113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12114 (eval $ac_try) 2>&5
12115 ac_status=$?
12116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12117 (exit $ac_status); }; } &&
12118 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12120 (eval $ac_try) 2>&5
12121 ac_status=$?
c0d27fcc 12122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12123 (exit $ac_status); }; }; then
98418dba 12124 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
12125else
12126 echo "$as_me: failed program was:" >&5
19650fd6
AS
12127sed 's/^/| /' conftest.$ac_ext >&5
12128
98418dba 12129ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 12130fi
35996d22
AS
12131rm -f conftest.err conftest.$ac_objext \
12132 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12133LIBS=$ac_check_lib_save_LIBS
12134fi
c0d27fcc 12135echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
12136echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
12137if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
12138 HAVE_TIFF=yes
12139fi
12140
12141fi
73b77ee5 12142
c0d27fcc 12143
98418dba
CW
12144 fi
12145
12146 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 12147
c0d27fcc 12148cat >>confdefs.h <<\_ACEOF
98418dba 12149#define HAVE_TIFF 1
c0d27fcc 12150_ACEOF
98418dba
CW
12151
12152 fi
73b77ee5
GM
12153fi
12154
98418dba
CW
12155### Use -lgif if available, unless `--with-gif=no'.
12156HAVE_GIF=no
12157if test "${HAVE_X11}" = "yes"; then
12158 if test "${with_gif}" != "no"; then
c0d27fcc
MR
12159 if test "${ac_cv_header_gif_lib_h+set}" = set; then
12160 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
12161echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12162if test "${ac_cv_header_gif_lib_h+set}" = set; then
12163 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12164fi
12165echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
12166echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 12167else
c0d27fcc
MR
12168 # Is the header compilable?
12169echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
12170echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
12171cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12172/* confdefs.h. */
12173_ACEOF
12174cat confdefs.h >>conftest.$ac_ext
12175cat >>conftest.$ac_ext <<_ACEOF
12176/* end confdefs.h. */
c0d27fcc
MR
12177$ac_includes_default
12178#include <gif_lib.h>
12179_ACEOF
12180rm -f conftest.$ac_objext
12181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12182 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12183 ac_status=$?
35996d22
AS
12184 grep -v '^ *+' conftest.er1 >conftest.err
12185 rm -f conftest.er1
12186 cat conftest.err >&5
c0d27fcc
MR
12187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12188 (exit $ac_status); } &&
551ffc27
ST
12189 { ac_try='test -z "$ac_c_werror_flag"
12190 || test ! -s conftest.err'
35996d22
AS
12191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12192 (eval $ac_try) 2>&5
12193 ac_status=$?
12194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12195 (exit $ac_status); }; } &&
12196 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
12202 ac_header_compiler=yes
12203else
12204 echo "$as_me: failed program was:" >&5
19650fd6
AS
12205sed 's/^/| /' conftest.$ac_ext >&5
12206
c0d27fcc
MR
12207ac_header_compiler=no
12208fi
35996d22 12209rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12210echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12211echo "${ECHO_T}$ac_header_compiler" >&6
12212
12213# Is the header present?
12214echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
12215echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
12216cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12217/* confdefs.h. */
12218_ACEOF
12219cat confdefs.h >>conftest.$ac_ext
12220cat >>conftest.$ac_ext <<_ACEOF
12221/* end confdefs.h. */
98418dba
CW
12222#include <gif_lib.h>
12223_ACEOF
c0d27fcc 12224if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12225 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12226 ac_status=$?
6bae0ccf 12227 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12228 rm -f conftest.er1
12229 cat conftest.err >&5
c0d27fcc 12230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12231 (exit $ac_status); } >/dev/null; then
12232 if test -s conftest.err; then
12233 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12234 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12235 else
12236 ac_cpp_err=
12237 fi
12238else
12239 ac_cpp_err=yes
12240fi
12241if test -z "$ac_cpp_err"; then
c0d27fcc 12242 ac_header_preproc=yes
98418dba
CW
12243else
12244 echo "$as_me: failed program was:" >&5
19650fd6
AS
12245sed 's/^/| /' conftest.$ac_ext >&5
12246
c0d27fcc 12247 ac_header_preproc=no
98418dba
CW
12248fi
12249rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12250echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12251echo "${ECHO_T}$ac_header_preproc" >&6
12252
12253# So? What about this header?
35996d22
AS
12254case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12255 yes:no: )
c0d27fcc
MR
12256 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12257echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12258 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
12259echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
12260 ac_header_preproc=yes
19650fd6 12261 ;;
35996d22 12262 no:yes:* )
c0d27fcc
MR
12263 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
12264echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
35996d22
AS
12265 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
12266echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
12267 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
12268echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
12269 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
12270echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12271 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 12272echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12273 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
12274echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12275 (
12276 cat <<\_ASBOX
35996d22
AS
12277## ------------------------------------------ ##
12278## Report this to the AC_PACKAGE_NAME lists. ##
12279## ------------------------------------------ ##
19650fd6
AS
12280_ASBOX
12281 ) |
12282 sed "s/^/$as_me: WARNING: /" >&2
12283 ;;
c0d27fcc
MR
12284esac
12285echo "$as_me:$LINENO: checking for gif_lib.h" >&5
12286echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12287if test "${ac_cv_header_gif_lib_h+set}" = set; then
12288 echo $ECHO_N "(cached) $ECHO_C" >&6
12289else
12290 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 12291fi
c0d27fcc 12292echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 12293echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
12294
12295fi
98418dba
CW
12296if test $ac_cv_header_gif_lib_h = yes; then
12297 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12298# Earlier versions can crash Emacs.
c0d27fcc 12299 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
12300echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
12301if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 12302 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12303else
503d2be0 12304 ac_check_lib_save_LIBS=$LIBS
98418dba 12305LIBS="-lungif $LIBS"
503d2be0 12306cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12307/* confdefs.h. */
12308_ACEOF
12309cat confdefs.h >>conftest.$ac_ext
12310cat >>conftest.$ac_ext <<_ACEOF
12311/* end confdefs.h. */
73b77ee5 12312
98418dba
CW
12313/* Override any gcc2 internal prototype to avoid an error. */
12314#ifdef __cplusplus
12315extern "C"
12316#endif
12317/* We use char because int might match the return type of a gcc2
12318 builtin and then its argument prototype would still apply. */
12319char EGifPutExtensionLast ();
503d2be0
AS
12320int
12321main ()
12322{
98418dba 12323EGifPutExtensionLast ();
503d2be0
AS
12324 ;
12325 return 0;
12326}
12327_ACEOF
12328rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12329if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12330 (eval $ac_link) 2>conftest.er1
503d2be0 12331 ac_status=$?
35996d22
AS
12332 grep -v '^ *+' conftest.er1 >conftest.err
12333 rm -f conftest.er1
12334 cat conftest.err >&5
c0d27fcc 12335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12336 (exit $ac_status); } &&
551ffc27
ST
12337 { ac_try='test -z "$ac_c_werror_flag"
12338 || test ! -s conftest.err'
c0d27fcc 12339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
12340 (eval $ac_try) 2>&5
12341 ac_status=$?
c0d27fcc 12342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
12343 (exit $ac_status); }; } &&
12344 { ac_try='test -s conftest$ac_exeext'
12345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12346 (eval $ac_try) 2>&5
12347 ac_status=$?
12348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12349 (exit $ac_status); }; }; then
12350 ac_cv_lib_ungif_EGifPutExtensionLast=yes
12351else
98418dba 12352 echo "$as_me: failed program was:" >&5
19650fd6
AS
12353sed 's/^/| /' conftest.$ac_ext >&5
12354
98418dba
CW
12355ac_cv_lib_ungif_EGifPutExtensionLast=no
12356fi
35996d22
AS
12357rm -f conftest.err conftest.$ac_objext \
12358 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12359LIBS=$ac_check_lib_save_LIBS
12360fi
c0d27fcc 12361echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
12362echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
12363if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
12364 HAVE_GIF=yes
12365fi
12366
12367fi
12368
c0d27fcc 12369
98418dba
CW
12370 fi
12371
12372 if test "${HAVE_GIF}" = "yes"; then
b936fae4 12373
c0d27fcc 12374cat >>confdefs.h <<\_ACEOF
98418dba 12375#define HAVE_GIF 1
c0d27fcc 12376_ACEOF
98418dba
CW
12377
12378 fi
12379fi
12380
c0d27fcc
MR
12381### Use Mac OS X Carbon API to implement GUI.
12382HAVE_CARBON=no
12383if test "${with_carbon}" != "no"; then
12384 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
12385 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
12386echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
12387if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
12388 echo $ECHO_N "(cached) $ECHO_C" >&6
12389fi
12390echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
12391echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
12392else
12393 # Is the header compilable?
12394echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
12395echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
12396cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12397/* confdefs.h. */
12398_ACEOF
12399cat confdefs.h >>conftest.$ac_ext
12400cat >>conftest.$ac_ext <<_ACEOF
12401/* end confdefs.h. */
c0d27fcc
MR
12402$ac_includes_default
12403#include <Carbon/Carbon.h>
12404_ACEOF
12405rm -f conftest.$ac_objext
12406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12407 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12408 ac_status=$?
35996d22
AS
12409 grep -v '^ *+' conftest.er1 >conftest.err
12410 rm -f conftest.er1
12411 cat conftest.err >&5
c0d27fcc
MR
12412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12413 (exit $ac_status); } &&
551ffc27
ST
12414 { ac_try='test -z "$ac_c_werror_flag"
12415 || test ! -s conftest.err'
35996d22
AS
12416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12417 (eval $ac_try) 2>&5
12418 ac_status=$?
12419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12420 (exit $ac_status); }; } &&
12421 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
12427 ac_header_compiler=yes
12428else
12429 echo "$as_me: failed program was:" >&5
19650fd6
AS
12430sed 's/^/| /' conftest.$ac_ext >&5
12431
c0d27fcc
MR
12432ac_header_compiler=no
12433fi
35996d22 12434rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12435echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12436echo "${ECHO_T}$ac_header_compiler" >&6
12437
12438# Is the header present?
12439echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
12440echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
12441cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12442/* confdefs.h. */
12443_ACEOF
12444cat confdefs.h >>conftest.$ac_ext
12445cat >>conftest.$ac_ext <<_ACEOF
12446/* end confdefs.h. */
e0f712ba
AC
12447#include <Carbon/Carbon.h>
12448_ACEOF
c0d27fcc 12449if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
e0f712ba
AC
12450 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12451 ac_status=$?
6bae0ccf 12452 grep -v '^ *+' conftest.er1 >conftest.err
e0f712ba
AC
12453 rm -f conftest.er1
12454 cat conftest.err >&5
c0d27fcc 12455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
e0f712ba
AC
12456 (exit $ac_status); } >/dev/null; then
12457 if test -s conftest.err; then
12458 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12459 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
e0f712ba
AC
12460 else
12461 ac_cpp_err=
12462 fi
12463else
12464 ac_cpp_err=yes
12465fi
12466if test -z "$ac_cpp_err"; then
c0d27fcc 12467 ac_header_preproc=yes
e0f712ba
AC
12468else
12469 echo "$as_me: failed program was:" >&5
19650fd6
AS
12470sed 's/^/| /' conftest.$ac_ext >&5
12471
c0d27fcc 12472 ac_header_preproc=no
e0f712ba
AC
12473fi
12474rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12475echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12476echo "${ECHO_T}$ac_header_preproc" >&6
12477
12478# So? What about this header?
35996d22
AS
12479case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12480 yes:no: )
c0d27fcc
MR
12481 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
12482echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12483 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
12484echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
12485 ac_header_preproc=yes
19650fd6 12486 ;;
35996d22 12487 no:yes:* )
c0d27fcc
MR
12488 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
12489echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
35996d22
AS
12490 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
12491echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
12492 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
12493echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
12494 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
12495echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12496 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
19650fd6 12497echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12498 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
12499echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12500 (
12501 cat <<\_ASBOX
35996d22
AS
12502## ------------------------------------------ ##
12503## Report this to the AC_PACKAGE_NAME lists. ##
12504## ------------------------------------------ ##
19650fd6
AS
12505_ASBOX
12506 ) |
12507 sed "s/^/$as_me: WARNING: /" >&2
12508 ;;
c0d27fcc
MR
12509esac
12510echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
12511echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
12512if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
12513 echo $ECHO_N "(cached) $ECHO_C" >&6
12514else
12515 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
e0f712ba 12516fi
c0d27fcc 12517echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
e0f712ba 12518echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
c0d27fcc
MR
12519
12520fi
e0f712ba
AC
12521if test $ac_cv_header_Carbon_Carbon_h = yes; then
12522 HAVE_CARBON=yes
12523fi
12524
c0d27fcc 12525
e0f712ba
AC
12526fi
12527
cef11da2
ST
12528if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12529 echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12530echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12531if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12532 echo $ECHO_N "(cached) $ECHO_C" >&6
12533fi
12534echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12535echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12536else
12537 # Is the header compilable?
12538echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
12539echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6
12540cat >conftest.$ac_ext <<_ACEOF
12541/* confdefs.h. */
12542_ACEOF
12543cat confdefs.h >>conftest.$ac_ext
12544cat >>conftest.$ac_ext <<_ACEOF
12545/* end confdefs.h. */
12546$ac_includes_default
12547#include <malloc/malloc.h>
12548_ACEOF
12549rm -f conftest.$ac_objext
12550if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12551 (eval $ac_compile) 2>conftest.er1
12552 ac_status=$?
12553 grep -v '^ *+' conftest.er1 >conftest.err
12554 rm -f conftest.er1
12555 cat conftest.err >&5
12556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12557 (exit $ac_status); } &&
551ffc27
ST
12558 { ac_try='test -z "$ac_c_werror_flag"
12559 || test ! -s conftest.err'
cef11da2
ST
12560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12561 (eval $ac_try) 2>&5
12562 ac_status=$?
12563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12564 (exit $ac_status); }; } &&
12565 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
12571 ac_header_compiler=yes
12572else
12573 echo "$as_me: failed program was:" >&5
12574sed 's/^/| /' conftest.$ac_ext >&5
12575
12576ac_header_compiler=no
12577fi
12578rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12579echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12580echo "${ECHO_T}$ac_header_compiler" >&6
12581
12582# Is the header present?
12583echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
12584echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6
12585cat >conftest.$ac_ext <<_ACEOF
12586/* confdefs.h. */
12587_ACEOF
12588cat confdefs.h >>conftest.$ac_ext
12589cat >>conftest.$ac_ext <<_ACEOF
12590/* end confdefs.h. */
12591#include <malloc/malloc.h>
12592_ACEOF
12593if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12594 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12595 ac_status=$?
12596 grep -v '^ *+' conftest.er1 >conftest.err
12597 rm -f conftest.er1
12598 cat conftest.err >&5
12599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12600 (exit $ac_status); } >/dev/null; then
12601 if test -s conftest.err; then
12602 ac_cpp_err=$ac_c_preproc_warn_flag
12603 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12604 else
12605 ac_cpp_err=
12606 fi
12607else
12608 ac_cpp_err=yes
12609fi
12610if test -z "$ac_cpp_err"; then
12611 ac_header_preproc=yes
12612else
12613 echo "$as_me: failed program was:" >&5
12614sed 's/^/| /' conftest.$ac_ext >&5
12615
12616 ac_header_preproc=no
12617fi
12618rm -f conftest.err conftest.$ac_ext
12619echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12620echo "${ECHO_T}$ac_header_preproc" >&6
12621
12622# So? What about this header?
12623case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12624 yes:no: )
12625 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
12626echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12627 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
12628echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
12629 ac_header_preproc=yes
12630 ;;
12631 no:yes:* )
12632 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
12633echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
12634 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
12635echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
12636 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
12637echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
12638 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
12639echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
12640 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
12641echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
12642 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
12643echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
12644 (
12645 cat <<\_ASBOX
12646## ------------------------------------------ ##
12647## Report this to the AC_PACKAGE_NAME lists. ##
12648## ------------------------------------------ ##
12649_ASBOX
12650 ) |
12651 sed "s/^/$as_me: WARNING: /" >&2
12652 ;;
12653esac
12654echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12655echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12656if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12657 echo $ECHO_N "(cached) $ECHO_C" >&6
12658else
12659 ac_cv_header_malloc_malloc_h=$ac_header_preproc
12660fi
12661echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12662echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12663
12664fi
12665if test $ac_cv_header_malloc_malloc_h = yes; then
12666
12667cat >>confdefs.h <<\_ACEOF
12668#define HAVE_MALLOC_MALLOC_H 1
12669_ACEOF
12670
12671fi
12672
12673
12674
e0f712ba 12675if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 12676
c0d27fcc 12677cat >>confdefs.h <<\_ACEOF
e0f712ba 12678#define HAVE_CARBON 1
c0d27fcc 12679_ACEOF
e0f712ba 12680
6a3a24fa
JD
12681 window_system=mac
12682 ## Specify the install directory
12683 carbon_appdir=
12684 if test "${carbon_appdir_x}" != ""; then
12685 case ${carbon_appdir_x} in
12686 y | ye | yes) carbon_appdir=/Applications ;;
12687 * ) carbon_appdir=${carbon_appdir_x} ;;
12688 esac
12689 fi
8f417b3b
AS
12690 # We also have mouse menus.
12691 HAVE_MENUS=yes
e0f712ba
AC
12692fi
12693
98418dba
CW
12694### Use session management (-lSM -lICE) if available
12695HAVE_X_SM=no
12696if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
12697 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12698 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
12699echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
12700if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12701 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12702fi
12703echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
12704echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 12705else
c0d27fcc
MR
12706 # Is the header compilable?
12707echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
12708echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
12709cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12710/* confdefs.h. */
12711_ACEOF
12712cat confdefs.h >>conftest.$ac_ext
12713cat >>conftest.$ac_ext <<_ACEOF
12714/* end confdefs.h. */
c0d27fcc
MR
12715$ac_includes_default
12716#include <X11/SM/SMlib.h>
12717_ACEOF
12718rm -f conftest.$ac_objext
12719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12720 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12721 ac_status=$?
35996d22
AS
12722 grep -v '^ *+' conftest.er1 >conftest.err
12723 rm -f conftest.er1
12724 cat conftest.err >&5
c0d27fcc
MR
12725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12726 (exit $ac_status); } &&
551ffc27
ST
12727 { ac_try='test -z "$ac_c_werror_flag"
12728 || test ! -s conftest.err'
35996d22
AS
12729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12730 (eval $ac_try) 2>&5
12731 ac_status=$?
12732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12733 (exit $ac_status); }; } &&
12734 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
12740 ac_header_compiler=yes
12741else
12742 echo "$as_me: failed program was:" >&5
19650fd6
AS
12743sed 's/^/| /' conftest.$ac_ext >&5
12744
c0d27fcc
MR
12745ac_header_compiler=no
12746fi
35996d22 12747rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12748echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12749echo "${ECHO_T}$ac_header_compiler" >&6
12750
12751# Is the header present?
12752echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
12753echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
12754cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12755/* confdefs.h. */
12756_ACEOF
12757cat confdefs.h >>conftest.$ac_ext
12758cat >>conftest.$ac_ext <<_ACEOF
12759/* end confdefs.h. */
98418dba
CW
12760#include <X11/SM/SMlib.h>
12761_ACEOF
c0d27fcc 12762if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12763 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12764 ac_status=$?
6bae0ccf 12765 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12766 rm -f conftest.er1
12767 cat conftest.err >&5
c0d27fcc 12768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12769 (exit $ac_status); } >/dev/null; then
12770 if test -s conftest.err; then
12771 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12772 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12773 else
12774 ac_cpp_err=
12775 fi
12776else
12777 ac_cpp_err=yes
503d2be0 12778fi
98418dba 12779if test -z "$ac_cpp_err"; then
c0d27fcc 12780 ac_header_preproc=yes
98418dba
CW
12781else
12782 echo "$as_me: failed program was:" >&5
19650fd6
AS
12783sed 's/^/| /' conftest.$ac_ext >&5
12784
c0d27fcc 12785 ac_header_preproc=no
98418dba
CW
12786fi
12787rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12788echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12789echo "${ECHO_T}$ac_header_preproc" >&6
12790
12791# So? What about this header?
35996d22
AS
12792case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12793 yes:no: )
c0d27fcc
MR
12794 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12795echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12796 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
12797echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
12798 ac_header_preproc=yes
19650fd6 12799 ;;
35996d22 12800 no:yes:* )
c0d27fcc
MR
12801 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
12802echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
35996d22
AS
12803 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
12804echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
12805 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
12806echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
12807 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
12808echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12809 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 12810echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12811 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
12812echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12813 (
12814 cat <<\_ASBOX
35996d22
AS
12815## ------------------------------------------ ##
12816## Report this to the AC_PACKAGE_NAME lists. ##
12817## ------------------------------------------ ##
19650fd6
AS
12818_ASBOX
12819 ) |
12820 sed "s/^/$as_me: WARNING: /" >&2
12821 ;;
c0d27fcc
MR
12822esac
12823echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
12824echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
12825if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12826 echo $ECHO_N "(cached) $ECHO_C" >&6
12827else
12828 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 12829fi
c0d27fcc 12830echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 12831echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
12832
12833fi
98418dba 12834if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 12835 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
12836echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
12837if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 12838 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12839else
503d2be0 12840 ac_check_lib_save_LIBS=$LIBS
1660500f 12841LIBS="-lSM -lICE $LIBS"
503d2be0 12842cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12843/* confdefs.h. */
12844_ACEOF
12845cat confdefs.h >>conftest.$ac_ext
12846cat >>conftest.$ac_ext <<_ACEOF
12847/* end confdefs.h. */
503d2be0 12848
73b77ee5 12849/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12850#ifdef __cplusplus
12851extern "C"
12852#endif
73b77ee5 12853/* We use char because int might match the return type of a gcc2
503d2be0 12854 builtin and then its argument prototype would still apply. */
98418dba 12855char SmcOpenConnection ();
503d2be0
AS
12856int
12857main ()
12858{
98418dba 12859SmcOpenConnection ();
503d2be0
AS
12860 ;
12861 return 0;
12862}
12863_ACEOF
12864rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12865if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12866 (eval $ac_link) 2>conftest.er1
503d2be0 12867 ac_status=$?
35996d22
AS
12868 grep -v '^ *+' conftest.er1 >conftest.err
12869 rm -f conftest.er1
12870 cat conftest.err >&5
c0d27fcc 12871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12872 (exit $ac_status); } &&
551ffc27
ST
12873 { ac_try='test -z "$ac_c_werror_flag"
12874 || test ! -s conftest.err'
35996d22
AS
12875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12876 (eval $ac_try) 2>&5
12877 ac_status=$?
12878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12879 (exit $ac_status); }; } &&
12880 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12882 (eval $ac_try) 2>&5
12883 ac_status=$?
c0d27fcc 12884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12885 (exit $ac_status); }; }; then
98418dba 12886 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
12887else
12888 echo "$as_me: failed program was:" >&5
19650fd6
AS
12889sed 's/^/| /' conftest.$ac_ext >&5
12890
98418dba 12891ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 12892fi
35996d22
AS
12893rm -f conftest.err conftest.$ac_objext \
12894 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12895LIBS=$ac_check_lib_save_LIBS
12896fi
c0d27fcc 12897echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
12898echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
12899if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
12900 HAVE_X_SM=yes
73b77ee5
GM
12901fi
12902
73b77ee5 12903fi
73b77ee5 12904
c0d27fcc
MR
12905
12906
98418dba 12907 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 12908
c0d27fcc 12909cat >>confdefs.h <<\_ACEOF
98418dba 12910#define HAVE_X_SM 1
c0d27fcc 12911_ACEOF
73b77ee5 12912
98418dba
CW
12913 case "$LIBS" in
12914 *-lSM*) ;;
12915 *) LIBS="-lSM -lICE $LIBS" ;;
12916 esac
73b77ee5 12917 fi
98418dba 12918fi
73b77ee5 12919
98418dba 12920# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 12921echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
12922echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
12923if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
12924 echo $ECHO_N "(cached) $ECHO_C" >&6
12925else
12926 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12927/* confdefs.h. */
12928_ACEOF
12929cat confdefs.h >>conftest.$ac_ext
12930cat >>conftest.$ac_ext <<_ACEOF
12931/* end confdefs.h. */
98418dba 12932#include <netdb.h>
503d2be0
AS
12933int
12934main ()
12935{
98418dba 12936return h_errno;
503d2be0
AS
12937 ;
12938 return 0;
12939}
12940_ACEOF
12941rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12943 (eval $ac_link) 2>conftest.er1
503d2be0 12944 ac_status=$?
35996d22
AS
12945 grep -v '^ *+' conftest.er1 >conftest.err
12946 rm -f conftest.er1
12947 cat conftest.err >&5
c0d27fcc 12948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12949 (exit $ac_status); } &&
551ffc27
ST
12950 { ac_try='test -z "$ac_c_werror_flag"
12951 || test ! -s conftest.err'
35996d22
AS
12952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12953 (eval $ac_try) 2>&5
12954 ac_status=$?
12955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12956 (exit $ac_status); }; } &&
12957 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12959 (eval $ac_try) 2>&5
12960 ac_status=$?
c0d27fcc 12961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12962 (exit $ac_status); }; }; then
98418dba 12963 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 12964else
503d2be0 12965 echo "$as_me: failed program was:" >&5
19650fd6
AS
12966sed 's/^/| /' conftest.$ac_ext >&5
12967
98418dba 12968emacs_cv_netdb_declares_h_errno=no
73b77ee5 12969fi
35996d22
AS
12970rm -f conftest.err conftest.$ac_objext \
12971 conftest$ac_exeext conftest.$ac_ext
98418dba 12972fi
c0d27fcc 12973echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
12974echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
12975if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 12976
c0d27fcc 12977cat >>confdefs.h <<\_ACEOF
98418dba 12978#define HAVE_H_ERRNO 1
c0d27fcc 12979_ACEOF
73b77ee5 12980
98418dba
CW
12981fi
12982
12983# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12984# for constant arguments. Useless!
c0d27fcc 12985echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
12986echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
12987if test "${ac_cv_working_alloca_h+set}" = set; then
12988 echo $ECHO_N "(cached) $ECHO_C" >&6
12989else
12990 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12991/* confdefs.h. */
12992_ACEOF
12993cat confdefs.h >>conftest.$ac_ext
12994cat >>conftest.$ac_ext <<_ACEOF
12995/* end confdefs.h. */
98418dba 12996#include <alloca.h>
503d2be0
AS
12997int
12998main ()
12999{
98418dba 13000char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
13001 ;
13002 return 0;
13003}
13004_ACEOF
13005rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13007 (eval $ac_link) 2>conftest.er1
503d2be0 13008 ac_status=$?
35996d22
AS
13009 grep -v '^ *+' conftest.er1 >conftest.err
13010 rm -f conftest.er1
13011 cat conftest.err >&5
c0d27fcc 13012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13013 (exit $ac_status); } &&
551ffc27
ST
13014 { ac_try='test -z "$ac_c_werror_flag"
13015 || test ! -s conftest.err'
35996d22
AS
13016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13017 (eval $ac_try) 2>&5
13018 ac_status=$?
13019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13020 (exit $ac_status); }; } &&
13021 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13023 (eval $ac_try) 2>&5
13024 ac_status=$?
c0d27fcc 13025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13026 (exit $ac_status); }; }; then
98418dba 13027 ac_cv_working_alloca_h=yes
73b77ee5 13028else
503d2be0 13029 echo "$as_me: failed program was:" >&5
19650fd6
AS
13030sed 's/^/| /' conftest.$ac_ext >&5
13031
98418dba 13032ac_cv_working_alloca_h=no
73b77ee5 13033fi
35996d22
AS
13034rm -f conftest.err conftest.$ac_objext \
13035 conftest$ac_exeext conftest.$ac_ext
98418dba 13036fi
c0d27fcc 13037echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
13038echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
13039if test $ac_cv_working_alloca_h = yes; then
73b77ee5 13040
c0d27fcc 13041cat >>confdefs.h <<\_ACEOF
98418dba 13042#define HAVE_ALLOCA_H 1
c0d27fcc 13043_ACEOF
98418dba
CW
13044
13045fi
13046
c0d27fcc 13047echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
13048echo $ECHO_N "checking for alloca... $ECHO_C" >&6
13049if test "${ac_cv_func_alloca_works+set}" = set; then
13050 echo $ECHO_N "(cached) $ECHO_C" >&6
13051else
503d2be0 13052 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13053/* confdefs.h. */
13054_ACEOF
13055cat confdefs.h >>conftest.$ac_ext
13056cat >>conftest.$ac_ext <<_ACEOF
13057/* end confdefs.h. */
98418dba
CW
13058#ifdef __GNUC__
13059# define alloca __builtin_alloca
13060#else
13061# ifdef _MSC_VER
13062# include <malloc.h>
13063# define alloca _alloca
13064# else
13065# if HAVE_ALLOCA_H
13066# include <alloca.h>
13067# else
13068# ifdef _AIX
13069 #pragma alloca
13070# else
13071# ifndef alloca /* predefined by HP cc +Olibcalls */
13072char *alloca ();
13073# endif
13074# endif
13075# endif
13076# endif
13077#endif
13078
503d2be0
AS
13079int
13080main ()
13081{
98418dba 13082char *p = (char *) alloca (1);
503d2be0
AS
13083 ;
13084 return 0;
13085}
13086_ACEOF
13087rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13088if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13089 (eval $ac_link) 2>conftest.er1
503d2be0 13090 ac_status=$?
35996d22
AS
13091 grep -v '^ *+' conftest.er1 >conftest.err
13092 rm -f conftest.er1
13093 cat conftest.err >&5
c0d27fcc 13094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13095 (exit $ac_status); } &&
551ffc27
ST
13096 { ac_try='test -z "$ac_c_werror_flag"
13097 || test ! -s conftest.err'
35996d22
AS
13098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13099 (eval $ac_try) 2>&5
13100 ac_status=$?
13101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13102 (exit $ac_status); }; } &&
13103 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13105 (eval $ac_try) 2>&5
13106 ac_status=$?
c0d27fcc 13107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13108 (exit $ac_status); }; }; then
98418dba 13109 ac_cv_func_alloca_works=yes
ac95a621 13110else
503d2be0 13111 echo "$as_me: failed program was:" >&5
19650fd6
AS
13112sed 's/^/| /' conftest.$ac_ext >&5
13113
98418dba 13114ac_cv_func_alloca_works=no
ac95a621 13115fi
35996d22
AS
13116rm -f conftest.err conftest.$ac_objext \
13117 conftest$ac_exeext conftest.$ac_ext
98418dba 13118fi
c0d27fcc 13119echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 13120echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 13121
98418dba
CW
13122if test $ac_cv_func_alloca_works = yes; then
13123
c0d27fcc 13124cat >>confdefs.h <<\_ACEOF
98418dba 13125#define HAVE_ALLOCA 1
c0d27fcc 13126_ACEOF
98418dba
CW
13127
13128else
13129 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13130# that cause trouble. Some versions do not even contain alloca or
13131# contain a buggy version. If you still want to use their alloca,
13132# use ar to extract alloca.o from them instead of compiling alloca.c.
13133
13134ALLOCA=alloca.$ac_objext
13135
c0d27fcc 13136cat >>confdefs.h <<\_ACEOF
98418dba 13137#define C_ALLOCA 1
c0d27fcc 13138_ACEOF
98418dba 13139
c0d27fcc
MR
13140
13141echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
13142echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
13143if test "${ac_cv_os_cray+set}" = set; then
13144 echo $ECHO_N "(cached) $ECHO_C" >&6
13145else
13146 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13147/* confdefs.h. */
13148_ACEOF
13149cat confdefs.h >>conftest.$ac_ext
13150cat >>conftest.$ac_ext <<_ACEOF
13151/* end confdefs.h. */
98418dba
CW
13152#if defined(CRAY) && ! defined(CRAY2)
13153webecray
13154#else
13155wenotbecray
13156#endif
13157
13158_ACEOF
13159if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13160 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
13161 ac_cv_os_cray=yes
13162else
13163 ac_cv_os_cray=no
13164fi
13165rm -f conftest*
ac95a621 13166
98418dba 13167fi
c0d27fcc 13168echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
13169echo "${ECHO_T}$ac_cv_os_cray" >&6
13170if test $ac_cv_os_cray = yes; then
13171 for ac_func in _getb67 GETB67 getb67; do
13172 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13173echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
13174echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13175if eval "test \"\${$as_ac_var+set}\" = set"; then
13176 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13177else
503d2be0 13178 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13179/* confdefs.h. */
13180_ACEOF
13181cat confdefs.h >>conftest.$ac_ext
13182cat >>conftest.$ac_ext <<_ACEOF
13183/* end confdefs.h. */
35996d22
AS
13184/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13186#define $ac_func innocuous_$ac_func
13187
73b77ee5 13188/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13189 which can conflict with char $ac_func (); below.
13190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13191 <limits.h> exists even on freestanding compilers. */
35996d22 13192
19650fd6
AS
13193#ifdef __STDC__
13194# include <limits.h>
13195#else
13196# include <assert.h>
13197#endif
35996d22
AS
13198
13199#undef $ac_func
13200
73b77ee5 13201/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13202#ifdef __cplusplus
13203extern "C"
19650fd6 13204{
503d2be0 13205#endif
73b77ee5 13206/* We use char because int might match the return type of a gcc2
503d2be0
AS
13207 builtin and then its argument prototype would still apply. */
13208char $ac_func ();
73b77ee5
GM
13209/* The GNU C library defines this for functions which it implements
13210 to always fail with ENOSYS. Some functions are actually named
13211 something starting with __ and the normal name is an alias. */
13212#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13213choke me
13214#else
19650fd6
AS
13215char (*f) () = $ac_func;
13216#endif
13217#ifdef __cplusplus
13218}
73b77ee5
GM
13219#endif
13220
19650fd6
AS
13221int
13222main ()
13223{
13224return f != $ac_func;
503d2be0
AS
13225 ;
13226 return 0;
13227}
13228_ACEOF
13229rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13230if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13231 (eval $ac_link) 2>conftest.er1
503d2be0 13232 ac_status=$?
35996d22
AS
13233 grep -v '^ *+' conftest.er1 >conftest.err
13234 rm -f conftest.er1
13235 cat conftest.err >&5
c0d27fcc 13236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13237 (exit $ac_status); } &&
551ffc27
ST
13238 { ac_try='test -z "$ac_c_werror_flag"
13239 || test ! -s conftest.err'
35996d22
AS
13240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13241 (eval $ac_try) 2>&5
13242 ac_status=$?
13243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13244 (exit $ac_status); }; } &&
13245 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13247 (eval $ac_try) 2>&5
13248 ac_status=$?
c0d27fcc 13249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13250 (exit $ac_status); }; }; then
13251 eval "$as_ac_var=yes"
13252else
13253 echo "$as_me: failed program was:" >&5
19650fd6
AS
13254sed 's/^/| /' conftest.$ac_ext >&5
13255
503d2be0
AS
13256eval "$as_ac_var=no"
13257fi
35996d22
AS
13258rm -f conftest.err conftest.$ac_objext \
13259 conftest$ac_exeext conftest.$ac_ext
503d2be0 13260fi
c0d27fcc 13261echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13262echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13263if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 13264
c0d27fcc 13265cat >>confdefs.h <<_ACEOF
98418dba 13266#define CRAY_STACKSEG_END $ac_func
c0d27fcc 13267_ACEOF
98418dba
CW
13268
13269 break
73b77ee5 13270fi
73b77ee5 13271
98418dba 13272 done
73b77ee5
GM
13273fi
13274
c0d27fcc 13275echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
13276echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
13277if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 13278 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
13279else
13280 if test "$cross_compiling" = yes; then
13281 ac_cv_c_stack_direction=0
73b77ee5 13282else
503d2be0 13283 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13284/* confdefs.h. */
13285_ACEOF
13286cat confdefs.h >>conftest.$ac_ext
13287cat >>conftest.$ac_ext <<_ACEOF
13288/* end confdefs.h. */
503d2be0 13289int
98418dba 13290find_stack_direction ()
503d2be0 13291{
98418dba
CW
13292 static char *addr = 0;
13293 auto char dummy;
13294 if (addr == 0)
13295 {
13296 addr = &dummy;
13297 return find_stack_direction ();
13298 }
73b77ee5 13299 else
98418dba
CW
13300 return (&dummy > addr) ? 1 : -1;
13301}
ba4481b5 13302
503d2be0
AS
13303int
13304main ()
13305{
98418dba 13306 exit (find_stack_direction () < 0);
503d2be0
AS
13307}
13308_ACEOF
98418dba 13309rm -f conftest$ac_exeext
c0d27fcc 13310if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13311 (eval $ac_link) 2>&5
13312 ac_status=$?
c0d27fcc 13313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13314 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 13315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13316 (eval $ac_try) 2>&5
13317 ac_status=$?
c0d27fcc 13318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13319 (exit $ac_status); }; }; then
98418dba 13320 ac_cv_c_stack_direction=1
ba4481b5 13321else
98418dba
CW
13322 echo "$as_me: program exited with status $ac_status" >&5
13323echo "$as_me: failed program was:" >&5
19650fd6
AS
13324sed 's/^/| /' conftest.$ac_ext >&5
13325
c0d27fcc 13326( exit $ac_status )
98418dba 13327ac_cv_c_stack_direction=-1
ba4481b5 13328fi
35996d22 13329rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 13330fi
98418dba 13331fi
c0d27fcc 13332echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
13333echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
13334
c0d27fcc 13335cat >>confdefs.h <<_ACEOF
98418dba 13336#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
13337_ACEOF
13338
ba4481b5 13339
ba4481b5
DL
13340fi
13341
c0d27fcc 13342
98418dba
CW
13343# fmod, logb, and frexp are found in -lm on most systems.
13344# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
13345
c0d27fcc 13346echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
13347echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
13348if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 13349 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13350else
98418dba
CW
13351 ac_check_lib_save_LIBS=$LIBS
13352LIBS="-lm $LIBS"
13353cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13354/* confdefs.h. */
13355_ACEOF
13356cat confdefs.h >>conftest.$ac_ext
13357cat >>conftest.$ac_ext <<_ACEOF
13358/* end confdefs.h. */
ba4481b5 13359
98418dba
CW
13360/* Override any gcc2 internal prototype to avoid an error. */
13361#ifdef __cplusplus
13362extern "C"
13363#endif
13364/* We use char because int might match the return type of a gcc2
13365 builtin and then its argument prototype would still apply. */
13366char sqrt ();
503d2be0
AS
13367int
13368main ()
13369{
98418dba 13370sqrt ();
503d2be0
AS
13371 ;
13372 return 0;
13373}
13374_ACEOF
13375rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13376if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13377 (eval $ac_link) 2>conftest.er1
503d2be0 13378 ac_status=$?
35996d22
AS
13379 grep -v '^ *+' conftest.er1 >conftest.err
13380 rm -f conftest.er1
13381 cat conftest.err >&5
c0d27fcc 13382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13383 (exit $ac_status); } &&
551ffc27
ST
13384 { ac_try='test -z "$ac_c_werror_flag"
13385 || test ! -s conftest.err'
35996d22
AS
13386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13387 (eval $ac_try) 2>&5
13388 ac_status=$?
13389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13390 (exit $ac_status); }; } &&
13391 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13393 (eval $ac_try) 2>&5
13394 ac_status=$?
c0d27fcc 13395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13396 (exit $ac_status); }; }; then
98418dba 13397 ac_cv_lib_m_sqrt=yes
ba4481b5 13398else
503d2be0 13399 echo "$as_me: failed program was:" >&5
19650fd6
AS
13400sed 's/^/| /' conftest.$ac_ext >&5
13401
98418dba 13402ac_cv_lib_m_sqrt=no
ba4481b5 13403fi
35996d22
AS
13404rm -f conftest.err conftest.$ac_objext \
13405 conftest$ac_exeext conftest.$ac_ext
98418dba 13406LIBS=$ac_check_lib_save_LIBS
ba4481b5 13407fi
c0d27fcc 13408echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
13409echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
13410if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 13411 cat >>confdefs.h <<_ACEOF
98418dba 13412#define HAVE_LIBM 1
c0d27fcc 13413_ACEOF
98418dba
CW
13414
13415 LIBS="-lm $LIBS"
ba4481b5 13416
ba4481b5
DL
13417fi
13418
c0d27fcc 13419
55597d70
DL
13420# Check for mail-locking functions in a "mail" library. Probably this should
13421# have the same check as for liblockfile below.
98418dba 13422
c0d27fcc 13423echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
13424echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
13425if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 13426 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13427else
98418dba
CW
13428 ac_check_lib_save_LIBS=$LIBS
13429LIBS="-lmail $LIBS"
13430cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13431/* confdefs.h. */
13432_ACEOF
13433cat confdefs.h >>conftest.$ac_ext
13434cat >>conftest.$ac_ext <<_ACEOF
13435/* end confdefs.h. */
98418dba
CW
13436
13437/* Override any gcc2 internal prototype to avoid an error. */
13438#ifdef __cplusplus
13439extern "C"
13440#endif
13441/* We use char because int might match the return type of a gcc2
13442 builtin and then its argument prototype would still apply. */
13443char maillock ();
503d2be0
AS
13444int
13445main ()
13446{
98418dba 13447maillock ();
503d2be0
AS
13448 ;
13449 return 0;
13450}
13451_ACEOF
13452rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13453if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13454 (eval $ac_link) 2>conftest.er1
503d2be0 13455 ac_status=$?
35996d22
AS
13456 grep -v '^ *+' conftest.er1 >conftest.err
13457 rm -f conftest.er1
13458 cat conftest.err >&5
c0d27fcc 13459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13460 (exit $ac_status); } &&
551ffc27
ST
13461 { ac_try='test -z "$ac_c_werror_flag"
13462 || test ! -s conftest.err'
35996d22
AS
13463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13464 (eval $ac_try) 2>&5
13465 ac_status=$?
13466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13467 (exit $ac_status); }; } &&
13468 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13470 (eval $ac_try) 2>&5
13471 ac_status=$?
c0d27fcc 13472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13473 (exit $ac_status); }; }; then
98418dba 13474 ac_cv_lib_mail_maillock=yes
ba4481b5 13475else
503d2be0 13476 echo "$as_me: failed program was:" >&5
19650fd6
AS
13477sed 's/^/| /' conftest.$ac_ext >&5
13478
98418dba 13479ac_cv_lib_mail_maillock=no
ba4481b5 13480fi
35996d22
AS
13481rm -f conftest.err conftest.$ac_objext \
13482 conftest$ac_exeext conftest.$ac_ext
98418dba 13483LIBS=$ac_check_lib_save_LIBS
ba4481b5 13484fi
c0d27fcc 13485echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
13486echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
13487if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 13488 cat >>confdefs.h <<_ACEOF
98418dba 13489#define HAVE_LIBMAIL 1
c0d27fcc 13490_ACEOF
ba4481b5 13491
98418dba 13492 LIBS="-lmail $LIBS"
ba4481b5 13493
98418dba 13494fi
ba4481b5 13495
c0d27fcc
MR
13496
13497echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
13498echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
13499if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 13500 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13501else
503d2be0 13502 ac_check_lib_save_LIBS=$LIBS
98418dba 13503LIBS="-llockfile $LIBS"
503d2be0 13504cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13505/* confdefs.h. */
13506_ACEOF
13507cat confdefs.h >>conftest.$ac_ext
13508cat >>conftest.$ac_ext <<_ACEOF
13509/* end confdefs.h. */
503d2be0 13510
ba4481b5 13511/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13512#ifdef __cplusplus
13513extern "C"
13514#endif
ba4481b5 13515/* We use char because int might match the return type of a gcc2
503d2be0 13516 builtin and then its argument prototype would still apply. */
98418dba 13517char maillock ();
503d2be0
AS
13518int
13519main ()
13520{
98418dba 13521maillock ();
503d2be0
AS
13522 ;
13523 return 0;
13524}
13525_ACEOF
13526rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13527if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13528 (eval $ac_link) 2>conftest.er1
503d2be0 13529 ac_status=$?
35996d22
AS
13530 grep -v '^ *+' conftest.er1 >conftest.err
13531 rm -f conftest.er1
13532 cat conftest.err >&5
c0d27fcc 13533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13534 (exit $ac_status); } &&
551ffc27
ST
13535 { ac_try='test -z "$ac_c_werror_flag"
13536 || test ! -s conftest.err'
35996d22
AS
13537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13538 (eval $ac_try) 2>&5
13539 ac_status=$?
13540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13541 (exit $ac_status); }; } &&
13542 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13544 (eval $ac_try) 2>&5
13545 ac_status=$?
c0d27fcc 13546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13547 (exit $ac_status); }; }; then
98418dba 13548 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
13549else
13550 echo "$as_me: failed program was:" >&5
19650fd6
AS
13551sed 's/^/| /' conftest.$ac_ext >&5
13552
98418dba
CW
13553ac_cv_lib_lockfile_maillock=no
13554fi
35996d22
AS
13555rm -f conftest.err conftest.$ac_objext \
13556 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13557LIBS=$ac_check_lib_save_LIBS
13558fi
c0d27fcc 13559echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
13560echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
13561if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 13562 cat >>confdefs.h <<_ACEOF
98418dba 13563#define HAVE_LIBLOCKFILE 1
c0d27fcc 13564_ACEOF
98418dba
CW
13565
13566 LIBS="-llockfile $LIBS"
13567
13568fi
13569
13570# If we have the shared liblockfile, assume we must use it for mail
13571# locking (e.g. Debian). If we couldn't link against liblockfile
13572# (no liblockfile.a installed), ensure that we don't need to.
13573if test "$ac_cv_lib_lockfile_maillock" = no; then
13574 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13575set dummy liblockfile.so; ac_word=$2
c0d27fcc 13576echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
13577echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13578if test "${ac_cv_prog_liblockfile+set}" = set; then
13579 echo $ECHO_N "(cached) $ECHO_C" >&6
13580else
13581 if test -n "$liblockfile"; then
13582 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13583else
c0d27fcc 13584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
13585as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13586for as_dir in $as_dummy
c0d27fcc
MR
13587do
13588 IFS=$as_save_IFS
13589 test -z "$as_dir" && as_dir=.
13590 for ac_exec_ext in '' $ac_executable_extensions; do
13591 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13592 ac_cv_prog_liblockfile="yes"
13593 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13594 break 2
13595 fi
13596done
98418dba
CW
13597done
13598
13599 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 13600fi
503d2be0 13601fi
98418dba
CW
13602liblockfile=$ac_cv_prog_liblockfile
13603if test -n "$liblockfile"; then
c0d27fcc 13604 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
13605echo "${ECHO_T}$liblockfile" >&6
13606else
c0d27fcc 13607 echo "$as_me:$LINENO: result: no" >&5
98418dba 13608echo "${ECHO_T}no" >&6
ba4481b5
DL
13609fi
13610
98418dba 13611 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 13612 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
13613This probably means that movemail could lose mail.
13614There may be a \`development' package to install containing liblockfile." >&5
13615echo "$as_me: error: Shared liblockfile found but can't link against it.
13616This probably means that movemail could lose mail.
13617There may be a \`development' package to install containing liblockfile." >&2;}
13618 { (exit 1); exit 1; }; }
98418dba 13619 else :
55597d70 13620 fi
98418dba 13621fi
503d2be0 13622
98418dba
CW
13623for ac_func in touchlock
13624do
13625as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13626echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
13627echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13628if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13629 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 13630else
98418dba 13631 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13632/* confdefs.h. */
13633_ACEOF
13634cat confdefs.h >>conftest.$ac_ext
13635cat >>conftest.$ac_ext <<_ACEOF
13636/* end confdefs.h. */
35996d22
AS
13637/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13638 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13639#define $ac_func innocuous_$ac_func
13640
98418dba 13641/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13642 which can conflict with char $ac_func (); below.
13643 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13644 <limits.h> exists even on freestanding compilers. */
35996d22 13645
19650fd6
AS
13646#ifdef __STDC__
13647# include <limits.h>
13648#else
13649# include <assert.h>
13650#endif
35996d22
AS
13651
13652#undef $ac_func
13653
457b792c 13654/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13655#ifdef __cplusplus
13656extern "C"
19650fd6 13657{
503d2be0 13658#endif
457b792c 13659/* We use char because int might match the return type of a gcc2
503d2be0 13660 builtin and then its argument prototype would still apply. */
98418dba 13661char $ac_func ();
98418dba
CW
13662/* The GNU C library defines this for functions which it implements
13663 to always fail with ENOSYS. Some functions are actually named
13664 something starting with __ and the normal name is an alias. */
13665#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13666choke me
13667#else
19650fd6
AS
13668char (*f) () = $ac_func;
13669#endif
13670#ifdef __cplusplus
13671}
cd958eb3
MB
13672#endif
13673
19650fd6
AS
13674int
13675main ()
13676{
13677return f != $ac_func;
503d2be0
AS
13678 ;
13679 return 0;
13680}
13681_ACEOF
13682rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13683if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13684 (eval $ac_link) 2>conftest.er1
503d2be0 13685 ac_status=$?
35996d22
AS
13686 grep -v '^ *+' conftest.er1 >conftest.err
13687 rm -f conftest.er1
13688 cat conftest.err >&5
c0d27fcc 13689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13690 (exit $ac_status); } &&
551ffc27
ST
13691 { ac_try='test -z "$ac_c_werror_flag"
13692 || test ! -s conftest.err'
35996d22
AS
13693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13694 (eval $ac_try) 2>&5
13695 ac_status=$?
13696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13697 (exit $ac_status); }; } &&
13698 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13700 (eval $ac_try) 2>&5
13701 ac_status=$?
c0d27fcc 13702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13703 (exit $ac_status); }; }; then
98418dba 13704 eval "$as_ac_var=yes"
503d2be0
AS
13705else
13706 echo "$as_me: failed program was:" >&5
19650fd6
AS
13707sed 's/^/| /' conftest.$ac_ext >&5
13708
98418dba 13709eval "$as_ac_var=no"
503d2be0 13710fi
35996d22
AS
13711rm -f conftest.err conftest.$ac_objext \
13712 conftest$ac_exeext conftest.$ac_ext
503d2be0 13713fi
c0d27fcc 13714echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
13715echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13716if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13717 cat >>confdefs.h <<_ACEOF
98418dba 13718#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13719_ACEOF
457b792c 13720
457b792c 13721fi
98418dba 13722done
457b792c 13723
c0d27fcc 13724
98418dba
CW
13725for ac_header in maillock.h
13726do
13727as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
13728if eval "test \"\${$as_ac_Header+set}\" = set"; then
13729 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
13730echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13731if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 13732 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13733fi
13734echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13735echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 13736else
c0d27fcc
MR
13737 # Is the header compilable?
13738echo "$as_me:$LINENO: checking $ac_header usability" >&5
13739echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13740cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13741/* confdefs.h. */
13742_ACEOF
13743cat confdefs.h >>conftest.$ac_ext
13744cat >>conftest.$ac_ext <<_ACEOF
13745/* end confdefs.h. */
c0d27fcc
MR
13746$ac_includes_default
13747#include <$ac_header>
13748_ACEOF
13749rm -f conftest.$ac_objext
13750if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 13751 (eval $ac_compile) 2>conftest.er1
c0d27fcc 13752 ac_status=$?
35996d22
AS
13753 grep -v '^ *+' conftest.er1 >conftest.err
13754 rm -f conftest.er1
13755 cat conftest.err >&5
c0d27fcc
MR
13756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13757 (exit $ac_status); } &&
551ffc27
ST
13758 { ac_try='test -z "$ac_c_werror_flag"
13759 || test ! -s conftest.err'
35996d22
AS
13760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13761 (eval $ac_try) 2>&5
13762 ac_status=$?
13763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13764 (exit $ac_status); }; } &&
13765 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
13771 ac_header_compiler=yes
13772else
13773 echo "$as_me: failed program was:" >&5
19650fd6
AS
13774sed 's/^/| /' conftest.$ac_ext >&5
13775
c0d27fcc
MR
13776ac_header_compiler=no
13777fi
35996d22 13778rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
13779echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13780echo "${ECHO_T}$ac_header_compiler" >&6
13781
13782# Is the header present?
13783echo "$as_me:$LINENO: checking $ac_header presence" >&5
13784echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13785cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13786/* confdefs.h. */
13787_ACEOF
13788cat confdefs.h >>conftest.$ac_ext
13789cat >>conftest.$ac_ext <<_ACEOF
13790/* end confdefs.h. */
98418dba 13791#include <$ac_header>
503d2be0 13792_ACEOF
c0d27fcc 13793if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 13794 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 13795 ac_status=$?
6bae0ccf 13796 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13797 rm -f conftest.er1
13798 cat conftest.err >&5
c0d27fcc 13799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13800 (exit $ac_status); } >/dev/null; then
13801 if test -s conftest.err; then
13802 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 13803 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
13804 else
13805 ac_cpp_err=
13806 fi
503d2be0 13807else
98418dba 13808 ac_cpp_err=yes
503d2be0 13809fi
98418dba 13810if test -z "$ac_cpp_err"; then
c0d27fcc 13811 ac_header_preproc=yes
98418dba
CW
13812else
13813 echo "$as_me: failed program was:" >&5
19650fd6
AS
13814sed 's/^/| /' conftest.$ac_ext >&5
13815
c0d27fcc 13816 ac_header_preproc=no
503d2be0 13817fi
98418dba 13818rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13819echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13820echo "${ECHO_T}$ac_header_preproc" >&6
13821
13822# So? What about this header?
35996d22
AS
13823case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13824 yes:no: )
c0d27fcc
MR
13825 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13826echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
13827 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13828echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13829 ac_header_preproc=yes
19650fd6 13830 ;;
35996d22 13831 no:yes:* )
c0d27fcc
MR
13832 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13833echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
13834 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13835echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13836 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13837echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13838 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13839echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13840 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13841echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
13842 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13843echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
13844 (
13845 cat <<\_ASBOX
35996d22
AS
13846## ------------------------------------------ ##
13847## Report this to the AC_PACKAGE_NAME lists. ##
13848## ------------------------------------------ ##
19650fd6
AS
13849_ASBOX
13850 ) |
13851 sed "s/^/$as_me: WARNING: /" >&2
13852 ;;
c0d27fcc
MR
13853esac
13854echo "$as_me:$LINENO: checking for $ac_header" >&5
13855echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13856if eval "test \"\${$as_ac_Header+set}\" = set"; then
13857 echo $ECHO_N "(cached) $ECHO_C" >&6
13858else
35996d22 13859 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 13860fi
c0d27fcc 13861echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 13862echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
13863
13864fi
98418dba 13865if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 13866 cat >>confdefs.h <<_ACEOF
98418dba 13867#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 13868_ACEOF
48d4b120 13869
ba4481b5 13870fi
c0d27fcc 13871
98418dba
CW
13872done
13873
c0d27fcc
MR
13874
13875
13876
13877
13878
13879
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
22044edf
DL
13929
13930
c0d27fcc 13931
b0e44248
RB
13932
13933
973a76b1
DL
13934
13935
13936
cd958eb3 13937
25ca0bca 13938
ea92fc9f 13939
c0d27fcc
MR
13940
13941
98418dba 13942for ac_func in gethostname getdomainname dup2 \
ea92fc9f 13943rename closedir mkdir rmdir sysinfo getrusage \
98418dba
CW
13944random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
13945strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 13946utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
13947__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
13948sendto recvfrom getsockopt setsockopt getsockname getpeername \
b0e44248 13949gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
4489ece2 13950memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
13951do
13952as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13953echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
13954echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13955if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13956 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13957else
503d2be0 13958 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13959/* confdefs.h. */
13960_ACEOF
13961cat confdefs.h >>conftest.$ac_ext
13962cat >>conftest.$ac_ext <<_ACEOF
13963/* end confdefs.h. */
35996d22
AS
13964/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13965 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13966#define $ac_func innocuous_$ac_func
13967
98418dba 13968/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13969 which can conflict with char $ac_func (); below.
13970 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13971 <limits.h> exists even on freestanding compilers. */
35996d22 13972
19650fd6
AS
13973#ifdef __STDC__
13974# include <limits.h>
13975#else
13976# include <assert.h>
13977#endif
35996d22
AS
13978
13979#undef $ac_func
13980
ba4481b5 13981/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13982#ifdef __cplusplus
13983extern "C"
19650fd6 13984{
503d2be0 13985#endif
ba4481b5 13986/* We use char because int might match the return type of a gcc2
503d2be0 13987 builtin and then its argument prototype would still apply. */
98418dba 13988char $ac_func ();
98418dba
CW
13989/* The GNU C library defines this for functions which it implements
13990 to always fail with ENOSYS. Some functions are actually named
13991 something starting with __ and the normal name is an alias. */
13992#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13993choke me
13994#else
19650fd6
AS
13995char (*f) () = $ac_func;
13996#endif
13997#ifdef __cplusplus
13998}
98418dba
CW
13999#endif
14000
19650fd6
AS
14001int
14002main ()
14003{
14004return f != $ac_func;
503d2be0
AS
14005 ;
14006 return 0;
14007}
14008_ACEOF
14009rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14011 (eval $ac_link) 2>conftest.er1
503d2be0 14012 ac_status=$?
35996d22
AS
14013 grep -v '^ *+' conftest.er1 >conftest.err
14014 rm -f conftest.er1
14015 cat conftest.err >&5
c0d27fcc 14016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14017 (exit $ac_status); } &&
551ffc27
ST
14018 { ac_try='test -z "$ac_c_werror_flag"
14019 || test ! -s conftest.err'
35996d22
AS
14020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14021 (eval $ac_try) 2>&5
14022 ac_status=$?
14023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14024 (exit $ac_status); }; } &&
14025 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14027 (eval $ac_try) 2>&5
14028 ac_status=$?
c0d27fcc 14029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14030 (exit $ac_status); }; }; then
98418dba 14031 eval "$as_ac_var=yes"
503d2be0
AS
14032else
14033 echo "$as_me: failed program was:" >&5
19650fd6
AS
14034sed 's/^/| /' conftest.$ac_ext >&5
14035
98418dba 14036eval "$as_ac_var=no"
503d2be0 14037fi
35996d22
AS
14038rm -f conftest.err conftest.$ac_objext \
14039 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14040fi
c0d27fcc 14041echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14042echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14043if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14044 cat >>confdefs.h <<_ACEOF
98418dba 14045#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14046_ACEOF
ba4481b5 14047
ba4481b5 14048fi
98418dba 14049done
ba4481b5 14050
c0d27fcc
MR
14051
14052
98418dba
CW
14053for ac_header in sys/un.h
14054do
14055as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14056if eval "test \"\${$as_ac_Header+set}\" = set"; then
14057 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
14058echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14059if eval "test \"\${$as_ac_Header+set}\" = set"; then
14060 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14061fi
14062echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14063echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 14064else
c0d27fcc
MR
14065 # Is the header compilable?
14066echo "$as_me:$LINENO: checking $ac_header usability" >&5
14067echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14068cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14069/* confdefs.h. */
14070_ACEOF
14071cat confdefs.h >>conftest.$ac_ext
14072cat >>conftest.$ac_ext <<_ACEOF
14073/* end confdefs.h. */
c0d27fcc
MR
14074$ac_includes_default
14075#include <$ac_header>
14076_ACEOF
14077rm -f conftest.$ac_objext
14078if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 14079 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14080 ac_status=$?
35996d22
AS
14081 grep -v '^ *+' conftest.er1 >conftest.err
14082 rm -f conftest.er1
14083 cat conftest.err >&5
c0d27fcc
MR
14084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14085 (exit $ac_status); } &&
551ffc27
ST
14086 { ac_try='test -z "$ac_c_werror_flag"
14087 || test ! -s conftest.err'
35996d22
AS
14088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14089 (eval $ac_try) 2>&5
14090 ac_status=$?
14091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14092 (exit $ac_status); }; } &&
14093 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
14099 ac_header_compiler=yes
14100else
14101 echo "$as_me: failed program was:" >&5
19650fd6
AS
14102sed 's/^/| /' conftest.$ac_ext >&5
14103
c0d27fcc
MR
14104ac_header_compiler=no
14105fi
35996d22 14106rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14107echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14108echo "${ECHO_T}$ac_header_compiler" >&6
14109
14110# Is the header present?
14111echo "$as_me:$LINENO: checking $ac_header presence" >&5
14112echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14113cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14114/* confdefs.h. */
14115_ACEOF
14116cat confdefs.h >>conftest.$ac_ext
14117cat >>conftest.$ac_ext <<_ACEOF
14118/* end confdefs.h. */
98418dba 14119#include <$ac_header>
503d2be0 14120_ACEOF
c0d27fcc 14121if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14122 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14123 ac_status=$?
6bae0ccf 14124 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14125 rm -f conftest.er1
14126 cat conftest.err >&5
c0d27fcc 14127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14128 (exit $ac_status); } >/dev/null; then
14129 if test -s conftest.err; then
14130 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 14131 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14132 else
14133 ac_cpp_err=
14134 fi
14135else
14136 ac_cpp_err=yes
14137fi
14138if test -z "$ac_cpp_err"; then
c0d27fcc 14139 ac_header_preproc=yes
ba4481b5 14140else
503d2be0 14141 echo "$as_me: failed program was:" >&5
19650fd6
AS
14142sed 's/^/| /' conftest.$ac_ext >&5
14143
c0d27fcc 14144 ac_header_preproc=no
ba4481b5 14145fi
503d2be0 14146rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14147echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14148echo "${ECHO_T}$ac_header_preproc" >&6
14149
14150# So? What about this header?
35996d22
AS
14151case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14152 yes:no: )
c0d27fcc
MR
14153 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14154echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
14155 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14156echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14157 ac_header_preproc=yes
19650fd6 14158 ;;
35996d22 14159 no:yes:* )
c0d27fcc
MR
14160 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14161echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
14162 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14163echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14164 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14165echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14166 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14167echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14168 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14169echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
14170 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14171echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14172 (
14173 cat <<\_ASBOX
35996d22
AS
14174## ------------------------------------------ ##
14175## Report this to the AC_PACKAGE_NAME lists. ##
14176## ------------------------------------------ ##
19650fd6
AS
14177_ASBOX
14178 ) |
14179 sed "s/^/$as_me: WARNING: /" >&2
14180 ;;
c0d27fcc
MR
14181esac
14182echo "$as_me:$LINENO: checking for $ac_header" >&5
14183echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14184if eval "test \"\${$as_ac_Header+set}\" = set"; then
14185 echo $ECHO_N "(cached) $ECHO_C" >&6
14186else
35996d22 14187 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14188fi
c0d27fcc 14189echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 14190echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14191
14192fi
925c2f3f 14193if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14194 cat >>confdefs.h <<_ACEOF
925c2f3f 14195#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14196_ACEOF
503d2be0 14197
925c2f3f 14198fi
c0d27fcc 14199
925c2f3f
EZ
14200done
14201
c0d27fcc
MR
14202
14203
14204
35996d22
AS
14205
14206for ac_header in stdlib.h sys/time.h unistd.h
925c2f3f
EZ
14207do
14208as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14209if eval "test \"\${$as_ac_Header+set}\" = set"; then
14210 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
14211echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14212if eval "test \"\${$as_ac_Header+set}\" = set"; then
14213 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14214fi
14215echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14216echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 14217else
c0d27fcc
MR
14218 # Is the header compilable?
14219echo "$as_me:$LINENO: checking $ac_header usability" >&5
14220echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14221cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14222/* confdefs.h. */
14223_ACEOF
14224cat confdefs.h >>conftest.$ac_ext
14225cat >>conftest.$ac_ext <<_ACEOF
14226/* end confdefs.h. */
c0d27fcc
MR
14227$ac_includes_default
14228#include <$ac_header>
14229_ACEOF
14230rm -f conftest.$ac_objext
14231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 14232 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14233 ac_status=$?
35996d22
AS
14234 grep -v '^ *+' conftest.er1 >conftest.err
14235 rm -f conftest.er1
14236 cat conftest.err >&5
c0d27fcc
MR
14237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14238 (exit $ac_status); } &&
551ffc27
ST
14239 { ac_try='test -z "$ac_c_werror_flag"
14240 || test ! -s conftest.err'
35996d22
AS
14241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14242 (eval $ac_try) 2>&5
14243 ac_status=$?
14244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14245 (exit $ac_status); }; } &&
14246 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
14252 ac_header_compiler=yes
14253else
14254 echo "$as_me: failed program was:" >&5
19650fd6
AS
14255sed 's/^/| /' conftest.$ac_ext >&5
14256
c0d27fcc
MR
14257ac_header_compiler=no
14258fi
35996d22 14259rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14260echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14261echo "${ECHO_T}$ac_header_compiler" >&6
14262
14263# Is the header present?
14264echo "$as_me:$LINENO: checking $ac_header presence" >&5
14265echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14266cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14267/* confdefs.h. */
14268_ACEOF
14269cat confdefs.h >>conftest.$ac_ext
14270cat >>conftest.$ac_ext <<_ACEOF
14271/* end confdefs.h. */
98418dba 14272#include <$ac_header>
503d2be0 14273_ACEOF
c0d27fcc 14274if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14275 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14276 ac_status=$?
6bae0ccf 14277 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14278 rm -f conftest.er1
14279 cat conftest.err >&5
c0d27fcc 14280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14281 (exit $ac_status); } >/dev/null; then
14282 if test -s conftest.err; then
14283 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 14284 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14285 else
14286 ac_cpp_err=
14287 fi
14288else
14289 ac_cpp_err=yes
14290fi
14291if test -z "$ac_cpp_err"; then
c0d27fcc 14292 ac_header_preproc=yes
98418dba
CW
14293else
14294 echo "$as_me: failed program was:" >&5
19650fd6
AS
14295sed 's/^/| /' conftest.$ac_ext >&5
14296
c0d27fcc 14297 ac_header_preproc=no
98418dba
CW
14298fi
14299rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14300echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14301echo "${ECHO_T}$ac_header_preproc" >&6
14302
14303# So? What about this header?
35996d22
AS
14304case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14305 yes:no: )
c0d27fcc
MR
14306 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14307echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
14308 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14309echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14310 ac_header_preproc=yes
19650fd6 14311 ;;
35996d22 14312 no:yes:* )
c0d27fcc
MR
14313 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14314echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
14315 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14316echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14317 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14318echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14319 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14320echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14321 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14322echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
14323 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14324echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14325 (
14326 cat <<\_ASBOX
35996d22
AS
14327## ------------------------------------------ ##
14328## Report this to the AC_PACKAGE_NAME lists. ##
14329## ------------------------------------------ ##
19650fd6
AS
14330_ASBOX
14331 ) |
14332 sed "s/^/$as_me: WARNING: /" >&2
14333 ;;
c0d27fcc
MR
14334esac
14335echo "$as_me:$LINENO: checking for $ac_header" >&5
14336echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14337if eval "test \"\${$as_ac_Header+set}\" = set"; then
14338 echo $ECHO_N "(cached) $ECHO_C" >&6
14339else
35996d22 14340 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 14341fi
c0d27fcc 14342echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14343echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14344
14345fi
98418dba 14346if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14347 cat >>confdefs.h <<_ACEOF
98418dba 14348#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14349_ACEOF
98418dba
CW
14350
14351fi
c0d27fcc 14352
98418dba
CW
14353done
14354
c0d27fcc 14355
98418dba
CW
14356for ac_func in alarm
14357do
14358as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14359echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14360echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14361if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14362 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14363else
98418dba 14364 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14365/* confdefs.h. */
14366_ACEOF
14367cat confdefs.h >>conftest.$ac_ext
14368cat >>conftest.$ac_ext <<_ACEOF
14369/* end confdefs.h. */
35996d22
AS
14370/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14371 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14372#define $ac_func innocuous_$ac_func
14373
98418dba 14374/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14375 which can conflict with char $ac_func (); below.
14376 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14377 <limits.h> exists even on freestanding compilers. */
35996d22 14378
19650fd6
AS
14379#ifdef __STDC__
14380# include <limits.h>
14381#else
14382# include <assert.h>
14383#endif
35996d22
AS
14384
14385#undef $ac_func
14386
ba4481b5 14387/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14388#ifdef __cplusplus
14389extern "C"
19650fd6 14390{
503d2be0 14391#endif
ba4481b5 14392/* We use char because int might match the return type of a gcc2
503d2be0 14393 builtin and then its argument prototype would still apply. */
98418dba 14394char $ac_func ();
98418dba
CW
14395/* The GNU C library defines this for functions which it implements
14396 to always fail with ENOSYS. Some functions are actually named
14397 something starting with __ and the normal name is an alias. */
14398#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14399choke me
14400#else
19650fd6
AS
14401char (*f) () = $ac_func;
14402#endif
14403#ifdef __cplusplus
14404}
98418dba
CW
14405#endif
14406
19650fd6
AS
14407int
14408main ()
14409{
14410return f != $ac_func;
503d2be0
AS
14411 ;
14412 return 0;
14413}
14414_ACEOF
14415rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14416if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14417 (eval $ac_link) 2>conftest.er1
503d2be0 14418 ac_status=$?
35996d22
AS
14419 grep -v '^ *+' conftest.er1 >conftest.err
14420 rm -f conftest.er1
14421 cat conftest.err >&5
c0d27fcc 14422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14423 (exit $ac_status); } &&
551ffc27
ST
14424 { ac_try='test -z "$ac_c_werror_flag"
14425 || test ! -s conftest.err'
35996d22
AS
14426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14427 (eval $ac_try) 2>&5
14428 ac_status=$?
14429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14430 (exit $ac_status); }; } &&
14431 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14433 (eval $ac_try) 2>&5
14434 ac_status=$?
c0d27fcc 14435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14436 (exit $ac_status); }; }; then
98418dba 14437 eval "$as_ac_var=yes"
503d2be0
AS
14438else
14439 echo "$as_me: failed program was:" >&5
19650fd6
AS
14440sed 's/^/| /' conftest.$ac_ext >&5
14441
98418dba 14442eval "$as_ac_var=no"
503d2be0 14443fi
35996d22
AS
14444rm -f conftest.err conftest.$ac_objext \
14445 conftest$ac_exeext conftest.$ac_ext
ffe36136 14446fi
c0d27fcc 14447echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14448echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14449if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14450 cat >>confdefs.h <<_ACEOF
98418dba 14451#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14452_ACEOF
ffe36136 14453
ba4481b5 14454fi
98418dba 14455done
ba4481b5 14456
c0d27fcc 14457echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
14458echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
14459if test "${ac_cv_func_working_mktime+set}" = set; then
14460 echo $ECHO_N "(cached) $ECHO_C" >&6
14461else
14462 if test "$cross_compiling" = yes; then
14463 ac_cv_func_working_mktime=no
14464else
14465 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14466/* confdefs.h. */
14467_ACEOF
14468cat confdefs.h >>conftest.$ac_ext
14469cat >>conftest.$ac_ext <<_ACEOF
14470/* end confdefs.h. */
98418dba
CW
14471/* Test program from Paul Eggert and Tony Leneis. */
14472#if TIME_WITH_SYS_TIME
14473# include <sys/time.h>
14474# include <time.h>
14475#else
14476# if HAVE_SYS_TIME_H
14477# include <sys/time.h>
14478# else
14479# include <time.h>
14480# endif
14481#endif
ba4481b5 14482
35996d22
AS
14483#if HAVE_STDLIB_H
14484# include <stdlib.h>
14485#endif
14486
98418dba
CW
14487#if HAVE_UNISTD_H
14488# include <unistd.h>
14489#endif
ba4481b5 14490
98418dba
CW
14491#if !HAVE_ALARM
14492# define alarm(X) /* empty */
14493#endif
df645f7c 14494
98418dba
CW
14495/* Work around redefinition to rpl_putenv by other config tests. */
14496#undef putenv
df645f7c 14497
98418dba 14498static time_t time_t_max;
35996d22 14499static time_t time_t_min;
df645f7c 14500
98418dba 14501/* Values we'll use to set the TZ environment variable. */
35996d22
AS
14502static char *tz_strings[] = {
14503 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
14504 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
14505};
14506#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 14507
98418dba
CW
14508/* Fail if mktime fails to convert a date in the spring-forward gap.
14509 Based on a problem report from Andreas Jaeger. */
14510static void
14511spring_forward_gap ()
14512{
14513 /* glibc (up to about 1998-10-07) failed this test. */
14514 struct tm tm;
14515
14516 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
14517 instead of "TZ=America/Vancouver" in order to detect the bug even
14518 on systems that don't support the Olson extension, or don't have the
14519 full zoneinfo tables installed. */
14520 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
14521
14522 tm.tm_year = 98;
14523 tm.tm_mon = 3;
14524 tm.tm_mday = 5;
14525 tm.tm_hour = 2;
14526 tm.tm_min = 0;
14527 tm.tm_sec = 0;
14528 tm.tm_isdst = -1;
14529 if (mktime (&tm) == (time_t)-1)
14530 exit (1);
14531}
14532
14533static void
35996d22 14534mktime_test1 (now)
98418dba
CW
14535 time_t now;
14536{
14537 struct tm *lt;
14538 if ((lt = localtime (&now)) && mktime (lt) != now)
14539 exit (1);
35996d22
AS
14540}
14541
14542static void
14543mktime_test (now)
14544 time_t now;
14545{
14546 mktime_test1 (now);
14547 mktime_test1 ((time_t) (time_t_max - now));
14548 mktime_test1 ((time_t) (time_t_min + now));
98418dba
CW
14549}
14550
14551static void
14552irix_6_4_bug ()
14553{
14554 /* Based on code from Ariel Faigon. */
14555 struct tm tm;
14556 tm.tm_year = 96;
14557 tm.tm_mon = 3;
14558 tm.tm_mday = 0;
14559 tm.tm_hour = 0;
14560 tm.tm_min = 0;
14561 tm.tm_sec = 0;
14562 tm.tm_isdst = -1;
14563 mktime (&tm);
14564 if (tm.tm_mon != 2 || tm.tm_mday != 31)
14565 exit (1);
14566}
14567
14568static void
14569bigtime_test (j)
14570 int j;
14571{
14572 struct tm tm;
14573 time_t now;
14574 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
14575 now = mktime (&tm);
14576 if (now != (time_t) -1)
14577 {
14578 struct tm *lt = localtime (&now);
14579 if (! (lt
14580 && lt->tm_year == tm.tm_year
14581 && lt->tm_mon == tm.tm_mon
14582 && lt->tm_mday == tm.tm_mday
14583 && lt->tm_hour == tm.tm_hour
14584 && lt->tm_min == tm.tm_min
14585 && lt->tm_sec == tm.tm_sec
14586 && lt->tm_yday == tm.tm_yday
14587 && lt->tm_wday == tm.tm_wday
14588 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
14589 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
14590 exit (1);
14591 }
14592}
14593
14594int
14595main ()
14596{
14597 time_t t, delta;
14598 int i, j;
14599
14600 /* This test makes some buggy mktime implementations loop.
14601 Give up after 60 seconds; a mktime slower than that
14602 isn't worth using anyway. */
14603 alarm (60);
14604
14605 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
14606 continue;
14607 time_t_max--;
35996d22
AS
14608 if ((time_t) -1 < 0)
14609 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
14610 continue;
98418dba
CW
14611 delta = time_t_max / 997; /* a suitable prime number */
14612 for (i = 0; i < N_STRINGS; i++)
14613 {
14614 if (tz_strings[i])
14615 putenv (tz_strings[i]);
503d2be0 14616
98418dba
CW
14617 for (t = 0; t <= time_t_max - delta; t += delta)
14618 mktime_test (t);
35996d22
AS
14619 mktime_test ((time_t) 1);
14620 mktime_test ((time_t) (60 * 60));
14621 mktime_test ((time_t) (60 * 60 * 24));
98418dba
CW
14622
14623 for (j = 1; 0 < j; j *= 2)
35996d22 14624 bigtime_test (j);
98418dba
CW
14625 bigtime_test (j - 1);
14626 }
14627 irix_6_4_bug ();
14628 spring_forward_gap ();
14629 exit (0);
503d2be0
AS
14630}
14631_ACEOF
98418dba 14632rm -f conftest$ac_exeext
c0d27fcc 14633if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14634 (eval $ac_link) 2>&5
14635 ac_status=$?
c0d27fcc 14636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14637 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 14638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14639 (eval $ac_try) 2>&5
14640 ac_status=$?
c0d27fcc 14641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14642 (exit $ac_status); }; }; then
98418dba 14643 ac_cv_func_working_mktime=yes
503d2be0 14644else
98418dba
CW
14645 echo "$as_me: program exited with status $ac_status" >&5
14646echo "$as_me: failed program was:" >&5
19650fd6
AS
14647sed 's/^/| /' conftest.$ac_ext >&5
14648
c0d27fcc 14649( exit $ac_status )
98418dba 14650ac_cv_func_working_mktime=no
503d2be0 14651fi
35996d22 14652rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 14653fi
ba4481b5 14654fi
c0d27fcc 14655echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
14656echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
14657if test $ac_cv_func_working_mktime = no; then
35996d22
AS
14658 case $LIBOBJS in
14659 "mktime.$ac_objext" | \
14660 *" mktime.$ac_objext" | \
14661 "mktime.$ac_objext "* | \
14662 *" mktime.$ac_objext "* ) ;;
14663 *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;;
14664esac
14665
ba4481b5
DL
14666fi
14667
98418dba 14668if test "$ac_cv_func_working_mktime" = no; then
b936fae4 14669
c0d27fcc 14670cat >>confdefs.h <<\_ACEOF
98418dba 14671#define BROKEN_MKTIME 1
c0d27fcc 14672_ACEOF
ba4481b5 14673
ba4481b5 14674fi
503d2be0 14675
98418dba
CW
14676ac_have_func=no # yes means we've found a way to get the load average.
14677
6bae0ccf
DL
14678# Make sure getloadavg.c is where it belongs, at configure-time.
14679test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
14680 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
14681echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
14682 { (exit 1); exit 1; }; }
14683
98418dba
CW
14684ac_save_LIBS=$LIBS
14685
14686# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 14687(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
14688echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
14689if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 14690 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14691else
503d2be0 14692 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14693/* confdefs.h. */
14694_ACEOF
14695cat confdefs.h >>conftest.$ac_ext
14696cat >>conftest.$ac_ext <<_ACEOF
14697/* end confdefs.h. */
35996d22
AS
14698/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
14699 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14700#define getloadavg innocuous_getloadavg
14701
98418dba 14702/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14703 which can conflict with char getloadavg (); below.
14704 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14705 <limits.h> exists even on freestanding compilers. */
35996d22 14706
19650fd6
AS
14707#ifdef __STDC__
14708# include <limits.h>
14709#else
14710# include <assert.h>
14711#endif
35996d22
AS
14712
14713#undef getloadavg
14714
ba4481b5 14715/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14716#ifdef __cplusplus
14717extern "C"
19650fd6 14718{
503d2be0 14719#endif
ba4481b5 14720/* We use char because int might match the return type of a gcc2
503d2be0 14721 builtin and then its argument prototype would still apply. */
98418dba 14722char getloadavg ();
98418dba
CW
14723/* The GNU C library defines this for functions which it implements
14724 to always fail with ENOSYS. Some functions are actually named
14725 something starting with __ and the normal name is an alias. */
14726#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
14727choke me
14728#else
19650fd6
AS
14729char (*f) () = getloadavg;
14730#endif
14731#ifdef __cplusplus
14732}
cd958eb3
MB
14733#endif
14734
19650fd6
AS
14735int
14736main ()
14737{
14738return f != getloadavg;
503d2be0
AS
14739 ;
14740 return 0;
14741}
14742_ACEOF
14743rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14744if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14745 (eval $ac_link) 2>conftest.er1
503d2be0 14746 ac_status=$?
35996d22
AS
14747 grep -v '^ *+' conftest.er1 >conftest.err
14748 rm -f conftest.er1
14749 cat conftest.err >&5
c0d27fcc 14750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14751 (exit $ac_status); } &&
551ffc27
ST
14752 { ac_try='test -z "$ac_c_werror_flag"
14753 || test ! -s conftest.err'
35996d22
AS
14754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14755 (eval $ac_try) 2>&5
14756 ac_status=$?
14757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14758 (exit $ac_status); }; } &&
14759 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14761 (eval $ac_try) 2>&5
14762 ac_status=$?
c0d27fcc 14763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14764 (exit $ac_status); }; }; then
98418dba 14765 ac_cv_func_getloadavg=yes
503d2be0
AS
14766else
14767 echo "$as_me: failed program was:" >&5
19650fd6
AS
14768sed 's/^/| /' conftest.$ac_ext >&5
14769
98418dba 14770ac_cv_func_getloadavg=no
503d2be0 14771fi
35996d22
AS
14772rm -f conftest.err conftest.$ac_objext \
14773 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14774fi
c0d27fcc 14775echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
14776echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
14777if test $ac_cv_func_getloadavg = yes; then
14778 exit 0
14779else
14780 exit 1
ba4481b5 14781fi
98418dba 14782) && ac_have_func=yes
ba4481b5 14783
98418dba 14784# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 14785
98418dba
CW
14786for ac_func in pstat_getdynamic
14787do
14788as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14789echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14790echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14791if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14792 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14793else
503d2be0 14794 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14795/* confdefs.h. */
14796_ACEOF
14797cat confdefs.h >>conftest.$ac_ext
14798cat >>conftest.$ac_ext <<_ACEOF
14799/* end confdefs.h. */
35996d22
AS
14800/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14801 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14802#define $ac_func innocuous_$ac_func
14803
98418dba 14804/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14805 which can conflict with char $ac_func (); below.
14806 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14807 <limits.h> exists even on freestanding compilers. */
35996d22 14808
19650fd6
AS
14809#ifdef __STDC__
14810# include <limits.h>
14811#else
14812# include <assert.h>
14813#endif
35996d22
AS
14814
14815#undef $ac_func
14816
ba4481b5 14817/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14818#ifdef __cplusplus
14819extern "C"
19650fd6 14820{
503d2be0 14821#endif
ba4481b5 14822/* We use char because int might match the return type of a gcc2
503d2be0 14823 builtin and then its argument prototype would still apply. */
98418dba 14824char $ac_func ();
98418dba
CW
14825/* The GNU C library defines this for functions which it implements
14826 to always fail with ENOSYS. Some functions are actually named
14827 something starting with __ and the normal name is an alias. */
14828#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14829choke me
14830#else
19650fd6
AS
14831char (*f) () = $ac_func;
14832#endif
14833#ifdef __cplusplus
14834}
98418dba
CW
14835#endif
14836
19650fd6
AS
14837int
14838main ()
14839{
14840return f != $ac_func;
98418dba
CW
14841 ;
14842 return 0;
14843}
f21fadcc 14844_ACEOF
98418dba 14845rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14846if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14847 (eval $ac_link) 2>conftest.er1
f21fadcc 14848 ac_status=$?
35996d22
AS
14849 grep -v '^ *+' conftest.er1 >conftest.err
14850 rm -f conftest.er1
14851 cat conftest.err >&5
c0d27fcc 14852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14853 (exit $ac_status); } &&
551ffc27
ST
14854 { ac_try='test -z "$ac_c_werror_flag"
14855 || test ! -s conftest.err'
35996d22
AS
14856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14857 (eval $ac_try) 2>&5
14858 ac_status=$?
14859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14860 (exit $ac_status); }; } &&
14861 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
14863 (eval $ac_try) 2>&5
14864 ac_status=$?
c0d27fcc 14865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
14866 (exit $ac_status); }; }; then
14867 eval "$as_ac_var=yes"
f21fadcc
JD
14868else
14869 echo "$as_me: failed program was:" >&5
19650fd6
AS
14870sed 's/^/| /' conftest.$ac_ext >&5
14871
98418dba 14872eval "$as_ac_var=no"
f21fadcc 14873fi
35996d22
AS
14874rm -f conftest.err conftest.$ac_objext \
14875 conftest$ac_exeext conftest.$ac_ext
f21fadcc 14876fi
c0d27fcc 14877echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14878echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14879if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14880 cat >>confdefs.h <<_ACEOF
98418dba 14881#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14882_ACEOF
98418dba
CW
14883
14884fi
14885done
14886
c0d27fcc 14887
98418dba
CW
14888# Solaris has libkstat which does not require root.
14889
c0d27fcc 14890echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
14891echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
14892if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
14893 echo $ECHO_N "(cached) $ECHO_C" >&6
14894else
14895 ac_check_lib_save_LIBS=$LIBS
98418dba 14896LIBS="-lkstat $LIBS"
f21fadcc 14897cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14898/* confdefs.h. */
14899_ACEOF
14900cat confdefs.h >>conftest.$ac_ext
14901cat >>conftest.$ac_ext <<_ACEOF
14902/* end confdefs.h. */
f21fadcc
JD
14903
14904/* Override any gcc2 internal prototype to avoid an error. */
14905#ifdef __cplusplus
14906extern "C"
14907#endif
14908/* We use char because int might match the return type of a gcc2
14909 builtin and then its argument prototype would still apply. */
98418dba 14910char kstat_open ();
f21fadcc
JD
14911int
14912main ()
14913{
98418dba 14914kstat_open ();
f21fadcc
JD
14915 ;
14916 return 0;
14917}
14918_ACEOF
14919rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14921 (eval $ac_link) 2>conftest.er1
f21fadcc 14922 ac_status=$?
35996d22
AS
14923 grep -v '^ *+' conftest.er1 >conftest.err
14924 rm -f conftest.er1
14925 cat conftest.err >&5
c0d27fcc 14926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 14927 (exit $ac_status); } &&
551ffc27
ST
14928 { ac_try='test -z "$ac_c_werror_flag"
14929 || test ! -s conftest.err'
35996d22
AS
14930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14931 (eval $ac_try) 2>&5
14932 ac_status=$?
14933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14934 (exit $ac_status); }; } &&
14935 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
14937 (eval $ac_try) 2>&5
14938 ac_status=$?
c0d27fcc 14939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 14940 (exit $ac_status); }; }; then
98418dba 14941 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
14942else
14943 echo "$as_me: failed program was:" >&5
19650fd6
AS
14944sed 's/^/| /' conftest.$ac_ext >&5
14945
98418dba 14946ac_cv_lib_kstat_kstat_open=no
f21fadcc 14947fi
35996d22
AS
14948rm -f conftest.err conftest.$ac_objext \
14949 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
14950LIBS=$ac_check_lib_save_LIBS
14951fi
c0d27fcc 14952echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
14953echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
14954if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 14955 cat >>confdefs.h <<_ACEOF
98418dba 14956#define HAVE_LIBKSTAT 1
c0d27fcc 14957_ACEOF
f21fadcc 14958
98418dba 14959 LIBS="-lkstat $LIBS"
f21fadcc 14960
f21fadcc
JD
14961fi
14962
98418dba
CW
14963test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
14964
14965# Some systems with -lutil have (and need) -lkvm as well, some do not.
14966# On Solaris, -lkvm requires nlist from -lelf, so check that first
14967# to get the right answer into the cache.
14968# For kstat on solaris, we need libelf to force the definition of SVR4 below.
14969if test $ac_have_func = no; then
c0d27fcc 14970 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
14971echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
14972if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 14973 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14974else
98418dba
CW
14975 ac_check_lib_save_LIBS=$LIBS
14976LIBS="-lelf $LIBS"
14977cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14978/* confdefs.h. */
14979_ACEOF
14980cat confdefs.h >>conftest.$ac_ext
14981cat >>conftest.$ac_ext <<_ACEOF
14982/* end confdefs.h. */
98418dba
CW
14983
14984/* Override any gcc2 internal prototype to avoid an error. */
14985#ifdef __cplusplus
14986extern "C"
14987#endif
14988/* We use char because int might match the return type of a gcc2
14989 builtin and then its argument prototype would still apply. */
14990char elf_begin ();
503d2be0
AS
14991int
14992main ()
14993{
98418dba 14994elf_begin ();
503d2be0
AS
14995 ;
14996 return 0;
14997}
14998_ACEOF
14999rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15000if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15001 (eval $ac_link) 2>conftest.er1
503d2be0 15002 ac_status=$?
35996d22
AS
15003 grep -v '^ *+' conftest.er1 >conftest.err
15004 rm -f conftest.er1
15005 cat conftest.err >&5
c0d27fcc 15006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15007 (exit $ac_status); } &&
551ffc27
ST
15008 { ac_try='test -z "$ac_c_werror_flag"
15009 || test ! -s conftest.err'
35996d22
AS
15010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15011 (eval $ac_try) 2>&5
15012 ac_status=$?
15013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15014 (exit $ac_status); }; } &&
15015 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15017 (eval $ac_try) 2>&5
15018 ac_status=$?
c0d27fcc 15019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15020 (exit $ac_status); }; }; then
98418dba 15021 ac_cv_lib_elf_elf_begin=yes
ba4481b5 15022else
503d2be0 15023 echo "$as_me: failed program was:" >&5
19650fd6
AS
15024sed 's/^/| /' conftest.$ac_ext >&5
15025
98418dba 15026ac_cv_lib_elf_elf_begin=no
ba4481b5 15027fi
35996d22
AS
15028rm -f conftest.err conftest.$ac_objext \
15029 conftest$ac_exeext conftest.$ac_ext
98418dba 15030LIBS=$ac_check_lib_save_LIBS
ba4481b5 15031fi
c0d27fcc 15032echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
15033echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
15034if test $ac_cv_lib_elf_elf_begin = yes; then
15035 LIBS="-lelf $LIBS"
ba4481b5
DL
15036fi
15037
98418dba
CW
15038fi
15039if test $ac_have_func = no; then
c0d27fcc 15040 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
15041echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
15042if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 15043 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15044else
98418dba
CW
15045 ac_check_lib_save_LIBS=$LIBS
15046LIBS="-lkvm $LIBS"
15047cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15048/* confdefs.h. */
15049_ACEOF
15050cat confdefs.h >>conftest.$ac_ext
15051cat >>conftest.$ac_ext <<_ACEOF
15052/* end confdefs.h. */
98418dba
CW
15053
15054/* Override any gcc2 internal prototype to avoid an error. */
15055#ifdef __cplusplus
15056extern "C"
15057#endif
15058/* We use char because int might match the return type of a gcc2
15059 builtin and then its argument prototype would still apply. */
15060char kvm_open ();
503d2be0
AS
15061int
15062main ()
15063{
98418dba 15064kvm_open ();
503d2be0
AS
15065 ;
15066 return 0;
15067}
15068_ACEOF
15069rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15070if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15071 (eval $ac_link) 2>conftest.er1
503d2be0 15072 ac_status=$?
35996d22
AS
15073 grep -v '^ *+' conftest.er1 >conftest.err
15074 rm -f conftest.er1
15075 cat conftest.err >&5
c0d27fcc 15076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15077 (exit $ac_status); } &&
551ffc27
ST
15078 { ac_try='test -z "$ac_c_werror_flag"
15079 || test ! -s conftest.err'
35996d22
AS
15080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15081 (eval $ac_try) 2>&5
15082 ac_status=$?
15083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15084 (exit $ac_status); }; } &&
15085 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15087 (eval $ac_try) 2>&5
15088 ac_status=$?
c0d27fcc 15089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15090 (exit $ac_status); }; }; then
98418dba 15091 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
15092else
15093 echo "$as_me: failed program was:" >&5
19650fd6
AS
15094sed 's/^/| /' conftest.$ac_ext >&5
15095
98418dba 15096ac_cv_lib_kvm_kvm_open=no
503d2be0 15097fi
35996d22
AS
15098rm -f conftest.err conftest.$ac_objext \
15099 conftest$ac_exeext conftest.$ac_ext
98418dba 15100LIBS=$ac_check_lib_save_LIBS
503d2be0 15101fi
c0d27fcc 15102echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
15103echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
15104if test $ac_cv_lib_kvm_kvm_open = yes; then
15105 LIBS="-lkvm $LIBS"
ba4481b5
DL
15106fi
15107
98418dba 15108 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 15109 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
15110echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
15111if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 15112 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15113else
98418dba
CW
15114 ac_check_lib_save_LIBS=$LIBS
15115LIBS="-lutil $LIBS"
15116cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15117/* confdefs.h. */
15118_ACEOF
15119cat confdefs.h >>conftest.$ac_ext
15120cat >>conftest.$ac_ext <<_ACEOF
15121/* end confdefs.h. */
98418dba
CW
15122
15123/* Override any gcc2 internal prototype to avoid an error. */
15124#ifdef __cplusplus
15125extern "C"
15126#endif
15127/* We use char because int might match the return type of a gcc2
15128 builtin and then its argument prototype would still apply. */
15129char getloadavg ();
503d2be0
AS
15130int
15131main ()
15132{
98418dba 15133getloadavg ();
503d2be0
AS
15134 ;
15135 return 0;
15136}
15137_ACEOF
15138rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15139if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15140 (eval $ac_link) 2>conftest.er1
503d2be0 15141 ac_status=$?
35996d22
AS
15142 grep -v '^ *+' conftest.er1 >conftest.err
15143 rm -f conftest.er1
15144 cat conftest.err >&5
c0d27fcc 15145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15146 (exit $ac_status); } &&
551ffc27
ST
15147 { ac_try='test -z "$ac_c_werror_flag"
15148 || test ! -s conftest.err'
c0d27fcc 15149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15150 (eval $ac_try) 2>&5
15151 ac_status=$?
c0d27fcc 15152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
15153 (exit $ac_status); }; } &&
15154 { ac_try='test -s conftest$ac_exeext'
15155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15156 (eval $ac_try) 2>&5
15157 ac_status=$?
15158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15159 (exit $ac_status); }; }; then
15160 ac_cv_lib_util_getloadavg=yes
15161else
503d2be0 15162 echo "$as_me: failed program was:" >&5
19650fd6
AS
15163sed 's/^/| /' conftest.$ac_ext >&5
15164
98418dba 15165ac_cv_lib_util_getloadavg=no
ba4481b5 15166fi
35996d22
AS
15167rm -f conftest.err conftest.$ac_objext \
15168 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15169LIBS=$ac_check_lib_save_LIBS
15170fi
c0d27fcc 15171echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
15172echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
15173if test $ac_cv_lib_util_getloadavg = yes; then
15174 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 15175fi
503d2be0 15176
98418dba 15177fi
ba4481b5 15178
98418dba
CW
15179if test $ac_have_func = no; then
15180 # There is a commonly available library for RS/6000 AIX.
15181 # Since it is not a standard part of AIX, it might be installed locally.
15182 ac_getloadavg_LIBS=$LIBS
15183 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 15184 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
15185echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
15186if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 15187 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15188else
98418dba
CW
15189 ac_check_lib_save_LIBS=$LIBS
15190LIBS="-lgetloadavg $LIBS"
15191cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15192/* confdefs.h. */
15193_ACEOF
15194cat confdefs.h >>conftest.$ac_ext
15195cat >>conftest.$ac_ext <<_ACEOF
15196/* end confdefs.h. */
ba4481b5 15197
98418dba
CW
15198/* Override any gcc2 internal prototype to avoid an error. */
15199#ifdef __cplusplus
15200extern "C"
15201#endif
15202/* We use char because int might match the return type of a gcc2
15203 builtin and then its argument prototype would still apply. */
15204char getloadavg ();
98418dba
CW
15205int
15206main ()
15207{
15208getloadavg ();
15209 ;
15210 return 0;
15211}
503d2be0 15212_ACEOF
98418dba 15213rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15215 (eval $ac_link) 2>conftest.er1
98418dba 15216 ac_status=$?
35996d22
AS
15217 grep -v '^ *+' conftest.er1 >conftest.err
15218 rm -f conftest.er1
15219 cat conftest.err >&5
c0d27fcc 15220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15221 (exit $ac_status); } &&
551ffc27
ST
15222 { ac_try='test -z "$ac_c_werror_flag"
15223 || test ! -s conftest.err'
35996d22
AS
15224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15225 (eval $ac_try) 2>&5
15226 ac_status=$?
15227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15228 (exit $ac_status); }; } &&
15229 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15231 (eval $ac_try) 2>&5
15232 ac_status=$?
c0d27fcc 15233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15234 (exit $ac_status); }; }; then
15235 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 15236else
98418dba 15237 echo "$as_me: failed program was:" >&5
19650fd6
AS
15238sed 's/^/| /' conftest.$ac_ext >&5
15239
98418dba
CW
15240ac_cv_lib_getloadavg_getloadavg=no
15241fi
35996d22
AS
15242rm -f conftest.err conftest.$ac_objext \
15243 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15244LIBS=$ac_check_lib_save_LIBS
15245fi
c0d27fcc 15246echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
15247echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
15248if test $ac_cv_lib_getloadavg_getloadavg = yes; then
15249 LIBS="-lgetloadavg $LIBS"
15250else
15251 LIBS=$ac_getloadavg_LIBS
ba4481b5 15252fi
ba4481b5
DL
15253
15254fi
98418dba
CW
15255
15256# Make sure it is really in the library, if we think we found it,
15257# otherwise set up the replacement function.
15258
15259for ac_func in getloadavg
15260do
15261as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15262echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15263echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15264if eval "test \"\${$as_ac_var+set}\" = set"; then
15265 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15266else
503d2be0 15267 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15268/* confdefs.h. */
15269_ACEOF
15270cat confdefs.h >>conftest.$ac_ext
15271cat >>conftest.$ac_ext <<_ACEOF
15272/* end confdefs.h. */
35996d22
AS
15273/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15274 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15275#define $ac_func innocuous_$ac_func
15276
ba4481b5 15277/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15278 which can conflict with char $ac_func (); below.
15279 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15280 <limits.h> exists even on freestanding compilers. */
35996d22 15281
19650fd6
AS
15282#ifdef __STDC__
15283# include <limits.h>
15284#else
15285# include <assert.h>
15286#endif
35996d22
AS
15287
15288#undef $ac_func
15289
ba4481b5 15290/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15291#ifdef __cplusplus
15292extern "C"
19650fd6 15293{
503d2be0 15294#endif
ba4481b5 15295/* We use char because int might match the return type of a gcc2
503d2be0
AS
15296 builtin and then its argument prototype would still apply. */
15297char $ac_func ();
ba4481b5
DL
15298/* The GNU C library defines this for functions which it implements
15299 to always fail with ENOSYS. Some functions are actually named
15300 something starting with __ and the normal name is an alias. */
15301#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15302choke me
15303#else
19650fd6
AS
15304char (*f) () = $ac_func;
15305#endif
15306#ifdef __cplusplus
15307}
cd958eb3
MB
15308#endif
15309
19650fd6
AS
15310int
15311main ()
15312{
15313return f != $ac_func;
503d2be0
AS
15314 ;
15315 return 0;
15316}
15317_ACEOF
15318rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15319if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15320 (eval $ac_link) 2>conftest.er1
503d2be0 15321 ac_status=$?
35996d22
AS
15322 grep -v '^ *+' conftest.er1 >conftest.err
15323 rm -f conftest.er1
15324 cat conftest.err >&5
c0d27fcc 15325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15326 (exit $ac_status); } &&
551ffc27
ST
15327 { ac_try='test -z "$ac_c_werror_flag"
15328 || test ! -s conftest.err'
35996d22
AS
15329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15330 (eval $ac_try) 2>&5
15331 ac_status=$?
15332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15333 (exit $ac_status); }; } &&
15334 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15336 (eval $ac_try) 2>&5
15337 ac_status=$?
c0d27fcc 15338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15339 (exit $ac_status); }; }; then
15340 eval "$as_ac_var=yes"
15341else
15342 echo "$as_me: failed program was:" >&5
19650fd6
AS
15343sed 's/^/| /' conftest.$ac_ext >&5
15344
503d2be0
AS
15345eval "$as_ac_var=no"
15346fi
35996d22
AS
15347rm -f conftest.err conftest.$ac_objext \
15348 conftest$ac_exeext conftest.$ac_ext
503d2be0 15349fi
c0d27fcc 15350echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15351echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15352if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15353 cat >>confdefs.h <<_ACEOF
98418dba 15354#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15355_ACEOF
503d2be0 15356
98418dba 15357else
35996d22
AS
15358 case $LIBOBJS in
15359 "getloadavg.$ac_objext" | \
15360 *" getloadavg.$ac_objext" | \
15361 "getloadavg.$ac_objext "* | \
15362 *" getloadavg.$ac_objext "* ) ;;
15363 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" ;;
15364esac
15365
ba4481b5 15366
c0d27fcc 15367cat >>confdefs.h <<\_ACEOF
98418dba 15368#define C_GETLOADAVG 1
c0d27fcc 15369_ACEOF
ba4481b5 15370
98418dba
CW
15371# Figure out what our getloadavg.c needs.
15372ac_have_func=no
c0d27fcc
MR
15373if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15374 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
15375echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15376if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 15377 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15378fi
15379echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
15380echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 15381else
c0d27fcc
MR
15382 # Is the header compilable?
15383echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
15384echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
15385cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15386/* confdefs.h. */
15387_ACEOF
15388cat confdefs.h >>conftest.$ac_ext
15389cat >>conftest.$ac_ext <<_ACEOF
15390/* end confdefs.h. */
c0d27fcc
MR
15391$ac_includes_default
15392#include <sys/dg_sys_info.h>
15393_ACEOF
15394rm -f conftest.$ac_objext
15395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15396 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15397 ac_status=$?
35996d22
AS
15398 grep -v '^ *+' conftest.er1 >conftest.err
15399 rm -f conftest.er1
15400 cat conftest.err >&5
c0d27fcc
MR
15401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15402 (exit $ac_status); } &&
551ffc27
ST
15403 { ac_try='test -z "$ac_c_werror_flag"
15404 || test ! -s conftest.err'
35996d22
AS
15405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15406 (eval $ac_try) 2>&5
15407 ac_status=$?
15408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15409 (exit $ac_status); }; } &&
15410 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
15416 ac_header_compiler=yes
15417else
15418 echo "$as_me: failed program was:" >&5
19650fd6
AS
15419sed 's/^/| /' conftest.$ac_ext >&5
15420
c0d27fcc
MR
15421ac_header_compiler=no
15422fi
35996d22 15423rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15424echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15425echo "${ECHO_T}$ac_header_compiler" >&6
15426
15427# Is the header present?
15428echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
15429echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
15430cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15431/* confdefs.h. */
15432_ACEOF
15433cat confdefs.h >>conftest.$ac_ext
15434cat >>conftest.$ac_ext <<_ACEOF
15435/* end confdefs.h. */
98418dba
CW
15436#include <sys/dg_sys_info.h>
15437_ACEOF
c0d27fcc 15438if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
15439 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15440 ac_status=$?
6bae0ccf 15441 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15442 rm -f conftest.er1
15443 cat conftest.err >&5
c0d27fcc 15444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15445 (exit $ac_status); } >/dev/null; then
15446 if test -s conftest.err; then
15447 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15448 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15449 else
15450 ac_cpp_err=
15451 fi
15452else
15453 ac_cpp_err=yes
ba4481b5 15454fi
98418dba 15455if test -z "$ac_cpp_err"; then
c0d27fcc 15456 ac_header_preproc=yes
98418dba
CW
15457else
15458 echo "$as_me: failed program was:" >&5
19650fd6
AS
15459sed 's/^/| /' conftest.$ac_ext >&5
15460
c0d27fcc 15461 ac_header_preproc=no
ba4481b5 15462fi
98418dba 15463rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15464echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15465echo "${ECHO_T}$ac_header_preproc" >&6
15466
15467# So? What about this header?
35996d22
AS
15468case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15469 yes:no: )
c0d27fcc
MR
15470 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
15471echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15472 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
15473echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
15474 ac_header_preproc=yes
19650fd6 15475 ;;
35996d22 15476 no:yes:* )
c0d27fcc
MR
15477 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
15478echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
35996d22
AS
15479 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
15480echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
15481 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
15482echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
15483 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
15484echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15485 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 15486echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15487 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
15488echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15489 (
15490 cat <<\_ASBOX
35996d22
AS
15491## ------------------------------------------ ##
15492## Report this to the AC_PACKAGE_NAME lists. ##
15493## ------------------------------------------ ##
19650fd6
AS
15494_ASBOX
15495 ) |
15496 sed "s/^/$as_me: WARNING: /" >&2
15497 ;;
c0d27fcc
MR
15498esac
15499echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
15500echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15501if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15502 echo $ECHO_N "(cached) $ECHO_C" >&6
15503else
15504 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 15505fi
c0d27fcc 15506echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 15507echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
15508
15509fi
98418dba
CW
15510if test $ac_cv_header_sys_dg_sys_info_h = yes; then
15511 ac_have_func=yes
ba4481b5 15512
c0d27fcc 15513cat >>confdefs.h <<\_ACEOF
98418dba 15514#define DGUX 1
c0d27fcc
MR
15515_ACEOF
15516
503d2be0 15517
c0d27fcc 15518echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
15519echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
15520if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 15521 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15522else
503d2be0 15523 ac_check_lib_save_LIBS=$LIBS
98418dba 15524LIBS="-ldgc $LIBS"
503d2be0 15525cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15526/* confdefs.h. */
15527_ACEOF
15528cat confdefs.h >>conftest.$ac_ext
15529cat >>conftest.$ac_ext <<_ACEOF
15530/* end confdefs.h. */
503d2be0 15531
ba4481b5 15532/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15533#ifdef __cplusplus
15534extern "C"
15535#endif
ba4481b5 15536/* We use char because int might match the return type of a gcc2
503d2be0 15537 builtin and then its argument prototype would still apply. */
98418dba 15538char dg_sys_info ();
503d2be0
AS
15539int
15540main ()
15541{
98418dba 15542dg_sys_info ();
503d2be0
AS
15543 ;
15544 return 0;
15545}
15546_ACEOF
15547rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15548if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15549 (eval $ac_link) 2>conftest.er1
503d2be0 15550 ac_status=$?
35996d22
AS
15551 grep -v '^ *+' conftest.er1 >conftest.err
15552 rm -f conftest.er1
15553 cat conftest.err >&5
c0d27fcc 15554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15555 (exit $ac_status); } &&
551ffc27
ST
15556 { ac_try='test -z "$ac_c_werror_flag"
15557 || test ! -s conftest.err'
35996d22
AS
15558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15559 (eval $ac_try) 2>&5
15560 ac_status=$?
15561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15562 (exit $ac_status); }; } &&
15563 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15565 (eval $ac_try) 2>&5
15566 ac_status=$?
c0d27fcc 15567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15568 (exit $ac_status); }; }; then
98418dba 15569 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
15570else
15571 echo "$as_me: failed program was:" >&5
19650fd6
AS
15572sed 's/^/| /' conftest.$ac_ext >&5
15573
98418dba 15574ac_cv_lib_dgc_dg_sys_info=no
503d2be0 15575fi
35996d22
AS
15576rm -f conftest.err conftest.$ac_objext \
15577 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15578LIBS=$ac_check_lib_save_LIBS
15579fi
c0d27fcc 15580echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
15581echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
15582if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 15583 cat >>confdefs.h <<_ACEOF
98418dba 15584#define HAVE_LIBDGC 1
c0d27fcc 15585_ACEOF
ba4481b5 15586
98418dba 15587 LIBS="-ldgc $LIBS"
ba4481b5 15588
ba4481b5
DL
15589fi
15590
98418dba 15591fi
503d2be0 15592
c0d27fcc
MR
15593
15594
15595if test "${ac_cv_header_locale_h+set}" = set; then
15596 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
15597echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
15598if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 15599 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15600fi
15601echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
15602echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 15603else
c0d27fcc
MR
15604 # Is the header compilable?
15605echo "$as_me:$LINENO: checking locale.h usability" >&5
15606echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
15607cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15608/* confdefs.h. */
15609_ACEOF
15610cat confdefs.h >>conftest.$ac_ext
15611cat >>conftest.$ac_ext <<_ACEOF
15612/* end confdefs.h. */
c0d27fcc
MR
15613$ac_includes_default
15614#include <locale.h>
15615_ACEOF
15616rm -f conftest.$ac_objext
15617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15618 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15619 ac_status=$?
35996d22
AS
15620 grep -v '^ *+' conftest.er1 >conftest.err
15621 rm -f conftest.er1
15622 cat conftest.err >&5
c0d27fcc
MR
15623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15624 (exit $ac_status); } &&
551ffc27
ST
15625 { ac_try='test -z "$ac_c_werror_flag"
15626 || test ! -s conftest.err'
35996d22
AS
15627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15628 (eval $ac_try) 2>&5
15629 ac_status=$?
15630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15631 (exit $ac_status); }; } &&
15632 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
15638 ac_header_compiler=yes
15639else
15640 echo "$as_me: failed program was:" >&5
19650fd6
AS
15641sed 's/^/| /' conftest.$ac_ext >&5
15642
c0d27fcc
MR
15643ac_header_compiler=no
15644fi
35996d22 15645rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15646echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15647echo "${ECHO_T}$ac_header_compiler" >&6
15648
15649# Is the header present?
15650echo "$as_me:$LINENO: checking locale.h presence" >&5
15651echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
15652cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15653/* confdefs.h. */
15654_ACEOF
15655cat confdefs.h >>conftest.$ac_ext
15656cat >>conftest.$ac_ext <<_ACEOF
15657/* end confdefs.h. */
98418dba 15658#include <locale.h>
503d2be0 15659_ACEOF
c0d27fcc 15660if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 15661 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 15662 ac_status=$?
6bae0ccf 15663 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15664 rm -f conftest.er1
15665 cat conftest.err >&5
c0d27fcc 15666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15667 (exit $ac_status); } >/dev/null; then
15668 if test -s conftest.err; then
15669 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15670 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15671 else
15672 ac_cpp_err=
15673 fi
503d2be0 15674else
98418dba 15675 ac_cpp_err=yes
503d2be0 15676fi
98418dba 15677if test -z "$ac_cpp_err"; then
c0d27fcc 15678 ac_header_preproc=yes
98418dba
CW
15679else
15680 echo "$as_me: failed program was:" >&5
19650fd6
AS
15681sed 's/^/| /' conftest.$ac_ext >&5
15682
c0d27fcc 15683 ac_header_preproc=no
ba4481b5 15684fi
98418dba 15685rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15686echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15687echo "${ECHO_T}$ac_header_preproc" >&6
15688
15689# So? What about this header?
35996d22
AS
15690case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15691 yes:no: )
c0d27fcc
MR
15692 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
15693echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15694 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
15695echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
15696 ac_header_preproc=yes
19650fd6 15697 ;;
35996d22 15698 no:yes:* )
c0d27fcc
MR
15699 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
15700echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
35996d22
AS
15701 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
15702echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
15703 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
15704echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
15705 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
15706echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15707 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 15708echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15709 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
15710echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15711 (
15712 cat <<\_ASBOX
35996d22
AS
15713## ------------------------------------------ ##
15714## Report this to the AC_PACKAGE_NAME lists. ##
15715## ------------------------------------------ ##
19650fd6
AS
15716_ASBOX
15717 ) |
15718 sed "s/^/$as_me: WARNING: /" >&2
15719 ;;
c0d27fcc
MR
15720esac
15721echo "$as_me:$LINENO: checking for locale.h" >&5
15722echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
15723if test "${ac_cv_header_locale_h+set}" = set; then
15724 echo $ECHO_N "(cached) $ECHO_C" >&6
15725else
15726 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 15727fi
c0d27fcc 15728echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
15729echo "${ECHO_T}$ac_cv_header_locale_h" >&6
15730
c0d27fcc
MR
15731fi
15732
15733
15734
98418dba 15735for ac_func in setlocale
ba4481b5 15736do
503d2be0 15737as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15738echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15739echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15740if eval "test \"\${$as_ac_var+set}\" = set"; then
15741 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15742else
503d2be0 15743 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15744/* confdefs.h. */
15745_ACEOF
15746cat confdefs.h >>conftest.$ac_ext
15747cat >>conftest.$ac_ext <<_ACEOF
15748/* end confdefs.h. */
35996d22
AS
15749/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15750 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15751#define $ac_func innocuous_$ac_func
15752
ba4481b5 15753/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15754 which can conflict with char $ac_func (); below.
15755 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15756 <limits.h> exists even on freestanding compilers. */
35996d22 15757
19650fd6
AS
15758#ifdef __STDC__
15759# include <limits.h>
15760#else
15761# include <assert.h>
15762#endif
35996d22
AS
15763
15764#undef $ac_func
15765
ba4481b5 15766/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15767#ifdef __cplusplus
15768extern "C"
19650fd6 15769{
503d2be0 15770#endif
ba4481b5 15771/* We use char because int might match the return type of a gcc2
503d2be0
AS
15772 builtin and then its argument prototype would still apply. */
15773char $ac_func ();
ba4481b5
DL
15774/* The GNU C library defines this for functions which it implements
15775 to always fail with ENOSYS. Some functions are actually named
15776 something starting with __ and the normal name is an alias. */
15777#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15778choke me
15779#else
19650fd6
AS
15780char (*f) () = $ac_func;
15781#endif
15782#ifdef __cplusplus
15783}
ba4481b5
DL
15784#endif
15785
19650fd6
AS
15786int
15787main ()
15788{
15789return f != $ac_func;
503d2be0
AS
15790 ;
15791 return 0;
15792}
15793_ACEOF
15794rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15795if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15796 (eval $ac_link) 2>conftest.er1
503d2be0 15797 ac_status=$?
35996d22
AS
15798 grep -v '^ *+' conftest.er1 >conftest.err
15799 rm -f conftest.er1
15800 cat conftest.err >&5
c0d27fcc 15801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15802 (exit $ac_status); } &&
551ffc27
ST
15803 { ac_try='test -z "$ac_c_werror_flag"
15804 || test ! -s conftest.err'
35996d22
AS
15805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15806 (eval $ac_try) 2>&5
15807 ac_status=$?
15808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15809 (exit $ac_status); }; } &&
15810 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15812 (eval $ac_try) 2>&5
15813 ac_status=$?
c0d27fcc 15814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15815 (exit $ac_status); }; }; then
15816 eval "$as_ac_var=yes"
15817else
15818 echo "$as_me: failed program was:" >&5
19650fd6
AS
15819sed 's/^/| /' conftest.$ac_ext >&5
15820
503d2be0
AS
15821eval "$as_ac_var=no"
15822fi
35996d22
AS
15823rm -f conftest.err conftest.$ac_objext \
15824 conftest$ac_exeext conftest.$ac_ext
503d2be0 15825fi
c0d27fcc 15826echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15827echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15828if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15829 cat >>confdefs.h <<_ACEOF
503d2be0 15830#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15831_ACEOF
ba4481b5 15832
ba4481b5
DL
15833fi
15834done
15835
c0d27fcc 15836
98418dba
CW
15837# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
15838# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
15839# Irix 4.0.5F has the header but not the library.
15840if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
15841 ac_have_func=yes
15842
c0d27fcc 15843cat >>confdefs.h <<\_ACEOF
98418dba 15844#define SVR4 1
c0d27fcc 15845_ACEOF
98418dba
CW
15846
15847fi
15848
15849if test $ac_have_func = no; then
c0d27fcc
MR
15850 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
15851 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
15852echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
15853if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 15854 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15855fi
15856echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
15857echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 15858else
c0d27fcc
MR
15859 # Is the header compilable?
15860echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
15861echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
15862cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15863/* confdefs.h. */
15864_ACEOF
15865cat confdefs.h >>conftest.$ac_ext
15866cat >>conftest.$ac_ext <<_ACEOF
15867/* end confdefs.h. */
c0d27fcc
MR
15868$ac_includes_default
15869#include <inq_stats/cpustats.h>
15870_ACEOF
15871rm -f conftest.$ac_objext
15872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15873 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15874 ac_status=$?
35996d22
AS
15875 grep -v '^ *+' conftest.er1 >conftest.err
15876 rm -f conftest.er1
15877 cat conftest.err >&5
c0d27fcc
MR
15878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15879 (exit $ac_status); } &&
551ffc27
ST
15880 { ac_try='test -z "$ac_c_werror_flag"
15881 || test ! -s conftest.err'
35996d22
AS
15882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15883 (eval $ac_try) 2>&5
15884 ac_status=$?
15885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15886 (exit $ac_status); }; } &&
15887 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
15893 ac_header_compiler=yes
15894else
15895 echo "$as_me: failed program was:" >&5
19650fd6
AS
15896sed 's/^/| /' conftest.$ac_ext >&5
15897
c0d27fcc
MR
15898ac_header_compiler=no
15899fi
35996d22 15900rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15901echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15902echo "${ECHO_T}$ac_header_compiler" >&6
15903
15904# Is the header present?
15905echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
15906echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
15907cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15908/* confdefs.h. */
15909_ACEOF
15910cat confdefs.h >>conftest.$ac_ext
15911cat >>conftest.$ac_ext <<_ACEOF
15912/* end confdefs.h. */
98418dba 15913#include <inq_stats/cpustats.h>
503d2be0 15914_ACEOF
c0d27fcc 15915if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15916 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15917 ac_status=$?
6bae0ccf 15918 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15919 rm -f conftest.er1
15920 cat conftest.err >&5
c0d27fcc 15921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15922 (exit $ac_status); } >/dev/null; then
15923 if test -s conftest.err; then
15924 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15925 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
15926 else
15927 ac_cpp_err=
15928 fi
15929else
15930 ac_cpp_err=yes
15931fi
15932if test -z "$ac_cpp_err"; then
c0d27fcc 15933 ac_header_preproc=yes
503d2be0
AS
15934else
15935 echo "$as_me: failed program was:" >&5
19650fd6
AS
15936sed 's/^/| /' conftest.$ac_ext >&5
15937
c0d27fcc 15938 ac_header_preproc=no
ba4481b5 15939fi
503d2be0 15940rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15941echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15942echo "${ECHO_T}$ac_header_preproc" >&6
15943
15944# So? What about this header?
35996d22
AS
15945case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15946 yes:no: )
c0d27fcc
MR
15947 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
15948echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15949 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
15950echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
15951 ac_header_preproc=yes
19650fd6 15952 ;;
35996d22 15953 no:yes:* )
c0d27fcc
MR
15954 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
15955echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
35996d22
AS
15956 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
15957echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
15958 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
15959echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
15960 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
15961echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15962 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 15963echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15964 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
15965echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15966 (
15967 cat <<\_ASBOX
35996d22
AS
15968## ------------------------------------------ ##
15969## Report this to the AC_PACKAGE_NAME lists. ##
15970## ------------------------------------------ ##
19650fd6
AS
15971_ASBOX
15972 ) |
15973 sed "s/^/$as_me: WARNING: /" >&2
15974 ;;
c0d27fcc
MR
15975esac
15976echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
15977echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
15978if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
15979 echo $ECHO_N "(cached) $ECHO_C" >&6
15980else
15981 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 15982fi
c0d27fcc 15983echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 15984echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
15985
15986fi
98418dba
CW
15987if test $ac_cv_header_inq_stats_cpustats_h = yes; then
15988 ac_have_func=yes
ba4481b5 15989
c0d27fcc 15990cat >>confdefs.h <<\_ACEOF
98418dba 15991#define UMAX 1
c0d27fcc 15992_ACEOF
98418dba 15993
c0d27fcc
MR
15994
15995cat >>confdefs.h <<\_ACEOF
98418dba 15996#define UMAX4_3 1
c0d27fcc 15997_ACEOF
98418dba
CW
15998
15999fi
16000
c0d27fcc 16001
98418dba
CW
16002fi
16003
16004if test $ac_have_func = no; then
c0d27fcc
MR
16005 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16006 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
16007echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16008if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 16009 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16010fi
16011echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
16012echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 16013else
c0d27fcc
MR
16014 # Is the header compilable?
16015echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
16016echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
16017cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16018/* confdefs.h. */
16019_ACEOF
16020cat confdefs.h >>conftest.$ac_ext
16021cat >>conftest.$ac_ext <<_ACEOF
16022/* end confdefs.h. */
c0d27fcc
MR
16023$ac_includes_default
16024#include <sys/cpustats.h>
16025_ACEOF
16026rm -f conftest.$ac_objext
16027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16028 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16029 ac_status=$?
35996d22
AS
16030 grep -v '^ *+' conftest.er1 >conftest.err
16031 rm -f conftest.er1
16032 cat conftest.err >&5
c0d27fcc
MR
16033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16034 (exit $ac_status); } &&
551ffc27
ST
16035 { ac_try='test -z "$ac_c_werror_flag"
16036 || test ! -s conftest.err'
35996d22
AS
16037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16038 (eval $ac_try) 2>&5
16039 ac_status=$?
16040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16041 (exit $ac_status); }; } &&
16042 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
16048 ac_header_compiler=yes
16049else
16050 echo "$as_me: failed program was:" >&5
19650fd6
AS
16051sed 's/^/| /' conftest.$ac_ext >&5
16052
c0d27fcc
MR
16053ac_header_compiler=no
16054fi
35996d22 16055rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16056echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16057echo "${ECHO_T}$ac_header_compiler" >&6
16058
16059# Is the header present?
16060echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
16061echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
16062cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16063/* confdefs.h. */
16064_ACEOF
16065cat confdefs.h >>conftest.$ac_ext
16066cat >>conftest.$ac_ext <<_ACEOF
16067/* end confdefs.h. */
98418dba
CW
16068#include <sys/cpustats.h>
16069_ACEOF
c0d27fcc 16070if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
16071 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16072 ac_status=$?
6bae0ccf 16073 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16074 rm -f conftest.er1
16075 cat conftest.err >&5
c0d27fcc 16076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16077 (exit $ac_status); } >/dev/null; then
16078 if test -s conftest.err; then
16079 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 16080 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16081 else
16082 ac_cpp_err=
16083 fi
16084else
16085 ac_cpp_err=yes
503d2be0 16086fi
98418dba 16087if test -z "$ac_cpp_err"; then
c0d27fcc 16088 ac_header_preproc=yes
98418dba
CW
16089else
16090 echo "$as_me: failed program was:" >&5
19650fd6
AS
16091sed 's/^/| /' conftest.$ac_ext >&5
16092
c0d27fcc 16093 ac_header_preproc=no
98418dba
CW
16094fi
16095rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16096echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16097echo "${ECHO_T}$ac_header_preproc" >&6
16098
16099# So? What about this header?
35996d22
AS
16100case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16101 yes:no: )
c0d27fcc
MR
16102 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16103echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16104 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
16105echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
16106 ac_header_preproc=yes
19650fd6 16107 ;;
35996d22 16108 no:yes:* )
c0d27fcc
MR
16109 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
16110echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
35996d22
AS
16111 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
16112echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
16113 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
16114echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
16115 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16116echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16117 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16118echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16119 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
16120echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16121 (
16122 cat <<\_ASBOX
35996d22
AS
16123## ------------------------------------------ ##
16124## Report this to the AC_PACKAGE_NAME lists. ##
16125## ------------------------------------------ ##
19650fd6
AS
16126_ASBOX
16127 ) |
16128 sed "s/^/$as_me: WARNING: /" >&2
16129 ;;
c0d27fcc
MR
16130esac
16131echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
16132echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16133if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16134 echo $ECHO_N "(cached) $ECHO_C" >&6
16135else
16136 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 16137fi
c0d27fcc 16138echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 16139echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
16140
16141fi
98418dba 16142if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 16143 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 16144#define UMAX 1
c0d27fcc 16145_ACEOF
ba4481b5 16146
98418dba
CW
16147fi
16148
c0d27fcc 16149
98418dba
CW
16150fi
16151
16152if test $ac_have_func = no; then
16153
16154for ac_header in mach/mach.h
2c9dccc9
PJ
16155do
16156as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16157if eval "test \"\${$as_ac_Header+set}\" = set"; then
16158 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
16159echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16160if eval "test \"\${$as_ac_Header+set}\" = set"; then
16161 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16162fi
16163echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16164echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16165else
c0d27fcc
MR
16166 # Is the header compilable?
16167echo "$as_me:$LINENO: checking $ac_header usability" >&5
16168echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16169cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16170/* confdefs.h. */
16171_ACEOF
16172cat confdefs.h >>conftest.$ac_ext
16173cat >>conftest.$ac_ext <<_ACEOF
16174/* end confdefs.h. */
c0d27fcc
MR
16175$ac_includes_default
16176#include <$ac_header>
16177_ACEOF
16178rm -f conftest.$ac_objext
16179if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16180 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16181 ac_status=$?
35996d22
AS
16182 grep -v '^ *+' conftest.er1 >conftest.err
16183 rm -f conftest.er1
16184 cat conftest.err >&5
c0d27fcc
MR
16185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16186 (exit $ac_status); } &&
551ffc27
ST
16187 { ac_try='test -z "$ac_c_werror_flag"
16188 || test ! -s conftest.err'
35996d22
AS
16189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16190 (eval $ac_try) 2>&5
16191 ac_status=$?
16192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16193 (exit $ac_status); }; } &&
16194 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
16200 ac_header_compiler=yes
16201else
16202 echo "$as_me: failed program was:" >&5
19650fd6
AS
16203sed 's/^/| /' conftest.$ac_ext >&5
16204
c0d27fcc
MR
16205ac_header_compiler=no
16206fi
35996d22 16207rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16208echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16209echo "${ECHO_T}$ac_header_compiler" >&6
16210
16211# Is the header present?
16212echo "$as_me:$LINENO: checking $ac_header presence" >&5
16213echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16214cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16215/* confdefs.h. */
16216_ACEOF
16217cat confdefs.h >>conftest.$ac_ext
16218cat >>conftest.$ac_ext <<_ACEOF
16219/* end confdefs.h. */
2c9dccc9
PJ
16220#include <$ac_header>
16221_ACEOF
c0d27fcc 16222if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
16223 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16224 ac_status=$?
6bae0ccf 16225 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
16226 rm -f conftest.er1
16227 cat conftest.err >&5
c0d27fcc 16228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
16229 (exit $ac_status); } >/dev/null; then
16230 if test -s conftest.err; then
16231 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 16232 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2c9dccc9
PJ
16233 else
16234 ac_cpp_err=
16235 fi
16236else
16237 ac_cpp_err=yes
16238fi
16239if test -z "$ac_cpp_err"; then
c0d27fcc
MR
16240 ac_header_preproc=yes
16241else
16242 echo "$as_me: failed program was:" >&5
19650fd6
AS
16243sed 's/^/| /' conftest.$ac_ext >&5
16244
c0d27fcc
MR
16245 ac_header_preproc=no
16246fi
16247rm -f conftest.err conftest.$ac_ext
16248echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16249echo "${ECHO_T}$ac_header_preproc" >&6
16250
16251# So? What about this header?
35996d22
AS
16252case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16253 yes:no: )
c0d27fcc
MR
16254 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16255echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16256 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16257echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16258 ac_header_preproc=yes
19650fd6 16259 ;;
35996d22 16260 no:yes:* )
c0d27fcc
MR
16261 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16262echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
16263 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16264echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16265 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16266echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16267 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16268echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16269 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16270echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16271 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16272echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16273 (
16274 cat <<\_ASBOX
35996d22
AS
16275## ------------------------------------------ ##
16276## Report this to the AC_PACKAGE_NAME lists. ##
16277## ------------------------------------------ ##
19650fd6
AS
16278_ASBOX
16279 ) |
16280 sed "s/^/$as_me: WARNING: /" >&2
16281 ;;
c0d27fcc
MR
16282esac
16283echo "$as_me:$LINENO: checking for $ac_header" >&5
16284echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16285if eval "test \"\${$as_ac_Header+set}\" = set"; then
16286 echo $ECHO_N "(cached) $ECHO_C" >&6
16287else
35996d22 16288 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc
MR
16289fi
16290echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16291echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16292
16293fi
16294if test `eval echo '${'$as_ac_Header'}'` = yes; then
16295 cat >>confdefs.h <<_ACEOF
16296#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16297_ACEOF
16298
16299fi
16300
16301done
16302
16303fi
16304
16305
16306for ac_header in nlist.h
16307do
16308as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16309if eval "test \"\${$as_ac_Header+set}\" = set"; then
16310 echo "$as_me:$LINENO: checking for $ac_header" >&5
16311echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16312if eval "test \"\${$as_ac_Header+set}\" = set"; then
16313 echo $ECHO_N "(cached) $ECHO_C" >&6
16314fi
16315echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16316echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16317else
16318 # Is the header compilable?
16319echo "$as_me:$LINENO: checking $ac_header usability" >&5
16320echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16321cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16322/* confdefs.h. */
16323_ACEOF
16324cat confdefs.h >>conftest.$ac_ext
16325cat >>conftest.$ac_ext <<_ACEOF
16326/* end confdefs.h. */
c0d27fcc
MR
16327$ac_includes_default
16328#include <$ac_header>
16329_ACEOF
16330rm -f conftest.$ac_objext
16331if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16332 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16333 ac_status=$?
35996d22
AS
16334 grep -v '^ *+' conftest.er1 >conftest.err
16335 rm -f conftest.er1
16336 cat conftest.err >&5
c0d27fcc
MR
16337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16338 (exit $ac_status); } &&
551ffc27
ST
16339 { ac_try='test -z "$ac_c_werror_flag"
16340 || test ! -s conftest.err'
35996d22
AS
16341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16342 (eval $ac_try) 2>&5
16343 ac_status=$?
16344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16345 (exit $ac_status); }; } &&
16346 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
16352 ac_header_compiler=yes
2c9dccc9
PJ
16353else
16354 echo "$as_me: failed program was:" >&5
19650fd6
AS
16355sed 's/^/| /' conftest.$ac_ext >&5
16356
c0d27fcc 16357ac_header_compiler=no
98418dba 16358fi
35996d22 16359rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16360echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16361echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 16362
c0d27fcc
MR
16363# Is the header present?
16364echo "$as_me:$LINENO: checking $ac_header presence" >&5
16365echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16366cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16367/* confdefs.h. */
16368_ACEOF
16369cat confdefs.h >>conftest.$ac_ext
16370cat >>conftest.$ac_ext <<_ACEOF
16371/* end confdefs.h. */
503d2be0
AS
16372#include <$ac_header>
16373_ACEOF
c0d27fcc 16374if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16375 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16376 ac_status=$?
6bae0ccf 16377 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16378 rm -f conftest.er1
16379 cat conftest.err >&5
c0d27fcc 16380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16381 (exit $ac_status); } >/dev/null; then
16382 if test -s conftest.err; then
16383 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 16384 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16385 else
16386 ac_cpp_err=
16387 fi
16388else
16389 ac_cpp_err=yes
16390fi
16391if test -z "$ac_cpp_err"; then
c0d27fcc 16392 ac_header_preproc=yes
503d2be0
AS
16393else
16394 echo "$as_me: failed program was:" >&5
19650fd6
AS
16395sed 's/^/| /' conftest.$ac_ext >&5
16396
c0d27fcc 16397 ac_header_preproc=no
b5de8dc0 16398fi
503d2be0 16399rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16400echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16401echo "${ECHO_T}$ac_header_preproc" >&6
16402
16403# So? What about this header?
35996d22
AS
16404case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16405 yes:no: )
c0d27fcc
MR
16406 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16407echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16408 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16409echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16410 ac_header_preproc=yes
19650fd6 16411 ;;
35996d22 16412 no:yes:* )
c0d27fcc
MR
16413 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16414echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
16415 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16416echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16417 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16418echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16419 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16420echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16421 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16422echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16423 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16424echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16425 (
16426 cat <<\_ASBOX
35996d22
AS
16427## ------------------------------------------ ##
16428## Report this to the AC_PACKAGE_NAME lists. ##
16429## ------------------------------------------ ##
19650fd6
AS
16430_ASBOX
16431 ) |
16432 sed "s/^/$as_me: WARNING: /" >&2
16433 ;;
c0d27fcc
MR
16434esac
16435echo "$as_me:$LINENO: checking for $ac_header" >&5
16436echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16437if eval "test \"\${$as_ac_Header+set}\" = set"; then
16438 echo $ECHO_N "(cached) $ECHO_C" >&6
16439else
35996d22 16440 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 16441fi
c0d27fcc 16442echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16443echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16444
16445fi
98418dba 16446if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16447 cat >>confdefs.h <<_ACEOF
98418dba 16448#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
16449_ACEOF
16450 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
16451echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
16452if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 16453 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 16454else
503d2be0 16455 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16456/* confdefs.h. */
16457_ACEOF
16458cat confdefs.h >>conftest.$ac_ext
16459cat >>conftest.$ac_ext <<_ACEOF
16460/* end confdefs.h. */
98418dba 16461#include <nlist.h>
b5de8dc0 16462
503d2be0
AS
16463int
16464main ()
16465{
98418dba
CW
16466static struct nlist ac_aggr;
16467if (ac_aggr.n_un.n_name)
16468return 0;
503d2be0
AS
16469 ;
16470 return 0;
16471}
16472_ACEOF
98418dba 16473rm -f conftest.$ac_objext
c0d27fcc 16474if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16475 (eval $ac_compile) 2>conftest.er1
503d2be0 16476 ac_status=$?
35996d22
AS
16477 grep -v '^ *+' conftest.er1 >conftest.err
16478 rm -f conftest.er1
16479 cat conftest.err >&5
c0d27fcc 16480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16481 (exit $ac_status); } &&
551ffc27
ST
16482 { ac_try='test -z "$ac_c_werror_flag"
16483 || test ! -s conftest.err'
35996d22
AS
16484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16485 (eval $ac_try) 2>&5
16486 ac_status=$?
16487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16488 (exit $ac_status); }; } &&
16489 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16491 (eval $ac_try) 2>&5
16492 ac_status=$?
c0d27fcc 16493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16494 (exit $ac_status); }; }; then
98418dba 16495 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
16496else
16497 echo "$as_me: failed program was:" >&5
19650fd6
AS
16498sed 's/^/| /' conftest.$ac_ext >&5
16499
6bae0ccf 16500cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16501/* confdefs.h. */
16502_ACEOF
16503cat confdefs.h >>conftest.$ac_ext
16504cat >>conftest.$ac_ext <<_ACEOF
16505/* end confdefs.h. */
6bae0ccf
DL
16506#include <nlist.h>
16507
16508int
16509main ()
16510{
16511static struct nlist ac_aggr;
16512if (sizeof ac_aggr.n_un.n_name)
16513return 0;
16514 ;
16515 return 0;
16516}
16517_ACEOF
16518rm -f conftest.$ac_objext
16519if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16520 (eval $ac_compile) 2>conftest.er1
6bae0ccf 16521 ac_status=$?
35996d22
AS
16522 grep -v '^ *+' conftest.er1 >conftest.err
16523 rm -f conftest.er1
16524 cat conftest.err >&5
6bae0ccf
DL
16525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16526 (exit $ac_status); } &&
551ffc27
ST
16527 { ac_try='test -z "$ac_c_werror_flag"
16528 || test ! -s conftest.err'
35996d22
AS
16529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16530 (eval $ac_try) 2>&5
16531 ac_status=$?
16532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16533 (exit $ac_status); }; } &&
16534 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
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); }; }; then
16540 ac_cv_member_struct_nlist_n_un_n_name=yes
16541else
16542 echo "$as_me: failed program was:" >&5
19650fd6
AS
16543sed 's/^/| /' conftest.$ac_ext >&5
16544
98418dba 16545ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 16546fi
35996d22 16547rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 16548fi
35996d22 16549rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 16550fi
c0d27fcc 16551echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
16552echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
16553if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 16554
c0d27fcc 16555cat >>confdefs.h <<_ACEOF
98418dba 16556#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 16557_ACEOF
b5de8dc0 16558
c0d27fcc
MR
16559
16560cat >>confdefs.h <<\_ACEOF
98418dba 16561#define NLIST_NAME_UNION 1
c0d27fcc 16562_ACEOF
b5de8dc0 16563
98418dba 16564fi
b5de8dc0 16565
c0d27fcc 16566
98418dba 16567fi
c0d27fcc 16568
98418dba 16569done
b5de8dc0 16570
98418dba
CW
16571fi
16572done
b5de8dc0 16573
c0d27fcc 16574
98418dba 16575# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 16576echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
16577echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
16578if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
16579 echo $ECHO_N "(cached) $ECHO_C" >&6
16580else
16581 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16582/* confdefs.h. */
16583_ACEOF
16584cat confdefs.h >>conftest.$ac_ext
16585cat >>conftest.$ac_ext <<_ACEOF
16586/* end confdefs.h. */
6bae0ccf 16587#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
16588#ifdef LDAV_PRIVILEGED
16589Yowza Am I SETGID yet
16590#endif
16591_ACEOF
16592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 16593 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
16594 ac_cv_func_getloadavg_setgid=yes
16595else
16596 ac_cv_func_getloadavg_setgid=no
16597fi
16598rm -f conftest*
b5de8dc0 16599
98418dba 16600fi
c0d27fcc 16601echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
16602echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
16603if test $ac_cv_func_getloadavg_setgid = yes; then
16604 NEED_SETGID=true
b5de8dc0 16605
c0d27fcc 16606cat >>confdefs.h <<\_ACEOF
98418dba 16607#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 16608_ACEOF
98418dba 16609
b5de8dc0 16610else
98418dba 16611 NEED_SETGID=false
b5de8dc0 16612fi
98418dba
CW
16613
16614if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 16615 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
16616echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
16617if test "${ac_cv_group_kmem+set}" = set; then
16618 echo $ECHO_N "(cached) $ECHO_C" >&6
16619else
16620 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
16621 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
16622 # If we got an error (system does not support symlinks), try without -L.
16623 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
16624 ac_cv_group_kmem=`echo $ac_ls_output \
35996d22 16625 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
16626 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
16627 / /s/.* //;p;'`
16628
b5de8dc0 16629fi
c0d27fcc 16630echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
16631echo "${ECHO_T}$ac_cv_group_kmem" >&6
16632 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 16633fi
98418dba
CW
16634if test "x$ac_save_LIBS" = x; then
16635 GETLOADAVG_LIBS=$LIBS
16636else
16637 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 16638fi
98418dba 16639LIBS=$ac_save_LIBS
b5de8dc0 16640
c0d27fcc
MR
16641
16642
16643echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
16644echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16645if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 16646 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 16647else
b936fae4
AS
16648 while :; do
16649 ac_cv_sys_largefile_source=no
503d2be0 16650 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16651/* confdefs.h. */
16652_ACEOF
16653cat confdefs.h >>conftest.$ac_ext
16654cat >>conftest.$ac_ext <<_ACEOF
16655/* end confdefs.h. */
b936fae4 16656#include <stdio.h>
503d2be0
AS
16657int
16658main ()
16659{
b936fae4
AS
16660return !fseeko;
16661 ;
16662 return 0;
16663}
16664_ACEOF
16665rm -f conftest.$ac_objext
c0d27fcc 16666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16667 (eval $ac_compile) 2>conftest.er1
b936fae4 16668 ac_status=$?
35996d22
AS
16669 grep -v '^ *+' conftest.er1 >conftest.err
16670 rm -f conftest.er1
16671 cat conftest.err >&5
c0d27fcc 16672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 16673 (exit $ac_status); } &&
551ffc27
ST
16674 { ac_try='test -z "$ac_c_werror_flag"
16675 || test ! -s conftest.err'
35996d22
AS
16676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16677 (eval $ac_try) 2>&5
16678 ac_status=$?
16679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16680 (exit $ac_status); }; } &&
16681 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
16683 (eval $ac_try) 2>&5
16684 ac_status=$?
c0d27fcc 16685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
16686 (exit $ac_status); }; }; then
16687 break
16688else
16689 echo "$as_me: failed program was:" >&5
19650fd6
AS
16690sed 's/^/| /' conftest.$ac_ext >&5
16691
b936fae4 16692fi
35996d22 16693rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4 16694 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16695/* confdefs.h. */
16696_ACEOF
16697cat confdefs.h >>conftest.$ac_ext
16698cat >>conftest.$ac_ext <<_ACEOF
16699/* end confdefs.h. */
b936fae4
AS
16700#define _LARGEFILE_SOURCE 1
16701#include <stdio.h>
b936fae4
AS
16702int
16703main ()
16704{
16705return !fseeko;
16706 ;
16707 return 0;
16708}
16709_ACEOF
16710rm -f conftest.$ac_objext
c0d27fcc 16711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16712 (eval $ac_compile) 2>conftest.er1
b936fae4 16713 ac_status=$?
35996d22
AS
16714 grep -v '^ *+' conftest.er1 >conftest.err
16715 rm -f conftest.er1
16716 cat conftest.err >&5
c0d27fcc 16717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 16718 (exit $ac_status); } &&
551ffc27
ST
16719 { ac_try='test -z "$ac_c_werror_flag"
16720 || test ! -s conftest.err'
35996d22
AS
16721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16722 (eval $ac_try) 2>&5
16723 ac_status=$?
16724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16725 (exit $ac_status); }; } &&
16726 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
16728 (eval $ac_try) 2>&5
16729 ac_status=$?
c0d27fcc 16730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
16731 (exit $ac_status); }; }; then
16732 ac_cv_sys_largefile_source=1; break
16733else
16734 echo "$as_me: failed program was:" >&5
19650fd6
AS
16735sed 's/^/| /' conftest.$ac_ext >&5
16736
b936fae4 16737fi
35996d22 16738rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4
AS
16739 break
16740done
16741fi
c0d27fcc 16742echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
16743echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16744if test "$ac_cv_sys_largefile_source" != no; then
16745
c0d27fcc 16746cat >>confdefs.h <<_ACEOF
b936fae4 16747#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 16748_ACEOF
b936fae4
AS
16749
16750fi
16751rm -f conftest*
4c343001 16752
b936fae4
AS
16753# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16754# in glibc 2.1.3, but that breaks too many other things.
16755# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 16756echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
16757echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16758if test "${ac_cv_func_fseeko+set}" = set; then
16759 echo $ECHO_N "(cached) $ECHO_C" >&6
16760else
16761 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16762/* confdefs.h. */
16763_ACEOF
16764cat confdefs.h >>conftest.$ac_ext
16765cat >>conftest.$ac_ext <<_ACEOF
16766/* end confdefs.h. */
b936fae4 16767#include <stdio.h>
b936fae4
AS
16768int
16769main ()
16770{
16771return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
16772 ;
16773 return 0;
16774}
16775_ACEOF
16776rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16778 (eval $ac_link) 2>conftest.er1
503d2be0 16779 ac_status=$?
35996d22
AS
16780 grep -v '^ *+' conftest.er1 >conftest.err
16781 rm -f conftest.er1
16782 cat conftest.err >&5
c0d27fcc 16783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16784 (exit $ac_status); } &&
551ffc27
ST
16785 { ac_try='test -z "$ac_c_werror_flag"
16786 || test ! -s conftest.err'
35996d22
AS
16787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16788 (eval $ac_try) 2>&5
16789 ac_status=$?
16790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16791 (exit $ac_status); }; } &&
16792 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16794 (eval $ac_try) 2>&5
16795 ac_status=$?
c0d27fcc 16796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16797 (exit $ac_status); }; }; then
b936fae4 16798 ac_cv_func_fseeko=yes
503d2be0
AS
16799else
16800 echo "$as_me: failed program was:" >&5
19650fd6
AS
16801sed 's/^/| /' conftest.$ac_ext >&5
16802
b936fae4 16803ac_cv_func_fseeko=no
503d2be0 16804fi
35996d22
AS
16805rm -f conftest.err conftest.$ac_objext \
16806 conftest$ac_exeext conftest.$ac_ext
503d2be0 16807fi
c0d27fcc 16808echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
16809echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16810if test $ac_cv_func_fseeko = yes; then
16811
c0d27fcc 16812cat >>confdefs.h <<\_ACEOF
b936fae4 16813#define HAVE_FSEEKO 1
c0d27fcc 16814_ACEOF
b936fae4 16815
4c343001
DL
16816fi
16817
c0d27fcc 16818
cd958eb3
MB
16819echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
16820echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
16821if test "${ac_cv_func_getpgrp_void+set}" = set; then
16822 echo $ECHO_N "(cached) $ECHO_C" >&6
16823else
16824 # Use it with a single arg.
16825cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16826/* confdefs.h. */
16827_ACEOF
16828cat confdefs.h >>conftest.$ac_ext
16829cat >>conftest.$ac_ext <<_ACEOF
16830/* end confdefs.h. */
cd958eb3
MB
16831$ac_includes_default
16832int
16833main ()
16834{
16835getpgrp (0);
16836 ;
16837 return 0;
16838}
16839_ACEOF
16840rm -f conftest.$ac_objext
16841if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16842 (eval $ac_compile) 2>conftest.er1
cd958eb3 16843 ac_status=$?
35996d22
AS
16844 grep -v '^ *+' conftest.er1 >conftest.err
16845 rm -f conftest.er1
16846 cat conftest.err >&5
cd958eb3
MB
16847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16848 (exit $ac_status); } &&
551ffc27
ST
16849 { ac_try='test -z "$ac_c_werror_flag"
16850 || test ! -s conftest.err'
35996d22
AS
16851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16852 (eval $ac_try) 2>&5
16853 ac_status=$?
16854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16855 (exit $ac_status); }; } &&
16856 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
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); }; }; then
16862 ac_cv_func_getpgrp_void=no
16863else
16864 echo "$as_me: failed program was:" >&5
19650fd6
AS
16865sed 's/^/| /' conftest.$ac_ext >&5
16866
cd958eb3
MB
16867ac_cv_func_getpgrp_void=yes
16868fi
35996d22 16869rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
16870
16871fi
16872echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
16873echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
16874if test $ac_cv_func_getpgrp_void = yes; then
16875
16876cat >>confdefs.h <<\_ACEOF
16877#define GETPGRP_VOID 1
16878_ACEOF
16879
16880fi
16881
16882
973a76b1
DL
16883
16884for ac_func in strftime
16885do
16886as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16887echo "$as_me:$LINENO: checking for $ac_func" >&5
16888echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16889if eval "test \"\${$as_ac_var+set}\" = set"; then
16890 echo $ECHO_N "(cached) $ECHO_C" >&6
16891else
16892 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16893/* confdefs.h. */
16894_ACEOF
16895cat confdefs.h >>conftest.$ac_ext
16896cat >>conftest.$ac_ext <<_ACEOF
16897/* end confdefs.h. */
35996d22
AS
16898/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16899 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16900#define $ac_func innocuous_$ac_func
16901
973a76b1 16902/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16903 which can conflict with char $ac_func (); below.
16904 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16905 <limits.h> exists even on freestanding compilers. */
35996d22 16906
19650fd6
AS
16907#ifdef __STDC__
16908# include <limits.h>
16909#else
16910# include <assert.h>
16911#endif
35996d22
AS
16912
16913#undef $ac_func
16914
973a76b1
DL
16915/* Override any gcc2 internal prototype to avoid an error. */
16916#ifdef __cplusplus
16917extern "C"
19650fd6 16918{
973a76b1
DL
16919#endif
16920/* We use char because int might match the return type of a gcc2
16921 builtin and then its argument prototype would still apply. */
16922char $ac_func ();
16923/* The GNU C library defines this for functions which it implements
16924 to always fail with ENOSYS. Some functions are actually named
16925 something starting with __ and the normal name is an alias. */
16926#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16927choke me
16928#else
19650fd6
AS
16929char (*f) () = $ac_func;
16930#endif
16931#ifdef __cplusplus
16932}
973a76b1
DL
16933#endif
16934
19650fd6
AS
16935int
16936main ()
16937{
16938return f != $ac_func;
973a76b1
DL
16939 ;
16940 return 0;
16941}
16942_ACEOF
16943rm -f conftest.$ac_objext conftest$ac_exeext
16944if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16945 (eval $ac_link) 2>conftest.er1
973a76b1 16946 ac_status=$?
35996d22
AS
16947 grep -v '^ *+' conftest.er1 >conftest.err
16948 rm -f conftest.er1
16949 cat conftest.err >&5
973a76b1
DL
16950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16951 (exit $ac_status); } &&
551ffc27
ST
16952 { ac_try='test -z "$ac_c_werror_flag"
16953 || test ! -s conftest.err'
35996d22
AS
16954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16955 (eval $ac_try) 2>&5
16956 ac_status=$?
16957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16958 (exit $ac_status); }; } &&
16959 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
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); }; }; then
16965 eval "$as_ac_var=yes"
16966else
16967 echo "$as_me: failed program was:" >&5
19650fd6
AS
16968sed 's/^/| /' conftest.$ac_ext >&5
16969
973a76b1
DL
16970eval "$as_ac_var=no"
16971fi
35996d22
AS
16972rm -f conftest.err conftest.$ac_objext \
16973 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
16974fi
16975echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16976echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16977if test `eval echo '${'$as_ac_var'}'` = yes; then
16978 cat >>confdefs.h <<_ACEOF
16979#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16980_ACEOF
16981
16982else
16983 # strftime is in -lintl on SCO UNIX.
16984echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
16985echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
16986if test "${ac_cv_lib_intl_strftime+set}" = set; then
16987 echo $ECHO_N "(cached) $ECHO_C" >&6
16988else
16989 ac_check_lib_save_LIBS=$LIBS
16990LIBS="-lintl $LIBS"
16991cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16992/* confdefs.h. */
16993_ACEOF
16994cat confdefs.h >>conftest.$ac_ext
16995cat >>conftest.$ac_ext <<_ACEOF
16996/* end confdefs.h. */
973a76b1
DL
16997
16998/* Override any gcc2 internal prototype to avoid an error. */
16999#ifdef __cplusplus
17000extern "C"
17001#endif
17002/* We use char because int might match the return type of a gcc2
17003 builtin and then its argument prototype would still apply. */
17004char strftime ();
17005int
17006main ()
17007{
17008strftime ();
17009 ;
17010 return 0;
17011}
17012_ACEOF
17013rm -f conftest.$ac_objext conftest$ac_exeext
17014if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17015 (eval $ac_link) 2>conftest.er1
973a76b1 17016 ac_status=$?
35996d22
AS
17017 grep -v '^ *+' conftest.er1 >conftest.err
17018 rm -f conftest.er1
17019 cat conftest.err >&5
973a76b1
DL
17020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17021 (exit $ac_status); } &&
551ffc27
ST
17022 { ac_try='test -z "$ac_c_werror_flag"
17023 || test ! -s conftest.err'
35996d22
AS
17024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17025 (eval $ac_try) 2>&5
17026 ac_status=$?
17027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17028 (exit $ac_status); }; } &&
17029 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
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); }; }; then
17035 ac_cv_lib_intl_strftime=yes
17036else
17037 echo "$as_me: failed program was:" >&5
19650fd6
AS
17038sed 's/^/| /' conftest.$ac_ext >&5
17039
973a76b1
DL
17040ac_cv_lib_intl_strftime=no
17041fi
35996d22
AS
17042rm -f conftest.err conftest.$ac_objext \
17043 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
17044LIBS=$ac_check_lib_save_LIBS
17045fi
17046echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
17047echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
17048if test $ac_cv_lib_intl_strftime = yes; then
17049 cat >>confdefs.h <<\_ACEOF
17050#define HAVE_STRFTIME 1
17051_ACEOF
17052
17053LIBS="-lintl $LIBS"
17054fi
17055
17056fi
17057done
17058
17059
b936fae4
AS
17060# UNIX98 PTYs.
17061
17062for ac_func in grantpt
503d2be0
AS
17063do
17064as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 17065echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
17066echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17067if eval "test \"\${$as_ac_var+set}\" = set"; then
17068 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17069else
503d2be0 17070 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17071/* confdefs.h. */
17072_ACEOF
17073cat confdefs.h >>conftest.$ac_ext
17074cat >>conftest.$ac_ext <<_ACEOF
17075/* end confdefs.h. */
35996d22
AS
17076/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17077 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17078#define $ac_func innocuous_$ac_func
17079
503d2be0 17080/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17081 which can conflict with char $ac_func (); below.
17082 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17083 <limits.h> exists even on freestanding compilers. */
35996d22 17084
19650fd6
AS
17085#ifdef __STDC__
17086# include <limits.h>
17087#else
17088# include <assert.h>
17089#endif
35996d22
AS
17090
17091#undef $ac_func
17092
4c343001 17093/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17094#ifdef __cplusplus
17095extern "C"
19650fd6 17096{
503d2be0 17097#endif
4c343001 17098/* We use char because int might match the return type of a gcc2
503d2be0
AS
17099 builtin and then its argument prototype would still apply. */
17100char $ac_func ();
503d2be0
AS
17101/* The GNU C library defines this for functions which it implements
17102 to always fail with ENOSYS. Some functions are actually named
17103 something starting with __ and the normal name is an alias. */
17104#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17105choke me
17106#else
19650fd6
AS
17107char (*f) () = $ac_func;
17108#endif
17109#ifdef __cplusplus
17110}
503d2be0 17111#endif
4c343001 17112
19650fd6
AS
17113int
17114main ()
17115{
17116return f != $ac_func;
503d2be0
AS
17117 ;
17118 return 0;
17119}
17120_ACEOF
17121rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17123 (eval $ac_link) 2>conftest.er1
503d2be0 17124 ac_status=$?
35996d22
AS
17125 grep -v '^ *+' conftest.er1 >conftest.err
17126 rm -f conftest.er1
17127 cat conftest.err >&5
c0d27fcc 17128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17129 (exit $ac_status); } &&
551ffc27
ST
17130 { ac_try='test -z "$ac_c_werror_flag"
17131 || test ! -s conftest.err'
35996d22
AS
17132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17133 (eval $ac_try) 2>&5
17134 ac_status=$?
17135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17136 (exit $ac_status); }; } &&
17137 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17139 (eval $ac_try) 2>&5
17140 ac_status=$?
c0d27fcc 17141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17142 (exit $ac_status); }; }; then
17143 eval "$as_ac_var=yes"
17144else
17145 echo "$as_me: failed program was:" >&5
19650fd6
AS
17146sed 's/^/| /' conftest.$ac_ext >&5
17147
503d2be0
AS
17148eval "$as_ac_var=no"
17149fi
35996d22
AS
17150rm -f conftest.err conftest.$ac_objext \
17151 conftest$ac_exeext conftest.$ac_ext
503d2be0 17152fi
c0d27fcc 17153echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17154echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17155if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17156 cat >>confdefs.h <<_ACEOF
503d2be0 17157#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17158_ACEOF
4c343001
DL
17159
17160fi
503d2be0
AS
17161done
17162
c0d27fcc 17163
b936fae4 17164# PTY-related GNU extensions.
4c343001 17165
b936fae4
AS
17166for ac_func in getpt
17167do
17168as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 17169echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
17170echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17171if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 17172 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17173else
b936fae4 17174 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17175/* confdefs.h. */
17176_ACEOF
17177cat confdefs.h >>conftest.$ac_ext
17178cat >>conftest.$ac_ext <<_ACEOF
17179/* end confdefs.h. */
35996d22
AS
17180/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17181 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17182#define $ac_func innocuous_$ac_func
17183
087121cc 17184/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17185 which can conflict with char $ac_func (); below.
17186 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17187 <limits.h> exists even on freestanding compilers. */
35996d22 17188
19650fd6
AS
17189#ifdef __STDC__
17190# include <limits.h>
17191#else
17192# include <assert.h>
17193#endif
35996d22
AS
17194
17195#undef $ac_func
17196
087121cc 17197/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17198#ifdef __cplusplus
17199extern "C"
19650fd6 17200{
503d2be0 17201#endif
087121cc 17202/* We use char because int might match the return type of a gcc2
503d2be0
AS
17203 builtin and then its argument prototype would still apply. */
17204char $ac_func ();
087121cc
GM
17205/* The GNU C library defines this for functions which it implements
17206 to always fail with ENOSYS. Some functions are actually named
17207 something starting with __ and the normal name is an alias. */
17208#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17209choke me
17210#else
19650fd6
AS
17211char (*f) () = $ac_func;
17212#endif
17213#ifdef __cplusplus
17214}
087121cc
GM
17215#endif
17216
19650fd6
AS
17217int
17218main ()
17219{
17220return f != $ac_func;
503d2be0
AS
17221 ;
17222 return 0;
17223}
17224_ACEOF
17225rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17226if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17227 (eval $ac_link) 2>conftest.er1
503d2be0 17228 ac_status=$?
35996d22
AS
17229 grep -v '^ *+' conftest.er1 >conftest.err
17230 rm -f conftest.er1
17231 cat conftest.err >&5
c0d27fcc 17232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17233 (exit $ac_status); } &&
551ffc27
ST
17234 { ac_try='test -z "$ac_c_werror_flag"
17235 || test ! -s conftest.err'
35996d22
AS
17236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17237 (eval $ac_try) 2>&5
17238 ac_status=$?
17239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17240 (exit $ac_status); }; } &&
17241 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17243 (eval $ac_try) 2>&5
17244 ac_status=$?
c0d27fcc 17245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17246 (exit $ac_status); }; }; then
17247 eval "$as_ac_var=yes"
17248else
17249 echo "$as_me: failed program was:" >&5
19650fd6
AS
17250sed 's/^/| /' conftest.$ac_ext >&5
17251
503d2be0
AS
17252eval "$as_ac_var=no"
17253fi
35996d22
AS
17254rm -f conftest.err conftest.$ac_objext \
17255 conftest$ac_exeext conftest.$ac_ext
503d2be0 17256fi
c0d27fcc 17257echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17258echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17259if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17260 cat >>confdefs.h <<_ACEOF
503d2be0 17261#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17262_ACEOF
087121cc 17263
087121cc
GM
17264fi
17265done
17266
c0d27fcc 17267
ba4481b5
DL
17268# Check this now, so that we will NOT find the above functions in ncurses.
17269# That is because we have not set up to link ncurses in lib-src.
17270# It's better to believe a function is not available
17271# than to expect to find it in ncurses.
503d2be0 17272
c0d27fcc 17273echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
17274echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
17275if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
17276 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17277else
503d2be0 17278 ac_check_lib_save_LIBS=$LIBS
ba4481b5 17279LIBS="-lncurses $LIBS"
503d2be0 17280cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17281/* confdefs.h. */
17282_ACEOF
17283cat confdefs.h >>conftest.$ac_ext
17284cat >>conftest.$ac_ext <<_ACEOF
17285/* end confdefs.h. */
503d2be0 17286
ba4481b5 17287/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17288#ifdef __cplusplus
17289extern "C"
17290#endif
ba4481b5 17291/* We use char because int might match the return type of a gcc2
503d2be0
AS
17292 builtin and then its argument prototype would still apply. */
17293char tparm ();
17294int
17295main ()
17296{
17297tparm ();
17298 ;
17299 return 0;
17300}
17301_ACEOF
17302rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17303if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17304 (eval $ac_link) 2>conftest.er1
503d2be0 17305 ac_status=$?
35996d22
AS
17306 grep -v '^ *+' conftest.er1 >conftest.err
17307 rm -f conftest.er1
17308 cat conftest.err >&5
c0d27fcc 17309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17310 (exit $ac_status); } &&
551ffc27
ST
17311 { ac_try='test -z "$ac_c_werror_flag"
17312 || test ! -s conftest.err'
35996d22
AS
17313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17314 (eval $ac_try) 2>&5
17315 ac_status=$?
17316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17317 (exit $ac_status); }; } &&
17318 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17320 (eval $ac_try) 2>&5
17321 ac_status=$?
c0d27fcc 17322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17323 (exit $ac_status); }; }; then
17324 ac_cv_lib_ncurses_tparm=yes
17325else
17326 echo "$as_me: failed program was:" >&5
19650fd6
AS
17327sed 's/^/| /' conftest.$ac_ext >&5
17328
503d2be0
AS
17329ac_cv_lib_ncurses_tparm=no
17330fi
35996d22
AS
17331rm -f conftest.err conftest.$ac_objext \
17332 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17333LIBS=$ac_check_lib_save_LIBS
17334fi
c0d27fcc 17335echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
17336echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
17337if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 17338 cat >>confdefs.h <<_ACEOF
503d2be0 17339#define HAVE_LIBNCURSES 1
c0d27fcc 17340_ACEOF
ba4481b5
DL
17341
17342 LIBS="-lncurses $LIBS"
17343
ba4481b5
DL
17344fi
17345
c0d27fcc 17346
84e70f78
KR
17347# Do we need the Hesiod library to provide the support routines?
17348if test "$with_hesiod" = yes ; then
17349 # Don't set $LIBS here -- see comments above.
17350 resolv=no
c0d27fcc 17351 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
17352echo $ECHO_N "checking for res_send... $ECHO_C" >&6
17353if test "${ac_cv_func_res_send+set}" = set; then
17354 echo $ECHO_N "(cached) $ECHO_C" >&6
17355else
17356 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17357/* confdefs.h. */
17358_ACEOF
17359cat confdefs.h >>conftest.$ac_ext
17360cat >>conftest.$ac_ext <<_ACEOF
17361/* end confdefs.h. */
35996d22
AS
17362/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
17363 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17364#define res_send innocuous_res_send
17365
84e70f78 17366/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17367 which can conflict with char res_send (); below.
17368 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17369 <limits.h> exists even on freestanding compilers. */
35996d22 17370
19650fd6
AS
17371#ifdef __STDC__
17372# include <limits.h>
17373#else
17374# include <assert.h>
17375#endif
35996d22
AS
17376
17377#undef res_send
17378
84e70f78
KR
17379/* Override any gcc2 internal prototype to avoid an error. */
17380#ifdef __cplusplus
17381extern "C"
19650fd6 17382{
84e70f78
KR
17383#endif
17384/* We use char because int might match the return type of a gcc2
17385 builtin and then its argument prototype would still apply. */
17386char res_send ();
84e70f78
KR
17387/* The GNU C library defines this for functions which it implements
17388 to always fail with ENOSYS. Some functions are actually named
17389 something starting with __ and the normal name is an alias. */
17390#if defined (__stub_res_send) || defined (__stub___res_send)
17391choke me
17392#else
19650fd6
AS
17393char (*f) () = res_send;
17394#endif
17395#ifdef __cplusplus
17396}
cd958eb3
MB
17397#endif
17398
19650fd6
AS
17399int
17400main ()
17401{
17402return f != res_send;
84e70f78
KR
17403 ;
17404 return 0;
17405}
17406_ACEOF
17407rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17409 (eval $ac_link) 2>conftest.er1
84e70f78 17410 ac_status=$?
35996d22
AS
17411 grep -v '^ *+' conftest.er1 >conftest.err
17412 rm -f conftest.er1
17413 cat conftest.err >&5
c0d27fcc 17414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17415 (exit $ac_status); } &&
551ffc27
ST
17416 { ac_try='test -z "$ac_c_werror_flag"
17417 || test ! -s conftest.err'
35996d22
AS
17418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17419 (eval $ac_try) 2>&5
17420 ac_status=$?
17421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17422 (exit $ac_status); }; } &&
17423 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17425 (eval $ac_try) 2>&5
17426 ac_status=$?
c0d27fcc 17427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17428 (exit $ac_status); }; }; then
17429 ac_cv_func_res_send=yes
17430else
17431 echo "$as_me: failed program was:" >&5
19650fd6
AS
17432sed 's/^/| /' conftest.$ac_ext >&5
17433
84e70f78
KR
17434ac_cv_func_res_send=no
17435fi
35996d22
AS
17436rm -f conftest.err conftest.$ac_objext \
17437 conftest$ac_exeext conftest.$ac_ext
84e70f78 17438fi
c0d27fcc 17439echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
17440echo "${ECHO_T}$ac_cv_func_res_send" >&6
17441if test $ac_cv_func_res_send = yes; then
17442 :
17443else
c0d27fcc 17444 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
17445echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
17446if test "${ac_cv_func___res_send+set}" = set; then
17447 echo $ECHO_N "(cached) $ECHO_C" >&6
17448else
17449 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17450/* confdefs.h. */
17451_ACEOF
17452cat confdefs.h >>conftest.$ac_ext
17453cat >>conftest.$ac_ext <<_ACEOF
17454/* end confdefs.h. */
35996d22
AS
17455/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
17456 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17457#define __res_send innocuous___res_send
17458
84e70f78 17459/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17460 which can conflict with char __res_send (); below.
17461 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17462 <limits.h> exists even on freestanding compilers. */
35996d22 17463
19650fd6
AS
17464#ifdef __STDC__
17465# include <limits.h>
17466#else
17467# include <assert.h>
17468#endif
35996d22
AS
17469
17470#undef __res_send
17471
84e70f78
KR
17472/* Override any gcc2 internal prototype to avoid an error. */
17473#ifdef __cplusplus
17474extern "C"
19650fd6 17475{
84e70f78
KR
17476#endif
17477/* We use char because int might match the return type of a gcc2
17478 builtin and then its argument prototype would still apply. */
17479char __res_send ();
84e70f78
KR
17480/* The GNU C library defines this for functions which it implements
17481 to always fail with ENOSYS. Some functions are actually named
17482 something starting with __ and the normal name is an alias. */
17483#if defined (__stub___res_send) || defined (__stub_____res_send)
17484choke me
17485#else
19650fd6
AS
17486char (*f) () = __res_send;
17487#endif
17488#ifdef __cplusplus
17489}
84e70f78
KR
17490#endif
17491
19650fd6
AS
17492int
17493main ()
17494{
17495return f != __res_send;
84e70f78
KR
17496 ;
17497 return 0;
17498}
17499_ACEOF
17500rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17501if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17502 (eval $ac_link) 2>conftest.er1
84e70f78 17503 ac_status=$?
35996d22
AS
17504 grep -v '^ *+' conftest.er1 >conftest.err
17505 rm -f conftest.er1
17506 cat conftest.err >&5
c0d27fcc 17507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17508 (exit $ac_status); } &&
551ffc27
ST
17509 { ac_try='test -z "$ac_c_werror_flag"
17510 || test ! -s conftest.err'
35996d22
AS
17511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17512 (eval $ac_try) 2>&5
17513 ac_status=$?
17514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17515 (exit $ac_status); }; } &&
17516 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17518 (eval $ac_try) 2>&5
17519 ac_status=$?
c0d27fcc 17520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17521 (exit $ac_status); }; }; then
17522 ac_cv_func___res_send=yes
17523else
17524 echo "$as_me: failed program was:" >&5
19650fd6
AS
17525sed 's/^/| /' conftest.$ac_ext >&5
17526
84e70f78
KR
17527ac_cv_func___res_send=no
17528fi
35996d22
AS
17529rm -f conftest.err conftest.$ac_objext \
17530 conftest$ac_exeext conftest.$ac_ext
84e70f78 17531fi
c0d27fcc 17532echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
17533echo "${ECHO_T}$ac_cv_func___res_send" >&6
17534if test $ac_cv_func___res_send = yes; then
17535 :
17536else
c0d27fcc 17537 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
17538echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
17539if test "${ac_cv_lib_resolv_res_send+set}" = set; then
17540 echo $ECHO_N "(cached) $ECHO_C" >&6
17541else
17542 ac_check_lib_save_LIBS=$LIBS
17543LIBS="-lresolv $LIBS"
17544cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17545/* confdefs.h. */
17546_ACEOF
17547cat confdefs.h >>conftest.$ac_ext
17548cat >>conftest.$ac_ext <<_ACEOF
17549/* end confdefs.h. */
84e70f78
KR
17550
17551/* Override any gcc2 internal prototype to avoid an error. */
17552#ifdef __cplusplus
17553extern "C"
17554#endif
17555/* We use char because int might match the return type of a gcc2
17556 builtin and then its argument prototype would still apply. */
17557char res_send ();
17558int
17559main ()
17560{
17561res_send ();
17562 ;
17563 return 0;
17564}
17565_ACEOF
17566rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17567if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17568 (eval $ac_link) 2>conftest.er1
84e70f78 17569 ac_status=$?
35996d22
AS
17570 grep -v '^ *+' conftest.er1 >conftest.err
17571 rm -f conftest.er1
17572 cat conftest.err >&5
c0d27fcc 17573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17574 (exit $ac_status); } &&
551ffc27
ST
17575 { ac_try='test -z "$ac_c_werror_flag"
17576 || test ! -s conftest.err'
35996d22
AS
17577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17578 (eval $ac_try) 2>&5
17579 ac_status=$?
17580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17581 (exit $ac_status); }; } &&
17582 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17584 (eval $ac_try) 2>&5
17585 ac_status=$?
c0d27fcc 17586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17587 (exit $ac_status); }; }; then
17588 ac_cv_lib_resolv_res_send=yes
17589else
17590 echo "$as_me: failed program was:" >&5
19650fd6
AS
17591sed 's/^/| /' conftest.$ac_ext >&5
17592
84e70f78
KR
17593ac_cv_lib_resolv_res_send=no
17594fi
35996d22
AS
17595rm -f conftest.err conftest.$ac_objext \
17596 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17597LIBS=$ac_check_lib_save_LIBS
17598fi
c0d27fcc 17599echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
17600echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
17601if test $ac_cv_lib_resolv_res_send = yes; then
17602 resolv=yes
17603else
c0d27fcc 17604 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
17605echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
17606if test "${ac_cv_lib_resolv___res_send+set}" = set; then
17607 echo $ECHO_N "(cached) $ECHO_C" >&6
17608else
17609 ac_check_lib_save_LIBS=$LIBS
17610LIBS="-lresolv $LIBS"
17611cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17612/* confdefs.h. */
17613_ACEOF
17614cat confdefs.h >>conftest.$ac_ext
17615cat >>conftest.$ac_ext <<_ACEOF
17616/* end confdefs.h. */
84e70f78
KR
17617
17618/* Override any gcc2 internal prototype to avoid an error. */
17619#ifdef __cplusplus
17620extern "C"
17621#endif
17622/* We use char because int might match the return type of a gcc2
17623 builtin and then its argument prototype would still apply. */
17624char __res_send ();
17625int
17626main ()
17627{
17628__res_send ();
17629 ;
17630 return 0;
17631}
17632_ACEOF
17633rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17634if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17635 (eval $ac_link) 2>conftest.er1
84e70f78 17636 ac_status=$?
35996d22
AS
17637 grep -v '^ *+' conftest.er1 >conftest.err
17638 rm -f conftest.er1
17639 cat conftest.err >&5
c0d27fcc 17640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17641 (exit $ac_status); } &&
551ffc27
ST
17642 { ac_try='test -z "$ac_c_werror_flag"
17643 || test ! -s conftest.err'
35996d22
AS
17644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17645 (eval $ac_try) 2>&5
17646 ac_status=$?
17647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17648 (exit $ac_status); }; } &&
17649 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17651 (eval $ac_try) 2>&5
17652 ac_status=$?
c0d27fcc 17653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17654 (exit $ac_status); }; }; then
17655 ac_cv_lib_resolv___res_send=yes
17656else
17657 echo "$as_me: failed program was:" >&5
19650fd6
AS
17658sed 's/^/| /' conftest.$ac_ext >&5
17659
84e70f78
KR
17660ac_cv_lib_resolv___res_send=no
17661fi
35996d22
AS
17662rm -f conftest.err conftest.$ac_objext \
17663 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17664LIBS=$ac_check_lib_save_LIBS
17665fi
c0d27fcc 17666echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
17667echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
17668if test $ac_cv_lib_resolv___res_send = yes; then
17669 resolv=yes
17670fi
17671
17672fi
17673
17674fi
17675
17676fi
17677
17678 if test "$resolv" = yes ; then
17679 RESOLVLIB=-lresolv
b936fae4 17680
c0d27fcc 17681cat >>confdefs.h <<\_ACEOF
84e70f78 17682#define HAVE_LIBRESOLV 1
c0d27fcc 17683_ACEOF
84e70f78
KR
17684
17685 else
17686 RESOLVLIB=
17687 fi
c0d27fcc 17688 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
17689echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
17690if test "${ac_cv_func_hes_getmailhost+set}" = set; then
17691 echo $ECHO_N "(cached) $ECHO_C" >&6
17692else
17693 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17694/* confdefs.h. */
17695_ACEOF
17696cat confdefs.h >>conftest.$ac_ext
17697cat >>conftest.$ac_ext <<_ACEOF
17698/* end confdefs.h. */
35996d22
AS
17699/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
17700 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17701#define hes_getmailhost innocuous_hes_getmailhost
17702
84e70f78 17703/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17704 which can conflict with char hes_getmailhost (); below.
17705 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17706 <limits.h> exists even on freestanding compilers. */
35996d22 17707
19650fd6
AS
17708#ifdef __STDC__
17709# include <limits.h>
17710#else
17711# include <assert.h>
17712#endif
35996d22
AS
17713
17714#undef hes_getmailhost
17715
84e70f78
KR
17716/* Override any gcc2 internal prototype to avoid an error. */
17717#ifdef __cplusplus
17718extern "C"
19650fd6 17719{
84e70f78
KR
17720#endif
17721/* We use char because int might match the return type of a gcc2
17722 builtin and then its argument prototype would still apply. */
17723char hes_getmailhost ();
84e70f78
KR
17724/* The GNU C library defines this for functions which it implements
17725 to always fail with ENOSYS. Some functions are actually named
17726 something starting with __ and the normal name is an alias. */
17727#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
17728choke me
17729#else
19650fd6
AS
17730char (*f) () = hes_getmailhost;
17731#endif
17732#ifdef __cplusplus
17733}
cd958eb3
MB
17734#endif
17735
19650fd6
AS
17736int
17737main ()
17738{
17739return f != hes_getmailhost;
84e70f78
KR
17740 ;
17741 return 0;
17742}
17743_ACEOF
17744rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17745if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17746 (eval $ac_link) 2>conftest.er1
84e70f78 17747 ac_status=$?
35996d22
AS
17748 grep -v '^ *+' conftest.er1 >conftest.err
17749 rm -f conftest.er1
17750 cat conftest.err >&5
c0d27fcc 17751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17752 (exit $ac_status); } &&
551ffc27
ST
17753 { ac_try='test -z "$ac_c_werror_flag"
17754 || test ! -s conftest.err'
35996d22
AS
17755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17756 (eval $ac_try) 2>&5
17757 ac_status=$?
17758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17759 (exit $ac_status); }; } &&
17760 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17762 (eval $ac_try) 2>&5
17763 ac_status=$?
c0d27fcc 17764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17765 (exit $ac_status); }; }; then
17766 ac_cv_func_hes_getmailhost=yes
17767else
17768 echo "$as_me: failed program was:" >&5
19650fd6
AS
17769sed 's/^/| /' conftest.$ac_ext >&5
17770
84e70f78
KR
17771ac_cv_func_hes_getmailhost=no
17772fi
35996d22
AS
17773rm -f conftest.err conftest.$ac_objext \
17774 conftest$ac_exeext conftest.$ac_ext
84e70f78 17775fi
c0d27fcc 17776echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
17777echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
17778if test $ac_cv_func_hes_getmailhost = yes; then
17779 :
17780else
c0d27fcc 17781 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
17782echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
17783if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
17784 echo $ECHO_N "(cached) $ECHO_C" >&6
17785else
17786 ac_check_lib_save_LIBS=$LIBS
17787LIBS="-lhesiod $RESOLVLIB $LIBS"
17788cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17789/* confdefs.h. */
17790_ACEOF
17791cat confdefs.h >>conftest.$ac_ext
17792cat >>conftest.$ac_ext <<_ACEOF
17793/* end confdefs.h. */
84e70f78
KR
17794
17795/* Override any gcc2 internal prototype to avoid an error. */
17796#ifdef __cplusplus
17797extern "C"
17798#endif
17799/* We use char because int might match the return type of a gcc2
17800 builtin and then its argument prototype would still apply. */
17801char hes_getmailhost ();
17802int
17803main ()
17804{
17805hes_getmailhost ();
17806 ;
17807 return 0;
17808}
17809_ACEOF
17810rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17811if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17812 (eval $ac_link) 2>conftest.er1
84e70f78 17813 ac_status=$?
35996d22
AS
17814 grep -v '^ *+' conftest.er1 >conftest.err
17815 rm -f conftest.er1
17816 cat conftest.err >&5
c0d27fcc 17817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17818 (exit $ac_status); } &&
551ffc27
ST
17819 { ac_try='test -z "$ac_c_werror_flag"
17820 || test ! -s conftest.err'
35996d22
AS
17821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17822 (eval $ac_try) 2>&5
17823 ac_status=$?
17824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17825 (exit $ac_status); }; } &&
17826 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17828 (eval $ac_try) 2>&5
17829 ac_status=$?
c0d27fcc 17830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17831 (exit $ac_status); }; }; then
17832 ac_cv_lib_hesiod_hes_getmailhost=yes
17833else
17834 echo "$as_me: failed program was:" >&5
19650fd6
AS
17835sed 's/^/| /' conftest.$ac_ext >&5
17836
84e70f78
KR
17837ac_cv_lib_hesiod_hes_getmailhost=no
17838fi
35996d22
AS
17839rm -f conftest.err conftest.$ac_objext \
17840 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17841LIBS=$ac_check_lib_save_LIBS
17842fi
c0d27fcc 17843echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
17844echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
17845if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 17846
c0d27fcc 17847cat >>confdefs.h <<\_ACEOF
84e70f78 17848#define HAVE_LIBHESIOD 1
c0d27fcc 17849_ACEOF
84e70f78
KR
17850
17851else
17852 :
17853fi
17854
17855fi
17856
17857fi
17858
a21616bd
KR
17859# These tell us which Kerberos-related libraries to use.
17860if test "${with_kerberos+set}" = set; then
503d2be0 17861
c0d27fcc 17862echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
17863echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
17864if test "${ac_cv_lib_com_err_com_err+set}" = set; then
17865 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17866else
503d2be0 17867 ac_check_lib_save_LIBS=$LIBS
a21616bd 17868LIBS="-lcom_err $LIBS"
503d2be0 17869cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17870/* confdefs.h. */
17871_ACEOF
17872cat confdefs.h >>conftest.$ac_ext
17873cat >>conftest.$ac_ext <<_ACEOF
17874/* end confdefs.h. */
503d2be0 17875
a21616bd 17876/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17877#ifdef __cplusplus
17878extern "C"
17879#endif
a21616bd 17880/* We use char because int might match the return type of a gcc2
503d2be0
AS
17881 builtin and then its argument prototype would still apply. */
17882char com_err ();
17883int
17884main ()
17885{
17886com_err ();
17887 ;
17888 return 0;
17889}
17890_ACEOF
17891rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17892if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17893 (eval $ac_link) 2>conftest.er1
503d2be0 17894 ac_status=$?
35996d22
AS
17895 grep -v '^ *+' conftest.er1 >conftest.err
17896 rm -f conftest.er1
17897 cat conftest.err >&5
c0d27fcc 17898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17899 (exit $ac_status); } &&
551ffc27
ST
17900 { ac_try='test -z "$ac_c_werror_flag"
17901 || test ! -s conftest.err'
35996d22
AS
17902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17903 (eval $ac_try) 2>&5
17904 ac_status=$?
17905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17906 (exit $ac_status); }; } &&
17907 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17909 (eval $ac_try) 2>&5
17910 ac_status=$?
c0d27fcc 17911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17912 (exit $ac_status); }; }; then
17913 ac_cv_lib_com_err_com_err=yes
17914else
17915 echo "$as_me: failed program was:" >&5
19650fd6
AS
17916sed 's/^/| /' conftest.$ac_ext >&5
17917
503d2be0
AS
17918ac_cv_lib_com_err_com_err=no
17919fi
35996d22
AS
17920rm -f conftest.err conftest.$ac_objext \
17921 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17922LIBS=$ac_check_lib_save_LIBS
17923fi
c0d27fcc 17924echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
17925echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
17926if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 17927 cat >>confdefs.h <<_ACEOF
503d2be0 17928#define HAVE_LIBCOM_ERR 1
c0d27fcc 17929_ACEOF
a21616bd
KR
17930
17931 LIBS="-lcom_err $LIBS"
17932
a21616bd
KR
17933fi
17934
c0d27fcc
MR
17935
17936echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
17937echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
17938if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
17939 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17940else
503d2be0 17941 ac_check_lib_save_LIBS=$LIBS
a21616bd 17942LIBS="-lk5crypto $LIBS"
503d2be0 17943cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17944/* confdefs.h. */
17945_ACEOF
17946cat confdefs.h >>conftest.$ac_ext
17947cat >>conftest.$ac_ext <<_ACEOF
17948/* end confdefs.h. */
503d2be0 17949
a21616bd 17950/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17951#ifdef __cplusplus
17952extern "C"
17953#endif
a21616bd 17954/* We use char because int might match the return type of a gcc2
503d2be0
AS
17955 builtin and then its argument prototype would still apply. */
17956char mit_des_cbc_encrypt ();
17957int
17958main ()
17959{
17960mit_des_cbc_encrypt ();
17961 ;
17962 return 0;
17963}
17964_ACEOF
17965rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17966if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17967 (eval $ac_link) 2>conftest.er1
503d2be0 17968 ac_status=$?
35996d22
AS
17969 grep -v '^ *+' conftest.er1 >conftest.err
17970 rm -f conftest.er1
17971 cat conftest.err >&5
c0d27fcc 17972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17973 (exit $ac_status); } &&
551ffc27
ST
17974 { ac_try='test -z "$ac_c_werror_flag"
17975 || test ! -s conftest.err'
35996d22
AS
17976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17977 (eval $ac_try) 2>&5
17978 ac_status=$?
17979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17980 (exit $ac_status); }; } &&
17981 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17983 (eval $ac_try) 2>&5
17984 ac_status=$?
c0d27fcc 17985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17986 (exit $ac_status); }; }; then
17987 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
17988else
17989 echo "$as_me: failed program was:" >&5
19650fd6
AS
17990sed 's/^/| /' conftest.$ac_ext >&5
17991
503d2be0
AS
17992ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
17993fi
35996d22
AS
17994rm -f conftest.err conftest.$ac_objext \
17995 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17996LIBS=$ac_check_lib_save_LIBS
17997fi
c0d27fcc 17998echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
17999echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
18000if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 18001 cat >>confdefs.h <<_ACEOF
503d2be0 18002#define HAVE_LIBK5CRYPTO 1
c0d27fcc 18003_ACEOF
a21616bd
KR
18004
18005 LIBS="-lk5crypto $LIBS"
18006
a21616bd
KR
18007fi
18008
c0d27fcc
MR
18009
18010echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
18011echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
18012if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
18013 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18014else
503d2be0 18015 ac_check_lib_save_LIBS=$LIBS
a21616bd 18016LIBS="-lcrypto $LIBS"
503d2be0 18017cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18018/* confdefs.h. */
18019_ACEOF
18020cat confdefs.h >>conftest.$ac_ext
18021cat >>conftest.$ac_ext <<_ACEOF
18022/* end confdefs.h. */
503d2be0 18023
a21616bd 18024/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18025#ifdef __cplusplus
18026extern "C"
18027#endif
a21616bd 18028/* We use char because int might match the return type of a gcc2
503d2be0
AS
18029 builtin and then its argument prototype would still apply. */
18030char mit_des_cbc_encrypt ();
18031int
18032main ()
18033{
18034mit_des_cbc_encrypt ();
18035 ;
18036 return 0;
18037}
18038_ACEOF
18039rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18040if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18041 (eval $ac_link) 2>conftest.er1
503d2be0 18042 ac_status=$?
35996d22
AS
18043 grep -v '^ *+' conftest.er1 >conftest.err
18044 rm -f conftest.er1
18045 cat conftest.err >&5
c0d27fcc 18046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18047 (exit $ac_status); } &&
551ffc27
ST
18048 { ac_try='test -z "$ac_c_werror_flag"
18049 || test ! -s conftest.err'
35996d22
AS
18050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18051 (eval $ac_try) 2>&5
18052 ac_status=$?
18053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18054 (exit $ac_status); }; } &&
18055 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18057 (eval $ac_try) 2>&5
18058 ac_status=$?
c0d27fcc 18059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18060 (exit $ac_status); }; }; then
18061 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
18062else
18063 echo "$as_me: failed program was:" >&5
19650fd6
AS
18064sed 's/^/| /' conftest.$ac_ext >&5
18065
503d2be0
AS
18066ac_cv_lib_crypto_mit_des_cbc_encrypt=no
18067fi
35996d22
AS
18068rm -f conftest.err conftest.$ac_objext \
18069 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18070LIBS=$ac_check_lib_save_LIBS
18071fi
c0d27fcc 18072echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
18073echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
18074if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 18075 cat >>confdefs.h <<_ACEOF
503d2be0 18076#define HAVE_LIBCRYPTO 1
c0d27fcc 18077_ACEOF
a21616bd
KR
18078
18079 LIBS="-lcrypto $LIBS"
18080
a21616bd
KR
18081fi
18082
c0d27fcc
MR
18083
18084echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
18085echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
18086if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
18087 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18088else
503d2be0 18089 ac_check_lib_save_LIBS=$LIBS
a21616bd 18090LIBS="-lkrb5 $LIBS"
503d2be0 18091cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18092/* confdefs.h. */
18093_ACEOF
18094cat confdefs.h >>conftest.$ac_ext
18095cat >>conftest.$ac_ext <<_ACEOF
18096/* end confdefs.h. */
a21616bd 18097
503d2be0
AS
18098/* Override any gcc2 internal prototype to avoid an error. */
18099#ifdef __cplusplus
18100extern "C"
18101#endif
18102/* We use char because int might match the return type of a gcc2
18103 builtin and then its argument prototype would still apply. */
18104char krb5_init_context ();
18105int
18106main ()
18107{
18108krb5_init_context ();
18109 ;
18110 return 0;
18111}
18112_ACEOF
18113rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18114if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18115 (eval $ac_link) 2>conftest.er1
503d2be0 18116 ac_status=$?
35996d22
AS
18117 grep -v '^ *+' conftest.er1 >conftest.err
18118 rm -f conftest.er1
18119 cat conftest.err >&5
c0d27fcc 18120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18121 (exit $ac_status); } &&
551ffc27
ST
18122 { ac_try='test -z "$ac_c_werror_flag"
18123 || test ! -s conftest.err'
35996d22
AS
18124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18125 (eval $ac_try) 2>&5
18126 ac_status=$?
18127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18128 (exit $ac_status); }; } &&
18129 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18131 (eval $ac_try) 2>&5
18132 ac_status=$?
c0d27fcc 18133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18134 (exit $ac_status); }; }; then
18135 ac_cv_lib_krb5_krb5_init_context=yes
18136else
18137 echo "$as_me: failed program was:" >&5
19650fd6
AS
18138sed 's/^/| /' conftest.$ac_ext >&5
18139
503d2be0
AS
18140ac_cv_lib_krb5_krb5_init_context=no
18141fi
35996d22
AS
18142rm -f conftest.err conftest.$ac_objext \
18143 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18144LIBS=$ac_check_lib_save_LIBS
18145fi
c0d27fcc 18146echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
18147echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
18148if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 18149 cat >>confdefs.h <<_ACEOF
503d2be0 18150#define HAVE_LIBKRB5 1
c0d27fcc 18151_ACEOF
a21616bd
KR
18152
18153 LIBS="-lkrb5 $LIBS"
18154
a21616bd
KR
18155fi
18156
18157 if test "${with_kerberos5+set}" != set; then
503d2be0 18158
c0d27fcc 18159echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
18160echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
18161if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
18162 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18163else
503d2be0 18164 ac_check_lib_save_LIBS=$LIBS
a21616bd 18165LIBS="-ldes425 $LIBS"
503d2be0 18166cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18167/* confdefs.h. */
18168_ACEOF
18169cat confdefs.h >>conftest.$ac_ext
18170cat >>conftest.$ac_ext <<_ACEOF
18171/* end confdefs.h. */
503d2be0 18172
a21616bd 18173/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18174#ifdef __cplusplus
18175extern "C"
18176#endif
a21616bd 18177/* We use char because int might match the return type of a gcc2
503d2be0
AS
18178 builtin and then its argument prototype would still apply. */
18179char des_cbc_encrypt ();
18180int
18181main ()
18182{
18183des_cbc_encrypt ();
18184 ;
18185 return 0;
18186}
18187_ACEOF
18188rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18189if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18190 (eval $ac_link) 2>conftest.er1
503d2be0 18191 ac_status=$?
35996d22
AS
18192 grep -v '^ *+' conftest.er1 >conftest.err
18193 rm -f conftest.er1
18194 cat conftest.err >&5
c0d27fcc 18195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18196 (exit $ac_status); } &&
551ffc27
ST
18197 { ac_try='test -z "$ac_c_werror_flag"
18198 || test ! -s conftest.err'
35996d22
AS
18199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18200 (eval $ac_try) 2>&5
18201 ac_status=$?
18202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18203 (exit $ac_status); }; } &&
18204 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18206 (eval $ac_try) 2>&5
18207 ac_status=$?
c0d27fcc 18208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18209 (exit $ac_status); }; }; then
18210 ac_cv_lib_des425_des_cbc_encrypt=yes
18211else
18212 echo "$as_me: failed program was:" >&5
19650fd6
AS
18213sed 's/^/| /' conftest.$ac_ext >&5
18214
503d2be0
AS
18215ac_cv_lib_des425_des_cbc_encrypt=no
18216fi
35996d22
AS
18217rm -f conftest.err conftest.$ac_objext \
18218 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18219LIBS=$ac_check_lib_save_LIBS
18220fi
c0d27fcc 18221echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
18222echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
18223if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 18224 cat >>confdefs.h <<_ACEOF
503d2be0 18225#define HAVE_LIBDES425 1
c0d27fcc 18226_ACEOF
a21616bd
KR
18227
18228 LIBS="-ldes425 $LIBS"
18229
18230else
503d2be0 18231
c0d27fcc 18232echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
18233echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
18234if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
18235 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18236else
503d2be0 18237 ac_check_lib_save_LIBS=$LIBS
a21616bd 18238LIBS="-ldes $LIBS"
503d2be0 18239cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18240/* confdefs.h. */
18241_ACEOF
18242cat confdefs.h >>conftest.$ac_ext
18243cat >>conftest.$ac_ext <<_ACEOF
18244/* end confdefs.h. */
503d2be0 18245
a21616bd 18246/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18247#ifdef __cplusplus
18248extern "C"
18249#endif
a21616bd 18250/* We use char because int might match the return type of a gcc2
503d2be0
AS
18251 builtin and then its argument prototype would still apply. */
18252char des_cbc_encrypt ();
18253int
18254main ()
18255{
18256des_cbc_encrypt ();
18257 ;
18258 return 0;
18259}
18260_ACEOF
18261rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18262if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18263 (eval $ac_link) 2>conftest.er1
503d2be0 18264 ac_status=$?
35996d22
AS
18265 grep -v '^ *+' conftest.er1 >conftest.err
18266 rm -f conftest.er1
18267 cat conftest.err >&5
c0d27fcc 18268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18269 (exit $ac_status); } &&
551ffc27
ST
18270 { ac_try='test -z "$ac_c_werror_flag"
18271 || test ! -s conftest.err'
35996d22
AS
18272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18273 (eval $ac_try) 2>&5
18274 ac_status=$?
18275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18276 (exit $ac_status); }; } &&
18277 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18279 (eval $ac_try) 2>&5
18280 ac_status=$?
c0d27fcc 18281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18282 (exit $ac_status); }; }; then
18283 ac_cv_lib_des_des_cbc_encrypt=yes
18284else
18285 echo "$as_me: failed program was:" >&5
19650fd6
AS
18286sed 's/^/| /' conftest.$ac_ext >&5
18287
503d2be0
AS
18288ac_cv_lib_des_des_cbc_encrypt=no
18289fi
35996d22
AS
18290rm -f conftest.err conftest.$ac_objext \
18291 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18292LIBS=$ac_check_lib_save_LIBS
18293fi
c0d27fcc 18294echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
18295echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
18296if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 18297 cat >>confdefs.h <<_ACEOF
503d2be0 18298#define HAVE_LIBDES 1
c0d27fcc 18299_ACEOF
a21616bd
KR
18300
18301 LIBS="-ldes $LIBS"
18302
a21616bd
KR
18303fi
18304
18305fi
18306
c0d27fcc
MR
18307
18308echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
18309echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
18310if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
18311 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18312else
503d2be0 18313 ac_check_lib_save_LIBS=$LIBS
a21616bd 18314LIBS="-lkrb4 $LIBS"
503d2be0 18315cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18316/* confdefs.h. */
18317_ACEOF
18318cat confdefs.h >>conftest.$ac_ext
18319cat >>conftest.$ac_ext <<_ACEOF
18320/* end confdefs.h. */
503d2be0 18321
a21616bd 18322/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18323#ifdef __cplusplus
18324extern "C"
18325#endif
a21616bd 18326/* We use char because int might match the return type of a gcc2
503d2be0
AS
18327 builtin and then its argument prototype would still apply. */
18328char krb_get_cred ();
18329int
18330main ()
18331{
18332krb_get_cred ();
18333 ;
18334 return 0;
18335}
18336_ACEOF
18337rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18339 (eval $ac_link) 2>conftest.er1
503d2be0 18340 ac_status=$?
35996d22
AS
18341 grep -v '^ *+' conftest.er1 >conftest.err
18342 rm -f conftest.er1
18343 cat conftest.err >&5
c0d27fcc 18344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18345 (exit $ac_status); } &&
551ffc27
ST
18346 { ac_try='test -z "$ac_c_werror_flag"
18347 || test ! -s conftest.err'
35996d22
AS
18348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18349 (eval $ac_try) 2>&5
18350 ac_status=$?
18351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18352 (exit $ac_status); }; } &&
18353 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18355 (eval $ac_try) 2>&5
18356 ac_status=$?
c0d27fcc 18357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18358 (exit $ac_status); }; }; then
18359 ac_cv_lib_krb4_krb_get_cred=yes
18360else
18361 echo "$as_me: failed program was:" >&5
19650fd6
AS
18362sed 's/^/| /' conftest.$ac_ext >&5
18363
503d2be0
AS
18364ac_cv_lib_krb4_krb_get_cred=no
18365fi
35996d22
AS
18366rm -f conftest.err conftest.$ac_objext \
18367 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18368LIBS=$ac_check_lib_save_LIBS
18369fi
c0d27fcc 18370echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
18371echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
18372if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 18373 cat >>confdefs.h <<_ACEOF
503d2be0 18374#define HAVE_LIBKRB4 1
c0d27fcc 18375_ACEOF
a21616bd
KR
18376
18377 LIBS="-lkrb4 $LIBS"
18378
18379else
503d2be0 18380
c0d27fcc 18381echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
18382echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
18383if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
18384 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18385else
503d2be0 18386 ac_check_lib_save_LIBS=$LIBS
a21616bd 18387LIBS="-lkrb $LIBS"
503d2be0 18388cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18389/* confdefs.h. */
18390_ACEOF
18391cat confdefs.h >>conftest.$ac_ext
18392cat >>conftest.$ac_ext <<_ACEOF
18393/* end confdefs.h. */
503d2be0 18394
a21616bd 18395/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18396#ifdef __cplusplus
18397extern "C"
18398#endif
a21616bd 18399/* We use char because int might match the return type of a gcc2
503d2be0
AS
18400 builtin and then its argument prototype would still apply. */
18401char krb_get_cred ();
18402int
18403main ()
18404{
18405krb_get_cred ();
18406 ;
18407 return 0;
18408}
18409_ACEOF
18410rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18411if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18412 (eval $ac_link) 2>conftest.er1
503d2be0 18413 ac_status=$?
35996d22
AS
18414 grep -v '^ *+' conftest.er1 >conftest.err
18415 rm -f conftest.er1
18416 cat conftest.err >&5
c0d27fcc 18417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18418 (exit $ac_status); } &&
551ffc27
ST
18419 { ac_try='test -z "$ac_c_werror_flag"
18420 || test ! -s conftest.err'
35996d22
AS
18421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18422 (eval $ac_try) 2>&5
18423 ac_status=$?
18424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18425 (exit $ac_status); }; } &&
18426 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18428 (eval $ac_try) 2>&5
18429 ac_status=$?
c0d27fcc 18430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18431 (exit $ac_status); }; }; then
18432 ac_cv_lib_krb_krb_get_cred=yes
18433else
18434 echo "$as_me: failed program was:" >&5
19650fd6
AS
18435sed 's/^/| /' conftest.$ac_ext >&5
18436
503d2be0
AS
18437ac_cv_lib_krb_krb_get_cred=no
18438fi
35996d22
AS
18439rm -f conftest.err conftest.$ac_objext \
18440 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18441LIBS=$ac_check_lib_save_LIBS
18442fi
c0d27fcc 18443echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
18444echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
18445if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 18446 cat >>confdefs.h <<_ACEOF
503d2be0 18447#define HAVE_LIBKRB 1
c0d27fcc 18448_ACEOF
a21616bd
KR
18449
18450 LIBS="-lkrb $LIBS"
18451
a21616bd
KR
18452fi
18453
18454fi
18455
18456 fi
18457
18458 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
18459
18460for ac_header in krb5.h
a21616bd 18461do
503d2be0 18462as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18463if eval "test \"\${$as_ac_Header+set}\" = set"; then
18464 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18465echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18466if eval "test \"\${$as_ac_Header+set}\" = set"; then
18467 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18468fi
18469echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18470echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18471else
c0d27fcc
MR
18472 # Is the header compilable?
18473echo "$as_me:$LINENO: checking $ac_header usability" >&5
18474echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18475cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18476/* confdefs.h. */
18477_ACEOF
18478cat confdefs.h >>conftest.$ac_ext
18479cat >>conftest.$ac_ext <<_ACEOF
18480/* end confdefs.h. */
c0d27fcc
MR
18481$ac_includes_default
18482#include <$ac_header>
18483_ACEOF
18484rm -f conftest.$ac_objext
18485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18486 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18487 ac_status=$?
35996d22
AS
18488 grep -v '^ *+' conftest.er1 >conftest.err
18489 rm -f conftest.er1
18490 cat conftest.err >&5
c0d27fcc
MR
18491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18492 (exit $ac_status); } &&
551ffc27
ST
18493 { ac_try='test -z "$ac_c_werror_flag"
18494 || test ! -s conftest.err'
35996d22
AS
18495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18496 (eval $ac_try) 2>&5
18497 ac_status=$?
18498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18499 (exit $ac_status); }; } &&
18500 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
18506 ac_header_compiler=yes
18507else
18508 echo "$as_me: failed program was:" >&5
19650fd6
AS
18509sed 's/^/| /' conftest.$ac_ext >&5
18510
c0d27fcc
MR
18511ac_header_compiler=no
18512fi
35996d22 18513rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18514echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18515echo "${ECHO_T}$ac_header_compiler" >&6
18516
18517# Is the header present?
18518echo "$as_me:$LINENO: checking $ac_header presence" >&5
18519echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18520cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18521/* confdefs.h. */
18522_ACEOF
18523cat confdefs.h >>conftest.$ac_ext
18524cat >>conftest.$ac_ext <<_ACEOF
18525/* end confdefs.h. */
503d2be0
AS
18526#include <$ac_header>
18527_ACEOF
c0d27fcc 18528if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18529 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18530 ac_status=$?
6bae0ccf 18531 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18532 rm -f conftest.er1
18533 cat conftest.err >&5
c0d27fcc 18534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18535 (exit $ac_status); } >/dev/null; then
18536 if test -s conftest.err; then
18537 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18538 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18539 else
18540 ac_cpp_err=
18541 fi
18542else
18543 ac_cpp_err=yes
18544fi
18545if test -z "$ac_cpp_err"; then
c0d27fcc 18546 ac_header_preproc=yes
503d2be0
AS
18547else
18548 echo "$as_me: failed program was:" >&5
19650fd6
AS
18549sed 's/^/| /' conftest.$ac_ext >&5
18550
c0d27fcc 18551 ac_header_preproc=no
a21616bd 18552fi
503d2be0 18553rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18554echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18555echo "${ECHO_T}$ac_header_preproc" >&6
18556
18557# So? What about this header?
35996d22
AS
18558case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18559 yes:no: )
c0d27fcc
MR
18560 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18561echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18562 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18563echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18564 ac_header_preproc=yes
19650fd6 18565 ;;
35996d22 18566 no:yes:* )
c0d27fcc
MR
18567 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18568echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18569 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18570echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18571 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18572echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18573 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18574echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18575 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18576echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18577 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18578echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18579 (
18580 cat <<\_ASBOX
35996d22
AS
18581## ------------------------------------------ ##
18582## Report this to the AC_PACKAGE_NAME lists. ##
18583## ------------------------------------------ ##
19650fd6
AS
18584_ASBOX
18585 ) |
18586 sed "s/^/$as_me: WARNING: /" >&2
18587 ;;
c0d27fcc
MR
18588esac
18589echo "$as_me:$LINENO: checking for $ac_header" >&5
18590echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18591if eval "test \"\${$as_ac_Header+set}\" = set"; then
18592 echo $ECHO_N "(cached) $ECHO_C" >&6
18593else
35996d22 18594 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18595fi
c0d27fcc 18596echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18597echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18598
18599fi
503d2be0 18600if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18601 cat >>confdefs.h <<_ACEOF
503d2be0 18602#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18603_ACEOF
503d2be0 18604
a21616bd 18605fi
c0d27fcc 18606
a21616bd
KR
18607done
18608
18609 else
503d2be0
AS
18610
18611for ac_header in des.h
a21616bd 18612do
503d2be0 18613as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18614if eval "test \"\${$as_ac_Header+set}\" = set"; then
18615 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18616echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18617if eval "test \"\${$as_ac_Header+set}\" = set"; then
18618 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18619fi
18620echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18621echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18622else
c0d27fcc
MR
18623 # Is the header compilable?
18624echo "$as_me:$LINENO: checking $ac_header usability" >&5
18625echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18626cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18627/* confdefs.h. */
18628_ACEOF
18629cat confdefs.h >>conftest.$ac_ext
18630cat >>conftest.$ac_ext <<_ACEOF
18631/* end confdefs.h. */
c0d27fcc
MR
18632$ac_includes_default
18633#include <$ac_header>
18634_ACEOF
18635rm -f conftest.$ac_objext
18636if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18637 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18638 ac_status=$?
35996d22
AS
18639 grep -v '^ *+' conftest.er1 >conftest.err
18640 rm -f conftest.er1
18641 cat conftest.err >&5
c0d27fcc
MR
18642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18643 (exit $ac_status); } &&
551ffc27
ST
18644 { ac_try='test -z "$ac_c_werror_flag"
18645 || test ! -s conftest.err'
35996d22
AS
18646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18647 (eval $ac_try) 2>&5
18648 ac_status=$?
18649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18650 (exit $ac_status); }; } &&
18651 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
18657 ac_header_compiler=yes
18658else
18659 echo "$as_me: failed program was:" >&5
19650fd6
AS
18660sed 's/^/| /' conftest.$ac_ext >&5
18661
c0d27fcc
MR
18662ac_header_compiler=no
18663fi
35996d22 18664rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18665echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18666echo "${ECHO_T}$ac_header_compiler" >&6
18667
18668# Is the header present?
18669echo "$as_me:$LINENO: checking $ac_header presence" >&5
18670echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18671cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18672/* confdefs.h. */
18673_ACEOF
18674cat confdefs.h >>conftest.$ac_ext
18675cat >>conftest.$ac_ext <<_ACEOF
18676/* end confdefs.h. */
503d2be0
AS
18677#include <$ac_header>
18678_ACEOF
c0d27fcc 18679if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18680 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18681 ac_status=$?
6bae0ccf 18682 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18683 rm -f conftest.er1
18684 cat conftest.err >&5
c0d27fcc 18685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18686 (exit $ac_status); } >/dev/null; then
18687 if test -s conftest.err; then
18688 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18689 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18690 else
18691 ac_cpp_err=
18692 fi
18693else
18694 ac_cpp_err=yes
18695fi
18696if test -z "$ac_cpp_err"; then
c0d27fcc 18697 ac_header_preproc=yes
503d2be0
AS
18698else
18699 echo "$as_me: failed program was:" >&5
19650fd6
AS
18700sed 's/^/| /' conftest.$ac_ext >&5
18701
c0d27fcc 18702 ac_header_preproc=no
a21616bd 18703fi
503d2be0 18704rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18705echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18706echo "${ECHO_T}$ac_header_preproc" >&6
18707
18708# So? What about this header?
35996d22
AS
18709case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18710 yes:no: )
c0d27fcc
MR
18711 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18712echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18713 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18714echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18715 ac_header_preproc=yes
19650fd6 18716 ;;
35996d22 18717 no:yes:* )
c0d27fcc
MR
18718 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18719echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18720 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18721echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18722 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18723echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18724 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18725echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18726 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18727echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18728 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18729echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18730 (
18731 cat <<\_ASBOX
35996d22
AS
18732## ------------------------------------------ ##
18733## Report this to the AC_PACKAGE_NAME lists. ##
18734## ------------------------------------------ ##
19650fd6
AS
18735_ASBOX
18736 ) |
18737 sed "s/^/$as_me: WARNING: /" >&2
18738 ;;
c0d27fcc
MR
18739esac
18740echo "$as_me:$LINENO: checking for $ac_header" >&5
18741echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18742if eval "test \"\${$as_ac_Header+set}\" = set"; then
18743 echo $ECHO_N "(cached) $ECHO_C" >&6
18744else
35996d22 18745 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18746fi
c0d27fcc 18747echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18748echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18749
18750fi
503d2be0 18751if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18752 cat >>confdefs.h <<_ACEOF
503d2be0 18753#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18754_ACEOF
503d2be0 18755
a21616bd 18756else
503d2be0
AS
18757
18758for ac_header in kerberosIV/des.h
a21616bd 18759do
503d2be0 18760as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18761if eval "test \"\${$as_ac_Header+set}\" = set"; then
18762 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18763echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18764if eval "test \"\${$as_ac_Header+set}\" = set"; then
18765 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18766fi
18767echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18768echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18769else
c0d27fcc
MR
18770 # Is the header compilable?
18771echo "$as_me:$LINENO: checking $ac_header usability" >&5
18772echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18773cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18774/* confdefs.h. */
18775_ACEOF
18776cat confdefs.h >>conftest.$ac_ext
18777cat >>conftest.$ac_ext <<_ACEOF
18778/* end confdefs.h. */
c0d27fcc
MR
18779$ac_includes_default
18780#include <$ac_header>
18781_ACEOF
18782rm -f conftest.$ac_objext
18783if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18784 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18785 ac_status=$?
35996d22
AS
18786 grep -v '^ *+' conftest.er1 >conftest.err
18787 rm -f conftest.er1
18788 cat conftest.err >&5
c0d27fcc
MR
18789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18790 (exit $ac_status); } &&
551ffc27
ST
18791 { ac_try='test -z "$ac_c_werror_flag"
18792 || test ! -s conftest.err'
35996d22
AS
18793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18794 (eval $ac_try) 2>&5
18795 ac_status=$?
18796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18797 (exit $ac_status); }; } &&
18798 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
18804 ac_header_compiler=yes
18805else
18806 echo "$as_me: failed program was:" >&5
19650fd6
AS
18807sed 's/^/| /' conftest.$ac_ext >&5
18808
c0d27fcc
MR
18809ac_header_compiler=no
18810fi
35996d22 18811rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18812echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18813echo "${ECHO_T}$ac_header_compiler" >&6
18814
18815# Is the header present?
18816echo "$as_me:$LINENO: checking $ac_header presence" >&5
18817echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18818cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18819/* confdefs.h. */
18820_ACEOF
18821cat confdefs.h >>conftest.$ac_ext
18822cat >>conftest.$ac_ext <<_ACEOF
18823/* end confdefs.h. */
503d2be0
AS
18824#include <$ac_header>
18825_ACEOF
c0d27fcc 18826if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18827 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18828 ac_status=$?
6bae0ccf 18829 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18830 rm -f conftest.er1
18831 cat conftest.err >&5
c0d27fcc 18832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18833 (exit $ac_status); } >/dev/null; then
18834 if test -s conftest.err; then
18835 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18836 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18837 else
18838 ac_cpp_err=
18839 fi
18840else
18841 ac_cpp_err=yes
18842fi
18843if test -z "$ac_cpp_err"; then
c0d27fcc 18844 ac_header_preproc=yes
503d2be0
AS
18845else
18846 echo "$as_me: failed program was:" >&5
19650fd6
AS
18847sed 's/^/| /' conftest.$ac_ext >&5
18848
c0d27fcc 18849 ac_header_preproc=no
a21616bd 18850fi
503d2be0 18851rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18852echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18853echo "${ECHO_T}$ac_header_preproc" >&6
18854
18855# So? What about this header?
35996d22
AS
18856case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18857 yes:no: )
c0d27fcc
MR
18858 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18859echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18860 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18861echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18862 ac_header_preproc=yes
19650fd6 18863 ;;
35996d22 18864 no:yes:* )
c0d27fcc
MR
18865 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18866echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18867 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18868echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18869 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18870echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18871 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18872echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18873 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18874echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18875 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18876echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18877 (
18878 cat <<\_ASBOX
35996d22
AS
18879## ------------------------------------------ ##
18880## Report this to the AC_PACKAGE_NAME lists. ##
18881## ------------------------------------------ ##
19650fd6
AS
18882_ASBOX
18883 ) |
18884 sed "s/^/$as_me: WARNING: /" >&2
18885 ;;
c0d27fcc
MR
18886esac
18887echo "$as_me:$LINENO: checking for $ac_header" >&5
18888echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18889if eval "test \"\${$as_ac_Header+set}\" = set"; then
18890 echo $ECHO_N "(cached) $ECHO_C" >&6
18891else
35996d22 18892 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18893fi
c0d27fcc 18894echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18895echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18896
18897fi
503d2be0 18898if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18899 cat >>confdefs.h <<_ACEOF
503d2be0 18900#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18901_ACEOF
503d2be0 18902
a21616bd 18903else
503d2be0
AS
18904
18905for ac_header in kerberos/des.h
a21616bd 18906do
503d2be0 18907as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18908if eval "test \"\${$as_ac_Header+set}\" = set"; then
18909 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18910echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18911if eval "test \"\${$as_ac_Header+set}\" = set"; then
18912 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18913fi
18914echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18915echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18916else
c0d27fcc
MR
18917 # Is the header compilable?
18918echo "$as_me:$LINENO: checking $ac_header usability" >&5
18919echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18920cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18921/* confdefs.h. */
18922_ACEOF
18923cat confdefs.h >>conftest.$ac_ext
18924cat >>conftest.$ac_ext <<_ACEOF
18925/* end confdefs.h. */
c0d27fcc
MR
18926$ac_includes_default
18927#include <$ac_header>
18928_ACEOF
18929rm -f conftest.$ac_objext
18930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18931 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18932 ac_status=$?
35996d22
AS
18933 grep -v '^ *+' conftest.er1 >conftest.err
18934 rm -f conftest.er1
18935 cat conftest.err >&5
c0d27fcc
MR
18936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18937 (exit $ac_status); } &&
551ffc27
ST
18938 { ac_try='test -z "$ac_c_werror_flag"
18939 || test ! -s conftest.err'
35996d22
AS
18940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18941 (eval $ac_try) 2>&5
18942 ac_status=$?
18943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18944 (exit $ac_status); }; } &&
18945 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
18951 ac_header_compiler=yes
18952else
18953 echo "$as_me: failed program was:" >&5
19650fd6
AS
18954sed 's/^/| /' conftest.$ac_ext >&5
18955
c0d27fcc
MR
18956ac_header_compiler=no
18957fi
35996d22 18958rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18959echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18960echo "${ECHO_T}$ac_header_compiler" >&6
18961
18962# Is the header present?
18963echo "$as_me:$LINENO: checking $ac_header presence" >&5
18964echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18965cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18966/* confdefs.h. */
18967_ACEOF
18968cat confdefs.h >>conftest.$ac_ext
18969cat >>conftest.$ac_ext <<_ACEOF
18970/* end confdefs.h. */
503d2be0
AS
18971#include <$ac_header>
18972_ACEOF
c0d27fcc 18973if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18974 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18975 ac_status=$?
6bae0ccf 18976 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18977 rm -f conftest.er1
18978 cat conftest.err >&5
c0d27fcc 18979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18980 (exit $ac_status); } >/dev/null; then
18981 if test -s conftest.err; then
18982 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18983 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18984 else
18985 ac_cpp_err=
18986 fi
18987else
18988 ac_cpp_err=yes
18989fi
18990if test -z "$ac_cpp_err"; then
c0d27fcc 18991 ac_header_preproc=yes
503d2be0
AS
18992else
18993 echo "$as_me: failed program was:" >&5
19650fd6
AS
18994sed 's/^/| /' conftest.$ac_ext >&5
18995
c0d27fcc 18996 ac_header_preproc=no
a21616bd 18997fi
503d2be0 18998rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18999echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19000echo "${ECHO_T}$ac_header_preproc" >&6
19001
19002# So? What about this header?
35996d22
AS
19003case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19004 yes:no: )
c0d27fcc
MR
19005 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19006echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19007 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19008echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19009 ac_header_preproc=yes
19650fd6 19010 ;;
35996d22 19011 no:yes:* )
c0d27fcc
MR
19012 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19013echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19014 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19015echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19016 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19017echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19018 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19019echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19020 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19021echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19022 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19023echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19024 (
19025 cat <<\_ASBOX
35996d22
AS
19026## ------------------------------------------ ##
19027## Report this to the AC_PACKAGE_NAME lists. ##
19028## ------------------------------------------ ##
19650fd6
AS
19029_ASBOX
19030 ) |
19031 sed "s/^/$as_me: WARNING: /" >&2
19032 ;;
c0d27fcc
MR
19033esac
19034echo "$as_me:$LINENO: checking for $ac_header" >&5
19035echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19036if eval "test \"\${$as_ac_Header+set}\" = set"; then
19037 echo $ECHO_N "(cached) $ECHO_C" >&6
19038else
35996d22 19039 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19040fi
c0d27fcc 19041echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19042echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19043
19044fi
503d2be0 19045if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19046 cat >>confdefs.h <<_ACEOF
503d2be0 19047#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19048_ACEOF
a21616bd
KR
19049
19050fi
c0d27fcc 19051
a21616bd
KR
19052done
19053
98418dba 19054fi
c0d27fcc 19055
925c2f3f
EZ
19056done
19057
98418dba 19058fi
c0d27fcc 19059
925c2f3f 19060done
98418dba 19061
c0d27fcc 19062
925c2f3f
EZ
19063for ac_header in krb.h
19064do
19065as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19066if eval "test \"\${$as_ac_Header+set}\" = set"; then
19067 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
19068echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19069if eval "test \"\${$as_ac_Header+set}\" = set"; then
19070 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19071fi
19072echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19073echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19074else
19075 # Is the header compilable?
19076echo "$as_me:$LINENO: checking $ac_header usability" >&5
19077echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19078cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19079/* confdefs.h. */
19080_ACEOF
19081cat confdefs.h >>conftest.$ac_ext
19082cat >>conftest.$ac_ext <<_ACEOF
19083/* end confdefs.h. */
c0d27fcc
MR
19084$ac_includes_default
19085#include <$ac_header>
19086_ACEOF
19087rm -f conftest.$ac_objext
19088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19089 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19090 ac_status=$?
35996d22
AS
19091 grep -v '^ *+' conftest.er1 >conftest.err
19092 rm -f conftest.er1
19093 cat conftest.err >&5
c0d27fcc
MR
19094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19095 (exit $ac_status); } &&
551ffc27
ST
19096 { ac_try='test -z "$ac_c_werror_flag"
19097 || test ! -s conftest.err'
35996d22
AS
19098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19099 (eval $ac_try) 2>&5
19100 ac_status=$?
19101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19102 (exit $ac_status); }; } &&
19103 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
19109 ac_header_compiler=yes
925c2f3f 19110else
c0d27fcc 19111 echo "$as_me: failed program was:" >&5
19650fd6
AS
19112sed 's/^/| /' conftest.$ac_ext >&5
19113
c0d27fcc
MR
19114ac_header_compiler=no
19115fi
35996d22 19116rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19117echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19118echo "${ECHO_T}$ac_header_compiler" >&6
19119
19120# Is the header present?
19121echo "$as_me:$LINENO: checking $ac_header presence" >&5
19122echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19123cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19124/* confdefs.h. */
19125_ACEOF
19126cat confdefs.h >>conftest.$ac_ext
19127cat >>conftest.$ac_ext <<_ACEOF
19128/* end confdefs.h. */
503d2be0
AS
19129#include <$ac_header>
19130_ACEOF
c0d27fcc 19131if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19132 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19133 ac_status=$?
6bae0ccf 19134 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19135 rm -f conftest.er1
19136 cat conftest.err >&5
c0d27fcc 19137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19138 (exit $ac_status); } >/dev/null; then
19139 if test -s conftest.err; then
19140 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19141 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19142 else
19143 ac_cpp_err=
19144 fi
19145else
19146 ac_cpp_err=yes
19147fi
19148if test -z "$ac_cpp_err"; then
c0d27fcc 19149 ac_header_preproc=yes
503d2be0
AS
19150else
19151 echo "$as_me: failed program was:" >&5
19650fd6
AS
19152sed 's/^/| /' conftest.$ac_ext >&5
19153
c0d27fcc 19154 ac_header_preproc=no
a21616bd 19155fi
503d2be0 19156rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19157echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19158echo "${ECHO_T}$ac_header_preproc" >&6
19159
19160# So? What about this header?
35996d22
AS
19161case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19162 yes:no: )
c0d27fcc
MR
19163 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19164echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19165 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19166echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19167 ac_header_preproc=yes
19650fd6 19168 ;;
35996d22 19169 no:yes:* )
c0d27fcc
MR
19170 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19171echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19172 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19173echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19174 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19175echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19176 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19177echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19178 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19179echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19180 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19181echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19182 (
19183 cat <<\_ASBOX
35996d22
AS
19184## ------------------------------------------ ##
19185## Report this to the AC_PACKAGE_NAME lists. ##
19186## ------------------------------------------ ##
19650fd6
AS
19187_ASBOX
19188 ) |
19189 sed "s/^/$as_me: WARNING: /" >&2
19190 ;;
c0d27fcc
MR
19191esac
19192echo "$as_me:$LINENO: checking for $ac_header" >&5
19193echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19194if eval "test \"\${$as_ac_Header+set}\" = set"; then
19195 echo $ECHO_N "(cached) $ECHO_C" >&6
19196else
35996d22 19197 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19198fi
c0d27fcc 19199echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19200echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19201
19202fi
503d2be0 19203if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19204 cat >>confdefs.h <<_ACEOF
503d2be0 19205#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19206_ACEOF
503d2be0 19207
a21616bd 19208else
503d2be0
AS
19209
19210for ac_header in kerberosIV/krb.h
a21616bd 19211do
503d2be0 19212as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19213if eval "test \"\${$as_ac_Header+set}\" = set"; then
19214 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19215echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19216if eval "test \"\${$as_ac_Header+set}\" = set"; then
19217 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19218fi
19219echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19220echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19221else
c0d27fcc
MR
19222 # Is the header compilable?
19223echo "$as_me:$LINENO: checking $ac_header usability" >&5
19224echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19225cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19226/* confdefs.h. */
19227_ACEOF
19228cat confdefs.h >>conftest.$ac_ext
19229cat >>conftest.$ac_ext <<_ACEOF
19230/* end confdefs.h. */
c0d27fcc
MR
19231$ac_includes_default
19232#include <$ac_header>
19233_ACEOF
19234rm -f conftest.$ac_objext
19235if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19236 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19237 ac_status=$?
35996d22
AS
19238 grep -v '^ *+' conftest.er1 >conftest.err
19239 rm -f conftest.er1
19240 cat conftest.err >&5
c0d27fcc
MR
19241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19242 (exit $ac_status); } &&
551ffc27
ST
19243 { ac_try='test -z "$ac_c_werror_flag"
19244 || test ! -s conftest.err'
35996d22
AS
19245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19246 (eval $ac_try) 2>&5
19247 ac_status=$?
19248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19249 (exit $ac_status); }; } &&
19250 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
19256 ac_header_compiler=yes
19257else
19258 echo "$as_me: failed program was:" >&5
19650fd6
AS
19259sed 's/^/| /' conftest.$ac_ext >&5
19260
c0d27fcc
MR
19261ac_header_compiler=no
19262fi
35996d22 19263rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19264echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19265echo "${ECHO_T}$ac_header_compiler" >&6
19266
19267# Is the header present?
19268echo "$as_me:$LINENO: checking $ac_header presence" >&5
19269echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19270cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19271/* confdefs.h. */
19272_ACEOF
19273cat confdefs.h >>conftest.$ac_ext
19274cat >>conftest.$ac_ext <<_ACEOF
19275/* end confdefs.h. */
503d2be0
AS
19276#include <$ac_header>
19277_ACEOF
c0d27fcc 19278if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19279 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19280 ac_status=$?
6bae0ccf 19281 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19282 rm -f conftest.er1
19283 cat conftest.err >&5
c0d27fcc 19284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19285 (exit $ac_status); } >/dev/null; then
19286 if test -s conftest.err; then
19287 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19288 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19289 else
19290 ac_cpp_err=
19291 fi
19292else
19293 ac_cpp_err=yes
19294fi
19295if test -z "$ac_cpp_err"; then
c0d27fcc 19296 ac_header_preproc=yes
503d2be0
AS
19297else
19298 echo "$as_me: failed program was:" >&5
19650fd6
AS
19299sed 's/^/| /' conftest.$ac_ext >&5
19300
c0d27fcc 19301 ac_header_preproc=no
a21616bd 19302fi
503d2be0 19303rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19304echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19305echo "${ECHO_T}$ac_header_preproc" >&6
19306
19307# So? What about this header?
35996d22
AS
19308case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19309 yes:no: )
c0d27fcc
MR
19310 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19311echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19312 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19313echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19314 ac_header_preproc=yes
19650fd6 19315 ;;
35996d22 19316 no:yes:* )
c0d27fcc
MR
19317 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19318echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19319 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19320echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19321 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19322echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19323 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19324echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19325 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19326echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19327 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19328echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19329 (
19330 cat <<\_ASBOX
35996d22
AS
19331## ------------------------------------------ ##
19332## Report this to the AC_PACKAGE_NAME lists. ##
19333## ------------------------------------------ ##
19650fd6
AS
19334_ASBOX
19335 ) |
19336 sed "s/^/$as_me: WARNING: /" >&2
19337 ;;
c0d27fcc
MR
19338esac
19339echo "$as_me:$LINENO: checking for $ac_header" >&5
19340echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19341if eval "test \"\${$as_ac_Header+set}\" = set"; then
19342 echo $ECHO_N "(cached) $ECHO_C" >&6
19343else
35996d22 19344 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19345fi
c0d27fcc 19346echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19347echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19348
19349fi
503d2be0 19350if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19351 cat >>confdefs.h <<_ACEOF
503d2be0 19352#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19353_ACEOF
503d2be0 19354
a21616bd 19355else
503d2be0
AS
19356
19357for ac_header in kerberos/krb.h
a21616bd 19358do
503d2be0 19359as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19360if eval "test \"\${$as_ac_Header+set}\" = set"; then
19361 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19362echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19363if eval "test \"\${$as_ac_Header+set}\" = set"; then
19364 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19365fi
19366echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19367echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19368else
c0d27fcc
MR
19369 # Is the header compilable?
19370echo "$as_me:$LINENO: checking $ac_header usability" >&5
19371echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19372cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19373/* confdefs.h. */
19374_ACEOF
19375cat confdefs.h >>conftest.$ac_ext
19376cat >>conftest.$ac_ext <<_ACEOF
19377/* end confdefs.h. */
c0d27fcc
MR
19378$ac_includes_default
19379#include <$ac_header>
19380_ACEOF
19381rm -f conftest.$ac_objext
19382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19383 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19384 ac_status=$?
35996d22
AS
19385 grep -v '^ *+' conftest.er1 >conftest.err
19386 rm -f conftest.er1
19387 cat conftest.err >&5
c0d27fcc
MR
19388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19389 (exit $ac_status); } &&
551ffc27
ST
19390 { ac_try='test -z "$ac_c_werror_flag"
19391 || test ! -s conftest.err'
35996d22
AS
19392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19393 (eval $ac_try) 2>&5
19394 ac_status=$?
19395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19396 (exit $ac_status); }; } &&
19397 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
19403 ac_header_compiler=yes
19404else
19405 echo "$as_me: failed program was:" >&5
19650fd6
AS
19406sed 's/^/| /' conftest.$ac_ext >&5
19407
c0d27fcc
MR
19408ac_header_compiler=no
19409fi
35996d22 19410rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19411echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19412echo "${ECHO_T}$ac_header_compiler" >&6
19413
19414# Is the header present?
19415echo "$as_me:$LINENO: checking $ac_header presence" >&5
19416echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19417cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19418/* confdefs.h. */
19419_ACEOF
19420cat confdefs.h >>conftest.$ac_ext
19421cat >>conftest.$ac_ext <<_ACEOF
19422/* end confdefs.h. */
503d2be0
AS
19423#include <$ac_header>
19424_ACEOF
c0d27fcc 19425if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19426 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19427 ac_status=$?
6bae0ccf 19428 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19429 rm -f conftest.er1
19430 cat conftest.err >&5
c0d27fcc 19431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19432 (exit $ac_status); } >/dev/null; then
19433 if test -s conftest.err; then
19434 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19435 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19436 else
19437 ac_cpp_err=
19438 fi
19439else
19440 ac_cpp_err=yes
19441fi
19442if test -z "$ac_cpp_err"; then
c0d27fcc 19443 ac_header_preproc=yes
503d2be0
AS
19444else
19445 echo "$as_me: failed program was:" >&5
19650fd6
AS
19446sed 's/^/| /' conftest.$ac_ext >&5
19447
c0d27fcc 19448 ac_header_preproc=no
a21616bd 19449fi
503d2be0 19450rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19451echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19452echo "${ECHO_T}$ac_header_preproc" >&6
35996d22
AS
19453
19454# So? What about this header?
19455case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19456 yes:no: )
19457 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19458echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19459 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19460echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19461 ac_header_preproc=yes
19650fd6 19462 ;;
35996d22 19463 no:yes:* )
c0d27fcc
MR
19464 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19465echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19466 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19467echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19468 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19469echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19470 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19471echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19472 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19473echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19474 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19475echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19476 (
19477 cat <<\_ASBOX
35996d22
AS
19478## ------------------------------------------ ##
19479## Report this to the AC_PACKAGE_NAME lists. ##
19480## ------------------------------------------ ##
19650fd6
AS
19481_ASBOX
19482 ) |
19483 sed "s/^/$as_me: WARNING: /" >&2
19484 ;;
c0d27fcc
MR
19485esac
19486echo "$as_me:$LINENO: checking for $ac_header" >&5
19487echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19488if eval "test \"\${$as_ac_Header+set}\" = set"; then
19489 echo $ECHO_N "(cached) $ECHO_C" >&6
19490else
35996d22 19491 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19492fi
c0d27fcc 19493echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19494echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19495
19496fi
503d2be0 19497if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19498 cat >>confdefs.h <<_ACEOF
503d2be0 19499#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19500_ACEOF
503d2be0 19501
a21616bd 19502fi
c0d27fcc 19503
a21616bd
KR
19504done
19505
19506fi
c0d27fcc 19507
a21616bd
KR
19508done
19509
19510fi
c0d27fcc 19511
a21616bd
KR
19512done
19513
19514 fi
503d2be0
AS
19515
19516for ac_header in com_err.h
a21616bd 19517do
503d2be0 19518as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19519if eval "test \"\${$as_ac_Header+set}\" = set"; then
19520 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19521echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19522if eval "test \"\${$as_ac_Header+set}\" = set"; then
19523 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19524fi
19525echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19526echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19527else
c0d27fcc
MR
19528 # Is the header compilable?
19529echo "$as_me:$LINENO: checking $ac_header usability" >&5
19530echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19531cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19532/* confdefs.h. */
19533_ACEOF
19534cat confdefs.h >>conftest.$ac_ext
19535cat >>conftest.$ac_ext <<_ACEOF
19536/* end confdefs.h. */
c0d27fcc
MR
19537$ac_includes_default
19538#include <$ac_header>
19539_ACEOF
19540rm -f conftest.$ac_objext
19541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19542 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19543 ac_status=$?
35996d22
AS
19544 grep -v '^ *+' conftest.er1 >conftest.err
19545 rm -f conftest.er1
19546 cat conftest.err >&5
c0d27fcc
MR
19547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19548 (exit $ac_status); } &&
551ffc27
ST
19549 { ac_try='test -z "$ac_c_werror_flag"
19550 || test ! -s conftest.err'
35996d22
AS
19551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19552 (eval $ac_try) 2>&5
19553 ac_status=$?
19554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19555 (exit $ac_status); }; } &&
19556 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
19562 ac_header_compiler=yes
19563else
19564 echo "$as_me: failed program was:" >&5
19650fd6
AS
19565sed 's/^/| /' conftest.$ac_ext >&5
19566
c0d27fcc
MR
19567ac_header_compiler=no
19568fi
35996d22 19569rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19570echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19571echo "${ECHO_T}$ac_header_compiler" >&6
19572
19573# Is the header present?
19574echo "$as_me:$LINENO: checking $ac_header presence" >&5
19575echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19576cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19577/* confdefs.h. */
19578_ACEOF
19579cat confdefs.h >>conftest.$ac_ext
19580cat >>conftest.$ac_ext <<_ACEOF
19581/* end confdefs.h. */
503d2be0
AS
19582#include <$ac_header>
19583_ACEOF
c0d27fcc 19584if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19585 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19586 ac_status=$?
6bae0ccf 19587 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19588 rm -f conftest.er1
19589 cat conftest.err >&5
c0d27fcc 19590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19591 (exit $ac_status); } >/dev/null; then
19592 if test -s conftest.err; then
19593 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19594 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19595 else
19596 ac_cpp_err=
19597 fi
19598else
19599 ac_cpp_err=yes
19600fi
19601if test -z "$ac_cpp_err"; then
c0d27fcc 19602 ac_header_preproc=yes
503d2be0
AS
19603else
19604 echo "$as_me: failed program was:" >&5
19650fd6
AS
19605sed 's/^/| /' conftest.$ac_ext >&5
19606
c0d27fcc 19607 ac_header_preproc=no
a21616bd 19608fi
503d2be0 19609rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19610echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19611echo "${ECHO_T}$ac_header_preproc" >&6
19612
19613# So? What about this header?
35996d22
AS
19614case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19615 yes:no: )
c0d27fcc
MR
19616 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19617echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19618 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19619echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19620 ac_header_preproc=yes
19650fd6 19621 ;;
35996d22 19622 no:yes:* )
c0d27fcc
MR
19623 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19624echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19625 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19626echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19627 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19628echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19629 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19630echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19631 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19632echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19633 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19634echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19635 (
19636 cat <<\_ASBOX
35996d22
AS
19637## ------------------------------------------ ##
19638## Report this to the AC_PACKAGE_NAME lists. ##
19639## ------------------------------------------ ##
19650fd6
AS
19640_ASBOX
19641 ) |
19642 sed "s/^/$as_me: WARNING: /" >&2
19643 ;;
c0d27fcc
MR
19644esac
19645echo "$as_me:$LINENO: checking for $ac_header" >&5
19646echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19647if eval "test \"\${$as_ac_Header+set}\" = set"; then
19648 echo $ECHO_N "(cached) $ECHO_C" >&6
19649else
35996d22 19650 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19651fi
c0d27fcc 19652echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19653echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19654
19655fi
503d2be0 19656if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19657 cat >>confdefs.h <<_ACEOF
503d2be0 19658#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19659_ACEOF
503d2be0 19660
a21616bd 19661fi
c0d27fcc 19662
a21616bd
KR
19663done
19664
19665fi
19666
ba4481b5
DL
19667# Solaris requires -lintl if you want strerror (which calls dgettext)
19668# to return localized messages.
503d2be0 19669
c0d27fcc 19670echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
19671echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
19672if test "${ac_cv_lib_intl_dgettext+set}" = set; then
19673 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19674else
503d2be0 19675 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19676LIBS="-lintl $LIBS"
503d2be0 19677cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19678/* confdefs.h. */
19679_ACEOF
19680cat confdefs.h >>conftest.$ac_ext
19681cat >>conftest.$ac_ext <<_ACEOF
19682/* end confdefs.h. */
503d2be0 19683
ba4481b5 19684/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19685#ifdef __cplusplus
19686extern "C"
19687#endif
ba4481b5 19688/* We use char because int might match the return type of a gcc2
503d2be0
AS
19689 builtin and then its argument prototype would still apply. */
19690char dgettext ();
19691int
19692main ()
19693{
19694dgettext ();
19695 ;
19696 return 0;
19697}
19698_ACEOF
19699rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 19701 (eval $ac_link) 2>conftest.er1
503d2be0 19702 ac_status=$?
35996d22
AS
19703 grep -v '^ *+' conftest.er1 >conftest.err
19704 rm -f conftest.er1
19705 cat conftest.err >&5
c0d27fcc 19706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19707 (exit $ac_status); } &&
551ffc27
ST
19708 { ac_try='test -z "$ac_c_werror_flag"
19709 || test ! -s conftest.err'
35996d22
AS
19710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19711 (eval $ac_try) 2>&5
19712 ac_status=$?
19713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19714 (exit $ac_status); }; } &&
19715 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19717 (eval $ac_try) 2>&5
19718 ac_status=$?
c0d27fcc 19719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19720 (exit $ac_status); }; }; then
19721 ac_cv_lib_intl_dgettext=yes
19722else
19723 echo "$as_me: failed program was:" >&5
19650fd6
AS
19724sed 's/^/| /' conftest.$ac_ext >&5
19725
503d2be0
AS
19726ac_cv_lib_intl_dgettext=no
19727fi
35996d22
AS
19728rm -f conftest.err conftest.$ac_objext \
19729 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19730LIBS=$ac_check_lib_save_LIBS
19731fi
c0d27fcc 19732echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
19733echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
19734if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 19735 cat >>confdefs.h <<_ACEOF
503d2be0 19736#define HAVE_LIBINTL 1
c0d27fcc 19737_ACEOF
ba4481b5
DL
19738
19739 LIBS="-lintl $LIBS"
19740
ba4481b5
DL
19741fi
19742
c0d27fcc
MR
19743
19744echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
19745echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
19746if test "${emacs_cv_localtime_cache+set}" = set; then
19747 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
19748else
19749 if test x$ac_cv_func_tzset = xyes; then
19750if test "$cross_compiling" = yes; then
19751 # If we have tzset, assume the worst when cross-compiling.
19752emacs_cv_localtime_cache=yes
19753else
503d2be0 19754 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19755/* confdefs.h. */
19756_ACEOF
19757cat confdefs.h >>conftest.$ac_ext
19758cat >>conftest.$ac_ext <<_ACEOF
19759/* end confdefs.h. */
ba4481b5 19760#include <time.h>
ba4481b5
DL
19761extern char **environ;
19762unset_TZ ()
19763{
19764 char **from, **to;
19765 for (to = from = environ; (*to = *from); from++)
19766 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
19767 to++;
19768}
19769char TZ_GMT0[] = "TZ=GMT0";
19770char TZ_PST8[] = "TZ=PST8";
19771main()
19772{
19773 time_t now = time ((time_t *) 0);
19774 int hour_GMT0, hour_unset;
19775 if (putenv (TZ_GMT0) != 0)
19776 exit (1);
19777 hour_GMT0 = localtime (&now)->tm_hour;
19778 unset_TZ ();
19779 hour_unset = localtime (&now)->tm_hour;
19780 if (putenv (TZ_PST8) != 0)
19781 exit (1);
19782 if (localtime (&now)->tm_hour == hour_GMT0)
19783 exit (1);
19784 unset_TZ ();
19785 if (localtime (&now)->tm_hour != hour_unset)
19786 exit (1);
19787 exit (0);
19788}
503d2be0
AS
19789_ACEOF
19790rm -f conftest$ac_exeext
c0d27fcc 19791if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
19792 (eval $ac_link) 2>&5
19793 ac_status=$?
c0d27fcc 19794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19795 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 19796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19797 (eval $ac_try) 2>&5
19798 ac_status=$?
c0d27fcc 19799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19800 (exit $ac_status); }; }; then
ba4481b5
DL
19801 emacs_cv_localtime_cache=no
19802else
503d2be0
AS
19803 echo "$as_me: program exited with status $ac_status" >&5
19804echo "$as_me: failed program was:" >&5
19650fd6
AS
19805sed 's/^/| /' conftest.$ac_ext >&5
19806
c0d27fcc 19807( exit $ac_status )
503d2be0 19808emacs_cv_localtime_cache=yes
ba4481b5 19809fi
35996d22 19810rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 19811fi
ba4481b5
DL
19812else
19813 # If we lack tzset, report that localtime does not cache TZ,
19814 # since we can't invalidate the cache if we don't have tzset.
19815 emacs_cv_localtime_cache=no
19816fi
19817fi
c0d27fcc 19818echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 19819echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 19820if test $emacs_cv_localtime_cache = yes; then
b936fae4 19821
c0d27fcc 19822cat >>confdefs.h <<\_ACEOF
ba4481b5 19823#define LOCALTIME_CACHE 1
c0d27fcc 19824_ACEOF
ba4481b5
DL
19825
19826fi
19827
19828if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
19829
19830for ac_func in gettimeofday
48d4b120 19831do
503d2be0 19832as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 19833echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
19834echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19835if eval "test \"\${$as_ac_var+set}\" = set"; then
19836 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 19837else
503d2be0 19838 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19839/* confdefs.h. */
19840_ACEOF
19841cat confdefs.h >>conftest.$ac_ext
19842cat >>conftest.$ac_ext <<_ACEOF
19843/* end confdefs.h. */
35996d22
AS
19844/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19845 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19846#define $ac_func innocuous_$ac_func
19847
48d4b120 19848/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19849 which can conflict with char $ac_func (); below.
19850 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19851 <limits.h> exists even on freestanding compilers. */
35996d22 19852
19650fd6
AS
19853#ifdef __STDC__
19854# include <limits.h>
19855#else
19856# include <assert.h>
19857#endif
35996d22
AS
19858
19859#undef $ac_func
19860
48d4b120 19861/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19862#ifdef __cplusplus
19863extern "C"
19650fd6 19864{
503d2be0 19865#endif
48d4b120 19866/* We use char because int might match the return type of a gcc2
503d2be0
AS
19867 builtin and then its argument prototype would still apply. */
19868char $ac_func ();
48d4b120
DL
19869/* The GNU C library defines this for functions which it implements
19870 to always fail with ENOSYS. Some functions are actually named
19871 something starting with __ and the normal name is an alias. */
19872#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19873choke me
19874#else
19650fd6
AS
19875char (*f) () = $ac_func;
19876#endif
19877#ifdef __cplusplus
19878}
cd958eb3
MB
19879#endif
19880
19650fd6
AS
19881int
19882main ()
19883{
19884return f != $ac_func;
503d2be0
AS
19885 ;
19886 return 0;
19887}
19888_ACEOF
19889rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19890if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 19891 (eval $ac_link) 2>conftest.er1
503d2be0 19892 ac_status=$?
35996d22
AS
19893 grep -v '^ *+' conftest.er1 >conftest.err
19894 rm -f conftest.er1
19895 cat conftest.err >&5
c0d27fcc 19896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19897 (exit $ac_status); } &&
551ffc27
ST
19898 { ac_try='test -z "$ac_c_werror_flag"
19899 || test ! -s conftest.err'
35996d22
AS
19900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19901 (eval $ac_try) 2>&5
19902 ac_status=$?
19903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19904 (exit $ac_status); }; } &&
19905 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19907 (eval $ac_try) 2>&5
19908 ac_status=$?
c0d27fcc 19909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19910 (exit $ac_status); }; }; then
19911 eval "$as_ac_var=yes"
19912else
19913 echo "$as_me: failed program was:" >&5
19650fd6
AS
19914sed 's/^/| /' conftest.$ac_ext >&5
19915
503d2be0
AS
19916eval "$as_ac_var=no"
19917fi
35996d22
AS
19918rm -f conftest.err conftest.$ac_objext \
19919 conftest$ac_exeext conftest.$ac_ext
503d2be0 19920fi
c0d27fcc 19921echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
19922echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19923if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19924 cat >>confdefs.h <<_ACEOF
503d2be0 19925#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19926_ACEOF
48d4b120 19927
48d4b120
DL
19928fi
19929done
19930
b936fae4 19931 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 19932 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
19933echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
19934if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
19935 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19936else
503d2be0 19937 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19938/* confdefs.h. */
19939_ACEOF
19940cat confdefs.h >>conftest.$ac_ext
19941cat >>conftest.$ac_ext <<_ACEOF
19942/* end confdefs.h. */
ba4481b5 19943
a3f08d9e
DL
19944#ifdef TIME_WITH_SYS_TIME
19945#include <sys/time.h>
19946#include <time.h>
19947#else
19948#ifdef HAVE_SYS_TIME_H
19949#include <sys/time.h>
19950#else
19951#include <time.h>
19952#endif
19953#endif
503d2be0
AS
19954int
19955main ()
19956{
a3f08d9e 19957struct timeval time;
b936fae4 19958 gettimeofday (&time, 0);
503d2be0
AS
19959 ;
19960 return 0;
19961}
19962_ACEOF
19963rm -f conftest.$ac_objext
c0d27fcc 19964if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19965 (eval $ac_compile) 2>conftest.er1
503d2be0 19966 ac_status=$?
35996d22
AS
19967 grep -v '^ *+' conftest.er1 >conftest.err
19968 rm -f conftest.er1
19969 cat conftest.err >&5
c0d27fcc 19970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19971 (exit $ac_status); } &&
551ffc27
ST
19972 { ac_try='test -z "$ac_c_werror_flag"
19973 || test ! -s conftest.err'
35996d22
AS
19974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19975 (eval $ac_try) 2>&5
19976 ac_status=$?
19977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19978 (exit $ac_status); }; } &&
19979 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 19980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19981 (eval $ac_try) 2>&5
19982 ac_status=$?
c0d27fcc 19983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19984 (exit $ac_status); }; }; then
ba4481b5
DL
19985 emacs_cv_gettimeofday_two_arguments=yes
19986else
503d2be0 19987 echo "$as_me: failed program was:" >&5
19650fd6
AS
19988sed 's/^/| /' conftest.$ac_ext >&5
19989
503d2be0 19990emacs_cv_gettimeofday_two_arguments=no
ba4481b5 19991fi
35996d22 19992rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 19993fi
c0d27fcc 19994echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 19995echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
19996 if test $emacs_cv_gettimeofday_two_arguments = no; then
19997
c0d27fcc 19998cat >>confdefs.h <<\_ACEOF
ba4481b5 19999#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 20000_ACEOF
ba4481b5 20001
b936fae4 20002 fi
ba4481b5
DL
20003 fi
20004fi
20005
973a76b1
DL
20006# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
20007echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20008echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
20009if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
20010 echo $ECHO_N "(cached) $ECHO_C" >&6
20011else
20012 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20013/* confdefs.h. */
20014_ACEOF
20015cat confdefs.h >>conftest.$ac_ext
20016cat >>conftest.$ac_ext <<_ACEOF
20017/* end confdefs.h. */
973a76b1
DL
20018#include <sys/types.h>
20019#include <$ac_cv_struct_tm>
20020
20021
20022int
20023main ()
20024{
20025static struct tm ac_aggr;
20026if (ac_aggr.tm_zone)
20027return 0;
20028 ;
20029 return 0;
20030}
20031_ACEOF
20032rm -f conftest.$ac_objext
20033if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20034 (eval $ac_compile) 2>conftest.er1
973a76b1 20035 ac_status=$?
35996d22
AS
20036 grep -v '^ *+' conftest.er1 >conftest.err
20037 rm -f conftest.er1
20038 cat conftest.err >&5
973a76b1
DL
20039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20040 (exit $ac_status); } &&
551ffc27
ST
20041 { ac_try='test -z "$ac_c_werror_flag"
20042 || test ! -s conftest.err'
35996d22
AS
20043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20044 (eval $ac_try) 2>&5
20045 ac_status=$?
20046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20047 (exit $ac_status); }; } &&
20048 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
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); }; }; then
20054 ac_cv_member_struct_tm_tm_zone=yes
20055else
20056 echo "$as_me: failed program was:" >&5
19650fd6
AS
20057sed 's/^/| /' conftest.$ac_ext >&5
20058
973a76b1 20059cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20060/* confdefs.h. */
20061_ACEOF
20062cat confdefs.h >>conftest.$ac_ext
20063cat >>conftest.$ac_ext <<_ACEOF
20064/* end confdefs.h. */
973a76b1
DL
20065#include <sys/types.h>
20066#include <$ac_cv_struct_tm>
20067
20068
20069int
20070main ()
20071{
20072static struct tm ac_aggr;
20073if (sizeof ac_aggr.tm_zone)
20074return 0;
20075 ;
20076 return 0;
20077}
20078_ACEOF
20079rm -f conftest.$ac_objext
20080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20081 (eval $ac_compile) 2>conftest.er1
973a76b1 20082 ac_status=$?
35996d22
AS
20083 grep -v '^ *+' conftest.er1 >conftest.err
20084 rm -f conftest.er1
20085 cat conftest.err >&5
973a76b1
DL
20086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20087 (exit $ac_status); } &&
551ffc27
ST
20088 { ac_try='test -z "$ac_c_werror_flag"
20089 || test ! -s conftest.err'
35996d22
AS
20090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20091 (eval $ac_try) 2>&5
20092 ac_status=$?
20093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20094 (exit $ac_status); }; } &&
20095 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
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); }; }; then
20101 ac_cv_member_struct_tm_tm_zone=yes
20102else
20103 echo "$as_me: failed program was:" >&5
19650fd6
AS
20104sed 's/^/| /' conftest.$ac_ext >&5
20105
973a76b1
DL
20106ac_cv_member_struct_tm_tm_zone=no
20107fi
35996d22 20108rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 20109fi
35996d22 20110rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
20111fi
20112echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20113echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
20114if test $ac_cv_member_struct_tm_tm_zone = yes; then
20115
20116cat >>confdefs.h <<_ACEOF
20117#define HAVE_STRUCT_TM_TM_ZONE 1
20118_ACEOF
20119
20120
20121fi
20122
20123if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20124
20125cat >>confdefs.h <<\_ACEOF
20126#define HAVE_TM_ZONE 1
20127_ACEOF
20128
20129else
20130 echo "$as_me:$LINENO: checking for tzname" >&5
20131echo $ECHO_N "checking for tzname... $ECHO_C" >&6
20132if test "${ac_cv_var_tzname+set}" = set; then
20133 echo $ECHO_N "(cached) $ECHO_C" >&6
20134else
20135 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20136/* confdefs.h. */
20137_ACEOF
20138cat confdefs.h >>conftest.$ac_ext
20139cat >>conftest.$ac_ext <<_ACEOF
20140/* end confdefs.h. */
973a76b1
DL
20141#include <time.h>
20142#ifndef tzname /* For SGI. */
20143extern char *tzname[]; /* RS6000 and others reject char **tzname. */
20144#endif
20145
20146int
20147main ()
20148{
20149atoi(*tzname);
20150 ;
20151 return 0;
20152}
20153_ACEOF
20154rm -f conftest.$ac_objext conftest$ac_exeext
20155if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 20156 (eval $ac_link) 2>conftest.er1
973a76b1 20157 ac_status=$?
35996d22
AS
20158 grep -v '^ *+' conftest.er1 >conftest.err
20159 rm -f conftest.er1
20160 cat conftest.err >&5
973a76b1
DL
20161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20162 (exit $ac_status); } &&
551ffc27
ST
20163 { ac_try='test -z "$ac_c_werror_flag"
20164 || test ! -s conftest.err'
35996d22
AS
20165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20166 (eval $ac_try) 2>&5
20167 ac_status=$?
20168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20169 (exit $ac_status); }; } &&
20170 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
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); }; }; then
20176 ac_cv_var_tzname=yes
20177else
20178 echo "$as_me: failed program was:" >&5
19650fd6
AS
20179sed 's/^/| /' conftest.$ac_ext >&5
20180
973a76b1
DL
20181ac_cv_var_tzname=no
20182fi
35996d22
AS
20183rm -f conftest.err conftest.$ac_objext \
20184 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
20185fi
20186echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20187echo "${ECHO_T}$ac_cv_var_tzname" >&6
20188 if test $ac_cv_var_tzname = yes; then
20189
20190cat >>confdefs.h <<\_ACEOF
20191#define HAVE_TZNAME 1
20192_ACEOF
20193
20194 fi
20195fi
20196
20197
48d4b120 20198if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 20199 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
20200echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
20201if test "${emacs_cv_struct_timezone+set}" = set; then
20202 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 20203else
503d2be0 20204 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20205/* confdefs.h. */
20206_ACEOF
20207cat confdefs.h >>conftest.$ac_ext
20208cat >>conftest.$ac_ext <<_ACEOF
20209/* end confdefs.h. */
48d4b120 20210#include <sys/time.h>
503d2be0
AS
20211int
20212main ()
20213{
48d4b120 20214struct timezone tz;
503d2be0
AS
20215 ;
20216 return 0;
20217}
20218_ACEOF
20219rm -f conftest.$ac_objext
c0d27fcc 20220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20221 (eval $ac_compile) 2>conftest.er1
503d2be0 20222 ac_status=$?
35996d22
AS
20223 grep -v '^ *+' conftest.er1 >conftest.err
20224 rm -f conftest.er1
20225 cat conftest.err >&5
c0d27fcc 20226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20227 (exit $ac_status); } &&
551ffc27
ST
20228 { ac_try='test -z "$ac_c_werror_flag"
20229 || test ! -s conftest.err'
35996d22
AS
20230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20231 (eval $ac_try) 2>&5
20232 ac_status=$?
20233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20234 (exit $ac_status); }; } &&
20235 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20237 (eval $ac_try) 2>&5
20238 ac_status=$?
c0d27fcc 20239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20240 (exit $ac_status); }; }; then
48d4b120
DL
20241 if test "$cross_compiling" = yes; then
20242 emacs_cv_struct_timezone=yes
20243else
503d2be0 20244 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20245/* confdefs.h. */
20246_ACEOF
20247cat confdefs.h >>conftest.$ac_ext
20248cat >>conftest.$ac_ext <<_ACEOF
20249/* end confdefs.h. */
48d4b120
DL
20250
20251#ifdef TIME_WITH_SYS_TIME
20252#include <sys/time.h>
20253#include <time.h>
20254#else
20255#ifdef HAVE_SYS_TIME_H
20256#include <sys/time.h>
20257#else
20258#include <time.h>
20259#endif
20260#endif
20261main () {
20262 struct timeval time;
20263 struct timezone dummy;
20264 exit (gettimeofday (&time, &dummy));
20265}
503d2be0
AS
20266_ACEOF
20267rm -f conftest$ac_exeext
c0d27fcc 20268if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
20269 (eval $ac_link) 2>&5
20270 ac_status=$?
c0d27fcc 20271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20272 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 20273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20274 (eval $ac_try) 2>&5
20275 ac_status=$?
c0d27fcc 20276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20277 (exit $ac_status); }; }; then
48d4b120
DL
20278 emacs_cv_struct_timezone=yes
20279else
503d2be0
AS
20280 echo "$as_me: program exited with status $ac_status" >&5
20281echo "$as_me: failed program was:" >&5
19650fd6
AS
20282sed 's/^/| /' conftest.$ac_ext >&5
20283
c0d27fcc 20284( exit $ac_status )
503d2be0 20285emacs_cv_struct_timezone=no
48d4b120 20286fi
35996d22 20287rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 20288fi
48d4b120 20289else
503d2be0 20290 echo "$as_me: failed program was:" >&5
19650fd6
AS
20291sed 's/^/| /' conftest.$ac_ext >&5
20292
503d2be0 20293emacs_cv_struct_timezone=no
48d4b120 20294fi
35996d22 20295rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
48d4b120 20296fi
c0d27fcc 20297echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 20298echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
20299fi
20300
ba4481b5 20301ok_so_far=yes
c0d27fcc 20302echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
20303echo $ECHO_N "checking for socket... $ECHO_C" >&6
20304if test "${ac_cv_func_socket+set}" = set; then
20305 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20306else
503d2be0 20307 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20308/* confdefs.h. */
20309_ACEOF
20310cat confdefs.h >>conftest.$ac_ext
20311cat >>conftest.$ac_ext <<_ACEOF
20312/* end confdefs.h. */
35996d22
AS
20313/* Define socket to an innocuous variant, in case <limits.h> declares socket.
20314 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20315#define socket innocuous_socket
20316
ba4481b5 20317/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20318 which can conflict with char socket (); below.
20319 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20320 <limits.h> exists even on freestanding compilers. */
35996d22 20321
19650fd6
AS
20322#ifdef __STDC__
20323# include <limits.h>
20324#else
20325# include <assert.h>
20326#endif
35996d22
AS
20327
20328#undef socket
20329
ba4481b5 20330/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20331#ifdef __cplusplus
20332extern "C"
19650fd6 20333{
503d2be0 20334#endif
ba4481b5 20335/* We use char because int might match the return type of a gcc2
503d2be0
AS
20336 builtin and then its argument prototype would still apply. */
20337char socket ();
ba4481b5
DL
20338/* The GNU C library defines this for functions which it implements
20339 to always fail with ENOSYS. Some functions are actually named
20340 something starting with __ and the normal name is an alias. */
20341#if defined (__stub_socket) || defined (__stub___socket)
20342choke me
20343#else
19650fd6
AS
20344char (*f) () = socket;
20345#endif
20346#ifdef __cplusplus
20347}
cd958eb3
MB
20348#endif
20349
19650fd6
AS
20350int
20351main ()
20352{
20353return f != socket;
503d2be0
AS
20354 ;
20355 return 0;
20356}
20357_ACEOF
20358rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20359if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 20360 (eval $ac_link) 2>conftest.er1
503d2be0 20361 ac_status=$?
35996d22
AS
20362 grep -v '^ *+' conftest.er1 >conftest.err
20363 rm -f conftest.er1
20364 cat conftest.err >&5
c0d27fcc 20365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20366 (exit $ac_status); } &&
551ffc27
ST
20367 { ac_try='test -z "$ac_c_werror_flag"
20368 || test ! -s conftest.err'
35996d22
AS
20369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20370 (eval $ac_try) 2>&5
20371 ac_status=$?
20372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20373 (exit $ac_status); }; } &&
20374 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20376 (eval $ac_try) 2>&5
20377 ac_status=$?
c0d27fcc 20378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20379 (exit $ac_status); }; }; then
20380 ac_cv_func_socket=yes
20381else
20382 echo "$as_me: failed program was:" >&5
19650fd6
AS
20383sed 's/^/| /' conftest.$ac_ext >&5
20384
503d2be0
AS
20385ac_cv_func_socket=no
20386fi
35996d22
AS
20387rm -f conftest.err conftest.$ac_objext \
20388 conftest$ac_exeext conftest.$ac_ext
503d2be0 20389fi
c0d27fcc 20390echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
20391echo "${ECHO_T}$ac_cv_func_socket" >&6
20392if test $ac_cv_func_socket = yes; then
ba4481b5
DL
20393 :
20394else
503d2be0 20395 ok_so_far=no
ba4481b5
DL
20396fi
20397
20398if test $ok_so_far = yes; then
c0d27fcc
MR
20399 if test "${ac_cv_header_netinet_in_h+set}" = set; then
20400 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
20401echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
20402if test "${ac_cv_header_netinet_in_h+set}" = set; then
20403 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20404fi
20405echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
20406echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 20407else
c0d27fcc
MR
20408 # Is the header compilable?
20409echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
20410echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
20411cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20412/* confdefs.h. */
20413_ACEOF
20414cat confdefs.h >>conftest.$ac_ext
20415cat >>conftest.$ac_ext <<_ACEOF
20416/* end confdefs.h. */
c0d27fcc
MR
20417$ac_includes_default
20418#include <netinet/in.h>
20419_ACEOF
20420rm -f conftest.$ac_objext
20421if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20422 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20423 ac_status=$?
35996d22
AS
20424 grep -v '^ *+' conftest.er1 >conftest.err
20425 rm -f conftest.er1
20426 cat conftest.err >&5
c0d27fcc
MR
20427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20428 (exit $ac_status); } &&
551ffc27
ST
20429 { ac_try='test -z "$ac_c_werror_flag"
20430 || test ! -s conftest.err'
35996d22
AS
20431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20432 (eval $ac_try) 2>&5
20433 ac_status=$?
20434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20435 (exit $ac_status); }; } &&
20436 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
20442 ac_header_compiler=yes
20443else
20444 echo "$as_me: failed program was:" >&5
19650fd6
AS
20445sed 's/^/| /' conftest.$ac_ext >&5
20446
c0d27fcc
MR
20447ac_header_compiler=no
20448fi
35996d22 20449rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20450echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20451echo "${ECHO_T}$ac_header_compiler" >&6
20452
20453# Is the header present?
20454echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
20455echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
20456cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20457/* confdefs.h. */
20458_ACEOF
20459cat confdefs.h >>conftest.$ac_ext
20460cat >>conftest.$ac_ext <<_ACEOF
20461/* end confdefs.h. */
ba4481b5 20462#include <netinet/in.h>
503d2be0 20463_ACEOF
c0d27fcc 20464if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20465 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20466 ac_status=$?
6bae0ccf 20467 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20468 rm -f conftest.er1
20469 cat conftest.err >&5
c0d27fcc 20470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20471 (exit $ac_status); } >/dev/null; then
20472 if test -s conftest.err; then
20473 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20474 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20475 else
20476 ac_cpp_err=
20477 fi
20478else
20479 ac_cpp_err=yes
20480fi
20481if test -z "$ac_cpp_err"; then
c0d27fcc 20482 ac_header_preproc=yes
ba4481b5 20483else
503d2be0 20484 echo "$as_me: failed program was:" >&5
19650fd6
AS
20485sed 's/^/| /' conftest.$ac_ext >&5
20486
c0d27fcc 20487 ac_header_preproc=no
ba4481b5 20488fi
503d2be0 20489rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20490echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20491echo "${ECHO_T}$ac_header_preproc" >&6
20492
20493# So? What about this header?
35996d22
AS
20494case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20495 yes:no: )
c0d27fcc
MR
20496 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
20497echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20498 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
20499echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
20500 ac_header_preproc=yes
19650fd6 20501 ;;
35996d22 20502 no:yes:* )
c0d27fcc
MR
20503 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
20504echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
35996d22
AS
20505 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
20506echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
20507 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
20508echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
20509 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
20510echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20511 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 20512echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20513 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
20514echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20515 (
20516 cat <<\_ASBOX
35996d22
AS
20517## ------------------------------------------ ##
20518## Report this to the AC_PACKAGE_NAME lists. ##
20519## ------------------------------------------ ##
19650fd6
AS
20520_ASBOX
20521 ) |
20522 sed "s/^/$as_me: WARNING: /" >&2
20523 ;;
c0d27fcc
MR
20524esac
20525echo "$as_me:$LINENO: checking for netinet/in.h" >&5
20526echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
20527if test "${ac_cv_header_netinet_in_h+set}" = set; then
20528 echo $ECHO_N "(cached) $ECHO_C" >&6
20529else
20530 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 20531fi
c0d27fcc 20532echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 20533echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
20534
20535fi
503d2be0 20536if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
20537 :
20538else
503d2be0 20539 ok_so_far=no
ba4481b5
DL
20540fi
20541
c0d27fcc 20542
ba4481b5
DL
20543fi
20544if test $ok_so_far = yes; then
c0d27fcc
MR
20545 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20546 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
20547echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
20548if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20549 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20550fi
20551echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
20552echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 20553else
c0d27fcc
MR
20554 # Is the header compilable?
20555echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
20556echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
20557cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20558/* confdefs.h. */
20559_ACEOF
20560cat confdefs.h >>conftest.$ac_ext
20561cat >>conftest.$ac_ext <<_ACEOF
20562/* end confdefs.h. */
c0d27fcc
MR
20563$ac_includes_default
20564#include <arpa/inet.h>
20565_ACEOF
20566rm -f conftest.$ac_objext
20567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20568 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20569 ac_status=$?
35996d22
AS
20570 grep -v '^ *+' conftest.er1 >conftest.err
20571 rm -f conftest.er1
20572 cat conftest.err >&5
c0d27fcc
MR
20573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20574 (exit $ac_status); } &&
551ffc27
ST
20575 { ac_try='test -z "$ac_c_werror_flag"
20576 || test ! -s conftest.err'
35996d22
AS
20577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20578 (eval $ac_try) 2>&5
20579 ac_status=$?
20580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20581 (exit $ac_status); }; } &&
20582 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
20588 ac_header_compiler=yes
20589else
20590 echo "$as_me: failed program was:" >&5
19650fd6
AS
20591sed 's/^/| /' conftest.$ac_ext >&5
20592
c0d27fcc
MR
20593ac_header_compiler=no
20594fi
35996d22 20595rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20596echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20597echo "${ECHO_T}$ac_header_compiler" >&6
20598
20599# Is the header present?
20600echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
20601echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
20602cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20603/* confdefs.h. */
20604_ACEOF
20605cat confdefs.h >>conftest.$ac_ext
20606cat >>conftest.$ac_ext <<_ACEOF
20607/* end confdefs.h. */
ba4481b5 20608#include <arpa/inet.h>
503d2be0 20609_ACEOF
c0d27fcc 20610if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20611 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20612 ac_status=$?
6bae0ccf 20613 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20614 rm -f conftest.er1
20615 cat conftest.err >&5
c0d27fcc 20616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20617 (exit $ac_status); } >/dev/null; then
20618 if test -s conftest.err; then
20619 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20620 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20621 else
20622 ac_cpp_err=
20623 fi
20624else
20625 ac_cpp_err=yes
20626fi
20627if test -z "$ac_cpp_err"; then
c0d27fcc 20628 ac_header_preproc=yes
ba4481b5 20629else
503d2be0 20630 echo "$as_me: failed program was:" >&5
19650fd6
AS
20631sed 's/^/| /' conftest.$ac_ext >&5
20632
c0d27fcc 20633 ac_header_preproc=no
ba4481b5 20634fi
503d2be0 20635rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20636echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20637echo "${ECHO_T}$ac_header_preproc" >&6
20638
20639# So? What about this header?
35996d22
AS
20640case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20641 yes:no: )
c0d27fcc
MR
20642 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
20643echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20644 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
20645echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
20646 ac_header_preproc=yes
19650fd6 20647 ;;
35996d22 20648 no:yes:* )
c0d27fcc
MR
20649 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
20650echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
35996d22
AS
20651 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
20652echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
20653 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
20654echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
20655 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
20656echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20657 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 20658echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20659 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
20660echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20661 (
20662 cat <<\_ASBOX
35996d22
AS
20663## ------------------------------------------ ##
20664## Report this to the AC_PACKAGE_NAME lists. ##
20665## ------------------------------------------ ##
19650fd6
AS
20666_ASBOX
20667 ) |
20668 sed "s/^/$as_me: WARNING: /" >&2
20669 ;;
c0d27fcc
MR
20670esac
20671echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
20672echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
20673if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20674 echo $ECHO_N "(cached) $ECHO_C" >&6
20675else
20676 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 20677fi
c0d27fcc 20678echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 20679echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
20680
20681fi
503d2be0 20682if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
20683 :
20684else
503d2be0 20685 ok_so_far=no
ba4481b5
DL
20686fi
20687
c0d27fcc 20688
ba4481b5
DL
20689fi
20690if test $ok_so_far = yes; then
b936fae4 20691
c0d27fcc 20692cat >>confdefs.h <<\_ACEOF
ba4481b5 20693#define HAVE_INET_SOCKETS 1
c0d27fcc 20694_ACEOF
ba4481b5
DL
20695
20696fi
20697
2d2b6695 20698
7862d3a8 20699for ac_header in sys/ioctl.h
2d2b6695
KS
20700do
20701as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20702if eval "test \"\${$as_ac_Header+set}\" = set"; then
20703 echo "$as_me:$LINENO: checking for $ac_header" >&5
20704echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20705if eval "test \"\${$as_ac_Header+set}\" = set"; then
20706 echo $ECHO_N "(cached) $ECHO_C" >&6
20707fi
20708echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20709echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20710else
20711 # Is the header compilable?
20712echo "$as_me:$LINENO: checking $ac_header usability" >&5
20713echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20714cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
20715/* confdefs.h. */
20716_ACEOF
20717cat confdefs.h >>conftest.$ac_ext
20718cat >>conftest.$ac_ext <<_ACEOF
20719/* end confdefs.h. */
20720$ac_includes_default
20721#include <$ac_header>
20722_ACEOF
20723rm -f conftest.$ac_objext
20724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20725 (eval $ac_compile) 2>conftest.er1
2d2b6695 20726 ac_status=$?
35996d22
AS
20727 grep -v '^ *+' conftest.er1 >conftest.err
20728 rm -f conftest.er1
20729 cat conftest.err >&5
2d2b6695
KS
20730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20731 (exit $ac_status); } &&
551ffc27
ST
20732 { ac_try='test -z "$ac_c_werror_flag"
20733 || test ! -s conftest.err'
35996d22
AS
20734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20735 (eval $ac_try) 2>&5
20736 ac_status=$?
20737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20738 (exit $ac_status); }; } &&
20739 { ac_try='test -s conftest.$ac_objext'
2d2b6695
KS
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); }; }; then
20745 ac_header_compiler=yes
20746else
20747 echo "$as_me: failed program was:" >&5
20748sed 's/^/| /' conftest.$ac_ext >&5
20749
20750ac_header_compiler=no
20751fi
35996d22 20752rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2d2b6695
KS
20753echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20754echo "${ECHO_T}$ac_header_compiler" >&6
20755
20756# Is the header present?
20757echo "$as_me:$LINENO: checking $ac_header presence" >&5
20758echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20759cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
20760/* confdefs.h. */
20761_ACEOF
20762cat confdefs.h >>conftest.$ac_ext
20763cat >>conftest.$ac_ext <<_ACEOF
20764/* end confdefs.h. */
20765#include <$ac_header>
20766_ACEOF
20767if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20768 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20769 ac_status=$?
20770 grep -v '^ *+' conftest.er1 >conftest.err
20771 rm -f conftest.er1
20772 cat conftest.err >&5
20773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20774 (exit $ac_status); } >/dev/null; then
20775 if test -s conftest.err; then
20776 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20777 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2d2b6695
KS
20778 else
20779 ac_cpp_err=
20780 fi
20781else
20782 ac_cpp_err=yes
20783fi
20784if test -z "$ac_cpp_err"; then
20785 ac_header_preproc=yes
20786else
20787 echo "$as_me: failed program was:" >&5
20788sed 's/^/| /' conftest.$ac_ext >&5
20789
20790 ac_header_preproc=no
20791fi
20792rm -f conftest.err conftest.$ac_ext
20793echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20794echo "${ECHO_T}$ac_header_preproc" >&6
20795
20796# So? What about this header?
35996d22
AS
20797case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20798 yes:no: )
2d2b6695
KS
20799 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20800echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20801 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20802echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20803 ac_header_preproc=yes
2d2b6695 20804 ;;
35996d22 20805 no:yes:* )
2d2b6695
KS
20806 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20807echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
20808 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20809echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20810 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20811echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20812 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20813echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
20814 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20815echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20816 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20817echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
2d2b6695
KS
20818 (
20819 cat <<\_ASBOX
35996d22
AS
20820## ------------------------------------------ ##
20821## Report this to the AC_PACKAGE_NAME lists. ##
20822## ------------------------------------------ ##
2d2b6695
KS
20823_ASBOX
20824 ) |
20825 sed "s/^/$as_me: WARNING: /" >&2
20826 ;;
20827esac
20828echo "$as_me:$LINENO: checking for $ac_header" >&5
20829echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20830if eval "test \"\${$as_ac_Header+set}\" = set"; then
20831 echo $ECHO_N "(cached) $ECHO_C" >&6
20832else
35996d22 20833 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695
KS
20834fi
20835echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20836echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20837
20838fi
20839if test `eval echo '${'$as_ac_Header'}'` = yes; then
20840 cat >>confdefs.h <<_ACEOF
20841#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20842_ACEOF
20843
20844fi
20845
20846done
20847
20848
ba4481b5 20849if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 20850
c0d27fcc 20851cat >>confdefs.h <<\_ACEOF
ba4481b5 20852#define HAVE_AIX_SMT_EXP 1
c0d27fcc 20853_ACEOF
ba4481b5
DL
20854
20855fi
20856
c0d27fcc 20857echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 20858echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 20859if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 20860 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 20861echo "${ECHO_T}yes" >&6
b936fae4 20862
c0d27fcc 20863cat >>confdefs.h <<\_ACEOF
3d9fec71 20864#define HAVE_DEV_PTMX 1
c0d27fcc 20865_ACEOF
3d9fec71
DL
20866
20867else
c0d27fcc 20868 echo "$as_me:$LINENO: result: no" >&5
503d2be0 20869echo "${ECHO_T}no" >&6
3d9fec71
DL
20870fi
20871
c0d27fcc 20872echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
20873echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
20874if test "${ac_cv_type_pid_t+set}" = set; then
20875 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 20876else
503d2be0 20877 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20878/* confdefs.h. */
20879_ACEOF
20880cat confdefs.h >>conftest.$ac_ext
20881cat >>conftest.$ac_ext <<_ACEOF
20882/* end confdefs.h. */
503d2be0
AS
20883$ac_includes_default
20884int
20885main ()
20886{
20887if ((pid_t *) 0)
20888 return 0;
20889if (sizeof (pid_t))
20890 return 0;
20891 ;
20892 return 0;
20893}
20894_ACEOF
20895rm -f conftest.$ac_objext
c0d27fcc 20896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20897 (eval $ac_compile) 2>conftest.er1
503d2be0 20898 ac_status=$?
35996d22
AS
20899 grep -v '^ *+' conftest.er1 >conftest.err
20900 rm -f conftest.er1
20901 cat conftest.err >&5
c0d27fcc 20902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20903 (exit $ac_status); } &&
551ffc27
ST
20904 { ac_try='test -z "$ac_c_werror_flag"
20905 || test ! -s conftest.err'
35996d22
AS
20906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20907 (eval $ac_try) 2>&5
20908 ac_status=$?
20909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20910 (exit $ac_status); }; } &&
20911 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20913 (eval $ac_try) 2>&5
20914 ac_status=$?
c0d27fcc 20915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20916 (exit $ac_status); }; }; then
647847ea
DL
20917 ac_cv_type_pid_t=yes
20918else
503d2be0 20919 echo "$as_me: failed program was:" >&5
19650fd6
AS
20920sed 's/^/| /' conftest.$ac_ext >&5
20921
503d2be0 20922ac_cv_type_pid_t=no
647847ea 20923fi
35996d22 20924rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 20925fi
c0d27fcc 20926echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
20927echo "${ECHO_T}$ac_cv_type_pid_t" >&6
20928if test $ac_cv_type_pid_t = yes; then
20929 :
20930else
20931
c0d27fcc 20932cat >>confdefs.h <<_ACEOF
647847ea 20933#define pid_t int
c0d27fcc 20934_ACEOF
647847ea
DL
20935
20936fi
20937
c0d27fcc
MR
20938
20939
503d2be0
AS
20940for ac_header in unistd.h vfork.h
20941do
20942as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20943if eval "test \"\${$as_ac_Header+set}\" = set"; then
20944 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20945echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20946if eval "test \"\${$as_ac_Header+set}\" = set"; then
20947 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20948fi
20949echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20950echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20951else
c0d27fcc
MR
20952 # Is the header compilable?
20953echo "$as_me:$LINENO: checking $ac_header usability" >&5
20954echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20955cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20956/* confdefs.h. */
20957_ACEOF
20958cat confdefs.h >>conftest.$ac_ext
20959cat >>conftest.$ac_ext <<_ACEOF
20960/* end confdefs.h. */
c0d27fcc
MR
20961$ac_includes_default
20962#include <$ac_header>
20963_ACEOF
20964rm -f conftest.$ac_objext
20965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20966 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20967 ac_status=$?
35996d22
AS
20968 grep -v '^ *+' conftest.er1 >conftest.err
20969 rm -f conftest.er1
20970 cat conftest.err >&5
c0d27fcc
MR
20971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20972 (exit $ac_status); } &&
551ffc27
ST
20973 { ac_try='test -z "$ac_c_werror_flag"
20974 || test ! -s conftest.err'
35996d22
AS
20975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20976 (eval $ac_try) 2>&5
20977 ac_status=$?
20978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20979 (exit $ac_status); }; } &&
20980 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
20986 ac_header_compiler=yes
20987else
20988 echo "$as_me: failed program was:" >&5
19650fd6
AS
20989sed 's/^/| /' conftest.$ac_ext >&5
20990
c0d27fcc
MR
20991ac_header_compiler=no
20992fi
35996d22 20993rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20994echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20995echo "${ECHO_T}$ac_header_compiler" >&6
20996
20997# Is the header present?
20998echo "$as_me:$LINENO: checking $ac_header presence" >&5
20999echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21000cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21001/* confdefs.h. */
21002_ACEOF
21003cat confdefs.h >>conftest.$ac_ext
21004cat >>conftest.$ac_ext <<_ACEOF
21005/* end confdefs.h. */
503d2be0
AS
21006#include <$ac_header>
21007_ACEOF
c0d27fcc 21008if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21009 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21010 ac_status=$?
6bae0ccf 21011 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21012 rm -f conftest.er1
21013 cat conftest.err >&5
c0d27fcc 21014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21015 (exit $ac_status); } >/dev/null; then
21016 if test -s conftest.err; then
21017 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 21018 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21019 else
21020 ac_cpp_err=
21021 fi
647847ea 21022else
503d2be0
AS
21023 ac_cpp_err=yes
21024fi
21025if test -z "$ac_cpp_err"; then
c0d27fcc 21026 ac_header_preproc=yes
647847ea 21027else
503d2be0 21028 echo "$as_me: failed program was:" >&5
19650fd6
AS
21029sed 's/^/| /' conftest.$ac_ext >&5
21030
c0d27fcc 21031 ac_header_preproc=no
647847ea 21032fi
503d2be0 21033rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
21034echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21035echo "${ECHO_T}$ac_header_preproc" >&6
21036
21037# So? What about this header?
35996d22
AS
21038case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21039 yes:no: )
c0d27fcc
MR
21040 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21041echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
21042 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21043echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21044 ac_header_preproc=yes
19650fd6 21045 ;;
35996d22 21046 no:yes:* )
c0d27fcc
MR
21047 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21048echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
21049 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21050echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21051 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21052echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21053 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21054echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21055 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21056echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
21057 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21058echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
21059 (
21060 cat <<\_ASBOX
35996d22
AS
21061## ------------------------------------------ ##
21062## Report this to the AC_PACKAGE_NAME lists. ##
21063## ------------------------------------------ ##
19650fd6
AS
21064_ASBOX
21065 ) |
21066 sed "s/^/$as_me: WARNING: /" >&2
21067 ;;
c0d27fcc
MR
21068esac
21069echo "$as_me:$LINENO: checking for $ac_header" >&5
21070echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21071if eval "test \"\${$as_ac_Header+set}\" = set"; then
21072 echo $ECHO_N "(cached) $ECHO_C" >&6
21073else
35996d22 21074 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 21075fi
c0d27fcc 21076echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 21077echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
21078
21079fi
503d2be0 21080if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21081 cat >>confdefs.h <<_ACEOF
503d2be0 21082#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21083_ACEOF
647847ea 21084
73b77ee5 21085fi
c0d27fcc 21086
503d2be0 21087done
73b77ee5 21088
c0d27fcc
MR
21089
21090
503d2be0
AS
21091for ac_func in fork vfork
21092do
21093as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 21094echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
21095echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21096if eval "test \"\${$as_ac_var+set}\" = set"; then
21097 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 21098else
503d2be0 21099 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21100/* confdefs.h. */
21101_ACEOF
21102cat confdefs.h >>conftest.$ac_ext
21103cat >>conftest.$ac_ext <<_ACEOF
21104/* end confdefs.h. */
35996d22
AS
21105/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21106 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21107#define $ac_func innocuous_$ac_func
21108
fa0b693c 21109/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21110 which can conflict with char $ac_func (); below.
21111 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21112 <limits.h> exists even on freestanding compilers. */
35996d22 21113
19650fd6
AS
21114#ifdef __STDC__
21115# include <limits.h>
21116#else
21117# include <assert.h>
21118#endif
35996d22
AS
21119
21120#undef $ac_func
21121
fa0b693c 21122/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
21123#ifdef __cplusplus
21124extern "C"
19650fd6 21125{
503d2be0 21126#endif
fa0b693c 21127/* We use char because int might match the return type of a gcc2
503d2be0
AS
21128 builtin and then its argument prototype would still apply. */
21129char $ac_func ();
fa0b693c
GM
21130/* The GNU C library defines this for functions which it implements
21131 to always fail with ENOSYS. Some functions are actually named
21132 something starting with __ and the normal name is an alias. */
503d2be0 21133#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
21134choke me
21135#else
19650fd6
AS
21136char (*f) () = $ac_func;
21137#endif
21138#ifdef __cplusplus
21139}
fa0b693c
GM
21140#endif
21141
19650fd6
AS
21142int
21143main ()
21144{
21145return f != $ac_func;
503d2be0
AS
21146 ;
21147 return 0;
21148}
21149_ACEOF
21150rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 21151if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 21152 (eval $ac_link) 2>conftest.er1
503d2be0 21153 ac_status=$?
35996d22
AS
21154 grep -v '^ *+' conftest.er1 >conftest.err
21155 rm -f conftest.er1
21156 cat conftest.err >&5
c0d27fcc 21157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21158 (exit $ac_status); } &&
551ffc27
ST
21159 { ac_try='test -z "$ac_c_werror_flag"
21160 || test ! -s conftest.err'
35996d22
AS
21161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21162 (eval $ac_try) 2>&5
21163 ac_status=$?
21164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21165 (exit $ac_status); }; } &&
21166 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 21167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21168 (eval $ac_try) 2>&5
21169 ac_status=$?
c0d27fcc 21170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21171 (exit $ac_status); }; }; then
21172 eval "$as_ac_var=yes"
21173else
21174 echo "$as_me: failed program was:" >&5
19650fd6
AS
21175sed 's/^/| /' conftest.$ac_ext >&5
21176
503d2be0
AS
21177eval "$as_ac_var=no"
21178fi
35996d22
AS
21179rm -f conftest.err conftest.$ac_objext \
21180 conftest$ac_exeext conftest.$ac_ext
503d2be0 21181fi
c0d27fcc 21182echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
21183echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21184if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 21185 cat >>confdefs.h <<_ACEOF
503d2be0 21186#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 21187_ACEOF
503d2be0 21188
fa0b693c 21189fi
503d2be0 21190done
fa0b693c 21191
503d2be0 21192if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 21193 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
21194echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21195if test "${ac_cv_func_fork_works+set}" = set; then
21196 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 21197else
503d2be0
AS
21198 if test "$cross_compiling" = yes; then
21199 ac_cv_func_fork_works=cross
21200else
21201 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 21202/* By Ruediger Kuhlmann. */
503d2be0
AS
21203 #include <sys/types.h>
21204 #if HAVE_UNISTD_H
21205 # include <unistd.h>
21206 #endif
21207 /* Some systems only have a dummy stub for fork() */
21208 int main ()
21209 {
35996d22
AS
21210 if (fork() < 0)
21211 exit (1);
21212 exit (0);
503d2be0
AS
21213 }
21214_ACEOF
21215rm -f conftest$ac_exeext
c0d27fcc 21216if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21217 (eval $ac_link) 2>&5
21218 ac_status=$?
c0d27fcc 21219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21220 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21222 (eval $ac_try) 2>&5
21223 ac_status=$?
c0d27fcc 21224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21225 (exit $ac_status); }; }; then
21226 ac_cv_func_fork_works=yes
21227else
21228 echo "$as_me: program exited with status $ac_status" >&5
21229echo "$as_me: failed program was:" >&5
19650fd6
AS
21230sed 's/^/| /' conftest.$ac_ext >&5
21231
c0d27fcc 21232( exit $ac_status )
503d2be0
AS
21233ac_cv_func_fork_works=no
21234fi
35996d22 21235rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
21236fi
21237fi
c0d27fcc 21238echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
21239echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21240
6bae0ccf
DL
21241else
21242 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
21243fi
21244if test "x$ac_cv_func_fork_works" = xcross; then
21245 case $host in
21246 *-*-amigaos* | *-*-msdosdjgpp*)
21247 # Override, as these systems have only a dummy fork() stub
21248 ac_cv_func_fork_works=no
21249 ;;
21250 *)
21251 ac_cv_func_fork_works=yes
21252 ;;
21253 esac
c0d27fcc
MR
21254 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
21255echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 21256fi
73b77ee5 21257ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 21258if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 21259 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
21260echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21261if test "${ac_cv_func_vfork_works+set}" = set; then
21262 echo $ECHO_N "(cached) $ECHO_C" >&6
21263else
21264 if test "$cross_compiling" = yes; then
21265 ac_cv_func_vfork_works=cross
fa0b693c 21266else
503d2be0 21267 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21268/* confdefs.h. */
21269_ACEOF
21270cat confdefs.h >>conftest.$ac_ext
21271cat >>conftest.$ac_ext <<_ACEOF
21272/* end confdefs.h. */
73b77ee5
GM
21273/* Thanks to Paul Eggert for this test. */
21274#include <stdio.h>
19650fd6 21275#include <stdlib.h>
fa0b693c 21276#include <sys/types.h>
73b77ee5 21277#include <sys/stat.h>
19650fd6 21278#include <sys/wait.h>
503d2be0
AS
21279#if HAVE_UNISTD_H
21280# include <unistd.h>
73b77ee5 21281#endif
503d2be0
AS
21282#if HAVE_VFORK_H
21283# include <vfork.h>
73b77ee5
GM
21284#endif
21285/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
21286 argument registers are propagated back to the parent. The compiler
21287 is told about this with #include <vfork.h>, but some compilers
21288 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
21289 static variable whose address is put into a register that is
21290 clobbered by the vfork. */
19650fd6 21291static void
fa0b693c 21292#ifdef __cplusplus
73b77ee5 21293sparc_address_test (int arg)
503d2be0 21294# else
73b77ee5 21295sparc_address_test (arg) int arg;
fa0b693c 21296#endif
fa0b693c 21297{
73b77ee5
GM
21298 static pid_t child;
21299 if (!child) {
21300 child = vfork ();
21301 if (child < 0) {
21302 perror ("vfork");
21303 _exit(2);
21304 }
21305 if (!child) {
21306 arg = getpid();
21307 write(-1, "", 0);
21308 _exit (arg);
21309 }
21310 }
21311}
503d2be0
AS
21312
21313int
21314main ()
21315{
73b77ee5
GM
21316 pid_t parent = getpid ();
21317 pid_t child;
fa0b693c 21318
19650fd6 21319 sparc_address_test (0);
fa0b693c 21320
73b77ee5 21321 child = vfork ();
fa0b693c 21322
73b77ee5 21323 if (child == 0) {
503d2be0
AS
21324 /* Here is another test for sparc vfork register problems. This
21325 test uses lots of local variables, at least as many local
21326 variables as main has allocated so far including compiler
21327 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
21328 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
21329 reuse the register of parent for one of the local variables,
21330 since it will think that parent can't possibly be used any more
21331 in this routine. Assigning to the local variable will thus
21332 munge parent in the parent process. */
73b77ee5
GM
21333 pid_t
21334 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21335 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21336 /* Convince the compiler that p..p7 are live; otherwise, it might
21337 use the same hardware register for all 8 local variables. */
21338 if (p != p1 || p != p2 || p != p3 || p != p4
21339 || p != p5 || p != p6 || p != p7)
21340 _exit(1);
fa0b693c 21341
503d2be0
AS
21342 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21343 from child file descriptors. If the child closes a descriptor
21344 before it execs or exits, this munges the parent's descriptor
21345 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
21346 _exit(close(fileno(stdout)) != 0);
21347 } else {
21348 int status;
21349 struct stat st;
21350
21351 while (wait(&status) != child)
21352 ;
21353 exit(
21354 /* Was there some problem with vforking? */
21355 child < 0
21356
21357 /* Did the child fail? (This shouldn't happen.) */
21358 || status
21359
21360 /* Did the vfork/compiler bug occur? */
21361 || parent != getpid()
fa0b693c 21362
73b77ee5
GM
21363 /* Did the file descriptor bug occur? */
21364 || fstat(fileno(stdout), &st) != 0
21365 );
21366 }
21367}
503d2be0
AS
21368_ACEOF
21369rm -f conftest$ac_exeext
c0d27fcc 21370if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21371 (eval $ac_link) 2>&5
21372 ac_status=$?
c0d27fcc 21373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21374 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21376 (eval $ac_try) 2>&5
21377 ac_status=$?
c0d27fcc 21378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21379 (exit $ac_status); }; }; then
73b77ee5 21380 ac_cv_func_vfork_works=yes
fa0b693c 21381else
503d2be0
AS
21382 echo "$as_me: program exited with status $ac_status" >&5
21383echo "$as_me: failed program was:" >&5
19650fd6
AS
21384sed 's/^/| /' conftest.$ac_ext >&5
21385
c0d27fcc 21386( exit $ac_status )
503d2be0
AS
21387ac_cv_func_vfork_works=no
21388fi
35996d22 21389rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 21390fi
fa0b693c 21391fi
c0d27fcc 21392echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 21393echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 21394
503d2be0
AS
21395fi;
21396if test "x$ac_cv_func_fork_works" = xcross; then
35996d22 21397 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
21398 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
21399echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
21400fi
21401
503d2be0
AS
21402if test "x$ac_cv_func_vfork_works" = xyes; then
21403
c0d27fcc 21404cat >>confdefs.h <<\_ACEOF
503d2be0 21405#define HAVE_WORKING_VFORK 1
c0d27fcc 21406_ACEOF
503d2be0
AS
21407
21408else
21409
c0d27fcc 21410cat >>confdefs.h <<\_ACEOF
73b77ee5 21411#define vfork fork
c0d27fcc 21412_ACEOF
fa0b693c
GM
21413
21414fi
503d2be0
AS
21415if test "x$ac_cv_func_fork_works" = xyes; then
21416
c0d27fcc 21417cat >>confdefs.h <<\_ACEOF
503d2be0 21418#define HAVE_WORKING_FORK 1
c0d27fcc 21419_ACEOF
fa0b693c 21420
503d2be0 21421fi
647847ea 21422
c0d27fcc 21423
6a3a24fa
JD
21424echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
21425echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
21426if test "${emacs_cv_langinfo_codeset+set}" = set; then
21427 echo $ECHO_N "(cached) $ECHO_C" >&6
21428else
21429 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21430/* confdefs.h. */
21431_ACEOF
21432cat confdefs.h >>conftest.$ac_ext
21433cat >>conftest.$ac_ext <<_ACEOF
21434/* end confdefs.h. */
6a3a24fa
JD
21435#include <langinfo.h>
21436int
21437main ()
21438{
21439char* cs = nl_langinfo(CODESET);
21440 ;
21441 return 0;
21442}
21443_ACEOF
21444rm -f conftest.$ac_objext conftest$ac_exeext
21445if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 21446 (eval $ac_link) 2>conftest.er1
6a3a24fa 21447 ac_status=$?
35996d22
AS
21448 grep -v '^ *+' conftest.er1 >conftest.err
21449 rm -f conftest.er1
21450 cat conftest.err >&5
6a3a24fa
JD
21451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21452 (exit $ac_status); } &&
551ffc27
ST
21453 { ac_try='test -z "$ac_c_werror_flag"
21454 || test ! -s conftest.err'
35996d22
AS
21455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21456 (eval $ac_try) 2>&5
21457 ac_status=$?
21458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21459 (exit $ac_status); }; } &&
21460 { ac_try='test -s conftest$ac_exeext'
6a3a24fa
JD
21461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21462 (eval $ac_try) 2>&5
21463 ac_status=$?
21464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21465 (exit $ac_status); }; }; then
21466 emacs_cv_langinfo_codeset=yes
21467else
21468 echo "$as_me: failed program was:" >&5
19650fd6
AS
21469sed 's/^/| /' conftest.$ac_ext >&5
21470
6a3a24fa
JD
21471emacs_cv_langinfo_codeset=no
21472fi
35996d22
AS
21473rm -f conftest.err conftest.$ac_objext \
21474 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
21475
21476fi
21477echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
21478echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
21479if test $emacs_cv_langinfo_codeset = yes; then
21480
21481cat >>confdefs.h <<\_ACEOF
21482#define HAVE_LANGINFO_CODESET 1
21483_ACEOF
21484
21485fi
21486
c0d27fcc 21487echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
21488echo $ECHO_N "checking for size_t... $ECHO_C" >&6
21489if test "${ac_cv_type_size_t+set}" = set; then
21490 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 21491else
503d2be0 21492 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21493/* confdefs.h. */
21494_ACEOF
21495cat confdefs.h >>conftest.$ac_ext
21496cat >>conftest.$ac_ext <<_ACEOF
21497/* end confdefs.h. */
503d2be0
AS
21498$ac_includes_default
21499int
21500main ()
21501{
21502if ((size_t *) 0)
21503 return 0;
21504if (sizeof (size_t))
21505 return 0;
21506 ;
21507 return 0;
21508}
21509_ACEOF
21510rm -f conftest.$ac_objext
c0d27fcc 21511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21512 (eval $ac_compile) 2>conftest.er1
503d2be0 21513 ac_status=$?
35996d22
AS
21514 grep -v '^ *+' conftest.er1 >conftest.err
21515 rm -f conftest.er1
21516 cat conftest.err >&5
c0d27fcc 21517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21518 (exit $ac_status); } &&
551ffc27
ST
21519 { ac_try='test -z "$ac_c_werror_flag"
21520 || test ! -s conftest.err'
35996d22
AS
21521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21522 (eval $ac_try) 2>&5
21523 ac_status=$?
21524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21525 (exit $ac_status); }; } &&
21526 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21528 (eval $ac_try) 2>&5
21529 ac_status=$?
c0d27fcc 21530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21531 (exit $ac_status); }; }; then
8730a8da
DL
21532 ac_cv_type_size_t=yes
21533else
503d2be0 21534 echo "$as_me: failed program was:" >&5
19650fd6
AS
21535sed 's/^/| /' conftest.$ac_ext >&5
21536
503d2be0 21537ac_cv_type_size_t=no
8730a8da 21538fi
35996d22 21539rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 21540fi
c0d27fcc 21541echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
21542echo "${ECHO_T}$ac_cv_type_size_t" >&6
21543if test $ac_cv_type_size_t = yes; then
503d2be0 21544
c0d27fcc
MR
21545cat >>confdefs.h <<_ACEOF
21546#define HAVE_SIZE_T 1
21547_ACEOF
21548
8730a8da
DL
21549
21550fi
21551
c0d27fcc 21552
973a76b1
DL
21553echo "$as_me:$LINENO: checking for mbstate_t" >&5
21554echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
21555if test "${ac_cv_type_mbstate_t+set}" = set; then
21556 echo $ECHO_N "(cached) $ECHO_C" >&6
21557else
21558 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21559/* confdefs.h. */
21560_ACEOF
21561cat confdefs.h >>conftest.$ac_ext
21562cat >>conftest.$ac_ext <<_ACEOF
21563/* end confdefs.h. */
973a76b1
DL
21564$ac_includes_default
21565# include <wchar.h>
21566int
21567main ()
21568{
21569mbstate_t x; return sizeof x;
21570 ;
21571 return 0;
21572}
21573_ACEOF
21574rm -f conftest.$ac_objext
21575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21576 (eval $ac_compile) 2>conftest.er1
973a76b1 21577 ac_status=$?
35996d22
AS
21578 grep -v '^ *+' conftest.er1 >conftest.err
21579 rm -f conftest.er1
21580 cat conftest.err >&5
973a76b1
DL
21581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21582 (exit $ac_status); } &&
551ffc27
ST
21583 { ac_try='test -z "$ac_c_werror_flag"
21584 || test ! -s conftest.err'
35996d22
AS
21585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21586 (eval $ac_try) 2>&5
21587 ac_status=$?
21588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21589 (exit $ac_status); }; } &&
21590 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
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); }; }; then
21596 ac_cv_type_mbstate_t=yes
21597else
21598 echo "$as_me: failed program was:" >&5
19650fd6
AS
21599sed 's/^/| /' conftest.$ac_ext >&5
21600
973a76b1
DL
21601ac_cv_type_mbstate_t=no
21602fi
35996d22 21603rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
21604fi
21605echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
21606echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
21607 if test $ac_cv_type_mbstate_t = yes; then
21608
21609cat >>confdefs.h <<\_ACEOF
21610#define HAVE_MBSTATE_T 1
21611_ACEOF
21612
21613 else
21614
21615cat >>confdefs.h <<\_ACEOF
21616#define mbstate_t int
21617_ACEOF
21618
21619 fi
21620
22044edf
DL
21621echo "$as_me:$LINENO: checking for C restrict keyword" >&5
21622echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
21623if test "${emacs_cv_c_restrict+set}" = set; then
21624 echo $ECHO_N "(cached) $ECHO_C" >&6
21625else
21626 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21627/* confdefs.h. */
21628_ACEOF
21629cat confdefs.h >>conftest.$ac_ext
21630cat >>conftest.$ac_ext <<_ACEOF
21631/* end confdefs.h. */
22044edf
DL
21632void fred (int *restrict x);
21633int
21634main ()
21635{
b936fae4 21636
22044edf
DL
21637 ;
21638 return 0;
21639}
c0d27fcc 21640_ACEOF
22044edf
DL
21641rm -f conftest.$ac_objext
21642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21643 (eval $ac_compile) 2>conftest.er1
22044edf 21644 ac_status=$?
35996d22
AS
21645 grep -v '^ *+' conftest.er1 >conftest.err
21646 rm -f conftest.er1
21647 cat conftest.err >&5
22044edf
DL
21648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21649 (exit $ac_status); } &&
551ffc27
ST
21650 { ac_try='test -z "$ac_c_werror_flag"
21651 || test ! -s conftest.err'
35996d22
AS
21652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21653 (eval $ac_try) 2>&5
21654 ac_status=$?
21655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21656 (exit $ac_status); }; } &&
21657 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
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); }; }; then
21663 emacs_cv_c_restrict=yes
21664else
21665 echo "$as_me: failed program was:" >&5
19650fd6
AS
21666sed 's/^/| /' conftest.$ac_ext >&5
21667
22044edf 21668cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21669/* confdefs.h. */
21670_ACEOF
21671cat confdefs.h >>conftest.$ac_ext
21672cat >>conftest.$ac_ext <<_ACEOF
21673/* end confdefs.h. */
22044edf
DL
21674void fred (int *__restrict x);
21675int
21676main ()
21677{
c0d27fcc 21678
22044edf
DL
21679 ;
21680 return 0;
21681}
c0d27fcc 21682_ACEOF
22044edf
DL
21683rm -f conftest.$ac_objext
21684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21685 (eval $ac_compile) 2>conftest.er1
22044edf 21686 ac_status=$?
35996d22
AS
21687 grep -v '^ *+' conftest.er1 >conftest.err
21688 rm -f conftest.er1
21689 cat conftest.err >&5
22044edf
DL
21690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21691 (exit $ac_status); } &&
551ffc27
ST
21692 { ac_try='test -z "$ac_c_werror_flag"
21693 || test ! -s conftest.err'
35996d22
AS
21694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21695 (eval $ac_try) 2>&5
21696 ac_status=$?
21697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21698 (exit $ac_status); }; } &&
21699 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
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); }; }; then
21705 emacs_cv_c_restrict=__restrict
21706else
21707 echo "$as_me: failed program was:" >&5
19650fd6
AS
21708sed 's/^/| /' conftest.$ac_ext >&5
21709
22044edf 21710emacs_cv_c_restrict=no
ba4481b5 21711fi
35996d22 21712rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21713fi
35996d22 21714rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21715fi
22044edf
DL
21716echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
21717echo "${ECHO_T}$emacs_cv_c_restrict" >&6
21718case "$emacs_cv_c_restrict" in
21719 yes) emacs_restrict=restrict;;
21720 no) emacs_restrict="";;
21721 *) emacs_restrict="$emacs_cv_c_restrict";;
21722esac
21723if test "$emacs_restrict" != __restrict; then
b936fae4 21724
22044edf
DL
21725cat >>confdefs.h <<_ACEOF
21726#define __restrict $emacs_restrict
c0d27fcc 21727_ACEOF
ba4481b5
DL
21728
21729fi
ba4481b5 21730
22044edf
DL
21731echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
21732echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
21733if test "${emacs_cv_c_restrict_arr+set}" = set; then
21734 echo $ECHO_N "(cached) $ECHO_C" >&6
21735else
21736 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21737/* confdefs.h. */
21738_ACEOF
21739cat confdefs.h >>conftest.$ac_ext
21740cat >>conftest.$ac_ext <<_ACEOF
21741/* end confdefs.h. */
22044edf
DL
21742void fred (int x[__restrict]);
21743int
21744main ()
21745{
b936fae4 21746
22044edf
DL
21747 ;
21748 return 0;
21749}
c0d27fcc 21750_ACEOF
22044edf
DL
21751rm -f conftest.$ac_objext
21752if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21753 (eval $ac_compile) 2>conftest.er1
22044edf 21754 ac_status=$?
35996d22
AS
21755 grep -v '^ *+' conftest.er1 >conftest.err
21756 rm -f conftest.er1
21757 cat conftest.err >&5
22044edf
DL
21758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21759 (exit $ac_status); } &&
551ffc27
ST
21760 { ac_try='test -z "$ac_c_werror_flag"
21761 || test ! -s conftest.err'
35996d22
AS
21762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21763 (eval $ac_try) 2>&5
21764 ac_status=$?
21765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21766 (exit $ac_status); }; } &&
21767 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
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); }; }; then
21773 emacs_cv_c_restrict_arr=yes
21774else
21775 echo "$as_me: failed program was:" >&5
19650fd6
AS
21776sed 's/^/| /' conftest.$ac_ext >&5
21777
22044edf 21778emacs_cv_c_restrict_arr=no
ba4481b5 21779fi
35996d22 21780rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf
DL
21781fi
21782echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
21783echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
21784if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 21785
c0d27fcc 21786cat >>confdefs.h <<\_ACEOF
22044edf 21787#define __restrict_arr __restrict
c0d27fcc 21788_ACEOF
ba4481b5 21789
ba4481b5
DL
21790fi
21791
c0d27fcc 21792
c0d27fcc 21793
22044edf
DL
21794# Set up the CFLAGS for real compilation, so we can substitute it.
21795CFLAGS="$REAL_CFLAGS"
21796CPPFLAGS="$REAL_CPPFLAGS"
21797
21798#### Find out which version of Emacs this is.
21799version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
21800 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
21801if test x"${version}" = x; then
21802 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
21803echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
21804 { (exit 1); exit 1; }; }
21805fi
21806
21807### Specify what sort of things we'll be editing into Makefile and config.h.
21808### Use configuration here uncanonicalized to avoid exceeding size limits.
21809
21810
21811
21812
21813
21814
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
6a3a24fa 21841
22044edf
DL
21842
21843
21844cat >>confdefs.h <<_ACEOF
21845#define EMACS_CONFIGURATION "${canonical}"
21846_ACEOF
21847
21848
21849cat >>confdefs.h <<_ACEOF
21850#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
21851_ACEOF
21852
21853
21854cat >>confdefs.h <<_ACEOF
21855#define config_machfile "${machfile}"
21856_ACEOF
21857
21858
21859cat >>confdefs.h <<_ACEOF
21860#define config_opsysfile "${opsysfile}"
21861_ACEOF
21862
21863
21864cat >>confdefs.h <<_ACEOF
21865#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
21866_ACEOF
21867
21868
21869cat >>confdefs.h <<_ACEOF
21870#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
21871_ACEOF
21872
21873
21874cat >>confdefs.h <<_ACEOF
21875#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
21876_ACEOF
21877
21878
21879cat >>confdefs.h <<_ACEOF
21880#define UNEXEC_SRC ${UNEXEC_SRC}
21881_ACEOF
21882
21883
21884if test "${HAVE_X_WINDOWS}" = "yes" ; then
21885
21886cat >>confdefs.h <<\_ACEOF
21887#define HAVE_X_WINDOWS 1
21888_ACEOF
21889
21890fi
21891if test "${USE_X_TOOLKIT}" != "none" ; then
21892
21893cat >>confdefs.h <<\_ACEOF
21894#define USE_X_TOOLKIT 1
21895_ACEOF
21896
21897fi
21898if test "${HAVE_X11}" = "yes" ; then
21899
21900cat >>confdefs.h <<\_ACEOF
21901#define HAVE_X11 1
21902_ACEOF
21903
21904fi
21905if test "${HAVE_XFREE386}" = "yes" ; then
21906
21907cat >>confdefs.h <<\_ACEOF
21908#define HAVE_XFREE386 1
21909_ACEOF
21910
21911fi
21912if test "${HAVE_MENUS}" = "yes" ; then
21913
21914cat >>confdefs.h <<\_ACEOF
21915#define HAVE_MENUS 1
21916_ACEOF
21917
21918fi
21919if test "${GNU_MALLOC}" = "yes" ; then
21920
21921cat >>confdefs.h <<\_ACEOF
21922#define GNU_MALLOC 1
21923_ACEOF
21924
21925fi
21926if test "${REL_ALLOC}" = "yes" ; then
21927
21928cat >>confdefs.h <<\_ACEOF
21929#define REL_ALLOC 1
21930_ACEOF
21931
21932fi
21933
21934
21935
c0d27fcc
MR
21936
21937
ba4481b5 21938#### Report on what we decided to do.
488dd4c4
JD
21939#### Report GTK as a toolkit, even if it doesn't use Xt.
21940#### It makes printing result more understandable as using GTK sets
21941#### toolkit_scroll_bars to yes by default.
21942if test "${HAVE_GTK}" = "yes"; then
21943 USE_X_TOOLKIT=GTK
21944fi
21945
ba4481b5
DL
21946echo "
21947Configured for \`${canonical}'.
21948
21949 Where should the build process find the source code? ${srcdir}
21950 What operating system and machine description files should Emacs use?
21951 \`${opsysfile}' and \`${machfile}'
21952 What compiler should emacs be built with? ${CC} ${CFLAGS}
21953 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 21954 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 21955 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 21956 What window system should Emacs use? ${window_system}
8e967cf7 21957 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
21958
21959if test -n "${x_includes}"; then
21960echo " Where do we find X Windows header files? ${x_includes}"
21961else
21962echo " Where do we find X Windows header files? Standard dirs"
21963fi
21964if test -n "${x_libraries}"; then
21965echo " Where do we find X Windows libraries? ${x_libraries}"
21966else
21967echo " Where do we find X Windows libraries? Standard dirs"
21968fi
21969
21970echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
21971echo " Does Emacs use -lXpm? ${HAVE_XPM}"
21972echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
21973echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
21974echo " Does Emacs use -lungif? ${HAVE_GIF}"
21975echo " Does Emacs use -lpng? ${HAVE_PNG}"
21976echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
21977echo
21978
05cf15c6
JD
21979if test "$emacs_cv_randomheap" = warn; then
21980 { echo "$as_me:$LINENO: WARNING:
21981**********************************************************************
21982
21983Heap start address is randomized and no workaround is known.
21984Emacs will probably dump core when temacs is run in the build phase.
21985Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS'
21986for further information.
21987
21988**********************************************************************
21989" >&5
21990echo "$as_me: WARNING:
21991**********************************************************************
21992
21993Heap start address is randomized and no workaround is known.
21994Emacs will probably dump core when temacs is run in the build phase.
21995Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS'
21996for further information.
21997
21998**********************************************************************
21999" >&2;}
22000fi
22001
ba4481b5
DL
22002# Remove any trailing slashes in these variables.
22003test "${prefix}" != NONE &&
22004 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
22005test "${exec_prefix}" != NONE &&
22006 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
22007
d0e9bfd2
GM
22008## Check if the C preprocessor will convert `..' to `. .'. If so, set
22009## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
22010## from Makefile.c can correctly provide the arg `-traditional' to the
22011## C preprocessor.
22012
503d2be0 22013cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22014/* confdefs.h. */
22015_ACEOF
22016cat confdefs.h >>conftest.$ac_ext
22017cat >>conftest.$ac_ext <<_ACEOF
22018/* end confdefs.h. */
d0e9bfd2 22019yes..yes
503d2be0 22020_ACEOF
d0e9bfd2 22021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 22022 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
22023 CPP_NEED_TRADITIONAL=no
22024else
d0e9bfd2
GM
22025 CPP_NEED_TRADITIONAL=yes
22026fi
22027rm -f conftest*
22028
c0d27fcc 22029
6bae0ccf
DL
22030 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"
22031 ac_config_commands="$ac_config_commands default"
503d2be0 22032cat >confcache <<\_ACEOF
ba4481b5
DL
22033# This file is a shell script that caches the results of configure
22034# tests run on this system so they can be shared between configure
503d2be0
AS
22035# scripts and configure runs, see configure's option --config-cache.
22036# It is not useful on other systems. If it contains results you don't
22037# want to keep, you may remove or edit it.
ba4481b5 22038#
503d2be0
AS
22039# config.status only pays attention to the cache file if you give it
22040# the --recheck option to rerun configure.
ba4481b5 22041#
6bae0ccf 22042# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
22043# loading this file, other *unset* `ac_cv_foo' will be assigned the
22044# following values.
22045
22046_ACEOF
22047
ba4481b5
DL
22048# The following way of writing the cache mishandles newlines in values,
22049# but we know of no workaround that is simple, portable, and efficient.
22050# So, don't put newlines in cache variables' values.
22051# Ultrix sh set writes to stderr and can't be redirected directly,
22052# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
22053{
22054 (set) 2>&1 |
22055 case `(ac_space=' '; set | grep ac_space) 2>&1` in
22056 *ac_space=\ *)
22057 # `set' does not quote correctly, so add quotes (double-quote
22058 # substitution turns \\\\ into \\, and sed turns \\ into \).
22059 sed -n \
35996d22
AS
22060 "s/'/'\\\\''/g;
22061 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
503d2be0
AS
22062 ;;
22063 *)
22064 # `set' quotes correctly as required by POSIX, so do not add quotes.
22065 sed -n \
35996d22 22066 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
22067 ;;
22068 esac;
22069} |
22070 sed '
22071 t clear
22072 : clear
22073 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22074 t end
22075 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22076 : end' >>confcache
19650fd6 22077if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 22078 if test -w $cache_file; then
503d2be0
AS
22079 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22080 cat confcache >$cache_file
ba4481b5
DL
22081 else
22082 echo "not updating unwritable cache $cache_file"
22083 fi
22084fi
22085rm -f confcache
22086
ba4481b5
DL
22087test "x$prefix" = xNONE && prefix=$ac_default_prefix
22088# Let make expand exec_prefix.
22089test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22090
503d2be0
AS
22091# VPATH may cause trouble with some makes, so we remove $(srcdir),
22092# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22093# trailing colons and then remove the whole line if VPATH becomes empty
22094# (actually we leave an empty line to preserve line numbers).
ba4481b5 22095if test "x$srcdir" = x.; then
35996d22 22096 ac_vpsub='/^[ ]*VPATH[ ]*=/{
503d2be0
AS
22097s/:*\$(srcdir):*/:/;
22098s/:*\${srcdir}:*/:/;
22099s/:*@srcdir@:*/:/;
35996d22 22100s/^\([^=]*=[ ]*\):*/\1/;
503d2be0 22101s/:*$//;
35996d22 22102s/^[^=]*=[ ]*$//;
503d2be0 22103}'
ba4481b5
DL
22104fi
22105
ba4481b5
DL
22106DEFS=-DHAVE_CONFIG_H
22107
6bae0ccf
DL
22108ac_libobjs=
22109ac_ltlibobjs=
22110for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22111 # 1. Remove the extension, and $U if already installed.
22112 ac_i=`echo "$ac_i" |
35996d22 22113 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6bae0ccf
DL
22114 # 2. Add them.
22115 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22116 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
22117done
22118LIBOBJS=$ac_libobjs
22119
22120LTLIBOBJS=$ac_ltlibobjs
22121
22122
c0d27fcc 22123
ba4481b5 22124: ${CONFIG_STATUS=./config.status}
503d2be0
AS
22125ac_clean_files_save=$ac_clean_files
22126ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 22127{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
22128echo "$as_me: creating $CONFIG_STATUS" >&6;}
22129cat >$CONFIG_STATUS <<_ACEOF
22130#! $SHELL
c0d27fcc 22131# Generated by $as_me.
ba4481b5 22132# Run this file to recreate the current configuration.
ba4481b5 22133# Compiler output produced by configure, useful for debugging
503d2be0 22134# configure, is in config.log if it exists.
ba4481b5 22135
503d2be0 22136debug=false
19650fd6
AS
22137ac_cs_recheck=false
22138ac_cs_silent=false
503d2be0 22139SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
22140_ACEOF
22141
22142cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
22143## --------------------- ##
22144## M4sh Initialization. ##
22145## --------------------- ##
22146
503d2be0
AS
22147# Be Bourne compatible
22148if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22149 emulate sh
22150 NULLCMD=:
6bae0ccf
DL
22151 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22152 # is contrary to our usage. Disable this feature.
22153 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
22154elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22155 set -o posix
22156fi
35996d22 22157DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 22158
c0d27fcc 22159# Support unset when possible.
35996d22 22160if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
22161 as_unset=unset
22162else
22163 as_unset=false
22164fi
22165
6bae0ccf
DL
22166
22167# Work around bugs in pre-3.0 UWIN ksh.
22168$as_unset ENV MAIL MAILPATH
22169PS1='$ '
22170PS2='> '
22171PS4='+ '
22172
22173# NLS nuisances.
19650fd6
AS
22174for as_var in \
22175 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22176 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22177 LC_TELEPHONE LC_TIME
6bae0ccf 22178do
35996d22 22179 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
22180 eval $as_var=C; export $as_var
22181 else
22182 $as_unset $as_var
22183 fi
22184done
22185
22186# Required to use basename.
22187if expr a : '\(a\)' >/dev/null 2>&1; then
22188 as_expr=expr
22189else
22190 as_expr=false
22191fi
22192
22193if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22194 as_basename=basename
22195else
22196 as_basename=false
22197fi
c0d27fcc
MR
22198
22199
503d2be0 22200# Name of the executable.
6bae0ccf 22201as_me=`$as_basename "$0" ||
c0d27fcc
MR
22202$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22203 X"$0" : 'X\(//\)$' \| \
22204 X"$0" : 'X\(/\)$' \| \
22205 . : '\(.\)' 2>/dev/null ||
22206echo X/"$0" |
22207 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22208 /^X\/\(\/\/\)$/{ s//\1/; q; }
22209 /^X\/\(\/\).*/{ s//\1/; q; }
22210 s/.*/./; q'`
22211
6bae0ccf 22212
c0d27fcc
MR
22213# PATH needs CR, and LINENO needs CR and PATH.
22214# Avoid depending upon Character Ranges.
22215as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22216as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22217as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22218as_cr_digits='0123456789'
22219as_cr_alnum=$as_cr_Letters$as_cr_digits
22220
22221# The user is always right.
22222if test "${PATH_SEPARATOR+set}" != set; then
19650fd6
AS
22223 echo "#! /bin/sh" >conf$$.sh
22224 echo "exit 0" >>conf$$.sh
22225 chmod +x conf$$.sh
22226 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
22227 PATH_SEPARATOR=';'
22228 else
22229 PATH_SEPARATOR=:
22230 fi
19650fd6 22231 rm -f conf$$.sh
c0d27fcc
MR
22232fi
22233
22234
22235 as_lineno_1=$LINENO
22236 as_lineno_2=$LINENO
22237 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22238 test "x$as_lineno_1" != "x$as_lineno_2" &&
22239 test "x$as_lineno_3" = "x$as_lineno_2" || {
22240 # Find who we are. Look in the path if we contain no path at all
22241 # relative or not.
22242 case $0 in
22243 *[\\/]* ) as_myself=$0 ;;
22244 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22245for as_dir in $PATH
22246do
22247 IFS=$as_save_IFS
22248 test -z "$as_dir" && as_dir=.
22249 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22250done
22251
22252 ;;
22253 esac
22254 # We did not find ourselves, most probably we were run as `sh COMMAND'
22255 # in which case we are not to be found in the path.
22256 if test "x$as_myself" = x; then
22257 as_myself=$0
22258 fi
22259 if test ! -f "$as_myself"; then
22260 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22261echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22262 { (exit 1); exit 1; }; }
22263 fi
22264 case $CONFIG_SHELL in
22265 '')
22266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22267for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22268do
22269 IFS=$as_save_IFS
22270 test -z "$as_dir" && as_dir=.
22271 for as_base in sh bash ksh sh5; do
22272 case $as_dir in
22273 /*)
22274 if ("$as_dir/$as_base" -c '
22275 as_lineno_1=$LINENO
22276 as_lineno_2=$LINENO
22277 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22278 test "x$as_lineno_1" != "x$as_lineno_2" &&
22279 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
22280 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22281 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
22282 CONFIG_SHELL=$as_dir/$as_base
22283 export CONFIG_SHELL
22284 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22285 fi;;
22286 esac
22287 done
22288done
22289;;
22290 esac
22291
22292 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22293 # uniformly replaced by the line number. The first 'sed' inserts a
22294 # line-number line before each line; the second 'sed' does the real
22295 # work. The second script uses 'N' to pair each line-number line
22296 # with the numbered line, and appends trailing '-' during
22297 # substitution so that $LINENO is not a special case at line end.
22298 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22299 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
22300 sed '=' <$as_myself |
22301 sed '
22302 N
22303 s,$,-,
22304 : loop
22305 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22306 t loop
22307 s,-$,,
22308 s,^['$as_cr_digits']*\n,,
22309 ' >$as_me.lineno &&
22310 chmod +x $as_me.lineno ||
22311 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22312echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22313 { (exit 1); exit 1; }; }
22314
22315 # Don't try to exec as it changes $[0], causing all sort of problems
22316 # (the dirname of $[0] is not the place where we might find the
22317 # original and so on. Autoconf is especially sensible to this).
22318 . ./$as_me.lineno
22319 # Exit status is that of the last command.
22320 exit
22321}
22322
22323
22324case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22325 *c*,-n*) ECHO_N= ECHO_C='
22326' ECHO_T=' ' ;;
22327 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22328 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
22329esac
503d2be0
AS
22330
22331if expr a : '\(a\)' >/dev/null 2>&1; then
22332 as_expr=expr
22333else
22334 as_expr=false
22335fi
22336
22337rm -f conf$$ conf$$.exe conf$$.file
22338echo >conf$$.file
22339if ln -s conf$$.file conf$$ 2>/dev/null; then
22340 # We could just check for DJGPP; but this test a) works b) is more generic
22341 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22342 if test -f conf$$.exe; then
22343 # Don't use ln at all; we don't have any links
22344 as_ln_s='cp -p'
22345 else
22346 as_ln_s='ln -s'
22347 fi
22348elif ln conf$$.file conf$$ 2>/dev/null; then
22349 as_ln_s=ln
22350else
22351 as_ln_s='cp -p'
22352fi
22353rm -f conf$$ conf$$.exe conf$$.file
22354
6bae0ccf
DL
22355if mkdir -p . 2>/dev/null; then
22356 as_mkdir_p=:
22357else
35996d22 22358 test -d ./-p && rmdir ./-p
6bae0ccf
DL
22359 as_mkdir_p=false
22360fi
22361
503d2be0
AS
22362as_executable_p="test -f"
22363
c0d27fcc 22364# Sed expression to map a string onto a valid CPP name.
35996d22 22365as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
22366
22367# Sed expression to map a string onto a valid variable name.
35996d22 22368as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 22369
503d2be0
AS
22370
22371# IFS
22372# We need space, tab and new line, in precisely that order.
22373as_nl='
22374'
22375IFS=" $as_nl"
22376
22377# CDPATH.
6bae0ccf 22378$as_unset CDPATH
503d2be0
AS
22379
22380exec 6>&1
22381
c0d27fcc
MR
22382# Open the log real soon, to keep \$[0] and so on meaningful, and to
22383# report actual input values of CONFIG_FILES etc. instead of their
22384# values after options handling. Logging --version etc. is OK.
22385exec 5>>config.log
22386{
22387 echo
22388 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22389## Running $as_me. ##
22390_ASBOX
22391} >&5
22392cat >&5 <<_CSEOF
22393
22394This file was extended by $as_me, which was
35996d22 22395generated by GNU Autoconf 2.59. Invocation command line was
c0d27fcc
MR
22396
22397 CONFIG_FILES = $CONFIG_FILES
22398 CONFIG_HEADERS = $CONFIG_HEADERS
22399 CONFIG_LINKS = $CONFIG_LINKS
22400 CONFIG_COMMANDS = $CONFIG_COMMANDS
22401 $ $0 $@
22402
22403_CSEOF
22404echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22405echo >&5
503d2be0
AS
22406_ACEOF
22407
22408# Files that config.status was made for.
22409if test -n "$ac_config_files"; then
22410 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22411fi
22412
22413if test -n "$ac_config_headers"; then
22414 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22415fi
22416
22417if test -n "$ac_config_links"; then
22418 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22419fi
22420
22421if test -n "$ac_config_commands"; then
22422 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22423fi
22424
c0d27fcc 22425cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22426
22427ac_cs_usage="\
22428\`$as_me' instantiates files from templates according to the
22429current configuration.
22430
22431Usage: $0 [OPTIONS] [FILE]...
22432
22433 -h, --help print this help, then exit
22434 -V, --version print version number, then exit
19650fd6 22435 -q, --quiet do not print progress messages
503d2be0
AS
22436 -d, --debug don't remove temporary files
22437 --recheck update $as_me by reconfiguring in the same conditions
22438 --file=FILE[:TEMPLATE]
35996d22 22439 instantiate the configuration file FILE
503d2be0 22440 --header=FILE[:TEMPLATE]
35996d22 22441 instantiate the configuration header FILE
503d2be0
AS
22442
22443Configuration files:
22444$config_files
22445
22446Configuration headers:
22447$config_headers
22448
22449Configuration commands:
22450$config_commands
22451
22452Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 22453_ACEOF
503d2be0 22454
c0d27fcc 22455cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22456ac_cs_version="\\
22457config.status
35996d22 22458configured by $0, generated by GNU Autoconf 2.59,
503d2be0
AS
22459 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22460
35996d22 22461Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
22462This config.status script is free software; the Free Software Foundation
22463gives unlimited permission to copy, distribute and modify it."
22464srcdir=$srcdir
22465INSTALL="$INSTALL"
c0d27fcc 22466_ACEOF
503d2be0 22467
c0d27fcc 22468cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22469# If no file are specified by the user, then we need to provide default
22470# value. By we need to know if files were specified by the user.
22471ac_need_defaults=:
22472while test $# != 0
ba4481b5 22473do
503d2be0
AS
22474 case $1 in
22475 --*=*)
22476 ac_option=`expr "x$1" : 'x\([^=]*\)='`
22477 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
22478 ac_shift=:
22479 ;;
22480 -*)
22481 ac_option=$1
22482 ac_optarg=$2
22483 ac_shift=shift
503d2be0 22484 ;;
503d2be0
AS
22485 *) # This is not an option, so the user has probably given explicit
22486 # arguments.
6bae0ccf 22487 ac_option=$1
503d2be0
AS
22488 ac_need_defaults=false;;
22489 esac
22490
6bae0ccf 22491 case $ac_option in
503d2be0 22492 # Handling of the options.
c0d27fcc 22493_ACEOF
f57bd967 22494cat >>$CONFIG_STATUS <<\_ACEOF
19650fd6
AS
22495 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22496 ac_cs_recheck=: ;;
503d2be0
AS
22497 --version | --vers* | -V )
22498 echo "$ac_cs_version"; exit 0 ;;
22499 --he | --h)
22500 # Conflict between --help and --header
c0d27fcc 22501 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
22502Try \`$0 --help' for more information." >&5
22503echo "$as_me: error: ambiguous option: $1
22504Try \`$0 --help' for more information." >&2;}
22505 { (exit 1); exit 1; }; };;
22506 --help | --hel | -h )
22507 echo "$ac_cs_usage"; exit 0 ;;
22508 --debug | --d* | -d )
22509 debug=: ;;
22510 --file | --fil | --fi | --f )
6bae0ccf
DL
22511 $ac_shift
22512 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
22513 ac_need_defaults=false;;
22514 --header | --heade | --head | --hea )
6bae0ccf
DL
22515 $ac_shift
22516 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 22517 ac_need_defaults=false;;
19650fd6
AS
22518 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22519 | -silent | --silent | --silen | --sile | --sil | --si | --s)
22520 ac_cs_silent=: ;;
503d2be0
AS
22521
22522 # This is an error.
c0d27fcc 22523 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
22524Try \`$0 --help' for more information." >&5
22525echo "$as_me: error: unrecognized option: $1
22526Try \`$0 --help' for more information." >&2;}
22527 { (exit 1); exit 1; }; } ;;
22528
22529 *) ac_config_targets="$ac_config_targets $1" ;;
22530
ba4481b5 22531 esac
503d2be0 22532 shift
ba4481b5
DL
22533done
22534
19650fd6
AS
22535ac_configure_extra_args=
22536
22537if $ac_cs_silent; then
22538 exec 6>/dev/null
22539 ac_configure_extra_args="$ac_configure_extra_args --silent"
22540fi
22541
22542_ACEOF
22543cat >>$CONFIG_STATUS <<_ACEOF
22544if \$ac_cs_recheck; then
22545 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
22546 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22547fi
22548
503d2be0 22549_ACEOF
ba4481b5 22550
c0d27fcc 22551cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22552#
22553# INIT-COMMANDS section.
22554#
ba4481b5 22555
503d2be0
AS
22556GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
22557
c0d27fcc
MR
22558_ACEOF
22559
503d2be0 22560
c0d27fcc
MR
22561
22562cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22563for ac_config_target in $ac_config_targets
22564do
22565 case "$ac_config_target" in
22566 # Handling of arguments.
22567 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22568 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
22569 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
22570 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
22571 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
22572 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
22573 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 22574 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 22575 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
22576 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
22577 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22578 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 22579 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
22580echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22581 { (exit 1); exit 1; }; };;
22582 esac
ba4481b5 22583done
503d2be0
AS
22584
22585# If the user did not use the arguments to specify the items to instantiate,
22586# then the envvar interface is used. Set only those that are not.
22587# We use the long form for the default assignment because of an extremely
22588# bizarre bug on SunOS 4.1.3.
22589if $ac_need_defaults; then
22590 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22591 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22592 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 22593fi
503d2be0 22594
19650fd6
AS
22595# Have a temporary directory for convenience. Make it in the build tree
22596# simply because there is no reason to put it here, and in addition,
22597# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
22598# Create a temporary directory, and hook for its removal unless debugging.
22599$debug ||
22600{
22601 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22602 trap '{ (exit 1); exit 1; }' 1 2 13 15
22603}
22604
22605# Create a (secure) tmp directory for tmp files.
19650fd6 22606
503d2be0 22607{
19650fd6 22608 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
22609 test -n "$tmp" && test -d "$tmp"
22610} ||
22611{
19650fd6 22612 tmp=./confstat$$-$RANDOM
503d2be0
AS
22613 (umask 077 && mkdir $tmp)
22614} ||
22615{
19650fd6 22616 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
22617 { (exit 1); exit 1; }
22618}
22619
c0d27fcc 22620_ACEOF
503d2be0 22621
c0d27fcc 22622cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22623
22624#
22625# CONFIG_FILES section.
22626#
22627
22628# No need to generate the scripts if there are no CONFIG_FILES.
22629# This happens for instance when ./config.status config.h
22630if test -n "\$CONFIG_FILES"; then
22631 # Protect against being on the right side of a sed subst in config.status.
22632 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22633 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22634s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
22635s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22636s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22637s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22638s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22639s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22640s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
22641s,@exec_prefix@,$exec_prefix,;t t
22642s,@prefix@,$prefix,;t t
22643s,@program_transform_name@,$program_transform_name,;t t
22644s,@bindir@,$bindir,;t t
22645s,@sbindir@,$sbindir,;t t
22646s,@libexecdir@,$libexecdir,;t t
22647s,@datadir@,$datadir,;t t
22648s,@sysconfdir@,$sysconfdir,;t t
22649s,@sharedstatedir@,$sharedstatedir,;t t
22650s,@localstatedir@,$localstatedir,;t t
22651s,@libdir@,$libdir,;t t
22652s,@includedir@,$includedir,;t t
22653s,@oldincludedir@,$oldincludedir,;t t
22654s,@infodir@,$infodir,;t t
22655s,@mandir@,$mandir,;t t
503d2be0
AS
22656s,@build_alias@,$build_alias,;t t
22657s,@host_alias@,$host_alias,;t t
22658s,@target_alias@,$target_alias,;t t
c0d27fcc 22659s,@DEFS@,$DEFS,;t t
503d2be0
AS
22660s,@ECHO_C@,$ECHO_C,;t t
22661s,@ECHO_N@,$ECHO_N,;t t
22662s,@ECHO_T@,$ECHO_T,;t t
503d2be0 22663s,@LIBS@,$LIBS,;t t
19650fd6 22664s,@MAINT@,$MAINT,;t t
503d2be0
AS
22665s,@build@,$build,;t t
22666s,@build_cpu@,$build_cpu,;t t
22667s,@build_vendor@,$build_vendor,;t t
22668s,@build_os@,$build_os,;t t
22669s,@host@,$host,;t t
22670s,@host_cpu@,$host_cpu,;t t
22671s,@host_vendor@,$host_vendor,;t t
22672s,@host_os@,$host_os,;t t
22673s,@CC@,$CC,;t t
22674s,@CFLAGS@,$CFLAGS,;t t
22675s,@LDFLAGS@,$LDFLAGS,;t t
22676s,@CPPFLAGS@,$CPPFLAGS,;t t
22677s,@ac_ct_CC@,$ac_ct_CC,;t t
22678s,@EXEEXT@,$EXEEXT,;t t
22679s,@OBJEXT@,$OBJEXT,;t t
22680s,@LN_S@,$LN_S,;t t
22681s,@CPP@,$CPP,;t t
22682s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22683s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22684s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
22685s,@RANLIB@,$RANLIB,;t t
22686s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 22687s,@INSTALL_INFO@,$INSTALL_INFO,;t t
6bae0ccf 22688s,@EGREP@,$EGREP,;t t
503d2be0
AS
22689s,@LIBSOUND@,$LIBSOUND,;t t
22690s,@SET_MAKE@,$SET_MAKE,;t t
488dd4c4
JD
22691s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22692s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
22693s,@GTK_LIBS@,$GTK_LIBS,;t t
503d2be0
AS
22694s,@ALLOCA@,$ALLOCA,;t t
22695s,@liblockfile@,$liblockfile,;t t
22696s,@LIBOBJS@,$LIBOBJS,;t t
22697s,@NEED_SETGID@,$NEED_SETGID,;t t
22698s,@KMEM_GROUP@,$KMEM_GROUP,;t t
22699s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
22700s,@version@,$version,;t t
22701s,@configuration@,$configuration,;t t
22702s,@canonical@,$canonical,;t t
22703s,@srcdir@,$srcdir,;t t
22704s,@lispdir@,$lispdir,;t t
22705s,@locallisppath@,$locallisppath,;t t
22706s,@lisppath@,$lisppath,;t t
22707s,@x_default_search_path@,$x_default_search_path,;t t
22708s,@etcdir@,$etcdir,;t t
22709s,@archlibdir@,$archlibdir,;t t
22710s,@docdir@,$docdir,;t t
22711s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
22712s,@gamedir@,$gamedir,;t t
22713s,@gameuser@,$gameuser,;t t
503d2be0
AS
22714s,@c_switch_system@,$c_switch_system,;t t
22715s,@c_switch_machine@,$c_switch_machine,;t t
22716s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
22717s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
22718s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
22719s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
22720s,@machfile@,$machfile,;t t
22721s,@opsysfile@,$opsysfile,;t t
6a3a24fa 22722s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 22723s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
22724CEOF
22725
c0d27fcc 22726_ACEOF
ba4481b5 22727
c0d27fcc 22728 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22729 # Split the substitutions into bite-sized pieces for seds with
22730 # small command number limits, like on Digital OSF/1 and HP-UX.
22731 ac_max_sed_lines=48
22732 ac_sed_frag=1 # Number of current file.
22733 ac_beg=1 # First line for current file.
22734 ac_end=$ac_max_sed_lines # Line after last line for current file.
22735 ac_more_lines=:
22736 ac_sed_cmds=
22737 while $ac_more_lines; do
22738 if test $ac_beg -gt 1; then
22739 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22740 else
22741 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22742 fi
22743 if test ! -s $tmp/subs.frag; then
22744 ac_more_lines=false
22745 else
22746 # The purpose of the label and of the branching condition is to
22747 # speed up the sed processing (if there are no `@' at all, there
22748 # is no need to browse any of the substitutions).
22749 # These are the two extra sed commands mentioned above.
22750 (echo ':t
22751 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22752 if test -z "$ac_sed_cmds"; then
35996d22 22753 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0 22754 else
35996d22 22755 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0
AS
22756 fi
22757 ac_sed_frag=`expr $ac_sed_frag + 1`
22758 ac_beg=$ac_end
22759 ac_end=`expr $ac_end + $ac_max_sed_lines`
22760 fi
22761 done
22762 if test -z "$ac_sed_cmds"; then
22763 ac_sed_cmds=cat
22764 fi
22765fi # test -n "$CONFIG_FILES"
ba4481b5 22766
c0d27fcc
MR
22767_ACEOF
22768cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 22769for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 22770 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
22771 case $ac_file in
22772 - | *:- | *:-:* ) # input from stdin
35996d22
AS
22773 cat >$tmp/stdin
22774 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22775 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22776 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
35996d22 22777 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22778 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
22779 esac
22780
503d2be0 22781 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
22782 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22783$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22784 X"$ac_file" : 'X\(//\)[^/]' \| \
22785 X"$ac_file" : 'X\(//\)$' \| \
22786 X"$ac_file" : 'X\(/\)' \| \
22787 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
22788echo X"$ac_file" |
22789 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22790 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22791 /^X\(\/\/\)$/{ s//\1/; q; }
22792 /^X\(\/\).*/{ s//\1/; q; }
22793 s/.*/./; q'`
6bae0ccf
DL
22794 { if $as_mkdir_p; then
22795 mkdir -p "$ac_dir"
22796 else
22797 as_dir="$ac_dir"
22798 as_dirs=
22799 while test ! -d "$as_dir"; do
22800 as_dirs="$as_dir $as_dirs"
22801 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22802$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22803 X"$as_dir" : 'X\(//\)[^/]' \| \
22804 X"$as_dir" : 'X\(//\)$' \| \
22805 X"$as_dir" : 'X\(/\)' \| \
22806 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
22807echo X"$as_dir" |
22808 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22809 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22810 /^X\(\/\/\)$/{ s//\1/; q; }
22811 /^X\(\/\).*/{ s//\1/; q; }
22812 s/.*/./; q'`
22813 done
22814 test ! -n "$as_dirs" || mkdir $as_dirs
22815 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22816echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22817 { (exit 1); exit 1; }; }; }
503d2be0 22818
c0d27fcc 22819 ac_builddir=.
98418dba 22820
c0d27fcc
MR
22821if test "$ac_dir" != .; then
22822 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22823 # A "../" for each directory in $ac_dir_suffix.
22824 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22825else
22826 ac_dir_suffix= ac_top_builddir=
22827fi
22828
22829case $srcdir in
22830 .) # No --srcdir option. We are building in place.
22831 ac_srcdir=.
22832 if test -z "$ac_top_builddir"; then
22833 ac_top_srcdir=.
22834 else
22835 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22836 fi ;;
22837 [\\/]* | ?:[\\/]* ) # Absolute path.
22838 ac_srcdir=$srcdir$ac_dir_suffix;
22839 ac_top_srcdir=$srcdir ;;
ba4481b5 22840 *) # Relative path.
c0d27fcc
MR
22841 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22842 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22843esac
35996d22
AS
22844
22845# Do not use `cd foo && pwd` to compute absolute paths, because
22846# the directories may not exist.
22847case `pwd` in
22848.) ac_abs_builddir="$ac_dir";;
22849*)
22850 case "$ac_dir" in
22851 .) ac_abs_builddir=`pwd`;;
22852 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22853 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22854 esac;;
22855esac
22856case $ac_abs_builddir in
22857.) ac_abs_top_builddir=${ac_top_builddir}.;;
22858*)
22859 case ${ac_top_builddir}. in
22860 .) ac_abs_top_builddir=$ac_abs_builddir;;
22861 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22862 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22863 esac;;
22864esac
22865case $ac_abs_builddir in
22866.) ac_abs_srcdir=$ac_srcdir;;
22867*)
22868 case $ac_srcdir in
22869 .) ac_abs_srcdir=$ac_abs_builddir;;
22870 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22871 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22872 esac;;
22873esac
22874case $ac_abs_builddir in
22875.) ac_abs_top_srcdir=$ac_top_srcdir;;
22876*)
22877 case $ac_top_srcdir in
22878 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22879 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22880 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22881 esac;;
22882esac
c0d27fcc 22883
ba4481b5 22884
503d2be0
AS
22885 case $INSTALL in
22886 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 22887 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
22888 esac
22889
551ffc27
ST
22890 if test x"$ac_file" != x-; then
22891 { echo "$as_me:$LINENO: creating $ac_file" >&5
22892echo "$as_me: creating $ac_file" >&6;}
22893 rm -f "$ac_file"
22894 fi
503d2be0
AS
22895 # Let's still pretend it is `configure' which instantiates (i.e., don't
22896 # use $as_me), people would be surprised to read:
c0d27fcc
MR
22897 # /* config.h. Generated by config.status. */
22898 if test x"$ac_file" = x-; then
22899 configure_input=
22900 else
22901 configure_input="$ac_file. "
22902 fi
22903 configure_input=$configure_input"Generated from `echo $ac_file_in |
35996d22 22904 sed 's,.*/,,'` by configure."
503d2be0
AS
22905
22906 # First look for the input files in the build tree, otherwise in the
22907 # src tree.
22908 ac_file_inputs=`IFS=:
22909 for f in $ac_file_in; do
22910 case $f in
22911 -) echo $tmp/stdin ;;
22912 [\\/$]*)
35996d22
AS
22913 # Absolute (can't be DOS-style, as IFS=:)
22914 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22915echo "$as_me: error: cannot find input file: $f" >&2;}
22916 { (exit 1); exit 1; }; }
35996d22 22917 echo "$f";;
503d2be0 22918 *) # Relative
35996d22
AS
22919 if test -f "$f"; then
22920 # Build tree
22921 echo "$f"
22922 elif test -f "$srcdir/$f"; then
22923 # Source tree
22924 echo "$srcdir/$f"
22925 else
22926 # /dev/null tree
22927 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22928echo "$as_me: error: cannot find input file: $f" >&2;}
22929 { (exit 1); exit 1; }; }
35996d22 22930 fi;;
503d2be0
AS
22931 esac
22932 done` || { (exit 1); exit 1; }
c0d27fcc
MR
22933_ACEOF
22934cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22935 sed "$ac_vpsub
22936$extrasub
c0d27fcc
MR
22937_ACEOF
22938cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22939:t
22940/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22941s,@configure_input@,$configure_input,;t t
22942s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 22943s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 22944s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
22945s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22946s,@builddir@,$ac_builddir,;t t
22947s,@abs_builddir@,$ac_abs_builddir,;t t
22948s,@top_builddir@,$ac_top_builddir,;t t
22949s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
22950s,@INSTALL@,$ac_INSTALL,;t t
22951" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22952 rm -f $tmp/stdin
22953 if test x"$ac_file" != x-; then
22954 mv $tmp/out $ac_file
22955 else
22956 cat $tmp/out
22957 rm -f $tmp/out
22958 fi
22959
22960done
c0d27fcc
MR
22961_ACEOF
22962cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 22963
503d2be0
AS
22964#
22965# CONFIG_HEADER section.
22966#
ba4481b5
DL
22967
22968# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22969# NAME is the cpp macro being defined and VALUE is the value it is being given.
22970#
22971# ac_d sets the value in "#define NAME VALUE" lines.
35996d22
AS
22972ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22973ac_dB='[ ].*$,\1#\2'
503d2be0
AS
22974ac_dC=' '
22975ac_dD=',;t'
22976# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
35996d22 22977ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
503d2be0 22978ac_uB='$,\1#\2define\3'
ba4481b5 22979ac_uC=' '
503d2be0 22980ac_uD=',;t'
ba4481b5 22981
503d2be0 22982for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 22983 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
22984 case $ac_file in
22985 - | *:- | *:-:* ) # input from stdin
35996d22
AS
22986 cat >$tmp/stdin
22987 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22988 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22989 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
35996d22 22990 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22991 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
22992 esac
22993
c0d27fcc 22994 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
22995echo "$as_me: creating $ac_file" >&6;}
22996
22997 # First look for the input files in the build tree, otherwise in the
22998 # src tree.
22999 ac_file_inputs=`IFS=:
23000 for f in $ac_file_in; do
23001 case $f in
23002 -) echo $tmp/stdin ;;
23003 [\\/$]*)
35996d22
AS
23004 # Absolute (can't be DOS-style, as IFS=:)
23005 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23006echo "$as_me: error: cannot find input file: $f" >&2;}
23007 { (exit 1); exit 1; }; }
35996d22
AS
23008 # Do quote $f, to prevent DOS paths from being IFS'd.
23009 echo "$f";;
503d2be0 23010 *) # Relative
35996d22
AS
23011 if test -f "$f"; then
23012 # Build tree
23013 echo "$f"
23014 elif test -f "$srcdir/$f"; then
23015 # Source tree
23016 echo "$srcdir/$f"
23017 else
23018 # /dev/null tree
23019 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23020echo "$as_me: error: cannot find input file: $f" >&2;}
23021 { (exit 1); exit 1; }; }
35996d22 23022 fi;;
503d2be0
AS
23023 esac
23024 done` || { (exit 1); exit 1; }
23025 # Remove the trailing spaces.
35996d22 23026 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
503d2be0 23027
c0d27fcc 23028_ACEOF
503d2be0
AS
23029
23030# Transform confdefs.h into two sed scripts, `conftest.defines' and
23031# `conftest.undefs', that substitutes the proper values into
23032# config.h.in to produce config.h. The first handles `#define'
23033# templates, and the second `#undef' templates.
23034# And first: Protect against being on the right side of a sed subst in
23035# config.status. Protect against being in an unquoted here document
23036# in config.status.
23037rm -f conftest.defines conftest.undefs
23038# Using a here document instead of a string reduces the quoting nightmare.
23039# Putting comments in sed scripts is not portable.
23040#
23041# `end' is used to avoid that the second main sed command (meant for
23042# 0-ary CPP macros) applies to n-ary macro definitions.
23043# See the Autoconf documentation for `clear'.
c0d27fcc 23044cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
23045s/[\\&,]/\\&/g
23046s,[\\$`],\\&,g
23047t clear
23048: clear
35996d22 23049s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0 23050t end
35996d22 23051s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
503d2be0 23052: end
c0d27fcc 23053_ACEOF
503d2be0
AS
23054# If some macros were called several times there might be several times
23055# the same #defines, which is useless. Nevertheless, we may not want to
23056# sort them, since we want the *last* AC-DEFINE to be honored.
23057uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23058sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23059rm -f confdef2sed.sed
ba4481b5
DL
23060
23061# This sed command replaces #undef with comments. This is necessary, for
23062# example, in the case of _POSIX_SOURCE, which is predefined and required
23063# on some systems where configure will not decide to define it.
c0d27fcc 23064cat >>conftest.undefs <<\_ACEOF
35996d22 23065s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 23066_ACEOF
ba4481b5 23067
503d2be0
AS
23068# Break up conftest.defines because some shells have a limit on the size
23069# of here documents, and old seds have small limits too (100 cmds).
23070echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
35996d22 23071echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
23072echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23073echo ' :' >>$CONFIG_STATUS
23074rm -f conftest.tail
23075while grep . conftest.defines >/dev/null
23076do
23077 # Write a limited-size here document to $tmp/defines.sed.
23078 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23079 # Speed up: don't consider the non `#define' lines.
35996d22 23080 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
503d2be0
AS
23081 # Work around the forget-to-reset-the-flag bug.
23082 echo 't clr' >>$CONFIG_STATUS
23083 echo ': clr' >>$CONFIG_STATUS
23084 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
23085 echo 'CEOF
23086 sed -f $tmp/defines.sed $tmp/in >$tmp/out
23087 rm -f $tmp/in
23088 mv $tmp/out $tmp/in
23089' >>$CONFIG_STATUS
23090 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
23091 rm -f conftest.defines
23092 mv conftest.tail conftest.defines
23093done
23094rm -f conftest.defines
6bae0ccf 23095echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 23096echo >>$CONFIG_STATUS
ba4481b5 23097
503d2be0
AS
23098# Break up conftest.undefs because some shells have a limit on the size
23099# of here documents, and old seds have small limits too (100 cmds).
23100echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 23101rm -f conftest.tail
503d2be0 23102while grep . conftest.undefs >/dev/null
ba4481b5 23103do
503d2be0
AS
23104 # Write a limited-size here document to $tmp/undefs.sed.
23105 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23106 # Speed up: don't consider the non `#undef'
35996d22 23107 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
503d2be0
AS
23108 # Work around the forget-to-reset-the-flag bug.
23109 echo 't clr' >>$CONFIG_STATUS
23110 echo ': clr' >>$CONFIG_STATUS
23111 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 23112 echo 'CEOF
503d2be0
AS
23113 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23114 rm -f $tmp/in
23115 mv $tmp/out $tmp/in
23116' >>$CONFIG_STATUS
23117 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23118 rm -f conftest.undefs
23119 mv conftest.tail conftest.undefs
ba4481b5 23120done
503d2be0
AS
23121rm -f conftest.undefs
23122
c0d27fcc 23123cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23124 # Let's still pretend it is `configure' which instantiates (i.e., don't
23125 # use $as_me), people would be surprised to read:
c0d27fcc 23126 # /* config.h. Generated by config.status. */
503d2be0 23127 if test x"$ac_file" = x-; then
c0d27fcc 23128 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 23129 else
c0d27fcc 23130 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
23131 fi
23132 cat $tmp/in >>$tmp/config.h
23133 rm -f $tmp/in
23134 if test x"$ac_file" != x-; then
19650fd6 23135 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 23136 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
23137echo "$as_me: $ac_file is unchanged" >&6;}
23138 else
c0d27fcc
MR
23139 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23140$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
23141 X"$ac_file" : 'X\(//\)[^/]' \| \
23142 X"$ac_file" : 'X\(//\)$' \| \
23143 X"$ac_file" : 'X\(/\)' \| \
23144 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
23145echo X"$ac_file" |
23146 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23147 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23148 /^X\(\/\/\)$/{ s//\1/; q; }
23149 /^X\(\/\).*/{ s//\1/; q; }
23150 s/.*/./; q'`
6bae0ccf
DL
23151 { if $as_mkdir_p; then
23152 mkdir -p "$ac_dir"
23153 else
23154 as_dir="$ac_dir"
23155 as_dirs=
23156 while test ! -d "$as_dir"; do
23157 as_dirs="$as_dir $as_dirs"
23158 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23159$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
23160 X"$as_dir" : 'X\(//\)[^/]' \| \
23161 X"$as_dir" : 'X\(//\)$' \| \
23162 X"$as_dir" : 'X\(/\)' \| \
23163 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
23164echo X"$as_dir" |
23165 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23166 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23167 /^X\(\/\/\)$/{ s//\1/; q; }
23168 /^X\(\/\).*/{ s//\1/; q; }
23169 s/.*/./; q'`
23170 done
23171 test ! -n "$as_dirs" || mkdir $as_dirs
23172 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23173echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23174 { (exit 1); exit 1; }; }; }
503d2be0 23175
503d2be0
AS
23176 rm -f $ac_file
23177 mv $tmp/config.h $ac_file
ba4481b5 23178 fi
503d2be0
AS
23179 else
23180 cat $tmp/config.h
23181 rm -f $tmp/config.h
ba4481b5 23182 fi
503d2be0 23183done
c0d27fcc
MR
23184_ACEOF
23185cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23186
23187#
23188# CONFIG_COMMANDS section.
23189#
23190for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23191 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23192 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
23193 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
23194$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
23195 X"$ac_dest" : 'X\(//\)[^/]' \| \
23196 X"$ac_dest" : 'X\(//\)$' \| \
23197 X"$ac_dest" : 'X\(/\)' \| \
23198 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
23199echo X"$ac_dest" |
23200 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23201 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23202 /^X\(\/\/\)$/{ s//\1/; q; }
23203 /^X\(\/\).*/{ s//\1/; q; }
23204 s/.*/./; q'`
35996d22
AS
23205 { if $as_mkdir_p; then
23206 mkdir -p "$ac_dir"
23207 else
23208 as_dir="$ac_dir"
23209 as_dirs=
23210 while test ! -d "$as_dir"; do
23211 as_dirs="$as_dir $as_dirs"
23212 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23213$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23214 X"$as_dir" : 'X\(//\)[^/]' \| \
23215 X"$as_dir" : 'X\(//\)$' \| \
23216 X"$as_dir" : 'X\(/\)' \| \
23217 . : '\(.\)' 2>/dev/null ||
23218echo X"$as_dir" |
23219 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23220 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23221 /^X\(\/\/\)$/{ s//\1/; q; }
23222 /^X\(\/\).*/{ s//\1/; q; }
23223 s/.*/./; q'`
23224 done
23225 test ! -n "$as_dirs" || mkdir $as_dirs
23226 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23227echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23228 { (exit 1); exit 1; }; }; }
23229
c0d27fcc
MR
23230 ac_builddir=.
23231
23232if test "$ac_dir" != .; then
23233 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23234 # A "../" for each directory in $ac_dir_suffix.
23235 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23236else
23237 ac_dir_suffix= ac_top_builddir=
23238fi
23239
23240case $srcdir in
23241 .) # No --srcdir option. We are building in place.
23242 ac_srcdir=.
23243 if test -z "$ac_top_builddir"; then
23244 ac_top_srcdir=.
23245 else
23246 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23247 fi ;;
23248 [\\/]* | ?:[\\/]* ) # Absolute path.
23249 ac_srcdir=$srcdir$ac_dir_suffix;
23250 ac_top_srcdir=$srcdir ;;
23251 *) # Relative path.
23252 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23253 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23254esac
35996d22
AS
23255
23256# Do not use `cd foo && pwd` to compute absolute paths, because
23257# the directories may not exist.
23258case `pwd` in
23259.) ac_abs_builddir="$ac_dir";;
23260*)
23261 case "$ac_dir" in
23262 .) ac_abs_builddir=`pwd`;;
23263 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23264 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23265 esac;;
23266esac
23267case $ac_abs_builddir in
23268.) ac_abs_top_builddir=${ac_top_builddir}.;;
23269*)
23270 case ${ac_top_builddir}. in
23271 .) ac_abs_top_builddir=$ac_abs_builddir;;
23272 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23273 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23274 esac;;
23275esac
23276case $ac_abs_builddir in
23277.) ac_abs_srcdir=$ac_srcdir;;
23278*)
23279 case $ac_srcdir in
23280 .) ac_abs_srcdir=$ac_abs_builddir;;
23281 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23282 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23283 esac;;
23284esac
23285case $ac_abs_builddir in
23286.) ac_abs_top_srcdir=$ac_top_srcdir;;
23287*)
23288 case $ac_top_srcdir in
23289 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23290 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23291 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23292 esac;;
23293esac
ba4481b5 23294
c0d27fcc
MR
23295
23296 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
23297echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
23298 case $ac_dest in
23299 default )
ba4481b5
DL
23300
23301### Make the necessary directories, if they don't exist.
23302for dir in etc lisp ; do
23303 test -d ${dir} || mkdir ${dir}
23304done
23305
23306# Build src/Makefile from ${srcdir}/src/Makefile.c
23307# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
23308# This must be done after src/config.h is built, since we rely on that file.
23309
23310# Now get this: Some word that is part of the ${srcdir} directory name
23311# or the ${configuration} value might, just might, happen to be an
23312# identifier like `sun4' or `i386' or something, and be predefined by
23313# the C preprocessor to some helpful value like 1, or maybe the empty
23314# string. Needless to say consequent macro substitutions are less
23315# than conducive to the makefile finding the correct directory.
23316undefs="`echo $top_srcdir $configuration $canonical |
23317sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
23318 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
23319`"
23320
23321echo creating src/epaths.h
4aa6b955 23322${MAKE-make} epaths-force
ba4481b5 23323
1c203d4c
DL
23324# As of 2000-11-19, newest development versions of GNU cpp preprocess
23325# `..' to `. .' unless invoked with -traditional
23326
d0e9bfd2 23327if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
23328 CPPFLAGS="$CPPFLAGS -traditional"
23329fi
23330
ba4481b5
DL
23331echo creating lib-src/Makefile
23332( cd lib-src
23333 rm -f junk.c junk1.c junk2.c
23334 sed -e '/start of cpp stuff/q' \
23335 < Makefile.c > junk1.c
23336 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 23337 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 23338 < Makefile.c > junk.c
503d2be0 23339 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
23340 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
23341 cat junk1.c junk2.c > Makefile.new
23342 rm -f junk.c junk1.c junk2.c
23343 chmod 444 Makefile.new
23344 mv -f Makefile.new Makefile
23345)
23346
23347echo creating src/Makefile
23348( cd src
23349 rm -f junk.c junk1.c junk2.c
23350 sed -e '/start of cpp stuff/q' \
23351 < Makefile.c > junk1.c
23352 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 23353 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 23354 < Makefile.c > junk.c
503d2be0 23355 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
23356 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
23357 cat junk1.c junk2.c > Makefile.new
23358 rm -f junk.c junk1.c junk2.c
23359 chmod 444 Makefile.new
23360 mv -f Makefile.new Makefile
23361)
23362
503d2be0 23363if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 23364 echo creating src/.gdbinit
503d2be0 23365 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
23366fi
23367
23368# This is how we know whether to re-run configure in certain cases.
23369touch src/config.stamp
23370
503d2be0
AS
23371 ;;
23372 esac
23373done
c0d27fcc 23374_ACEOF
503d2be0 23375
c0d27fcc 23376cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 23377
503d2be0 23378{ (exit 0); exit 0; }
c0d27fcc 23379_ACEOF
ba4481b5 23380chmod +x $CONFIG_STATUS
503d2be0
AS
23381ac_clean_files=$ac_clean_files_save
23382
c0d27fcc 23383
503d2be0
AS
23384# configure is writing to config.log, and then calls config.status.
23385# config.status does its own redirection, appending to config.log.
23386# Unfortunately, on DOS this fails, as config.log is still kept open
23387# by configure, so config.status won't be able to write to it; its
23388# output is simply discarded. So we exec the FD to /dev/null,
23389# effectively closing config.log, so it can be properly (re)opened and
23390# appended to by config.status. When coming back to configure, we
23391# need to make the FD available again.
23392if test "$no_create" != yes; then
23393 ac_cs_success=:
19650fd6
AS
23394 ac_config_status_args=
23395 test "$silent" = yes &&
23396 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 23397 exec 5>/dev/null
19650fd6 23398 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
23399 exec 5>>config.log
23400 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23401 # would make configure fail if this is the last instruction.
23402 $ac_cs_success || { (exit 1); exit 1; }
23403fi
f5f47add 23404
c0d27fcc 23405