* configure.in: If $HAVE_GTK_FILE_CHOOSER = yes, check for
[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
4494a266 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); } &&
4494a266
JD
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); } &&
4494a266
JD
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); } &&
4494a266
JD
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); } &&
4494a266
JD
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); } &&
4494a266
JD
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); } &&
4494a266
JD
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); } &&
4494a266
JD
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); } &&
4494a266
JD
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); } &&
4494a266
JD
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); } &&
4494a266
JD
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); } &&
4494a266
JD
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); } &&
4494a266
JD
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); } &&
4494a266
JD
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); } &&
4494a266
JD
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); } &&
4494a266
JD
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); } &&
4494a266
JD
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); } &&
4494a266
JD
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
c0d27fcc 5288
f4988be7 5289
98418dba
CW
5290for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5291 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5292 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
cffcede7 5293 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h
98418dba
CW
5294do
5295as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5296if eval "test \"\${$as_ac_Header+set}\" = set"; then
5297 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5298echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5299if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5300 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5301fi
5302echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5303echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5304else
c0d27fcc
MR
5305 # Is the header compilable?
5306echo "$as_me:$LINENO: checking $ac_header usability" >&5
5307echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5308cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5309/* confdefs.h. */
5310_ACEOF
5311cat confdefs.h >>conftest.$ac_ext
5312cat >>conftest.$ac_ext <<_ACEOF
5313/* end confdefs.h. */
c0d27fcc
MR
5314$ac_includes_default
5315#include <$ac_header>
5316_ACEOF
5317rm -f conftest.$ac_objext
5318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5319 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5320 ac_status=$?
35996d22
AS
5321 grep -v '^ *+' conftest.er1 >conftest.err
5322 rm -f conftest.er1
5323 cat conftest.err >&5
c0d27fcc
MR
5324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5325 (exit $ac_status); } &&
4494a266
JD
5326 { ac_try='test -z "$ac_c_werror_flag"
5327 || test ! -s conftest.err'
35996d22
AS
5328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5329 (eval $ac_try) 2>&5
5330 ac_status=$?
5331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5332 (exit $ac_status); }; } &&
5333 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5335 (eval $ac_try) 2>&5
5336 ac_status=$?
5337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5338 (exit $ac_status); }; }; then
5339 ac_header_compiler=yes
5340else
5341 echo "$as_me: failed program was:" >&5
19650fd6
AS
5342sed 's/^/| /' conftest.$ac_ext >&5
5343
c0d27fcc
MR
5344ac_header_compiler=no
5345fi
35996d22 5346rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5347echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5348echo "${ECHO_T}$ac_header_compiler" >&6
5349
5350# Is the header present?
5351echo "$as_me:$LINENO: checking $ac_header presence" >&5
5352echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5353cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5354/* confdefs.h. */
5355_ACEOF
5356cat confdefs.h >>conftest.$ac_ext
5357cat >>conftest.$ac_ext <<_ACEOF
5358/* end confdefs.h. */
98418dba 5359#include <$ac_header>
503d2be0 5360_ACEOF
c0d27fcc 5361if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5362 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5363 ac_status=$?
6bae0ccf 5364 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5365 rm -f conftest.er1
5366 cat conftest.err >&5
c0d27fcc 5367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5368 (exit $ac_status); } >/dev/null; then
5369 if test -s conftest.err; then
5370 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5371 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5372 else
5373 ac_cpp_err=
5374 fi
5375else
5376 ac_cpp_err=yes
5377fi
5378if test -z "$ac_cpp_err"; then
c0d27fcc 5379 ac_header_preproc=yes
34ec9ebe 5380else
503d2be0 5381 echo "$as_me: failed program was:" >&5
19650fd6
AS
5382sed 's/^/| /' conftest.$ac_ext >&5
5383
c0d27fcc 5384 ac_header_preproc=no
34ec9ebe 5385fi
98418dba 5386rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5387echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5388echo "${ECHO_T}$ac_header_preproc" >&6
5389
5390# So? What about this header?
35996d22
AS
5391case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5392 yes:no: )
c0d27fcc
MR
5393 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5394echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
5395 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5396echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5397 ac_header_preproc=yes
19650fd6 5398 ;;
35996d22 5399 no:yes:* )
c0d27fcc
MR
5400 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5401echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
5402 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5403echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5404 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5405echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5406 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5407echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5408 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5409echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
5410 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5411echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5412 (
5413 cat <<\_ASBOX
35996d22
AS
5414## ------------------------------------------ ##
5415## Report this to the AC_PACKAGE_NAME lists. ##
5416## ------------------------------------------ ##
19650fd6
AS
5417_ASBOX
5418 ) |
5419 sed "s/^/$as_me: WARNING: /" >&2
5420 ;;
c0d27fcc
MR
5421esac
5422echo "$as_me:$LINENO: checking for $ac_header" >&5
5423echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5424if eval "test \"\${$as_ac_Header+set}\" = set"; then
5425 echo $ECHO_N "(cached) $ECHO_C" >&6
5426else
35996d22 5427 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 5428fi
c0d27fcc 5429echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5430echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5431
5432fi
98418dba 5433if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5434 cat >>confdefs.h <<_ACEOF
98418dba 5435#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5436_ACEOF
34ec9ebe 5437
98418dba 5438fi
c0d27fcc 5439
98418dba
CW
5440done
5441
22044edf 5442
f17e308a
JD
5443echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
5444echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6
5445cat >conftest.$ac_ext <<_ACEOF
5446/* confdefs.h. */
5447_ACEOF
5448cat confdefs.h >>conftest.$ac_ext
5449cat >>conftest.$ac_ext <<_ACEOF
5450/* end confdefs.h. */
5451#include <sys/personality.h>
5452int
5453main ()
5454{
5455personality (PER_LINUX32)
5456 ;
5457 return 0;
5458}
5459_ACEOF
5460rm -f conftest.$ac_objext
5461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5462 (eval $ac_compile) 2>conftest.er1
5463 ac_status=$?
5464 grep -v '^ *+' conftest.er1 >conftest.err
5465 rm -f conftest.er1
5466 cat conftest.err >&5
5467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5468 (exit $ac_status); } &&
5469 { ac_try='test -z "$ac_c_werror_flag"
5470 || test ! -s conftest.err'
5471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5472 (eval $ac_try) 2>&5
5473 ac_status=$?
5474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5475 (exit $ac_status); }; } &&
5476 { ac_try='test -s conftest.$ac_objext'
5477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5478 (eval $ac_try) 2>&5
5479 ac_status=$?
5480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5481 (exit $ac_status); }; }; then
5482 emacs_cv_personality_linux32=yes
5483else
5484 echo "$as_me: failed program was:" >&5
5485sed 's/^/| /' conftest.$ac_ext >&5
5486
5487emacs_cv_personality_linux32=no
5488fi
5489rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5490echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
5491echo "${ECHO_T}$emacs_cv_personality_linux32" >&6
5492
5493if test $emacs_cv_personality_linux32 = yes; then
5494
5495cat >>confdefs.h <<\_ACEOF
5496#define HAVE_PERSONALITY_LINUX32 1
5497_ACEOF
5498
5499fi
5500
5501
22044edf
DL
5502for ac_header in term.h
5503do
5504as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5505echo "$as_me:$LINENO: checking for $ac_header" >&5
5506echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5507if eval "test \"\${$as_ac_Header+set}\" = set"; then
5508 echo $ECHO_N "(cached) $ECHO_C" >&6
5509else
5510 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5511/* confdefs.h. */
5512_ACEOF
5513cat confdefs.h >>conftest.$ac_ext
5514cat >>conftest.$ac_ext <<_ACEOF
5515/* end confdefs.h. */
22044edf
DL
5516#include <$ac_header>
5517_ACEOF
5518if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5519 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5520 ac_status=$?
5521 grep -v '^ *+' conftest.er1 >conftest.err
5522 rm -f conftest.er1
5523 cat conftest.err >&5
5524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5525 (exit $ac_status); } >/dev/null; then
5526 if test -s conftest.err; then
5527 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5528 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22044edf
DL
5529 else
5530 ac_cpp_err=
5531 fi
5532else
5533 ac_cpp_err=yes
5534fi
5535if test -z "$ac_cpp_err"; then
5536 eval "$as_ac_Header=yes"
5537else
5538 echo "$as_me: failed program was:" >&5
19650fd6
AS
5539sed 's/^/| /' conftest.$ac_ext >&5
5540
22044edf
DL
5541 eval "$as_ac_Header=no"
5542fi
5543rm -f conftest.err conftest.$ac_ext
5544fi
5545echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5546echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5547if test `eval echo '${'$as_ac_Header'}'` = yes; then
5548 cat >>confdefs.h <<_ACEOF
5549#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5550_ACEOF
5551
5552fi
5553
5554done
5555
c0d27fcc 5556echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
5557echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5558if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 5559 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5560else
503d2be0 5561 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5562/* confdefs.h. */
5563_ACEOF
5564cat confdefs.h >>conftest.$ac_ext
5565cat >>conftest.$ac_ext <<_ACEOF
5566/* end confdefs.h. */
98418dba
CW
5567#include <stdlib.h>
5568#include <stdarg.h>
5569#include <string.h>
5570#include <float.h>
5571
19650fd6
AS
5572int
5573main ()
5574{
5575
5576 ;
5577 return 0;
5578}
98418dba 5579_ACEOF
19650fd6
AS
5580rm -f conftest.$ac_objext
5581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5582 (eval $ac_compile) 2>conftest.er1
cd958eb3 5583 ac_status=$?
35996d22
AS
5584 grep -v '^ *+' conftest.er1 >conftest.err
5585 rm -f conftest.er1
5586 cat conftest.err >&5
cd958eb3 5587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 5588 (exit $ac_status); } &&
4494a266
JD
5589 { ac_try='test -z "$ac_c_werror_flag"
5590 || test ! -s conftest.err'
35996d22
AS
5591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5592 (eval $ac_try) 2>&5
5593 ac_status=$?
5594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5595 (exit $ac_status); }; } &&
5596 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
5597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5598 (eval $ac_try) 2>&5
5599 ac_status=$?
5600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5601 (exit $ac_status); }; }; then
98418dba 5602 ac_cv_header_stdc=yes
ba4481b5 5603else
503d2be0 5604 echo "$as_me: failed program was:" >&5
19650fd6
AS
5605sed 's/^/| /' conftest.$ac_ext >&5
5606
5607ac_cv_header_stdc=no
ba4481b5 5608fi
35996d22 5609rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
5610
5611if test $ac_cv_header_stdc = yes; then
5612 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5613 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5614/* confdefs.h. */
5615_ACEOF
5616cat confdefs.h >>conftest.$ac_ext
5617cat >>conftest.$ac_ext <<_ACEOF
5618/* end confdefs.h. */
98418dba
CW
5619#include <string.h>
5620
5621_ACEOF
5622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5623 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
5624 :
5625else
5626 ac_cv_header_stdc=no
ba4481b5 5627fi
98418dba 5628rm -f conftest*
ba4481b5
DL
5629
5630fi
5631
98418dba
CW
5632if test $ac_cv_header_stdc = yes; then
5633 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5634 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5635/* confdefs.h. */
5636_ACEOF
5637cat confdefs.h >>conftest.$ac_ext
5638cat >>conftest.$ac_ext <<_ACEOF
5639/* end confdefs.h. */
98418dba
CW
5640#include <stdlib.h>
5641
5642_ACEOF
5643if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5644 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
5645 :
5646else
5647 ac_cv_header_stdc=no
5648fi
5649rm -f conftest*
5650
5651fi
5652
5653if test $ac_cv_header_stdc = yes; then
5654 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5655 if test "$cross_compiling" = yes; then
5656 :
d42122a3 5657else
503d2be0 5658 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5659/* confdefs.h. */
5660_ACEOF
5661cat confdefs.h >>conftest.$ac_ext
5662cat >>conftest.$ac_ext <<_ACEOF
5663/* end confdefs.h. */
98418dba
CW
5664#include <ctype.h>
5665#if ((' ' & 0x0FF) == 0x020)
5666# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5667# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5668#else
19650fd6 5669# define ISLOWER(c) \
35996d22
AS
5670 (('a' <= (c) && (c) <= 'i') \
5671 || ('j' <= (c) && (c) <= 'r') \
5672 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
5673# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5674#endif
5675
5676#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
5677int
5678main ()
5679{
98418dba
CW
5680 int i;
5681 for (i = 0; i < 256; i++)
5682 if (XOR (islower (i), ISLOWER (i))
35996d22 5683 || toupper (i) != TOUPPER (i))
98418dba
CW
5684 exit(2);
5685 exit (0);
503d2be0
AS
5686}
5687_ACEOF
98418dba 5688rm -f conftest$ac_exeext
c0d27fcc 5689if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 5690 (eval $ac_link) 2>&5
503d2be0 5691 ac_status=$?
c0d27fcc 5692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 5693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 5694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5695 (eval $ac_try) 2>&5
5696 ac_status=$?
c0d27fcc 5697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5698 (exit $ac_status); }; }; then
98418dba 5699 :
d42122a3 5700else
98418dba
CW
5701 echo "$as_me: program exited with status $ac_status" >&5
5702echo "$as_me: failed program was:" >&5
19650fd6
AS
5703sed 's/^/| /' conftest.$ac_ext >&5
5704
c0d27fcc 5705( exit $ac_status )
98418dba 5706ac_cv_header_stdc=no
d42122a3 5707fi
35996d22 5708rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 5709fi
98418dba
CW
5710fi
5711fi
c0d27fcc 5712echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
98418dba
CW
5713echo "${ECHO_T}$ac_cv_header_stdc" >&6
5714if test $ac_cv_header_stdc = yes; then
5715
c0d27fcc 5716cat >>confdefs.h <<\_ACEOF
98418dba 5717#define STDC_HEADERS 1
c0d27fcc 5718_ACEOF
d42122a3
DL
5719
5720fi
5721
c0d27fcc 5722echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
5723echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5724if test "${ac_cv_header_time+set}" = set; then
503d2be0 5725 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5726else
503d2be0 5727 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5728/* confdefs.h. */
5729_ACEOF
5730cat confdefs.h >>conftest.$ac_ext
5731cat >>conftest.$ac_ext <<_ACEOF
5732/* end confdefs.h. */
ba4481b5 5733#include <sys/types.h>
98418dba 5734#include <sys/time.h>
ba4481b5 5735#include <time.h>
503d2be0
AS
5736
5737int
5738main ()
5739{
98418dba
CW
5740if ((struct tm *) 0)
5741return 0;
503d2be0
AS
5742 ;
5743 return 0;
5744}
5745_ACEOF
5746rm -f conftest.$ac_objext
c0d27fcc 5747if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5748 (eval $ac_compile) 2>conftest.er1
503d2be0 5749 ac_status=$?
35996d22
AS
5750 grep -v '^ *+' conftest.er1 >conftest.err
5751 rm -f conftest.er1
5752 cat conftest.err >&5
c0d27fcc 5753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5754 (exit $ac_status); } &&
4494a266
JD
5755 { ac_try='test -z "$ac_c_werror_flag"
5756 || test ! -s conftest.err'
35996d22
AS
5757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5758 (eval $ac_try) 2>&5
5759 ac_status=$?
5760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5761 (exit $ac_status); }; } &&
5762 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5764 (eval $ac_try) 2>&5
5765 ac_status=$?
c0d27fcc 5766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5767 (exit $ac_status); }; }; then
98418dba 5768 ac_cv_header_time=yes
ba4481b5 5769else
503d2be0 5770 echo "$as_me: failed program was:" >&5
19650fd6
AS
5771sed 's/^/| /' conftest.$ac_ext >&5
5772
98418dba 5773ac_cv_header_time=no
ba4481b5 5774fi
35996d22 5775rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 5776fi
c0d27fcc 5777echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
5778echo "${ECHO_T}$ac_cv_header_time" >&6
5779if test $ac_cv_header_time = yes; then
503d2be0 5780
c0d27fcc 5781cat >>confdefs.h <<\_ACEOF
98418dba 5782#define TIME_WITH_SYS_TIME 1
c0d27fcc 5783_ACEOF
ba4481b5
DL
5784
5785fi
5786
cd958eb3
MB
5787echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
5788echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
5789if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 5790 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5791else
503d2be0 5792 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5793/* confdefs.h. */
5794_ACEOF
5795cat confdefs.h >>conftest.$ac_ext
5796cat >>conftest.$ac_ext <<_ACEOF
5797/* end confdefs.h. */
cd958eb3
MB
5798$ac_includes_default
5799int
5800main ()
5801{
5802#ifndef sys_siglist
5803 char *p = (char *) sys_siglist;
98418dba 5804#endif
503d2be0 5805
cd958eb3
MB
5806 ;
5807 return 0;
5808}
5809_ACEOF
5810rm -f conftest.$ac_objext
5811if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5812 (eval $ac_compile) 2>conftest.er1
cd958eb3 5813 ac_status=$?
35996d22
AS
5814 grep -v '^ *+' conftest.er1 >conftest.err
5815 rm -f conftest.er1
5816 cat conftest.err >&5
cd958eb3
MB
5817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5818 (exit $ac_status); } &&
4494a266
JD
5819 { ac_try='test -z "$ac_c_werror_flag"
5820 || test ! -s conftest.err'
35996d22
AS
5821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5822 (eval $ac_try) 2>&5
5823 ac_status=$?
5824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5825 (exit $ac_status); }; } &&
5826 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
5827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5828 (eval $ac_try) 2>&5
5829 ac_status=$?
5830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5831 (exit $ac_status); }; }; then
5832 ac_cv_have_decl_sys_siglist=yes
5833else
5834 echo "$as_me: failed program was:" >&5
19650fd6
AS
5835sed 's/^/| /' conftest.$ac_ext >&5
5836
cd958eb3
MB
5837ac_cv_have_decl_sys_siglist=no
5838fi
35996d22 5839rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
5840fi
5841echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
5842echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
5843if test $ac_cv_have_decl_sys_siglist = yes; then
5844
5845cat >>confdefs.h <<_ACEOF
5846#define HAVE_DECL_SYS_SIGLIST 1
5847_ACEOF
5848
5849
5850else
5851 cat >>confdefs.h <<_ACEOF
5852#define HAVE_DECL_SYS_SIGLIST 0
5853_ACEOF
5854
5855
5856fi
5857
5858
5859if test $ac_cv_have_decl_sys_siglist != yes; then
5860 # For Tru64, at least:
5861 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
5862echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
5863if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
5864 echo $ECHO_N "(cached) $ECHO_C" >&6
5865else
5866 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5867/* confdefs.h. */
5868_ACEOF
5869cat confdefs.h >>conftest.$ac_ext
5870cat >>conftest.$ac_ext <<_ACEOF
5871/* end confdefs.h. */
cd958eb3 5872$ac_includes_default
503d2be0
AS
5873int
5874main ()
5875{
cd958eb3
MB
5876#ifndef __sys_siglist
5877 char *p = (char *) __sys_siglist;
5878#endif
5879
503d2be0
AS
5880 ;
5881 return 0;
5882}
5883_ACEOF
5884rm -f conftest.$ac_objext
c0d27fcc 5885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5886 (eval $ac_compile) 2>conftest.er1
503d2be0 5887 ac_status=$?
35996d22
AS
5888 grep -v '^ *+' conftest.er1 >conftest.err
5889 rm -f conftest.er1
5890 cat conftest.err >&5
c0d27fcc 5891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5892 (exit $ac_status); } &&
4494a266
JD
5893 { ac_try='test -z "$ac_c_werror_flag"
5894 || test ! -s conftest.err'
35996d22
AS
5895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5896 (eval $ac_try) 2>&5
5897 ac_status=$?
5898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5899 (exit $ac_status); }; } &&
5900 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5902 (eval $ac_try) 2>&5
5903 ac_status=$?
c0d27fcc 5904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5905 (exit $ac_status); }; }; then
cd958eb3 5906 ac_cv_have_decl___sys_siglist=yes
ba4481b5 5907else
503d2be0 5908 echo "$as_me: failed program was:" >&5
19650fd6
AS
5909sed 's/^/| /' conftest.$ac_ext >&5
5910
cd958eb3 5911ac_cv_have_decl___sys_siglist=no
ba4481b5 5912fi
35996d22 5913rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5914fi
cd958eb3
MB
5915echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
5916echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6
5917if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 5918
cd958eb3
MB
5919cat >>confdefs.h <<_ACEOF
5920#define HAVE_DECL___SYS_SIGLIST 1
5921_ACEOF
5922
5923
5924else
5925 cat >>confdefs.h <<_ACEOF
5926#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 5927_ACEOF
503d2be0 5928
cd958eb3 5929
ba4481b5
DL
5930fi
5931
cd958eb3
MB
5932
5933 if test $ac_cv_have_decl___sys_siglist = yes; then
5934
5935cat >>confdefs.h <<\_ACEOF
5936#define sys_siglist __sys_siglist
5937_ACEOF
5938
5939 fi
5940fi
c0d27fcc 5941echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
5942echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
5943if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 5944 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5945else
503d2be0 5946 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5947/* confdefs.h. */
5948_ACEOF
5949cat confdefs.h >>conftest.$ac_ext
5950cat >>conftest.$ac_ext <<_ACEOF
5951/* end confdefs.h. */
98418dba
CW
5952#include <sys/types.h>
5953#include <sys/wait.h>
5954#ifndef WEXITSTATUS
5955# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5956#endif
5957#ifndef WIFEXITED
5958# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 5959#endif
503d2be0
AS
5960
5961int
5962main ()
5963{
98418dba
CW
5964 int s;
5965 wait (&s);
5966 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
5967 ;
5968 return 0;
5969}
5970_ACEOF
98418dba 5971rm -f conftest.$ac_objext
c0d27fcc 5972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5973 (eval $ac_compile) 2>conftest.er1
503d2be0 5974 ac_status=$?
35996d22
AS
5975 grep -v '^ *+' conftest.er1 >conftest.err
5976 rm -f conftest.er1
5977 cat conftest.err >&5
c0d27fcc 5978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5979 (exit $ac_status); } &&
4494a266
JD
5980 { ac_try='test -z "$ac_c_werror_flag"
5981 || test ! -s conftest.err'
35996d22
AS
5982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5983 (eval $ac_try) 2>&5
5984 ac_status=$?
5985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5986 (exit $ac_status); }; } &&
5987 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5989 (eval $ac_try) 2>&5
5990 ac_status=$?
c0d27fcc 5991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5992 (exit $ac_status); }; }; then
98418dba 5993 ac_cv_header_sys_wait_h=yes
ba4481b5 5994else
503d2be0 5995 echo "$as_me: failed program was:" >&5
19650fd6
AS
5996sed 's/^/| /' conftest.$ac_ext >&5
5997
98418dba 5998ac_cv_header_sys_wait_h=no
ba4481b5 5999fi
35996d22 6000rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6001fi
c0d27fcc 6002echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
6003echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
6004if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 6005
c0d27fcc 6006cat >>confdefs.h <<\_ACEOF
98418dba 6007#define HAVE_SYS_WAIT_H 1
c0d27fcc 6008_ACEOF
ba4481b5 6009
ba4481b5
DL
6010fi
6011
c0d27fcc
MR
6012
6013echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
6014echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
6015if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 6016 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 6017else
503d2be0 6018 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6019/* confdefs.h. */
6020_ACEOF
6021cat confdefs.h >>conftest.$ac_ext
6022cat >>conftest.$ac_ext <<_ACEOF
6023/* end confdefs.h. */
98418dba
CW
6024#ifdef TIME_WITH_SYS_TIME
6025#include <sys/time.h>
6026#include <time.h>
6027#else
6028#ifdef HAVE_SYS_TIME_H
6029#include <sys/time.h>
6030#else
1113b624 6031#include <time.h>
98418dba
CW
6032#endif
6033#endif
6034#ifdef HAVE_UTIME_H
6035#include <utime.h>
6036#endif
503d2be0
AS
6037int
6038main ()
6039{
98418dba 6040static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
6041 ;
6042 return 0;
6043}
6044_ACEOF
98418dba 6045rm -f conftest.$ac_objext
c0d27fcc 6046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6047 (eval $ac_compile) 2>conftest.er1
503d2be0 6048 ac_status=$?
35996d22
AS
6049 grep -v '^ *+' conftest.er1 >conftest.err
6050 rm -f conftest.er1
6051 cat conftest.err >&5
c0d27fcc 6052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6053 (exit $ac_status); } &&
4494a266
JD
6054 { ac_try='test -z "$ac_c_werror_flag"
6055 || test ! -s conftest.err'
35996d22
AS
6056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6057 (eval $ac_try) 2>&5
6058 ac_status=$?
6059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6060 (exit $ac_status); }; } &&
6061 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6063 (eval $ac_try) 2>&5
6064 ac_status=$?
c0d27fcc 6065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6066 (exit $ac_status); }; }; then
98418dba 6067 emacs_cv_struct_utimbuf=yes
1113b624 6068else
503d2be0 6069 echo "$as_me: failed program was:" >&5
19650fd6
AS
6070sed 's/^/| /' conftest.$ac_ext >&5
6071
98418dba 6072emacs_cv_struct_utimbuf=no
1113b624 6073fi
35996d22 6074rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 6075fi
c0d27fcc 6076echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
6077echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
6078if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 6079
c0d27fcc 6080cat >>confdefs.h <<\_ACEOF
98418dba 6081#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 6082_ACEOF
1113b624
PE
6083
6084fi
ba4481b5 6085
c0d27fcc 6086echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
6087echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6088if test "${ac_cv_type_signal+set}" = set; then
503d2be0 6089 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6090else
98418dba 6091 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6092/* confdefs.h. */
6093_ACEOF
6094cat confdefs.h >>conftest.$ac_ext
6095cat >>conftest.$ac_ext <<_ACEOF
6096/* end confdefs.h. */
7397acc4 6097#include <sys/types.h>
98418dba
CW
6098#include <signal.h>
6099#ifdef signal
6100# undef signal
6101#endif
6102#ifdef __cplusplus
6103extern "C" void (*signal (int, void (*)(int)))(int);
6104#else
6105void (*signal ()) ();
6106#endif
6107
503d2be0
AS
6108int
6109main ()
6110{
98418dba 6111int i;
503d2be0
AS
6112 ;
6113 return 0;
6114}
6115_ACEOF
98418dba 6116rm -f conftest.$ac_objext
c0d27fcc 6117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6118 (eval $ac_compile) 2>conftest.er1
503d2be0 6119 ac_status=$?
35996d22
AS
6120 grep -v '^ *+' conftest.er1 >conftest.err
6121 rm -f conftest.er1
6122 cat conftest.err >&5
c0d27fcc 6123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6124 (exit $ac_status); } &&
4494a266
JD
6125 { ac_try='test -z "$ac_c_werror_flag"
6126 || test ! -s conftest.err'
35996d22
AS
6127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6128 (eval $ac_try) 2>&5
6129 ac_status=$?
6130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6131 (exit $ac_status); }; } &&
6132 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6134 (eval $ac_try) 2>&5
6135 ac_status=$?
c0d27fcc 6136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6137 (exit $ac_status); }; }; then
98418dba 6138 ac_cv_type_signal=void
503d2be0
AS
6139else
6140 echo "$as_me: failed program was:" >&5
19650fd6
AS
6141sed 's/^/| /' conftest.$ac_ext >&5
6142
98418dba 6143ac_cv_type_signal=int
503d2be0 6144fi
35996d22 6145rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6146fi
c0d27fcc 6147echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 6148echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 6149
c0d27fcc 6150cat >>confdefs.h <<_ACEOF
98418dba 6151#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
6152_ACEOF
6153
503d2be0 6154
c0d27fcc
MR
6155
6156echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
6157echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
6158if test "${emacs_cv_speed_t+set}" = set; then
6159 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6160else
98418dba 6161 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6162/* confdefs.h. */
6163_ACEOF
6164cat confdefs.h >>conftest.$ac_ext
6165cat >>conftest.$ac_ext <<_ACEOF
6166/* end confdefs.h. */
98418dba 6167#include <termios.h>
98418dba
CW
6168int
6169main ()
6170{
6171speed_t x = 1;
6172 ;
6173 return 0;
6174}
6175_ACEOF
6176rm -f conftest.$ac_objext
c0d27fcc 6177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6178 (eval $ac_compile) 2>conftest.er1
98418dba 6179 ac_status=$?
35996d22
AS
6180 grep -v '^ *+' conftest.er1 >conftest.err
6181 rm -f conftest.er1
6182 cat conftest.err >&5
c0d27fcc 6183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6184 (exit $ac_status); } &&
4494a266
JD
6185 { ac_try='test -z "$ac_c_werror_flag"
6186 || test ! -s conftest.err'
35996d22
AS
6187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6188 (eval $ac_try) 2>&5
6189 ac_status=$?
6190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6191 (exit $ac_status); }; } &&
6192 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6194 (eval $ac_try) 2>&5
6195 ac_status=$?
c0d27fcc 6196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6197 (exit $ac_status); }; }; then
6198 emacs_cv_speed_t=yes
6199else
6200 echo "$as_me: failed program was:" >&5
19650fd6
AS
6201sed 's/^/| /' conftest.$ac_ext >&5
6202
98418dba
CW
6203emacs_cv_speed_t=no
6204fi
35996d22 6205rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 6206fi
c0d27fcc 6207echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
6208echo "${ECHO_T}$emacs_cv_speed_t" >&6
6209if test $emacs_cv_speed_t = yes; then
b936fae4 6210
c0d27fcc 6211cat >>confdefs.h <<\_ACEOF
98418dba 6212#define HAVE_SPEED_T 1
c0d27fcc 6213_ACEOF
98418dba 6214
7397acc4
DL
6215fi
6216
c0d27fcc 6217echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
6218echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
6219if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 6220 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6221else
503d2be0 6222 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6223/* confdefs.h. */
6224_ACEOF
6225cat confdefs.h >>conftest.$ac_ext
6226cat >>conftest.$ac_ext <<_ACEOF
6227/* end confdefs.h. */
98418dba
CW
6228#ifdef TIME_WITH_SYS_TIME
6229#include <sys/time.h>
6230#include <time.h>
6231#else
6232#ifdef HAVE_SYS_TIME_H
6233#include <sys/time.h>
6234#else
6235#include <time.h>
6236#endif
6237#endif
503d2be0
AS
6238int
6239main ()
6240{
98418dba 6241static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
6242 ;
6243 return 0;
6244}
6245_ACEOF
6246rm -f conftest.$ac_objext
c0d27fcc 6247if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6248 (eval $ac_compile) 2>conftest.er1
503d2be0 6249 ac_status=$?
35996d22
AS
6250 grep -v '^ *+' conftest.er1 >conftest.err
6251 rm -f conftest.er1
6252 cat conftest.err >&5
c0d27fcc 6253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6254 (exit $ac_status); } &&
4494a266
JD
6255 { ac_try='test -z "$ac_c_werror_flag"
6256 || test ! -s conftest.err'
35996d22
AS
6257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6258 (eval $ac_try) 2>&5
6259 ac_status=$?
6260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6261 (exit $ac_status); }; } &&
6262 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6264 (eval $ac_try) 2>&5
6265 ac_status=$?
c0d27fcc 6266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6267 (exit $ac_status); }; }; then
98418dba 6268 emacs_cv_struct_timeval=yes
7397acc4 6269else
503d2be0 6270 echo "$as_me: failed program was:" >&5
19650fd6
AS
6271sed 's/^/| /' conftest.$ac_ext >&5
6272
98418dba 6273emacs_cv_struct_timeval=no
7397acc4 6274fi
35996d22 6275rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6276fi
c0d27fcc 6277echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
6278echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
6279HAVE_TIMEVAL=$emacs_cv_struct_timeval
6280if test $emacs_cv_struct_timeval = yes; then
b936fae4 6281
c0d27fcc 6282cat >>confdefs.h <<\_ACEOF
98418dba 6283#define HAVE_TIMEVAL 1
c0d27fcc 6284_ACEOF
7397acc4
DL
6285
6286fi
6287
c0d27fcc 6288echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
6289echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
6290if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 6291 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6292else
503d2be0 6293 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6294/* confdefs.h. */
6295_ACEOF
6296cat confdefs.h >>conftest.$ac_ext
6297cat >>conftest.$ac_ext <<_ACEOF
6298/* end confdefs.h. */
98418dba 6299#include <math.h>
503d2be0
AS
6300int
6301main ()
6302{
98418dba 6303static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
6304 ;
6305 return 0;
ba4481b5 6306}
503d2be0
AS
6307_ACEOF
6308rm -f conftest.$ac_objext
c0d27fcc 6309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6310 (eval $ac_compile) 2>conftest.er1
503d2be0 6311 ac_status=$?
35996d22
AS
6312 grep -v '^ *+' conftest.er1 >conftest.err
6313 rm -f conftest.er1
6314 cat conftest.err >&5
c0d27fcc 6315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6316 (exit $ac_status); } &&
4494a266
JD
6317 { ac_try='test -z "$ac_c_werror_flag"
6318 || test ! -s conftest.err'
35996d22
AS
6319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6320 (eval $ac_try) 2>&5
6321 ac_status=$?
6322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6323 (exit $ac_status); }; } &&
6324 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6326 (eval $ac_try) 2>&5
6327 ac_status=$?
c0d27fcc 6328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6329 (exit $ac_status); }; }; then
98418dba 6330 emacs_cv_struct_exception=yes
ba4481b5 6331else
503d2be0 6332 echo "$as_me: failed program was:" >&5
19650fd6
AS
6333sed 's/^/| /' conftest.$ac_ext >&5
6334
98418dba 6335emacs_cv_struct_exception=no
ba4481b5 6336fi
35996d22 6337rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6338fi
c0d27fcc 6339echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
6340echo "${ECHO_T}$emacs_cv_struct_exception" >&6
6341HAVE_EXCEPTION=$emacs_cv_struct_exception
6342if test $emacs_cv_struct_exception != yes; then
b936fae4 6343
c0d27fcc 6344cat >>confdefs.h <<\_ACEOF
98418dba 6345#define NO_MATHERR 1
c0d27fcc 6346_ACEOF
ba4481b5
DL
6347
6348fi
6349
7862d3a8
AS
6350
6351for ac_header in sys/socket.h
6352do
6353as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6354if eval "test \"\${$as_ac_Header+set}\" = set"; then
6355 echo "$as_me:$LINENO: checking for $ac_header" >&5
6356echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6357if eval "test \"\${$as_ac_Header+set}\" = set"; then
6358 echo $ECHO_N "(cached) $ECHO_C" >&6
6359fi
6360echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6361echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6362else
6363 # Is the header compilable?
6364echo "$as_me:$LINENO: checking $ac_header usability" >&5
6365echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6366cat >conftest.$ac_ext <<_ACEOF
6367/* confdefs.h. */
6368_ACEOF
6369cat confdefs.h >>conftest.$ac_ext
6370cat >>conftest.$ac_ext <<_ACEOF
6371/* end confdefs.h. */
6372$ac_includes_default
6373#include <$ac_header>
6374_ACEOF
6375rm -f conftest.$ac_objext
6376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6377 (eval $ac_compile) 2>conftest.er1
6378 ac_status=$?
6379 grep -v '^ *+' conftest.er1 >conftest.err
6380 rm -f conftest.er1
6381 cat conftest.err >&5
6382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6383 (exit $ac_status); } &&
4494a266
JD
6384 { ac_try='test -z "$ac_c_werror_flag"
6385 || test ! -s conftest.err'
7862d3a8
AS
6386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6387 (eval $ac_try) 2>&5
6388 ac_status=$?
6389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6390 (exit $ac_status); }; } &&
6391 { ac_try='test -s conftest.$ac_objext'
6392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6393 (eval $ac_try) 2>&5
6394 ac_status=$?
6395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6396 (exit $ac_status); }; }; then
6397 ac_header_compiler=yes
6398else
6399 echo "$as_me: failed program was:" >&5
6400sed 's/^/| /' conftest.$ac_ext >&5
6401
6402ac_header_compiler=no
6403fi
6404rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6405echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6406echo "${ECHO_T}$ac_header_compiler" >&6
6407
6408# Is the header present?
6409echo "$as_me:$LINENO: checking $ac_header presence" >&5
6410echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6411cat >conftest.$ac_ext <<_ACEOF
6412/* confdefs.h. */
6413_ACEOF
6414cat confdefs.h >>conftest.$ac_ext
6415cat >>conftest.$ac_ext <<_ACEOF
6416/* end confdefs.h. */
6417#include <$ac_header>
6418_ACEOF
6419if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6420 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6421 ac_status=$?
6422 grep -v '^ *+' conftest.er1 >conftest.err
6423 rm -f conftest.er1
6424 cat conftest.err >&5
6425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6426 (exit $ac_status); } >/dev/null; then
6427 if test -s conftest.err; then
6428 ac_cpp_err=$ac_c_preproc_warn_flag
6429 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6430 else
6431 ac_cpp_err=
6432 fi
6433else
6434 ac_cpp_err=yes
6435fi
6436if test -z "$ac_cpp_err"; then
6437 ac_header_preproc=yes
6438else
6439 echo "$as_me: failed program was:" >&5
6440sed 's/^/| /' conftest.$ac_ext >&5
6441
6442 ac_header_preproc=no
6443fi
6444rm -f conftest.err conftest.$ac_ext
6445echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6446echo "${ECHO_T}$ac_header_preproc" >&6
6447
6448# So? What about this header?
6449case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6450 yes:no: )
6451 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6452echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6453 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6454echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6455 ac_header_preproc=yes
6456 ;;
6457 no:yes:* )
6458 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6459echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6460 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6461echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6462 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6463echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6464 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6465echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6466 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6467echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6468 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6469echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6470 (
6471 cat <<\_ASBOX
6472## ------------------------------------------ ##
6473## Report this to the AC_PACKAGE_NAME lists. ##
6474## ------------------------------------------ ##
6475_ASBOX
6476 ) |
6477 sed "s/^/$as_me: WARNING: /" >&2
6478 ;;
6479esac
6480echo "$as_me:$LINENO: checking for $ac_header" >&5
6481echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6482if eval "test \"\${$as_ac_Header+set}\" = set"; then
6483 echo $ECHO_N "(cached) $ECHO_C" >&6
6484else
6485 eval "$as_ac_Header=\$ac_header_preproc"
6486fi
6487echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6488echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6489
6490fi
6491if test `eval echo '${'$as_ac_Header'}'` = yes; then
6492 cat >>confdefs.h <<_ACEOF
6493#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6494_ACEOF
6495
6496fi
6497
6498done
6499
6500
6501for ac_header in net/if.h
6502do
6503as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6504echo "$as_me:$LINENO: checking for $ac_header" >&5
6505echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6506if eval "test \"\${$as_ac_Header+set}\" = set"; then
6507 echo $ECHO_N "(cached) $ECHO_C" >&6
6508else
6509 cat >conftest.$ac_ext <<_ACEOF
6510/* confdefs.h. */
6511_ACEOF
6512cat confdefs.h >>conftest.$ac_ext
6513cat >>conftest.$ac_ext <<_ACEOF
6514/* end confdefs.h. */
6515$ac_includes_default
6516#if HAVE_SYS_SOCKET_H
6517#include <sys/socket.h>
6518#endif
6519
6520#include <$ac_header>
6521_ACEOF
6522rm -f conftest.$ac_objext
6523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6524 (eval $ac_compile) 2>conftest.er1
6525 ac_status=$?
6526 grep -v '^ *+' conftest.er1 >conftest.err
6527 rm -f conftest.er1
6528 cat conftest.err >&5
6529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6530 (exit $ac_status); } &&
4494a266
JD
6531 { ac_try='test -z "$ac_c_werror_flag"
6532 || test ! -s conftest.err'
7862d3a8
AS
6533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6534 (eval $ac_try) 2>&5
6535 ac_status=$?
6536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6537 (exit $ac_status); }; } &&
6538 { ac_try='test -s conftest.$ac_objext'
6539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6540 (eval $ac_try) 2>&5
6541 ac_status=$?
6542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6543 (exit $ac_status); }; }; then
6544 eval "$as_ac_Header=yes"
6545else
6546 echo "$as_me: failed program was:" >&5
6547sed 's/^/| /' conftest.$ac_ext >&5
6548
6549eval "$as_ac_Header=no"
6550fi
6551rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6552fi
6553echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6554echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6555if test `eval echo '${'$as_ac_Header'}'` = yes; then
6556 cat >>confdefs.h <<_ACEOF
6557#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6558_ACEOF
6559
6560fi
6561
6562done
6563
6564
c0d27fcc 6565echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
6566echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
6567if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 6568 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6569else
503d2be0 6570 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6571/* confdefs.h. */
6572_ACEOF
6573cat confdefs.h >>conftest.$ac_ext
6574cat >>conftest.$ac_ext <<_ACEOF
6575/* end confdefs.h. */
98418dba
CW
6576#include <sys/types.h>
6577#include <time.h>
7397acc4 6578
503d2be0
AS
6579int
6580main ()
6581{
98418dba 6582struct tm *tp; tp->tm_sec;
503d2be0
AS
6583 ;
6584 return 0;
6585}
6586_ACEOF
6587rm -f conftest.$ac_objext
c0d27fcc 6588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6589 (eval $ac_compile) 2>conftest.er1
503d2be0 6590 ac_status=$?
35996d22
AS
6591 grep -v '^ *+' conftest.er1 >conftest.err
6592 rm -f conftest.er1
6593 cat conftest.err >&5
c0d27fcc 6594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6595 (exit $ac_status); } &&
4494a266
JD
6596 { ac_try='test -z "$ac_c_werror_flag"
6597 || test ! -s conftest.err'
c0d27fcc 6598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6599 (eval $ac_try) 2>&5
6600 ac_status=$?
c0d27fcc 6601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
6602 (exit $ac_status); }; } &&
6603 { ac_try='test -s conftest.$ac_objext'
6604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6605 (eval $ac_try) 2>&5
6606 ac_status=$?
6607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6608 (exit $ac_status); }; }; then
6609 ac_cv_struct_tm=time.h
6610else
503d2be0 6611 echo "$as_me: failed program was:" >&5
19650fd6
AS
6612sed 's/^/| /' conftest.$ac_ext >&5
6613
98418dba 6614ac_cv_struct_tm=sys/time.h
7397acc4 6615fi
35996d22 6616rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6617fi
c0d27fcc 6618echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
6619echo "${ECHO_T}$ac_cv_struct_tm" >&6
6620if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 6621
c0d27fcc 6622cat >>confdefs.h <<\_ACEOF
98418dba 6623#define TM_IN_SYS_TIME 1
c0d27fcc 6624_ACEOF
7397acc4
DL
6625
6626fi
ba4481b5 6627
c0d27fcc 6628echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
6629echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
6630if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 6631 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6632else
98418dba 6633 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6634/* confdefs.h. */
6635_ACEOF
6636cat confdefs.h >>conftest.$ac_ext
6637cat >>conftest.$ac_ext <<_ACEOF
6638/* end confdefs.h. */
98418dba
CW
6639#include <sys/types.h>
6640#include <$ac_cv_struct_tm>
ba4481b5 6641
c0d27fcc 6642
98418dba
CW
6643int
6644main ()
6645{
6646static struct tm ac_aggr;
6647if (ac_aggr.tm_zone)
6648return 0;
6649 ;
6650 return 0;
6651}
6652_ACEOF
6653rm -f conftest.$ac_objext
c0d27fcc 6654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6655 (eval $ac_compile) 2>conftest.er1
98418dba 6656 ac_status=$?
35996d22
AS
6657 grep -v '^ *+' conftest.er1 >conftest.err
6658 rm -f conftest.er1
6659 cat conftest.err >&5
c0d27fcc 6660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6661 (exit $ac_status); } &&
4494a266
JD
6662 { ac_try='test -z "$ac_c_werror_flag"
6663 || test ! -s conftest.err'
35996d22
AS
6664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6665 (eval $ac_try) 2>&5
6666 ac_status=$?
6667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6668 (exit $ac_status); }; } &&
6669 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6671 (eval $ac_try) 2>&5
6672 ac_status=$?
c0d27fcc 6673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6674 (exit $ac_status); }; }; then
6675 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 6676else
98418dba 6677 echo "$as_me: failed program was:" >&5
19650fd6
AS
6678sed 's/^/| /' conftest.$ac_ext >&5
6679
6bae0ccf 6680cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6681/* confdefs.h. */
6682_ACEOF
6683cat confdefs.h >>conftest.$ac_ext
6684cat >>conftest.$ac_ext <<_ACEOF
6685/* end confdefs.h. */
6bae0ccf
DL
6686#include <sys/types.h>
6687#include <$ac_cv_struct_tm>
6688
6689
6690int
6691main ()
6692{
6693static struct tm ac_aggr;
6694if (sizeof ac_aggr.tm_zone)
6695return 0;
6696 ;
6697 return 0;
6698}
6699_ACEOF
6700rm -f conftest.$ac_objext
6701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6702 (eval $ac_compile) 2>conftest.er1
6bae0ccf 6703 ac_status=$?
35996d22
AS
6704 grep -v '^ *+' conftest.er1 >conftest.err
6705 rm -f conftest.er1
6706 cat conftest.err >&5
6bae0ccf
DL
6707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6708 (exit $ac_status); } &&
4494a266
JD
6709 { ac_try='test -z "$ac_c_werror_flag"
6710 || test ! -s conftest.err'
35996d22
AS
6711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6712 (eval $ac_try) 2>&5
6713 ac_status=$?
6714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6715 (exit $ac_status); }; } &&
6716 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
6717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6718 (eval $ac_try) 2>&5
6719 ac_status=$?
6720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6721 (exit $ac_status); }; }; then
6722 ac_cv_member_struct_tm_tm_zone=yes
6723else
6724 echo "$as_me: failed program was:" >&5
19650fd6
AS
6725sed 's/^/| /' conftest.$ac_ext >&5
6726
98418dba 6727ac_cv_member_struct_tm_tm_zone=no
ba4481b5 6728fi
35996d22 6729rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6730fi
35996d22 6731rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 6732fi
c0d27fcc 6733echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
6734echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
6735if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 6736
c0d27fcc 6737cat >>confdefs.h <<_ACEOF
98418dba 6738#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
6739_ACEOF
6740
ba4481b5 6741
98418dba 6742fi
ba4481b5 6743
98418dba 6744if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 6745
c0d27fcc 6746cat >>confdefs.h <<\_ACEOF
98418dba 6747#define HAVE_TM_ZONE 1
c0d27fcc 6748_ACEOF
ba4481b5 6749
ba4481b5 6750else
c0d27fcc 6751 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
6752echo $ECHO_N "checking for tzname... $ECHO_C" >&6
6753if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 6754 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6755else
98418dba 6756 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6757/* confdefs.h. */
6758_ACEOF
6759cat confdefs.h >>conftest.$ac_ext
6760cat >>conftest.$ac_ext <<_ACEOF
6761/* end confdefs.h. */
98418dba
CW
6762#include <time.h>
6763#ifndef tzname /* For SGI. */
6764extern char *tzname[]; /* RS6000 and others reject char **tzname. */
6765#endif
6766
98418dba
CW
6767int
6768main ()
6769{
6770atoi(*tzname);
6771 ;
6772 return 0;
6773}
6774_ACEOF
6775rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6776if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 6777 (eval $ac_link) 2>conftest.er1
98418dba 6778 ac_status=$?
35996d22
AS
6779 grep -v '^ *+' conftest.er1 >conftest.err
6780 rm -f conftest.er1
6781 cat conftest.err >&5
c0d27fcc 6782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6783 (exit $ac_status); } &&
4494a266
JD
6784 { ac_try='test -z "$ac_c_werror_flag"
6785 || test ! -s conftest.err'
35996d22
AS
6786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6787 (eval $ac_try) 2>&5
6788 ac_status=$?
6789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6790 (exit $ac_status); }; } &&
6791 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6793 (eval $ac_try) 2>&5
6794 ac_status=$?
c0d27fcc 6795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6796 (exit $ac_status); }; }; then
6797 ac_cv_var_tzname=yes
6798else
6799 echo "$as_me: failed program was:" >&5
19650fd6
AS
6800sed 's/^/| /' conftest.$ac_ext >&5
6801
98418dba 6802ac_cv_var_tzname=no
ba4481b5 6803fi
35996d22
AS
6804rm -f conftest.err conftest.$ac_objext \
6805 conftest$ac_exeext conftest.$ac_ext
98418dba 6806fi
c0d27fcc 6807echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
6808echo "${ECHO_T}$ac_cv_var_tzname" >&6
6809 if test $ac_cv_var_tzname = yes; then
ba4481b5 6810
c0d27fcc 6811cat >>confdefs.h <<\_ACEOF
98418dba 6812#define HAVE_TZNAME 1
c0d27fcc 6813_ACEOF
503d2be0 6814
98418dba
CW
6815 fi
6816fi
503d2be0 6817
c0d27fcc 6818echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
6819echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
6820if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
6821 echo $ECHO_N "(cached) $ECHO_C" >&6
6822else
6823 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6824/* confdefs.h. */
6825_ACEOF
6826cat confdefs.h >>conftest.$ac_ext
6827cat >>conftest.$ac_ext <<_ACEOF
6828/* end confdefs.h. */
98418dba 6829#include <time.h>
b936fae4 6830
98418dba
CW
6831int
6832main ()
6833{
b936fae4
AS
6834static struct tm ac_aggr;
6835if (ac_aggr.tm_gmtoff)
6836return 0;
98418dba
CW
6837 ;
6838 return 0;
6839}
6840_ACEOF
b936fae4 6841rm -f conftest.$ac_objext
c0d27fcc 6842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6843 (eval $ac_compile) 2>conftest.er1
98418dba 6844 ac_status=$?
35996d22
AS
6845 grep -v '^ *+' conftest.er1 >conftest.err
6846 rm -f conftest.er1
6847 cat conftest.err >&5
c0d27fcc 6848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6849 (exit $ac_status); } &&
4494a266
JD
6850 { ac_try='test -z "$ac_c_werror_flag"
6851 || test ! -s conftest.err'
35996d22
AS
6852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6853 (eval $ac_try) 2>&5
6854 ac_status=$?
6855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6856 (exit $ac_status); }; } &&
6857 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6859 (eval $ac_try) 2>&5
6860 ac_status=$?
c0d27fcc 6861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6862 (exit $ac_status); }; }; then
b936fae4 6863 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
6864else
6865 echo "$as_me: failed program was:" >&5
19650fd6
AS
6866sed 's/^/| /' conftest.$ac_ext >&5
6867
8799b3e4 6868cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6869/* confdefs.h. */
6870_ACEOF
6871cat confdefs.h >>conftest.$ac_ext
6872cat >>conftest.$ac_ext <<_ACEOF
6873/* end confdefs.h. */
6bae0ccf
DL
6874#include <time.h>
6875
8799b3e4
CW
6876int
6877main ()
6878{
6bae0ccf
DL
6879static struct tm ac_aggr;
6880if (sizeof ac_aggr.tm_gmtoff)
6881return 0;
8799b3e4
CW
6882 ;
6883 return 0;
6884}
6885_ACEOF
6bae0ccf 6886rm -f conftest.$ac_objext
c0d27fcc 6887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6888 (eval $ac_compile) 2>conftest.er1
8799b3e4 6889 ac_status=$?
35996d22
AS
6890 grep -v '^ *+' conftest.er1 >conftest.err
6891 rm -f conftest.er1
6892 cat conftest.err >&5
c0d27fcc 6893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6894 (exit $ac_status); } &&
4494a266
JD
6895 { ac_try='test -z "$ac_c_werror_flag"
6896 || test ! -s conftest.err'
35996d22
AS
6897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6898 (eval $ac_try) 2>&5
6899 ac_status=$?
6900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6901 (exit $ac_status); }; } &&
6902 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
6904 (eval $ac_try) 2>&5
6905 ac_status=$?
c0d27fcc 6906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6907 (exit $ac_status); }; }; then
6bae0ccf 6908 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
6909else
6910 echo "$as_me: failed program was:" >&5
19650fd6
AS
6911sed 's/^/| /' conftest.$ac_ext >&5
6912
6bae0ccf 6913ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 6914fi
35996d22 6915rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 6916fi
35996d22 6917rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 6918fi
6bae0ccf
DL
6919echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
6920echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
6921if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
6922
6923cat >>confdefs.h <<\_ACEOF
6924#define HAVE_TM_GMTOFF 1
6925_ACEOF
6926
6927fi
6928
96f3a036
DL
6929echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
6930echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6
6931if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
6932 echo $ECHO_N "(cached) $ECHO_C" >&6
6933else
6934 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
6935/* confdefs.h. */
6936_ACEOF
6937cat confdefs.h >>conftest.$ac_ext
6938cat >>conftest.$ac_ext <<_ACEOF
6939/* end confdefs.h. */
7862d3a8
AS
6940$ac_includes_default
6941#if HAVE_SYS_SOCKET_H
6942#include <sys/socket.h>
6943#endif
6944#if HAVE_NET_IF_H
96f3a036 6945#include <net/if.h>
7862d3a8 6946#endif
96f3a036
DL
6947
6948int
6949main ()
6950{
6951static struct ifreq ac_aggr;
6952if (ac_aggr.ifr_flags)
6953return 0;
6954 ;
6955 return 0;
6956}
6957_ACEOF
6958rm -f conftest.$ac_objext
6959if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6960 (eval $ac_compile) 2>conftest.er1
96f3a036 6961 ac_status=$?
35996d22
AS
6962 grep -v '^ *+' conftest.er1 >conftest.err
6963 rm -f conftest.er1
6964 cat conftest.err >&5
96f3a036
DL
6965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6966 (exit $ac_status); } &&
4494a266
JD
6967 { ac_try='test -z "$ac_c_werror_flag"
6968 || test ! -s conftest.err'
35996d22
AS
6969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6970 (eval $ac_try) 2>&5
6971 ac_status=$?
6972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6973 (exit $ac_status); }; } &&
6974 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
6975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6976 (eval $ac_try) 2>&5
6977 ac_status=$?
6978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6979 (exit $ac_status); }; }; then
6980 ac_cv_member_struct_ifreq_ifr_flags=yes
6981else
6982 echo "$as_me: failed program was:" >&5
6983sed 's/^/| /' conftest.$ac_ext >&5
6984
6985cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
6986/* confdefs.h. */
6987_ACEOF
6988cat confdefs.h >>conftest.$ac_ext
6989cat >>conftest.$ac_ext <<_ACEOF
6990/* end confdefs.h. */
7862d3a8
AS
6991$ac_includes_default
6992#if HAVE_SYS_SOCKET_H
6993#include <sys/socket.h>
6994#endif
6995#if HAVE_NET_IF_H
96f3a036 6996#include <net/if.h>
7862d3a8 6997#endif
96f3a036
DL
6998
6999int
7000main ()
7001{
7002static struct ifreq ac_aggr;
7003if (sizeof ac_aggr.ifr_flags)
7004return 0;
7005 ;
7006 return 0;
7007}
7008_ACEOF
7009rm -f conftest.$ac_objext
7010if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7011 (eval $ac_compile) 2>conftest.er1
96f3a036 7012 ac_status=$?
35996d22
AS
7013 grep -v '^ *+' conftest.er1 >conftest.err
7014 rm -f conftest.er1
7015 cat conftest.err >&5
96f3a036
DL
7016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7017 (exit $ac_status); } &&
4494a266
JD
7018 { ac_try='test -z "$ac_c_werror_flag"
7019 || test ! -s conftest.err'
35996d22
AS
7020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7021 (eval $ac_try) 2>&5
7022 ac_status=$?
7023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7024 (exit $ac_status); }; } &&
7025 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7027 (eval $ac_try) 2>&5
7028 ac_status=$?
7029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7030 (exit $ac_status); }; }; then
7031 ac_cv_member_struct_ifreq_ifr_flags=yes
7032else
7033 echo "$as_me: failed program was:" >&5
7034sed 's/^/| /' conftest.$ac_ext >&5
7035
7036ac_cv_member_struct_ifreq_ifr_flags=no
7037fi
35996d22 7038rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7039fi
35996d22 7040rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7041fi
7042echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
7043echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6
7044if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
7045
7046cat >>confdefs.h <<_ACEOF
7047#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
7048_ACEOF
7049
7050
7051fi
7052echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
7053echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6
7054if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
7055 echo $ECHO_N "(cached) $ECHO_C" >&6
7056else
7057 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7058/* confdefs.h. */
7059_ACEOF
7060cat confdefs.h >>conftest.$ac_ext
7061cat >>conftest.$ac_ext <<_ACEOF
7062/* end confdefs.h. */
7862d3a8
AS
7063$ac_includes_default
7064#if HAVE_SYS_SOCKET_H
7065#include <sys/socket.h>
7066#endif
7067#if HAVE_NET_IF_H
96f3a036 7068#include <net/if.h>
7862d3a8 7069#endif
96f3a036
DL
7070
7071int
7072main ()
7073{
7074static struct ifreq ac_aggr;
7075if (ac_aggr.ifr_hwaddr)
7076return 0;
7077 ;
7078 return 0;
7079}
7080_ACEOF
7081rm -f conftest.$ac_objext
7082if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7083 (eval $ac_compile) 2>conftest.er1
96f3a036 7084 ac_status=$?
35996d22
AS
7085 grep -v '^ *+' conftest.er1 >conftest.err
7086 rm -f conftest.er1
7087 cat conftest.err >&5
96f3a036
DL
7088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7089 (exit $ac_status); } &&
4494a266
JD
7090 { ac_try='test -z "$ac_c_werror_flag"
7091 || test ! -s conftest.err'
35996d22
AS
7092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7093 (eval $ac_try) 2>&5
7094 ac_status=$?
7095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7096 (exit $ac_status); }; } &&
7097 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7099 (eval $ac_try) 2>&5
7100 ac_status=$?
7101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7102 (exit $ac_status); }; }; then
7103 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7104else
7105 echo "$as_me: failed program was:" >&5
7106sed 's/^/| /' conftest.$ac_ext >&5
7107
7108cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7109/* confdefs.h. */
7110_ACEOF
7111cat confdefs.h >>conftest.$ac_ext
7112cat >>conftest.$ac_ext <<_ACEOF
7113/* end confdefs.h. */
7862d3a8
AS
7114$ac_includes_default
7115#if HAVE_SYS_SOCKET_H
7116#include <sys/socket.h>
7117#endif
7118#if HAVE_NET_IF_H
96f3a036 7119#include <net/if.h>
7862d3a8 7120#endif
96f3a036
DL
7121
7122int
7123main ()
7124{
7125static struct ifreq ac_aggr;
7126if (sizeof ac_aggr.ifr_hwaddr)
7127return 0;
7128 ;
7129 return 0;
7130}
7131_ACEOF
7132rm -f conftest.$ac_objext
7133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7134 (eval $ac_compile) 2>conftest.er1
96f3a036 7135 ac_status=$?
35996d22
AS
7136 grep -v '^ *+' conftest.er1 >conftest.err
7137 rm -f conftest.er1
7138 cat conftest.err >&5
96f3a036
DL
7139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7140 (exit $ac_status); } &&
4494a266
JD
7141 { ac_try='test -z "$ac_c_werror_flag"
7142 || test ! -s conftest.err'
35996d22
AS
7143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7144 (eval $ac_try) 2>&5
7145 ac_status=$?
7146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7147 (exit $ac_status); }; } &&
7148 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7150 (eval $ac_try) 2>&5
7151 ac_status=$?
7152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7153 (exit $ac_status); }; }; then
7154 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7155else
7156 echo "$as_me: failed program was:" >&5
7157sed 's/^/| /' conftest.$ac_ext >&5
7158
7159ac_cv_member_struct_ifreq_ifr_hwaddr=no
7160fi
35996d22 7161rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7162fi
35996d22 7163rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7164fi
7165echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
7166echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6
7167if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
7168
7169cat >>confdefs.h <<_ACEOF
7170#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
7171_ACEOF
7172
7173
7174fi
7175echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
7176echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6
7177if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
7178 echo $ECHO_N "(cached) $ECHO_C" >&6
7179else
7180 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7181/* confdefs.h. */
7182_ACEOF
7183cat confdefs.h >>conftest.$ac_ext
7184cat >>conftest.$ac_ext <<_ACEOF
7185/* end confdefs.h. */
7862d3a8
AS
7186$ac_includes_default
7187#if HAVE_SYS_SOCKET_H
7188#include <sys/socket.h>
7189#endif
7190#if HAVE_NET_IF_H
96f3a036 7191#include <net/if.h>
7862d3a8 7192#endif
96f3a036
DL
7193
7194int
7195main ()
7196{
7197static struct ifreq ac_aggr;
7198if (ac_aggr.ifr_netmask)
7199return 0;
7200 ;
7201 return 0;
7202}
7203_ACEOF
7204rm -f conftest.$ac_objext
7205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7206 (eval $ac_compile) 2>conftest.er1
96f3a036 7207 ac_status=$?
35996d22
AS
7208 grep -v '^ *+' conftest.er1 >conftest.err
7209 rm -f conftest.er1
7210 cat conftest.err >&5
96f3a036
DL
7211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7212 (exit $ac_status); } &&
4494a266
JD
7213 { ac_try='test -z "$ac_c_werror_flag"
7214 || test ! -s conftest.err'
35996d22
AS
7215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7216 (eval $ac_try) 2>&5
7217 ac_status=$?
7218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7219 (exit $ac_status); }; } &&
7220 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7222 (eval $ac_try) 2>&5
7223 ac_status=$?
7224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7225 (exit $ac_status); }; }; then
7226 ac_cv_member_struct_ifreq_ifr_netmask=yes
7227else
7228 echo "$as_me: failed program was:" >&5
7229sed 's/^/| /' conftest.$ac_ext >&5
7230
7231cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7232/* confdefs.h. */
7233_ACEOF
7234cat confdefs.h >>conftest.$ac_ext
7235cat >>conftest.$ac_ext <<_ACEOF
7236/* end confdefs.h. */
7862d3a8
AS
7237$ac_includes_default
7238#if HAVE_SYS_SOCKET_H
7239#include <sys/socket.h>
7240#endif
7241#if HAVE_NET_IF_H
96f3a036 7242#include <net/if.h>
7862d3a8 7243#endif
96f3a036
DL
7244
7245int
7246main ()
7247{
7248static struct ifreq ac_aggr;
7249if (sizeof ac_aggr.ifr_netmask)
7250return 0;
7251 ;
7252 return 0;
7253}
7254_ACEOF
7255rm -f conftest.$ac_objext
7256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7257 (eval $ac_compile) 2>conftest.er1
96f3a036 7258 ac_status=$?
35996d22
AS
7259 grep -v '^ *+' conftest.er1 >conftest.err
7260 rm -f conftest.er1
7261 cat conftest.err >&5
96f3a036
DL
7262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7263 (exit $ac_status); } &&
4494a266
JD
7264 { ac_try='test -z "$ac_c_werror_flag"
7265 || test ! -s conftest.err'
35996d22
AS
7266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7267 (eval $ac_try) 2>&5
7268 ac_status=$?
7269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7270 (exit $ac_status); }; } &&
7271 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7273 (eval $ac_try) 2>&5
7274 ac_status=$?
7275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7276 (exit $ac_status); }; }; then
7277 ac_cv_member_struct_ifreq_ifr_netmask=yes
7278else
7279 echo "$as_me: failed program was:" >&5
7280sed 's/^/| /' conftest.$ac_ext >&5
7281
7282ac_cv_member_struct_ifreq_ifr_netmask=no
7283fi
35996d22 7284rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7285fi
35996d22 7286rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7287fi
7288echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
7289echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6
7290if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
7291
7292cat >>confdefs.h <<_ACEOF
7293#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
7294_ACEOF
7295
7296
7297fi
7298echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
7299echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6
7300if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
7301 echo $ECHO_N "(cached) $ECHO_C" >&6
7302else
7303 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7304/* confdefs.h. */
7305_ACEOF
7306cat confdefs.h >>conftest.$ac_ext
7307cat >>conftest.$ac_ext <<_ACEOF
7308/* end confdefs.h. */
7862d3a8
AS
7309$ac_includes_default
7310#if HAVE_SYS_SOCKET_H
7311#include <sys/socket.h>
7312#endif
7313#if HAVE_NET_IF_H
96f3a036 7314#include <net/if.h>
7862d3a8 7315#endif
96f3a036
DL
7316
7317int
7318main ()
7319{
7320static struct ifreq ac_aggr;
7321if (ac_aggr.ifr_broadaddr)
7322return 0;
7323 ;
7324 return 0;
7325}
7326_ACEOF
7327rm -f conftest.$ac_objext
7328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7329 (eval $ac_compile) 2>conftest.er1
96f3a036 7330 ac_status=$?
35996d22
AS
7331 grep -v '^ *+' conftest.er1 >conftest.err
7332 rm -f conftest.er1
7333 cat conftest.err >&5
96f3a036
DL
7334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7335 (exit $ac_status); } &&
4494a266
JD
7336 { ac_try='test -z "$ac_c_werror_flag"
7337 || test ! -s conftest.err'
35996d22
AS
7338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7339 (eval $ac_try) 2>&5
7340 ac_status=$?
7341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7342 (exit $ac_status); }; } &&
7343 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7345 (eval $ac_try) 2>&5
7346 ac_status=$?
7347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7348 (exit $ac_status); }; }; then
7349 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7350else
7351 echo "$as_me: failed program was:" >&5
7352sed 's/^/| /' conftest.$ac_ext >&5
7353
7354cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7355/* confdefs.h. */
7356_ACEOF
7357cat confdefs.h >>conftest.$ac_ext
7358cat >>conftest.$ac_ext <<_ACEOF
7359/* end confdefs.h. */
7862d3a8
AS
7360$ac_includes_default
7361#if HAVE_SYS_SOCKET_H
7362#include <sys/socket.h>
7363#endif
7364#if HAVE_NET_IF_H
96f3a036 7365#include <net/if.h>
7862d3a8 7366#endif
96f3a036
DL
7367
7368int
7369main ()
7370{
7371static struct ifreq ac_aggr;
7372if (sizeof ac_aggr.ifr_broadaddr)
7373return 0;
7374 ;
7375 return 0;
7376}
7377_ACEOF
7378rm -f conftest.$ac_objext
7379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7380 (eval $ac_compile) 2>conftest.er1
96f3a036 7381 ac_status=$?
35996d22
AS
7382 grep -v '^ *+' conftest.er1 >conftest.err
7383 rm -f conftest.er1
7384 cat conftest.err >&5
96f3a036
DL
7385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7386 (exit $ac_status); } &&
4494a266
JD
7387 { ac_try='test -z "$ac_c_werror_flag"
7388 || test ! -s conftest.err'
35996d22
AS
7389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7390 (eval $ac_try) 2>&5
7391 ac_status=$?
7392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7393 (exit $ac_status); }; } &&
7394 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7396 (eval $ac_try) 2>&5
7397 ac_status=$?
7398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7399 (exit $ac_status); }; }; then
7400 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7401else
7402 echo "$as_me: failed program was:" >&5
7403sed 's/^/| /' conftest.$ac_ext >&5
7404
7405ac_cv_member_struct_ifreq_ifr_broadaddr=no
7406fi
35996d22 7407rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7408fi
35996d22 7409rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7410fi
7411echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
7412echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6
7413if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
7414
7415cat >>confdefs.h <<_ACEOF
7416#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
7417_ACEOF
7418
7419
7420fi
7421echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
7422echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6
7423if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
7424 echo $ECHO_N "(cached) $ECHO_C" >&6
7425else
7426 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7427/* confdefs.h. */
7428_ACEOF
7429cat confdefs.h >>conftest.$ac_ext
7430cat >>conftest.$ac_ext <<_ACEOF
7431/* end confdefs.h. */
7862d3a8
AS
7432$ac_includes_default
7433#if HAVE_SYS_SOCKET_H
7434#include <sys/socket.h>
7435#endif
7436#if HAVE_NET_IF_H
96f3a036 7437#include <net/if.h>
7862d3a8 7438#endif
96f3a036
DL
7439
7440int
7441main ()
7442{
7443static struct ifreq ac_aggr;
7444if (ac_aggr.ifr_addr)
7445return 0;
7446 ;
7447 return 0;
7448}
7449_ACEOF
7450rm -f conftest.$ac_objext
7451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7452 (eval $ac_compile) 2>conftest.er1
96f3a036 7453 ac_status=$?
35996d22
AS
7454 grep -v '^ *+' conftest.er1 >conftest.err
7455 rm -f conftest.er1
7456 cat conftest.err >&5
96f3a036
DL
7457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7458 (exit $ac_status); } &&
4494a266
JD
7459 { ac_try='test -z "$ac_c_werror_flag"
7460 || test ! -s conftest.err'
35996d22
AS
7461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7462 (eval $ac_try) 2>&5
7463 ac_status=$?
7464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7465 (exit $ac_status); }; } &&
7466 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7468 (eval $ac_try) 2>&5
7469 ac_status=$?
7470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7471 (exit $ac_status); }; }; then
7472 ac_cv_member_struct_ifreq_ifr_addr=yes
7473else
7474 echo "$as_me: failed program was:" >&5
7475sed 's/^/| /' conftest.$ac_ext >&5
7476
7477cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7478/* confdefs.h. */
7479_ACEOF
7480cat confdefs.h >>conftest.$ac_ext
7481cat >>conftest.$ac_ext <<_ACEOF
7482/* end confdefs.h. */
7862d3a8
AS
7483$ac_includes_default
7484#if HAVE_SYS_SOCKET_H
7485#include <sys/socket.h>
7486#endif
7487#if HAVE_NET_IF_H
96f3a036 7488#include <net/if.h>
7862d3a8 7489#endif
96f3a036
DL
7490
7491int
7492main ()
7493{
7494static struct ifreq ac_aggr;
7495if (sizeof ac_aggr.ifr_addr)
7496return 0;
7497 ;
7498 return 0;
7499}
7500_ACEOF
7501rm -f conftest.$ac_objext
7502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7503 (eval $ac_compile) 2>conftest.er1
96f3a036 7504 ac_status=$?
35996d22
AS
7505 grep -v '^ *+' conftest.er1 >conftest.err
7506 rm -f conftest.er1
7507 cat conftest.err >&5
96f3a036
DL
7508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7509 (exit $ac_status); } &&
4494a266
JD
7510 { ac_try='test -z "$ac_c_werror_flag"
7511 || test ! -s conftest.err'
35996d22
AS
7512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7513 (eval $ac_try) 2>&5
7514 ac_status=$?
7515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7516 (exit $ac_status); }; } &&
7517 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7519 (eval $ac_try) 2>&5
7520 ac_status=$?
7521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7522 (exit $ac_status); }; }; then
7523 ac_cv_member_struct_ifreq_ifr_addr=yes
7524else
7525 echo "$as_me: failed program was:" >&5
7526sed 's/^/| /' conftest.$ac_ext >&5
7527
7528ac_cv_member_struct_ifreq_ifr_addr=no
7529fi
35996d22 7530rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7531fi
35996d22 7532rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7533fi
7534echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
7535echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6
7536if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
7537
7538cat >>confdefs.h <<_ACEOF
7539#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
7540_ACEOF
7541
7542
7543fi
7544
8799b3e4 7545
8799b3e4 7546
c0d27fcc 7547echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
7548echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
7549if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 7550 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7551echo "${ECHO_T}yes" >&6
7552
c0d27fcc 7553cat >>confdefs.h <<\_ACEOF
98418dba 7554#define PROTOTYPES 1
c0d27fcc
MR
7555_ACEOF
7556
7557
7558cat >>confdefs.h <<\_ACEOF
7559#define __PROTOTYPES 1
7560_ACEOF
98418dba
CW
7561
7562else
c0d27fcc 7563 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7564echo "${ECHO_T}no" >&6
7565fi
7566
c0d27fcc 7567echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
7568echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
7569if test "${ac_cv_c_volatile+set}" = set; then
7570 echo $ECHO_N "(cached) $ECHO_C" >&6
7571else
7572 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7573/* confdefs.h. */
7574_ACEOF
7575cat confdefs.h >>conftest.$ac_ext
7576cat >>conftest.$ac_ext <<_ACEOF
7577/* end confdefs.h. */
98418dba 7578
98418dba
CW
7579int
7580main ()
7581{
7582
7583volatile int x;
7584int * volatile y;
7585 ;
7586 return 0;
7587}
7588_ACEOF
7589rm -f conftest.$ac_objext
c0d27fcc 7590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7591 (eval $ac_compile) 2>conftest.er1
98418dba 7592 ac_status=$?
35996d22
AS
7593 grep -v '^ *+' conftest.er1 >conftest.err
7594 rm -f conftest.er1
7595 cat conftest.err >&5
c0d27fcc 7596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7597 (exit $ac_status); } &&
4494a266
JD
7598 { ac_try='test -z "$ac_c_werror_flag"
7599 || test ! -s conftest.err'
35996d22
AS
7600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7601 (eval $ac_try) 2>&5
7602 ac_status=$?
7603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7604 (exit $ac_status); }; } &&
7605 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7607 (eval $ac_try) 2>&5
7608 ac_status=$?
c0d27fcc 7609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7610 (exit $ac_status); }; }; then
7611 ac_cv_c_volatile=yes
7612else
7613 echo "$as_me: failed program was:" >&5
19650fd6
AS
7614sed 's/^/| /' conftest.$ac_ext >&5
7615
98418dba
CW
7616ac_cv_c_volatile=no
7617fi
35996d22 7618rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7619fi
c0d27fcc 7620echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
7621echo "${ECHO_T}$ac_cv_c_volatile" >&6
7622if test $ac_cv_c_volatile = no; then
7623
c0d27fcc 7624cat >>confdefs.h <<\_ACEOF
98418dba 7625#define volatile
c0d27fcc 7626_ACEOF
98418dba
CW
7627
7628fi
7629
c0d27fcc 7630echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
7631echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
7632if test "${ac_cv_c_const+set}" = set; then
7633 echo $ECHO_N "(cached) $ECHO_C" >&6
7634else
7635 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7636/* confdefs.h. */
7637_ACEOF
7638cat confdefs.h >>conftest.$ac_ext
7639cat >>conftest.$ac_ext <<_ACEOF
7640/* end confdefs.h. */
98418dba 7641
98418dba
CW
7642int
7643main ()
7644{
7645/* FIXME: Include the comments suggested by Paul. */
7646#ifndef __cplusplus
7647 /* Ultrix mips cc rejects this. */
7648 typedef int charset[2];
7649 const charset x;
7650 /* SunOS 4.1.1 cc rejects this. */
7651 char const *const *ccp;
7652 char **p;
7653 /* NEC SVR4.0.2 mips cc rejects this. */
7654 struct point {int x, y;};
7655 static struct point const zero = {0,0};
7656 /* AIX XL C 1.02.0.0 rejects this.
7657 It does not let you subtract one const X* pointer from another in
7658 an arm of an if-expression whose if-part is not a constant
7659 expression */
7660 const char *g = "string";
7661 ccp = &g + (g ? g-g : 0);
7662 /* HPUX 7.0 cc rejects these. */
7663 ++ccp;
7664 p = (char**) ccp;
7665 ccp = (char const *const *) p;
7666 { /* SCO 3.2v4 cc rejects this. */
7667 char *t;
7668 char const *s = 0 ? (char *) 0 : (char const *) 0;
7669
7670 *t++ = 0;
7671 }
7672 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
7673 int x[] = {25, 17};
7674 const int *foo = &x[0];
7675 ++foo;
7676 }
7677 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7678 typedef const int *iptr;
7679 iptr p = 0;
7680 ++p;
7681 }
7682 { /* AIX XL C 1.02.0.0 rejects this saying
7683 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7684 struct s { int j; const int *ap[3]; };
7685 struct s *b; b->j = 5;
7686 }
7687 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7688 const int foo = 10;
7689 }
7690#endif
7691
7692 ;
7693 return 0;
7694}
7695_ACEOF
7696rm -f conftest.$ac_objext
c0d27fcc 7697if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7698 (eval $ac_compile) 2>conftest.er1
98418dba 7699 ac_status=$?
35996d22
AS
7700 grep -v '^ *+' conftest.er1 >conftest.err
7701 rm -f conftest.er1
7702 cat conftest.err >&5
c0d27fcc 7703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7704 (exit $ac_status); } &&
4494a266
JD
7705 { ac_try='test -z "$ac_c_werror_flag"
7706 || test ! -s conftest.err'
35996d22
AS
7707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7708 (eval $ac_try) 2>&5
7709 ac_status=$?
7710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7711 (exit $ac_status); }; } &&
7712 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7714 (eval $ac_try) 2>&5
7715 ac_status=$?
c0d27fcc 7716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7717 (exit $ac_status); }; }; then
7718 ac_cv_c_const=yes
7719else
7720 echo "$as_me: failed program was:" >&5
19650fd6
AS
7721sed 's/^/| /' conftest.$ac_ext >&5
7722
98418dba
CW
7723ac_cv_c_const=no
7724fi
35996d22 7725rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7726fi
c0d27fcc 7727echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
7728echo "${ECHO_T}$ac_cv_c_const" >&6
7729if test $ac_cv_c_const = no; then
7730
c0d27fcc 7731cat >>confdefs.h <<\_ACEOF
98418dba 7732#define const
c0d27fcc 7733_ACEOF
98418dba
CW
7734
7735fi
7736
c0d27fcc 7737echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
7738echo $ECHO_N "checking for void * support... $ECHO_C" >&6
7739if test "${emacs_cv_void_star+set}" = set; then
7740 echo $ECHO_N "(cached) $ECHO_C" >&6
7741else
7742 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7743/* confdefs.h. */
7744_ACEOF
7745cat confdefs.h >>conftest.$ac_ext
7746cat >>conftest.$ac_ext <<_ACEOF
7747/* end confdefs.h. */
98418dba 7748
98418dba
CW
7749int
7750main ()
7751{
7752void * foo;
7753 ;
7754 return 0;
7755}
7756_ACEOF
7757rm -f conftest.$ac_objext
c0d27fcc 7758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7759 (eval $ac_compile) 2>conftest.er1
98418dba 7760 ac_status=$?
35996d22
AS
7761 grep -v '^ *+' conftest.er1 >conftest.err
7762 rm -f conftest.er1
7763 cat conftest.err >&5
c0d27fcc 7764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7765 (exit $ac_status); } &&
4494a266
JD
7766 { ac_try='test -z "$ac_c_werror_flag"
7767 || test ! -s conftest.err'
35996d22
AS
7768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7769 (eval $ac_try) 2>&5
7770 ac_status=$?
7771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7772 (exit $ac_status); }; } &&
7773 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7775 (eval $ac_try) 2>&5
7776 ac_status=$?
c0d27fcc 7777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7778 (exit $ac_status); }; }; then
7779 emacs_cv_void_star=yes
7780else
7781 echo "$as_me: failed program was:" >&5
19650fd6
AS
7782sed 's/^/| /' conftest.$ac_ext >&5
7783
98418dba
CW
7784emacs_cv_void_star=no
7785fi
35996d22 7786rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7787fi
c0d27fcc 7788echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
7789echo "${ECHO_T}$emacs_cv_void_star" >&6
7790if test $emacs_cv_void_star = yes; then
c0d27fcc 7791 cat >>confdefs.h <<\_ACEOF
98418dba 7792#define POINTER_TYPE void
c0d27fcc 7793_ACEOF
98418dba
CW
7794
7795else
c0d27fcc 7796 cat >>confdefs.h <<\_ACEOF
98418dba 7797#define POINTER_TYPE char
c0d27fcc 7798_ACEOF
98418dba
CW
7799
7800fi
7801
c0d27fcc 7802
4494a266
JD
7803
7804
cd958eb3 7805
19650fd6
AS
7806echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7807echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
35996d22 7808set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
98418dba
CW
7809if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
7810 echo $ECHO_N "(cached) $ECHO_C" >&6
7811else
c0d27fcc 7812 cat >conftest.make <<\_ACEOF
98418dba 7813all:
19650fd6 7814 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 7815_ACEOF
98418dba
CW
7816# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7817eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
7818if test -n "$ac_maketemp"; then
7819 eval ac_cv_prog_make_${ac_make}_set=yes
7820else
7821 eval ac_cv_prog_make_${ac_make}_set=no
7822fi
7823rm -f conftest.make
7824fi
7825if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 7826 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7827echo "${ECHO_T}yes" >&6
7828 SET_MAKE=
7829else
c0d27fcc 7830 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7831echo "${ECHO_T}no" >&6
7832 SET_MAKE="MAKE=${MAKE-make}"
7833fi
7834
c0d27fcc
MR
7835
7836echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
7837echo $ECHO_N "checking for long file names... $ECHO_C" >&6
7838if test "${ac_cv_sys_long_file_names+set}" = set; then
7839 echo $ECHO_N "(cached) $ECHO_C" >&6
7840else
7841 ac_cv_sys_long_file_names=yes
7842# Test for long file names in all the places we know might matter:
7843# . the current directory, where building will happen
7844# $prefix/lib where we will be installing things
7845# $exec_prefix/lib likewise
7846# eval it to expand exec_prefix.
7847# $TMPDIR if set, where it might want to write temporary files
7848# if $TMPDIR is not set:
7849# /tmp where it might want to write temporary files
7850# /var/tmp likewise
7851# /usr/tmp likewise
7852if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
7853 ac_tmpdirs=$TMPDIR
7854else
7855 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
7856fi
7857for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
7858 test -d $ac_dir || continue
7859 test -w $ac_dir || continue # It is less confusing to not echo anything here.
7860 ac_xdir=$ac_dir/cf$$
7861 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
7862 ac_tf1=$ac_xdir/conftest9012345
7863 ac_tf2=$ac_xdir/conftest9012346
7864 (echo 1 >$ac_tf1) 2>/dev/null
7865 (echo 2 >$ac_tf2) 2>/dev/null
7866 ac_val=`cat $ac_tf1 2>/dev/null`
7867 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
7868 ac_cv_sys_long_file_names=no
7869 rm -rf $ac_xdir 2>/dev/null
7870 break
7871 fi
7872 rm -rf $ac_xdir 2>/dev/null
7873done
7874fi
c0d27fcc 7875echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
7876echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
7877if test $ac_cv_sys_long_file_names = yes; then
7878
c0d27fcc 7879cat >>confdefs.h <<\_ACEOF
98418dba 7880#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 7881_ACEOF
98418dba
CW
7882
7883fi
7884
c0d27fcc 7885
98418dba
CW
7886#### Choose a window system.
7887
c0d27fcc 7888echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
7889echo $ECHO_N "checking for X... $ECHO_C" >&6
7890
c0d27fcc 7891
98418dba
CW
7892# Check whether --with-x or --without-x was given.
7893if test "${with_x+set}" = set; then
7894 withval="$with_x"
7895
7896fi;
7897# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7898if test "x$with_x" = xno; then
7899 # The user explicitly disabled X.
7900 have_x=disabled
7901else
7902 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
7903 # Both variables are already set.
7904 have_x=yes
7905 else
7906 if test "${ac_cv_have_x+set}" = set; then
7907 echo $ECHO_N "(cached) $ECHO_C" >&6
7908else
7909 # One or both of the vars are not set, and there is no cached value.
7910ac_x_includes=no ac_x_libraries=no
7911rm -fr conftest.dir
7912if mkdir conftest.dir; then
7913 cd conftest.dir
7914 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 7915 cat >Imakefile <<'_ACEOF'
98418dba
CW
7916acfindx:
7917 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 7918_ACEOF
98418dba
CW
7919 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
7920 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7921 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7922 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7923 for ac_extension in a so sl; do
7924 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
35996d22
AS
7925 test -f $ac_im_libdir/libX11.$ac_extension; then
7926 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
7927 fi
7928 done
7929 # Screen out bogus values from the imake configuration. They are
7930 # bogus both because they are the default anyway, and because
7931 # using them would break gcc on systems where it needs fixed includes.
7932 case $ac_im_incroot in
7933 /usr/include) ;;
7934 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7935 esac
7936 case $ac_im_usrlibdir in
7937 /usr/lib | /lib) ;;
7938 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7939 esac
7940 fi
7941 cd ..
7942 rm -fr conftest.dir
7943fi
7944
7945# Standard set of common directories for X headers.
7946# Check X11 before X11Rn because it is often a symlink to the current release.
7947ac_x_header_dirs='
7948/usr/X11/include
7949/usr/X11R6/include
7950/usr/X11R5/include
7951/usr/X11R4/include
7952
7953/usr/include/X11
7954/usr/include/X11R6
7955/usr/include/X11R5
7956/usr/include/X11R4
7957
7958/usr/local/X11/include
7959/usr/local/X11R6/include
7960/usr/local/X11R5/include
7961/usr/local/X11R4/include
7962
7963/usr/local/include/X11
7964/usr/local/include/X11R6
7965/usr/local/include/X11R5
7966/usr/local/include/X11R4
7967
7968/usr/X386/include
7969/usr/x386/include
7970/usr/XFree86/include/X11
7971
7972/usr/include
7973/usr/local/include
7974/usr/unsupported/include
7975/usr/athena/include
7976/usr/local/x11r5/include
7977/usr/lpp/Xamples/include
7978
7979/usr/openwin/include
7980/usr/openwin/share/include'
7981
7982if test "$ac_x_includes" = no; then
4494a266 7983 # Guess where to find include files, by looking for Intrinsic.h.
98418dba
CW
7984 # First, try using that file with no special directory specified.
7985 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7986/* confdefs.h. */
7987_ACEOF
7988cat confdefs.h >>conftest.$ac_ext
7989cat >>conftest.$ac_ext <<_ACEOF
7990/* end confdefs.h. */
98418dba
CW
7991#include <X11/Intrinsic.h>
7992_ACEOF
c0d27fcc 7993if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7994 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7995 ac_status=$?
6bae0ccf 7996 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
7997 rm -f conftest.er1
7998 cat conftest.err >&5
c0d27fcc 7999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8000 (exit $ac_status); } >/dev/null; then
8001 if test -s conftest.err; then
8002 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 8003 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8004 else
8005 ac_cpp_err=
8006 fi
8007else
8008 ac_cpp_err=yes
8009fi
8010if test -z "$ac_cpp_err"; then
8011 # We can compile using X headers with no special include directory.
8012ac_x_includes=
8013else
8014 echo "$as_me: failed program was:" >&5
19650fd6
AS
8015sed 's/^/| /' conftest.$ac_ext >&5
8016
98418dba
CW
8017 for ac_dir in $ac_x_header_dirs; do
8018 if test -r "$ac_dir/X11/Intrinsic.h"; then
8019 ac_x_includes=$ac_dir
8020 break
8021 fi
8022done
8023fi
8024rm -f conftest.err conftest.$ac_ext
8025fi # $ac_x_includes = no
8026
8027if test "$ac_x_libraries" = no; then
8028 # Check for the libraries.
8029 # See if we find them without any special options.
8030 # Don't add to $LIBS permanently.
8031 ac_save_LIBS=$LIBS
8032 LIBS="-lXt $LIBS"
8033 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8034/* confdefs.h. */
8035_ACEOF
8036cat confdefs.h >>conftest.$ac_ext
8037cat >>conftest.$ac_ext <<_ACEOF
8038/* end confdefs.h. */
98418dba 8039#include <X11/Intrinsic.h>
98418dba
CW
8040int
8041main ()
8042{
8043XtMalloc (0)
8044 ;
8045 return 0;
8046}
8047_ACEOF
8048rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8049if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8050 (eval $ac_link) 2>conftest.er1
98418dba 8051 ac_status=$?
35996d22
AS
8052 grep -v '^ *+' conftest.er1 >conftest.err
8053 rm -f conftest.er1
8054 cat conftest.err >&5
c0d27fcc 8055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8056 (exit $ac_status); } &&
4494a266
JD
8057 { ac_try='test -z "$ac_c_werror_flag"
8058 || test ! -s conftest.err'
35996d22
AS
8059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8060 (eval $ac_try) 2>&5
8061 ac_status=$?
8062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8063 (exit $ac_status); }; } &&
8064 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8066 (eval $ac_try) 2>&5
8067 ac_status=$?
c0d27fcc 8068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8069 (exit $ac_status); }; }; then
8070 LIBS=$ac_save_LIBS
8071# We can link X programs with no special library path.
8072ac_x_libraries=
8073else
8074 echo "$as_me: failed program was:" >&5
19650fd6
AS
8075sed 's/^/| /' conftest.$ac_ext >&5
8076
98418dba
CW
8077LIBS=$ac_save_LIBS
8078for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8079do
8080 # Don't even attempt the hair of trying to link an X program!
8081 for ac_extension in a so sl; do
8082 if test -r $ac_dir/libXt.$ac_extension; then
8083 ac_x_libraries=$ac_dir
8084 break 2
8085 fi
8086 done
8087done
8088fi
35996d22
AS
8089rm -f conftest.err conftest.$ac_objext \
8090 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8091fi # $ac_x_libraries = no
8092
8093if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8094 # Didn't find X anywhere. Cache the known absence of X.
8095 ac_cv_have_x="have_x=no"
8096else
8097 # Record where we found X for the cache.
8098 ac_cv_have_x="have_x=yes \
35996d22 8099 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
98418dba
CW
8100fi
8101fi
8102
8103 fi
8104 eval "$ac_cv_have_x"
8105fi # $with_x != no
8106
8107if test "$have_x" != yes; then
c0d27fcc 8108 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
8109echo "${ECHO_T}$have_x" >&6
8110 no_x=yes
8111else
8112 # If each of the values was on the command line, it overrides each guess.
8113 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8114 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8115 # Update the cache value to reflect the command line values.
8116 ac_cv_have_x="have_x=yes \
8117 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4494a266
JD
8118 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
8119echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
98418dba
CW
8120fi
8121
8122if test "$no_x" = yes; then
8123 window_system=none
8124else
8125 window_system=x11
8126fi
8127
8128if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8129 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
8130 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
8131 x_default_search_path=""
8132 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
8133 x_search_path="\
8134${x_library}/X11/%L/%T/%N%C%S:\
8135${x_library}/X11/%l/%T/%N%C%S:\
8136${x_library}/X11/%T/%N%C%S:\
8137${x_library}/X11/%L/%T/%N%S:\
8138${x_library}/X11/%l/%T/%N%S:\
8139${x_library}/X11/%T/%N%S"
8140 if test x"${x_default_search_path}" = x; then
8141 x_default_search_path=${x_search_path}
8142 else
8143 x_default_search_path="${x_search_path}:${x_default_search_path}"
8144 fi
8145 done
8146fi
8147if test "${x_includes}" != NONE && test -n "${x_includes}"; then
8148 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
8149fi
8150
8151if test x"${x_includes}" = x; then
8152 bitmapdir=/usr/include/X11/bitmaps
8153else
8154 # accumulate include directories that have X11 bitmap subdirectories
8155 bmd_acc="dummyval"
8156 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
8157 if test -d "${bmd}/X11/bitmaps"; then
8158 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
8159 fi
8160 if test -d "${bmd}/bitmaps"; then
8161 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
8162 fi
8163 done
8164 if test ${bmd_acc} != "dummyval"; then
8165 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
8166 fi
8167fi
8168
8169case "${window_system}" in
8170 x11 )
8171 HAVE_X_WINDOWS=yes
8172 HAVE_X11=yes
8173 case "${with_x_toolkit}" in
8174 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
8175 motif ) USE_X_TOOLKIT=MOTIF ;;
488dd4c4
JD
8176 gtk ) with_gtk=yes
8177 USE_X_TOOLKIT=none ;;
98418dba
CW
8178 no ) USE_X_TOOLKIT=none ;;
8179 * ) USE_X_TOOLKIT=maybe ;;
8180 esac
8181 ;;
8182 none )
8183 HAVE_X_WINDOWS=no
8184 HAVE_X11=no
8185 USE_X_TOOLKIT=none
8186 ;;
8187esac
8188
8189### If we're using X11, we should use the X menu package.
8190HAVE_MENUS=no
8191case ${HAVE_X11} in
8192 yes ) HAVE_MENUS=yes ;;
8193esac
8194
8195if test "${opsys}" = "hpux9"; then
8196 case "${x_libraries}" in
8197 *X11R4* )
8198 opsysfile="s/hpux9-x11r4.h"
8199 ;;
8200 esac
8201fi
8202
8203if test "${opsys}" = "hpux9shr"; then
8204 case "${x_libraries}" in
8205 *X11R4* )
8206 opsysfile="s/hpux9shxr4.h"
8207 ;;
8208 esac
8209fi
8210
8211### Compute the unexec source name from the object name.
8212UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
8213
8214# Do the opsystem or machine files prohibit the use of the GNU malloc?
8215# Assume not, until told otherwise.
8216GNU_MALLOC=yes
8217doug_lea_malloc=yes
c0d27fcc 8218echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
8219echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
8220if test "${ac_cv_func_malloc_get_state+set}" = set; then
8221 echo $ECHO_N "(cached) $ECHO_C" >&6
8222else
8223 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8224/* confdefs.h. */
8225_ACEOF
8226cat confdefs.h >>conftest.$ac_ext
8227cat >>conftest.$ac_ext <<_ACEOF
8228/* end confdefs.h. */
35996d22
AS
8229/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
8230 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8231#define malloc_get_state innocuous_malloc_get_state
8232
98418dba 8233/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8234 which can conflict with char malloc_get_state (); below.
8235 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8236 <limits.h> exists even on freestanding compilers. */
35996d22 8237
19650fd6
AS
8238#ifdef __STDC__
8239# include <limits.h>
8240#else
8241# include <assert.h>
8242#endif
35996d22
AS
8243
8244#undef malloc_get_state
8245
98418dba
CW
8246/* Override any gcc2 internal prototype to avoid an error. */
8247#ifdef __cplusplus
8248extern "C"
19650fd6 8249{
98418dba
CW
8250#endif
8251/* We use char because int might match the return type of a gcc2
8252 builtin and then its argument prototype would still apply. */
8253char malloc_get_state ();
98418dba
CW
8254/* The GNU C library defines this for functions which it implements
8255 to always fail with ENOSYS. Some functions are actually named
8256 something starting with __ and the normal name is an alias. */
8257#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
8258choke me
8259#else
19650fd6
AS
8260char (*f) () = malloc_get_state;
8261#endif
8262#ifdef __cplusplus
8263}
98418dba
CW
8264#endif
8265
19650fd6
AS
8266int
8267main ()
8268{
8269return f != malloc_get_state;
98418dba
CW
8270 ;
8271 return 0;
8272}
8273_ACEOF
8274rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8276 (eval $ac_link) 2>conftest.er1
98418dba 8277 ac_status=$?
35996d22
AS
8278 grep -v '^ *+' conftest.er1 >conftest.err
8279 rm -f conftest.er1
8280 cat conftest.err >&5
c0d27fcc 8281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8282 (exit $ac_status); } &&
4494a266
JD
8283 { ac_try='test -z "$ac_c_werror_flag"
8284 || test ! -s conftest.err'
35996d22
AS
8285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8286 (eval $ac_try) 2>&5
8287 ac_status=$?
8288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8289 (exit $ac_status); }; } &&
8290 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8292 (eval $ac_try) 2>&5
8293 ac_status=$?
c0d27fcc 8294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8295 (exit $ac_status); }; }; then
8296 ac_cv_func_malloc_get_state=yes
8297else
8298 echo "$as_me: failed program was:" >&5
19650fd6
AS
8299sed 's/^/| /' conftest.$ac_ext >&5
8300
98418dba
CW
8301ac_cv_func_malloc_get_state=no
8302fi
35996d22
AS
8303rm -f conftest.err conftest.$ac_objext \
8304 conftest$ac_exeext conftest.$ac_ext
98418dba 8305fi
c0d27fcc 8306echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
8307echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
8308if test $ac_cv_func_malloc_get_state = yes; then
8309 :
8310else
8311 doug_lea_malloc=no
8312fi
8313
c0d27fcc 8314echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
8315echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
8316if test "${ac_cv_func_malloc_set_state+set}" = set; then
8317 echo $ECHO_N "(cached) $ECHO_C" >&6
8318else
8319 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8320/* confdefs.h. */
8321_ACEOF
8322cat confdefs.h >>conftest.$ac_ext
8323cat >>conftest.$ac_ext <<_ACEOF
8324/* end confdefs.h. */
35996d22
AS
8325/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
8326 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8327#define malloc_set_state innocuous_malloc_set_state
8328
98418dba 8329/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8330 which can conflict with char malloc_set_state (); below.
8331 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8332 <limits.h> exists even on freestanding compilers. */
35996d22 8333
19650fd6
AS
8334#ifdef __STDC__
8335# include <limits.h>
8336#else
8337# include <assert.h>
8338#endif
35996d22
AS
8339
8340#undef malloc_set_state
8341
98418dba
CW
8342/* Override any gcc2 internal prototype to avoid an error. */
8343#ifdef __cplusplus
8344extern "C"
19650fd6 8345{
98418dba
CW
8346#endif
8347/* We use char because int might match the return type of a gcc2
8348 builtin and then its argument prototype would still apply. */
8349char malloc_set_state ();
98418dba
CW
8350/* The GNU C library defines this for functions which it implements
8351 to always fail with ENOSYS. Some functions are actually named
8352 something starting with __ and the normal name is an alias. */
8353#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
8354choke me
8355#else
19650fd6
AS
8356char (*f) () = malloc_set_state;
8357#endif
8358#ifdef __cplusplus
8359}
98418dba
CW
8360#endif
8361
19650fd6
AS
8362int
8363main ()
8364{
8365return f != malloc_set_state;
98418dba
CW
8366 ;
8367 return 0;
8368}
8369_ACEOF
8370rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8371if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8372 (eval $ac_link) 2>conftest.er1
98418dba 8373 ac_status=$?
35996d22
AS
8374 grep -v '^ *+' conftest.er1 >conftest.err
8375 rm -f conftest.er1
8376 cat conftest.err >&5
c0d27fcc 8377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8378 (exit $ac_status); } &&
4494a266
JD
8379 { ac_try='test -z "$ac_c_werror_flag"
8380 || test ! -s conftest.err'
35996d22
AS
8381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8382 (eval $ac_try) 2>&5
8383 ac_status=$?
8384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8385 (exit $ac_status); }; } &&
8386 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8388 (eval $ac_try) 2>&5
8389 ac_status=$?
c0d27fcc 8390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8391 (exit $ac_status); }; }; then
8392 ac_cv_func_malloc_set_state=yes
8393else
8394 echo "$as_me: failed program was:" >&5
19650fd6
AS
8395sed 's/^/| /' conftest.$ac_ext >&5
8396
98418dba
CW
8397ac_cv_func_malloc_set_state=no
8398fi
35996d22
AS
8399rm -f conftest.err conftest.$ac_objext \
8400 conftest$ac_exeext conftest.$ac_ext
98418dba 8401fi
c0d27fcc 8402echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
8403echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
8404if test $ac_cv_func_malloc_set_state = yes; then
8405 :
8406else
8407 doug_lea_malloc=no
8408fi
8409
c0d27fcc 8410echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
8411echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
8412if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
8413 echo $ECHO_N "(cached) $ECHO_C" >&6
8414else
8415 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8416/* confdefs.h. */
8417_ACEOF
8418cat confdefs.h >>conftest.$ac_ext
8419cat >>conftest.$ac_ext <<_ACEOF
8420/* end confdefs.h. */
98418dba 8421extern void (* __after_morecore_hook)();
98418dba
CW
8422int
8423main ()
8424{
8425__after_morecore_hook = 0
8426 ;
8427 return 0;
8428}
8429_ACEOF
8430rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8431if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8432 (eval $ac_link) 2>conftest.er1
98418dba 8433 ac_status=$?
35996d22
AS
8434 grep -v '^ *+' conftest.er1 >conftest.err
8435 rm -f conftest.er1
8436 cat conftest.err >&5
c0d27fcc 8437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8438 (exit $ac_status); } &&
4494a266
JD
8439 { ac_try='test -z "$ac_c_werror_flag"
8440 || test ! -s conftest.err'
35996d22
AS
8441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8442 (eval $ac_try) 2>&5
8443 ac_status=$?
8444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8445 (exit $ac_status); }; } &&
8446 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8448 (eval $ac_try) 2>&5
8449 ac_status=$?
c0d27fcc 8450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8451 (exit $ac_status); }; }; then
8452 emacs_cv_var___after_morecore_hook=yes
8453else
8454 echo "$as_me: failed program was:" >&5
19650fd6
AS
8455sed 's/^/| /' conftest.$ac_ext >&5
8456
98418dba
CW
8457emacs_cv_var___after_morecore_hook=no
8458fi
35996d22
AS
8459rm -f conftest.err conftest.$ac_objext \
8460 conftest$ac_exeext conftest.$ac_ext
98418dba 8461fi
c0d27fcc 8462echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
8463echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
8464if test $emacs_cv_var___after_morecore_hook = no; then
8465 doug_lea_malloc=no
8466fi
8467if test "${system_malloc}" = "yes"; then
8468 GNU_MALLOC=no
8469 GNU_MALLOC_reason="
8470 (The GNU allocators don't work with this system configuration.)"
8471fi
8472if test "$doug_lea_malloc" = "yes" ; then
8473 if test "$GNU_MALLOC" = yes ; then
8474 GNU_MALLOC_reason="
8475 (Using Doug Lea's new malloc from the GNU C Library.)"
8476 fi
b936fae4 8477
c0d27fcc 8478cat >>confdefs.h <<\_ACEOF
98418dba 8479#define DOUG_LEA_MALLOC 1
c0d27fcc 8480_ACEOF
98418dba
CW
8481
8482fi
8483
8484if test x"${REL_ALLOC}" = x; then
8485 REL_ALLOC=${GNU_MALLOC}
8486fi
8487
8488
c0d27fcc
MR
8489
8490
8491for ac_header in stdlib.h unistd.h
98418dba
CW
8492do
8493as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
8494if eval "test \"\${$as_ac_Header+set}\" = set"; then
8495 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
8496echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8497if eval "test \"\${$as_ac_Header+set}\" = set"; then
8498 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
8499fi
8500echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8501echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 8502else
c0d27fcc
MR
8503 # Is the header compilable?
8504echo "$as_me:$LINENO: checking $ac_header usability" >&5
8505echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8506cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8507/* confdefs.h. */
8508_ACEOF
8509cat confdefs.h >>conftest.$ac_ext
8510cat >>conftest.$ac_ext <<_ACEOF
8511/* end confdefs.h. */
98418dba
CW
8512$ac_includes_default
8513#include <$ac_header>
8514_ACEOF
8515rm -f conftest.$ac_objext
c0d27fcc 8516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 8517 (eval $ac_compile) 2>conftest.er1
98418dba 8518 ac_status=$?
35996d22
AS
8519 grep -v '^ *+' conftest.er1 >conftest.err
8520 rm -f conftest.er1
8521 cat conftest.err >&5
c0d27fcc 8522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8523 (exit $ac_status); } &&
4494a266
JD
8524 { ac_try='test -z "$ac_c_werror_flag"
8525 || test ! -s conftest.err'
35996d22
AS
8526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8527 (eval $ac_try) 2>&5
8528 ac_status=$?
8529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8530 (exit $ac_status); }; } &&
8531 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8533 (eval $ac_try) 2>&5
8534 ac_status=$?
c0d27fcc 8535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8536 (exit $ac_status); }; }; then
c0d27fcc 8537 ac_header_compiler=yes
98418dba
CW
8538else
8539 echo "$as_me: failed program was:" >&5
19650fd6
AS
8540sed 's/^/| /' conftest.$ac_ext >&5
8541
c0d27fcc 8542ac_header_compiler=no
98418dba 8543fi
35996d22 8544rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
8545echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8546echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 8547
c0d27fcc
MR
8548# Is the header present?
8549echo "$as_me:$LINENO: checking $ac_header presence" >&5
8550echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8551cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8552/* confdefs.h. */
8553_ACEOF
8554cat confdefs.h >>conftest.$ac_ext
8555cat >>conftest.$ac_ext <<_ACEOF
8556/* end confdefs.h. */
98418dba
CW
8557#include <$ac_header>
8558_ACEOF
c0d27fcc 8559if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8560 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8561 ac_status=$?
6bae0ccf 8562 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8563 rm -f conftest.er1
8564 cat conftest.err >&5
c0d27fcc 8565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8566 (exit $ac_status); } >/dev/null; then
8567 if test -s conftest.err; then
8568 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 8569 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8570 else
8571 ac_cpp_err=
8572 fi
8573else
8574 ac_cpp_err=yes
8575fi
8576if test -z "$ac_cpp_err"; then
c0d27fcc 8577 ac_header_preproc=yes
98418dba
CW
8578else
8579 echo "$as_me: failed program was:" >&5
19650fd6
AS
8580sed 's/^/| /' conftest.$ac_ext >&5
8581
c0d27fcc 8582 ac_header_preproc=no
98418dba
CW
8583fi
8584rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
8585echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8586echo "${ECHO_T}$ac_header_preproc" >&6
8587
8588# So? What about this header?
35996d22
AS
8589case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8590 yes:no: )
c0d27fcc
MR
8591 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8592echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
8593 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8594echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8595 ac_header_preproc=yes
19650fd6 8596 ;;
35996d22 8597 no:yes:* )
c0d27fcc
MR
8598 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8599echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
8600 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8601echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8602 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8603echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8604 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8605echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 8606 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 8607echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
8608 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8609echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
8610 (
8611 cat <<\_ASBOX
35996d22
AS
8612## ------------------------------------------ ##
8613## Report this to the AC_PACKAGE_NAME lists. ##
8614## ------------------------------------------ ##
19650fd6
AS
8615_ASBOX
8616 ) |
8617 sed "s/^/$as_me: WARNING: /" >&2
8618 ;;
c0d27fcc
MR
8619esac
8620echo "$as_me:$LINENO: checking for $ac_header" >&5
8621echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8622if eval "test \"\${$as_ac_Header+set}\" = set"; then
8623 echo $ECHO_N "(cached) $ECHO_C" >&6
8624else
35996d22 8625 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 8626fi
c0d27fcc 8627echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 8628echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
8629
8630fi
98418dba 8631if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 8632 cat >>confdefs.h <<_ACEOF
98418dba 8633#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 8634_ACEOF
98418dba
CW
8635
8636fi
c0d27fcc 8637
98418dba
CW
8638done
8639
c0d27fcc 8640
98418dba
CW
8641for ac_func in getpagesize
8642do
8643as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 8644echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
8645echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8646if eval "test \"\${$as_ac_var+set}\" = set"; then
8647 echo $ECHO_N "(cached) $ECHO_C" >&6
8648else
8649 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8650/* confdefs.h. */
8651_ACEOF
8652cat confdefs.h >>conftest.$ac_ext
8653cat >>conftest.$ac_ext <<_ACEOF
8654/* end confdefs.h. */
35996d22
AS
8655/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8656 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8657#define $ac_func innocuous_$ac_func
8658
98418dba 8659/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8660 which can conflict with char $ac_func (); below.
8661 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8662 <limits.h> exists even on freestanding compilers. */
35996d22 8663
19650fd6
AS
8664#ifdef __STDC__
8665# include <limits.h>
8666#else
8667# include <assert.h>
8668#endif
35996d22
AS
8669
8670#undef $ac_func
8671
98418dba
CW
8672/* Override any gcc2 internal prototype to avoid an error. */
8673#ifdef __cplusplus
8674extern "C"
19650fd6 8675{
98418dba
CW
8676#endif
8677/* We use char because int might match the return type of a gcc2
8678 builtin and then its argument prototype would still apply. */
8679char $ac_func ();
98418dba
CW
8680/* The GNU C library defines this for functions which it implements
8681 to always fail with ENOSYS. Some functions are actually named
8682 something starting with __ and the normal name is an alias. */
8683#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8684choke me
8685#else
19650fd6
AS
8686char (*f) () = $ac_func;
8687#endif
8688#ifdef __cplusplus
8689}
98418dba
CW
8690#endif
8691
19650fd6
AS
8692int
8693main ()
8694{
8695return f != $ac_func;
98418dba
CW
8696 ;
8697 return 0;
8698}
8699_ACEOF
8700rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8701if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8702 (eval $ac_link) 2>conftest.er1
98418dba 8703 ac_status=$?
35996d22
AS
8704 grep -v '^ *+' conftest.er1 >conftest.err
8705 rm -f conftest.er1
8706 cat conftest.err >&5
c0d27fcc 8707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8708 (exit $ac_status); } &&
4494a266
JD
8709 { ac_try='test -z "$ac_c_werror_flag"
8710 || test ! -s conftest.err'
35996d22
AS
8711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8712 (eval $ac_try) 2>&5
8713 ac_status=$?
8714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8715 (exit $ac_status); }; } &&
8716 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8718 (eval $ac_try) 2>&5
8719 ac_status=$?
c0d27fcc 8720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8721 (exit $ac_status); }; }; then
8722 eval "$as_ac_var=yes"
8723else
8724 echo "$as_me: failed program was:" >&5
19650fd6
AS
8725sed 's/^/| /' conftest.$ac_ext >&5
8726
98418dba
CW
8727eval "$as_ac_var=no"
8728fi
35996d22
AS
8729rm -f conftest.err conftest.$ac_objext \
8730 conftest$ac_exeext conftest.$ac_ext
98418dba 8731fi
c0d27fcc 8732echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
8733echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8734if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 8735 cat >>confdefs.h <<_ACEOF
98418dba 8736#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 8737_ACEOF
98418dba
CW
8738
8739fi
8740done
8741
c0d27fcc 8742echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
8743echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
8744if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8745 echo $ECHO_N "(cached) $ECHO_C" >&6
8746else
8747 if test "$cross_compiling" = yes; then
8748 ac_cv_func_mmap_fixed_mapped=no
8749else
8750 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8751/* confdefs.h. */
8752_ACEOF
8753cat confdefs.h >>conftest.$ac_ext
8754cat >>conftest.$ac_ext <<_ACEOF
8755/* end confdefs.h. */
98418dba 8756$ac_includes_default
c0d27fcc
MR
8757/* malloc might have been renamed as rpl_malloc. */
8758#undef malloc
8759
98418dba
CW
8760/* Thanks to Mike Haertel and Jim Avera for this test.
8761 Here is a matrix of mmap possibilities:
8762 mmap private not fixed
8763 mmap private fixed at somewhere currently unmapped
8764 mmap private fixed at somewhere already mapped
8765 mmap shared not fixed
8766 mmap shared fixed at somewhere currently unmapped
8767 mmap shared fixed at somewhere already mapped
8768 For private mappings, we should verify that changes cannot be read()
8769 back from the file, nor mmap's back from the file at a different
8770 address. (There have been systems where private was not correctly
8771 implemented like the infamous i386 svr4.0, and systems where the
8772 VM page cache was not coherent with the file system buffer cache
8773 like early versions of FreeBSD and possibly contemporary NetBSD.)
8774 For shared mappings, we should conversely verify that changes get
c0d27fcc 8775 propagated back to all the places they're supposed to be.
98418dba
CW
8776
8777 Grep wants private fixed already mapped.
8778 The main things grep needs to know about mmap are:
8779 * does it exist and is it safe to write into the mmap'd area
8780 * how to use it (BSD variants) */
8781
8782#include <fcntl.h>
8783#include <sys/mman.h>
8784
8785#if !STDC_HEADERS && !HAVE_STDLIB_H
8786char *malloc ();
8787#endif
8788
8789/* This mess was copied from the GNU getpagesize.h. */
8790#if !HAVE_GETPAGESIZE
8791/* Assume that all systems that can run configure have sys/param.h. */
8792# if !HAVE_SYS_PARAM_H
8793# define HAVE_SYS_PARAM_H 1
8794# endif
8795
8796# ifdef _SC_PAGESIZE
8797# define getpagesize() sysconf(_SC_PAGESIZE)
8798# else /* no _SC_PAGESIZE */
8799# if HAVE_SYS_PARAM_H
8800# include <sys/param.h>
8801# ifdef EXEC_PAGESIZE
8802# define getpagesize() EXEC_PAGESIZE
8803# else /* no EXEC_PAGESIZE */
8804# ifdef NBPG
8805# define getpagesize() NBPG * CLSIZE
8806# ifndef CLSIZE
8807# define CLSIZE 1
8808# endif /* no CLSIZE */
8809# else /* no NBPG */
8810# ifdef NBPC
8811# define getpagesize() NBPC
8812# else /* no NBPC */
8813# ifdef PAGESIZE
8814# define getpagesize() PAGESIZE
8815# endif /* PAGESIZE */
8816# endif /* no NBPC */
8817# endif /* no NBPG */
8818# endif /* no EXEC_PAGESIZE */
8819# else /* no HAVE_SYS_PARAM_H */
8820# define getpagesize() 8192 /* punt totally */
8821# endif /* no HAVE_SYS_PARAM_H */
8822# endif /* no _SC_PAGESIZE */
8823
8824#endif /* no HAVE_GETPAGESIZE */
8825
8826int
8827main ()
8828{
8829 char *data, *data2, *data3;
8830 int i, pagesize;
8831 int fd;
8832
8833 pagesize = getpagesize ();
8834
8835 /* First, make a file with some known garbage in it. */
8836 data = (char *) malloc (pagesize);
8837 if (!data)
8838 exit (1);
8839 for (i = 0; i < pagesize; ++i)
8840 *(data + i) = rand ();
8841 umask (0);
8842 fd = creat ("conftest.mmap", 0600);
8843 if (fd < 0)
8844 exit (1);
8845 if (write (fd, data, pagesize) != pagesize)
8846 exit (1);
8847 close (fd);
8848
8849 /* Next, try to mmap the file at a fixed address which already has
8850 something else allocated at it. If we can, also make sure that
8851 we see the same garbage. */
8852 fd = open ("conftest.mmap", O_RDWR);
8853 if (fd < 0)
8854 exit (1);
8855 data2 = (char *) malloc (2 * pagesize);
8856 if (!data2)
8857 exit (1);
35996d22 8858 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 8859 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
35996d22 8860 MAP_PRIVATE | MAP_FIXED, fd, 0L))
98418dba
CW
8861 exit (1);
8862 for (i = 0; i < pagesize; ++i)
8863 if (*(data + i) != *(data2 + i))
8864 exit (1);
8865
8866 /* Finally, make sure that changes to the mapped area do not
8867 percolate back to the file as seen by read(). (This is a bug on
8868 some variants of i386 svr4.0.) */
8869 for (i = 0; i < pagesize; ++i)
8870 *(data2 + i) = *(data2 + i) + 1;
8871 data3 = (char *) malloc (pagesize);
8872 if (!data3)
8873 exit (1);
8874 if (read (fd, data3, pagesize) != pagesize)
8875 exit (1);
8876 for (i = 0; i < pagesize; ++i)
8877 if (*(data + i) != *(data3 + i))
8878 exit (1);
8879 close (fd);
8880 exit (0);
8881}
8882_ACEOF
8883rm -f conftest$ac_exeext
c0d27fcc 8884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8885 (eval $ac_link) 2>&5
8886 ac_status=$?
c0d27fcc 8887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 8889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8890 (eval $ac_try) 2>&5
8891 ac_status=$?
c0d27fcc 8892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8893 (exit $ac_status); }; }; then
8894 ac_cv_func_mmap_fixed_mapped=yes
8895else
8896 echo "$as_me: program exited with status $ac_status" >&5
8897echo "$as_me: failed program was:" >&5
19650fd6
AS
8898sed 's/^/| /' conftest.$ac_ext >&5
8899
c0d27fcc 8900( exit $ac_status )
98418dba
CW
8901ac_cv_func_mmap_fixed_mapped=no
8902fi
35996d22 8903rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
8904fi
8905fi
c0d27fcc 8906echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
8907echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
8908if test $ac_cv_func_mmap_fixed_mapped = yes; then
8909
c0d27fcc 8910cat >>confdefs.h <<\_ACEOF
98418dba 8911#define HAVE_MMAP 1
c0d27fcc 8912_ACEOF
98418dba
CW
8913
8914fi
8915rm -f conftest.mmap
8916
8917if test $use_mmap_for_buffers = yes; then
8918 REL_ALLOC=no
8919fi
8920
8921LIBS="$libsrc_libs $LIBS"
8922
c0d27fcc
MR
8923
8924echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
8925echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
8926if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
8927 echo $ECHO_N "(cached) $ECHO_C" >&6
8928else
8929 ac_check_lib_save_LIBS=$LIBS
8930LIBS="-ldnet $LIBS"
8931cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8932/* confdefs.h. */
8933_ACEOF
8934cat confdefs.h >>conftest.$ac_ext
8935cat >>conftest.$ac_ext <<_ACEOF
8936/* end confdefs.h. */
98418dba
CW
8937
8938/* Override any gcc2 internal prototype to avoid an error. */
8939#ifdef __cplusplus
8940extern "C"
8941#endif
8942/* We use char because int might match the return type of a gcc2
8943 builtin and then its argument prototype would still apply. */
8944char dnet_ntoa ();
98418dba
CW
8945int
8946main ()
8947{
8948dnet_ntoa ();
8949 ;
8950 return 0;
8951}
8952_ACEOF
8953rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8954if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8955 (eval $ac_link) 2>conftest.er1
98418dba 8956 ac_status=$?
35996d22
AS
8957 grep -v '^ *+' conftest.er1 >conftest.err
8958 rm -f conftest.er1
8959 cat conftest.err >&5
c0d27fcc 8960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8961 (exit $ac_status); } &&
4494a266
JD
8962 { ac_try='test -z "$ac_c_werror_flag"
8963 || test ! -s conftest.err'
35996d22
AS
8964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8965 (eval $ac_try) 2>&5
8966 ac_status=$?
8967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8968 (exit $ac_status); }; } &&
8969 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8971 (eval $ac_try) 2>&5
8972 ac_status=$?
c0d27fcc 8973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8974 (exit $ac_status); }; }; then
8975 ac_cv_lib_dnet_dnet_ntoa=yes
8976else
8977 echo "$as_me: failed program was:" >&5
19650fd6
AS
8978sed 's/^/| /' conftest.$ac_ext >&5
8979
98418dba
CW
8980ac_cv_lib_dnet_dnet_ntoa=no
8981fi
35996d22
AS
8982rm -f conftest.err conftest.$ac_objext \
8983 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8984LIBS=$ac_check_lib_save_LIBS
8985fi
c0d27fcc 8986echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
8987echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
8988if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 8989 cat >>confdefs.h <<_ACEOF
98418dba 8990#define HAVE_LIBDNET 1
c0d27fcc 8991_ACEOF
98418dba
CW
8992
8993 LIBS="-ldnet $LIBS"
8994
8995fi
8996
c0d27fcc
MR
8997
8998echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
8999echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
9000if test "${ac_cv_lib_Xbsd_main+set}" = set; then
9001 echo $ECHO_N "(cached) $ECHO_C" >&6
9002else
9003 ac_check_lib_save_LIBS=$LIBS
9004LIBS="-lXbsd $LIBS"
9005cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9006/* confdefs.h. */
9007_ACEOF
9008cat confdefs.h >>conftest.$ac_ext
9009cat >>conftest.$ac_ext <<_ACEOF
9010/* end confdefs.h. */
98418dba 9011
c0d27fcc 9012
98418dba
CW
9013int
9014main ()
9015{
9016main ();
9017 ;
9018 return 0;
9019}
9020_ACEOF
9021rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9022if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9023 (eval $ac_link) 2>conftest.er1
98418dba 9024 ac_status=$?
35996d22
AS
9025 grep -v '^ *+' conftest.er1 >conftest.err
9026 rm -f conftest.er1
9027 cat conftest.err >&5
c0d27fcc 9028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9029 (exit $ac_status); } &&
4494a266
JD
9030 { ac_try='test -z "$ac_c_werror_flag"
9031 || test ! -s conftest.err'
35996d22
AS
9032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9033 (eval $ac_try) 2>&5
9034 ac_status=$?
9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9036 (exit $ac_status); }; } &&
9037 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9039 (eval $ac_try) 2>&5
9040 ac_status=$?
c0d27fcc 9041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9042 (exit $ac_status); }; }; then
9043 ac_cv_lib_Xbsd_main=yes
9044else
9045 echo "$as_me: failed program was:" >&5
19650fd6
AS
9046sed 's/^/| /' conftest.$ac_ext >&5
9047
98418dba
CW
9048ac_cv_lib_Xbsd_main=no
9049fi
35996d22
AS
9050rm -f conftest.err conftest.$ac_objext \
9051 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9052LIBS=$ac_check_lib_save_LIBS
9053fi
c0d27fcc 9054echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
9055echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
9056if test $ac_cv_lib_Xbsd_main = yes; then
9057 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
9058fi
9059
c0d27fcc
MR
9060
9061
9062echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
9063echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
9064if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
9065 echo $ECHO_N "(cached) $ECHO_C" >&6
9066else
9067 ac_check_lib_save_LIBS=$LIBS
9068LIBS="-lpthreads $LIBS"
9069cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9070/* confdefs.h. */
9071_ACEOF
9072cat confdefs.h >>conftest.$ac_ext
9073cat >>conftest.$ac_ext <<_ACEOF
9074/* end confdefs.h. */
98418dba
CW
9075
9076/* Override any gcc2 internal prototype to avoid an error. */
9077#ifdef __cplusplus
9078extern "C"
9079#endif
9080/* We use char because int might match the return type of a gcc2
9081 builtin and then its argument prototype would still apply. */
9082char cma_open ();
98418dba
CW
9083int
9084main ()
9085{
9086cma_open ();
9087 ;
9088 return 0;
9089}
9090_ACEOF
9091rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9092if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9093 (eval $ac_link) 2>conftest.er1
98418dba 9094 ac_status=$?
35996d22
AS
9095 grep -v '^ *+' conftest.er1 >conftest.err
9096 rm -f conftest.er1
9097 cat conftest.err >&5
c0d27fcc 9098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9099 (exit $ac_status); } &&
4494a266
JD
9100 { ac_try='test -z "$ac_c_werror_flag"
9101 || test ! -s conftest.err'
35996d22
AS
9102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9103 (eval $ac_try) 2>&5
9104 ac_status=$?
9105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9106 (exit $ac_status); }; } &&
9107 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9109 (eval $ac_try) 2>&5
9110 ac_status=$?
c0d27fcc 9111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9112 (exit $ac_status); }; }; then
9113 ac_cv_lib_pthreads_cma_open=yes
9114else
9115 echo "$as_me: failed program was:" >&5
19650fd6
AS
9116sed 's/^/| /' conftest.$ac_ext >&5
9117
98418dba
CW
9118ac_cv_lib_pthreads_cma_open=no
9119fi
35996d22
AS
9120rm -f conftest.err conftest.$ac_objext \
9121 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9122LIBS=$ac_check_lib_save_LIBS
9123fi
c0d27fcc 9124echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
9125echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
9126if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 9127 cat >>confdefs.h <<_ACEOF
98418dba 9128#define HAVE_LIBPTHREADS 1
c0d27fcc 9129_ACEOF
98418dba
CW
9130
9131 LIBS="-lpthreads $LIBS"
9132
9133fi
9134
c0d27fcc
MR
9135
9136echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
9137echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
9138if test -d /usr/X386/include; then
9139 HAVE_XFREE386=yes
9140 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
9141else
9142 HAVE_XFREE386=no
9143fi
c0d27fcc 9144echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
9145echo "${ECHO_T}$HAVE_XFREE386" >&6
9146
55597d70
DL
9147
9148case ${host_os} in
9149aix*)
9150 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
9151echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
9152if test "${gdb_cv_bigtoc+set}" = set; then
9153 echo $ECHO_N "(cached) $ECHO_C" >&6
9154else
9155
9156 case $GCC in
9157 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9158 *) gdb_cv_bigtoc=-bbigtoc ;;
9159 esac
9160
9161 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9162 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9163/* confdefs.h. */
9164_ACEOF
9165cat confdefs.h >>conftest.$ac_ext
9166cat >>conftest.$ac_ext <<_ACEOF
9167/* end confdefs.h. */
55597d70
DL
9168
9169int
9170main ()
9171{
9172int i;
9173 ;
9174 return 0;
9175}
9176_ACEOF
9177rm -f conftest.$ac_objext conftest$ac_exeext
9178if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9179 (eval $ac_link) 2>conftest.er1
55597d70 9180 ac_status=$?
35996d22
AS
9181 grep -v '^ *+' conftest.er1 >conftest.err
9182 rm -f conftest.er1
9183 cat conftest.err >&5
55597d70
DL
9184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9185 (exit $ac_status); } &&
4494a266
JD
9186 { ac_try='test -z "$ac_c_werror_flag"
9187 || test ! -s conftest.err'
35996d22
AS
9188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9189 (eval $ac_try) 2>&5
9190 ac_status=$?
9191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9192 (exit $ac_status); }; } &&
9193 { ac_try='test -s conftest$ac_exeext'
55597d70
DL
9194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9195 (eval $ac_try) 2>&5
9196 ac_status=$?
9197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9198 (exit $ac_status); }; }; then
9199 :
9200else
9201 echo "$as_me: failed program was:" >&5
19650fd6
AS
9202sed 's/^/| /' conftest.$ac_ext >&5
9203
55597d70
DL
9204gdb_cv_bigtoc=
9205fi
35996d22
AS
9206rm -f conftest.err conftest.$ac_objext \
9207 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
9208
9209fi
9210echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
9211echo "${ECHO_T}$gdb_cv_bigtoc" >&6
9212 ;;
9213esac
9214
ae1a998c
RS
9215# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
9216# used for the tests that follow. We set them back to REAL_CFLAGS and
9217# REAL_CPPFLAGS later on.
98418dba
CW
9218
9219REAL_CPPFLAGS="$CPPFLAGS"
9220
9221if test "${HAVE_X11}" = "yes"; then
9222 DEFS="$C_SWITCH_X_SITE $DEFS"
9223 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
9224 LIBS="$LIBX $LIBS"
9225 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
9226 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
9227
9228 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
9229 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
9230 # but it's more convenient here to set LD_RUN_PATH
9231 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
9232 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
9233 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
9234 export LD_RUN_PATH
9235 fi
9236
9237 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 9238 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
9239echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
9240 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9241/* confdefs.h. */
9242_ACEOF
9243cat confdefs.h >>conftest.$ac_ext
9244cat >>conftest.$ac_ext <<_ACEOF
9245/* end confdefs.h. */
98418dba 9246
98418dba
CW
9247int
9248main ()
9249{
9250XOpenDisplay ("foo");
9251 ;
9252 return 0;
9253}
9254_ACEOF
9255rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9256if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9257 (eval $ac_link) 2>conftest.er1
98418dba 9258 ac_status=$?
35996d22
AS
9259 grep -v '^ *+' conftest.er1 >conftest.err
9260 rm -f conftest.er1
9261 cat conftest.err >&5
c0d27fcc 9262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9263 (exit $ac_status); } &&
4494a266
JD
9264 { ac_try='test -z "$ac_c_werror_flag"
9265 || test ! -s conftest.err'
c0d27fcc 9266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9267 (eval $ac_try) 2>&5
9268 ac_status=$?
c0d27fcc 9269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
9270 (exit $ac_status); }; } &&
9271 { ac_try='test -s conftest$ac_exeext'
9272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9273 (eval $ac_try) 2>&5
9274 ac_status=$?
9275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9276 (exit $ac_status); }; }; then
9277 xlinux_first_failure=no
98418dba
CW
9278else
9279 echo "$as_me: failed program was:" >&5
19650fd6
AS
9280sed 's/^/| /' conftest.$ac_ext >&5
9281
98418dba
CW
9282xlinux_first_failure=yes
9283fi
35996d22
AS
9284rm -f conftest.err conftest.$ac_objext \
9285 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9286 if test "${xlinux_first_failure}" = "yes"; then
9287 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
9288 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
9289 OLD_CPPFLAGS="$CPPFLAGS"
9290 OLD_LIBS="$LIBS"
9291 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
9292 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
9293 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
9294 LIBS="$LIBS -b i486-linuxaout"
9295 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9296/* confdefs.h. */
9297_ACEOF
9298cat confdefs.h >>conftest.$ac_ext
9299cat >>conftest.$ac_ext <<_ACEOF
9300/* end confdefs.h. */
98418dba 9301
98418dba
CW
9302int
9303main ()
9304{
9305XOpenDisplay ("foo");
9306 ;
9307 return 0;
9308}
9309_ACEOF
9310rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9311if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9312 (eval $ac_link) 2>conftest.er1
98418dba 9313 ac_status=$?
35996d22
AS
9314 grep -v '^ *+' conftest.er1 >conftest.err
9315 rm -f conftest.er1
9316 cat conftest.err >&5
c0d27fcc 9317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9318 (exit $ac_status); } &&
4494a266
JD
9319 { ac_try='test -z "$ac_c_werror_flag"
9320 || test ! -s conftest.err'
35996d22
AS
9321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9322 (eval $ac_try) 2>&5
9323 ac_status=$?
9324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9325 (exit $ac_status); }; } &&
9326 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9328 (eval $ac_try) 2>&5
9329 ac_status=$?
c0d27fcc 9330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9331 (exit $ac_status); }; }; then
9332 xlinux_second_failure=no
9333else
9334 echo "$as_me: failed program was:" >&5
19650fd6
AS
9335sed 's/^/| /' conftest.$ac_ext >&5
9336
98418dba
CW
9337xlinux_second_failure=yes
9338fi
35996d22
AS
9339rm -f conftest.err conftest.$ac_objext \
9340 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9341 if test "${xlinux_second_failure}" = "yes"; then
9342 # If we get the same failure with -b, there is no use adding -b.
9343 # So take it out. This plays safe.
9344 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
9345 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
9346 CPPFLAGS="$OLD_CPPFLAGS"
9347 LIBS="$OLD_LIBS"
c0d27fcc 9348 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9349echo "${ECHO_T}no" >&6
9350 else
c0d27fcc 9351 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
9352echo "${ECHO_T}yes" >&6
9353 fi
9354 else
c0d27fcc 9355 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9356echo "${ECHO_T}no" >&6
9357 fi
9358 fi
9359
9360 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
9361 # header files included from there.
c0d27fcc 9362 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
9363echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
9364 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9365/* confdefs.h. */
9366_ACEOF
9367cat confdefs.h >>conftest.$ac_ext
9368cat >>conftest.$ac_ext <<_ACEOF
9369/* end confdefs.h. */
98418dba
CW
9370#include <X11/Xlib.h>
9371#include <X11/XKBlib.h>
98418dba
CW
9372int
9373main ()
9374{
9375XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
9376 ;
9377 return 0;
9378}
9379_ACEOF
9380rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9382 (eval $ac_link) 2>conftest.er1
98418dba 9383 ac_status=$?
35996d22
AS
9384 grep -v '^ *+' conftest.er1 >conftest.err
9385 rm -f conftest.er1
9386 cat conftest.err >&5
c0d27fcc 9387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9388 (exit $ac_status); } &&
4494a266
JD
9389 { ac_try='test -z "$ac_c_werror_flag"
9390 || test ! -s conftest.err'
35996d22
AS
9391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9392 (eval $ac_try) 2>&5
9393 ac_status=$?
9394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9395 (exit $ac_status); }; } &&
9396 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9398 (eval $ac_try) 2>&5
9399 ac_status=$?
c0d27fcc 9400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9401 (exit $ac_status); }; }; then
9402 emacs_xkb=yes
9403else
9404 echo "$as_me: failed program was:" >&5
19650fd6
AS
9405sed 's/^/| /' conftest.$ac_ext >&5
9406
98418dba
CW
9407emacs_xkb=no
9408fi
35996d22
AS
9409rm -f conftest.err conftest.$ac_objext \
9410 conftest$ac_exeext conftest.$ac_ext
c0d27fcc 9411 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
9412echo "${ECHO_T}$emacs_xkb" >&6
9413 if test $emacs_xkb = yes; then
b936fae4 9414
c0d27fcc 9415cat >>confdefs.h <<\_ACEOF
98418dba 9416#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 9417_ACEOF
98418dba
CW
9418
9419 fi
9420
c0d27fcc
MR
9421
9422
9423
9424
98418dba
CW
9425for ac_func in XrmSetDatabase XScreenResourceString \
9426XScreenNumberOfScreen XSetWMProtocols
9427do
9428as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 9429echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
9430echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9431if eval "test \"\${$as_ac_var+set}\" = set"; then
9432 echo $ECHO_N "(cached) $ECHO_C" >&6
9433else
9434 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9435/* confdefs.h. */
9436_ACEOF
9437cat confdefs.h >>conftest.$ac_ext
9438cat >>conftest.$ac_ext <<_ACEOF
9439/* end confdefs.h. */
35996d22
AS
9440/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9441 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9442#define $ac_func innocuous_$ac_func
9443
98418dba 9444/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9445 which can conflict with char $ac_func (); below.
9446 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9447 <limits.h> exists even on freestanding compilers. */
35996d22 9448
19650fd6
AS
9449#ifdef __STDC__
9450# include <limits.h>
9451#else
9452# include <assert.h>
9453#endif
35996d22
AS
9454
9455#undef $ac_func
9456
98418dba
CW
9457/* Override any gcc2 internal prototype to avoid an error. */
9458#ifdef __cplusplus
9459extern "C"
19650fd6 9460{
98418dba
CW
9461#endif
9462/* We use char because int might match the return type of a gcc2
9463 builtin and then its argument prototype would still apply. */
9464char $ac_func ();
98418dba
CW
9465/* The GNU C library defines this for functions which it implements
9466 to always fail with ENOSYS. Some functions are actually named
9467 something starting with __ and the normal name is an alias. */
9468#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9469choke me
9470#else
19650fd6
AS
9471char (*f) () = $ac_func;
9472#endif
9473#ifdef __cplusplus
9474}
98418dba
CW
9475#endif
9476
19650fd6
AS
9477int
9478main ()
9479{
9480return f != $ac_func;
98418dba
CW
9481 ;
9482 return 0;
9483}
9484_ACEOF
9485rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9487 (eval $ac_link) 2>conftest.er1
98418dba 9488 ac_status=$?
35996d22
AS
9489 grep -v '^ *+' conftest.er1 >conftest.err
9490 rm -f conftest.er1
9491 cat conftest.err >&5
c0d27fcc 9492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9493 (exit $ac_status); } &&
4494a266
JD
9494 { ac_try='test -z "$ac_c_werror_flag"
9495 || test ! -s conftest.err'
35996d22
AS
9496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9497 (eval $ac_try) 2>&5
9498 ac_status=$?
9499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9500 (exit $ac_status); }; } &&
9501 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9503 (eval $ac_try) 2>&5
9504 ac_status=$?
c0d27fcc 9505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9506 (exit $ac_status); }; }; then
9507 eval "$as_ac_var=yes"
9508else
9509 echo "$as_me: failed program was:" >&5
19650fd6
AS
9510sed 's/^/| /' conftest.$ac_ext >&5
9511
98418dba
CW
9512eval "$as_ac_var=no"
9513fi
35996d22
AS
9514rm -f conftest.err conftest.$ac_objext \
9515 conftest$ac_exeext conftest.$ac_ext
98418dba 9516fi
c0d27fcc 9517echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
9518echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9519if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9520 cat >>confdefs.h <<_ACEOF
98418dba 9521#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9522_ACEOF
98418dba
CW
9523
9524fi
9525done
9526
9527fi
9528
9529if test "${window_system}" = "x11"; then
c0d27fcc 9530 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
9531echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
9532 if test "${emacs_cv_x11_version_6+set}" = set; then
9533 echo $ECHO_N "(cached) $ECHO_C" >&6
9534else
9535 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9536/* confdefs.h. */
9537_ACEOF
9538cat confdefs.h >>conftest.$ac_ext
9539cat >>conftest.$ac_ext <<_ACEOF
9540/* end confdefs.h. */
98418dba 9541#include <X11/Xlib.h>
98418dba
CW
9542int
9543main ()
9544{
9545#if XlibSpecificationRelease < 6
9546fail;
9547#endif
9548
9549 ;
9550 return 0;
9551}
9552_ACEOF
9553rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9554if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9555 (eval $ac_link) 2>conftest.er1
98418dba 9556 ac_status=$?
35996d22
AS
9557 grep -v '^ *+' conftest.er1 >conftest.err
9558 rm -f conftest.er1
9559 cat conftest.err >&5
c0d27fcc 9560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9561 (exit $ac_status); } &&
4494a266
JD
9562 { ac_try='test -z "$ac_c_werror_flag"
9563 || test ! -s conftest.err'
35996d22
AS
9564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9565 (eval $ac_try) 2>&5
9566 ac_status=$?
9567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9568 (exit $ac_status); }; } &&
9569 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9571 (eval $ac_try) 2>&5
9572 ac_status=$?
c0d27fcc 9573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9574 (exit $ac_status); }; }; then
9575 emacs_cv_x11_version_6=yes
9576else
9577 echo "$as_me: failed program was:" >&5
19650fd6
AS
9578sed 's/^/| /' conftest.$ac_ext >&5
9579
98418dba
CW
9580emacs_cv_x11_version_6=no
9581fi
35996d22
AS
9582rm -f conftest.err conftest.$ac_objext \
9583 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9584fi
9585
9586 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 9587 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 9588echo "${ECHO_T}6 or newer" >&6
b936fae4 9589
c0d27fcc 9590cat >>confdefs.h <<\_ACEOF
98418dba 9591#define HAVE_X11R6 1
c0d27fcc 9592_ACEOF
98418dba
CW
9593
9594 else
c0d27fcc 9595 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
9596echo "${ECHO_T}before 6" >&6
9597 fi
9598fi
9599
9600if test "${window_system}" = "x11"; then
c0d27fcc 9601 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
9602echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
9603 if test "${emacs_cv_x11_version_5+set}" = set; then
9604 echo $ECHO_N "(cached) $ECHO_C" >&6
9605else
9606 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9607/* confdefs.h. */
9608_ACEOF
9609cat confdefs.h >>conftest.$ac_ext
9610cat >>conftest.$ac_ext <<_ACEOF
9611/* end confdefs.h. */
98418dba 9612#include <X11/Xlib.h>
98418dba
CW
9613int
9614main ()
9615{
9616#if XlibSpecificationRelease < 5
9617fail;
9618#endif
9619
9620 ;
9621 return 0;
9622}
9623_ACEOF
9624rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9625if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9626 (eval $ac_link) 2>conftest.er1
98418dba 9627 ac_status=$?
35996d22
AS
9628 grep -v '^ *+' conftest.er1 >conftest.err
9629 rm -f conftest.er1
9630 cat conftest.err >&5
c0d27fcc 9631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9632 (exit $ac_status); } &&
4494a266
JD
9633 { ac_try='test -z "$ac_c_werror_flag"
9634 || test ! -s conftest.err'
35996d22
AS
9635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9636 (eval $ac_try) 2>&5
9637 ac_status=$?
9638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9639 (exit $ac_status); }; } &&
9640 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9642 (eval $ac_try) 2>&5
9643 ac_status=$?
c0d27fcc 9644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9645 (exit $ac_status); }; }; then
9646 emacs_cv_x11_version_5=yes
9647else
9648 echo "$as_me: failed program was:" >&5
19650fd6
AS
9649sed 's/^/| /' conftest.$ac_ext >&5
9650
98418dba
CW
9651emacs_cv_x11_version_5=no
9652fi
35996d22
AS
9653rm -f conftest.err conftest.$ac_objext \
9654 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9655fi
9656
9657 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 9658 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
9659echo "${ECHO_T}5 or newer" >&6
9660 HAVE_X11R5=yes
b936fae4 9661
c0d27fcc 9662cat >>confdefs.h <<\_ACEOF
98418dba 9663#define HAVE_X11R5 1
c0d27fcc 9664_ACEOF
98418dba
CW
9665
9666 else
9667 HAVE_X11R5=no
c0d27fcc 9668 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
9669echo "${ECHO_T}before 5" >&6
9670 fi
9671fi
9672
488dd4c4
JD
9673
9674
9675HAVE_GTK=no
9676if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 9677 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
9678 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
9679echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
9680 { (exit 1); exit 1; }; };
9681 fi
9682 GLIB_REQUIRED=2.0.1
e512ece1 9683 GTK_REQUIRED=2.0.1
488dd4c4
JD
9684 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
9685
9686 if test "X${with_pkg_config_prog}" != X; then
9687 PKG_CONFIG="${with_pkg_config_prog}"
9688 fi
9689
9690 succeeded=no
9691
9692 if test -z "$PKG_CONFIG"; then
9693 # Extract the first word of "pkg-config", so it can be a program name with args.
9694set dummy pkg-config; ac_word=$2
9695echo "$as_me:$LINENO: checking for $ac_word" >&5
9696echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9697if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9698 echo $ECHO_N "(cached) $ECHO_C" >&6
9699else
9700 case $PKG_CONFIG in
9701 [\\/]* | ?:[\\/]*)
9702 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9703 ;;
9704 *)
9705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9706for as_dir in $PATH
9707do
9708 IFS=$as_save_IFS
9709 test -z "$as_dir" && as_dir=.
9710 for ac_exec_ext in '' $ac_executable_extensions; do
9711 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9712 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9713 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9714 break 2
9715 fi
9716done
9717done
9718
9719 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9720 ;;
9721esac
9722fi
9723PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9724
9725if test -n "$PKG_CONFIG"; then
9726 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
9727echo "${ECHO_T}$PKG_CONFIG" >&6
9728else
9729 echo "$as_me:$LINENO: result: no" >&5
9730echo "${ECHO_T}no" >&6
9731fi
9732
9733 fi
9734
9735 if test "$PKG_CONFIG" = "no" ; then
9736 echo "*** The pkg-config script could not be found. Make sure it is"
9737 echo "*** in your path, or give the full path to pkg-config with"
9738 echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog."
9739 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
9740 else
9741 PKG_CONFIG_MIN_VERSION=0.9.0
9742 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9743 echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
9744echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6
9745
9746 if $PKG_CONFIG --exists "$GTK_MODULES" ; then
9747 echo "$as_me:$LINENO: result: yes" >&5
9748echo "${ECHO_T}yes" >&6
9749 succeeded=yes
9750
9751 echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
9752echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
9753 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
9754 echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
9755echo "${ECHO_T}$GTK_CFLAGS" >&6
9756
9757 echo "$as_me:$LINENO: checking GTK_LIBS" >&5
9758echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
9759 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
9760 echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
9761echo "${ECHO_T}$GTK_LIBS" >&6
9762 else
9763 GTK_CFLAGS=""
9764 GTK_LIBS=""
9765 ## If we have a custom action on failure, don't print errors, but
9766 ## do set a variable so people can do so.
9767 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
9768 echo $GTK_PKG_ERRORS
9769 fi
9770
9771
9772
9773 else
9774 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9775 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9776 fi
9777 fi
9778
9779 if test $succeeded = yes; then
9780 :
9781 else
9782 { { 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
9783echo "$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;}
9784 { (exit 1); exit 1; }; }
9785 fi
9786
9787
9788
9789 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
9790 CFLAGS="$CFLAGS $GTK_CFLAGS"
9791 LIBS="$GTK_LIBS $LIBS"
488dd4c4
JD
9792 HAVE_GTK=yes
9793
9794cat >>confdefs.h <<\_ACEOF
9795#define HAVE_GTK 1
9796_ACEOF
9797
9798 USE_X_TOOLKIT=none
9799
d0a80c21
JD
9800 if test "$with_toolkit_scroll_bars" != no; then
9801 with_toolkit_scroll_bars=yes
9802 fi
57669b57
JD
9803
9804 HAVE_GTK_MULTIDISPLAY=no
9805
9806for ac_func in gdk_display_open
9807do
9808as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9809echo "$as_me:$LINENO: checking for $ac_func" >&5
9810echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9811if eval "test \"\${$as_ac_var+set}\" = set"; then
9812 echo $ECHO_N "(cached) $ECHO_C" >&6
9813else
9814 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
9815/* confdefs.h. */
9816_ACEOF
9817cat confdefs.h >>conftest.$ac_ext
9818cat >>conftest.$ac_ext <<_ACEOF
9819/* end confdefs.h. */
35996d22
AS
9820/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9821 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9822#define $ac_func innocuous_$ac_func
9823
57669b57
JD
9824/* System header to define __stub macros and hopefully few prototypes,
9825 which can conflict with char $ac_func (); below.
9826 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9827 <limits.h> exists even on freestanding compilers. */
35996d22 9828
57669b57
JD
9829#ifdef __STDC__
9830# include <limits.h>
9831#else
9832# include <assert.h>
9833#endif
35996d22
AS
9834
9835#undef $ac_func
9836
57669b57
JD
9837/* Override any gcc2 internal prototype to avoid an error. */
9838#ifdef __cplusplus
9839extern "C"
9840{
9841#endif
9842/* We use char because int might match the return type of a gcc2
9843 builtin and then its argument prototype would still apply. */
9844char $ac_func ();
9845/* The GNU C library defines this for functions which it implements
9846 to always fail with ENOSYS. Some functions are actually named
9847 something starting with __ and the normal name is an alias. */
9848#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9849choke me
9850#else
9851char (*f) () = $ac_func;
9852#endif
9853#ifdef __cplusplus
9854}
9855#endif
9856
9857int
9858main ()
9859{
9860return f != $ac_func;
9861 ;
9862 return 0;
9863}
9864_ACEOF
9865rm -f conftest.$ac_objext conftest$ac_exeext
9866if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9867 (eval $ac_link) 2>conftest.er1
57669b57 9868 ac_status=$?
35996d22
AS
9869 grep -v '^ *+' conftest.er1 >conftest.err
9870 rm -f conftest.er1
9871 cat conftest.err >&5
57669b57
JD
9872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9873 (exit $ac_status); } &&
4494a266
JD
9874 { ac_try='test -z "$ac_c_werror_flag"
9875 || test ! -s conftest.err'
35996d22
AS
9876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9877 (eval $ac_try) 2>&5
9878 ac_status=$?
9879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9880 (exit $ac_status); }; } &&
9881 { ac_try='test -s conftest$ac_exeext'
57669b57
JD
9882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9883 (eval $ac_try) 2>&5
9884 ac_status=$?
9885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9886 (exit $ac_status); }; }; then
9887 eval "$as_ac_var=yes"
9888else
9889 echo "$as_me: failed program was:" >&5
9890sed 's/^/| /' conftest.$ac_ext >&5
9891
9892eval "$as_ac_var=no"
9893fi
35996d22
AS
9894rm -f conftest.err conftest.$ac_objext \
9895 conftest$ac_exeext conftest.$ac_ext
57669b57
JD
9896fi
9897echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9898echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9899if test `eval echo '${'$as_ac_var'}'` = yes; then
9900 cat >>confdefs.h <<_ACEOF
9901#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9902_ACEOF
9903 HAVE_GTK_MULTIDISPLAY=yes
9904fi
9905done
9906
9907 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
9908
9909cat >>confdefs.h <<\_ACEOF
9910#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
9911_ACEOF
9912
9913 fi
9914 HAVE_GTK_FILE_SELECTION=no
9915
9916for ac_func in gtk_file_selection_new
9917do
9918as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9919echo "$as_me:$LINENO: checking for $ac_func" >&5
9920echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9921if eval "test \"\${$as_ac_var+set}\" = set"; then
9922 echo $ECHO_N "(cached) $ECHO_C" >&6
9923else
9924 cat >conftest.$ac_ext <<_ACEOF
9925/* confdefs.h. */
9926_ACEOF
9927cat confdefs.h >>conftest.$ac_ext
9928cat >>conftest.$ac_ext <<_ACEOF
9929/* end confdefs.h. */
9930/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9931 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9932#define $ac_func innocuous_$ac_func
9933
9934/* System header to define __stub macros and hopefully few prototypes,
9935 which can conflict with char $ac_func (); below.
9936 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9937 <limits.h> exists even on freestanding compilers. */
9938
9939#ifdef __STDC__
9940# include <limits.h>
9941#else
9942# include <assert.h>
9943#endif
9944
9945#undef $ac_func
9946
9947/* Override any gcc2 internal prototype to avoid an error. */
9948#ifdef __cplusplus
9949extern "C"
9950{
9951#endif
9952/* We use char because int might match the return type of a gcc2
9953 builtin and then its argument prototype would still apply. */
9954char $ac_func ();
9955/* The GNU C library defines this for functions which it implements
9956 to always fail with ENOSYS. Some functions are actually named
9957 something starting with __ and the normal name is an alias. */
9958#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9959choke me
9960#else
9961char (*f) () = $ac_func;
9962#endif
9963#ifdef __cplusplus
9964}
9965#endif
9966
9967int
9968main ()
9969{
9970return f != $ac_func;
9971 ;
9972 return 0;
9973}
9974_ACEOF
9975rm -f conftest.$ac_objext conftest$ac_exeext
9976if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9977 (eval $ac_link) 2>conftest.er1
9978 ac_status=$?
9979 grep -v '^ *+' conftest.er1 >conftest.err
9980 rm -f conftest.er1
9981 cat conftest.err >&5
9982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9983 (exit $ac_status); } &&
9984 { ac_try='test -z "$ac_c_werror_flag"
9985 || test ! -s conftest.err'
9986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9987 (eval $ac_try) 2>&5
9988 ac_status=$?
9989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9990 (exit $ac_status); }; } &&
9991 { ac_try='test -s conftest$ac_exeext'
9992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9993 (eval $ac_try) 2>&5
9994 ac_status=$?
9995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9996 (exit $ac_status); }; }; then
9997 eval "$as_ac_var=yes"
9998else
9999 echo "$as_me: failed program was:" >&5
10000sed 's/^/| /' conftest.$ac_ext >&5
10001
10002eval "$as_ac_var=no"
10003fi
10004rm -f conftest.err conftest.$ac_objext \
10005 conftest$ac_exeext conftest.$ac_ext
10006fi
10007echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10008echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10009if test `eval echo '${'$as_ac_var'}'` = yes; then
10010 cat >>confdefs.h <<_ACEOF
10011#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10012_ACEOF
10013 HAVE_GTK_FILE_SELECTION=yes
10014fi
10015done
10016
10017
10018 HAVE_GTK_FILE_CHOOSER=no
10019
10020for ac_func in gtk_file_chooser_dialog_new
10021do
10022as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10023echo "$as_me:$LINENO: checking for $ac_func" >&5
10024echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10025if eval "test \"\${$as_ac_var+set}\" = set"; then
10026 echo $ECHO_N "(cached) $ECHO_C" >&6
10027else
10028 cat >conftest.$ac_ext <<_ACEOF
10029/* confdefs.h. */
10030_ACEOF
10031cat confdefs.h >>conftest.$ac_ext
10032cat >>conftest.$ac_ext <<_ACEOF
10033/* end confdefs.h. */
10034/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10035 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10036#define $ac_func innocuous_$ac_func
10037
10038/* System header to define __stub macros and hopefully few prototypes,
10039 which can conflict with char $ac_func (); below.
10040 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10041 <limits.h> exists even on freestanding compilers. */
10042
10043#ifdef __STDC__
10044# include <limits.h>
10045#else
10046# include <assert.h>
10047#endif
10048
10049#undef $ac_func
10050
10051/* Override any gcc2 internal prototype to avoid an error. */
10052#ifdef __cplusplus
10053extern "C"
10054{
10055#endif
10056/* We use char because int might match the return type of a gcc2
10057 builtin and then its argument prototype would still apply. */
10058char $ac_func ();
10059/* The GNU C library defines this for functions which it implements
10060 to always fail with ENOSYS. Some functions are actually named
10061 something starting with __ and the normal name is an alias. */
10062#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10063choke me
10064#else
10065char (*f) () = $ac_func;
10066#endif
10067#ifdef __cplusplus
10068}
10069#endif
10070
10071int
10072main ()
10073{
10074return f != $ac_func;
10075 ;
10076 return 0;
10077}
10078_ACEOF
10079rm -f conftest.$ac_objext conftest$ac_exeext
10080if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10081 (eval $ac_link) 2>conftest.er1
10082 ac_status=$?
10083 grep -v '^ *+' conftest.er1 >conftest.err
10084 rm -f conftest.er1
10085 cat conftest.err >&5
10086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10087 (exit $ac_status); } &&
10088 { ac_try='test -z "$ac_c_werror_flag"
10089 || test ! -s conftest.err'
10090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10091 (eval $ac_try) 2>&5
10092 ac_status=$?
10093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10094 (exit $ac_status); }; } &&
10095 { ac_try='test -s conftest$ac_exeext'
10096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10097 (eval $ac_try) 2>&5
10098 ac_status=$?
10099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10100 (exit $ac_status); }; }; then
10101 eval "$as_ac_var=yes"
10102else
10103 echo "$as_me: failed program was:" >&5
10104sed 's/^/| /' conftest.$ac_ext >&5
10105
10106eval "$as_ac_var=no"
10107fi
10108rm -f conftest.err conftest.$ac_objext \
10109 conftest$ac_exeext conftest.$ac_ext
10110fi
10111echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10112echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10113if test `eval echo '${'$as_ac_var'}'` = yes; then
10114 cat >>confdefs.h <<_ACEOF
10115#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10116_ACEOF
10117 HAVE_GTK_FILE_CHOOSER=yes
10118fi
10119done
10120
10121
10122 if test "$HAVE_GTK_FILE_SELECTION" = yes \
10123 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10124
10125cat >>confdefs.h <<\_ACEOF
10126#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
10127_ACEOF
10128
b8bdffbe
JD
10129 fi
10130
10131 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10132 HAVE_GTK_AND_PTHREAD=no
10133
10134for ac_header in pthread.h
10135do
10136as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10137if eval "test \"\${$as_ac_Header+set}\" = set"; then
10138 echo "$as_me:$LINENO: checking for $ac_header" >&5
10139echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10140if eval "test \"\${$as_ac_Header+set}\" = set"; then
10141 echo $ECHO_N "(cached) $ECHO_C" >&6
10142fi
10143echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10144echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10145else
10146 # Is the header compilable?
10147echo "$as_me:$LINENO: checking $ac_header usability" >&5
10148echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10149cat >conftest.$ac_ext <<_ACEOF
10150/* confdefs.h. */
10151_ACEOF
10152cat confdefs.h >>conftest.$ac_ext
10153cat >>conftest.$ac_ext <<_ACEOF
10154/* end confdefs.h. */
10155$ac_includes_default
10156#include <$ac_header>
10157_ACEOF
10158rm -f conftest.$ac_objext
10159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10160 (eval $ac_compile) 2>conftest.er1
10161 ac_status=$?
10162 grep -v '^ *+' conftest.er1 >conftest.err
10163 rm -f conftest.er1
10164 cat conftest.err >&5
10165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10166 (exit $ac_status); } &&
10167 { ac_try='test -z "$ac_c_werror_flag"
10168 || test ! -s conftest.err'
10169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10170 (eval $ac_try) 2>&5
10171 ac_status=$?
10172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10173 (exit $ac_status); }; } &&
10174 { ac_try='test -s conftest.$ac_objext'
10175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10176 (eval $ac_try) 2>&5
10177 ac_status=$?
10178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10179 (exit $ac_status); }; }; then
10180 ac_header_compiler=yes
10181else
10182 echo "$as_me: failed program was:" >&5
10183sed 's/^/| /' conftest.$ac_ext >&5
10184
10185ac_header_compiler=no
10186fi
10187rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10188echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10189echo "${ECHO_T}$ac_header_compiler" >&6
10190
10191# Is the header present?
10192echo "$as_me:$LINENO: checking $ac_header presence" >&5
10193echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10194cat >conftest.$ac_ext <<_ACEOF
10195/* confdefs.h. */
10196_ACEOF
10197cat confdefs.h >>conftest.$ac_ext
10198cat >>conftest.$ac_ext <<_ACEOF
10199/* end confdefs.h. */
10200#include <$ac_header>
10201_ACEOF
10202if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10203 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10204 ac_status=$?
10205 grep -v '^ *+' conftest.er1 >conftest.err
10206 rm -f conftest.er1
10207 cat conftest.err >&5
10208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10209 (exit $ac_status); } >/dev/null; then
10210 if test -s conftest.err; then
10211 ac_cpp_err=$ac_c_preproc_warn_flag
10212 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10213 else
10214 ac_cpp_err=
10215 fi
10216else
10217 ac_cpp_err=yes
10218fi
10219if test -z "$ac_cpp_err"; then
10220 ac_header_preproc=yes
10221else
10222 echo "$as_me: failed program was:" >&5
10223sed 's/^/| /' conftest.$ac_ext >&5
10224
10225 ac_header_preproc=no
10226fi
10227rm -f conftest.err conftest.$ac_ext
10228echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10229echo "${ECHO_T}$ac_header_preproc" >&6
10230
10231# So? What about this header?
10232case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10233 yes:no: )
10234 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10235echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10236 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10237echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10238 ac_header_preproc=yes
10239 ;;
10240 no:yes:* )
10241 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10242echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10243 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10244echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10245 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10246echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10247 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10248echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
10249 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10250echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10251 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10252echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10253 (
10254 cat <<\_ASBOX
10255## ------------------------------------------ ##
10256## Report this to the AC_PACKAGE_NAME lists. ##
10257## ------------------------------------------ ##
10258_ASBOX
10259 ) |
10260 sed "s/^/$as_me: WARNING: /" >&2
10261 ;;
10262esac
10263echo "$as_me:$LINENO: checking for $ac_header" >&5
10264echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10265if eval "test \"\${$as_ac_Header+set}\" = set"; then
10266 echo $ECHO_N "(cached) $ECHO_C" >&6
10267else
10268 eval "$as_ac_Header=\$ac_header_preproc"
10269fi
10270echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10271echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10272
10273fi
10274if test `eval echo '${'$as_ac_Header'}'` = yes; then
10275 cat >>confdefs.h <<_ACEOF
10276#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10277_ACEOF
10278
10279fi
10280
10281done
10282
10283 if test "$ac_cv_header_pthread_h"; then
10284 echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
10285echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6
10286if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
10287 echo $ECHO_N "(cached) $ECHO_C" >&6
10288else
10289 ac_check_lib_save_LIBS=$LIBS
10290LIBS="-lpthread $LIBS"
10291cat >conftest.$ac_ext <<_ACEOF
10292/* confdefs.h. */
10293_ACEOF
10294cat confdefs.h >>conftest.$ac_ext
10295cat >>conftest.$ac_ext <<_ACEOF
10296/* end confdefs.h. */
10297
10298/* Override any gcc2 internal prototype to avoid an error. */
10299#ifdef __cplusplus
10300extern "C"
10301#endif
10302/* We use char because int might match the return type of a gcc2
10303 builtin and then its argument prototype would still apply. */
10304char pthread_self ();
10305int
10306main ()
10307{
10308pthread_self ();
10309 ;
10310 return 0;
10311}
10312_ACEOF
10313rm -f conftest.$ac_objext conftest$ac_exeext
10314if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10315 (eval $ac_link) 2>conftest.er1
10316 ac_status=$?
10317 grep -v '^ *+' conftest.er1 >conftest.err
10318 rm -f conftest.er1
10319 cat conftest.err >&5
10320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10321 (exit $ac_status); } &&
10322 { ac_try='test -z "$ac_c_werror_flag"
10323 || test ! -s conftest.err'
10324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10325 (eval $ac_try) 2>&5
10326 ac_status=$?
10327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10328 (exit $ac_status); }; } &&
10329 { ac_try='test -s conftest$ac_exeext'
10330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10331 (eval $ac_try) 2>&5
10332 ac_status=$?
10333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10334 (exit $ac_status); }; }; then
10335 ac_cv_lib_pthread_pthread_self=yes
10336else
10337 echo "$as_me: failed program was:" >&5
10338sed 's/^/| /' conftest.$ac_ext >&5
10339
10340ac_cv_lib_pthread_pthread_self=no
10341fi
10342rm -f conftest.err conftest.$ac_objext \
10343 conftest$ac_exeext conftest.$ac_ext
10344LIBS=$ac_check_lib_save_LIBS
10345fi
10346echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
10347echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6
10348if test $ac_cv_lib_pthread_pthread_self = yes; then
10349 HAVE_GTK_AND_PTHREAD=yes
10350fi
10351
10352 fi
10353 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
10354 GTK_LIBS="$GTK_LIBS -lpthread"
10355
10356cat >>confdefs.h <<\_ACEOF
10357#define HAVE_GTK_AND_PTHREAD 1
10358_ACEOF
10359
10360 fi
57669b57 10361 fi
488dd4c4
JD
10362fi
10363
98418dba
CW
10364if test x"${USE_X_TOOLKIT}" = xmaybe; then
10365 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 10366 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
10367echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
10368 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
10369 echo $ECHO_N "(cached) $ECHO_C" >&6
10370else
10371 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10372/* confdefs.h. */
10373_ACEOF
10374cat confdefs.h >>conftest.$ac_ext
10375cat >>conftest.$ac_ext <<_ACEOF
10376/* end confdefs.h. */
98418dba
CW
10377
10378#include <X11/Intrinsic.h>
10379#include <X11/Xaw/Simple.h>
98418dba
CW
10380int
10381main ()
10382{
10383
10384 ;
10385 return 0;
10386}
10387_ACEOF
10388rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10389if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10390 (eval $ac_link) 2>conftest.er1
98418dba 10391 ac_status=$?
35996d22
AS
10392 grep -v '^ *+' conftest.er1 >conftest.err
10393 rm -f conftest.er1
10394 cat conftest.err >&5
c0d27fcc 10395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10396 (exit $ac_status); } &&
4494a266
JD
10397 { ac_try='test -z "$ac_c_werror_flag"
10398 || test ! -s conftest.err'
35996d22
AS
10399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10400 (eval $ac_try) 2>&5
10401 ac_status=$?
10402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10403 (exit $ac_status); }; } &&
10404 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10406 (eval $ac_try) 2>&5
10407 ac_status=$?
c0d27fcc 10408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10409 (exit $ac_status); }; }; then
10410 emacs_cv_x11_version_5_with_xaw=yes
10411else
10412 echo "$as_me: failed program was:" >&5
19650fd6
AS
10413sed 's/^/| /' conftest.$ac_ext >&5
10414
98418dba
CW
10415emacs_cv_x11_version_5_with_xaw=no
10416fi
35996d22
AS
10417rm -f conftest.err conftest.$ac_objext \
10418 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10419fi
10420
10421 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 10422 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
10423echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
10424 USE_X_TOOLKIT=LUCID
10425 else
c0d27fcc 10426 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
10427echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
10428 USE_X_TOOLKIT=none
10429 fi
10430 else
10431 USE_X_TOOLKIT=none
10432 fi
10433fi
10434
10435X_TOOLKIT_TYPE=$USE_X_TOOLKIT
10436
10437if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 10438 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
10439echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
10440 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
10441 echo $ECHO_N "(cached) $ECHO_C" >&6
10442else
10443 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10444/* confdefs.h. */
10445_ACEOF
10446cat confdefs.h >>conftest.$ac_ext
10447cat >>conftest.$ac_ext <<_ACEOF
10448/* end confdefs.h. */
98418dba 10449#include <X11/Intrinsic.h>
98418dba
CW
10450int
10451main ()
10452{
10453#if XtSpecificationRelease < 6
10454fail;
10455#endif
10456
10457 ;
10458 return 0;
10459}
10460_ACEOF
10461rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10462if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10463 (eval $ac_link) 2>conftest.er1
98418dba 10464 ac_status=$?
35996d22
AS
10465 grep -v '^ *+' conftest.er1 >conftest.err
10466 rm -f conftest.er1
10467 cat conftest.err >&5
c0d27fcc 10468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10469 (exit $ac_status); } &&
4494a266
JD
10470 { ac_try='test -z "$ac_c_werror_flag"
10471 || test ! -s conftest.err'
35996d22
AS
10472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10473 (eval $ac_try) 2>&5
10474 ac_status=$?
10475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10476 (exit $ac_status); }; } &&
10477 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10479 (eval $ac_try) 2>&5
10480 ac_status=$?
c0d27fcc 10481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10482 (exit $ac_status); }; }; then
10483 emacs_cv_x11_toolkit_version_6=yes
10484else
10485 echo "$as_me: failed program was:" >&5
19650fd6
AS
10486sed 's/^/| /' conftest.$ac_ext >&5
10487
98418dba
CW
10488emacs_cv_x11_toolkit_version_6=no
10489fi
35996d22
AS
10490rm -f conftest.err conftest.$ac_objext \
10491 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10492fi
10493
10494 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
10495 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 10496 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 10497echo "${ECHO_T}6 or newer" >&6
b936fae4 10498
c0d27fcc 10499cat >>confdefs.h <<\_ACEOF
98418dba 10500#define HAVE_X11XTR6 1
c0d27fcc 10501_ACEOF
98418dba
CW
10502
10503 else
c0d27fcc 10504 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
10505echo "${ECHO_T}before 6" >&6
10506 fi
10507
10508 OLDLIBS="$LIBS"
10509 if test x$HAVE_X11XTR6 = xyes; then
10510 LIBS="-lXt -lSM -lICE $LIBS"
10511 else
10512 LIBS="-lXt $LIBS"
10513 fi
10514
c0d27fcc 10515echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
10516echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
10517if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
10518 echo $ECHO_N "(cached) $ECHO_C" >&6
10519else
10520 ac_check_lib_save_LIBS=$LIBS
10521LIBS="-lXmu $LIBS"
10522cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10523/* confdefs.h. */
10524_ACEOF
10525cat confdefs.h >>conftest.$ac_ext
10526cat >>conftest.$ac_ext <<_ACEOF
10527/* end confdefs.h. */
98418dba
CW
10528
10529/* Override any gcc2 internal prototype to avoid an error. */
10530#ifdef __cplusplus
10531extern "C"
10532#endif
10533/* We use char because int might match the return type of a gcc2
10534 builtin and then its argument prototype would still apply. */
10535char XmuConvertStandardSelection ();
98418dba
CW
10536int
10537main ()
10538{
10539XmuConvertStandardSelection ();
10540 ;
10541 return 0;
10542}
10543_ACEOF
10544rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10546 (eval $ac_link) 2>conftest.er1
98418dba 10547 ac_status=$?
35996d22
AS
10548 grep -v '^ *+' conftest.er1 >conftest.err
10549 rm -f conftest.er1
10550 cat conftest.err >&5
c0d27fcc 10551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10552 (exit $ac_status); } &&
4494a266
JD
10553 { ac_try='test -z "$ac_c_werror_flag"
10554 || test ! -s conftest.err'
35996d22
AS
10555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10556 (eval $ac_try) 2>&5
10557 ac_status=$?
10558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10559 (exit $ac_status); }; } &&
10560 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10562 (eval $ac_try) 2>&5
10563 ac_status=$?
c0d27fcc 10564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10565 (exit $ac_status); }; }; then
10566 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
10567else
10568 echo "$as_me: failed program was:" >&5
19650fd6
AS
10569sed 's/^/| /' conftest.$ac_ext >&5
10570
98418dba
CW
10571ac_cv_lib_Xmu_XmuConvertStandardSelection=no
10572fi
35996d22
AS
10573rm -f conftest.err conftest.$ac_objext \
10574 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10575LIBS=$ac_check_lib_save_LIBS
10576fi
c0d27fcc 10577echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
10578echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
10579if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 10580 cat >>confdefs.h <<_ACEOF
98418dba 10581#define HAVE_LIBXMU 1
c0d27fcc 10582_ACEOF
98418dba
CW
10583
10584 LIBS="-lXmu $LIBS"
10585
10586fi
10587
10588 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
10589fi
10590
10591# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
10592if test "${HAVE_X11}" = "yes"; then
10593 if test "${USE_X_TOOLKIT}" != "none"; then
10594
c0d27fcc 10595echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
10596echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
10597if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
10598 echo $ECHO_N "(cached) $ECHO_C" >&6
10599else
10600 ac_check_lib_save_LIBS=$LIBS
10601LIBS="-lXext $LIBS"
10602cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10603/* confdefs.h. */
10604_ACEOF
10605cat confdefs.h >>conftest.$ac_ext
10606cat >>conftest.$ac_ext <<_ACEOF
10607/* end confdefs.h. */
98418dba
CW
10608
10609/* Override any gcc2 internal prototype to avoid an error. */
10610#ifdef __cplusplus
10611extern "C"
10612#endif
10613/* We use char because int might match the return type of a gcc2
10614 builtin and then its argument prototype would still apply. */
10615char XShapeQueryExtension ();
98418dba
CW
10616int
10617main ()
10618{
10619XShapeQueryExtension ();
10620 ;
10621 return 0;
10622}
10623_ACEOF
10624rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10625if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10626 (eval $ac_link) 2>conftest.er1
98418dba 10627 ac_status=$?
35996d22
AS
10628 grep -v '^ *+' conftest.er1 >conftest.err
10629 rm -f conftest.er1
10630 cat conftest.err >&5
c0d27fcc 10631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10632 (exit $ac_status); } &&
4494a266
JD
10633 { ac_try='test -z "$ac_c_werror_flag"
10634 || test ! -s conftest.err'
35996d22
AS
10635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10636 (eval $ac_try) 2>&5
10637 ac_status=$?
10638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10639 (exit $ac_status); }; } &&
10640 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10642 (eval $ac_try) 2>&5
10643 ac_status=$?
c0d27fcc 10644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10645 (exit $ac_status); }; }; then
10646 ac_cv_lib_Xext_XShapeQueryExtension=yes
10647else
10648 echo "$as_me: failed program was:" >&5
19650fd6
AS
10649sed 's/^/| /' conftest.$ac_ext >&5
10650
98418dba
CW
10651ac_cv_lib_Xext_XShapeQueryExtension=no
10652fi
35996d22
AS
10653rm -f conftest.err conftest.$ac_objext \
10654 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10655LIBS=$ac_check_lib_save_LIBS
10656fi
c0d27fcc 10657echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
10658echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
10659if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 10660 cat >>confdefs.h <<_ACEOF
98418dba 10661#define HAVE_LIBXEXT 1
c0d27fcc 10662_ACEOF
98418dba
CW
10663
10664 LIBS="-lXext $LIBS"
10665
10666fi
10667
10668 fi
10669fi
10670
10671if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 10672 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
8e967cf7
MR
10673echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
10674if test "${emacs_cv_lesstif+set}" = set; then
10675 echo $ECHO_N "(cached) $ECHO_C" >&6
10676else
ae1a998c
RS
10677 # We put this in CFLAGS temporarily to precede other -I options
10678 # that might be in CFLAGS temporarily.
10679 # We put this in CPPFLAGS where it precedes the other -I options.
10680 OLD_CPPFLAGS=$CPPFLAGS
10681 OLD_CFLAGS=$CFLAGS
10682 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
10683 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
8e967cf7 10684 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10685/* confdefs.h. */
10686_ACEOF
10687cat confdefs.h >>conftest.$ac_ext
10688cat >>conftest.$ac_ext <<_ACEOF
10689/* end confdefs.h. */
8e967cf7
MR
10690#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
10691int
10692main ()
10693{
10694int x = 5;
10695 ;
10696 return 0;
10697}
10698_ACEOF
10699rm -f conftest.$ac_objext
c0d27fcc 10700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 10701 (eval $ac_compile) 2>conftest.er1
8e967cf7 10702 ac_status=$?
35996d22
AS
10703 grep -v '^ *+' conftest.er1 >conftest.err
10704 rm -f conftest.er1
10705 cat conftest.err >&5
c0d27fcc 10706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7 10707 (exit $ac_status); } &&
4494a266
JD
10708 { ac_try='test -z "$ac_c_werror_flag"
10709 || test ! -s conftest.err'
35996d22
AS
10710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10711 (eval $ac_try) 2>&5
10712 ac_status=$?
10713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10714 (exit $ac_status); }; } &&
10715 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 10716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8e967cf7
MR
10717 (eval $ac_try) 2>&5
10718 ac_status=$?
c0d27fcc 10719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7
MR
10720 (exit $ac_status); }; }; then
10721 emacs_cv_lesstif=yes
10722else
10723 echo "$as_me: failed program was:" >&5
19650fd6
AS
10724sed 's/^/| /' conftest.$ac_ext >&5
10725
8e967cf7
MR
10726emacs_cv_lesstif=no
10727fi
35996d22 10728rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8e967cf7 10729fi
c0d27fcc 10730echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
8e967cf7
MR
10731echo "${ECHO_T}$emacs_cv_lesstif" >&6
10732 if test $emacs_cv_lesstif = yes; then
ae1a998c
RS
10733 # Make sure this -I option remains in CPPFLAGS after it is set
10734 # back to REAL_CPPFLAGS.
10735 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
10736 # have those other -I options anyway. Ultimately, having this
10737 # directory ultimately in CPPFLAGS will be enough.
10738 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
8e967cf7 10739 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
ae1a998c
RS
10740 else
10741 CFLAGS=$OLD_CFLAGS
10742 CPPFLAGS=$OLD_CPPFLAGS
8e967cf7 10743 fi
c0d27fcc 10744 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
10745echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
10746if test "${emacs_cv_motif_version_2_1+set}" = set; then
10747 echo $ECHO_N "(cached) $ECHO_C" >&6
10748else
10749 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10750/* confdefs.h. */
10751_ACEOF
10752cat confdefs.h >>conftest.$ac_ext
10753cat >>conftest.$ac_ext <<_ACEOF
10754/* end confdefs.h. */
98418dba 10755#include <Xm/Xm.h>
98418dba
CW
10756int
10757main ()
10758{
10759#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
10760int x = 5;
10761#else
10762Motif version prior to 2.1.
10763#endif
10764 ;
10765 return 0;
10766}
10767_ACEOF
10768rm -f conftest.$ac_objext
c0d27fcc 10769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 10770 (eval $ac_compile) 2>conftest.er1
98418dba 10771 ac_status=$?
35996d22
AS
10772 grep -v '^ *+' conftest.er1 >conftest.err
10773 rm -f conftest.er1
10774 cat conftest.err >&5
c0d27fcc 10775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10776 (exit $ac_status); } &&
4494a266
JD
10777 { ac_try='test -z "$ac_c_werror_flag"
10778 || test ! -s conftest.err'
35996d22
AS
10779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10780 (eval $ac_try) 2>&5
10781 ac_status=$?
10782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10783 (exit $ac_status); }; } &&
10784 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 10785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10786 (eval $ac_try) 2>&5
10787 ac_status=$?
c0d27fcc 10788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10789 (exit $ac_status); }; }; then
10790 emacs_cv_motif_version_2_1=yes
10791else
10792 echo "$as_me: failed program was:" >&5
19650fd6
AS
10793sed 's/^/| /' conftest.$ac_ext >&5
10794
98418dba
CW
10795emacs_cv_motif_version_2_1=no
10796fi
35996d22 10797rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 10798fi
c0d27fcc 10799echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
10800echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
10801 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
10802 if test $emacs_cv_motif_version_2_1 = yes; then
10803 HAVE_LIBXP=no
b936fae4 10804
c0d27fcc 10805cat >>confdefs.h <<\_ACEOF
98418dba 10806#define HAVE_MOTIF_2_1 1
c0d27fcc 10807_ACEOF
98418dba 10808
c0d27fcc 10809 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
10810echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
10811if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
10812 echo $ECHO_N "(cached) $ECHO_C" >&6
10813else
10814 ac_check_lib_save_LIBS=$LIBS
10815LIBS="-lXp $LIBS"
10816cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10817/* confdefs.h. */
10818_ACEOF
10819cat confdefs.h >>conftest.$ac_ext
10820cat >>conftest.$ac_ext <<_ACEOF
10821/* end confdefs.h. */
98418dba
CW
10822
10823/* Override any gcc2 internal prototype to avoid an error. */
10824#ifdef __cplusplus
10825extern "C"
10826#endif
10827/* We use char because int might match the return type of a gcc2
10828 builtin and then its argument prototype would still apply. */
10829char XpCreateContext ();
98418dba
CW
10830int
10831main ()
10832{
10833XpCreateContext ();
10834 ;
10835 return 0;
10836}
10837_ACEOF
10838rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10839if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10840 (eval $ac_link) 2>conftest.er1
98418dba 10841 ac_status=$?
35996d22
AS
10842 grep -v '^ *+' conftest.er1 >conftest.err
10843 rm -f conftest.er1
10844 cat conftest.err >&5
c0d27fcc 10845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10846 (exit $ac_status); } &&
4494a266
JD
10847 { ac_try='test -z "$ac_c_werror_flag"
10848 || test ! -s conftest.err'
35996d22
AS
10849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10850 (eval $ac_try) 2>&5
10851 ac_status=$?
10852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10853 (exit $ac_status); }; } &&
10854 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10856 (eval $ac_try) 2>&5
10857 ac_status=$?
c0d27fcc 10858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10859 (exit $ac_status); }; }; then
10860 ac_cv_lib_Xp_XpCreateContext=yes
10861else
10862 echo "$as_me: failed program was:" >&5
19650fd6
AS
10863sed 's/^/| /' conftest.$ac_ext >&5
10864
98418dba
CW
10865ac_cv_lib_Xp_XpCreateContext=no
10866fi
35996d22
AS
10867rm -f conftest.err conftest.$ac_objext \
10868 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10869LIBS=$ac_check_lib_save_LIBS
10870fi
c0d27fcc 10871echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
10872echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
10873if test $ac_cv_lib_Xp_XpCreateContext = yes; then
10874 HAVE_LIBXP=yes
10875fi
503d2be0 10876
98418dba 10877 if test ${HAVE_LIBXP} = yes; then
b936fae4 10878
c0d27fcc 10879cat >>confdefs.h <<\_ACEOF
98418dba 10880#define HAVE_LIBXP 1
c0d27fcc 10881_ACEOF
503d2be0 10882
98418dba
CW
10883 fi
10884 fi
10885fi
10886
10887### Is -lXaw3d available?
10888HAVE_XAW3D=no
10889if test "${HAVE_X11}" = "yes"; then
10890 if test "${USE_X_TOOLKIT}" != "none"; then
22044edf 10891 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
10892echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
10893if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
10894 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 10895else
22044edf 10896 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10897/* confdefs.h. */
10898_ACEOF
10899cat confdefs.h >>conftest.$ac_ext
10900cat >>conftest.$ac_ext <<_ACEOF
10901/* end confdefs.h. */
98418dba 10902#include <X11/Xaw3d/Scrollbar.h>
503d2be0 10903_ACEOF
c0d27fcc 10904if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10905 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10906 ac_status=$?
6bae0ccf 10907 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
10908 rm -f conftest.er1
10909 cat conftest.err >&5
c0d27fcc 10910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10911 (exit $ac_status); } >/dev/null; then
10912 if test -s conftest.err; then
10913 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 10914 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
10915 else
10916 ac_cpp_err=
10917 fi
10918else
10919 ac_cpp_err=yes
10920fi
10921if test -z "$ac_cpp_err"; then
22044edf 10922 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 10923else
503d2be0 10924 echo "$as_me: failed program was:" >&5
19650fd6
AS
10925sed 's/^/| /' conftest.$ac_ext >&5
10926
22044edf 10927 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 10928fi
503d2be0 10929rm -f conftest.err conftest.$ac_ext
98418dba 10930fi
c0d27fcc 10931echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 10932echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 10933if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 10934 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
10935echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
10936if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
10937 echo $ECHO_N "(cached) $ECHO_C" >&6
10938else
10939 ac_check_lib_save_LIBS=$LIBS
10940LIBS="-lXaw3d $LIBS"
10941cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10942/* confdefs.h. */
10943_ACEOF
10944cat confdefs.h >>conftest.$ac_ext
10945cat >>conftest.$ac_ext <<_ACEOF
10946/* end confdefs.h. */
98418dba
CW
10947
10948/* Override any gcc2 internal prototype to avoid an error. */
10949#ifdef __cplusplus
10950extern "C"
10951#endif
10952/* We use char because int might match the return type of a gcc2
10953 builtin and then its argument prototype would still apply. */
10954char XawScrollbarSetThumb ();
503d2be0
AS
10955int
10956main ()
10957{
98418dba 10958XawScrollbarSetThumb ();
503d2be0
AS
10959 ;
10960 return 0;
10961}
10962_ACEOF
10963rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10964if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10965 (eval $ac_link) 2>conftest.er1
503d2be0 10966 ac_status=$?
35996d22
AS
10967 grep -v '^ *+' conftest.er1 >conftest.err
10968 rm -f conftest.er1
10969 cat conftest.err >&5
c0d27fcc 10970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10971 (exit $ac_status); } &&
4494a266
JD
10972 { ac_try='test -z "$ac_c_werror_flag"
10973 || test ! -s conftest.err'
35996d22
AS
10974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10975 (eval $ac_try) 2>&5
10976 ac_status=$?
10977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10978 (exit $ac_status); }; } &&
10979 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10981 (eval $ac_try) 2>&5
10982 ac_status=$?
c0d27fcc 10983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10984 (exit $ac_status); }; }; then
98418dba 10985 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 10986else
503d2be0 10987 echo "$as_me: failed program was:" >&5
19650fd6
AS
10988sed 's/^/| /' conftest.$ac_ext >&5
10989
98418dba 10990ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 10991fi
35996d22
AS
10992rm -f conftest.err conftest.$ac_objext \
10993 conftest$ac_exeext conftest.$ac_ext
98418dba 10994LIBS=$ac_check_lib_save_LIBS
ba4481b5 10995fi
c0d27fcc 10996echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
10997echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
10998if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
10999 HAVE_XAW3D=yes
ba4481b5 11000fi
503d2be0 11001
ba4481b5
DL
11002fi
11003
c0d27fcc 11004
98418dba 11005 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 11006
c0d27fcc 11007cat >>confdefs.h <<\_ACEOF
98418dba 11008#define HAVE_XAW3D 1
c0d27fcc 11009_ACEOF
98418dba 11010
ba4481b5 11011 fi
98418dba 11012 fi
ba4481b5
DL
11013fi
11014
c0d27fcc
MR
11015
11016
98418dba
CW
11017USE_TOOLKIT_SCROLL_BARS=no
11018if test "${with_toolkit_scroll_bars}" != "no"; then
11019 if test "${USE_X_TOOLKIT}" != "none"; then
11020 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 11021 cat >>confdefs.h <<\_ACEOF
98418dba 11022#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11023_ACEOF
98418dba
CW
11024
11025 HAVE_XAW3D=no
11026 USE_TOOLKIT_SCROLL_BARS=yes
11027 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 11028 cat >>confdefs.h <<\_ACEOF
98418dba 11029#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11030_ACEOF
98418dba
CW
11031
11032 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 11033 fi
488dd4c4
JD
11034 elif test "${HAVE_GTK}" = "yes"; then
11035 cat >>confdefs.h <<\_ACEOF
11036#define USE_TOOLKIT_SCROLL_BARS 1
11037_ACEOF
11038
11039 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
11040 fi
11041fi
11042
abd39b57 11043cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
11044/* confdefs.h. */
11045_ACEOF
11046cat confdefs.h >>conftest.$ac_ext
11047cat >>conftest.$ac_ext <<_ACEOF
11048/* end confdefs.h. */
11049
11050 #include <X11/Xlib.h>
11051 #include <X11/Xresource.h>
11052int
11053main ()
11054{
11055XIMProc callback;
11056 ;
11057 return 0;
11058}
11059_ACEOF
11060rm -f conftest.$ac_objext
11061if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11062 (eval $ac_compile) 2>conftest.er1
abd39b57 11063 ac_status=$?
35996d22
AS
11064 grep -v '^ *+' conftest.er1 >conftest.err
11065 rm -f conftest.er1
11066 cat conftest.err >&5
abd39b57
AC
11067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11068 (exit $ac_status); } &&
4494a266
JD
11069 { ac_try='test -z "$ac_c_werror_flag"
11070 || test ! -s conftest.err'
35996d22
AS
11071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11072 (eval $ac_try) 2>&5
11073 ac_status=$?
11074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11075 (exit $ac_status); }; } &&
11076 { ac_try='test -s conftest.$ac_objext'
abd39b57
AC
11077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11078 (eval $ac_try) 2>&5
11079 ac_status=$?
11080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11081 (exit $ac_status); }; }; then
11082 HAVE_XIM=yes
11083
11084cat >>confdefs.h <<\_ACEOF
11085#define HAVE_XIM 1
11086_ACEOF
11087
11088else
11089 echo "$as_me: failed program was:" >&5
11090sed 's/^/| /' conftest.$ac_ext >&5
11091
11092HAVE_XIM=no
11093fi
35996d22 11094rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 11095
c0d27fcc 11096
98418dba 11097if test "${with_xim}" != "no"; then
b936fae4 11098
c0d27fcc 11099cat >>confdefs.h <<\_ACEOF
98418dba 11100#define USE_XIM 1
c0d27fcc 11101_ACEOF
98418dba 11102
793fa0d7 11103fi
abd39b57
AC
11104
11105
11106if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
11107 late_CFLAGS=$CFLAGS
11108 if test "$GCC" = yes; then
11109 CFLAGS="$CFLAGS --pedantic-errors"
11110 fi
cffcede7 11111 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11112/* confdefs.h. */
11113_ACEOF
11114cat confdefs.h >>conftest.$ac_ext
11115cat >>conftest.$ac_ext <<_ACEOF
11116/* end confdefs.h. */
cffcede7
JD
11117
11118#include <X11/Xlib.h>
11119#include <X11/Xresource.h>
11120int
11121main ()
11122{
11123Display *display;
11124XrmDatabase db;
11125char *res_name;
11126char *res_class;
11127XIMProc callback;
11128XPointer *client_data;
849d80cf
DL
11129#ifndef __GNUC__
11130/* If we're not using GCC, it's probably not XFree86, and this is
11131 probably right, but we can't use something like --pedantic-errors. */
11132extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11133 char*, XIMProc, XPointer*);
11134#endif
cffcede7
JD
11135(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11136 client_data);
11137 ;
11138 return 0;
11139}
11140_ACEOF
11141rm -f conftest.$ac_objext
11142if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11143 (eval $ac_compile) 2>conftest.er1
cffcede7 11144 ac_status=$?
35996d22
AS
11145 grep -v '^ *+' conftest.er1 >conftest.err
11146 rm -f conftest.er1
11147 cat conftest.err >&5
cffcede7
JD
11148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11149 (exit $ac_status); } &&
4494a266
JD
11150 { ac_try='test -z "$ac_c_werror_flag"
11151 || test ! -s conftest.err'
35996d22
AS
11152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11153 (eval $ac_try) 2>&5
11154 ac_status=$?
11155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11156 (exit $ac_status); }; } &&
11157 { ac_try='test -s conftest.$ac_objext'
cffcede7
JD
11158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11159 (eval $ac_try) 2>&5
11160 ac_status=$?
11161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11162 (exit $ac_status); }; }; then
11163 emacs_cv_arg6_star=yes
11164else
11165 echo "$as_me: failed program was:" >&5
19650fd6
AS
11166sed 's/^/| /' conftest.$ac_ext >&5
11167
cffcede7 11168fi
35996d22 11169rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
11170
11171 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 11172 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11173#define XRegisterIMInstantiateCallback_arg6 XPointer*
11174_ACEOF
11175
11176 else
f57bd967 11177 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11178#define XRegisterIMInstantiateCallback_arg6 XPointer
11179_ACEOF
11180
11181 fi
849d80cf 11182 CFLAGS=$late_CFLAGS
98418dba
CW
11183fi
11184
11185### Use -lXpm if available, unless `--with-xpm=no'.
11186HAVE_XPM=no
11187if test "${HAVE_X11}" = "yes"; then
11188 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
11189 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11190 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
11191echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11192if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11193 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11194fi
11195echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
11196echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 11197else
c0d27fcc
MR
11198 # Is the header compilable?
11199echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
11200echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
11201cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11202/* confdefs.h. */
11203_ACEOF
11204cat confdefs.h >>conftest.$ac_ext
11205cat >>conftest.$ac_ext <<_ACEOF
11206/* end confdefs.h. */
c0d27fcc
MR
11207$ac_includes_default
11208#include <X11/xpm.h>
11209_ACEOF
11210rm -f conftest.$ac_objext
11211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11212 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11213 ac_status=$?
35996d22
AS
11214 grep -v '^ *+' conftest.er1 >conftest.err
11215 rm -f conftest.er1
11216 cat conftest.err >&5
c0d27fcc
MR
11217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11218 (exit $ac_status); } &&
4494a266
JD
11219 { ac_try='test -z "$ac_c_werror_flag"
11220 || test ! -s conftest.err'
35996d22
AS
11221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11222 (eval $ac_try) 2>&5
11223 ac_status=$?
11224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11225 (exit $ac_status); }; } &&
11226 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11228 (eval $ac_try) 2>&5
11229 ac_status=$?
11230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11231 (exit $ac_status); }; }; then
11232 ac_header_compiler=yes
11233else
11234 echo "$as_me: failed program was:" >&5
19650fd6
AS
11235sed 's/^/| /' conftest.$ac_ext >&5
11236
c0d27fcc
MR
11237ac_header_compiler=no
11238fi
35996d22 11239rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11240echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11241echo "${ECHO_T}$ac_header_compiler" >&6
11242
11243# Is the header present?
11244echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
11245echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
11246cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11247/* confdefs.h. */
11248_ACEOF
11249cat confdefs.h >>conftest.$ac_ext
11250cat >>conftest.$ac_ext <<_ACEOF
11251/* end confdefs.h. */
98418dba
CW
11252#include <X11/xpm.h>
11253_ACEOF
c0d27fcc 11254if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11255 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11256 ac_status=$?
6bae0ccf 11257 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11258 rm -f conftest.er1
11259 cat conftest.err >&5
c0d27fcc 11260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11261 (exit $ac_status); } >/dev/null; then
11262 if test -s conftest.err; then
11263 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11264 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11265 else
11266 ac_cpp_err=
11267 fi
11268else
11269 ac_cpp_err=yes
11270fi
11271if test -z "$ac_cpp_err"; then
c0d27fcc 11272 ac_header_preproc=yes
98418dba
CW
11273else
11274 echo "$as_me: failed program was:" >&5
19650fd6
AS
11275sed 's/^/| /' conftest.$ac_ext >&5
11276
c0d27fcc 11277 ac_header_preproc=no
98418dba
CW
11278fi
11279rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11280echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11281echo "${ECHO_T}$ac_header_preproc" >&6
11282
11283# So? What about this header?
35996d22
AS
11284case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11285 yes:no: )
c0d27fcc
MR
11286 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
11287echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11288 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
11289echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
11290 ac_header_preproc=yes
19650fd6 11291 ;;
35996d22 11292 no:yes:* )
c0d27fcc
MR
11293 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
11294echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
35996d22
AS
11295 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
11296echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
11297 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
11298echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
11299 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
11300echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 11301 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
19650fd6 11302echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11303 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
11304echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11305 (
11306 cat <<\_ASBOX
35996d22
AS
11307## ------------------------------------------ ##
11308## Report this to the AC_PACKAGE_NAME lists. ##
11309## ------------------------------------------ ##
19650fd6
AS
11310_ASBOX
11311 ) |
11312 sed "s/^/$as_me: WARNING: /" >&2
11313 ;;
c0d27fcc
MR
11314esac
11315echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
11316echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11317if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11318 echo $ECHO_N "(cached) $ECHO_C" >&6
11319else
11320 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 11321fi
c0d27fcc 11322echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 11323echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
11324
11325fi
98418dba 11326if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 11327 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
11328echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
11329if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 11330 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11331else
98418dba
CW
11332 ac_check_lib_save_LIBS=$LIBS
11333LIBS="-lXpm -lX11 $LIBS"
11334cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11335/* confdefs.h. */
11336_ACEOF
11337cat confdefs.h >>conftest.$ac_ext
11338cat >>conftest.$ac_ext <<_ACEOF
11339/* end confdefs.h. */
98418dba 11340
ba4481b5 11341/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11342#ifdef __cplusplus
11343extern "C"
11344#endif
ba4481b5 11345/* We use char because int might match the return type of a gcc2
503d2be0 11346 builtin and then its argument prototype would still apply. */
98418dba 11347char XpmReadFileToPixmap ();
503d2be0
AS
11348int
11349main ()
11350{
98418dba 11351XpmReadFileToPixmap ();
503d2be0
AS
11352 ;
11353 return 0;
11354}
11355_ACEOF
11356rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11357if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11358 (eval $ac_link) 2>conftest.er1
503d2be0 11359 ac_status=$?
35996d22
AS
11360 grep -v '^ *+' conftest.er1 >conftest.err
11361 rm -f conftest.er1
11362 cat conftest.err >&5
c0d27fcc 11363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11364 (exit $ac_status); } &&
4494a266
JD
11365 { ac_try='test -z "$ac_c_werror_flag"
11366 || test ! -s conftest.err'
35996d22
AS
11367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11368 (eval $ac_try) 2>&5
11369 ac_status=$?
11370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11371 (exit $ac_status); }; } &&
11372 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11374 (eval $ac_try) 2>&5
11375 ac_status=$?
c0d27fcc 11376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11377 (exit $ac_status); }; }; then
98418dba 11378 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
11379else
11380 echo "$as_me: failed program was:" >&5
19650fd6
AS
11381sed 's/^/| /' conftest.$ac_ext >&5
11382
98418dba 11383ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 11384fi
35996d22
AS
11385rm -f conftest.err conftest.$ac_objext \
11386 conftest$ac_exeext conftest.$ac_ext
98418dba 11387LIBS=$ac_check_lib_save_LIBS
503d2be0 11388fi
c0d27fcc 11389echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
11390echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
11391if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
11392 HAVE_XPM=yes
ba4481b5
DL
11393fi
11394
98418dba
CW
11395fi
11396
c0d27fcc 11397
98418dba 11398 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11399 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
11400echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
11401 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11402/* confdefs.h. */
11403_ACEOF
11404cat confdefs.h >>conftest.$ac_ext
11405cat >>conftest.$ac_ext <<_ACEOF
11406/* end confdefs.h. */
98418dba
CW
11407#include "X11/xpm.h"
11408#ifndef XpmReturnAllocPixels
11409no_return_alloc_pixels
503d2be0 11410#endif
ba4481b5 11411
98418dba
CW
11412_ACEOF
11413if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11414 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
11415 HAVE_XPM=no
11416else
11417 HAVE_XPM=yes
11418fi
11419rm -f conftest*
ba4481b5 11420
c0d27fcc 11421
98418dba 11422 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11423 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
11424echo "${ECHO_T}yes" >&6
11425 else
c0d27fcc 11426 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
11427echo "${ECHO_T}no" >&6
11428 fi
11429 fi
11430 fi
11431
11432 if test "${HAVE_XPM}" = "yes"; then
b936fae4 11433
c0d27fcc 11434cat >>confdefs.h <<\_ACEOF
98418dba 11435#define HAVE_XPM 1
c0d27fcc 11436_ACEOF
98418dba
CW
11437
11438 fi
11439fi
11440
11441### Use -ljpeg if available, unless `--with-jpeg=no'.
11442HAVE_JPEG=no
11443if test "${HAVE_X11}" = "yes"; then
11444 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
11445 if test "${ac_cv_header_jerror_h+set}" = set; then
11446 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
11447echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11448if test "${ac_cv_header_jerror_h+set}" = set; then
11449 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11450fi
11451echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
11452echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 11453else
c0d27fcc
MR
11454 # Is the header compilable?
11455echo "$as_me:$LINENO: checking jerror.h usability" >&5
11456echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
11457cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11458/* confdefs.h. */
11459_ACEOF
11460cat confdefs.h >>conftest.$ac_ext
11461cat >>conftest.$ac_ext <<_ACEOF
11462/* end confdefs.h. */
c0d27fcc
MR
11463$ac_includes_default
11464#include <jerror.h>
11465_ACEOF
11466rm -f conftest.$ac_objext
11467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11468 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11469 ac_status=$?
35996d22
AS
11470 grep -v '^ *+' conftest.er1 >conftest.err
11471 rm -f conftest.er1
11472 cat conftest.err >&5
c0d27fcc
MR
11473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11474 (exit $ac_status); } &&
4494a266
JD
11475 { ac_try='test -z "$ac_c_werror_flag"
11476 || test ! -s conftest.err'
35996d22
AS
11477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11478 (eval $ac_try) 2>&5
11479 ac_status=$?
11480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11481 (exit $ac_status); }; } &&
11482 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11484 (eval $ac_try) 2>&5
11485 ac_status=$?
11486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11487 (exit $ac_status); }; }; then
11488 ac_header_compiler=yes
11489else
11490 echo "$as_me: failed program was:" >&5
19650fd6
AS
11491sed 's/^/| /' conftest.$ac_ext >&5
11492
c0d27fcc
MR
11493ac_header_compiler=no
11494fi
35996d22 11495rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11496echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11497echo "${ECHO_T}$ac_header_compiler" >&6
11498
11499# Is the header present?
11500echo "$as_me:$LINENO: checking jerror.h presence" >&5
11501echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
11502cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11503/* confdefs.h. */
11504_ACEOF
11505cat confdefs.h >>conftest.$ac_ext
11506cat >>conftest.$ac_ext <<_ACEOF
11507/* end confdefs.h. */
98418dba
CW
11508#include <jerror.h>
11509_ACEOF
c0d27fcc 11510if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11511 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11512 ac_status=$?
6bae0ccf 11513 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11514 rm -f conftest.er1
11515 cat conftest.err >&5
c0d27fcc 11516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11517 (exit $ac_status); } >/dev/null; then
11518 if test -s conftest.err; then
11519 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11520 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11521 else
11522 ac_cpp_err=
11523 fi
11524else
11525 ac_cpp_err=yes
503d2be0 11526fi
98418dba 11527if test -z "$ac_cpp_err"; then
c0d27fcc 11528 ac_header_preproc=yes
ba4481b5 11529else
98418dba 11530 echo "$as_me: failed program was:" >&5
19650fd6
AS
11531sed 's/^/| /' conftest.$ac_ext >&5
11532
c0d27fcc 11533 ac_header_preproc=no
98418dba
CW
11534fi
11535rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11536echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11537echo "${ECHO_T}$ac_header_preproc" >&6
11538
11539# So? What about this header?
35996d22
AS
11540case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11541 yes:no: )
c0d27fcc
MR
11542 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
11543echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11544 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
11545echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
11546 ac_header_preproc=yes
19650fd6 11547 ;;
35996d22 11548 no:yes:* )
c0d27fcc
MR
11549 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
11550echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
35996d22
AS
11551 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
11552echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
11553 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
11554echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
11555 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
11556echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 11557 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 11558echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11559 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
11560echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11561 (
11562 cat <<\_ASBOX
35996d22
AS
11563## ------------------------------------------ ##
11564## Report this to the AC_PACKAGE_NAME lists. ##
11565## ------------------------------------------ ##
19650fd6
AS
11566_ASBOX
11567 ) |
11568 sed "s/^/$as_me: WARNING: /" >&2
11569 ;;
c0d27fcc
MR
11570esac
11571echo "$as_me:$LINENO: checking for jerror.h" >&5
11572echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11573if test "${ac_cv_header_jerror_h+set}" = set; then
11574 echo $ECHO_N "(cached) $ECHO_C" >&6
11575else
11576 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 11577fi
c0d27fcc 11578echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 11579echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
11580
11581fi
98418dba 11582if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 11583 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
11584echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
11585if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 11586 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11587else
98418dba
CW
11588 ac_check_lib_save_LIBS=$LIBS
11589LIBS="-ljpeg $LIBS"
11590cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11591/* confdefs.h. */
11592_ACEOF
11593cat confdefs.h >>conftest.$ac_ext
11594cat >>conftest.$ac_ext <<_ACEOF
11595/* end confdefs.h. */
98418dba
CW
11596
11597/* Override any gcc2 internal prototype to avoid an error. */
11598#ifdef __cplusplus
11599extern "C"
11600#endif
11601/* We use char because int might match the return type of a gcc2
11602 builtin and then its argument prototype would still apply. */
11603char jpeg_destroy_compress ();
503d2be0
AS
11604int
11605main ()
11606{
98418dba 11607jpeg_destroy_compress ();
503d2be0
AS
11608 ;
11609 return 0;
11610}
11611_ACEOF
11612rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11613if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11614 (eval $ac_link) 2>conftest.er1
503d2be0 11615 ac_status=$?
35996d22
AS
11616 grep -v '^ *+' conftest.er1 >conftest.err
11617 rm -f conftest.er1
11618 cat conftest.err >&5
c0d27fcc 11619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11620 (exit $ac_status); } &&
4494a266
JD
11621 { ac_try='test -z "$ac_c_werror_flag"
11622 || test ! -s conftest.err'
35996d22
AS
11623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11624 (eval $ac_try) 2>&5
11625 ac_status=$?
11626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11627 (exit $ac_status); }; } &&
11628 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11630 (eval $ac_try) 2>&5
11631 ac_status=$?
c0d27fcc 11632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11633 (exit $ac_status); }; }; then
98418dba 11634 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 11635else
503d2be0 11636 echo "$as_me: failed program was:" >&5
19650fd6
AS
11637sed 's/^/| /' conftest.$ac_ext >&5
11638
98418dba 11639ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 11640fi
35996d22
AS
11641rm -f conftest.err conftest.$ac_objext \
11642 conftest$ac_exeext conftest.$ac_ext
98418dba 11643LIBS=$ac_check_lib_save_LIBS
ba4481b5 11644fi
c0d27fcc 11645echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
11646echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
11647if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
11648 HAVE_JPEG=yes
ba4481b5 11649fi
98418dba 11650
ba4481b5 11651fi
98418dba 11652
c0d27fcc 11653
ba4481b5 11654 fi
ba4481b5 11655
c0d27fcc 11656
98418dba 11657 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 11658 cat >>confdefs.h <<\_ACEOF
98418dba 11659#define HAVE_JPEG 1
c0d27fcc 11660_ACEOF
98418dba
CW
11661
11662 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11663/* confdefs.h. */
11664_ACEOF
11665cat confdefs.h >>conftest.$ac_ext
11666cat >>conftest.$ac_ext <<_ACEOF
11667/* end confdefs.h. */
22044edf 11668#include <jpeglib.h>
98418dba
CW
11669 version=JPEG_LIB_VERSION
11670
11671_ACEOF
11672if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11673 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 11674 cat >>confdefs.h <<\_ACEOF
98418dba 11675#define HAVE_JPEG 1
c0d27fcc 11676_ACEOF
ba4481b5 11677
98418dba 11678else
c0d27fcc 11679 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
11680echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
11681 HAVE_JPEG=no
ba4481b5 11682fi
98418dba 11683rm -f conftest*
ba4481b5 11684
98418dba
CW
11685 fi
11686fi
503d2be0 11687
98418dba
CW
11688### Use -lpng if available, unless `--with-png=no'.
11689HAVE_PNG=no
11690if test "${HAVE_X11}" = "yes"; then
11691 if test "${with_png}" != "no"; then
f57bd967
DL
11692 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
11693 # in /usr/include/libpng.
11694
11695
11696for ac_header in png.h libpng/png.h
11697do
11698as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11699if eval "test \"\${$as_ac_Header+set}\" = set"; then
11700 echo "$as_me:$LINENO: checking for $ac_header" >&5
11701echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11702if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 11703 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 11704fi
f57bd967
DL
11705echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11706echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
503d2be0 11707else
c0d27fcc 11708 # Is the header compilable?
f57bd967
DL
11709echo "$as_me:$LINENO: checking $ac_header usability" >&5
11710echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
c0d27fcc 11711cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11712/* confdefs.h. */
11713_ACEOF
11714cat confdefs.h >>conftest.$ac_ext
11715cat >>conftest.$ac_ext <<_ACEOF
11716/* end confdefs.h. */
c0d27fcc 11717$ac_includes_default
f57bd967 11718#include <$ac_header>
c0d27fcc
MR
11719_ACEOF
11720rm -f conftest.$ac_objext
11721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11722 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11723 ac_status=$?
35996d22
AS
11724 grep -v '^ *+' conftest.er1 >conftest.err
11725 rm -f conftest.er1
11726 cat conftest.err >&5
c0d27fcc
MR
11727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11728 (exit $ac_status); } &&
4494a266
JD
11729 { ac_try='test -z "$ac_c_werror_flag"
11730 || test ! -s conftest.err'
35996d22
AS
11731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11732 (eval $ac_try) 2>&5
11733 ac_status=$?
11734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11735 (exit $ac_status); }; } &&
11736 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11738 (eval $ac_try) 2>&5
11739 ac_status=$?
11740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11741 (exit $ac_status); }; }; then
11742 ac_header_compiler=yes
11743else
11744 echo "$as_me: failed program was:" >&5
19650fd6
AS
11745sed 's/^/| /' conftest.$ac_ext >&5
11746
c0d27fcc
MR
11747ac_header_compiler=no
11748fi
35996d22 11749rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11750echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11751echo "${ECHO_T}$ac_header_compiler" >&6
11752
11753# Is the header present?
f57bd967
DL
11754echo "$as_me:$LINENO: checking $ac_header presence" >&5
11755echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
c0d27fcc 11756cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11757/* confdefs.h. */
11758_ACEOF
11759cat confdefs.h >>conftest.$ac_ext
11760cat >>conftest.$ac_ext <<_ACEOF
11761/* end confdefs.h. */
f57bd967 11762#include <$ac_header>
503d2be0 11763_ACEOF
c0d27fcc 11764if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11765 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11766 ac_status=$?
6bae0ccf 11767 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11768 rm -f conftest.er1
11769 cat conftest.err >&5
c0d27fcc 11770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11771 (exit $ac_status); } >/dev/null; then
11772 if test -s conftest.err; then
11773 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11774 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
11775 else
11776 ac_cpp_err=
11777 fi
11778else
11779 ac_cpp_err=yes
11780fi
11781if test -z "$ac_cpp_err"; then
c0d27fcc 11782 ac_header_preproc=yes
503d2be0
AS
11783else
11784 echo "$as_me: failed program was:" >&5
19650fd6
AS
11785sed 's/^/| /' conftest.$ac_ext >&5
11786
c0d27fcc 11787 ac_header_preproc=no
ba4481b5 11788fi
503d2be0 11789rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11790echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11791echo "${ECHO_T}$ac_header_preproc" >&6
11792
11793# So? What about this header?
35996d22
AS
11794case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11795 yes:no: )
f57bd967
DL
11796 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11797echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11798 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11799echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11800 ac_header_preproc=yes
19650fd6 11801 ;;
35996d22 11802 no:yes:* )
f57bd967
DL
11803 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11804echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
11805 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11806echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11807 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11808echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11809 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11810echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 11811 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 11812echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11813 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11814echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11815 (
11816 cat <<\_ASBOX
35996d22
AS
11817## ------------------------------------------ ##
11818## Report this to the AC_PACKAGE_NAME lists. ##
11819## ------------------------------------------ ##
19650fd6
AS
11820_ASBOX
11821 ) |
11822 sed "s/^/$as_me: WARNING: /" >&2
11823 ;;
c0d27fcc 11824esac
f57bd967
DL
11825echo "$as_me:$LINENO: checking for $ac_header" >&5
11826echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11827if eval "test \"\${$as_ac_Header+set}\" = set"; then
c0d27fcc
MR
11828 echo $ECHO_N "(cached) $ECHO_C" >&6
11829else
35996d22 11830 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967
DL
11831fi
11832echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11833echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11834
ba4481b5 11835fi
f57bd967
DL
11836if test `eval echo '${'$as_ac_Header'}'` = yes; then
11837 cat >>confdefs.h <<_ACEOF
11838#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11839_ACEOF
c0d27fcc
MR
11840
11841fi
f57bd967
DL
11842
11843done
11844
11845 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
11846 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
11847echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
11848if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 11849 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11850else
98418dba
CW
11851 ac_check_lib_save_LIBS=$LIBS
11852LIBS="-lpng -lz -lm $LIBS"
11853cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11854/* confdefs.h. */
11855_ACEOF
11856cat confdefs.h >>conftest.$ac_ext
11857cat >>conftest.$ac_ext <<_ACEOF
11858/* end confdefs.h. */
98418dba 11859
ba4481b5 11860/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11861#ifdef __cplusplus
11862extern "C"
11863#endif
ba4481b5 11864/* We use char because int might match the return type of a gcc2
503d2be0 11865 builtin and then its argument prototype would still apply. */
98418dba 11866char png_get_channels ();
503d2be0
AS
11867int
11868main ()
11869{
98418dba 11870png_get_channels ();
503d2be0
AS
11871 ;
11872 return 0;
11873}
11874_ACEOF
11875rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11876if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11877 (eval $ac_link) 2>conftest.er1
503d2be0 11878 ac_status=$?
35996d22
AS
11879 grep -v '^ *+' conftest.er1 >conftest.err
11880 rm -f conftest.er1
11881 cat conftest.err >&5
c0d27fcc 11882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11883 (exit $ac_status); } &&
4494a266
JD
11884 { ac_try='test -z "$ac_c_werror_flag"
11885 || test ! -s conftest.err'
35996d22
AS
11886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11887 (eval $ac_try) 2>&5
11888 ac_status=$?
11889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11890 (exit $ac_status); }; } &&
11891 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11893 (eval $ac_try) 2>&5
11894 ac_status=$?
c0d27fcc 11895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11896 (exit $ac_status); }; }; then
98418dba 11897 ac_cv_lib_png_png_get_channels=yes
73b77ee5 11898else
98418dba 11899 echo "$as_me: failed program was:" >&5
19650fd6
AS
11900sed 's/^/| /' conftest.$ac_ext >&5
11901
98418dba 11902ac_cv_lib_png_png_get_channels=no
73b77ee5 11903fi
35996d22
AS
11904rm -f conftest.err conftest.$ac_objext \
11905 conftest$ac_exeext conftest.$ac_ext
98418dba 11906LIBS=$ac_check_lib_save_LIBS
73b77ee5 11907fi
c0d27fcc 11908echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
11909echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
11910if test $ac_cv_lib_png_png_get_channels = yes; then
11911 HAVE_PNG=yes
73b77ee5 11912fi
503d2be0 11913
f57bd967 11914 fi
98418dba
CW
11915 fi
11916
11917 if test "${HAVE_PNG}" = "yes"; then
b936fae4 11918
c0d27fcc 11919cat >>confdefs.h <<\_ACEOF
98418dba 11920#define HAVE_PNG 1
c0d27fcc 11921_ACEOF
73b77ee5 11922
98418dba 11923 fi
73b77ee5
GM
11924fi
11925
98418dba
CW
11926### Use -ltiff if available, unless `--with-tiff=no'.
11927HAVE_TIFF=no
11928if test "${HAVE_X11}" = "yes"; then
11929 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
11930 if test "${ac_cv_header_tiffio_h+set}" = set; then
11931 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
11932echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
11933if test "${ac_cv_header_tiffio_h+set}" = set; then
11934 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11935fi
11936echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
11937echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 11938else
c0d27fcc
MR
11939 # Is the header compilable?
11940echo "$as_me:$LINENO: checking tiffio.h usability" >&5
11941echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
11942cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11943/* confdefs.h. */
11944_ACEOF
11945cat confdefs.h >>conftest.$ac_ext
11946cat >>conftest.$ac_ext <<_ACEOF
11947/* end confdefs.h. */
c0d27fcc
MR
11948$ac_includes_default
11949#include <tiffio.h>
11950_ACEOF
11951rm -f conftest.$ac_objext
11952if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11953 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11954 ac_status=$?
35996d22
AS
11955 grep -v '^ *+' conftest.er1 >conftest.err
11956 rm -f conftest.er1
11957 cat conftest.err >&5
c0d27fcc
MR
11958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11959 (exit $ac_status); } &&
4494a266
JD
11960 { ac_try='test -z "$ac_c_werror_flag"
11961 || test ! -s conftest.err'
35996d22
AS
11962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11963 (eval $ac_try) 2>&5
11964 ac_status=$?
11965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11966 (exit $ac_status); }; } &&
11967 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11969 (eval $ac_try) 2>&5
11970 ac_status=$?
11971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11972 (exit $ac_status); }; }; then
11973 ac_header_compiler=yes
11974else
11975 echo "$as_me: failed program was:" >&5
19650fd6
AS
11976sed 's/^/| /' conftest.$ac_ext >&5
11977
c0d27fcc
MR
11978ac_header_compiler=no
11979fi
35996d22 11980rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11981echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11982echo "${ECHO_T}$ac_header_compiler" >&6
11983
11984# Is the header present?
11985echo "$as_me:$LINENO: checking tiffio.h presence" >&5
11986echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
11987cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11988/* confdefs.h. */
11989_ACEOF
11990cat confdefs.h >>conftest.$ac_ext
11991cat >>conftest.$ac_ext <<_ACEOF
11992/* end confdefs.h. */
98418dba
CW
11993#include <tiffio.h>
11994_ACEOF
c0d27fcc 11995if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11996 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11997 ac_status=$?
6bae0ccf 11998 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11999 rm -f conftest.er1
12000 cat conftest.err >&5
c0d27fcc 12001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12002 (exit $ac_status); } >/dev/null; then
12003 if test -s conftest.err; then
12004 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12005 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12006 else
12007 ac_cpp_err=
12008 fi
12009else
12010 ac_cpp_err=yes
12011fi
12012if test -z "$ac_cpp_err"; then
c0d27fcc 12013 ac_header_preproc=yes
98418dba
CW
12014else
12015 echo "$as_me: failed program was:" >&5
19650fd6
AS
12016sed 's/^/| /' conftest.$ac_ext >&5
12017
c0d27fcc 12018 ac_header_preproc=no
98418dba
CW
12019fi
12020rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12021echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12022echo "${ECHO_T}$ac_header_preproc" >&6
12023
12024# So? What about this header?
35996d22
AS
12025case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12026 yes:no: )
c0d27fcc
MR
12027 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
12028echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12029 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
12030echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
12031 ac_header_preproc=yes
19650fd6 12032 ;;
35996d22 12033 no:yes:* )
c0d27fcc
MR
12034 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
12035echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
35996d22
AS
12036 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
12037echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
12038 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
12039echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
12040 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
12041echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12042 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 12043echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12044 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
12045echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12046 (
12047 cat <<\_ASBOX
35996d22
AS
12048## ------------------------------------------ ##
12049## Report this to the AC_PACKAGE_NAME lists. ##
12050## ------------------------------------------ ##
19650fd6
AS
12051_ASBOX
12052 ) |
12053 sed "s/^/$as_me: WARNING: /" >&2
12054 ;;
c0d27fcc
MR
12055esac
12056echo "$as_me:$LINENO: checking for tiffio.h" >&5
12057echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12058if test "${ac_cv_header_tiffio_h+set}" = set; then
12059 echo $ECHO_N "(cached) $ECHO_C" >&6
12060else
12061 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 12062fi
c0d27fcc 12063echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 12064echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
12065
12066fi
98418dba
CW
12067if test $ac_cv_header_tiffio_h = yes; then
12068 tifflibs="-lz -lm"
12069 # At least one tiff package requires the jpeg library.
12070 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 12071 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
12072echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
12073if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 12074 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12075else
503d2be0 12076 ac_check_lib_save_LIBS=$LIBS
98418dba 12077LIBS="-ltiff $tifflibs $LIBS"
503d2be0 12078cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12079/* confdefs.h. */
12080_ACEOF
12081cat confdefs.h >>conftest.$ac_ext
12082cat >>conftest.$ac_ext <<_ACEOF
12083/* end confdefs.h. */
503d2be0 12084
73b77ee5 12085/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12086#ifdef __cplusplus
12087extern "C"
12088#endif
73b77ee5 12089/* We use char because int might match the return type of a gcc2
503d2be0 12090 builtin and then its argument prototype would still apply. */
98418dba 12091char TIFFGetVersion ();
503d2be0
AS
12092int
12093main ()
12094{
98418dba 12095TIFFGetVersion ();
503d2be0
AS
12096 ;
12097 return 0;
12098}
12099_ACEOF
12100rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12102 (eval $ac_link) 2>conftest.er1
503d2be0 12103 ac_status=$?
35996d22
AS
12104 grep -v '^ *+' conftest.er1 >conftest.err
12105 rm -f conftest.er1
12106 cat conftest.err >&5
c0d27fcc 12107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12108 (exit $ac_status); } &&
4494a266
JD
12109 { ac_try='test -z "$ac_c_werror_flag"
12110 || test ! -s conftest.err'
35996d22
AS
12111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12112 (eval $ac_try) 2>&5
12113 ac_status=$?
12114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12115 (exit $ac_status); }; } &&
12116 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12118 (eval $ac_try) 2>&5
12119 ac_status=$?
c0d27fcc 12120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12121 (exit $ac_status); }; }; then
98418dba 12122 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
12123else
12124 echo "$as_me: failed program was:" >&5
19650fd6
AS
12125sed 's/^/| /' conftest.$ac_ext >&5
12126
98418dba 12127ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 12128fi
35996d22
AS
12129rm -f conftest.err conftest.$ac_objext \
12130 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12131LIBS=$ac_check_lib_save_LIBS
12132fi
c0d27fcc 12133echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
12134echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
12135if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
12136 HAVE_TIFF=yes
12137fi
12138
12139fi
73b77ee5 12140
c0d27fcc 12141
98418dba
CW
12142 fi
12143
12144 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 12145
c0d27fcc 12146cat >>confdefs.h <<\_ACEOF
98418dba 12147#define HAVE_TIFF 1
c0d27fcc 12148_ACEOF
98418dba
CW
12149
12150 fi
73b77ee5
GM
12151fi
12152
98418dba
CW
12153### Use -lgif if available, unless `--with-gif=no'.
12154HAVE_GIF=no
12155if test "${HAVE_X11}" = "yes"; then
12156 if test "${with_gif}" != "no"; then
c0d27fcc
MR
12157 if test "${ac_cv_header_gif_lib_h+set}" = set; then
12158 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
12159echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12160if test "${ac_cv_header_gif_lib_h+set}" = set; then
12161 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12162fi
12163echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
12164echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 12165else
c0d27fcc
MR
12166 # Is the header compilable?
12167echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
12168echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
12169cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12170/* confdefs.h. */
12171_ACEOF
12172cat confdefs.h >>conftest.$ac_ext
12173cat >>conftest.$ac_ext <<_ACEOF
12174/* end confdefs.h. */
c0d27fcc
MR
12175$ac_includes_default
12176#include <gif_lib.h>
12177_ACEOF
12178rm -f conftest.$ac_objext
12179if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12180 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12181 ac_status=$?
35996d22
AS
12182 grep -v '^ *+' conftest.er1 >conftest.err
12183 rm -f conftest.er1
12184 cat conftest.err >&5
c0d27fcc
MR
12185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12186 (exit $ac_status); } &&
4494a266
JD
12187 { ac_try='test -z "$ac_c_werror_flag"
12188 || test ! -s conftest.err'
35996d22
AS
12189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12190 (eval $ac_try) 2>&5
12191 ac_status=$?
12192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12193 (exit $ac_status); }; } &&
12194 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12196 (eval $ac_try) 2>&5
12197 ac_status=$?
12198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12199 (exit $ac_status); }; }; then
12200 ac_header_compiler=yes
12201else
12202 echo "$as_me: failed program was:" >&5
19650fd6
AS
12203sed 's/^/| /' conftest.$ac_ext >&5
12204
c0d27fcc
MR
12205ac_header_compiler=no
12206fi
35996d22 12207rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12208echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12209echo "${ECHO_T}$ac_header_compiler" >&6
12210
12211# Is the header present?
12212echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
12213echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
12214cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12215/* confdefs.h. */
12216_ACEOF
12217cat confdefs.h >>conftest.$ac_ext
12218cat >>conftest.$ac_ext <<_ACEOF
12219/* end confdefs.h. */
98418dba
CW
12220#include <gif_lib.h>
12221_ACEOF
c0d27fcc 12222if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12223 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12224 ac_status=$?
6bae0ccf 12225 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12226 rm -f conftest.er1
12227 cat conftest.err >&5
c0d27fcc 12228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12229 (exit $ac_status); } >/dev/null; then
12230 if test -s conftest.err; then
12231 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12232 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12233 else
12234 ac_cpp_err=
12235 fi
12236else
12237 ac_cpp_err=yes
12238fi
12239if test -z "$ac_cpp_err"; then
c0d27fcc 12240 ac_header_preproc=yes
98418dba
CW
12241else
12242 echo "$as_me: failed program was:" >&5
19650fd6
AS
12243sed 's/^/| /' conftest.$ac_ext >&5
12244
c0d27fcc 12245 ac_header_preproc=no
98418dba
CW
12246fi
12247rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12248echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12249echo "${ECHO_T}$ac_header_preproc" >&6
12250
12251# So? What about this header?
35996d22
AS
12252case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12253 yes:no: )
c0d27fcc
MR
12254 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12255echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12256 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
12257echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
12258 ac_header_preproc=yes
19650fd6 12259 ;;
35996d22 12260 no:yes:* )
c0d27fcc
MR
12261 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
12262echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
35996d22
AS
12263 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
12264echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
12265 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
12266echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
12267 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
12268echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12269 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 12270echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12271 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
12272echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12273 (
12274 cat <<\_ASBOX
35996d22
AS
12275## ------------------------------------------ ##
12276## Report this to the AC_PACKAGE_NAME lists. ##
12277## ------------------------------------------ ##
19650fd6
AS
12278_ASBOX
12279 ) |
12280 sed "s/^/$as_me: WARNING: /" >&2
12281 ;;
c0d27fcc
MR
12282esac
12283echo "$as_me:$LINENO: checking for gif_lib.h" >&5
12284echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12285if test "${ac_cv_header_gif_lib_h+set}" = set; then
12286 echo $ECHO_N "(cached) $ECHO_C" >&6
12287else
12288 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 12289fi
c0d27fcc 12290echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 12291echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
12292
12293fi
98418dba
CW
12294if test $ac_cv_header_gif_lib_h = yes; then
12295 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12296# Earlier versions can crash Emacs.
c0d27fcc 12297 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
12298echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
12299if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 12300 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12301else
503d2be0 12302 ac_check_lib_save_LIBS=$LIBS
98418dba 12303LIBS="-lungif $LIBS"
503d2be0 12304cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12305/* confdefs.h. */
12306_ACEOF
12307cat confdefs.h >>conftest.$ac_ext
12308cat >>conftest.$ac_ext <<_ACEOF
12309/* end confdefs.h. */
73b77ee5 12310
98418dba
CW
12311/* Override any gcc2 internal prototype to avoid an error. */
12312#ifdef __cplusplus
12313extern "C"
12314#endif
12315/* We use char because int might match the return type of a gcc2
12316 builtin and then its argument prototype would still apply. */
12317char EGifPutExtensionLast ();
503d2be0
AS
12318int
12319main ()
12320{
98418dba 12321EGifPutExtensionLast ();
503d2be0
AS
12322 ;
12323 return 0;
12324}
12325_ACEOF
12326rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12328 (eval $ac_link) 2>conftest.er1
503d2be0 12329 ac_status=$?
35996d22
AS
12330 grep -v '^ *+' conftest.er1 >conftest.err
12331 rm -f conftest.er1
12332 cat conftest.err >&5
c0d27fcc 12333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12334 (exit $ac_status); } &&
4494a266
JD
12335 { ac_try='test -z "$ac_c_werror_flag"
12336 || test ! -s conftest.err'
c0d27fcc 12337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
12338 (eval $ac_try) 2>&5
12339 ac_status=$?
c0d27fcc 12340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
12341 (exit $ac_status); }; } &&
12342 { ac_try='test -s conftest$ac_exeext'
12343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12344 (eval $ac_try) 2>&5
12345 ac_status=$?
12346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12347 (exit $ac_status); }; }; then
12348 ac_cv_lib_ungif_EGifPutExtensionLast=yes
12349else
98418dba 12350 echo "$as_me: failed program was:" >&5
19650fd6
AS
12351sed 's/^/| /' conftest.$ac_ext >&5
12352
98418dba
CW
12353ac_cv_lib_ungif_EGifPutExtensionLast=no
12354fi
35996d22
AS
12355rm -f conftest.err conftest.$ac_objext \
12356 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12357LIBS=$ac_check_lib_save_LIBS
12358fi
c0d27fcc 12359echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
12360echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
12361if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
12362 HAVE_GIF=yes
12363fi
12364
12365fi
12366
c0d27fcc 12367
98418dba
CW
12368 fi
12369
12370 if test "${HAVE_GIF}" = "yes"; then
b936fae4 12371
c0d27fcc 12372cat >>confdefs.h <<\_ACEOF
98418dba 12373#define HAVE_GIF 1
c0d27fcc 12374_ACEOF
98418dba
CW
12375
12376 fi
12377fi
12378
c0d27fcc
MR
12379### Use Mac OS X Carbon API to implement GUI.
12380HAVE_CARBON=no
12381if test "${with_carbon}" != "no"; then
12382 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
12383 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
12384echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
12385if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
12386 echo $ECHO_N "(cached) $ECHO_C" >&6
12387fi
12388echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
12389echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
12390else
12391 # Is the header compilable?
12392echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
12393echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
12394cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12395/* confdefs.h. */
12396_ACEOF
12397cat confdefs.h >>conftest.$ac_ext
12398cat >>conftest.$ac_ext <<_ACEOF
12399/* end confdefs.h. */
c0d27fcc
MR
12400$ac_includes_default
12401#include <Carbon/Carbon.h>
12402_ACEOF
12403rm -f conftest.$ac_objext
12404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12405 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12406 ac_status=$?
35996d22
AS
12407 grep -v '^ *+' conftest.er1 >conftest.err
12408 rm -f conftest.er1
12409 cat conftest.err >&5
c0d27fcc
MR
12410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12411 (exit $ac_status); } &&
4494a266
JD
12412 { ac_try='test -z "$ac_c_werror_flag"
12413 || test ! -s conftest.err'
35996d22
AS
12414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12415 (eval $ac_try) 2>&5
12416 ac_status=$?
12417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12418 (exit $ac_status); }; } &&
12419 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12421 (eval $ac_try) 2>&5
12422 ac_status=$?
12423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12424 (exit $ac_status); }; }; then
12425 ac_header_compiler=yes
12426else
12427 echo "$as_me: failed program was:" >&5
19650fd6
AS
12428sed 's/^/| /' conftest.$ac_ext >&5
12429
c0d27fcc
MR
12430ac_header_compiler=no
12431fi
35996d22 12432rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12433echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12434echo "${ECHO_T}$ac_header_compiler" >&6
12435
12436# Is the header present?
12437echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
12438echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
12439cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12440/* confdefs.h. */
12441_ACEOF
12442cat confdefs.h >>conftest.$ac_ext
12443cat >>conftest.$ac_ext <<_ACEOF
12444/* end confdefs.h. */
e0f712ba
AC
12445#include <Carbon/Carbon.h>
12446_ACEOF
c0d27fcc 12447if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
e0f712ba
AC
12448 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12449 ac_status=$?
6bae0ccf 12450 grep -v '^ *+' conftest.er1 >conftest.err
e0f712ba
AC
12451 rm -f conftest.er1
12452 cat conftest.err >&5
c0d27fcc 12453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
e0f712ba
AC
12454 (exit $ac_status); } >/dev/null; then
12455 if test -s conftest.err; then
12456 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12457 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
e0f712ba
AC
12458 else
12459 ac_cpp_err=
12460 fi
12461else
12462 ac_cpp_err=yes
12463fi
12464if test -z "$ac_cpp_err"; then
c0d27fcc 12465 ac_header_preproc=yes
e0f712ba
AC
12466else
12467 echo "$as_me: failed program was:" >&5
19650fd6
AS
12468sed 's/^/| /' conftest.$ac_ext >&5
12469
c0d27fcc 12470 ac_header_preproc=no
e0f712ba
AC
12471fi
12472rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12473echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12474echo "${ECHO_T}$ac_header_preproc" >&6
12475
12476# So? What about this header?
35996d22
AS
12477case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12478 yes:no: )
c0d27fcc
MR
12479 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
12480echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12481 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
12482echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
12483 ac_header_preproc=yes
19650fd6 12484 ;;
35996d22 12485 no:yes:* )
c0d27fcc
MR
12486 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
12487echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
35996d22
AS
12488 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
12489echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
12490 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
12491echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
12492 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
12493echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12494 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
19650fd6 12495echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12496 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
12497echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12498 (
12499 cat <<\_ASBOX
35996d22
AS
12500## ------------------------------------------ ##
12501## Report this to the AC_PACKAGE_NAME lists. ##
12502## ------------------------------------------ ##
19650fd6
AS
12503_ASBOX
12504 ) |
12505 sed "s/^/$as_me: WARNING: /" >&2
12506 ;;
c0d27fcc
MR
12507esac
12508echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
12509echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
12510if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
12511 echo $ECHO_N "(cached) $ECHO_C" >&6
12512else
12513 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
e0f712ba 12514fi
c0d27fcc 12515echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
e0f712ba 12516echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
c0d27fcc
MR
12517
12518fi
e0f712ba
AC
12519if test $ac_cv_header_Carbon_Carbon_h = yes; then
12520 HAVE_CARBON=yes
12521fi
12522
c0d27fcc 12523
e0f712ba
AC
12524fi
12525
cef11da2
ST
12526if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12527 echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12528echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12529if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12530 echo $ECHO_N "(cached) $ECHO_C" >&6
12531fi
12532echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12533echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12534else
12535 # Is the header compilable?
12536echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
12537echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6
12538cat >conftest.$ac_ext <<_ACEOF
12539/* confdefs.h. */
12540_ACEOF
12541cat confdefs.h >>conftest.$ac_ext
12542cat >>conftest.$ac_ext <<_ACEOF
12543/* end confdefs.h. */
12544$ac_includes_default
12545#include <malloc/malloc.h>
12546_ACEOF
12547rm -f conftest.$ac_objext
12548if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12549 (eval $ac_compile) 2>conftest.er1
12550 ac_status=$?
12551 grep -v '^ *+' conftest.er1 >conftest.err
12552 rm -f conftest.er1
12553 cat conftest.err >&5
12554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12555 (exit $ac_status); } &&
12556 { ac_try='test -z "$ac_c_werror_flag"
12557 || test ! -s conftest.err'
12558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12559 (eval $ac_try) 2>&5
12560 ac_status=$?
12561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12562 (exit $ac_status); }; } &&
12563 { ac_try='test -s conftest.$ac_objext'
12564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12565 (eval $ac_try) 2>&5
12566 ac_status=$?
12567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12568 (exit $ac_status); }; }; then
12569 ac_header_compiler=yes
12570else
12571 echo "$as_me: failed program was:" >&5
12572sed 's/^/| /' conftest.$ac_ext >&5
12573
12574ac_header_compiler=no
12575fi
12576rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12577echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12578echo "${ECHO_T}$ac_header_compiler" >&6
12579
12580# Is the header present?
12581echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
12582echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6
12583cat >conftest.$ac_ext <<_ACEOF
12584/* confdefs.h. */
12585_ACEOF
12586cat confdefs.h >>conftest.$ac_ext
12587cat >>conftest.$ac_ext <<_ACEOF
12588/* end confdefs.h. */
12589#include <malloc/malloc.h>
12590_ACEOF
12591if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12592 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12593 ac_status=$?
12594 grep -v '^ *+' conftest.er1 >conftest.err
12595 rm -f conftest.er1
12596 cat conftest.err >&5
12597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12598 (exit $ac_status); } >/dev/null; then
12599 if test -s conftest.err; then
12600 ac_cpp_err=$ac_c_preproc_warn_flag
12601 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12602 else
12603 ac_cpp_err=
12604 fi
12605else
12606 ac_cpp_err=yes
12607fi
12608if test -z "$ac_cpp_err"; then
12609 ac_header_preproc=yes
12610else
12611 echo "$as_me: failed program was:" >&5
12612sed 's/^/| /' conftest.$ac_ext >&5
12613
12614 ac_header_preproc=no
12615fi
12616rm -f conftest.err conftest.$ac_ext
12617echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12618echo "${ECHO_T}$ac_header_preproc" >&6
12619
12620# So? What about this header?
12621case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12622 yes:no: )
12623 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
12624echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12625 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
12626echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
12627 ac_header_preproc=yes
12628 ;;
12629 no:yes:* )
12630 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
12631echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
12632 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
12633echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
12634 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
12635echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
12636 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
12637echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
12638 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
12639echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
12640 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
12641echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
12642 (
12643 cat <<\_ASBOX
12644## ------------------------------------------ ##
12645## Report this to the AC_PACKAGE_NAME lists. ##
12646## ------------------------------------------ ##
12647_ASBOX
12648 ) |
12649 sed "s/^/$as_me: WARNING: /" >&2
12650 ;;
12651esac
12652echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12653echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12654if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12655 echo $ECHO_N "(cached) $ECHO_C" >&6
12656else
12657 ac_cv_header_malloc_malloc_h=$ac_header_preproc
12658fi
12659echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12660echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12661
12662fi
12663if test $ac_cv_header_malloc_malloc_h = yes; then
12664
12665cat >>confdefs.h <<\_ACEOF
12666#define HAVE_MALLOC_MALLOC_H 1
12667_ACEOF
12668
12669fi
12670
12671
12672
e0f712ba 12673if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 12674
c0d27fcc 12675cat >>confdefs.h <<\_ACEOF
e0f712ba 12676#define HAVE_CARBON 1
c0d27fcc 12677_ACEOF
e0f712ba 12678
6a3a24fa
JD
12679 window_system=mac
12680 ## Specify the install directory
12681 carbon_appdir=
12682 if test "${carbon_appdir_x}" != ""; then
12683 case ${carbon_appdir_x} in
12684 y | ye | yes) carbon_appdir=/Applications ;;
12685 * ) carbon_appdir=${carbon_appdir_x} ;;
12686 esac
12687 fi
8f417b3b
AS
12688 # We also have mouse menus.
12689 HAVE_MENUS=yes
e0f712ba
AC
12690fi
12691
98418dba
CW
12692### Use session management (-lSM -lICE) if available
12693HAVE_X_SM=no
12694if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
12695 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12696 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
12697echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
12698if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12699 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12700fi
12701echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
12702echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 12703else
c0d27fcc
MR
12704 # Is the header compilable?
12705echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
12706echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
12707cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12708/* confdefs.h. */
12709_ACEOF
12710cat confdefs.h >>conftest.$ac_ext
12711cat >>conftest.$ac_ext <<_ACEOF
12712/* end confdefs.h. */
c0d27fcc
MR
12713$ac_includes_default
12714#include <X11/SM/SMlib.h>
12715_ACEOF
12716rm -f conftest.$ac_objext
12717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12718 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12719 ac_status=$?
35996d22
AS
12720 grep -v '^ *+' conftest.er1 >conftest.err
12721 rm -f conftest.er1
12722 cat conftest.err >&5
c0d27fcc
MR
12723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12724 (exit $ac_status); } &&
4494a266
JD
12725 { ac_try='test -z "$ac_c_werror_flag"
12726 || test ! -s conftest.err'
35996d22
AS
12727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12728 (eval $ac_try) 2>&5
12729 ac_status=$?
12730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12731 (exit $ac_status); }; } &&
12732 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12734 (eval $ac_try) 2>&5
12735 ac_status=$?
12736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12737 (exit $ac_status); }; }; then
12738 ac_header_compiler=yes
12739else
12740 echo "$as_me: failed program was:" >&5
19650fd6
AS
12741sed 's/^/| /' conftest.$ac_ext >&5
12742
c0d27fcc
MR
12743ac_header_compiler=no
12744fi
35996d22 12745rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12746echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12747echo "${ECHO_T}$ac_header_compiler" >&6
12748
12749# Is the header present?
12750echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
12751echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
12752cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12753/* confdefs.h. */
12754_ACEOF
12755cat confdefs.h >>conftest.$ac_ext
12756cat >>conftest.$ac_ext <<_ACEOF
12757/* end confdefs.h. */
98418dba
CW
12758#include <X11/SM/SMlib.h>
12759_ACEOF
c0d27fcc 12760if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12761 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12762 ac_status=$?
6bae0ccf 12763 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12764 rm -f conftest.er1
12765 cat conftest.err >&5
c0d27fcc 12766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12767 (exit $ac_status); } >/dev/null; then
12768 if test -s conftest.err; then
12769 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12770 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12771 else
12772 ac_cpp_err=
12773 fi
12774else
12775 ac_cpp_err=yes
503d2be0 12776fi
98418dba 12777if test -z "$ac_cpp_err"; then
c0d27fcc 12778 ac_header_preproc=yes
98418dba
CW
12779else
12780 echo "$as_me: failed program was:" >&5
19650fd6
AS
12781sed 's/^/| /' conftest.$ac_ext >&5
12782
c0d27fcc 12783 ac_header_preproc=no
98418dba
CW
12784fi
12785rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12786echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12787echo "${ECHO_T}$ac_header_preproc" >&6
12788
12789# So? What about this header?
35996d22
AS
12790case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12791 yes:no: )
c0d27fcc
MR
12792 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12793echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12794 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
12795echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
12796 ac_header_preproc=yes
19650fd6 12797 ;;
35996d22 12798 no:yes:* )
c0d27fcc
MR
12799 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
12800echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
35996d22
AS
12801 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
12802echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
12803 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
12804echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
12805 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
12806echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12807 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 12808echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12809 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
12810echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12811 (
12812 cat <<\_ASBOX
35996d22
AS
12813## ------------------------------------------ ##
12814## Report this to the AC_PACKAGE_NAME lists. ##
12815## ------------------------------------------ ##
19650fd6
AS
12816_ASBOX
12817 ) |
12818 sed "s/^/$as_me: WARNING: /" >&2
12819 ;;
c0d27fcc
MR
12820esac
12821echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
12822echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
12823if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12824 echo $ECHO_N "(cached) $ECHO_C" >&6
12825else
12826 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 12827fi
c0d27fcc 12828echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 12829echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
12830
12831fi
98418dba 12832if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 12833 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
12834echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
12835if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 12836 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12837else
503d2be0 12838 ac_check_lib_save_LIBS=$LIBS
1660500f 12839LIBS="-lSM -lICE $LIBS"
503d2be0 12840cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12841/* confdefs.h. */
12842_ACEOF
12843cat confdefs.h >>conftest.$ac_ext
12844cat >>conftest.$ac_ext <<_ACEOF
12845/* end confdefs.h. */
503d2be0 12846
73b77ee5 12847/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12848#ifdef __cplusplus
12849extern "C"
12850#endif
73b77ee5 12851/* We use char because int might match the return type of a gcc2
503d2be0 12852 builtin and then its argument prototype would still apply. */
98418dba 12853char SmcOpenConnection ();
503d2be0
AS
12854int
12855main ()
12856{
98418dba 12857SmcOpenConnection ();
503d2be0
AS
12858 ;
12859 return 0;
12860}
12861_ACEOF
12862rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12863if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12864 (eval $ac_link) 2>conftest.er1
503d2be0 12865 ac_status=$?
35996d22
AS
12866 grep -v '^ *+' conftest.er1 >conftest.err
12867 rm -f conftest.er1
12868 cat conftest.err >&5
c0d27fcc 12869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12870 (exit $ac_status); } &&
4494a266
JD
12871 { ac_try='test -z "$ac_c_werror_flag"
12872 || test ! -s conftest.err'
35996d22
AS
12873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12874 (eval $ac_try) 2>&5
12875 ac_status=$?
12876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12877 (exit $ac_status); }; } &&
12878 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12880 (eval $ac_try) 2>&5
12881 ac_status=$?
c0d27fcc 12882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12883 (exit $ac_status); }; }; then
98418dba 12884 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
12885else
12886 echo "$as_me: failed program was:" >&5
19650fd6
AS
12887sed 's/^/| /' conftest.$ac_ext >&5
12888
98418dba 12889ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 12890fi
35996d22
AS
12891rm -f conftest.err conftest.$ac_objext \
12892 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12893LIBS=$ac_check_lib_save_LIBS
12894fi
c0d27fcc 12895echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
12896echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
12897if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
12898 HAVE_X_SM=yes
73b77ee5
GM
12899fi
12900
73b77ee5 12901fi
73b77ee5 12902
c0d27fcc
MR
12903
12904
98418dba 12905 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 12906
c0d27fcc 12907cat >>confdefs.h <<\_ACEOF
98418dba 12908#define HAVE_X_SM 1
c0d27fcc 12909_ACEOF
73b77ee5 12910
98418dba
CW
12911 case "$LIBS" in
12912 *-lSM*) ;;
12913 *) LIBS="-lSM -lICE $LIBS" ;;
12914 esac
73b77ee5 12915 fi
98418dba 12916fi
73b77ee5 12917
98418dba 12918# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 12919echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
12920echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
12921if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
12922 echo $ECHO_N "(cached) $ECHO_C" >&6
12923else
12924 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12925/* confdefs.h. */
12926_ACEOF
12927cat confdefs.h >>conftest.$ac_ext
12928cat >>conftest.$ac_ext <<_ACEOF
12929/* end confdefs.h. */
98418dba 12930#include <netdb.h>
503d2be0
AS
12931int
12932main ()
12933{
98418dba 12934return h_errno;
503d2be0
AS
12935 ;
12936 return 0;
12937}
12938_ACEOF
12939rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12940if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12941 (eval $ac_link) 2>conftest.er1
503d2be0 12942 ac_status=$?
35996d22
AS
12943 grep -v '^ *+' conftest.er1 >conftest.err
12944 rm -f conftest.er1
12945 cat conftest.err >&5
c0d27fcc 12946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12947 (exit $ac_status); } &&
4494a266
JD
12948 { ac_try='test -z "$ac_c_werror_flag"
12949 || test ! -s conftest.err'
35996d22
AS
12950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12951 (eval $ac_try) 2>&5
12952 ac_status=$?
12953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12954 (exit $ac_status); }; } &&
12955 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12957 (eval $ac_try) 2>&5
12958 ac_status=$?
c0d27fcc 12959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12960 (exit $ac_status); }; }; then
98418dba 12961 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 12962else
503d2be0 12963 echo "$as_me: failed program was:" >&5
19650fd6
AS
12964sed 's/^/| /' conftest.$ac_ext >&5
12965
98418dba 12966emacs_cv_netdb_declares_h_errno=no
73b77ee5 12967fi
35996d22
AS
12968rm -f conftest.err conftest.$ac_objext \
12969 conftest$ac_exeext conftest.$ac_ext
98418dba 12970fi
c0d27fcc 12971echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
12972echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
12973if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 12974
c0d27fcc 12975cat >>confdefs.h <<\_ACEOF
98418dba 12976#define HAVE_H_ERRNO 1
c0d27fcc 12977_ACEOF
73b77ee5 12978
98418dba
CW
12979fi
12980
12981# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12982# for constant arguments. Useless!
c0d27fcc 12983echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
12984echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
12985if test "${ac_cv_working_alloca_h+set}" = set; then
12986 echo $ECHO_N "(cached) $ECHO_C" >&6
12987else
12988 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12989/* confdefs.h. */
12990_ACEOF
12991cat confdefs.h >>conftest.$ac_ext
12992cat >>conftest.$ac_ext <<_ACEOF
12993/* end confdefs.h. */
98418dba 12994#include <alloca.h>
503d2be0
AS
12995int
12996main ()
12997{
98418dba 12998char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
12999 ;
13000 return 0;
13001}
13002_ACEOF
13003rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13004if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13005 (eval $ac_link) 2>conftest.er1
503d2be0 13006 ac_status=$?
35996d22
AS
13007 grep -v '^ *+' conftest.er1 >conftest.err
13008 rm -f conftest.er1
13009 cat conftest.err >&5
c0d27fcc 13010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13011 (exit $ac_status); } &&
4494a266
JD
13012 { ac_try='test -z "$ac_c_werror_flag"
13013 || test ! -s conftest.err'
35996d22
AS
13014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13015 (eval $ac_try) 2>&5
13016 ac_status=$?
13017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13018 (exit $ac_status); }; } &&
13019 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13021 (eval $ac_try) 2>&5
13022 ac_status=$?
c0d27fcc 13023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13024 (exit $ac_status); }; }; then
98418dba 13025 ac_cv_working_alloca_h=yes
73b77ee5 13026else
503d2be0 13027 echo "$as_me: failed program was:" >&5
19650fd6
AS
13028sed 's/^/| /' conftest.$ac_ext >&5
13029
98418dba 13030ac_cv_working_alloca_h=no
73b77ee5 13031fi
35996d22
AS
13032rm -f conftest.err conftest.$ac_objext \
13033 conftest$ac_exeext conftest.$ac_ext
98418dba 13034fi
c0d27fcc 13035echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
13036echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
13037if test $ac_cv_working_alloca_h = yes; then
73b77ee5 13038
c0d27fcc 13039cat >>confdefs.h <<\_ACEOF
98418dba 13040#define HAVE_ALLOCA_H 1
c0d27fcc 13041_ACEOF
98418dba
CW
13042
13043fi
13044
c0d27fcc 13045echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
13046echo $ECHO_N "checking for alloca... $ECHO_C" >&6
13047if test "${ac_cv_func_alloca_works+set}" = set; then
13048 echo $ECHO_N "(cached) $ECHO_C" >&6
13049else
503d2be0 13050 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13051/* confdefs.h. */
13052_ACEOF
13053cat confdefs.h >>conftest.$ac_ext
13054cat >>conftest.$ac_ext <<_ACEOF
13055/* end confdefs.h. */
98418dba
CW
13056#ifdef __GNUC__
13057# define alloca __builtin_alloca
13058#else
13059# ifdef _MSC_VER
13060# include <malloc.h>
13061# define alloca _alloca
13062# else
13063# if HAVE_ALLOCA_H
13064# include <alloca.h>
13065# else
13066# ifdef _AIX
13067 #pragma alloca
13068# else
13069# ifndef alloca /* predefined by HP cc +Olibcalls */
13070char *alloca ();
13071# endif
13072# endif
13073# endif
13074# endif
13075#endif
13076
503d2be0
AS
13077int
13078main ()
13079{
98418dba 13080char *p = (char *) alloca (1);
503d2be0
AS
13081 ;
13082 return 0;
13083}
13084_ACEOF
13085rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13086if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13087 (eval $ac_link) 2>conftest.er1
503d2be0 13088 ac_status=$?
35996d22
AS
13089 grep -v '^ *+' conftest.er1 >conftest.err
13090 rm -f conftest.er1
13091 cat conftest.err >&5
c0d27fcc 13092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13093 (exit $ac_status); } &&
4494a266
JD
13094 { ac_try='test -z "$ac_c_werror_flag"
13095 || test ! -s conftest.err'
35996d22
AS
13096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13097 (eval $ac_try) 2>&5
13098 ac_status=$?
13099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13100 (exit $ac_status); }; } &&
13101 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13103 (eval $ac_try) 2>&5
13104 ac_status=$?
c0d27fcc 13105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13106 (exit $ac_status); }; }; then
98418dba 13107 ac_cv_func_alloca_works=yes
ac95a621 13108else
503d2be0 13109 echo "$as_me: failed program was:" >&5
19650fd6
AS
13110sed 's/^/| /' conftest.$ac_ext >&5
13111
98418dba 13112ac_cv_func_alloca_works=no
ac95a621 13113fi
35996d22
AS
13114rm -f conftest.err conftest.$ac_objext \
13115 conftest$ac_exeext conftest.$ac_ext
98418dba 13116fi
c0d27fcc 13117echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 13118echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 13119
98418dba
CW
13120if test $ac_cv_func_alloca_works = yes; then
13121
c0d27fcc 13122cat >>confdefs.h <<\_ACEOF
98418dba 13123#define HAVE_ALLOCA 1
c0d27fcc 13124_ACEOF
98418dba
CW
13125
13126else
13127 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13128# that cause trouble. Some versions do not even contain alloca or
13129# contain a buggy version. If you still want to use their alloca,
13130# use ar to extract alloca.o from them instead of compiling alloca.c.
13131
13132ALLOCA=alloca.$ac_objext
13133
c0d27fcc 13134cat >>confdefs.h <<\_ACEOF
98418dba 13135#define C_ALLOCA 1
c0d27fcc 13136_ACEOF
98418dba 13137
c0d27fcc
MR
13138
13139echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
13140echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
13141if test "${ac_cv_os_cray+set}" = set; then
13142 echo $ECHO_N "(cached) $ECHO_C" >&6
13143else
13144 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13145/* confdefs.h. */
13146_ACEOF
13147cat confdefs.h >>conftest.$ac_ext
13148cat >>conftest.$ac_ext <<_ACEOF
13149/* end confdefs.h. */
98418dba
CW
13150#if defined(CRAY) && ! defined(CRAY2)
13151webecray
13152#else
13153wenotbecray
13154#endif
13155
13156_ACEOF
13157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13158 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
13159 ac_cv_os_cray=yes
13160else
13161 ac_cv_os_cray=no
13162fi
13163rm -f conftest*
ac95a621 13164
98418dba 13165fi
c0d27fcc 13166echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
13167echo "${ECHO_T}$ac_cv_os_cray" >&6
13168if test $ac_cv_os_cray = yes; then
13169 for ac_func in _getb67 GETB67 getb67; do
13170 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13171echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
13172echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13173if eval "test \"\${$as_ac_var+set}\" = set"; then
13174 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13175else
503d2be0 13176 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13177/* confdefs.h. */
13178_ACEOF
13179cat confdefs.h >>conftest.$ac_ext
13180cat >>conftest.$ac_ext <<_ACEOF
13181/* end confdefs.h. */
35996d22
AS
13182/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13183 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13184#define $ac_func innocuous_$ac_func
13185
73b77ee5 13186/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13187 which can conflict with char $ac_func (); below.
13188 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13189 <limits.h> exists even on freestanding compilers. */
35996d22 13190
19650fd6
AS
13191#ifdef __STDC__
13192# include <limits.h>
13193#else
13194# include <assert.h>
13195#endif
35996d22
AS
13196
13197#undef $ac_func
13198
73b77ee5 13199/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13200#ifdef __cplusplus
13201extern "C"
19650fd6 13202{
503d2be0 13203#endif
73b77ee5 13204/* We use char because int might match the return type of a gcc2
503d2be0
AS
13205 builtin and then its argument prototype would still apply. */
13206char $ac_func ();
73b77ee5
GM
13207/* The GNU C library defines this for functions which it implements
13208 to always fail with ENOSYS. Some functions are actually named
13209 something starting with __ and the normal name is an alias. */
13210#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13211choke me
13212#else
19650fd6
AS
13213char (*f) () = $ac_func;
13214#endif
13215#ifdef __cplusplus
13216}
73b77ee5
GM
13217#endif
13218
19650fd6
AS
13219int
13220main ()
13221{
13222return f != $ac_func;
503d2be0
AS
13223 ;
13224 return 0;
13225}
13226_ACEOF
13227rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13228if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13229 (eval $ac_link) 2>conftest.er1
503d2be0 13230 ac_status=$?
35996d22
AS
13231 grep -v '^ *+' conftest.er1 >conftest.err
13232 rm -f conftest.er1
13233 cat conftest.err >&5
c0d27fcc 13234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13235 (exit $ac_status); } &&
4494a266
JD
13236 { ac_try='test -z "$ac_c_werror_flag"
13237 || test ! -s conftest.err'
35996d22
AS
13238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13239 (eval $ac_try) 2>&5
13240 ac_status=$?
13241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13242 (exit $ac_status); }; } &&
13243 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13245 (eval $ac_try) 2>&5
13246 ac_status=$?
c0d27fcc 13247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13248 (exit $ac_status); }; }; then
13249 eval "$as_ac_var=yes"
13250else
13251 echo "$as_me: failed program was:" >&5
19650fd6
AS
13252sed 's/^/| /' conftest.$ac_ext >&5
13253
503d2be0
AS
13254eval "$as_ac_var=no"
13255fi
35996d22
AS
13256rm -f conftest.err conftest.$ac_objext \
13257 conftest$ac_exeext conftest.$ac_ext
503d2be0 13258fi
c0d27fcc 13259echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13260echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13261if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 13262
c0d27fcc 13263cat >>confdefs.h <<_ACEOF
98418dba 13264#define CRAY_STACKSEG_END $ac_func
c0d27fcc 13265_ACEOF
98418dba
CW
13266
13267 break
73b77ee5 13268fi
73b77ee5 13269
98418dba 13270 done
73b77ee5
GM
13271fi
13272
c0d27fcc 13273echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
13274echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
13275if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 13276 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
13277else
13278 if test "$cross_compiling" = yes; then
13279 ac_cv_c_stack_direction=0
73b77ee5 13280else
503d2be0 13281 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13282/* confdefs.h. */
13283_ACEOF
13284cat confdefs.h >>conftest.$ac_ext
13285cat >>conftest.$ac_ext <<_ACEOF
13286/* end confdefs.h. */
503d2be0 13287int
98418dba 13288find_stack_direction ()
503d2be0 13289{
98418dba
CW
13290 static char *addr = 0;
13291 auto char dummy;
13292 if (addr == 0)
13293 {
13294 addr = &dummy;
13295 return find_stack_direction ();
13296 }
73b77ee5 13297 else
98418dba
CW
13298 return (&dummy > addr) ? 1 : -1;
13299}
ba4481b5 13300
503d2be0
AS
13301int
13302main ()
13303{
98418dba 13304 exit (find_stack_direction () < 0);
503d2be0
AS
13305}
13306_ACEOF
98418dba 13307rm -f conftest$ac_exeext
c0d27fcc 13308if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13309 (eval $ac_link) 2>&5
13310 ac_status=$?
c0d27fcc 13311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13312 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 13313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13314 (eval $ac_try) 2>&5
13315 ac_status=$?
c0d27fcc 13316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13317 (exit $ac_status); }; }; then
98418dba 13318 ac_cv_c_stack_direction=1
ba4481b5 13319else
98418dba
CW
13320 echo "$as_me: program exited with status $ac_status" >&5
13321echo "$as_me: failed program was:" >&5
19650fd6
AS
13322sed 's/^/| /' conftest.$ac_ext >&5
13323
c0d27fcc 13324( exit $ac_status )
98418dba 13325ac_cv_c_stack_direction=-1
ba4481b5 13326fi
35996d22 13327rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 13328fi
98418dba 13329fi
c0d27fcc 13330echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
13331echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
13332
c0d27fcc 13333cat >>confdefs.h <<_ACEOF
98418dba 13334#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
13335_ACEOF
13336
ba4481b5 13337
ba4481b5
DL
13338fi
13339
c0d27fcc 13340
98418dba
CW
13341# fmod, logb, and frexp are found in -lm on most systems.
13342# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
13343
c0d27fcc 13344echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
13345echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
13346if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 13347 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13348else
98418dba
CW
13349 ac_check_lib_save_LIBS=$LIBS
13350LIBS="-lm $LIBS"
13351cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13352/* confdefs.h. */
13353_ACEOF
13354cat confdefs.h >>conftest.$ac_ext
13355cat >>conftest.$ac_ext <<_ACEOF
13356/* end confdefs.h. */
ba4481b5 13357
98418dba
CW
13358/* Override any gcc2 internal prototype to avoid an error. */
13359#ifdef __cplusplus
13360extern "C"
13361#endif
13362/* We use char because int might match the return type of a gcc2
13363 builtin and then its argument prototype would still apply. */
13364char sqrt ();
503d2be0
AS
13365int
13366main ()
13367{
98418dba 13368sqrt ();
503d2be0
AS
13369 ;
13370 return 0;
13371}
13372_ACEOF
13373rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13374if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13375 (eval $ac_link) 2>conftest.er1
503d2be0 13376 ac_status=$?
35996d22
AS
13377 grep -v '^ *+' conftest.er1 >conftest.err
13378 rm -f conftest.er1
13379 cat conftest.err >&5
c0d27fcc 13380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13381 (exit $ac_status); } &&
4494a266
JD
13382 { ac_try='test -z "$ac_c_werror_flag"
13383 || test ! -s conftest.err'
35996d22
AS
13384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13385 (eval $ac_try) 2>&5
13386 ac_status=$?
13387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13388 (exit $ac_status); }; } &&
13389 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13391 (eval $ac_try) 2>&5
13392 ac_status=$?
c0d27fcc 13393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13394 (exit $ac_status); }; }; then
98418dba 13395 ac_cv_lib_m_sqrt=yes
ba4481b5 13396else
503d2be0 13397 echo "$as_me: failed program was:" >&5
19650fd6
AS
13398sed 's/^/| /' conftest.$ac_ext >&5
13399
98418dba 13400ac_cv_lib_m_sqrt=no
ba4481b5 13401fi
35996d22
AS
13402rm -f conftest.err conftest.$ac_objext \
13403 conftest$ac_exeext conftest.$ac_ext
98418dba 13404LIBS=$ac_check_lib_save_LIBS
ba4481b5 13405fi
c0d27fcc 13406echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
13407echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
13408if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 13409 cat >>confdefs.h <<_ACEOF
98418dba 13410#define HAVE_LIBM 1
c0d27fcc 13411_ACEOF
98418dba
CW
13412
13413 LIBS="-lm $LIBS"
ba4481b5 13414
ba4481b5
DL
13415fi
13416
c0d27fcc 13417
55597d70
DL
13418# Check for mail-locking functions in a "mail" library. Probably this should
13419# have the same check as for liblockfile below.
98418dba 13420
c0d27fcc 13421echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
13422echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
13423if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 13424 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13425else
98418dba
CW
13426 ac_check_lib_save_LIBS=$LIBS
13427LIBS="-lmail $LIBS"
13428cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13429/* confdefs.h. */
13430_ACEOF
13431cat confdefs.h >>conftest.$ac_ext
13432cat >>conftest.$ac_ext <<_ACEOF
13433/* end confdefs.h. */
98418dba
CW
13434
13435/* Override any gcc2 internal prototype to avoid an error. */
13436#ifdef __cplusplus
13437extern "C"
13438#endif
13439/* We use char because int might match the return type of a gcc2
13440 builtin and then its argument prototype would still apply. */
13441char maillock ();
503d2be0
AS
13442int
13443main ()
13444{
98418dba 13445maillock ();
503d2be0
AS
13446 ;
13447 return 0;
13448}
13449_ACEOF
13450rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13451if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13452 (eval $ac_link) 2>conftest.er1
503d2be0 13453 ac_status=$?
35996d22
AS
13454 grep -v '^ *+' conftest.er1 >conftest.err
13455 rm -f conftest.er1
13456 cat conftest.err >&5
c0d27fcc 13457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13458 (exit $ac_status); } &&
4494a266
JD
13459 { ac_try='test -z "$ac_c_werror_flag"
13460 || test ! -s conftest.err'
35996d22
AS
13461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13462 (eval $ac_try) 2>&5
13463 ac_status=$?
13464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13465 (exit $ac_status); }; } &&
13466 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13468 (eval $ac_try) 2>&5
13469 ac_status=$?
c0d27fcc 13470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13471 (exit $ac_status); }; }; then
98418dba 13472 ac_cv_lib_mail_maillock=yes
ba4481b5 13473else
503d2be0 13474 echo "$as_me: failed program was:" >&5
19650fd6
AS
13475sed 's/^/| /' conftest.$ac_ext >&5
13476
98418dba 13477ac_cv_lib_mail_maillock=no
ba4481b5 13478fi
35996d22
AS
13479rm -f conftest.err conftest.$ac_objext \
13480 conftest$ac_exeext conftest.$ac_ext
98418dba 13481LIBS=$ac_check_lib_save_LIBS
ba4481b5 13482fi
c0d27fcc 13483echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
13484echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
13485if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 13486 cat >>confdefs.h <<_ACEOF
98418dba 13487#define HAVE_LIBMAIL 1
c0d27fcc 13488_ACEOF
ba4481b5 13489
98418dba 13490 LIBS="-lmail $LIBS"
ba4481b5 13491
98418dba 13492fi
ba4481b5 13493
c0d27fcc
MR
13494
13495echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
13496echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
13497if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 13498 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13499else
503d2be0 13500 ac_check_lib_save_LIBS=$LIBS
98418dba 13501LIBS="-llockfile $LIBS"
503d2be0 13502cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13503/* confdefs.h. */
13504_ACEOF
13505cat confdefs.h >>conftest.$ac_ext
13506cat >>conftest.$ac_ext <<_ACEOF
13507/* end confdefs.h. */
503d2be0 13508
ba4481b5 13509/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13510#ifdef __cplusplus
13511extern "C"
13512#endif
ba4481b5 13513/* We use char because int might match the return type of a gcc2
503d2be0 13514 builtin and then its argument prototype would still apply. */
98418dba 13515char maillock ();
503d2be0
AS
13516int
13517main ()
13518{
98418dba 13519maillock ();
503d2be0
AS
13520 ;
13521 return 0;
13522}
13523_ACEOF
13524rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13525if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13526 (eval $ac_link) 2>conftest.er1
503d2be0 13527 ac_status=$?
35996d22
AS
13528 grep -v '^ *+' conftest.er1 >conftest.err
13529 rm -f conftest.er1
13530 cat conftest.err >&5
c0d27fcc 13531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13532 (exit $ac_status); } &&
4494a266
JD
13533 { ac_try='test -z "$ac_c_werror_flag"
13534 || test ! -s conftest.err'
35996d22
AS
13535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13536 (eval $ac_try) 2>&5
13537 ac_status=$?
13538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13539 (exit $ac_status); }; } &&
13540 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13542 (eval $ac_try) 2>&5
13543 ac_status=$?
c0d27fcc 13544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13545 (exit $ac_status); }; }; then
98418dba 13546 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
13547else
13548 echo "$as_me: failed program was:" >&5
19650fd6
AS
13549sed 's/^/| /' conftest.$ac_ext >&5
13550
98418dba
CW
13551ac_cv_lib_lockfile_maillock=no
13552fi
35996d22
AS
13553rm -f conftest.err conftest.$ac_objext \
13554 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13555LIBS=$ac_check_lib_save_LIBS
13556fi
c0d27fcc 13557echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
13558echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
13559if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 13560 cat >>confdefs.h <<_ACEOF
98418dba 13561#define HAVE_LIBLOCKFILE 1
c0d27fcc 13562_ACEOF
98418dba
CW
13563
13564 LIBS="-llockfile $LIBS"
13565
13566fi
13567
13568# If we have the shared liblockfile, assume we must use it for mail
13569# locking (e.g. Debian). If we couldn't link against liblockfile
13570# (no liblockfile.a installed), ensure that we don't need to.
13571if test "$ac_cv_lib_lockfile_maillock" = no; then
13572 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13573set dummy liblockfile.so; ac_word=$2
c0d27fcc 13574echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
13575echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13576if test "${ac_cv_prog_liblockfile+set}" = set; then
13577 echo $ECHO_N "(cached) $ECHO_C" >&6
13578else
13579 if test -n "$liblockfile"; then
13580 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13581else
c0d27fcc 13582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
13583as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13584for as_dir in $as_dummy
c0d27fcc
MR
13585do
13586 IFS=$as_save_IFS
13587 test -z "$as_dir" && as_dir=.
13588 for ac_exec_ext in '' $ac_executable_extensions; do
13589 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13590 ac_cv_prog_liblockfile="yes"
13591 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13592 break 2
13593 fi
13594done
98418dba
CW
13595done
13596
13597 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 13598fi
503d2be0 13599fi
98418dba
CW
13600liblockfile=$ac_cv_prog_liblockfile
13601if test -n "$liblockfile"; then
c0d27fcc 13602 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
13603echo "${ECHO_T}$liblockfile" >&6
13604else
c0d27fcc 13605 echo "$as_me:$LINENO: result: no" >&5
98418dba 13606echo "${ECHO_T}no" >&6
ba4481b5
DL
13607fi
13608
98418dba 13609 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 13610 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
13611This probably means that movemail could lose mail.
13612There may be a \`development' package to install containing liblockfile." >&5
13613echo "$as_me: error: Shared liblockfile found but can't link against it.
13614This probably means that movemail could lose mail.
13615There may be a \`development' package to install containing liblockfile." >&2;}
13616 { (exit 1); exit 1; }; }
98418dba 13617 else :
55597d70 13618 fi
98418dba 13619fi
503d2be0 13620
98418dba
CW
13621for ac_func in touchlock
13622do
13623as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13624echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
13625echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13626if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13627 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 13628else
98418dba 13629 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13630/* confdefs.h. */
13631_ACEOF
13632cat confdefs.h >>conftest.$ac_ext
13633cat >>conftest.$ac_ext <<_ACEOF
13634/* end confdefs.h. */
35996d22
AS
13635/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13636 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13637#define $ac_func innocuous_$ac_func
13638
98418dba 13639/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13640 which can conflict with char $ac_func (); below.
13641 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13642 <limits.h> exists even on freestanding compilers. */
35996d22 13643
19650fd6
AS
13644#ifdef __STDC__
13645# include <limits.h>
13646#else
13647# include <assert.h>
13648#endif
35996d22
AS
13649
13650#undef $ac_func
13651
457b792c 13652/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13653#ifdef __cplusplus
13654extern "C"
19650fd6 13655{
503d2be0 13656#endif
457b792c 13657/* We use char because int might match the return type of a gcc2
503d2be0 13658 builtin and then its argument prototype would still apply. */
98418dba 13659char $ac_func ();
98418dba
CW
13660/* The GNU C library defines this for functions which it implements
13661 to always fail with ENOSYS. Some functions are actually named
13662 something starting with __ and the normal name is an alias. */
13663#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13664choke me
13665#else
19650fd6
AS
13666char (*f) () = $ac_func;
13667#endif
13668#ifdef __cplusplus
13669}
cd958eb3
MB
13670#endif
13671
19650fd6
AS
13672int
13673main ()
13674{
13675return f != $ac_func;
503d2be0
AS
13676 ;
13677 return 0;
13678}
13679_ACEOF
13680rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13681if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13682 (eval $ac_link) 2>conftest.er1
503d2be0 13683 ac_status=$?
35996d22
AS
13684 grep -v '^ *+' conftest.er1 >conftest.err
13685 rm -f conftest.er1
13686 cat conftest.err >&5
c0d27fcc 13687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13688 (exit $ac_status); } &&
4494a266
JD
13689 { ac_try='test -z "$ac_c_werror_flag"
13690 || test ! -s conftest.err'
35996d22
AS
13691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13692 (eval $ac_try) 2>&5
13693 ac_status=$?
13694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13695 (exit $ac_status); }; } &&
13696 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13698 (eval $ac_try) 2>&5
13699 ac_status=$?
c0d27fcc 13700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13701 (exit $ac_status); }; }; then
98418dba 13702 eval "$as_ac_var=yes"
503d2be0
AS
13703else
13704 echo "$as_me: failed program was:" >&5
19650fd6
AS
13705sed 's/^/| /' conftest.$ac_ext >&5
13706
98418dba 13707eval "$as_ac_var=no"
503d2be0 13708fi
35996d22
AS
13709rm -f conftest.err conftest.$ac_objext \
13710 conftest$ac_exeext conftest.$ac_ext
503d2be0 13711fi
c0d27fcc 13712echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
13713echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13714if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13715 cat >>confdefs.h <<_ACEOF
98418dba 13716#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13717_ACEOF
457b792c 13718
457b792c 13719fi
98418dba 13720done
457b792c 13721
c0d27fcc 13722
98418dba
CW
13723for ac_header in maillock.h
13724do
13725as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
13726if eval "test \"\${$as_ac_Header+set}\" = set"; then
13727 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
13728echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13729if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 13730 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13731fi
13732echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13733echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 13734else
c0d27fcc
MR
13735 # Is the header compilable?
13736echo "$as_me:$LINENO: checking $ac_header usability" >&5
13737echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13738cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13739/* confdefs.h. */
13740_ACEOF
13741cat confdefs.h >>conftest.$ac_ext
13742cat >>conftest.$ac_ext <<_ACEOF
13743/* end confdefs.h. */
c0d27fcc
MR
13744$ac_includes_default
13745#include <$ac_header>
13746_ACEOF
13747rm -f conftest.$ac_objext
13748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 13749 (eval $ac_compile) 2>conftest.er1
c0d27fcc 13750 ac_status=$?
35996d22
AS
13751 grep -v '^ *+' conftest.er1 >conftest.err
13752 rm -f conftest.er1
13753 cat conftest.err >&5
c0d27fcc
MR
13754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13755 (exit $ac_status); } &&
4494a266
JD
13756 { ac_try='test -z "$ac_c_werror_flag"
13757 || test ! -s conftest.err'
35996d22
AS
13758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13759 (eval $ac_try) 2>&5
13760 ac_status=$?
13761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13762 (exit $ac_status); }; } &&
13763 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13765 (eval $ac_try) 2>&5
13766 ac_status=$?
13767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13768 (exit $ac_status); }; }; then
13769 ac_header_compiler=yes
13770else
13771 echo "$as_me: failed program was:" >&5
19650fd6
AS
13772sed 's/^/| /' conftest.$ac_ext >&5
13773
c0d27fcc
MR
13774ac_header_compiler=no
13775fi
35996d22 13776rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
13777echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13778echo "${ECHO_T}$ac_header_compiler" >&6
13779
13780# Is the header present?
13781echo "$as_me:$LINENO: checking $ac_header presence" >&5
13782echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13783cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13784/* confdefs.h. */
13785_ACEOF
13786cat confdefs.h >>conftest.$ac_ext
13787cat >>conftest.$ac_ext <<_ACEOF
13788/* end confdefs.h. */
98418dba 13789#include <$ac_header>
503d2be0 13790_ACEOF
c0d27fcc 13791if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 13792 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 13793 ac_status=$?
6bae0ccf 13794 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13795 rm -f conftest.er1
13796 cat conftest.err >&5
c0d27fcc 13797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13798 (exit $ac_status); } >/dev/null; then
13799 if test -s conftest.err; then
13800 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 13801 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
13802 else
13803 ac_cpp_err=
13804 fi
503d2be0 13805else
98418dba 13806 ac_cpp_err=yes
503d2be0 13807fi
98418dba 13808if test -z "$ac_cpp_err"; then
c0d27fcc 13809 ac_header_preproc=yes
98418dba
CW
13810else
13811 echo "$as_me: failed program was:" >&5
19650fd6
AS
13812sed 's/^/| /' conftest.$ac_ext >&5
13813
c0d27fcc 13814 ac_header_preproc=no
503d2be0 13815fi
98418dba 13816rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13817echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13818echo "${ECHO_T}$ac_header_preproc" >&6
13819
13820# So? What about this header?
35996d22
AS
13821case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13822 yes:no: )
c0d27fcc
MR
13823 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13824echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
13825 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13826echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13827 ac_header_preproc=yes
19650fd6 13828 ;;
35996d22 13829 no:yes:* )
c0d27fcc
MR
13830 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13831echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
13832 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13833echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13834 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13835echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13836 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13837echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13838 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13839echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
13840 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13841echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
13842 (
13843 cat <<\_ASBOX
35996d22
AS
13844## ------------------------------------------ ##
13845## Report this to the AC_PACKAGE_NAME lists. ##
13846## ------------------------------------------ ##
19650fd6
AS
13847_ASBOX
13848 ) |
13849 sed "s/^/$as_me: WARNING: /" >&2
13850 ;;
c0d27fcc
MR
13851esac
13852echo "$as_me:$LINENO: checking for $ac_header" >&5
13853echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13854if eval "test \"\${$as_ac_Header+set}\" = set"; then
13855 echo $ECHO_N "(cached) $ECHO_C" >&6
13856else
35996d22 13857 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 13858fi
c0d27fcc 13859echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 13860echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
13861
13862fi
98418dba 13863if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 13864 cat >>confdefs.h <<_ACEOF
98418dba 13865#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 13866_ACEOF
48d4b120 13867
ba4481b5 13868fi
c0d27fcc 13869
98418dba
CW
13870done
13871
c0d27fcc
MR
13872
13873
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
22044edf
DL
13927
13928
c0d27fcc 13929
b0e44248
RB
13930
13931
973a76b1
DL
13932
13933
13934
cd958eb3 13935
25ca0bca 13936
ea92fc9f 13937
c0d27fcc
MR
13938
13939
98418dba 13940for ac_func in gethostname getdomainname dup2 \
ea92fc9f 13941rename closedir mkdir rmdir sysinfo getrusage \
98418dba
CW
13942random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
13943strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 13944utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
13945__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
13946sendto recvfrom getsockopt setsockopt getsockname getpeername \
b0e44248 13947gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
4489ece2 13948memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
13949do
13950as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13951echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
13952echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13953if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13954 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13955else
503d2be0 13956 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13957/* confdefs.h. */
13958_ACEOF
13959cat confdefs.h >>conftest.$ac_ext
13960cat >>conftest.$ac_ext <<_ACEOF
13961/* end confdefs.h. */
35996d22
AS
13962/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13963 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13964#define $ac_func innocuous_$ac_func
13965
98418dba 13966/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13967 which can conflict with char $ac_func (); below.
13968 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13969 <limits.h> exists even on freestanding compilers. */
35996d22 13970
19650fd6
AS
13971#ifdef __STDC__
13972# include <limits.h>
13973#else
13974# include <assert.h>
13975#endif
35996d22
AS
13976
13977#undef $ac_func
13978
ba4481b5 13979/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13980#ifdef __cplusplus
13981extern "C"
19650fd6 13982{
503d2be0 13983#endif
ba4481b5 13984/* We use char because int might match the return type of a gcc2
503d2be0 13985 builtin and then its argument prototype would still apply. */
98418dba 13986char $ac_func ();
98418dba
CW
13987/* The GNU C library defines this for functions which it implements
13988 to always fail with ENOSYS. Some functions are actually named
13989 something starting with __ and the normal name is an alias. */
13990#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13991choke me
13992#else
19650fd6
AS
13993char (*f) () = $ac_func;
13994#endif
13995#ifdef __cplusplus
13996}
98418dba
CW
13997#endif
13998
19650fd6
AS
13999int
14000main ()
14001{
14002return f != $ac_func;
503d2be0
AS
14003 ;
14004 return 0;
14005}
14006_ACEOF
14007rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14008if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14009 (eval $ac_link) 2>conftest.er1
503d2be0 14010 ac_status=$?
35996d22
AS
14011 grep -v '^ *+' conftest.er1 >conftest.err
14012 rm -f conftest.er1
14013 cat conftest.err >&5
c0d27fcc 14014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14015 (exit $ac_status); } &&
4494a266
JD
14016 { ac_try='test -z "$ac_c_werror_flag"
14017 || test ! -s conftest.err'
35996d22
AS
14018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14019 (eval $ac_try) 2>&5
14020 ac_status=$?
14021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14022 (exit $ac_status); }; } &&
14023 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14025 (eval $ac_try) 2>&5
14026 ac_status=$?
c0d27fcc 14027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14028 (exit $ac_status); }; }; then
98418dba 14029 eval "$as_ac_var=yes"
503d2be0
AS
14030else
14031 echo "$as_me: failed program was:" >&5
19650fd6
AS
14032sed 's/^/| /' conftest.$ac_ext >&5
14033
98418dba 14034eval "$as_ac_var=no"
503d2be0 14035fi
35996d22
AS
14036rm -f conftest.err conftest.$ac_objext \
14037 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14038fi
c0d27fcc 14039echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14040echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14041if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14042 cat >>confdefs.h <<_ACEOF
98418dba 14043#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14044_ACEOF
ba4481b5 14045
ba4481b5 14046fi
98418dba 14047done
ba4481b5 14048
c0d27fcc
MR
14049
14050
98418dba
CW
14051for ac_header in sys/un.h
14052do
14053as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14054if eval "test \"\${$as_ac_Header+set}\" = set"; then
14055 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
14056echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14057if eval "test \"\${$as_ac_Header+set}\" = set"; then
14058 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14059fi
14060echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14061echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 14062else
c0d27fcc
MR
14063 # Is the header compilable?
14064echo "$as_me:$LINENO: checking $ac_header usability" >&5
14065echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14066cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14067/* confdefs.h. */
14068_ACEOF
14069cat confdefs.h >>conftest.$ac_ext
14070cat >>conftest.$ac_ext <<_ACEOF
14071/* end confdefs.h. */
c0d27fcc
MR
14072$ac_includes_default
14073#include <$ac_header>
14074_ACEOF
14075rm -f conftest.$ac_objext
14076if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 14077 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14078 ac_status=$?
35996d22
AS
14079 grep -v '^ *+' conftest.er1 >conftest.err
14080 rm -f conftest.er1
14081 cat conftest.err >&5
c0d27fcc
MR
14082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14083 (exit $ac_status); } &&
4494a266
JD
14084 { ac_try='test -z "$ac_c_werror_flag"
14085 || test ! -s conftest.err'
35996d22
AS
14086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14087 (eval $ac_try) 2>&5
14088 ac_status=$?
14089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14090 (exit $ac_status); }; } &&
14091 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14093 (eval $ac_try) 2>&5
14094 ac_status=$?
14095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14096 (exit $ac_status); }; }; then
14097 ac_header_compiler=yes
14098else
14099 echo "$as_me: failed program was:" >&5
19650fd6
AS
14100sed 's/^/| /' conftest.$ac_ext >&5
14101
c0d27fcc
MR
14102ac_header_compiler=no
14103fi
35996d22 14104rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14105echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14106echo "${ECHO_T}$ac_header_compiler" >&6
14107
14108# Is the header present?
14109echo "$as_me:$LINENO: checking $ac_header presence" >&5
14110echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14111cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14112/* confdefs.h. */
14113_ACEOF
14114cat confdefs.h >>conftest.$ac_ext
14115cat >>conftest.$ac_ext <<_ACEOF
14116/* end confdefs.h. */
98418dba 14117#include <$ac_header>
503d2be0 14118_ACEOF
c0d27fcc 14119if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14120 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14121 ac_status=$?
6bae0ccf 14122 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14123 rm -f conftest.er1
14124 cat conftest.err >&5
c0d27fcc 14125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14126 (exit $ac_status); } >/dev/null; then
14127 if test -s conftest.err; then
14128 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 14129 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14130 else
14131 ac_cpp_err=
14132 fi
14133else
14134 ac_cpp_err=yes
14135fi
14136if test -z "$ac_cpp_err"; then
c0d27fcc 14137 ac_header_preproc=yes
ba4481b5 14138else
503d2be0 14139 echo "$as_me: failed program was:" >&5
19650fd6
AS
14140sed 's/^/| /' conftest.$ac_ext >&5
14141
c0d27fcc 14142 ac_header_preproc=no
ba4481b5 14143fi
503d2be0 14144rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14145echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14146echo "${ECHO_T}$ac_header_preproc" >&6
14147
14148# So? What about this header?
35996d22
AS
14149case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14150 yes:no: )
c0d27fcc
MR
14151 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14152echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
14153 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14154echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14155 ac_header_preproc=yes
19650fd6 14156 ;;
35996d22 14157 no:yes:* )
c0d27fcc
MR
14158 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14159echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
14160 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14161echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14162 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14163echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14164 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14165echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14166 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14167echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
14168 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14169echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14170 (
14171 cat <<\_ASBOX
35996d22
AS
14172## ------------------------------------------ ##
14173## Report this to the AC_PACKAGE_NAME lists. ##
14174## ------------------------------------------ ##
19650fd6
AS
14175_ASBOX
14176 ) |
14177 sed "s/^/$as_me: WARNING: /" >&2
14178 ;;
c0d27fcc
MR
14179esac
14180echo "$as_me:$LINENO: checking for $ac_header" >&5
14181echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14182if eval "test \"\${$as_ac_Header+set}\" = set"; then
14183 echo $ECHO_N "(cached) $ECHO_C" >&6
14184else
35996d22 14185 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14186fi
c0d27fcc 14187echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 14188echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14189
14190fi
925c2f3f 14191if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14192 cat >>confdefs.h <<_ACEOF
925c2f3f 14193#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14194_ACEOF
503d2be0 14195
925c2f3f 14196fi
c0d27fcc 14197
925c2f3f
EZ
14198done
14199
c0d27fcc
MR
14200
14201
14202
35996d22
AS
14203
14204for ac_header in stdlib.h sys/time.h unistd.h
925c2f3f
EZ
14205do
14206as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14207if eval "test \"\${$as_ac_Header+set}\" = set"; then
14208 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
14209echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14210if eval "test \"\${$as_ac_Header+set}\" = set"; then
14211 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14212fi
14213echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14214echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 14215else
c0d27fcc
MR
14216 # Is the header compilable?
14217echo "$as_me:$LINENO: checking $ac_header usability" >&5
14218echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14219cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14220/* confdefs.h. */
14221_ACEOF
14222cat confdefs.h >>conftest.$ac_ext
14223cat >>conftest.$ac_ext <<_ACEOF
14224/* end confdefs.h. */
c0d27fcc
MR
14225$ac_includes_default
14226#include <$ac_header>
14227_ACEOF
14228rm -f conftest.$ac_objext
14229if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 14230 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14231 ac_status=$?
35996d22
AS
14232 grep -v '^ *+' conftest.er1 >conftest.err
14233 rm -f conftest.er1
14234 cat conftest.err >&5
c0d27fcc
MR
14235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14236 (exit $ac_status); } &&
4494a266
JD
14237 { ac_try='test -z "$ac_c_werror_flag"
14238 || test ! -s conftest.err'
35996d22
AS
14239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14240 (eval $ac_try) 2>&5
14241 ac_status=$?
14242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14243 (exit $ac_status); }; } &&
14244 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14246 (eval $ac_try) 2>&5
14247 ac_status=$?
14248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14249 (exit $ac_status); }; }; then
14250 ac_header_compiler=yes
14251else
14252 echo "$as_me: failed program was:" >&5
19650fd6
AS
14253sed 's/^/| /' conftest.$ac_ext >&5
14254
c0d27fcc
MR
14255ac_header_compiler=no
14256fi
35996d22 14257rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14258echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14259echo "${ECHO_T}$ac_header_compiler" >&6
14260
14261# Is the header present?
14262echo "$as_me:$LINENO: checking $ac_header presence" >&5
14263echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14264cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14265/* confdefs.h. */
14266_ACEOF
14267cat confdefs.h >>conftest.$ac_ext
14268cat >>conftest.$ac_ext <<_ACEOF
14269/* end confdefs.h. */
98418dba 14270#include <$ac_header>
503d2be0 14271_ACEOF
c0d27fcc 14272if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14273 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14274 ac_status=$?
6bae0ccf 14275 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14276 rm -f conftest.er1
14277 cat conftest.err >&5
c0d27fcc 14278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14279 (exit $ac_status); } >/dev/null; then
14280 if test -s conftest.err; then
14281 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 14282 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14283 else
14284 ac_cpp_err=
14285 fi
14286else
14287 ac_cpp_err=yes
14288fi
14289if test -z "$ac_cpp_err"; then
c0d27fcc 14290 ac_header_preproc=yes
98418dba
CW
14291else
14292 echo "$as_me: failed program was:" >&5
19650fd6
AS
14293sed 's/^/| /' conftest.$ac_ext >&5
14294
c0d27fcc 14295 ac_header_preproc=no
98418dba
CW
14296fi
14297rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14298echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14299echo "${ECHO_T}$ac_header_preproc" >&6
14300
14301# So? What about this header?
35996d22
AS
14302case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14303 yes:no: )
c0d27fcc
MR
14304 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14305echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
14306 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14307echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14308 ac_header_preproc=yes
19650fd6 14309 ;;
35996d22 14310 no:yes:* )
c0d27fcc
MR
14311 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14312echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
14313 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14314echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14315 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14316echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14317 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14318echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14319 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14320echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
14321 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14322echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14323 (
14324 cat <<\_ASBOX
35996d22
AS
14325## ------------------------------------------ ##
14326## Report this to the AC_PACKAGE_NAME lists. ##
14327## ------------------------------------------ ##
19650fd6
AS
14328_ASBOX
14329 ) |
14330 sed "s/^/$as_me: WARNING: /" >&2
14331 ;;
c0d27fcc
MR
14332esac
14333echo "$as_me:$LINENO: checking for $ac_header" >&5
14334echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14335if eval "test \"\${$as_ac_Header+set}\" = set"; then
14336 echo $ECHO_N "(cached) $ECHO_C" >&6
14337else
35996d22 14338 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 14339fi
c0d27fcc 14340echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14341echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14342
14343fi
98418dba 14344if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14345 cat >>confdefs.h <<_ACEOF
98418dba 14346#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14347_ACEOF
98418dba
CW
14348
14349fi
c0d27fcc 14350
98418dba
CW
14351done
14352
c0d27fcc 14353
98418dba
CW
14354for ac_func in alarm
14355do
14356as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14357echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14358echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14359if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14360 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14361else
98418dba 14362 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14363/* confdefs.h. */
14364_ACEOF
14365cat confdefs.h >>conftest.$ac_ext
14366cat >>conftest.$ac_ext <<_ACEOF
14367/* end confdefs.h. */
35996d22
AS
14368/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14369 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14370#define $ac_func innocuous_$ac_func
14371
98418dba 14372/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14373 which can conflict with char $ac_func (); below.
14374 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14375 <limits.h> exists even on freestanding compilers. */
35996d22 14376
19650fd6
AS
14377#ifdef __STDC__
14378# include <limits.h>
14379#else
14380# include <assert.h>
14381#endif
35996d22
AS
14382
14383#undef $ac_func
14384
ba4481b5 14385/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14386#ifdef __cplusplus
14387extern "C"
19650fd6 14388{
503d2be0 14389#endif
ba4481b5 14390/* We use char because int might match the return type of a gcc2
503d2be0 14391 builtin and then its argument prototype would still apply. */
98418dba 14392char $ac_func ();
98418dba
CW
14393/* The GNU C library defines this for functions which it implements
14394 to always fail with ENOSYS. Some functions are actually named
14395 something starting with __ and the normal name is an alias. */
14396#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14397choke me
14398#else
19650fd6
AS
14399char (*f) () = $ac_func;
14400#endif
14401#ifdef __cplusplus
14402}
98418dba
CW
14403#endif
14404
19650fd6
AS
14405int
14406main ()
14407{
14408return f != $ac_func;
503d2be0
AS
14409 ;
14410 return 0;
14411}
14412_ACEOF
14413rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14415 (eval $ac_link) 2>conftest.er1
503d2be0 14416 ac_status=$?
35996d22
AS
14417 grep -v '^ *+' conftest.er1 >conftest.err
14418 rm -f conftest.er1
14419 cat conftest.err >&5
c0d27fcc 14420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14421 (exit $ac_status); } &&
4494a266
JD
14422 { ac_try='test -z "$ac_c_werror_flag"
14423 || test ! -s conftest.err'
35996d22
AS
14424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14425 (eval $ac_try) 2>&5
14426 ac_status=$?
14427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14428 (exit $ac_status); }; } &&
14429 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14431 (eval $ac_try) 2>&5
14432 ac_status=$?
c0d27fcc 14433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14434 (exit $ac_status); }; }; then
98418dba 14435 eval "$as_ac_var=yes"
503d2be0
AS
14436else
14437 echo "$as_me: failed program was:" >&5
19650fd6
AS
14438sed 's/^/| /' conftest.$ac_ext >&5
14439
98418dba 14440eval "$as_ac_var=no"
503d2be0 14441fi
35996d22
AS
14442rm -f conftest.err conftest.$ac_objext \
14443 conftest$ac_exeext conftest.$ac_ext
ffe36136 14444fi
c0d27fcc 14445echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14446echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14447if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14448 cat >>confdefs.h <<_ACEOF
98418dba 14449#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14450_ACEOF
ffe36136 14451
ba4481b5 14452fi
98418dba 14453done
ba4481b5 14454
c0d27fcc 14455echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
14456echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
14457if test "${ac_cv_func_working_mktime+set}" = set; then
14458 echo $ECHO_N "(cached) $ECHO_C" >&6
14459else
14460 if test "$cross_compiling" = yes; then
14461 ac_cv_func_working_mktime=no
14462else
14463 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14464/* confdefs.h. */
14465_ACEOF
14466cat confdefs.h >>conftest.$ac_ext
14467cat >>conftest.$ac_ext <<_ACEOF
14468/* end confdefs.h. */
98418dba
CW
14469/* Test program from Paul Eggert and Tony Leneis. */
14470#if TIME_WITH_SYS_TIME
14471# include <sys/time.h>
14472# include <time.h>
14473#else
14474# if HAVE_SYS_TIME_H
14475# include <sys/time.h>
14476# else
14477# include <time.h>
14478# endif
14479#endif
ba4481b5 14480
35996d22
AS
14481#if HAVE_STDLIB_H
14482# include <stdlib.h>
14483#endif
14484
98418dba
CW
14485#if HAVE_UNISTD_H
14486# include <unistd.h>
14487#endif
ba4481b5 14488
98418dba
CW
14489#if !HAVE_ALARM
14490# define alarm(X) /* empty */
14491#endif
df645f7c 14492
98418dba
CW
14493/* Work around redefinition to rpl_putenv by other config tests. */
14494#undef putenv
df645f7c 14495
98418dba 14496static time_t time_t_max;
35996d22 14497static time_t time_t_min;
df645f7c 14498
98418dba 14499/* Values we'll use to set the TZ environment variable. */
35996d22
AS
14500static char *tz_strings[] = {
14501 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
14502 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
14503};
14504#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 14505
98418dba
CW
14506/* Fail if mktime fails to convert a date in the spring-forward gap.
14507 Based on a problem report from Andreas Jaeger. */
14508static void
14509spring_forward_gap ()
14510{
14511 /* glibc (up to about 1998-10-07) failed this test. */
14512 struct tm tm;
14513
14514 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
14515 instead of "TZ=America/Vancouver" in order to detect the bug even
14516 on systems that don't support the Olson extension, or don't have the
14517 full zoneinfo tables installed. */
14518 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
14519
14520 tm.tm_year = 98;
14521 tm.tm_mon = 3;
14522 tm.tm_mday = 5;
14523 tm.tm_hour = 2;
14524 tm.tm_min = 0;
14525 tm.tm_sec = 0;
14526 tm.tm_isdst = -1;
14527 if (mktime (&tm) == (time_t)-1)
14528 exit (1);
14529}
14530
14531static void
35996d22 14532mktime_test1 (now)
98418dba
CW
14533 time_t now;
14534{
14535 struct tm *lt;
14536 if ((lt = localtime (&now)) && mktime (lt) != now)
14537 exit (1);
35996d22
AS
14538}
14539
14540static void
14541mktime_test (now)
14542 time_t now;
14543{
14544 mktime_test1 (now);
14545 mktime_test1 ((time_t) (time_t_max - now));
14546 mktime_test1 ((time_t) (time_t_min + now));
98418dba
CW
14547}
14548
14549static void
14550irix_6_4_bug ()
14551{
14552 /* Based on code from Ariel Faigon. */
14553 struct tm tm;
14554 tm.tm_year = 96;
14555 tm.tm_mon = 3;
14556 tm.tm_mday = 0;
14557 tm.tm_hour = 0;
14558 tm.tm_min = 0;
14559 tm.tm_sec = 0;
14560 tm.tm_isdst = -1;
14561 mktime (&tm);
14562 if (tm.tm_mon != 2 || tm.tm_mday != 31)
14563 exit (1);
14564}
14565
14566static void
14567bigtime_test (j)
14568 int j;
14569{
14570 struct tm tm;
14571 time_t now;
14572 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
14573 now = mktime (&tm);
14574 if (now != (time_t) -1)
14575 {
14576 struct tm *lt = localtime (&now);
14577 if (! (lt
14578 && lt->tm_year == tm.tm_year
14579 && lt->tm_mon == tm.tm_mon
14580 && lt->tm_mday == tm.tm_mday
14581 && lt->tm_hour == tm.tm_hour
14582 && lt->tm_min == tm.tm_min
14583 && lt->tm_sec == tm.tm_sec
14584 && lt->tm_yday == tm.tm_yday
14585 && lt->tm_wday == tm.tm_wday
14586 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
14587 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
14588 exit (1);
14589 }
14590}
14591
14592int
14593main ()
14594{
14595 time_t t, delta;
14596 int i, j;
14597
14598 /* This test makes some buggy mktime implementations loop.
14599 Give up after 60 seconds; a mktime slower than that
14600 isn't worth using anyway. */
14601 alarm (60);
14602
14603 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
14604 continue;
14605 time_t_max--;
35996d22
AS
14606 if ((time_t) -1 < 0)
14607 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
14608 continue;
98418dba
CW
14609 delta = time_t_max / 997; /* a suitable prime number */
14610 for (i = 0; i < N_STRINGS; i++)
14611 {
14612 if (tz_strings[i])
14613 putenv (tz_strings[i]);
503d2be0 14614
98418dba
CW
14615 for (t = 0; t <= time_t_max - delta; t += delta)
14616 mktime_test (t);
35996d22
AS
14617 mktime_test ((time_t) 1);
14618 mktime_test ((time_t) (60 * 60));
14619 mktime_test ((time_t) (60 * 60 * 24));
98418dba
CW
14620
14621 for (j = 1; 0 < j; j *= 2)
35996d22 14622 bigtime_test (j);
98418dba
CW
14623 bigtime_test (j - 1);
14624 }
14625 irix_6_4_bug ();
14626 spring_forward_gap ();
14627 exit (0);
503d2be0
AS
14628}
14629_ACEOF
98418dba 14630rm -f conftest$ac_exeext
c0d27fcc 14631if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14632 (eval $ac_link) 2>&5
14633 ac_status=$?
c0d27fcc 14634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14635 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 14636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14637 (eval $ac_try) 2>&5
14638 ac_status=$?
c0d27fcc 14639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14640 (exit $ac_status); }; }; then
98418dba 14641 ac_cv_func_working_mktime=yes
503d2be0 14642else
98418dba
CW
14643 echo "$as_me: program exited with status $ac_status" >&5
14644echo "$as_me: failed program was:" >&5
19650fd6
AS
14645sed 's/^/| /' conftest.$ac_ext >&5
14646
c0d27fcc 14647( exit $ac_status )
98418dba 14648ac_cv_func_working_mktime=no
503d2be0 14649fi
35996d22 14650rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 14651fi
ba4481b5 14652fi
c0d27fcc 14653echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
14654echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
14655if test $ac_cv_func_working_mktime = no; then
35996d22
AS
14656 case $LIBOBJS in
14657 "mktime.$ac_objext" | \
14658 *" mktime.$ac_objext" | \
14659 "mktime.$ac_objext "* | \
14660 *" mktime.$ac_objext "* ) ;;
14661 *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;;
14662esac
14663
ba4481b5
DL
14664fi
14665
98418dba 14666if test "$ac_cv_func_working_mktime" = no; then
b936fae4 14667
c0d27fcc 14668cat >>confdefs.h <<\_ACEOF
98418dba 14669#define BROKEN_MKTIME 1
c0d27fcc 14670_ACEOF
ba4481b5 14671
ba4481b5 14672fi
503d2be0 14673
98418dba
CW
14674ac_have_func=no # yes means we've found a way to get the load average.
14675
6bae0ccf
DL
14676# Make sure getloadavg.c is where it belongs, at configure-time.
14677test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
14678 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
14679echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
14680 { (exit 1); exit 1; }; }
14681
98418dba
CW
14682ac_save_LIBS=$LIBS
14683
14684# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 14685(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
14686echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
14687if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 14688 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14689else
503d2be0 14690 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14691/* confdefs.h. */
14692_ACEOF
14693cat confdefs.h >>conftest.$ac_ext
14694cat >>conftest.$ac_ext <<_ACEOF
14695/* end confdefs.h. */
35996d22
AS
14696/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
14697 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14698#define getloadavg innocuous_getloadavg
14699
98418dba 14700/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14701 which can conflict with char getloadavg (); below.
14702 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14703 <limits.h> exists even on freestanding compilers. */
35996d22 14704
19650fd6
AS
14705#ifdef __STDC__
14706# include <limits.h>
14707#else
14708# include <assert.h>
14709#endif
35996d22
AS
14710
14711#undef getloadavg
14712
ba4481b5 14713/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14714#ifdef __cplusplus
14715extern "C"
19650fd6 14716{
503d2be0 14717#endif
ba4481b5 14718/* We use char because int might match the return type of a gcc2
503d2be0 14719 builtin and then its argument prototype would still apply. */
98418dba 14720char getloadavg ();
98418dba
CW
14721/* The GNU C library defines this for functions which it implements
14722 to always fail with ENOSYS. Some functions are actually named
14723 something starting with __ and the normal name is an alias. */
14724#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
14725choke me
14726#else
19650fd6
AS
14727char (*f) () = getloadavg;
14728#endif
14729#ifdef __cplusplus
14730}
cd958eb3
MB
14731#endif
14732
19650fd6
AS
14733int
14734main ()
14735{
14736return f != getloadavg;
503d2be0
AS
14737 ;
14738 return 0;
14739}
14740_ACEOF
14741rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14742if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14743 (eval $ac_link) 2>conftest.er1
503d2be0 14744 ac_status=$?
35996d22
AS
14745 grep -v '^ *+' conftest.er1 >conftest.err
14746 rm -f conftest.er1
14747 cat conftest.err >&5
c0d27fcc 14748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14749 (exit $ac_status); } &&
4494a266
JD
14750 { ac_try='test -z "$ac_c_werror_flag"
14751 || test ! -s conftest.err'
35996d22
AS
14752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14753 (eval $ac_try) 2>&5
14754 ac_status=$?
14755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14756 (exit $ac_status); }; } &&
14757 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14759 (eval $ac_try) 2>&5
14760 ac_status=$?
c0d27fcc 14761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14762 (exit $ac_status); }; }; then
98418dba 14763 ac_cv_func_getloadavg=yes
503d2be0
AS
14764else
14765 echo "$as_me: failed program was:" >&5
19650fd6
AS
14766sed 's/^/| /' conftest.$ac_ext >&5
14767
98418dba 14768ac_cv_func_getloadavg=no
503d2be0 14769fi
35996d22
AS
14770rm -f conftest.err conftest.$ac_objext \
14771 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14772fi
c0d27fcc 14773echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
14774echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
14775if test $ac_cv_func_getloadavg = yes; then
14776 exit 0
14777else
14778 exit 1
ba4481b5 14779fi
98418dba 14780) && ac_have_func=yes
ba4481b5 14781
98418dba 14782# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 14783
98418dba
CW
14784for ac_func in pstat_getdynamic
14785do
14786as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14787echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14788echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14789if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14790 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14791else
503d2be0 14792 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14793/* confdefs.h. */
14794_ACEOF
14795cat confdefs.h >>conftest.$ac_ext
14796cat >>conftest.$ac_ext <<_ACEOF
14797/* end confdefs.h. */
35996d22
AS
14798/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14799 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14800#define $ac_func innocuous_$ac_func
14801
98418dba 14802/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14803 which can conflict with char $ac_func (); below.
14804 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14805 <limits.h> exists even on freestanding compilers. */
35996d22 14806
19650fd6
AS
14807#ifdef __STDC__
14808# include <limits.h>
14809#else
14810# include <assert.h>
14811#endif
35996d22
AS
14812
14813#undef $ac_func
14814
ba4481b5 14815/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14816#ifdef __cplusplus
14817extern "C"
19650fd6 14818{
503d2be0 14819#endif
ba4481b5 14820/* We use char because int might match the return type of a gcc2
503d2be0 14821 builtin and then its argument prototype would still apply. */
98418dba 14822char $ac_func ();
98418dba
CW
14823/* The GNU C library defines this for functions which it implements
14824 to always fail with ENOSYS. Some functions are actually named
14825 something starting with __ and the normal name is an alias. */
14826#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14827choke me
14828#else
19650fd6
AS
14829char (*f) () = $ac_func;
14830#endif
14831#ifdef __cplusplus
14832}
98418dba
CW
14833#endif
14834
19650fd6
AS
14835int
14836main ()
14837{
14838return f != $ac_func;
98418dba
CW
14839 ;
14840 return 0;
14841}
f21fadcc 14842_ACEOF
98418dba 14843rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14844if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14845 (eval $ac_link) 2>conftest.er1
f21fadcc 14846 ac_status=$?
35996d22
AS
14847 grep -v '^ *+' conftest.er1 >conftest.err
14848 rm -f conftest.er1
14849 cat conftest.err >&5
c0d27fcc 14850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14851 (exit $ac_status); } &&
4494a266
JD
14852 { ac_try='test -z "$ac_c_werror_flag"
14853 || test ! -s conftest.err'
35996d22
AS
14854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14855 (eval $ac_try) 2>&5
14856 ac_status=$?
14857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14858 (exit $ac_status); }; } &&
14859 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
14861 (eval $ac_try) 2>&5
14862 ac_status=$?
c0d27fcc 14863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
14864 (exit $ac_status); }; }; then
14865 eval "$as_ac_var=yes"
f21fadcc
JD
14866else
14867 echo "$as_me: failed program was:" >&5
19650fd6
AS
14868sed 's/^/| /' conftest.$ac_ext >&5
14869
98418dba 14870eval "$as_ac_var=no"
f21fadcc 14871fi
35996d22
AS
14872rm -f conftest.err conftest.$ac_objext \
14873 conftest$ac_exeext conftest.$ac_ext
f21fadcc 14874fi
c0d27fcc 14875echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14876echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14877if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14878 cat >>confdefs.h <<_ACEOF
98418dba 14879#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14880_ACEOF
98418dba
CW
14881
14882fi
14883done
14884
c0d27fcc 14885
98418dba
CW
14886# Solaris has libkstat which does not require root.
14887
c0d27fcc 14888echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
14889echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
14890if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
14891 echo $ECHO_N "(cached) $ECHO_C" >&6
14892else
14893 ac_check_lib_save_LIBS=$LIBS
98418dba 14894LIBS="-lkstat $LIBS"
f21fadcc 14895cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14896/* confdefs.h. */
14897_ACEOF
14898cat confdefs.h >>conftest.$ac_ext
14899cat >>conftest.$ac_ext <<_ACEOF
14900/* end confdefs.h. */
f21fadcc
JD
14901
14902/* Override any gcc2 internal prototype to avoid an error. */
14903#ifdef __cplusplus
14904extern "C"
14905#endif
14906/* We use char because int might match the return type of a gcc2
14907 builtin and then its argument prototype would still apply. */
98418dba 14908char kstat_open ();
f21fadcc
JD
14909int
14910main ()
14911{
98418dba 14912kstat_open ();
f21fadcc
JD
14913 ;
14914 return 0;
14915}
14916_ACEOF
14917rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14918if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14919 (eval $ac_link) 2>conftest.er1
f21fadcc 14920 ac_status=$?
35996d22
AS
14921 grep -v '^ *+' conftest.er1 >conftest.err
14922 rm -f conftest.er1
14923 cat conftest.err >&5
c0d27fcc 14924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 14925 (exit $ac_status); } &&
4494a266
JD
14926 { ac_try='test -z "$ac_c_werror_flag"
14927 || test ! -s conftest.err'
35996d22
AS
14928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14929 (eval $ac_try) 2>&5
14930 ac_status=$?
14931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14932 (exit $ac_status); }; } &&
14933 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
14935 (eval $ac_try) 2>&5
14936 ac_status=$?
c0d27fcc 14937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 14938 (exit $ac_status); }; }; then
98418dba 14939 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
14940else
14941 echo "$as_me: failed program was:" >&5
19650fd6
AS
14942sed 's/^/| /' conftest.$ac_ext >&5
14943
98418dba 14944ac_cv_lib_kstat_kstat_open=no
f21fadcc 14945fi
35996d22
AS
14946rm -f conftest.err conftest.$ac_objext \
14947 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
14948LIBS=$ac_check_lib_save_LIBS
14949fi
c0d27fcc 14950echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
14951echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
14952if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 14953 cat >>confdefs.h <<_ACEOF
98418dba 14954#define HAVE_LIBKSTAT 1
c0d27fcc 14955_ACEOF
f21fadcc 14956
98418dba 14957 LIBS="-lkstat $LIBS"
f21fadcc 14958
f21fadcc
JD
14959fi
14960
98418dba
CW
14961test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
14962
14963# Some systems with -lutil have (and need) -lkvm as well, some do not.
14964# On Solaris, -lkvm requires nlist from -lelf, so check that first
14965# to get the right answer into the cache.
14966# For kstat on solaris, we need libelf to force the definition of SVR4 below.
14967if test $ac_have_func = no; then
c0d27fcc 14968 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
14969echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
14970if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 14971 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14972else
98418dba
CW
14973 ac_check_lib_save_LIBS=$LIBS
14974LIBS="-lelf $LIBS"
14975cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14976/* confdefs.h. */
14977_ACEOF
14978cat confdefs.h >>conftest.$ac_ext
14979cat >>conftest.$ac_ext <<_ACEOF
14980/* end confdefs.h. */
98418dba
CW
14981
14982/* Override any gcc2 internal prototype to avoid an error. */
14983#ifdef __cplusplus
14984extern "C"
14985#endif
14986/* We use char because int might match the return type of a gcc2
14987 builtin and then its argument prototype would still apply. */
14988char elf_begin ();
503d2be0
AS
14989int
14990main ()
14991{
98418dba 14992elf_begin ();
503d2be0
AS
14993 ;
14994 return 0;
14995}
14996_ACEOF
14997rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14998if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14999 (eval $ac_link) 2>conftest.er1
503d2be0 15000 ac_status=$?
35996d22
AS
15001 grep -v '^ *+' conftest.er1 >conftest.err
15002 rm -f conftest.er1
15003 cat conftest.err >&5
c0d27fcc 15004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15005 (exit $ac_status); } &&
4494a266
JD
15006 { ac_try='test -z "$ac_c_werror_flag"
15007 || test ! -s conftest.err'
35996d22
AS
15008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15009 (eval $ac_try) 2>&5
15010 ac_status=$?
15011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15012 (exit $ac_status); }; } &&
15013 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15015 (eval $ac_try) 2>&5
15016 ac_status=$?
c0d27fcc 15017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15018 (exit $ac_status); }; }; then
98418dba 15019 ac_cv_lib_elf_elf_begin=yes
ba4481b5 15020else
503d2be0 15021 echo "$as_me: failed program was:" >&5
19650fd6
AS
15022sed 's/^/| /' conftest.$ac_ext >&5
15023
98418dba 15024ac_cv_lib_elf_elf_begin=no
ba4481b5 15025fi
35996d22
AS
15026rm -f conftest.err conftest.$ac_objext \
15027 conftest$ac_exeext conftest.$ac_ext
98418dba 15028LIBS=$ac_check_lib_save_LIBS
ba4481b5 15029fi
c0d27fcc 15030echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
15031echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
15032if test $ac_cv_lib_elf_elf_begin = yes; then
15033 LIBS="-lelf $LIBS"
ba4481b5
DL
15034fi
15035
98418dba
CW
15036fi
15037if test $ac_have_func = no; then
c0d27fcc 15038 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
15039echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
15040if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 15041 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15042else
98418dba
CW
15043 ac_check_lib_save_LIBS=$LIBS
15044LIBS="-lkvm $LIBS"
15045cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15046/* confdefs.h. */
15047_ACEOF
15048cat confdefs.h >>conftest.$ac_ext
15049cat >>conftest.$ac_ext <<_ACEOF
15050/* end confdefs.h. */
98418dba
CW
15051
15052/* Override any gcc2 internal prototype to avoid an error. */
15053#ifdef __cplusplus
15054extern "C"
15055#endif
15056/* We use char because int might match the return type of a gcc2
15057 builtin and then its argument prototype would still apply. */
15058char kvm_open ();
503d2be0
AS
15059int
15060main ()
15061{
98418dba 15062kvm_open ();
503d2be0
AS
15063 ;
15064 return 0;
15065}
15066_ACEOF
15067rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15069 (eval $ac_link) 2>conftest.er1
503d2be0 15070 ac_status=$?
35996d22
AS
15071 grep -v '^ *+' conftest.er1 >conftest.err
15072 rm -f conftest.er1
15073 cat conftest.err >&5
c0d27fcc 15074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15075 (exit $ac_status); } &&
4494a266
JD
15076 { ac_try='test -z "$ac_c_werror_flag"
15077 || test ! -s conftest.err'
35996d22
AS
15078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15079 (eval $ac_try) 2>&5
15080 ac_status=$?
15081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15082 (exit $ac_status); }; } &&
15083 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15085 (eval $ac_try) 2>&5
15086 ac_status=$?
c0d27fcc 15087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15088 (exit $ac_status); }; }; then
98418dba 15089 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
15090else
15091 echo "$as_me: failed program was:" >&5
19650fd6
AS
15092sed 's/^/| /' conftest.$ac_ext >&5
15093
98418dba 15094ac_cv_lib_kvm_kvm_open=no
503d2be0 15095fi
35996d22
AS
15096rm -f conftest.err conftest.$ac_objext \
15097 conftest$ac_exeext conftest.$ac_ext
98418dba 15098LIBS=$ac_check_lib_save_LIBS
503d2be0 15099fi
c0d27fcc 15100echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
15101echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
15102if test $ac_cv_lib_kvm_kvm_open = yes; then
15103 LIBS="-lkvm $LIBS"
ba4481b5
DL
15104fi
15105
98418dba 15106 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 15107 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
15108echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
15109if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 15110 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15111else
98418dba
CW
15112 ac_check_lib_save_LIBS=$LIBS
15113LIBS="-lutil $LIBS"
15114cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15115/* confdefs.h. */
15116_ACEOF
15117cat confdefs.h >>conftest.$ac_ext
15118cat >>conftest.$ac_ext <<_ACEOF
15119/* end confdefs.h. */
98418dba
CW
15120
15121/* Override any gcc2 internal prototype to avoid an error. */
15122#ifdef __cplusplus
15123extern "C"
15124#endif
15125/* We use char because int might match the return type of a gcc2
15126 builtin and then its argument prototype would still apply. */
15127char getloadavg ();
503d2be0
AS
15128int
15129main ()
15130{
98418dba 15131getloadavg ();
503d2be0
AS
15132 ;
15133 return 0;
15134}
15135_ACEOF
15136rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15137if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15138 (eval $ac_link) 2>conftest.er1
503d2be0 15139 ac_status=$?
35996d22
AS
15140 grep -v '^ *+' conftest.er1 >conftest.err
15141 rm -f conftest.er1
15142 cat conftest.err >&5
c0d27fcc 15143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15144 (exit $ac_status); } &&
4494a266
JD
15145 { ac_try='test -z "$ac_c_werror_flag"
15146 || test ! -s conftest.err'
c0d27fcc 15147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15148 (eval $ac_try) 2>&5
15149 ac_status=$?
c0d27fcc 15150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
15151 (exit $ac_status); }; } &&
15152 { ac_try='test -s conftest$ac_exeext'
15153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15154 (eval $ac_try) 2>&5
15155 ac_status=$?
15156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15157 (exit $ac_status); }; }; then
15158 ac_cv_lib_util_getloadavg=yes
15159else
503d2be0 15160 echo "$as_me: failed program was:" >&5
19650fd6
AS
15161sed 's/^/| /' conftest.$ac_ext >&5
15162
98418dba 15163ac_cv_lib_util_getloadavg=no
ba4481b5 15164fi
35996d22
AS
15165rm -f conftest.err conftest.$ac_objext \
15166 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15167LIBS=$ac_check_lib_save_LIBS
15168fi
c0d27fcc 15169echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
15170echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
15171if test $ac_cv_lib_util_getloadavg = yes; then
15172 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 15173fi
503d2be0 15174
98418dba 15175fi
ba4481b5 15176
98418dba
CW
15177if test $ac_have_func = no; then
15178 # There is a commonly available library for RS/6000 AIX.
15179 # Since it is not a standard part of AIX, it might be installed locally.
15180 ac_getloadavg_LIBS=$LIBS
15181 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 15182 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
15183echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
15184if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 15185 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15186else
98418dba
CW
15187 ac_check_lib_save_LIBS=$LIBS
15188LIBS="-lgetloadavg $LIBS"
15189cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15190/* confdefs.h. */
15191_ACEOF
15192cat confdefs.h >>conftest.$ac_ext
15193cat >>conftest.$ac_ext <<_ACEOF
15194/* end confdefs.h. */
ba4481b5 15195
98418dba
CW
15196/* Override any gcc2 internal prototype to avoid an error. */
15197#ifdef __cplusplus
15198extern "C"
15199#endif
15200/* We use char because int might match the return type of a gcc2
15201 builtin and then its argument prototype would still apply. */
15202char getloadavg ();
98418dba
CW
15203int
15204main ()
15205{
15206getloadavg ();
15207 ;
15208 return 0;
15209}
503d2be0 15210_ACEOF
98418dba 15211rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15212if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15213 (eval $ac_link) 2>conftest.er1
98418dba 15214 ac_status=$?
35996d22
AS
15215 grep -v '^ *+' conftest.er1 >conftest.err
15216 rm -f conftest.er1
15217 cat conftest.err >&5
c0d27fcc 15218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15219 (exit $ac_status); } &&
4494a266
JD
15220 { ac_try='test -z "$ac_c_werror_flag"
15221 || test ! -s conftest.err'
35996d22
AS
15222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15223 (eval $ac_try) 2>&5
15224 ac_status=$?
15225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15226 (exit $ac_status); }; } &&
15227 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15229 (eval $ac_try) 2>&5
15230 ac_status=$?
c0d27fcc 15231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15232 (exit $ac_status); }; }; then
15233 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 15234else
98418dba 15235 echo "$as_me: failed program was:" >&5
19650fd6
AS
15236sed 's/^/| /' conftest.$ac_ext >&5
15237
98418dba
CW
15238ac_cv_lib_getloadavg_getloadavg=no
15239fi
35996d22
AS
15240rm -f conftest.err conftest.$ac_objext \
15241 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15242LIBS=$ac_check_lib_save_LIBS
15243fi
c0d27fcc 15244echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
15245echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
15246if test $ac_cv_lib_getloadavg_getloadavg = yes; then
15247 LIBS="-lgetloadavg $LIBS"
15248else
15249 LIBS=$ac_getloadavg_LIBS
ba4481b5 15250fi
ba4481b5
DL
15251
15252fi
98418dba
CW
15253
15254# Make sure it is really in the library, if we think we found it,
15255# otherwise set up the replacement function.
15256
15257for ac_func in getloadavg
15258do
15259as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15260echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15261echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15262if eval "test \"\${$as_ac_var+set}\" = set"; then
15263 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15264else
503d2be0 15265 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15266/* confdefs.h. */
15267_ACEOF
15268cat confdefs.h >>conftest.$ac_ext
15269cat >>conftest.$ac_ext <<_ACEOF
15270/* end confdefs.h. */
35996d22
AS
15271/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15272 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15273#define $ac_func innocuous_$ac_func
15274
ba4481b5 15275/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15276 which can conflict with char $ac_func (); below.
15277 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15278 <limits.h> exists even on freestanding compilers. */
35996d22 15279
19650fd6
AS
15280#ifdef __STDC__
15281# include <limits.h>
15282#else
15283# include <assert.h>
15284#endif
35996d22
AS
15285
15286#undef $ac_func
15287
ba4481b5 15288/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15289#ifdef __cplusplus
15290extern "C"
19650fd6 15291{
503d2be0 15292#endif
ba4481b5 15293/* We use char because int might match the return type of a gcc2
503d2be0
AS
15294 builtin and then its argument prototype would still apply. */
15295char $ac_func ();
ba4481b5
DL
15296/* The GNU C library defines this for functions which it implements
15297 to always fail with ENOSYS. Some functions are actually named
15298 something starting with __ and the normal name is an alias. */
15299#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15300choke me
15301#else
19650fd6
AS
15302char (*f) () = $ac_func;
15303#endif
15304#ifdef __cplusplus
15305}
cd958eb3
MB
15306#endif
15307
19650fd6
AS
15308int
15309main ()
15310{
15311return f != $ac_func;
503d2be0
AS
15312 ;
15313 return 0;
15314}
15315_ACEOF
15316rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15317if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15318 (eval $ac_link) 2>conftest.er1
503d2be0 15319 ac_status=$?
35996d22
AS
15320 grep -v '^ *+' conftest.er1 >conftest.err
15321 rm -f conftest.er1
15322 cat conftest.err >&5
c0d27fcc 15323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15324 (exit $ac_status); } &&
4494a266
JD
15325 { ac_try='test -z "$ac_c_werror_flag"
15326 || test ! -s conftest.err'
35996d22
AS
15327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15328 (eval $ac_try) 2>&5
15329 ac_status=$?
15330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15331 (exit $ac_status); }; } &&
15332 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15334 (eval $ac_try) 2>&5
15335 ac_status=$?
c0d27fcc 15336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15337 (exit $ac_status); }; }; then
15338 eval "$as_ac_var=yes"
15339else
15340 echo "$as_me: failed program was:" >&5
19650fd6
AS
15341sed 's/^/| /' conftest.$ac_ext >&5
15342
503d2be0
AS
15343eval "$as_ac_var=no"
15344fi
35996d22
AS
15345rm -f conftest.err conftest.$ac_objext \
15346 conftest$ac_exeext conftest.$ac_ext
503d2be0 15347fi
c0d27fcc 15348echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15349echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15350if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15351 cat >>confdefs.h <<_ACEOF
98418dba 15352#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15353_ACEOF
503d2be0 15354
98418dba 15355else
35996d22
AS
15356 case $LIBOBJS in
15357 "getloadavg.$ac_objext" | \
15358 *" getloadavg.$ac_objext" | \
15359 "getloadavg.$ac_objext "* | \
15360 *" getloadavg.$ac_objext "* ) ;;
15361 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" ;;
15362esac
15363
ba4481b5 15364
c0d27fcc 15365cat >>confdefs.h <<\_ACEOF
98418dba 15366#define C_GETLOADAVG 1
c0d27fcc 15367_ACEOF
ba4481b5 15368
98418dba
CW
15369# Figure out what our getloadavg.c needs.
15370ac_have_func=no
c0d27fcc
MR
15371if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15372 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
15373echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15374if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 15375 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15376fi
15377echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
15378echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 15379else
c0d27fcc
MR
15380 # Is the header compilable?
15381echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
15382echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
15383cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15384/* confdefs.h. */
15385_ACEOF
15386cat confdefs.h >>conftest.$ac_ext
15387cat >>conftest.$ac_ext <<_ACEOF
15388/* end confdefs.h. */
c0d27fcc
MR
15389$ac_includes_default
15390#include <sys/dg_sys_info.h>
15391_ACEOF
15392rm -f conftest.$ac_objext
15393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15394 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15395 ac_status=$?
35996d22
AS
15396 grep -v '^ *+' conftest.er1 >conftest.err
15397 rm -f conftest.er1
15398 cat conftest.err >&5
c0d27fcc
MR
15399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15400 (exit $ac_status); } &&
4494a266
JD
15401 { ac_try='test -z "$ac_c_werror_flag"
15402 || test ! -s conftest.err'
35996d22
AS
15403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15404 (eval $ac_try) 2>&5
15405 ac_status=$?
15406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15407 (exit $ac_status); }; } &&
15408 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15410 (eval $ac_try) 2>&5
15411 ac_status=$?
15412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15413 (exit $ac_status); }; }; then
15414 ac_header_compiler=yes
15415else
15416 echo "$as_me: failed program was:" >&5
19650fd6
AS
15417sed 's/^/| /' conftest.$ac_ext >&5
15418
c0d27fcc
MR
15419ac_header_compiler=no
15420fi
35996d22 15421rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15422echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15423echo "${ECHO_T}$ac_header_compiler" >&6
15424
15425# Is the header present?
15426echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
15427echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
15428cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15429/* confdefs.h. */
15430_ACEOF
15431cat confdefs.h >>conftest.$ac_ext
15432cat >>conftest.$ac_ext <<_ACEOF
15433/* end confdefs.h. */
98418dba
CW
15434#include <sys/dg_sys_info.h>
15435_ACEOF
c0d27fcc 15436if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
15437 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15438 ac_status=$?
6bae0ccf 15439 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15440 rm -f conftest.er1
15441 cat conftest.err >&5
c0d27fcc 15442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15443 (exit $ac_status); } >/dev/null; then
15444 if test -s conftest.err; then
15445 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15446 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15447 else
15448 ac_cpp_err=
15449 fi
15450else
15451 ac_cpp_err=yes
ba4481b5 15452fi
98418dba 15453if test -z "$ac_cpp_err"; then
c0d27fcc 15454 ac_header_preproc=yes
98418dba
CW
15455else
15456 echo "$as_me: failed program was:" >&5
19650fd6
AS
15457sed 's/^/| /' conftest.$ac_ext >&5
15458
c0d27fcc 15459 ac_header_preproc=no
ba4481b5 15460fi
98418dba 15461rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15462echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15463echo "${ECHO_T}$ac_header_preproc" >&6
15464
15465# So? What about this header?
35996d22
AS
15466case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15467 yes:no: )
c0d27fcc
MR
15468 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
15469echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15470 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
15471echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
15472 ac_header_preproc=yes
19650fd6 15473 ;;
35996d22 15474 no:yes:* )
c0d27fcc
MR
15475 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
15476echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
35996d22
AS
15477 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
15478echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
15479 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
15480echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
15481 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
15482echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15483 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 15484echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15485 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
15486echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15487 (
15488 cat <<\_ASBOX
35996d22
AS
15489## ------------------------------------------ ##
15490## Report this to the AC_PACKAGE_NAME lists. ##
15491## ------------------------------------------ ##
19650fd6
AS
15492_ASBOX
15493 ) |
15494 sed "s/^/$as_me: WARNING: /" >&2
15495 ;;
c0d27fcc
MR
15496esac
15497echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
15498echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15499if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15500 echo $ECHO_N "(cached) $ECHO_C" >&6
15501else
15502 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 15503fi
c0d27fcc 15504echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 15505echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
15506
15507fi
98418dba
CW
15508if test $ac_cv_header_sys_dg_sys_info_h = yes; then
15509 ac_have_func=yes
ba4481b5 15510
c0d27fcc 15511cat >>confdefs.h <<\_ACEOF
98418dba 15512#define DGUX 1
c0d27fcc
MR
15513_ACEOF
15514
503d2be0 15515
c0d27fcc 15516echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
15517echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
15518if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 15519 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15520else
503d2be0 15521 ac_check_lib_save_LIBS=$LIBS
98418dba 15522LIBS="-ldgc $LIBS"
503d2be0 15523cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15524/* confdefs.h. */
15525_ACEOF
15526cat confdefs.h >>conftest.$ac_ext
15527cat >>conftest.$ac_ext <<_ACEOF
15528/* end confdefs.h. */
503d2be0 15529
ba4481b5 15530/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15531#ifdef __cplusplus
15532extern "C"
15533#endif
ba4481b5 15534/* We use char because int might match the return type of a gcc2
503d2be0 15535 builtin and then its argument prototype would still apply. */
98418dba 15536char dg_sys_info ();
503d2be0
AS
15537int
15538main ()
15539{
98418dba 15540dg_sys_info ();
503d2be0
AS
15541 ;
15542 return 0;
15543}
15544_ACEOF
15545rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15546if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15547 (eval $ac_link) 2>conftest.er1
503d2be0 15548 ac_status=$?
35996d22
AS
15549 grep -v '^ *+' conftest.er1 >conftest.err
15550 rm -f conftest.er1
15551 cat conftest.err >&5
c0d27fcc 15552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15553 (exit $ac_status); } &&
4494a266
JD
15554 { ac_try='test -z "$ac_c_werror_flag"
15555 || test ! -s conftest.err'
35996d22
AS
15556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15557 (eval $ac_try) 2>&5
15558 ac_status=$?
15559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15560 (exit $ac_status); }; } &&
15561 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15563 (eval $ac_try) 2>&5
15564 ac_status=$?
c0d27fcc 15565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15566 (exit $ac_status); }; }; then
98418dba 15567 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
15568else
15569 echo "$as_me: failed program was:" >&5
19650fd6
AS
15570sed 's/^/| /' conftest.$ac_ext >&5
15571
98418dba 15572ac_cv_lib_dgc_dg_sys_info=no
503d2be0 15573fi
35996d22
AS
15574rm -f conftest.err conftest.$ac_objext \
15575 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15576LIBS=$ac_check_lib_save_LIBS
15577fi
c0d27fcc 15578echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
15579echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
15580if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 15581 cat >>confdefs.h <<_ACEOF
98418dba 15582#define HAVE_LIBDGC 1
c0d27fcc 15583_ACEOF
ba4481b5 15584
98418dba 15585 LIBS="-ldgc $LIBS"
ba4481b5 15586
ba4481b5
DL
15587fi
15588
98418dba 15589fi
503d2be0 15590
c0d27fcc
MR
15591
15592
15593if test "${ac_cv_header_locale_h+set}" = set; then
15594 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
15595echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
15596if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 15597 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15598fi
15599echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
15600echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 15601else
c0d27fcc
MR
15602 # Is the header compilable?
15603echo "$as_me:$LINENO: checking locale.h usability" >&5
15604echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
15605cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15606/* confdefs.h. */
15607_ACEOF
15608cat confdefs.h >>conftest.$ac_ext
15609cat >>conftest.$ac_ext <<_ACEOF
15610/* end confdefs.h. */
c0d27fcc
MR
15611$ac_includes_default
15612#include <locale.h>
15613_ACEOF
15614rm -f conftest.$ac_objext
15615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15616 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15617 ac_status=$?
35996d22
AS
15618 grep -v '^ *+' conftest.er1 >conftest.err
15619 rm -f conftest.er1
15620 cat conftest.err >&5
c0d27fcc
MR
15621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15622 (exit $ac_status); } &&
4494a266
JD
15623 { ac_try='test -z "$ac_c_werror_flag"
15624 || test ! -s conftest.err'
35996d22
AS
15625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15626 (eval $ac_try) 2>&5
15627 ac_status=$?
15628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15629 (exit $ac_status); }; } &&
15630 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15632 (eval $ac_try) 2>&5
15633 ac_status=$?
15634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15635 (exit $ac_status); }; }; then
15636 ac_header_compiler=yes
15637else
15638 echo "$as_me: failed program was:" >&5
19650fd6
AS
15639sed 's/^/| /' conftest.$ac_ext >&5
15640
c0d27fcc
MR
15641ac_header_compiler=no
15642fi
35996d22 15643rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15644echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15645echo "${ECHO_T}$ac_header_compiler" >&6
15646
15647# Is the header present?
15648echo "$as_me:$LINENO: checking locale.h presence" >&5
15649echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
15650cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15651/* confdefs.h. */
15652_ACEOF
15653cat confdefs.h >>conftest.$ac_ext
15654cat >>conftest.$ac_ext <<_ACEOF
15655/* end confdefs.h. */
98418dba 15656#include <locale.h>
503d2be0 15657_ACEOF
c0d27fcc 15658if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 15659 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 15660 ac_status=$?
6bae0ccf 15661 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15662 rm -f conftest.er1
15663 cat conftest.err >&5
c0d27fcc 15664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15665 (exit $ac_status); } >/dev/null; then
15666 if test -s conftest.err; then
15667 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15668 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15669 else
15670 ac_cpp_err=
15671 fi
503d2be0 15672else
98418dba 15673 ac_cpp_err=yes
503d2be0 15674fi
98418dba 15675if test -z "$ac_cpp_err"; then
c0d27fcc 15676 ac_header_preproc=yes
98418dba
CW
15677else
15678 echo "$as_me: failed program was:" >&5
19650fd6
AS
15679sed 's/^/| /' conftest.$ac_ext >&5
15680
c0d27fcc 15681 ac_header_preproc=no
ba4481b5 15682fi
98418dba 15683rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15684echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15685echo "${ECHO_T}$ac_header_preproc" >&6
15686
15687# So? What about this header?
35996d22
AS
15688case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15689 yes:no: )
c0d27fcc
MR
15690 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
15691echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15692 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
15693echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
15694 ac_header_preproc=yes
19650fd6 15695 ;;
35996d22 15696 no:yes:* )
c0d27fcc
MR
15697 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
15698echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
35996d22
AS
15699 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
15700echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
15701 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
15702echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
15703 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
15704echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15705 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 15706echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15707 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
15708echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15709 (
15710 cat <<\_ASBOX
35996d22
AS
15711## ------------------------------------------ ##
15712## Report this to the AC_PACKAGE_NAME lists. ##
15713## ------------------------------------------ ##
19650fd6
AS
15714_ASBOX
15715 ) |
15716 sed "s/^/$as_me: WARNING: /" >&2
15717 ;;
c0d27fcc
MR
15718esac
15719echo "$as_me:$LINENO: checking for locale.h" >&5
15720echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
15721if test "${ac_cv_header_locale_h+set}" = set; then
15722 echo $ECHO_N "(cached) $ECHO_C" >&6
15723else
15724 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 15725fi
c0d27fcc 15726echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
15727echo "${ECHO_T}$ac_cv_header_locale_h" >&6
15728
c0d27fcc
MR
15729fi
15730
15731
15732
98418dba 15733for ac_func in setlocale
ba4481b5 15734do
503d2be0 15735as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15736echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15737echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15738if eval "test \"\${$as_ac_var+set}\" = set"; then
15739 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15740else
503d2be0 15741 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15742/* confdefs.h. */
15743_ACEOF
15744cat confdefs.h >>conftest.$ac_ext
15745cat >>conftest.$ac_ext <<_ACEOF
15746/* end confdefs.h. */
35996d22
AS
15747/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15748 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15749#define $ac_func innocuous_$ac_func
15750
ba4481b5 15751/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15752 which can conflict with char $ac_func (); below.
15753 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15754 <limits.h> exists even on freestanding compilers. */
35996d22 15755
19650fd6
AS
15756#ifdef __STDC__
15757# include <limits.h>
15758#else
15759# include <assert.h>
15760#endif
35996d22
AS
15761
15762#undef $ac_func
15763
ba4481b5 15764/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15765#ifdef __cplusplus
15766extern "C"
19650fd6 15767{
503d2be0 15768#endif
ba4481b5 15769/* We use char because int might match the return type of a gcc2
503d2be0
AS
15770 builtin and then its argument prototype would still apply. */
15771char $ac_func ();
ba4481b5
DL
15772/* The GNU C library defines this for functions which it implements
15773 to always fail with ENOSYS. Some functions are actually named
15774 something starting with __ and the normal name is an alias. */
15775#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15776choke me
15777#else
19650fd6
AS
15778char (*f) () = $ac_func;
15779#endif
15780#ifdef __cplusplus
15781}
ba4481b5
DL
15782#endif
15783
19650fd6
AS
15784int
15785main ()
15786{
15787return f != $ac_func;
503d2be0
AS
15788 ;
15789 return 0;
15790}
15791_ACEOF
15792rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15793if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15794 (eval $ac_link) 2>conftest.er1
503d2be0 15795 ac_status=$?
35996d22
AS
15796 grep -v '^ *+' conftest.er1 >conftest.err
15797 rm -f conftest.er1
15798 cat conftest.err >&5
c0d27fcc 15799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15800 (exit $ac_status); } &&
4494a266
JD
15801 { ac_try='test -z "$ac_c_werror_flag"
15802 || test ! -s conftest.err'
35996d22
AS
15803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15804 (eval $ac_try) 2>&5
15805 ac_status=$?
15806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15807 (exit $ac_status); }; } &&
15808 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15810 (eval $ac_try) 2>&5
15811 ac_status=$?
c0d27fcc 15812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15813 (exit $ac_status); }; }; then
15814 eval "$as_ac_var=yes"
15815else
15816 echo "$as_me: failed program was:" >&5
19650fd6
AS
15817sed 's/^/| /' conftest.$ac_ext >&5
15818
503d2be0
AS
15819eval "$as_ac_var=no"
15820fi
35996d22
AS
15821rm -f conftest.err conftest.$ac_objext \
15822 conftest$ac_exeext conftest.$ac_ext
503d2be0 15823fi
c0d27fcc 15824echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15825echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15826if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15827 cat >>confdefs.h <<_ACEOF
503d2be0 15828#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15829_ACEOF
ba4481b5 15830
ba4481b5
DL
15831fi
15832done
15833
c0d27fcc 15834
98418dba
CW
15835# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
15836# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
15837# Irix 4.0.5F has the header but not the library.
15838if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
15839 ac_have_func=yes
15840
c0d27fcc 15841cat >>confdefs.h <<\_ACEOF
98418dba 15842#define SVR4 1
c0d27fcc 15843_ACEOF
98418dba
CW
15844
15845fi
15846
15847if test $ac_have_func = no; then
c0d27fcc
MR
15848 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
15849 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
15850echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
15851if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 15852 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15853fi
15854echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
15855echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 15856else
c0d27fcc
MR
15857 # Is the header compilable?
15858echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
15859echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
15860cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15861/* confdefs.h. */
15862_ACEOF
15863cat confdefs.h >>conftest.$ac_ext
15864cat >>conftest.$ac_ext <<_ACEOF
15865/* end confdefs.h. */
c0d27fcc
MR
15866$ac_includes_default
15867#include <inq_stats/cpustats.h>
15868_ACEOF
15869rm -f conftest.$ac_objext
15870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15871 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15872 ac_status=$?
35996d22
AS
15873 grep -v '^ *+' conftest.er1 >conftest.err
15874 rm -f conftest.er1
15875 cat conftest.err >&5
c0d27fcc
MR
15876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15877 (exit $ac_status); } &&
4494a266
JD
15878 { ac_try='test -z "$ac_c_werror_flag"
15879 || test ! -s conftest.err'
35996d22
AS
15880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15881 (eval $ac_try) 2>&5
15882 ac_status=$?
15883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15884 (exit $ac_status); }; } &&
15885 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15887 (eval $ac_try) 2>&5
15888 ac_status=$?
15889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15890 (exit $ac_status); }; }; then
15891 ac_header_compiler=yes
15892else
15893 echo "$as_me: failed program was:" >&5
19650fd6
AS
15894sed 's/^/| /' conftest.$ac_ext >&5
15895
c0d27fcc
MR
15896ac_header_compiler=no
15897fi
35996d22 15898rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15899echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15900echo "${ECHO_T}$ac_header_compiler" >&6
15901
15902# Is the header present?
15903echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
15904echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
15905cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15906/* confdefs.h. */
15907_ACEOF
15908cat confdefs.h >>conftest.$ac_ext
15909cat >>conftest.$ac_ext <<_ACEOF
15910/* end confdefs.h. */
98418dba 15911#include <inq_stats/cpustats.h>
503d2be0 15912_ACEOF
c0d27fcc 15913if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15914 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15915 ac_status=$?
6bae0ccf 15916 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15917 rm -f conftest.er1
15918 cat conftest.err >&5
c0d27fcc 15919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15920 (exit $ac_status); } >/dev/null; then
15921 if test -s conftest.err; then
15922 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15923 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
15924 else
15925 ac_cpp_err=
15926 fi
15927else
15928 ac_cpp_err=yes
15929fi
15930if test -z "$ac_cpp_err"; then
c0d27fcc 15931 ac_header_preproc=yes
503d2be0
AS
15932else
15933 echo "$as_me: failed program was:" >&5
19650fd6
AS
15934sed 's/^/| /' conftest.$ac_ext >&5
15935
c0d27fcc 15936 ac_header_preproc=no
ba4481b5 15937fi
503d2be0 15938rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15939echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15940echo "${ECHO_T}$ac_header_preproc" >&6
15941
15942# So? What about this header?
35996d22
AS
15943case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15944 yes:no: )
c0d27fcc
MR
15945 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
15946echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15947 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
15948echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
15949 ac_header_preproc=yes
19650fd6 15950 ;;
35996d22 15951 no:yes:* )
c0d27fcc
MR
15952 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
15953echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
35996d22
AS
15954 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
15955echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
15956 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
15957echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
15958 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
15959echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15960 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 15961echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15962 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
15963echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15964 (
15965 cat <<\_ASBOX
35996d22
AS
15966## ------------------------------------------ ##
15967## Report this to the AC_PACKAGE_NAME lists. ##
15968## ------------------------------------------ ##
19650fd6
AS
15969_ASBOX
15970 ) |
15971 sed "s/^/$as_me: WARNING: /" >&2
15972 ;;
c0d27fcc
MR
15973esac
15974echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
15975echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
15976if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
15977 echo $ECHO_N "(cached) $ECHO_C" >&6
15978else
15979 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 15980fi
c0d27fcc 15981echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 15982echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
15983
15984fi
98418dba
CW
15985if test $ac_cv_header_inq_stats_cpustats_h = yes; then
15986 ac_have_func=yes
ba4481b5 15987
c0d27fcc 15988cat >>confdefs.h <<\_ACEOF
98418dba 15989#define UMAX 1
c0d27fcc 15990_ACEOF
98418dba 15991
c0d27fcc
MR
15992
15993cat >>confdefs.h <<\_ACEOF
98418dba 15994#define UMAX4_3 1
c0d27fcc 15995_ACEOF
98418dba
CW
15996
15997fi
15998
c0d27fcc 15999
98418dba
CW
16000fi
16001
16002if test $ac_have_func = no; then
c0d27fcc
MR
16003 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16004 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
16005echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16006if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 16007 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16008fi
16009echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
16010echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 16011else
c0d27fcc
MR
16012 # Is the header compilable?
16013echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
16014echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
16015cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16016/* confdefs.h. */
16017_ACEOF
16018cat confdefs.h >>conftest.$ac_ext
16019cat >>conftest.$ac_ext <<_ACEOF
16020/* end confdefs.h. */
c0d27fcc
MR
16021$ac_includes_default
16022#include <sys/cpustats.h>
16023_ACEOF
16024rm -f conftest.$ac_objext
16025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16026 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16027 ac_status=$?
35996d22
AS
16028 grep -v '^ *+' conftest.er1 >conftest.err
16029 rm -f conftest.er1
16030 cat conftest.err >&5
c0d27fcc
MR
16031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16032 (exit $ac_status); } &&
4494a266
JD
16033 { ac_try='test -z "$ac_c_werror_flag"
16034 || test ! -s conftest.err'
35996d22
AS
16035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16036 (eval $ac_try) 2>&5
16037 ac_status=$?
16038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16039 (exit $ac_status); }; } &&
16040 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16042 (eval $ac_try) 2>&5
16043 ac_status=$?
16044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16045 (exit $ac_status); }; }; then
16046 ac_header_compiler=yes
16047else
16048 echo "$as_me: failed program was:" >&5
19650fd6
AS
16049sed 's/^/| /' conftest.$ac_ext >&5
16050
c0d27fcc
MR
16051ac_header_compiler=no
16052fi
35996d22 16053rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16054echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16055echo "${ECHO_T}$ac_header_compiler" >&6
16056
16057# Is the header present?
16058echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
16059echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
16060cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16061/* confdefs.h. */
16062_ACEOF
16063cat confdefs.h >>conftest.$ac_ext
16064cat >>conftest.$ac_ext <<_ACEOF
16065/* end confdefs.h. */
98418dba
CW
16066#include <sys/cpustats.h>
16067_ACEOF
c0d27fcc 16068if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
16069 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16070 ac_status=$?
6bae0ccf 16071 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16072 rm -f conftest.er1
16073 cat conftest.err >&5
c0d27fcc 16074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16075 (exit $ac_status); } >/dev/null; then
16076 if test -s conftest.err; then
16077 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 16078 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16079 else
16080 ac_cpp_err=
16081 fi
16082else
16083 ac_cpp_err=yes
503d2be0 16084fi
98418dba 16085if test -z "$ac_cpp_err"; then
c0d27fcc 16086 ac_header_preproc=yes
98418dba
CW
16087else
16088 echo "$as_me: failed program was:" >&5
19650fd6
AS
16089sed 's/^/| /' conftest.$ac_ext >&5
16090
c0d27fcc 16091 ac_header_preproc=no
98418dba
CW
16092fi
16093rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16094echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16095echo "${ECHO_T}$ac_header_preproc" >&6
16096
16097# So? What about this header?
35996d22
AS
16098case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16099 yes:no: )
c0d27fcc
MR
16100 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16101echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16102 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
16103echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
16104 ac_header_preproc=yes
19650fd6 16105 ;;
35996d22 16106 no:yes:* )
c0d27fcc
MR
16107 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
16108echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
35996d22
AS
16109 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
16110echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
16111 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
16112echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
16113 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16114echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16115 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16116echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16117 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
16118echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16119 (
16120 cat <<\_ASBOX
35996d22
AS
16121## ------------------------------------------ ##
16122## Report this to the AC_PACKAGE_NAME lists. ##
16123## ------------------------------------------ ##
19650fd6
AS
16124_ASBOX
16125 ) |
16126 sed "s/^/$as_me: WARNING: /" >&2
16127 ;;
c0d27fcc
MR
16128esac
16129echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
16130echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16131if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16132 echo $ECHO_N "(cached) $ECHO_C" >&6
16133else
16134 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 16135fi
c0d27fcc 16136echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 16137echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
16138
16139fi
98418dba 16140if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 16141 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 16142#define UMAX 1
c0d27fcc 16143_ACEOF
ba4481b5 16144
98418dba
CW
16145fi
16146
c0d27fcc 16147
98418dba
CW
16148fi
16149
16150if test $ac_have_func = no; then
16151
16152for ac_header in mach/mach.h
2c9dccc9
PJ
16153do
16154as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16155if eval "test \"\${$as_ac_Header+set}\" = set"; then
16156 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
16157echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16158if eval "test \"\${$as_ac_Header+set}\" = set"; then
16159 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16160fi
16161echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16162echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16163else
c0d27fcc
MR
16164 # Is the header compilable?
16165echo "$as_me:$LINENO: checking $ac_header usability" >&5
16166echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16167cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16168/* confdefs.h. */
16169_ACEOF
16170cat confdefs.h >>conftest.$ac_ext
16171cat >>conftest.$ac_ext <<_ACEOF
16172/* end confdefs.h. */
c0d27fcc
MR
16173$ac_includes_default
16174#include <$ac_header>
16175_ACEOF
16176rm -f conftest.$ac_objext
16177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16178 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16179 ac_status=$?
35996d22
AS
16180 grep -v '^ *+' conftest.er1 >conftest.err
16181 rm -f conftest.er1
16182 cat conftest.err >&5
c0d27fcc
MR
16183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16184 (exit $ac_status); } &&
4494a266
JD
16185 { ac_try='test -z "$ac_c_werror_flag"
16186 || test ! -s conftest.err'
35996d22
AS
16187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16188 (eval $ac_try) 2>&5
16189 ac_status=$?
16190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16191 (exit $ac_status); }; } &&
16192 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16194 (eval $ac_try) 2>&5
16195 ac_status=$?
16196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16197 (exit $ac_status); }; }; then
16198 ac_header_compiler=yes
16199else
16200 echo "$as_me: failed program was:" >&5
19650fd6
AS
16201sed 's/^/| /' conftest.$ac_ext >&5
16202
c0d27fcc
MR
16203ac_header_compiler=no
16204fi
35996d22 16205rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16206echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16207echo "${ECHO_T}$ac_header_compiler" >&6
16208
16209# Is the header present?
16210echo "$as_me:$LINENO: checking $ac_header presence" >&5
16211echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16212cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16213/* confdefs.h. */
16214_ACEOF
16215cat confdefs.h >>conftest.$ac_ext
16216cat >>conftest.$ac_ext <<_ACEOF
16217/* end confdefs.h. */
2c9dccc9
PJ
16218#include <$ac_header>
16219_ACEOF
c0d27fcc 16220if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
16221 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16222 ac_status=$?
6bae0ccf 16223 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
16224 rm -f conftest.er1
16225 cat conftest.err >&5
c0d27fcc 16226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
16227 (exit $ac_status); } >/dev/null; then
16228 if test -s conftest.err; then
16229 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 16230 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2c9dccc9
PJ
16231 else
16232 ac_cpp_err=
16233 fi
16234else
16235 ac_cpp_err=yes
16236fi
16237if test -z "$ac_cpp_err"; then
c0d27fcc
MR
16238 ac_header_preproc=yes
16239else
16240 echo "$as_me: failed program was:" >&5
19650fd6
AS
16241sed 's/^/| /' conftest.$ac_ext >&5
16242
c0d27fcc
MR
16243 ac_header_preproc=no
16244fi
16245rm -f conftest.err conftest.$ac_ext
16246echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16247echo "${ECHO_T}$ac_header_preproc" >&6
16248
16249# So? What about this header?
35996d22
AS
16250case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16251 yes:no: )
c0d27fcc
MR
16252 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16253echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16254 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16255echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16256 ac_header_preproc=yes
19650fd6 16257 ;;
35996d22 16258 no:yes:* )
c0d27fcc
MR
16259 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16260echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
16261 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16262echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16263 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16264echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16265 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16266echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16267 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16268echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16269 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16270echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16271 (
16272 cat <<\_ASBOX
35996d22
AS
16273## ------------------------------------------ ##
16274## Report this to the AC_PACKAGE_NAME lists. ##
16275## ------------------------------------------ ##
19650fd6
AS
16276_ASBOX
16277 ) |
16278 sed "s/^/$as_me: WARNING: /" >&2
16279 ;;
c0d27fcc
MR
16280esac
16281echo "$as_me:$LINENO: checking for $ac_header" >&5
16282echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16283if eval "test \"\${$as_ac_Header+set}\" = set"; then
16284 echo $ECHO_N "(cached) $ECHO_C" >&6
16285else
35996d22 16286 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc
MR
16287fi
16288echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16289echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16290
16291fi
16292if test `eval echo '${'$as_ac_Header'}'` = yes; then
16293 cat >>confdefs.h <<_ACEOF
16294#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16295_ACEOF
16296
16297fi
16298
16299done
16300
16301fi
16302
16303
16304for ac_header in nlist.h
16305do
16306as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16307if eval "test \"\${$as_ac_Header+set}\" = set"; then
16308 echo "$as_me:$LINENO: checking for $ac_header" >&5
16309echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16310if eval "test \"\${$as_ac_Header+set}\" = set"; then
16311 echo $ECHO_N "(cached) $ECHO_C" >&6
16312fi
16313echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16314echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16315else
16316 # Is the header compilable?
16317echo "$as_me:$LINENO: checking $ac_header usability" >&5
16318echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16319cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16320/* confdefs.h. */
16321_ACEOF
16322cat confdefs.h >>conftest.$ac_ext
16323cat >>conftest.$ac_ext <<_ACEOF
16324/* end confdefs.h. */
c0d27fcc
MR
16325$ac_includes_default
16326#include <$ac_header>
16327_ACEOF
16328rm -f conftest.$ac_objext
16329if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16330 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16331 ac_status=$?
35996d22
AS
16332 grep -v '^ *+' conftest.er1 >conftest.err
16333 rm -f conftest.er1
16334 cat conftest.err >&5
c0d27fcc
MR
16335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16336 (exit $ac_status); } &&
4494a266
JD
16337 { ac_try='test -z "$ac_c_werror_flag"
16338 || test ! -s conftest.err'
35996d22
AS
16339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16340 (eval $ac_try) 2>&5
16341 ac_status=$?
16342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16343 (exit $ac_status); }; } &&
16344 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16346 (eval $ac_try) 2>&5
16347 ac_status=$?
16348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16349 (exit $ac_status); }; }; then
16350 ac_header_compiler=yes
2c9dccc9
PJ
16351else
16352 echo "$as_me: failed program was:" >&5
19650fd6
AS
16353sed 's/^/| /' conftest.$ac_ext >&5
16354
c0d27fcc 16355ac_header_compiler=no
98418dba 16356fi
35996d22 16357rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16358echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16359echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 16360
c0d27fcc
MR
16361# Is the header present?
16362echo "$as_me:$LINENO: checking $ac_header presence" >&5
16363echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16364cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16365/* confdefs.h. */
16366_ACEOF
16367cat confdefs.h >>conftest.$ac_ext
16368cat >>conftest.$ac_ext <<_ACEOF
16369/* end confdefs.h. */
503d2be0
AS
16370#include <$ac_header>
16371_ACEOF
c0d27fcc 16372if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16373 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16374 ac_status=$?
6bae0ccf 16375 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16376 rm -f conftest.er1
16377 cat conftest.err >&5
c0d27fcc 16378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16379 (exit $ac_status); } >/dev/null; then
16380 if test -s conftest.err; then
16381 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 16382 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16383 else
16384 ac_cpp_err=
16385 fi
16386else
16387 ac_cpp_err=yes
16388fi
16389if test -z "$ac_cpp_err"; then
c0d27fcc 16390 ac_header_preproc=yes
503d2be0
AS
16391else
16392 echo "$as_me: failed program was:" >&5
19650fd6
AS
16393sed 's/^/| /' conftest.$ac_ext >&5
16394
c0d27fcc 16395 ac_header_preproc=no
b5de8dc0 16396fi
503d2be0 16397rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16398echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16399echo "${ECHO_T}$ac_header_preproc" >&6
16400
16401# So? What about this header?
35996d22
AS
16402case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16403 yes:no: )
c0d27fcc
MR
16404 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16405echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16406 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16407echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16408 ac_header_preproc=yes
19650fd6 16409 ;;
35996d22 16410 no:yes:* )
c0d27fcc
MR
16411 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16412echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
16413 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16414echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16415 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16416echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16417 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16418echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16419 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16420echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16421 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16422echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16423 (
16424 cat <<\_ASBOX
35996d22
AS
16425## ------------------------------------------ ##
16426## Report this to the AC_PACKAGE_NAME lists. ##
16427## ------------------------------------------ ##
19650fd6
AS
16428_ASBOX
16429 ) |
16430 sed "s/^/$as_me: WARNING: /" >&2
16431 ;;
c0d27fcc
MR
16432esac
16433echo "$as_me:$LINENO: checking for $ac_header" >&5
16434echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16435if eval "test \"\${$as_ac_Header+set}\" = set"; then
16436 echo $ECHO_N "(cached) $ECHO_C" >&6
16437else
35996d22 16438 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 16439fi
c0d27fcc 16440echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16441echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16442
16443fi
98418dba 16444if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16445 cat >>confdefs.h <<_ACEOF
98418dba 16446#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
16447_ACEOF
16448 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
16449echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
16450if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 16451 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 16452else
503d2be0 16453 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16454/* confdefs.h. */
16455_ACEOF
16456cat confdefs.h >>conftest.$ac_ext
16457cat >>conftest.$ac_ext <<_ACEOF
16458/* end confdefs.h. */
98418dba 16459#include <nlist.h>
b5de8dc0 16460
503d2be0
AS
16461int
16462main ()
16463{
98418dba
CW
16464static struct nlist ac_aggr;
16465if (ac_aggr.n_un.n_name)
16466return 0;
503d2be0
AS
16467 ;
16468 return 0;
16469}
16470_ACEOF
98418dba 16471rm -f conftest.$ac_objext
c0d27fcc 16472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16473 (eval $ac_compile) 2>conftest.er1
503d2be0 16474 ac_status=$?
35996d22
AS
16475 grep -v '^ *+' conftest.er1 >conftest.err
16476 rm -f conftest.er1
16477 cat conftest.err >&5
c0d27fcc 16478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16479 (exit $ac_status); } &&
4494a266
JD
16480 { ac_try='test -z "$ac_c_werror_flag"
16481 || test ! -s conftest.err'
35996d22
AS
16482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16483 (eval $ac_try) 2>&5
16484 ac_status=$?
16485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16486 (exit $ac_status); }; } &&
16487 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16489 (eval $ac_try) 2>&5
16490 ac_status=$?
c0d27fcc 16491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16492 (exit $ac_status); }; }; then
98418dba 16493 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
16494else
16495 echo "$as_me: failed program was:" >&5
19650fd6
AS
16496sed 's/^/| /' conftest.$ac_ext >&5
16497
6bae0ccf 16498cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16499/* confdefs.h. */
16500_ACEOF
16501cat confdefs.h >>conftest.$ac_ext
16502cat >>conftest.$ac_ext <<_ACEOF
16503/* end confdefs.h. */
6bae0ccf
DL
16504#include <nlist.h>
16505
16506int
16507main ()
16508{
16509static struct nlist ac_aggr;
16510if (sizeof ac_aggr.n_un.n_name)
16511return 0;
16512 ;
16513 return 0;
16514}
16515_ACEOF
16516rm -f conftest.$ac_objext
16517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16518 (eval $ac_compile) 2>conftest.er1
6bae0ccf 16519 ac_status=$?
35996d22
AS
16520 grep -v '^ *+' conftest.er1 >conftest.err
16521 rm -f conftest.er1
16522 cat conftest.err >&5
6bae0ccf
DL
16523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16524 (exit $ac_status); } &&
4494a266
JD
16525 { ac_try='test -z "$ac_c_werror_flag"
16526 || test ! -s conftest.err'
35996d22
AS
16527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16528 (eval $ac_try) 2>&5
16529 ac_status=$?
16530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16531 (exit $ac_status); }; } &&
16532 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
16533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16534 (eval $ac_try) 2>&5
16535 ac_status=$?
16536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16537 (exit $ac_status); }; }; then
16538 ac_cv_member_struct_nlist_n_un_n_name=yes
16539else
16540 echo "$as_me: failed program was:" >&5
19650fd6
AS
16541sed 's/^/| /' conftest.$ac_ext >&5
16542
98418dba 16543ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 16544fi
35996d22 16545rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 16546fi
35996d22 16547rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 16548fi
c0d27fcc 16549echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
16550echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
16551if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 16552
c0d27fcc 16553cat >>confdefs.h <<_ACEOF
98418dba 16554#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 16555_ACEOF
b5de8dc0 16556
c0d27fcc
MR
16557
16558cat >>confdefs.h <<\_ACEOF
98418dba 16559#define NLIST_NAME_UNION 1
c0d27fcc 16560_ACEOF
b5de8dc0 16561
98418dba 16562fi
b5de8dc0 16563
c0d27fcc 16564
98418dba 16565fi
c0d27fcc 16566
98418dba 16567done
b5de8dc0 16568
98418dba
CW
16569fi
16570done
b5de8dc0 16571
c0d27fcc 16572
98418dba 16573# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 16574echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
16575echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
16576if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
16577 echo $ECHO_N "(cached) $ECHO_C" >&6
16578else
16579 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16580/* confdefs.h. */
16581_ACEOF
16582cat confdefs.h >>conftest.$ac_ext
16583cat >>conftest.$ac_ext <<_ACEOF
16584/* end confdefs.h. */
6bae0ccf 16585#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
16586#ifdef LDAV_PRIVILEGED
16587Yowza Am I SETGID yet
16588#endif
16589_ACEOF
16590if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 16591 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
16592 ac_cv_func_getloadavg_setgid=yes
16593else
16594 ac_cv_func_getloadavg_setgid=no
16595fi
16596rm -f conftest*
b5de8dc0 16597
98418dba 16598fi
c0d27fcc 16599echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
16600echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
16601if test $ac_cv_func_getloadavg_setgid = yes; then
16602 NEED_SETGID=true
b5de8dc0 16603
c0d27fcc 16604cat >>confdefs.h <<\_ACEOF
98418dba 16605#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 16606_ACEOF
98418dba 16607
b5de8dc0 16608else
98418dba 16609 NEED_SETGID=false
b5de8dc0 16610fi
98418dba
CW
16611
16612if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 16613 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
16614echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
16615if test "${ac_cv_group_kmem+set}" = set; then
16616 echo $ECHO_N "(cached) $ECHO_C" >&6
16617else
16618 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
16619 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
16620 # If we got an error (system does not support symlinks), try without -L.
16621 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
16622 ac_cv_group_kmem=`echo $ac_ls_output \
35996d22 16623 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
16624 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
16625 / /s/.* //;p;'`
16626
b5de8dc0 16627fi
c0d27fcc 16628echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
16629echo "${ECHO_T}$ac_cv_group_kmem" >&6
16630 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 16631fi
98418dba
CW
16632if test "x$ac_save_LIBS" = x; then
16633 GETLOADAVG_LIBS=$LIBS
16634else
16635 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 16636fi
98418dba 16637LIBS=$ac_save_LIBS
b5de8dc0 16638
c0d27fcc
MR
16639
16640
16641echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
16642echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16643if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 16644 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 16645else
b936fae4
AS
16646 while :; do
16647 ac_cv_sys_largefile_source=no
503d2be0 16648 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16649/* confdefs.h. */
16650_ACEOF
16651cat confdefs.h >>conftest.$ac_ext
16652cat >>conftest.$ac_ext <<_ACEOF
16653/* end confdefs.h. */
b936fae4 16654#include <stdio.h>
503d2be0
AS
16655int
16656main ()
16657{
b936fae4
AS
16658return !fseeko;
16659 ;
16660 return 0;
16661}
16662_ACEOF
16663rm -f conftest.$ac_objext
c0d27fcc 16664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16665 (eval $ac_compile) 2>conftest.er1
b936fae4 16666 ac_status=$?
35996d22
AS
16667 grep -v '^ *+' conftest.er1 >conftest.err
16668 rm -f conftest.er1
16669 cat conftest.err >&5
c0d27fcc 16670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 16671 (exit $ac_status); } &&
4494a266
JD
16672 { ac_try='test -z "$ac_c_werror_flag"
16673 || test ! -s conftest.err'
35996d22
AS
16674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16675 (eval $ac_try) 2>&5
16676 ac_status=$?
16677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16678 (exit $ac_status); }; } &&
16679 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
16681 (eval $ac_try) 2>&5
16682 ac_status=$?
c0d27fcc 16683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
16684 (exit $ac_status); }; }; then
16685 break
16686else
16687 echo "$as_me: failed program was:" >&5
19650fd6
AS
16688sed 's/^/| /' conftest.$ac_ext >&5
16689
b936fae4 16690fi
35996d22 16691rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4 16692 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16693/* confdefs.h. */
16694_ACEOF
16695cat confdefs.h >>conftest.$ac_ext
16696cat >>conftest.$ac_ext <<_ACEOF
16697/* end confdefs.h. */
b936fae4
AS
16698#define _LARGEFILE_SOURCE 1
16699#include <stdio.h>
b936fae4
AS
16700int
16701main ()
16702{
16703return !fseeko;
16704 ;
16705 return 0;
16706}
16707_ACEOF
16708rm -f conftest.$ac_objext
c0d27fcc 16709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16710 (eval $ac_compile) 2>conftest.er1
b936fae4 16711 ac_status=$?
35996d22
AS
16712 grep -v '^ *+' conftest.er1 >conftest.err
16713 rm -f conftest.er1
16714 cat conftest.err >&5
c0d27fcc 16715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 16716 (exit $ac_status); } &&
4494a266
JD
16717 { ac_try='test -z "$ac_c_werror_flag"
16718 || test ! -s conftest.err'
35996d22
AS
16719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16720 (eval $ac_try) 2>&5
16721 ac_status=$?
16722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16723 (exit $ac_status); }; } &&
16724 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
16726 (eval $ac_try) 2>&5
16727 ac_status=$?
c0d27fcc 16728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
16729 (exit $ac_status); }; }; then
16730 ac_cv_sys_largefile_source=1; break
16731else
16732 echo "$as_me: failed program was:" >&5
19650fd6
AS
16733sed 's/^/| /' conftest.$ac_ext >&5
16734
b936fae4 16735fi
35996d22 16736rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4
AS
16737 break
16738done
16739fi
c0d27fcc 16740echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
16741echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16742if test "$ac_cv_sys_largefile_source" != no; then
16743
c0d27fcc 16744cat >>confdefs.h <<_ACEOF
b936fae4 16745#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 16746_ACEOF
b936fae4
AS
16747
16748fi
16749rm -f conftest*
4c343001 16750
b936fae4
AS
16751# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16752# in glibc 2.1.3, but that breaks too many other things.
16753# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 16754echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
16755echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16756if test "${ac_cv_func_fseeko+set}" = set; then
16757 echo $ECHO_N "(cached) $ECHO_C" >&6
16758else
16759 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16760/* confdefs.h. */
16761_ACEOF
16762cat confdefs.h >>conftest.$ac_ext
16763cat >>conftest.$ac_ext <<_ACEOF
16764/* end confdefs.h. */
b936fae4 16765#include <stdio.h>
b936fae4
AS
16766int
16767main ()
16768{
16769return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
16770 ;
16771 return 0;
16772}
16773_ACEOF
16774rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16775if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16776 (eval $ac_link) 2>conftest.er1
503d2be0 16777 ac_status=$?
35996d22
AS
16778 grep -v '^ *+' conftest.er1 >conftest.err
16779 rm -f conftest.er1
16780 cat conftest.err >&5
c0d27fcc 16781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16782 (exit $ac_status); } &&
4494a266
JD
16783 { ac_try='test -z "$ac_c_werror_flag"
16784 || test ! -s conftest.err'
35996d22
AS
16785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16786 (eval $ac_try) 2>&5
16787 ac_status=$?
16788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16789 (exit $ac_status); }; } &&
16790 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16792 (eval $ac_try) 2>&5
16793 ac_status=$?
c0d27fcc 16794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16795 (exit $ac_status); }; }; then
b936fae4 16796 ac_cv_func_fseeko=yes
503d2be0
AS
16797else
16798 echo "$as_me: failed program was:" >&5
19650fd6
AS
16799sed 's/^/| /' conftest.$ac_ext >&5
16800
b936fae4 16801ac_cv_func_fseeko=no
503d2be0 16802fi
35996d22
AS
16803rm -f conftest.err conftest.$ac_objext \
16804 conftest$ac_exeext conftest.$ac_ext
503d2be0 16805fi
c0d27fcc 16806echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
16807echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16808if test $ac_cv_func_fseeko = yes; then
16809
c0d27fcc 16810cat >>confdefs.h <<\_ACEOF
b936fae4 16811#define HAVE_FSEEKO 1
c0d27fcc 16812_ACEOF
b936fae4 16813
4c343001
DL
16814fi
16815
c0d27fcc 16816
cd958eb3
MB
16817echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
16818echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
16819if test "${ac_cv_func_getpgrp_void+set}" = set; then
16820 echo $ECHO_N "(cached) $ECHO_C" >&6
16821else
16822 # Use it with a single arg.
16823cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16824/* confdefs.h. */
16825_ACEOF
16826cat confdefs.h >>conftest.$ac_ext
16827cat >>conftest.$ac_ext <<_ACEOF
16828/* end confdefs.h. */
cd958eb3
MB
16829$ac_includes_default
16830int
16831main ()
16832{
16833getpgrp (0);
16834 ;
16835 return 0;
16836}
16837_ACEOF
16838rm -f conftest.$ac_objext
16839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16840 (eval $ac_compile) 2>conftest.er1
cd958eb3 16841 ac_status=$?
35996d22
AS
16842 grep -v '^ *+' conftest.er1 >conftest.err
16843 rm -f conftest.er1
16844 cat conftest.err >&5
cd958eb3
MB
16845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16846 (exit $ac_status); } &&
4494a266
JD
16847 { ac_try='test -z "$ac_c_werror_flag"
16848 || test ! -s conftest.err'
35996d22
AS
16849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16850 (eval $ac_try) 2>&5
16851 ac_status=$?
16852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16853 (exit $ac_status); }; } &&
16854 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
16855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16856 (eval $ac_try) 2>&5
16857 ac_status=$?
16858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16859 (exit $ac_status); }; }; then
16860 ac_cv_func_getpgrp_void=no
16861else
16862 echo "$as_me: failed program was:" >&5
19650fd6
AS
16863sed 's/^/| /' conftest.$ac_ext >&5
16864
cd958eb3
MB
16865ac_cv_func_getpgrp_void=yes
16866fi
35996d22 16867rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
16868
16869fi
16870echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
16871echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
16872if test $ac_cv_func_getpgrp_void = yes; then
16873
16874cat >>confdefs.h <<\_ACEOF
16875#define GETPGRP_VOID 1
16876_ACEOF
16877
16878fi
16879
16880
973a76b1
DL
16881
16882for ac_func in strftime
16883do
16884as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16885echo "$as_me:$LINENO: checking for $ac_func" >&5
16886echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16887if eval "test \"\${$as_ac_var+set}\" = set"; then
16888 echo $ECHO_N "(cached) $ECHO_C" >&6
16889else
16890 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16891/* confdefs.h. */
16892_ACEOF
16893cat confdefs.h >>conftest.$ac_ext
16894cat >>conftest.$ac_ext <<_ACEOF
16895/* end confdefs.h. */
35996d22
AS
16896/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16897 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16898#define $ac_func innocuous_$ac_func
16899
973a76b1 16900/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16901 which can conflict with char $ac_func (); below.
16902 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16903 <limits.h> exists even on freestanding compilers. */
35996d22 16904
19650fd6
AS
16905#ifdef __STDC__
16906# include <limits.h>
16907#else
16908# include <assert.h>
16909#endif
35996d22
AS
16910
16911#undef $ac_func
16912
973a76b1
DL
16913/* Override any gcc2 internal prototype to avoid an error. */
16914#ifdef __cplusplus
16915extern "C"
19650fd6 16916{
973a76b1
DL
16917#endif
16918/* We use char because int might match the return type of a gcc2
16919 builtin and then its argument prototype would still apply. */
16920char $ac_func ();
16921/* The GNU C library defines this for functions which it implements
16922 to always fail with ENOSYS. Some functions are actually named
16923 something starting with __ and the normal name is an alias. */
16924#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16925choke me
16926#else
19650fd6
AS
16927char (*f) () = $ac_func;
16928#endif
16929#ifdef __cplusplus
16930}
973a76b1
DL
16931#endif
16932
19650fd6
AS
16933int
16934main ()
16935{
16936return f != $ac_func;
973a76b1
DL
16937 ;
16938 return 0;
16939}
16940_ACEOF
16941rm -f conftest.$ac_objext conftest$ac_exeext
16942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16943 (eval $ac_link) 2>conftest.er1
973a76b1 16944 ac_status=$?
35996d22
AS
16945 grep -v '^ *+' conftest.er1 >conftest.err
16946 rm -f conftest.er1
16947 cat conftest.err >&5
973a76b1
DL
16948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16949 (exit $ac_status); } &&
4494a266
JD
16950 { ac_try='test -z "$ac_c_werror_flag"
16951 || test ! -s conftest.err'
35996d22
AS
16952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16953 (eval $ac_try) 2>&5
16954 ac_status=$?
16955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16956 (exit $ac_status); }; } &&
16957 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
16958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16959 (eval $ac_try) 2>&5
16960 ac_status=$?
16961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16962 (exit $ac_status); }; }; then
16963 eval "$as_ac_var=yes"
16964else
16965 echo "$as_me: failed program was:" >&5
19650fd6
AS
16966sed 's/^/| /' conftest.$ac_ext >&5
16967
973a76b1
DL
16968eval "$as_ac_var=no"
16969fi
35996d22
AS
16970rm -f conftest.err conftest.$ac_objext \
16971 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
16972fi
16973echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16974echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16975if test `eval echo '${'$as_ac_var'}'` = yes; then
16976 cat >>confdefs.h <<_ACEOF
16977#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16978_ACEOF
16979
16980else
16981 # strftime is in -lintl on SCO UNIX.
16982echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
16983echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
16984if test "${ac_cv_lib_intl_strftime+set}" = set; then
16985 echo $ECHO_N "(cached) $ECHO_C" >&6
16986else
16987 ac_check_lib_save_LIBS=$LIBS
16988LIBS="-lintl $LIBS"
16989cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16990/* confdefs.h. */
16991_ACEOF
16992cat confdefs.h >>conftest.$ac_ext
16993cat >>conftest.$ac_ext <<_ACEOF
16994/* end confdefs.h. */
973a76b1
DL
16995
16996/* Override any gcc2 internal prototype to avoid an error. */
16997#ifdef __cplusplus
16998extern "C"
16999#endif
17000/* We use char because int might match the return type of a gcc2
17001 builtin and then its argument prototype would still apply. */
17002char strftime ();
17003int
17004main ()
17005{
17006strftime ();
17007 ;
17008 return 0;
17009}
17010_ACEOF
17011rm -f conftest.$ac_objext conftest$ac_exeext
17012if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17013 (eval $ac_link) 2>conftest.er1
973a76b1 17014 ac_status=$?
35996d22
AS
17015 grep -v '^ *+' conftest.er1 >conftest.err
17016 rm -f conftest.er1
17017 cat conftest.err >&5
973a76b1
DL
17018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17019 (exit $ac_status); } &&
4494a266
JD
17020 { ac_try='test -z "$ac_c_werror_flag"
17021 || test ! -s conftest.err'
35996d22
AS
17022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17023 (eval $ac_try) 2>&5
17024 ac_status=$?
17025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17026 (exit $ac_status); }; } &&
17027 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
17028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17029 (eval $ac_try) 2>&5
17030 ac_status=$?
17031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17032 (exit $ac_status); }; }; then
17033 ac_cv_lib_intl_strftime=yes
17034else
17035 echo "$as_me: failed program was:" >&5
19650fd6
AS
17036sed 's/^/| /' conftest.$ac_ext >&5
17037
973a76b1
DL
17038ac_cv_lib_intl_strftime=no
17039fi
35996d22
AS
17040rm -f conftest.err conftest.$ac_objext \
17041 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
17042LIBS=$ac_check_lib_save_LIBS
17043fi
17044echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
17045echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
17046if test $ac_cv_lib_intl_strftime = yes; then
17047 cat >>confdefs.h <<\_ACEOF
17048#define HAVE_STRFTIME 1
17049_ACEOF
17050
17051LIBS="-lintl $LIBS"
17052fi
17053
17054fi
17055done
17056
17057
b936fae4
AS
17058# UNIX98 PTYs.
17059
17060for ac_func in grantpt
503d2be0
AS
17061do
17062as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 17063echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
17064echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17065if eval "test \"\${$as_ac_var+set}\" = set"; then
17066 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17067else
503d2be0 17068 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17069/* confdefs.h. */
17070_ACEOF
17071cat confdefs.h >>conftest.$ac_ext
17072cat >>conftest.$ac_ext <<_ACEOF
17073/* end confdefs.h. */
35996d22
AS
17074/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17075 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17076#define $ac_func innocuous_$ac_func
17077
503d2be0 17078/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17079 which can conflict with char $ac_func (); below.
17080 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17081 <limits.h> exists even on freestanding compilers. */
35996d22 17082
19650fd6
AS
17083#ifdef __STDC__
17084# include <limits.h>
17085#else
17086# include <assert.h>
17087#endif
35996d22
AS
17088
17089#undef $ac_func
17090
4c343001 17091/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17092#ifdef __cplusplus
17093extern "C"
19650fd6 17094{
503d2be0 17095#endif
4c343001 17096/* We use char because int might match the return type of a gcc2
503d2be0
AS
17097 builtin and then its argument prototype would still apply. */
17098char $ac_func ();
503d2be0
AS
17099/* The GNU C library defines this for functions which it implements
17100 to always fail with ENOSYS. Some functions are actually named
17101 something starting with __ and the normal name is an alias. */
17102#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17103choke me
17104#else
19650fd6
AS
17105char (*f) () = $ac_func;
17106#endif
17107#ifdef __cplusplus
17108}
503d2be0 17109#endif
4c343001 17110
19650fd6
AS
17111int
17112main ()
17113{
17114return f != $ac_func;
503d2be0
AS
17115 ;
17116 return 0;
17117}
17118_ACEOF
17119rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17120if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17121 (eval $ac_link) 2>conftest.er1
503d2be0 17122 ac_status=$?
35996d22
AS
17123 grep -v '^ *+' conftest.er1 >conftest.err
17124 rm -f conftest.er1
17125 cat conftest.err >&5
c0d27fcc 17126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17127 (exit $ac_status); } &&
4494a266
JD
17128 { ac_try='test -z "$ac_c_werror_flag"
17129 || test ! -s conftest.err'
35996d22
AS
17130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17131 (eval $ac_try) 2>&5
17132 ac_status=$?
17133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17134 (exit $ac_status); }; } &&
17135 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17137 (eval $ac_try) 2>&5
17138 ac_status=$?
c0d27fcc 17139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17140 (exit $ac_status); }; }; then
17141 eval "$as_ac_var=yes"
17142else
17143 echo "$as_me: failed program was:" >&5
19650fd6
AS
17144sed 's/^/| /' conftest.$ac_ext >&5
17145
503d2be0
AS
17146eval "$as_ac_var=no"
17147fi
35996d22
AS
17148rm -f conftest.err conftest.$ac_objext \
17149 conftest$ac_exeext conftest.$ac_ext
503d2be0 17150fi
c0d27fcc 17151echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17152echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17153if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17154 cat >>confdefs.h <<_ACEOF
503d2be0 17155#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17156_ACEOF
4c343001
DL
17157
17158fi
503d2be0
AS
17159done
17160
c0d27fcc 17161
b936fae4 17162# PTY-related GNU extensions.
4c343001 17163
b936fae4
AS
17164for ac_func in getpt
17165do
17166as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 17167echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
17168echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17169if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 17170 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17171else
b936fae4 17172 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17173/* confdefs.h. */
17174_ACEOF
17175cat confdefs.h >>conftest.$ac_ext
17176cat >>conftest.$ac_ext <<_ACEOF
17177/* end confdefs.h. */
35996d22
AS
17178/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17180#define $ac_func innocuous_$ac_func
17181
087121cc 17182/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17183 which can conflict with char $ac_func (); below.
17184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17185 <limits.h> exists even on freestanding compilers. */
35996d22 17186
19650fd6
AS
17187#ifdef __STDC__
17188# include <limits.h>
17189#else
17190# include <assert.h>
17191#endif
35996d22
AS
17192
17193#undef $ac_func
17194
087121cc 17195/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17196#ifdef __cplusplus
17197extern "C"
19650fd6 17198{
503d2be0 17199#endif
087121cc 17200/* We use char because int might match the return type of a gcc2
503d2be0
AS
17201 builtin and then its argument prototype would still apply. */
17202char $ac_func ();
087121cc
GM
17203/* The GNU C library defines this for functions which it implements
17204 to always fail with ENOSYS. Some functions are actually named
17205 something starting with __ and the normal name is an alias. */
17206#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17207choke me
17208#else
19650fd6
AS
17209char (*f) () = $ac_func;
17210#endif
17211#ifdef __cplusplus
17212}
087121cc
GM
17213#endif
17214
19650fd6
AS
17215int
17216main ()
17217{
17218return f != $ac_func;
503d2be0
AS
17219 ;
17220 return 0;
17221}
17222_ACEOF
17223rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17224if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17225 (eval $ac_link) 2>conftest.er1
503d2be0 17226 ac_status=$?
35996d22
AS
17227 grep -v '^ *+' conftest.er1 >conftest.err
17228 rm -f conftest.er1
17229 cat conftest.err >&5
c0d27fcc 17230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17231 (exit $ac_status); } &&
4494a266
JD
17232 { ac_try='test -z "$ac_c_werror_flag"
17233 || test ! -s conftest.err'
35996d22
AS
17234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17235 (eval $ac_try) 2>&5
17236 ac_status=$?
17237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17238 (exit $ac_status); }; } &&
17239 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17241 (eval $ac_try) 2>&5
17242 ac_status=$?
c0d27fcc 17243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17244 (exit $ac_status); }; }; then
17245 eval "$as_ac_var=yes"
17246else
17247 echo "$as_me: failed program was:" >&5
19650fd6
AS
17248sed 's/^/| /' conftest.$ac_ext >&5
17249
503d2be0
AS
17250eval "$as_ac_var=no"
17251fi
35996d22
AS
17252rm -f conftest.err conftest.$ac_objext \
17253 conftest$ac_exeext conftest.$ac_ext
503d2be0 17254fi
c0d27fcc 17255echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17256echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17257if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17258 cat >>confdefs.h <<_ACEOF
503d2be0 17259#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17260_ACEOF
087121cc 17261
087121cc
GM
17262fi
17263done
17264
c0d27fcc 17265
ba4481b5
DL
17266# Check this now, so that we will NOT find the above functions in ncurses.
17267# That is because we have not set up to link ncurses in lib-src.
17268# It's better to believe a function is not available
17269# than to expect to find it in ncurses.
503d2be0 17270
c0d27fcc 17271echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
17272echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
17273if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
17274 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17275else
503d2be0 17276 ac_check_lib_save_LIBS=$LIBS
ba4481b5 17277LIBS="-lncurses $LIBS"
503d2be0 17278cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17279/* confdefs.h. */
17280_ACEOF
17281cat confdefs.h >>conftest.$ac_ext
17282cat >>conftest.$ac_ext <<_ACEOF
17283/* end confdefs.h. */
503d2be0 17284
ba4481b5 17285/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17286#ifdef __cplusplus
17287extern "C"
17288#endif
ba4481b5 17289/* We use char because int might match the return type of a gcc2
503d2be0
AS
17290 builtin and then its argument prototype would still apply. */
17291char tparm ();
17292int
17293main ()
17294{
17295tparm ();
17296 ;
17297 return 0;
17298}
17299_ACEOF
17300rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17301if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17302 (eval $ac_link) 2>conftest.er1
503d2be0 17303 ac_status=$?
35996d22
AS
17304 grep -v '^ *+' conftest.er1 >conftest.err
17305 rm -f conftest.er1
17306 cat conftest.err >&5
c0d27fcc 17307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17308 (exit $ac_status); } &&
4494a266
JD
17309 { ac_try='test -z "$ac_c_werror_flag"
17310 || test ! -s conftest.err'
35996d22
AS
17311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17312 (eval $ac_try) 2>&5
17313 ac_status=$?
17314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17315 (exit $ac_status); }; } &&
17316 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17318 (eval $ac_try) 2>&5
17319 ac_status=$?
c0d27fcc 17320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17321 (exit $ac_status); }; }; then
17322 ac_cv_lib_ncurses_tparm=yes
17323else
17324 echo "$as_me: failed program was:" >&5
19650fd6
AS
17325sed 's/^/| /' conftest.$ac_ext >&5
17326
503d2be0
AS
17327ac_cv_lib_ncurses_tparm=no
17328fi
35996d22
AS
17329rm -f conftest.err conftest.$ac_objext \
17330 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17331LIBS=$ac_check_lib_save_LIBS
17332fi
c0d27fcc 17333echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
17334echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
17335if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 17336 cat >>confdefs.h <<_ACEOF
503d2be0 17337#define HAVE_LIBNCURSES 1
c0d27fcc 17338_ACEOF
ba4481b5
DL
17339
17340 LIBS="-lncurses $LIBS"
17341
ba4481b5
DL
17342fi
17343
c0d27fcc 17344
84e70f78
KR
17345# Do we need the Hesiod library to provide the support routines?
17346if test "$with_hesiod" = yes ; then
17347 # Don't set $LIBS here -- see comments above.
17348 resolv=no
c0d27fcc 17349 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
17350echo $ECHO_N "checking for res_send... $ECHO_C" >&6
17351if test "${ac_cv_func_res_send+set}" = set; then
17352 echo $ECHO_N "(cached) $ECHO_C" >&6
17353else
17354 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17355/* confdefs.h. */
17356_ACEOF
17357cat confdefs.h >>conftest.$ac_ext
17358cat >>conftest.$ac_ext <<_ACEOF
17359/* end confdefs.h. */
35996d22
AS
17360/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
17361 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17362#define res_send innocuous_res_send
17363
84e70f78 17364/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17365 which can conflict with char res_send (); below.
17366 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17367 <limits.h> exists even on freestanding compilers. */
35996d22 17368
19650fd6
AS
17369#ifdef __STDC__
17370# include <limits.h>
17371#else
17372# include <assert.h>
17373#endif
35996d22
AS
17374
17375#undef res_send
17376
84e70f78
KR
17377/* Override any gcc2 internal prototype to avoid an error. */
17378#ifdef __cplusplus
17379extern "C"
19650fd6 17380{
84e70f78
KR
17381#endif
17382/* We use char because int might match the return type of a gcc2
17383 builtin and then its argument prototype would still apply. */
17384char res_send ();
84e70f78
KR
17385/* The GNU C library defines this for functions which it implements
17386 to always fail with ENOSYS. Some functions are actually named
17387 something starting with __ and the normal name is an alias. */
17388#if defined (__stub_res_send) || defined (__stub___res_send)
17389choke me
17390#else
19650fd6
AS
17391char (*f) () = res_send;
17392#endif
17393#ifdef __cplusplus
17394}
cd958eb3
MB
17395#endif
17396
19650fd6
AS
17397int
17398main ()
17399{
17400return f != res_send;
84e70f78
KR
17401 ;
17402 return 0;
17403}
17404_ACEOF
17405rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17406if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17407 (eval $ac_link) 2>conftest.er1
84e70f78 17408 ac_status=$?
35996d22
AS
17409 grep -v '^ *+' conftest.er1 >conftest.err
17410 rm -f conftest.er1
17411 cat conftest.err >&5
c0d27fcc 17412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17413 (exit $ac_status); } &&
4494a266
JD
17414 { ac_try='test -z "$ac_c_werror_flag"
17415 || test ! -s conftest.err'
35996d22
AS
17416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17417 (eval $ac_try) 2>&5
17418 ac_status=$?
17419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17420 (exit $ac_status); }; } &&
17421 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17423 (eval $ac_try) 2>&5
17424 ac_status=$?
c0d27fcc 17425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17426 (exit $ac_status); }; }; then
17427 ac_cv_func_res_send=yes
17428else
17429 echo "$as_me: failed program was:" >&5
19650fd6
AS
17430sed 's/^/| /' conftest.$ac_ext >&5
17431
84e70f78
KR
17432ac_cv_func_res_send=no
17433fi
35996d22
AS
17434rm -f conftest.err conftest.$ac_objext \
17435 conftest$ac_exeext conftest.$ac_ext
84e70f78 17436fi
c0d27fcc 17437echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
17438echo "${ECHO_T}$ac_cv_func_res_send" >&6
17439if test $ac_cv_func_res_send = yes; then
17440 :
17441else
c0d27fcc 17442 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
17443echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
17444if test "${ac_cv_func___res_send+set}" = set; then
17445 echo $ECHO_N "(cached) $ECHO_C" >&6
17446else
17447 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17448/* confdefs.h. */
17449_ACEOF
17450cat confdefs.h >>conftest.$ac_ext
17451cat >>conftest.$ac_ext <<_ACEOF
17452/* end confdefs.h. */
35996d22
AS
17453/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
17454 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17455#define __res_send innocuous___res_send
17456
84e70f78 17457/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17458 which can conflict with char __res_send (); below.
17459 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17460 <limits.h> exists even on freestanding compilers. */
35996d22 17461
19650fd6
AS
17462#ifdef __STDC__
17463# include <limits.h>
17464#else
17465# include <assert.h>
17466#endif
35996d22
AS
17467
17468#undef __res_send
17469
84e70f78
KR
17470/* Override any gcc2 internal prototype to avoid an error. */
17471#ifdef __cplusplus
17472extern "C"
19650fd6 17473{
84e70f78
KR
17474#endif
17475/* We use char because int might match the return type of a gcc2
17476 builtin and then its argument prototype would still apply. */
17477char __res_send ();
84e70f78
KR
17478/* The GNU C library defines this for functions which it implements
17479 to always fail with ENOSYS. Some functions are actually named
17480 something starting with __ and the normal name is an alias. */
17481#if defined (__stub___res_send) || defined (__stub_____res_send)
17482choke me
17483#else
19650fd6
AS
17484char (*f) () = __res_send;
17485#endif
17486#ifdef __cplusplus
17487}
84e70f78
KR
17488#endif
17489
19650fd6
AS
17490int
17491main ()
17492{
17493return f != __res_send;
84e70f78
KR
17494 ;
17495 return 0;
17496}
17497_ACEOF
17498rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17499if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17500 (eval $ac_link) 2>conftest.er1
84e70f78 17501 ac_status=$?
35996d22
AS
17502 grep -v '^ *+' conftest.er1 >conftest.err
17503 rm -f conftest.er1
17504 cat conftest.err >&5
c0d27fcc 17505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17506 (exit $ac_status); } &&
4494a266
JD
17507 { ac_try='test -z "$ac_c_werror_flag"
17508 || test ! -s conftest.err'
35996d22
AS
17509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17510 (eval $ac_try) 2>&5
17511 ac_status=$?
17512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17513 (exit $ac_status); }; } &&
17514 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17516 (eval $ac_try) 2>&5
17517 ac_status=$?
c0d27fcc 17518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17519 (exit $ac_status); }; }; then
17520 ac_cv_func___res_send=yes
17521else
17522 echo "$as_me: failed program was:" >&5
19650fd6
AS
17523sed 's/^/| /' conftest.$ac_ext >&5
17524
84e70f78
KR
17525ac_cv_func___res_send=no
17526fi
35996d22
AS
17527rm -f conftest.err conftest.$ac_objext \
17528 conftest$ac_exeext conftest.$ac_ext
84e70f78 17529fi
c0d27fcc 17530echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
17531echo "${ECHO_T}$ac_cv_func___res_send" >&6
17532if test $ac_cv_func___res_send = yes; then
17533 :
17534else
c0d27fcc 17535 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
17536echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
17537if test "${ac_cv_lib_resolv_res_send+set}" = set; then
17538 echo $ECHO_N "(cached) $ECHO_C" >&6
17539else
17540 ac_check_lib_save_LIBS=$LIBS
17541LIBS="-lresolv $LIBS"
17542cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17543/* confdefs.h. */
17544_ACEOF
17545cat confdefs.h >>conftest.$ac_ext
17546cat >>conftest.$ac_ext <<_ACEOF
17547/* end confdefs.h. */
84e70f78
KR
17548
17549/* Override any gcc2 internal prototype to avoid an error. */
17550#ifdef __cplusplus
17551extern "C"
17552#endif
17553/* We use char because int might match the return type of a gcc2
17554 builtin and then its argument prototype would still apply. */
17555char res_send ();
17556int
17557main ()
17558{
17559res_send ();
17560 ;
17561 return 0;
17562}
17563_ACEOF
17564rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17565if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17566 (eval $ac_link) 2>conftest.er1
84e70f78 17567 ac_status=$?
35996d22
AS
17568 grep -v '^ *+' conftest.er1 >conftest.err
17569 rm -f conftest.er1
17570 cat conftest.err >&5
c0d27fcc 17571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17572 (exit $ac_status); } &&
4494a266
JD
17573 { ac_try='test -z "$ac_c_werror_flag"
17574 || test ! -s conftest.err'
35996d22
AS
17575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17576 (eval $ac_try) 2>&5
17577 ac_status=$?
17578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17579 (exit $ac_status); }; } &&
17580 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17582 (eval $ac_try) 2>&5
17583 ac_status=$?
c0d27fcc 17584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17585 (exit $ac_status); }; }; then
17586 ac_cv_lib_resolv_res_send=yes
17587else
17588 echo "$as_me: failed program was:" >&5
19650fd6
AS
17589sed 's/^/| /' conftest.$ac_ext >&5
17590
84e70f78
KR
17591ac_cv_lib_resolv_res_send=no
17592fi
35996d22
AS
17593rm -f conftest.err conftest.$ac_objext \
17594 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17595LIBS=$ac_check_lib_save_LIBS
17596fi
c0d27fcc 17597echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
17598echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
17599if test $ac_cv_lib_resolv_res_send = yes; then
17600 resolv=yes
17601else
c0d27fcc 17602 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
17603echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
17604if test "${ac_cv_lib_resolv___res_send+set}" = set; then
17605 echo $ECHO_N "(cached) $ECHO_C" >&6
17606else
17607 ac_check_lib_save_LIBS=$LIBS
17608LIBS="-lresolv $LIBS"
17609cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17610/* confdefs.h. */
17611_ACEOF
17612cat confdefs.h >>conftest.$ac_ext
17613cat >>conftest.$ac_ext <<_ACEOF
17614/* end confdefs.h. */
84e70f78
KR
17615
17616/* Override any gcc2 internal prototype to avoid an error. */
17617#ifdef __cplusplus
17618extern "C"
17619#endif
17620/* We use char because int might match the return type of a gcc2
17621 builtin and then its argument prototype would still apply. */
17622char __res_send ();
17623int
17624main ()
17625{
17626__res_send ();
17627 ;
17628 return 0;
17629}
17630_ACEOF
17631rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17632if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17633 (eval $ac_link) 2>conftest.er1
84e70f78 17634 ac_status=$?
35996d22
AS
17635 grep -v '^ *+' conftest.er1 >conftest.err
17636 rm -f conftest.er1
17637 cat conftest.err >&5
c0d27fcc 17638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17639 (exit $ac_status); } &&
4494a266
JD
17640 { ac_try='test -z "$ac_c_werror_flag"
17641 || test ! -s conftest.err'
35996d22
AS
17642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17643 (eval $ac_try) 2>&5
17644 ac_status=$?
17645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17646 (exit $ac_status); }; } &&
17647 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17649 (eval $ac_try) 2>&5
17650 ac_status=$?
c0d27fcc 17651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17652 (exit $ac_status); }; }; then
17653 ac_cv_lib_resolv___res_send=yes
17654else
17655 echo "$as_me: failed program was:" >&5
19650fd6
AS
17656sed 's/^/| /' conftest.$ac_ext >&5
17657
84e70f78
KR
17658ac_cv_lib_resolv___res_send=no
17659fi
35996d22
AS
17660rm -f conftest.err conftest.$ac_objext \
17661 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17662LIBS=$ac_check_lib_save_LIBS
17663fi
c0d27fcc 17664echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
17665echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
17666if test $ac_cv_lib_resolv___res_send = yes; then
17667 resolv=yes
17668fi
17669
17670fi
17671
17672fi
17673
17674fi
17675
17676 if test "$resolv" = yes ; then
17677 RESOLVLIB=-lresolv
b936fae4 17678
c0d27fcc 17679cat >>confdefs.h <<\_ACEOF
84e70f78 17680#define HAVE_LIBRESOLV 1
c0d27fcc 17681_ACEOF
84e70f78
KR
17682
17683 else
17684 RESOLVLIB=
17685 fi
c0d27fcc 17686 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
17687echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
17688if test "${ac_cv_func_hes_getmailhost+set}" = set; then
17689 echo $ECHO_N "(cached) $ECHO_C" >&6
17690else
17691 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17692/* confdefs.h. */
17693_ACEOF
17694cat confdefs.h >>conftest.$ac_ext
17695cat >>conftest.$ac_ext <<_ACEOF
17696/* end confdefs.h. */
35996d22
AS
17697/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
17698 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17699#define hes_getmailhost innocuous_hes_getmailhost
17700
84e70f78 17701/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17702 which can conflict with char hes_getmailhost (); below.
17703 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17704 <limits.h> exists even on freestanding compilers. */
35996d22 17705
19650fd6
AS
17706#ifdef __STDC__
17707# include <limits.h>
17708#else
17709# include <assert.h>
17710#endif
35996d22
AS
17711
17712#undef hes_getmailhost
17713
84e70f78
KR
17714/* Override any gcc2 internal prototype to avoid an error. */
17715#ifdef __cplusplus
17716extern "C"
19650fd6 17717{
84e70f78
KR
17718#endif
17719/* We use char because int might match the return type of a gcc2
17720 builtin and then its argument prototype would still apply. */
17721char hes_getmailhost ();
84e70f78
KR
17722/* The GNU C library defines this for functions which it implements
17723 to always fail with ENOSYS. Some functions are actually named
17724 something starting with __ and the normal name is an alias. */
17725#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
17726choke me
17727#else
19650fd6
AS
17728char (*f) () = hes_getmailhost;
17729#endif
17730#ifdef __cplusplus
17731}
cd958eb3
MB
17732#endif
17733
19650fd6
AS
17734int
17735main ()
17736{
17737return f != hes_getmailhost;
84e70f78
KR
17738 ;
17739 return 0;
17740}
17741_ACEOF
17742rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17743if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17744 (eval $ac_link) 2>conftest.er1
84e70f78 17745 ac_status=$?
35996d22
AS
17746 grep -v '^ *+' conftest.er1 >conftest.err
17747 rm -f conftest.er1
17748 cat conftest.err >&5
c0d27fcc 17749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17750 (exit $ac_status); } &&
4494a266
JD
17751 { ac_try='test -z "$ac_c_werror_flag"
17752 || test ! -s conftest.err'
35996d22
AS
17753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17754 (eval $ac_try) 2>&5
17755 ac_status=$?
17756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17757 (exit $ac_status); }; } &&
17758 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17760 (eval $ac_try) 2>&5
17761 ac_status=$?
c0d27fcc 17762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17763 (exit $ac_status); }; }; then
17764 ac_cv_func_hes_getmailhost=yes
17765else
17766 echo "$as_me: failed program was:" >&5
19650fd6
AS
17767sed 's/^/| /' conftest.$ac_ext >&5
17768
84e70f78
KR
17769ac_cv_func_hes_getmailhost=no
17770fi
35996d22
AS
17771rm -f conftest.err conftest.$ac_objext \
17772 conftest$ac_exeext conftest.$ac_ext
84e70f78 17773fi
c0d27fcc 17774echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
17775echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
17776if test $ac_cv_func_hes_getmailhost = yes; then
17777 :
17778else
c0d27fcc 17779 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
17780echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
17781if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
17782 echo $ECHO_N "(cached) $ECHO_C" >&6
17783else
17784 ac_check_lib_save_LIBS=$LIBS
17785LIBS="-lhesiod $RESOLVLIB $LIBS"
17786cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17787/* confdefs.h. */
17788_ACEOF
17789cat confdefs.h >>conftest.$ac_ext
17790cat >>conftest.$ac_ext <<_ACEOF
17791/* end confdefs.h. */
84e70f78
KR
17792
17793/* Override any gcc2 internal prototype to avoid an error. */
17794#ifdef __cplusplus
17795extern "C"
17796#endif
17797/* We use char because int might match the return type of a gcc2
17798 builtin and then its argument prototype would still apply. */
17799char hes_getmailhost ();
17800int
17801main ()
17802{
17803hes_getmailhost ();
17804 ;
17805 return 0;
17806}
17807_ACEOF
17808rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17809if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17810 (eval $ac_link) 2>conftest.er1
84e70f78 17811 ac_status=$?
35996d22
AS
17812 grep -v '^ *+' conftest.er1 >conftest.err
17813 rm -f conftest.er1
17814 cat conftest.err >&5
c0d27fcc 17815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17816 (exit $ac_status); } &&
4494a266
JD
17817 { ac_try='test -z "$ac_c_werror_flag"
17818 || test ! -s conftest.err'
35996d22
AS
17819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17820 (eval $ac_try) 2>&5
17821 ac_status=$?
17822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17823 (exit $ac_status); }; } &&
17824 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17826 (eval $ac_try) 2>&5
17827 ac_status=$?
c0d27fcc 17828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17829 (exit $ac_status); }; }; then
17830 ac_cv_lib_hesiod_hes_getmailhost=yes
17831else
17832 echo "$as_me: failed program was:" >&5
19650fd6
AS
17833sed 's/^/| /' conftest.$ac_ext >&5
17834
84e70f78
KR
17835ac_cv_lib_hesiod_hes_getmailhost=no
17836fi
35996d22
AS
17837rm -f conftest.err conftest.$ac_objext \
17838 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17839LIBS=$ac_check_lib_save_LIBS
17840fi
c0d27fcc 17841echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
17842echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
17843if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 17844
c0d27fcc 17845cat >>confdefs.h <<\_ACEOF
84e70f78 17846#define HAVE_LIBHESIOD 1
c0d27fcc 17847_ACEOF
84e70f78
KR
17848
17849else
17850 :
17851fi
17852
17853fi
17854
17855fi
17856
a21616bd
KR
17857# These tell us which Kerberos-related libraries to use.
17858if test "${with_kerberos+set}" = set; then
503d2be0 17859
c0d27fcc 17860echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
17861echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
17862if test "${ac_cv_lib_com_err_com_err+set}" = set; then
17863 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17864else
503d2be0 17865 ac_check_lib_save_LIBS=$LIBS
a21616bd 17866LIBS="-lcom_err $LIBS"
503d2be0 17867cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17868/* confdefs.h. */
17869_ACEOF
17870cat confdefs.h >>conftest.$ac_ext
17871cat >>conftest.$ac_ext <<_ACEOF
17872/* end confdefs.h. */
503d2be0 17873
a21616bd 17874/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17875#ifdef __cplusplus
17876extern "C"
17877#endif
a21616bd 17878/* We use char because int might match the return type of a gcc2
503d2be0
AS
17879 builtin and then its argument prototype would still apply. */
17880char com_err ();
17881int
17882main ()
17883{
17884com_err ();
17885 ;
17886 return 0;
17887}
17888_ACEOF
17889rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17890if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17891 (eval $ac_link) 2>conftest.er1
503d2be0 17892 ac_status=$?
35996d22
AS
17893 grep -v '^ *+' conftest.er1 >conftest.err
17894 rm -f conftest.er1
17895 cat conftest.err >&5
c0d27fcc 17896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17897 (exit $ac_status); } &&
4494a266
JD
17898 { ac_try='test -z "$ac_c_werror_flag"
17899 || test ! -s conftest.err'
35996d22
AS
17900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17901 (eval $ac_try) 2>&5
17902 ac_status=$?
17903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17904 (exit $ac_status); }; } &&
17905 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17907 (eval $ac_try) 2>&5
17908 ac_status=$?
c0d27fcc 17909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17910 (exit $ac_status); }; }; then
17911 ac_cv_lib_com_err_com_err=yes
17912else
17913 echo "$as_me: failed program was:" >&5
19650fd6
AS
17914sed 's/^/| /' conftest.$ac_ext >&5
17915
503d2be0
AS
17916ac_cv_lib_com_err_com_err=no
17917fi
35996d22
AS
17918rm -f conftest.err conftest.$ac_objext \
17919 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17920LIBS=$ac_check_lib_save_LIBS
17921fi
c0d27fcc 17922echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
17923echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
17924if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 17925 cat >>confdefs.h <<_ACEOF
503d2be0 17926#define HAVE_LIBCOM_ERR 1
c0d27fcc 17927_ACEOF
a21616bd
KR
17928
17929 LIBS="-lcom_err $LIBS"
17930
a21616bd
KR
17931fi
17932
c0d27fcc
MR
17933
17934echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
17935echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
17936if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
17937 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17938else
503d2be0 17939 ac_check_lib_save_LIBS=$LIBS
a21616bd 17940LIBS="-lk5crypto $LIBS"
503d2be0 17941cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17942/* confdefs.h. */
17943_ACEOF
17944cat confdefs.h >>conftest.$ac_ext
17945cat >>conftest.$ac_ext <<_ACEOF
17946/* end confdefs.h. */
503d2be0 17947
a21616bd 17948/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17949#ifdef __cplusplus
17950extern "C"
17951#endif
a21616bd 17952/* We use char because int might match the return type of a gcc2
503d2be0
AS
17953 builtin and then its argument prototype would still apply. */
17954char mit_des_cbc_encrypt ();
17955int
17956main ()
17957{
17958mit_des_cbc_encrypt ();
17959 ;
17960 return 0;
17961}
17962_ACEOF
17963rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17964if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17965 (eval $ac_link) 2>conftest.er1
503d2be0 17966 ac_status=$?
35996d22
AS
17967 grep -v '^ *+' conftest.er1 >conftest.err
17968 rm -f conftest.er1
17969 cat conftest.err >&5
c0d27fcc 17970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17971 (exit $ac_status); } &&
4494a266
JD
17972 { ac_try='test -z "$ac_c_werror_flag"
17973 || test ! -s conftest.err'
35996d22
AS
17974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17975 (eval $ac_try) 2>&5
17976 ac_status=$?
17977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17978 (exit $ac_status); }; } &&
17979 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17981 (eval $ac_try) 2>&5
17982 ac_status=$?
c0d27fcc 17983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17984 (exit $ac_status); }; }; then
17985 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
17986else
17987 echo "$as_me: failed program was:" >&5
19650fd6
AS
17988sed 's/^/| /' conftest.$ac_ext >&5
17989
503d2be0
AS
17990ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
17991fi
35996d22
AS
17992rm -f conftest.err conftest.$ac_objext \
17993 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17994LIBS=$ac_check_lib_save_LIBS
17995fi
c0d27fcc 17996echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
17997echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
17998if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 17999 cat >>confdefs.h <<_ACEOF
503d2be0 18000#define HAVE_LIBK5CRYPTO 1
c0d27fcc 18001_ACEOF
a21616bd
KR
18002
18003 LIBS="-lk5crypto $LIBS"
18004
a21616bd
KR
18005fi
18006
c0d27fcc
MR
18007
18008echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
18009echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
18010if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
18011 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18012else
503d2be0 18013 ac_check_lib_save_LIBS=$LIBS
a21616bd 18014LIBS="-lcrypto $LIBS"
503d2be0 18015cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18016/* confdefs.h. */
18017_ACEOF
18018cat confdefs.h >>conftest.$ac_ext
18019cat >>conftest.$ac_ext <<_ACEOF
18020/* end confdefs.h. */
503d2be0 18021
a21616bd 18022/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18023#ifdef __cplusplus
18024extern "C"
18025#endif
a21616bd 18026/* We use char because int might match the return type of a gcc2
503d2be0
AS
18027 builtin and then its argument prototype would still apply. */
18028char mit_des_cbc_encrypt ();
18029int
18030main ()
18031{
18032mit_des_cbc_encrypt ();
18033 ;
18034 return 0;
18035}
18036_ACEOF
18037rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18038if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18039 (eval $ac_link) 2>conftest.er1
503d2be0 18040 ac_status=$?
35996d22
AS
18041 grep -v '^ *+' conftest.er1 >conftest.err
18042 rm -f conftest.er1
18043 cat conftest.err >&5
c0d27fcc 18044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18045 (exit $ac_status); } &&
4494a266
JD
18046 { ac_try='test -z "$ac_c_werror_flag"
18047 || test ! -s conftest.err'
35996d22
AS
18048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18049 (eval $ac_try) 2>&5
18050 ac_status=$?
18051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18052 (exit $ac_status); }; } &&
18053 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18055 (eval $ac_try) 2>&5
18056 ac_status=$?
c0d27fcc 18057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18058 (exit $ac_status); }; }; then
18059 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
18060else
18061 echo "$as_me: failed program was:" >&5
19650fd6
AS
18062sed 's/^/| /' conftest.$ac_ext >&5
18063
503d2be0
AS
18064ac_cv_lib_crypto_mit_des_cbc_encrypt=no
18065fi
35996d22
AS
18066rm -f conftest.err conftest.$ac_objext \
18067 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18068LIBS=$ac_check_lib_save_LIBS
18069fi
c0d27fcc 18070echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
18071echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
18072if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 18073 cat >>confdefs.h <<_ACEOF
503d2be0 18074#define HAVE_LIBCRYPTO 1
c0d27fcc 18075_ACEOF
a21616bd
KR
18076
18077 LIBS="-lcrypto $LIBS"
18078
a21616bd
KR
18079fi
18080
c0d27fcc
MR
18081
18082echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
18083echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
18084if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
18085 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18086else
503d2be0 18087 ac_check_lib_save_LIBS=$LIBS
a21616bd 18088LIBS="-lkrb5 $LIBS"
503d2be0 18089cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18090/* confdefs.h. */
18091_ACEOF
18092cat confdefs.h >>conftest.$ac_ext
18093cat >>conftest.$ac_ext <<_ACEOF
18094/* end confdefs.h. */
a21616bd 18095
503d2be0
AS
18096/* Override any gcc2 internal prototype to avoid an error. */
18097#ifdef __cplusplus
18098extern "C"
18099#endif
18100/* We use char because int might match the return type of a gcc2
18101 builtin and then its argument prototype would still apply. */
18102char krb5_init_context ();
18103int
18104main ()
18105{
18106krb5_init_context ();
18107 ;
18108 return 0;
18109}
18110_ACEOF
18111rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18112if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18113 (eval $ac_link) 2>conftest.er1
503d2be0 18114 ac_status=$?
35996d22
AS
18115 grep -v '^ *+' conftest.er1 >conftest.err
18116 rm -f conftest.er1
18117 cat conftest.err >&5
c0d27fcc 18118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18119 (exit $ac_status); } &&
4494a266
JD
18120 { ac_try='test -z "$ac_c_werror_flag"
18121 || test ! -s conftest.err'
35996d22
AS
18122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18123 (eval $ac_try) 2>&5
18124 ac_status=$?
18125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18126 (exit $ac_status); }; } &&
18127 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18129 (eval $ac_try) 2>&5
18130 ac_status=$?
c0d27fcc 18131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18132 (exit $ac_status); }; }; then
18133 ac_cv_lib_krb5_krb5_init_context=yes
18134else
18135 echo "$as_me: failed program was:" >&5
19650fd6
AS
18136sed 's/^/| /' conftest.$ac_ext >&5
18137
503d2be0
AS
18138ac_cv_lib_krb5_krb5_init_context=no
18139fi
35996d22
AS
18140rm -f conftest.err conftest.$ac_objext \
18141 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18142LIBS=$ac_check_lib_save_LIBS
18143fi
c0d27fcc 18144echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
18145echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
18146if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 18147 cat >>confdefs.h <<_ACEOF
503d2be0 18148#define HAVE_LIBKRB5 1
c0d27fcc 18149_ACEOF
a21616bd
KR
18150
18151 LIBS="-lkrb5 $LIBS"
18152
a21616bd
KR
18153fi
18154
18155 if test "${with_kerberos5+set}" != set; then
503d2be0 18156
c0d27fcc 18157echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
18158echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
18159if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
18160 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18161else
503d2be0 18162 ac_check_lib_save_LIBS=$LIBS
a21616bd 18163LIBS="-ldes425 $LIBS"
503d2be0 18164cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18165/* confdefs.h. */
18166_ACEOF
18167cat confdefs.h >>conftest.$ac_ext
18168cat >>conftest.$ac_ext <<_ACEOF
18169/* end confdefs.h. */
503d2be0 18170
a21616bd 18171/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18172#ifdef __cplusplus
18173extern "C"
18174#endif
a21616bd 18175/* We use char because int might match the return type of a gcc2
503d2be0
AS
18176 builtin and then its argument prototype would still apply. */
18177char des_cbc_encrypt ();
18178int
18179main ()
18180{
18181des_cbc_encrypt ();
18182 ;
18183 return 0;
18184}
18185_ACEOF
18186rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18187if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18188 (eval $ac_link) 2>conftest.er1
503d2be0 18189 ac_status=$?
35996d22
AS
18190 grep -v '^ *+' conftest.er1 >conftest.err
18191 rm -f conftest.er1
18192 cat conftest.err >&5
c0d27fcc 18193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18194 (exit $ac_status); } &&
4494a266
JD
18195 { ac_try='test -z "$ac_c_werror_flag"
18196 || test ! -s conftest.err'
35996d22
AS
18197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18198 (eval $ac_try) 2>&5
18199 ac_status=$?
18200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18201 (exit $ac_status); }; } &&
18202 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18204 (eval $ac_try) 2>&5
18205 ac_status=$?
c0d27fcc 18206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18207 (exit $ac_status); }; }; then
18208 ac_cv_lib_des425_des_cbc_encrypt=yes
18209else
18210 echo "$as_me: failed program was:" >&5
19650fd6
AS
18211sed 's/^/| /' conftest.$ac_ext >&5
18212
503d2be0
AS
18213ac_cv_lib_des425_des_cbc_encrypt=no
18214fi
35996d22
AS
18215rm -f conftest.err conftest.$ac_objext \
18216 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18217LIBS=$ac_check_lib_save_LIBS
18218fi
c0d27fcc 18219echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
18220echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
18221if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 18222 cat >>confdefs.h <<_ACEOF
503d2be0 18223#define HAVE_LIBDES425 1
c0d27fcc 18224_ACEOF
a21616bd
KR
18225
18226 LIBS="-ldes425 $LIBS"
18227
18228else
503d2be0 18229
c0d27fcc 18230echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
18231echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
18232if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
18233 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18234else
503d2be0 18235 ac_check_lib_save_LIBS=$LIBS
a21616bd 18236LIBS="-ldes $LIBS"
503d2be0 18237cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18238/* confdefs.h. */
18239_ACEOF
18240cat confdefs.h >>conftest.$ac_ext
18241cat >>conftest.$ac_ext <<_ACEOF
18242/* end confdefs.h. */
503d2be0 18243
a21616bd 18244/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18245#ifdef __cplusplus
18246extern "C"
18247#endif
a21616bd 18248/* We use char because int might match the return type of a gcc2
503d2be0
AS
18249 builtin and then its argument prototype would still apply. */
18250char des_cbc_encrypt ();
18251int
18252main ()
18253{
18254des_cbc_encrypt ();
18255 ;
18256 return 0;
18257}
18258_ACEOF
18259rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18260if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18261 (eval $ac_link) 2>conftest.er1
503d2be0 18262 ac_status=$?
35996d22
AS
18263 grep -v '^ *+' conftest.er1 >conftest.err
18264 rm -f conftest.er1
18265 cat conftest.err >&5
c0d27fcc 18266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18267 (exit $ac_status); } &&
4494a266
JD
18268 { ac_try='test -z "$ac_c_werror_flag"
18269 || test ! -s conftest.err'
35996d22
AS
18270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18271 (eval $ac_try) 2>&5
18272 ac_status=$?
18273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18274 (exit $ac_status); }; } &&
18275 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18277 (eval $ac_try) 2>&5
18278 ac_status=$?
c0d27fcc 18279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18280 (exit $ac_status); }; }; then
18281 ac_cv_lib_des_des_cbc_encrypt=yes
18282else
18283 echo "$as_me: failed program was:" >&5
19650fd6
AS
18284sed 's/^/| /' conftest.$ac_ext >&5
18285
503d2be0
AS
18286ac_cv_lib_des_des_cbc_encrypt=no
18287fi
35996d22
AS
18288rm -f conftest.err conftest.$ac_objext \
18289 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18290LIBS=$ac_check_lib_save_LIBS
18291fi
c0d27fcc 18292echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
18293echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
18294if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 18295 cat >>confdefs.h <<_ACEOF
503d2be0 18296#define HAVE_LIBDES 1
c0d27fcc 18297_ACEOF
a21616bd
KR
18298
18299 LIBS="-ldes $LIBS"
18300
a21616bd
KR
18301fi
18302
18303fi
18304
c0d27fcc
MR
18305
18306echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
18307echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
18308if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
18309 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18310else
503d2be0 18311 ac_check_lib_save_LIBS=$LIBS
a21616bd 18312LIBS="-lkrb4 $LIBS"
503d2be0 18313cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18314/* confdefs.h. */
18315_ACEOF
18316cat confdefs.h >>conftest.$ac_ext
18317cat >>conftest.$ac_ext <<_ACEOF
18318/* end confdefs.h. */
503d2be0 18319
a21616bd 18320/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18321#ifdef __cplusplus
18322extern "C"
18323#endif
a21616bd 18324/* We use char because int might match the return type of a gcc2
503d2be0
AS
18325 builtin and then its argument prototype would still apply. */
18326char krb_get_cred ();
18327int
18328main ()
18329{
18330krb_get_cred ();
18331 ;
18332 return 0;
18333}
18334_ACEOF
18335rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18337 (eval $ac_link) 2>conftest.er1
503d2be0 18338 ac_status=$?
35996d22
AS
18339 grep -v '^ *+' conftest.er1 >conftest.err
18340 rm -f conftest.er1
18341 cat conftest.err >&5
c0d27fcc 18342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18343 (exit $ac_status); } &&
4494a266
JD
18344 { ac_try='test -z "$ac_c_werror_flag"
18345 || test ! -s conftest.err'
35996d22
AS
18346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18347 (eval $ac_try) 2>&5
18348 ac_status=$?
18349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18350 (exit $ac_status); }; } &&
18351 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18353 (eval $ac_try) 2>&5
18354 ac_status=$?
c0d27fcc 18355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18356 (exit $ac_status); }; }; then
18357 ac_cv_lib_krb4_krb_get_cred=yes
18358else
18359 echo "$as_me: failed program was:" >&5
19650fd6
AS
18360sed 's/^/| /' conftest.$ac_ext >&5
18361
503d2be0
AS
18362ac_cv_lib_krb4_krb_get_cred=no
18363fi
35996d22
AS
18364rm -f conftest.err conftest.$ac_objext \
18365 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18366LIBS=$ac_check_lib_save_LIBS
18367fi
c0d27fcc 18368echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
18369echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
18370if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 18371 cat >>confdefs.h <<_ACEOF
503d2be0 18372#define HAVE_LIBKRB4 1
c0d27fcc 18373_ACEOF
a21616bd
KR
18374
18375 LIBS="-lkrb4 $LIBS"
18376
18377else
503d2be0 18378
c0d27fcc 18379echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
18380echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
18381if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
18382 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18383else
503d2be0 18384 ac_check_lib_save_LIBS=$LIBS
a21616bd 18385LIBS="-lkrb $LIBS"
503d2be0 18386cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18387/* confdefs.h. */
18388_ACEOF
18389cat confdefs.h >>conftest.$ac_ext
18390cat >>conftest.$ac_ext <<_ACEOF
18391/* end confdefs.h. */
503d2be0 18392
a21616bd 18393/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18394#ifdef __cplusplus
18395extern "C"
18396#endif
a21616bd 18397/* We use char because int might match the return type of a gcc2
503d2be0
AS
18398 builtin and then its argument prototype would still apply. */
18399char krb_get_cred ();
18400int
18401main ()
18402{
18403krb_get_cred ();
18404 ;
18405 return 0;
18406}
18407_ACEOF
18408rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18409if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18410 (eval $ac_link) 2>conftest.er1
503d2be0 18411 ac_status=$?
35996d22
AS
18412 grep -v '^ *+' conftest.er1 >conftest.err
18413 rm -f conftest.er1
18414 cat conftest.err >&5
c0d27fcc 18415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18416 (exit $ac_status); } &&
4494a266
JD
18417 { ac_try='test -z "$ac_c_werror_flag"
18418 || test ! -s conftest.err'
35996d22
AS
18419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18420 (eval $ac_try) 2>&5
18421 ac_status=$?
18422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18423 (exit $ac_status); }; } &&
18424 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18426 (eval $ac_try) 2>&5
18427 ac_status=$?
c0d27fcc 18428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18429 (exit $ac_status); }; }; then
18430 ac_cv_lib_krb_krb_get_cred=yes
18431else
18432 echo "$as_me: failed program was:" >&5
19650fd6
AS
18433sed 's/^/| /' conftest.$ac_ext >&5
18434
503d2be0
AS
18435ac_cv_lib_krb_krb_get_cred=no
18436fi
35996d22
AS
18437rm -f conftest.err conftest.$ac_objext \
18438 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18439LIBS=$ac_check_lib_save_LIBS
18440fi
c0d27fcc 18441echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
18442echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
18443if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 18444 cat >>confdefs.h <<_ACEOF
503d2be0 18445#define HAVE_LIBKRB 1
c0d27fcc 18446_ACEOF
a21616bd
KR
18447
18448 LIBS="-lkrb $LIBS"
18449
a21616bd
KR
18450fi
18451
18452fi
18453
18454 fi
18455
18456 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
18457
18458for ac_header in krb5.h
a21616bd 18459do
503d2be0 18460as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18461if eval "test \"\${$as_ac_Header+set}\" = set"; then
18462 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18463echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18464if eval "test \"\${$as_ac_Header+set}\" = set"; then
18465 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18466fi
18467echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18468echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18469else
c0d27fcc
MR
18470 # Is the header compilable?
18471echo "$as_me:$LINENO: checking $ac_header usability" >&5
18472echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18473cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18474/* confdefs.h. */
18475_ACEOF
18476cat confdefs.h >>conftest.$ac_ext
18477cat >>conftest.$ac_ext <<_ACEOF
18478/* end confdefs.h. */
c0d27fcc
MR
18479$ac_includes_default
18480#include <$ac_header>
18481_ACEOF
18482rm -f conftest.$ac_objext
18483if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18484 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18485 ac_status=$?
35996d22
AS
18486 grep -v '^ *+' conftest.er1 >conftest.err
18487 rm -f conftest.er1
18488 cat conftest.err >&5
c0d27fcc
MR
18489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18490 (exit $ac_status); } &&
4494a266
JD
18491 { ac_try='test -z "$ac_c_werror_flag"
18492 || test ! -s conftest.err'
35996d22
AS
18493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18494 (eval $ac_try) 2>&5
18495 ac_status=$?
18496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18497 (exit $ac_status); }; } &&
18498 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18500 (eval $ac_try) 2>&5
18501 ac_status=$?
18502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18503 (exit $ac_status); }; }; then
18504 ac_header_compiler=yes
18505else
18506 echo "$as_me: failed program was:" >&5
19650fd6
AS
18507sed 's/^/| /' conftest.$ac_ext >&5
18508
c0d27fcc
MR
18509ac_header_compiler=no
18510fi
35996d22 18511rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18512echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18513echo "${ECHO_T}$ac_header_compiler" >&6
18514
18515# Is the header present?
18516echo "$as_me:$LINENO: checking $ac_header presence" >&5
18517echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18518cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18519/* confdefs.h. */
18520_ACEOF
18521cat confdefs.h >>conftest.$ac_ext
18522cat >>conftest.$ac_ext <<_ACEOF
18523/* end confdefs.h. */
503d2be0
AS
18524#include <$ac_header>
18525_ACEOF
c0d27fcc 18526if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18527 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18528 ac_status=$?
6bae0ccf 18529 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18530 rm -f conftest.er1
18531 cat conftest.err >&5
c0d27fcc 18532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18533 (exit $ac_status); } >/dev/null; then
18534 if test -s conftest.err; then
18535 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18536 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18537 else
18538 ac_cpp_err=
18539 fi
18540else
18541 ac_cpp_err=yes
18542fi
18543if test -z "$ac_cpp_err"; then
c0d27fcc 18544 ac_header_preproc=yes
503d2be0
AS
18545else
18546 echo "$as_me: failed program was:" >&5
19650fd6
AS
18547sed 's/^/| /' conftest.$ac_ext >&5
18548
c0d27fcc 18549 ac_header_preproc=no
a21616bd 18550fi
503d2be0 18551rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18552echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18553echo "${ECHO_T}$ac_header_preproc" >&6
18554
18555# So? What about this header?
35996d22
AS
18556case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18557 yes:no: )
c0d27fcc
MR
18558 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18559echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18560 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18561echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18562 ac_header_preproc=yes
19650fd6 18563 ;;
35996d22 18564 no:yes:* )
c0d27fcc
MR
18565 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18566echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18567 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18568echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18569 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18570echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18571 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18572echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18573 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18574echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18575 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18576echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18577 (
18578 cat <<\_ASBOX
35996d22
AS
18579## ------------------------------------------ ##
18580## Report this to the AC_PACKAGE_NAME lists. ##
18581## ------------------------------------------ ##
19650fd6
AS
18582_ASBOX
18583 ) |
18584 sed "s/^/$as_me: WARNING: /" >&2
18585 ;;
c0d27fcc
MR
18586esac
18587echo "$as_me:$LINENO: checking for $ac_header" >&5
18588echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18589if eval "test \"\${$as_ac_Header+set}\" = set"; then
18590 echo $ECHO_N "(cached) $ECHO_C" >&6
18591else
35996d22 18592 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18593fi
c0d27fcc 18594echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18595echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18596
18597fi
503d2be0 18598if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18599 cat >>confdefs.h <<_ACEOF
503d2be0 18600#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18601_ACEOF
503d2be0 18602
a21616bd 18603fi
c0d27fcc 18604
a21616bd
KR
18605done
18606
18607 else
503d2be0
AS
18608
18609for ac_header in des.h
a21616bd 18610do
503d2be0 18611as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18612if eval "test \"\${$as_ac_Header+set}\" = set"; then
18613 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18614echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18615if eval "test \"\${$as_ac_Header+set}\" = set"; then
18616 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18617fi
18618echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18619echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18620else
c0d27fcc
MR
18621 # Is the header compilable?
18622echo "$as_me:$LINENO: checking $ac_header usability" >&5
18623echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18624cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18625/* confdefs.h. */
18626_ACEOF
18627cat confdefs.h >>conftest.$ac_ext
18628cat >>conftest.$ac_ext <<_ACEOF
18629/* end confdefs.h. */
c0d27fcc
MR
18630$ac_includes_default
18631#include <$ac_header>
18632_ACEOF
18633rm -f conftest.$ac_objext
18634if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18635 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18636 ac_status=$?
35996d22
AS
18637 grep -v '^ *+' conftest.er1 >conftest.err
18638 rm -f conftest.er1
18639 cat conftest.err >&5
c0d27fcc
MR
18640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18641 (exit $ac_status); } &&
4494a266
JD
18642 { ac_try='test -z "$ac_c_werror_flag"
18643 || test ! -s conftest.err'
35996d22
AS
18644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18645 (eval $ac_try) 2>&5
18646 ac_status=$?
18647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18648 (exit $ac_status); }; } &&
18649 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18651 (eval $ac_try) 2>&5
18652 ac_status=$?
18653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18654 (exit $ac_status); }; }; then
18655 ac_header_compiler=yes
18656else
18657 echo "$as_me: failed program was:" >&5
19650fd6
AS
18658sed 's/^/| /' conftest.$ac_ext >&5
18659
c0d27fcc
MR
18660ac_header_compiler=no
18661fi
35996d22 18662rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18663echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18664echo "${ECHO_T}$ac_header_compiler" >&6
18665
18666# Is the header present?
18667echo "$as_me:$LINENO: checking $ac_header presence" >&5
18668echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18669cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18670/* confdefs.h. */
18671_ACEOF
18672cat confdefs.h >>conftest.$ac_ext
18673cat >>conftest.$ac_ext <<_ACEOF
18674/* end confdefs.h. */
503d2be0
AS
18675#include <$ac_header>
18676_ACEOF
c0d27fcc 18677if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18678 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18679 ac_status=$?
6bae0ccf 18680 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18681 rm -f conftest.er1
18682 cat conftest.err >&5
c0d27fcc 18683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18684 (exit $ac_status); } >/dev/null; then
18685 if test -s conftest.err; then
18686 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18687 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18688 else
18689 ac_cpp_err=
18690 fi
18691else
18692 ac_cpp_err=yes
18693fi
18694if test -z "$ac_cpp_err"; then
c0d27fcc 18695 ac_header_preproc=yes
503d2be0
AS
18696else
18697 echo "$as_me: failed program was:" >&5
19650fd6
AS
18698sed 's/^/| /' conftest.$ac_ext >&5
18699
c0d27fcc 18700 ac_header_preproc=no
a21616bd 18701fi
503d2be0 18702rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18703echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18704echo "${ECHO_T}$ac_header_preproc" >&6
18705
18706# So? What about this header?
35996d22
AS
18707case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18708 yes:no: )
c0d27fcc
MR
18709 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18710echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18711 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18712echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18713 ac_header_preproc=yes
19650fd6 18714 ;;
35996d22 18715 no:yes:* )
c0d27fcc
MR
18716 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18717echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18718 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18719echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18720 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18721echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18722 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18723echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18724 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18725echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18726 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18727echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18728 (
18729 cat <<\_ASBOX
35996d22
AS
18730## ------------------------------------------ ##
18731## Report this to the AC_PACKAGE_NAME lists. ##
18732## ------------------------------------------ ##
19650fd6
AS
18733_ASBOX
18734 ) |
18735 sed "s/^/$as_me: WARNING: /" >&2
18736 ;;
c0d27fcc
MR
18737esac
18738echo "$as_me:$LINENO: checking for $ac_header" >&5
18739echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18740if eval "test \"\${$as_ac_Header+set}\" = set"; then
18741 echo $ECHO_N "(cached) $ECHO_C" >&6
18742else
35996d22 18743 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18744fi
c0d27fcc 18745echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18746echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18747
18748fi
503d2be0 18749if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18750 cat >>confdefs.h <<_ACEOF
503d2be0 18751#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18752_ACEOF
503d2be0 18753
a21616bd 18754else
503d2be0
AS
18755
18756for ac_header in kerberosIV/des.h
a21616bd 18757do
503d2be0 18758as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18759if eval "test \"\${$as_ac_Header+set}\" = set"; then
18760 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18761echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18762if eval "test \"\${$as_ac_Header+set}\" = set"; then
18763 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18764fi
18765echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18766echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18767else
c0d27fcc
MR
18768 # Is the header compilable?
18769echo "$as_me:$LINENO: checking $ac_header usability" >&5
18770echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18771cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18772/* confdefs.h. */
18773_ACEOF
18774cat confdefs.h >>conftest.$ac_ext
18775cat >>conftest.$ac_ext <<_ACEOF
18776/* end confdefs.h. */
c0d27fcc
MR
18777$ac_includes_default
18778#include <$ac_header>
18779_ACEOF
18780rm -f conftest.$ac_objext
18781if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18782 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18783 ac_status=$?
35996d22
AS
18784 grep -v '^ *+' conftest.er1 >conftest.err
18785 rm -f conftest.er1
18786 cat conftest.err >&5
c0d27fcc
MR
18787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18788 (exit $ac_status); } &&
4494a266
JD
18789 { ac_try='test -z "$ac_c_werror_flag"
18790 || test ! -s conftest.err'
35996d22
AS
18791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18792 (eval $ac_try) 2>&5
18793 ac_status=$?
18794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18795 (exit $ac_status); }; } &&
18796 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18798 (eval $ac_try) 2>&5
18799 ac_status=$?
18800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18801 (exit $ac_status); }; }; then
18802 ac_header_compiler=yes
18803else
18804 echo "$as_me: failed program was:" >&5
19650fd6
AS
18805sed 's/^/| /' conftest.$ac_ext >&5
18806
c0d27fcc
MR
18807ac_header_compiler=no
18808fi
35996d22 18809rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18810echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18811echo "${ECHO_T}$ac_header_compiler" >&6
18812
18813# Is the header present?
18814echo "$as_me:$LINENO: checking $ac_header presence" >&5
18815echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18816cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18817/* confdefs.h. */
18818_ACEOF
18819cat confdefs.h >>conftest.$ac_ext
18820cat >>conftest.$ac_ext <<_ACEOF
18821/* end confdefs.h. */
503d2be0
AS
18822#include <$ac_header>
18823_ACEOF
c0d27fcc 18824if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18825 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18826 ac_status=$?
6bae0ccf 18827 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18828 rm -f conftest.er1
18829 cat conftest.err >&5
c0d27fcc 18830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18831 (exit $ac_status); } >/dev/null; then
18832 if test -s conftest.err; then
18833 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18834 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18835 else
18836 ac_cpp_err=
18837 fi
18838else
18839 ac_cpp_err=yes
18840fi
18841if test -z "$ac_cpp_err"; then
c0d27fcc 18842 ac_header_preproc=yes
503d2be0
AS
18843else
18844 echo "$as_me: failed program was:" >&5
19650fd6
AS
18845sed 's/^/| /' conftest.$ac_ext >&5
18846
c0d27fcc 18847 ac_header_preproc=no
a21616bd 18848fi
503d2be0 18849rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18850echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18851echo "${ECHO_T}$ac_header_preproc" >&6
18852
18853# So? What about this header?
35996d22
AS
18854case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18855 yes:no: )
c0d27fcc
MR
18856 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18857echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18858 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18859echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18860 ac_header_preproc=yes
19650fd6 18861 ;;
35996d22 18862 no:yes:* )
c0d27fcc
MR
18863 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18864echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18865 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18866echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18867 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18868echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18869 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18870echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18871 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18872echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18873 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18874echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18875 (
18876 cat <<\_ASBOX
35996d22
AS
18877## ------------------------------------------ ##
18878## Report this to the AC_PACKAGE_NAME lists. ##
18879## ------------------------------------------ ##
19650fd6
AS
18880_ASBOX
18881 ) |
18882 sed "s/^/$as_me: WARNING: /" >&2
18883 ;;
c0d27fcc
MR
18884esac
18885echo "$as_me:$LINENO: checking for $ac_header" >&5
18886echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18887if eval "test \"\${$as_ac_Header+set}\" = set"; then
18888 echo $ECHO_N "(cached) $ECHO_C" >&6
18889else
35996d22 18890 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18891fi
c0d27fcc 18892echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18893echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18894
18895fi
503d2be0 18896if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18897 cat >>confdefs.h <<_ACEOF
503d2be0 18898#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18899_ACEOF
503d2be0 18900
a21616bd 18901else
503d2be0
AS
18902
18903for ac_header in kerberos/des.h
a21616bd 18904do
503d2be0 18905as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18906if eval "test \"\${$as_ac_Header+set}\" = set"; then
18907 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18908echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18909if eval "test \"\${$as_ac_Header+set}\" = set"; then
18910 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18911fi
18912echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18913echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18914else
c0d27fcc
MR
18915 # Is the header compilable?
18916echo "$as_me:$LINENO: checking $ac_header usability" >&5
18917echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18918cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18919/* confdefs.h. */
18920_ACEOF
18921cat confdefs.h >>conftest.$ac_ext
18922cat >>conftest.$ac_ext <<_ACEOF
18923/* end confdefs.h. */
c0d27fcc
MR
18924$ac_includes_default
18925#include <$ac_header>
18926_ACEOF
18927rm -f conftest.$ac_objext
18928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18929 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18930 ac_status=$?
35996d22
AS
18931 grep -v '^ *+' conftest.er1 >conftest.err
18932 rm -f conftest.er1
18933 cat conftest.err >&5
c0d27fcc
MR
18934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18935 (exit $ac_status); } &&
4494a266
JD
18936 { ac_try='test -z "$ac_c_werror_flag"
18937 || test ! -s conftest.err'
35996d22
AS
18938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18939 (eval $ac_try) 2>&5
18940 ac_status=$?
18941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18942 (exit $ac_status); }; } &&
18943 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18945 (eval $ac_try) 2>&5
18946 ac_status=$?
18947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18948 (exit $ac_status); }; }; then
18949 ac_header_compiler=yes
18950else
18951 echo "$as_me: failed program was:" >&5
19650fd6
AS
18952sed 's/^/| /' conftest.$ac_ext >&5
18953
c0d27fcc
MR
18954ac_header_compiler=no
18955fi
35996d22 18956rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18957echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18958echo "${ECHO_T}$ac_header_compiler" >&6
18959
18960# Is the header present?
18961echo "$as_me:$LINENO: checking $ac_header presence" >&5
18962echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18963cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18964/* confdefs.h. */
18965_ACEOF
18966cat confdefs.h >>conftest.$ac_ext
18967cat >>conftest.$ac_ext <<_ACEOF
18968/* end confdefs.h. */
503d2be0
AS
18969#include <$ac_header>
18970_ACEOF
c0d27fcc 18971if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18972 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18973 ac_status=$?
6bae0ccf 18974 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18975 rm -f conftest.er1
18976 cat conftest.err >&5
c0d27fcc 18977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18978 (exit $ac_status); } >/dev/null; then
18979 if test -s conftest.err; then
18980 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18981 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18982 else
18983 ac_cpp_err=
18984 fi
18985else
18986 ac_cpp_err=yes
18987fi
18988if test -z "$ac_cpp_err"; then
c0d27fcc 18989 ac_header_preproc=yes
503d2be0
AS
18990else
18991 echo "$as_me: failed program was:" >&5
19650fd6
AS
18992sed 's/^/| /' conftest.$ac_ext >&5
18993
c0d27fcc 18994 ac_header_preproc=no
a21616bd 18995fi
503d2be0 18996rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18997echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18998echo "${ECHO_T}$ac_header_preproc" >&6
18999
19000# So? What about this header?
35996d22
AS
19001case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19002 yes:no: )
c0d27fcc
MR
19003 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19004echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19005 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19006echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19007 ac_header_preproc=yes
19650fd6 19008 ;;
35996d22 19009 no:yes:* )
c0d27fcc
MR
19010 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19011echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19012 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19013echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19014 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19015echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19016 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19017echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19018 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19019echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19020 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19021echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19022 (
19023 cat <<\_ASBOX
35996d22
AS
19024## ------------------------------------------ ##
19025## Report this to the AC_PACKAGE_NAME lists. ##
19026## ------------------------------------------ ##
19650fd6
AS
19027_ASBOX
19028 ) |
19029 sed "s/^/$as_me: WARNING: /" >&2
19030 ;;
c0d27fcc
MR
19031esac
19032echo "$as_me:$LINENO: checking for $ac_header" >&5
19033echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19034if eval "test \"\${$as_ac_Header+set}\" = set"; then
19035 echo $ECHO_N "(cached) $ECHO_C" >&6
19036else
35996d22 19037 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19038fi
c0d27fcc 19039echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19040echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19041
19042fi
503d2be0 19043if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19044 cat >>confdefs.h <<_ACEOF
503d2be0 19045#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19046_ACEOF
a21616bd
KR
19047
19048fi
c0d27fcc 19049
a21616bd
KR
19050done
19051
98418dba 19052fi
c0d27fcc 19053
925c2f3f
EZ
19054done
19055
98418dba 19056fi
c0d27fcc 19057
925c2f3f 19058done
98418dba 19059
c0d27fcc 19060
925c2f3f
EZ
19061for ac_header in krb.h
19062do
19063as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19064if eval "test \"\${$as_ac_Header+set}\" = set"; then
19065 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
19066echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19067if eval "test \"\${$as_ac_Header+set}\" = set"; then
19068 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19069fi
19070echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19071echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19072else
19073 # Is the header compilable?
19074echo "$as_me:$LINENO: checking $ac_header usability" >&5
19075echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19076cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19077/* confdefs.h. */
19078_ACEOF
19079cat confdefs.h >>conftest.$ac_ext
19080cat >>conftest.$ac_ext <<_ACEOF
19081/* end confdefs.h. */
c0d27fcc
MR
19082$ac_includes_default
19083#include <$ac_header>
19084_ACEOF
19085rm -f conftest.$ac_objext
19086if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19087 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19088 ac_status=$?
35996d22
AS
19089 grep -v '^ *+' conftest.er1 >conftest.err
19090 rm -f conftest.er1
19091 cat conftest.err >&5
c0d27fcc
MR
19092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19093 (exit $ac_status); } &&
4494a266
JD
19094 { ac_try='test -z "$ac_c_werror_flag"
19095 || test ! -s conftest.err'
35996d22
AS
19096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19097 (eval $ac_try) 2>&5
19098 ac_status=$?
19099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19100 (exit $ac_status); }; } &&
19101 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19103 (eval $ac_try) 2>&5
19104 ac_status=$?
19105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19106 (exit $ac_status); }; }; then
19107 ac_header_compiler=yes
925c2f3f 19108else
c0d27fcc 19109 echo "$as_me: failed program was:" >&5
19650fd6
AS
19110sed 's/^/| /' conftest.$ac_ext >&5
19111
c0d27fcc
MR
19112ac_header_compiler=no
19113fi
35996d22 19114rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19115echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19116echo "${ECHO_T}$ac_header_compiler" >&6
19117
19118# Is the header present?
19119echo "$as_me:$LINENO: checking $ac_header presence" >&5
19120echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19121cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19122/* confdefs.h. */
19123_ACEOF
19124cat confdefs.h >>conftest.$ac_ext
19125cat >>conftest.$ac_ext <<_ACEOF
19126/* end confdefs.h. */
503d2be0
AS
19127#include <$ac_header>
19128_ACEOF
c0d27fcc 19129if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19130 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19131 ac_status=$?
6bae0ccf 19132 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19133 rm -f conftest.er1
19134 cat conftest.err >&5
c0d27fcc 19135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19136 (exit $ac_status); } >/dev/null; then
19137 if test -s conftest.err; then
19138 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19139 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19140 else
19141 ac_cpp_err=
19142 fi
19143else
19144 ac_cpp_err=yes
19145fi
19146if test -z "$ac_cpp_err"; then
c0d27fcc 19147 ac_header_preproc=yes
503d2be0
AS
19148else
19149 echo "$as_me: failed program was:" >&5
19650fd6
AS
19150sed 's/^/| /' conftest.$ac_ext >&5
19151
c0d27fcc 19152 ac_header_preproc=no
a21616bd 19153fi
503d2be0 19154rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19155echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19156echo "${ECHO_T}$ac_header_preproc" >&6
19157
19158# So? What about this header?
35996d22
AS
19159case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19160 yes:no: )
c0d27fcc
MR
19161 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19162echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19163 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19164echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19165 ac_header_preproc=yes
19650fd6 19166 ;;
35996d22 19167 no:yes:* )
c0d27fcc
MR
19168 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19169echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19170 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19171echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19172 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19173echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19174 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19175echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19176 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19177echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19178 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19179echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19180 (
19181 cat <<\_ASBOX
35996d22
AS
19182## ------------------------------------------ ##
19183## Report this to the AC_PACKAGE_NAME lists. ##
19184## ------------------------------------------ ##
19650fd6
AS
19185_ASBOX
19186 ) |
19187 sed "s/^/$as_me: WARNING: /" >&2
19188 ;;
c0d27fcc
MR
19189esac
19190echo "$as_me:$LINENO: checking for $ac_header" >&5
19191echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19192if eval "test \"\${$as_ac_Header+set}\" = set"; then
19193 echo $ECHO_N "(cached) $ECHO_C" >&6
19194else
35996d22 19195 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19196fi
c0d27fcc 19197echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19198echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19199
19200fi
503d2be0 19201if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19202 cat >>confdefs.h <<_ACEOF
503d2be0 19203#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19204_ACEOF
503d2be0 19205
a21616bd 19206else
503d2be0
AS
19207
19208for ac_header in kerberosIV/krb.h
a21616bd 19209do
503d2be0 19210as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19211if eval "test \"\${$as_ac_Header+set}\" = set"; then
19212 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19213echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19214if eval "test \"\${$as_ac_Header+set}\" = set"; then
19215 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19216fi
19217echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19218echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19219else
c0d27fcc
MR
19220 # Is the header compilable?
19221echo "$as_me:$LINENO: checking $ac_header usability" >&5
19222echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19223cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19224/* confdefs.h. */
19225_ACEOF
19226cat confdefs.h >>conftest.$ac_ext
19227cat >>conftest.$ac_ext <<_ACEOF
19228/* end confdefs.h. */
c0d27fcc
MR
19229$ac_includes_default
19230#include <$ac_header>
19231_ACEOF
19232rm -f conftest.$ac_objext
19233if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19234 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19235 ac_status=$?
35996d22
AS
19236 grep -v '^ *+' conftest.er1 >conftest.err
19237 rm -f conftest.er1
19238 cat conftest.err >&5
c0d27fcc
MR
19239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19240 (exit $ac_status); } &&
4494a266
JD
19241 { ac_try='test -z "$ac_c_werror_flag"
19242 || test ! -s conftest.err'
35996d22
AS
19243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19244 (eval $ac_try) 2>&5
19245 ac_status=$?
19246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19247 (exit $ac_status); }; } &&
19248 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19250 (eval $ac_try) 2>&5
19251 ac_status=$?
19252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19253 (exit $ac_status); }; }; then
19254 ac_header_compiler=yes
19255else
19256 echo "$as_me: failed program was:" >&5
19650fd6
AS
19257sed 's/^/| /' conftest.$ac_ext >&5
19258
c0d27fcc
MR
19259ac_header_compiler=no
19260fi
35996d22 19261rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19262echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19263echo "${ECHO_T}$ac_header_compiler" >&6
19264
19265# Is the header present?
19266echo "$as_me:$LINENO: checking $ac_header presence" >&5
19267echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19268cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19269/* confdefs.h. */
19270_ACEOF
19271cat confdefs.h >>conftest.$ac_ext
19272cat >>conftest.$ac_ext <<_ACEOF
19273/* end confdefs.h. */
503d2be0
AS
19274#include <$ac_header>
19275_ACEOF
c0d27fcc 19276if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19277 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19278 ac_status=$?
6bae0ccf 19279 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19280 rm -f conftest.er1
19281 cat conftest.err >&5
c0d27fcc 19282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19283 (exit $ac_status); } >/dev/null; then
19284 if test -s conftest.err; then
19285 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19286 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19287 else
19288 ac_cpp_err=
19289 fi
19290else
19291 ac_cpp_err=yes
19292fi
19293if test -z "$ac_cpp_err"; then
c0d27fcc 19294 ac_header_preproc=yes
503d2be0
AS
19295else
19296 echo "$as_me: failed program was:" >&5
19650fd6
AS
19297sed 's/^/| /' conftest.$ac_ext >&5
19298
c0d27fcc 19299 ac_header_preproc=no
a21616bd 19300fi
503d2be0 19301rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19302echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19303echo "${ECHO_T}$ac_header_preproc" >&6
19304
19305# So? What about this header?
35996d22
AS
19306case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19307 yes:no: )
c0d27fcc
MR
19308 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19309echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19310 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19311echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19312 ac_header_preproc=yes
19650fd6 19313 ;;
35996d22 19314 no:yes:* )
c0d27fcc
MR
19315 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19316echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19317 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19318echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19319 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19320echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19321 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19322echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19323 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19324echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19325 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19326echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19327 (
19328 cat <<\_ASBOX
35996d22
AS
19329## ------------------------------------------ ##
19330## Report this to the AC_PACKAGE_NAME lists. ##
19331## ------------------------------------------ ##
19650fd6
AS
19332_ASBOX
19333 ) |
19334 sed "s/^/$as_me: WARNING: /" >&2
19335 ;;
c0d27fcc
MR
19336esac
19337echo "$as_me:$LINENO: checking for $ac_header" >&5
19338echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19339if eval "test \"\${$as_ac_Header+set}\" = set"; then
19340 echo $ECHO_N "(cached) $ECHO_C" >&6
19341else
35996d22 19342 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19343fi
c0d27fcc 19344echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19345echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19346
19347fi
503d2be0 19348if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19349 cat >>confdefs.h <<_ACEOF
503d2be0 19350#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19351_ACEOF
503d2be0 19352
a21616bd 19353else
503d2be0
AS
19354
19355for ac_header in kerberos/krb.h
a21616bd 19356do
503d2be0 19357as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19358if eval "test \"\${$as_ac_Header+set}\" = set"; then
19359 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19360echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19361if eval "test \"\${$as_ac_Header+set}\" = set"; then
19362 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19363fi
19364echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19365echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19366else
c0d27fcc
MR
19367 # Is the header compilable?
19368echo "$as_me:$LINENO: checking $ac_header usability" >&5
19369echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19370cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19371/* confdefs.h. */
19372_ACEOF
19373cat confdefs.h >>conftest.$ac_ext
19374cat >>conftest.$ac_ext <<_ACEOF
19375/* end confdefs.h. */
c0d27fcc
MR
19376$ac_includes_default
19377#include <$ac_header>
19378_ACEOF
19379rm -f conftest.$ac_objext
19380if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19381 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19382 ac_status=$?
35996d22
AS
19383 grep -v '^ *+' conftest.er1 >conftest.err
19384 rm -f conftest.er1
19385 cat conftest.err >&5
c0d27fcc
MR
19386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19387 (exit $ac_status); } &&
4494a266
JD
19388 { ac_try='test -z "$ac_c_werror_flag"
19389 || test ! -s conftest.err'
35996d22
AS
19390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19391 (eval $ac_try) 2>&5
19392 ac_status=$?
19393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19394 (exit $ac_status); }; } &&
19395 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19397 (eval $ac_try) 2>&5
19398 ac_status=$?
19399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19400 (exit $ac_status); }; }; then
19401 ac_header_compiler=yes
19402else
19403 echo "$as_me: failed program was:" >&5
19650fd6
AS
19404sed 's/^/| /' conftest.$ac_ext >&5
19405
c0d27fcc
MR
19406ac_header_compiler=no
19407fi
35996d22 19408rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19409echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19410echo "${ECHO_T}$ac_header_compiler" >&6
19411
19412# Is the header present?
19413echo "$as_me:$LINENO: checking $ac_header presence" >&5
19414echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19415cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19416/* confdefs.h. */
19417_ACEOF
19418cat confdefs.h >>conftest.$ac_ext
19419cat >>conftest.$ac_ext <<_ACEOF
19420/* end confdefs.h. */
503d2be0
AS
19421#include <$ac_header>
19422_ACEOF
c0d27fcc 19423if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19424 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19425 ac_status=$?
6bae0ccf 19426 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19427 rm -f conftest.er1
19428 cat conftest.err >&5
c0d27fcc 19429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19430 (exit $ac_status); } >/dev/null; then
19431 if test -s conftest.err; then
19432 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19433 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19434 else
19435 ac_cpp_err=
19436 fi
19437else
19438 ac_cpp_err=yes
19439fi
19440if test -z "$ac_cpp_err"; then
c0d27fcc 19441 ac_header_preproc=yes
503d2be0
AS
19442else
19443 echo "$as_me: failed program was:" >&5
19650fd6
AS
19444sed 's/^/| /' conftest.$ac_ext >&5
19445
c0d27fcc 19446 ac_header_preproc=no
a21616bd 19447fi
503d2be0 19448rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19449echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19450echo "${ECHO_T}$ac_header_preproc" >&6
35996d22
AS
19451
19452# So? What about this header?
19453case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19454 yes:no: )
19455 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19456echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19457 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19458echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19459 ac_header_preproc=yes
19650fd6 19460 ;;
35996d22 19461 no:yes:* )
c0d27fcc
MR
19462 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19463echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19464 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19465echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19466 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19467echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19468 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19469echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19470 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19471echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19472 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19473echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19474 (
19475 cat <<\_ASBOX
35996d22
AS
19476## ------------------------------------------ ##
19477## Report this to the AC_PACKAGE_NAME lists. ##
19478## ------------------------------------------ ##
19650fd6
AS
19479_ASBOX
19480 ) |
19481 sed "s/^/$as_me: WARNING: /" >&2
19482 ;;
c0d27fcc
MR
19483esac
19484echo "$as_me:$LINENO: checking for $ac_header" >&5
19485echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19486if eval "test \"\${$as_ac_Header+set}\" = set"; then
19487 echo $ECHO_N "(cached) $ECHO_C" >&6
19488else
35996d22 19489 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19490fi
c0d27fcc 19491echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19492echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19493
19494fi
503d2be0 19495if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19496 cat >>confdefs.h <<_ACEOF
503d2be0 19497#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19498_ACEOF
503d2be0 19499
a21616bd 19500fi
c0d27fcc 19501
a21616bd
KR
19502done
19503
19504fi
c0d27fcc 19505
a21616bd
KR
19506done
19507
19508fi
c0d27fcc 19509
a21616bd
KR
19510done
19511
19512 fi
503d2be0
AS
19513
19514for ac_header in com_err.h
a21616bd 19515do
503d2be0 19516as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19517if eval "test \"\${$as_ac_Header+set}\" = set"; then
19518 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19519echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19520if eval "test \"\${$as_ac_Header+set}\" = set"; then
19521 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19522fi
19523echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19524echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19525else
c0d27fcc
MR
19526 # Is the header compilable?
19527echo "$as_me:$LINENO: checking $ac_header usability" >&5
19528echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19529cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19530/* confdefs.h. */
19531_ACEOF
19532cat confdefs.h >>conftest.$ac_ext
19533cat >>conftest.$ac_ext <<_ACEOF
19534/* end confdefs.h. */
c0d27fcc
MR
19535$ac_includes_default
19536#include <$ac_header>
19537_ACEOF
19538rm -f conftest.$ac_objext
19539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19540 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19541 ac_status=$?
35996d22
AS
19542 grep -v '^ *+' conftest.er1 >conftest.err
19543 rm -f conftest.er1
19544 cat conftest.err >&5
c0d27fcc
MR
19545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19546 (exit $ac_status); } &&
4494a266
JD
19547 { ac_try='test -z "$ac_c_werror_flag"
19548 || test ! -s conftest.err'
35996d22
AS
19549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19550 (eval $ac_try) 2>&5
19551 ac_status=$?
19552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19553 (exit $ac_status); }; } &&
19554 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19556 (eval $ac_try) 2>&5
19557 ac_status=$?
19558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19559 (exit $ac_status); }; }; then
19560 ac_header_compiler=yes
19561else
19562 echo "$as_me: failed program was:" >&5
19650fd6
AS
19563sed 's/^/| /' conftest.$ac_ext >&5
19564
c0d27fcc
MR
19565ac_header_compiler=no
19566fi
35996d22 19567rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19568echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19569echo "${ECHO_T}$ac_header_compiler" >&6
19570
19571# Is the header present?
19572echo "$as_me:$LINENO: checking $ac_header presence" >&5
19573echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19574cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19575/* confdefs.h. */
19576_ACEOF
19577cat confdefs.h >>conftest.$ac_ext
19578cat >>conftest.$ac_ext <<_ACEOF
19579/* end confdefs.h. */
503d2be0
AS
19580#include <$ac_header>
19581_ACEOF
c0d27fcc 19582if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19583 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19584 ac_status=$?
6bae0ccf 19585 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19586 rm -f conftest.er1
19587 cat conftest.err >&5
c0d27fcc 19588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19589 (exit $ac_status); } >/dev/null; then
19590 if test -s conftest.err; then
19591 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19592 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19593 else
19594 ac_cpp_err=
19595 fi
19596else
19597 ac_cpp_err=yes
19598fi
19599if test -z "$ac_cpp_err"; then
c0d27fcc 19600 ac_header_preproc=yes
503d2be0
AS
19601else
19602 echo "$as_me: failed program was:" >&5
19650fd6
AS
19603sed 's/^/| /' conftest.$ac_ext >&5
19604
c0d27fcc 19605 ac_header_preproc=no
a21616bd 19606fi
503d2be0 19607rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19608echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19609echo "${ECHO_T}$ac_header_preproc" >&6
19610
19611# So? What about this header?
35996d22
AS
19612case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19613 yes:no: )
c0d27fcc
MR
19614 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19615echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19616 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19617echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19618 ac_header_preproc=yes
19650fd6 19619 ;;
35996d22 19620 no:yes:* )
c0d27fcc
MR
19621 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19622echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19623 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19624echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19625 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19626echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19627 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19628echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19629 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19630echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19631 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19632echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19633 (
19634 cat <<\_ASBOX
35996d22
AS
19635## ------------------------------------------ ##
19636## Report this to the AC_PACKAGE_NAME lists. ##
19637## ------------------------------------------ ##
19650fd6
AS
19638_ASBOX
19639 ) |
19640 sed "s/^/$as_me: WARNING: /" >&2
19641 ;;
c0d27fcc
MR
19642esac
19643echo "$as_me:$LINENO: checking for $ac_header" >&5
19644echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19645if eval "test \"\${$as_ac_Header+set}\" = set"; then
19646 echo $ECHO_N "(cached) $ECHO_C" >&6
19647else
35996d22 19648 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19649fi
c0d27fcc 19650echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19651echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19652
19653fi
503d2be0 19654if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19655 cat >>confdefs.h <<_ACEOF
503d2be0 19656#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19657_ACEOF
503d2be0 19658
a21616bd 19659fi
c0d27fcc 19660
a21616bd
KR
19661done
19662
19663fi
19664
ba4481b5
DL
19665# Solaris requires -lintl if you want strerror (which calls dgettext)
19666# to return localized messages.
503d2be0 19667
c0d27fcc 19668echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
19669echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
19670if test "${ac_cv_lib_intl_dgettext+set}" = set; then
19671 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19672else
503d2be0 19673 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19674LIBS="-lintl $LIBS"
503d2be0 19675cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19676/* confdefs.h. */
19677_ACEOF
19678cat confdefs.h >>conftest.$ac_ext
19679cat >>conftest.$ac_ext <<_ACEOF
19680/* end confdefs.h. */
503d2be0 19681
ba4481b5 19682/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19683#ifdef __cplusplus
19684extern "C"
19685#endif
ba4481b5 19686/* We use char because int might match the return type of a gcc2
503d2be0
AS
19687 builtin and then its argument prototype would still apply. */
19688char dgettext ();
19689int
19690main ()
19691{
19692dgettext ();
19693 ;
19694 return 0;
19695}
19696_ACEOF
19697rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19698if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 19699 (eval $ac_link) 2>conftest.er1
503d2be0 19700 ac_status=$?
35996d22
AS
19701 grep -v '^ *+' conftest.er1 >conftest.err
19702 rm -f conftest.er1
19703 cat conftest.err >&5
c0d27fcc 19704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19705 (exit $ac_status); } &&
4494a266
JD
19706 { ac_try='test -z "$ac_c_werror_flag"
19707 || test ! -s conftest.err'
35996d22
AS
19708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19709 (eval $ac_try) 2>&5
19710 ac_status=$?
19711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19712 (exit $ac_status); }; } &&
19713 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19715 (eval $ac_try) 2>&5
19716 ac_status=$?
c0d27fcc 19717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19718 (exit $ac_status); }; }; then
19719 ac_cv_lib_intl_dgettext=yes
19720else
19721 echo "$as_me: failed program was:" >&5
19650fd6
AS
19722sed 's/^/| /' conftest.$ac_ext >&5
19723
503d2be0
AS
19724ac_cv_lib_intl_dgettext=no
19725fi
35996d22
AS
19726rm -f conftest.err conftest.$ac_objext \
19727 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19728LIBS=$ac_check_lib_save_LIBS
19729fi
c0d27fcc 19730echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
19731echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
19732if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 19733 cat >>confdefs.h <<_ACEOF
503d2be0 19734#define HAVE_LIBINTL 1
c0d27fcc 19735_ACEOF
ba4481b5
DL
19736
19737 LIBS="-lintl $LIBS"
19738
ba4481b5
DL
19739fi
19740
c0d27fcc
MR
19741
19742echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
19743echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
19744if test "${emacs_cv_localtime_cache+set}" = set; then
19745 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
19746else
19747 if test x$ac_cv_func_tzset = xyes; then
19748if test "$cross_compiling" = yes; then
19749 # If we have tzset, assume the worst when cross-compiling.
19750emacs_cv_localtime_cache=yes
19751else
503d2be0 19752 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19753/* confdefs.h. */
19754_ACEOF
19755cat confdefs.h >>conftest.$ac_ext
19756cat >>conftest.$ac_ext <<_ACEOF
19757/* end confdefs.h. */
ba4481b5 19758#include <time.h>
ba4481b5
DL
19759extern char **environ;
19760unset_TZ ()
19761{
19762 char **from, **to;
19763 for (to = from = environ; (*to = *from); from++)
19764 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
19765 to++;
19766}
19767char TZ_GMT0[] = "TZ=GMT0";
19768char TZ_PST8[] = "TZ=PST8";
19769main()
19770{
19771 time_t now = time ((time_t *) 0);
19772 int hour_GMT0, hour_unset;
19773 if (putenv (TZ_GMT0) != 0)
19774 exit (1);
19775 hour_GMT0 = localtime (&now)->tm_hour;
19776 unset_TZ ();
19777 hour_unset = localtime (&now)->tm_hour;
19778 if (putenv (TZ_PST8) != 0)
19779 exit (1);
19780 if (localtime (&now)->tm_hour == hour_GMT0)
19781 exit (1);
19782 unset_TZ ();
19783 if (localtime (&now)->tm_hour != hour_unset)
19784 exit (1);
19785 exit (0);
19786}
503d2be0
AS
19787_ACEOF
19788rm -f conftest$ac_exeext
c0d27fcc 19789if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
19790 (eval $ac_link) 2>&5
19791 ac_status=$?
c0d27fcc 19792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19793 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 19794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19795 (eval $ac_try) 2>&5
19796 ac_status=$?
c0d27fcc 19797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19798 (exit $ac_status); }; }; then
ba4481b5
DL
19799 emacs_cv_localtime_cache=no
19800else
503d2be0
AS
19801 echo "$as_me: program exited with status $ac_status" >&5
19802echo "$as_me: failed program was:" >&5
19650fd6
AS
19803sed 's/^/| /' conftest.$ac_ext >&5
19804
c0d27fcc 19805( exit $ac_status )
503d2be0 19806emacs_cv_localtime_cache=yes
ba4481b5 19807fi
35996d22 19808rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 19809fi
ba4481b5
DL
19810else
19811 # If we lack tzset, report that localtime does not cache TZ,
19812 # since we can't invalidate the cache if we don't have tzset.
19813 emacs_cv_localtime_cache=no
19814fi
19815fi
c0d27fcc 19816echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 19817echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 19818if test $emacs_cv_localtime_cache = yes; then
b936fae4 19819
c0d27fcc 19820cat >>confdefs.h <<\_ACEOF
ba4481b5 19821#define LOCALTIME_CACHE 1
c0d27fcc 19822_ACEOF
ba4481b5
DL
19823
19824fi
19825
19826if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
19827
19828for ac_func in gettimeofday
48d4b120 19829do
503d2be0 19830as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 19831echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
19832echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19833if eval "test \"\${$as_ac_var+set}\" = set"; then
19834 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 19835else
503d2be0 19836 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19837/* confdefs.h. */
19838_ACEOF
19839cat confdefs.h >>conftest.$ac_ext
19840cat >>conftest.$ac_ext <<_ACEOF
19841/* end confdefs.h. */
35996d22
AS
19842/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19843 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19844#define $ac_func innocuous_$ac_func
19845
48d4b120 19846/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19847 which can conflict with char $ac_func (); below.
19848 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19849 <limits.h> exists even on freestanding compilers. */
35996d22 19850
19650fd6
AS
19851#ifdef __STDC__
19852# include <limits.h>
19853#else
19854# include <assert.h>
19855#endif
35996d22
AS
19856
19857#undef $ac_func
19858
48d4b120 19859/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19860#ifdef __cplusplus
19861extern "C"
19650fd6 19862{
503d2be0 19863#endif
48d4b120 19864/* We use char because int might match the return type of a gcc2
503d2be0
AS
19865 builtin and then its argument prototype would still apply. */
19866char $ac_func ();
48d4b120
DL
19867/* The GNU C library defines this for functions which it implements
19868 to always fail with ENOSYS. Some functions are actually named
19869 something starting with __ and the normal name is an alias. */
19870#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19871choke me
19872#else
19650fd6
AS
19873char (*f) () = $ac_func;
19874#endif
19875#ifdef __cplusplus
19876}
cd958eb3
MB
19877#endif
19878
19650fd6
AS
19879int
19880main ()
19881{
19882return f != $ac_func;
503d2be0
AS
19883 ;
19884 return 0;
19885}
19886_ACEOF
19887rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19888if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 19889 (eval $ac_link) 2>conftest.er1
503d2be0 19890 ac_status=$?
35996d22
AS
19891 grep -v '^ *+' conftest.er1 >conftest.err
19892 rm -f conftest.er1
19893 cat conftest.err >&5
c0d27fcc 19894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19895 (exit $ac_status); } &&
4494a266
JD
19896 { ac_try='test -z "$ac_c_werror_flag"
19897 || test ! -s conftest.err'
35996d22
AS
19898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19899 (eval $ac_try) 2>&5
19900 ac_status=$?
19901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19902 (exit $ac_status); }; } &&
19903 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19905 (eval $ac_try) 2>&5
19906 ac_status=$?
c0d27fcc 19907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19908 (exit $ac_status); }; }; then
19909 eval "$as_ac_var=yes"
19910else
19911 echo "$as_me: failed program was:" >&5
19650fd6
AS
19912sed 's/^/| /' conftest.$ac_ext >&5
19913
503d2be0
AS
19914eval "$as_ac_var=no"
19915fi
35996d22
AS
19916rm -f conftest.err conftest.$ac_objext \
19917 conftest$ac_exeext conftest.$ac_ext
503d2be0 19918fi
c0d27fcc 19919echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
19920echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19921if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19922 cat >>confdefs.h <<_ACEOF
503d2be0 19923#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19924_ACEOF
48d4b120 19925
48d4b120
DL
19926fi
19927done
19928
b936fae4 19929 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 19930 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
19931echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
19932if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
19933 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19934else
503d2be0 19935 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19936/* confdefs.h. */
19937_ACEOF
19938cat confdefs.h >>conftest.$ac_ext
19939cat >>conftest.$ac_ext <<_ACEOF
19940/* end confdefs.h. */
ba4481b5 19941
a3f08d9e
DL
19942#ifdef TIME_WITH_SYS_TIME
19943#include <sys/time.h>
19944#include <time.h>
19945#else
19946#ifdef HAVE_SYS_TIME_H
19947#include <sys/time.h>
19948#else
19949#include <time.h>
19950#endif
19951#endif
503d2be0
AS
19952int
19953main ()
19954{
a3f08d9e 19955struct timeval time;
b936fae4 19956 gettimeofday (&time, 0);
503d2be0
AS
19957 ;
19958 return 0;
19959}
19960_ACEOF
19961rm -f conftest.$ac_objext
c0d27fcc 19962if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19963 (eval $ac_compile) 2>conftest.er1
503d2be0 19964 ac_status=$?
35996d22
AS
19965 grep -v '^ *+' conftest.er1 >conftest.err
19966 rm -f conftest.er1
19967 cat conftest.err >&5
c0d27fcc 19968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19969 (exit $ac_status); } &&
4494a266
JD
19970 { ac_try='test -z "$ac_c_werror_flag"
19971 || test ! -s conftest.err'
35996d22
AS
19972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19973 (eval $ac_try) 2>&5
19974 ac_status=$?
19975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19976 (exit $ac_status); }; } &&
19977 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 19978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19979 (eval $ac_try) 2>&5
19980 ac_status=$?
c0d27fcc 19981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19982 (exit $ac_status); }; }; then
ba4481b5
DL
19983 emacs_cv_gettimeofday_two_arguments=yes
19984else
503d2be0 19985 echo "$as_me: failed program was:" >&5
19650fd6
AS
19986sed 's/^/| /' conftest.$ac_ext >&5
19987
503d2be0 19988emacs_cv_gettimeofday_two_arguments=no
ba4481b5 19989fi
35996d22 19990rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 19991fi
c0d27fcc 19992echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 19993echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
19994 if test $emacs_cv_gettimeofday_two_arguments = no; then
19995
c0d27fcc 19996cat >>confdefs.h <<\_ACEOF
ba4481b5 19997#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 19998_ACEOF
ba4481b5 19999
b936fae4 20000 fi
ba4481b5
DL
20001 fi
20002fi
20003
973a76b1
DL
20004# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
20005echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20006echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
20007if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
20008 echo $ECHO_N "(cached) $ECHO_C" >&6
20009else
20010 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20011/* confdefs.h. */
20012_ACEOF
20013cat confdefs.h >>conftest.$ac_ext
20014cat >>conftest.$ac_ext <<_ACEOF
20015/* end confdefs.h. */
973a76b1
DL
20016#include <sys/types.h>
20017#include <$ac_cv_struct_tm>
20018
20019
20020int
20021main ()
20022{
20023static struct tm ac_aggr;
20024if (ac_aggr.tm_zone)
20025return 0;
20026 ;
20027 return 0;
20028}
20029_ACEOF
20030rm -f conftest.$ac_objext
20031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20032 (eval $ac_compile) 2>conftest.er1
973a76b1 20033 ac_status=$?
35996d22
AS
20034 grep -v '^ *+' conftest.er1 >conftest.err
20035 rm -f conftest.er1
20036 cat conftest.err >&5
973a76b1
DL
20037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20038 (exit $ac_status); } &&
4494a266
JD
20039 { ac_try='test -z "$ac_c_werror_flag"
20040 || test ! -s conftest.err'
35996d22
AS
20041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20042 (eval $ac_try) 2>&5
20043 ac_status=$?
20044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20045 (exit $ac_status); }; } &&
20046 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
20047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20048 (eval $ac_try) 2>&5
20049 ac_status=$?
20050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20051 (exit $ac_status); }; }; then
20052 ac_cv_member_struct_tm_tm_zone=yes
20053else
20054 echo "$as_me: failed program was:" >&5
19650fd6
AS
20055sed 's/^/| /' conftest.$ac_ext >&5
20056
973a76b1 20057cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20058/* confdefs.h. */
20059_ACEOF
20060cat confdefs.h >>conftest.$ac_ext
20061cat >>conftest.$ac_ext <<_ACEOF
20062/* end confdefs.h. */
973a76b1
DL
20063#include <sys/types.h>
20064#include <$ac_cv_struct_tm>
20065
20066
20067int
20068main ()
20069{
20070static struct tm ac_aggr;
20071if (sizeof ac_aggr.tm_zone)
20072return 0;
20073 ;
20074 return 0;
20075}
20076_ACEOF
20077rm -f conftest.$ac_objext
20078if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20079 (eval $ac_compile) 2>conftest.er1
973a76b1 20080 ac_status=$?
35996d22
AS
20081 grep -v '^ *+' conftest.er1 >conftest.err
20082 rm -f conftest.er1
20083 cat conftest.err >&5
973a76b1
DL
20084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20085 (exit $ac_status); } &&
4494a266
JD
20086 { ac_try='test -z "$ac_c_werror_flag"
20087 || test ! -s conftest.err'
35996d22
AS
20088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20089 (eval $ac_try) 2>&5
20090 ac_status=$?
20091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20092 (exit $ac_status); }; } &&
20093 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
20094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20095 (eval $ac_try) 2>&5
20096 ac_status=$?
20097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20098 (exit $ac_status); }; }; then
20099 ac_cv_member_struct_tm_tm_zone=yes
20100else
20101 echo "$as_me: failed program was:" >&5
19650fd6
AS
20102sed 's/^/| /' conftest.$ac_ext >&5
20103
973a76b1
DL
20104ac_cv_member_struct_tm_tm_zone=no
20105fi
35996d22 20106rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 20107fi
35996d22 20108rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
20109fi
20110echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20111echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
20112if test $ac_cv_member_struct_tm_tm_zone = yes; then
20113
20114cat >>confdefs.h <<_ACEOF
20115#define HAVE_STRUCT_TM_TM_ZONE 1
20116_ACEOF
20117
20118
20119fi
20120
20121if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20122
20123cat >>confdefs.h <<\_ACEOF
20124#define HAVE_TM_ZONE 1
20125_ACEOF
20126
20127else
20128 echo "$as_me:$LINENO: checking for tzname" >&5
20129echo $ECHO_N "checking for tzname... $ECHO_C" >&6
20130if test "${ac_cv_var_tzname+set}" = set; then
20131 echo $ECHO_N "(cached) $ECHO_C" >&6
20132else
20133 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20134/* confdefs.h. */
20135_ACEOF
20136cat confdefs.h >>conftest.$ac_ext
20137cat >>conftest.$ac_ext <<_ACEOF
20138/* end confdefs.h. */
973a76b1
DL
20139#include <time.h>
20140#ifndef tzname /* For SGI. */
20141extern char *tzname[]; /* RS6000 and others reject char **tzname. */
20142#endif
20143
20144int
20145main ()
20146{
20147atoi(*tzname);
20148 ;
20149 return 0;
20150}
20151_ACEOF
20152rm -f conftest.$ac_objext conftest$ac_exeext
20153if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 20154 (eval $ac_link) 2>conftest.er1
973a76b1 20155 ac_status=$?
35996d22
AS
20156 grep -v '^ *+' conftest.er1 >conftest.err
20157 rm -f conftest.er1
20158 cat conftest.err >&5
973a76b1
DL
20159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20160 (exit $ac_status); } &&
4494a266
JD
20161 { ac_try='test -z "$ac_c_werror_flag"
20162 || test ! -s conftest.err'
35996d22
AS
20163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20164 (eval $ac_try) 2>&5
20165 ac_status=$?
20166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20167 (exit $ac_status); }; } &&
20168 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
20169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20170 (eval $ac_try) 2>&5
20171 ac_status=$?
20172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20173 (exit $ac_status); }; }; then
20174 ac_cv_var_tzname=yes
20175else
20176 echo "$as_me: failed program was:" >&5
19650fd6
AS
20177sed 's/^/| /' conftest.$ac_ext >&5
20178
973a76b1
DL
20179ac_cv_var_tzname=no
20180fi
35996d22
AS
20181rm -f conftest.err conftest.$ac_objext \
20182 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
20183fi
20184echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20185echo "${ECHO_T}$ac_cv_var_tzname" >&6
20186 if test $ac_cv_var_tzname = yes; then
20187
20188cat >>confdefs.h <<\_ACEOF
20189#define HAVE_TZNAME 1
20190_ACEOF
20191
20192 fi
20193fi
20194
20195
48d4b120 20196if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 20197 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
20198echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
20199if test "${emacs_cv_struct_timezone+set}" = set; then
20200 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 20201else
503d2be0 20202 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20203/* confdefs.h. */
20204_ACEOF
20205cat confdefs.h >>conftest.$ac_ext
20206cat >>conftest.$ac_ext <<_ACEOF
20207/* end confdefs.h. */
48d4b120 20208#include <sys/time.h>
503d2be0
AS
20209int
20210main ()
20211{
48d4b120 20212struct timezone tz;
503d2be0
AS
20213 ;
20214 return 0;
20215}
20216_ACEOF
20217rm -f conftest.$ac_objext
c0d27fcc 20218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20219 (eval $ac_compile) 2>conftest.er1
503d2be0 20220 ac_status=$?
35996d22
AS
20221 grep -v '^ *+' conftest.er1 >conftest.err
20222 rm -f conftest.er1
20223 cat conftest.err >&5
c0d27fcc 20224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20225 (exit $ac_status); } &&
4494a266
JD
20226 { ac_try='test -z "$ac_c_werror_flag"
20227 || test ! -s conftest.err'
35996d22
AS
20228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20229 (eval $ac_try) 2>&5
20230 ac_status=$?
20231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20232 (exit $ac_status); }; } &&
20233 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20235 (eval $ac_try) 2>&5
20236 ac_status=$?
c0d27fcc 20237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20238 (exit $ac_status); }; }; then
48d4b120
DL
20239 if test "$cross_compiling" = yes; then
20240 emacs_cv_struct_timezone=yes
20241else
503d2be0 20242 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20243/* confdefs.h. */
20244_ACEOF
20245cat confdefs.h >>conftest.$ac_ext
20246cat >>conftest.$ac_ext <<_ACEOF
20247/* end confdefs.h. */
48d4b120
DL
20248
20249#ifdef TIME_WITH_SYS_TIME
20250#include <sys/time.h>
20251#include <time.h>
20252#else
20253#ifdef HAVE_SYS_TIME_H
20254#include <sys/time.h>
20255#else
20256#include <time.h>
20257#endif
20258#endif
20259main () {
20260 struct timeval time;
20261 struct timezone dummy;
20262 exit (gettimeofday (&time, &dummy));
20263}
503d2be0
AS
20264_ACEOF
20265rm -f conftest$ac_exeext
c0d27fcc 20266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
20267 (eval $ac_link) 2>&5
20268 ac_status=$?
c0d27fcc 20269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20270 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 20271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20272 (eval $ac_try) 2>&5
20273 ac_status=$?
c0d27fcc 20274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20275 (exit $ac_status); }; }; then
48d4b120
DL
20276 emacs_cv_struct_timezone=yes
20277else
503d2be0
AS
20278 echo "$as_me: program exited with status $ac_status" >&5
20279echo "$as_me: failed program was:" >&5
19650fd6
AS
20280sed 's/^/| /' conftest.$ac_ext >&5
20281
c0d27fcc 20282( exit $ac_status )
503d2be0 20283emacs_cv_struct_timezone=no
48d4b120 20284fi
35996d22 20285rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 20286fi
48d4b120 20287else
503d2be0 20288 echo "$as_me: failed program was:" >&5
19650fd6
AS
20289sed 's/^/| /' conftest.$ac_ext >&5
20290
503d2be0 20291emacs_cv_struct_timezone=no
48d4b120 20292fi
35996d22 20293rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
48d4b120 20294fi
c0d27fcc 20295echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 20296echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
20297fi
20298
ba4481b5 20299ok_so_far=yes
c0d27fcc 20300echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
20301echo $ECHO_N "checking for socket... $ECHO_C" >&6
20302if test "${ac_cv_func_socket+set}" = set; then
20303 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20304else
503d2be0 20305 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20306/* confdefs.h. */
20307_ACEOF
20308cat confdefs.h >>conftest.$ac_ext
20309cat >>conftest.$ac_ext <<_ACEOF
20310/* end confdefs.h. */
35996d22
AS
20311/* Define socket to an innocuous variant, in case <limits.h> declares socket.
20312 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20313#define socket innocuous_socket
20314
ba4481b5 20315/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20316 which can conflict with char socket (); below.
20317 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20318 <limits.h> exists even on freestanding compilers. */
35996d22 20319
19650fd6
AS
20320#ifdef __STDC__
20321# include <limits.h>
20322#else
20323# include <assert.h>
20324#endif
35996d22
AS
20325
20326#undef socket
20327
ba4481b5 20328/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20329#ifdef __cplusplus
20330extern "C"
19650fd6 20331{
503d2be0 20332#endif
ba4481b5 20333/* We use char because int might match the return type of a gcc2
503d2be0
AS
20334 builtin and then its argument prototype would still apply. */
20335char socket ();
ba4481b5
DL
20336/* The GNU C library defines this for functions which it implements
20337 to always fail with ENOSYS. Some functions are actually named
20338 something starting with __ and the normal name is an alias. */
20339#if defined (__stub_socket) || defined (__stub___socket)
20340choke me
20341#else
19650fd6
AS
20342char (*f) () = socket;
20343#endif
20344#ifdef __cplusplus
20345}
cd958eb3
MB
20346#endif
20347
19650fd6
AS
20348int
20349main ()
20350{
20351return f != socket;
503d2be0
AS
20352 ;
20353 return 0;
20354}
20355_ACEOF
20356rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20357if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 20358 (eval $ac_link) 2>conftest.er1
503d2be0 20359 ac_status=$?
35996d22
AS
20360 grep -v '^ *+' conftest.er1 >conftest.err
20361 rm -f conftest.er1
20362 cat conftest.err >&5
c0d27fcc 20363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20364 (exit $ac_status); } &&
4494a266
JD
20365 { ac_try='test -z "$ac_c_werror_flag"
20366 || test ! -s conftest.err'
35996d22
AS
20367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20368 (eval $ac_try) 2>&5
20369 ac_status=$?
20370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20371 (exit $ac_status); }; } &&
20372 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20374 (eval $ac_try) 2>&5
20375 ac_status=$?
c0d27fcc 20376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20377 (exit $ac_status); }; }; then
20378 ac_cv_func_socket=yes
20379else
20380 echo "$as_me: failed program was:" >&5
19650fd6
AS
20381sed 's/^/| /' conftest.$ac_ext >&5
20382
503d2be0
AS
20383ac_cv_func_socket=no
20384fi
35996d22
AS
20385rm -f conftest.err conftest.$ac_objext \
20386 conftest$ac_exeext conftest.$ac_ext
503d2be0 20387fi
c0d27fcc 20388echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
20389echo "${ECHO_T}$ac_cv_func_socket" >&6
20390if test $ac_cv_func_socket = yes; then
ba4481b5
DL
20391 :
20392else
503d2be0 20393 ok_so_far=no
ba4481b5
DL
20394fi
20395
20396if test $ok_so_far = yes; then
c0d27fcc
MR
20397 if test "${ac_cv_header_netinet_in_h+set}" = set; then
20398 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
20399echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
20400if test "${ac_cv_header_netinet_in_h+set}" = set; then
20401 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20402fi
20403echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
20404echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 20405else
c0d27fcc
MR
20406 # Is the header compilable?
20407echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
20408echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
20409cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20410/* confdefs.h. */
20411_ACEOF
20412cat confdefs.h >>conftest.$ac_ext
20413cat >>conftest.$ac_ext <<_ACEOF
20414/* end confdefs.h. */
c0d27fcc
MR
20415$ac_includes_default
20416#include <netinet/in.h>
20417_ACEOF
20418rm -f conftest.$ac_objext
20419if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20420 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20421 ac_status=$?
35996d22
AS
20422 grep -v '^ *+' conftest.er1 >conftest.err
20423 rm -f conftest.er1
20424 cat conftest.err >&5
c0d27fcc
MR
20425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20426 (exit $ac_status); } &&
4494a266
JD
20427 { ac_try='test -z "$ac_c_werror_flag"
20428 || test ! -s conftest.err'
35996d22
AS
20429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20430 (eval $ac_try) 2>&5
20431 ac_status=$?
20432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20433 (exit $ac_status); }; } &&
20434 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20436 (eval $ac_try) 2>&5
20437 ac_status=$?
20438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20439 (exit $ac_status); }; }; then
20440 ac_header_compiler=yes
20441else
20442 echo "$as_me: failed program was:" >&5
19650fd6
AS
20443sed 's/^/| /' conftest.$ac_ext >&5
20444
c0d27fcc
MR
20445ac_header_compiler=no
20446fi
35996d22 20447rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20448echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20449echo "${ECHO_T}$ac_header_compiler" >&6
20450
20451# Is the header present?
20452echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
20453echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
20454cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20455/* confdefs.h. */
20456_ACEOF
20457cat confdefs.h >>conftest.$ac_ext
20458cat >>conftest.$ac_ext <<_ACEOF
20459/* end confdefs.h. */
ba4481b5 20460#include <netinet/in.h>
503d2be0 20461_ACEOF
c0d27fcc 20462if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20463 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20464 ac_status=$?
6bae0ccf 20465 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20466 rm -f conftest.er1
20467 cat conftest.err >&5
c0d27fcc 20468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20469 (exit $ac_status); } >/dev/null; then
20470 if test -s conftest.err; then
20471 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20472 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20473 else
20474 ac_cpp_err=
20475 fi
20476else
20477 ac_cpp_err=yes
20478fi
20479if test -z "$ac_cpp_err"; then
c0d27fcc 20480 ac_header_preproc=yes
ba4481b5 20481else
503d2be0 20482 echo "$as_me: failed program was:" >&5
19650fd6
AS
20483sed 's/^/| /' conftest.$ac_ext >&5
20484
c0d27fcc 20485 ac_header_preproc=no
ba4481b5 20486fi
503d2be0 20487rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20488echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20489echo "${ECHO_T}$ac_header_preproc" >&6
20490
20491# So? What about this header?
35996d22
AS
20492case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20493 yes:no: )
c0d27fcc
MR
20494 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
20495echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20496 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
20497echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
20498 ac_header_preproc=yes
19650fd6 20499 ;;
35996d22 20500 no:yes:* )
c0d27fcc
MR
20501 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
20502echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
35996d22
AS
20503 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
20504echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
20505 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
20506echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
20507 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
20508echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20509 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 20510echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20511 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
20512echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20513 (
20514 cat <<\_ASBOX
35996d22
AS
20515## ------------------------------------------ ##
20516## Report this to the AC_PACKAGE_NAME lists. ##
20517## ------------------------------------------ ##
19650fd6
AS
20518_ASBOX
20519 ) |
20520 sed "s/^/$as_me: WARNING: /" >&2
20521 ;;
c0d27fcc
MR
20522esac
20523echo "$as_me:$LINENO: checking for netinet/in.h" >&5
20524echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
20525if test "${ac_cv_header_netinet_in_h+set}" = set; then
20526 echo $ECHO_N "(cached) $ECHO_C" >&6
20527else
20528 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 20529fi
c0d27fcc 20530echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 20531echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
20532
20533fi
503d2be0 20534if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
20535 :
20536else
503d2be0 20537 ok_so_far=no
ba4481b5
DL
20538fi
20539
c0d27fcc 20540
ba4481b5
DL
20541fi
20542if test $ok_so_far = yes; then
c0d27fcc
MR
20543 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20544 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
20545echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
20546if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20547 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20548fi
20549echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
20550echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 20551else
c0d27fcc
MR
20552 # Is the header compilable?
20553echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
20554echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
20555cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20556/* confdefs.h. */
20557_ACEOF
20558cat confdefs.h >>conftest.$ac_ext
20559cat >>conftest.$ac_ext <<_ACEOF
20560/* end confdefs.h. */
c0d27fcc
MR
20561$ac_includes_default
20562#include <arpa/inet.h>
20563_ACEOF
20564rm -f conftest.$ac_objext
20565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20566 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20567 ac_status=$?
35996d22
AS
20568 grep -v '^ *+' conftest.er1 >conftest.err
20569 rm -f conftest.er1
20570 cat conftest.err >&5
c0d27fcc
MR
20571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20572 (exit $ac_status); } &&
4494a266
JD
20573 { ac_try='test -z "$ac_c_werror_flag"
20574 || test ! -s conftest.err'
35996d22
AS
20575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20576 (eval $ac_try) 2>&5
20577 ac_status=$?
20578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20579 (exit $ac_status); }; } &&
20580 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20582 (eval $ac_try) 2>&5
20583 ac_status=$?
20584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20585 (exit $ac_status); }; }; then
20586 ac_header_compiler=yes
20587else
20588 echo "$as_me: failed program was:" >&5
19650fd6
AS
20589sed 's/^/| /' conftest.$ac_ext >&5
20590
c0d27fcc
MR
20591ac_header_compiler=no
20592fi
35996d22 20593rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20594echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20595echo "${ECHO_T}$ac_header_compiler" >&6
20596
20597# Is the header present?
20598echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
20599echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
20600cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20601/* confdefs.h. */
20602_ACEOF
20603cat confdefs.h >>conftest.$ac_ext
20604cat >>conftest.$ac_ext <<_ACEOF
20605/* end confdefs.h. */
ba4481b5 20606#include <arpa/inet.h>
503d2be0 20607_ACEOF
c0d27fcc 20608if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20609 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20610 ac_status=$?
6bae0ccf 20611 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20612 rm -f conftest.er1
20613 cat conftest.err >&5
c0d27fcc 20614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20615 (exit $ac_status); } >/dev/null; then
20616 if test -s conftest.err; then
20617 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20618 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20619 else
20620 ac_cpp_err=
20621 fi
20622else
20623 ac_cpp_err=yes
20624fi
20625if test -z "$ac_cpp_err"; then
c0d27fcc 20626 ac_header_preproc=yes
ba4481b5 20627else
503d2be0 20628 echo "$as_me: failed program was:" >&5
19650fd6
AS
20629sed 's/^/| /' conftest.$ac_ext >&5
20630
c0d27fcc 20631 ac_header_preproc=no
ba4481b5 20632fi
503d2be0 20633rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20634echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20635echo "${ECHO_T}$ac_header_preproc" >&6
20636
20637# So? What about this header?
35996d22
AS
20638case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20639 yes:no: )
c0d27fcc
MR
20640 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
20641echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20642 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
20643echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
20644 ac_header_preproc=yes
19650fd6 20645 ;;
35996d22 20646 no:yes:* )
c0d27fcc
MR
20647 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
20648echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
35996d22
AS
20649 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
20650echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
20651 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
20652echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
20653 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
20654echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20655 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 20656echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20657 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
20658echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20659 (
20660 cat <<\_ASBOX
35996d22
AS
20661## ------------------------------------------ ##
20662## Report this to the AC_PACKAGE_NAME lists. ##
20663## ------------------------------------------ ##
19650fd6
AS
20664_ASBOX
20665 ) |
20666 sed "s/^/$as_me: WARNING: /" >&2
20667 ;;
c0d27fcc
MR
20668esac
20669echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
20670echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
20671if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20672 echo $ECHO_N "(cached) $ECHO_C" >&6
20673else
20674 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 20675fi
c0d27fcc 20676echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 20677echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
20678
20679fi
503d2be0 20680if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
20681 :
20682else
503d2be0 20683 ok_so_far=no
ba4481b5
DL
20684fi
20685
c0d27fcc 20686
ba4481b5
DL
20687fi
20688if test $ok_so_far = yes; then
b936fae4 20689
c0d27fcc 20690cat >>confdefs.h <<\_ACEOF
ba4481b5 20691#define HAVE_INET_SOCKETS 1
c0d27fcc 20692_ACEOF
ba4481b5
DL
20693
20694fi
20695
2d2b6695 20696
7862d3a8 20697for ac_header in sys/ioctl.h
2d2b6695
KS
20698do
20699as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20700if eval "test \"\${$as_ac_Header+set}\" = set"; then
20701 echo "$as_me:$LINENO: checking for $ac_header" >&5
20702echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20703if eval "test \"\${$as_ac_Header+set}\" = set"; then
20704 echo $ECHO_N "(cached) $ECHO_C" >&6
20705fi
20706echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20707echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20708else
20709 # Is the header compilable?
20710echo "$as_me:$LINENO: checking $ac_header usability" >&5
20711echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20712cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
20713/* confdefs.h. */
20714_ACEOF
20715cat confdefs.h >>conftest.$ac_ext
20716cat >>conftest.$ac_ext <<_ACEOF
20717/* end confdefs.h. */
20718$ac_includes_default
20719#include <$ac_header>
20720_ACEOF
20721rm -f conftest.$ac_objext
20722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20723 (eval $ac_compile) 2>conftest.er1
2d2b6695 20724 ac_status=$?
35996d22
AS
20725 grep -v '^ *+' conftest.er1 >conftest.err
20726 rm -f conftest.er1
20727 cat conftest.err >&5
2d2b6695
KS
20728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20729 (exit $ac_status); } &&
4494a266
JD
20730 { ac_try='test -z "$ac_c_werror_flag"
20731 || test ! -s conftest.err'
35996d22
AS
20732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20733 (eval $ac_try) 2>&5
20734 ac_status=$?
20735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20736 (exit $ac_status); }; } &&
20737 { ac_try='test -s conftest.$ac_objext'
2d2b6695
KS
20738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20739 (eval $ac_try) 2>&5
20740 ac_status=$?
20741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20742 (exit $ac_status); }; }; then
20743 ac_header_compiler=yes
20744else
20745 echo "$as_me: failed program was:" >&5
20746sed 's/^/| /' conftest.$ac_ext >&5
20747
20748ac_header_compiler=no
20749fi
35996d22 20750rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2d2b6695
KS
20751echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20752echo "${ECHO_T}$ac_header_compiler" >&6
20753
20754# Is the header present?
20755echo "$as_me:$LINENO: checking $ac_header presence" >&5
20756echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20757cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
20758/* confdefs.h. */
20759_ACEOF
20760cat confdefs.h >>conftest.$ac_ext
20761cat >>conftest.$ac_ext <<_ACEOF
20762/* end confdefs.h. */
20763#include <$ac_header>
20764_ACEOF
20765if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20766 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20767 ac_status=$?
20768 grep -v '^ *+' conftest.er1 >conftest.err
20769 rm -f conftest.er1
20770 cat conftest.err >&5
20771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20772 (exit $ac_status); } >/dev/null; then
20773 if test -s conftest.err; then
20774 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20775 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2d2b6695
KS
20776 else
20777 ac_cpp_err=
20778 fi
20779else
20780 ac_cpp_err=yes
20781fi
20782if test -z "$ac_cpp_err"; then
20783 ac_header_preproc=yes
20784else
20785 echo "$as_me: failed program was:" >&5
20786sed 's/^/| /' conftest.$ac_ext >&5
20787
20788 ac_header_preproc=no
20789fi
20790rm -f conftest.err conftest.$ac_ext
20791echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20792echo "${ECHO_T}$ac_header_preproc" >&6
20793
20794# So? What about this header?
35996d22
AS
20795case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20796 yes:no: )
2d2b6695
KS
20797 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20798echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20799 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20800echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20801 ac_header_preproc=yes
2d2b6695 20802 ;;
35996d22 20803 no:yes:* )
2d2b6695
KS
20804 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20805echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
20806 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20807echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20808 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20809echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20810 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20811echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
20812 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20813echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20814 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20815echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
2d2b6695
KS
20816 (
20817 cat <<\_ASBOX
35996d22
AS
20818## ------------------------------------------ ##
20819## Report this to the AC_PACKAGE_NAME lists. ##
20820## ------------------------------------------ ##
2d2b6695
KS
20821_ASBOX
20822 ) |
20823 sed "s/^/$as_me: WARNING: /" >&2
20824 ;;
20825esac
20826echo "$as_me:$LINENO: checking for $ac_header" >&5
20827echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20828if eval "test \"\${$as_ac_Header+set}\" = set"; then
20829 echo $ECHO_N "(cached) $ECHO_C" >&6
20830else
35996d22 20831 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695
KS
20832fi
20833echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20834echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20835
20836fi
20837if test `eval echo '${'$as_ac_Header'}'` = yes; then
20838 cat >>confdefs.h <<_ACEOF
20839#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20840_ACEOF
20841
20842fi
20843
20844done
20845
20846
ba4481b5 20847if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 20848
c0d27fcc 20849cat >>confdefs.h <<\_ACEOF
ba4481b5 20850#define HAVE_AIX_SMT_EXP 1
c0d27fcc 20851_ACEOF
ba4481b5
DL
20852
20853fi
20854
c0d27fcc 20855echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 20856echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 20857if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 20858 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 20859echo "${ECHO_T}yes" >&6
b936fae4 20860
c0d27fcc 20861cat >>confdefs.h <<\_ACEOF
3d9fec71 20862#define HAVE_DEV_PTMX 1
c0d27fcc 20863_ACEOF
3d9fec71
DL
20864
20865else
c0d27fcc 20866 echo "$as_me:$LINENO: result: no" >&5
503d2be0 20867echo "${ECHO_T}no" >&6
3d9fec71
DL
20868fi
20869
c0d27fcc 20870echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
20871echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
20872if test "${ac_cv_type_pid_t+set}" = set; then
20873 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 20874else
503d2be0 20875 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20876/* confdefs.h. */
20877_ACEOF
20878cat confdefs.h >>conftest.$ac_ext
20879cat >>conftest.$ac_ext <<_ACEOF
20880/* end confdefs.h. */
503d2be0
AS
20881$ac_includes_default
20882int
20883main ()
20884{
20885if ((pid_t *) 0)
20886 return 0;
20887if (sizeof (pid_t))
20888 return 0;
20889 ;
20890 return 0;
20891}
20892_ACEOF
20893rm -f conftest.$ac_objext
c0d27fcc 20894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20895 (eval $ac_compile) 2>conftest.er1
503d2be0 20896 ac_status=$?
35996d22
AS
20897 grep -v '^ *+' conftest.er1 >conftest.err
20898 rm -f conftest.er1
20899 cat conftest.err >&5
c0d27fcc 20900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20901 (exit $ac_status); } &&
4494a266
JD
20902 { ac_try='test -z "$ac_c_werror_flag"
20903 || test ! -s conftest.err'
35996d22
AS
20904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20905 (eval $ac_try) 2>&5
20906 ac_status=$?
20907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20908 (exit $ac_status); }; } &&
20909 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20911 (eval $ac_try) 2>&5
20912 ac_status=$?
c0d27fcc 20913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20914 (exit $ac_status); }; }; then
647847ea
DL
20915 ac_cv_type_pid_t=yes
20916else
503d2be0 20917 echo "$as_me: failed program was:" >&5
19650fd6
AS
20918sed 's/^/| /' conftest.$ac_ext >&5
20919
503d2be0 20920ac_cv_type_pid_t=no
647847ea 20921fi
35996d22 20922rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 20923fi
c0d27fcc 20924echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
20925echo "${ECHO_T}$ac_cv_type_pid_t" >&6
20926if test $ac_cv_type_pid_t = yes; then
20927 :
20928else
20929
c0d27fcc 20930cat >>confdefs.h <<_ACEOF
647847ea 20931#define pid_t int
c0d27fcc 20932_ACEOF
647847ea
DL
20933
20934fi
20935
c0d27fcc
MR
20936
20937
503d2be0
AS
20938for ac_header in unistd.h vfork.h
20939do
20940as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20941if eval "test \"\${$as_ac_Header+set}\" = set"; then
20942 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20943echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20944if eval "test \"\${$as_ac_Header+set}\" = set"; then
20945 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20946fi
20947echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20948echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20949else
c0d27fcc
MR
20950 # Is the header compilable?
20951echo "$as_me:$LINENO: checking $ac_header usability" >&5
20952echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20953cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20954/* confdefs.h. */
20955_ACEOF
20956cat confdefs.h >>conftest.$ac_ext
20957cat >>conftest.$ac_ext <<_ACEOF
20958/* end confdefs.h. */
c0d27fcc
MR
20959$ac_includes_default
20960#include <$ac_header>
20961_ACEOF
20962rm -f conftest.$ac_objext
20963if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20964 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20965 ac_status=$?
35996d22
AS
20966 grep -v '^ *+' conftest.er1 >conftest.err
20967 rm -f conftest.er1
20968 cat conftest.err >&5
c0d27fcc
MR
20969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20970 (exit $ac_status); } &&
4494a266
JD
20971 { ac_try='test -z "$ac_c_werror_flag"
20972 || test ! -s conftest.err'
35996d22
AS
20973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20974 (eval $ac_try) 2>&5
20975 ac_status=$?
20976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20977 (exit $ac_status); }; } &&
20978 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20980 (eval $ac_try) 2>&5
20981 ac_status=$?
20982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20983 (exit $ac_status); }; }; then
20984 ac_header_compiler=yes
20985else
20986 echo "$as_me: failed program was:" >&5
19650fd6
AS
20987sed 's/^/| /' conftest.$ac_ext >&5
20988
c0d27fcc
MR
20989ac_header_compiler=no
20990fi
35996d22 20991rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20992echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20993echo "${ECHO_T}$ac_header_compiler" >&6
20994
20995# Is the header present?
20996echo "$as_me:$LINENO: checking $ac_header presence" >&5
20997echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20998cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20999/* confdefs.h. */
21000_ACEOF
21001cat confdefs.h >>conftest.$ac_ext
21002cat >>conftest.$ac_ext <<_ACEOF
21003/* end confdefs.h. */
503d2be0
AS
21004#include <$ac_header>
21005_ACEOF
c0d27fcc 21006if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21007 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21008 ac_status=$?
6bae0ccf 21009 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21010 rm -f conftest.er1
21011 cat conftest.err >&5
c0d27fcc 21012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21013 (exit $ac_status); } >/dev/null; then
21014 if test -s conftest.err; then
21015 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 21016 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21017 else
21018 ac_cpp_err=
21019 fi
647847ea 21020else
503d2be0
AS
21021 ac_cpp_err=yes
21022fi
21023if test -z "$ac_cpp_err"; then
c0d27fcc 21024 ac_header_preproc=yes
647847ea 21025else
503d2be0 21026 echo "$as_me: failed program was:" >&5
19650fd6
AS
21027sed 's/^/| /' conftest.$ac_ext >&5
21028
c0d27fcc 21029 ac_header_preproc=no
647847ea 21030fi
503d2be0 21031rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
21032echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21033echo "${ECHO_T}$ac_header_preproc" >&6
21034
21035# So? What about this header?
35996d22
AS
21036case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21037 yes:no: )
c0d27fcc
MR
21038 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21039echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
21040 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21041echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21042 ac_header_preproc=yes
19650fd6 21043 ;;
35996d22 21044 no:yes:* )
c0d27fcc
MR
21045 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21046echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
21047 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21048echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21049 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21050echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21051 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21052echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21053 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21054echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
21055 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21056echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
21057 (
21058 cat <<\_ASBOX
35996d22
AS
21059## ------------------------------------------ ##
21060## Report this to the AC_PACKAGE_NAME lists. ##
21061## ------------------------------------------ ##
19650fd6
AS
21062_ASBOX
21063 ) |
21064 sed "s/^/$as_me: WARNING: /" >&2
21065 ;;
c0d27fcc
MR
21066esac
21067echo "$as_me:$LINENO: checking for $ac_header" >&5
21068echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21069if eval "test \"\${$as_ac_Header+set}\" = set"; then
21070 echo $ECHO_N "(cached) $ECHO_C" >&6
21071else
35996d22 21072 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 21073fi
c0d27fcc 21074echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 21075echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
21076
21077fi
503d2be0 21078if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21079 cat >>confdefs.h <<_ACEOF
503d2be0 21080#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21081_ACEOF
647847ea 21082
73b77ee5 21083fi
c0d27fcc 21084
503d2be0 21085done
73b77ee5 21086
c0d27fcc
MR
21087
21088
503d2be0
AS
21089for ac_func in fork vfork
21090do
21091as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 21092echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
21093echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21094if eval "test \"\${$as_ac_var+set}\" = set"; then
21095 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 21096else
503d2be0 21097 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21098/* confdefs.h. */
21099_ACEOF
21100cat confdefs.h >>conftest.$ac_ext
21101cat >>conftest.$ac_ext <<_ACEOF
21102/* end confdefs.h. */
35996d22
AS
21103/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21104 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21105#define $ac_func innocuous_$ac_func
21106
fa0b693c 21107/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21108 which can conflict with char $ac_func (); below.
21109 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21110 <limits.h> exists even on freestanding compilers. */
35996d22 21111
19650fd6
AS
21112#ifdef __STDC__
21113# include <limits.h>
21114#else
21115# include <assert.h>
21116#endif
35996d22
AS
21117
21118#undef $ac_func
21119
fa0b693c 21120/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
21121#ifdef __cplusplus
21122extern "C"
19650fd6 21123{
503d2be0 21124#endif
fa0b693c 21125/* We use char because int might match the return type of a gcc2
503d2be0
AS
21126 builtin and then its argument prototype would still apply. */
21127char $ac_func ();
fa0b693c
GM
21128/* The GNU C library defines this for functions which it implements
21129 to always fail with ENOSYS. Some functions are actually named
21130 something starting with __ and the normal name is an alias. */
503d2be0 21131#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
21132choke me
21133#else
19650fd6
AS
21134char (*f) () = $ac_func;
21135#endif
21136#ifdef __cplusplus
21137}
fa0b693c
GM
21138#endif
21139
19650fd6
AS
21140int
21141main ()
21142{
21143return f != $ac_func;
503d2be0
AS
21144 ;
21145 return 0;
21146}
21147_ACEOF
21148rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 21149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 21150 (eval $ac_link) 2>conftest.er1
503d2be0 21151 ac_status=$?
35996d22
AS
21152 grep -v '^ *+' conftest.er1 >conftest.err
21153 rm -f conftest.er1
21154 cat conftest.err >&5
c0d27fcc 21155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21156 (exit $ac_status); } &&
4494a266
JD
21157 { ac_try='test -z "$ac_c_werror_flag"
21158 || test ! -s conftest.err'
35996d22
AS
21159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21160 (eval $ac_try) 2>&5
21161 ac_status=$?
21162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21163 (exit $ac_status); }; } &&
21164 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 21165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21166 (eval $ac_try) 2>&5
21167 ac_status=$?
c0d27fcc 21168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21169 (exit $ac_status); }; }; then
21170 eval "$as_ac_var=yes"
21171else
21172 echo "$as_me: failed program was:" >&5
19650fd6
AS
21173sed 's/^/| /' conftest.$ac_ext >&5
21174
503d2be0
AS
21175eval "$as_ac_var=no"
21176fi
35996d22
AS
21177rm -f conftest.err conftest.$ac_objext \
21178 conftest$ac_exeext conftest.$ac_ext
503d2be0 21179fi
c0d27fcc 21180echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
21181echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21182if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 21183 cat >>confdefs.h <<_ACEOF
503d2be0 21184#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 21185_ACEOF
503d2be0 21186
fa0b693c 21187fi
503d2be0 21188done
fa0b693c 21189
503d2be0 21190if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 21191 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
21192echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21193if test "${ac_cv_func_fork_works+set}" = set; then
21194 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 21195else
503d2be0
AS
21196 if test "$cross_compiling" = yes; then
21197 ac_cv_func_fork_works=cross
21198else
21199 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 21200/* By Ruediger Kuhlmann. */
503d2be0
AS
21201 #include <sys/types.h>
21202 #if HAVE_UNISTD_H
21203 # include <unistd.h>
21204 #endif
21205 /* Some systems only have a dummy stub for fork() */
21206 int main ()
21207 {
35996d22
AS
21208 if (fork() < 0)
21209 exit (1);
21210 exit (0);
503d2be0
AS
21211 }
21212_ACEOF
21213rm -f conftest$ac_exeext
c0d27fcc 21214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21215 (eval $ac_link) 2>&5
21216 ac_status=$?
c0d27fcc 21217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21220 (eval $ac_try) 2>&5
21221 ac_status=$?
c0d27fcc 21222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21223 (exit $ac_status); }; }; then
21224 ac_cv_func_fork_works=yes
21225else
21226 echo "$as_me: program exited with status $ac_status" >&5
21227echo "$as_me: failed program was:" >&5
19650fd6
AS
21228sed 's/^/| /' conftest.$ac_ext >&5
21229
c0d27fcc 21230( exit $ac_status )
503d2be0
AS
21231ac_cv_func_fork_works=no
21232fi
35996d22 21233rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
21234fi
21235fi
c0d27fcc 21236echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
21237echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21238
6bae0ccf
DL
21239else
21240 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
21241fi
21242if test "x$ac_cv_func_fork_works" = xcross; then
21243 case $host in
21244 *-*-amigaos* | *-*-msdosdjgpp*)
21245 # Override, as these systems have only a dummy fork() stub
21246 ac_cv_func_fork_works=no
21247 ;;
21248 *)
21249 ac_cv_func_fork_works=yes
21250 ;;
21251 esac
c0d27fcc
MR
21252 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
21253echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 21254fi
73b77ee5 21255ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 21256if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 21257 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
21258echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21259if test "${ac_cv_func_vfork_works+set}" = set; then
21260 echo $ECHO_N "(cached) $ECHO_C" >&6
21261else
21262 if test "$cross_compiling" = yes; then
21263 ac_cv_func_vfork_works=cross
fa0b693c 21264else
503d2be0 21265 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21266/* confdefs.h. */
21267_ACEOF
21268cat confdefs.h >>conftest.$ac_ext
21269cat >>conftest.$ac_ext <<_ACEOF
21270/* end confdefs.h. */
73b77ee5
GM
21271/* Thanks to Paul Eggert for this test. */
21272#include <stdio.h>
19650fd6 21273#include <stdlib.h>
fa0b693c 21274#include <sys/types.h>
73b77ee5 21275#include <sys/stat.h>
19650fd6 21276#include <sys/wait.h>
503d2be0
AS
21277#if HAVE_UNISTD_H
21278# include <unistd.h>
73b77ee5 21279#endif
503d2be0
AS
21280#if HAVE_VFORK_H
21281# include <vfork.h>
73b77ee5
GM
21282#endif
21283/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
21284 argument registers are propagated back to the parent. The compiler
21285 is told about this with #include <vfork.h>, but some compilers
21286 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
21287 static variable whose address is put into a register that is
21288 clobbered by the vfork. */
19650fd6 21289static void
fa0b693c 21290#ifdef __cplusplus
73b77ee5 21291sparc_address_test (int arg)
503d2be0 21292# else
73b77ee5 21293sparc_address_test (arg) int arg;
fa0b693c 21294#endif
fa0b693c 21295{
73b77ee5
GM
21296 static pid_t child;
21297 if (!child) {
21298 child = vfork ();
21299 if (child < 0) {
21300 perror ("vfork");
21301 _exit(2);
21302 }
21303 if (!child) {
21304 arg = getpid();
21305 write(-1, "", 0);
21306 _exit (arg);
21307 }
21308 }
21309}
503d2be0
AS
21310
21311int
21312main ()
21313{
73b77ee5
GM
21314 pid_t parent = getpid ();
21315 pid_t child;
fa0b693c 21316
19650fd6 21317 sparc_address_test (0);
fa0b693c 21318
73b77ee5 21319 child = vfork ();
fa0b693c 21320
73b77ee5 21321 if (child == 0) {
503d2be0
AS
21322 /* Here is another test for sparc vfork register problems. This
21323 test uses lots of local variables, at least as many local
21324 variables as main has allocated so far including compiler
21325 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
21326 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
21327 reuse the register of parent for one of the local variables,
21328 since it will think that parent can't possibly be used any more
21329 in this routine. Assigning to the local variable will thus
21330 munge parent in the parent process. */
73b77ee5
GM
21331 pid_t
21332 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21333 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21334 /* Convince the compiler that p..p7 are live; otherwise, it might
21335 use the same hardware register for all 8 local variables. */
21336 if (p != p1 || p != p2 || p != p3 || p != p4
21337 || p != p5 || p != p6 || p != p7)
21338 _exit(1);
fa0b693c 21339
503d2be0
AS
21340 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21341 from child file descriptors. If the child closes a descriptor
21342 before it execs or exits, this munges the parent's descriptor
21343 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
21344 _exit(close(fileno(stdout)) != 0);
21345 } else {
21346 int status;
21347 struct stat st;
21348
21349 while (wait(&status) != child)
21350 ;
21351 exit(
21352 /* Was there some problem with vforking? */
21353 child < 0
21354
21355 /* Did the child fail? (This shouldn't happen.) */
21356 || status
21357
21358 /* Did the vfork/compiler bug occur? */
21359 || parent != getpid()
fa0b693c 21360
73b77ee5
GM
21361 /* Did the file descriptor bug occur? */
21362 || fstat(fileno(stdout), &st) != 0
21363 );
21364 }
21365}
503d2be0
AS
21366_ACEOF
21367rm -f conftest$ac_exeext
c0d27fcc 21368if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21369 (eval $ac_link) 2>&5
21370 ac_status=$?
c0d27fcc 21371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21372 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21374 (eval $ac_try) 2>&5
21375 ac_status=$?
c0d27fcc 21376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21377 (exit $ac_status); }; }; then
73b77ee5 21378 ac_cv_func_vfork_works=yes
fa0b693c 21379else
503d2be0
AS
21380 echo "$as_me: program exited with status $ac_status" >&5
21381echo "$as_me: failed program was:" >&5
19650fd6
AS
21382sed 's/^/| /' conftest.$ac_ext >&5
21383
c0d27fcc 21384( exit $ac_status )
503d2be0
AS
21385ac_cv_func_vfork_works=no
21386fi
35996d22 21387rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 21388fi
fa0b693c 21389fi
c0d27fcc 21390echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 21391echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 21392
503d2be0
AS
21393fi;
21394if test "x$ac_cv_func_fork_works" = xcross; then
35996d22 21395 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
21396 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
21397echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
21398fi
21399
503d2be0
AS
21400if test "x$ac_cv_func_vfork_works" = xyes; then
21401
c0d27fcc 21402cat >>confdefs.h <<\_ACEOF
503d2be0 21403#define HAVE_WORKING_VFORK 1
c0d27fcc 21404_ACEOF
503d2be0
AS
21405
21406else
21407
c0d27fcc 21408cat >>confdefs.h <<\_ACEOF
73b77ee5 21409#define vfork fork
c0d27fcc 21410_ACEOF
fa0b693c
GM
21411
21412fi
503d2be0
AS
21413if test "x$ac_cv_func_fork_works" = xyes; then
21414
c0d27fcc 21415cat >>confdefs.h <<\_ACEOF
503d2be0 21416#define HAVE_WORKING_FORK 1
c0d27fcc 21417_ACEOF
fa0b693c 21418
503d2be0 21419fi
647847ea 21420
c0d27fcc 21421
6a3a24fa
JD
21422echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
21423echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
21424if test "${emacs_cv_langinfo_codeset+set}" = set; then
21425 echo $ECHO_N "(cached) $ECHO_C" >&6
21426else
21427 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21428/* confdefs.h. */
21429_ACEOF
21430cat confdefs.h >>conftest.$ac_ext
21431cat >>conftest.$ac_ext <<_ACEOF
21432/* end confdefs.h. */
6a3a24fa
JD
21433#include <langinfo.h>
21434int
21435main ()
21436{
21437char* cs = nl_langinfo(CODESET);
21438 ;
21439 return 0;
21440}
21441_ACEOF
21442rm -f conftest.$ac_objext conftest$ac_exeext
21443if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 21444 (eval $ac_link) 2>conftest.er1
6a3a24fa 21445 ac_status=$?
35996d22
AS
21446 grep -v '^ *+' conftest.er1 >conftest.err
21447 rm -f conftest.er1
21448 cat conftest.err >&5
6a3a24fa
JD
21449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21450 (exit $ac_status); } &&
4494a266
JD
21451 { ac_try='test -z "$ac_c_werror_flag"
21452 || test ! -s conftest.err'
35996d22
AS
21453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21454 (eval $ac_try) 2>&5
21455 ac_status=$?
21456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21457 (exit $ac_status); }; } &&
21458 { ac_try='test -s conftest$ac_exeext'
6a3a24fa
JD
21459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21460 (eval $ac_try) 2>&5
21461 ac_status=$?
21462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21463 (exit $ac_status); }; }; then
21464 emacs_cv_langinfo_codeset=yes
21465else
21466 echo "$as_me: failed program was:" >&5
19650fd6
AS
21467sed 's/^/| /' conftest.$ac_ext >&5
21468
6a3a24fa
JD
21469emacs_cv_langinfo_codeset=no
21470fi
35996d22
AS
21471rm -f conftest.err conftest.$ac_objext \
21472 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
21473
21474fi
21475echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
21476echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
21477if test $emacs_cv_langinfo_codeset = yes; then
21478
21479cat >>confdefs.h <<\_ACEOF
21480#define HAVE_LANGINFO_CODESET 1
21481_ACEOF
21482
21483fi
21484
c0d27fcc 21485echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
21486echo $ECHO_N "checking for size_t... $ECHO_C" >&6
21487if test "${ac_cv_type_size_t+set}" = set; then
21488 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 21489else
503d2be0 21490 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21491/* confdefs.h. */
21492_ACEOF
21493cat confdefs.h >>conftest.$ac_ext
21494cat >>conftest.$ac_ext <<_ACEOF
21495/* end confdefs.h. */
503d2be0
AS
21496$ac_includes_default
21497int
21498main ()
21499{
21500if ((size_t *) 0)
21501 return 0;
21502if (sizeof (size_t))
21503 return 0;
21504 ;
21505 return 0;
21506}
21507_ACEOF
21508rm -f conftest.$ac_objext
c0d27fcc 21509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21510 (eval $ac_compile) 2>conftest.er1
503d2be0 21511 ac_status=$?
35996d22
AS
21512 grep -v '^ *+' conftest.er1 >conftest.err
21513 rm -f conftest.er1
21514 cat conftest.err >&5
c0d27fcc 21515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21516 (exit $ac_status); } &&
4494a266
JD
21517 { ac_try='test -z "$ac_c_werror_flag"
21518 || test ! -s conftest.err'
35996d22
AS
21519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21520 (eval $ac_try) 2>&5
21521 ac_status=$?
21522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21523 (exit $ac_status); }; } &&
21524 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21526 (eval $ac_try) 2>&5
21527 ac_status=$?
c0d27fcc 21528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21529 (exit $ac_status); }; }; then
8730a8da
DL
21530 ac_cv_type_size_t=yes
21531else
503d2be0 21532 echo "$as_me: failed program was:" >&5
19650fd6
AS
21533sed 's/^/| /' conftest.$ac_ext >&5
21534
503d2be0 21535ac_cv_type_size_t=no
8730a8da 21536fi
35996d22 21537rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 21538fi
c0d27fcc 21539echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
21540echo "${ECHO_T}$ac_cv_type_size_t" >&6
21541if test $ac_cv_type_size_t = yes; then
503d2be0 21542
c0d27fcc
MR
21543cat >>confdefs.h <<_ACEOF
21544#define HAVE_SIZE_T 1
21545_ACEOF
21546
8730a8da
DL
21547
21548fi
21549
c0d27fcc 21550
973a76b1
DL
21551echo "$as_me:$LINENO: checking for mbstate_t" >&5
21552echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
21553if test "${ac_cv_type_mbstate_t+set}" = set; then
21554 echo $ECHO_N "(cached) $ECHO_C" >&6
21555else
21556 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21557/* confdefs.h. */
21558_ACEOF
21559cat confdefs.h >>conftest.$ac_ext
21560cat >>conftest.$ac_ext <<_ACEOF
21561/* end confdefs.h. */
973a76b1
DL
21562$ac_includes_default
21563# include <wchar.h>
21564int
21565main ()
21566{
21567mbstate_t x; return sizeof x;
21568 ;
21569 return 0;
21570}
21571_ACEOF
21572rm -f conftest.$ac_objext
21573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21574 (eval $ac_compile) 2>conftest.er1
973a76b1 21575 ac_status=$?
35996d22
AS
21576 grep -v '^ *+' conftest.er1 >conftest.err
21577 rm -f conftest.er1
21578 cat conftest.err >&5
973a76b1
DL
21579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21580 (exit $ac_status); } &&
4494a266
JD
21581 { ac_try='test -z "$ac_c_werror_flag"
21582 || test ! -s conftest.err'
35996d22
AS
21583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21584 (eval $ac_try) 2>&5
21585 ac_status=$?
21586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21587 (exit $ac_status); }; } &&
21588 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
21589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21590 (eval $ac_try) 2>&5
21591 ac_status=$?
21592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21593 (exit $ac_status); }; }; then
21594 ac_cv_type_mbstate_t=yes
21595else
21596 echo "$as_me: failed program was:" >&5
19650fd6
AS
21597sed 's/^/| /' conftest.$ac_ext >&5
21598
973a76b1
DL
21599ac_cv_type_mbstate_t=no
21600fi
35996d22 21601rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
21602fi
21603echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
21604echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
21605 if test $ac_cv_type_mbstate_t = yes; then
21606
21607cat >>confdefs.h <<\_ACEOF
21608#define HAVE_MBSTATE_T 1
21609_ACEOF
21610
21611 else
21612
21613cat >>confdefs.h <<\_ACEOF
21614#define mbstate_t int
21615_ACEOF
21616
21617 fi
21618
22044edf
DL
21619echo "$as_me:$LINENO: checking for C restrict keyword" >&5
21620echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
21621if test "${emacs_cv_c_restrict+set}" = set; then
21622 echo $ECHO_N "(cached) $ECHO_C" >&6
21623else
21624 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21625/* confdefs.h. */
21626_ACEOF
21627cat confdefs.h >>conftest.$ac_ext
21628cat >>conftest.$ac_ext <<_ACEOF
21629/* end confdefs.h. */
22044edf
DL
21630void fred (int *restrict x);
21631int
21632main ()
21633{
b936fae4 21634
22044edf
DL
21635 ;
21636 return 0;
21637}
c0d27fcc 21638_ACEOF
22044edf
DL
21639rm -f conftest.$ac_objext
21640if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21641 (eval $ac_compile) 2>conftest.er1
22044edf 21642 ac_status=$?
35996d22
AS
21643 grep -v '^ *+' conftest.er1 >conftest.err
21644 rm -f conftest.er1
21645 cat conftest.err >&5
22044edf
DL
21646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21647 (exit $ac_status); } &&
4494a266
JD
21648 { ac_try='test -z "$ac_c_werror_flag"
21649 || test ! -s conftest.err'
35996d22
AS
21650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21651 (eval $ac_try) 2>&5
21652 ac_status=$?
21653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21654 (exit $ac_status); }; } &&
21655 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21657 (eval $ac_try) 2>&5
21658 ac_status=$?
21659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21660 (exit $ac_status); }; }; then
21661 emacs_cv_c_restrict=yes
21662else
21663 echo "$as_me: failed program was:" >&5
19650fd6
AS
21664sed 's/^/| /' conftest.$ac_ext >&5
21665
22044edf 21666cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21667/* confdefs.h. */
21668_ACEOF
21669cat confdefs.h >>conftest.$ac_ext
21670cat >>conftest.$ac_ext <<_ACEOF
21671/* end confdefs.h. */
22044edf
DL
21672void fred (int *__restrict x);
21673int
21674main ()
21675{
c0d27fcc 21676
22044edf
DL
21677 ;
21678 return 0;
21679}
c0d27fcc 21680_ACEOF
22044edf
DL
21681rm -f conftest.$ac_objext
21682if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21683 (eval $ac_compile) 2>conftest.er1
22044edf 21684 ac_status=$?
35996d22
AS
21685 grep -v '^ *+' conftest.er1 >conftest.err
21686 rm -f conftest.er1
21687 cat conftest.err >&5
22044edf
DL
21688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21689 (exit $ac_status); } &&
4494a266
JD
21690 { ac_try='test -z "$ac_c_werror_flag"
21691 || test ! -s conftest.err'
35996d22
AS
21692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21693 (eval $ac_try) 2>&5
21694 ac_status=$?
21695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21696 (exit $ac_status); }; } &&
21697 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21699 (eval $ac_try) 2>&5
21700 ac_status=$?
21701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21702 (exit $ac_status); }; }; then
21703 emacs_cv_c_restrict=__restrict
21704else
21705 echo "$as_me: failed program was:" >&5
19650fd6
AS
21706sed 's/^/| /' conftest.$ac_ext >&5
21707
22044edf 21708emacs_cv_c_restrict=no
ba4481b5 21709fi
35996d22 21710rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21711fi
35996d22 21712rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21713fi
22044edf
DL
21714echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
21715echo "${ECHO_T}$emacs_cv_c_restrict" >&6
21716case "$emacs_cv_c_restrict" in
21717 yes) emacs_restrict=restrict;;
21718 no) emacs_restrict="";;
21719 *) emacs_restrict="$emacs_cv_c_restrict";;
21720esac
21721if test "$emacs_restrict" != __restrict; then
b936fae4 21722
22044edf
DL
21723cat >>confdefs.h <<_ACEOF
21724#define __restrict $emacs_restrict
c0d27fcc 21725_ACEOF
ba4481b5
DL
21726
21727fi
ba4481b5 21728
22044edf
DL
21729echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
21730echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
21731if test "${emacs_cv_c_restrict_arr+set}" = set; then
21732 echo $ECHO_N "(cached) $ECHO_C" >&6
21733else
21734 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21735/* confdefs.h. */
21736_ACEOF
21737cat confdefs.h >>conftest.$ac_ext
21738cat >>conftest.$ac_ext <<_ACEOF
21739/* end confdefs.h. */
22044edf
DL
21740void fred (int x[__restrict]);
21741int
21742main ()
21743{
b936fae4 21744
22044edf
DL
21745 ;
21746 return 0;
21747}
c0d27fcc 21748_ACEOF
22044edf
DL
21749rm -f conftest.$ac_objext
21750if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21751 (eval $ac_compile) 2>conftest.er1
22044edf 21752 ac_status=$?
35996d22
AS
21753 grep -v '^ *+' conftest.er1 >conftest.err
21754 rm -f conftest.er1
21755 cat conftest.err >&5
22044edf
DL
21756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21757 (exit $ac_status); } &&
4494a266
JD
21758 { ac_try='test -z "$ac_c_werror_flag"
21759 || test ! -s conftest.err'
35996d22
AS
21760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21761 (eval $ac_try) 2>&5
21762 ac_status=$?
21763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21764 (exit $ac_status); }; } &&
21765 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21767 (eval $ac_try) 2>&5
21768 ac_status=$?
21769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21770 (exit $ac_status); }; }; then
21771 emacs_cv_c_restrict_arr=yes
21772else
21773 echo "$as_me: failed program was:" >&5
19650fd6
AS
21774sed 's/^/| /' conftest.$ac_ext >&5
21775
22044edf 21776emacs_cv_c_restrict_arr=no
ba4481b5 21777fi
35996d22 21778rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf
DL
21779fi
21780echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
21781echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
21782if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 21783
c0d27fcc 21784cat >>confdefs.h <<\_ACEOF
22044edf 21785#define __restrict_arr __restrict
c0d27fcc 21786_ACEOF
ba4481b5 21787
ba4481b5
DL
21788fi
21789
c0d27fcc 21790
c0d27fcc 21791
22044edf
DL
21792# Set up the CFLAGS for real compilation, so we can substitute it.
21793CFLAGS="$REAL_CFLAGS"
21794CPPFLAGS="$REAL_CPPFLAGS"
21795
21796#### Find out which version of Emacs this is.
21797version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
21798 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
21799if test x"${version}" = x; then
21800 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
21801echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
21802 { (exit 1); exit 1; }; }
21803fi
21804
21805### Specify what sort of things we'll be editing into Makefile and config.h.
21806### Use configuration here uncanonicalized to avoid exceeding size limits.
21807
21808
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
6a3a24fa 21839
22044edf
DL
21840
21841
21842cat >>confdefs.h <<_ACEOF
21843#define EMACS_CONFIGURATION "${canonical}"
21844_ACEOF
21845
21846
21847cat >>confdefs.h <<_ACEOF
21848#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
21849_ACEOF
21850
21851
21852cat >>confdefs.h <<_ACEOF
21853#define config_machfile "${machfile}"
21854_ACEOF
21855
21856
21857cat >>confdefs.h <<_ACEOF
21858#define config_opsysfile "${opsysfile}"
21859_ACEOF
21860
21861
21862cat >>confdefs.h <<_ACEOF
21863#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
21864_ACEOF
21865
21866
21867cat >>confdefs.h <<_ACEOF
21868#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
21869_ACEOF
21870
21871
21872cat >>confdefs.h <<_ACEOF
21873#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
21874_ACEOF
21875
21876
21877cat >>confdefs.h <<_ACEOF
21878#define UNEXEC_SRC ${UNEXEC_SRC}
21879_ACEOF
21880
21881
21882if test "${HAVE_X_WINDOWS}" = "yes" ; then
21883
21884cat >>confdefs.h <<\_ACEOF
21885#define HAVE_X_WINDOWS 1
21886_ACEOF
21887
21888fi
21889if test "${USE_X_TOOLKIT}" != "none" ; then
21890
21891cat >>confdefs.h <<\_ACEOF
21892#define USE_X_TOOLKIT 1
21893_ACEOF
21894
21895fi
21896if test "${HAVE_X11}" = "yes" ; then
21897
21898cat >>confdefs.h <<\_ACEOF
21899#define HAVE_X11 1
21900_ACEOF
21901
21902fi
21903if test "${HAVE_XFREE386}" = "yes" ; then
21904
21905cat >>confdefs.h <<\_ACEOF
21906#define HAVE_XFREE386 1
21907_ACEOF
21908
21909fi
21910if test "${HAVE_MENUS}" = "yes" ; then
21911
21912cat >>confdefs.h <<\_ACEOF
21913#define HAVE_MENUS 1
21914_ACEOF
21915
21916fi
21917if test "${GNU_MALLOC}" = "yes" ; then
21918
21919cat >>confdefs.h <<\_ACEOF
21920#define GNU_MALLOC 1
21921_ACEOF
21922
21923fi
21924if test "${REL_ALLOC}" = "yes" ; then
21925
21926cat >>confdefs.h <<\_ACEOF
21927#define REL_ALLOC 1
21928_ACEOF
21929
21930fi
21931
21932
21933
c0d27fcc
MR
21934
21935
ba4481b5 21936#### Report on what we decided to do.
488dd4c4
JD
21937#### Report GTK as a toolkit, even if it doesn't use Xt.
21938#### It makes printing result more understandable as using GTK sets
21939#### toolkit_scroll_bars to yes by default.
21940if test "${HAVE_GTK}" = "yes"; then
21941 USE_X_TOOLKIT=GTK
21942fi
21943
ba4481b5
DL
21944echo "
21945Configured for \`${canonical}'.
21946
21947 Where should the build process find the source code? ${srcdir}
21948 What operating system and machine description files should Emacs use?
21949 \`${opsysfile}' and \`${machfile}'
21950 What compiler should emacs be built with? ${CC} ${CFLAGS}
21951 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 21952 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 21953 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 21954 What window system should Emacs use? ${window_system}
8e967cf7 21955 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
21956
21957if test -n "${x_includes}"; then
21958echo " Where do we find X Windows header files? ${x_includes}"
21959else
21960echo " Where do we find X Windows header files? Standard dirs"
21961fi
21962if test -n "${x_libraries}"; then
21963echo " Where do we find X Windows libraries? ${x_libraries}"
21964else
21965echo " Where do we find X Windows libraries? Standard dirs"
21966fi
21967
21968echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
21969echo " Does Emacs use -lXpm? ${HAVE_XPM}"
21970echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
21971echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
21972echo " Does Emacs use -lungif? ${HAVE_GIF}"
21973echo " Does Emacs use -lpng? ${HAVE_PNG}"
21974echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
21975echo
21976
05cf15c6
JD
21977if test "$emacs_cv_randomheap" = warn; then
21978 { echo "$as_me:$LINENO: WARNING:
21979**********************************************************************
21980
21981Heap start address is randomized and no workaround is known.
21982Emacs will probably dump core when temacs is run in the build phase.
21983Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS'
21984for further information.
21985
21986**********************************************************************
21987" >&5
21988echo "$as_me: WARNING:
21989**********************************************************************
21990
21991Heap start address is randomized and no workaround is known.
21992Emacs will probably dump core when temacs is run in the build phase.
21993Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS'
21994for further information.
21995
21996**********************************************************************
21997" >&2;}
21998fi
21999
ba4481b5
DL
22000# Remove any trailing slashes in these variables.
22001test "${prefix}" != NONE &&
22002 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
22003test "${exec_prefix}" != NONE &&
22004 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
22005
d0e9bfd2
GM
22006## Check if the C preprocessor will convert `..' to `. .'. If so, set
22007## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
22008## from Makefile.c can correctly provide the arg `-traditional' to the
22009## C preprocessor.
22010
503d2be0 22011cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22012/* confdefs.h. */
22013_ACEOF
22014cat confdefs.h >>conftest.$ac_ext
22015cat >>conftest.$ac_ext <<_ACEOF
22016/* end confdefs.h. */
d0e9bfd2 22017yes..yes
503d2be0 22018_ACEOF
d0e9bfd2 22019if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 22020 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
22021 CPP_NEED_TRADITIONAL=no
22022else
d0e9bfd2
GM
22023 CPP_NEED_TRADITIONAL=yes
22024fi
22025rm -f conftest*
22026
c0d27fcc 22027
6bae0ccf
DL
22028 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"
22029 ac_config_commands="$ac_config_commands default"
503d2be0 22030cat >confcache <<\_ACEOF
ba4481b5
DL
22031# This file is a shell script that caches the results of configure
22032# tests run on this system so they can be shared between configure
503d2be0
AS
22033# scripts and configure runs, see configure's option --config-cache.
22034# It is not useful on other systems. If it contains results you don't
22035# want to keep, you may remove or edit it.
ba4481b5 22036#
503d2be0
AS
22037# config.status only pays attention to the cache file if you give it
22038# the --recheck option to rerun configure.
ba4481b5 22039#
6bae0ccf 22040# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
22041# loading this file, other *unset* `ac_cv_foo' will be assigned the
22042# following values.
22043
22044_ACEOF
22045
ba4481b5
DL
22046# The following way of writing the cache mishandles newlines in values,
22047# but we know of no workaround that is simple, portable, and efficient.
22048# So, don't put newlines in cache variables' values.
22049# Ultrix sh set writes to stderr and can't be redirected directly,
22050# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
22051{
22052 (set) 2>&1 |
22053 case `(ac_space=' '; set | grep ac_space) 2>&1` in
22054 *ac_space=\ *)
22055 # `set' does not quote correctly, so add quotes (double-quote
22056 # substitution turns \\\\ into \\, and sed turns \\ into \).
22057 sed -n \
35996d22
AS
22058 "s/'/'\\\\''/g;
22059 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
503d2be0
AS
22060 ;;
22061 *)
22062 # `set' quotes correctly as required by POSIX, so do not add quotes.
22063 sed -n \
35996d22 22064 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
22065 ;;
22066 esac;
22067} |
22068 sed '
22069 t clear
22070 : clear
22071 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22072 t end
22073 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22074 : end' >>confcache
19650fd6 22075if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 22076 if test -w $cache_file; then
503d2be0
AS
22077 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22078 cat confcache >$cache_file
ba4481b5
DL
22079 else
22080 echo "not updating unwritable cache $cache_file"
22081 fi
22082fi
22083rm -f confcache
22084
ba4481b5
DL
22085test "x$prefix" = xNONE && prefix=$ac_default_prefix
22086# Let make expand exec_prefix.
22087test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22088
503d2be0
AS
22089# VPATH may cause trouble with some makes, so we remove $(srcdir),
22090# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22091# trailing colons and then remove the whole line if VPATH becomes empty
22092# (actually we leave an empty line to preserve line numbers).
ba4481b5 22093if test "x$srcdir" = x.; then
35996d22 22094 ac_vpsub='/^[ ]*VPATH[ ]*=/{
503d2be0
AS
22095s/:*\$(srcdir):*/:/;
22096s/:*\${srcdir}:*/:/;
22097s/:*@srcdir@:*/:/;
35996d22 22098s/^\([^=]*=[ ]*\):*/\1/;
503d2be0 22099s/:*$//;
35996d22 22100s/^[^=]*=[ ]*$//;
503d2be0 22101}'
ba4481b5
DL
22102fi
22103
ba4481b5
DL
22104DEFS=-DHAVE_CONFIG_H
22105
6bae0ccf
DL
22106ac_libobjs=
22107ac_ltlibobjs=
22108for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22109 # 1. Remove the extension, and $U if already installed.
22110 ac_i=`echo "$ac_i" |
35996d22 22111 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6bae0ccf
DL
22112 # 2. Add them.
22113 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22114 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
22115done
22116LIBOBJS=$ac_libobjs
22117
22118LTLIBOBJS=$ac_ltlibobjs
22119
22120
c0d27fcc 22121
ba4481b5 22122: ${CONFIG_STATUS=./config.status}
503d2be0
AS
22123ac_clean_files_save=$ac_clean_files
22124ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 22125{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
22126echo "$as_me: creating $CONFIG_STATUS" >&6;}
22127cat >$CONFIG_STATUS <<_ACEOF
22128#! $SHELL
c0d27fcc 22129# Generated by $as_me.
ba4481b5 22130# Run this file to recreate the current configuration.
ba4481b5 22131# Compiler output produced by configure, useful for debugging
503d2be0 22132# configure, is in config.log if it exists.
ba4481b5 22133
503d2be0 22134debug=false
19650fd6
AS
22135ac_cs_recheck=false
22136ac_cs_silent=false
503d2be0 22137SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
22138_ACEOF
22139
22140cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
22141## --------------------- ##
22142## M4sh Initialization. ##
22143## --------------------- ##
22144
503d2be0
AS
22145# Be Bourne compatible
22146if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22147 emulate sh
22148 NULLCMD=:
6bae0ccf
DL
22149 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22150 # is contrary to our usage. Disable this feature.
22151 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
22152elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22153 set -o posix
22154fi
35996d22 22155DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 22156
c0d27fcc 22157# Support unset when possible.
35996d22 22158if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
22159 as_unset=unset
22160else
22161 as_unset=false
22162fi
22163
6bae0ccf
DL
22164
22165# Work around bugs in pre-3.0 UWIN ksh.
22166$as_unset ENV MAIL MAILPATH
22167PS1='$ '
22168PS2='> '
22169PS4='+ '
22170
22171# NLS nuisances.
19650fd6
AS
22172for as_var in \
22173 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22174 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22175 LC_TELEPHONE LC_TIME
6bae0ccf 22176do
35996d22 22177 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
22178 eval $as_var=C; export $as_var
22179 else
22180 $as_unset $as_var
22181 fi
22182done
22183
22184# Required to use basename.
22185if expr a : '\(a\)' >/dev/null 2>&1; then
22186 as_expr=expr
22187else
22188 as_expr=false
22189fi
22190
22191if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22192 as_basename=basename
22193else
22194 as_basename=false
22195fi
c0d27fcc
MR
22196
22197
503d2be0 22198# Name of the executable.
6bae0ccf 22199as_me=`$as_basename "$0" ||
c0d27fcc
MR
22200$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22201 X"$0" : 'X\(//\)$' \| \
22202 X"$0" : 'X\(/\)$' \| \
22203 . : '\(.\)' 2>/dev/null ||
22204echo X/"$0" |
22205 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22206 /^X\/\(\/\/\)$/{ s//\1/; q; }
22207 /^X\/\(\/\).*/{ s//\1/; q; }
22208 s/.*/./; q'`
22209
6bae0ccf 22210
c0d27fcc
MR
22211# PATH needs CR, and LINENO needs CR and PATH.
22212# Avoid depending upon Character Ranges.
22213as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22214as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22215as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22216as_cr_digits='0123456789'
22217as_cr_alnum=$as_cr_Letters$as_cr_digits
22218
22219# The user is always right.
22220if test "${PATH_SEPARATOR+set}" != set; then
19650fd6
AS
22221 echo "#! /bin/sh" >conf$$.sh
22222 echo "exit 0" >>conf$$.sh
22223 chmod +x conf$$.sh
22224 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
22225 PATH_SEPARATOR=';'
22226 else
22227 PATH_SEPARATOR=:
22228 fi
19650fd6 22229 rm -f conf$$.sh
c0d27fcc
MR
22230fi
22231
22232
22233 as_lineno_1=$LINENO
22234 as_lineno_2=$LINENO
22235 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22236 test "x$as_lineno_1" != "x$as_lineno_2" &&
22237 test "x$as_lineno_3" = "x$as_lineno_2" || {
22238 # Find who we are. Look in the path if we contain no path at all
22239 # relative or not.
22240 case $0 in
22241 *[\\/]* ) as_myself=$0 ;;
22242 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22243for as_dir in $PATH
22244do
22245 IFS=$as_save_IFS
22246 test -z "$as_dir" && as_dir=.
22247 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22248done
22249
22250 ;;
22251 esac
22252 # We did not find ourselves, most probably we were run as `sh COMMAND'
22253 # in which case we are not to be found in the path.
22254 if test "x$as_myself" = x; then
22255 as_myself=$0
22256 fi
22257 if test ! -f "$as_myself"; then
22258 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22259echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22260 { (exit 1); exit 1; }; }
22261 fi
22262 case $CONFIG_SHELL in
22263 '')
22264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22265for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22266do
22267 IFS=$as_save_IFS
22268 test -z "$as_dir" && as_dir=.
22269 for as_base in sh bash ksh sh5; do
22270 case $as_dir in
22271 /*)
22272 if ("$as_dir/$as_base" -c '
22273 as_lineno_1=$LINENO
22274 as_lineno_2=$LINENO
22275 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22276 test "x$as_lineno_1" != "x$as_lineno_2" &&
22277 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
22278 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22279 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
22280 CONFIG_SHELL=$as_dir/$as_base
22281 export CONFIG_SHELL
22282 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22283 fi;;
22284 esac
22285 done
22286done
22287;;
22288 esac
22289
22290 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22291 # uniformly replaced by the line number. The first 'sed' inserts a
22292 # line-number line before each line; the second 'sed' does the real
22293 # work. The second script uses 'N' to pair each line-number line
22294 # with the numbered line, and appends trailing '-' during
22295 # substitution so that $LINENO is not a special case at line end.
22296 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22297 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
22298 sed '=' <$as_myself |
22299 sed '
22300 N
22301 s,$,-,
22302 : loop
22303 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22304 t loop
22305 s,-$,,
22306 s,^['$as_cr_digits']*\n,,
22307 ' >$as_me.lineno &&
22308 chmod +x $as_me.lineno ||
22309 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22310echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22311 { (exit 1); exit 1; }; }
22312
22313 # Don't try to exec as it changes $[0], causing all sort of problems
22314 # (the dirname of $[0] is not the place where we might find the
22315 # original and so on. Autoconf is especially sensible to this).
22316 . ./$as_me.lineno
22317 # Exit status is that of the last command.
22318 exit
22319}
22320
22321
22322case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22323 *c*,-n*) ECHO_N= ECHO_C='
22324' ECHO_T=' ' ;;
22325 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22326 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
22327esac
503d2be0
AS
22328
22329if expr a : '\(a\)' >/dev/null 2>&1; then
22330 as_expr=expr
22331else
22332 as_expr=false
22333fi
22334
22335rm -f conf$$ conf$$.exe conf$$.file
22336echo >conf$$.file
22337if ln -s conf$$.file conf$$ 2>/dev/null; then
22338 # We could just check for DJGPP; but this test a) works b) is more generic
22339 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22340 if test -f conf$$.exe; then
22341 # Don't use ln at all; we don't have any links
22342 as_ln_s='cp -p'
22343 else
22344 as_ln_s='ln -s'
22345 fi
22346elif ln conf$$.file conf$$ 2>/dev/null; then
22347 as_ln_s=ln
22348else
22349 as_ln_s='cp -p'
22350fi
22351rm -f conf$$ conf$$.exe conf$$.file
22352
6bae0ccf
DL
22353if mkdir -p . 2>/dev/null; then
22354 as_mkdir_p=:
22355else
35996d22 22356 test -d ./-p && rmdir ./-p
6bae0ccf
DL
22357 as_mkdir_p=false
22358fi
22359
503d2be0
AS
22360as_executable_p="test -f"
22361
c0d27fcc 22362# Sed expression to map a string onto a valid CPP name.
35996d22 22363as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
22364
22365# Sed expression to map a string onto a valid variable name.
35996d22 22366as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 22367
503d2be0
AS
22368
22369# IFS
22370# We need space, tab and new line, in precisely that order.
22371as_nl='
22372'
22373IFS=" $as_nl"
22374
22375# CDPATH.
6bae0ccf 22376$as_unset CDPATH
503d2be0
AS
22377
22378exec 6>&1
22379
c0d27fcc
MR
22380# Open the log real soon, to keep \$[0] and so on meaningful, and to
22381# report actual input values of CONFIG_FILES etc. instead of their
22382# values after options handling. Logging --version etc. is OK.
22383exec 5>>config.log
22384{
22385 echo
22386 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22387## Running $as_me. ##
22388_ASBOX
22389} >&5
22390cat >&5 <<_CSEOF
22391
22392This file was extended by $as_me, which was
35996d22 22393generated by GNU Autoconf 2.59. Invocation command line was
c0d27fcc
MR
22394
22395 CONFIG_FILES = $CONFIG_FILES
22396 CONFIG_HEADERS = $CONFIG_HEADERS
22397 CONFIG_LINKS = $CONFIG_LINKS
22398 CONFIG_COMMANDS = $CONFIG_COMMANDS
22399 $ $0 $@
22400
22401_CSEOF
22402echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22403echo >&5
503d2be0
AS
22404_ACEOF
22405
22406# Files that config.status was made for.
22407if test -n "$ac_config_files"; then
22408 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22409fi
22410
22411if test -n "$ac_config_headers"; then
22412 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22413fi
22414
22415if test -n "$ac_config_links"; then
22416 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22417fi
22418
22419if test -n "$ac_config_commands"; then
22420 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22421fi
22422
c0d27fcc 22423cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22424
22425ac_cs_usage="\
22426\`$as_me' instantiates files from templates according to the
22427current configuration.
22428
22429Usage: $0 [OPTIONS] [FILE]...
22430
22431 -h, --help print this help, then exit
22432 -V, --version print version number, then exit
19650fd6 22433 -q, --quiet do not print progress messages
503d2be0
AS
22434 -d, --debug don't remove temporary files
22435 --recheck update $as_me by reconfiguring in the same conditions
22436 --file=FILE[:TEMPLATE]
35996d22 22437 instantiate the configuration file FILE
503d2be0 22438 --header=FILE[:TEMPLATE]
35996d22 22439 instantiate the configuration header FILE
503d2be0
AS
22440
22441Configuration files:
22442$config_files
22443
22444Configuration headers:
22445$config_headers
22446
22447Configuration commands:
22448$config_commands
22449
22450Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 22451_ACEOF
503d2be0 22452
c0d27fcc 22453cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22454ac_cs_version="\\
22455config.status
35996d22 22456configured by $0, generated by GNU Autoconf 2.59,
503d2be0
AS
22457 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22458
35996d22 22459Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
22460This config.status script is free software; the Free Software Foundation
22461gives unlimited permission to copy, distribute and modify it."
22462srcdir=$srcdir
22463INSTALL="$INSTALL"
c0d27fcc 22464_ACEOF
503d2be0 22465
c0d27fcc 22466cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22467# If no file are specified by the user, then we need to provide default
22468# value. By we need to know if files were specified by the user.
22469ac_need_defaults=:
22470while test $# != 0
ba4481b5 22471do
503d2be0
AS
22472 case $1 in
22473 --*=*)
22474 ac_option=`expr "x$1" : 'x\([^=]*\)='`
22475 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
22476 ac_shift=:
22477 ;;
22478 -*)
22479 ac_option=$1
22480 ac_optarg=$2
22481 ac_shift=shift
503d2be0 22482 ;;
503d2be0
AS
22483 *) # This is not an option, so the user has probably given explicit
22484 # arguments.
6bae0ccf 22485 ac_option=$1
503d2be0
AS
22486 ac_need_defaults=false;;
22487 esac
22488
6bae0ccf 22489 case $ac_option in
503d2be0 22490 # Handling of the options.
c0d27fcc 22491_ACEOF
f57bd967 22492cat >>$CONFIG_STATUS <<\_ACEOF
19650fd6
AS
22493 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22494 ac_cs_recheck=: ;;
503d2be0
AS
22495 --version | --vers* | -V )
22496 echo "$ac_cs_version"; exit 0 ;;
22497 --he | --h)
22498 # Conflict between --help and --header
c0d27fcc 22499 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
22500Try \`$0 --help' for more information." >&5
22501echo "$as_me: error: ambiguous option: $1
22502Try \`$0 --help' for more information." >&2;}
22503 { (exit 1); exit 1; }; };;
22504 --help | --hel | -h )
22505 echo "$ac_cs_usage"; exit 0 ;;
22506 --debug | --d* | -d )
22507 debug=: ;;
22508 --file | --fil | --fi | --f )
6bae0ccf
DL
22509 $ac_shift
22510 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
22511 ac_need_defaults=false;;
22512 --header | --heade | --head | --hea )
6bae0ccf
DL
22513 $ac_shift
22514 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 22515 ac_need_defaults=false;;
19650fd6
AS
22516 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22517 | -silent | --silent | --silen | --sile | --sil | --si | --s)
22518 ac_cs_silent=: ;;
503d2be0
AS
22519
22520 # This is an error.
c0d27fcc 22521 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
22522Try \`$0 --help' for more information." >&5
22523echo "$as_me: error: unrecognized option: $1
22524Try \`$0 --help' for more information." >&2;}
22525 { (exit 1); exit 1; }; } ;;
22526
22527 *) ac_config_targets="$ac_config_targets $1" ;;
22528
ba4481b5 22529 esac
503d2be0 22530 shift
ba4481b5
DL
22531done
22532
19650fd6
AS
22533ac_configure_extra_args=
22534
22535if $ac_cs_silent; then
22536 exec 6>/dev/null
22537 ac_configure_extra_args="$ac_configure_extra_args --silent"
22538fi
22539
22540_ACEOF
22541cat >>$CONFIG_STATUS <<_ACEOF
22542if \$ac_cs_recheck; then
22543 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
22544 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22545fi
22546
503d2be0 22547_ACEOF
ba4481b5 22548
c0d27fcc 22549cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22550#
22551# INIT-COMMANDS section.
22552#
ba4481b5 22553
503d2be0
AS
22554GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
22555
c0d27fcc
MR
22556_ACEOF
22557
503d2be0 22558
c0d27fcc
MR
22559
22560cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22561for ac_config_target in $ac_config_targets
22562do
22563 case "$ac_config_target" in
22564 # Handling of arguments.
22565 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22566 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
22567 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
22568 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
22569 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
22570 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
22571 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 22572 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 22573 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
22574 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
22575 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22576 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 22577 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
22578echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22579 { (exit 1); exit 1; }; };;
22580 esac
ba4481b5 22581done
503d2be0
AS
22582
22583# If the user did not use the arguments to specify the items to instantiate,
22584# then the envvar interface is used. Set only those that are not.
22585# We use the long form for the default assignment because of an extremely
22586# bizarre bug on SunOS 4.1.3.
22587if $ac_need_defaults; then
22588 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22589 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22590 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 22591fi
503d2be0 22592
19650fd6
AS
22593# Have a temporary directory for convenience. Make it in the build tree
22594# simply because there is no reason to put it here, and in addition,
22595# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
22596# Create a temporary directory, and hook for its removal unless debugging.
22597$debug ||
22598{
22599 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22600 trap '{ (exit 1); exit 1; }' 1 2 13 15
22601}
22602
22603# Create a (secure) tmp directory for tmp files.
19650fd6 22604
503d2be0 22605{
19650fd6 22606 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
22607 test -n "$tmp" && test -d "$tmp"
22608} ||
22609{
19650fd6 22610 tmp=./confstat$$-$RANDOM
503d2be0
AS
22611 (umask 077 && mkdir $tmp)
22612} ||
22613{
19650fd6 22614 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
22615 { (exit 1); exit 1; }
22616}
22617
c0d27fcc 22618_ACEOF
503d2be0 22619
c0d27fcc 22620cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22621
22622#
22623# CONFIG_FILES section.
22624#
22625
22626# No need to generate the scripts if there are no CONFIG_FILES.
22627# This happens for instance when ./config.status config.h
22628if test -n "\$CONFIG_FILES"; then
22629 # Protect against being on the right side of a sed subst in config.status.
22630 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22631 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22632s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
22633s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22634s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22635s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22636s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22637s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22638s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
22639s,@exec_prefix@,$exec_prefix,;t t
22640s,@prefix@,$prefix,;t t
22641s,@program_transform_name@,$program_transform_name,;t t
22642s,@bindir@,$bindir,;t t
22643s,@sbindir@,$sbindir,;t t
22644s,@libexecdir@,$libexecdir,;t t
22645s,@datadir@,$datadir,;t t
22646s,@sysconfdir@,$sysconfdir,;t t
22647s,@sharedstatedir@,$sharedstatedir,;t t
22648s,@localstatedir@,$localstatedir,;t t
22649s,@libdir@,$libdir,;t t
22650s,@includedir@,$includedir,;t t
22651s,@oldincludedir@,$oldincludedir,;t t
22652s,@infodir@,$infodir,;t t
22653s,@mandir@,$mandir,;t t
503d2be0
AS
22654s,@build_alias@,$build_alias,;t t
22655s,@host_alias@,$host_alias,;t t
22656s,@target_alias@,$target_alias,;t t
c0d27fcc 22657s,@DEFS@,$DEFS,;t t
503d2be0
AS
22658s,@ECHO_C@,$ECHO_C,;t t
22659s,@ECHO_N@,$ECHO_N,;t t
22660s,@ECHO_T@,$ECHO_T,;t t
503d2be0 22661s,@LIBS@,$LIBS,;t t
19650fd6 22662s,@MAINT@,$MAINT,;t t
503d2be0
AS
22663s,@build@,$build,;t t
22664s,@build_cpu@,$build_cpu,;t t
22665s,@build_vendor@,$build_vendor,;t t
22666s,@build_os@,$build_os,;t t
22667s,@host@,$host,;t t
22668s,@host_cpu@,$host_cpu,;t t
22669s,@host_vendor@,$host_vendor,;t t
22670s,@host_os@,$host_os,;t t
22671s,@CC@,$CC,;t t
22672s,@CFLAGS@,$CFLAGS,;t t
22673s,@LDFLAGS@,$LDFLAGS,;t t
22674s,@CPPFLAGS@,$CPPFLAGS,;t t
22675s,@ac_ct_CC@,$ac_ct_CC,;t t
22676s,@EXEEXT@,$EXEEXT,;t t
22677s,@OBJEXT@,$OBJEXT,;t t
22678s,@LN_S@,$LN_S,;t t
22679s,@CPP@,$CPP,;t t
22680s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22681s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22682s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
22683s,@RANLIB@,$RANLIB,;t t
22684s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 22685s,@INSTALL_INFO@,$INSTALL_INFO,;t t
6bae0ccf 22686s,@EGREP@,$EGREP,;t t
503d2be0
AS
22687s,@LIBSOUND@,$LIBSOUND,;t t
22688s,@SET_MAKE@,$SET_MAKE,;t t
488dd4c4
JD
22689s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22690s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
22691s,@GTK_LIBS@,$GTK_LIBS,;t t
503d2be0
AS
22692s,@ALLOCA@,$ALLOCA,;t t
22693s,@liblockfile@,$liblockfile,;t t
22694s,@LIBOBJS@,$LIBOBJS,;t t
22695s,@NEED_SETGID@,$NEED_SETGID,;t t
22696s,@KMEM_GROUP@,$KMEM_GROUP,;t t
22697s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
22698s,@version@,$version,;t t
22699s,@configuration@,$configuration,;t t
22700s,@canonical@,$canonical,;t t
22701s,@srcdir@,$srcdir,;t t
22702s,@lispdir@,$lispdir,;t t
22703s,@locallisppath@,$locallisppath,;t t
22704s,@lisppath@,$lisppath,;t t
22705s,@x_default_search_path@,$x_default_search_path,;t t
22706s,@etcdir@,$etcdir,;t t
22707s,@archlibdir@,$archlibdir,;t t
22708s,@docdir@,$docdir,;t t
22709s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
22710s,@gamedir@,$gamedir,;t t
22711s,@gameuser@,$gameuser,;t t
503d2be0
AS
22712s,@c_switch_system@,$c_switch_system,;t t
22713s,@c_switch_machine@,$c_switch_machine,;t t
22714s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
22715s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
22716s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
22717s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
22718s,@machfile@,$machfile,;t t
22719s,@opsysfile@,$opsysfile,;t t
6a3a24fa 22720s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 22721s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
22722CEOF
22723
c0d27fcc 22724_ACEOF
ba4481b5 22725
c0d27fcc 22726 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22727 # Split the substitutions into bite-sized pieces for seds with
22728 # small command number limits, like on Digital OSF/1 and HP-UX.
22729 ac_max_sed_lines=48
22730 ac_sed_frag=1 # Number of current file.
22731 ac_beg=1 # First line for current file.
22732 ac_end=$ac_max_sed_lines # Line after last line for current file.
22733 ac_more_lines=:
22734 ac_sed_cmds=
22735 while $ac_more_lines; do
22736 if test $ac_beg -gt 1; then
22737 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22738 else
22739 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22740 fi
22741 if test ! -s $tmp/subs.frag; then
22742 ac_more_lines=false
22743 else
22744 # The purpose of the label and of the branching condition is to
22745 # speed up the sed processing (if there are no `@' at all, there
22746 # is no need to browse any of the substitutions).
22747 # These are the two extra sed commands mentioned above.
22748 (echo ':t
22749 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22750 if test -z "$ac_sed_cmds"; then
35996d22 22751 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0 22752 else
35996d22 22753 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0
AS
22754 fi
22755 ac_sed_frag=`expr $ac_sed_frag + 1`
22756 ac_beg=$ac_end
22757 ac_end=`expr $ac_end + $ac_max_sed_lines`
22758 fi
22759 done
22760 if test -z "$ac_sed_cmds"; then
22761 ac_sed_cmds=cat
22762 fi
22763fi # test -n "$CONFIG_FILES"
ba4481b5 22764
c0d27fcc
MR
22765_ACEOF
22766cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 22767for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 22768 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
22769 case $ac_file in
22770 - | *:- | *:-:* ) # input from stdin
35996d22
AS
22771 cat >$tmp/stdin
22772 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22773 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22774 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
35996d22 22775 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22776 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
22777 esac
22778
503d2be0 22779 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
22780 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22781$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22782 X"$ac_file" : 'X\(//\)[^/]' \| \
22783 X"$ac_file" : 'X\(//\)$' \| \
22784 X"$ac_file" : 'X\(/\)' \| \
22785 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
22786echo X"$ac_file" |
22787 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22788 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22789 /^X\(\/\/\)$/{ s//\1/; q; }
22790 /^X\(\/\).*/{ s//\1/; q; }
22791 s/.*/./; q'`
6bae0ccf
DL
22792 { if $as_mkdir_p; then
22793 mkdir -p "$ac_dir"
22794 else
22795 as_dir="$ac_dir"
22796 as_dirs=
22797 while test ! -d "$as_dir"; do
22798 as_dirs="$as_dir $as_dirs"
22799 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22800$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22801 X"$as_dir" : 'X\(//\)[^/]' \| \
22802 X"$as_dir" : 'X\(//\)$' \| \
22803 X"$as_dir" : 'X\(/\)' \| \
22804 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
22805echo X"$as_dir" |
22806 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22807 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22808 /^X\(\/\/\)$/{ s//\1/; q; }
22809 /^X\(\/\).*/{ s//\1/; q; }
22810 s/.*/./; q'`
22811 done
22812 test ! -n "$as_dirs" || mkdir $as_dirs
22813 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22814echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22815 { (exit 1); exit 1; }; }; }
503d2be0 22816
c0d27fcc 22817 ac_builddir=.
98418dba 22818
c0d27fcc
MR
22819if test "$ac_dir" != .; then
22820 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22821 # A "../" for each directory in $ac_dir_suffix.
22822 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22823else
22824 ac_dir_suffix= ac_top_builddir=
22825fi
22826
22827case $srcdir in
22828 .) # No --srcdir option. We are building in place.
22829 ac_srcdir=.
22830 if test -z "$ac_top_builddir"; then
22831 ac_top_srcdir=.
22832 else
22833 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22834 fi ;;
22835 [\\/]* | ?:[\\/]* ) # Absolute path.
22836 ac_srcdir=$srcdir$ac_dir_suffix;
22837 ac_top_srcdir=$srcdir ;;
ba4481b5 22838 *) # Relative path.
c0d27fcc
MR
22839 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22840 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22841esac
35996d22
AS
22842
22843# Do not use `cd foo && pwd` to compute absolute paths, because
22844# the directories may not exist.
22845case `pwd` in
22846.) ac_abs_builddir="$ac_dir";;
22847*)
22848 case "$ac_dir" in
22849 .) ac_abs_builddir=`pwd`;;
22850 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22851 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22852 esac;;
22853esac
22854case $ac_abs_builddir in
22855.) ac_abs_top_builddir=${ac_top_builddir}.;;
22856*)
22857 case ${ac_top_builddir}. in
22858 .) ac_abs_top_builddir=$ac_abs_builddir;;
22859 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22860 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22861 esac;;
22862esac
22863case $ac_abs_builddir in
22864.) ac_abs_srcdir=$ac_srcdir;;
22865*)
22866 case $ac_srcdir in
22867 .) ac_abs_srcdir=$ac_abs_builddir;;
22868 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22869 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22870 esac;;
22871esac
22872case $ac_abs_builddir in
22873.) ac_abs_top_srcdir=$ac_top_srcdir;;
22874*)
22875 case $ac_top_srcdir in
22876 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22877 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22878 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22879 esac;;
22880esac
c0d27fcc 22881
ba4481b5 22882
503d2be0
AS
22883 case $INSTALL in
22884 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 22885 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
22886 esac
22887
4494a266
JD
22888 if test x"$ac_file" != x-; then
22889 { echo "$as_me:$LINENO: creating $ac_file" >&5
22890echo "$as_me: creating $ac_file" >&6;}
22891 rm -f "$ac_file"
22892 fi
503d2be0
AS
22893 # Let's still pretend it is `configure' which instantiates (i.e., don't
22894 # use $as_me), people would be surprised to read:
c0d27fcc
MR
22895 # /* config.h. Generated by config.status. */
22896 if test x"$ac_file" = x-; then
22897 configure_input=
22898 else
22899 configure_input="$ac_file. "
22900 fi
22901 configure_input=$configure_input"Generated from `echo $ac_file_in |
35996d22 22902 sed 's,.*/,,'` by configure."
503d2be0
AS
22903
22904 # First look for the input files in the build tree, otherwise in the
22905 # src tree.
22906 ac_file_inputs=`IFS=:
22907 for f in $ac_file_in; do
22908 case $f in
22909 -) echo $tmp/stdin ;;
22910 [\\/$]*)
35996d22
AS
22911 # Absolute (can't be DOS-style, as IFS=:)
22912 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22913echo "$as_me: error: cannot find input file: $f" >&2;}
22914 { (exit 1); exit 1; }; }
35996d22 22915 echo "$f";;
503d2be0 22916 *) # Relative
35996d22
AS
22917 if test -f "$f"; then
22918 # Build tree
22919 echo "$f"
22920 elif test -f "$srcdir/$f"; then
22921 # Source tree
22922 echo "$srcdir/$f"
22923 else
22924 # /dev/null tree
22925 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22926echo "$as_me: error: cannot find input file: $f" >&2;}
22927 { (exit 1); exit 1; }; }
35996d22 22928 fi;;
503d2be0
AS
22929 esac
22930 done` || { (exit 1); exit 1; }
c0d27fcc
MR
22931_ACEOF
22932cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22933 sed "$ac_vpsub
22934$extrasub
c0d27fcc
MR
22935_ACEOF
22936cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22937:t
22938/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22939s,@configure_input@,$configure_input,;t t
22940s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 22941s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 22942s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
22943s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22944s,@builddir@,$ac_builddir,;t t
22945s,@abs_builddir@,$ac_abs_builddir,;t t
22946s,@top_builddir@,$ac_top_builddir,;t t
22947s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
22948s,@INSTALL@,$ac_INSTALL,;t t
22949" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22950 rm -f $tmp/stdin
22951 if test x"$ac_file" != x-; then
22952 mv $tmp/out $ac_file
22953 else
22954 cat $tmp/out
22955 rm -f $tmp/out
22956 fi
22957
22958done
c0d27fcc
MR
22959_ACEOF
22960cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 22961
503d2be0
AS
22962#
22963# CONFIG_HEADER section.
22964#
ba4481b5
DL
22965
22966# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22967# NAME is the cpp macro being defined and VALUE is the value it is being given.
22968#
22969# ac_d sets the value in "#define NAME VALUE" lines.
35996d22
AS
22970ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22971ac_dB='[ ].*$,\1#\2'
503d2be0
AS
22972ac_dC=' '
22973ac_dD=',;t'
22974# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
35996d22 22975ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
503d2be0 22976ac_uB='$,\1#\2define\3'
ba4481b5 22977ac_uC=' '
503d2be0 22978ac_uD=',;t'
ba4481b5 22979
503d2be0 22980for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 22981 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
22982 case $ac_file in
22983 - | *:- | *:-:* ) # input from stdin
35996d22
AS
22984 cat >$tmp/stdin
22985 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22986 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22987 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
35996d22 22988 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22989 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
22990 esac
22991
c0d27fcc 22992 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
22993echo "$as_me: creating $ac_file" >&6;}
22994
22995 # First look for the input files in the build tree, otherwise in the
22996 # src tree.
22997 ac_file_inputs=`IFS=:
22998 for f in $ac_file_in; do
22999 case $f in
23000 -) echo $tmp/stdin ;;
23001 [\\/$]*)
35996d22
AS
23002 # Absolute (can't be DOS-style, as IFS=:)
23003 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23004echo "$as_me: error: cannot find input file: $f" >&2;}
23005 { (exit 1); exit 1; }; }
35996d22
AS
23006 # Do quote $f, to prevent DOS paths from being IFS'd.
23007 echo "$f";;
503d2be0 23008 *) # Relative
35996d22
AS
23009 if test -f "$f"; then
23010 # Build tree
23011 echo "$f"
23012 elif test -f "$srcdir/$f"; then
23013 # Source tree
23014 echo "$srcdir/$f"
23015 else
23016 # /dev/null tree
23017 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23018echo "$as_me: error: cannot find input file: $f" >&2;}
23019 { (exit 1); exit 1; }; }
35996d22 23020 fi;;
503d2be0
AS
23021 esac
23022 done` || { (exit 1); exit 1; }
23023 # Remove the trailing spaces.
35996d22 23024 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
503d2be0 23025
c0d27fcc 23026_ACEOF
503d2be0
AS
23027
23028# Transform confdefs.h into two sed scripts, `conftest.defines' and
23029# `conftest.undefs', that substitutes the proper values into
23030# config.h.in to produce config.h. The first handles `#define'
23031# templates, and the second `#undef' templates.
23032# And first: Protect against being on the right side of a sed subst in
23033# config.status. Protect against being in an unquoted here document
23034# in config.status.
23035rm -f conftest.defines conftest.undefs
23036# Using a here document instead of a string reduces the quoting nightmare.
23037# Putting comments in sed scripts is not portable.
23038#
23039# `end' is used to avoid that the second main sed command (meant for
23040# 0-ary CPP macros) applies to n-ary macro definitions.
23041# See the Autoconf documentation for `clear'.
c0d27fcc 23042cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
23043s/[\\&,]/\\&/g
23044s,[\\$`],\\&,g
23045t clear
23046: clear
35996d22 23047s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0 23048t end
35996d22 23049s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
503d2be0 23050: end
c0d27fcc 23051_ACEOF
503d2be0
AS
23052# If some macros were called several times there might be several times
23053# the same #defines, which is useless. Nevertheless, we may not want to
23054# sort them, since we want the *last* AC-DEFINE to be honored.
23055uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23056sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23057rm -f confdef2sed.sed
ba4481b5
DL
23058
23059# This sed command replaces #undef with comments. This is necessary, for
23060# example, in the case of _POSIX_SOURCE, which is predefined and required
23061# on some systems where configure will not decide to define it.
c0d27fcc 23062cat >>conftest.undefs <<\_ACEOF
35996d22 23063s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 23064_ACEOF
ba4481b5 23065
503d2be0
AS
23066# Break up conftest.defines because some shells have a limit on the size
23067# of here documents, and old seds have small limits too (100 cmds).
23068echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
35996d22 23069echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
23070echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23071echo ' :' >>$CONFIG_STATUS
23072rm -f conftest.tail
23073while grep . conftest.defines >/dev/null
23074do
23075 # Write a limited-size here document to $tmp/defines.sed.
23076 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23077 # Speed up: don't consider the non `#define' lines.
35996d22 23078 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
503d2be0
AS
23079 # Work around the forget-to-reset-the-flag bug.
23080 echo 't clr' >>$CONFIG_STATUS
23081 echo ': clr' >>$CONFIG_STATUS
23082 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
23083 echo 'CEOF
23084 sed -f $tmp/defines.sed $tmp/in >$tmp/out
23085 rm -f $tmp/in
23086 mv $tmp/out $tmp/in
23087' >>$CONFIG_STATUS
23088 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
23089 rm -f conftest.defines
23090 mv conftest.tail conftest.defines
23091done
23092rm -f conftest.defines
6bae0ccf 23093echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 23094echo >>$CONFIG_STATUS
ba4481b5 23095
503d2be0
AS
23096# Break up conftest.undefs because some shells have a limit on the size
23097# of here documents, and old seds have small limits too (100 cmds).
23098echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 23099rm -f conftest.tail
503d2be0 23100while grep . conftest.undefs >/dev/null
ba4481b5 23101do
503d2be0
AS
23102 # Write a limited-size here document to $tmp/undefs.sed.
23103 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23104 # Speed up: don't consider the non `#undef'
35996d22 23105 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
503d2be0
AS
23106 # Work around the forget-to-reset-the-flag bug.
23107 echo 't clr' >>$CONFIG_STATUS
23108 echo ': clr' >>$CONFIG_STATUS
23109 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 23110 echo 'CEOF
503d2be0
AS
23111 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23112 rm -f $tmp/in
23113 mv $tmp/out $tmp/in
23114' >>$CONFIG_STATUS
23115 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23116 rm -f conftest.undefs
23117 mv conftest.tail conftest.undefs
ba4481b5 23118done
503d2be0
AS
23119rm -f conftest.undefs
23120
c0d27fcc 23121cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23122 # Let's still pretend it is `configure' which instantiates (i.e., don't
23123 # use $as_me), people would be surprised to read:
c0d27fcc 23124 # /* config.h. Generated by config.status. */
503d2be0 23125 if test x"$ac_file" = x-; then
c0d27fcc 23126 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 23127 else
c0d27fcc 23128 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
23129 fi
23130 cat $tmp/in >>$tmp/config.h
23131 rm -f $tmp/in
23132 if test x"$ac_file" != x-; then
19650fd6 23133 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 23134 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
23135echo "$as_me: $ac_file is unchanged" >&6;}
23136 else
c0d27fcc
MR
23137 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23138$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
23139 X"$ac_file" : 'X\(//\)[^/]' \| \
23140 X"$ac_file" : 'X\(//\)$' \| \
23141 X"$ac_file" : 'X\(/\)' \| \
23142 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
23143echo X"$ac_file" |
23144 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23145 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23146 /^X\(\/\/\)$/{ s//\1/; q; }
23147 /^X\(\/\).*/{ s//\1/; q; }
23148 s/.*/./; q'`
6bae0ccf
DL
23149 { if $as_mkdir_p; then
23150 mkdir -p "$ac_dir"
23151 else
23152 as_dir="$ac_dir"
23153 as_dirs=
23154 while test ! -d "$as_dir"; do
23155 as_dirs="$as_dir $as_dirs"
23156 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23157$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
23158 X"$as_dir" : 'X\(//\)[^/]' \| \
23159 X"$as_dir" : 'X\(//\)$' \| \
23160 X"$as_dir" : 'X\(/\)' \| \
23161 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
23162echo X"$as_dir" |
23163 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23164 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23165 /^X\(\/\/\)$/{ s//\1/; q; }
23166 /^X\(\/\).*/{ s//\1/; q; }
23167 s/.*/./; q'`
23168 done
23169 test ! -n "$as_dirs" || mkdir $as_dirs
23170 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23171echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23172 { (exit 1); exit 1; }; }; }
503d2be0 23173
503d2be0
AS
23174 rm -f $ac_file
23175 mv $tmp/config.h $ac_file
ba4481b5 23176 fi
503d2be0
AS
23177 else
23178 cat $tmp/config.h
23179 rm -f $tmp/config.h
ba4481b5 23180 fi
503d2be0 23181done
c0d27fcc
MR
23182_ACEOF
23183cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23184
23185#
23186# CONFIG_COMMANDS section.
23187#
23188for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23189 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23190 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
23191 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
23192$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
23193 X"$ac_dest" : 'X\(//\)[^/]' \| \
23194 X"$ac_dest" : 'X\(//\)$' \| \
23195 X"$ac_dest" : 'X\(/\)' \| \
23196 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
23197echo X"$ac_dest" |
23198 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23199 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23200 /^X\(\/\/\)$/{ s//\1/; q; }
23201 /^X\(\/\).*/{ s//\1/; q; }
23202 s/.*/./; q'`
35996d22
AS
23203 { if $as_mkdir_p; then
23204 mkdir -p "$ac_dir"
23205 else
23206 as_dir="$ac_dir"
23207 as_dirs=
23208 while test ! -d "$as_dir"; do
23209 as_dirs="$as_dir $as_dirs"
23210 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23211$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23212 X"$as_dir" : 'X\(//\)[^/]' \| \
23213 X"$as_dir" : 'X\(//\)$' \| \
23214 X"$as_dir" : 'X\(/\)' \| \
23215 . : '\(.\)' 2>/dev/null ||
23216echo X"$as_dir" |
23217 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23218 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23219 /^X\(\/\/\)$/{ s//\1/; q; }
23220 /^X\(\/\).*/{ s//\1/; q; }
23221 s/.*/./; q'`
23222 done
23223 test ! -n "$as_dirs" || mkdir $as_dirs
23224 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23225echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23226 { (exit 1); exit 1; }; }; }
23227
c0d27fcc
MR
23228 ac_builddir=.
23229
23230if test "$ac_dir" != .; then
23231 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23232 # A "../" for each directory in $ac_dir_suffix.
23233 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23234else
23235 ac_dir_suffix= ac_top_builddir=
23236fi
23237
23238case $srcdir in
23239 .) # No --srcdir option. We are building in place.
23240 ac_srcdir=.
23241 if test -z "$ac_top_builddir"; then
23242 ac_top_srcdir=.
23243 else
23244 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23245 fi ;;
23246 [\\/]* | ?:[\\/]* ) # Absolute path.
23247 ac_srcdir=$srcdir$ac_dir_suffix;
23248 ac_top_srcdir=$srcdir ;;
23249 *) # Relative path.
23250 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23251 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23252esac
35996d22
AS
23253
23254# Do not use `cd foo && pwd` to compute absolute paths, because
23255# the directories may not exist.
23256case `pwd` in
23257.) ac_abs_builddir="$ac_dir";;
23258*)
23259 case "$ac_dir" in
23260 .) ac_abs_builddir=`pwd`;;
23261 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23262 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23263 esac;;
23264esac
23265case $ac_abs_builddir in
23266.) ac_abs_top_builddir=${ac_top_builddir}.;;
23267*)
23268 case ${ac_top_builddir}. in
23269 .) ac_abs_top_builddir=$ac_abs_builddir;;
23270 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23271 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23272 esac;;
23273esac
23274case $ac_abs_builddir in
23275.) ac_abs_srcdir=$ac_srcdir;;
23276*)
23277 case $ac_srcdir in
23278 .) ac_abs_srcdir=$ac_abs_builddir;;
23279 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23280 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23281 esac;;
23282esac
23283case $ac_abs_builddir in
23284.) ac_abs_top_srcdir=$ac_top_srcdir;;
23285*)
23286 case $ac_top_srcdir in
23287 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23288 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23289 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23290 esac;;
23291esac
ba4481b5 23292
c0d27fcc
MR
23293
23294 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
23295echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
23296 case $ac_dest in
23297 default )
ba4481b5
DL
23298
23299### Make the necessary directories, if they don't exist.
23300for dir in etc lisp ; do
23301 test -d ${dir} || mkdir ${dir}
23302done
23303
23304# Build src/Makefile from ${srcdir}/src/Makefile.c
23305# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
23306# This must be done after src/config.h is built, since we rely on that file.
23307
23308# Now get this: Some word that is part of the ${srcdir} directory name
23309# or the ${configuration} value might, just might, happen to be an
23310# identifier like `sun4' or `i386' or something, and be predefined by
23311# the C preprocessor to some helpful value like 1, or maybe the empty
23312# string. Needless to say consequent macro substitutions are less
23313# than conducive to the makefile finding the correct directory.
23314undefs="`echo $top_srcdir $configuration $canonical |
23315sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
23316 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
23317`"
23318
23319echo creating src/epaths.h
4aa6b955 23320${MAKE-make} epaths-force
ba4481b5 23321
1c203d4c
DL
23322# As of 2000-11-19, newest development versions of GNU cpp preprocess
23323# `..' to `. .' unless invoked with -traditional
23324
d0e9bfd2 23325if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
23326 CPPFLAGS="$CPPFLAGS -traditional"
23327fi
23328
ba4481b5
DL
23329echo creating lib-src/Makefile
23330( cd lib-src
23331 rm -f junk.c junk1.c junk2.c
23332 sed -e '/start of cpp stuff/q' \
23333 < Makefile.c > junk1.c
23334 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 23335 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 23336 < Makefile.c > junk.c
503d2be0 23337 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
23338 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
23339 cat junk1.c junk2.c > Makefile.new
23340 rm -f junk.c junk1.c junk2.c
23341 chmod 444 Makefile.new
23342 mv -f Makefile.new Makefile
23343)
23344
23345echo creating src/Makefile
23346( cd src
23347 rm -f junk.c junk1.c junk2.c
23348 sed -e '/start of cpp stuff/q' \
23349 < Makefile.c > junk1.c
23350 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 23351 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 23352 < Makefile.c > junk.c
503d2be0 23353 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
23354 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
23355 cat junk1.c junk2.c > Makefile.new
23356 rm -f junk.c junk1.c junk2.c
23357 chmod 444 Makefile.new
23358 mv -f Makefile.new Makefile
23359)
23360
503d2be0 23361if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 23362 echo creating src/.gdbinit
503d2be0 23363 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
23364fi
23365
23366# This is how we know whether to re-run configure in certain cases.
23367touch src/config.stamp
23368
503d2be0
AS
23369 ;;
23370 esac
23371done
c0d27fcc 23372_ACEOF
503d2be0 23373
c0d27fcc 23374cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 23375
503d2be0 23376{ (exit 0); exit 0; }
c0d27fcc 23377_ACEOF
ba4481b5 23378chmod +x $CONFIG_STATUS
503d2be0
AS
23379ac_clean_files=$ac_clean_files_save
23380
c0d27fcc 23381
503d2be0
AS
23382# configure is writing to config.log, and then calls config.status.
23383# config.status does its own redirection, appending to config.log.
23384# Unfortunately, on DOS this fails, as config.log is still kept open
23385# by configure, so config.status won't be able to write to it; its
23386# output is simply discarded. So we exec the FD to /dev/null,
23387# effectively closing config.log, so it can be properly (re)opened and
23388# appended to by config.status. When coming back to configure, we
23389# need to make the FD available again.
23390if test "$no_create" != yes; then
23391 ac_cs_success=:
19650fd6
AS
23392 ac_config_status_args=
23393 test "$silent" = yes &&
23394 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 23395 exec 5>/dev/null
19650fd6 23396 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
23397 exec 5>>config.log
23398 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23399 # would make configure fail if this is the last instruction.
23400 $ac_cs_success || { (exit 1); exit 1; }
23401fi
f5f47add 23402
c0d27fcc 23403