(DOC): Define to point to the generated DOC-X.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
35996d22 3# Generated by GNU Autoconf 2.59.
ba4481b5 4#
35996d22 5# Copyright (C) 2003 Free Software Foundation, Inc.
ba4481b5
DL
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
c0d27fcc
MR
8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
503d2be0
AS
11
12# Be Bourne compatible
13if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
15 NULLCMD=:
6bae0ccf
DL
16 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17 # is contrary to our usage. Disable this feature.
18 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
21fi
35996d22 22DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 23
c0d27fcc 24# Support unset when possible.
35996d22 25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
26 as_unset=unset
27else
28 as_unset=false
29fi
30
6bae0ccf
DL
31
32# Work around bugs in pre-3.0 UWIN ksh.
33$as_unset ENV MAIL MAILPATH
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
19650fd6
AS
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
6bae0ccf 43do
35996d22 44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
45 eval $as_var=C; export $as_var
46 else
47 $as_unset $as_var
48 fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54else
55 as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60else
61 as_basename=false
62fi
c0d27fcc
MR
63
64
503d2be0 65# Name of the executable.
6bae0ccf 66as_me=`$as_basename "$0" ||
c0d27fcc
MR
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
76
6bae0ccf 77
c0d27fcc
MR
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
19650fd6
AS
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
19650fd6 96 rm -f conf$$.sh
c0d27fcc
MR
97fi
98
99
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
116
117 ;;
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
137 /*)
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
166 N
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
184}
185
186
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
192esac
503d2be0
AS
193
194if expr a : '\(a\)' >/dev/null 2>&1; then
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
207 as_ln_s='cp -p'
208 else
209 as_ln_s='ln -s'
210 fi
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
216rm -f conf$$ conf$$.exe conf$$.file
217
6bae0ccf
DL
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
35996d22 221 test -d ./-p && rmdir ./-p
6bae0ccf
DL
222 as_mkdir_p=false
223fi
224
503d2be0
AS
225as_executable_p="test -f"
226
c0d27fcc 227# Sed expression to map a string onto a valid CPP name.
35996d22 228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
229
230# Sed expression to map a string onto a valid variable name.
35996d22 231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 232
503d2be0
AS
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
6bae0ccf 241$as_unset CDPATH
c0d27fcc 242
503d2be0
AS
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
ba4481b5 254ac_default_prefix=/usr/local
6bae0ccf 255ac_config_libobj_dir=.
503d2be0
AS
256cross_compiling=no
257subdirs=
c0d27fcc
MR
258MFLAGS=
259MAKEFLAGS=
503d2be0
AS
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
c0d27fcc
MR
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
503d2be0 274ac_unique_file="src/lisp.h"
6bae0ccf 275ac_config_libobj_dir=src
503d2be0
AS
276# Factoring default headers for most tests.
277ac_includes_default="\
278#include <stdio.h>
279#if HAVE_SYS_TYPES_H
280# include <sys/types.h>
281#endif
282#if HAVE_SYS_STAT_H
283# include <sys/stat.h>
284#endif
285#if STDC_HEADERS
286# include <stdlib.h>
287# include <stddef.h>
288#else
289# if HAVE_STDLIB_H
290# include <stdlib.h>
291# endif
292#endif
293#if HAVE_STRING_H
294# if !STDC_HEADERS && HAVE_MEMORY_H
295# include <memory.h>
296# endif
297# include <string.h>
298#endif
299#if HAVE_STRINGS_H
300# include <strings.h>
301#endif
302#if HAVE_INTTYPES_H
303# include <inttypes.h>
304#else
305# if HAVE_STDINT_H
306# include <stdint.h>
307# endif
308#endif
309#if HAVE_UNISTD_H
310# include <unistd.h>
311#endif"
ba4481b5 312
f17e308a 313ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO EGREP LIBSOUND SET_MAKE PKG_CONFIG GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS'
6bae0ccf 314ac_subst_files=''
c0d27fcc 315
ba4481b5 316# Initialize some variables set by options.
503d2be0
AS
317ac_init_help=
318ac_init_version=false
ba4481b5
DL
319# The variables have the same names as the options, with
320# dashes changed to underlines.
503d2be0 321cache_file=/dev/null
ba4481b5 322exec_prefix=NONE
ba4481b5 323no_create=
ba4481b5
DL
324no_recursion=
325prefix=NONE
326program_prefix=NONE
327program_suffix=NONE
328program_transform_name=s,x,x,
329silent=
330site=
331srcdir=
ba4481b5
DL
332verbose=
333x_includes=NONE
334x_libraries=NONE
503d2be0
AS
335
336# Installation directory options.
337# These are left unexpanded so users can "make install exec_prefix=/foo"
338# and all the variables that are supposed to be based on exec_prefix
339# by default will actually change.
340# Use braces instead of parens because sh, perl, etc. also accept them.
ba4481b5
DL
341bindir='${exec_prefix}/bin'
342sbindir='${exec_prefix}/sbin'
343libexecdir='${exec_prefix}/libexec'
344datadir='${prefix}/share'
345sysconfdir='${prefix}/etc'
346sharedstatedir='${prefix}/com'
347localstatedir='${prefix}/var'
348libdir='${exec_prefix}/lib'
349includedir='${prefix}/include'
350oldincludedir='/usr/include'
351infodir='${prefix}/info'
352mandir='${prefix}/man'
353
ba4481b5
DL
354ac_prev=
355for ac_option
356do
ba4481b5
DL
357 # If the previous option needs an argument, assign it.
358 if test -n "$ac_prev"; then
359 eval "$ac_prev=\$ac_option"
360 ac_prev=
361 continue
362 fi
363
503d2be0 364 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
ba4481b5
DL
365
366 # Accept the important Cygnus configure options, so we can diagnose typos.
367
503d2be0 368 case $ac_option in
ba4481b5
DL
369
370 -bindir | --bindir | --bindi | --bind | --bin | --bi)
371 ac_prev=bindir ;;
372 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 373 bindir=$ac_optarg ;;
ba4481b5
DL
374
375 -build | --build | --buil | --bui | --bu)
503d2be0 376 ac_prev=build_alias ;;
ba4481b5 377 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 378 build_alias=$ac_optarg ;;
ba4481b5
DL
379
380 -cache-file | --cache-file | --cache-fil | --cache-fi \
381 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
382 ac_prev=cache_file ;;
383 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
384 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
385 cache_file=$ac_optarg ;;
386
387 --config-cache | -C)
388 cache_file=config.cache ;;
ba4481b5
DL
389
390 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
391 ac_prev=datadir ;;
392 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
393 | --da=*)
503d2be0 394 datadir=$ac_optarg ;;
ba4481b5
DL
395
396 -disable-* | --disable-*)
503d2be0 397 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 398 # Reject names that are not valid shell variable names.
503d2be0
AS
399 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
401 { (exit 1); exit 1; }; }
402 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
403 eval "enable_$ac_feature=no" ;;
ba4481b5
DL
404
405 -enable-* | --enable-*)
503d2be0 406 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 407 # Reject names that are not valid shell variable names.
503d2be0
AS
408 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
409 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
410 { (exit 1); exit 1; }; }
411 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
412 case $ac_option in
413 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
414 *) ac_optarg=yes ;;
415 esac
503d2be0 416 eval "enable_$ac_feature='$ac_optarg'" ;;
ba4481b5
DL
417
418 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
419 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
420 | --exec | --exe | --ex)
421 ac_prev=exec_prefix ;;
422 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
423 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
424 | --exec=* | --exe=* | --ex=*)
503d2be0 425 exec_prefix=$ac_optarg ;;
ba4481b5
DL
426
427 -gas | --gas | --ga | --g)
428 # Obsolete; use --with-gas.
429 with_gas=yes ;;
430
503d2be0
AS
431 -help | --help | --hel | --he | -h)
432 ac_init_help=long ;;
433 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
434 ac_init_help=recursive ;;
435 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
436 ac_init_help=short ;;
ba4481b5
DL
437
438 -host | --host | --hos | --ho)
503d2be0 439 ac_prev=host_alias ;;
ba4481b5 440 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 441 host_alias=$ac_optarg ;;
ba4481b5
DL
442
443 -includedir | --includedir | --includedi | --included | --include \
444 | --includ | --inclu | --incl | --inc)
445 ac_prev=includedir ;;
446 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
447 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 448 includedir=$ac_optarg ;;
ba4481b5
DL
449
450 -infodir | --infodir | --infodi | --infod | --info | --inf)
451 ac_prev=infodir ;;
452 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 453 infodir=$ac_optarg ;;
ba4481b5
DL
454
455 -libdir | --libdir | --libdi | --libd)
456 ac_prev=libdir ;;
457 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 458 libdir=$ac_optarg ;;
ba4481b5
DL
459
460 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
461 | --libexe | --libex | --libe)
462 ac_prev=libexecdir ;;
463 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
464 | --libexe=* | --libex=* | --libe=*)
503d2be0 465 libexecdir=$ac_optarg ;;
ba4481b5
DL
466
467 -localstatedir | --localstatedir | --localstatedi | --localstated \
468 | --localstate | --localstat | --localsta | --localst \
469 | --locals | --local | --loca | --loc | --lo)
470 ac_prev=localstatedir ;;
471 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
472 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
473 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
503d2be0 474 localstatedir=$ac_optarg ;;
ba4481b5
DL
475
476 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
477 ac_prev=mandir ;;
478 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 479 mandir=$ac_optarg ;;
ba4481b5
DL
480
481 -nfp | --nfp | --nf)
482 # Obsolete; use --without-fp.
483 with_fp=no ;;
484
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 486 | --no-cr | --no-c | -n)
ba4481b5
DL
487 no_create=yes ;;
488
489 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
490 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
491 no_recursion=yes ;;
492
493 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
494 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
495 | --oldin | --oldi | --old | --ol | --o)
496 ac_prev=oldincludedir ;;
497 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
498 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
499 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 500 oldincludedir=$ac_optarg ;;
ba4481b5
DL
501
502 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
503 ac_prev=prefix ;;
504 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 505 prefix=$ac_optarg ;;
ba4481b5
DL
506
507 -program-prefix | --program-prefix | --program-prefi | --program-pref \
508 | --program-pre | --program-pr | --program-p)
509 ac_prev=program_prefix ;;
510 -program-prefix=* | --program-prefix=* | --program-prefi=* \
511 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 512 program_prefix=$ac_optarg ;;
ba4481b5
DL
513
514 -program-suffix | --program-suffix | --program-suffi | --program-suff \
515 | --program-suf | --program-su | --program-s)
516 ac_prev=program_suffix ;;
517 -program-suffix=* | --program-suffix=* | --program-suffi=* \
518 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 519 program_suffix=$ac_optarg ;;
ba4481b5
DL
520
521 -program-transform-name | --program-transform-name \
522 | --program-transform-nam | --program-transform-na \
523 | --program-transform-n | --program-transform- \
524 | --program-transform | --program-transfor \
525 | --program-transfo | --program-transf \
526 | --program-trans | --program-tran \
527 | --progr-tra | --program-tr | --program-t)
528 ac_prev=program_transform_name ;;
529 -program-transform-name=* | --program-transform-name=* \
530 | --program-transform-nam=* | --program-transform-na=* \
531 | --program-transform-n=* | --program-transform-=* \
532 | --program-transform=* | --program-transfor=* \
533 | --program-transfo=* | --program-transf=* \
534 | --program-trans=* | --program-tran=* \
535 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 536 program_transform_name=$ac_optarg ;;
ba4481b5
DL
537
538 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
539 | -silent | --silent | --silen | --sile | --sil)
540 silent=yes ;;
541
542 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
543 ac_prev=sbindir ;;
544 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
545 | --sbi=* | --sb=*)
503d2be0 546 sbindir=$ac_optarg ;;
ba4481b5
DL
547
548 -sharedstatedir | --sharedstatedir | --sharedstatedi \
549 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
550 | --sharedst | --shareds | --shared | --share | --shar \
551 | --sha | --sh)
552 ac_prev=sharedstatedir ;;
553 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
554 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
555 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
556 | --sha=* | --sh=*)
503d2be0 557 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
558
559 -site | --site | --sit)
560 ac_prev=site ;;
561 -site=* | --site=* | --sit=*)
503d2be0 562 site=$ac_optarg ;;
ba4481b5
DL
563
564 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
565 ac_prev=srcdir ;;
566 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 567 srcdir=$ac_optarg ;;
ba4481b5
DL
568
569 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
570 | --syscon | --sysco | --sysc | --sys | --sy)
571 ac_prev=sysconfdir ;;
572 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
573 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 574 sysconfdir=$ac_optarg ;;
ba4481b5
DL
575
576 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 577 ac_prev=target_alias ;;
ba4481b5 578 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 579 target_alias=$ac_optarg ;;
ba4481b5
DL
580
581 -v | -verbose | --verbose | --verbos | --verbo | --verb)
582 verbose=yes ;;
583
503d2be0
AS
584 -version | --version | --versio | --versi | --vers | -V)
585 ac_init_version=: ;;
ba4481b5
DL
586
587 -with-* | --with-*)
503d2be0 588 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 589 # Reject names that are not valid shell variable names.
503d2be0
AS
590 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
591 { echo "$as_me: error: invalid package name: $ac_package" >&2
592 { (exit 1); exit 1; }; }
ba4481b5 593 ac_package=`echo $ac_package| sed 's/-/_/g'`
503d2be0
AS
594 case $ac_option in
595 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
596 *) ac_optarg=yes ;;
597 esac
503d2be0 598 eval "with_$ac_package='$ac_optarg'" ;;
ba4481b5
DL
599
600 -without-* | --without-*)
503d2be0 601 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 602 # Reject names that are not valid shell variable names.
503d2be0
AS
603 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
604 { echo "$as_me: error: invalid package name: $ac_package" >&2
605 { (exit 1); exit 1; }; }
606 ac_package=`echo $ac_package | sed 's/-/_/g'`
607 eval "with_$ac_package=no" ;;
ba4481b5
DL
608
609 --x)
610 # Obsolete; use --with-x.
611 with_x=yes ;;
612
613 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
614 | --x-incl | --x-inc | --x-in | --x-i)
615 ac_prev=x_includes ;;
616 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
617 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 618 x_includes=$ac_optarg ;;
ba4481b5
DL
619
620 -x-libraries | --x-libraries | --x-librarie | --x-librari \
621 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
622 ac_prev=x_libraries ;;
623 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
624 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 625 x_libraries=$ac_optarg ;;
ba4481b5 626
503d2be0
AS
627 -*) { echo "$as_me: error: unrecognized option: $ac_option
628Try \`$0 --help' for more information." >&2
629 { (exit 1); exit 1; }; }
ba4481b5
DL
630 ;;
631
503d2be0
AS
632 *=*)
633 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
634 # Reject names that are not valid shell variable names.
635 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
636 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
637 { (exit 1); exit 1; }; }
638 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
639 eval "$ac_envvar='$ac_optarg'"
640 export $ac_envvar ;;
641
ba4481b5 642 *)
503d2be0
AS
643 # FIXME: should be removed in autoconf 3.0.
644 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
645 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
646 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
647 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
648 ;;
649
650 esac
651done
652
653if test -n "$ac_prev"; then
503d2be0
AS
654 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
655 { echo "$as_me: error: missing argument to $ac_option" >&2
656 { (exit 1); exit 1; }; }
ba4481b5 657fi
ba4481b5 658
503d2be0
AS
659# Be sure to have absolute paths.
660for ac_var in exec_prefix prefix
661do
662 eval ac_val=$`echo $ac_var`
663 case $ac_val in
664 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
c0d27fcc 665 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
503d2be0
AS
666 { (exit 1); exit 1; }; };;
667 esac
668done
ba4481b5 669
503d2be0
AS
670# Be sure to have absolute paths.
671for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
35996d22 672 localstatedir libdir includedir oldincludedir infodir mandir
ba4481b5 673do
503d2be0
AS
674 eval ac_val=$`echo $ac_var`
675 case $ac_val in
676 [\\/$]* | ?:[\\/]* ) ;;
c0d27fcc 677 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
503d2be0 678 { (exit 1); exit 1; }; };;
ba4481b5
DL
679 esac
680done
681
503d2be0
AS
682# There might be people who depend on the old broken behavior: `$host'
683# used to hold the argument of --host etc.
c0d27fcc 684# FIXME: To remove some day.
503d2be0
AS
685build=$build_alias
686host=$host_alias
687target=$target_alias
688
c0d27fcc 689# FIXME: To remove some day.
503d2be0
AS
690if test "x$host_alias" != x; then
691 if test "x$build_alias" = x; then
692 cross_compiling=maybe
693 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
694 If a cross compiler is detected then cross compile mode will be used." >&2
695 elif test "x$build_alias" != "x$host_alias"; then
696 cross_compiling=yes
697 fi
698fi
ba4481b5 699
503d2be0
AS
700ac_tool_prefix=
701test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 702
503d2be0 703test "$silent" = yes && exec 6>/dev/null
ba4481b5 704
c0d27fcc 705
ba4481b5
DL
706# Find the source files, if location was not specified.
707if test -z "$srcdir"; then
708 ac_srcdir_defaulted=yes
709 # Try the directory containing this script, then its parent.
c0d27fcc
MR
710 ac_confdir=`(dirname "$0") 2>/dev/null ||
711$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
712 X"$0" : 'X\(//\)[^/]' \| \
713 X"$0" : 'X\(//\)$' \| \
714 X"$0" : 'X\(/\)' \| \
715 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
716echo X"$0" |
717 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
718 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
719 /^X\(\/\/\)$/{ s//\1/; q; }
720 /^X\(\/\).*/{ s//\1/; q; }
721 s/.*/./; q'`
ba4481b5
DL
722 srcdir=$ac_confdir
723 if test ! -r $srcdir/$ac_unique_file; then
724 srcdir=..
725 fi
726else
727 ac_srcdir_defaulted=no
728fi
729if test ! -r $srcdir/$ac_unique_file; then
730 if test "$ac_srcdir_defaulted" = yes; then
c0d27fcc 731 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
503d2be0 732 { (exit 1); exit 1; }; }
ba4481b5 733 else
c0d27fcc 734 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 735 { (exit 1); exit 1; }; }
ba4481b5
DL
736 fi
737fi
6bae0ccf
DL
738(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
739 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
740 { (exit 1); exit 1; }; }
503d2be0
AS
741srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
742ac_env_build_alias_set=${build_alias+set}
743ac_env_build_alias_value=$build_alias
744ac_cv_env_build_alias_set=${build_alias+set}
745ac_cv_env_build_alias_value=$build_alias
746ac_env_host_alias_set=${host_alias+set}
747ac_env_host_alias_value=$host_alias
748ac_cv_env_host_alias_set=${host_alias+set}
749ac_cv_env_host_alias_value=$host_alias
750ac_env_target_alias_set=${target_alias+set}
751ac_env_target_alias_value=$target_alias
752ac_cv_env_target_alias_set=${target_alias+set}
753ac_cv_env_target_alias_value=$target_alias
754ac_env_CC_set=${CC+set}
755ac_env_CC_value=$CC
756ac_cv_env_CC_set=${CC+set}
757ac_cv_env_CC_value=$CC
758ac_env_CFLAGS_set=${CFLAGS+set}
759ac_env_CFLAGS_value=$CFLAGS
760ac_cv_env_CFLAGS_set=${CFLAGS+set}
761ac_cv_env_CFLAGS_value=$CFLAGS
762ac_env_LDFLAGS_set=${LDFLAGS+set}
763ac_env_LDFLAGS_value=$LDFLAGS
764ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
765ac_cv_env_LDFLAGS_value=$LDFLAGS
766ac_env_CPPFLAGS_set=${CPPFLAGS+set}
767ac_env_CPPFLAGS_value=$CPPFLAGS
768ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
769ac_cv_env_CPPFLAGS_value=$CPPFLAGS
770ac_env_CPP_set=${CPP+set}
771ac_env_CPP_value=$CPP
772ac_cv_env_CPP_set=${CPP+set}
773ac_cv_env_CPP_value=$CPP
774
775#
776# Report the --help message.
777#
778if test "$ac_init_help" = "long"; then
779 # Omit some internal or obsolete options to make the list less imposing.
780 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 781 cat <<_ACEOF
503d2be0
AS
782\`configure' configures this package to adapt to many kinds of systems.
783
784Usage: $0 [OPTION]... [VAR=VALUE]...
785
786To assign environment variables (e.g., CC, CFLAGS...), specify them as
787VAR=VALUE. See below for descriptions of some of the useful variables.
788
789Defaults for the options are specified in brackets.
790
791Configuration:
792 -h, --help display this help and exit
793 --help=short display options specific to this package
794 --help=recursive display the short help of all the included packages
795 -V, --version display version information and exit
796 -q, --quiet, --silent do not print \`checking...' messages
797 --cache-file=FILE cache test results in FILE [disabled]
798 -C, --config-cache alias for \`--cache-file=config.cache'
799 -n, --no-create do not create output files
800 --srcdir=DIR find the sources in DIR [configure dir or \`..']
801
c0d27fcc 802_ACEOF
503d2be0 803
c0d27fcc 804 cat <<_ACEOF
503d2be0
AS
805Installation directories:
806 --prefix=PREFIX install architecture-independent files in PREFIX
35996d22 807 [$ac_default_prefix]
503d2be0 808 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
35996d22 809 [PREFIX]
503d2be0
AS
810
811By default, \`make install' will install all the files in
812\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
813an installation prefix other than \`$ac_default_prefix' using \`--prefix',
814for instance \`--prefix=\$HOME'.
815
816For better control, use the options below.
817
818Fine tuning of the installation directories:
819 --bindir=DIR user executables [EPREFIX/bin]
820 --sbindir=DIR system admin executables [EPREFIX/sbin]
821 --libexecdir=DIR program executables [EPREFIX/libexec]
822 --datadir=DIR read-only architecture-independent data [PREFIX/share]
823 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
824 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
825 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
826 --libdir=DIR object code libraries [EPREFIX/lib]
827 --includedir=DIR C header files [PREFIX/include]
828 --oldincludedir=DIR C header files for non-gcc [/usr/include]
829 --infodir=DIR info documentation [PREFIX/info]
830 --mandir=DIR man documentation [PREFIX/man]
c0d27fcc 831_ACEOF
503d2be0 832
c0d27fcc 833 cat <<\_ACEOF
503d2be0 834
ba5da88a
PJ
835Program names:
836 --program-prefix=PREFIX prepend PREFIX to installed program names
837 --program-suffix=SUFFIX append SUFFIX to installed program names
838 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
839
503d2be0
AS
840X features:
841 --x-includes=DIR X include files are in DIR
842 --x-libraries=DIR X library files are in DIR
843
844System types:
845 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
846 --host=HOST cross-compile to build programs to run on HOST [BUILD]
847_ACEOF
503d2be0
AS
848fi
849
850if test -n "$ac_init_help"; then
851
c0d27fcc 852 cat <<\_ACEOF
503d2be0
AS
853
854Optional Features:
855 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
856 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6a3a24fa
JD
857 --enable-carbon-app[=DIR] [DIR=/Application]
858 specify install directory for Emacs.app on Mac OS X
d0098f13 859 --enable-asserts compile code with asserts enabled
19650fd6
AS
860 --enable-maintainer-mode enable make rules and dependencies not useful
861 (and sometimes confusing) to the casual installer
9adfabc2
LK
862 --enable-locallisppath=PATH
863 directories Emacs should search for lisp files
864 specific to this site
503d2be0
AS
865 --disable-largefile omit support for large files
866
867Optional Packages:
868 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
869 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
870 --without-gcc don't use GCC to compile Emacs if GCC is found
871 --without-pop don't support POP mail retrieval with movemail
872 --with-kerberos support Kerberos-authenticated POP
873 --with-kerberos5 support Kerberos version 5 authenticated POP
874 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 875 --without-sound don't compile with sound support
488dd4c4
JD
876 --with-x-toolkit=KIT use an X toolkit
877 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
878 --with-xpm use -lXpm for displaying XPM images
879 --with-jpeg use -ljpeg for displaying JPEG images
880 --with-tiff use -ltiff for displaying TIFF images
881 --with-gif use -lungif for displaying GIF images
882 --with-png use -lpng for displaying PNG images
488dd4c4
JD
883 --with-gtk use GTK (same as --with-x-toolkit=gtk)
884 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 885 --without-toolkit-scroll-bars
cc227489
MB
886 don't use Motif or Xaw3d scroll bars
887 --without-xim don't use X11 XIM
e0f712ba 888 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
889 --with-x use the X Window System
890
891Some influential environment variables:
892 CC C compiler command
893 CFLAGS C compiler flags
894 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
895 nonstandard directory <lib dir>
896 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
897 headers in a nonstandard directory <include dir>
898 CPP C preprocessor
899
900Use these variables to override the choices made by `configure' or to help
901it to find libraries and programs with nonstandard names/locations.
902
c0d27fcc 903_ACEOF
503d2be0
AS
904fi
905
906if test "$ac_init_help" = "recursive"; then
907 # If there are subdirs, report their specific --help.
908 ac_popdir=`pwd`
c0d27fcc
MR
909 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
910 test -d $ac_dir || continue
911 ac_builddir=.
912
913if test "$ac_dir" != .; then
914 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
915 # A "../" for each directory in $ac_dir_suffix.
916 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
917else
918 ac_dir_suffix= ac_top_builddir=
919fi
503d2be0 920
c0d27fcc
MR
921case $srcdir in
922 .) # No --srcdir option. We are building in place.
923 ac_srcdir=.
924 if test -z "$ac_top_builddir"; then
925 ac_top_srcdir=.
926 else
927 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
928 fi ;;
929 [\\/]* | ?:[\\/]* ) # Absolute path.
930 ac_srcdir=$srcdir$ac_dir_suffix;
931 ac_top_srcdir=$srcdir ;;
932 *) # Relative path.
933 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
934 ac_top_srcdir=$ac_top_builddir$srcdir ;;
935esac
35996d22
AS
936
937# Do not use `cd foo && pwd` to compute absolute paths, because
938# the directories may not exist.
939case `pwd` in
940.) ac_abs_builddir="$ac_dir";;
941*)
942 case "$ac_dir" in
943 .) ac_abs_builddir=`pwd`;;
944 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
945 *) ac_abs_builddir=`pwd`/"$ac_dir";;
946 esac;;
947esac
948case $ac_abs_builddir in
949.) ac_abs_top_builddir=${ac_top_builddir}.;;
950*)
951 case ${ac_top_builddir}. in
952 .) ac_abs_top_builddir=$ac_abs_builddir;;
953 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
954 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
955 esac;;
956esac
957case $ac_abs_builddir in
958.) ac_abs_srcdir=$ac_srcdir;;
959*)
960 case $ac_srcdir in
961 .) ac_abs_srcdir=$ac_abs_builddir;;
962 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
963 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
964 esac;;
965esac
966case $ac_abs_builddir in
967.) ac_abs_top_srcdir=$ac_top_srcdir;;
968*)
969 case $ac_top_srcdir in
970 .) ac_abs_top_srcdir=$ac_abs_builddir;;
971 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
972 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
973 esac;;
974esac
c0d27fcc
MR
975
976 cd $ac_dir
503d2be0 977 # Check for guested configure; otherwise get Cygnus style configure.
c0d27fcc 978 if test -f $ac_srcdir/configure.gnu; then
503d2be0 979 echo
c0d27fcc
MR
980 $SHELL $ac_srcdir/configure.gnu --help=recursive
981 elif test -f $ac_srcdir/configure; then
503d2be0 982 echo
c0d27fcc
MR
983 $SHELL $ac_srcdir/configure --help=recursive
984 elif test -f $ac_srcdir/configure.ac ||
35996d22 985 test -f $ac_srcdir/configure.in; then
503d2be0
AS
986 echo
987 $ac_configure --help
988 else
c0d27fcc 989 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
503d2be0 990 fi
9adfabc2 991 cd "$ac_popdir"
503d2be0
AS
992 done
993fi
994
995test -n "$ac_init_help" && exit 0
996if $ac_init_version; then
c0d27fcc 997 cat <<\_ACEOF
503d2be0 998
35996d22 999Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
1000This configure script is free software; the Free Software Foundation
1001gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1002_ACEOF
503d2be0
AS
1003 exit 0
1004fi
1005exec 5>config.log
c0d27fcc 1006cat >&5 <<_ACEOF
503d2be0
AS
1007This file contains any messages produced by compilers while
1008running configure, to aid debugging if configure makes a mistake.
1009
1010It was created by $as_me, which was
35996d22 1011generated by GNU Autoconf 2.59. Invocation command line was
503d2be0
AS
1012
1013 $ $0 $@
1014
c0d27fcc 1015_ACEOF
503d2be0
AS
1016{
1017cat <<_ASUNAME
c0d27fcc
MR
1018## --------- ##
1019## Platform. ##
1020## --------- ##
503d2be0
AS
1021
1022hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1023uname -m = `(uname -m) 2>/dev/null || echo unknown`
1024uname -r = `(uname -r) 2>/dev/null || echo unknown`
1025uname -s = `(uname -s) 2>/dev/null || echo unknown`
1026uname -v = `(uname -v) 2>/dev/null || echo unknown`
1027
1028/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1029/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1030
1031/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1032/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1033/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1034hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1035/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1036/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1037/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1038
925c2f3f 1039_ASUNAME
c0d27fcc
MR
1040
1041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1042for as_dir in $PATH
1043do
1044 IFS=$as_save_IFS
1045 test -z "$as_dir" && as_dir=.
1046 echo "PATH: $as_dir"
1047done
1048
503d2be0
AS
1049} >&5
1050
c0d27fcc
MR
1051cat >&5 <<_ACEOF
1052
1053
1054## ----------- ##
1055## Core tests. ##
1056## ----------- ##
1057
1058_ACEOF
503d2be0 1059
503d2be0
AS
1060
1061# Keep a trace of the command line.
1062# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1063# Strip out --silent because we don't want to record it for future runs.
503d2be0 1064# Also quote any args containing shell meta-characters.
19650fd6 1065# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1066ac_configure_args=
19650fd6
AS
1067ac_configure_args0=
1068ac_configure_args1=
503d2be0 1069ac_sep=
19650fd6
AS
1070ac_must_keep_next=false
1071for ac_pass in 1 2
503d2be0 1072do
19650fd6
AS
1073 for ac_arg
1074 do
1075 case $ac_arg in
1076 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1077 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1078 | -silent | --silent | --silen | --sile | --sil)
1079 continue ;;
1080 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1081 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1082 esac
1083 case $ac_pass in
1084 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1085 2)
1086 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1087 if test $ac_must_keep_next = true; then
35996d22 1088 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1089 else
35996d22
AS
1090 case $ac_arg in
1091 *=* | --config-cache | -C | -disable-* | --disable-* \
1092 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1093 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1094 | -with-* | --with-* | -without-* | --without-* | --x)
1095 case "$ac_configure_args0 " in
1096 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1097 esac
1098 ;;
1099 -* ) ac_must_keep_next=true ;;
1100 esac
19650fd6
AS
1101 fi
1102 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1103 # Get rid of the leading space.
1104 ac_sep=" "
1105 ;;
1106 esac
1107 done
503d2be0 1108done
19650fd6
AS
1109$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1110$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1111
1112# When interrupted or exit'd, cleanup temporary files, and complete
1113# config.log. We remove comments because anyway the quotes in there
1114# would cause problems or look ugly.
c0d27fcc
MR
1115# WARNING: Be sure not to use single quotes in there, as some shells,
1116# such as our DU 5.0 friend, will then `close' the trap.
503d2be0
AS
1117trap 'exit_status=$?
1118 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1119 {
1120 echo
6bae0ccf 1121
c0d27fcc
MR
1122 cat <<\_ASBOX
1123## ---------------- ##
1124## Cache variables. ##
1125## ---------------- ##
1126_ASBOX
1127 echo
1128 # The following way of writing the cache mishandles newlines in values,
503d2be0
AS
1129{
1130 (set) 2>&1 |
1131 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1132 *ac_space=\ *)
1133 sed -n \
35996d22
AS
1134 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1135 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
503d2be0
AS
1136 ;;
1137 *)
1138 sed -n \
35996d22 1139 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
1140 ;;
1141 esac;
c0d27fcc
MR
1142}
1143 echo
6bae0ccf
DL
1144
1145 cat <<\_ASBOX
1146## ----------------- ##
1147## Output variables. ##
1148## ----------------- ##
1149_ASBOX
1150 echo
1151 for ac_var in $ac_subst_vars
1152 do
1153 eval ac_val=$`echo $ac_var`
1154 echo "$ac_var='"'"'$ac_val'"'"'"
1155 done | sort
1156 echo
1157
1158 if test -n "$ac_subst_files"; then
1159 cat <<\_ASBOX
1160## ------------- ##
1161## Output files. ##
1162## ------------- ##
1163_ASBOX
1164 echo
1165 for ac_var in $ac_subst_files
1166 do
1167 eval ac_val=$`echo $ac_var`
35996d22 1168 echo "$ac_var='"'"'$ac_val'"'"'"
6bae0ccf
DL
1169 done | sort
1170 echo
1171 fi
1172
c0d27fcc
MR
1173 if test -s confdefs.h; then
1174 cat <<\_ASBOX
1175## ----------- ##
1176## confdefs.h. ##
1177## ----------- ##
1178_ASBOX
1179 echo
6bae0ccf 1180 sed "/^$/d" confdefs.h | sort
c0d27fcc
MR
1181 echo
1182 fi
1183 test "$ac_signal" != 0 &&
1184 echo "$as_me: caught signal $ac_signal"
1185 echo "$as_me: exit $exit_status"
1186 } >&5
35996d22 1187 rm -f core *.core &&
c0d27fcc 1188 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0
AS
1189 exit $exit_status
1190 ' 0
1191for ac_signal in 1 2 13 15; do
1192 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1193done
1194ac_signal=0
1195
1196# confdefs.h avoids OS command line length limits that DEFS can exceed.
1197rm -rf conftest* confdefs.h
1198# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1199echo >confdefs.h
ba4481b5 1200
c0d27fcc
MR
1201# Predefined preprocessor variables.
1202
1203cat >>confdefs.h <<_ACEOF
1204#define PACKAGE_NAME "$PACKAGE_NAME"
1205_ACEOF
1206
1207
1208cat >>confdefs.h <<_ACEOF
1209#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1210_ACEOF
1211
1212
1213cat >>confdefs.h <<_ACEOF
1214#define PACKAGE_VERSION "$PACKAGE_VERSION"
1215_ACEOF
1216
1217
1218cat >>confdefs.h <<_ACEOF
1219#define PACKAGE_STRING "$PACKAGE_STRING"
1220_ACEOF
1221
1222
1223cat >>confdefs.h <<_ACEOF
1224#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1225_ACEOF
1226
1227
503d2be0 1228# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
1229# Prefer explicitly selected file to automatically selected ones.
1230if test -z "$CONFIG_SITE"; then
1231 if test "x$prefix" != xNONE; then
1232 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1233 else
1234 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1235 fi
1236fi
1237for ac_site_file in $CONFIG_SITE; do
1238 if test -r "$ac_site_file"; then
c0d27fcc 1239 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1240echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1241 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1242 . "$ac_site_file"
1243 fi
1244done
1245
1246if test -r "$cache_file"; then
503d2be0
AS
1247 # Some versions of bash will fail to source /dev/null (special
1248 # files actually), so we avoid doing that.
1249 if test -f "$cache_file"; then
c0d27fcc 1250 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1251echo "$as_me: loading cache $cache_file" >&6;}
1252 case $cache_file in
1253 [\\/]* | ?:[\\/]* ) . $cache_file;;
1254 *) . ./$cache_file;;
1255 esac
1256 fi
ba4481b5 1257else
c0d27fcc 1258 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1259echo "$as_me: creating cache $cache_file" >&6;}
1260 >$cache_file
1261fi
1262
1263# Check that the precious variables saved in the cache have kept the same
1264# value.
1265ac_cache_corrupted=false
1266for ac_var in `(set) 2>&1 |
35996d22 1267 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
503d2be0
AS
1268 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1269 eval ac_new_set=\$ac_env_${ac_var}_set
1270 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1271 eval ac_new_val="\$ac_env_${ac_var}_value"
1272 case $ac_old_set,$ac_new_set in
1273 set,)
c0d27fcc 1274 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1275echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1276 ac_cache_corrupted=: ;;
1277 ,set)
c0d27fcc 1278 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1279echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1280 ac_cache_corrupted=: ;;
1281 ,);;
1282 *)
1283 if test "x$ac_old_val" != "x$ac_new_val"; then
35996d22 1284 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1285echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
35996d22 1286 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1287echo "$as_me: former value: $ac_old_val" >&2;}
35996d22 1288 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1289echo "$as_me: current value: $ac_new_val" >&2;}
35996d22 1290 ac_cache_corrupted=:
503d2be0
AS
1291 fi;;
1292 esac
c0d27fcc 1293 # Pass precious variables to config.status.
503d2be0
AS
1294 if test "$ac_new_set" = set; then
1295 case $ac_new_val in
1296 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
c0d27fcc
MR
1297 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1298 *) ac_arg=$ac_var=$ac_new_val ;;
1299 esac
1300 case " $ac_configure_args " in
1301 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1302 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1303 esac
1304 fi
1305done
1306if $ac_cache_corrupted; then
c0d27fcc 1307 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1308echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1309 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1310echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1311 { (exit 1); exit 1; }; }
ba4481b5
DL
1312fi
1313
1314ac_ext=c
ba4481b5 1315ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
1316ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1317ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1318ac_compiler_gnu=$ac_cv_c_compiler_gnu
1319
c0d27fcc
MR
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
ba4481b5 1336
6bae0ccf
DL
1337
1338 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1339
c0d27fcc 1340
ba5da88a
PJ
1341test "$program_prefix" != NONE &&
1342 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1343# Use a double $ so make ignores it.
1344test "$program_suffix" != NONE &&
1345 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1346# Double any \ or $. echo might interpret backslashes.
1347# By default was `s,x,x', remove it if useless.
1348cat <<\_ACEOF >conftest.sed
1349s/[\\$]/&&/g;s/;s,x,x,$//
1350_ACEOF
1351program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1352rm conftest.sed
1353
c0d27fcc 1354
ba4481b5
DL
1355lispdir='${datadir}/emacs/${version}/lisp'
1356locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1357'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1358lisppath='${locallisppath}:${lispdir}'
1359etcdir='${datadir}/emacs/${version}/etc'
1360archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1361docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1362gamedir='${localstatedir}/games/emacs'
98418dba
CW
1363
1364gameuser=games
1365
c0d27fcc 1366
ba4481b5
DL
1367# Check whether --with-gcc or --without-gcc was given.
1368if test "${with_gcc+set}" = set; then
1369 withval="$with_gcc"
503d2be0
AS
1370
1371fi;
ba4481b5
DL
1372
1373# Check whether --with-pop or --without-pop was given.
1374if test "${with_pop+set}" = set; then
1375 withval="$with_pop"
243cf185 1376 if test "$withval" = yes; then
c0d27fcc 1377 cat >>confdefs.h <<\_ACEOF
ba4481b5 1378#define MAIL_USE_POP 1
c0d27fcc 1379_ACEOF
ba4481b5 1380
243cf185
DL
1381else :
1382fi
3d9fec71 1383else
c0d27fcc 1384 cat >>confdefs.h <<\_ACEOF
3d9fec71 1385#define MAIL_USE_POP 1
c0d27fcc 1386_ACEOF
3d9fec71 1387
503d2be0 1388fi;
ba4481b5 1389
c0d27fcc 1390
a21616bd
KR
1391# Check whether --with-kerberos or --without-kerberos was given.
1392if test "${with_kerberos+set}" = set; then
1393 withval="$with_kerberos"
c0d27fcc 1394 cat >>confdefs.h <<\_ACEOF
a21616bd 1395#define KERBEROS 1
c0d27fcc 1396_ACEOF
a21616bd 1397
503d2be0 1398fi;
a21616bd 1399
c0d27fcc 1400
a21616bd
KR
1401# Check whether --with-kerberos5 or --without-kerberos5 was given.
1402if test "${with_kerberos5+set}" = set; then
1403 withval="$with_kerberos5"
1404 if test "${with_kerberos5+set}" = set; then
1405 if test "${with_kerberos+set}" != set; then
1406 with_kerberos=yes
c0d27fcc 1407 cat >>confdefs.h <<\_ACEOF
a21616bd 1408#define KERBEROS 1
c0d27fcc 1409_ACEOF
a21616bd
KR
1410
1411 fi
1412fi
b936fae4 1413
c0d27fcc 1414cat >>confdefs.h <<\_ACEOF
a21616bd 1415#define KERBEROS5 1
c0d27fcc 1416_ACEOF
a21616bd 1417
503d2be0 1418fi;
a21616bd 1419
ba4481b5
DL
1420# Check whether --with-hesiod or --without-hesiod was given.
1421if test "${with_hesiod+set}" = set; then
1422 withval="$with_hesiod"
b936fae4 1423
c0d27fcc 1424cat >>confdefs.h <<\_ACEOF
ba4481b5 1425#define HESIOD 1
c0d27fcc 1426_ACEOF
ba4481b5 1427
503d2be0 1428fi;
ba4481b5 1429
c0d27fcc 1430
2c9dccc9
PJ
1431# Check whether --with-sound or --without-sound was given.
1432if test "${with_sound+set}" = set; then
1433 withval="$with_sound"
1434
1435fi;
1436
c0d27fcc 1437
ba4481b5
DL
1438# Check whether --with-x-toolkit or --without-x-toolkit was given.
1439if test "${with_x_toolkit+set}" = set; then
1440 withval="$with_x_toolkit"
1441 case "${withval}" in
1442 y | ye | yes ) val=athena ;;
1443 n | no ) val=no ;;
1444 l | lu | luc | luci | lucid ) val=lucid ;;
1445 a | at | ath | athe | athen | athena ) val=athena ;;
1446 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1447 g | gt | gtk ) val=gtk ;;
ba4481b5 1448 * )
c0d27fcc 1449{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1450this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1451Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1452echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1453this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1454Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1455 { (exit 1); exit 1; }; }
ba4481b5
DL
1456 ;;
1457 esac
1458 with_x_toolkit=$val
1459
503d2be0 1460fi;
ba4481b5
DL
1461
1462# Check whether --with-xpm or --without-xpm was given.
1463if test "${with_xpm+set}" = set; then
1464 withval="$with_xpm"
503d2be0
AS
1465
1466fi;
ba4481b5
DL
1467
1468# Check whether --with-jpeg or --without-jpeg was given.
1469if test "${with_jpeg+set}" = set; then
1470 withval="$with_jpeg"
503d2be0
AS
1471
1472fi;
ba4481b5
DL
1473
1474# Check whether --with-tiff or --without-tiff was given.
1475if test "${with_tiff+set}" = set; then
1476 withval="$with_tiff"
503d2be0
AS
1477
1478fi;
ba4481b5
DL
1479
1480# Check whether --with-gif or --without-gif was given.
1481if test "${with_gif+set}" = set; then
1482 withval="$with_gif"
503d2be0
AS
1483
1484fi;
ba4481b5
DL
1485
1486# Check whether --with-png or --without-png was given.
1487if test "${with_png+set}" = set; then
1488 withval="$with_png"
503d2be0
AS
1489
1490fi;
ba4481b5 1491
488dd4c4
JD
1492# Check whether --with-gtk or --without-gtk was given.
1493if test "${with_gtk+set}" = set; then
1494 withval="$with_gtk"
1495
1496fi;
1497
1498# Check whether --with-pkg-config-prog or --without-pkg-config-prog was given.
1499if test "${with_pkg_config_prog+set}" = set; then
1500 withval="$with_pkg_config_prog"
1501
1502fi;
1503
ba4481b5
DL
1504# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1505if test "${with_toolkit_scroll_bars+set}" = set; then
1506 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1507
1508fi;
ba4481b5 1509
1d36487c
GM
1510# Check whether --with-xim or --without-xim was given.
1511if test "${with_xim+set}" = set; then
1512 withval="$with_xim"
1d36487c 1513
503d2be0 1514fi;
ba4481b5 1515
e0f712ba
AC
1516# Check whether --with-carbon or --without-carbon was given.
1517if test "${with_carbon+set}" = set; then
1518 withval="$with_carbon"
1519
1520fi;
6a3a24fa
JD
1521# Check whether --enable-carbon-app or --disable-carbon-app was given.
1522if test "${enable_carbon_app+set}" = set; then
1523 enableval="$enable_carbon_app"
1524 carbon_appdir_x=${enableval}
1525fi;
e0f712ba 1526
d0098f13
JD
1527# Check whether --enable-asserts or --disable-asserts was given.
1528if test "${enable_asserts+set}" = set; then
1529 enableval="$enable_asserts"
1530 USE_XASSERTS=$enableval
1531else
1532 USE_XASSERTS=no
1533fi;
1534
19650fd6
AS
1535# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1536if test "${enable_maintainer_mode+set}" = set; then
1537 enableval="$enable_maintainer_mode"
1538 USE_MAINTAINER_MODE=$enableval
1539else
1540 USE_MAINTAINER_MODE=no
1541fi;
1542if test $USE_MAINTAINER_MODE = yes; then
1543 MAINT=
1544else
1545 MAINT=#
1546fi
1547
1548
9adfabc2
LK
1549# Check whether --enable-locallisppath or --disable-locallisppath was given.
1550if test "${enable_locallisppath+set}" = set; then
1551 enableval="$enable_locallisppath"
1552 if test "${enableval}" = "no"; then
1553 locallisppath=
1554elif test "${enableval}" != "yes"; then
1555 locallisppath=${enableval}
1556fi
1557fi;
1558
ba4481b5 1559#### Make srcdir absolute, if it isn't already. It's important to
17494071 1560#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1561#### give you automounter prefixes, which can go away. We do all this
1562#### so Emacs can find its files when run uninstalled.
17494071
GM
1563## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1564unset CDPATH
ba4481b5
DL
1565case "${srcdir}" in
1566 /* ) ;;
1567 . )
1568 ## We may be able to use the $PWD environment variable to make this
1569 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
1570 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1571 ## but that tested only for a well-formed and valid PWD,
1572 ## it did not object when PWD was well-formed and valid but just wrong.
1573 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
1574 then
1575 srcdir="$PWD"
1576 else
1577 srcdir="`(cd ${srcdir}; pwd)`"
1578 fi
1579 ;;
1580 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1581esac
1582
1583#### Check if the source directory already has a configured system in it.
1584if test `pwd` != `(cd ${srcdir} && pwd)` \
1585 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 1586 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1587 as a build directory right now; it has been configured in its own
1588 right. To configure in another directory as well, you MUST
1589 use GNU make. If you do not have GNU make, then you must
1590 now do \`make distclean' in ${srcdir},
1591 and then run $0 again." >&5
1592echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1593 as a build directory right now; it has been configured in its own
1594 right. To configure in another directory as well, you MUST
1595 use GNU make. If you do not have GNU make, then you must
1596 now do \`make distclean' in ${srcdir},
503d2be0 1597 and then run $0 again." >&2;}
ba4481b5
DL
1598fi
1599
1600#### Given the configuration name, set machfile and opsysfile to the
1601#### names of the m/*.h and s/*.h files we should use.
1602
1603### Canonicalize the configuration name.
1604
1605ac_aux_dir=
1606for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1607 if test -f $ac_dir/install-sh; then
1608 ac_aux_dir=$ac_dir
1609 ac_install_sh="$ac_aux_dir/install-sh -c"
1610 break
1611 elif test -f $ac_dir/install.sh; then
1612 ac_aux_dir=$ac_dir
1613 ac_install_sh="$ac_aux_dir/install.sh -c"
1614 break
503d2be0
AS
1615 elif test -f $ac_dir/shtool; then
1616 ac_aux_dir=$ac_dir
1617 ac_install_sh="$ac_aux_dir/shtool install -c"
1618 break
ba4481b5
DL
1619 fi
1620done
1621if test -z "$ac_aux_dir"; then
c0d27fcc 1622 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1623echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1624 { (exit 1); exit 1; }; }
ba4481b5 1625fi
503d2be0
AS
1626ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1627ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1628ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1629
1630# Make sure we can run config.sub.
503d2be0 1631$ac_config_sub sun4 >/dev/null 2>&1 ||
c0d27fcc 1632 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1633echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1634 { (exit 1); exit 1; }; }
1635
c0d27fcc 1636echo "$as_me:$LINENO: checking build system type" >&5
503d2be0
AS
1637echo $ECHO_N "checking build system type... $ECHO_C" >&6
1638if test "${ac_cv_build+set}" = set; then
1639 echo $ECHO_N "(cached) $ECHO_C" >&6
1640else
1641 ac_cv_build_alias=$build_alias
1642test -z "$ac_cv_build_alias" &&
1643 ac_cv_build_alias=`$ac_config_guess`
1644test -z "$ac_cv_build_alias" &&
c0d27fcc 1645 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1646echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1647 { (exit 1); exit 1; }; }
1648ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
c0d27fcc
MR
1649 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1650echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
503d2be0
AS
1651 { (exit 1); exit 1; }; }
1652
1653fi
c0d27fcc 1654echo "$as_me:$LINENO: result: $ac_cv_build" >&5
503d2be0
AS
1655echo "${ECHO_T}$ac_cv_build" >&6
1656build=$ac_cv_build
1657build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1658build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1659build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1660
c0d27fcc
MR
1661
1662echo "$as_me:$LINENO: checking host system type" >&5
503d2be0
AS
1663echo $ECHO_N "checking host system type... $ECHO_C" >&6
1664if test "${ac_cv_host+set}" = set; then
1665 echo $ECHO_N "(cached) $ECHO_C" >&6
1666else
1667 ac_cv_host_alias=$host_alias
1668test -z "$ac_cv_host_alias" &&
1669 ac_cv_host_alias=$ac_cv_build_alias
1670ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
c0d27fcc 1671 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1672echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1673 { (exit 1); exit 1; }; }
1674
1675fi
c0d27fcc 1676echo "$as_me:$LINENO: result: $ac_cv_host" >&5
503d2be0
AS
1677echo "${ECHO_T}$ac_cv_host" >&6
1678host=$ac_cv_host
1679host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1680host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1681host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5 1682
c0d27fcc 1683
ba4481b5 1684canonical=$host
531a3336 1685configuration=${host_alias-$host}
ba4481b5 1686
c0d27fcc 1687
22044edf 1688
ba4481b5
DL
1689### If you add support for a new configuration, add code to this
1690### switch statement to recognize your configuration name and select
1691### the appropriate operating system and machine description files.
1692
1693### You would hope that you could choose an m/*.h file pretty much
1694### based on the machine portion of the configuration name, and an s-
1695### file based on the operating system portion. However, it turns out
1696### that each m/*.h file is pretty manufacturer-specific - for
1697### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1698### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1699### machines. So we basically have to have a special case for each
1700### configuration name.
1701###
1702### As far as handling version numbers on operating systems is
1703### concerned, make sure things will fail in a fixable way. If
1704### /etc/MACHINES doesn't say anything about version numbers, be
1705### prepared to handle anything reasonably. If version numbers
1706### matter, be sure /etc/MACHINES says something about it.
1707###
1708### Eric Raymond says we should accept strings like "sysvr4" to mean
1709### "System V Release 4"; he writes, "The old convention encouraged
1710### confusion between `system' and `release' levels'."
1711
1712machine='' opsys='' unported=no
1713case "${canonical}" in
1714
1096bcc0
GM
1715 ## FreeBSD ports
1716 *-*-freebsd* )
1717 opsys=freebsd
1718 case "${canonical}" in
1719 alpha*-*-freebsd*) machine=alpha ;;
1720 i[3456]86-*-freebsd*) machine=intel386 ;;
1721 esac
1722 ;;
1723
ba4481b5
DL
1724 ## NetBSD ports
1725 *-*-netbsd* )
1726 opsys=netbsd
dd038e26 1727 if test -f /usr/lib/crti.o; then
f57bd967
DL
1728
1729cat >>confdefs.h <<\_ACEOF
1730#define HAVE_CRTIN
dd038e26
AS
1731_ACEOF
1732
1733 fi
1734
ba4481b5
DL
1735 case "${canonical}" in
1736 alpha*-*-netbsd*) machine=alpha ;;
1737 i[3456]86-*-netbsd*) machine=intel386 ;;
1738 m68k-*-netbsd*)
1739 # This is somewhat bogus.
1740 machine=hp9000s300 ;;
1741 powerpc-apple-netbsd*) machine=macppc ;;
1742 mips-*-netbsd*) machine=pmax ;;
2df636f4 1743 mipsel-*-netbsd*) machine=pmax ;;
97836269 1744 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 1745 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1746 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1747 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1748 vax-*-netbsd*) machine=vax ;;
2df636f4 1749 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1750 esac
1751 ;;
1752
1753 ## OpenBSD ports
1754 *-*-openbsd* )
1755 opsys=openbsd
1756 case "${canonical}" in
1757 alpha*-*-openbsd*) machine=alpha ;;
1758 i386-*-openbsd*) machine=intel386 ;;
1759 m68k-*-openbsd*) machine=hp9000s300 ;;
1760 mipsel-*-openbsd*) machine=pmax ;;
1761 ns32k-*-openbsd*) machine=ns32000 ;;
1762 sparc-*-openbsd*) machine=sparc ;;
1763 vax-*-openbsd*) machine=vax ;;
1764 esac
1765 ;;
1766
1767 ## Acorn RISCiX:
1768 arm-acorn-riscix1.1* )
1769 machine=acorn opsys=riscix1-1
1770 ;;
1771 arm-acorn-riscix1.2* | arm-acorn-riscix )
1772 ## This name is riscix12 instead of riscix1.2
1773 ## to avoid a file name conflict on MSDOS.
1774 machine=acorn opsys=riscix12
1775 ;;
1776
1777 ## BSDI ports
1778 *-*-bsdi* )
1779 opsys=bsdi
1780 case "${canonical}" in
1781 i[345]86-*-bsdi*) machine=intel386 ;;
1782 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1783 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1784 esac
1785 case "${canonical}" in
1786 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1787 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1788 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1789 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1790 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1791 esac
1792 ;;
1793
1794 ## Alliant machines
1795 ## Strictly speaking, we need the version of the alliant operating
1796 ## system to choose the right machine file, but currently the
1797 ## configuration name doesn't tell us enough to choose the right
1798 ## one; we need to give alliants their own operating system name to
1799 ## do this right. When someone cares, they can help us.
1800 fx80-alliant-* )
1801 machine=alliant4 opsys=bsd4-2
1802 ;;
1803 i860-alliant-* )
1804 machine=alliant-2800 opsys=bsd4-3
1805 ;;
1806
1807 ## Alpha (DEC) machines.
1808 alpha*-dec-osf* )
1809 machine=alpha opsys=osf1
1810 # This is needed to find X11R6.1 libraries for certain tests.
1811 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1812 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1813 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1814 # due to non-traditional preprocessing with the current compiler
1815 # defaults. OSF 4 can also have that compiler version, and there
1816 # seems always to have been a usable /usr/bin/cpp.
1817 NON_GNU_CPP=/usr/bin/cpp
ca512671 1818 case "${canonical}" in
a55b799a 1819 alpha*-dec-osf[5-9]*)
bb17930d 1820 opsys=osf5-0 ;;
ca512671 1821 esac
ba4481b5
DL
1822 ;;
1823
1824 alpha*-*-linux-gnu* )
1825 machine=alpha opsys=gnu-linux
1826 ;;
1827
c4bb2108
DL
1828 arm*-*-linux-gnu* )
1829 machine=arm opsys=gnu-linux
1830 ;;
1831
ba4481b5
DL
1832 ## Altos 3068
1833 m68*-altos-sysv* )
1834 machine=altos opsys=usg5-2
1835 ;;
1836
1837 ## Amdahl UTS
1838 580-amdahl-sysv* )
1839 machine=amdahl opsys=usg5-2-2
1840 ;;
1841
1842 ## Apollo, Domain/OS
1843 m68*-apollo-* )
1844 machine=apollo opsys=bsd4-3
1845 ;;
1846
1847 ## AT&T 3b2, 3b5, 3b15, 3b20
1848 we32k-att-sysv* )
1849 machine=att3b opsys=usg5-2-2
1850 ;;
1851
1852 ## AT&T 3b1 - The Mighty Unix PC!
1853 m68*-att-sysv* )
1854 machine=7300 opsys=usg5-2-2
1855 ;;
1856
1857 ## Bull dpx20
1858 rs6000-bull-bosx* )
1859 machine=ibmrs6000 opsys=aix3-2
1860 ;;
1861
1862 ## Bull dpx2
1863 m68*-bull-sysv3* )
1864 machine=dpx2 opsys=usg5-3
1865 ;;
1866
1867 ## Bull sps7
1868 m68*-bull-sysv2* )
1869 machine=sps7 opsys=usg5-2
1870 ;;
1871
1872 ## CCI 5/32, 6/32 -- see "Tahoe".
1873
1874 ## Celerity
1875 ## I don't know what configuration name to use for this; config.sub
1876 ## doesn't seem to know anything about it. Hey, Celerity users, get
1877 ## in touch with us!
1878 celerity-celerity-bsd* )
1879 machine=celerity opsys=bsd4-2
1880 ;;
1881
1882 ## Clipper
1883 ## What operating systems does this chip run that Emacs has been
1884 ## tested on?
1885 clipper-* )
1886 machine=clipper
1887 ## We'll use the catch-all code at the bottom to guess the
1888 ## operating system.
1889 ;;
1890
df645f7c
AS
1891 ## Compaq Nonstop
1892 mips-compaq-nonstopux* )
1893 machine=nonstopux opsys=nonstopux
1894 ;;
1895
ba4481b5
DL
1896 ## Convex
1897 *-convex-bsd* | *-convex-convexos* )
1898 machine=convex opsys=bsd4-3
1899 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1900 NON_GNU_CPP="cc -E -P"
1901 ;;
1902
1903 ## Cubix QBx/386
1904 i[3456]86-cubix-sysv* )
1905 machine=intel386 opsys=usg5-3
1906 ;;
1907
1908 ## Cydra 5
1909 cydra*-cydrome-sysv* )
1910 machine=cydra5 opsys=usg5-3
1911 ;;
1912
1913 ## Data General AViiON Machines
1914 ## DG changed naming conventions with the release of 5.4.4.10, they
1915 ## dropped the initial 5.4 but left the intervening R. Because of the
1916 ## R this shouldn't conflict with older versions of the OS (which I
1917 ## think were named like dgux4.*). In addition, DG new AViiONs series
1918 ## uses either Motorola M88k or Intel Pentium CPUs.
1919 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1920 machine=aviion opsys=dgux4
1921 ;;
1922 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1923 ## This name is dgux5-4-3 instead of dgux5-4r3
1924 ## to avoid a file name conflict on MSDOS.
1925 machine=aviion opsys=dgux5-4-3
1926 ;;
1927 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1928 machine=aviion opsys=dgux5-4r2
1929 ;;
1930 m88k-dg-dgux* )
1931 machine=aviion opsys=dgux
1932 ;;
1933
1934 ## Data General AViiON Intel (x86) Machines
1935 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1936 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1937 i[345]86-dg-dguxR4* )
1938 machine=aviion-intel opsys=dgux4
1939 ;;
1940
1941 ## DECstations
1942 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1943 machine=pmax opsys=bsd4-2
1944 ;;
1945 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1946 machine=pmax opsys=bsd4-3
1947 ;;
1948 mips-dec-ultrix* )
1949 machine=pmax opsys=ultrix4-3
1950 ;;
1951 mips-dec-osf* )
1952 machine=pmax opsys=osf1
1953 ;;
1954 mips-dec-mach_bsd4.3* )
1955 machine=pmax opsys=mach-bsd4-3
1956 ;;
1957
cd890796
JD
1958 ## Motorola Delta machines
1959 m68k-motorola-sysv* | m68000-motorola-sysv* )
1960 machine=delta opsys=usg5-3
1961 if test -z "`type gnucc | grep 'not found'`"
1962 then
1963 if test -s /etc/167config
1964 then CC="gnucc -m68040"
1965 else CC="gnucc -m68881"
1966 fi
1967 else
1968 if test -z "`type gcc | grep 'not found'`"
1969 then CC=gcc
1970 else CC=cc
1971 fi
1972 fi
1973 ;;
ba4481b5
DL
1974 m88k-motorola-sysv4* )
1975 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1976 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1977 # I hope there are not other 4.0 versions for this machine
1978 # which really need usg5-4 instead.
1979 machine=delta88k opsys=usg5-4-2
1980 ;;
1981 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1982 machine=delta88k opsys=usg5-3
1983 ;;
1984
1985 ## Dual machines
1986 m68*-dual-sysv* )
1987 machine=dual opsys=usg5-2
1988 ;;
1989 m68*-dual-uniplus* )
1990 machine=dual opsys=unipl5-2
1991 ;;
1992
1993 ## Elxsi 6400
1994 elxsi-elxsi-sysv* )
1995 machine=elxsi opsys=usg5-2
1996 ;;
1997
1998 ## Encore machines
1999 ns16k-encore-bsd* )
2000 machine=ns16000 opsys=umax
2001 ;;
2002
65171e3a
DL
2003 ## The GEC 63 - apparently, this port isn't really finished yet.
2004 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
2005
2006 ## Gould Power Node and NP1
2007 pn-gould-bsd4.2* )
2008 machine=gould opsys=bsd4-2
2009 ;;
2010 pn-gould-bsd4.3* )
2011 machine=gould opsys=bsd4-3
2012 ;;
2013 np1-gould-bsd* )
2014 machine=gould-np1 opsys=bsd4-3
2015 ;;
2016
2017 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2018 ## as far as Emacs is concerned).
2019 m88k-harris-cxux* )
2020 # Build needs to be different on 7.0 and later releases
2021 case "`uname -r`" in
2022 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2023 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2024 esac
2025 NON_GNU_CPP="/lib/cpp"
2026 ;;
2027 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2028 m68k-harris-cxux* )
2029 machine=nh3000 opsys=cxux
2030 ;;
2031 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2032 powerpc-harris-powerunix )
2033 machine=nh6000 opsys=powerunix
2034 NON_GNU_CPP="cc -Xo -E -P"
2035 ;;
2036 ## SR2001/SR2201 running HI-UX/MPP
2037 hppa1.1-hitachi-hiuxmpp* )
2038 machine=sr2k opsys=hiuxmpp
2039 ;;
89a336fa
GM
2040 hppa1.1-hitachi-hiuxwe2* )
2041 machine=sr2k opsys=hiuxwe2
2042 ;;
ba4481b5
DL
2043 ## Honeywell XPS100
2044 xps*-honeywell-sysv* )
2045 machine=xps100 opsys=usg5-2
2046 ;;
2047
2048 ## HP 9000 series 200 or 300
2049 m68*-hp-bsd* )
2050 machine=hp9000s300 opsys=bsd4-3
2051 ;;
2052 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2053 m68*-hp-hpux* )
2054 case "`uname -r`" in
2055 ## Someone's system reports A.B8.05 for this.
2056 ## I wonder what other possibilities there are.
2057 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2058 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2059 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2060 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2061 *) machine=hp9000s300 opsys=hpux ;;
2062 esac
2063 ;;
2064
2065 ## HP 9000 series 700 and 800, running HP/UX
2066 hppa*-hp-hpux7* )
2067 machine=hp800 opsys=hpux
2068 ;;
2069 hppa*-hp-hpux8* )
2070 machine=hp800 opsys=hpux8
2071 ;;
2072 hppa*-hp-hpux9shr* )
2073 machine=hp800 opsys=hpux9shr
2074 ;;
2075 hppa*-hp-hpux9* )
2076 machine=hp800 opsys=hpux9
2077 ;;
b0e44248
RB
2078 hppa*-hp-hpux10.2* )
2079 machine=hp800 opsys=hpux10-20
2080 ;;
cc227489 2081 hppa*-hp-hpux10* )
ba4481b5
DL
2082 machine=hp800 opsys=hpux10
2083 ;;
cc227489
MB
2084 hppa*-hp-hpux1[1-9]* )
2085 machine=hp800 opsys=hpux11
2086 ;;
ba4481b5 2087
409d9577
GM
2088 hppa*-*-linux-gnu* )
2089 machine=hp800 opsys=gnu-linux
2090 ;;
2091
ba4481b5
DL
2092 ## HP 9000 series 700 and 800, running HP/UX
2093 hppa*-hp-hpux* )
2094 ## Cross-compilation? Nah!
2095 case "`uname -r`" in
2096 ## Someone's system reports A.B8.05 for this.
2097 ## I wonder what other possibilities there are.
2098 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2099 *.08.* ) machine=hp800 opsys=hpux8 ;;
2100 *.09.* ) machine=hp800 opsys=hpux9 ;;
2101 *) machine=hp800 opsys=hpux10 ;;
2102 esac
2103 ;;
2104 hppa*-*-nextstep* )
2105 machine=hp800 opsys=nextstep
2106 ;;
2107
2108 ## Orion machines
2109 orion-orion-bsd* )
2110 machine=orion opsys=bsd4-2
2111 ;;
2112 clipper-orion-bsd* )
2113 machine=orion105 opsys=bsd4-2
2114 ;;
2115
2116 ## IBM machines
2117 i[3456]86-ibm-aix1.1* )
2118 machine=ibmps2-aix opsys=usg5-2-2
2119 ;;
2120 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2121 machine=ibmps2-aix opsys=usg5-3
2122 ;;
2123 i370-ibm-aix*)
2124 machine=ibm370aix opsys=usg5-3
2125 ;;
55597d70 2126 s390-*-linux-gnu* )
138f0859
GM
2127 machine=ibms390 opsys=gnu-linux
2128 ;;
ba4481b5
DL
2129 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2130 machine=ibmrs6000 opsys=aix3-1
2131 ;;
2132 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2133 machine=ibmrs6000 opsys=aix3-2-5
2134 ;;
2135 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2136 machine=ibmrs6000 opsys=aix4-1
2137 ;;
2138 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2139 machine=ibmrs6000 opsys=aix4-2
2140 ;;
55597d70 2141 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2142 machine=ibmrs6000 opsys=aix4-2
2143 ;;
ba4481b5
DL
2144 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2145 machine=ibmrs6000 opsys=aix4
2146 ;;
2147 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2148 machine=ibmrs6000 opsys=aix4-1
2149 ;;
2150 rs6000-ibm-aix* | powerpc-ibm-aix* )
2151 machine=ibmrs6000 opsys=aix3-2
2152 ;;
2153 romp-ibm-bsd4.3* )
2154 machine=ibmrt opsys=bsd4-3
2155 ;;
2156 romp-ibm-bsd4.2* )
2157 machine=ibmrt opsys=bsd4-2
2158 ;;
2159 romp-ibm-aos4.3* )
2160 machine=ibmrt opsys=bsd4-3
2161 ;;
2162 romp-ibm-aos4.2* )
2163 machine=ibmrt opsys=bsd4-2
2164 ;;
2165 romp-ibm-aos* )
2166 machine=ibmrt opsys=bsd4-3
2167 ;;
2168 romp-ibm-bsd* )
2169 machine=ibmrt opsys=bsd4-3
2170 ;;
2171 romp-ibm-aix* )
2172 machine=ibmrt-aix opsys=usg5-2-2
2173 ;;
2174
2175 ## Integrated Solutions `Optimum V'
2176 m68*-isi-bsd4.2* )
2177 machine=isi-ov opsys=bsd4-2
2178 ;;
2179 m68*-isi-bsd4.3* )
2180 machine=isi-ov opsys=bsd4-3
2181 ;;
2182
2183 ## Intel 386 machines where we do care about the manufacturer
2184 i[3456]86-intsys-sysv* )
2185 machine=is386 opsys=usg5-2-2
2186 ;;
2187
2188 ## Prime EXL
2189 i[3456]86-prime-sysv* )
2190 machine=i386 opsys=usg5-3
2191 ;;
2192
2193 ## Sequent Symmetry running Dynix
2194 i[3456]86-sequent-bsd* )
2195 machine=symmetry opsys=bsd4-3
2196 ;;
2197
2198 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2199 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2200 machine=sequent-ptx opsys=ptx4
2201 NON_GNU_CPP=/lib/cpp
2202 ;;
2203
2204 ## Sequent Symmetry running DYNIX/ptx
2205 ## Use the old cpp rather than the newer ANSI one.
2206 i[3456]86-sequent-ptx* )
2207 machine=sequent-ptx opsys=ptx
2208 NON_GNU_CPP="/lib/cpp"
2209 ;;
2210
2211 ## ncr machine running svr4.3.
2212 i[3456]86-ncr-sysv4.3 )
2213 machine=ncr386 opsys=usg5-4-3
2214 ;;
2215
2216 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2217 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2218 i[3456]86-ncr-sysv* )
2219 machine=ncr386 opsys=usg5-4-2
2220 ;;
2221
2222 ## Intel Paragon OSF/1
2223 i860-intel-osf1* )
2224 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2225 ;;
2226
2227 ## Intel 860
2228 i860-*-sysv4* )
2229 machine=i860 opsys=usg5-4
2230 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2231 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2232 ;;
2233
c76e04a8
GM
2234 ## Macintosh PowerPC
2235 powerpc*-*-linux-gnu* )
2236 machine=macppc opsys=gnu-linux
2237 ;;
2238
ba4481b5
DL
2239 ## Masscomp machines
2240 m68*-masscomp-rtu* )
2241 machine=masscomp opsys=rtu
2242 ;;
2243
2244 ## Megatest machines
2245 m68*-megatest-bsd* )
2246 machine=mega68 opsys=bsd4-2
2247 ;;
2248
2249 ## Workstations sold by MIPS
2250 ## This is not necessarily all workstations using the MIPS processor -
2251 ## Irises are produced by SGI, and DECstations by DEC.
2252
2253 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2254 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2255 ## it gives for choosing between the alternatives seems to be "Use
2256 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2257 ## the BSD world." I'll assume that these are instructions for
2258 ## handling two odd situations, and that every other situation
2259 ## should use mips.h and usg5-2-2, they being listed first.
2260 mips-mips-usg* )
2261 machine=mips4
2262 ## Fall through to the general code at the bottom to decide on the OS.
2263 ;;
2264 mips-mips-riscos4* )
2265 machine=mips4 opsys=bsd4-3
2266 NON_GNU_CC="cc -systype bsd43"
2267 NON_GNU_CPP="cc -systype bsd43 -E"
2268 ;;
2269 mips-mips-riscos5* )
2270 machine=mips4 opsys=riscos5
2271 NON_GNU_CC="cc -systype bsd43"
2272 NON_GNU_CPP="cc -systype bsd43 -E"
2273 ;;
2274 mips-mips-bsd* )
2275 machine=mips opsys=bsd4-3
2276 ;;
2277 mips-mips-* )
2278 machine=mips opsys=usg5-2-2
2279 ;;
2280
2281 ## NeXT
2282 m68*-next-* | m68k-*-nextstep* )
2283 machine=m68k opsys=nextstep
2284 ;;
2285
2286 ## The complete machine from National Semiconductor
2287 ns32k-ns-genix* )
2288 machine=ns32000 opsys=usg5-2
2289 ;;
2290
2291 ## NCR machines
2292 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2293 machine=tower32 opsys=usg5-2-2
2294 ;;
2295 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2296 machine=tower32v3 opsys=usg5-3
2297 ;;
2298
2299 ## NEC EWS4800
2300 mips-nec-sysv4*)
2301 machine=ews4800 opsys=ux4800
2302 ;;
2303
2304 ## Nixdorf Targon 31
2305 m68*-nixdorf-sysv* )
2306 machine=targon31 opsys=usg5-2-2
2307 ;;
2308
2309 ## Nu (TI or LMI)
2310 m68*-nu-sysv* )
2311 machine=nu opsys=usg5-2
2312 ;;
2313
2314 ## Plexus
2315 m68*-plexus-sysv* )
2316 machine=plexus opsys=usg5-2
2317 ;;
2318
ba4481b5
DL
2319 ## Pyramid machines
2320 ## I don't really have any idea what sort of processor the Pyramid has,
2321 ## so I'm assuming it is its own architecture.
2322 pyramid-pyramid-bsd* )
2323 machine=pyramid opsys=bsd4-2
2324 ;;
2325
2326 ## Sequent Balance
2327 ns32k-sequent-bsd4.2* )
2328 machine=sequent opsys=bsd4-2
2329 ;;
2330 ns32k-sequent-bsd4.3* )
2331 machine=sequent opsys=bsd4-3
2332 ;;
2333
2334 ## Siemens Nixdorf
2335 mips-siemens-sysv* | mips-sni-sysv*)
2336 machine=mips-siemens opsys=usg5-4
2337 NON_GNU_CC=/usr/ccs/bin/cc
2338 NON_GNU_CPP=/usr/ccs/lib/cpp
2339 ;;
2340
2341 ## Silicon Graphics machines
2342 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2343 m68*-sgi-iris3.5* )
2344 machine=irist opsys=iris3-5
2345 ;;
2346 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2347 machine=irist opsys=iris3-6
2348 ;;
2349 ## Iris 4D
2350 mips-sgi-irix3* )
2351 machine=iris4d opsys=irix3-3
2352 ;;
2353 mips-sgi-irix4* )
2354 machine=iris4d opsys=irix4-0
2355 ;;
2356 mips-sgi-irix6.5 )
2357 machine=iris4d opsys=irix6-5
946173ad
DL
2358 # Without defining _LANGUAGE_C, things get masked out in the headers
2359 # so that, for instance, grepping for `free' in stdlib.h fails and
2360 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2361 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2362 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2363 ;;
2364 mips-sgi-irix6* )
2365 machine=iris4d opsys=irix6-0
c4bb2108 2366 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2367 # but presumably it does no harm.
2368 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2369 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2370 NON_GCC_TEST_OPTIONS=-32
2371 ;;
2372 mips-sgi-irix5.[01]* )
2373 machine=iris4d opsys=irix5-0
2374 ;;
2375 mips-sgi-irix5* | mips-sgi-irix* )
2376 machine=iris4d opsys=irix5-2
2377 ;;
2378
2379 ## SONY machines
2380 m68*-sony-bsd4.2* )
2381 machine=news opsys=bsd4-2
2382 ;;
2383 m68*-sony-bsd4.3* )
2384 machine=news opsys=bsd4-3
2385 ;;
2386 m68*-sony-newsos3* | m68*-sony-news3*)
2387 machine=news opsys=bsd4-3
2388 ;;
2389 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2390 machine=news-risc opsys=bsd4-3
2391 ;;
2392 mips-sony-newsos6* )
2393 machine=news-r6 opsys=newsos6
2394 ;;
2395 mips-sony-news* )
2396 machine=news-risc opsys=newsos5
2397 ;;
2398
2399 ## Stride
2400 m68*-stride-sysv* )
2401 machine=stride opsys=usg5-2
2402 ;;
2403
2404 ## Suns
2405 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2406 machine=sparc opsys=gnu-linux
2407 ;;
2408
d054101f 2409 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2410 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2411 | rs6000-*-solaris2*)
2412 case "${canonical}" in
2413 m68*-sunos1* ) machine=sun1 ;;
2414 m68*-sunos2* ) machine=sun2 ;;
2415 m68* ) machine=sun3 ;;
2416 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2417 i[3456]86-*-* ) machine=intel386 ;;
2418 powerpcle* ) machine=powerpcle ;;
2419 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2420 sparc* ) machine=sparc ;;
2421 * ) unported=yes ;;
2422 esac
2423 case "${canonical}" in
2424 ## The Sun386 didn't get past 4.0.
2425 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2426 *-sunos4.0* ) opsys=sunos4-0 ;;
2427 *-sunos4.1.[3-9]*noshare )
2428 ## This name is sunos413 instead of sunos4-1-3
2429 ## to avoid a file name conflict on MSDOS.
2430 opsys=sunos413
2431 NON_GNU_CPP=/usr/lib/cpp
2432 NON_GCC_TEST_OPTIONS=-Bstatic
2433 GCC_TEST_OPTIONS=-static
2434 ;;
2435 *-sunos4.1.[3-9]* | *-sunos4shr*)
2436 opsys=sunos4shr
2437 NON_GNU_CPP=/usr/lib/cpp
2438 ;;
2439 *-sunos4* | *-sunos )
2440 opsys=sunos4-1
2441 NON_GCC_TEST_OPTIONS=-Bstatic
2442 GCC_TEST_OPTIONS=-static
2443 ;;
2444 *-sunos5.3* | *-solaris2.3* )
2445 opsys=sol2-3
2446 NON_GNU_CPP=/usr/ccs/lib/cpp
2447 ;;
2448 *-sunos5.4* | *-solaris2.4* )
2449 opsys=sol2-4
2450 NON_GNU_CPP=/usr/ccs/lib/cpp
2451 RANLIB="ar -ts"
2452 ;;
2453 *-sunos5.5* | *-solaris2.5* )
2454 opsys=sol2-5
2455 NON_GNU_CPP=/usr/ccs/lib/cpp
2456 RANLIB="ar -ts"
2457 ;;
8e967cf7
MR
2458 *-sunos5.6* | *-solaris2.6* )
2459 opsys=sol2-6
2460 NON_GNU_CPP=/usr/ccs/lib/cpp
2461 RANLIB="ar -ts"
2462 ;;
ba4481b5 2463 *-sunos5* | *-solaris* )
9e71690e 2464 opsys=sol2-6
ba4481b5
DL
2465 NON_GNU_CPP=/usr/ccs/lib/cpp
2466 ;;
2467 * ) opsys=bsd4-2 ;;
2468 esac
2469 ## Watch out for a compiler that we know will not work.
2470 case "${canonical}" in
2471 *-solaris* | *-sunos5* )
2472 if [ "x$CC" = x/usr/ucb/cc ]; then
2473 ## /usr/ucb/cc doesn't work;
2474 ## we should find some other compiler that does work.
2475 unset CC
2476 fi
2477 ;;
2478 *) ;;
2479 esac
2480 ;;
2481 sparc-*-nextstep* )
2482 machine=sparc opsys=nextstep
2483 ;;
2484
2485 ## Tadpole 68k
2486 m68*-tadpole-sysv* )
2487 machine=tad68k opsys=usg5-3
2488 ;;
2489
2490 ## Tahoe machines
2491 tahoe-tahoe-bsd4.2* )
2492 machine=tahoe opsys=bsd4-2
2493 ;;
2494 tahoe-tahoe-bsd4.3* )
2495 machine=tahoe opsys=bsd4-3
2496 ;;
2497
2498 ## Tandem Integrity S2
2499 mips-tandem-sysv* )
2500 machine=tandem-s2 opsys=usg5-3
2501 ;;
2502
2503 ## Tektronix XD88
2504 m88k-tektronix-sysv3* )
2505 machine=tekxd88 opsys=usg5-3
2506 ;;
2507
2508 ## Tektronix 16000 box (6130?)
2509 ns16k-tektronix-bsd* )
2510 machine=ns16000 opsys=bsd4-2
2511 ;;
2512 ## Tektronix 4300
2513 ## src/m/tek4300.h hints that this is a m68k machine.
2514 m68*-tektronix-bsd* )
2515 machine=tek4300 opsys=bsd4-3
2516 ;;
2517
2518 ## Titan P2 or P3
2519 ## We seem to have lost the machine-description file titan.h!
2520 titan-titan-sysv* )
2521 machine=titan opsys=usg5-3
2522 ;;
2523
2524 ## Ustation E30 (SS5E)
2525 m68*-unisys-uniplus* )
2526 machine=ustation opsystem=unipl5-2
2527 ;;
2528
2529 ## Vaxen.
2530 vax-dec-* )
2531 machine=vax
2532 case "${canonical}" in
2533 *-bsd4.1* ) opsys=bsd4-1 ;;
2534 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2535 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2536 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2537 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2538 *-vms* ) opsys=vms ;;
2539 * ) unported=yes
2540 esac
2541 ;;
2542
2543 ## Whitechapel MG1
2544 ns16k-whitechapel-* )
2545 machine=mg1
2546 ## We don't know what sort of OS runs on these; we'll let the
2547 ## operating system guessing code below try.
2548 ;;
2549
2550 ## Wicat
2551 m68*-wicat-sysv* )
2552 machine=wicat opsys=usg5-2
2553 ;;
2554
f4988be7
GM
2555 ## IA-64
2556 ia64*-*-linux* )
2557 machine=ia64 opsys=gnu-linux
2558 ;;
2559
ba4481b5
DL
2560 ## Intel 386 machines where we don't care about the manufacturer
2561 i[3456]86-*-* )
2562 machine=intel386
2563 case "${canonical}" in
c60ee5e7 2564 *-cygwin ) opsys=cygwin ;;
9f817ea4 2565 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2566 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2567 *-isc2.2* ) opsys=isc2-2 ;;
2568 *-isc4.0* ) opsys=isc4-0 ;;
2569 *-isc4.* ) opsys=isc4-1
2570 GCC_TEST_OPTIONS=-posix
2571 NON_GCC_TEST_OPTIONS=-Xp
2572 ;;
2573 *-isc* ) opsys=isc3-0 ;;
2574 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2575 *-esix* ) opsys=esix ;;
2576 *-xenix* ) opsys=xenix ;;
2577 *-linux-gnu* ) opsys=gnu-linux ;;
2578 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2579 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2580 NON_GNU_CPP=/lib/cpp
2581 # Prevent -belf from being passed to $CPP.
2582 # /lib/cpp does not accept it.
2583 OVERRIDE_CPPFLAGS=" "
2584 ;;
2585 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2586 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2587 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2588 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2589 *-nextstep* ) opsys=nextstep ;;
2590 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2591 esac
2592 ;;
2593
2594 ## m68k Linux-based GNU system
2595 m68k-*-linux-gnu* )
2596 machine=m68k opsys=gnu-linux
2597 ;;
2598
2599 ## Mips Linux-based GNU system
cd958eb3 2600 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2601 machine=mips opsys=gnu-linux
2602 ;;
2603
2604 ## UXP/DS
2605 sparc-fujitsu-sysv4* )
2606 machine=sparc opsys=uxpds
2607 NON_GNU_CPP=/usr/ccs/lib/cpp
2608 RANLIB="ar -ts"
2609 ;;
2610
2611 ## UXP/V
2612 f301-fujitsu-uxpv4.1)
2613 machine=f301 opsys=uxpv
2614 ;;
2615
e0f712ba
AC
2616 ## Darwin / Mac OS X
2617 powerpc-apple-darwin* )
2618 machine=powermac opsys=darwin
2619 # Define CPP as follows to make autoconf work correctly.
2a75d75d 2620 CPP="${CC-cc} -E -no-cpp-precomp"
c14dc0ed
AS
2621 # Use fink packages if available.
2622 if test -d /sw/include && test -d /sw/lib; then
2623 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2624 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2625 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2626 fi
e0f712ba
AC
2627 ;;
2628
598a2813
AS
2629 ## AMD x86-64 Linux-based GNU system
2630 x86_64-*-linux-gnu* )
24b01ec4 2631 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2632 ;;
2633
ba4481b5
DL
2634 * )
2635 unported=yes
2636 ;;
2637esac
2638
2639### If the code above didn't choose an operating system, just choose
2640### an operating system based on the configuration name. You really
2641### only want to use this when you have no idea what the right
2642### operating system is; if you know what operating systems a machine
2643### runs, it's cleaner to make it explicit in the case statement
2644### above.
2645if test x"${opsys}" = x; then
2646 case "${canonical}" in
2647 *-gnu* ) opsys=gnu ;;
2648 *-bsd4.[01] ) opsys=bsd4-1 ;;
2649 *-bsd4.2 ) opsys=bsd4-2 ;;
2650 *-bsd4.3 ) opsys=bsd4-3 ;;
2651 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2652 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2653 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2654 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2655 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2656 *-sysv5uw* ) opsys=unixware ;;
2657 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2658 *-sysv4.1* | *-sysvr4.1* )
2659 NON_GNU_CPP=/usr/lib/cpp
2660 opsys=usg5-4 ;;
2661 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2662 if [ x$NON_GNU_CPP = x ]; then
2663 if [ -f /usr/ccs/lib/cpp ]; then
2664 NON_GNU_CPP=/usr/ccs/lib/cpp
2665 else
2666 NON_GNU_CPP=/lib/cpp
2667 fi
2668 fi
2669 opsys=usg5-4-2 ;;
2670 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2671 * )
2672 unported=yes
2673 ;;
2674 esac
2675fi
2676
c0d27fcc 2677
22044edf 2678
ba4481b5 2679if test $unported = yes; then
c0d27fcc 2680 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2681Check \`etc/MACHINES' for recognized configuration names." >&5
2682echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2683Check \`etc/MACHINES' for recognized configuration names." >&2;}
2684 { (exit 1); exit 1; }; }
ba4481b5
DL
2685fi
2686
2687machfile="m/${machine}.h"
2688opsysfile="s/${opsys}.h"
2689
c0d27fcc 2690
ba4481b5
DL
2691#### Choose a compiler.
2692test -n "$CC" && cc_specified=yes
2693
2694# Save the value of CFLAGS that the user specified.
2695SPECIFIED_CFLAGS="$CFLAGS"
2696
2697case ${with_gcc} in
2698 "yes" ) CC="gcc" GCC=yes ;;
2699 "no" ) : ${CC=cc} ;;
503d2be0
AS
2700 * )
2701esac
2702ac_ext=c
2703ac_cpp='$CPP $CPPFLAGS'
2704ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2705ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2706ac_compiler_gnu=$ac_cv_c_compiler_gnu
2707if test -n "$ac_tool_prefix"; then
2708 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2709set dummy ${ac_tool_prefix}gcc; ac_word=$2
c0d27fcc 2710echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2711echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2712if test "${ac_cv_prog_CC+set}" = set; then
2713 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2714else
2715 if test -n "$CC"; then
2716 ac_cv_prog_CC="$CC" # Let the user override the test.
2717else
c0d27fcc
MR
2718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2719for as_dir in $PATH
2720do
2721 IFS=$as_save_IFS
2722 test -z "$as_dir" && as_dir=.
2723 for ac_exec_ext in '' $ac_executable_extensions; do
2724 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2725 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2726 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2727 break 2
2728 fi
2729done
503d2be0
AS
2730done
2731
ba4481b5
DL
2732fi
2733fi
503d2be0 2734CC=$ac_cv_prog_CC
ba4481b5 2735if test -n "$CC"; then
c0d27fcc 2736 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2737echo "${ECHO_T}$CC" >&6
2738else
c0d27fcc 2739 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2740echo "${ECHO_T}no" >&6
2741fi
2742
2743fi
2744if test -z "$ac_cv_prog_CC"; then
2745 ac_ct_CC=$CC
2746 # Extract the first word of "gcc", so it can be a program name with args.
2747set dummy gcc; ac_word=$2
c0d27fcc 2748echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2749echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2750if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2751 echo $ECHO_N "(cached) $ECHO_C" >&6
2752else
2753 if test -n "$ac_ct_CC"; then
2754 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2755else
c0d27fcc
MR
2756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2757for as_dir in $PATH
2758do
2759 IFS=$as_save_IFS
2760 test -z "$as_dir" && as_dir=.
2761 for ac_exec_ext in '' $ac_executable_extensions; do
2762 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2763 ac_cv_prog_ac_ct_CC="gcc"
2764 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2765 break 2
2766 fi
2767done
503d2be0
AS
2768done
2769
2770fi
2771fi
2772ac_ct_CC=$ac_cv_prog_ac_ct_CC
2773if test -n "$ac_ct_CC"; then
c0d27fcc 2774 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0 2775echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2776else
c0d27fcc 2777 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2778echo "${ECHO_T}no" >&6
2779fi
2780
2781 CC=$ac_ct_CC
2782else
2783 CC="$ac_cv_prog_CC"
ba4481b5
DL
2784fi
2785
2786if test -z "$CC"; then
503d2be0
AS
2787 if test -n "$ac_tool_prefix"; then
2788 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2789set dummy ${ac_tool_prefix}cc; ac_word=$2
c0d27fcc 2790echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2791echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2792if test "${ac_cv_prog_CC+set}" = set; then
2793 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2794else
2795 if test -n "$CC"; then
2796 ac_cv_prog_CC="$CC" # Let the user override the test.
2797else
c0d27fcc
MR
2798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2799for as_dir in $PATH
2800do
2801 IFS=$as_save_IFS
2802 test -z "$as_dir" && as_dir=.
2803 for ac_exec_ext in '' $ac_executable_extensions; do
2804 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2805 ac_cv_prog_CC="${ac_tool_prefix}cc"
2806 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2807 break 2
2808 fi
2809done
503d2be0
AS
2810done
2811
2812fi
2813fi
2814CC=$ac_cv_prog_CC
2815if test -n "$CC"; then
c0d27fcc 2816 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2817echo "${ECHO_T}$CC" >&6
2818else
c0d27fcc 2819 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2820echo "${ECHO_T}no" >&6
2821fi
2822
2823fi
2824if test -z "$ac_cv_prog_CC"; then
2825 ac_ct_CC=$CC
2826 # Extract the first word of "cc", so it can be a program name with args.
2827set dummy cc; ac_word=$2
c0d27fcc 2828echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2829echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2830if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2831 echo $ECHO_N "(cached) $ECHO_C" >&6
2832else
2833 if test -n "$ac_ct_CC"; then
2834 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2835else
c0d27fcc
MR
2836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2837for as_dir in $PATH
2838do
2839 IFS=$as_save_IFS
2840 test -z "$as_dir" && as_dir=.
2841 for ac_exec_ext in '' $ac_executable_extensions; do
2842 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2843 ac_cv_prog_ac_ct_CC="cc"
2844 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2845 break 2
2846 fi
2847done
503d2be0
AS
2848done
2849
2850fi
2851fi
2852ac_ct_CC=$ac_cv_prog_ac_ct_CC
2853if test -n "$ac_ct_CC"; then
c0d27fcc 2854 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2855echo "${ECHO_T}$ac_ct_CC" >&6
2856else
c0d27fcc 2857 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2858echo "${ECHO_T}no" >&6
2859fi
2860
2861 CC=$ac_ct_CC
2862else
2863 CC="$ac_cv_prog_CC"
2864fi
2865
2866fi
2867if test -z "$CC"; then
2868 # Extract the first word of "cc", so it can be a program name with args.
2869set dummy cc; ac_word=$2
c0d27fcc 2870echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2871echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2872if test "${ac_cv_prog_CC+set}" = set; then
2873 echo $ECHO_N "(cached) $ECHO_C" >&6
2874else
2875 if test -n "$CC"; then
2876 ac_cv_prog_CC="$CC" # Let the user override the test.
2877else
2878 ac_prog_rejected=no
c0d27fcc
MR
2879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2880for as_dir in $PATH
2881do
2882 IFS=$as_save_IFS
2883 test -z "$as_dir" && as_dir=.
2884 for ac_exec_ext in '' $ac_executable_extensions; do
2885 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2886 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2887 ac_prog_rejected=yes
2888 continue
2889 fi
2890 ac_cv_prog_CC="cc"
2891 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2892 break 2
2893 fi
2894done
503d2be0
AS
2895done
2896
ba4481b5
DL
2897if test $ac_prog_rejected = yes; then
2898 # We found a bogon in the path, so make sure we never use it.
2899 set dummy $ac_cv_prog_CC
2900 shift
503d2be0 2901 if test $# != 0; then
ba4481b5
DL
2902 # We chose a different compiler from the bogus one.
2903 # However, it has the same basename, so the bogon will be chosen
2904 # first if we set CC to just the basename; use the full file name.
2905 shift
6bae0ccf 2906 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2907 fi
2908fi
2909fi
2910fi
503d2be0 2911CC=$ac_cv_prog_CC
ba4481b5 2912if test -n "$CC"; then
c0d27fcc 2913 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2914echo "${ECHO_T}$CC" >&6
ba4481b5 2915else
c0d27fcc 2916 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2917echo "${ECHO_T}no" >&6
ba4481b5
DL
2918fi
2919
503d2be0
AS
2920fi
2921if test -z "$CC"; then
2922 if test -n "$ac_tool_prefix"; then
2923 for ac_prog in cl
2924 do
2925 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2926set dummy $ac_tool_prefix$ac_prog; ac_word=$2
c0d27fcc 2927echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2928echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2929if test "${ac_cv_prog_CC+set}" = set; then
2930 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2931else
2932 if test -n "$CC"; then
2933 ac_cv_prog_CC="$CC" # Let the user override the test.
2934else
c0d27fcc
MR
2935as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2936for as_dir in $PATH
2937do
2938 IFS=$as_save_IFS
2939 test -z "$as_dir" && as_dir=.
2940 for ac_exec_ext in '' $ac_executable_extensions; do
2941 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2942 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2943 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2944 break 2
2945 fi
2946done
503d2be0
AS
2947done
2948
c4bb2108
DL
2949fi
2950fi
503d2be0 2951CC=$ac_cv_prog_CC
c4bb2108 2952if test -n "$CC"; then
c0d27fcc 2953 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2954echo "${ECHO_T}$CC" >&6
c4bb2108 2955else
c0d27fcc 2956 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2957echo "${ECHO_T}no" >&6
2958fi
2959
2960 test -n "$CC" && break
2961 done
2962fi
2963if test -z "$CC"; then
2964 ac_ct_CC=$CC
2965 for ac_prog in cl
2966do
2967 # Extract the first word of "$ac_prog", so it can be a program name with args.
2968set dummy $ac_prog; ac_word=$2
c0d27fcc 2969echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2970echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2971if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2972 echo $ECHO_N "(cached) $ECHO_C" >&6
2973else
2974 if test -n "$ac_ct_CC"; then
2975 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2976else
c0d27fcc
MR
2977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2978for as_dir in $PATH
2979do
2980 IFS=$as_save_IFS
2981 test -z "$as_dir" && as_dir=.
2982 for ac_exec_ext in '' $ac_executable_extensions; do
2983 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2984 ac_cv_prog_ac_ct_CC="$ac_prog"
2985 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2986 break 2
2987 fi
2988done
503d2be0
AS
2989done
2990
c4bb2108 2991fi
503d2be0
AS
2992fi
2993ac_ct_CC=$ac_cv_prog_ac_ct_CC
2994if test -n "$ac_ct_CC"; then
c0d27fcc 2995 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2996echo "${ECHO_T}$ac_ct_CC" >&6
2997else
c0d27fcc 2998 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2999echo "${ECHO_T}no" >&6
ba4481b5
DL
3000fi
3001
503d2be0
AS
3002 test -n "$ac_ct_CC" && break
3003done
ba4481b5 3004
503d2be0
AS
3005 CC=$ac_ct_CC
3006fi
3007
3008fi
ba4481b5 3009
c0d27fcc 3010
19650fd6
AS
3011test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3012See \`config.log' for more details." >&5
3013echo "$as_me: error: no acceptable C compiler found in \$PATH
3014See \`config.log' for more details." >&2;}
503d2be0 3015 { (exit 1); exit 1; }; }
c4bb2108 3016
503d2be0 3017# Provide some information about the compiler.
c0d27fcc 3018echo "$as_me:$LINENO:" \
503d2be0
AS
3019 "checking for C compiler version" >&5
3020ac_compiler=`set X $ac_compile; echo $2`
c0d27fcc 3021{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
3022 (eval $ac_compiler --version </dev/null >&5) 2>&5
3023 ac_status=$?
c0d27fcc 3024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3025 (exit $ac_status); }
c0d27fcc 3026{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
3027 (eval $ac_compiler -v </dev/null >&5) 2>&5
3028 ac_status=$?
c0d27fcc 3029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3030 (exit $ac_status); }
c0d27fcc 3031{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
3032 (eval $ac_compiler -V </dev/null >&5) 2>&5
3033 ac_status=$?
c0d27fcc 3034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3035 (exit $ac_status); }
3036
3037cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3038/* confdefs.h. */
3039_ACEOF
3040cat confdefs.h >>conftest.$ac_ext
3041cat >>conftest.$ac_ext <<_ACEOF
3042/* end confdefs.h. */
c4bb2108 3043
503d2be0
AS
3044int
3045main ()
3046{
3047
3048 ;
3049 return 0;
3050}
3051_ACEOF
3052ac_clean_files_save=$ac_clean_files
19650fd6 3053ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3054# Try to create an executable without -o first, disregard a.out.
3055# It will help us diagnose broken compilers, and finding out an intuition
3056# of exeext.
35996d22
AS
3057echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3058echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
503d2be0 3059ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
c0d27fcc 3060if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
503d2be0
AS
3061 (eval $ac_link_default) 2>&5
3062 ac_status=$?
c0d27fcc 3063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3064 (exit $ac_status); }; then
3065 # Find the output, starting from the most likely. This scheme is
3066# not robust to junk in `.', hence go to wildcards (a.*) only as a last
3067# resort.
c0d27fcc
MR
3068
3069# Be careful to initialize this variable, since it used to be cached.
3070# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
3071ac_cv_exeext=
19650fd6
AS
3072# b.out is created by i960 compilers.
3073for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
3074do
6bae0ccf 3075 test -f "$ac_file" || continue
503d2be0 3076 case $ac_file in
19650fd6 3077 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
35996d22 3078 ;;
19650fd6 3079 conftest.$ac_ext )
35996d22
AS
3080 # This is the source file.
3081 ;;
19650fd6 3082 [ab].out )
35996d22
AS
3083 # We found the default executable, but exeext='' is most
3084 # certainly right.
3085 break;;
19650fd6 3086 *.* )
35996d22
AS
3087 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3088 # FIXME: I believe we export ac_cv_exeext for Libtool,
3089 # but it would be cool to find out if it's true. Does anybody
3090 # maintain Libtool? --akim.
3091 export ac_cv_exeext
3092 break;;
19650fd6 3093 * )
35996d22 3094 break;;
503d2be0
AS
3095 esac
3096done
3097else
3098 echo "$as_me: failed program was:" >&5
19650fd6
AS
3099sed 's/^/| /' conftest.$ac_ext >&5
3100
6bae0ccf 3101{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3102See \`config.log' for more details." >&5
6bae0ccf 3103echo "$as_me: error: C compiler cannot create executables
19650fd6 3104See \`config.log' for more details." >&2;}
503d2be0
AS
3105 { (exit 77); exit 77; }; }
3106fi
3107
3108ac_exeext=$ac_cv_exeext
c0d27fcc 3109echo "$as_me:$LINENO: result: $ac_file" >&5
503d2be0
AS
3110echo "${ECHO_T}$ac_file" >&6
3111
3112# Check the compiler produces executables we can run. If not, either
3113# the compiler is broken, or we cross compile.
c0d27fcc 3114echo "$as_me:$LINENO: checking whether the C compiler works" >&5
503d2be0
AS
3115echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
3116# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3117# If not cross compiling, check that we can run a simple program.
3118if test "$cross_compiling" != yes; then
3119 if { ac_try='./$ac_file'
c0d27fcc 3120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3121 (eval $ac_try) 2>&5
3122 ac_status=$?
c0d27fcc 3123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3124 (exit $ac_status); }; }; then
3125 cross_compiling=no
ba4481b5 3126 else
503d2be0
AS
3127 if test "$cross_compiling" = maybe; then
3128 cross_compiling=yes
3129 else
c0d27fcc 3130 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3131If you meant to cross compile, use \`--host'.
3132See \`config.log' for more details." >&5
503d2be0 3133echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3134If you meant to cross compile, use \`--host'.
3135See \`config.log' for more details." >&2;}
503d2be0
AS
3136 { (exit 1); exit 1; }; }
3137 fi
ba4481b5 3138 fi
503d2be0 3139fi
c0d27fcc 3140echo "$as_me:$LINENO: result: yes" >&5
503d2be0
AS
3141echo "${ECHO_T}yes" >&6
3142
19650fd6 3143rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0
AS
3144ac_clean_files=$ac_clean_files_save
3145# Check the compiler produces executables we can run. If not, either
3146# the compiler is broken, or we cross compile.
c0d27fcc 3147echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
503d2be0 3148echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
c0d27fcc 3149echo "$as_me:$LINENO: result: $cross_compiling" >&5
503d2be0
AS
3150echo "${ECHO_T}$cross_compiling" >&6
3151
c0d27fcc
MR
3152echo "$as_me:$LINENO: checking for suffix of executables" >&5
3153echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3154if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
3155 (eval $ac_link) 2>&5
3156 ac_status=$?
c0d27fcc 3157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3158 (exit $ac_status); }; then
3159 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3160# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3161# work properly (i.e., refer to `conftest.exe'), while it won't with
3162# `rm'.
6bae0ccf
DL
3163for ac_file in conftest.exe conftest conftest.*; do
3164 test -f "$ac_file" || continue
503d2be0 3165 case $ac_file in
6bae0ccf 3166 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
503d2be0 3167 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
35996d22
AS
3168 export ac_cv_exeext
3169 break;;
503d2be0
AS
3170 * ) break;;
3171 esac
3172done
ba4481b5 3173else
19650fd6
AS
3174 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3175See \`config.log' for more details." >&5
3176echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3177See \`config.log' for more details." >&2;}
503d2be0 3178 { (exit 1); exit 1; }; }
ba4481b5 3179fi
ba4481b5 3180
503d2be0 3181rm -f conftest$ac_cv_exeext
c0d27fcc 3182echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
503d2be0 3183echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 3184
503d2be0
AS
3185rm -f conftest.$ac_ext
3186EXEEXT=$ac_cv_exeext
3187ac_exeext=$EXEEXT
c0d27fcc
MR
3188echo "$as_me:$LINENO: checking for suffix of object files" >&5
3189echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
503d2be0
AS
3190if test "${ac_cv_objext+set}" = set; then
3191 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3192else
503d2be0 3193 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3194/* confdefs.h. */
3195_ACEOF
3196cat confdefs.h >>conftest.$ac_ext
3197cat >>conftest.$ac_ext <<_ACEOF
3198/* end confdefs.h. */
ba4481b5 3199
503d2be0
AS
3200int
3201main ()
3202{
ba4481b5 3203
503d2be0
AS
3204 ;
3205 return 0;
3206}
3207_ACEOF
3208rm -f conftest.o conftest.obj
c0d27fcc 3209if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3210 (eval $ac_compile) 2>&5
3211 ac_status=$?
c0d27fcc 3212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3213 (exit $ac_status); }; then
3214 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3215 case $ac_file in
6bae0ccf 3216 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
503d2be0
AS
3217 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3218 break;;
3219 esac
3220done
c4bb2108 3221else
503d2be0 3222 echo "$as_me: failed program was:" >&5
19650fd6
AS
3223sed 's/^/| /' conftest.$ac_ext >&5
3224
3225{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3226See \`config.log' for more details." >&5
3227echo "$as_me: error: cannot compute suffix of object files: cannot compile
3228See \`config.log' for more details." >&2;}
503d2be0 3229 { (exit 1); exit 1; }; }
c4bb2108
DL
3230fi
3231
503d2be0
AS
3232rm -f conftest.$ac_cv_objext conftest.$ac_ext
3233fi
c0d27fcc 3234echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
503d2be0
AS
3235echo "${ECHO_T}$ac_cv_objext" >&6
3236OBJEXT=$ac_cv_objext
3237ac_objext=$OBJEXT
c0d27fcc 3238echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
3239echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3240if test "${ac_cv_c_compiler_gnu+set}" = set; then
3241 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3242else
503d2be0 3243 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3244/* confdefs.h. */
3245_ACEOF
3246cat confdefs.h >>conftest.$ac_ext
3247cat >>conftest.$ac_ext <<_ACEOF
3248/* end confdefs.h. */
503d2be0
AS
3249
3250int
3251main ()
3252{
3253#ifndef __GNUC__
3254 choke me
3255#endif
3256
3257 ;
3258 return 0;
3259}
3260_ACEOF
3261rm -f conftest.$ac_objext
c0d27fcc 3262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3263 (eval $ac_compile) 2>conftest.er1
503d2be0 3264 ac_status=$?
35996d22
AS
3265 grep -v '^ *+' conftest.er1 >conftest.err
3266 rm -f conftest.er1
3267 cat conftest.err >&5
c0d27fcc 3268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3269 (exit $ac_status); } &&
9adfabc2 3270 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
3271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3272 (eval $ac_try) 2>&5
3273 ac_status=$?
3274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3275 (exit $ac_status); }; } &&
3276 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3278 (eval $ac_try) 2>&5
3279 ac_status=$?
c0d27fcc 3280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3281 (exit $ac_status); }; }; then
3282 ac_compiler_gnu=yes
3283else
3284 echo "$as_me: failed program was:" >&5
19650fd6
AS
3285sed 's/^/| /' conftest.$ac_ext >&5
3286
503d2be0
AS
3287ac_compiler_gnu=no
3288fi
35996d22 3289rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3290ac_cv_c_compiler_gnu=$ac_compiler_gnu
3291
3292fi
c0d27fcc 3293echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
3294echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3295GCC=`test $ac_compiler_gnu = yes && echo yes`
3296ac_test_CFLAGS=${CFLAGS+set}
3297ac_save_CFLAGS=$CFLAGS
3298CFLAGS="-g"
c0d27fcc 3299echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
503d2be0
AS
3300echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3301if test "${ac_cv_prog_cc_g+set}" = set; then
3302 echo $ECHO_N "(cached) $ECHO_C" >&6
3303else
3304 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3305/* confdefs.h. */
3306_ACEOF
3307cat confdefs.h >>conftest.$ac_ext
3308cat >>conftest.$ac_ext <<_ACEOF
3309/* end confdefs.h. */
503d2be0
AS
3310
3311int
3312main ()
3313{
3314
3315 ;
3316 return 0;
3317}
3318_ACEOF
3319rm -f conftest.$ac_objext
c0d27fcc 3320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3321 (eval $ac_compile) 2>conftest.er1
503d2be0 3322 ac_status=$?
35996d22
AS
3323 grep -v '^ *+' conftest.er1 >conftest.err
3324 rm -f conftest.er1
3325 cat conftest.err >&5
c0d27fcc 3326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3327 (exit $ac_status); } &&
9adfabc2 3328 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
3329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3330 (eval $ac_try) 2>&5
3331 ac_status=$?
3332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3333 (exit $ac_status); }; } &&
3334 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3336 (eval $ac_try) 2>&5
3337 ac_status=$?
c0d27fcc 3338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3339 (exit $ac_status); }; }; then
ba4481b5
DL
3340 ac_cv_prog_cc_g=yes
3341else
503d2be0 3342 echo "$as_me: failed program was:" >&5
19650fd6
AS
3343sed 's/^/| /' conftest.$ac_ext >&5
3344
503d2be0 3345ac_cv_prog_cc_g=no
ba4481b5 3346fi
35996d22 3347rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 3348fi
c0d27fcc 3349echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
503d2be0 3350echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 3351if test "$ac_test_CFLAGS" = set; then
503d2be0 3352 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3353elif test $ac_cv_prog_cc_g = yes; then
3354 if test "$GCC" = yes; then
ba4481b5
DL
3355 CFLAGS="-g -O2"
3356 else
c4bb2108 3357 CFLAGS="-g"
ba4481b5 3358 fi
22afa6e8 3359else
c4bb2108
DL
3360 if test "$GCC" = yes; then
3361 CFLAGS="-O2"
3362 else
3363 CFLAGS=
3364 fi
ba4481b5 3365fi
6bae0ccf
DL
3366echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3367echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3368if test "${ac_cv_prog_cc_stdc+set}" = set; then
3369 echo $ECHO_N "(cached) $ECHO_C" >&6
3370else
3371 ac_cv_prog_cc_stdc=no
3372ac_save_CC=$CC
3373cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3374/* confdefs.h. */
3375_ACEOF
3376cat confdefs.h >>conftest.$ac_ext
3377cat >>conftest.$ac_ext <<_ACEOF
3378/* end confdefs.h. */
6bae0ccf
DL
3379#include <stdarg.h>
3380#include <stdio.h>
3381#include <sys/types.h>
3382#include <sys/stat.h>
3383/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3384struct buf { int x; };
3385FILE * (*rcsopen) (struct buf *, struct stat *, int);
3386static char *e (p, i)
3387 char **p;
3388 int i;
3389{
3390 return p[i];
3391}
3392static char *f (char * (*g) (char **, int), char **p, ...)
3393{
3394 char *s;
3395 va_list v;
3396 va_start (v,p);
3397 s = g (p, va_arg (v,int));
3398 va_end (v);
3399 return s;
3400}
35996d22
AS
3401
3402/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3403 function prototypes and stuff, but not '\xHH' hex character constants.
3404 These don't provoke an error unfortunately, instead are silently treated
3405 as 'x'. The following induces an error, until -std1 is added to get
3406 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3407 array size at least. It's necessary to write '\x00'==0 to get something
3408 that's true only with -std1. */
3409int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3410
6bae0ccf
DL
3411int test (int i, double x);
3412struct s1 {int (*f) (int a);};
3413struct s2 {int (*f) (double a);};
3414int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3415int argc;
3416char **argv;
3417int
3418main ()
3419{
3420return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3421 ;
3422 return 0;
3423}
3424_ACEOF
3425# Don't try gcc -ansi; that turns off useful extensions and
3426# breaks some systems' header files.
3427# AIX -qlanglvl=ansi
3428# Ultrix and OSF/1 -std1
3429# HP-UX 10.20 and later -Ae
3430# HP-UX older versions -Aa -D_HPUX_SOURCE
3431# SVR4 -Xc -D__EXTENSIONS__
3432for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3433do
3434 CC="$ac_save_CC $ac_arg"
3435 rm -f conftest.$ac_objext
3436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3437 (eval $ac_compile) 2>conftest.er1
6bae0ccf 3438 ac_status=$?
35996d22
AS
3439 grep -v '^ *+' conftest.er1 >conftest.err
3440 rm -f conftest.er1
3441 cat conftest.err >&5
6bae0ccf
DL
3442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3443 (exit $ac_status); } &&
9adfabc2 3444 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
3445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3446 (eval $ac_try) 2>&5
3447 ac_status=$?
3448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3449 (exit $ac_status); }; } &&
3450 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
3451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3452 (eval $ac_try) 2>&5
3453 ac_status=$?
3454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3455 (exit $ac_status); }; }; then
3456 ac_cv_prog_cc_stdc=$ac_arg
3457break
3458else
3459 echo "$as_me: failed program was:" >&5
19650fd6
AS
3460sed 's/^/| /' conftest.$ac_ext >&5
3461
6bae0ccf 3462fi
35996d22 3463rm -f conftest.err conftest.$ac_objext
6bae0ccf
DL
3464done
3465rm -f conftest.$ac_ext conftest.$ac_objext
3466CC=$ac_save_CC
3467
3468fi
3469
3470case "x$ac_cv_prog_cc_stdc" in
3471 x|xno)
3472 echo "$as_me:$LINENO: result: none needed" >&5
3473echo "${ECHO_T}none needed" >&6 ;;
3474 *)
3475 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3476echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3477 CC="$CC $ac_cv_prog_cc_stdc" ;;
3478esac
3479
503d2be0
AS
3480# Some people use a C++ compiler to compile C. Since we use `exit',
3481# in C++ we need to declare it. In case someone uses the same compiler
3482# for both compiling C and C++ we need to have the C++ compiler decide
3483# the declaration of exit, since it's the most demanding environment.
3484cat >conftest.$ac_ext <<_ACEOF
3485#ifndef __cplusplus
3486 choke me
3487#endif
3488_ACEOF
3489rm -f conftest.$ac_objext
c0d27fcc 3490if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3491 (eval $ac_compile) 2>conftest.er1
503d2be0 3492 ac_status=$?
35996d22
AS
3493 grep -v '^ *+' conftest.er1 >conftest.err
3494 rm -f conftest.er1
3495 cat conftest.err >&5
c0d27fcc 3496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3497 (exit $ac_status); } &&
9adfabc2 3498 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
3499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3500 (eval $ac_try) 2>&5
3501 ac_status=$?
3502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3503 (exit $ac_status); }; } &&
3504 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3506 (eval $ac_try) 2>&5
3507 ac_status=$?
c0d27fcc 3508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3509 (exit $ac_status); }; }; then
3510 for ac_declaration in \
35996d22 3511 '' \
503d2be0
AS
3512 'extern "C" void std::exit (int) throw (); using std::exit;' \
3513 'extern "C" void std::exit (int); using std::exit;' \
3514 'extern "C" void exit (int) throw ();' \
3515 'extern "C" void exit (int);' \
cffcede7 3516 'void exit (int);'
503d2be0
AS
3517do
3518 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3519/* confdefs.h. */
3520_ACEOF
3521cat confdefs.h >>conftest.$ac_ext
3522cat >>conftest.$ac_ext <<_ACEOF
3523/* end confdefs.h. */
57669b57 3524$ac_declaration
35996d22 3525#include <stdlib.h>
503d2be0
AS
3526int
3527main ()
3528{
3529exit (42);
3530 ;
3531 return 0;
3532}
3533_ACEOF
3534rm -f conftest.$ac_objext
c0d27fcc 3535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3536 (eval $ac_compile) 2>conftest.er1
503d2be0 3537 ac_status=$?
35996d22
AS
3538 grep -v '^ *+' conftest.er1 >conftest.err
3539 rm -f conftest.er1
3540 cat conftest.err >&5
c0d27fcc 3541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3542 (exit $ac_status); } &&
9adfabc2 3543 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
3544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3545 (eval $ac_try) 2>&5
3546 ac_status=$?
3547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3548 (exit $ac_status); }; } &&
3549 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3551 (eval $ac_try) 2>&5
3552 ac_status=$?
c0d27fcc 3553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3554 (exit $ac_status); }; }; then
3555 :
3556else
3557 echo "$as_me: failed program was:" >&5
19650fd6
AS
3558sed 's/^/| /' conftest.$ac_ext >&5
3559
503d2be0
AS
3560continue
3561fi
35996d22 3562rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 3563 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3564/* confdefs.h. */
3565_ACEOF
3566cat confdefs.h >>conftest.$ac_ext
3567cat >>conftest.$ac_ext <<_ACEOF
3568/* end confdefs.h. */
503d2be0
AS
3569$ac_declaration
3570int
3571main ()
3572{
3573exit (42);
3574 ;
3575 return 0;
3576}
3577_ACEOF
3578rm -f conftest.$ac_objext
c0d27fcc 3579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3580 (eval $ac_compile) 2>conftest.er1
503d2be0 3581 ac_status=$?
35996d22
AS
3582 grep -v '^ *+' conftest.er1 >conftest.err
3583 rm -f conftest.er1
3584 cat conftest.err >&5
c0d27fcc 3585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3586 (exit $ac_status); } &&
9adfabc2 3587 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
3588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3589 (eval $ac_try) 2>&5
3590 ac_status=$?
3591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3592 (exit $ac_status); }; } &&
3593 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3595 (eval $ac_try) 2>&5
3596 ac_status=$?
c0d27fcc 3597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3598 (exit $ac_status); }; }; then
3599 break
3600else
3601 echo "$as_me: failed program was:" >&5
19650fd6
AS
3602sed 's/^/| /' conftest.$ac_ext >&5
3603
503d2be0 3604fi
35996d22 3605rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3606done
3607rm -f conftest*
3608if test -n "$ac_declaration"; then
3609 echo '#ifdef __cplusplus' >>confdefs.h
3610 echo $ac_declaration >>confdefs.h
3611 echo '#endif' >>confdefs.h
3612fi
ba4481b5 3613
503d2be0
AS
3614else
3615 echo "$as_me: failed program was:" >&5
19650fd6
AS
3616sed 's/^/| /' conftest.$ac_ext >&5
3617
503d2be0 3618fi
35996d22 3619rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3620ac_ext=c
3621ac_cpp='$CPP $CPPFLAGS'
3622ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3623ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3624ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3625
c0d27fcc 3626
ba4481b5
DL
3627# On Suns, sometimes $CPP names a directory.
3628if test -n "$CPP" && test -d "$CPP"; then
3629 CPP=
3630fi
3631
3632#### Some systems specify a CPP to use unless we are using GCC.
3633#### Now that we know whether we are using GCC, we can decide whether
3634#### to use that one.
3635if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3636then
3637 CPP="$NON_GNU_CPP"
3638fi
3639
3640#### Some systems specify a CC to use unless we are using GCC.
3641#### Now that we know whether we are using GCC, we can decide whether
3642#### to use that one.
3643if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3644 test x$cc_specified != xyes
3645then
3646 CC="$NON_GNU_CC"
3647fi
3648
3649if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3650then
3651 CC="$CC $GCC_TEST_OPTIONS"
3652fi
3653
3654if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3655then
3656 CC="$CC $NON_GCC_TEST_OPTIONS"
3657fi
3658
6a3a24fa 3659#### Some other nice autoconf tests.
ba4481b5 3660
c0d27fcc 3661echo "$as_me:$LINENO: checking whether ln -s works" >&5
503d2be0
AS
3662echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3663LN_S=$as_ln_s
3664if test "$LN_S" = "ln -s"; then
c0d27fcc 3665 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 3666echo "${ECHO_T}yes" >&6
ba4481b5 3667else
c0d27fcc 3668 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
503d2be0 3669echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
3670fi
3671
503d2be0
AS
3672ac_ext=c
3673ac_cpp='$CPP $CPPFLAGS'
3674ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3675ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3676ac_compiler_gnu=$ac_cv_c_compiler_gnu
c0d27fcc 3677echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
503d2be0 3678echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
3679# On Suns, sometimes $CPP names a directory.
3680if test -n "$CPP" && test -d "$CPP"; then
3681 CPP=
3682fi
3683if test -z "$CPP"; then
503d2be0
AS
3684 if test "${ac_cv_prog_CPP+set}" = set; then
3685 echo $ECHO_N "(cached) $ECHO_C" >&6
3686else
3687 # Double quotes because CPP needs to be expanded
3688 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3689 do
3690 ac_preproc_ok=false
3691for ac_c_preproc_warn_flag in '' yes
3692do
3693 # Use a header file that comes with gcc, so configuring glibc
3694 # with a fresh cross-compiler works.
19650fd6
AS
3695 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3696 # <limits.h> exists even on freestanding compilers.
ba4481b5 3697 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3698 # not just through cpp. "Syntax error" is here to catch this case.
3699 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3700/* confdefs.h. */
3701_ACEOF
3702cat confdefs.h >>conftest.$ac_ext
3703cat >>conftest.$ac_ext <<_ACEOF
3704/* end confdefs.h. */
3705#ifdef __STDC__
3706# include <limits.h>
3707#else
3708# include <assert.h>
3709#endif
35996d22 3710 Syntax error
503d2be0 3711_ACEOF
c0d27fcc 3712if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3713 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3714 ac_status=$?
6bae0ccf 3715 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3716 rm -f conftest.er1
3717 cat conftest.err >&5
c0d27fcc 3718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3719 (exit $ac_status); } >/dev/null; then
3720 if test -s conftest.err; then
3721 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3722 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3723 else
3724 ac_cpp_err=
3725 fi
3726else
3727 ac_cpp_err=yes
3728fi
3729if test -z "$ac_cpp_err"; then
ba4481b5
DL
3730 :
3731else
503d2be0 3732 echo "$as_me: failed program was:" >&5
19650fd6
AS
3733sed 's/^/| /' conftest.$ac_ext >&5
3734
503d2be0
AS
3735 # Broken: fails on valid input.
3736continue
3737fi
3738rm -f conftest.err conftest.$ac_ext
3739
3740 # OK, works on sane cases. Now check whether non-existent headers
3741 # can be detected and how.
3742 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3743/* confdefs.h. */
3744_ACEOF
3745cat confdefs.h >>conftest.$ac_ext
3746cat >>conftest.$ac_ext <<_ACEOF
3747/* end confdefs.h. */
503d2be0
AS
3748#include <ac_nonexistent.h>
3749_ACEOF
c0d27fcc 3750if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3751 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3752 ac_status=$?
6bae0ccf 3753 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3754 rm -f conftest.er1
3755 cat conftest.err >&5
c0d27fcc 3756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3757 (exit $ac_status); } >/dev/null; then
3758 if test -s conftest.err; then
3759 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3760 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3761 else
3762 ac_cpp_err=
3763 fi
3764else
3765 ac_cpp_err=yes
3766fi
3767if test -z "$ac_cpp_err"; then
3768 # Broken: success on invalid input.
3769continue
c4bb2108 3770else
503d2be0 3771 echo "$as_me: failed program was:" >&5
19650fd6
AS
3772sed 's/^/| /' conftest.$ac_ext >&5
3773
503d2be0
AS
3774 # Passes both tests.
3775ac_preproc_ok=:
3776break
3777fi
3778rm -f conftest.err conftest.$ac_ext
3779
3780done
3781# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3782rm -f conftest.err conftest.$ac_ext
3783if $ac_preproc_ok; then
3784 break
3785fi
3786
3787 done
3788 ac_cv_prog_CPP=$CPP
3789
3790fi
3791 CPP=$ac_cv_prog_CPP
3792else
3793 ac_cv_prog_CPP=$CPP
3794fi
c0d27fcc 3795echo "$as_me:$LINENO: result: $CPP" >&5
503d2be0
AS
3796echo "${ECHO_T}$CPP" >&6
3797ac_preproc_ok=false
3798for ac_c_preproc_warn_flag in '' yes
3799do
3800 # Use a header file that comes with gcc, so configuring glibc
3801 # with a fresh cross-compiler works.
19650fd6
AS
3802 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3803 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
3804 # On the NeXT, cc -E runs the code through the compiler's parser,
3805 # not just through cpp. "Syntax error" is here to catch this case.
3806 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3807/* confdefs.h. */
3808_ACEOF
3809cat confdefs.h >>conftest.$ac_ext
3810cat >>conftest.$ac_ext <<_ACEOF
3811/* end confdefs.h. */
3812#ifdef __STDC__
3813# include <limits.h>
3814#else
3815# include <assert.h>
3816#endif
35996d22 3817 Syntax error
503d2be0 3818_ACEOF
c0d27fcc 3819if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3820 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3821 ac_status=$?
6bae0ccf 3822 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3823 rm -f conftest.er1
3824 cat conftest.err >&5
c0d27fcc 3825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3826 (exit $ac_status); } >/dev/null; then
3827 if test -s conftest.err; then
3828 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3829 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3830 else
3831 ac_cpp_err=
3832 fi
3833else
3834 ac_cpp_err=yes
3835fi
3836if test -z "$ac_cpp_err"; then
ba4481b5
DL
3837 :
3838else
503d2be0 3839 echo "$as_me: failed program was:" >&5
19650fd6
AS
3840sed 's/^/| /' conftest.$ac_ext >&5
3841
503d2be0
AS
3842 # Broken: fails on valid input.
3843continue
3844fi
3845rm -f conftest.err conftest.$ac_ext
3846
3847 # OK, works on sane cases. Now check whether non-existent headers
3848 # can be detected and how.
3849 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3850/* confdefs.h. */
3851_ACEOF
3852cat confdefs.h >>conftest.$ac_ext
3853cat >>conftest.$ac_ext <<_ACEOF
3854/* end confdefs.h. */
503d2be0
AS
3855#include <ac_nonexistent.h>
3856_ACEOF
c0d27fcc 3857if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3858 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3859 ac_status=$?
6bae0ccf 3860 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3861 rm -f conftest.er1
3862 cat conftest.err >&5
c0d27fcc 3863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3864 (exit $ac_status); } >/dev/null; then
3865 if test -s conftest.err; then
3866 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3867 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3868 else
3869 ac_cpp_err=
3870 fi
3871else
3872 ac_cpp_err=yes
c4bb2108 3873fi
503d2be0
AS
3874if test -z "$ac_cpp_err"; then
3875 # Broken: success on invalid input.
3876continue
3877else
3878 echo "$as_me: failed program was:" >&5
19650fd6
AS
3879sed 's/^/| /' conftest.$ac_ext >&5
3880
503d2be0
AS
3881 # Passes both tests.
3882ac_preproc_ok=:
3883break
ba4481b5 3884fi
503d2be0
AS
3885rm -f conftest.err conftest.$ac_ext
3886
3887done
3888# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3889rm -f conftest.err conftest.$ac_ext
3890if $ac_preproc_ok; then
3891 :
ba4481b5 3892else
19650fd6
AS
3893 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3894See \`config.log' for more details." >&5
3895echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3896See \`config.log' for more details." >&2;}
503d2be0 3897 { (exit 1); exit 1; }; }
ba4481b5 3898fi
503d2be0
AS
3899
3900ac_ext=c
3901ac_cpp='$CPP $CPPFLAGS'
3902ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3903ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3904ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3905
3906# Find a good install program. We prefer a C program (faster),
3907# so one script is as good as another. But avoid the broken or
3908# incompatible versions:
3909# SysV /etc/install, /usr/sbin/install
3910# SunOS /usr/etc/install
3911# IRIX /sbin/install
3912# AIX /bin/install
503d2be0 3913# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3914# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3915# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3916# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
35996d22 3917# OS/2's system install, which has a completely different semantic
ba4481b5 3918# ./install, which can be erroneously created by make from ./install.sh.
c0d27fcc
MR
3919echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3920echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
ba4481b5 3921if test -z "$INSTALL"; then
503d2be0
AS
3922if test "${ac_cv_path_install+set}" = set; then
3923 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3924else
c0d27fcc
MR
3925 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3926for as_dir in $PATH
3927do
3928 IFS=$as_save_IFS
3929 test -z "$as_dir" && as_dir=.
3930 # Account for people who put trailing slashes in PATH elements.
3931case $as_dir/ in
3932 ./ | .// | /cC/* | \
3933 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
35996d22 3934 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
3935 /usr/ucb/* ) ;;
3936 *)
3937 # OSF1 and SCO ODT 3.0 have their own names for install.
3938 # Don't use installbsd from OSF since it installs stuff as root
3939 # by default.
3940 for ac_prog in ginstall scoinst install; do
3941 for ac_exec_ext in '' $ac_executable_extensions; do
35996d22
AS
3942 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3943 if test $ac_prog = install &&
3944 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3945 # AIX install. It has an incompatible calling convention.
3946 :
3947 elif test $ac_prog = install &&
3948 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3949 # program-specific install script used by HP pwplus--don't use.
3950 :
3951 else
3952 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3953 break 3
3954 fi
3955 fi
ba4481b5 3956 done
c0d27fcc
MR
3957 done
3958 ;;
3959esac
3960done
3961
ba4481b5
DL
3962
3963fi
3964 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3965 INSTALL=$ac_cv_path_install
ba4481b5
DL
3966 else
3967 # As a last resort, use the slow shell script. We don't cache a
3968 # path for INSTALL within a source directory, because that will
3969 # break other packages using the cache if that directory is
3970 # removed, or if the path is relative.
503d2be0 3971 INSTALL=$ac_install_sh
ba4481b5
DL
3972 fi
3973fi
c0d27fcc 3974echo "$as_me:$LINENO: result: $INSTALL" >&5
503d2be0 3975echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3976
3977# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3978# It thinks the first close brace ends the variable substitution.
3979test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3980
503d2be0 3981test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3982
ba4481b5
DL
3983test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3984
c0d27fcc
MR
3985if test "x$RANLIB" = x; then
3986 if test -n "$ac_tool_prefix"; then
3987 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3988set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3989echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0 3990echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c0d27fcc 3991if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 3992 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3993else
3994 if test -n "$RANLIB"; then
3995 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3996else
c0d27fcc
MR
3997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3998for as_dir in $PATH
3999do
4000 IFS=$as_save_IFS
4001 test -z "$as_dir" && as_dir=.
4002 for ac_exec_ext in '' $ac_executable_extensions; do
4003 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4004 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4005 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4006 break 2
4007 fi
4008done
503d2be0
AS
4009done
4010
7397acc4
DL
4011fi
4012fi
503d2be0 4013RANLIB=$ac_cv_prog_RANLIB
7397acc4 4014if test -n "$RANLIB"; then
c0d27fcc 4015 echo "$as_me:$LINENO: result: $RANLIB" >&5
503d2be0
AS
4016echo "${ECHO_T}$RANLIB" >&6
4017else
c0d27fcc 4018 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4019echo "${ECHO_T}no" >&6
4020fi
4021
4022fi
4023if test -z "$ac_cv_prog_RANLIB"; then
4024 ac_ct_RANLIB=$RANLIB
4025 # Extract the first word of "ranlib", so it can be a program name with args.
4026set dummy ranlib; ac_word=$2
c0d27fcc 4027echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
4028echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4029if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4030 echo $ECHO_N "(cached) $ECHO_C" >&6
4031else
4032 if test -n "$ac_ct_RANLIB"; then
4033 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4034else
c0d27fcc
MR
4035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4036for as_dir in $PATH
4037do
4038 IFS=$as_save_IFS
4039 test -z "$as_dir" && as_dir=.
4040 for ac_exec_ext in '' $ac_executable_extensions; do
4041 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4042 ac_cv_prog_ac_ct_RANLIB="ranlib"
4043 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4044 break 2
4045 fi
4046done
503d2be0
AS
4047done
4048
4049 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4050fi
4051fi
4052ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4053if test -n "$ac_ct_RANLIB"; then
c0d27fcc 4054 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
503d2be0
AS
4055echo "${ECHO_T}$ac_ct_RANLIB" >&6
4056else
c0d27fcc 4057 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4058echo "${ECHO_T}no" >&6
4059fi
4060
4061 RANLIB=$ac_ct_RANLIB
7397acc4 4062else
503d2be0 4063 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
4064fi
4065
4066fi
9e71690e
DK
4067# Extract the first word of "install-info", so it can be a program name with args.
4068set dummy install-info; ac_word=$2
4069echo "$as_me:$LINENO: checking for $ac_word" >&5
4070echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4071if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4072 echo $ECHO_N "(cached) $ECHO_C" >&6
4073else
4074 case $INSTALL_INFO in
4075 [\\/]* | ?:[\\/]*)
4076 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4077 ;;
4078 *)
4079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4080for as_dir in $PATH
4081do
4082 IFS=$as_save_IFS
4083 test -z "$as_dir" && as_dir=.
4084 for ac_exec_ext in '' $ac_executable_extensions; do
4085 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4086 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4087 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4088 break 2
4089 fi
4090done
4091done
4092
4093 ;;
4094esac
4095fi
4096INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4097
4098if test -n "$INSTALL_INFO"; then
4099 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4100echo "${ECHO_T}$INSTALL_INFO" >&6
4101else
4102 echo "$as_me:$LINENO: result: no" >&5
4103echo "${ECHO_T}no" >&6
4104fi
4105
4106# Extract the first word of "install-info", so it can be a program name with args.
4107set dummy install-info; ac_word=$2
4108echo "$as_me:$LINENO: checking for $ac_word" >&5
4109echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4110if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4111 echo $ECHO_N "(cached) $ECHO_C" >&6
4112else
4113 case $INSTALL_INFO in
4114 [\\/]* | ?:[\\/]*)
4115 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4116 ;;
4117 *)
4118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4119for as_dir in /usr/sbin
4120do
4121 IFS=$as_save_IFS
4122 test -z "$as_dir" && as_dir=.
4123 for ac_exec_ext in '' $ac_executable_extensions; do
4124 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4125 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4126 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4127 break 2
4128 fi
4129done
4130done
4131
4132 ;;
4133esac
4134fi
4135INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4136
4137if test -n "$INSTALL_INFO"; then
4138 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4139echo "${ECHO_T}$INSTALL_INFO" >&6
4140else
4141 echo "$as_me:$LINENO: result: no" >&5
4142echo "${ECHO_T}no" >&6
4143fi
4144
4145# Extract the first word of "install-info", so it can be a program name with args.
4146set dummy install-info; ac_word=$2
4147echo "$as_me:$LINENO: checking for $ac_word" >&5
4148echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4149if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4150 echo $ECHO_N "(cached) $ECHO_C" >&6
4151else
4152 case $INSTALL_INFO in
4153 [\\/]* | ?:[\\/]*)
4154 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4155 ;;
4156 *)
4157 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4158for as_dir in /sbin
4159do
4160 IFS=$as_save_IFS
4161 test -z "$as_dir" && as_dir=.
4162 for ac_exec_ext in '' $ac_executable_extensions; do
4163 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4164 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4165 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4166 break 2
4167 fi
4168done
4169done
4170
4171 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4172 ;;
4173esac
4174fi
4175INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4176
4177if test -n "$INSTALL_INFO"; then
4178 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4179echo "${ECHO_T}$INSTALL_INFO" >&6
4180else
4181 echo "$as_me:$LINENO: result: no" >&5
4182echo "${ECHO_T}no" >&6
4183fi
4184
ba4481b5 4185
c0d27fcc 4186
8e967cf7
MR
4187if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4188then
4189 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4190fi
4191
4192if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4193then
4194 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4195fi
4196
c0d27fcc 4197
fe239f0f 4198late_LDFLAGS=$LDFLAGS
4af002d6 4199if test "$GCC" = yes; then
fe239f0f
AS
4200 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
4201else
4202 LDFLAGS="$LDFLAGS -znocombreloc"
4203fi
4204
4205echo "$as_me:$LINENO: checking For -znocombreloc" >&5
4206echo $ECHO_N "checking For -znocombreloc... $ECHO_C" >&6
4207
4208cat >conftest.$ac_ext <<_ACEOF
4209main(){return 0;}
4210_ACEOF
4211rm -f conftest.$ac_objext conftest$ac_exeext
4212if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4213 (eval $ac_link) 2>conftest.er1
4214 ac_status=$?
4215 grep -v '^ *+' conftest.er1 >conftest.err
4216 rm -f conftest.er1
4217 cat conftest.err >&5
4218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4219 (exit $ac_status); } &&
9adfabc2 4220 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
fe239f0f
AS
4221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4222 (eval $ac_try) 2>&5
4223 ac_status=$?
4224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4225 (exit $ac_status); }; } &&
4226 { ac_try='test -s conftest$ac_exeext'
4227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4228 (eval $ac_try) 2>&5
4229 ac_status=$?
4230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4231 (exit $ac_status); }; }; then
4232 echo "$as_me:$LINENO: result: yes" >&5
4233echo "${ECHO_T}yes" >&6
4234else
4235 echo "$as_me: failed program was:" >&5
4236sed 's/^/| /' conftest.$ac_ext >&5
4237
4238LDFLAGS=$late_LDFLAGS
4239 echo "$as_me:$LINENO: result: no" >&5
4240echo "${ECHO_T}no" >&6
4241fi
4242rm -f conftest.err conftest.$ac_objext \
4243 conftest$ac_exeext conftest.$ac_ext
4244
c0d27fcc 4245
6bae0ccf
DL
4246echo "$as_me:$LINENO: checking for egrep" >&5
4247echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4248if test "${ac_cv_prog_egrep+set}" = set; then
4249 echo $ECHO_N "(cached) $ECHO_C" >&6
4250else
4251 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4252 then ac_cv_prog_egrep='grep -E'
4253 else ac_cv_prog_egrep='egrep'
4254 fi
4255fi
4256echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4257echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4258 EGREP=$ac_cv_prog_egrep
4259
4260
c0d27fcc
MR
4261
4262echo "$as_me:$LINENO: checking for AIX" >&5
503d2be0
AS
4263echo $ECHO_N "checking for AIX... $ECHO_C" >&6
4264cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4265/* confdefs.h. */
4266_ACEOF
4267cat confdefs.h >>conftest.$ac_ext
4268cat >>conftest.$ac_ext <<_ACEOF
4269/* end confdefs.h. */
ba4481b5
DL
4270#ifdef _AIX
4271 yes
4272#endif
4273
503d2be0 4274_ACEOF
ba4481b5 4275if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4276 $EGREP "yes" >/dev/null 2>&1; then
c0d27fcc 4277 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 4278echo "${ECHO_T}yes" >&6
c0d27fcc 4279cat >>confdefs.h <<\_ACEOF
ba4481b5 4280#define _ALL_SOURCE 1
c0d27fcc 4281_ACEOF
ba4481b5
DL
4282
4283else
c0d27fcc 4284 echo "$as_me:$LINENO: result: no" >&5
503d2be0 4285echo "${ECHO_T}no" >&6
ba4481b5
DL
4286fi
4287rm -f conftest*
4288
c0d27fcc
MR
4289
4290
4489ece2 4291
3b33a005
DL
4292#### Extract some information from the operating system and machine files.
4293
c0d27fcc 4294{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 4295 - which libraries the lib-src programs will want, and
503d2be0
AS
4296 - whether the GNU malloc routines are usable..." >&5
4297echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 4298 - which libraries the lib-src programs will want, and
503d2be0 4299 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
4300
4301### First figure out CFLAGS (which we use for running the compiler here)
4302### and REAL_CFLAGS (which we use for real compilation).
4303### The two are the same except on a few systems, where they are made
4304### different to work around various lossages. For example,
4305### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
4306### as implying static linking.
4307
4308### If the CFLAGS env var is specified, we use that value
4309### instead of the default.
4310
4311### It's not important that this name contain the PID; you can't run
4312### two configures in the same directory and have anything work
4313### anyway.
4314tempcname="conftest.c"
4315
4316echo '
4317#include "'${srcdir}'/src/'${opsysfile}'"
4318#include "'${srcdir}'/src/'${machfile}'"
4319#ifndef LIBS_MACHINE
4320#define LIBS_MACHINE
4321#endif
4322#ifndef LIBS_SYSTEM
4323#define LIBS_SYSTEM
4324#endif
4325#ifndef C_SWITCH_SYSTEM
4326#define C_SWITCH_SYSTEM
4327#endif
4328#ifndef C_SWITCH_MACHINE
4329#define C_SWITCH_MACHINE
4330#endif
4331configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
4332configure___ c_switch_system=C_SWITCH_SYSTEM
4333configure___ c_switch_machine=C_SWITCH_MACHINE
4334
4335#ifndef LIB_X11_LIB
4336#define LIB_X11_LIB -lX11
4337#endif
4338
4339#ifndef LIBX11_MACHINE
4340#define LIBX11_MACHINE
4341#endif
4342
4343#ifndef LIBX11_SYSTEM
4344#define LIBX11_SYSTEM
4345#endif
4346configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
4347
4348#ifdef UNEXEC
4349configure___ unexec=UNEXEC
4350#else
4351configure___ unexec=unexec.o
4352#endif
4353
4354#ifdef SYSTEM_MALLOC
4355configure___ system_malloc=yes
4356#else
4357configure___ system_malloc=no
4358#endif
4359
ef9e4345
GM
4360#ifdef USE_MMAP_FOR_BUFFERS
4361configure___ use_mmap_for_buffers=yes
73b77ee5 4362#else
ef9e4345 4363configure___ use_mmap_for_buffers=no
73b77ee5
GM
4364#endif
4365
3b33a005
DL
4366#ifndef C_DEBUG_SWITCH
4367#define C_DEBUG_SWITCH -g
4368#endif
4369
4370#ifndef C_OPTIMIZE_SWITCH
4371#ifdef __GNUC__
4372#define C_OPTIMIZE_SWITCH -O2
4373#else
4374#define C_OPTIMIZE_SWITCH -O
4375#endif
4376#endif
4377
4378#ifndef LD_SWITCH_MACHINE
4379#define LD_SWITCH_MACHINE
4380#endif
4381
4382#ifndef LD_SWITCH_SYSTEM
4383#define LD_SWITCH_SYSTEM
4384#endif
4385
4386#ifndef LD_SWITCH_X_SITE_AUX
4387#define LD_SWITCH_X_SITE_AUX
503d2be0 4388#endif
3b33a005
DL
4389
4390configure___ ld_switch_system=LD_SWITCH_SYSTEM
4391configure___ ld_switch_machine=LD_SWITCH_MACHINE
4392
4393#ifdef THIS_IS_CONFIGURE
4394
4395/* Get the CFLAGS for tests in configure. */
4396#ifdef __GNUC__
4397configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4398#else
4399configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4400#endif
4401
4402#else /* not THIS_IS_CONFIGURE */
4403
4404/* Get the CFLAGS for real compilation. */
4405#ifdef __GNUC__
4406configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4407#else
4408configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4409#endif
4410
4411#endif /* not THIS_IS_CONFIGURE */
4412' > ${tempcname}
4413
4414# The value of CPP is a quoted variable reference, so we need to do this
4415# to get its actual value...
4416CPP=`eval "echo $CPP"`
4417eval `${CPP} -Isrc ${tempcname} \
4418 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4419if test "x$SPECIFIED_CFLAGS" = x; then
4420 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
4421 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4422else
4423 REAL_CFLAGS="$CFLAGS"
4424fi
4425rm ${tempcname}
4426
4427ac_link="$ac_link $ld_switch_machine $ld_switch_system"
4428
4429### Make sure subsequent tests use flags consistent with the build flags.
4430
4431if test x"${OVERRIDE_CPPFLAGS}" != x; then
4432 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
4433else
4434 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
4435fi
4436
6bae0ccf
DL
4437
4438
22044edf
DL
4439
4440cat >>confdefs.h <<\_ACEOF
4441#define _GNU_SOURCE 1
4442_ACEOF
4443
4444
4445
503d2be0 4446# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
4447if test "${enable_largefile+set}" = set; then
4448 enableval="$enable_largefile"
f4988be7 4449
503d2be0
AS
4450fi;
4451if test "$enable_largefile" != no; then
f4988be7 4452
c0d27fcc 4453 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
503d2be0
AS
4454echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4455if test "${ac_cv_sys_largefile_CC+set}" = set; then
4456 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4457else
f4988be7 4458 ac_cv_sys_largefile_CC=no
503d2be0
AS
4459 if test "$GCC" != yes; then
4460 ac_save_CC=$CC
4461 while :; do
4462 # IRIX 6.2 and later do not support large files by default,
4463 # so use the C compiler's -n32 option if that helps.
35996d22 4464 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4465/* confdefs.h. */
4466_ACEOF
4467cat confdefs.h >>conftest.$ac_ext
4468cat >>conftest.$ac_ext <<_ACEOF
4469/* end confdefs.h. */
f4988be7 4470#include <sys/types.h>
503d2be0
AS
4471 /* Check that off_t can represent 2**63 - 1 correctly.
4472 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4473 since some C++ compilers masquerading as C compilers
4474 incorrectly reject 9223372036854775807. */
4475#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4476 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4477 && LARGE_OFF_T % 2147483647 == 1)
4478 ? 1 : -1];
4479int
4480main ()
4481{
f4988be7 4482
503d2be0
AS
4483 ;
4484 return 0;
4485}
4486_ACEOF
4487 rm -f conftest.$ac_objext
c0d27fcc 4488if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4489 (eval $ac_compile) 2>conftest.er1
503d2be0 4490 ac_status=$?
35996d22
AS
4491 grep -v '^ *+' conftest.er1 >conftest.err
4492 rm -f conftest.er1
4493 cat conftest.err >&5
c0d27fcc 4494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4495 (exit $ac_status); } &&
9adfabc2 4496 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
4497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4498 (eval $ac_try) 2>&5
4499 ac_status=$?
4500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4501 (exit $ac_status); }; } &&
4502 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4504 (eval $ac_try) 2>&5
4505 ac_status=$?
c0d27fcc 4506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4507 (exit $ac_status); }; }; then
4508 break
b192d653 4509else
503d2be0 4510 echo "$as_me: failed program was:" >&5
19650fd6
AS
4511sed 's/^/| /' conftest.$ac_ext >&5
4512
503d2be0 4513fi
35996d22 4514rm -f conftest.err conftest.$ac_objext
503d2be0
AS
4515 CC="$CC -n32"
4516 rm -f conftest.$ac_objext
c0d27fcc 4517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4518 (eval $ac_compile) 2>conftest.er1
503d2be0 4519 ac_status=$?
35996d22
AS
4520 grep -v '^ *+' conftest.er1 >conftest.err
4521 rm -f conftest.er1
4522 cat conftest.err >&5
c0d27fcc 4523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4524 (exit $ac_status); } &&
9adfabc2 4525 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
4526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4527 (eval $ac_try) 2>&5
4528 ac_status=$?
4529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4530 (exit $ac_status); }; } &&
4531 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4533 (eval $ac_try) 2>&5
4534 ac_status=$?
c0d27fcc 4535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4536 (exit $ac_status); }; }; then
4537 ac_cv_sys_largefile_CC=' -n32'; break
4538else
4539 echo "$as_me: failed program was:" >&5
19650fd6
AS
4540sed 's/^/| /' conftest.$ac_ext >&5
4541
503d2be0 4542fi
35996d22
AS
4543rm -f conftest.err conftest.$ac_objext
4544 break
503d2be0
AS
4545 done
4546 CC=$ac_save_CC
4547 rm -f conftest.$ac_ext
4548 fi
b192d653 4549fi
c0d27fcc 4550echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
4551echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4552 if test "$ac_cv_sys_largefile_CC" != no; then
4553 CC=$CC$ac_cv_sys_largefile_CC
4554 fi
b192d653 4555
c0d27fcc 4556 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
4557echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4558if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4559 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4560else
503d2be0 4561 while :; do
f4988be7 4562 ac_cv_sys_file_offset_bits=no
503d2be0 4563 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4564/* confdefs.h. */
4565_ACEOF
4566cat confdefs.h >>conftest.$ac_ext
4567cat >>conftest.$ac_ext <<_ACEOF
4568/* end confdefs.h. */
f4988be7 4569#include <sys/types.h>
503d2be0
AS
4570 /* Check that off_t can represent 2**63 - 1 correctly.
4571 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4572 since some C++ compilers masquerading as C compilers
4573 incorrectly reject 9223372036854775807. */
4574#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4575 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4576 && LARGE_OFF_T % 2147483647 == 1)
4577 ? 1 : -1];
4578int
4579main ()
4580{
f4988be7 4581
503d2be0
AS
4582 ;
4583 return 0;
4584}
4585_ACEOF
4586rm -f conftest.$ac_objext
c0d27fcc 4587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4588 (eval $ac_compile) 2>conftest.er1
503d2be0 4589 ac_status=$?
35996d22
AS
4590 grep -v '^ *+' conftest.er1 >conftest.err
4591 rm -f conftest.er1
4592 cat conftest.err >&5
c0d27fcc 4593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4594 (exit $ac_status); } &&
9adfabc2 4595 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
4596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4597 (eval $ac_try) 2>&5
4598 ac_status=$?
4599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4600 (exit $ac_status); }; } &&
4601 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4603 (eval $ac_try) 2>&5
4604 ac_status=$?
c0d27fcc 4605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4606 (exit $ac_status); }; }; then
4607 break
f4988be7 4608else
503d2be0 4609 echo "$as_me: failed program was:" >&5
19650fd6
AS
4610sed 's/^/| /' conftest.$ac_ext >&5
4611
503d2be0 4612fi
35996d22 4613rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4614 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4615/* confdefs.h. */
4616_ACEOF
4617cat confdefs.h >>conftest.$ac_ext
4618cat >>conftest.$ac_ext <<_ACEOF
4619/* end confdefs.h. */
f4988be7
GM
4620#define _FILE_OFFSET_BITS 64
4621#include <sys/types.h>
503d2be0
AS
4622 /* Check that off_t can represent 2**63 - 1 correctly.
4623 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4624 since some C++ compilers masquerading as C compilers
4625 incorrectly reject 9223372036854775807. */
4626#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4627 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4628 && LARGE_OFF_T % 2147483647 == 1)
4629 ? 1 : -1];
4630int
4631main ()
4632{
4633
4634 ;
4635 return 0;
4636}
4637_ACEOF
4638rm -f conftest.$ac_objext
c0d27fcc 4639if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4640 (eval $ac_compile) 2>conftest.er1
503d2be0 4641 ac_status=$?
35996d22
AS
4642 grep -v '^ *+' conftest.er1 >conftest.err
4643 rm -f conftest.er1
4644 cat conftest.err >&5
c0d27fcc 4645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4646 (exit $ac_status); } &&
9adfabc2 4647 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
4648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4649 (eval $ac_try) 2>&5
4650 ac_status=$?
4651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4652 (exit $ac_status); }; } &&
4653 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4655 (eval $ac_try) 2>&5
4656 ac_status=$?
c0d27fcc 4657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4658 (exit $ac_status); }; }; then
4659 ac_cv_sys_file_offset_bits=64; break
4660else
4661 echo "$as_me: failed program was:" >&5
19650fd6
AS
4662sed 's/^/| /' conftest.$ac_ext >&5
4663
503d2be0 4664fi
35996d22 4665rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
4666 break
4667done
ba4481b5 4668fi
c0d27fcc 4669echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
4670echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
4671if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 4672
c0d27fcc 4673cat >>confdefs.h <<_ACEOF
f4988be7 4674#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 4675_ACEOF
f4988be7 4676
503d2be0
AS
4677fi
4678rm -f conftest*
c0d27fcc 4679 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
4680echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
4681if test "${ac_cv_sys_large_files+set}" = set; then
4682 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4683else
503d2be0 4684 while :; do
f4988be7 4685 ac_cv_sys_large_files=no
503d2be0 4686 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4687/* confdefs.h. */
4688_ACEOF
4689cat confdefs.h >>conftest.$ac_ext
4690cat >>conftest.$ac_ext <<_ACEOF
4691/* end confdefs.h. */
503d2be0
AS
4692#include <sys/types.h>
4693 /* Check that off_t can represent 2**63 - 1 correctly.
4694 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4695 since some C++ compilers masquerading as C compilers
4696 incorrectly reject 9223372036854775807. */
4697#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4698 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4699 && LARGE_OFF_T % 2147483647 == 1)
4700 ? 1 : -1];
4701int
4702main ()
4703{
ba4481b5 4704
503d2be0
AS
4705 ;
4706 return 0;
4707}
4708_ACEOF
4709rm -f conftest.$ac_objext
c0d27fcc 4710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4711 (eval $ac_compile) 2>conftest.er1
503d2be0 4712 ac_status=$?
35996d22
AS
4713 grep -v '^ *+' conftest.er1 >conftest.err
4714 rm -f conftest.er1
4715 cat conftest.err >&5
c0d27fcc 4716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4717 (exit $ac_status); } &&
9adfabc2 4718 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
4719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4720 (eval $ac_try) 2>&5
4721 ac_status=$?
4722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4723 (exit $ac_status); }; } &&
4724 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4726 (eval $ac_try) 2>&5
4727 ac_status=$?
c0d27fcc 4728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4729 (exit $ac_status); }; }; then
4730 break
ba4481b5 4731else
503d2be0 4732 echo "$as_me: failed program was:" >&5
19650fd6
AS
4733sed 's/^/| /' conftest.$ac_ext >&5
4734
503d2be0 4735fi
35996d22 4736rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4737 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4738/* confdefs.h. */
4739_ACEOF
4740cat confdefs.h >>conftest.$ac_ext
4741cat >>conftest.$ac_ext <<_ACEOF
4742/* end confdefs.h. */
f4988be7 4743#define _LARGE_FILES 1
503d2be0
AS
4744#include <sys/types.h>
4745 /* Check that off_t can represent 2**63 - 1 correctly.
4746 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4747 since some C++ compilers masquerading as C compilers
4748 incorrectly reject 9223372036854775807. */
4749#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4750 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4751 && LARGE_OFF_T % 2147483647 == 1)
4752 ? 1 : -1];
4753int
4754main ()
4755{
f4988be7 4756
503d2be0
AS
4757 ;
4758 return 0;
4759}
4760_ACEOF
4761rm -f conftest.$ac_objext
c0d27fcc 4762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4763 (eval $ac_compile) 2>conftest.er1
503d2be0 4764 ac_status=$?
35996d22
AS
4765 grep -v '^ *+' conftest.er1 >conftest.err
4766 rm -f conftest.er1
4767 cat conftest.err >&5
c0d27fcc 4768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4769 (exit $ac_status); } &&
9adfabc2 4770 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
4771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4772 (eval $ac_try) 2>&5
4773 ac_status=$?
4774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4775 (exit $ac_status); }; } &&
4776 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4778 (eval $ac_try) 2>&5
4779 ac_status=$?
c0d27fcc 4780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4781 (exit $ac_status); }; }; then
4782 ac_cv_sys_large_files=1; break
4783else
4784 echo "$as_me: failed program was:" >&5
19650fd6
AS
4785sed 's/^/| /' conftest.$ac_ext >&5
4786
503d2be0 4787fi
35996d22 4788rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
4789 break
4790done
ba4481b5 4791fi
c0d27fcc 4792echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
4793echo "${ECHO_T}$ac_cv_sys_large_files" >&6
4794if test "$ac_cv_sys_large_files" != no; then
ba4481b5 4795
c0d27fcc 4796cat >>confdefs.h <<_ACEOF
f4988be7 4797#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 4798_ACEOF
ba4481b5 4799
503d2be0
AS
4800fi
4801rm -f conftest*
4802fi
ba4481b5 4803
c0d27fcc 4804
2c9dccc9
PJ
4805if test "${with_sound}" != "no"; then
4806 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
4807 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4808echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4809if test "${ac_cv_header_stdc+set}" = set; then
4810 echo $ECHO_N "(cached) $ECHO_C" >&6
4811else
4812 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4813/* confdefs.h. */
4814_ACEOF
4815cat confdefs.h >>conftest.$ac_ext
4816cat >>conftest.$ac_ext <<_ACEOF
4817/* end confdefs.h. */
c0d27fcc
MR
4818#include <stdlib.h>
4819#include <stdarg.h>
4820#include <string.h>
4821#include <float.h>
98418dba 4822
19650fd6
AS
4823int
4824main ()
4825{
4826
4827 ;
4828 return 0;
4829}
c0d27fcc 4830_ACEOF
19650fd6
AS
4831rm -f conftest.$ac_objext
4832if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4833 (eval $ac_compile) 2>conftest.er1
cd958eb3 4834 ac_status=$?
35996d22
AS
4835 grep -v '^ *+' conftest.er1 >conftest.err
4836 rm -f conftest.er1
4837 cat conftest.err >&5
cd958eb3 4838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 4839 (exit $ac_status); } &&
9adfabc2 4840 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
4841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4842 (eval $ac_try) 2>&5
4843 ac_status=$?
4844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4845 (exit $ac_status); }; } &&
4846 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
4847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4848 (eval $ac_try) 2>&5
4849 ac_status=$?
4850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4851 (exit $ac_status); }; }; then
c0d27fcc
MR
4852 ac_cv_header_stdc=yes
4853else
4854 echo "$as_me: failed program was:" >&5
19650fd6
AS
4855sed 's/^/| /' conftest.$ac_ext >&5
4856
4857ac_cv_header_stdc=no
c0d27fcc 4858fi
35996d22 4859rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4860
4861if test $ac_cv_header_stdc = yes; then
4862 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4863 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4864/* confdefs.h. */
4865_ACEOF
4866cat confdefs.h >>conftest.$ac_ext
4867cat >>conftest.$ac_ext <<_ACEOF
4868/* end confdefs.h. */
c0d27fcc
MR
4869#include <string.h>
4870
4871_ACEOF
4872if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4873 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
4874 :
4875else
4876 ac_cv_header_stdc=no
4877fi
4878rm -f conftest*
4879
4880fi
4881
4882if test $ac_cv_header_stdc = yes; then
4883 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4884 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4885/* confdefs.h. */
4886_ACEOF
4887cat confdefs.h >>conftest.$ac_ext
4888cat >>conftest.$ac_ext <<_ACEOF
4889/* end confdefs.h. */
c0d27fcc
MR
4890#include <stdlib.h>
4891
4892_ACEOF
4893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4894 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
4895 :
4896else
4897 ac_cv_header_stdc=no
4898fi
4899rm -f conftest*
4900
4901fi
4902
4903if test $ac_cv_header_stdc = yes; then
4904 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4905 if test "$cross_compiling" = yes; then
4906 :
4907else
4908 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4909/* confdefs.h. */
4910_ACEOF
4911cat confdefs.h >>conftest.$ac_ext
4912cat >>conftest.$ac_ext <<_ACEOF
4913/* end confdefs.h. */
c0d27fcc
MR
4914#include <ctype.h>
4915#if ((' ' & 0x0FF) == 0x020)
4916# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4917# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4918#else
19650fd6 4919# define ISLOWER(c) \
35996d22
AS
4920 (('a' <= (c) && (c) <= 'i') \
4921 || ('j' <= (c) && (c) <= 'r') \
4922 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
4923# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4924#endif
4925
4926#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4927int
4928main ()
4929{
4930 int i;
4931 for (i = 0; i < 256; i++)
4932 if (XOR (islower (i), ISLOWER (i))
35996d22 4933 || toupper (i) != TOUPPER (i))
c0d27fcc
MR
4934 exit(2);
4935 exit (0);
4936}
4937_ACEOF
4938rm -f conftest$ac_exeext
4939if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4940 (eval $ac_link) 2>&5
4941 ac_status=$?
4942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4943 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4945 (eval $ac_try) 2>&5
4946 ac_status=$?
4947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4948 (exit $ac_status); }; }; then
4949 :
4950else
4951 echo "$as_me: program exited with status $ac_status" >&5
4952echo "$as_me: failed program was:" >&5
19650fd6
AS
4953sed 's/^/| /' conftest.$ac_ext >&5
4954
c0d27fcc
MR
4955( exit $ac_status )
4956ac_cv_header_stdc=no
4957fi
35996d22 4958rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4959fi
4960fi
4961fi
4962echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4963echo "${ECHO_T}$ac_cv_header_stdc" >&6
4964if test $ac_cv_header_stdc = yes; then
4965
4966cat >>confdefs.h <<\_ACEOF
4967#define STDC_HEADERS 1
4968_ACEOF
4969
4970fi
4971
4972# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
35996d22 4983 inttypes.h stdint.h unistd.h
98418dba
CW
4984do
4985as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc 4986echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
4987echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4988if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 4989 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4990else
925c2f3f 4991 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4992/* confdefs.h. */
4993_ACEOF
4994cat confdefs.h >>conftest.$ac_ext
4995cat >>conftest.$ac_ext <<_ACEOF
4996/* end confdefs.h. */
c0d27fcc
MR
4997$ac_includes_default
4998
4999#include <$ac_header>
5000_ACEOF
5001rm -f conftest.$ac_objext
5002if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5003 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5004 ac_status=$?
35996d22
AS
5005 grep -v '^ *+' conftest.er1 >conftest.err
5006 rm -f conftest.er1
5007 cat conftest.err >&5
c0d27fcc
MR
5008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5009 (exit $ac_status); } &&
9adfabc2 5010 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5012 (eval $ac_try) 2>&5
5013 ac_status=$?
5014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5015 (exit $ac_status); }; } &&
5016 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5018 (eval $ac_try) 2>&5
5019 ac_status=$?
5020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5021 (exit $ac_status); }; }; then
5022 eval "$as_ac_Header=yes"
5023else
5024 echo "$as_me: failed program was:" >&5
19650fd6
AS
5025sed 's/^/| /' conftest.$ac_ext >&5
5026
c0d27fcc
MR
5027eval "$as_ac_Header=no"
5028fi
35996d22 5029rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5030fi
5031echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5032echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5033if test `eval echo '${'$as_ac_Header'}'` = yes; then
5034 cat >>confdefs.h <<_ACEOF
5035#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5036_ACEOF
5037
5038fi
5039
5040done
5041
5042
5043
5044
5045
5046for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5047do
5048as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5049if eval "test \"\${$as_ac_Header+set}\" = set"; then
5050 echo "$as_me:$LINENO: checking for $ac_header" >&5
5051echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5052if eval "test \"\${$as_ac_Header+set}\" = set"; then
5053 echo $ECHO_N "(cached) $ECHO_C" >&6
5054fi
5055echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5056echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5057else
5058 # Is the header compilable?
5059echo "$as_me:$LINENO: checking $ac_header usability" >&5
5060echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5061cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5062/* confdefs.h. */
5063_ACEOF
5064cat confdefs.h >>conftest.$ac_ext
5065cat >>conftest.$ac_ext <<_ACEOF
5066/* end confdefs.h. */
c0d27fcc 5067$ac_includes_default
98418dba 5068#include <$ac_header>
503d2be0 5069_ACEOF
c0d27fcc
MR
5070rm -f conftest.$ac_objext
5071if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5072 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5073 ac_status=$?
35996d22
AS
5074 grep -v '^ *+' conftest.er1 >conftest.err
5075 rm -f conftest.er1
5076 cat conftest.err >&5
c0d27fcc
MR
5077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5078 (exit $ac_status); } &&
9adfabc2 5079 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5081 (eval $ac_try) 2>&5
5082 ac_status=$?
5083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5084 (exit $ac_status); }; } &&
5085 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5087 (eval $ac_try) 2>&5
5088 ac_status=$?
5089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5090 (exit $ac_status); }; }; then
5091 ac_header_compiler=yes
5092else
5093 echo "$as_me: failed program was:" >&5
19650fd6
AS
5094sed 's/^/| /' conftest.$ac_ext >&5
5095
c0d27fcc
MR
5096ac_header_compiler=no
5097fi
35996d22 5098rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5099echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5100echo "${ECHO_T}$ac_header_compiler" >&6
5101
5102# Is the header present?
5103echo "$as_me:$LINENO: checking $ac_header presence" >&5
5104echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5105cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5106/* confdefs.h. */
5107_ACEOF
5108cat confdefs.h >>conftest.$ac_ext
5109cat >>conftest.$ac_ext <<_ACEOF
5110/* end confdefs.h. */
c0d27fcc
MR
5111#include <$ac_header>
5112_ACEOF
5113if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5114 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5115 ac_status=$?
6bae0ccf 5116 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5117 rm -f conftest.er1
5118 cat conftest.err >&5
c0d27fcc 5119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5120 (exit $ac_status); } >/dev/null; then
5121 if test -s conftest.err; then
5122 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5123 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5124 else
5125 ac_cpp_err=
5126 fi
5127else
5128 ac_cpp_err=yes
5129fi
5130if test -z "$ac_cpp_err"; then
c0d27fcc 5131 ac_header_preproc=yes
f4988be7 5132else
503d2be0 5133 echo "$as_me: failed program was:" >&5
19650fd6
AS
5134sed 's/^/| /' conftest.$ac_ext >&5
5135
c0d27fcc 5136 ac_header_preproc=no
f4988be7 5137fi
98418dba 5138rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5139echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5140echo "${ECHO_T}$ac_header_preproc" >&6
5141
5142# So? What about this header?
35996d22
AS
5143case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5144 yes:no: )
c0d27fcc
MR
5145 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5146echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
5147 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5148echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5149 ac_header_preproc=yes
19650fd6 5150 ;;
35996d22 5151 no:yes:* )
c0d27fcc
MR
5152 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5153echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
5154 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5155echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5156 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5157echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5158 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5159echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5160 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5161echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
5162 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5163echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5164 (
5165 cat <<\_ASBOX
35996d22
AS
5166## ------------------------------------------ ##
5167## Report this to the AC_PACKAGE_NAME lists. ##
5168## ------------------------------------------ ##
19650fd6
AS
5169_ASBOX
5170 ) |
5171 sed "s/^/$as_me: WARNING: /" >&2
5172 ;;
c0d27fcc
MR
5173esac
5174echo "$as_me:$LINENO: checking for $ac_header" >&5
5175echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5176if eval "test \"\${$as_ac_Header+set}\" = set"; then
5177 echo $ECHO_N "(cached) $ECHO_C" >&6
5178else
35996d22 5179 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 5180fi
c0d27fcc 5181echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5182echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5183
5184fi
98418dba 5185if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5186 cat >>confdefs.h <<_ACEOF
98418dba 5187#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5188_ACEOF
f4988be7
GM
5189
5190fi
c0d27fcc 5191
98418dba
CW
5192done
5193
5194 # Emulation library used on NetBSD.
c0d27fcc 5195 echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
5196echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
5197if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 5198 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5199else
98418dba
CW
5200 ac_check_lib_save_LIBS=$LIBS
5201LIBS="-lossaudio $LIBS"
5202cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5203/* confdefs.h. */
5204_ACEOF
5205cat confdefs.h >>conftest.$ac_ext
5206cat >>conftest.$ac_ext <<_ACEOF
5207/* end confdefs.h. */
98418dba
CW
5208
5209/* Override any gcc2 internal prototype to avoid an error. */
5210#ifdef __cplusplus
5211extern "C"
f4988be7 5212#endif
98418dba
CW
5213/* We use char because int might match the return type of a gcc2
5214 builtin and then its argument prototype would still apply. */
5215char _oss_ioctl ();
503d2be0
AS
5216int
5217main ()
5218{
98418dba 5219_oss_ioctl ();
503d2be0
AS
5220 ;
5221 return 0;
5222}
5223_ACEOF
98418dba 5224rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 5225if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 5226 (eval $ac_link) 2>conftest.er1
503d2be0 5227 ac_status=$?
35996d22
AS
5228 grep -v '^ *+' conftest.er1 >conftest.err
5229 rm -f conftest.er1
5230 cat conftest.err >&5
c0d27fcc 5231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5232 (exit $ac_status); } &&
9adfabc2 5233 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5235 (eval $ac_try) 2>&5
5236 ac_status=$?
5237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5238 (exit $ac_status); }; } &&
5239 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 5240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5241 (eval $ac_try) 2>&5
5242 ac_status=$?
c0d27fcc 5243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5244 (exit $ac_status); }; }; then
98418dba 5245 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 5246else
503d2be0 5247 echo "$as_me: failed program was:" >&5
19650fd6
AS
5248sed 's/^/| /' conftest.$ac_ext >&5
5249
98418dba 5250ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 5251fi
35996d22
AS
5252rm -f conftest.err conftest.$ac_objext \
5253 conftest$ac_exeext conftest.$ac_ext
98418dba 5254LIBS=$ac_check_lib_save_LIBS
f4988be7 5255fi
c0d27fcc 5256echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
5257echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
5258if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
5259 LIBSOUND=-lossaudio
5260else
5261 LIBSOUND=
5262fi
5263
c0d27fcc 5264
f4988be7 5265fi
c0d27fcc
MR
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
22044edf
DL
5284
5285
973a76b1 5286
cffcede7 5287
551ffc27 5288
226e2359 5289
c0d27fcc 5290
f4988be7 5291
98418dba
CW
5292for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5293 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5294 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 5295 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 5296 sys/utsname.h pwd.h
98418dba
CW
5297do
5298as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5299if eval "test \"\${$as_ac_Header+set}\" = set"; then
5300 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5301echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5302if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5303 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5304fi
5305echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5306echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5307else
c0d27fcc
MR
5308 # Is the header compilable?
5309echo "$as_me:$LINENO: checking $ac_header usability" >&5
5310echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5311cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5312/* confdefs.h. */
5313_ACEOF
5314cat confdefs.h >>conftest.$ac_ext
5315cat >>conftest.$ac_ext <<_ACEOF
5316/* end confdefs.h. */
c0d27fcc
MR
5317$ac_includes_default
5318#include <$ac_header>
5319_ACEOF
5320rm -f conftest.$ac_objext
5321if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5322 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5323 ac_status=$?
35996d22
AS
5324 grep -v '^ *+' conftest.er1 >conftest.err
5325 rm -f conftest.er1
5326 cat conftest.err >&5
c0d27fcc
MR
5327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5328 (exit $ac_status); } &&
9adfabc2 5329 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5331 (eval $ac_try) 2>&5
5332 ac_status=$?
5333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5334 (exit $ac_status); }; } &&
5335 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5337 (eval $ac_try) 2>&5
5338 ac_status=$?
5339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5340 (exit $ac_status); }; }; then
5341 ac_header_compiler=yes
5342else
5343 echo "$as_me: failed program was:" >&5
19650fd6
AS
5344sed 's/^/| /' conftest.$ac_ext >&5
5345
c0d27fcc
MR
5346ac_header_compiler=no
5347fi
35996d22 5348rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5349echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5350echo "${ECHO_T}$ac_header_compiler" >&6
5351
5352# Is the header present?
5353echo "$as_me:$LINENO: checking $ac_header presence" >&5
5354echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5355cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5356/* confdefs.h. */
5357_ACEOF
5358cat confdefs.h >>conftest.$ac_ext
5359cat >>conftest.$ac_ext <<_ACEOF
5360/* end confdefs.h. */
98418dba 5361#include <$ac_header>
503d2be0 5362_ACEOF
c0d27fcc 5363if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5364 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5365 ac_status=$?
6bae0ccf 5366 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5367 rm -f conftest.er1
5368 cat conftest.err >&5
c0d27fcc 5369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5370 (exit $ac_status); } >/dev/null; then
5371 if test -s conftest.err; then
5372 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5373 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5374 else
5375 ac_cpp_err=
5376 fi
5377else
5378 ac_cpp_err=yes
5379fi
5380if test -z "$ac_cpp_err"; then
c0d27fcc 5381 ac_header_preproc=yes
34ec9ebe 5382else
503d2be0 5383 echo "$as_me: failed program was:" >&5
19650fd6
AS
5384sed 's/^/| /' conftest.$ac_ext >&5
5385
c0d27fcc 5386 ac_header_preproc=no
34ec9ebe 5387fi
98418dba 5388rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5389echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5390echo "${ECHO_T}$ac_header_preproc" >&6
5391
5392# So? What about this header?
35996d22
AS
5393case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5394 yes:no: )
c0d27fcc
MR
5395 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5396echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
5397 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5398echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5399 ac_header_preproc=yes
19650fd6 5400 ;;
35996d22 5401 no:yes:* )
c0d27fcc
MR
5402 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5403echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
5404 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5405echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5406 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5407echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5408 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5409echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5410 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5411echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
5412 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5413echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5414 (
5415 cat <<\_ASBOX
35996d22
AS
5416## ------------------------------------------ ##
5417## Report this to the AC_PACKAGE_NAME lists. ##
5418## ------------------------------------------ ##
19650fd6
AS
5419_ASBOX
5420 ) |
5421 sed "s/^/$as_me: WARNING: /" >&2
5422 ;;
c0d27fcc
MR
5423esac
5424echo "$as_me:$LINENO: checking for $ac_header" >&5
5425echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5426if eval "test \"\${$as_ac_Header+set}\" = set"; then
5427 echo $ECHO_N "(cached) $ECHO_C" >&6
5428else
35996d22 5429 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 5430fi
c0d27fcc 5431echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5432echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5433
5434fi
98418dba 5435if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5436 cat >>confdefs.h <<_ACEOF
98418dba 5437#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5438_ACEOF
34ec9ebe 5439
98418dba 5440fi
c0d27fcc 5441
98418dba
CW
5442done
5443
22044edf 5444
f17e308a
JD
5445echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
5446echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6
5447cat >conftest.$ac_ext <<_ACEOF
5448/* confdefs.h. */
5449_ACEOF
5450cat confdefs.h >>conftest.$ac_ext
5451cat >>conftest.$ac_ext <<_ACEOF
5452/* end confdefs.h. */
5453#include <sys/personality.h>
5454int
5455main ()
5456{
5457personality (PER_LINUX32)
5458 ;
5459 return 0;
5460}
5461_ACEOF
5462rm -f conftest.$ac_objext
5463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5464 (eval $ac_compile) 2>conftest.er1
5465 ac_status=$?
5466 grep -v '^ *+' conftest.er1 >conftest.err
5467 rm -f conftest.er1
5468 cat conftest.err >&5
5469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5470 (exit $ac_status); } &&
9adfabc2 5471 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
f17e308a
JD
5472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5473 (eval $ac_try) 2>&5
5474 ac_status=$?
5475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5476 (exit $ac_status); }; } &&
5477 { ac_try='test -s conftest.$ac_objext'
5478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5479 (eval $ac_try) 2>&5
5480 ac_status=$?
5481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5482 (exit $ac_status); }; }; then
5483 emacs_cv_personality_linux32=yes
5484else
5485 echo "$as_me: failed program was:" >&5
5486sed 's/^/| /' conftest.$ac_ext >&5
5487
5488emacs_cv_personality_linux32=no
5489fi
5490rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5491echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
5492echo "${ECHO_T}$emacs_cv_personality_linux32" >&6
5493
5494if test $emacs_cv_personality_linux32 = yes; then
5495
5496cat >>confdefs.h <<\_ACEOF
5497#define HAVE_PERSONALITY_LINUX32 1
5498_ACEOF
5499
5500fi
5501
5502
22044edf
DL
5503for ac_header in term.h
5504do
5505as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5506echo "$as_me:$LINENO: checking for $ac_header" >&5
5507echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5508if eval "test \"\${$as_ac_Header+set}\" = set"; then
5509 echo $ECHO_N "(cached) $ECHO_C" >&6
5510else
5511 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5512/* confdefs.h. */
5513_ACEOF
5514cat confdefs.h >>conftest.$ac_ext
5515cat >>conftest.$ac_ext <<_ACEOF
5516/* end confdefs.h. */
22044edf
DL
5517#include <$ac_header>
5518_ACEOF
5519if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5520 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5521 ac_status=$?
5522 grep -v '^ *+' conftest.er1 >conftest.err
5523 rm -f conftest.er1
5524 cat conftest.err >&5
5525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5526 (exit $ac_status); } >/dev/null; then
5527 if test -s conftest.err; then
5528 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5529 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22044edf
DL
5530 else
5531 ac_cpp_err=
5532 fi
5533else
5534 ac_cpp_err=yes
5535fi
5536if test -z "$ac_cpp_err"; then
5537 eval "$as_ac_Header=yes"
5538else
5539 echo "$as_me: failed program was:" >&5
19650fd6
AS
5540sed 's/^/| /' conftest.$ac_ext >&5
5541
22044edf
DL
5542 eval "$as_ac_Header=no"
5543fi
5544rm -f conftest.err conftest.$ac_ext
5545fi
5546echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5547echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5548if test `eval echo '${'$as_ac_Header'}'` = yes; then
5549 cat >>confdefs.h <<_ACEOF
5550#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5551_ACEOF
5552
5553fi
5554
5555done
5556
c0d27fcc 5557echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
5558echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5559if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 5560 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5561else
503d2be0 5562 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5563/* confdefs.h. */
5564_ACEOF
5565cat confdefs.h >>conftest.$ac_ext
5566cat >>conftest.$ac_ext <<_ACEOF
5567/* end confdefs.h. */
98418dba
CW
5568#include <stdlib.h>
5569#include <stdarg.h>
5570#include <string.h>
5571#include <float.h>
5572
19650fd6
AS
5573int
5574main ()
5575{
5576
5577 ;
5578 return 0;
5579}
98418dba 5580_ACEOF
19650fd6
AS
5581rm -f conftest.$ac_objext
5582if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5583 (eval $ac_compile) 2>conftest.er1
cd958eb3 5584 ac_status=$?
35996d22
AS
5585 grep -v '^ *+' conftest.er1 >conftest.err
5586 rm -f conftest.er1
5587 cat conftest.err >&5
cd958eb3 5588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 5589 (exit $ac_status); } &&
9adfabc2 5590 { ac_try='test -z "$ac_c_werror_flag" || 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); } &&
9adfabc2 5755 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5757 (eval $ac_try) 2>&5
5758 ac_status=$?
5759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5760 (exit $ac_status); }; } &&
5761 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5763 (eval $ac_try) 2>&5
5764 ac_status=$?
c0d27fcc 5765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5766 (exit $ac_status); }; }; then
98418dba 5767 ac_cv_header_time=yes
ba4481b5 5768else
503d2be0 5769 echo "$as_me: failed program was:" >&5
19650fd6
AS
5770sed 's/^/| /' conftest.$ac_ext >&5
5771
98418dba 5772ac_cv_header_time=no
ba4481b5 5773fi
35996d22 5774rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 5775fi
c0d27fcc 5776echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
5777echo "${ECHO_T}$ac_cv_header_time" >&6
5778if test $ac_cv_header_time = yes; then
503d2be0 5779
c0d27fcc 5780cat >>confdefs.h <<\_ACEOF
98418dba 5781#define TIME_WITH_SYS_TIME 1
c0d27fcc 5782_ACEOF
ba4481b5
DL
5783
5784fi
5785
cd958eb3
MB
5786echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
5787echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
5788if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 5789 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5790else
503d2be0 5791 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5792/* confdefs.h. */
5793_ACEOF
5794cat confdefs.h >>conftest.$ac_ext
5795cat >>conftest.$ac_ext <<_ACEOF
5796/* end confdefs.h. */
cd958eb3
MB
5797$ac_includes_default
5798int
5799main ()
5800{
5801#ifndef sys_siglist
5802 char *p = (char *) sys_siglist;
98418dba 5803#endif
503d2be0 5804
cd958eb3
MB
5805 ;
5806 return 0;
5807}
5808_ACEOF
5809rm -f conftest.$ac_objext
5810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5811 (eval $ac_compile) 2>conftest.er1
cd958eb3 5812 ac_status=$?
35996d22
AS
5813 grep -v '^ *+' conftest.er1 >conftest.err
5814 rm -f conftest.er1
5815 cat conftest.err >&5
cd958eb3
MB
5816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5817 (exit $ac_status); } &&
9adfabc2 5818 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5820 (eval $ac_try) 2>&5
5821 ac_status=$?
5822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5823 (exit $ac_status); }; } &&
5824 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
5825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5826 (eval $ac_try) 2>&5
5827 ac_status=$?
5828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5829 (exit $ac_status); }; }; then
5830 ac_cv_have_decl_sys_siglist=yes
5831else
5832 echo "$as_me: failed program was:" >&5
19650fd6
AS
5833sed 's/^/| /' conftest.$ac_ext >&5
5834
cd958eb3
MB
5835ac_cv_have_decl_sys_siglist=no
5836fi
35996d22 5837rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
5838fi
5839echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
5840echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
5841if test $ac_cv_have_decl_sys_siglist = yes; then
5842
5843cat >>confdefs.h <<_ACEOF
5844#define HAVE_DECL_SYS_SIGLIST 1
5845_ACEOF
5846
5847
5848else
5849 cat >>confdefs.h <<_ACEOF
5850#define HAVE_DECL_SYS_SIGLIST 0
5851_ACEOF
5852
5853
5854fi
5855
5856
5857if test $ac_cv_have_decl_sys_siglist != yes; then
5858 # For Tru64, at least:
5859 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
5860echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
5861if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
5862 echo $ECHO_N "(cached) $ECHO_C" >&6
5863else
5864 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5865/* confdefs.h. */
5866_ACEOF
5867cat confdefs.h >>conftest.$ac_ext
5868cat >>conftest.$ac_ext <<_ACEOF
5869/* end confdefs.h. */
cd958eb3 5870$ac_includes_default
503d2be0
AS
5871int
5872main ()
5873{
cd958eb3
MB
5874#ifndef __sys_siglist
5875 char *p = (char *) __sys_siglist;
5876#endif
5877
503d2be0
AS
5878 ;
5879 return 0;
5880}
5881_ACEOF
5882rm -f conftest.$ac_objext
c0d27fcc 5883if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5884 (eval $ac_compile) 2>conftest.er1
503d2be0 5885 ac_status=$?
35996d22
AS
5886 grep -v '^ *+' conftest.er1 >conftest.err
5887 rm -f conftest.er1
5888 cat conftest.err >&5
c0d27fcc 5889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5890 (exit $ac_status); } &&
9adfabc2 5891 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5893 (eval $ac_try) 2>&5
5894 ac_status=$?
5895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5896 (exit $ac_status); }; } &&
5897 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5899 (eval $ac_try) 2>&5
5900 ac_status=$?
c0d27fcc 5901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5902 (exit $ac_status); }; }; then
cd958eb3 5903 ac_cv_have_decl___sys_siglist=yes
ba4481b5 5904else
503d2be0 5905 echo "$as_me: failed program was:" >&5
19650fd6
AS
5906sed 's/^/| /' conftest.$ac_ext >&5
5907
cd958eb3 5908ac_cv_have_decl___sys_siglist=no
ba4481b5 5909fi
35996d22 5910rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5911fi
cd958eb3
MB
5912echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
5913echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6
5914if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 5915
cd958eb3
MB
5916cat >>confdefs.h <<_ACEOF
5917#define HAVE_DECL___SYS_SIGLIST 1
5918_ACEOF
5919
5920
5921else
5922 cat >>confdefs.h <<_ACEOF
5923#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 5924_ACEOF
503d2be0 5925
cd958eb3 5926
ba4481b5
DL
5927fi
5928
cd958eb3
MB
5929
5930 if test $ac_cv_have_decl___sys_siglist = yes; then
5931
5932cat >>confdefs.h <<\_ACEOF
5933#define sys_siglist __sys_siglist
5934_ACEOF
5935
5936 fi
5937fi
c0d27fcc 5938echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
5939echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
5940if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 5941 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5942else
503d2be0 5943 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5944/* confdefs.h. */
5945_ACEOF
5946cat confdefs.h >>conftest.$ac_ext
5947cat >>conftest.$ac_ext <<_ACEOF
5948/* end confdefs.h. */
98418dba
CW
5949#include <sys/types.h>
5950#include <sys/wait.h>
5951#ifndef WEXITSTATUS
5952# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5953#endif
5954#ifndef WIFEXITED
5955# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 5956#endif
503d2be0
AS
5957
5958int
5959main ()
5960{
98418dba
CW
5961 int s;
5962 wait (&s);
5963 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
5964 ;
5965 return 0;
5966}
5967_ACEOF
98418dba 5968rm -f conftest.$ac_objext
c0d27fcc 5969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5970 (eval $ac_compile) 2>conftest.er1
503d2be0 5971 ac_status=$?
35996d22
AS
5972 grep -v '^ *+' conftest.er1 >conftest.err
5973 rm -f conftest.er1
5974 cat conftest.err >&5
c0d27fcc 5975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5976 (exit $ac_status); } &&
9adfabc2 5977 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5979 (eval $ac_try) 2>&5
5980 ac_status=$?
5981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5982 (exit $ac_status); }; } &&
5983 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5985 (eval $ac_try) 2>&5
5986 ac_status=$?
c0d27fcc 5987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5988 (exit $ac_status); }; }; then
98418dba 5989 ac_cv_header_sys_wait_h=yes
ba4481b5 5990else
503d2be0 5991 echo "$as_me: failed program was:" >&5
19650fd6
AS
5992sed 's/^/| /' conftest.$ac_ext >&5
5993
98418dba 5994ac_cv_header_sys_wait_h=no
ba4481b5 5995fi
35996d22 5996rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 5997fi
c0d27fcc 5998echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
5999echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
6000if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 6001
c0d27fcc 6002cat >>confdefs.h <<\_ACEOF
98418dba 6003#define HAVE_SYS_WAIT_H 1
c0d27fcc 6004_ACEOF
ba4481b5 6005
ba4481b5
DL
6006fi
6007
c0d27fcc
MR
6008
6009echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
6010echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
6011if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 6012 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 6013else
503d2be0 6014 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6015/* confdefs.h. */
6016_ACEOF
6017cat confdefs.h >>conftest.$ac_ext
6018cat >>conftest.$ac_ext <<_ACEOF
6019/* end confdefs.h. */
98418dba
CW
6020#ifdef TIME_WITH_SYS_TIME
6021#include <sys/time.h>
6022#include <time.h>
6023#else
6024#ifdef HAVE_SYS_TIME_H
6025#include <sys/time.h>
6026#else
1113b624 6027#include <time.h>
98418dba
CW
6028#endif
6029#endif
6030#ifdef HAVE_UTIME_H
6031#include <utime.h>
6032#endif
503d2be0
AS
6033int
6034main ()
6035{
98418dba 6036static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
6037 ;
6038 return 0;
6039}
6040_ACEOF
98418dba 6041rm -f conftest.$ac_objext
c0d27fcc 6042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6043 (eval $ac_compile) 2>conftest.er1
503d2be0 6044 ac_status=$?
35996d22
AS
6045 grep -v '^ *+' conftest.er1 >conftest.err
6046 rm -f conftest.er1
6047 cat conftest.err >&5
c0d27fcc 6048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6049 (exit $ac_status); } &&
9adfabc2 6050 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6052 (eval $ac_try) 2>&5
6053 ac_status=$?
6054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6055 (exit $ac_status); }; } &&
6056 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6058 (eval $ac_try) 2>&5
6059 ac_status=$?
c0d27fcc 6060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6061 (exit $ac_status); }; }; then
98418dba 6062 emacs_cv_struct_utimbuf=yes
1113b624 6063else
503d2be0 6064 echo "$as_me: failed program was:" >&5
19650fd6
AS
6065sed 's/^/| /' conftest.$ac_ext >&5
6066
98418dba 6067emacs_cv_struct_utimbuf=no
1113b624 6068fi
35996d22 6069rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 6070fi
c0d27fcc 6071echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
6072echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
6073if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 6074
c0d27fcc 6075cat >>confdefs.h <<\_ACEOF
98418dba 6076#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 6077_ACEOF
1113b624
PE
6078
6079fi
ba4481b5 6080
c0d27fcc 6081echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
6082echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6083if test "${ac_cv_type_signal+set}" = set; then
503d2be0 6084 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6085else
98418dba 6086 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6087/* confdefs.h. */
6088_ACEOF
6089cat confdefs.h >>conftest.$ac_ext
6090cat >>conftest.$ac_ext <<_ACEOF
6091/* end confdefs.h. */
7397acc4 6092#include <sys/types.h>
98418dba
CW
6093#include <signal.h>
6094#ifdef signal
6095# undef signal
6096#endif
6097#ifdef __cplusplus
6098extern "C" void (*signal (int, void (*)(int)))(int);
6099#else
6100void (*signal ()) ();
6101#endif
6102
503d2be0
AS
6103int
6104main ()
6105{
98418dba 6106int i;
503d2be0
AS
6107 ;
6108 return 0;
6109}
6110_ACEOF
98418dba 6111rm -f conftest.$ac_objext
c0d27fcc 6112if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6113 (eval $ac_compile) 2>conftest.er1
503d2be0 6114 ac_status=$?
35996d22
AS
6115 grep -v '^ *+' conftest.er1 >conftest.err
6116 rm -f conftest.er1
6117 cat conftest.err >&5
c0d27fcc 6118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6119 (exit $ac_status); } &&
9adfabc2 6120 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6122 (eval $ac_try) 2>&5
6123 ac_status=$?
6124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6125 (exit $ac_status); }; } &&
6126 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6128 (eval $ac_try) 2>&5
6129 ac_status=$?
c0d27fcc 6130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6131 (exit $ac_status); }; }; then
98418dba 6132 ac_cv_type_signal=void
503d2be0
AS
6133else
6134 echo "$as_me: failed program was:" >&5
19650fd6
AS
6135sed 's/^/| /' conftest.$ac_ext >&5
6136
98418dba 6137ac_cv_type_signal=int
503d2be0 6138fi
35996d22 6139rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6140fi
c0d27fcc 6141echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 6142echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 6143
c0d27fcc 6144cat >>confdefs.h <<_ACEOF
98418dba 6145#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
6146_ACEOF
6147
503d2be0 6148
c0d27fcc
MR
6149
6150echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
6151echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
6152if test "${emacs_cv_speed_t+set}" = set; then
6153 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6154else
98418dba 6155 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6156/* confdefs.h. */
6157_ACEOF
6158cat confdefs.h >>conftest.$ac_ext
6159cat >>conftest.$ac_ext <<_ACEOF
6160/* end confdefs.h. */
98418dba 6161#include <termios.h>
98418dba
CW
6162int
6163main ()
6164{
6165speed_t x = 1;
6166 ;
6167 return 0;
6168}
6169_ACEOF
6170rm -f conftest.$ac_objext
c0d27fcc 6171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6172 (eval $ac_compile) 2>conftest.er1
98418dba 6173 ac_status=$?
35996d22
AS
6174 grep -v '^ *+' conftest.er1 >conftest.err
6175 rm -f conftest.er1
6176 cat conftest.err >&5
c0d27fcc 6177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6178 (exit $ac_status); } &&
9adfabc2 6179 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6181 (eval $ac_try) 2>&5
6182 ac_status=$?
6183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6184 (exit $ac_status); }; } &&
6185 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6187 (eval $ac_try) 2>&5
6188 ac_status=$?
c0d27fcc 6189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6190 (exit $ac_status); }; }; then
6191 emacs_cv_speed_t=yes
6192else
6193 echo "$as_me: failed program was:" >&5
19650fd6
AS
6194sed 's/^/| /' conftest.$ac_ext >&5
6195
98418dba
CW
6196emacs_cv_speed_t=no
6197fi
35996d22 6198rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 6199fi
c0d27fcc 6200echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
6201echo "${ECHO_T}$emacs_cv_speed_t" >&6
6202if test $emacs_cv_speed_t = yes; then
b936fae4 6203
c0d27fcc 6204cat >>confdefs.h <<\_ACEOF
98418dba 6205#define HAVE_SPEED_T 1
c0d27fcc 6206_ACEOF
98418dba 6207
7397acc4
DL
6208fi
6209
c0d27fcc 6210echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
6211echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
6212if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 6213 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6214else
503d2be0 6215 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6216/* confdefs.h. */
6217_ACEOF
6218cat confdefs.h >>conftest.$ac_ext
6219cat >>conftest.$ac_ext <<_ACEOF
6220/* end confdefs.h. */
98418dba
CW
6221#ifdef TIME_WITH_SYS_TIME
6222#include <sys/time.h>
6223#include <time.h>
6224#else
6225#ifdef HAVE_SYS_TIME_H
6226#include <sys/time.h>
6227#else
6228#include <time.h>
6229#endif
6230#endif
503d2be0
AS
6231int
6232main ()
6233{
98418dba 6234static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
6235 ;
6236 return 0;
6237}
6238_ACEOF
6239rm -f conftest.$ac_objext
c0d27fcc 6240if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6241 (eval $ac_compile) 2>conftest.er1
503d2be0 6242 ac_status=$?
35996d22
AS
6243 grep -v '^ *+' conftest.er1 >conftest.err
6244 rm -f conftest.er1
6245 cat conftest.err >&5
c0d27fcc 6246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6247 (exit $ac_status); } &&
9adfabc2 6248 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6250 (eval $ac_try) 2>&5
6251 ac_status=$?
6252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6253 (exit $ac_status); }; } &&
6254 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6256 (eval $ac_try) 2>&5
6257 ac_status=$?
c0d27fcc 6258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6259 (exit $ac_status); }; }; then
98418dba 6260 emacs_cv_struct_timeval=yes
7397acc4 6261else
503d2be0 6262 echo "$as_me: failed program was:" >&5
19650fd6
AS
6263sed 's/^/| /' conftest.$ac_ext >&5
6264
98418dba 6265emacs_cv_struct_timeval=no
7397acc4 6266fi
35996d22 6267rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6268fi
c0d27fcc 6269echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
6270echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
6271HAVE_TIMEVAL=$emacs_cv_struct_timeval
6272if test $emacs_cv_struct_timeval = yes; then
b936fae4 6273
c0d27fcc 6274cat >>confdefs.h <<\_ACEOF
98418dba 6275#define HAVE_TIMEVAL 1
c0d27fcc 6276_ACEOF
7397acc4
DL
6277
6278fi
6279
c0d27fcc 6280echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
6281echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
6282if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 6283 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6284else
503d2be0 6285 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6286/* confdefs.h. */
6287_ACEOF
6288cat confdefs.h >>conftest.$ac_ext
6289cat >>conftest.$ac_ext <<_ACEOF
6290/* end confdefs.h. */
98418dba 6291#include <math.h>
503d2be0
AS
6292int
6293main ()
6294{
98418dba 6295static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
6296 ;
6297 return 0;
ba4481b5 6298}
503d2be0
AS
6299_ACEOF
6300rm -f conftest.$ac_objext
c0d27fcc 6301if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6302 (eval $ac_compile) 2>conftest.er1
503d2be0 6303 ac_status=$?
35996d22
AS
6304 grep -v '^ *+' conftest.er1 >conftest.err
6305 rm -f conftest.er1
6306 cat conftest.err >&5
c0d27fcc 6307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6308 (exit $ac_status); } &&
9adfabc2 6309 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6311 (eval $ac_try) 2>&5
6312 ac_status=$?
6313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6314 (exit $ac_status); }; } &&
6315 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6317 (eval $ac_try) 2>&5
6318 ac_status=$?
c0d27fcc 6319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6320 (exit $ac_status); }; }; then
98418dba 6321 emacs_cv_struct_exception=yes
ba4481b5 6322else
503d2be0 6323 echo "$as_me: failed program was:" >&5
19650fd6
AS
6324sed 's/^/| /' conftest.$ac_ext >&5
6325
98418dba 6326emacs_cv_struct_exception=no
ba4481b5 6327fi
35996d22 6328rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6329fi
c0d27fcc 6330echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
6331echo "${ECHO_T}$emacs_cv_struct_exception" >&6
6332HAVE_EXCEPTION=$emacs_cv_struct_exception
6333if test $emacs_cv_struct_exception != yes; then
b936fae4 6334
c0d27fcc 6335cat >>confdefs.h <<\_ACEOF
98418dba 6336#define NO_MATHERR 1
c0d27fcc 6337_ACEOF
ba4481b5
DL
6338
6339fi
6340
7862d3a8
AS
6341
6342for ac_header in sys/socket.h
6343do
6344as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6345if eval "test \"\${$as_ac_Header+set}\" = set"; then
6346 echo "$as_me:$LINENO: checking for $ac_header" >&5
6347echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6348if eval "test \"\${$as_ac_Header+set}\" = set"; then
6349 echo $ECHO_N "(cached) $ECHO_C" >&6
6350fi
6351echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6352echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6353else
6354 # Is the header compilable?
6355echo "$as_me:$LINENO: checking $ac_header usability" >&5
6356echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6357cat >conftest.$ac_ext <<_ACEOF
6358/* confdefs.h. */
6359_ACEOF
6360cat confdefs.h >>conftest.$ac_ext
6361cat >>conftest.$ac_ext <<_ACEOF
6362/* end confdefs.h. */
6363$ac_includes_default
6364#include <$ac_header>
6365_ACEOF
6366rm -f conftest.$ac_objext
6367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6368 (eval $ac_compile) 2>conftest.er1
6369 ac_status=$?
6370 grep -v '^ *+' conftest.er1 >conftest.err
6371 rm -f conftest.er1
6372 cat conftest.err >&5
6373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6374 (exit $ac_status); } &&
9adfabc2 6375 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7862d3a8
AS
6376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6377 (eval $ac_try) 2>&5
6378 ac_status=$?
6379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6380 (exit $ac_status); }; } &&
6381 { ac_try='test -s conftest.$ac_objext'
6382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6383 (eval $ac_try) 2>&5
6384 ac_status=$?
6385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6386 (exit $ac_status); }; }; then
6387 ac_header_compiler=yes
6388else
6389 echo "$as_me: failed program was:" >&5
6390sed 's/^/| /' conftest.$ac_ext >&5
6391
6392ac_header_compiler=no
6393fi
6394rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6395echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6396echo "${ECHO_T}$ac_header_compiler" >&6
6397
6398# Is the header present?
6399echo "$as_me:$LINENO: checking $ac_header presence" >&5
6400echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6401cat >conftest.$ac_ext <<_ACEOF
6402/* confdefs.h. */
6403_ACEOF
6404cat confdefs.h >>conftest.$ac_ext
6405cat >>conftest.$ac_ext <<_ACEOF
6406/* end confdefs.h. */
6407#include <$ac_header>
6408_ACEOF
6409if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6410 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6411 ac_status=$?
6412 grep -v '^ *+' conftest.er1 >conftest.err
6413 rm -f conftest.er1
6414 cat conftest.err >&5
6415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6416 (exit $ac_status); } >/dev/null; then
6417 if test -s conftest.err; then
6418 ac_cpp_err=$ac_c_preproc_warn_flag
6419 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6420 else
6421 ac_cpp_err=
6422 fi
6423else
6424 ac_cpp_err=yes
6425fi
6426if test -z "$ac_cpp_err"; then
6427 ac_header_preproc=yes
6428else
6429 echo "$as_me: failed program was:" >&5
6430sed 's/^/| /' conftest.$ac_ext >&5
6431
6432 ac_header_preproc=no
6433fi
6434rm -f conftest.err conftest.$ac_ext
6435echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6436echo "${ECHO_T}$ac_header_preproc" >&6
6437
6438# So? What about this header?
6439case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6440 yes:no: )
6441 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6442echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6443 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6444echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6445 ac_header_preproc=yes
6446 ;;
6447 no:yes:* )
6448 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6449echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6450 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6451echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6452 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6453echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6454 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6455echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6456 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6457echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6458 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6459echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6460 (
6461 cat <<\_ASBOX
6462## ------------------------------------------ ##
6463## Report this to the AC_PACKAGE_NAME lists. ##
6464## ------------------------------------------ ##
6465_ASBOX
6466 ) |
6467 sed "s/^/$as_me: WARNING: /" >&2
6468 ;;
6469esac
6470echo "$as_me:$LINENO: checking for $ac_header" >&5
6471echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6472if eval "test \"\${$as_ac_Header+set}\" = set"; then
6473 echo $ECHO_N "(cached) $ECHO_C" >&6
6474else
6475 eval "$as_ac_Header=\$ac_header_preproc"
6476fi
6477echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6478echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6479
6480fi
6481if test `eval echo '${'$as_ac_Header'}'` = yes; then
6482 cat >>confdefs.h <<_ACEOF
6483#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6484_ACEOF
6485
6486fi
6487
6488done
6489
6490
6491for ac_header in net/if.h
6492do
6493as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6494echo "$as_me:$LINENO: checking for $ac_header" >&5
6495echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6496if eval "test \"\${$as_ac_Header+set}\" = set"; then
6497 echo $ECHO_N "(cached) $ECHO_C" >&6
6498else
6499 cat >conftest.$ac_ext <<_ACEOF
6500/* confdefs.h. */
6501_ACEOF
6502cat confdefs.h >>conftest.$ac_ext
6503cat >>conftest.$ac_ext <<_ACEOF
6504/* end confdefs.h. */
6505$ac_includes_default
6506#if HAVE_SYS_SOCKET_H
6507#include <sys/socket.h>
6508#endif
6509
6510#include <$ac_header>
6511_ACEOF
6512rm -f conftest.$ac_objext
6513if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6514 (eval $ac_compile) 2>conftest.er1
6515 ac_status=$?
6516 grep -v '^ *+' conftest.er1 >conftest.err
6517 rm -f conftest.er1
6518 cat conftest.err >&5
6519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6520 (exit $ac_status); } &&
9adfabc2 6521 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7862d3a8
AS
6522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6523 (eval $ac_try) 2>&5
6524 ac_status=$?
6525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6526 (exit $ac_status); }; } &&
6527 { ac_try='test -s conftest.$ac_objext'
6528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6529 (eval $ac_try) 2>&5
6530 ac_status=$?
6531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6532 (exit $ac_status); }; }; then
6533 eval "$as_ac_Header=yes"
6534else
6535 echo "$as_me: failed program was:" >&5
6536sed 's/^/| /' conftest.$ac_ext >&5
6537
6538eval "$as_ac_Header=no"
6539fi
6540rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6541fi
6542echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6543echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6544if test `eval echo '${'$as_ac_Header'}'` = yes; then
6545 cat >>confdefs.h <<_ACEOF
6546#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6547_ACEOF
6548
6549fi
6550
6551done
6552
6553
c0d27fcc 6554echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
6555echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
6556if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 6557 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6558else
503d2be0 6559 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6560/* confdefs.h. */
6561_ACEOF
6562cat confdefs.h >>conftest.$ac_ext
6563cat >>conftest.$ac_ext <<_ACEOF
6564/* end confdefs.h. */
98418dba
CW
6565#include <sys/types.h>
6566#include <time.h>
7397acc4 6567
503d2be0
AS
6568int
6569main ()
6570{
98418dba 6571struct tm *tp; tp->tm_sec;
503d2be0
AS
6572 ;
6573 return 0;
6574}
6575_ACEOF
6576rm -f conftest.$ac_objext
c0d27fcc 6577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6578 (eval $ac_compile) 2>conftest.er1
503d2be0 6579 ac_status=$?
35996d22
AS
6580 grep -v '^ *+' conftest.er1 >conftest.err
6581 rm -f conftest.er1
6582 cat conftest.err >&5
c0d27fcc 6583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6584 (exit $ac_status); } &&
9adfabc2 6585 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
c0d27fcc 6586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6587 (eval $ac_try) 2>&5
6588 ac_status=$?
c0d27fcc 6589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
6590 (exit $ac_status); }; } &&
6591 { ac_try='test -s conftest.$ac_objext'
6592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6593 (eval $ac_try) 2>&5
6594 ac_status=$?
6595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6596 (exit $ac_status); }; }; then
6597 ac_cv_struct_tm=time.h
6598else
503d2be0 6599 echo "$as_me: failed program was:" >&5
19650fd6
AS
6600sed 's/^/| /' conftest.$ac_ext >&5
6601
98418dba 6602ac_cv_struct_tm=sys/time.h
7397acc4 6603fi
35996d22 6604rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6605fi
c0d27fcc 6606echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
6607echo "${ECHO_T}$ac_cv_struct_tm" >&6
6608if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 6609
c0d27fcc 6610cat >>confdefs.h <<\_ACEOF
98418dba 6611#define TM_IN_SYS_TIME 1
c0d27fcc 6612_ACEOF
7397acc4
DL
6613
6614fi
ba4481b5 6615
c0d27fcc 6616echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
6617echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
6618if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 6619 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6620else
98418dba 6621 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6622/* confdefs.h. */
6623_ACEOF
6624cat confdefs.h >>conftest.$ac_ext
6625cat >>conftest.$ac_ext <<_ACEOF
6626/* end confdefs.h. */
98418dba
CW
6627#include <sys/types.h>
6628#include <$ac_cv_struct_tm>
ba4481b5 6629
c0d27fcc 6630
98418dba
CW
6631int
6632main ()
6633{
6634static struct tm ac_aggr;
6635if (ac_aggr.tm_zone)
6636return 0;
6637 ;
6638 return 0;
6639}
6640_ACEOF
6641rm -f conftest.$ac_objext
c0d27fcc 6642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6643 (eval $ac_compile) 2>conftest.er1
98418dba 6644 ac_status=$?
35996d22
AS
6645 grep -v '^ *+' conftest.er1 >conftest.err
6646 rm -f conftest.er1
6647 cat conftest.err >&5
c0d27fcc 6648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6649 (exit $ac_status); } &&
9adfabc2 6650 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6652 (eval $ac_try) 2>&5
6653 ac_status=$?
6654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6655 (exit $ac_status); }; } &&
6656 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6658 (eval $ac_try) 2>&5
6659 ac_status=$?
c0d27fcc 6660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6661 (exit $ac_status); }; }; then
6662 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 6663else
98418dba 6664 echo "$as_me: failed program was:" >&5
19650fd6
AS
6665sed 's/^/| /' conftest.$ac_ext >&5
6666
6bae0ccf 6667cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6668/* confdefs.h. */
6669_ACEOF
6670cat confdefs.h >>conftest.$ac_ext
6671cat >>conftest.$ac_ext <<_ACEOF
6672/* end confdefs.h. */
6bae0ccf
DL
6673#include <sys/types.h>
6674#include <$ac_cv_struct_tm>
6675
6676
6677int
6678main ()
6679{
6680static struct tm ac_aggr;
6681if (sizeof ac_aggr.tm_zone)
6682return 0;
6683 ;
6684 return 0;
6685}
6686_ACEOF
6687rm -f conftest.$ac_objext
6688if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6689 (eval $ac_compile) 2>conftest.er1
6bae0ccf 6690 ac_status=$?
35996d22
AS
6691 grep -v '^ *+' conftest.er1 >conftest.err
6692 rm -f conftest.er1
6693 cat conftest.err >&5
6bae0ccf
DL
6694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6695 (exit $ac_status); } &&
9adfabc2 6696 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6698 (eval $ac_try) 2>&5
6699 ac_status=$?
6700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6701 (exit $ac_status); }; } &&
6702 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
6703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6704 (eval $ac_try) 2>&5
6705 ac_status=$?
6706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6707 (exit $ac_status); }; }; then
6708 ac_cv_member_struct_tm_tm_zone=yes
6709else
6710 echo "$as_me: failed program was:" >&5
19650fd6
AS
6711sed 's/^/| /' conftest.$ac_ext >&5
6712
98418dba 6713ac_cv_member_struct_tm_tm_zone=no
ba4481b5 6714fi
35996d22 6715rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6716fi
35996d22 6717rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 6718fi
c0d27fcc 6719echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
6720echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
6721if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 6722
c0d27fcc 6723cat >>confdefs.h <<_ACEOF
98418dba 6724#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
6725_ACEOF
6726
ba4481b5 6727
98418dba 6728fi
ba4481b5 6729
98418dba 6730if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 6731
c0d27fcc 6732cat >>confdefs.h <<\_ACEOF
98418dba 6733#define HAVE_TM_ZONE 1
c0d27fcc 6734_ACEOF
ba4481b5 6735
ba4481b5 6736else
c0d27fcc 6737 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
6738echo $ECHO_N "checking for tzname... $ECHO_C" >&6
6739if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 6740 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6741else
98418dba 6742 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6743/* confdefs.h. */
6744_ACEOF
6745cat confdefs.h >>conftest.$ac_ext
6746cat >>conftest.$ac_ext <<_ACEOF
6747/* end confdefs.h. */
98418dba
CW
6748#include <time.h>
6749#ifndef tzname /* For SGI. */
6750extern char *tzname[]; /* RS6000 and others reject char **tzname. */
6751#endif
6752
98418dba
CW
6753int
6754main ()
6755{
6756atoi(*tzname);
6757 ;
6758 return 0;
6759}
6760_ACEOF
6761rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6762if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 6763 (eval $ac_link) 2>conftest.er1
98418dba 6764 ac_status=$?
35996d22
AS
6765 grep -v '^ *+' conftest.er1 >conftest.err
6766 rm -f conftest.er1
6767 cat conftest.err >&5
c0d27fcc 6768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6769 (exit $ac_status); } &&
9adfabc2 6770 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6772 (eval $ac_try) 2>&5
6773 ac_status=$?
6774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6775 (exit $ac_status); }; } &&
6776 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6778 (eval $ac_try) 2>&5
6779 ac_status=$?
c0d27fcc 6780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6781 (exit $ac_status); }; }; then
6782 ac_cv_var_tzname=yes
6783else
6784 echo "$as_me: failed program was:" >&5
19650fd6
AS
6785sed 's/^/| /' conftest.$ac_ext >&5
6786
98418dba 6787ac_cv_var_tzname=no
ba4481b5 6788fi
35996d22
AS
6789rm -f conftest.err conftest.$ac_objext \
6790 conftest$ac_exeext conftest.$ac_ext
98418dba 6791fi
c0d27fcc 6792echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
6793echo "${ECHO_T}$ac_cv_var_tzname" >&6
6794 if test $ac_cv_var_tzname = yes; then
ba4481b5 6795
c0d27fcc 6796cat >>confdefs.h <<\_ACEOF
98418dba 6797#define HAVE_TZNAME 1
c0d27fcc 6798_ACEOF
503d2be0 6799
98418dba
CW
6800 fi
6801fi
503d2be0 6802
c0d27fcc 6803echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
6804echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
6805if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
6806 echo $ECHO_N "(cached) $ECHO_C" >&6
6807else
6808 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6809/* confdefs.h. */
6810_ACEOF
6811cat confdefs.h >>conftest.$ac_ext
6812cat >>conftest.$ac_ext <<_ACEOF
6813/* end confdefs.h. */
98418dba 6814#include <time.h>
b936fae4 6815
98418dba
CW
6816int
6817main ()
6818{
b936fae4
AS
6819static struct tm ac_aggr;
6820if (ac_aggr.tm_gmtoff)
6821return 0;
98418dba
CW
6822 ;
6823 return 0;
6824}
6825_ACEOF
b936fae4 6826rm -f conftest.$ac_objext
c0d27fcc 6827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6828 (eval $ac_compile) 2>conftest.er1
98418dba 6829 ac_status=$?
35996d22
AS
6830 grep -v '^ *+' conftest.er1 >conftest.err
6831 rm -f conftest.er1
6832 cat conftest.err >&5
c0d27fcc 6833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6834 (exit $ac_status); } &&
9adfabc2 6835 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6837 (eval $ac_try) 2>&5
6838 ac_status=$?
6839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6840 (exit $ac_status); }; } &&
6841 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6843 (eval $ac_try) 2>&5
6844 ac_status=$?
c0d27fcc 6845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6846 (exit $ac_status); }; }; then
b936fae4 6847 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
6848else
6849 echo "$as_me: failed program was:" >&5
19650fd6
AS
6850sed 's/^/| /' conftest.$ac_ext >&5
6851
8799b3e4 6852cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6853/* confdefs.h. */
6854_ACEOF
6855cat confdefs.h >>conftest.$ac_ext
6856cat >>conftest.$ac_ext <<_ACEOF
6857/* end confdefs.h. */
6bae0ccf
DL
6858#include <time.h>
6859
8799b3e4
CW
6860int
6861main ()
6862{
6bae0ccf
DL
6863static struct tm ac_aggr;
6864if (sizeof ac_aggr.tm_gmtoff)
6865return 0;
8799b3e4
CW
6866 ;
6867 return 0;
6868}
6869_ACEOF
6bae0ccf 6870rm -f conftest.$ac_objext
c0d27fcc 6871if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6872 (eval $ac_compile) 2>conftest.er1
8799b3e4 6873 ac_status=$?
35996d22
AS
6874 grep -v '^ *+' conftest.er1 >conftest.err
6875 rm -f conftest.er1
6876 cat conftest.err >&5
c0d27fcc 6877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6878 (exit $ac_status); } &&
9adfabc2 6879 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6881 (eval $ac_try) 2>&5
6882 ac_status=$?
6883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6884 (exit $ac_status); }; } &&
6885 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
6887 (eval $ac_try) 2>&5
6888 ac_status=$?
c0d27fcc 6889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6890 (exit $ac_status); }; }; then
6bae0ccf 6891 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
6892else
6893 echo "$as_me: failed program was:" >&5
19650fd6
AS
6894sed 's/^/| /' conftest.$ac_ext >&5
6895
6bae0ccf 6896ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 6897fi
35996d22 6898rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 6899fi
35996d22 6900rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 6901fi
6bae0ccf
DL
6902echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
6903echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
6904if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
6905
6906cat >>confdefs.h <<\_ACEOF
6907#define HAVE_TM_GMTOFF 1
6908_ACEOF
6909
6910fi
6911
96f3a036
DL
6912echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
6913echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6
6914if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
6915 echo $ECHO_N "(cached) $ECHO_C" >&6
6916else
6917 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
6918/* confdefs.h. */
6919_ACEOF
6920cat confdefs.h >>conftest.$ac_ext
6921cat >>conftest.$ac_ext <<_ACEOF
6922/* end confdefs.h. */
7862d3a8
AS
6923$ac_includes_default
6924#if HAVE_SYS_SOCKET_H
6925#include <sys/socket.h>
6926#endif
6927#if HAVE_NET_IF_H
96f3a036 6928#include <net/if.h>
7862d3a8 6929#endif
96f3a036
DL
6930
6931int
6932main ()
6933{
6934static struct ifreq ac_aggr;
6935if (ac_aggr.ifr_flags)
6936return 0;
6937 ;
6938 return 0;
6939}
6940_ACEOF
6941rm -f conftest.$ac_objext
6942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6943 (eval $ac_compile) 2>conftest.er1
96f3a036 6944 ac_status=$?
35996d22
AS
6945 grep -v '^ *+' conftest.er1 >conftest.err
6946 rm -f conftest.er1
6947 cat conftest.err >&5
96f3a036
DL
6948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6949 (exit $ac_status); } &&
9adfabc2 6950 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6952 (eval $ac_try) 2>&5
6953 ac_status=$?
6954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6955 (exit $ac_status); }; } &&
6956 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
6957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6958 (eval $ac_try) 2>&5
6959 ac_status=$?
6960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6961 (exit $ac_status); }; }; then
6962 ac_cv_member_struct_ifreq_ifr_flags=yes
6963else
6964 echo "$as_me: failed program was:" >&5
6965sed 's/^/| /' conftest.$ac_ext >&5
6966
6967cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
6968/* confdefs.h. */
6969_ACEOF
6970cat confdefs.h >>conftest.$ac_ext
6971cat >>conftest.$ac_ext <<_ACEOF
6972/* end confdefs.h. */
7862d3a8
AS
6973$ac_includes_default
6974#if HAVE_SYS_SOCKET_H
6975#include <sys/socket.h>
6976#endif
6977#if HAVE_NET_IF_H
96f3a036 6978#include <net/if.h>
7862d3a8 6979#endif
96f3a036
DL
6980
6981int
6982main ()
6983{
6984static struct ifreq ac_aggr;
6985if (sizeof ac_aggr.ifr_flags)
6986return 0;
6987 ;
6988 return 0;
6989}
6990_ACEOF
6991rm -f conftest.$ac_objext
6992if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6993 (eval $ac_compile) 2>conftest.er1
96f3a036 6994 ac_status=$?
35996d22
AS
6995 grep -v '^ *+' conftest.er1 >conftest.err
6996 rm -f conftest.er1
6997 cat conftest.err >&5
96f3a036
DL
6998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6999 (exit $ac_status); } &&
9adfabc2 7000 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7002 (eval $ac_try) 2>&5
7003 ac_status=$?
7004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7005 (exit $ac_status); }; } &&
7006 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7008 (eval $ac_try) 2>&5
7009 ac_status=$?
7010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7011 (exit $ac_status); }; }; then
7012 ac_cv_member_struct_ifreq_ifr_flags=yes
7013else
7014 echo "$as_me: failed program was:" >&5
7015sed 's/^/| /' conftest.$ac_ext >&5
7016
7017ac_cv_member_struct_ifreq_ifr_flags=no
7018fi
35996d22 7019rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7020fi
35996d22 7021rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7022fi
7023echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
7024echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6
7025if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
7026
7027cat >>confdefs.h <<_ACEOF
7028#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
7029_ACEOF
7030
7031
7032fi
7033echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
7034echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6
7035if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
7036 echo $ECHO_N "(cached) $ECHO_C" >&6
7037else
7038 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7039/* confdefs.h. */
7040_ACEOF
7041cat confdefs.h >>conftest.$ac_ext
7042cat >>conftest.$ac_ext <<_ACEOF
7043/* end confdefs.h. */
7862d3a8
AS
7044$ac_includes_default
7045#if HAVE_SYS_SOCKET_H
7046#include <sys/socket.h>
7047#endif
7048#if HAVE_NET_IF_H
96f3a036 7049#include <net/if.h>
7862d3a8 7050#endif
96f3a036
DL
7051
7052int
7053main ()
7054{
7055static struct ifreq ac_aggr;
7056if (ac_aggr.ifr_hwaddr)
7057return 0;
7058 ;
7059 return 0;
7060}
7061_ACEOF
7062rm -f conftest.$ac_objext
7063if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7064 (eval $ac_compile) 2>conftest.er1
96f3a036 7065 ac_status=$?
35996d22
AS
7066 grep -v '^ *+' conftest.er1 >conftest.err
7067 rm -f conftest.er1
7068 cat conftest.err >&5
96f3a036
DL
7069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7070 (exit $ac_status); } &&
9adfabc2 7071 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7073 (eval $ac_try) 2>&5
7074 ac_status=$?
7075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7076 (exit $ac_status); }; } &&
7077 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7079 (eval $ac_try) 2>&5
7080 ac_status=$?
7081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7082 (exit $ac_status); }; }; then
7083 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7084else
7085 echo "$as_me: failed program was:" >&5
7086sed 's/^/| /' conftest.$ac_ext >&5
7087
7088cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7089/* confdefs.h. */
7090_ACEOF
7091cat confdefs.h >>conftest.$ac_ext
7092cat >>conftest.$ac_ext <<_ACEOF
7093/* end confdefs.h. */
7862d3a8
AS
7094$ac_includes_default
7095#if HAVE_SYS_SOCKET_H
7096#include <sys/socket.h>
7097#endif
7098#if HAVE_NET_IF_H
96f3a036 7099#include <net/if.h>
7862d3a8 7100#endif
96f3a036
DL
7101
7102int
7103main ()
7104{
7105static struct ifreq ac_aggr;
7106if (sizeof ac_aggr.ifr_hwaddr)
7107return 0;
7108 ;
7109 return 0;
7110}
7111_ACEOF
7112rm -f conftest.$ac_objext
7113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7114 (eval $ac_compile) 2>conftest.er1
96f3a036 7115 ac_status=$?
35996d22
AS
7116 grep -v '^ *+' conftest.er1 >conftest.err
7117 rm -f conftest.er1
7118 cat conftest.err >&5
96f3a036
DL
7119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7120 (exit $ac_status); } &&
9adfabc2 7121 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7123 (eval $ac_try) 2>&5
7124 ac_status=$?
7125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7126 (exit $ac_status); }; } &&
7127 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7129 (eval $ac_try) 2>&5
7130 ac_status=$?
7131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7132 (exit $ac_status); }; }; then
7133 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7134else
7135 echo "$as_me: failed program was:" >&5
7136sed 's/^/| /' conftest.$ac_ext >&5
7137
7138ac_cv_member_struct_ifreq_ifr_hwaddr=no
7139fi
35996d22 7140rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7141fi
35996d22 7142rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7143fi
7144echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
7145echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6
7146if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
7147
7148cat >>confdefs.h <<_ACEOF
7149#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
7150_ACEOF
7151
7152
7153fi
7154echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
7155echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6
7156if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
7157 echo $ECHO_N "(cached) $ECHO_C" >&6
7158else
7159 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7160/* confdefs.h. */
7161_ACEOF
7162cat confdefs.h >>conftest.$ac_ext
7163cat >>conftest.$ac_ext <<_ACEOF
7164/* end confdefs.h. */
7862d3a8
AS
7165$ac_includes_default
7166#if HAVE_SYS_SOCKET_H
7167#include <sys/socket.h>
7168#endif
7169#if HAVE_NET_IF_H
96f3a036 7170#include <net/if.h>
7862d3a8 7171#endif
96f3a036
DL
7172
7173int
7174main ()
7175{
7176static struct ifreq ac_aggr;
7177if (ac_aggr.ifr_netmask)
7178return 0;
7179 ;
7180 return 0;
7181}
7182_ACEOF
7183rm -f conftest.$ac_objext
7184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7185 (eval $ac_compile) 2>conftest.er1
96f3a036 7186 ac_status=$?
35996d22
AS
7187 grep -v '^ *+' conftest.er1 >conftest.err
7188 rm -f conftest.er1
7189 cat conftest.err >&5
96f3a036
DL
7190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7191 (exit $ac_status); } &&
9adfabc2 7192 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7194 (eval $ac_try) 2>&5
7195 ac_status=$?
7196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7197 (exit $ac_status); }; } &&
7198 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7200 (eval $ac_try) 2>&5
7201 ac_status=$?
7202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7203 (exit $ac_status); }; }; then
7204 ac_cv_member_struct_ifreq_ifr_netmask=yes
7205else
7206 echo "$as_me: failed program was:" >&5
7207sed 's/^/| /' conftest.$ac_ext >&5
7208
7209cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7210/* confdefs.h. */
7211_ACEOF
7212cat confdefs.h >>conftest.$ac_ext
7213cat >>conftest.$ac_ext <<_ACEOF
7214/* end confdefs.h. */
7862d3a8
AS
7215$ac_includes_default
7216#if HAVE_SYS_SOCKET_H
7217#include <sys/socket.h>
7218#endif
7219#if HAVE_NET_IF_H
96f3a036 7220#include <net/if.h>
7862d3a8 7221#endif
96f3a036
DL
7222
7223int
7224main ()
7225{
7226static struct ifreq ac_aggr;
7227if (sizeof ac_aggr.ifr_netmask)
7228return 0;
7229 ;
7230 return 0;
7231}
7232_ACEOF
7233rm -f conftest.$ac_objext
7234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7235 (eval $ac_compile) 2>conftest.er1
96f3a036 7236 ac_status=$?
35996d22
AS
7237 grep -v '^ *+' conftest.er1 >conftest.err
7238 rm -f conftest.er1
7239 cat conftest.err >&5
96f3a036
DL
7240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7241 (exit $ac_status); } &&
9adfabc2 7242 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7244 (eval $ac_try) 2>&5
7245 ac_status=$?
7246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7247 (exit $ac_status); }; } &&
7248 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7250 (eval $ac_try) 2>&5
7251 ac_status=$?
7252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7253 (exit $ac_status); }; }; then
7254 ac_cv_member_struct_ifreq_ifr_netmask=yes
7255else
7256 echo "$as_me: failed program was:" >&5
7257sed 's/^/| /' conftest.$ac_ext >&5
7258
7259ac_cv_member_struct_ifreq_ifr_netmask=no
7260fi
35996d22 7261rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7262fi
35996d22 7263rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7264fi
7265echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
7266echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6
7267if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
7268
7269cat >>confdefs.h <<_ACEOF
7270#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
7271_ACEOF
7272
7273
7274fi
7275echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
7276echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6
7277if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
7278 echo $ECHO_N "(cached) $ECHO_C" >&6
7279else
7280 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7281/* confdefs.h. */
7282_ACEOF
7283cat confdefs.h >>conftest.$ac_ext
7284cat >>conftest.$ac_ext <<_ACEOF
7285/* end confdefs.h. */
7862d3a8
AS
7286$ac_includes_default
7287#if HAVE_SYS_SOCKET_H
7288#include <sys/socket.h>
7289#endif
7290#if HAVE_NET_IF_H
96f3a036 7291#include <net/if.h>
7862d3a8 7292#endif
96f3a036
DL
7293
7294int
7295main ()
7296{
7297static struct ifreq ac_aggr;
7298if (ac_aggr.ifr_broadaddr)
7299return 0;
7300 ;
7301 return 0;
7302}
7303_ACEOF
7304rm -f conftest.$ac_objext
7305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7306 (eval $ac_compile) 2>conftest.er1
96f3a036 7307 ac_status=$?
35996d22
AS
7308 grep -v '^ *+' conftest.er1 >conftest.err
7309 rm -f conftest.er1
7310 cat conftest.err >&5
96f3a036
DL
7311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7312 (exit $ac_status); } &&
9adfabc2 7313 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7315 (eval $ac_try) 2>&5
7316 ac_status=$?
7317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7318 (exit $ac_status); }; } &&
7319 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7321 (eval $ac_try) 2>&5
7322 ac_status=$?
7323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7324 (exit $ac_status); }; }; then
7325 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7326else
7327 echo "$as_me: failed program was:" >&5
7328sed 's/^/| /' conftest.$ac_ext >&5
7329
7330cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7331/* confdefs.h. */
7332_ACEOF
7333cat confdefs.h >>conftest.$ac_ext
7334cat >>conftest.$ac_ext <<_ACEOF
7335/* end confdefs.h. */
7862d3a8
AS
7336$ac_includes_default
7337#if HAVE_SYS_SOCKET_H
7338#include <sys/socket.h>
7339#endif
7340#if HAVE_NET_IF_H
96f3a036 7341#include <net/if.h>
7862d3a8 7342#endif
96f3a036
DL
7343
7344int
7345main ()
7346{
7347static struct ifreq ac_aggr;
7348if (sizeof ac_aggr.ifr_broadaddr)
7349return 0;
7350 ;
7351 return 0;
7352}
7353_ACEOF
7354rm -f conftest.$ac_objext
7355if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7356 (eval $ac_compile) 2>conftest.er1
96f3a036 7357 ac_status=$?
35996d22
AS
7358 grep -v '^ *+' conftest.er1 >conftest.err
7359 rm -f conftest.er1
7360 cat conftest.err >&5
96f3a036
DL
7361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7362 (exit $ac_status); } &&
9adfabc2 7363 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7365 (eval $ac_try) 2>&5
7366 ac_status=$?
7367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7368 (exit $ac_status); }; } &&
7369 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7371 (eval $ac_try) 2>&5
7372 ac_status=$?
7373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7374 (exit $ac_status); }; }; then
7375 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7376else
7377 echo "$as_me: failed program was:" >&5
7378sed 's/^/| /' conftest.$ac_ext >&5
7379
7380ac_cv_member_struct_ifreq_ifr_broadaddr=no
7381fi
35996d22 7382rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7383fi
35996d22 7384rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7385fi
7386echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
7387echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6
7388if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
7389
7390cat >>confdefs.h <<_ACEOF
7391#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
7392_ACEOF
7393
7394
7395fi
7396echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
7397echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6
7398if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
7399 echo $ECHO_N "(cached) $ECHO_C" >&6
7400else
7401 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7402/* confdefs.h. */
7403_ACEOF
7404cat confdefs.h >>conftest.$ac_ext
7405cat >>conftest.$ac_ext <<_ACEOF
7406/* end confdefs.h. */
7862d3a8
AS
7407$ac_includes_default
7408#if HAVE_SYS_SOCKET_H
7409#include <sys/socket.h>
7410#endif
7411#if HAVE_NET_IF_H
96f3a036 7412#include <net/if.h>
7862d3a8 7413#endif
96f3a036
DL
7414
7415int
7416main ()
7417{
7418static struct ifreq ac_aggr;
7419if (ac_aggr.ifr_addr)
7420return 0;
7421 ;
7422 return 0;
7423}
7424_ACEOF
7425rm -f conftest.$ac_objext
7426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7427 (eval $ac_compile) 2>conftest.er1
96f3a036 7428 ac_status=$?
35996d22
AS
7429 grep -v '^ *+' conftest.er1 >conftest.err
7430 rm -f conftest.er1
7431 cat conftest.err >&5
96f3a036
DL
7432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7433 (exit $ac_status); } &&
9adfabc2 7434 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7436 (eval $ac_try) 2>&5
7437 ac_status=$?
7438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7439 (exit $ac_status); }; } &&
7440 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7442 (eval $ac_try) 2>&5
7443 ac_status=$?
7444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7445 (exit $ac_status); }; }; then
7446 ac_cv_member_struct_ifreq_ifr_addr=yes
7447else
7448 echo "$as_me: failed program was:" >&5
7449sed 's/^/| /' conftest.$ac_ext >&5
7450
7451cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7452/* confdefs.h. */
7453_ACEOF
7454cat confdefs.h >>conftest.$ac_ext
7455cat >>conftest.$ac_ext <<_ACEOF
7456/* end confdefs.h. */
7862d3a8
AS
7457$ac_includes_default
7458#if HAVE_SYS_SOCKET_H
7459#include <sys/socket.h>
7460#endif
7461#if HAVE_NET_IF_H
96f3a036 7462#include <net/if.h>
7862d3a8 7463#endif
96f3a036
DL
7464
7465int
7466main ()
7467{
7468static struct ifreq ac_aggr;
7469if (sizeof ac_aggr.ifr_addr)
7470return 0;
7471 ;
7472 return 0;
7473}
7474_ACEOF
7475rm -f conftest.$ac_objext
7476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7477 (eval $ac_compile) 2>conftest.er1
96f3a036 7478 ac_status=$?
35996d22
AS
7479 grep -v '^ *+' conftest.er1 >conftest.err
7480 rm -f conftest.er1
7481 cat conftest.err >&5
96f3a036
DL
7482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7483 (exit $ac_status); } &&
9adfabc2 7484 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7486 (eval $ac_try) 2>&5
7487 ac_status=$?
7488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7489 (exit $ac_status); }; } &&
7490 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7492 (eval $ac_try) 2>&5
7493 ac_status=$?
7494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7495 (exit $ac_status); }; }; then
7496 ac_cv_member_struct_ifreq_ifr_addr=yes
7497else
7498 echo "$as_me: failed program was:" >&5
7499sed 's/^/| /' conftest.$ac_ext >&5
7500
7501ac_cv_member_struct_ifreq_ifr_addr=no
7502fi
35996d22 7503rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7504fi
35996d22 7505rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7506fi
7507echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
7508echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6
7509if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
7510
7511cat >>confdefs.h <<_ACEOF
7512#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
7513_ACEOF
7514
7515
7516fi
7517
8799b3e4 7518
8799b3e4 7519
c0d27fcc 7520echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
7521echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
7522if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 7523 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7524echo "${ECHO_T}yes" >&6
7525
c0d27fcc 7526cat >>confdefs.h <<\_ACEOF
98418dba 7527#define PROTOTYPES 1
c0d27fcc
MR
7528_ACEOF
7529
7530
7531cat >>confdefs.h <<\_ACEOF
7532#define __PROTOTYPES 1
7533_ACEOF
98418dba
CW
7534
7535else
c0d27fcc 7536 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7537echo "${ECHO_T}no" >&6
7538fi
7539
c0d27fcc 7540echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
7541echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
7542if test "${ac_cv_c_volatile+set}" = set; then
7543 echo $ECHO_N "(cached) $ECHO_C" >&6
7544else
7545 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7546/* confdefs.h. */
7547_ACEOF
7548cat confdefs.h >>conftest.$ac_ext
7549cat >>conftest.$ac_ext <<_ACEOF
7550/* end confdefs.h. */
98418dba 7551
98418dba
CW
7552int
7553main ()
7554{
7555
7556volatile int x;
7557int * volatile y;
7558 ;
7559 return 0;
7560}
7561_ACEOF
7562rm -f conftest.$ac_objext
c0d27fcc 7563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7564 (eval $ac_compile) 2>conftest.er1
98418dba 7565 ac_status=$?
35996d22
AS
7566 grep -v '^ *+' conftest.er1 >conftest.err
7567 rm -f conftest.er1
7568 cat conftest.err >&5
c0d27fcc 7569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7570 (exit $ac_status); } &&
9adfabc2 7571 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7573 (eval $ac_try) 2>&5
7574 ac_status=$?
7575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7576 (exit $ac_status); }; } &&
7577 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7579 (eval $ac_try) 2>&5
7580 ac_status=$?
c0d27fcc 7581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7582 (exit $ac_status); }; }; then
7583 ac_cv_c_volatile=yes
7584else
7585 echo "$as_me: failed program was:" >&5
19650fd6
AS
7586sed 's/^/| /' conftest.$ac_ext >&5
7587
98418dba
CW
7588ac_cv_c_volatile=no
7589fi
35996d22 7590rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7591fi
c0d27fcc 7592echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
7593echo "${ECHO_T}$ac_cv_c_volatile" >&6
7594if test $ac_cv_c_volatile = no; then
7595
c0d27fcc 7596cat >>confdefs.h <<\_ACEOF
98418dba 7597#define volatile
c0d27fcc 7598_ACEOF
98418dba
CW
7599
7600fi
7601
c0d27fcc 7602echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
7603echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
7604if test "${ac_cv_c_const+set}" = set; then
7605 echo $ECHO_N "(cached) $ECHO_C" >&6
7606else
7607 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7608/* confdefs.h. */
7609_ACEOF
7610cat confdefs.h >>conftest.$ac_ext
7611cat >>conftest.$ac_ext <<_ACEOF
7612/* end confdefs.h. */
98418dba 7613
98418dba
CW
7614int
7615main ()
7616{
7617/* FIXME: Include the comments suggested by Paul. */
7618#ifndef __cplusplus
7619 /* Ultrix mips cc rejects this. */
7620 typedef int charset[2];
7621 const charset x;
7622 /* SunOS 4.1.1 cc rejects this. */
7623 char const *const *ccp;
7624 char **p;
7625 /* NEC SVR4.0.2 mips cc rejects this. */
7626 struct point {int x, y;};
7627 static struct point const zero = {0,0};
7628 /* AIX XL C 1.02.0.0 rejects this.
7629 It does not let you subtract one const X* pointer from another in
7630 an arm of an if-expression whose if-part is not a constant
7631 expression */
7632 const char *g = "string";
7633 ccp = &g + (g ? g-g : 0);
7634 /* HPUX 7.0 cc rejects these. */
7635 ++ccp;
7636 p = (char**) ccp;
7637 ccp = (char const *const *) p;
7638 { /* SCO 3.2v4 cc rejects this. */
7639 char *t;
7640 char const *s = 0 ? (char *) 0 : (char const *) 0;
7641
7642 *t++ = 0;
7643 }
7644 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
7645 int x[] = {25, 17};
7646 const int *foo = &x[0];
7647 ++foo;
7648 }
7649 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7650 typedef const int *iptr;
7651 iptr p = 0;
7652 ++p;
7653 }
7654 { /* AIX XL C 1.02.0.0 rejects this saying
7655 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7656 struct s { int j; const int *ap[3]; };
7657 struct s *b; b->j = 5;
7658 }
7659 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7660 const int foo = 10;
7661 }
7662#endif
7663
7664 ;
7665 return 0;
7666}
7667_ACEOF
7668rm -f conftest.$ac_objext
c0d27fcc 7669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7670 (eval $ac_compile) 2>conftest.er1
98418dba 7671 ac_status=$?
35996d22
AS
7672 grep -v '^ *+' conftest.er1 >conftest.err
7673 rm -f conftest.er1
7674 cat conftest.err >&5
c0d27fcc 7675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7676 (exit $ac_status); } &&
9adfabc2 7677 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7679 (eval $ac_try) 2>&5
7680 ac_status=$?
7681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7682 (exit $ac_status); }; } &&
7683 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7685 (eval $ac_try) 2>&5
7686 ac_status=$?
c0d27fcc 7687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7688 (exit $ac_status); }; }; then
7689 ac_cv_c_const=yes
7690else
7691 echo "$as_me: failed program was:" >&5
19650fd6
AS
7692sed 's/^/| /' conftest.$ac_ext >&5
7693
98418dba
CW
7694ac_cv_c_const=no
7695fi
35996d22 7696rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7697fi
c0d27fcc 7698echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
7699echo "${ECHO_T}$ac_cv_c_const" >&6
7700if test $ac_cv_c_const = no; then
7701
c0d27fcc 7702cat >>confdefs.h <<\_ACEOF
98418dba 7703#define const
c0d27fcc 7704_ACEOF
98418dba
CW
7705
7706fi
7707
c0d27fcc 7708echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
7709echo $ECHO_N "checking for void * support... $ECHO_C" >&6
7710if test "${emacs_cv_void_star+set}" = set; then
7711 echo $ECHO_N "(cached) $ECHO_C" >&6
7712else
7713 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7714/* confdefs.h. */
7715_ACEOF
7716cat confdefs.h >>conftest.$ac_ext
7717cat >>conftest.$ac_ext <<_ACEOF
7718/* end confdefs.h. */
98418dba 7719
98418dba
CW
7720int
7721main ()
7722{
7723void * foo;
7724 ;
7725 return 0;
7726}
7727_ACEOF
7728rm -f conftest.$ac_objext
c0d27fcc 7729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7730 (eval $ac_compile) 2>conftest.er1
98418dba 7731 ac_status=$?
35996d22
AS
7732 grep -v '^ *+' conftest.er1 >conftest.err
7733 rm -f conftest.er1
7734 cat conftest.err >&5
c0d27fcc 7735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7736 (exit $ac_status); } &&
9adfabc2 7737 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7739 (eval $ac_try) 2>&5
7740 ac_status=$?
7741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7742 (exit $ac_status); }; } &&
7743 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7745 (eval $ac_try) 2>&5
7746 ac_status=$?
c0d27fcc 7747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7748 (exit $ac_status); }; }; then
7749 emacs_cv_void_star=yes
7750else
7751 echo "$as_me: failed program was:" >&5
19650fd6
AS
7752sed 's/^/| /' conftest.$ac_ext >&5
7753
98418dba
CW
7754emacs_cv_void_star=no
7755fi
35996d22 7756rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7757fi
c0d27fcc 7758echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
7759echo "${ECHO_T}$emacs_cv_void_star" >&6
7760if test $emacs_cv_void_star = yes; then
c0d27fcc 7761 cat >>confdefs.h <<\_ACEOF
98418dba 7762#define POINTER_TYPE void
c0d27fcc 7763_ACEOF
98418dba
CW
7764
7765else
c0d27fcc 7766 cat >>confdefs.h <<\_ACEOF
98418dba 7767#define POINTER_TYPE char
c0d27fcc 7768_ACEOF
98418dba
CW
7769
7770fi
7771
c0d27fcc 7772
4494a266
JD
7773
7774
cd958eb3 7775
19650fd6
AS
7776echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7777echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
35996d22 7778set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
98418dba
CW
7779if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
7780 echo $ECHO_N "(cached) $ECHO_C" >&6
7781else
c0d27fcc 7782 cat >conftest.make <<\_ACEOF
98418dba 7783all:
19650fd6 7784 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 7785_ACEOF
98418dba
CW
7786# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7787eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
7788if test -n "$ac_maketemp"; then
7789 eval ac_cv_prog_make_${ac_make}_set=yes
7790else
7791 eval ac_cv_prog_make_${ac_make}_set=no
7792fi
7793rm -f conftest.make
7794fi
7795if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 7796 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7797echo "${ECHO_T}yes" >&6
7798 SET_MAKE=
7799else
c0d27fcc 7800 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7801echo "${ECHO_T}no" >&6
7802 SET_MAKE="MAKE=${MAKE-make}"
7803fi
7804
c0d27fcc
MR
7805
7806echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
7807echo $ECHO_N "checking for long file names... $ECHO_C" >&6
7808if test "${ac_cv_sys_long_file_names+set}" = set; then
7809 echo $ECHO_N "(cached) $ECHO_C" >&6
7810else
7811 ac_cv_sys_long_file_names=yes
7812# Test for long file names in all the places we know might matter:
7813# . the current directory, where building will happen
7814# $prefix/lib where we will be installing things
7815# $exec_prefix/lib likewise
7816# eval it to expand exec_prefix.
7817# $TMPDIR if set, where it might want to write temporary files
7818# if $TMPDIR is not set:
7819# /tmp where it might want to write temporary files
7820# /var/tmp likewise
7821# /usr/tmp likewise
7822if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
7823 ac_tmpdirs=$TMPDIR
7824else
7825 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
7826fi
7827for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
7828 test -d $ac_dir || continue
7829 test -w $ac_dir || continue # It is less confusing to not echo anything here.
7830 ac_xdir=$ac_dir/cf$$
7831 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
7832 ac_tf1=$ac_xdir/conftest9012345
7833 ac_tf2=$ac_xdir/conftest9012346
7834 (echo 1 >$ac_tf1) 2>/dev/null
7835 (echo 2 >$ac_tf2) 2>/dev/null
7836 ac_val=`cat $ac_tf1 2>/dev/null`
7837 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
7838 ac_cv_sys_long_file_names=no
7839 rm -rf $ac_xdir 2>/dev/null
7840 break
7841 fi
7842 rm -rf $ac_xdir 2>/dev/null
7843done
7844fi
c0d27fcc 7845echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
7846echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
7847if test $ac_cv_sys_long_file_names = yes; then
7848
c0d27fcc 7849cat >>confdefs.h <<\_ACEOF
98418dba 7850#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 7851_ACEOF
98418dba
CW
7852
7853fi
7854
c0d27fcc 7855
98418dba
CW
7856#### Choose a window system.
7857
c0d27fcc 7858echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
7859echo $ECHO_N "checking for X... $ECHO_C" >&6
7860
9adfabc2 7861ac_path_x_has_been_run=yes
c0d27fcc 7862
98418dba
CW
7863# Check whether --with-x or --without-x was given.
7864if test "${with_x+set}" = set; then
7865 withval="$with_x"
7866
7867fi;
7868# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7869if test "x$with_x" = xno; then
7870 # The user explicitly disabled X.
7871 have_x=disabled
7872else
7873 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
7874 # Both variables are already set.
7875 have_x=yes
7876 else
7877 if test "${ac_cv_have_x+set}" = set; then
7878 echo $ECHO_N "(cached) $ECHO_C" >&6
7879else
7880 # One or both of the vars are not set, and there is no cached value.
7881ac_x_includes=no ac_x_libraries=no
7882rm -fr conftest.dir
7883if mkdir conftest.dir; then
7884 cd conftest.dir
7885 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 7886 cat >Imakefile <<'_ACEOF'
98418dba
CW
7887acfindx:
7888 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 7889_ACEOF
98418dba
CW
7890 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
7891 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7892 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7893 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7894 for ac_extension in a so sl; do
7895 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
35996d22
AS
7896 test -f $ac_im_libdir/libX11.$ac_extension; then
7897 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
7898 fi
7899 done
7900 # Screen out bogus values from the imake configuration. They are
7901 # bogus both because they are the default anyway, and because
7902 # using them would break gcc on systems where it needs fixed includes.
7903 case $ac_im_incroot in
7904 /usr/include) ;;
7905 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7906 esac
7907 case $ac_im_usrlibdir in
7908 /usr/lib | /lib) ;;
7909 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7910 esac
7911 fi
7912 cd ..
7913 rm -fr conftest.dir
7914fi
7915
7916# Standard set of common directories for X headers.
7917# Check X11 before X11Rn because it is often a symlink to the current release.
7918ac_x_header_dirs='
7919/usr/X11/include
7920/usr/X11R6/include
7921/usr/X11R5/include
7922/usr/X11R4/include
7923
7924/usr/include/X11
7925/usr/include/X11R6
7926/usr/include/X11R5
7927/usr/include/X11R4
7928
7929/usr/local/X11/include
7930/usr/local/X11R6/include
7931/usr/local/X11R5/include
7932/usr/local/X11R4/include
7933
7934/usr/local/include/X11
7935/usr/local/include/X11R6
7936/usr/local/include/X11R5
7937/usr/local/include/X11R4
7938
7939/usr/X386/include
7940/usr/x386/include
7941/usr/XFree86/include/X11
7942
7943/usr/include
7944/usr/local/include
7945/usr/unsupported/include
7946/usr/athena/include
7947/usr/local/x11r5/include
7948/usr/lpp/Xamples/include
7949
7950/usr/openwin/include
7951/usr/openwin/share/include'
7952
7953if test "$ac_x_includes" = no; then
9adfabc2 7954 # Guess where to find include files, by looking for a specified header file.
98418dba
CW
7955 # First, try using that file with no special directory specified.
7956 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7957/* confdefs.h. */
7958_ACEOF
7959cat confdefs.h >>conftest.$ac_ext
7960cat >>conftest.$ac_ext <<_ACEOF
7961/* end confdefs.h. */
98418dba
CW
7962#include <X11/Intrinsic.h>
7963_ACEOF
c0d27fcc 7964if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7965 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7966 ac_status=$?
6bae0ccf 7967 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
7968 rm -f conftest.er1
7969 cat conftest.err >&5
c0d27fcc 7970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7971 (exit $ac_status); } >/dev/null; then
7972 if test -s conftest.err; then
7973 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 7974 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
7975 else
7976 ac_cpp_err=
7977 fi
7978else
7979 ac_cpp_err=yes
7980fi
7981if test -z "$ac_cpp_err"; then
7982 # We can compile using X headers with no special include directory.
7983ac_x_includes=
7984else
7985 echo "$as_me: failed program was:" >&5
19650fd6
AS
7986sed 's/^/| /' conftest.$ac_ext >&5
7987
98418dba
CW
7988 for ac_dir in $ac_x_header_dirs; do
7989 if test -r "$ac_dir/X11/Intrinsic.h"; then
7990 ac_x_includes=$ac_dir
7991 break
7992 fi
7993done
7994fi
7995rm -f conftest.err conftest.$ac_ext
7996fi # $ac_x_includes = no
7997
7998if test "$ac_x_libraries" = no; then
7999 # Check for the libraries.
8000 # See if we find them without any special options.
8001 # Don't add to $LIBS permanently.
8002 ac_save_LIBS=$LIBS
8003 LIBS="-lXt $LIBS"
8004 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8005/* confdefs.h. */
8006_ACEOF
8007cat confdefs.h >>conftest.$ac_ext
8008cat >>conftest.$ac_ext <<_ACEOF
8009/* end confdefs.h. */
98418dba 8010#include <X11/Intrinsic.h>
98418dba
CW
8011int
8012main ()
8013{
8014XtMalloc (0)
8015 ;
8016 return 0;
8017}
8018_ACEOF
8019rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8020if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8021 (eval $ac_link) 2>conftest.er1
98418dba 8022 ac_status=$?
35996d22
AS
8023 grep -v '^ *+' conftest.er1 >conftest.err
8024 rm -f conftest.er1
8025 cat conftest.err >&5
c0d27fcc 8026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8027 (exit $ac_status); } &&
9adfabc2 8028 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
8029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8030 (eval $ac_try) 2>&5
8031 ac_status=$?
8032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8033 (exit $ac_status); }; } &&
8034 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8036 (eval $ac_try) 2>&5
8037 ac_status=$?
c0d27fcc 8038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8039 (exit $ac_status); }; }; then
8040 LIBS=$ac_save_LIBS
8041# We can link X programs with no special library path.
8042ac_x_libraries=
8043else
8044 echo "$as_me: failed program was:" >&5
19650fd6
AS
8045sed 's/^/| /' conftest.$ac_ext >&5
8046
98418dba
CW
8047LIBS=$ac_save_LIBS
8048for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8049do
8050 # Don't even attempt the hair of trying to link an X program!
8051 for ac_extension in a so sl; do
8052 if test -r $ac_dir/libXt.$ac_extension; then
8053 ac_x_libraries=$ac_dir
8054 break 2
8055 fi
8056 done
8057done
8058fi
35996d22
AS
8059rm -f conftest.err conftest.$ac_objext \
8060 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8061fi # $ac_x_libraries = no
8062
8063if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8064 # Didn't find X anywhere. Cache the known absence of X.
8065 ac_cv_have_x="have_x=no"
8066else
8067 # Record where we found X for the cache.
8068 ac_cv_have_x="have_x=yes \
35996d22 8069 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
98418dba
CW
8070fi
8071fi
8072
8073 fi
8074 eval "$ac_cv_have_x"
8075fi # $with_x != no
8076
8077if test "$have_x" != yes; then
c0d27fcc 8078 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
8079echo "${ECHO_T}$have_x" >&6
8080 no_x=yes
8081else
8082 # If each of the values was on the command line, it overrides each guess.
8083 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8084 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8085 # Update the cache value to reflect the command line values.
8086 ac_cv_have_x="have_x=yes \
8087 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9adfabc2
LK
8088 # It might be that x_includes is empty (headers are found in the
8089 # standard search path. Then output the corresponding message
8090 ac_out_x_includes=$x_includes
8091 test "x$x_includes" = x && ac_out_x_includes="in standard search path"
8092 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $ac_out_x_includes" >&5
8093echo "${ECHO_T}libraries $x_libraries, headers $ac_out_x_includes" >&6
98418dba
CW
8094fi
8095
8096if test "$no_x" = yes; then
8097 window_system=none
8098else
8099 window_system=x11
8100fi
8101
8102if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8103 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
8104 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
8105 x_default_search_path=""
8106 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
8107 x_search_path="\
8108${x_library}/X11/%L/%T/%N%C%S:\
8109${x_library}/X11/%l/%T/%N%C%S:\
8110${x_library}/X11/%T/%N%C%S:\
8111${x_library}/X11/%L/%T/%N%S:\
8112${x_library}/X11/%l/%T/%N%S:\
8113${x_library}/X11/%T/%N%S"
8114 if test x"${x_default_search_path}" = x; then
8115 x_default_search_path=${x_search_path}
8116 else
8117 x_default_search_path="${x_search_path}:${x_default_search_path}"
8118 fi
8119 done
8120fi
8121if test "${x_includes}" != NONE && test -n "${x_includes}"; then
8122 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
8123fi
8124
8125if test x"${x_includes}" = x; then
8126 bitmapdir=/usr/include/X11/bitmaps
8127else
8128 # accumulate include directories that have X11 bitmap subdirectories
8129 bmd_acc="dummyval"
8130 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
8131 if test -d "${bmd}/X11/bitmaps"; then
8132 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
8133 fi
8134 if test -d "${bmd}/bitmaps"; then
8135 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
8136 fi
8137 done
8138 if test ${bmd_acc} != "dummyval"; then
8139 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
8140 fi
8141fi
8142
8143case "${window_system}" in
8144 x11 )
8145 HAVE_X_WINDOWS=yes
8146 HAVE_X11=yes
8147 case "${with_x_toolkit}" in
8148 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
8149 motif ) USE_X_TOOLKIT=MOTIF ;;
488dd4c4
JD
8150 gtk ) with_gtk=yes
8151 USE_X_TOOLKIT=none ;;
98418dba
CW
8152 no ) USE_X_TOOLKIT=none ;;
8153 * ) USE_X_TOOLKIT=maybe ;;
8154 esac
8155 ;;
8156 none )
8157 HAVE_X_WINDOWS=no
8158 HAVE_X11=no
8159 USE_X_TOOLKIT=none
8160 ;;
8161esac
8162
8163### If we're using X11, we should use the X menu package.
8164HAVE_MENUS=no
8165case ${HAVE_X11} in
8166 yes ) HAVE_MENUS=yes ;;
8167esac
8168
8169if test "${opsys}" = "hpux9"; then
8170 case "${x_libraries}" in
8171 *X11R4* )
8172 opsysfile="s/hpux9-x11r4.h"
8173 ;;
8174 esac
8175fi
8176
8177if test "${opsys}" = "hpux9shr"; then
8178 case "${x_libraries}" in
8179 *X11R4* )
8180 opsysfile="s/hpux9shxr4.h"
8181 ;;
8182 esac
8183fi
8184
5d6da11e
YM
8185HAVE_CARBON=no
8186if test "${HAVE_X11}" != "yes"; then
8187 if test "${with_carbon}" != "no"; then
8188 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8189 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
8190echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
8191if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8192 echo $ECHO_N "(cached) $ECHO_C" >&6
8193fi
8194echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
8195echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
8196else
8197 # Is the header compilable?
8198echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
8199echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
8200cat >conftest.$ac_ext <<_ACEOF
8201/* confdefs.h. */
8202_ACEOF
8203cat confdefs.h >>conftest.$ac_ext
8204cat >>conftest.$ac_ext <<_ACEOF
8205/* end confdefs.h. */
8206$ac_includes_default
8207#include <Carbon/Carbon.h>
8208_ACEOF
8209rm -f conftest.$ac_objext
8210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8211 (eval $ac_compile) 2>conftest.er1
8212 ac_status=$?
8213 grep -v '^ *+' conftest.er1 >conftest.err
8214 rm -f conftest.er1
8215 cat conftest.err >&5
8216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8217 (exit $ac_status); } &&
9adfabc2 8218 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5d6da11e
YM
8219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8220 (eval $ac_try) 2>&5
8221 ac_status=$?
8222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8223 (exit $ac_status); }; } &&
8224 { ac_try='test -s conftest.$ac_objext'
8225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8226 (eval $ac_try) 2>&5
8227 ac_status=$?
8228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8229 (exit $ac_status); }; }; then
8230 ac_header_compiler=yes
8231else
8232 echo "$as_me: failed program was:" >&5
8233sed 's/^/| /' conftest.$ac_ext >&5
8234
8235ac_header_compiler=no
8236fi
8237rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8238echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8239echo "${ECHO_T}$ac_header_compiler" >&6
8240
8241# Is the header present?
8242echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
8243echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
8244cat >conftest.$ac_ext <<_ACEOF
8245/* confdefs.h. */
8246_ACEOF
8247cat confdefs.h >>conftest.$ac_ext
8248cat >>conftest.$ac_ext <<_ACEOF
8249/* end confdefs.h. */
8250#include <Carbon/Carbon.h>
8251_ACEOF
8252if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8253 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8254 ac_status=$?
8255 grep -v '^ *+' conftest.er1 >conftest.err
8256 rm -f conftest.er1
8257 cat conftest.err >&5
8258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8259 (exit $ac_status); } >/dev/null; then
8260 if test -s conftest.err; then
8261 ac_cpp_err=$ac_c_preproc_warn_flag
8262 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8263 else
8264 ac_cpp_err=
8265 fi
8266else
8267 ac_cpp_err=yes
8268fi
8269if test -z "$ac_cpp_err"; then
8270 ac_header_preproc=yes
8271else
8272 echo "$as_me: failed program was:" >&5
8273sed 's/^/| /' conftest.$ac_ext >&5
8274
8275 ac_header_preproc=no
8276fi
8277rm -f conftest.err conftest.$ac_ext
8278echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8279echo "${ECHO_T}$ac_header_preproc" >&6
8280
8281# So? What about this header?
8282case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8283 yes:no: )
8284 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
8285echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8286 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
8287echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
8288 ac_header_preproc=yes
8289 ;;
8290 no:yes:* )
8291 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
8292echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
8293 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
8294echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
8295 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
8296echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
8297 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
8298echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
8299 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
8300echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
8301 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
8302echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
8303 (
8304 cat <<\_ASBOX
8305## ------------------------------------------ ##
8306## Report this to the AC_PACKAGE_NAME lists. ##
8307## ------------------------------------------ ##
8308_ASBOX
8309 ) |
8310 sed "s/^/$as_me: WARNING: /" >&2
8311 ;;
8312esac
8313echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
8314echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
8315if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8316 echo $ECHO_N "(cached) $ECHO_C" >&6
8317else
8318 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
8319fi
8320echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
8321echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
8322
8323fi
8324if test $ac_cv_header_Carbon_Carbon_h = yes; then
8325 HAVE_CARBON=yes
8326fi
8327
8328
8329 fi
8330fi
8331
98418dba
CW
8332### Compute the unexec source name from the object name.
8333UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
8334
8335# Do the opsystem or machine files prohibit the use of the GNU malloc?
8336# Assume not, until told otherwise.
8337GNU_MALLOC=yes
8338doug_lea_malloc=yes
c0d27fcc 8339echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
8340echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
8341if test "${ac_cv_func_malloc_get_state+set}" = set; then
8342 echo $ECHO_N "(cached) $ECHO_C" >&6
8343else
8344 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8345/* confdefs.h. */
8346_ACEOF
8347cat confdefs.h >>conftest.$ac_ext
8348cat >>conftest.$ac_ext <<_ACEOF
8349/* end confdefs.h. */
35996d22
AS
8350/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
8351 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8352#define malloc_get_state innocuous_malloc_get_state
8353
98418dba 8354/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8355 which can conflict with char malloc_get_state (); below.
8356 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8357 <limits.h> exists even on freestanding compilers. */
35996d22 8358
19650fd6
AS
8359#ifdef __STDC__
8360# include <limits.h>
8361#else
8362# include <assert.h>
8363#endif
35996d22
AS
8364
8365#undef malloc_get_state
8366
98418dba
CW
8367/* Override any gcc2 internal prototype to avoid an error. */
8368#ifdef __cplusplus
8369extern "C"
19650fd6 8370{
98418dba
CW
8371#endif
8372/* We use char because int might match the return type of a gcc2
8373 builtin and then its argument prototype would still apply. */
8374char malloc_get_state ();
98418dba
CW
8375/* The GNU C library defines this for functions which it implements
8376 to always fail with ENOSYS. Some functions are actually named
8377 something starting with __ and the normal name is an alias. */
8378#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
8379choke me
8380#else
19650fd6
AS
8381char (*f) () = malloc_get_state;
8382#endif
8383#ifdef __cplusplus
8384}
98418dba
CW
8385#endif
8386
19650fd6
AS
8387int
8388main ()
8389{
8390return f != malloc_get_state;
98418dba
CW
8391 ;
8392 return 0;
8393}
8394_ACEOF
8395rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8396if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8397 (eval $ac_link) 2>conftest.er1
98418dba 8398 ac_status=$?
35996d22
AS
8399 grep -v '^ *+' conftest.er1 >conftest.err
8400 rm -f conftest.er1
8401 cat conftest.err >&5
c0d27fcc 8402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8403 (exit $ac_status); } &&
9adfabc2 8404 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
8405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8406 (eval $ac_try) 2>&5
8407 ac_status=$?
8408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8409 (exit $ac_status); }; } &&
8410 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8412 (eval $ac_try) 2>&5
8413 ac_status=$?
c0d27fcc 8414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8415 (exit $ac_status); }; }; then
8416 ac_cv_func_malloc_get_state=yes
8417else
8418 echo "$as_me: failed program was:" >&5
19650fd6
AS
8419sed 's/^/| /' conftest.$ac_ext >&5
8420
98418dba
CW
8421ac_cv_func_malloc_get_state=no
8422fi
35996d22
AS
8423rm -f conftest.err conftest.$ac_objext \
8424 conftest$ac_exeext conftest.$ac_ext
98418dba 8425fi
c0d27fcc 8426echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
8427echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
8428if test $ac_cv_func_malloc_get_state = yes; then
8429 :
8430else
8431 doug_lea_malloc=no
8432fi
8433
c0d27fcc 8434echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
8435echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
8436if test "${ac_cv_func_malloc_set_state+set}" = set; then
8437 echo $ECHO_N "(cached) $ECHO_C" >&6
8438else
8439 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8440/* confdefs.h. */
8441_ACEOF
8442cat confdefs.h >>conftest.$ac_ext
8443cat >>conftest.$ac_ext <<_ACEOF
8444/* end confdefs.h. */
35996d22
AS
8445/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
8446 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8447#define malloc_set_state innocuous_malloc_set_state
8448
98418dba 8449/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8450 which can conflict with char malloc_set_state (); below.
8451 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8452 <limits.h> exists even on freestanding compilers. */
35996d22 8453
19650fd6
AS
8454#ifdef __STDC__
8455# include <limits.h>
8456#else
8457# include <assert.h>
8458#endif
35996d22
AS
8459
8460#undef malloc_set_state
8461
98418dba
CW
8462/* Override any gcc2 internal prototype to avoid an error. */
8463#ifdef __cplusplus
8464extern "C"
19650fd6 8465{
98418dba
CW
8466#endif
8467/* We use char because int might match the return type of a gcc2
8468 builtin and then its argument prototype would still apply. */
8469char malloc_set_state ();
98418dba
CW
8470/* The GNU C library defines this for functions which it implements
8471 to always fail with ENOSYS. Some functions are actually named
8472 something starting with __ and the normal name is an alias. */
8473#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
8474choke me
8475#else
19650fd6
AS
8476char (*f) () = malloc_set_state;
8477#endif
8478#ifdef __cplusplus
8479}
98418dba
CW
8480#endif
8481
19650fd6
AS
8482int
8483main ()
8484{
8485return f != malloc_set_state;
98418dba
CW
8486 ;
8487 return 0;
8488}
8489_ACEOF
8490rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8491if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8492 (eval $ac_link) 2>conftest.er1
98418dba 8493 ac_status=$?
35996d22
AS
8494 grep -v '^ *+' conftest.er1 >conftest.err
8495 rm -f conftest.er1
8496 cat conftest.err >&5
c0d27fcc 8497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8498 (exit $ac_status); } &&
9adfabc2 8499 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
8500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8501 (eval $ac_try) 2>&5
8502 ac_status=$?
8503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8504 (exit $ac_status); }; } &&
8505 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8507 (eval $ac_try) 2>&5
8508 ac_status=$?
c0d27fcc 8509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8510 (exit $ac_status); }; }; then
8511 ac_cv_func_malloc_set_state=yes
8512else
8513 echo "$as_me: failed program was:" >&5
19650fd6
AS
8514sed 's/^/| /' conftest.$ac_ext >&5
8515
98418dba
CW
8516ac_cv_func_malloc_set_state=no
8517fi
35996d22
AS
8518rm -f conftest.err conftest.$ac_objext \
8519 conftest$ac_exeext conftest.$ac_ext
98418dba 8520fi
c0d27fcc 8521echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
8522echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
8523if test $ac_cv_func_malloc_set_state = yes; then
8524 :
8525else
8526 doug_lea_malloc=no
8527fi
8528
c0d27fcc 8529echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
8530echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
8531if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
8532 echo $ECHO_N "(cached) $ECHO_C" >&6
8533else
8534 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8535/* confdefs.h. */
8536_ACEOF
8537cat confdefs.h >>conftest.$ac_ext
8538cat >>conftest.$ac_ext <<_ACEOF
8539/* end confdefs.h. */
98418dba 8540extern void (* __after_morecore_hook)();
98418dba
CW
8541int
8542main ()
8543{
8544__after_morecore_hook = 0
8545 ;
8546 return 0;
8547}
8548_ACEOF
8549rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8551 (eval $ac_link) 2>conftest.er1
98418dba 8552 ac_status=$?
35996d22
AS
8553 grep -v '^ *+' conftest.er1 >conftest.err
8554 rm -f conftest.er1
8555 cat conftest.err >&5
c0d27fcc 8556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8557 (exit $ac_status); } &&
9adfabc2 8558 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
8559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8560 (eval $ac_try) 2>&5
8561 ac_status=$?
8562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8563 (exit $ac_status); }; } &&
8564 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8566 (eval $ac_try) 2>&5
8567 ac_status=$?
c0d27fcc 8568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8569 (exit $ac_status); }; }; then
8570 emacs_cv_var___after_morecore_hook=yes
8571else
8572 echo "$as_me: failed program was:" >&5
19650fd6
AS
8573sed 's/^/| /' conftest.$ac_ext >&5
8574
98418dba
CW
8575emacs_cv_var___after_morecore_hook=no
8576fi
35996d22
AS
8577rm -f conftest.err conftest.$ac_objext \
8578 conftest$ac_exeext conftest.$ac_ext
98418dba 8579fi
c0d27fcc 8580echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
8581echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
8582if test $emacs_cv_var___after_morecore_hook = no; then
8583 doug_lea_malloc=no
8584fi
8585if test "${system_malloc}" = "yes"; then
8586 GNU_MALLOC=no
8587 GNU_MALLOC_reason="
8588 (The GNU allocators don't work with this system configuration.)"
8589fi
8590if test "$doug_lea_malloc" = "yes" ; then
8591 if test "$GNU_MALLOC" = yes ; then
8592 GNU_MALLOC_reason="
8593 (Using Doug Lea's new malloc from the GNU C Library.)"
8594 fi
b936fae4 8595
c0d27fcc 8596cat >>confdefs.h <<\_ACEOF
98418dba 8597#define DOUG_LEA_MALLOC 1
c0d27fcc 8598_ACEOF
98418dba
CW
8599
8600fi
8601
8602if test x"${REL_ALLOC}" = x; then
8603 REL_ALLOC=${GNU_MALLOC}
8604fi
8605
8606
c0d27fcc
MR
8607
8608
8609for ac_header in stdlib.h unistd.h
98418dba
CW
8610do
8611as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
8612if eval "test \"\${$as_ac_Header+set}\" = set"; then
8613 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
8614echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8615if eval "test \"\${$as_ac_Header+set}\" = set"; then
8616 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
8617fi
8618echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8619echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 8620else
c0d27fcc
MR
8621 # Is the header compilable?
8622echo "$as_me:$LINENO: checking $ac_header usability" >&5
8623echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8624cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8625/* confdefs.h. */
8626_ACEOF
8627cat confdefs.h >>conftest.$ac_ext
8628cat >>conftest.$ac_ext <<_ACEOF
8629/* end confdefs.h. */
98418dba
CW
8630$ac_includes_default
8631#include <$ac_header>
8632_ACEOF
8633rm -f conftest.$ac_objext
c0d27fcc 8634if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 8635 (eval $ac_compile) 2>conftest.er1
98418dba 8636 ac_status=$?
35996d22
AS
8637 grep -v '^ *+' conftest.er1 >conftest.err
8638 rm -f conftest.er1
8639 cat conftest.err >&5
c0d27fcc 8640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8641 (exit $ac_status); } &&
9adfabc2 8642 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
8643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8644 (eval $ac_try) 2>&5
8645 ac_status=$?
8646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8647 (exit $ac_status); }; } &&
8648 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8650 (eval $ac_try) 2>&5
8651 ac_status=$?
c0d27fcc 8652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8653 (exit $ac_status); }; }; then
c0d27fcc 8654 ac_header_compiler=yes
98418dba
CW
8655else
8656 echo "$as_me: failed program was:" >&5
19650fd6
AS
8657sed 's/^/| /' conftest.$ac_ext >&5
8658
c0d27fcc 8659ac_header_compiler=no
98418dba 8660fi
35996d22 8661rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
8662echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8663echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 8664
c0d27fcc
MR
8665# Is the header present?
8666echo "$as_me:$LINENO: checking $ac_header presence" >&5
8667echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8668cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8669/* confdefs.h. */
8670_ACEOF
8671cat confdefs.h >>conftest.$ac_ext
8672cat >>conftest.$ac_ext <<_ACEOF
8673/* end confdefs.h. */
98418dba
CW
8674#include <$ac_header>
8675_ACEOF
c0d27fcc 8676if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8677 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8678 ac_status=$?
6bae0ccf 8679 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8680 rm -f conftest.er1
8681 cat conftest.err >&5
c0d27fcc 8682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8683 (exit $ac_status); } >/dev/null; then
8684 if test -s conftest.err; then
8685 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 8686 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8687 else
8688 ac_cpp_err=
8689 fi
8690else
8691 ac_cpp_err=yes
8692fi
8693if test -z "$ac_cpp_err"; then
c0d27fcc 8694 ac_header_preproc=yes
98418dba
CW
8695else
8696 echo "$as_me: failed program was:" >&5
19650fd6
AS
8697sed 's/^/| /' conftest.$ac_ext >&5
8698
c0d27fcc 8699 ac_header_preproc=no
98418dba
CW
8700fi
8701rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
8702echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8703echo "${ECHO_T}$ac_header_preproc" >&6
8704
8705# So? What about this header?
35996d22
AS
8706case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8707 yes:no: )
c0d27fcc
MR
8708 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8709echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
8710 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8711echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8712 ac_header_preproc=yes
19650fd6 8713 ;;
35996d22 8714 no:yes:* )
c0d27fcc
MR
8715 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8716echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
8717 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8718echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8719 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8720echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8721 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8722echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 8723 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 8724echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
8725 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8726echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
8727 (
8728 cat <<\_ASBOX
35996d22
AS
8729## ------------------------------------------ ##
8730## Report this to the AC_PACKAGE_NAME lists. ##
8731## ------------------------------------------ ##
19650fd6
AS
8732_ASBOX
8733 ) |
8734 sed "s/^/$as_me: WARNING: /" >&2
8735 ;;
c0d27fcc
MR
8736esac
8737echo "$as_me:$LINENO: checking for $ac_header" >&5
8738echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8739if eval "test \"\${$as_ac_Header+set}\" = set"; then
8740 echo $ECHO_N "(cached) $ECHO_C" >&6
8741else
35996d22 8742 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 8743fi
c0d27fcc 8744echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 8745echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
8746
8747fi
98418dba 8748if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 8749 cat >>confdefs.h <<_ACEOF
98418dba 8750#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 8751_ACEOF
98418dba
CW
8752
8753fi
c0d27fcc 8754
98418dba
CW
8755done
8756
c0d27fcc 8757
98418dba
CW
8758for ac_func in getpagesize
8759do
8760as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 8761echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
8762echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8763if eval "test \"\${$as_ac_var+set}\" = set"; then
8764 echo $ECHO_N "(cached) $ECHO_C" >&6
8765else
8766 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8767/* confdefs.h. */
8768_ACEOF
8769cat confdefs.h >>conftest.$ac_ext
8770cat >>conftest.$ac_ext <<_ACEOF
8771/* end confdefs.h. */
35996d22
AS
8772/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8773 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8774#define $ac_func innocuous_$ac_func
8775
98418dba 8776/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8777 which can conflict with char $ac_func (); below.
8778 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8779 <limits.h> exists even on freestanding compilers. */
35996d22 8780
19650fd6
AS
8781#ifdef __STDC__
8782# include <limits.h>
8783#else
8784# include <assert.h>
8785#endif
35996d22
AS
8786
8787#undef $ac_func
8788
98418dba
CW
8789/* Override any gcc2 internal prototype to avoid an error. */
8790#ifdef __cplusplus
8791extern "C"
19650fd6 8792{
98418dba
CW
8793#endif
8794/* We use char because int might match the return type of a gcc2
8795 builtin and then its argument prototype would still apply. */
8796char $ac_func ();
98418dba
CW
8797/* The GNU C library defines this for functions which it implements
8798 to always fail with ENOSYS. Some functions are actually named
8799 something starting with __ and the normal name is an alias. */
8800#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8801choke me
8802#else
19650fd6
AS
8803char (*f) () = $ac_func;
8804#endif
8805#ifdef __cplusplus
8806}
98418dba
CW
8807#endif
8808
19650fd6
AS
8809int
8810main ()
8811{
8812return f != $ac_func;
98418dba
CW
8813 ;
8814 return 0;
8815}
8816_ACEOF
8817rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8818if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8819 (eval $ac_link) 2>conftest.er1
98418dba 8820 ac_status=$?
35996d22
AS
8821 grep -v '^ *+' conftest.er1 >conftest.err
8822 rm -f conftest.er1
8823 cat conftest.err >&5
c0d27fcc 8824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8825 (exit $ac_status); } &&
9adfabc2 8826 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
8827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8828 (eval $ac_try) 2>&5
8829 ac_status=$?
8830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8831 (exit $ac_status); }; } &&
8832 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8834 (eval $ac_try) 2>&5
8835 ac_status=$?
c0d27fcc 8836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8837 (exit $ac_status); }; }; then
8838 eval "$as_ac_var=yes"
8839else
8840 echo "$as_me: failed program was:" >&5
19650fd6
AS
8841sed 's/^/| /' conftest.$ac_ext >&5
8842
98418dba
CW
8843eval "$as_ac_var=no"
8844fi
35996d22
AS
8845rm -f conftest.err conftest.$ac_objext \
8846 conftest$ac_exeext conftest.$ac_ext
98418dba 8847fi
c0d27fcc 8848echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
8849echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8850if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 8851 cat >>confdefs.h <<_ACEOF
98418dba 8852#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 8853_ACEOF
98418dba
CW
8854
8855fi
8856done
8857
c0d27fcc 8858echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
8859echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
8860if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8861 echo $ECHO_N "(cached) $ECHO_C" >&6
8862else
8863 if test "$cross_compiling" = yes; then
8864 ac_cv_func_mmap_fixed_mapped=no
8865else
8866 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8867/* confdefs.h. */
8868_ACEOF
8869cat confdefs.h >>conftest.$ac_ext
8870cat >>conftest.$ac_ext <<_ACEOF
8871/* end confdefs.h. */
98418dba 8872$ac_includes_default
c0d27fcc
MR
8873/* malloc might have been renamed as rpl_malloc. */
8874#undef malloc
8875
98418dba
CW
8876/* Thanks to Mike Haertel and Jim Avera for this test.
8877 Here is a matrix of mmap possibilities:
8878 mmap private not fixed
8879 mmap private fixed at somewhere currently unmapped
8880 mmap private fixed at somewhere already mapped
8881 mmap shared not fixed
8882 mmap shared fixed at somewhere currently unmapped
8883 mmap shared fixed at somewhere already mapped
8884 For private mappings, we should verify that changes cannot be read()
8885 back from the file, nor mmap's back from the file at a different
8886 address. (There have been systems where private was not correctly
8887 implemented like the infamous i386 svr4.0, and systems where the
8888 VM page cache was not coherent with the file system buffer cache
8889 like early versions of FreeBSD and possibly contemporary NetBSD.)
8890 For shared mappings, we should conversely verify that changes get
c0d27fcc 8891 propagated back to all the places they're supposed to be.
98418dba
CW
8892
8893 Grep wants private fixed already mapped.
8894 The main things grep needs to know about mmap are:
8895 * does it exist and is it safe to write into the mmap'd area
8896 * how to use it (BSD variants) */
8897
8898#include <fcntl.h>
8899#include <sys/mman.h>
8900
8901#if !STDC_HEADERS && !HAVE_STDLIB_H
8902char *malloc ();
8903#endif
8904
8905/* This mess was copied from the GNU getpagesize.h. */
8906#if !HAVE_GETPAGESIZE
8907/* Assume that all systems that can run configure have sys/param.h. */
8908# if !HAVE_SYS_PARAM_H
8909# define HAVE_SYS_PARAM_H 1
8910# endif
8911
8912# ifdef _SC_PAGESIZE
8913# define getpagesize() sysconf(_SC_PAGESIZE)
8914# else /* no _SC_PAGESIZE */
8915# if HAVE_SYS_PARAM_H
8916# include <sys/param.h>
8917# ifdef EXEC_PAGESIZE
8918# define getpagesize() EXEC_PAGESIZE
8919# else /* no EXEC_PAGESIZE */
8920# ifdef NBPG
8921# define getpagesize() NBPG * CLSIZE
8922# ifndef CLSIZE
8923# define CLSIZE 1
8924# endif /* no CLSIZE */
8925# else /* no NBPG */
8926# ifdef NBPC
8927# define getpagesize() NBPC
8928# else /* no NBPC */
8929# ifdef PAGESIZE
8930# define getpagesize() PAGESIZE
8931# endif /* PAGESIZE */
8932# endif /* no NBPC */
8933# endif /* no NBPG */
8934# endif /* no EXEC_PAGESIZE */
8935# else /* no HAVE_SYS_PARAM_H */
8936# define getpagesize() 8192 /* punt totally */
8937# endif /* no HAVE_SYS_PARAM_H */
8938# endif /* no _SC_PAGESIZE */
8939
8940#endif /* no HAVE_GETPAGESIZE */
8941
8942int
8943main ()
8944{
8945 char *data, *data2, *data3;
8946 int i, pagesize;
8947 int fd;
8948
8949 pagesize = getpagesize ();
8950
8951 /* First, make a file with some known garbage in it. */
8952 data = (char *) malloc (pagesize);
8953 if (!data)
8954 exit (1);
8955 for (i = 0; i < pagesize; ++i)
8956 *(data + i) = rand ();
8957 umask (0);
8958 fd = creat ("conftest.mmap", 0600);
8959 if (fd < 0)
8960 exit (1);
8961 if (write (fd, data, pagesize) != pagesize)
8962 exit (1);
8963 close (fd);
8964
8965 /* Next, try to mmap the file at a fixed address which already has
8966 something else allocated at it. If we can, also make sure that
8967 we see the same garbage. */
8968 fd = open ("conftest.mmap", O_RDWR);
8969 if (fd < 0)
8970 exit (1);
8971 data2 = (char *) malloc (2 * pagesize);
8972 if (!data2)
8973 exit (1);
35996d22 8974 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 8975 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
35996d22 8976 MAP_PRIVATE | MAP_FIXED, fd, 0L))
98418dba
CW
8977 exit (1);
8978 for (i = 0; i < pagesize; ++i)
8979 if (*(data + i) != *(data2 + i))
8980 exit (1);
8981
8982 /* Finally, make sure that changes to the mapped area do not
8983 percolate back to the file as seen by read(). (This is a bug on
8984 some variants of i386 svr4.0.) */
8985 for (i = 0; i < pagesize; ++i)
8986 *(data2 + i) = *(data2 + i) + 1;
8987 data3 = (char *) malloc (pagesize);
8988 if (!data3)
8989 exit (1);
8990 if (read (fd, data3, pagesize) != pagesize)
8991 exit (1);
8992 for (i = 0; i < pagesize; ++i)
8993 if (*(data + i) != *(data3 + i))
8994 exit (1);
8995 close (fd);
8996 exit (0);
8997}
8998_ACEOF
8999rm -f conftest$ac_exeext
c0d27fcc 9000if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
9001 (eval $ac_link) 2>&5
9002 ac_status=$?
c0d27fcc 9003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9004 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 9005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9006 (eval $ac_try) 2>&5
9007 ac_status=$?
c0d27fcc 9008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9009 (exit $ac_status); }; }; then
9010 ac_cv_func_mmap_fixed_mapped=yes
9011else
9012 echo "$as_me: program exited with status $ac_status" >&5
9013echo "$as_me: failed program was:" >&5
19650fd6
AS
9014sed 's/^/| /' conftest.$ac_ext >&5
9015
c0d27fcc 9016( exit $ac_status )
98418dba
CW
9017ac_cv_func_mmap_fixed_mapped=no
9018fi
35996d22 9019rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
9020fi
9021fi
c0d27fcc 9022echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
9023echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
9024if test $ac_cv_func_mmap_fixed_mapped = yes; then
9025
c0d27fcc 9026cat >>confdefs.h <<\_ACEOF
98418dba 9027#define HAVE_MMAP 1
c0d27fcc 9028_ACEOF
98418dba
CW
9029
9030fi
9031rm -f conftest.mmap
9032
9033if test $use_mmap_for_buffers = yes; then
9034 REL_ALLOC=no
9035fi
9036
9037LIBS="$libsrc_libs $LIBS"
9038
c0d27fcc
MR
9039
9040echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
9041echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9042if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9043 echo $ECHO_N "(cached) $ECHO_C" >&6
9044else
9045 ac_check_lib_save_LIBS=$LIBS
9046LIBS="-ldnet $LIBS"
9047cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9048/* confdefs.h. */
9049_ACEOF
9050cat confdefs.h >>conftest.$ac_ext
9051cat >>conftest.$ac_ext <<_ACEOF
9052/* end confdefs.h. */
98418dba
CW
9053
9054/* Override any gcc2 internal prototype to avoid an error. */
9055#ifdef __cplusplus
9056extern "C"
9057#endif
9058/* We use char because int might match the return type of a gcc2
9059 builtin and then its argument prototype would still apply. */
9060char dnet_ntoa ();
98418dba
CW
9061int
9062main ()
9063{
9064dnet_ntoa ();
9065 ;
9066 return 0;
9067}
9068_ACEOF
9069rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9070if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9071 (eval $ac_link) 2>conftest.er1
98418dba 9072 ac_status=$?
35996d22
AS
9073 grep -v '^ *+' conftest.er1 >conftest.err
9074 rm -f conftest.er1
9075 cat conftest.err >&5
c0d27fcc 9076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9077 (exit $ac_status); } &&
9adfabc2 9078 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9080 (eval $ac_try) 2>&5
9081 ac_status=$?
9082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9083 (exit $ac_status); }; } &&
9084 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9086 (eval $ac_try) 2>&5
9087 ac_status=$?
c0d27fcc 9088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9089 (exit $ac_status); }; }; then
9090 ac_cv_lib_dnet_dnet_ntoa=yes
9091else
9092 echo "$as_me: failed program was:" >&5
19650fd6
AS
9093sed 's/^/| /' conftest.$ac_ext >&5
9094
98418dba
CW
9095ac_cv_lib_dnet_dnet_ntoa=no
9096fi
35996d22
AS
9097rm -f conftest.err conftest.$ac_objext \
9098 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9099LIBS=$ac_check_lib_save_LIBS
9100fi
c0d27fcc 9101echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
9102echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9103if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 9104 cat >>confdefs.h <<_ACEOF
98418dba 9105#define HAVE_LIBDNET 1
c0d27fcc 9106_ACEOF
98418dba
CW
9107
9108 LIBS="-ldnet $LIBS"
9109
9110fi
9111
c0d27fcc
MR
9112
9113echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
9114echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
9115if test "${ac_cv_lib_Xbsd_main+set}" = set; then
9116 echo $ECHO_N "(cached) $ECHO_C" >&6
9117else
9118 ac_check_lib_save_LIBS=$LIBS
9119LIBS="-lXbsd $LIBS"
9120cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9121/* confdefs.h. */
9122_ACEOF
9123cat confdefs.h >>conftest.$ac_ext
9124cat >>conftest.$ac_ext <<_ACEOF
9125/* end confdefs.h. */
98418dba 9126
c0d27fcc 9127
98418dba
CW
9128int
9129main ()
9130{
9131main ();
9132 ;
9133 return 0;
9134}
9135_ACEOF
9136rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9137if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9138 (eval $ac_link) 2>conftest.er1
98418dba 9139 ac_status=$?
35996d22
AS
9140 grep -v '^ *+' conftest.er1 >conftest.err
9141 rm -f conftest.er1
9142 cat conftest.err >&5
c0d27fcc 9143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9144 (exit $ac_status); } &&
9adfabc2 9145 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9147 (eval $ac_try) 2>&5
9148 ac_status=$?
9149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9150 (exit $ac_status); }; } &&
9151 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9153 (eval $ac_try) 2>&5
9154 ac_status=$?
c0d27fcc 9155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9156 (exit $ac_status); }; }; then
9157 ac_cv_lib_Xbsd_main=yes
9158else
9159 echo "$as_me: failed program was:" >&5
19650fd6
AS
9160sed 's/^/| /' conftest.$ac_ext >&5
9161
98418dba
CW
9162ac_cv_lib_Xbsd_main=no
9163fi
35996d22
AS
9164rm -f conftest.err conftest.$ac_objext \
9165 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9166LIBS=$ac_check_lib_save_LIBS
9167fi
c0d27fcc 9168echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
9169echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
9170if test $ac_cv_lib_Xbsd_main = yes; then
9171 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
9172fi
9173
c0d27fcc
MR
9174
9175
9176echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
9177echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
9178if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
9179 echo $ECHO_N "(cached) $ECHO_C" >&6
9180else
9181 ac_check_lib_save_LIBS=$LIBS
9182LIBS="-lpthreads $LIBS"
9183cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9184/* confdefs.h. */
9185_ACEOF
9186cat confdefs.h >>conftest.$ac_ext
9187cat >>conftest.$ac_ext <<_ACEOF
9188/* end confdefs.h. */
98418dba
CW
9189
9190/* Override any gcc2 internal prototype to avoid an error. */
9191#ifdef __cplusplus
9192extern "C"
9193#endif
9194/* We use char because int might match the return type of a gcc2
9195 builtin and then its argument prototype would still apply. */
9196char cma_open ();
98418dba
CW
9197int
9198main ()
9199{
9200cma_open ();
9201 ;
9202 return 0;
9203}
9204_ACEOF
9205rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9207 (eval $ac_link) 2>conftest.er1
98418dba 9208 ac_status=$?
35996d22
AS
9209 grep -v '^ *+' conftest.er1 >conftest.err
9210 rm -f conftest.er1
9211 cat conftest.err >&5
c0d27fcc 9212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9213 (exit $ac_status); } &&
9adfabc2 9214 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9216 (eval $ac_try) 2>&5
9217 ac_status=$?
9218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9219 (exit $ac_status); }; } &&
9220 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9222 (eval $ac_try) 2>&5
9223 ac_status=$?
c0d27fcc 9224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9225 (exit $ac_status); }; }; then
9226 ac_cv_lib_pthreads_cma_open=yes
9227else
9228 echo "$as_me: failed program was:" >&5
19650fd6
AS
9229sed 's/^/| /' conftest.$ac_ext >&5
9230
98418dba
CW
9231ac_cv_lib_pthreads_cma_open=no
9232fi
35996d22
AS
9233rm -f conftest.err conftest.$ac_objext \
9234 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9235LIBS=$ac_check_lib_save_LIBS
9236fi
c0d27fcc 9237echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
9238echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
9239if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 9240 cat >>confdefs.h <<_ACEOF
98418dba 9241#define HAVE_LIBPTHREADS 1
c0d27fcc 9242_ACEOF
98418dba
CW
9243
9244 LIBS="-lpthreads $LIBS"
9245
9246fi
9247
c0d27fcc
MR
9248
9249echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
9250echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
9251if test -d /usr/X386/include; then
9252 HAVE_XFREE386=yes
9253 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
9254else
9255 HAVE_XFREE386=no
9256fi
c0d27fcc 9257echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
9258echo "${ECHO_T}$HAVE_XFREE386" >&6
9259
55597d70
DL
9260
9261case ${host_os} in
9262aix*)
9263 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
9264echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
9265if test "${gdb_cv_bigtoc+set}" = set; then
9266 echo $ECHO_N "(cached) $ECHO_C" >&6
9267else
9268
9269 case $GCC in
9270 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9271 *) gdb_cv_bigtoc=-bbigtoc ;;
9272 esac
9273
9274 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9275 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9276/* confdefs.h. */
9277_ACEOF
9278cat confdefs.h >>conftest.$ac_ext
9279cat >>conftest.$ac_ext <<_ACEOF
9280/* end confdefs.h. */
55597d70
DL
9281
9282int
9283main ()
9284{
9285int i;
9286 ;
9287 return 0;
9288}
9289_ACEOF
9290rm -f conftest.$ac_objext conftest$ac_exeext
9291if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9292 (eval $ac_link) 2>conftest.er1
55597d70 9293 ac_status=$?
35996d22
AS
9294 grep -v '^ *+' conftest.er1 >conftest.err
9295 rm -f conftest.er1
9296 cat conftest.err >&5
55597d70
DL
9297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9298 (exit $ac_status); } &&
9adfabc2 9299 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9301 (eval $ac_try) 2>&5
9302 ac_status=$?
9303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9304 (exit $ac_status); }; } &&
9305 { ac_try='test -s conftest$ac_exeext'
55597d70
DL
9306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9307 (eval $ac_try) 2>&5
9308 ac_status=$?
9309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9310 (exit $ac_status); }; }; then
9311 :
9312else
9313 echo "$as_me: failed program was:" >&5
19650fd6
AS
9314sed 's/^/| /' conftest.$ac_ext >&5
9315
55597d70
DL
9316gdb_cv_bigtoc=
9317fi
35996d22
AS
9318rm -f conftest.err conftest.$ac_objext \
9319 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
9320
9321fi
9322echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
9323echo "${ECHO_T}$gdb_cv_bigtoc" >&6
9324 ;;
9325esac
9326
ae1a998c
RS
9327# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
9328# used for the tests that follow. We set them back to REAL_CFLAGS and
9329# REAL_CPPFLAGS later on.
98418dba
CW
9330
9331REAL_CPPFLAGS="$CPPFLAGS"
9332
9333if test "${HAVE_X11}" = "yes"; then
9334 DEFS="$C_SWITCH_X_SITE $DEFS"
9335 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
9336 LIBS="$LIBX $LIBS"
9337 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
9338 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
9339
9340 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
9341 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
9342 # but it's more convenient here to set LD_RUN_PATH
9343 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
9344 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
9345 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
9346 export LD_RUN_PATH
9347 fi
9348
9349 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 9350 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
9351echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
9352 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9353/* confdefs.h. */
9354_ACEOF
9355cat confdefs.h >>conftest.$ac_ext
9356cat >>conftest.$ac_ext <<_ACEOF
9357/* end confdefs.h. */
98418dba 9358
98418dba
CW
9359int
9360main ()
9361{
9362XOpenDisplay ("foo");
9363 ;
9364 return 0;
9365}
9366_ACEOF
9367rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9368if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9369 (eval $ac_link) 2>conftest.er1
98418dba 9370 ac_status=$?
35996d22
AS
9371 grep -v '^ *+' conftest.er1 >conftest.err
9372 rm -f conftest.er1
9373 cat conftest.err >&5
c0d27fcc 9374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9375 (exit $ac_status); } &&
9adfabc2 9376 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
c0d27fcc 9377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9378 (eval $ac_try) 2>&5
9379 ac_status=$?
c0d27fcc 9380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
9381 (exit $ac_status); }; } &&
9382 { ac_try='test -s conftest$ac_exeext'
9383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9384 (eval $ac_try) 2>&5
9385 ac_status=$?
9386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9387 (exit $ac_status); }; }; then
9388 xlinux_first_failure=no
98418dba
CW
9389else
9390 echo "$as_me: failed program was:" >&5
19650fd6
AS
9391sed 's/^/| /' conftest.$ac_ext >&5
9392
98418dba
CW
9393xlinux_first_failure=yes
9394fi
35996d22
AS
9395rm -f conftest.err conftest.$ac_objext \
9396 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9397 if test "${xlinux_first_failure}" = "yes"; then
9398 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
9399 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
9400 OLD_CPPFLAGS="$CPPFLAGS"
9401 OLD_LIBS="$LIBS"
9402 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
9403 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
9404 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
9405 LIBS="$LIBS -b i486-linuxaout"
9406 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9407/* confdefs.h. */
9408_ACEOF
9409cat confdefs.h >>conftest.$ac_ext
9410cat >>conftest.$ac_ext <<_ACEOF
9411/* end confdefs.h. */
98418dba 9412
98418dba
CW
9413int
9414main ()
9415{
9416XOpenDisplay ("foo");
9417 ;
9418 return 0;
9419}
9420_ACEOF
9421rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9422if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9423 (eval $ac_link) 2>conftest.er1
98418dba 9424 ac_status=$?
35996d22
AS
9425 grep -v '^ *+' conftest.er1 >conftest.err
9426 rm -f conftest.er1
9427 cat conftest.err >&5
c0d27fcc 9428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9429 (exit $ac_status); } &&
9adfabc2 9430 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9432 (eval $ac_try) 2>&5
9433 ac_status=$?
9434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9435 (exit $ac_status); }; } &&
9436 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9438 (eval $ac_try) 2>&5
9439 ac_status=$?
c0d27fcc 9440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9441 (exit $ac_status); }; }; then
9442 xlinux_second_failure=no
9443else
9444 echo "$as_me: failed program was:" >&5
19650fd6
AS
9445sed 's/^/| /' conftest.$ac_ext >&5
9446
98418dba
CW
9447xlinux_second_failure=yes
9448fi
35996d22
AS
9449rm -f conftest.err conftest.$ac_objext \
9450 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9451 if test "${xlinux_second_failure}" = "yes"; then
9452 # If we get the same failure with -b, there is no use adding -b.
9453 # So take it out. This plays safe.
9454 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
9455 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
9456 CPPFLAGS="$OLD_CPPFLAGS"
9457 LIBS="$OLD_LIBS"
c0d27fcc 9458 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9459echo "${ECHO_T}no" >&6
9460 else
c0d27fcc 9461 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
9462echo "${ECHO_T}yes" >&6
9463 fi
9464 else
c0d27fcc 9465 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9466echo "${ECHO_T}no" >&6
9467 fi
9468 fi
9469
9470 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
9471 # header files included from there.
c0d27fcc 9472 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
9473echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
9474 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9475/* confdefs.h. */
9476_ACEOF
9477cat confdefs.h >>conftest.$ac_ext
9478cat >>conftest.$ac_ext <<_ACEOF
9479/* end confdefs.h. */
98418dba
CW
9480#include <X11/Xlib.h>
9481#include <X11/XKBlib.h>
98418dba
CW
9482int
9483main ()
9484{
9485XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
9486 ;
9487 return 0;
9488}
9489_ACEOF
9490rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9491if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9492 (eval $ac_link) 2>conftest.er1
98418dba 9493 ac_status=$?
35996d22
AS
9494 grep -v '^ *+' conftest.er1 >conftest.err
9495 rm -f conftest.er1
9496 cat conftest.err >&5
c0d27fcc 9497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9498 (exit $ac_status); } &&
9adfabc2 9499 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9501 (eval $ac_try) 2>&5
9502 ac_status=$?
9503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9504 (exit $ac_status); }; } &&
9505 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9507 (eval $ac_try) 2>&5
9508 ac_status=$?
c0d27fcc 9509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9510 (exit $ac_status); }; }; then
9511 emacs_xkb=yes
9512else
9513 echo "$as_me: failed program was:" >&5
19650fd6
AS
9514sed 's/^/| /' conftest.$ac_ext >&5
9515
98418dba
CW
9516emacs_xkb=no
9517fi
35996d22
AS
9518rm -f conftest.err conftest.$ac_objext \
9519 conftest$ac_exeext conftest.$ac_ext
c0d27fcc 9520 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
9521echo "${ECHO_T}$emacs_xkb" >&6
9522 if test $emacs_xkb = yes; then
b936fae4 9523
c0d27fcc 9524cat >>confdefs.h <<\_ACEOF
98418dba 9525#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 9526_ACEOF
98418dba
CW
9527
9528 fi
9529
c0d27fcc
MR
9530
9531
9532
9533
98418dba
CW
9534for ac_func in XrmSetDatabase XScreenResourceString \
9535XScreenNumberOfScreen XSetWMProtocols
9536do
9537as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 9538echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
9539echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9540if eval "test \"\${$as_ac_var+set}\" = set"; then
9541 echo $ECHO_N "(cached) $ECHO_C" >&6
9542else
9543 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9544/* confdefs.h. */
9545_ACEOF
9546cat confdefs.h >>conftest.$ac_ext
9547cat >>conftest.$ac_ext <<_ACEOF
9548/* end confdefs.h. */
35996d22
AS
9549/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9550 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9551#define $ac_func innocuous_$ac_func
9552
98418dba 9553/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9554 which can conflict with char $ac_func (); below.
9555 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9556 <limits.h> exists even on freestanding compilers. */
35996d22 9557
19650fd6
AS
9558#ifdef __STDC__
9559# include <limits.h>
9560#else
9561# include <assert.h>
9562#endif
35996d22
AS
9563
9564#undef $ac_func
9565
98418dba
CW
9566/* Override any gcc2 internal prototype to avoid an error. */
9567#ifdef __cplusplus
9568extern "C"
19650fd6 9569{
98418dba
CW
9570#endif
9571/* We use char because int might match the return type of a gcc2
9572 builtin and then its argument prototype would still apply. */
9573char $ac_func ();
98418dba
CW
9574/* The GNU C library defines this for functions which it implements
9575 to always fail with ENOSYS. Some functions are actually named
9576 something starting with __ and the normal name is an alias. */
9577#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9578choke me
9579#else
19650fd6
AS
9580char (*f) () = $ac_func;
9581#endif
9582#ifdef __cplusplus
9583}
98418dba
CW
9584#endif
9585
19650fd6
AS
9586int
9587main ()
9588{
9589return f != $ac_func;
98418dba
CW
9590 ;
9591 return 0;
9592}
9593_ACEOF
9594rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9595if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9596 (eval $ac_link) 2>conftest.er1
98418dba 9597 ac_status=$?
35996d22
AS
9598 grep -v '^ *+' conftest.er1 >conftest.err
9599 rm -f conftest.er1
9600 cat conftest.err >&5
c0d27fcc 9601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9602 (exit $ac_status); } &&
9adfabc2 9603 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9605 (eval $ac_try) 2>&5
9606 ac_status=$?
9607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9608 (exit $ac_status); }; } &&
9609 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9611 (eval $ac_try) 2>&5
9612 ac_status=$?
c0d27fcc 9613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9614 (exit $ac_status); }; }; then
9615 eval "$as_ac_var=yes"
9616else
9617 echo "$as_me: failed program was:" >&5
19650fd6
AS
9618sed 's/^/| /' conftest.$ac_ext >&5
9619
98418dba
CW
9620eval "$as_ac_var=no"
9621fi
35996d22
AS
9622rm -f conftest.err conftest.$ac_objext \
9623 conftest$ac_exeext conftest.$ac_ext
98418dba 9624fi
c0d27fcc 9625echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
9626echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9627if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9628 cat >>confdefs.h <<_ACEOF
98418dba 9629#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9630_ACEOF
98418dba
CW
9631
9632fi
9633done
9634
9635fi
9636
9637if test "${window_system}" = "x11"; then
c0d27fcc 9638 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
9639echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
9640 if test "${emacs_cv_x11_version_6+set}" = set; then
9641 echo $ECHO_N "(cached) $ECHO_C" >&6
9642else
9643 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9644/* confdefs.h. */
9645_ACEOF
9646cat confdefs.h >>conftest.$ac_ext
9647cat >>conftest.$ac_ext <<_ACEOF
9648/* end confdefs.h. */
98418dba 9649#include <X11/Xlib.h>
98418dba
CW
9650int
9651main ()
9652{
9653#if XlibSpecificationRelease < 6
9654fail;
9655#endif
9656
9657 ;
9658 return 0;
9659}
9660_ACEOF
9661rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9662if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9663 (eval $ac_link) 2>conftest.er1
98418dba 9664 ac_status=$?
35996d22
AS
9665 grep -v '^ *+' conftest.er1 >conftest.err
9666 rm -f conftest.er1
9667 cat conftest.err >&5
c0d27fcc 9668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9669 (exit $ac_status); } &&
9adfabc2 9670 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9672 (eval $ac_try) 2>&5
9673 ac_status=$?
9674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9675 (exit $ac_status); }; } &&
9676 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9678 (eval $ac_try) 2>&5
9679 ac_status=$?
c0d27fcc 9680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9681 (exit $ac_status); }; }; then
9682 emacs_cv_x11_version_6=yes
9683else
9684 echo "$as_me: failed program was:" >&5
19650fd6
AS
9685sed 's/^/| /' conftest.$ac_ext >&5
9686
98418dba
CW
9687emacs_cv_x11_version_6=no
9688fi
35996d22
AS
9689rm -f conftest.err conftest.$ac_objext \
9690 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9691fi
9692
9693 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 9694 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 9695echo "${ECHO_T}6 or newer" >&6
b936fae4 9696
c0d27fcc 9697cat >>confdefs.h <<\_ACEOF
98418dba 9698#define HAVE_X11R6 1
c0d27fcc 9699_ACEOF
98418dba
CW
9700
9701 else
c0d27fcc 9702 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
9703echo "${ECHO_T}before 6" >&6
9704 fi
9705fi
9706
9707if test "${window_system}" = "x11"; then
c0d27fcc 9708 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
9709echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
9710 if test "${emacs_cv_x11_version_5+set}" = set; then
9711 echo $ECHO_N "(cached) $ECHO_C" >&6
9712else
9713 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9714/* confdefs.h. */
9715_ACEOF
9716cat confdefs.h >>conftest.$ac_ext
9717cat >>conftest.$ac_ext <<_ACEOF
9718/* end confdefs.h. */
98418dba 9719#include <X11/Xlib.h>
98418dba
CW
9720int
9721main ()
9722{
9723#if XlibSpecificationRelease < 5
9724fail;
9725#endif
9726
9727 ;
9728 return 0;
9729}
9730_ACEOF
9731rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9732if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9733 (eval $ac_link) 2>conftest.er1
98418dba 9734 ac_status=$?
35996d22
AS
9735 grep -v '^ *+' conftest.er1 >conftest.err
9736 rm -f conftest.er1
9737 cat conftest.err >&5
c0d27fcc 9738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9739 (exit $ac_status); } &&
9adfabc2 9740 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9742 (eval $ac_try) 2>&5
9743 ac_status=$?
9744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9745 (exit $ac_status); }; } &&
9746 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9748 (eval $ac_try) 2>&5
9749 ac_status=$?
c0d27fcc 9750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9751 (exit $ac_status); }; }; then
9752 emacs_cv_x11_version_5=yes
9753else
9754 echo "$as_me: failed program was:" >&5
19650fd6
AS
9755sed 's/^/| /' conftest.$ac_ext >&5
9756
98418dba
CW
9757emacs_cv_x11_version_5=no
9758fi
35996d22
AS
9759rm -f conftest.err conftest.$ac_objext \
9760 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9761fi
9762
9763 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 9764 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
9765echo "${ECHO_T}5 or newer" >&6
9766 HAVE_X11R5=yes
b936fae4 9767
c0d27fcc 9768cat >>confdefs.h <<\_ACEOF
98418dba 9769#define HAVE_X11R5 1
c0d27fcc 9770_ACEOF
98418dba
CW
9771
9772 else
9773 HAVE_X11R5=no
c0d27fcc 9774 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
9775echo "${ECHO_T}before 5" >&6
9776 fi
9777fi
9778
488dd4c4
JD
9779
9780
9781HAVE_GTK=no
9782if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 9783 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
9784 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
9785echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
9786 { (exit 1); exit 1; }; };
9787 fi
9788 GLIB_REQUIRED=2.0.1
e512ece1 9789 GTK_REQUIRED=2.0.1
488dd4c4
JD
9790 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
9791
9792 if test "X${with_pkg_config_prog}" != X; then
9793 PKG_CONFIG="${with_pkg_config_prog}"
9794 fi
9795
9796 succeeded=no
9797
9798 if test -z "$PKG_CONFIG"; then
9799 # Extract the first word of "pkg-config", so it can be a program name with args.
9800set dummy pkg-config; ac_word=$2
9801echo "$as_me:$LINENO: checking for $ac_word" >&5
9802echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9803if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9804 echo $ECHO_N "(cached) $ECHO_C" >&6
9805else
9806 case $PKG_CONFIG in
9807 [\\/]* | ?:[\\/]*)
9808 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9809 ;;
9810 *)
9811 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9812for as_dir in $PATH
9813do
9814 IFS=$as_save_IFS
9815 test -z "$as_dir" && as_dir=.
9816 for ac_exec_ext in '' $ac_executable_extensions; do
9817 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9818 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9819 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9820 break 2
9821 fi
9822done
9823done
9824
9825 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9826 ;;
9827esac
9828fi
9829PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9830
9831if test -n "$PKG_CONFIG"; then
9832 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
9833echo "${ECHO_T}$PKG_CONFIG" >&6
9834else
9835 echo "$as_me:$LINENO: result: no" >&5
9836echo "${ECHO_T}no" >&6
9837fi
9838
9839 fi
9840
9841 if test "$PKG_CONFIG" = "no" ; then
9842 echo "*** The pkg-config script could not be found. Make sure it is"
9843 echo "*** in your path, or give the full path to pkg-config with"
9844 echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog."
9845 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
9846 else
9847 PKG_CONFIG_MIN_VERSION=0.9.0
9848 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9849 echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
9850echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6
9851
9852 if $PKG_CONFIG --exists "$GTK_MODULES" ; then
9853 echo "$as_me:$LINENO: result: yes" >&5
9854echo "${ECHO_T}yes" >&6
9855 succeeded=yes
9856
9857 echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
9858echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
9859 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
9860 echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
9861echo "${ECHO_T}$GTK_CFLAGS" >&6
9862
9863 echo "$as_me:$LINENO: checking GTK_LIBS" >&5
9864echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
9865 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
9866 echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
9867echo "${ECHO_T}$GTK_LIBS" >&6
9868 else
9869 GTK_CFLAGS=""
9870 GTK_LIBS=""
9871 ## If we have a custom action on failure, don't print errors, but
9872 ## do set a variable so people can do so.
9873 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
9874 echo $GTK_PKG_ERRORS
9875 fi
9876
9877
9878
9879 else
9880 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9881 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9882 fi
9883 fi
9884
9885 if test $succeeded = yes; then
9886 :
9887 else
9888 { { 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
9889echo "$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;}
9890 { (exit 1); exit 1; }; }
9891 fi
9892
9893
9894
9895 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
9896 CFLAGS="$CFLAGS $GTK_CFLAGS"
9897 LIBS="$GTK_LIBS $LIBS"
488dd4c4
JD
9898 HAVE_GTK=yes
9899
9900cat >>confdefs.h <<\_ACEOF
9901#define HAVE_GTK 1
9902_ACEOF
9903
9904 USE_X_TOOLKIT=none
9905
d0a80c21
JD
9906 if test "$with_toolkit_scroll_bars" != no; then
9907 with_toolkit_scroll_bars=yes
9908 fi
57669b57
JD
9909
9910 HAVE_GTK_MULTIDISPLAY=no
9911
9912for ac_func in gdk_display_open
9913do
9914as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9915echo "$as_me:$LINENO: checking for $ac_func" >&5
9916echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9917if eval "test \"\${$as_ac_var+set}\" = set"; then
9918 echo $ECHO_N "(cached) $ECHO_C" >&6
9919else
9920 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
9921/* confdefs.h. */
9922_ACEOF
9923cat confdefs.h >>conftest.$ac_ext
9924cat >>conftest.$ac_ext <<_ACEOF
9925/* end confdefs.h. */
35996d22
AS
9926/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9927 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9928#define $ac_func innocuous_$ac_func
9929
57669b57
JD
9930/* System header to define __stub macros and hopefully few prototypes,
9931 which can conflict with char $ac_func (); below.
9932 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9933 <limits.h> exists even on freestanding compilers. */
35996d22 9934
57669b57
JD
9935#ifdef __STDC__
9936# include <limits.h>
9937#else
9938# include <assert.h>
9939#endif
35996d22
AS
9940
9941#undef $ac_func
9942
57669b57
JD
9943/* Override any gcc2 internal prototype to avoid an error. */
9944#ifdef __cplusplus
9945extern "C"
9946{
9947#endif
9948/* We use char because int might match the return type of a gcc2
9949 builtin and then its argument prototype would still apply. */
9950char $ac_func ();
9951/* The GNU C library defines this for functions which it implements
9952 to always fail with ENOSYS. Some functions are actually named
9953 something starting with __ and the normal name is an alias. */
9954#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9955choke me
9956#else
9957char (*f) () = $ac_func;
9958#endif
9959#ifdef __cplusplus
9960}
9961#endif
9962
9963int
9964main ()
9965{
9966return f != $ac_func;
9967 ;
9968 return 0;
9969}
9970_ACEOF
9971rm -f conftest.$ac_objext conftest$ac_exeext
9972if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9973 (eval $ac_link) 2>conftest.er1
57669b57 9974 ac_status=$?
35996d22
AS
9975 grep -v '^ *+' conftest.er1 >conftest.err
9976 rm -f conftest.er1
9977 cat conftest.err >&5
57669b57
JD
9978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9979 (exit $ac_status); } &&
9adfabc2 9980 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9982 (eval $ac_try) 2>&5
9983 ac_status=$?
9984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9985 (exit $ac_status); }; } &&
9986 { ac_try='test -s conftest$ac_exeext'
57669b57
JD
9987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9988 (eval $ac_try) 2>&5
9989 ac_status=$?
9990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9991 (exit $ac_status); }; }; then
9992 eval "$as_ac_var=yes"
9993else
9994 echo "$as_me: failed program was:" >&5
9995sed 's/^/| /' conftest.$ac_ext >&5
9996
9997eval "$as_ac_var=no"
9998fi
35996d22
AS
9999rm -f conftest.err conftest.$ac_objext \
10000 conftest$ac_exeext conftest.$ac_ext
57669b57
JD
10001fi
10002echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10003echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10004if test `eval echo '${'$as_ac_var'}'` = yes; then
10005 cat >>confdefs.h <<_ACEOF
10006#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10007_ACEOF
10008 HAVE_GTK_MULTIDISPLAY=yes
10009fi
10010done
10011
10012 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
10013
10014cat >>confdefs.h <<\_ACEOF
10015#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
10016_ACEOF
10017
10018 fi
10019 HAVE_GTK_FILE_SELECTION=no
10020
10021for ac_func in gtk_file_selection_new
10022do
10023as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10024echo "$as_me:$LINENO: checking for $ac_func" >&5
10025echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10026if eval "test \"\${$as_ac_var+set}\" = set"; then
10027 echo $ECHO_N "(cached) $ECHO_C" >&6
10028else
10029 cat >conftest.$ac_ext <<_ACEOF
10030/* confdefs.h. */
10031_ACEOF
10032cat confdefs.h >>conftest.$ac_ext
10033cat >>conftest.$ac_ext <<_ACEOF
10034/* end confdefs.h. */
10035/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10036 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10037#define $ac_func innocuous_$ac_func
10038
10039/* System header to define __stub macros and hopefully few prototypes,
10040 which can conflict with char $ac_func (); below.
10041 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10042 <limits.h> exists even on freestanding compilers. */
10043
10044#ifdef __STDC__
10045# include <limits.h>
10046#else
10047# include <assert.h>
10048#endif
10049
10050#undef $ac_func
10051
10052/* Override any gcc2 internal prototype to avoid an error. */
10053#ifdef __cplusplus
10054extern "C"
10055{
10056#endif
10057/* We use char because int might match the return type of a gcc2
10058 builtin and then its argument prototype would still apply. */
10059char $ac_func ();
10060/* The GNU C library defines this for functions which it implements
10061 to always fail with ENOSYS. Some functions are actually named
10062 something starting with __ and the normal name is an alias. */
10063#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10064choke me
10065#else
10066char (*f) () = $ac_func;
10067#endif
10068#ifdef __cplusplus
10069}
10070#endif
10071
10072int
10073main ()
10074{
10075return f != $ac_func;
10076 ;
10077 return 0;
10078}
10079_ACEOF
10080rm -f conftest.$ac_objext conftest$ac_exeext
10081if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10082 (eval $ac_link) 2>conftest.er1
10083 ac_status=$?
10084 grep -v '^ *+' conftest.er1 >conftest.err
10085 rm -f conftest.er1
10086 cat conftest.err >&5
10087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10088 (exit $ac_status); } &&
9adfabc2 10089 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
572a3cc2
JD
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_SELECTION=yes
10118fi
10119done
10120
10121
10122 HAVE_GTK_FILE_CHOOSER=no
10123
10124for ac_func in gtk_file_chooser_dialog_new
10125do
10126as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10127echo "$as_me:$LINENO: checking for $ac_func" >&5
10128echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10129if eval "test \"\${$as_ac_var+set}\" = set"; then
10130 echo $ECHO_N "(cached) $ECHO_C" >&6
10131else
10132 cat >conftest.$ac_ext <<_ACEOF
10133/* confdefs.h. */
10134_ACEOF
10135cat confdefs.h >>conftest.$ac_ext
10136cat >>conftest.$ac_ext <<_ACEOF
10137/* end confdefs.h. */
10138/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10139 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10140#define $ac_func innocuous_$ac_func
10141
10142/* System header to define __stub macros and hopefully few prototypes,
10143 which can conflict with char $ac_func (); below.
10144 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10145 <limits.h> exists even on freestanding compilers. */
10146
10147#ifdef __STDC__
10148# include <limits.h>
10149#else
10150# include <assert.h>
10151#endif
10152
10153#undef $ac_func
10154
10155/* Override any gcc2 internal prototype to avoid an error. */
10156#ifdef __cplusplus
10157extern "C"
10158{
10159#endif
10160/* We use char because int might match the return type of a gcc2
10161 builtin and then its argument prototype would still apply. */
10162char $ac_func ();
10163/* The GNU C library defines this for functions which it implements
10164 to always fail with ENOSYS. Some functions are actually named
10165 something starting with __ and the normal name is an alias. */
10166#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10167choke me
10168#else
10169char (*f) () = $ac_func;
10170#endif
10171#ifdef __cplusplus
10172}
10173#endif
10174
10175int
10176main ()
10177{
10178return f != $ac_func;
10179 ;
10180 return 0;
10181}
10182_ACEOF
10183rm -f conftest.$ac_objext conftest$ac_exeext
10184if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10185 (eval $ac_link) 2>conftest.er1
10186 ac_status=$?
10187 grep -v '^ *+' conftest.er1 >conftest.err
10188 rm -f conftest.er1
10189 cat conftest.err >&5
10190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10191 (exit $ac_status); } &&
9adfabc2 10192 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
572a3cc2
JD
10193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10194 (eval $ac_try) 2>&5
10195 ac_status=$?
10196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10197 (exit $ac_status); }; } &&
10198 { ac_try='test -s conftest$ac_exeext'
10199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10200 (eval $ac_try) 2>&5
10201 ac_status=$?
10202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10203 (exit $ac_status); }; }; then
10204 eval "$as_ac_var=yes"
10205else
10206 echo "$as_me: failed program was:" >&5
10207sed 's/^/| /' conftest.$ac_ext >&5
10208
10209eval "$as_ac_var=no"
10210fi
10211rm -f conftest.err conftest.$ac_objext \
10212 conftest$ac_exeext conftest.$ac_ext
10213fi
10214echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10215echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10216if test `eval echo '${'$as_ac_var'}'` = yes; then
10217 cat >>confdefs.h <<_ACEOF
10218#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10219_ACEOF
10220 HAVE_GTK_FILE_CHOOSER=yes
10221fi
10222done
10223
10224
10225 if test "$HAVE_GTK_FILE_SELECTION" = yes \
10226 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10227
10228cat >>confdefs.h <<\_ACEOF
10229#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
10230_ACEOF
10231
b8bdffbe
JD
10232 fi
10233
10234 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10235 HAVE_GTK_AND_PTHREAD=no
10236
10237for ac_header in pthread.h
10238do
10239as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10240if eval "test \"\${$as_ac_Header+set}\" = set"; then
10241 echo "$as_me:$LINENO: checking for $ac_header" >&5
10242echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10243if eval "test \"\${$as_ac_Header+set}\" = set"; then
10244 echo $ECHO_N "(cached) $ECHO_C" >&6
10245fi
10246echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10247echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10248else
10249 # Is the header compilable?
10250echo "$as_me:$LINENO: checking $ac_header usability" >&5
10251echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10252cat >conftest.$ac_ext <<_ACEOF
10253/* confdefs.h. */
10254_ACEOF
10255cat confdefs.h >>conftest.$ac_ext
10256cat >>conftest.$ac_ext <<_ACEOF
10257/* end confdefs.h. */
10258$ac_includes_default
10259#include <$ac_header>
10260_ACEOF
10261rm -f conftest.$ac_objext
10262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10263 (eval $ac_compile) 2>conftest.er1
10264 ac_status=$?
10265 grep -v '^ *+' conftest.er1 >conftest.err
10266 rm -f conftest.er1
10267 cat conftest.err >&5
10268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10269 (exit $ac_status); } &&
9adfabc2 10270 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
b8bdffbe
JD
10271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10272 (eval $ac_try) 2>&5
10273 ac_status=$?
10274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10275 (exit $ac_status); }; } &&
10276 { ac_try='test -s conftest.$ac_objext'
10277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10278 (eval $ac_try) 2>&5
10279 ac_status=$?
10280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10281 (exit $ac_status); }; }; then
10282 ac_header_compiler=yes
10283else
10284 echo "$as_me: failed program was:" >&5
10285sed 's/^/| /' conftest.$ac_ext >&5
10286
10287ac_header_compiler=no
10288fi
10289rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10290echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10291echo "${ECHO_T}$ac_header_compiler" >&6
10292
10293# Is the header present?
10294echo "$as_me:$LINENO: checking $ac_header presence" >&5
10295echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10296cat >conftest.$ac_ext <<_ACEOF
10297/* confdefs.h. */
10298_ACEOF
10299cat confdefs.h >>conftest.$ac_ext
10300cat >>conftest.$ac_ext <<_ACEOF
10301/* end confdefs.h. */
10302#include <$ac_header>
10303_ACEOF
10304if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10305 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10306 ac_status=$?
10307 grep -v '^ *+' conftest.er1 >conftest.err
10308 rm -f conftest.er1
10309 cat conftest.err >&5
10310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10311 (exit $ac_status); } >/dev/null; then
10312 if test -s conftest.err; then
10313 ac_cpp_err=$ac_c_preproc_warn_flag
10314 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10315 else
10316 ac_cpp_err=
10317 fi
10318else
10319 ac_cpp_err=yes
10320fi
10321if test -z "$ac_cpp_err"; then
10322 ac_header_preproc=yes
10323else
10324 echo "$as_me: failed program was:" >&5
10325sed 's/^/| /' conftest.$ac_ext >&5
10326
10327 ac_header_preproc=no
10328fi
10329rm -f conftest.err conftest.$ac_ext
10330echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10331echo "${ECHO_T}$ac_header_preproc" >&6
10332
10333# So? What about this header?
10334case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10335 yes:no: )
10336 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10337echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10338 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10339echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10340 ac_header_preproc=yes
10341 ;;
10342 no:yes:* )
10343 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10344echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10345 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10346echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10347 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10348echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10349 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10350echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
10351 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10352echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10353 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10354echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10355 (
10356 cat <<\_ASBOX
10357## ------------------------------------------ ##
10358## Report this to the AC_PACKAGE_NAME lists. ##
10359## ------------------------------------------ ##
10360_ASBOX
10361 ) |
10362 sed "s/^/$as_me: WARNING: /" >&2
10363 ;;
10364esac
10365echo "$as_me:$LINENO: checking for $ac_header" >&5
10366echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10367if eval "test \"\${$as_ac_Header+set}\" = set"; then
10368 echo $ECHO_N "(cached) $ECHO_C" >&6
10369else
10370 eval "$as_ac_Header=\$ac_header_preproc"
10371fi
10372echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10373echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10374
10375fi
10376if test `eval echo '${'$as_ac_Header'}'` = yes; then
10377 cat >>confdefs.h <<_ACEOF
10378#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10379_ACEOF
10380
10381fi
10382
10383done
10384
10385 if test "$ac_cv_header_pthread_h"; then
10386 echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
10387echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6
10388if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
10389 echo $ECHO_N "(cached) $ECHO_C" >&6
10390else
10391 ac_check_lib_save_LIBS=$LIBS
10392LIBS="-lpthread $LIBS"
10393cat >conftest.$ac_ext <<_ACEOF
10394/* confdefs.h. */
10395_ACEOF
10396cat confdefs.h >>conftest.$ac_ext
10397cat >>conftest.$ac_ext <<_ACEOF
10398/* end confdefs.h. */
10399
10400/* Override any gcc2 internal prototype to avoid an error. */
10401#ifdef __cplusplus
10402extern "C"
10403#endif
10404/* We use char because int might match the return type of a gcc2
10405 builtin and then its argument prototype would still apply. */
10406char pthread_self ();
10407int
10408main ()
10409{
10410pthread_self ();
10411 ;
10412 return 0;
10413}
10414_ACEOF
10415rm -f conftest.$ac_objext conftest$ac_exeext
10416if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10417 (eval $ac_link) 2>conftest.er1
10418 ac_status=$?
10419 grep -v '^ *+' conftest.er1 >conftest.err
10420 rm -f conftest.er1
10421 cat conftest.err >&5
10422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10423 (exit $ac_status); } &&
9adfabc2 10424 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
b8bdffbe
JD
10425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10426 (eval $ac_try) 2>&5
10427 ac_status=$?
10428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10429 (exit $ac_status); }; } &&
10430 { ac_try='test -s conftest$ac_exeext'
10431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10432 (eval $ac_try) 2>&5
10433 ac_status=$?
10434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10435 (exit $ac_status); }; }; then
10436 ac_cv_lib_pthread_pthread_self=yes
10437else
10438 echo "$as_me: failed program was:" >&5
10439sed 's/^/| /' conftest.$ac_ext >&5
10440
10441ac_cv_lib_pthread_pthread_self=no
10442fi
10443rm -f conftest.err conftest.$ac_objext \
10444 conftest$ac_exeext conftest.$ac_ext
10445LIBS=$ac_check_lib_save_LIBS
10446fi
10447echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
10448echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6
10449if test $ac_cv_lib_pthread_pthread_self = yes; then
10450 HAVE_GTK_AND_PTHREAD=yes
10451fi
10452
10453 fi
10454 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
10455 GTK_LIBS="$GTK_LIBS -lpthread"
10456
10457cat >>confdefs.h <<\_ACEOF
10458#define HAVE_GTK_AND_PTHREAD 1
10459_ACEOF
10460
10461 fi
57669b57 10462 fi
488dd4c4
JD
10463fi
10464
98418dba
CW
10465if test x"${USE_X_TOOLKIT}" = xmaybe; then
10466 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 10467 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
10468echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
10469 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
10470 echo $ECHO_N "(cached) $ECHO_C" >&6
10471else
10472 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10473/* confdefs.h. */
10474_ACEOF
10475cat confdefs.h >>conftest.$ac_ext
10476cat >>conftest.$ac_ext <<_ACEOF
10477/* end confdefs.h. */
98418dba
CW
10478
10479#include <X11/Intrinsic.h>
10480#include <X11/Xaw/Simple.h>
98418dba
CW
10481int
10482main ()
10483{
10484
10485 ;
10486 return 0;
10487}
10488_ACEOF
10489rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10490if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10491 (eval $ac_link) 2>conftest.er1
98418dba 10492 ac_status=$?
35996d22
AS
10493 grep -v '^ *+' conftest.er1 >conftest.err
10494 rm -f conftest.er1
10495 cat conftest.err >&5
c0d27fcc 10496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10497 (exit $ac_status); } &&
9adfabc2 10498 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
10499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10500 (eval $ac_try) 2>&5
10501 ac_status=$?
10502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10503 (exit $ac_status); }; } &&
10504 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10506 (eval $ac_try) 2>&5
10507 ac_status=$?
c0d27fcc 10508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10509 (exit $ac_status); }; }; then
10510 emacs_cv_x11_version_5_with_xaw=yes
10511else
10512 echo "$as_me: failed program was:" >&5
19650fd6
AS
10513sed 's/^/| /' conftest.$ac_ext >&5
10514
98418dba
CW
10515emacs_cv_x11_version_5_with_xaw=no
10516fi
35996d22
AS
10517rm -f conftest.err conftest.$ac_objext \
10518 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10519fi
10520
10521 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 10522 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
10523echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
10524 USE_X_TOOLKIT=LUCID
10525 else
c0d27fcc 10526 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
10527echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
10528 USE_X_TOOLKIT=none
10529 fi
10530 else
10531 USE_X_TOOLKIT=none
10532 fi
10533fi
10534
10535X_TOOLKIT_TYPE=$USE_X_TOOLKIT
10536
10537if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 10538 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
10539echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
10540 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
10541 echo $ECHO_N "(cached) $ECHO_C" >&6
10542else
10543 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10544/* confdefs.h. */
10545_ACEOF
10546cat confdefs.h >>conftest.$ac_ext
10547cat >>conftest.$ac_ext <<_ACEOF
10548/* end confdefs.h. */
98418dba 10549#include <X11/Intrinsic.h>
98418dba
CW
10550int
10551main ()
10552{
10553#if XtSpecificationRelease < 6
10554fail;
10555#endif
10556
10557 ;
10558 return 0;
10559}
10560_ACEOF
10561rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10562if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10563 (eval $ac_link) 2>conftest.er1
98418dba 10564 ac_status=$?
35996d22
AS
10565 grep -v '^ *+' conftest.er1 >conftest.err
10566 rm -f conftest.er1
10567 cat conftest.err >&5
c0d27fcc 10568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10569 (exit $ac_status); } &&
9adfabc2 10570 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
10571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10572 (eval $ac_try) 2>&5
10573 ac_status=$?
10574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10575 (exit $ac_status); }; } &&
10576 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10578 (eval $ac_try) 2>&5
10579 ac_status=$?
c0d27fcc 10580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10581 (exit $ac_status); }; }; then
10582 emacs_cv_x11_toolkit_version_6=yes
10583else
10584 echo "$as_me: failed program was:" >&5
19650fd6
AS
10585sed 's/^/| /' conftest.$ac_ext >&5
10586
98418dba
CW
10587emacs_cv_x11_toolkit_version_6=no
10588fi
35996d22
AS
10589rm -f conftest.err conftest.$ac_objext \
10590 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10591fi
10592
10593 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
10594 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 10595 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 10596echo "${ECHO_T}6 or newer" >&6
b936fae4 10597
c0d27fcc 10598cat >>confdefs.h <<\_ACEOF
98418dba 10599#define HAVE_X11XTR6 1
c0d27fcc 10600_ACEOF
98418dba
CW
10601
10602 else
c0d27fcc 10603 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
10604echo "${ECHO_T}before 6" >&6
10605 fi
10606
10607 OLDLIBS="$LIBS"
10608 if test x$HAVE_X11XTR6 = xyes; then
10609 LIBS="-lXt -lSM -lICE $LIBS"
10610 else
10611 LIBS="-lXt $LIBS"
10612 fi
10613
c0d27fcc 10614echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
10615echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
10616if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
10617 echo $ECHO_N "(cached) $ECHO_C" >&6
10618else
10619 ac_check_lib_save_LIBS=$LIBS
10620LIBS="-lXmu $LIBS"
10621cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10622/* confdefs.h. */
10623_ACEOF
10624cat confdefs.h >>conftest.$ac_ext
10625cat >>conftest.$ac_ext <<_ACEOF
10626/* end confdefs.h. */
98418dba
CW
10627
10628/* Override any gcc2 internal prototype to avoid an error. */
10629#ifdef __cplusplus
10630extern "C"
10631#endif
10632/* We use char because int might match the return type of a gcc2
10633 builtin and then its argument prototype would still apply. */
10634char XmuConvertStandardSelection ();
98418dba
CW
10635int
10636main ()
10637{
10638XmuConvertStandardSelection ();
10639 ;
10640 return 0;
10641}
10642_ACEOF
10643rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10644if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10645 (eval $ac_link) 2>conftest.er1
98418dba 10646 ac_status=$?
35996d22
AS
10647 grep -v '^ *+' conftest.er1 >conftest.err
10648 rm -f conftest.er1
10649 cat conftest.err >&5
c0d27fcc 10650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10651 (exit $ac_status); } &&
9adfabc2 10652 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
10653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10654 (eval $ac_try) 2>&5
10655 ac_status=$?
10656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10657 (exit $ac_status); }; } &&
10658 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10660 (eval $ac_try) 2>&5
10661 ac_status=$?
c0d27fcc 10662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10663 (exit $ac_status); }; }; then
10664 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
10665else
10666 echo "$as_me: failed program was:" >&5
19650fd6
AS
10667sed 's/^/| /' conftest.$ac_ext >&5
10668
98418dba
CW
10669ac_cv_lib_Xmu_XmuConvertStandardSelection=no
10670fi
35996d22
AS
10671rm -f conftest.err conftest.$ac_objext \
10672 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10673LIBS=$ac_check_lib_save_LIBS
10674fi
c0d27fcc 10675echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
10676echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
10677if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 10678 cat >>confdefs.h <<_ACEOF
98418dba 10679#define HAVE_LIBXMU 1
c0d27fcc 10680_ACEOF
98418dba
CW
10681
10682 LIBS="-lXmu $LIBS"
10683
10684fi
10685
10686 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
10687fi
10688
10689# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
10690if test "${HAVE_X11}" = "yes"; then
10691 if test "${USE_X_TOOLKIT}" != "none"; then
10692
c0d27fcc 10693echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
10694echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
10695if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
10696 echo $ECHO_N "(cached) $ECHO_C" >&6
10697else
10698 ac_check_lib_save_LIBS=$LIBS
10699LIBS="-lXext $LIBS"
10700cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10701/* confdefs.h. */
10702_ACEOF
10703cat confdefs.h >>conftest.$ac_ext
10704cat >>conftest.$ac_ext <<_ACEOF
10705/* end confdefs.h. */
98418dba
CW
10706
10707/* Override any gcc2 internal prototype to avoid an error. */
10708#ifdef __cplusplus
10709extern "C"
10710#endif
10711/* We use char because int might match the return type of a gcc2
10712 builtin and then its argument prototype would still apply. */
10713char XShapeQueryExtension ();
98418dba
CW
10714int
10715main ()
10716{
10717XShapeQueryExtension ();
10718 ;
10719 return 0;
10720}
10721_ACEOF
10722rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10723if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10724 (eval $ac_link) 2>conftest.er1
98418dba 10725 ac_status=$?
35996d22
AS
10726 grep -v '^ *+' conftest.er1 >conftest.err
10727 rm -f conftest.er1
10728 cat conftest.err >&5
c0d27fcc 10729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10730 (exit $ac_status); } &&
9adfabc2 10731 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
10732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10733 (eval $ac_try) 2>&5
10734 ac_status=$?
10735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10736 (exit $ac_status); }; } &&
10737 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10739 (eval $ac_try) 2>&5
10740 ac_status=$?
c0d27fcc 10741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10742 (exit $ac_status); }; }; then
10743 ac_cv_lib_Xext_XShapeQueryExtension=yes
10744else
10745 echo "$as_me: failed program was:" >&5
19650fd6
AS
10746sed 's/^/| /' conftest.$ac_ext >&5
10747
98418dba
CW
10748ac_cv_lib_Xext_XShapeQueryExtension=no
10749fi
35996d22
AS
10750rm -f conftest.err conftest.$ac_objext \
10751 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10752LIBS=$ac_check_lib_save_LIBS
10753fi
c0d27fcc 10754echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
10755echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
10756if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 10757 cat >>confdefs.h <<_ACEOF
98418dba 10758#define HAVE_LIBXEXT 1
c0d27fcc 10759_ACEOF
98418dba
CW
10760
10761 LIBS="-lXext $LIBS"
10762
10763fi
10764
10765 fi
10766fi
10767
10768if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 10769 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
10770echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
10771if test "${emacs_cv_motif_version_2_1+set}" = set; then
10772 echo $ECHO_N "(cached) $ECHO_C" >&6
10773else
10774 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10775/* confdefs.h. */
10776_ACEOF
10777cat confdefs.h >>conftest.$ac_ext
10778cat >>conftest.$ac_ext <<_ACEOF
10779/* end confdefs.h. */
98418dba 10780#include <Xm/Xm.h>
98418dba
CW
10781int
10782main ()
10783{
10784#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
10785int x = 5;
10786#else
10787Motif version prior to 2.1.
10788#endif
10789 ;
10790 return 0;
10791}
10792_ACEOF
10793rm -f conftest.$ac_objext
c0d27fcc 10794if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 10795 (eval $ac_compile) 2>conftest.er1
98418dba 10796 ac_status=$?
35996d22
AS
10797 grep -v '^ *+' conftest.er1 >conftest.err
10798 rm -f conftest.er1
10799 cat conftest.err >&5
c0d27fcc 10800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10801 (exit $ac_status); } &&
9adfabc2 10802 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
10803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10804 (eval $ac_try) 2>&5
10805 ac_status=$?
10806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10807 (exit $ac_status); }; } &&
10808 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 10809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10810 (eval $ac_try) 2>&5
10811 ac_status=$?
c0d27fcc 10812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10813 (exit $ac_status); }; }; then
10814 emacs_cv_motif_version_2_1=yes
10815else
10816 echo "$as_me: failed program was:" >&5
19650fd6
AS
10817sed 's/^/| /' conftest.$ac_ext >&5
10818
98418dba
CW
10819emacs_cv_motif_version_2_1=no
10820fi
35996d22 10821rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 10822fi
c0d27fcc 10823echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
10824echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
10825 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
10826 if test $emacs_cv_motif_version_2_1 = yes; then
10827 HAVE_LIBXP=no
b936fae4 10828
c0d27fcc 10829cat >>confdefs.h <<\_ACEOF
98418dba 10830#define HAVE_MOTIF_2_1 1
c0d27fcc 10831_ACEOF
98418dba 10832
c0d27fcc 10833 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
10834echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
10835if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
10836 echo $ECHO_N "(cached) $ECHO_C" >&6
10837else
10838 ac_check_lib_save_LIBS=$LIBS
10839LIBS="-lXp $LIBS"
10840cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10841/* confdefs.h. */
10842_ACEOF
10843cat confdefs.h >>conftest.$ac_ext
10844cat >>conftest.$ac_ext <<_ACEOF
10845/* end confdefs.h. */
98418dba
CW
10846
10847/* Override any gcc2 internal prototype to avoid an error. */
10848#ifdef __cplusplus
10849extern "C"
10850#endif
10851/* We use char because int might match the return type of a gcc2
10852 builtin and then its argument prototype would still apply. */
10853char XpCreateContext ();
98418dba
CW
10854int
10855main ()
10856{
10857XpCreateContext ();
10858 ;
10859 return 0;
10860}
10861_ACEOF
10862rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10863if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10864 (eval $ac_link) 2>conftest.er1
98418dba 10865 ac_status=$?
35996d22
AS
10866 grep -v '^ *+' conftest.er1 >conftest.err
10867 rm -f conftest.er1
10868 cat conftest.err >&5
c0d27fcc 10869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10870 (exit $ac_status); } &&
9adfabc2 10871 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
10872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10873 (eval $ac_try) 2>&5
10874 ac_status=$?
10875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10876 (exit $ac_status); }; } &&
10877 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10879 (eval $ac_try) 2>&5
10880 ac_status=$?
c0d27fcc 10881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10882 (exit $ac_status); }; }; then
10883 ac_cv_lib_Xp_XpCreateContext=yes
10884else
10885 echo "$as_me: failed program was:" >&5
19650fd6
AS
10886sed 's/^/| /' conftest.$ac_ext >&5
10887
98418dba
CW
10888ac_cv_lib_Xp_XpCreateContext=no
10889fi
35996d22
AS
10890rm -f conftest.err conftest.$ac_objext \
10891 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10892LIBS=$ac_check_lib_save_LIBS
10893fi
c0d27fcc 10894echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
10895echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
10896if test $ac_cv_lib_Xp_XpCreateContext = yes; then
10897 HAVE_LIBXP=yes
10898fi
503d2be0 10899
98418dba 10900 if test ${HAVE_LIBXP} = yes; then
b936fae4 10901
c0d27fcc 10902cat >>confdefs.h <<\_ACEOF
98418dba 10903#define HAVE_LIBXP 1
c0d27fcc 10904_ACEOF
503d2be0 10905
98418dba 10906 fi
4693dbc9
SM
10907 else
10908 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
10909echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
10910if test "${emacs_cv_lesstif+set}" = set; then
10911 echo $ECHO_N "(cached) $ECHO_C" >&6
10912else
10913 # We put this in CFLAGS temporarily to precede other -I options
10914 # that might be in CFLAGS temporarily.
10915 # We put this in CPPFLAGS where it precedes the other -I options.
10916 OLD_CPPFLAGS=$CPPFLAGS
10917 OLD_CFLAGS=$CFLAGS
10918 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
10919 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
10920 cat >conftest.$ac_ext <<_ACEOF
10921/* confdefs.h. */
10922_ACEOF
10923cat confdefs.h >>conftest.$ac_ext
10924cat >>conftest.$ac_ext <<_ACEOF
10925/* end confdefs.h. */
10926#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
10927int
10928main ()
10929{
10930int x = 5;
10931 ;
10932 return 0;
10933}
10934_ACEOF
10935rm -f conftest.$ac_objext
10936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10937 (eval $ac_compile) 2>conftest.er1
10938 ac_status=$?
10939 grep -v '^ *+' conftest.er1 >conftest.err
10940 rm -f conftest.er1
10941 cat conftest.err >&5
10942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10943 (exit $ac_status); } &&
9adfabc2 10944 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4693dbc9
SM
10945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10946 (eval $ac_try) 2>&5
10947 ac_status=$?
10948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10949 (exit $ac_status); }; } &&
10950 { ac_try='test -s conftest.$ac_objext'
10951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10952 (eval $ac_try) 2>&5
10953 ac_status=$?
10954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10955 (exit $ac_status); }; }; then
10956 emacs_cv_lesstif=yes
10957else
10958 echo "$as_me: failed program was:" >&5
10959sed 's/^/| /' conftest.$ac_ext >&5
10960
10961emacs_cv_lesstif=no
10962fi
10963rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10964fi
10965echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
10966echo "${ECHO_T}$emacs_cv_lesstif" >&6
10967 if test $emacs_cv_lesstif = yes; then
10968 # Make sure this -I option remains in CPPFLAGS after it is set
10969 # back to REAL_CPPFLAGS.
10970 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
10971 # have those other -I options anyway. Ultimately, having this
10972 # directory ultimately in CPPFLAGS will be enough.
10973 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
10974 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
10975 else
10976 CFLAGS=$OLD_CFLAGS
10977 CPPFLAGS=$OLD_CPPFLAGS
10978 fi
98418dba
CW
10979 fi
10980fi
10981
10982### Is -lXaw3d available?
10983HAVE_XAW3D=no
10984if test "${HAVE_X11}" = "yes"; then
10985 if test "${USE_X_TOOLKIT}" != "none"; then
22044edf 10986 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
10987echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
10988if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
10989 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 10990else
22044edf 10991 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10992/* confdefs.h. */
10993_ACEOF
10994cat confdefs.h >>conftest.$ac_ext
10995cat >>conftest.$ac_ext <<_ACEOF
10996/* end confdefs.h. */
98418dba 10997#include <X11/Xaw3d/Scrollbar.h>
503d2be0 10998_ACEOF
c0d27fcc 10999if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11000 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11001 ac_status=$?
6bae0ccf 11002 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11003 rm -f conftest.er1
11004 cat conftest.err >&5
c0d27fcc 11005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11006 (exit $ac_status); } >/dev/null; then
11007 if test -s conftest.err; then
11008 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11009 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
11010 else
11011 ac_cpp_err=
11012 fi
11013else
11014 ac_cpp_err=yes
11015fi
11016if test -z "$ac_cpp_err"; then
22044edf 11017 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 11018else
503d2be0 11019 echo "$as_me: failed program was:" >&5
19650fd6
AS
11020sed 's/^/| /' conftest.$ac_ext >&5
11021
22044edf 11022 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 11023fi
503d2be0 11024rm -f conftest.err conftest.$ac_ext
98418dba 11025fi
c0d27fcc 11026echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 11027echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 11028if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 11029 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
11030echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
11031if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
11032 echo $ECHO_N "(cached) $ECHO_C" >&6
11033else
11034 ac_check_lib_save_LIBS=$LIBS
11035LIBS="-lXaw3d $LIBS"
11036cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11037/* confdefs.h. */
11038_ACEOF
11039cat confdefs.h >>conftest.$ac_ext
11040cat >>conftest.$ac_ext <<_ACEOF
11041/* end confdefs.h. */
98418dba
CW
11042
11043/* Override any gcc2 internal prototype to avoid an error. */
11044#ifdef __cplusplus
11045extern "C"
11046#endif
11047/* We use char because int might match the return type of a gcc2
11048 builtin and then its argument prototype would still apply. */
11049char XawScrollbarSetThumb ();
503d2be0
AS
11050int
11051main ()
11052{
98418dba 11053XawScrollbarSetThumb ();
503d2be0
AS
11054 ;
11055 return 0;
11056}
11057_ACEOF
11058rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11059if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11060 (eval $ac_link) 2>conftest.er1
503d2be0 11061 ac_status=$?
35996d22
AS
11062 grep -v '^ *+' conftest.er1 >conftest.err
11063 rm -f conftest.er1
11064 cat conftest.err >&5
c0d27fcc 11065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11066 (exit $ac_status); } &&
9adfabc2 11067 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11069 (eval $ac_try) 2>&5
11070 ac_status=$?
11071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11072 (exit $ac_status); }; } &&
11073 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11075 (eval $ac_try) 2>&5
11076 ac_status=$?
c0d27fcc 11077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11078 (exit $ac_status); }; }; then
98418dba 11079 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 11080else
503d2be0 11081 echo "$as_me: failed program was:" >&5
19650fd6
AS
11082sed 's/^/| /' conftest.$ac_ext >&5
11083
98418dba 11084ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 11085fi
35996d22
AS
11086rm -f conftest.err conftest.$ac_objext \
11087 conftest$ac_exeext conftest.$ac_ext
98418dba 11088LIBS=$ac_check_lib_save_LIBS
ba4481b5 11089fi
c0d27fcc 11090echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
11091echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
11092if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
11093 HAVE_XAW3D=yes
ba4481b5 11094fi
503d2be0 11095
ba4481b5
DL
11096fi
11097
c0d27fcc 11098
98418dba 11099 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 11100
c0d27fcc 11101cat >>confdefs.h <<\_ACEOF
98418dba 11102#define HAVE_XAW3D 1
c0d27fcc 11103_ACEOF
98418dba 11104
ba4481b5 11105 fi
98418dba 11106 fi
ba4481b5
DL
11107fi
11108
c0d27fcc
MR
11109
11110
98418dba
CW
11111USE_TOOLKIT_SCROLL_BARS=no
11112if test "${with_toolkit_scroll_bars}" != "no"; then
11113 if test "${USE_X_TOOLKIT}" != "none"; then
11114 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 11115 cat >>confdefs.h <<\_ACEOF
98418dba 11116#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11117_ACEOF
98418dba
CW
11118
11119 HAVE_XAW3D=no
11120 USE_TOOLKIT_SCROLL_BARS=yes
11121 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 11122 cat >>confdefs.h <<\_ACEOF
98418dba 11123#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11124_ACEOF
98418dba
CW
11125
11126 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 11127 fi
488dd4c4
JD
11128 elif test "${HAVE_GTK}" = "yes"; then
11129 cat >>confdefs.h <<\_ACEOF
11130#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
11131_ACEOF
11132
11133 USE_TOOLKIT_SCROLL_BARS=yes
11134 elif test "${HAVE_CARBON}" = "yes"; then
11135 cat >>confdefs.h <<\_ACEOF
11136#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
11137_ACEOF
11138
11139 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
11140 fi
11141fi
11142
abd39b57 11143cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
11144/* confdefs.h. */
11145_ACEOF
11146cat confdefs.h >>conftest.$ac_ext
11147cat >>conftest.$ac_ext <<_ACEOF
11148/* end confdefs.h. */
11149
11150 #include <X11/Xlib.h>
11151 #include <X11/Xresource.h>
11152int
11153main ()
11154{
11155XIMProc callback;
11156 ;
11157 return 0;
11158}
11159_ACEOF
11160rm -f conftest.$ac_objext
11161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11162 (eval $ac_compile) 2>conftest.er1
abd39b57 11163 ac_status=$?
35996d22
AS
11164 grep -v '^ *+' conftest.er1 >conftest.err
11165 rm -f conftest.er1
11166 cat conftest.err >&5
abd39b57
AC
11167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11168 (exit $ac_status); } &&
9adfabc2 11169 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11171 (eval $ac_try) 2>&5
11172 ac_status=$?
11173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11174 (exit $ac_status); }; } &&
11175 { ac_try='test -s conftest.$ac_objext'
abd39b57
AC
11176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11177 (eval $ac_try) 2>&5
11178 ac_status=$?
11179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11180 (exit $ac_status); }; }; then
11181 HAVE_XIM=yes
11182
11183cat >>confdefs.h <<\_ACEOF
11184#define HAVE_XIM 1
11185_ACEOF
11186
11187else
11188 echo "$as_me: failed program was:" >&5
11189sed 's/^/| /' conftest.$ac_ext >&5
11190
11191HAVE_XIM=no
11192fi
35996d22 11193rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 11194
c0d27fcc 11195
98418dba 11196if test "${with_xim}" != "no"; then
b936fae4 11197
c0d27fcc 11198cat >>confdefs.h <<\_ACEOF
98418dba 11199#define USE_XIM 1
c0d27fcc 11200_ACEOF
98418dba 11201
793fa0d7 11202fi
abd39b57
AC
11203
11204
11205if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
11206 late_CFLAGS=$CFLAGS
11207 if test "$GCC" = yes; then
11208 CFLAGS="$CFLAGS --pedantic-errors"
11209 fi
cffcede7 11210 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11211/* confdefs.h. */
11212_ACEOF
11213cat confdefs.h >>conftest.$ac_ext
11214cat >>conftest.$ac_ext <<_ACEOF
11215/* end confdefs.h. */
cffcede7
JD
11216
11217#include <X11/Xlib.h>
11218#include <X11/Xresource.h>
11219int
11220main ()
11221{
11222Display *display;
11223XrmDatabase db;
11224char *res_name;
11225char *res_class;
11226XIMProc callback;
11227XPointer *client_data;
849d80cf
DL
11228#ifndef __GNUC__
11229/* If we're not using GCC, it's probably not XFree86, and this is
11230 probably right, but we can't use something like --pedantic-errors. */
11231extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11232 char*, XIMProc, XPointer*);
11233#endif
cffcede7
JD
11234(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11235 client_data);
11236 ;
11237 return 0;
11238}
11239_ACEOF
11240rm -f conftest.$ac_objext
11241if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11242 (eval $ac_compile) 2>conftest.er1
cffcede7 11243 ac_status=$?
35996d22
AS
11244 grep -v '^ *+' conftest.er1 >conftest.err
11245 rm -f conftest.er1
11246 cat conftest.err >&5
cffcede7
JD
11247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11248 (exit $ac_status); } &&
9adfabc2 11249 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11251 (eval $ac_try) 2>&5
11252 ac_status=$?
11253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11254 (exit $ac_status); }; } &&
11255 { ac_try='test -s conftest.$ac_objext'
cffcede7
JD
11256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11257 (eval $ac_try) 2>&5
11258 ac_status=$?
11259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11260 (exit $ac_status); }; }; then
11261 emacs_cv_arg6_star=yes
11262else
11263 echo "$as_me: failed program was:" >&5
19650fd6
AS
11264sed 's/^/| /' conftest.$ac_ext >&5
11265
cffcede7 11266fi
35996d22 11267rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
11268
11269 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 11270 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11271#define XRegisterIMInstantiateCallback_arg6 XPointer*
11272_ACEOF
11273
11274 else
f57bd967 11275 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11276#define XRegisterIMInstantiateCallback_arg6 XPointer
11277_ACEOF
11278
11279 fi
849d80cf 11280 CFLAGS=$late_CFLAGS
98418dba
CW
11281fi
11282
11283### Use -lXpm if available, unless `--with-xpm=no'.
11284HAVE_XPM=no
11285if test "${HAVE_X11}" = "yes"; then
11286 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
11287 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11288 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
11289echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11290if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11291 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11292fi
11293echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
11294echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 11295else
c0d27fcc
MR
11296 # Is the header compilable?
11297echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
11298echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
11299cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11300/* confdefs.h. */
11301_ACEOF
11302cat confdefs.h >>conftest.$ac_ext
11303cat >>conftest.$ac_ext <<_ACEOF
11304/* end confdefs.h. */
c0d27fcc
MR
11305$ac_includes_default
11306#include <X11/xpm.h>
11307_ACEOF
11308rm -f conftest.$ac_objext
11309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11310 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11311 ac_status=$?
35996d22
AS
11312 grep -v '^ *+' conftest.er1 >conftest.err
11313 rm -f conftest.er1
11314 cat conftest.err >&5
c0d27fcc
MR
11315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11316 (exit $ac_status); } &&
9adfabc2 11317 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11319 (eval $ac_try) 2>&5
11320 ac_status=$?
11321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11322 (exit $ac_status); }; } &&
11323 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11325 (eval $ac_try) 2>&5
11326 ac_status=$?
11327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11328 (exit $ac_status); }; }; then
11329 ac_header_compiler=yes
11330else
11331 echo "$as_me: failed program was:" >&5
19650fd6
AS
11332sed 's/^/| /' conftest.$ac_ext >&5
11333
c0d27fcc
MR
11334ac_header_compiler=no
11335fi
35996d22 11336rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11337echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11338echo "${ECHO_T}$ac_header_compiler" >&6
11339
11340# Is the header present?
11341echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
11342echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
11343cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11344/* confdefs.h. */
11345_ACEOF
11346cat confdefs.h >>conftest.$ac_ext
11347cat >>conftest.$ac_ext <<_ACEOF
11348/* end confdefs.h. */
98418dba
CW
11349#include <X11/xpm.h>
11350_ACEOF
c0d27fcc 11351if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11352 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11353 ac_status=$?
6bae0ccf 11354 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11355 rm -f conftest.er1
11356 cat conftest.err >&5
c0d27fcc 11357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11358 (exit $ac_status); } >/dev/null; then
11359 if test -s conftest.err; then
11360 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11361 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11362 else
11363 ac_cpp_err=
11364 fi
11365else
11366 ac_cpp_err=yes
11367fi
11368if test -z "$ac_cpp_err"; then
c0d27fcc 11369 ac_header_preproc=yes
98418dba
CW
11370else
11371 echo "$as_me: failed program was:" >&5
19650fd6
AS
11372sed 's/^/| /' conftest.$ac_ext >&5
11373
c0d27fcc 11374 ac_header_preproc=no
98418dba
CW
11375fi
11376rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11377echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11378echo "${ECHO_T}$ac_header_preproc" >&6
11379
11380# So? What about this header?
35996d22
AS
11381case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11382 yes:no: )
c0d27fcc
MR
11383 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
11384echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11385 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
11386echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
11387 ac_header_preproc=yes
19650fd6 11388 ;;
35996d22 11389 no:yes:* )
c0d27fcc
MR
11390 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
11391echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
35996d22
AS
11392 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
11393echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
11394 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
11395echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
11396 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
11397echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 11398 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
19650fd6 11399echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11400 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
11401echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11402 (
11403 cat <<\_ASBOX
35996d22
AS
11404## ------------------------------------------ ##
11405## Report this to the AC_PACKAGE_NAME lists. ##
11406## ------------------------------------------ ##
19650fd6
AS
11407_ASBOX
11408 ) |
11409 sed "s/^/$as_me: WARNING: /" >&2
11410 ;;
c0d27fcc
MR
11411esac
11412echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
11413echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11414if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11415 echo $ECHO_N "(cached) $ECHO_C" >&6
11416else
11417 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 11418fi
c0d27fcc 11419echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 11420echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
11421
11422fi
98418dba 11423if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 11424 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
11425echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
11426if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 11427 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11428else
98418dba
CW
11429 ac_check_lib_save_LIBS=$LIBS
11430LIBS="-lXpm -lX11 $LIBS"
11431cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11432/* confdefs.h. */
11433_ACEOF
11434cat confdefs.h >>conftest.$ac_ext
11435cat >>conftest.$ac_ext <<_ACEOF
11436/* end confdefs.h. */
98418dba 11437
ba4481b5 11438/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11439#ifdef __cplusplus
11440extern "C"
11441#endif
ba4481b5 11442/* We use char because int might match the return type of a gcc2
503d2be0 11443 builtin and then its argument prototype would still apply. */
98418dba 11444char XpmReadFileToPixmap ();
503d2be0
AS
11445int
11446main ()
11447{
98418dba 11448XpmReadFileToPixmap ();
503d2be0
AS
11449 ;
11450 return 0;
11451}
11452_ACEOF
11453rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11454if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11455 (eval $ac_link) 2>conftest.er1
503d2be0 11456 ac_status=$?
35996d22
AS
11457 grep -v '^ *+' conftest.er1 >conftest.err
11458 rm -f conftest.er1
11459 cat conftest.err >&5
c0d27fcc 11460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11461 (exit $ac_status); } &&
9adfabc2 11462 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11464 (eval $ac_try) 2>&5
11465 ac_status=$?
11466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11467 (exit $ac_status); }; } &&
11468 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11470 (eval $ac_try) 2>&5
11471 ac_status=$?
c0d27fcc 11472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11473 (exit $ac_status); }; }; then
98418dba 11474 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
11475else
11476 echo "$as_me: failed program was:" >&5
19650fd6
AS
11477sed 's/^/| /' conftest.$ac_ext >&5
11478
98418dba 11479ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 11480fi
35996d22
AS
11481rm -f conftest.err conftest.$ac_objext \
11482 conftest$ac_exeext conftest.$ac_ext
98418dba 11483LIBS=$ac_check_lib_save_LIBS
503d2be0 11484fi
c0d27fcc 11485echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
11486echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
11487if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
11488 HAVE_XPM=yes
ba4481b5
DL
11489fi
11490
98418dba
CW
11491fi
11492
c0d27fcc 11493
98418dba 11494 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11495 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
11496echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
11497 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11498/* confdefs.h. */
11499_ACEOF
11500cat confdefs.h >>conftest.$ac_ext
11501cat >>conftest.$ac_ext <<_ACEOF
11502/* end confdefs.h. */
98418dba
CW
11503#include "X11/xpm.h"
11504#ifndef XpmReturnAllocPixels
11505no_return_alloc_pixels
503d2be0 11506#endif
ba4481b5 11507
98418dba
CW
11508_ACEOF
11509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11510 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
11511 HAVE_XPM=no
11512else
11513 HAVE_XPM=yes
11514fi
11515rm -f conftest*
ba4481b5 11516
c0d27fcc 11517
98418dba 11518 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11519 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
11520echo "${ECHO_T}yes" >&6
11521 else
c0d27fcc 11522 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
11523echo "${ECHO_T}no" >&6
11524 fi
11525 fi
11526 fi
11527
11528 if test "${HAVE_XPM}" = "yes"; then
b936fae4 11529
c0d27fcc 11530cat >>confdefs.h <<\_ACEOF
98418dba 11531#define HAVE_XPM 1
c0d27fcc 11532_ACEOF
98418dba
CW
11533
11534 fi
11535fi
11536
11537### Use -ljpeg if available, unless `--with-jpeg=no'.
11538HAVE_JPEG=no
11539if test "${HAVE_X11}" = "yes"; then
11540 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
11541 if test "${ac_cv_header_jerror_h+set}" = set; then
11542 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
11543echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11544if test "${ac_cv_header_jerror_h+set}" = set; then
11545 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11546fi
11547echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
11548echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 11549else
c0d27fcc
MR
11550 # Is the header compilable?
11551echo "$as_me:$LINENO: checking jerror.h usability" >&5
11552echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
11553cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11554/* confdefs.h. */
11555_ACEOF
11556cat confdefs.h >>conftest.$ac_ext
11557cat >>conftest.$ac_ext <<_ACEOF
11558/* end confdefs.h. */
c0d27fcc
MR
11559$ac_includes_default
11560#include <jerror.h>
11561_ACEOF
11562rm -f conftest.$ac_objext
11563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11564 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11565 ac_status=$?
35996d22
AS
11566 grep -v '^ *+' conftest.er1 >conftest.err
11567 rm -f conftest.er1
11568 cat conftest.err >&5
c0d27fcc
MR
11569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11570 (exit $ac_status); } &&
9adfabc2 11571 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11573 (eval $ac_try) 2>&5
11574 ac_status=$?
11575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11576 (exit $ac_status); }; } &&
11577 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11579 (eval $ac_try) 2>&5
11580 ac_status=$?
11581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11582 (exit $ac_status); }; }; then
11583 ac_header_compiler=yes
11584else
11585 echo "$as_me: failed program was:" >&5
19650fd6
AS
11586sed 's/^/| /' conftest.$ac_ext >&5
11587
c0d27fcc
MR
11588ac_header_compiler=no
11589fi
35996d22 11590rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11591echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11592echo "${ECHO_T}$ac_header_compiler" >&6
11593
11594# Is the header present?
11595echo "$as_me:$LINENO: checking jerror.h presence" >&5
11596echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
11597cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11598/* confdefs.h. */
11599_ACEOF
11600cat confdefs.h >>conftest.$ac_ext
11601cat >>conftest.$ac_ext <<_ACEOF
11602/* end confdefs.h. */
98418dba
CW
11603#include <jerror.h>
11604_ACEOF
c0d27fcc 11605if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11606 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11607 ac_status=$?
6bae0ccf 11608 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11609 rm -f conftest.er1
11610 cat conftest.err >&5
c0d27fcc 11611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11612 (exit $ac_status); } >/dev/null; then
11613 if test -s conftest.err; then
11614 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11615 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11616 else
11617 ac_cpp_err=
11618 fi
11619else
11620 ac_cpp_err=yes
503d2be0 11621fi
98418dba 11622if test -z "$ac_cpp_err"; then
c0d27fcc 11623 ac_header_preproc=yes
ba4481b5 11624else
98418dba 11625 echo "$as_me: failed program was:" >&5
19650fd6
AS
11626sed 's/^/| /' conftest.$ac_ext >&5
11627
c0d27fcc 11628 ac_header_preproc=no
98418dba
CW
11629fi
11630rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11631echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11632echo "${ECHO_T}$ac_header_preproc" >&6
11633
11634# So? What about this header?
35996d22
AS
11635case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11636 yes:no: )
c0d27fcc
MR
11637 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
11638echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11639 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
11640echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
11641 ac_header_preproc=yes
19650fd6 11642 ;;
35996d22 11643 no:yes:* )
c0d27fcc
MR
11644 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
11645echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
35996d22
AS
11646 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
11647echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
11648 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
11649echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
11650 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
11651echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 11652 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 11653echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11654 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
11655echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11656 (
11657 cat <<\_ASBOX
35996d22
AS
11658## ------------------------------------------ ##
11659## Report this to the AC_PACKAGE_NAME lists. ##
11660## ------------------------------------------ ##
19650fd6
AS
11661_ASBOX
11662 ) |
11663 sed "s/^/$as_me: WARNING: /" >&2
11664 ;;
c0d27fcc
MR
11665esac
11666echo "$as_me:$LINENO: checking for jerror.h" >&5
11667echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11668if test "${ac_cv_header_jerror_h+set}" = set; then
11669 echo $ECHO_N "(cached) $ECHO_C" >&6
11670else
11671 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 11672fi
c0d27fcc 11673echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 11674echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
11675
11676fi
98418dba 11677if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 11678 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
11679echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
11680if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 11681 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11682else
98418dba
CW
11683 ac_check_lib_save_LIBS=$LIBS
11684LIBS="-ljpeg $LIBS"
11685cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11686/* confdefs.h. */
11687_ACEOF
11688cat confdefs.h >>conftest.$ac_ext
11689cat >>conftest.$ac_ext <<_ACEOF
11690/* end confdefs.h. */
98418dba
CW
11691
11692/* Override any gcc2 internal prototype to avoid an error. */
11693#ifdef __cplusplus
11694extern "C"
11695#endif
11696/* We use char because int might match the return type of a gcc2
11697 builtin and then its argument prototype would still apply. */
11698char jpeg_destroy_compress ();
503d2be0
AS
11699int
11700main ()
11701{
98418dba 11702jpeg_destroy_compress ();
503d2be0
AS
11703 ;
11704 return 0;
11705}
11706_ACEOF
11707rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11708if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11709 (eval $ac_link) 2>conftest.er1
503d2be0 11710 ac_status=$?
35996d22
AS
11711 grep -v '^ *+' conftest.er1 >conftest.err
11712 rm -f conftest.er1
11713 cat conftest.err >&5
c0d27fcc 11714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11715 (exit $ac_status); } &&
9adfabc2 11716 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11718 (eval $ac_try) 2>&5
11719 ac_status=$?
11720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11721 (exit $ac_status); }; } &&
11722 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11724 (eval $ac_try) 2>&5
11725 ac_status=$?
c0d27fcc 11726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11727 (exit $ac_status); }; }; then
98418dba 11728 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 11729else
503d2be0 11730 echo "$as_me: failed program was:" >&5
19650fd6
AS
11731sed 's/^/| /' conftest.$ac_ext >&5
11732
98418dba 11733ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 11734fi
35996d22
AS
11735rm -f conftest.err conftest.$ac_objext \
11736 conftest$ac_exeext conftest.$ac_ext
98418dba 11737LIBS=$ac_check_lib_save_LIBS
ba4481b5 11738fi
c0d27fcc 11739echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
11740echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
11741if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
11742 HAVE_JPEG=yes
ba4481b5 11743fi
98418dba 11744
ba4481b5 11745fi
98418dba 11746
c0d27fcc 11747
ba4481b5 11748 fi
ba4481b5 11749
c0d27fcc 11750
98418dba 11751 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 11752 cat >>confdefs.h <<\_ACEOF
98418dba 11753#define HAVE_JPEG 1
c0d27fcc 11754_ACEOF
98418dba
CW
11755
11756 cat >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. */
22044edf 11762#include <jpeglib.h>
98418dba
CW
11763 version=JPEG_LIB_VERSION
11764
11765_ACEOF
11766if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11767 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 11768 cat >>confdefs.h <<\_ACEOF
98418dba 11769#define HAVE_JPEG 1
c0d27fcc 11770_ACEOF
ba4481b5 11771
98418dba 11772else
c0d27fcc 11773 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
11774echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
11775 HAVE_JPEG=no
ba4481b5 11776fi
98418dba 11777rm -f conftest*
ba4481b5 11778
98418dba
CW
11779 fi
11780fi
503d2be0 11781
98418dba
CW
11782### Use -lpng if available, unless `--with-png=no'.
11783HAVE_PNG=no
11784if test "${HAVE_X11}" = "yes"; then
11785 if test "${with_png}" != "no"; then
f57bd967
DL
11786 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
11787 # in /usr/include/libpng.
11788
11789
11790for ac_header in png.h libpng/png.h
11791do
11792as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11793if eval "test \"\${$as_ac_Header+set}\" = set"; then
11794 echo "$as_me:$LINENO: checking for $ac_header" >&5
11795echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11796if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 11797 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 11798fi
f57bd967
DL
11799echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11800echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
503d2be0 11801else
c0d27fcc 11802 # Is the header compilable?
f57bd967
DL
11803echo "$as_me:$LINENO: checking $ac_header usability" >&5
11804echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
c0d27fcc 11805cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11806/* confdefs.h. */
11807_ACEOF
11808cat confdefs.h >>conftest.$ac_ext
11809cat >>conftest.$ac_ext <<_ACEOF
11810/* end confdefs.h. */
c0d27fcc 11811$ac_includes_default
f57bd967 11812#include <$ac_header>
c0d27fcc
MR
11813_ACEOF
11814rm -f conftest.$ac_objext
11815if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11816 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11817 ac_status=$?
35996d22
AS
11818 grep -v '^ *+' conftest.er1 >conftest.err
11819 rm -f conftest.er1
11820 cat conftest.err >&5
c0d27fcc
MR
11821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11822 (exit $ac_status); } &&
9adfabc2 11823 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11825 (eval $ac_try) 2>&5
11826 ac_status=$?
11827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11828 (exit $ac_status); }; } &&
11829 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11831 (eval $ac_try) 2>&5
11832 ac_status=$?
11833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11834 (exit $ac_status); }; }; then
11835 ac_header_compiler=yes
11836else
11837 echo "$as_me: failed program was:" >&5
19650fd6
AS
11838sed 's/^/| /' conftest.$ac_ext >&5
11839
c0d27fcc
MR
11840ac_header_compiler=no
11841fi
35996d22 11842rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11843echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11844echo "${ECHO_T}$ac_header_compiler" >&6
11845
11846# Is the header present?
f57bd967
DL
11847echo "$as_me:$LINENO: checking $ac_header presence" >&5
11848echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
c0d27fcc 11849cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11850/* confdefs.h. */
11851_ACEOF
11852cat confdefs.h >>conftest.$ac_ext
11853cat >>conftest.$ac_ext <<_ACEOF
11854/* end confdefs.h. */
f57bd967 11855#include <$ac_header>
503d2be0 11856_ACEOF
c0d27fcc 11857if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11858 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11859 ac_status=$?
6bae0ccf 11860 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11861 rm -f conftest.er1
11862 cat conftest.err >&5
c0d27fcc 11863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11864 (exit $ac_status); } >/dev/null; then
11865 if test -s conftest.err; then
11866 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11867 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
11868 else
11869 ac_cpp_err=
11870 fi
11871else
11872 ac_cpp_err=yes
11873fi
11874if test -z "$ac_cpp_err"; then
c0d27fcc 11875 ac_header_preproc=yes
503d2be0
AS
11876else
11877 echo "$as_me: failed program was:" >&5
19650fd6
AS
11878sed 's/^/| /' conftest.$ac_ext >&5
11879
c0d27fcc 11880 ac_header_preproc=no
ba4481b5 11881fi
503d2be0 11882rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11883echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11884echo "${ECHO_T}$ac_header_preproc" >&6
11885
11886# So? What about this header?
35996d22
AS
11887case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11888 yes:no: )
f57bd967
DL
11889 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11890echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11891 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11892echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11893 ac_header_preproc=yes
19650fd6 11894 ;;
35996d22 11895 no:yes:* )
f57bd967
DL
11896 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11897echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
11898 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11899echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11900 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11901echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11902 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11903echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 11904 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 11905echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11906 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11907echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11908 (
11909 cat <<\_ASBOX
35996d22
AS
11910## ------------------------------------------ ##
11911## Report this to the AC_PACKAGE_NAME lists. ##
11912## ------------------------------------------ ##
19650fd6
AS
11913_ASBOX
11914 ) |
11915 sed "s/^/$as_me: WARNING: /" >&2
11916 ;;
c0d27fcc 11917esac
f57bd967
DL
11918echo "$as_me:$LINENO: checking for $ac_header" >&5
11919echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11920if eval "test \"\${$as_ac_Header+set}\" = set"; then
c0d27fcc
MR
11921 echo $ECHO_N "(cached) $ECHO_C" >&6
11922else
35996d22 11923 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967
DL
11924fi
11925echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11926echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11927
ba4481b5 11928fi
f57bd967
DL
11929if test `eval echo '${'$as_ac_Header'}'` = yes; then
11930 cat >>confdefs.h <<_ACEOF
11931#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11932_ACEOF
c0d27fcc
MR
11933
11934fi
f57bd967
DL
11935
11936done
11937
11938 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
11939 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
11940echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
11941if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 11942 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11943else
98418dba
CW
11944 ac_check_lib_save_LIBS=$LIBS
11945LIBS="-lpng -lz -lm $LIBS"
11946cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11947/* confdefs.h. */
11948_ACEOF
11949cat confdefs.h >>conftest.$ac_ext
11950cat >>conftest.$ac_ext <<_ACEOF
11951/* end confdefs.h. */
98418dba 11952
ba4481b5 11953/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11954#ifdef __cplusplus
11955extern "C"
11956#endif
ba4481b5 11957/* We use char because int might match the return type of a gcc2
503d2be0 11958 builtin and then its argument prototype would still apply. */
98418dba 11959char png_get_channels ();
503d2be0
AS
11960int
11961main ()
11962{
98418dba 11963png_get_channels ();
503d2be0
AS
11964 ;
11965 return 0;
11966}
11967_ACEOF
11968rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11969if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11970 (eval $ac_link) 2>conftest.er1
503d2be0 11971 ac_status=$?
35996d22
AS
11972 grep -v '^ *+' conftest.er1 >conftest.err
11973 rm -f conftest.er1
11974 cat conftest.err >&5
c0d27fcc 11975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11976 (exit $ac_status); } &&
9adfabc2 11977 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11979 (eval $ac_try) 2>&5
11980 ac_status=$?
11981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11982 (exit $ac_status); }; } &&
11983 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11985 (eval $ac_try) 2>&5
11986 ac_status=$?
c0d27fcc 11987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11988 (exit $ac_status); }; }; then
98418dba 11989 ac_cv_lib_png_png_get_channels=yes
73b77ee5 11990else
98418dba 11991 echo "$as_me: failed program was:" >&5
19650fd6
AS
11992sed 's/^/| /' conftest.$ac_ext >&5
11993
98418dba 11994ac_cv_lib_png_png_get_channels=no
73b77ee5 11995fi
35996d22
AS
11996rm -f conftest.err conftest.$ac_objext \
11997 conftest$ac_exeext conftest.$ac_ext
98418dba 11998LIBS=$ac_check_lib_save_LIBS
73b77ee5 11999fi
c0d27fcc 12000echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
12001echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
12002if test $ac_cv_lib_png_png_get_channels = yes; then
12003 HAVE_PNG=yes
73b77ee5 12004fi
503d2be0 12005
f57bd967 12006 fi
98418dba
CW
12007 fi
12008
12009 if test "${HAVE_PNG}" = "yes"; then
b936fae4 12010
c0d27fcc 12011cat >>confdefs.h <<\_ACEOF
98418dba 12012#define HAVE_PNG 1
c0d27fcc 12013_ACEOF
73b77ee5 12014
98418dba 12015 fi
73b77ee5
GM
12016fi
12017
98418dba
CW
12018### Use -ltiff if available, unless `--with-tiff=no'.
12019HAVE_TIFF=no
12020if test "${HAVE_X11}" = "yes"; then
12021 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
12022 if test "${ac_cv_header_tiffio_h+set}" = set; then
12023 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
12024echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12025if test "${ac_cv_header_tiffio_h+set}" = set; then
12026 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12027fi
12028echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
12029echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 12030else
c0d27fcc
MR
12031 # Is the header compilable?
12032echo "$as_me:$LINENO: checking tiffio.h usability" >&5
12033echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
12034cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12035/* confdefs.h. */
12036_ACEOF
12037cat confdefs.h >>conftest.$ac_ext
12038cat >>conftest.$ac_ext <<_ACEOF
12039/* end confdefs.h. */
c0d27fcc
MR
12040$ac_includes_default
12041#include <tiffio.h>
12042_ACEOF
12043rm -f conftest.$ac_objext
12044if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12045 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12046 ac_status=$?
35996d22
AS
12047 grep -v '^ *+' conftest.er1 >conftest.err
12048 rm -f conftest.er1
12049 cat conftest.err >&5
c0d27fcc
MR
12050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12051 (exit $ac_status); } &&
9adfabc2 12052 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
12053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12054 (eval $ac_try) 2>&5
12055 ac_status=$?
12056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12057 (exit $ac_status); }; } &&
12058 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12060 (eval $ac_try) 2>&5
12061 ac_status=$?
12062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12063 (exit $ac_status); }; }; then
12064 ac_header_compiler=yes
12065else
12066 echo "$as_me: failed program was:" >&5
19650fd6
AS
12067sed 's/^/| /' conftest.$ac_ext >&5
12068
c0d27fcc
MR
12069ac_header_compiler=no
12070fi
35996d22 12071rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12072echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12073echo "${ECHO_T}$ac_header_compiler" >&6
12074
12075# Is the header present?
12076echo "$as_me:$LINENO: checking tiffio.h presence" >&5
12077echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
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. */
98418dba
CW
12084#include <tiffio.h>
12085_ACEOF
c0d27fcc 12086if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12087 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12088 ac_status=$?
6bae0ccf 12089 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12090 rm -f conftest.er1
12091 cat conftest.err >&5
c0d27fcc 12092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12093 (exit $ac_status); } >/dev/null; then
12094 if test -s conftest.err; then
12095 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12096 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12097 else
12098 ac_cpp_err=
12099 fi
12100else
12101 ac_cpp_err=yes
12102fi
12103if test -z "$ac_cpp_err"; then
c0d27fcc 12104 ac_header_preproc=yes
98418dba
CW
12105else
12106 echo "$as_me: failed program was:" >&5
19650fd6
AS
12107sed 's/^/| /' conftest.$ac_ext >&5
12108
c0d27fcc 12109 ac_header_preproc=no
98418dba
CW
12110fi
12111rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12112echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12113echo "${ECHO_T}$ac_header_preproc" >&6
12114
12115# So? What about this header?
35996d22
AS
12116case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12117 yes:no: )
c0d27fcc
MR
12118 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
12119echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12120 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
12121echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
12122 ac_header_preproc=yes
19650fd6 12123 ;;
35996d22 12124 no:yes:* )
c0d27fcc
MR
12125 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
12126echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
35996d22
AS
12127 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
12128echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
12129 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
12130echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
12131 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
12132echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12133 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 12134echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12135 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
12136echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12137 (
12138 cat <<\_ASBOX
35996d22
AS
12139## ------------------------------------------ ##
12140## Report this to the AC_PACKAGE_NAME lists. ##
12141## ------------------------------------------ ##
19650fd6
AS
12142_ASBOX
12143 ) |
12144 sed "s/^/$as_me: WARNING: /" >&2
12145 ;;
c0d27fcc
MR
12146esac
12147echo "$as_me:$LINENO: checking for tiffio.h" >&5
12148echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12149if test "${ac_cv_header_tiffio_h+set}" = set; then
12150 echo $ECHO_N "(cached) $ECHO_C" >&6
12151else
12152 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 12153fi
c0d27fcc 12154echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 12155echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
12156
12157fi
98418dba
CW
12158if test $ac_cv_header_tiffio_h = yes; then
12159 tifflibs="-lz -lm"
12160 # At least one tiff package requires the jpeg library.
12161 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 12162 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
12163echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
12164if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 12165 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12166else
503d2be0 12167 ac_check_lib_save_LIBS=$LIBS
98418dba 12168LIBS="-ltiff $tifflibs $LIBS"
503d2be0 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. */
503d2be0 12175
73b77ee5 12176/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12177#ifdef __cplusplus
12178extern "C"
12179#endif
73b77ee5 12180/* We use char because int might match the return type of a gcc2
503d2be0 12181 builtin and then its argument prototype would still apply. */
98418dba 12182char TIFFGetVersion ();
503d2be0
AS
12183int
12184main ()
12185{
98418dba 12186TIFFGetVersion ();
503d2be0
AS
12187 ;
12188 return 0;
12189}
12190_ACEOF
12191rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12192if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12193 (eval $ac_link) 2>conftest.er1
503d2be0 12194 ac_status=$?
35996d22
AS
12195 grep -v '^ *+' conftest.er1 >conftest.err
12196 rm -f conftest.er1
12197 cat conftest.err >&5
c0d27fcc 12198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12199 (exit $ac_status); } &&
9adfabc2 12200 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
12201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12202 (eval $ac_try) 2>&5
12203 ac_status=$?
12204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12205 (exit $ac_status); }; } &&
12206 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12208 (eval $ac_try) 2>&5
12209 ac_status=$?
c0d27fcc 12210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12211 (exit $ac_status); }; }; then
98418dba 12212 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
12213else
12214 echo "$as_me: failed program was:" >&5
19650fd6
AS
12215sed 's/^/| /' conftest.$ac_ext >&5
12216
98418dba 12217ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 12218fi
35996d22
AS
12219rm -f conftest.err conftest.$ac_objext \
12220 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12221LIBS=$ac_check_lib_save_LIBS
12222fi
c0d27fcc 12223echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
12224echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
12225if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
12226 HAVE_TIFF=yes
12227fi
12228
12229fi
73b77ee5 12230
c0d27fcc 12231
98418dba
CW
12232 fi
12233
12234 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 12235
c0d27fcc 12236cat >>confdefs.h <<\_ACEOF
98418dba 12237#define HAVE_TIFF 1
c0d27fcc 12238_ACEOF
98418dba
CW
12239
12240 fi
73b77ee5
GM
12241fi
12242
98418dba
CW
12243### Use -lgif if available, unless `--with-gif=no'.
12244HAVE_GIF=no
12245if test "${HAVE_X11}" = "yes"; then
12246 if test "${with_gif}" != "no"; then
c0d27fcc
MR
12247 if test "${ac_cv_header_gif_lib_h+set}" = set; then
12248 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
12249echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12250if test "${ac_cv_header_gif_lib_h+set}" = set; then
12251 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12252fi
12253echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
12254echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 12255else
c0d27fcc
MR
12256 # Is the header compilable?
12257echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
12258echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
12259cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12260/* confdefs.h. */
12261_ACEOF
12262cat confdefs.h >>conftest.$ac_ext
12263cat >>conftest.$ac_ext <<_ACEOF
12264/* end confdefs.h. */
c0d27fcc
MR
12265$ac_includes_default
12266#include <gif_lib.h>
12267_ACEOF
12268rm -f conftest.$ac_objext
12269if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12270 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12271 ac_status=$?
35996d22
AS
12272 grep -v '^ *+' conftest.er1 >conftest.err
12273 rm -f conftest.er1
12274 cat conftest.err >&5
c0d27fcc
MR
12275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12276 (exit $ac_status); } &&
9adfabc2 12277 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
12278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12279 (eval $ac_try) 2>&5
12280 ac_status=$?
12281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12282 (exit $ac_status); }; } &&
12283 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12285 (eval $ac_try) 2>&5
12286 ac_status=$?
12287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12288 (exit $ac_status); }; }; then
12289 ac_header_compiler=yes
12290else
12291 echo "$as_me: failed program was:" >&5
19650fd6
AS
12292sed 's/^/| /' conftest.$ac_ext >&5
12293
c0d27fcc
MR
12294ac_header_compiler=no
12295fi
35996d22 12296rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12297echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12298echo "${ECHO_T}$ac_header_compiler" >&6
12299
12300# Is the header present?
12301echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
12302echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
12303cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12304/* confdefs.h. */
12305_ACEOF
12306cat confdefs.h >>conftest.$ac_ext
12307cat >>conftest.$ac_ext <<_ACEOF
12308/* end confdefs.h. */
98418dba
CW
12309#include <gif_lib.h>
12310_ACEOF
c0d27fcc 12311if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12312 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12313 ac_status=$?
6bae0ccf 12314 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12315 rm -f conftest.er1
12316 cat conftest.err >&5
c0d27fcc 12317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12318 (exit $ac_status); } >/dev/null; then
12319 if test -s conftest.err; then
12320 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12321 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12322 else
12323 ac_cpp_err=
12324 fi
12325else
12326 ac_cpp_err=yes
12327fi
12328if test -z "$ac_cpp_err"; then
c0d27fcc 12329 ac_header_preproc=yes
98418dba
CW
12330else
12331 echo "$as_me: failed program was:" >&5
19650fd6
AS
12332sed 's/^/| /' conftest.$ac_ext >&5
12333
c0d27fcc 12334 ac_header_preproc=no
98418dba
CW
12335fi
12336rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12337echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12338echo "${ECHO_T}$ac_header_preproc" >&6
12339
12340# So? What about this header?
35996d22
AS
12341case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12342 yes:no: )
c0d27fcc
MR
12343 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12344echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12345 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
12346echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
12347 ac_header_preproc=yes
19650fd6 12348 ;;
35996d22 12349 no:yes:* )
c0d27fcc
MR
12350 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
12351echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
35996d22
AS
12352 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
12353echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
12354 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
12355echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
12356 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
12357echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12358 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 12359echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12360 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
12361echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12362 (
12363 cat <<\_ASBOX
35996d22
AS
12364## ------------------------------------------ ##
12365## Report this to the AC_PACKAGE_NAME lists. ##
12366## ------------------------------------------ ##
19650fd6
AS
12367_ASBOX
12368 ) |
12369 sed "s/^/$as_me: WARNING: /" >&2
12370 ;;
c0d27fcc
MR
12371esac
12372echo "$as_me:$LINENO: checking for gif_lib.h" >&5
12373echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12374if test "${ac_cv_header_gif_lib_h+set}" = set; then
12375 echo $ECHO_N "(cached) $ECHO_C" >&6
12376else
12377 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 12378fi
c0d27fcc 12379echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 12380echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
12381
12382fi
98418dba
CW
12383if test $ac_cv_header_gif_lib_h = yes; then
12384 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12385# Earlier versions can crash Emacs.
c0d27fcc 12386 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
12387echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
12388if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 12389 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12390else
503d2be0 12391 ac_check_lib_save_LIBS=$LIBS
98418dba 12392LIBS="-lungif $LIBS"
503d2be0 12393cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12394/* confdefs.h. */
12395_ACEOF
12396cat confdefs.h >>conftest.$ac_ext
12397cat >>conftest.$ac_ext <<_ACEOF
12398/* end confdefs.h. */
73b77ee5 12399
98418dba
CW
12400/* Override any gcc2 internal prototype to avoid an error. */
12401#ifdef __cplusplus
12402extern "C"
12403#endif
12404/* We use char because int might match the return type of a gcc2
12405 builtin and then its argument prototype would still apply. */
12406char EGifPutExtensionLast ();
503d2be0
AS
12407int
12408main ()
12409{
98418dba 12410EGifPutExtensionLast ();
503d2be0
AS
12411 ;
12412 return 0;
12413}
12414_ACEOF
12415rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12416if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12417 (eval $ac_link) 2>conftest.er1
503d2be0 12418 ac_status=$?
35996d22
AS
12419 grep -v '^ *+' conftest.er1 >conftest.err
12420 rm -f conftest.er1
12421 cat conftest.err >&5
c0d27fcc 12422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12423 (exit $ac_status); } &&
9adfabc2 12424 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
c0d27fcc 12425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
12426 (eval $ac_try) 2>&5
12427 ac_status=$?
c0d27fcc 12428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
12429 (exit $ac_status); }; } &&
12430 { ac_try='test -s conftest$ac_exeext'
12431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12432 (eval $ac_try) 2>&5
12433 ac_status=$?
12434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12435 (exit $ac_status); }; }; then
12436 ac_cv_lib_ungif_EGifPutExtensionLast=yes
12437else
98418dba 12438 echo "$as_me: failed program was:" >&5
19650fd6
AS
12439sed 's/^/| /' conftest.$ac_ext >&5
12440
98418dba
CW
12441ac_cv_lib_ungif_EGifPutExtensionLast=no
12442fi
35996d22
AS
12443rm -f conftest.err conftest.$ac_objext \
12444 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12445LIBS=$ac_check_lib_save_LIBS
12446fi
c0d27fcc 12447echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
12448echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
12449if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
12450 HAVE_GIF=yes
12451fi
12452
12453fi
12454
c0d27fcc 12455
98418dba
CW
12456 fi
12457
12458 if test "${HAVE_GIF}" = "yes"; then
b936fae4 12459
c0d27fcc 12460cat >>confdefs.h <<\_ACEOF
98418dba 12461#define HAVE_GIF 1
c0d27fcc 12462_ACEOF
98418dba
CW
12463
12464 fi
12465fi
12466
cef11da2
ST
12467if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12468 echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12469echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12470if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12471 echo $ECHO_N "(cached) $ECHO_C" >&6
12472fi
12473echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12474echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12475else
12476 # Is the header compilable?
12477echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
12478echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6
12479cat >conftest.$ac_ext <<_ACEOF
12480/* confdefs.h. */
12481_ACEOF
12482cat confdefs.h >>conftest.$ac_ext
12483cat >>conftest.$ac_ext <<_ACEOF
12484/* end confdefs.h. */
12485$ac_includes_default
12486#include <malloc/malloc.h>
12487_ACEOF
12488rm -f conftest.$ac_objext
12489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12490 (eval $ac_compile) 2>conftest.er1
12491 ac_status=$?
12492 grep -v '^ *+' conftest.er1 >conftest.err
12493 rm -f conftest.er1
12494 cat conftest.err >&5
12495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12496 (exit $ac_status); } &&
9adfabc2 12497 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
cef11da2
ST
12498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12499 (eval $ac_try) 2>&5
12500 ac_status=$?
12501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12502 (exit $ac_status); }; } &&
12503 { ac_try='test -s conftest.$ac_objext'
12504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12505 (eval $ac_try) 2>&5
12506 ac_status=$?
12507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12508 (exit $ac_status); }; }; then
12509 ac_header_compiler=yes
12510else
12511 echo "$as_me: failed program was:" >&5
12512sed 's/^/| /' conftest.$ac_ext >&5
12513
12514ac_header_compiler=no
12515fi
12516rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12517echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12518echo "${ECHO_T}$ac_header_compiler" >&6
12519
12520# Is the header present?
12521echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
12522echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6
12523cat >conftest.$ac_ext <<_ACEOF
12524/* confdefs.h. */
12525_ACEOF
12526cat confdefs.h >>conftest.$ac_ext
12527cat >>conftest.$ac_ext <<_ACEOF
12528/* end confdefs.h. */
12529#include <malloc/malloc.h>
12530_ACEOF
12531if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12532 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12533 ac_status=$?
12534 grep -v '^ *+' conftest.er1 >conftest.err
12535 rm -f conftest.er1
12536 cat conftest.err >&5
12537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12538 (exit $ac_status); } >/dev/null; then
12539 if test -s conftest.err; then
12540 ac_cpp_err=$ac_c_preproc_warn_flag
12541 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12542 else
12543 ac_cpp_err=
12544 fi
12545else
12546 ac_cpp_err=yes
12547fi
12548if test -z "$ac_cpp_err"; then
12549 ac_header_preproc=yes
12550else
12551 echo "$as_me: failed program was:" >&5
12552sed 's/^/| /' conftest.$ac_ext >&5
12553
12554 ac_header_preproc=no
12555fi
12556rm -f conftest.err conftest.$ac_ext
12557echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12558echo "${ECHO_T}$ac_header_preproc" >&6
12559
12560# So? What about this header?
12561case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12562 yes:no: )
12563 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
12564echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12565 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
12566echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
12567 ac_header_preproc=yes
12568 ;;
12569 no:yes:* )
12570 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
12571echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
12572 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
12573echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
12574 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
12575echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
12576 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
12577echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
12578 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
12579echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
12580 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
12581echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
12582 (
12583 cat <<\_ASBOX
12584## ------------------------------------------ ##
12585## Report this to the AC_PACKAGE_NAME lists. ##
12586## ------------------------------------------ ##
12587_ASBOX
12588 ) |
12589 sed "s/^/$as_me: WARNING: /" >&2
12590 ;;
12591esac
12592echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12593echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12594if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12595 echo $ECHO_N "(cached) $ECHO_C" >&6
12596else
12597 ac_cv_header_malloc_malloc_h=$ac_header_preproc
12598fi
12599echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12600echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12601
12602fi
12603if test $ac_cv_header_malloc_malloc_h = yes; then
12604
12605cat >>confdefs.h <<\_ACEOF
12606#define HAVE_MALLOC_MALLOC_H 1
12607_ACEOF
12608
12609fi
12610
12611
12612
5d6da11e 12613### Use Mac OS X Carbon API to implement GUI.
e0f712ba 12614if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 12615
c0d27fcc 12616cat >>confdefs.h <<\_ACEOF
e0f712ba 12617#define HAVE_CARBON 1
c0d27fcc 12618_ACEOF
e0f712ba 12619
6a3a24fa
JD
12620 window_system=mac
12621 ## Specify the install directory
12622 carbon_appdir=
12623 if test "${carbon_appdir_x}" != ""; then
12624 case ${carbon_appdir_x} in
12625 y | ye | yes) carbon_appdir=/Applications ;;
12626 * ) carbon_appdir=${carbon_appdir_x} ;;
12627 esac
12628 fi
8f417b3b
AS
12629 # We also have mouse menus.
12630 HAVE_MENUS=yes
e0f712ba
AC
12631fi
12632
98418dba
CW
12633### Use session management (-lSM -lICE) if available
12634HAVE_X_SM=no
12635if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
12636 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12637 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
12638echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
12639if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12640 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12641fi
12642echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
12643echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 12644else
c0d27fcc
MR
12645 # Is the header compilable?
12646echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
12647echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
12648cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12649/* confdefs.h. */
12650_ACEOF
12651cat confdefs.h >>conftest.$ac_ext
12652cat >>conftest.$ac_ext <<_ACEOF
12653/* end confdefs.h. */
c0d27fcc
MR
12654$ac_includes_default
12655#include <X11/SM/SMlib.h>
12656_ACEOF
12657rm -f conftest.$ac_objext
12658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12659 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12660 ac_status=$?
35996d22
AS
12661 grep -v '^ *+' conftest.er1 >conftest.err
12662 rm -f conftest.er1
12663 cat conftest.err >&5
c0d27fcc
MR
12664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12665 (exit $ac_status); } &&
9adfabc2 12666 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
12667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12668 (eval $ac_try) 2>&5
12669 ac_status=$?
12670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12671 (exit $ac_status); }; } &&
12672 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12674 (eval $ac_try) 2>&5
12675 ac_status=$?
12676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12677 (exit $ac_status); }; }; then
12678 ac_header_compiler=yes
12679else
12680 echo "$as_me: failed program was:" >&5
19650fd6
AS
12681sed 's/^/| /' conftest.$ac_ext >&5
12682
c0d27fcc
MR
12683ac_header_compiler=no
12684fi
35996d22 12685rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12686echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12687echo "${ECHO_T}$ac_header_compiler" >&6
12688
12689# Is the header present?
12690echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
12691echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
12692cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12693/* confdefs.h. */
12694_ACEOF
12695cat confdefs.h >>conftest.$ac_ext
12696cat >>conftest.$ac_ext <<_ACEOF
12697/* end confdefs.h. */
98418dba
CW
12698#include <X11/SM/SMlib.h>
12699_ACEOF
c0d27fcc 12700if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12701 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12702 ac_status=$?
6bae0ccf 12703 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12704 rm -f conftest.er1
12705 cat conftest.err >&5
c0d27fcc 12706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12707 (exit $ac_status); } >/dev/null; then
12708 if test -s conftest.err; then
12709 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12710 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12711 else
12712 ac_cpp_err=
12713 fi
12714else
12715 ac_cpp_err=yes
503d2be0 12716fi
98418dba 12717if test -z "$ac_cpp_err"; then
c0d27fcc 12718 ac_header_preproc=yes
98418dba
CW
12719else
12720 echo "$as_me: failed program was:" >&5
19650fd6
AS
12721sed 's/^/| /' conftest.$ac_ext >&5
12722
c0d27fcc 12723 ac_header_preproc=no
98418dba
CW
12724fi
12725rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12726echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12727echo "${ECHO_T}$ac_header_preproc" >&6
12728
12729# So? What about this header?
35996d22
AS
12730case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12731 yes:no: )
c0d27fcc
MR
12732 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12733echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12734 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
12735echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
12736 ac_header_preproc=yes
19650fd6 12737 ;;
35996d22 12738 no:yes:* )
c0d27fcc
MR
12739 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
12740echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
35996d22
AS
12741 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
12742echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
12743 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
12744echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
12745 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
12746echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12747 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 12748echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12749 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
12750echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12751 (
12752 cat <<\_ASBOX
35996d22
AS
12753## ------------------------------------------ ##
12754## Report this to the AC_PACKAGE_NAME lists. ##
12755## ------------------------------------------ ##
19650fd6
AS
12756_ASBOX
12757 ) |
12758 sed "s/^/$as_me: WARNING: /" >&2
12759 ;;
c0d27fcc
MR
12760esac
12761echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
12762echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
12763if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12764 echo $ECHO_N "(cached) $ECHO_C" >&6
12765else
12766 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 12767fi
c0d27fcc 12768echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 12769echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
12770
12771fi
98418dba 12772if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 12773 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
12774echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
12775if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 12776 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12777else
503d2be0 12778 ac_check_lib_save_LIBS=$LIBS
1660500f 12779LIBS="-lSM -lICE $LIBS"
503d2be0 12780cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12781/* confdefs.h. */
12782_ACEOF
12783cat confdefs.h >>conftest.$ac_ext
12784cat >>conftest.$ac_ext <<_ACEOF
12785/* end confdefs.h. */
503d2be0 12786
73b77ee5 12787/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12788#ifdef __cplusplus
12789extern "C"
12790#endif
73b77ee5 12791/* We use char because int might match the return type of a gcc2
503d2be0 12792 builtin and then its argument prototype would still apply. */
98418dba 12793char SmcOpenConnection ();
503d2be0
AS
12794int
12795main ()
12796{
98418dba 12797SmcOpenConnection ();
503d2be0
AS
12798 ;
12799 return 0;
12800}
12801_ACEOF
12802rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12803if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12804 (eval $ac_link) 2>conftest.er1
503d2be0 12805 ac_status=$?
35996d22
AS
12806 grep -v '^ *+' conftest.er1 >conftest.err
12807 rm -f conftest.er1
12808 cat conftest.err >&5
c0d27fcc 12809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12810 (exit $ac_status); } &&
9adfabc2 12811 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
12812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12813 (eval $ac_try) 2>&5
12814 ac_status=$?
12815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12816 (exit $ac_status); }; } &&
12817 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12819 (eval $ac_try) 2>&5
12820 ac_status=$?
c0d27fcc 12821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12822 (exit $ac_status); }; }; then
98418dba 12823 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
12824else
12825 echo "$as_me: failed program was:" >&5
19650fd6
AS
12826sed 's/^/| /' conftest.$ac_ext >&5
12827
98418dba 12828ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 12829fi
35996d22
AS
12830rm -f conftest.err conftest.$ac_objext \
12831 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12832LIBS=$ac_check_lib_save_LIBS
12833fi
c0d27fcc 12834echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
12835echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
12836if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
12837 HAVE_X_SM=yes
73b77ee5
GM
12838fi
12839
73b77ee5 12840fi
73b77ee5 12841
c0d27fcc
MR
12842
12843
98418dba 12844 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 12845
c0d27fcc 12846cat >>confdefs.h <<\_ACEOF
98418dba 12847#define HAVE_X_SM 1
c0d27fcc 12848_ACEOF
73b77ee5 12849
98418dba
CW
12850 case "$LIBS" in
12851 *-lSM*) ;;
12852 *) LIBS="-lSM -lICE $LIBS" ;;
12853 esac
73b77ee5 12854 fi
98418dba 12855fi
73b77ee5 12856
98418dba 12857# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 12858echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
12859echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
12860if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
12861 echo $ECHO_N "(cached) $ECHO_C" >&6
12862else
12863 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12864/* confdefs.h. */
12865_ACEOF
12866cat confdefs.h >>conftest.$ac_ext
12867cat >>conftest.$ac_ext <<_ACEOF
12868/* end confdefs.h. */
98418dba 12869#include <netdb.h>
503d2be0
AS
12870int
12871main ()
12872{
98418dba 12873return h_errno;
503d2be0
AS
12874 ;
12875 return 0;
12876}
12877_ACEOF
12878rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12879if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12880 (eval $ac_link) 2>conftest.er1
503d2be0 12881 ac_status=$?
35996d22
AS
12882 grep -v '^ *+' conftest.er1 >conftest.err
12883 rm -f conftest.er1
12884 cat conftest.err >&5
c0d27fcc 12885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12886 (exit $ac_status); } &&
9adfabc2 12887 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
12888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12889 (eval $ac_try) 2>&5
12890 ac_status=$?
12891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12892 (exit $ac_status); }; } &&
12893 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12895 (eval $ac_try) 2>&5
12896 ac_status=$?
c0d27fcc 12897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12898 (exit $ac_status); }; }; then
98418dba 12899 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 12900else
503d2be0 12901 echo "$as_me: failed program was:" >&5
19650fd6
AS
12902sed 's/^/| /' conftest.$ac_ext >&5
12903
98418dba 12904emacs_cv_netdb_declares_h_errno=no
73b77ee5 12905fi
35996d22
AS
12906rm -f conftest.err conftest.$ac_objext \
12907 conftest$ac_exeext conftest.$ac_ext
98418dba 12908fi
c0d27fcc 12909echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
12910echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
12911if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 12912
c0d27fcc 12913cat >>confdefs.h <<\_ACEOF
98418dba 12914#define HAVE_H_ERRNO 1
c0d27fcc 12915_ACEOF
73b77ee5 12916
98418dba
CW
12917fi
12918
12919# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12920# for constant arguments. Useless!
c0d27fcc 12921echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
12922echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
12923if test "${ac_cv_working_alloca_h+set}" = set; then
12924 echo $ECHO_N "(cached) $ECHO_C" >&6
12925else
12926 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12927/* confdefs.h. */
12928_ACEOF
12929cat confdefs.h >>conftest.$ac_ext
12930cat >>conftest.$ac_ext <<_ACEOF
12931/* end confdefs.h. */
98418dba 12932#include <alloca.h>
503d2be0
AS
12933int
12934main ()
12935{
98418dba 12936char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
12937 ;
12938 return 0;
12939}
12940_ACEOF
12941rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12943 (eval $ac_link) 2>conftest.er1
503d2be0 12944 ac_status=$?
35996d22
AS
12945 grep -v '^ *+' conftest.er1 >conftest.err
12946 rm -f conftest.er1
12947 cat conftest.err >&5
c0d27fcc 12948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12949 (exit $ac_status); } &&
9adfabc2 12950 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
12951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12952 (eval $ac_try) 2>&5
12953 ac_status=$?
12954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12955 (exit $ac_status); }; } &&
12956 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12958 (eval $ac_try) 2>&5
12959 ac_status=$?
c0d27fcc 12960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12961 (exit $ac_status); }; }; then
98418dba 12962 ac_cv_working_alloca_h=yes
73b77ee5 12963else
503d2be0 12964 echo "$as_me: failed program was:" >&5
19650fd6
AS
12965sed 's/^/| /' conftest.$ac_ext >&5
12966
98418dba 12967ac_cv_working_alloca_h=no
73b77ee5 12968fi
35996d22
AS
12969rm -f conftest.err conftest.$ac_objext \
12970 conftest$ac_exeext conftest.$ac_ext
98418dba 12971fi
c0d27fcc 12972echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
12973echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
12974if test $ac_cv_working_alloca_h = yes; then
73b77ee5 12975
c0d27fcc 12976cat >>confdefs.h <<\_ACEOF
98418dba 12977#define HAVE_ALLOCA_H 1
c0d27fcc 12978_ACEOF
98418dba
CW
12979
12980fi
12981
c0d27fcc 12982echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
12983echo $ECHO_N "checking for alloca... $ECHO_C" >&6
12984if test "${ac_cv_func_alloca_works+set}" = set; then
12985 echo $ECHO_N "(cached) $ECHO_C" >&6
12986else
503d2be0 12987 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12988/* confdefs.h. */
12989_ACEOF
12990cat confdefs.h >>conftest.$ac_ext
12991cat >>conftest.$ac_ext <<_ACEOF
12992/* end confdefs.h. */
98418dba
CW
12993#ifdef __GNUC__
12994# define alloca __builtin_alloca
12995#else
12996# ifdef _MSC_VER
12997# include <malloc.h>
12998# define alloca _alloca
12999# else
13000# if HAVE_ALLOCA_H
13001# include <alloca.h>
13002# else
13003# ifdef _AIX
13004 #pragma alloca
13005# else
13006# ifndef alloca /* predefined by HP cc +Olibcalls */
13007char *alloca ();
13008# endif
13009# endif
13010# endif
13011# endif
13012#endif
13013
503d2be0
AS
13014int
13015main ()
13016{
98418dba 13017char *p = (char *) alloca (1);
503d2be0
AS
13018 ;
13019 return 0;
13020}
13021_ACEOF
13022rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13023if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13024 (eval $ac_link) 2>conftest.er1
503d2be0 13025 ac_status=$?
35996d22
AS
13026 grep -v '^ *+' conftest.er1 >conftest.err
13027 rm -f conftest.er1
13028 cat conftest.err >&5
c0d27fcc 13029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13030 (exit $ac_status); } &&
9adfabc2 13031 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13033 (eval $ac_try) 2>&5
13034 ac_status=$?
13035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13036 (exit $ac_status); }; } &&
13037 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13039 (eval $ac_try) 2>&5
13040 ac_status=$?
c0d27fcc 13041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13042 (exit $ac_status); }; }; then
98418dba 13043 ac_cv_func_alloca_works=yes
ac95a621 13044else
503d2be0 13045 echo "$as_me: failed program was:" >&5
19650fd6
AS
13046sed 's/^/| /' conftest.$ac_ext >&5
13047
98418dba 13048ac_cv_func_alloca_works=no
ac95a621 13049fi
35996d22
AS
13050rm -f conftest.err conftest.$ac_objext \
13051 conftest$ac_exeext conftest.$ac_ext
98418dba 13052fi
c0d27fcc 13053echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 13054echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 13055
98418dba
CW
13056if test $ac_cv_func_alloca_works = yes; then
13057
c0d27fcc 13058cat >>confdefs.h <<\_ACEOF
98418dba 13059#define HAVE_ALLOCA 1
c0d27fcc 13060_ACEOF
98418dba
CW
13061
13062else
13063 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13064# that cause trouble. Some versions do not even contain alloca or
13065# contain a buggy version. If you still want to use their alloca,
13066# use ar to extract alloca.o from them instead of compiling alloca.c.
13067
13068ALLOCA=alloca.$ac_objext
13069
c0d27fcc 13070cat >>confdefs.h <<\_ACEOF
98418dba 13071#define C_ALLOCA 1
c0d27fcc 13072_ACEOF
98418dba 13073
c0d27fcc
MR
13074
13075echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
13076echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
13077if test "${ac_cv_os_cray+set}" = set; then
13078 echo $ECHO_N "(cached) $ECHO_C" >&6
13079else
13080 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13081/* confdefs.h. */
13082_ACEOF
13083cat confdefs.h >>conftest.$ac_ext
13084cat >>conftest.$ac_ext <<_ACEOF
13085/* end confdefs.h. */
98418dba
CW
13086#if defined(CRAY) && ! defined(CRAY2)
13087webecray
13088#else
13089wenotbecray
13090#endif
13091
13092_ACEOF
13093if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13094 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
13095 ac_cv_os_cray=yes
13096else
13097 ac_cv_os_cray=no
13098fi
13099rm -f conftest*
ac95a621 13100
98418dba 13101fi
c0d27fcc 13102echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
13103echo "${ECHO_T}$ac_cv_os_cray" >&6
13104if test $ac_cv_os_cray = yes; then
13105 for ac_func in _getb67 GETB67 getb67; do
13106 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13107echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
13108echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13109if eval "test \"\${$as_ac_var+set}\" = set"; then
13110 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13111else
503d2be0 13112 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13113/* confdefs.h. */
13114_ACEOF
13115cat confdefs.h >>conftest.$ac_ext
13116cat >>conftest.$ac_ext <<_ACEOF
13117/* end confdefs.h. */
35996d22
AS
13118/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13119 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13120#define $ac_func innocuous_$ac_func
13121
73b77ee5 13122/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13123 which can conflict with char $ac_func (); below.
13124 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13125 <limits.h> exists even on freestanding compilers. */
35996d22 13126
19650fd6
AS
13127#ifdef __STDC__
13128# include <limits.h>
13129#else
13130# include <assert.h>
13131#endif
35996d22
AS
13132
13133#undef $ac_func
13134
73b77ee5 13135/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13136#ifdef __cplusplus
13137extern "C"
19650fd6 13138{
503d2be0 13139#endif
73b77ee5 13140/* We use char because int might match the return type of a gcc2
503d2be0
AS
13141 builtin and then its argument prototype would still apply. */
13142char $ac_func ();
73b77ee5
GM
13143/* The GNU C library defines this for functions which it implements
13144 to always fail with ENOSYS. Some functions are actually named
13145 something starting with __ and the normal name is an alias. */
13146#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13147choke me
13148#else
19650fd6
AS
13149char (*f) () = $ac_func;
13150#endif
13151#ifdef __cplusplus
13152}
73b77ee5
GM
13153#endif
13154
19650fd6
AS
13155int
13156main ()
13157{
13158return f != $ac_func;
503d2be0
AS
13159 ;
13160 return 0;
13161}
13162_ACEOF
13163rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13164if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13165 (eval $ac_link) 2>conftest.er1
503d2be0 13166 ac_status=$?
35996d22
AS
13167 grep -v '^ *+' conftest.er1 >conftest.err
13168 rm -f conftest.er1
13169 cat conftest.err >&5
c0d27fcc 13170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13171 (exit $ac_status); } &&
9adfabc2 13172 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13174 (eval $ac_try) 2>&5
13175 ac_status=$?
13176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13177 (exit $ac_status); }; } &&
13178 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13180 (eval $ac_try) 2>&5
13181 ac_status=$?
c0d27fcc 13182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13183 (exit $ac_status); }; }; then
13184 eval "$as_ac_var=yes"
13185else
13186 echo "$as_me: failed program was:" >&5
19650fd6
AS
13187sed 's/^/| /' conftest.$ac_ext >&5
13188
503d2be0
AS
13189eval "$as_ac_var=no"
13190fi
35996d22
AS
13191rm -f conftest.err conftest.$ac_objext \
13192 conftest$ac_exeext conftest.$ac_ext
503d2be0 13193fi
c0d27fcc 13194echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13195echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13196if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 13197
c0d27fcc 13198cat >>confdefs.h <<_ACEOF
98418dba 13199#define CRAY_STACKSEG_END $ac_func
c0d27fcc 13200_ACEOF
98418dba
CW
13201
13202 break
73b77ee5 13203fi
73b77ee5 13204
98418dba 13205 done
73b77ee5
GM
13206fi
13207
c0d27fcc 13208echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
13209echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
13210if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 13211 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
13212else
13213 if test "$cross_compiling" = yes; then
13214 ac_cv_c_stack_direction=0
73b77ee5 13215else
503d2be0 13216 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13217/* confdefs.h. */
13218_ACEOF
13219cat confdefs.h >>conftest.$ac_ext
13220cat >>conftest.$ac_ext <<_ACEOF
13221/* end confdefs.h. */
503d2be0 13222int
98418dba 13223find_stack_direction ()
503d2be0 13224{
98418dba
CW
13225 static char *addr = 0;
13226 auto char dummy;
13227 if (addr == 0)
13228 {
13229 addr = &dummy;
13230 return find_stack_direction ();
13231 }
73b77ee5 13232 else
98418dba
CW
13233 return (&dummy > addr) ? 1 : -1;
13234}
ba4481b5 13235
503d2be0
AS
13236int
13237main ()
13238{
98418dba 13239 exit (find_stack_direction () < 0);
503d2be0
AS
13240}
13241_ACEOF
98418dba 13242rm -f conftest$ac_exeext
c0d27fcc 13243if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13244 (eval $ac_link) 2>&5
13245 ac_status=$?
c0d27fcc 13246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13247 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 13248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13249 (eval $ac_try) 2>&5
13250 ac_status=$?
c0d27fcc 13251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13252 (exit $ac_status); }; }; then
98418dba 13253 ac_cv_c_stack_direction=1
ba4481b5 13254else
98418dba
CW
13255 echo "$as_me: program exited with status $ac_status" >&5
13256echo "$as_me: failed program was:" >&5
19650fd6
AS
13257sed 's/^/| /' conftest.$ac_ext >&5
13258
c0d27fcc 13259( exit $ac_status )
98418dba 13260ac_cv_c_stack_direction=-1
ba4481b5 13261fi
35996d22 13262rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 13263fi
98418dba 13264fi
c0d27fcc 13265echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
13266echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
13267
c0d27fcc 13268cat >>confdefs.h <<_ACEOF
98418dba 13269#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
13270_ACEOF
13271
ba4481b5 13272
ba4481b5
DL
13273fi
13274
c0d27fcc 13275
98418dba
CW
13276# fmod, logb, and frexp are found in -lm on most systems.
13277# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
13278
c0d27fcc 13279echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
13280echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
13281if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 13282 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13283else
98418dba
CW
13284 ac_check_lib_save_LIBS=$LIBS
13285LIBS="-lm $LIBS"
13286cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13287/* confdefs.h. */
13288_ACEOF
13289cat confdefs.h >>conftest.$ac_ext
13290cat >>conftest.$ac_ext <<_ACEOF
13291/* end confdefs.h. */
ba4481b5 13292
98418dba
CW
13293/* Override any gcc2 internal prototype to avoid an error. */
13294#ifdef __cplusplus
13295extern "C"
13296#endif
13297/* We use char because int might match the return type of a gcc2
13298 builtin and then its argument prototype would still apply. */
13299char sqrt ();
503d2be0
AS
13300int
13301main ()
13302{
98418dba 13303sqrt ();
503d2be0
AS
13304 ;
13305 return 0;
13306}
13307_ACEOF
13308rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13309if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13310 (eval $ac_link) 2>conftest.er1
503d2be0 13311 ac_status=$?
35996d22
AS
13312 grep -v '^ *+' conftest.er1 >conftest.err
13313 rm -f conftest.er1
13314 cat conftest.err >&5
c0d27fcc 13315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13316 (exit $ac_status); } &&
9adfabc2 13317 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13319 (eval $ac_try) 2>&5
13320 ac_status=$?
13321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13322 (exit $ac_status); }; } &&
13323 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13325 (eval $ac_try) 2>&5
13326 ac_status=$?
c0d27fcc 13327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13328 (exit $ac_status); }; }; then
98418dba 13329 ac_cv_lib_m_sqrt=yes
ba4481b5 13330else
503d2be0 13331 echo "$as_me: failed program was:" >&5
19650fd6
AS
13332sed 's/^/| /' conftest.$ac_ext >&5
13333
98418dba 13334ac_cv_lib_m_sqrt=no
ba4481b5 13335fi
35996d22
AS
13336rm -f conftest.err conftest.$ac_objext \
13337 conftest$ac_exeext conftest.$ac_ext
98418dba 13338LIBS=$ac_check_lib_save_LIBS
ba4481b5 13339fi
c0d27fcc 13340echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
13341echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
13342if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 13343 cat >>confdefs.h <<_ACEOF
98418dba 13344#define HAVE_LIBM 1
c0d27fcc 13345_ACEOF
98418dba
CW
13346
13347 LIBS="-lm $LIBS"
ba4481b5 13348
ba4481b5
DL
13349fi
13350
c0d27fcc 13351
55597d70
DL
13352# Check for mail-locking functions in a "mail" library. Probably this should
13353# have the same check as for liblockfile below.
98418dba 13354
c0d27fcc 13355echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
13356echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
13357if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 13358 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13359else
98418dba
CW
13360 ac_check_lib_save_LIBS=$LIBS
13361LIBS="-lmail $LIBS"
13362cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13363/* confdefs.h. */
13364_ACEOF
13365cat confdefs.h >>conftest.$ac_ext
13366cat >>conftest.$ac_ext <<_ACEOF
13367/* end confdefs.h. */
98418dba
CW
13368
13369/* Override any gcc2 internal prototype to avoid an error. */
13370#ifdef __cplusplus
13371extern "C"
13372#endif
13373/* We use char because int might match the return type of a gcc2
13374 builtin and then its argument prototype would still apply. */
13375char maillock ();
503d2be0
AS
13376int
13377main ()
13378{
98418dba 13379maillock ();
503d2be0
AS
13380 ;
13381 return 0;
13382}
13383_ACEOF
13384rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13385if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13386 (eval $ac_link) 2>conftest.er1
503d2be0 13387 ac_status=$?
35996d22
AS
13388 grep -v '^ *+' conftest.er1 >conftest.err
13389 rm -f conftest.er1
13390 cat conftest.err >&5
c0d27fcc 13391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13392 (exit $ac_status); } &&
9adfabc2 13393 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13395 (eval $ac_try) 2>&5
13396 ac_status=$?
13397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13398 (exit $ac_status); }; } &&
13399 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13401 (eval $ac_try) 2>&5
13402 ac_status=$?
c0d27fcc 13403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13404 (exit $ac_status); }; }; then
98418dba 13405 ac_cv_lib_mail_maillock=yes
ba4481b5 13406else
503d2be0 13407 echo "$as_me: failed program was:" >&5
19650fd6
AS
13408sed 's/^/| /' conftest.$ac_ext >&5
13409
98418dba 13410ac_cv_lib_mail_maillock=no
ba4481b5 13411fi
35996d22
AS
13412rm -f conftest.err conftest.$ac_objext \
13413 conftest$ac_exeext conftest.$ac_ext
98418dba 13414LIBS=$ac_check_lib_save_LIBS
ba4481b5 13415fi
c0d27fcc 13416echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
13417echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
13418if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 13419 cat >>confdefs.h <<_ACEOF
98418dba 13420#define HAVE_LIBMAIL 1
c0d27fcc 13421_ACEOF
ba4481b5 13422
98418dba 13423 LIBS="-lmail $LIBS"
ba4481b5 13424
98418dba 13425fi
ba4481b5 13426
c0d27fcc
MR
13427
13428echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
13429echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
13430if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 13431 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13432else
503d2be0 13433 ac_check_lib_save_LIBS=$LIBS
98418dba 13434LIBS="-llockfile $LIBS"
503d2be0 13435cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13436/* confdefs.h. */
13437_ACEOF
13438cat confdefs.h >>conftest.$ac_ext
13439cat >>conftest.$ac_ext <<_ACEOF
13440/* end confdefs.h. */
503d2be0 13441
ba4481b5 13442/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13443#ifdef __cplusplus
13444extern "C"
13445#endif
ba4481b5 13446/* We use char because int might match the return type of a gcc2
503d2be0 13447 builtin and then its argument prototype would still apply. */
98418dba 13448char maillock ();
503d2be0
AS
13449int
13450main ()
13451{
98418dba 13452maillock ();
503d2be0
AS
13453 ;
13454 return 0;
13455}
13456_ACEOF
13457rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13459 (eval $ac_link) 2>conftest.er1
503d2be0 13460 ac_status=$?
35996d22
AS
13461 grep -v '^ *+' conftest.er1 >conftest.err
13462 rm -f conftest.er1
13463 cat conftest.err >&5
c0d27fcc 13464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13465 (exit $ac_status); } &&
9adfabc2 13466 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13468 (eval $ac_try) 2>&5
13469 ac_status=$?
13470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13471 (exit $ac_status); }; } &&
13472 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13474 (eval $ac_try) 2>&5
13475 ac_status=$?
c0d27fcc 13476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13477 (exit $ac_status); }; }; then
98418dba 13478 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
13479else
13480 echo "$as_me: failed program was:" >&5
19650fd6
AS
13481sed 's/^/| /' conftest.$ac_ext >&5
13482
98418dba
CW
13483ac_cv_lib_lockfile_maillock=no
13484fi
35996d22
AS
13485rm -f conftest.err conftest.$ac_objext \
13486 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13487LIBS=$ac_check_lib_save_LIBS
13488fi
c0d27fcc 13489echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
13490echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
13491if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 13492 cat >>confdefs.h <<_ACEOF
98418dba 13493#define HAVE_LIBLOCKFILE 1
c0d27fcc 13494_ACEOF
98418dba
CW
13495
13496 LIBS="-llockfile $LIBS"
13497
13498fi
13499
13500# If we have the shared liblockfile, assume we must use it for mail
13501# locking (e.g. Debian). If we couldn't link against liblockfile
13502# (no liblockfile.a installed), ensure that we don't need to.
13503if test "$ac_cv_lib_lockfile_maillock" = no; then
13504 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13505set dummy liblockfile.so; ac_word=$2
c0d27fcc 13506echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
13507echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13508if test "${ac_cv_prog_liblockfile+set}" = set; then
13509 echo $ECHO_N "(cached) $ECHO_C" >&6
13510else
13511 if test -n "$liblockfile"; then
13512 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13513else
c0d27fcc 13514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
13515as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13516for as_dir in $as_dummy
c0d27fcc
MR
13517do
13518 IFS=$as_save_IFS
13519 test -z "$as_dir" && as_dir=.
13520 for ac_exec_ext in '' $ac_executable_extensions; do
13521 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13522 ac_cv_prog_liblockfile="yes"
13523 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13524 break 2
13525 fi
13526done
98418dba
CW
13527done
13528
13529 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 13530fi
503d2be0 13531fi
98418dba
CW
13532liblockfile=$ac_cv_prog_liblockfile
13533if test -n "$liblockfile"; then
c0d27fcc 13534 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
13535echo "${ECHO_T}$liblockfile" >&6
13536else
c0d27fcc 13537 echo "$as_me:$LINENO: result: no" >&5
98418dba 13538echo "${ECHO_T}no" >&6
ba4481b5
DL
13539fi
13540
98418dba 13541 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 13542 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
13543This probably means that movemail could lose mail.
13544There may be a \`development' package to install containing liblockfile." >&5
13545echo "$as_me: error: Shared liblockfile found but can't link against it.
13546This probably means that movemail could lose mail.
13547There may be a \`development' package to install containing liblockfile." >&2;}
13548 { (exit 1); exit 1; }; }
98418dba 13549 else :
55597d70 13550 fi
98418dba 13551fi
503d2be0 13552
98418dba
CW
13553for ac_func in touchlock
13554do
13555as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13556echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
13557echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13558if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13559 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 13560else
98418dba 13561 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13562/* confdefs.h. */
13563_ACEOF
13564cat confdefs.h >>conftest.$ac_ext
13565cat >>conftest.$ac_ext <<_ACEOF
13566/* end confdefs.h. */
35996d22
AS
13567/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13568 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13569#define $ac_func innocuous_$ac_func
13570
98418dba 13571/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13572 which can conflict with char $ac_func (); below.
13573 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13574 <limits.h> exists even on freestanding compilers. */
35996d22 13575
19650fd6
AS
13576#ifdef __STDC__
13577# include <limits.h>
13578#else
13579# include <assert.h>
13580#endif
35996d22
AS
13581
13582#undef $ac_func
13583
457b792c 13584/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13585#ifdef __cplusplus
13586extern "C"
19650fd6 13587{
503d2be0 13588#endif
457b792c 13589/* We use char because int might match the return type of a gcc2
503d2be0 13590 builtin and then its argument prototype would still apply. */
98418dba 13591char $ac_func ();
98418dba
CW
13592/* The GNU C library defines this for functions which it implements
13593 to always fail with ENOSYS. Some functions are actually named
13594 something starting with __ and the normal name is an alias. */
13595#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13596choke me
13597#else
19650fd6
AS
13598char (*f) () = $ac_func;
13599#endif
13600#ifdef __cplusplus
13601}
cd958eb3
MB
13602#endif
13603
19650fd6
AS
13604int
13605main ()
13606{
13607return f != $ac_func;
503d2be0
AS
13608 ;
13609 return 0;
13610}
13611_ACEOF
13612rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13613if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13614 (eval $ac_link) 2>conftest.er1
503d2be0 13615 ac_status=$?
35996d22
AS
13616 grep -v '^ *+' conftest.er1 >conftest.err
13617 rm -f conftest.er1
13618 cat conftest.err >&5
c0d27fcc 13619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13620 (exit $ac_status); } &&
9adfabc2 13621 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13623 (eval $ac_try) 2>&5
13624 ac_status=$?
13625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13626 (exit $ac_status); }; } &&
13627 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13629 (eval $ac_try) 2>&5
13630 ac_status=$?
c0d27fcc 13631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13632 (exit $ac_status); }; }; then
98418dba 13633 eval "$as_ac_var=yes"
503d2be0
AS
13634else
13635 echo "$as_me: failed program was:" >&5
19650fd6
AS
13636sed 's/^/| /' conftest.$ac_ext >&5
13637
98418dba 13638eval "$as_ac_var=no"
503d2be0 13639fi
35996d22
AS
13640rm -f conftest.err conftest.$ac_objext \
13641 conftest$ac_exeext conftest.$ac_ext
503d2be0 13642fi
c0d27fcc 13643echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
13644echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13645if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13646 cat >>confdefs.h <<_ACEOF
98418dba 13647#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13648_ACEOF
457b792c 13649
457b792c 13650fi
98418dba 13651done
457b792c 13652
c0d27fcc 13653
98418dba
CW
13654for ac_header in maillock.h
13655do
13656as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
13657if eval "test \"\${$as_ac_Header+set}\" = set"; then
13658 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
13659echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13660if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 13661 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13662fi
13663echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13664echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 13665else
c0d27fcc
MR
13666 # Is the header compilable?
13667echo "$as_me:$LINENO: checking $ac_header usability" >&5
13668echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13669cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13670/* confdefs.h. */
13671_ACEOF
13672cat confdefs.h >>conftest.$ac_ext
13673cat >>conftest.$ac_ext <<_ACEOF
13674/* end confdefs.h. */
c0d27fcc
MR
13675$ac_includes_default
13676#include <$ac_header>
13677_ACEOF
13678rm -f conftest.$ac_objext
13679if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 13680 (eval $ac_compile) 2>conftest.er1
c0d27fcc 13681 ac_status=$?
35996d22
AS
13682 grep -v '^ *+' conftest.er1 >conftest.err
13683 rm -f conftest.er1
13684 cat conftest.err >&5
c0d27fcc
MR
13685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13686 (exit $ac_status); } &&
9adfabc2 13687 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13689 (eval $ac_try) 2>&5
13690 ac_status=$?
13691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13692 (exit $ac_status); }; } &&
13693 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13695 (eval $ac_try) 2>&5
13696 ac_status=$?
13697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13698 (exit $ac_status); }; }; then
13699 ac_header_compiler=yes
13700else
13701 echo "$as_me: failed program was:" >&5
19650fd6
AS
13702sed 's/^/| /' conftest.$ac_ext >&5
13703
c0d27fcc
MR
13704ac_header_compiler=no
13705fi
35996d22 13706rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
13707echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13708echo "${ECHO_T}$ac_header_compiler" >&6
13709
13710# Is the header present?
13711echo "$as_me:$LINENO: checking $ac_header presence" >&5
13712echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13713cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13714/* confdefs.h. */
13715_ACEOF
13716cat confdefs.h >>conftest.$ac_ext
13717cat >>conftest.$ac_ext <<_ACEOF
13718/* end confdefs.h. */
98418dba 13719#include <$ac_header>
503d2be0 13720_ACEOF
c0d27fcc 13721if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 13722 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 13723 ac_status=$?
6bae0ccf 13724 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13725 rm -f conftest.er1
13726 cat conftest.err >&5
c0d27fcc 13727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13728 (exit $ac_status); } >/dev/null; then
13729 if test -s conftest.err; then
13730 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 13731 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
13732 else
13733 ac_cpp_err=
13734 fi
503d2be0 13735else
98418dba 13736 ac_cpp_err=yes
503d2be0 13737fi
98418dba 13738if test -z "$ac_cpp_err"; then
c0d27fcc 13739 ac_header_preproc=yes
98418dba
CW
13740else
13741 echo "$as_me: failed program was:" >&5
19650fd6
AS
13742sed 's/^/| /' conftest.$ac_ext >&5
13743
c0d27fcc 13744 ac_header_preproc=no
503d2be0 13745fi
98418dba 13746rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13747echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13748echo "${ECHO_T}$ac_header_preproc" >&6
13749
13750# So? What about this header?
35996d22
AS
13751case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13752 yes:no: )
c0d27fcc
MR
13753 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13754echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
13755 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13756echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13757 ac_header_preproc=yes
19650fd6 13758 ;;
35996d22 13759 no:yes:* )
c0d27fcc
MR
13760 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13761echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
13762 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13763echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13764 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13765echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13766 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13767echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13768 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13769echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
13770 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13771echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
13772 (
13773 cat <<\_ASBOX
35996d22
AS
13774## ------------------------------------------ ##
13775## Report this to the AC_PACKAGE_NAME lists. ##
13776## ------------------------------------------ ##
19650fd6
AS
13777_ASBOX
13778 ) |
13779 sed "s/^/$as_me: WARNING: /" >&2
13780 ;;
c0d27fcc
MR
13781esac
13782echo "$as_me:$LINENO: checking for $ac_header" >&5
13783echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13784if eval "test \"\${$as_ac_Header+set}\" = set"; then
13785 echo $ECHO_N "(cached) $ECHO_C" >&6
13786else
35996d22 13787 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 13788fi
c0d27fcc 13789echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 13790echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
13791
13792fi
98418dba 13793if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 13794 cat >>confdefs.h <<_ACEOF
98418dba 13795#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 13796_ACEOF
48d4b120 13797
ba4481b5 13798fi
c0d27fcc 13799
98418dba
CW
13800done
13801
c0d27fcc
MR
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
22044edf
DL
13857
13858
c0d27fcc 13859
b0e44248
RB
13860
13861
973a76b1
DL
13862
13863
13864
cd958eb3 13865
25ca0bca 13866
ea92fc9f 13867
c0d27fcc
MR
13868
13869
98418dba 13870for ac_func in gethostname getdomainname dup2 \
ea92fc9f 13871rename closedir mkdir rmdir sysinfo getrusage \
98418dba
CW
13872random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
13873strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 13874utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
13875__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
13876sendto recvfrom getsockopt setsockopt getsockname getpeername \
b0e44248 13877gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
4489ece2 13878memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
13879do
13880as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13881echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
13882echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13883if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13884 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13885else
503d2be0 13886 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13887/* confdefs.h. */
13888_ACEOF
13889cat confdefs.h >>conftest.$ac_ext
13890cat >>conftest.$ac_ext <<_ACEOF
13891/* end confdefs.h. */
35996d22
AS
13892/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13893 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13894#define $ac_func innocuous_$ac_func
13895
98418dba 13896/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13897 which can conflict with char $ac_func (); below.
13898 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13899 <limits.h> exists even on freestanding compilers. */
35996d22 13900
19650fd6
AS
13901#ifdef __STDC__
13902# include <limits.h>
13903#else
13904# include <assert.h>
13905#endif
35996d22
AS
13906
13907#undef $ac_func
13908
ba4481b5 13909/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13910#ifdef __cplusplus
13911extern "C"
19650fd6 13912{
503d2be0 13913#endif
ba4481b5 13914/* We use char because int might match the return type of a gcc2
503d2be0 13915 builtin and then its argument prototype would still apply. */
98418dba 13916char $ac_func ();
98418dba
CW
13917/* The GNU C library defines this for functions which it implements
13918 to always fail with ENOSYS. Some functions are actually named
13919 something starting with __ and the normal name is an alias. */
13920#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13921choke me
13922#else
19650fd6
AS
13923char (*f) () = $ac_func;
13924#endif
13925#ifdef __cplusplus
13926}
98418dba
CW
13927#endif
13928
19650fd6
AS
13929int
13930main ()
13931{
13932return f != $ac_func;
503d2be0
AS
13933 ;
13934 return 0;
13935}
13936_ACEOF
13937rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13938if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13939 (eval $ac_link) 2>conftest.er1
503d2be0 13940 ac_status=$?
35996d22
AS
13941 grep -v '^ *+' conftest.er1 >conftest.err
13942 rm -f conftest.er1
13943 cat conftest.err >&5
c0d27fcc 13944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13945 (exit $ac_status); } &&
9adfabc2 13946 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13948 (eval $ac_try) 2>&5
13949 ac_status=$?
13950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13951 (exit $ac_status); }; } &&
13952 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13954 (eval $ac_try) 2>&5
13955 ac_status=$?
c0d27fcc 13956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13957 (exit $ac_status); }; }; then
98418dba 13958 eval "$as_ac_var=yes"
503d2be0
AS
13959else
13960 echo "$as_me: failed program was:" >&5
19650fd6
AS
13961sed 's/^/| /' conftest.$ac_ext >&5
13962
98418dba 13963eval "$as_ac_var=no"
503d2be0 13964fi
35996d22
AS
13965rm -f conftest.err conftest.$ac_objext \
13966 conftest$ac_exeext conftest.$ac_ext
ba4481b5 13967fi
c0d27fcc 13968echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
13969echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13970if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13971 cat >>confdefs.h <<_ACEOF
98418dba 13972#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13973_ACEOF
ba4481b5 13974
ba4481b5 13975fi
98418dba 13976done
ba4481b5 13977
c0d27fcc
MR
13978
13979
98418dba
CW
13980for ac_header in sys/un.h
13981do
13982as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
13983if eval "test \"\${$as_ac_Header+set}\" = set"; then
13984 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
13985echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13986if eval "test \"\${$as_ac_Header+set}\" = set"; then
13987 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13988fi
13989echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13990echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 13991else
c0d27fcc
MR
13992 # Is the header compilable?
13993echo "$as_me:$LINENO: checking $ac_header usability" >&5
13994echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13995cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13996/* confdefs.h. */
13997_ACEOF
13998cat confdefs.h >>conftest.$ac_ext
13999cat >>conftest.$ac_ext <<_ACEOF
14000/* end confdefs.h. */
c0d27fcc
MR
14001$ac_includes_default
14002#include <$ac_header>
14003_ACEOF
14004rm -f conftest.$ac_objext
14005if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 14006 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14007 ac_status=$?
35996d22
AS
14008 grep -v '^ *+' conftest.er1 >conftest.err
14009 rm -f conftest.er1
14010 cat conftest.err >&5
c0d27fcc
MR
14011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14012 (exit $ac_status); } &&
9adfabc2 14013 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
14014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14015 (eval $ac_try) 2>&5
14016 ac_status=$?
14017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14018 (exit $ac_status); }; } &&
14019 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14021 (eval $ac_try) 2>&5
14022 ac_status=$?
14023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14024 (exit $ac_status); }; }; then
14025 ac_header_compiler=yes
14026else
14027 echo "$as_me: failed program was:" >&5
19650fd6
AS
14028sed 's/^/| /' conftest.$ac_ext >&5
14029
c0d27fcc
MR
14030ac_header_compiler=no
14031fi
35996d22 14032rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14033echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14034echo "${ECHO_T}$ac_header_compiler" >&6
14035
14036# Is the header present?
14037echo "$as_me:$LINENO: checking $ac_header presence" >&5
14038echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14039cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14040/* confdefs.h. */
14041_ACEOF
14042cat confdefs.h >>conftest.$ac_ext
14043cat >>conftest.$ac_ext <<_ACEOF
14044/* end confdefs.h. */
98418dba 14045#include <$ac_header>
503d2be0 14046_ACEOF
c0d27fcc 14047if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14048 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14049 ac_status=$?
6bae0ccf 14050 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14051 rm -f conftest.er1
14052 cat conftest.err >&5
c0d27fcc 14053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14054 (exit $ac_status); } >/dev/null; then
14055 if test -s conftest.err; then
14056 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 14057 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14058 else
14059 ac_cpp_err=
14060 fi
14061else
14062 ac_cpp_err=yes
14063fi
14064if test -z "$ac_cpp_err"; then
c0d27fcc 14065 ac_header_preproc=yes
ba4481b5 14066else
503d2be0 14067 echo "$as_me: failed program was:" >&5
19650fd6
AS
14068sed 's/^/| /' conftest.$ac_ext >&5
14069
c0d27fcc 14070 ac_header_preproc=no
ba4481b5 14071fi
503d2be0 14072rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14073echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14074echo "${ECHO_T}$ac_header_preproc" >&6
14075
14076# So? What about this header?
35996d22
AS
14077case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14078 yes:no: )
c0d27fcc
MR
14079 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14080echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
14081 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14082echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14083 ac_header_preproc=yes
19650fd6 14084 ;;
35996d22 14085 no:yes:* )
c0d27fcc
MR
14086 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14087echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
14088 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14089echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14090 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14091echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14092 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14093echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14094 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14095echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
14096 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14097echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14098 (
14099 cat <<\_ASBOX
35996d22
AS
14100## ------------------------------------------ ##
14101## Report this to the AC_PACKAGE_NAME lists. ##
14102## ------------------------------------------ ##
19650fd6
AS
14103_ASBOX
14104 ) |
14105 sed "s/^/$as_me: WARNING: /" >&2
14106 ;;
c0d27fcc
MR
14107esac
14108echo "$as_me:$LINENO: checking for $ac_header" >&5
14109echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14110if eval "test \"\${$as_ac_Header+set}\" = set"; then
14111 echo $ECHO_N "(cached) $ECHO_C" >&6
14112else
35996d22 14113 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14114fi
c0d27fcc 14115echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 14116echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14117
14118fi
925c2f3f 14119if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14120 cat >>confdefs.h <<_ACEOF
925c2f3f 14121#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14122_ACEOF
503d2be0 14123
925c2f3f 14124fi
c0d27fcc 14125
925c2f3f
EZ
14126done
14127
c0d27fcc
MR
14128
14129
14130
35996d22
AS
14131
14132for ac_header in stdlib.h sys/time.h unistd.h
925c2f3f
EZ
14133do
14134as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14135if eval "test \"\${$as_ac_Header+set}\" = set"; then
14136 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
14137echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14138if eval "test \"\${$as_ac_Header+set}\" = set"; then
14139 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14140fi
14141echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14142echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 14143else
c0d27fcc
MR
14144 # Is the header compilable?
14145echo "$as_me:$LINENO: checking $ac_header usability" >&5
14146echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14147cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14148/* confdefs.h. */
14149_ACEOF
14150cat confdefs.h >>conftest.$ac_ext
14151cat >>conftest.$ac_ext <<_ACEOF
14152/* end confdefs.h. */
c0d27fcc
MR
14153$ac_includes_default
14154#include <$ac_header>
14155_ACEOF
14156rm -f conftest.$ac_objext
14157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 14158 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14159 ac_status=$?
35996d22
AS
14160 grep -v '^ *+' conftest.er1 >conftest.err
14161 rm -f conftest.er1
14162 cat conftest.err >&5
c0d27fcc
MR
14163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14164 (exit $ac_status); } &&
9adfabc2 14165 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
14166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14167 (eval $ac_try) 2>&5
14168 ac_status=$?
14169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14170 (exit $ac_status); }; } &&
14171 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14173 (eval $ac_try) 2>&5
14174 ac_status=$?
14175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14176 (exit $ac_status); }; }; then
14177 ac_header_compiler=yes
14178else
14179 echo "$as_me: failed program was:" >&5
19650fd6
AS
14180sed 's/^/| /' conftest.$ac_ext >&5
14181
c0d27fcc
MR
14182ac_header_compiler=no
14183fi
35996d22 14184rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14185echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14186echo "${ECHO_T}$ac_header_compiler" >&6
14187
14188# Is the header present?
14189echo "$as_me:$LINENO: checking $ac_header presence" >&5
14190echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14191cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14192/* confdefs.h. */
14193_ACEOF
14194cat confdefs.h >>conftest.$ac_ext
14195cat >>conftest.$ac_ext <<_ACEOF
14196/* end confdefs.h. */
98418dba 14197#include <$ac_header>
503d2be0 14198_ACEOF
c0d27fcc 14199if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14200 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14201 ac_status=$?
6bae0ccf 14202 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14203 rm -f conftest.er1
14204 cat conftest.err >&5
c0d27fcc 14205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14206 (exit $ac_status); } >/dev/null; then
14207 if test -s conftest.err; then
14208 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 14209 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14210 else
14211 ac_cpp_err=
14212 fi
14213else
14214 ac_cpp_err=yes
14215fi
14216if test -z "$ac_cpp_err"; then
c0d27fcc 14217 ac_header_preproc=yes
98418dba
CW
14218else
14219 echo "$as_me: failed program was:" >&5
19650fd6
AS
14220sed 's/^/| /' conftest.$ac_ext >&5
14221
c0d27fcc 14222 ac_header_preproc=no
98418dba
CW
14223fi
14224rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14225echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14226echo "${ECHO_T}$ac_header_preproc" >&6
14227
14228# So? What about this header?
35996d22
AS
14229case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14230 yes:no: )
c0d27fcc
MR
14231 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14232echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
14233 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14234echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14235 ac_header_preproc=yes
19650fd6 14236 ;;
35996d22 14237 no:yes:* )
c0d27fcc
MR
14238 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14239echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
14240 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14241echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14242 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14243echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14244 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14245echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14246 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14247echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
14248 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14249echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14250 (
14251 cat <<\_ASBOX
35996d22
AS
14252## ------------------------------------------ ##
14253## Report this to the AC_PACKAGE_NAME lists. ##
14254## ------------------------------------------ ##
19650fd6
AS
14255_ASBOX
14256 ) |
14257 sed "s/^/$as_me: WARNING: /" >&2
14258 ;;
c0d27fcc
MR
14259esac
14260echo "$as_me:$LINENO: checking for $ac_header" >&5
14261echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14262if eval "test \"\${$as_ac_Header+set}\" = set"; then
14263 echo $ECHO_N "(cached) $ECHO_C" >&6
14264else
35996d22 14265 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 14266fi
c0d27fcc 14267echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14268echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14269
14270fi
98418dba 14271if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14272 cat >>confdefs.h <<_ACEOF
98418dba 14273#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14274_ACEOF
98418dba
CW
14275
14276fi
c0d27fcc 14277
98418dba
CW
14278done
14279
c0d27fcc 14280
98418dba
CW
14281for ac_func in alarm
14282do
14283as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14284echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14285echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14286if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14287 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14288else
98418dba 14289 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14290/* confdefs.h. */
14291_ACEOF
14292cat confdefs.h >>conftest.$ac_ext
14293cat >>conftest.$ac_ext <<_ACEOF
14294/* end confdefs.h. */
35996d22
AS
14295/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14296 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14297#define $ac_func innocuous_$ac_func
14298
98418dba 14299/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14300 which can conflict with char $ac_func (); below.
14301 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14302 <limits.h> exists even on freestanding compilers. */
35996d22 14303
19650fd6
AS
14304#ifdef __STDC__
14305# include <limits.h>
14306#else
14307# include <assert.h>
14308#endif
35996d22
AS
14309
14310#undef $ac_func
14311
ba4481b5 14312/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14313#ifdef __cplusplus
14314extern "C"
19650fd6 14315{
503d2be0 14316#endif
ba4481b5 14317/* We use char because int might match the return type of a gcc2
503d2be0 14318 builtin and then its argument prototype would still apply. */
98418dba 14319char $ac_func ();
98418dba
CW
14320/* The GNU C library defines this for functions which it implements
14321 to always fail with ENOSYS. Some functions are actually named
14322 something starting with __ and the normal name is an alias. */
14323#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14324choke me
14325#else
19650fd6
AS
14326char (*f) () = $ac_func;
14327#endif
14328#ifdef __cplusplus
14329}
98418dba
CW
14330#endif
14331
19650fd6
AS
14332int
14333main ()
14334{
14335return f != $ac_func;
503d2be0
AS
14336 ;
14337 return 0;
14338}
14339_ACEOF
14340rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14342 (eval $ac_link) 2>conftest.er1
503d2be0 14343 ac_status=$?
35996d22
AS
14344 grep -v '^ *+' conftest.er1 >conftest.err
14345 rm -f conftest.er1
14346 cat conftest.err >&5
c0d27fcc 14347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14348 (exit $ac_status); } &&
9adfabc2 14349 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
14350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14351 (eval $ac_try) 2>&5
14352 ac_status=$?
14353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14354 (exit $ac_status); }; } &&
14355 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14357 (eval $ac_try) 2>&5
14358 ac_status=$?
c0d27fcc 14359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14360 (exit $ac_status); }; }; then
98418dba 14361 eval "$as_ac_var=yes"
503d2be0
AS
14362else
14363 echo "$as_me: failed program was:" >&5
19650fd6
AS
14364sed 's/^/| /' conftest.$ac_ext >&5
14365
98418dba 14366eval "$as_ac_var=no"
503d2be0 14367fi
35996d22
AS
14368rm -f conftest.err conftest.$ac_objext \
14369 conftest$ac_exeext conftest.$ac_ext
ffe36136 14370fi
c0d27fcc 14371echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14372echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14373if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14374 cat >>confdefs.h <<_ACEOF
98418dba 14375#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14376_ACEOF
ffe36136 14377
ba4481b5 14378fi
98418dba 14379done
ba4481b5 14380
c0d27fcc 14381echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
14382echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
14383if test "${ac_cv_func_working_mktime+set}" = set; then
14384 echo $ECHO_N "(cached) $ECHO_C" >&6
14385else
14386 if test "$cross_compiling" = yes; then
14387 ac_cv_func_working_mktime=no
14388else
14389 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14390/* confdefs.h. */
14391_ACEOF
14392cat confdefs.h >>conftest.$ac_ext
14393cat >>conftest.$ac_ext <<_ACEOF
14394/* end confdefs.h. */
98418dba
CW
14395/* Test program from Paul Eggert and Tony Leneis. */
14396#if TIME_WITH_SYS_TIME
14397# include <sys/time.h>
14398# include <time.h>
14399#else
14400# if HAVE_SYS_TIME_H
14401# include <sys/time.h>
14402# else
14403# include <time.h>
14404# endif
14405#endif
ba4481b5 14406
35996d22
AS
14407#if HAVE_STDLIB_H
14408# include <stdlib.h>
14409#endif
14410
98418dba
CW
14411#if HAVE_UNISTD_H
14412# include <unistd.h>
14413#endif
ba4481b5 14414
98418dba
CW
14415#if !HAVE_ALARM
14416# define alarm(X) /* empty */
14417#endif
df645f7c 14418
98418dba
CW
14419/* Work around redefinition to rpl_putenv by other config tests. */
14420#undef putenv
df645f7c 14421
98418dba 14422static time_t time_t_max;
35996d22 14423static time_t time_t_min;
df645f7c 14424
98418dba 14425/* Values we'll use to set the TZ environment variable. */
35996d22
AS
14426static char *tz_strings[] = {
14427 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
14428 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
14429};
14430#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 14431
98418dba
CW
14432/* Fail if mktime fails to convert a date in the spring-forward gap.
14433 Based on a problem report from Andreas Jaeger. */
14434static void
14435spring_forward_gap ()
14436{
14437 /* glibc (up to about 1998-10-07) failed this test. */
14438 struct tm tm;
14439
14440 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
14441 instead of "TZ=America/Vancouver" in order to detect the bug even
14442 on systems that don't support the Olson extension, or don't have the
14443 full zoneinfo tables installed. */
14444 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
14445
14446 tm.tm_year = 98;
14447 tm.tm_mon = 3;
14448 tm.tm_mday = 5;
14449 tm.tm_hour = 2;
14450 tm.tm_min = 0;
14451 tm.tm_sec = 0;
14452 tm.tm_isdst = -1;
14453 if (mktime (&tm) == (time_t)-1)
14454 exit (1);
14455}
14456
14457static void
35996d22 14458mktime_test1 (now)
98418dba
CW
14459 time_t now;
14460{
14461 struct tm *lt;
14462 if ((lt = localtime (&now)) && mktime (lt) != now)
14463 exit (1);
35996d22
AS
14464}
14465
14466static void
14467mktime_test (now)
14468 time_t now;
14469{
14470 mktime_test1 (now);
14471 mktime_test1 ((time_t) (time_t_max - now));
14472 mktime_test1 ((time_t) (time_t_min + now));
98418dba
CW
14473}
14474
14475static void
14476irix_6_4_bug ()
14477{
14478 /* Based on code from Ariel Faigon. */
14479 struct tm tm;
14480 tm.tm_year = 96;
14481 tm.tm_mon = 3;
14482 tm.tm_mday = 0;
14483 tm.tm_hour = 0;
14484 tm.tm_min = 0;
14485 tm.tm_sec = 0;
14486 tm.tm_isdst = -1;
14487 mktime (&tm);
14488 if (tm.tm_mon != 2 || tm.tm_mday != 31)
14489 exit (1);
14490}
14491
14492static void
14493bigtime_test (j)
14494 int j;
14495{
14496 struct tm tm;
14497 time_t now;
14498 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
14499 now = mktime (&tm);
14500 if (now != (time_t) -1)
14501 {
14502 struct tm *lt = localtime (&now);
14503 if (! (lt
14504 && lt->tm_year == tm.tm_year
14505 && lt->tm_mon == tm.tm_mon
14506 && lt->tm_mday == tm.tm_mday
14507 && lt->tm_hour == tm.tm_hour
14508 && lt->tm_min == tm.tm_min
14509 && lt->tm_sec == tm.tm_sec
14510 && lt->tm_yday == tm.tm_yday
14511 && lt->tm_wday == tm.tm_wday
14512 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
14513 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
14514 exit (1);
14515 }
14516}
14517
14518int
14519main ()
14520{
14521 time_t t, delta;
14522 int i, j;
14523
14524 /* This test makes some buggy mktime implementations loop.
14525 Give up after 60 seconds; a mktime slower than that
14526 isn't worth using anyway. */
14527 alarm (60);
14528
14529 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
14530 continue;
14531 time_t_max--;
35996d22
AS
14532 if ((time_t) -1 < 0)
14533 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
14534 continue;
98418dba
CW
14535 delta = time_t_max / 997; /* a suitable prime number */
14536 for (i = 0; i < N_STRINGS; i++)
14537 {
14538 if (tz_strings[i])
14539 putenv (tz_strings[i]);
503d2be0 14540
98418dba
CW
14541 for (t = 0; t <= time_t_max - delta; t += delta)
14542 mktime_test (t);
35996d22
AS
14543 mktime_test ((time_t) 1);
14544 mktime_test ((time_t) (60 * 60));
14545 mktime_test ((time_t) (60 * 60 * 24));
98418dba
CW
14546
14547 for (j = 1; 0 < j; j *= 2)
35996d22 14548 bigtime_test (j);
98418dba
CW
14549 bigtime_test (j - 1);
14550 }
14551 irix_6_4_bug ();
14552 spring_forward_gap ();
14553 exit (0);
503d2be0
AS
14554}
14555_ACEOF
98418dba 14556rm -f conftest$ac_exeext
c0d27fcc 14557if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14558 (eval $ac_link) 2>&5
14559 ac_status=$?
c0d27fcc 14560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14561 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 14562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14563 (eval $ac_try) 2>&5
14564 ac_status=$?
c0d27fcc 14565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14566 (exit $ac_status); }; }; then
98418dba 14567 ac_cv_func_working_mktime=yes
503d2be0 14568else
98418dba
CW
14569 echo "$as_me: program exited with status $ac_status" >&5
14570echo "$as_me: failed program was:" >&5
19650fd6
AS
14571sed 's/^/| /' conftest.$ac_ext >&5
14572
c0d27fcc 14573( exit $ac_status )
98418dba 14574ac_cv_func_working_mktime=no
503d2be0 14575fi
35996d22 14576rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 14577fi
ba4481b5 14578fi
c0d27fcc 14579echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
14580echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
14581if test $ac_cv_func_working_mktime = no; then
35996d22
AS
14582 case $LIBOBJS in
14583 "mktime.$ac_objext" | \
14584 *" mktime.$ac_objext" | \
14585 "mktime.$ac_objext "* | \
14586 *" mktime.$ac_objext "* ) ;;
14587 *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;;
14588esac
14589
ba4481b5
DL
14590fi
14591
98418dba 14592if test "$ac_cv_func_working_mktime" = no; then
b936fae4 14593
c0d27fcc 14594cat >>confdefs.h <<\_ACEOF
98418dba 14595#define BROKEN_MKTIME 1
c0d27fcc 14596_ACEOF
ba4481b5 14597
ba4481b5 14598fi
503d2be0 14599
98418dba
CW
14600ac_have_func=no # yes means we've found a way to get the load average.
14601
6bae0ccf
DL
14602# Make sure getloadavg.c is where it belongs, at configure-time.
14603test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
14604 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
14605echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
14606 { (exit 1); exit 1; }; }
14607
98418dba
CW
14608ac_save_LIBS=$LIBS
14609
14610# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 14611(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
14612echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
14613if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 14614 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14615else
503d2be0 14616 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14617/* confdefs.h. */
14618_ACEOF
14619cat confdefs.h >>conftest.$ac_ext
14620cat >>conftest.$ac_ext <<_ACEOF
14621/* end confdefs.h. */
35996d22
AS
14622/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
14623 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14624#define getloadavg innocuous_getloadavg
14625
98418dba 14626/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14627 which can conflict with char getloadavg (); below.
14628 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14629 <limits.h> exists even on freestanding compilers. */
35996d22 14630
19650fd6
AS
14631#ifdef __STDC__
14632# include <limits.h>
14633#else
14634# include <assert.h>
14635#endif
35996d22
AS
14636
14637#undef getloadavg
14638
ba4481b5 14639/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14640#ifdef __cplusplus
14641extern "C"
19650fd6 14642{
503d2be0 14643#endif
ba4481b5 14644/* We use char because int might match the return type of a gcc2
503d2be0 14645 builtin and then its argument prototype would still apply. */
98418dba 14646char getloadavg ();
98418dba
CW
14647/* The GNU C library defines this for functions which it implements
14648 to always fail with ENOSYS. Some functions are actually named
14649 something starting with __ and the normal name is an alias. */
14650#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
14651choke me
14652#else
19650fd6
AS
14653char (*f) () = getloadavg;
14654#endif
14655#ifdef __cplusplus
14656}
cd958eb3
MB
14657#endif
14658
19650fd6
AS
14659int
14660main ()
14661{
14662return f != getloadavg;
503d2be0
AS
14663 ;
14664 return 0;
14665}
14666_ACEOF
14667rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14668if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14669 (eval $ac_link) 2>conftest.er1
503d2be0 14670 ac_status=$?
35996d22
AS
14671 grep -v '^ *+' conftest.er1 >conftest.err
14672 rm -f conftest.er1
14673 cat conftest.err >&5
c0d27fcc 14674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14675 (exit $ac_status); } &&
9adfabc2 14676 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
14677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14678 (eval $ac_try) 2>&5
14679 ac_status=$?
14680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14681 (exit $ac_status); }; } &&
14682 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14684 (eval $ac_try) 2>&5
14685 ac_status=$?
c0d27fcc 14686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14687 (exit $ac_status); }; }; then
98418dba 14688 ac_cv_func_getloadavg=yes
503d2be0
AS
14689else
14690 echo "$as_me: failed program was:" >&5
19650fd6
AS
14691sed 's/^/| /' conftest.$ac_ext >&5
14692
98418dba 14693ac_cv_func_getloadavg=no
503d2be0 14694fi
35996d22
AS
14695rm -f conftest.err conftest.$ac_objext \
14696 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14697fi
c0d27fcc 14698echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
14699echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
14700if test $ac_cv_func_getloadavg = yes; then
14701 exit 0
14702else
14703 exit 1
ba4481b5 14704fi
98418dba 14705) && ac_have_func=yes
ba4481b5 14706
98418dba 14707# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 14708
98418dba
CW
14709for ac_func in pstat_getdynamic
14710do
14711as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14712echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14713echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14714if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14715 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14716else
503d2be0 14717 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14718/* confdefs.h. */
14719_ACEOF
14720cat confdefs.h >>conftest.$ac_ext
14721cat >>conftest.$ac_ext <<_ACEOF
14722/* end confdefs.h. */
35996d22
AS
14723/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14724 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14725#define $ac_func innocuous_$ac_func
14726
98418dba 14727/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14728 which can conflict with char $ac_func (); below.
14729 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14730 <limits.h> exists even on freestanding compilers. */
35996d22 14731
19650fd6
AS
14732#ifdef __STDC__
14733# include <limits.h>
14734#else
14735# include <assert.h>
14736#endif
35996d22
AS
14737
14738#undef $ac_func
14739
ba4481b5 14740/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14741#ifdef __cplusplus
14742extern "C"
19650fd6 14743{
503d2be0 14744#endif
ba4481b5 14745/* We use char because int might match the return type of a gcc2
503d2be0 14746 builtin and then its argument prototype would still apply. */
98418dba 14747char $ac_func ();
98418dba
CW
14748/* The GNU C library defines this for functions which it implements
14749 to always fail with ENOSYS. Some functions are actually named
14750 something starting with __ and the normal name is an alias. */
14751#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14752choke me
14753#else
19650fd6
AS
14754char (*f) () = $ac_func;
14755#endif
14756#ifdef __cplusplus
14757}
98418dba
CW
14758#endif
14759
19650fd6
AS
14760int
14761main ()
14762{
14763return f != $ac_func;
98418dba
CW
14764 ;
14765 return 0;
14766}
f21fadcc 14767_ACEOF
98418dba 14768rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14769if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14770 (eval $ac_link) 2>conftest.er1
f21fadcc 14771 ac_status=$?
35996d22
AS
14772 grep -v '^ *+' conftest.er1 >conftest.err
14773 rm -f conftest.er1
14774 cat conftest.err >&5
c0d27fcc 14775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14776 (exit $ac_status); } &&
9adfabc2 14777 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
14778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14779 (eval $ac_try) 2>&5
14780 ac_status=$?
14781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14782 (exit $ac_status); }; } &&
14783 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
14785 (eval $ac_try) 2>&5
14786 ac_status=$?
c0d27fcc 14787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
14788 (exit $ac_status); }; }; then
14789 eval "$as_ac_var=yes"
f21fadcc
JD
14790else
14791 echo "$as_me: failed program was:" >&5
19650fd6
AS
14792sed 's/^/| /' conftest.$ac_ext >&5
14793
98418dba 14794eval "$as_ac_var=no"
f21fadcc 14795fi
35996d22
AS
14796rm -f conftest.err conftest.$ac_objext \
14797 conftest$ac_exeext conftest.$ac_ext
f21fadcc 14798fi
c0d27fcc 14799echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14800echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14801if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14802 cat >>confdefs.h <<_ACEOF
98418dba 14803#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14804_ACEOF
98418dba
CW
14805
14806fi
14807done
14808
c0d27fcc 14809
98418dba
CW
14810# Solaris has libkstat which does not require root.
14811
c0d27fcc 14812echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
14813echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
14814if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
14815 echo $ECHO_N "(cached) $ECHO_C" >&6
14816else
14817 ac_check_lib_save_LIBS=$LIBS
98418dba 14818LIBS="-lkstat $LIBS"
f21fadcc 14819cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14820/* confdefs.h. */
14821_ACEOF
14822cat confdefs.h >>conftest.$ac_ext
14823cat >>conftest.$ac_ext <<_ACEOF
14824/* end confdefs.h. */
f21fadcc
JD
14825
14826/* Override any gcc2 internal prototype to avoid an error. */
14827#ifdef __cplusplus
14828extern "C"
14829#endif
14830/* We use char because int might match the return type of a gcc2
14831 builtin and then its argument prototype would still apply. */
98418dba 14832char kstat_open ();
f21fadcc
JD
14833int
14834main ()
14835{
98418dba 14836kstat_open ();
f21fadcc
JD
14837 ;
14838 return 0;
14839}
14840_ACEOF
14841rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14842if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14843 (eval $ac_link) 2>conftest.er1
f21fadcc 14844 ac_status=$?
35996d22
AS
14845 grep -v '^ *+' conftest.er1 >conftest.err
14846 rm -f conftest.er1
14847 cat conftest.err >&5
c0d27fcc 14848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 14849 (exit $ac_status); } &&
9adfabc2 14850 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
14851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14852 (eval $ac_try) 2>&5
14853 ac_status=$?
14854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14855 (exit $ac_status); }; } &&
14856 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
14858 (eval $ac_try) 2>&5
14859 ac_status=$?
c0d27fcc 14860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 14861 (exit $ac_status); }; }; then
98418dba 14862 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
14863else
14864 echo "$as_me: failed program was:" >&5
19650fd6
AS
14865sed 's/^/| /' conftest.$ac_ext >&5
14866
98418dba 14867ac_cv_lib_kstat_kstat_open=no
f21fadcc 14868fi
35996d22
AS
14869rm -f conftest.err conftest.$ac_objext \
14870 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
14871LIBS=$ac_check_lib_save_LIBS
14872fi
c0d27fcc 14873echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
14874echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
14875if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 14876 cat >>confdefs.h <<_ACEOF
98418dba 14877#define HAVE_LIBKSTAT 1
c0d27fcc 14878_ACEOF
f21fadcc 14879
98418dba 14880 LIBS="-lkstat $LIBS"
f21fadcc 14881
f21fadcc
JD
14882fi
14883
98418dba
CW
14884test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
14885
14886# Some systems with -lutil have (and need) -lkvm as well, some do not.
14887# On Solaris, -lkvm requires nlist from -lelf, so check that first
14888# to get the right answer into the cache.
14889# For kstat on solaris, we need libelf to force the definition of SVR4 below.
14890if test $ac_have_func = no; then
c0d27fcc 14891 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
14892echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
14893if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 14894 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14895else
98418dba
CW
14896 ac_check_lib_save_LIBS=$LIBS
14897LIBS="-lelf $LIBS"
14898cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14899/* confdefs.h. */
14900_ACEOF
14901cat confdefs.h >>conftest.$ac_ext
14902cat >>conftest.$ac_ext <<_ACEOF
14903/* end confdefs.h. */
98418dba
CW
14904
14905/* Override any gcc2 internal prototype to avoid an error. */
14906#ifdef __cplusplus
14907extern "C"
14908#endif
14909/* We use char because int might match the return type of a gcc2
14910 builtin and then its argument prototype would still apply. */
14911char elf_begin ();
503d2be0
AS
14912int
14913main ()
14914{
98418dba 14915elf_begin ();
503d2be0
AS
14916 ;
14917 return 0;
14918}
14919_ACEOF
14920rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14921if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14922 (eval $ac_link) 2>conftest.er1
503d2be0 14923 ac_status=$?
35996d22
AS
14924 grep -v '^ *+' conftest.er1 >conftest.err
14925 rm -f conftest.er1
14926 cat conftest.err >&5
c0d27fcc 14927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14928 (exit $ac_status); } &&
9adfabc2 14929 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
14930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14931 (eval $ac_try) 2>&5
14932 ac_status=$?
14933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14934 (exit $ac_status); }; } &&
14935 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14937 (eval $ac_try) 2>&5
14938 ac_status=$?
c0d27fcc 14939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14940 (exit $ac_status); }; }; then
98418dba 14941 ac_cv_lib_elf_elf_begin=yes
ba4481b5 14942else
503d2be0 14943 echo "$as_me: failed program was:" >&5
19650fd6
AS
14944sed 's/^/| /' conftest.$ac_ext >&5
14945
98418dba 14946ac_cv_lib_elf_elf_begin=no
ba4481b5 14947fi
35996d22
AS
14948rm -f conftest.err conftest.$ac_objext \
14949 conftest$ac_exeext conftest.$ac_ext
98418dba 14950LIBS=$ac_check_lib_save_LIBS
ba4481b5 14951fi
c0d27fcc 14952echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
14953echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
14954if test $ac_cv_lib_elf_elf_begin = yes; then
14955 LIBS="-lelf $LIBS"
ba4481b5
DL
14956fi
14957
98418dba
CW
14958fi
14959if test $ac_have_func = no; then
c0d27fcc 14960 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
14961echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
14962if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 14963 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14964else
98418dba
CW
14965 ac_check_lib_save_LIBS=$LIBS
14966LIBS="-lkvm $LIBS"
14967cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14968/* confdefs.h. */
14969_ACEOF
14970cat confdefs.h >>conftest.$ac_ext
14971cat >>conftest.$ac_ext <<_ACEOF
14972/* end confdefs.h. */
98418dba
CW
14973
14974/* Override any gcc2 internal prototype to avoid an error. */
14975#ifdef __cplusplus
14976extern "C"
14977#endif
14978/* We use char because int might match the return type of a gcc2
14979 builtin and then its argument prototype would still apply. */
14980char kvm_open ();
503d2be0
AS
14981int
14982main ()
14983{
98418dba 14984kvm_open ();
503d2be0
AS
14985 ;
14986 return 0;
14987}
14988_ACEOF
14989rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14990if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14991 (eval $ac_link) 2>conftest.er1
503d2be0 14992 ac_status=$?
35996d22
AS
14993 grep -v '^ *+' conftest.er1 >conftest.err
14994 rm -f conftest.er1
14995 cat conftest.err >&5
c0d27fcc 14996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14997 (exit $ac_status); } &&
9adfabc2 14998 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
14999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15000 (eval $ac_try) 2>&5
15001 ac_status=$?
15002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15003 (exit $ac_status); }; } &&
15004 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15006 (eval $ac_try) 2>&5
15007 ac_status=$?
c0d27fcc 15008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15009 (exit $ac_status); }; }; then
98418dba 15010 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
15011else
15012 echo "$as_me: failed program was:" >&5
19650fd6
AS
15013sed 's/^/| /' conftest.$ac_ext >&5
15014
98418dba 15015ac_cv_lib_kvm_kvm_open=no
503d2be0 15016fi
35996d22
AS
15017rm -f conftest.err conftest.$ac_objext \
15018 conftest$ac_exeext conftest.$ac_ext
98418dba 15019LIBS=$ac_check_lib_save_LIBS
503d2be0 15020fi
c0d27fcc 15021echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
15022echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
15023if test $ac_cv_lib_kvm_kvm_open = yes; then
15024 LIBS="-lkvm $LIBS"
ba4481b5
DL
15025fi
15026
98418dba 15027 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 15028 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
15029echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
15030if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 15031 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15032else
98418dba
CW
15033 ac_check_lib_save_LIBS=$LIBS
15034LIBS="-lutil $LIBS"
15035cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15036/* confdefs.h. */
15037_ACEOF
15038cat confdefs.h >>conftest.$ac_ext
15039cat >>conftest.$ac_ext <<_ACEOF
15040/* end confdefs.h. */
98418dba
CW
15041
15042/* Override any gcc2 internal prototype to avoid an error. */
15043#ifdef __cplusplus
15044extern "C"
15045#endif
15046/* We use char because int might match the return type of a gcc2
15047 builtin and then its argument prototype would still apply. */
15048char getloadavg ();
503d2be0
AS
15049int
15050main ()
15051{
98418dba 15052getloadavg ();
503d2be0
AS
15053 ;
15054 return 0;
15055}
15056_ACEOF
15057rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15058if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15059 (eval $ac_link) 2>conftest.er1
503d2be0 15060 ac_status=$?
35996d22
AS
15061 grep -v '^ *+' conftest.er1 >conftest.err
15062 rm -f conftest.er1
15063 cat conftest.err >&5
c0d27fcc 15064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15065 (exit $ac_status); } &&
9adfabc2 15066 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
c0d27fcc 15067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15068 (eval $ac_try) 2>&5
15069 ac_status=$?
c0d27fcc 15070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
15071 (exit $ac_status); }; } &&
15072 { ac_try='test -s conftest$ac_exeext'
15073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15074 (eval $ac_try) 2>&5
15075 ac_status=$?
15076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15077 (exit $ac_status); }; }; then
15078 ac_cv_lib_util_getloadavg=yes
15079else
503d2be0 15080 echo "$as_me: failed program was:" >&5
19650fd6
AS
15081sed 's/^/| /' conftest.$ac_ext >&5
15082
98418dba 15083ac_cv_lib_util_getloadavg=no
ba4481b5 15084fi
35996d22
AS
15085rm -f conftest.err conftest.$ac_objext \
15086 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15087LIBS=$ac_check_lib_save_LIBS
15088fi
c0d27fcc 15089echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
15090echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
15091if test $ac_cv_lib_util_getloadavg = yes; then
15092 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 15093fi
503d2be0 15094
98418dba 15095fi
ba4481b5 15096
98418dba
CW
15097if test $ac_have_func = no; then
15098 # There is a commonly available library for RS/6000 AIX.
15099 # Since it is not a standard part of AIX, it might be installed locally.
15100 ac_getloadavg_LIBS=$LIBS
15101 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 15102 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
15103echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
15104if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 15105 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15106else
98418dba
CW
15107 ac_check_lib_save_LIBS=$LIBS
15108LIBS="-lgetloadavg $LIBS"
15109cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15110/* confdefs.h. */
15111_ACEOF
15112cat confdefs.h >>conftest.$ac_ext
15113cat >>conftest.$ac_ext <<_ACEOF
15114/* end confdefs.h. */
ba4481b5 15115
98418dba
CW
15116/* Override any gcc2 internal prototype to avoid an error. */
15117#ifdef __cplusplus
15118extern "C"
15119#endif
15120/* We use char because int might match the return type of a gcc2
15121 builtin and then its argument prototype would still apply. */
15122char getloadavg ();
98418dba
CW
15123int
15124main ()
15125{
15126getloadavg ();
15127 ;
15128 return 0;
15129}
503d2be0 15130_ACEOF
98418dba 15131rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15133 (eval $ac_link) 2>conftest.er1
98418dba 15134 ac_status=$?
35996d22
AS
15135 grep -v '^ *+' conftest.er1 >conftest.err
15136 rm -f conftest.er1
15137 cat conftest.err >&5
c0d27fcc 15138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15139 (exit $ac_status); } &&
9adfabc2 15140 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15142 (eval $ac_try) 2>&5
15143 ac_status=$?
15144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15145 (exit $ac_status); }; } &&
15146 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15148 (eval $ac_try) 2>&5
15149 ac_status=$?
c0d27fcc 15150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15151 (exit $ac_status); }; }; then
15152 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 15153else
98418dba 15154 echo "$as_me: failed program was:" >&5
19650fd6
AS
15155sed 's/^/| /' conftest.$ac_ext >&5
15156
98418dba
CW
15157ac_cv_lib_getloadavg_getloadavg=no
15158fi
35996d22
AS
15159rm -f conftest.err conftest.$ac_objext \
15160 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15161LIBS=$ac_check_lib_save_LIBS
15162fi
c0d27fcc 15163echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
15164echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
15165if test $ac_cv_lib_getloadavg_getloadavg = yes; then
15166 LIBS="-lgetloadavg $LIBS"
15167else
15168 LIBS=$ac_getloadavg_LIBS
ba4481b5 15169fi
ba4481b5
DL
15170
15171fi
98418dba
CW
15172
15173# Make sure it is really in the library, if we think we found it,
15174# otherwise set up the replacement function.
15175
15176for ac_func in getloadavg
15177do
15178as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15179echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15180echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15181if eval "test \"\${$as_ac_var+set}\" = set"; then
15182 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15183else
503d2be0 15184 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15185/* confdefs.h. */
15186_ACEOF
15187cat confdefs.h >>conftest.$ac_ext
15188cat >>conftest.$ac_ext <<_ACEOF
15189/* end confdefs.h. */
35996d22
AS
15190/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15191 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15192#define $ac_func innocuous_$ac_func
15193
ba4481b5 15194/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15195 which can conflict with char $ac_func (); below.
15196 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15197 <limits.h> exists even on freestanding compilers. */
35996d22 15198
19650fd6
AS
15199#ifdef __STDC__
15200# include <limits.h>
15201#else
15202# include <assert.h>
15203#endif
35996d22
AS
15204
15205#undef $ac_func
15206
ba4481b5 15207/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15208#ifdef __cplusplus
15209extern "C"
19650fd6 15210{
503d2be0 15211#endif
ba4481b5 15212/* We use char because int might match the return type of a gcc2
503d2be0
AS
15213 builtin and then its argument prototype would still apply. */
15214char $ac_func ();
ba4481b5
DL
15215/* The GNU C library defines this for functions which it implements
15216 to always fail with ENOSYS. Some functions are actually named
15217 something starting with __ and the normal name is an alias. */
15218#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15219choke me
15220#else
19650fd6
AS
15221char (*f) () = $ac_func;
15222#endif
15223#ifdef __cplusplus
15224}
cd958eb3
MB
15225#endif
15226
19650fd6
AS
15227int
15228main ()
15229{
15230return f != $ac_func;
503d2be0
AS
15231 ;
15232 return 0;
15233}
15234_ACEOF
15235rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15236if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15237 (eval $ac_link) 2>conftest.er1
503d2be0 15238 ac_status=$?
35996d22
AS
15239 grep -v '^ *+' conftest.er1 >conftest.err
15240 rm -f conftest.er1
15241 cat conftest.err >&5
c0d27fcc 15242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15243 (exit $ac_status); } &&
9adfabc2 15244 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15246 (eval $ac_try) 2>&5
15247 ac_status=$?
15248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15249 (exit $ac_status); }; } &&
15250 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15252 (eval $ac_try) 2>&5
15253 ac_status=$?
c0d27fcc 15254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15255 (exit $ac_status); }; }; then
15256 eval "$as_ac_var=yes"
15257else
15258 echo "$as_me: failed program was:" >&5
19650fd6
AS
15259sed 's/^/| /' conftest.$ac_ext >&5
15260
503d2be0
AS
15261eval "$as_ac_var=no"
15262fi
35996d22
AS
15263rm -f conftest.err conftest.$ac_objext \
15264 conftest$ac_exeext conftest.$ac_ext
503d2be0 15265fi
c0d27fcc 15266echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15267echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15268if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15269 cat >>confdefs.h <<_ACEOF
98418dba 15270#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15271_ACEOF
503d2be0 15272
98418dba 15273else
35996d22
AS
15274 case $LIBOBJS in
15275 "getloadavg.$ac_objext" | \
15276 *" getloadavg.$ac_objext" | \
15277 "getloadavg.$ac_objext "* | \
15278 *" getloadavg.$ac_objext "* ) ;;
15279 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" ;;
15280esac
15281
ba4481b5 15282
c0d27fcc 15283cat >>confdefs.h <<\_ACEOF
98418dba 15284#define C_GETLOADAVG 1
c0d27fcc 15285_ACEOF
ba4481b5 15286
98418dba
CW
15287# Figure out what our getloadavg.c needs.
15288ac_have_func=no
c0d27fcc
MR
15289if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15290 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
15291echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15292if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 15293 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15294fi
15295echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
15296echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 15297else
c0d27fcc
MR
15298 # Is the header compilable?
15299echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
15300echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
15301cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15302/* confdefs.h. */
15303_ACEOF
15304cat confdefs.h >>conftest.$ac_ext
15305cat >>conftest.$ac_ext <<_ACEOF
15306/* end confdefs.h. */
c0d27fcc
MR
15307$ac_includes_default
15308#include <sys/dg_sys_info.h>
15309_ACEOF
15310rm -f conftest.$ac_objext
15311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15312 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15313 ac_status=$?
35996d22
AS
15314 grep -v '^ *+' conftest.er1 >conftest.err
15315 rm -f conftest.er1
15316 cat conftest.err >&5
c0d27fcc
MR
15317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15318 (exit $ac_status); } &&
9adfabc2 15319 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15321 (eval $ac_try) 2>&5
15322 ac_status=$?
15323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15324 (exit $ac_status); }; } &&
15325 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15327 (eval $ac_try) 2>&5
15328 ac_status=$?
15329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15330 (exit $ac_status); }; }; then
15331 ac_header_compiler=yes
15332else
15333 echo "$as_me: failed program was:" >&5
19650fd6
AS
15334sed 's/^/| /' conftest.$ac_ext >&5
15335
c0d27fcc
MR
15336ac_header_compiler=no
15337fi
35996d22 15338rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15339echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15340echo "${ECHO_T}$ac_header_compiler" >&6
15341
15342# Is the header present?
15343echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
15344echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
15345cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15346/* confdefs.h. */
15347_ACEOF
15348cat confdefs.h >>conftest.$ac_ext
15349cat >>conftest.$ac_ext <<_ACEOF
15350/* end confdefs.h. */
98418dba
CW
15351#include <sys/dg_sys_info.h>
15352_ACEOF
c0d27fcc 15353if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
15354 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15355 ac_status=$?
6bae0ccf 15356 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15357 rm -f conftest.er1
15358 cat conftest.err >&5
c0d27fcc 15359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15360 (exit $ac_status); } >/dev/null; then
15361 if test -s conftest.err; then
15362 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15363 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15364 else
15365 ac_cpp_err=
15366 fi
15367else
15368 ac_cpp_err=yes
ba4481b5 15369fi
98418dba 15370if test -z "$ac_cpp_err"; then
c0d27fcc 15371 ac_header_preproc=yes
98418dba
CW
15372else
15373 echo "$as_me: failed program was:" >&5
19650fd6
AS
15374sed 's/^/| /' conftest.$ac_ext >&5
15375
c0d27fcc 15376 ac_header_preproc=no
ba4481b5 15377fi
98418dba 15378rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15379echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15380echo "${ECHO_T}$ac_header_preproc" >&6
15381
15382# So? What about this header?
35996d22
AS
15383case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15384 yes:no: )
c0d27fcc
MR
15385 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
15386echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15387 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
15388echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
15389 ac_header_preproc=yes
19650fd6 15390 ;;
35996d22 15391 no:yes:* )
c0d27fcc
MR
15392 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
15393echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
35996d22
AS
15394 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
15395echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
15396 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
15397echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
15398 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
15399echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15400 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 15401echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15402 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
15403echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15404 (
15405 cat <<\_ASBOX
35996d22
AS
15406## ------------------------------------------ ##
15407## Report this to the AC_PACKAGE_NAME lists. ##
15408## ------------------------------------------ ##
19650fd6
AS
15409_ASBOX
15410 ) |
15411 sed "s/^/$as_me: WARNING: /" >&2
15412 ;;
c0d27fcc
MR
15413esac
15414echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
15415echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15416if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15417 echo $ECHO_N "(cached) $ECHO_C" >&6
15418else
15419 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 15420fi
c0d27fcc 15421echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 15422echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
15423
15424fi
98418dba
CW
15425if test $ac_cv_header_sys_dg_sys_info_h = yes; then
15426 ac_have_func=yes
ba4481b5 15427
c0d27fcc 15428cat >>confdefs.h <<\_ACEOF
98418dba 15429#define DGUX 1
c0d27fcc
MR
15430_ACEOF
15431
503d2be0 15432
c0d27fcc 15433echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
15434echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
15435if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 15436 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15437else
503d2be0 15438 ac_check_lib_save_LIBS=$LIBS
98418dba 15439LIBS="-ldgc $LIBS"
503d2be0 15440cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15441/* confdefs.h. */
15442_ACEOF
15443cat confdefs.h >>conftest.$ac_ext
15444cat >>conftest.$ac_ext <<_ACEOF
15445/* end confdefs.h. */
503d2be0 15446
ba4481b5 15447/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15448#ifdef __cplusplus
15449extern "C"
15450#endif
ba4481b5 15451/* We use char because int might match the return type of a gcc2
503d2be0 15452 builtin and then its argument prototype would still apply. */
98418dba 15453char dg_sys_info ();
503d2be0
AS
15454int
15455main ()
15456{
98418dba 15457dg_sys_info ();
503d2be0
AS
15458 ;
15459 return 0;
15460}
15461_ACEOF
15462rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15463if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15464 (eval $ac_link) 2>conftest.er1
503d2be0 15465 ac_status=$?
35996d22
AS
15466 grep -v '^ *+' conftest.er1 >conftest.err
15467 rm -f conftest.er1
15468 cat conftest.err >&5
c0d27fcc 15469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15470 (exit $ac_status); } &&
9adfabc2 15471 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15473 (eval $ac_try) 2>&5
15474 ac_status=$?
15475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15476 (exit $ac_status); }; } &&
15477 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15479 (eval $ac_try) 2>&5
15480 ac_status=$?
c0d27fcc 15481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15482 (exit $ac_status); }; }; then
98418dba 15483 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
15484else
15485 echo "$as_me: failed program was:" >&5
19650fd6
AS
15486sed 's/^/| /' conftest.$ac_ext >&5
15487
98418dba 15488ac_cv_lib_dgc_dg_sys_info=no
503d2be0 15489fi
35996d22
AS
15490rm -f conftest.err conftest.$ac_objext \
15491 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15492LIBS=$ac_check_lib_save_LIBS
15493fi
c0d27fcc 15494echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
15495echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
15496if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 15497 cat >>confdefs.h <<_ACEOF
98418dba 15498#define HAVE_LIBDGC 1
c0d27fcc 15499_ACEOF
ba4481b5 15500
98418dba 15501 LIBS="-ldgc $LIBS"
ba4481b5 15502
ba4481b5
DL
15503fi
15504
98418dba 15505fi
503d2be0 15506
c0d27fcc
MR
15507
15508
15509if test "${ac_cv_header_locale_h+set}" = set; then
15510 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
15511echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
15512if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 15513 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15514fi
15515echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
15516echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 15517else
c0d27fcc
MR
15518 # Is the header compilable?
15519echo "$as_me:$LINENO: checking locale.h usability" >&5
15520echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
15521cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15522/* confdefs.h. */
15523_ACEOF
15524cat confdefs.h >>conftest.$ac_ext
15525cat >>conftest.$ac_ext <<_ACEOF
15526/* end confdefs.h. */
c0d27fcc
MR
15527$ac_includes_default
15528#include <locale.h>
15529_ACEOF
15530rm -f conftest.$ac_objext
15531if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15532 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15533 ac_status=$?
35996d22
AS
15534 grep -v '^ *+' conftest.er1 >conftest.err
15535 rm -f conftest.er1
15536 cat conftest.err >&5
c0d27fcc
MR
15537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15538 (exit $ac_status); } &&
9adfabc2 15539 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15541 (eval $ac_try) 2>&5
15542 ac_status=$?
15543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15544 (exit $ac_status); }; } &&
15545 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15547 (eval $ac_try) 2>&5
15548 ac_status=$?
15549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15550 (exit $ac_status); }; }; then
15551 ac_header_compiler=yes
15552else
15553 echo "$as_me: failed program was:" >&5
19650fd6
AS
15554sed 's/^/| /' conftest.$ac_ext >&5
15555
c0d27fcc
MR
15556ac_header_compiler=no
15557fi
35996d22 15558rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15559echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15560echo "${ECHO_T}$ac_header_compiler" >&6
15561
15562# Is the header present?
15563echo "$as_me:$LINENO: checking locale.h presence" >&5
15564echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
15565cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15566/* confdefs.h. */
15567_ACEOF
15568cat confdefs.h >>conftest.$ac_ext
15569cat >>conftest.$ac_ext <<_ACEOF
15570/* end confdefs.h. */
98418dba 15571#include <locale.h>
503d2be0 15572_ACEOF
c0d27fcc 15573if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 15574 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 15575 ac_status=$?
6bae0ccf 15576 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15577 rm -f conftest.er1
15578 cat conftest.err >&5
c0d27fcc 15579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15580 (exit $ac_status); } >/dev/null; then
15581 if test -s conftest.err; then
15582 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15583 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15584 else
15585 ac_cpp_err=
15586 fi
503d2be0 15587else
98418dba 15588 ac_cpp_err=yes
503d2be0 15589fi
98418dba 15590if test -z "$ac_cpp_err"; then
c0d27fcc 15591 ac_header_preproc=yes
98418dba
CW
15592else
15593 echo "$as_me: failed program was:" >&5
19650fd6
AS
15594sed 's/^/| /' conftest.$ac_ext >&5
15595
c0d27fcc 15596 ac_header_preproc=no
ba4481b5 15597fi
98418dba 15598rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15599echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15600echo "${ECHO_T}$ac_header_preproc" >&6
15601
15602# So? What about this header?
35996d22
AS
15603case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15604 yes:no: )
c0d27fcc
MR
15605 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
15606echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15607 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
15608echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
15609 ac_header_preproc=yes
19650fd6 15610 ;;
35996d22 15611 no:yes:* )
c0d27fcc
MR
15612 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
15613echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
35996d22
AS
15614 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
15615echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
15616 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
15617echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
15618 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
15619echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15620 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 15621echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15622 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
15623echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15624 (
15625 cat <<\_ASBOX
35996d22
AS
15626## ------------------------------------------ ##
15627## Report this to the AC_PACKAGE_NAME lists. ##
15628## ------------------------------------------ ##
19650fd6
AS
15629_ASBOX
15630 ) |
15631 sed "s/^/$as_me: WARNING: /" >&2
15632 ;;
c0d27fcc
MR
15633esac
15634echo "$as_me:$LINENO: checking for locale.h" >&5
15635echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
15636if test "${ac_cv_header_locale_h+set}" = set; then
15637 echo $ECHO_N "(cached) $ECHO_C" >&6
15638else
15639 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 15640fi
c0d27fcc 15641echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
15642echo "${ECHO_T}$ac_cv_header_locale_h" >&6
15643
c0d27fcc
MR
15644fi
15645
15646
15647
98418dba 15648for ac_func in setlocale
ba4481b5 15649do
503d2be0 15650as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15651echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15652echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15653if eval "test \"\${$as_ac_var+set}\" = set"; then
15654 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15655else
503d2be0 15656 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15657/* confdefs.h. */
15658_ACEOF
15659cat confdefs.h >>conftest.$ac_ext
15660cat >>conftest.$ac_ext <<_ACEOF
15661/* end confdefs.h. */
35996d22
AS
15662/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15663 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15664#define $ac_func innocuous_$ac_func
15665
ba4481b5 15666/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15667 which can conflict with char $ac_func (); below.
15668 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15669 <limits.h> exists even on freestanding compilers. */
35996d22 15670
19650fd6
AS
15671#ifdef __STDC__
15672# include <limits.h>
15673#else
15674# include <assert.h>
15675#endif
35996d22
AS
15676
15677#undef $ac_func
15678
ba4481b5 15679/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15680#ifdef __cplusplus
15681extern "C"
19650fd6 15682{
503d2be0 15683#endif
ba4481b5 15684/* We use char because int might match the return type of a gcc2
503d2be0
AS
15685 builtin and then its argument prototype would still apply. */
15686char $ac_func ();
ba4481b5
DL
15687/* The GNU C library defines this for functions which it implements
15688 to always fail with ENOSYS. Some functions are actually named
15689 something starting with __ and the normal name is an alias. */
15690#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15691choke me
15692#else
19650fd6
AS
15693char (*f) () = $ac_func;
15694#endif
15695#ifdef __cplusplus
15696}
ba4481b5
DL
15697#endif
15698
19650fd6
AS
15699int
15700main ()
15701{
15702return f != $ac_func;
503d2be0
AS
15703 ;
15704 return 0;
15705}
15706_ACEOF
15707rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15708if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15709 (eval $ac_link) 2>conftest.er1
503d2be0 15710 ac_status=$?
35996d22
AS
15711 grep -v '^ *+' conftest.er1 >conftest.err
15712 rm -f conftest.er1
15713 cat conftest.err >&5
c0d27fcc 15714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15715 (exit $ac_status); } &&
9adfabc2 15716 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15718 (eval $ac_try) 2>&5
15719 ac_status=$?
15720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15721 (exit $ac_status); }; } &&
15722 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15724 (eval $ac_try) 2>&5
15725 ac_status=$?
c0d27fcc 15726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15727 (exit $ac_status); }; }; then
15728 eval "$as_ac_var=yes"
15729else
15730 echo "$as_me: failed program was:" >&5
19650fd6
AS
15731sed 's/^/| /' conftest.$ac_ext >&5
15732
503d2be0
AS
15733eval "$as_ac_var=no"
15734fi
35996d22
AS
15735rm -f conftest.err conftest.$ac_objext \
15736 conftest$ac_exeext conftest.$ac_ext
503d2be0 15737fi
c0d27fcc 15738echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15739echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15740if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15741 cat >>confdefs.h <<_ACEOF
503d2be0 15742#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15743_ACEOF
ba4481b5 15744
ba4481b5
DL
15745fi
15746done
15747
c0d27fcc 15748
98418dba
CW
15749# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
15750# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
15751# Irix 4.0.5F has the header but not the library.
15752if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
15753 ac_have_func=yes
15754
c0d27fcc 15755cat >>confdefs.h <<\_ACEOF
98418dba 15756#define SVR4 1
c0d27fcc 15757_ACEOF
98418dba
CW
15758
15759fi
15760
15761if test $ac_have_func = no; then
c0d27fcc
MR
15762 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
15763 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
15764echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
15765if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 15766 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15767fi
15768echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
15769echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 15770else
c0d27fcc
MR
15771 # Is the header compilable?
15772echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
15773echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
15774cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15775/* confdefs.h. */
15776_ACEOF
15777cat confdefs.h >>conftest.$ac_ext
15778cat >>conftest.$ac_ext <<_ACEOF
15779/* end confdefs.h. */
c0d27fcc
MR
15780$ac_includes_default
15781#include <inq_stats/cpustats.h>
15782_ACEOF
15783rm -f conftest.$ac_objext
15784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15785 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15786 ac_status=$?
35996d22
AS
15787 grep -v '^ *+' conftest.er1 >conftest.err
15788 rm -f conftest.er1
15789 cat conftest.err >&5
c0d27fcc
MR
15790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15791 (exit $ac_status); } &&
9adfabc2 15792 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15794 (eval $ac_try) 2>&5
15795 ac_status=$?
15796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15797 (exit $ac_status); }; } &&
15798 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15800 (eval $ac_try) 2>&5
15801 ac_status=$?
15802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15803 (exit $ac_status); }; }; then
15804 ac_header_compiler=yes
15805else
15806 echo "$as_me: failed program was:" >&5
19650fd6
AS
15807sed 's/^/| /' conftest.$ac_ext >&5
15808
c0d27fcc
MR
15809ac_header_compiler=no
15810fi
35996d22 15811rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15812echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15813echo "${ECHO_T}$ac_header_compiler" >&6
15814
15815# Is the header present?
15816echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
15817echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
15818cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15819/* confdefs.h. */
15820_ACEOF
15821cat confdefs.h >>conftest.$ac_ext
15822cat >>conftest.$ac_ext <<_ACEOF
15823/* end confdefs.h. */
98418dba 15824#include <inq_stats/cpustats.h>
503d2be0 15825_ACEOF
c0d27fcc 15826if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15827 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15828 ac_status=$?
6bae0ccf 15829 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15830 rm -f conftest.er1
15831 cat conftest.err >&5
c0d27fcc 15832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15833 (exit $ac_status); } >/dev/null; then
15834 if test -s conftest.err; then
15835 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15836 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
15837 else
15838 ac_cpp_err=
15839 fi
15840else
15841 ac_cpp_err=yes
15842fi
15843if test -z "$ac_cpp_err"; then
c0d27fcc 15844 ac_header_preproc=yes
503d2be0
AS
15845else
15846 echo "$as_me: failed program was:" >&5
19650fd6
AS
15847sed 's/^/| /' conftest.$ac_ext >&5
15848
c0d27fcc 15849 ac_header_preproc=no
ba4481b5 15850fi
503d2be0 15851rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15852echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15853echo "${ECHO_T}$ac_header_preproc" >&6
15854
15855# So? What about this header?
35996d22
AS
15856case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15857 yes:no: )
c0d27fcc
MR
15858 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
15859echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15860 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
15861echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
15862 ac_header_preproc=yes
19650fd6 15863 ;;
35996d22 15864 no:yes:* )
c0d27fcc
MR
15865 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
15866echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
35996d22
AS
15867 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
15868echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
15869 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
15870echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
15871 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
15872echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15873 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 15874echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15875 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
15876echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15877 (
15878 cat <<\_ASBOX
35996d22
AS
15879## ------------------------------------------ ##
15880## Report this to the AC_PACKAGE_NAME lists. ##
15881## ------------------------------------------ ##
19650fd6
AS
15882_ASBOX
15883 ) |
15884 sed "s/^/$as_me: WARNING: /" >&2
15885 ;;
c0d27fcc
MR
15886esac
15887echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
15888echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
15889if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
15890 echo $ECHO_N "(cached) $ECHO_C" >&6
15891else
15892 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 15893fi
c0d27fcc 15894echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 15895echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
15896
15897fi
98418dba
CW
15898if test $ac_cv_header_inq_stats_cpustats_h = yes; then
15899 ac_have_func=yes
ba4481b5 15900
c0d27fcc 15901cat >>confdefs.h <<\_ACEOF
98418dba 15902#define UMAX 1
c0d27fcc 15903_ACEOF
98418dba 15904
c0d27fcc
MR
15905
15906cat >>confdefs.h <<\_ACEOF
98418dba 15907#define UMAX4_3 1
c0d27fcc 15908_ACEOF
98418dba
CW
15909
15910fi
15911
c0d27fcc 15912
98418dba
CW
15913fi
15914
15915if test $ac_have_func = no; then
c0d27fcc
MR
15916 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
15917 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
15918echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
15919if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 15920 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15921fi
15922echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
15923echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 15924else
c0d27fcc
MR
15925 # Is the header compilable?
15926echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
15927echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
15928cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15929/* confdefs.h. */
15930_ACEOF
15931cat confdefs.h >>conftest.$ac_ext
15932cat >>conftest.$ac_ext <<_ACEOF
15933/* end confdefs.h. */
c0d27fcc
MR
15934$ac_includes_default
15935#include <sys/cpustats.h>
15936_ACEOF
15937rm -f conftest.$ac_objext
15938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15939 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15940 ac_status=$?
35996d22
AS
15941 grep -v '^ *+' conftest.er1 >conftest.err
15942 rm -f conftest.er1
15943 cat conftest.err >&5
c0d27fcc
MR
15944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15945 (exit $ac_status); } &&
9adfabc2 15946 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15948 (eval $ac_try) 2>&5
15949 ac_status=$?
15950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15951 (exit $ac_status); }; } &&
15952 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15954 (eval $ac_try) 2>&5
15955 ac_status=$?
15956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15957 (exit $ac_status); }; }; then
15958 ac_header_compiler=yes
15959else
15960 echo "$as_me: failed program was:" >&5
19650fd6
AS
15961sed 's/^/| /' conftest.$ac_ext >&5
15962
c0d27fcc
MR
15963ac_header_compiler=no
15964fi
35996d22 15965rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15966echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15967echo "${ECHO_T}$ac_header_compiler" >&6
15968
15969# Is the header present?
15970echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
15971echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
15972cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15973/* confdefs.h. */
15974_ACEOF
15975cat confdefs.h >>conftest.$ac_ext
15976cat >>conftest.$ac_ext <<_ACEOF
15977/* end confdefs.h. */
98418dba
CW
15978#include <sys/cpustats.h>
15979_ACEOF
c0d27fcc 15980if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
15981 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15982 ac_status=$?
6bae0ccf 15983 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15984 rm -f conftest.er1
15985 cat conftest.err >&5
c0d27fcc 15986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15987 (exit $ac_status); } >/dev/null; then
15988 if test -s conftest.err; then
15989 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15990 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15991 else
15992 ac_cpp_err=
15993 fi
15994else
15995 ac_cpp_err=yes
503d2be0 15996fi
98418dba 15997if test -z "$ac_cpp_err"; then
c0d27fcc 15998 ac_header_preproc=yes
98418dba
CW
15999else
16000 echo "$as_me: failed program was:" >&5
19650fd6
AS
16001sed 's/^/| /' conftest.$ac_ext >&5
16002
c0d27fcc 16003 ac_header_preproc=no
98418dba
CW
16004fi
16005rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16006echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16007echo "${ECHO_T}$ac_header_preproc" >&6
16008
16009# So? What about this header?
35996d22
AS
16010case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16011 yes:no: )
c0d27fcc
MR
16012 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16013echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16014 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
16015echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
16016 ac_header_preproc=yes
19650fd6 16017 ;;
35996d22 16018 no:yes:* )
c0d27fcc
MR
16019 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
16020echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
35996d22
AS
16021 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
16022echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
16023 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
16024echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
16025 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16026echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16027 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16028echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16029 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
16030echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16031 (
16032 cat <<\_ASBOX
35996d22
AS
16033## ------------------------------------------ ##
16034## Report this to the AC_PACKAGE_NAME lists. ##
16035## ------------------------------------------ ##
19650fd6
AS
16036_ASBOX
16037 ) |
16038 sed "s/^/$as_me: WARNING: /" >&2
16039 ;;
c0d27fcc
MR
16040esac
16041echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
16042echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16043if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16044 echo $ECHO_N "(cached) $ECHO_C" >&6
16045else
16046 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 16047fi
c0d27fcc 16048echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 16049echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
16050
16051fi
98418dba 16052if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 16053 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 16054#define UMAX 1
c0d27fcc 16055_ACEOF
ba4481b5 16056
98418dba
CW
16057fi
16058
c0d27fcc 16059
98418dba
CW
16060fi
16061
16062if test $ac_have_func = no; then
16063
16064for ac_header in mach/mach.h
2c9dccc9
PJ
16065do
16066as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16067if eval "test \"\${$as_ac_Header+set}\" = set"; then
16068 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
16069echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16070if eval "test \"\${$as_ac_Header+set}\" = set"; then
16071 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16072fi
16073echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16074echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16075else
c0d27fcc
MR
16076 # Is the header compilable?
16077echo "$as_me:$LINENO: checking $ac_header usability" >&5
16078echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16079cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16080/* confdefs.h. */
16081_ACEOF
16082cat confdefs.h >>conftest.$ac_ext
16083cat >>conftest.$ac_ext <<_ACEOF
16084/* end confdefs.h. */
c0d27fcc
MR
16085$ac_includes_default
16086#include <$ac_header>
16087_ACEOF
16088rm -f conftest.$ac_objext
16089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16090 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16091 ac_status=$?
35996d22
AS
16092 grep -v '^ *+' conftest.er1 >conftest.err
16093 rm -f conftest.er1
16094 cat conftest.err >&5
c0d27fcc
MR
16095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16096 (exit $ac_status); } &&
9adfabc2 16097 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16099 (eval $ac_try) 2>&5
16100 ac_status=$?
16101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16102 (exit $ac_status); }; } &&
16103 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16105 (eval $ac_try) 2>&5
16106 ac_status=$?
16107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16108 (exit $ac_status); }; }; then
16109 ac_header_compiler=yes
16110else
16111 echo "$as_me: failed program was:" >&5
19650fd6
AS
16112sed 's/^/| /' conftest.$ac_ext >&5
16113
c0d27fcc
MR
16114ac_header_compiler=no
16115fi
35996d22 16116rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16117echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16118echo "${ECHO_T}$ac_header_compiler" >&6
16119
16120# Is the header present?
16121echo "$as_me:$LINENO: checking $ac_header presence" >&5
16122echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16123cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16124/* confdefs.h. */
16125_ACEOF
16126cat confdefs.h >>conftest.$ac_ext
16127cat >>conftest.$ac_ext <<_ACEOF
16128/* end confdefs.h. */
2c9dccc9
PJ
16129#include <$ac_header>
16130_ACEOF
c0d27fcc 16131if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
16132 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16133 ac_status=$?
6bae0ccf 16134 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
16135 rm -f conftest.er1
16136 cat conftest.err >&5
c0d27fcc 16137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
16138 (exit $ac_status); } >/dev/null; then
16139 if test -s conftest.err; then
16140 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 16141 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2c9dccc9
PJ
16142 else
16143 ac_cpp_err=
16144 fi
16145else
16146 ac_cpp_err=yes
16147fi
16148if test -z "$ac_cpp_err"; then
c0d27fcc
MR
16149 ac_header_preproc=yes
16150else
16151 echo "$as_me: failed program was:" >&5
19650fd6
AS
16152sed 's/^/| /' conftest.$ac_ext >&5
16153
c0d27fcc
MR
16154 ac_header_preproc=no
16155fi
16156rm -f conftest.err conftest.$ac_ext
16157echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16158echo "${ECHO_T}$ac_header_preproc" >&6
16159
16160# So? What about this header?
35996d22
AS
16161case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16162 yes:no: )
c0d27fcc
MR
16163 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16164echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16165 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16166echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16167 ac_header_preproc=yes
19650fd6 16168 ;;
35996d22 16169 no:yes:* )
c0d27fcc
MR
16170 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16171echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
16172 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16173echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16174 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16175echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16176 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16177echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16178 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16179echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16180 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16181echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16182 (
16183 cat <<\_ASBOX
35996d22
AS
16184## ------------------------------------------ ##
16185## Report this to the AC_PACKAGE_NAME lists. ##
16186## ------------------------------------------ ##
19650fd6
AS
16187_ASBOX
16188 ) |
16189 sed "s/^/$as_me: WARNING: /" >&2
16190 ;;
c0d27fcc
MR
16191esac
16192echo "$as_me:$LINENO: checking for $ac_header" >&5
16193echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16194if eval "test \"\${$as_ac_Header+set}\" = set"; then
16195 echo $ECHO_N "(cached) $ECHO_C" >&6
16196else
35996d22 16197 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc
MR
16198fi
16199echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16200echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16201
16202fi
16203if test `eval echo '${'$as_ac_Header'}'` = yes; then
16204 cat >>confdefs.h <<_ACEOF
16205#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16206_ACEOF
16207
16208fi
16209
16210done
16211
16212fi
16213
16214
16215for ac_header in nlist.h
16216do
16217as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16218if eval "test \"\${$as_ac_Header+set}\" = set"; then
16219 echo "$as_me:$LINENO: checking for $ac_header" >&5
16220echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16221if eval "test \"\${$as_ac_Header+set}\" = set"; then
16222 echo $ECHO_N "(cached) $ECHO_C" >&6
16223fi
16224echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16225echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16226else
16227 # Is the header compilable?
16228echo "$as_me:$LINENO: checking $ac_header usability" >&5
16229echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16230cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16231/* confdefs.h. */
16232_ACEOF
16233cat confdefs.h >>conftest.$ac_ext
16234cat >>conftest.$ac_ext <<_ACEOF
16235/* end confdefs.h. */
c0d27fcc
MR
16236$ac_includes_default
16237#include <$ac_header>
16238_ACEOF
16239rm -f conftest.$ac_objext
16240if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16241 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16242 ac_status=$?
35996d22
AS
16243 grep -v '^ *+' conftest.er1 >conftest.err
16244 rm -f conftest.er1
16245 cat conftest.err >&5
c0d27fcc
MR
16246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16247 (exit $ac_status); } &&
9adfabc2 16248 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16250 (eval $ac_try) 2>&5
16251 ac_status=$?
16252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16253 (exit $ac_status); }; } &&
16254 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16256 (eval $ac_try) 2>&5
16257 ac_status=$?
16258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16259 (exit $ac_status); }; }; then
16260 ac_header_compiler=yes
2c9dccc9
PJ
16261else
16262 echo "$as_me: failed program was:" >&5
19650fd6
AS
16263sed 's/^/| /' conftest.$ac_ext >&5
16264
c0d27fcc 16265ac_header_compiler=no
98418dba 16266fi
35996d22 16267rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16268echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16269echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 16270
c0d27fcc
MR
16271# Is the header present?
16272echo "$as_me:$LINENO: checking $ac_header presence" >&5
16273echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16274cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16275/* confdefs.h. */
16276_ACEOF
16277cat confdefs.h >>conftest.$ac_ext
16278cat >>conftest.$ac_ext <<_ACEOF
16279/* end confdefs.h. */
503d2be0
AS
16280#include <$ac_header>
16281_ACEOF
c0d27fcc 16282if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16283 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16284 ac_status=$?
6bae0ccf 16285 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16286 rm -f conftest.er1
16287 cat conftest.err >&5
c0d27fcc 16288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16289 (exit $ac_status); } >/dev/null; then
16290 if test -s conftest.err; then
16291 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 16292 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16293 else
16294 ac_cpp_err=
16295 fi
16296else
16297 ac_cpp_err=yes
16298fi
16299if test -z "$ac_cpp_err"; then
c0d27fcc 16300 ac_header_preproc=yes
503d2be0
AS
16301else
16302 echo "$as_me: failed program was:" >&5
19650fd6
AS
16303sed 's/^/| /' conftest.$ac_ext >&5
16304
c0d27fcc 16305 ac_header_preproc=no
b5de8dc0 16306fi
503d2be0 16307rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16308echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16309echo "${ECHO_T}$ac_header_preproc" >&6
16310
16311# So? What about this header?
35996d22
AS
16312case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16313 yes:no: )
c0d27fcc
MR
16314 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16315echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16316 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16317echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16318 ac_header_preproc=yes
19650fd6 16319 ;;
35996d22 16320 no:yes:* )
c0d27fcc
MR
16321 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16322echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
16323 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16324echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16325 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16326echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16327 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16328echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16329 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16330echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16331 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16332echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16333 (
16334 cat <<\_ASBOX
35996d22
AS
16335## ------------------------------------------ ##
16336## Report this to the AC_PACKAGE_NAME lists. ##
16337## ------------------------------------------ ##
19650fd6
AS
16338_ASBOX
16339 ) |
16340 sed "s/^/$as_me: WARNING: /" >&2
16341 ;;
c0d27fcc
MR
16342esac
16343echo "$as_me:$LINENO: checking for $ac_header" >&5
16344echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16345if eval "test \"\${$as_ac_Header+set}\" = set"; then
16346 echo $ECHO_N "(cached) $ECHO_C" >&6
16347else
35996d22 16348 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 16349fi
c0d27fcc 16350echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16351echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16352
16353fi
98418dba 16354if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16355 cat >>confdefs.h <<_ACEOF
98418dba 16356#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
16357_ACEOF
16358 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
16359echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
16360if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 16361 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 16362else
503d2be0 16363 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16364/* confdefs.h. */
16365_ACEOF
16366cat confdefs.h >>conftest.$ac_ext
16367cat >>conftest.$ac_ext <<_ACEOF
16368/* end confdefs.h. */
98418dba 16369#include <nlist.h>
b5de8dc0 16370
503d2be0
AS
16371int
16372main ()
16373{
98418dba
CW
16374static struct nlist ac_aggr;
16375if (ac_aggr.n_un.n_name)
16376return 0;
503d2be0
AS
16377 ;
16378 return 0;
16379}
16380_ACEOF
98418dba 16381rm -f conftest.$ac_objext
c0d27fcc 16382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16383 (eval $ac_compile) 2>conftest.er1
503d2be0 16384 ac_status=$?
35996d22
AS
16385 grep -v '^ *+' conftest.er1 >conftest.err
16386 rm -f conftest.er1
16387 cat conftest.err >&5
c0d27fcc 16388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16389 (exit $ac_status); } &&
9adfabc2 16390 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16392 (eval $ac_try) 2>&5
16393 ac_status=$?
16394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16395 (exit $ac_status); }; } &&
16396 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16398 (eval $ac_try) 2>&5
16399 ac_status=$?
c0d27fcc 16400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16401 (exit $ac_status); }; }; then
98418dba 16402 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
16403else
16404 echo "$as_me: failed program was:" >&5
19650fd6
AS
16405sed 's/^/| /' conftest.$ac_ext >&5
16406
6bae0ccf 16407cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16408/* confdefs.h. */
16409_ACEOF
16410cat confdefs.h >>conftest.$ac_ext
16411cat >>conftest.$ac_ext <<_ACEOF
16412/* end confdefs.h. */
6bae0ccf
DL
16413#include <nlist.h>
16414
16415int
16416main ()
16417{
16418static struct nlist ac_aggr;
16419if (sizeof ac_aggr.n_un.n_name)
16420return 0;
16421 ;
16422 return 0;
16423}
16424_ACEOF
16425rm -f conftest.$ac_objext
16426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16427 (eval $ac_compile) 2>conftest.er1
6bae0ccf 16428 ac_status=$?
35996d22
AS
16429 grep -v '^ *+' conftest.er1 >conftest.err
16430 rm -f conftest.er1
16431 cat conftest.err >&5
6bae0ccf
DL
16432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16433 (exit $ac_status); } &&
9adfabc2 16434 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16436 (eval $ac_try) 2>&5
16437 ac_status=$?
16438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16439 (exit $ac_status); }; } &&
16440 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
16441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16442 (eval $ac_try) 2>&5
16443 ac_status=$?
16444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16445 (exit $ac_status); }; }; then
16446 ac_cv_member_struct_nlist_n_un_n_name=yes
16447else
16448 echo "$as_me: failed program was:" >&5
19650fd6
AS
16449sed 's/^/| /' conftest.$ac_ext >&5
16450
98418dba 16451ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 16452fi
35996d22 16453rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 16454fi
35996d22 16455rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 16456fi
c0d27fcc 16457echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
16458echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
16459if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 16460
c0d27fcc 16461cat >>confdefs.h <<_ACEOF
98418dba 16462#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 16463_ACEOF
b5de8dc0 16464
c0d27fcc
MR
16465
16466cat >>confdefs.h <<\_ACEOF
98418dba 16467#define NLIST_NAME_UNION 1
c0d27fcc 16468_ACEOF
b5de8dc0 16469
98418dba 16470fi
b5de8dc0 16471
c0d27fcc 16472
98418dba 16473fi
c0d27fcc 16474
98418dba 16475done
b5de8dc0 16476
98418dba
CW
16477fi
16478done
b5de8dc0 16479
c0d27fcc 16480
98418dba 16481# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 16482echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
16483echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
16484if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
16485 echo $ECHO_N "(cached) $ECHO_C" >&6
16486else
16487 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16488/* confdefs.h. */
16489_ACEOF
16490cat confdefs.h >>conftest.$ac_ext
16491cat >>conftest.$ac_ext <<_ACEOF
16492/* end confdefs.h. */
6bae0ccf 16493#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
16494#ifdef LDAV_PRIVILEGED
16495Yowza Am I SETGID yet
16496#endif
16497_ACEOF
16498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 16499 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
16500 ac_cv_func_getloadavg_setgid=yes
16501else
16502 ac_cv_func_getloadavg_setgid=no
16503fi
16504rm -f conftest*
b5de8dc0 16505
98418dba 16506fi
c0d27fcc 16507echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
16508echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
16509if test $ac_cv_func_getloadavg_setgid = yes; then
16510 NEED_SETGID=true
b5de8dc0 16511
c0d27fcc 16512cat >>confdefs.h <<\_ACEOF
98418dba 16513#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 16514_ACEOF
98418dba 16515
b5de8dc0 16516else
98418dba 16517 NEED_SETGID=false
b5de8dc0 16518fi
98418dba
CW
16519
16520if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 16521 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
16522echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
16523if test "${ac_cv_group_kmem+set}" = set; then
16524 echo $ECHO_N "(cached) $ECHO_C" >&6
16525else
16526 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
16527 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
16528 # If we got an error (system does not support symlinks), try without -L.
16529 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
16530 ac_cv_group_kmem=`echo $ac_ls_output \
35996d22 16531 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
16532 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
16533 / /s/.* //;p;'`
16534
b5de8dc0 16535fi
c0d27fcc 16536echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
16537echo "${ECHO_T}$ac_cv_group_kmem" >&6
16538 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 16539fi
98418dba
CW
16540if test "x$ac_save_LIBS" = x; then
16541 GETLOADAVG_LIBS=$LIBS
16542else
16543 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 16544fi
98418dba 16545LIBS=$ac_save_LIBS
b5de8dc0 16546
c0d27fcc
MR
16547
16548
16549echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
16550echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16551if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 16552 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 16553else
b936fae4
AS
16554 while :; do
16555 ac_cv_sys_largefile_source=no
503d2be0 16556 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16557/* confdefs.h. */
16558_ACEOF
16559cat confdefs.h >>conftest.$ac_ext
16560cat >>conftest.$ac_ext <<_ACEOF
16561/* end confdefs.h. */
b936fae4 16562#include <stdio.h>
503d2be0
AS
16563int
16564main ()
16565{
b936fae4
AS
16566return !fseeko;
16567 ;
16568 return 0;
16569}
16570_ACEOF
16571rm -f conftest.$ac_objext
c0d27fcc 16572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16573 (eval $ac_compile) 2>conftest.er1
b936fae4 16574 ac_status=$?
35996d22
AS
16575 grep -v '^ *+' conftest.er1 >conftest.err
16576 rm -f conftest.er1
16577 cat conftest.err >&5
c0d27fcc 16578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 16579 (exit $ac_status); } &&
9adfabc2 16580 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16582 (eval $ac_try) 2>&5
16583 ac_status=$?
16584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16585 (exit $ac_status); }; } &&
16586 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
16588 (eval $ac_try) 2>&5
16589 ac_status=$?
c0d27fcc 16590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
16591 (exit $ac_status); }; }; then
16592 break
16593else
16594 echo "$as_me: failed program was:" >&5
19650fd6
AS
16595sed 's/^/| /' conftest.$ac_ext >&5
16596
b936fae4 16597fi
35996d22 16598rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4 16599 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16600/* confdefs.h. */
16601_ACEOF
16602cat confdefs.h >>conftest.$ac_ext
16603cat >>conftest.$ac_ext <<_ACEOF
16604/* end confdefs.h. */
b936fae4
AS
16605#define _LARGEFILE_SOURCE 1
16606#include <stdio.h>
b936fae4
AS
16607int
16608main ()
16609{
16610return !fseeko;
16611 ;
16612 return 0;
16613}
16614_ACEOF
16615rm -f conftest.$ac_objext
c0d27fcc 16616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16617 (eval $ac_compile) 2>conftest.er1
b936fae4 16618 ac_status=$?
35996d22
AS
16619 grep -v '^ *+' conftest.er1 >conftest.err
16620 rm -f conftest.er1
16621 cat conftest.err >&5
c0d27fcc 16622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 16623 (exit $ac_status); } &&
9adfabc2 16624 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16626 (eval $ac_try) 2>&5
16627 ac_status=$?
16628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16629 (exit $ac_status); }; } &&
16630 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
16632 (eval $ac_try) 2>&5
16633 ac_status=$?
c0d27fcc 16634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
16635 (exit $ac_status); }; }; then
16636 ac_cv_sys_largefile_source=1; break
16637else
16638 echo "$as_me: failed program was:" >&5
19650fd6
AS
16639sed 's/^/| /' conftest.$ac_ext >&5
16640
b936fae4 16641fi
35996d22 16642rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4
AS
16643 break
16644done
16645fi
c0d27fcc 16646echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
16647echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16648if test "$ac_cv_sys_largefile_source" != no; then
16649
c0d27fcc 16650cat >>confdefs.h <<_ACEOF
b936fae4 16651#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 16652_ACEOF
b936fae4
AS
16653
16654fi
16655rm -f conftest*
4c343001 16656
b936fae4
AS
16657# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16658# in glibc 2.1.3, but that breaks too many other things.
16659# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 16660echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
16661echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16662if test "${ac_cv_func_fseeko+set}" = set; then
16663 echo $ECHO_N "(cached) $ECHO_C" >&6
16664else
16665 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16666/* confdefs.h. */
16667_ACEOF
16668cat confdefs.h >>conftest.$ac_ext
16669cat >>conftest.$ac_ext <<_ACEOF
16670/* end confdefs.h. */
b936fae4 16671#include <stdio.h>
b936fae4
AS
16672int
16673main ()
16674{
16675return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
16676 ;
16677 return 0;
16678}
16679_ACEOF
16680rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16681if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16682 (eval $ac_link) 2>conftest.er1
503d2be0 16683 ac_status=$?
35996d22
AS
16684 grep -v '^ *+' conftest.er1 >conftest.err
16685 rm -f conftest.er1
16686 cat conftest.err >&5
c0d27fcc 16687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16688 (exit $ac_status); } &&
9adfabc2 16689 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16691 (eval $ac_try) 2>&5
16692 ac_status=$?
16693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16694 (exit $ac_status); }; } &&
16695 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16697 (eval $ac_try) 2>&5
16698 ac_status=$?
c0d27fcc 16699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16700 (exit $ac_status); }; }; then
b936fae4 16701 ac_cv_func_fseeko=yes
503d2be0
AS
16702else
16703 echo "$as_me: failed program was:" >&5
19650fd6
AS
16704sed 's/^/| /' conftest.$ac_ext >&5
16705
b936fae4 16706ac_cv_func_fseeko=no
503d2be0 16707fi
35996d22
AS
16708rm -f conftest.err conftest.$ac_objext \
16709 conftest$ac_exeext conftest.$ac_ext
503d2be0 16710fi
c0d27fcc 16711echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
16712echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16713if test $ac_cv_func_fseeko = yes; then
16714
c0d27fcc 16715cat >>confdefs.h <<\_ACEOF
b936fae4 16716#define HAVE_FSEEKO 1
c0d27fcc 16717_ACEOF
b936fae4 16718
4c343001
DL
16719fi
16720
c0d27fcc 16721
cd958eb3
MB
16722echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
16723echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
16724if test "${ac_cv_func_getpgrp_void+set}" = set; then
16725 echo $ECHO_N "(cached) $ECHO_C" >&6
16726else
16727 # Use it with a single arg.
16728cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16729/* confdefs.h. */
16730_ACEOF
16731cat confdefs.h >>conftest.$ac_ext
16732cat >>conftest.$ac_ext <<_ACEOF
16733/* end confdefs.h. */
cd958eb3
MB
16734$ac_includes_default
16735int
16736main ()
16737{
16738getpgrp (0);
16739 ;
16740 return 0;
16741}
16742_ACEOF
16743rm -f conftest.$ac_objext
16744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16745 (eval $ac_compile) 2>conftest.er1
cd958eb3 16746 ac_status=$?
35996d22
AS
16747 grep -v '^ *+' conftest.er1 >conftest.err
16748 rm -f conftest.er1
16749 cat conftest.err >&5
cd958eb3
MB
16750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16751 (exit $ac_status); } &&
9adfabc2 16752 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16754 (eval $ac_try) 2>&5
16755 ac_status=$?
16756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16757 (exit $ac_status); }; } &&
16758 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
16759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16760 (eval $ac_try) 2>&5
16761 ac_status=$?
16762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16763 (exit $ac_status); }; }; then
16764 ac_cv_func_getpgrp_void=no
16765else
16766 echo "$as_me: failed program was:" >&5
19650fd6
AS
16767sed 's/^/| /' conftest.$ac_ext >&5
16768
cd958eb3
MB
16769ac_cv_func_getpgrp_void=yes
16770fi
35996d22 16771rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
16772
16773fi
16774echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
16775echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
16776if test $ac_cv_func_getpgrp_void = yes; then
16777
16778cat >>confdefs.h <<\_ACEOF
16779#define GETPGRP_VOID 1
16780_ACEOF
16781
16782fi
16783
16784
973a76b1
DL
16785
16786for ac_func in strftime
16787do
16788as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16789echo "$as_me:$LINENO: checking for $ac_func" >&5
16790echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16791if eval "test \"\${$as_ac_var+set}\" = set"; then
16792 echo $ECHO_N "(cached) $ECHO_C" >&6
16793else
16794 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16795/* confdefs.h. */
16796_ACEOF
16797cat confdefs.h >>conftest.$ac_ext
16798cat >>conftest.$ac_ext <<_ACEOF
16799/* end confdefs.h. */
35996d22
AS
16800/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16801 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16802#define $ac_func innocuous_$ac_func
16803
973a76b1 16804/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16805 which can conflict with char $ac_func (); below.
16806 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16807 <limits.h> exists even on freestanding compilers. */
35996d22 16808
19650fd6
AS
16809#ifdef __STDC__
16810# include <limits.h>
16811#else
16812# include <assert.h>
16813#endif
35996d22
AS
16814
16815#undef $ac_func
16816
973a76b1
DL
16817/* Override any gcc2 internal prototype to avoid an error. */
16818#ifdef __cplusplus
16819extern "C"
19650fd6 16820{
973a76b1
DL
16821#endif
16822/* We use char because int might match the return type of a gcc2
16823 builtin and then its argument prototype would still apply. */
16824char $ac_func ();
16825/* The GNU C library defines this for functions which it implements
16826 to always fail with ENOSYS. Some functions are actually named
16827 something starting with __ and the normal name is an alias. */
16828#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16829choke me
16830#else
19650fd6
AS
16831char (*f) () = $ac_func;
16832#endif
16833#ifdef __cplusplus
16834}
973a76b1
DL
16835#endif
16836
19650fd6
AS
16837int
16838main ()
16839{
16840return f != $ac_func;
973a76b1
DL
16841 ;
16842 return 0;
16843}
16844_ACEOF
16845rm -f conftest.$ac_objext conftest$ac_exeext
16846if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16847 (eval $ac_link) 2>conftest.er1
973a76b1 16848 ac_status=$?
35996d22
AS
16849 grep -v '^ *+' conftest.er1 >conftest.err
16850 rm -f conftest.er1
16851 cat conftest.err >&5
973a76b1
DL
16852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16853 (exit $ac_status); } &&
9adfabc2 16854 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
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); }; } &&
16860 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
16861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16862 (eval $ac_try) 2>&5
16863 ac_status=$?
16864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16865 (exit $ac_status); }; }; then
16866 eval "$as_ac_var=yes"
16867else
16868 echo "$as_me: failed program was:" >&5
19650fd6
AS
16869sed 's/^/| /' conftest.$ac_ext >&5
16870
973a76b1
DL
16871eval "$as_ac_var=no"
16872fi
35996d22
AS
16873rm -f conftest.err conftest.$ac_objext \
16874 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
16875fi
16876echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16877echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16878if test `eval echo '${'$as_ac_var'}'` = yes; then
16879 cat >>confdefs.h <<_ACEOF
16880#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16881_ACEOF
16882
16883else
16884 # strftime is in -lintl on SCO UNIX.
16885echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
16886echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
16887if test "${ac_cv_lib_intl_strftime+set}" = set; then
16888 echo $ECHO_N "(cached) $ECHO_C" >&6
16889else
16890 ac_check_lib_save_LIBS=$LIBS
16891LIBS="-lintl $LIBS"
16892cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16893/* confdefs.h. */
16894_ACEOF
16895cat confdefs.h >>conftest.$ac_ext
16896cat >>conftest.$ac_ext <<_ACEOF
16897/* end confdefs.h. */
973a76b1
DL
16898
16899/* Override any gcc2 internal prototype to avoid an error. */
16900#ifdef __cplusplus
16901extern "C"
16902#endif
16903/* We use char because int might match the return type of a gcc2
16904 builtin and then its argument prototype would still apply. */
16905char strftime ();
16906int
16907main ()
16908{
16909strftime ();
16910 ;
16911 return 0;
16912}
16913_ACEOF
16914rm -f conftest.$ac_objext conftest$ac_exeext
16915if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16916 (eval $ac_link) 2>conftest.er1
973a76b1 16917 ac_status=$?
35996d22
AS
16918 grep -v '^ *+' conftest.er1 >conftest.err
16919 rm -f conftest.er1
16920 cat conftest.err >&5
973a76b1
DL
16921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16922 (exit $ac_status); } &&
9adfabc2 16923 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16925 (eval $ac_try) 2>&5
16926 ac_status=$?
16927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16928 (exit $ac_status); }; } &&
16929 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
16930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16931 (eval $ac_try) 2>&5
16932 ac_status=$?
16933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16934 (exit $ac_status); }; }; then
16935 ac_cv_lib_intl_strftime=yes
16936else
16937 echo "$as_me: failed program was:" >&5
19650fd6
AS
16938sed 's/^/| /' conftest.$ac_ext >&5
16939
973a76b1
DL
16940ac_cv_lib_intl_strftime=no
16941fi
35996d22
AS
16942rm -f conftest.err conftest.$ac_objext \
16943 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
16944LIBS=$ac_check_lib_save_LIBS
16945fi
16946echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
16947echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
16948if test $ac_cv_lib_intl_strftime = yes; then
16949 cat >>confdefs.h <<\_ACEOF
16950#define HAVE_STRFTIME 1
16951_ACEOF
16952
16953LIBS="-lintl $LIBS"
16954fi
16955
16956fi
16957done
16958
16959
b936fae4
AS
16960# UNIX98 PTYs.
16961
16962for ac_func in grantpt
503d2be0
AS
16963do
16964as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 16965echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
16966echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16967if eval "test \"\${$as_ac_var+set}\" = set"; then
16968 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 16969else
503d2be0 16970 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16971/* confdefs.h. */
16972_ACEOF
16973cat confdefs.h >>conftest.$ac_ext
16974cat >>conftest.$ac_ext <<_ACEOF
16975/* end confdefs.h. */
35996d22
AS
16976/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16977 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16978#define $ac_func innocuous_$ac_func
16979
503d2be0 16980/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16981 which can conflict with char $ac_func (); below.
16982 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16983 <limits.h> exists even on freestanding compilers. */
35996d22 16984
19650fd6
AS
16985#ifdef __STDC__
16986# include <limits.h>
16987#else
16988# include <assert.h>
16989#endif
35996d22
AS
16990
16991#undef $ac_func
16992
4c343001 16993/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16994#ifdef __cplusplus
16995extern "C"
19650fd6 16996{
503d2be0 16997#endif
4c343001 16998/* We use char because int might match the return type of a gcc2
503d2be0
AS
16999 builtin and then its argument prototype would still apply. */
17000char $ac_func ();
503d2be0
AS
17001/* The GNU C library defines this for functions which it implements
17002 to always fail with ENOSYS. Some functions are actually named
17003 something starting with __ and the normal name is an alias. */
17004#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17005choke me
17006#else
19650fd6
AS
17007char (*f) () = $ac_func;
17008#endif
17009#ifdef __cplusplus
17010}
503d2be0 17011#endif
4c343001 17012
19650fd6
AS
17013int
17014main ()
17015{
17016return f != $ac_func;
503d2be0
AS
17017 ;
17018 return 0;
17019}
17020_ACEOF
17021rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17022if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17023 (eval $ac_link) 2>conftest.er1
503d2be0 17024 ac_status=$?
35996d22
AS
17025 grep -v '^ *+' conftest.er1 >conftest.err
17026 rm -f conftest.er1
17027 cat conftest.err >&5
c0d27fcc 17028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17029 (exit $ac_status); } &&
9adfabc2 17030 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17032 (eval $ac_try) 2>&5
17033 ac_status=$?
17034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17035 (exit $ac_status); }; } &&
17036 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17038 (eval $ac_try) 2>&5
17039 ac_status=$?
c0d27fcc 17040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17041 (exit $ac_status); }; }; then
17042 eval "$as_ac_var=yes"
17043else
17044 echo "$as_me: failed program was:" >&5
19650fd6
AS
17045sed 's/^/| /' conftest.$ac_ext >&5
17046
503d2be0
AS
17047eval "$as_ac_var=no"
17048fi
35996d22
AS
17049rm -f conftest.err conftest.$ac_objext \
17050 conftest$ac_exeext conftest.$ac_ext
503d2be0 17051fi
c0d27fcc 17052echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17053echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17054if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17055 cat >>confdefs.h <<_ACEOF
503d2be0 17056#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17057_ACEOF
4c343001
DL
17058
17059fi
503d2be0
AS
17060done
17061
c0d27fcc 17062
b936fae4 17063# PTY-related GNU extensions.
4c343001 17064
b936fae4
AS
17065for ac_func in getpt
17066do
17067as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 17068echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
17069echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17070if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 17071 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17072else
b936fae4 17073 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17074/* confdefs.h. */
17075_ACEOF
17076cat confdefs.h >>conftest.$ac_ext
17077cat >>conftest.$ac_ext <<_ACEOF
17078/* end confdefs.h. */
35996d22
AS
17079/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17080 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17081#define $ac_func innocuous_$ac_func
17082
087121cc 17083/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17084 which can conflict with char $ac_func (); below.
17085 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17086 <limits.h> exists even on freestanding compilers. */
35996d22 17087
19650fd6
AS
17088#ifdef __STDC__
17089# include <limits.h>
17090#else
17091# include <assert.h>
17092#endif
35996d22
AS
17093
17094#undef $ac_func
17095
087121cc 17096/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17097#ifdef __cplusplus
17098extern "C"
19650fd6 17099{
503d2be0 17100#endif
087121cc 17101/* We use char because int might match the return type of a gcc2
503d2be0
AS
17102 builtin and then its argument prototype would still apply. */
17103char $ac_func ();
087121cc
GM
17104/* The GNU C library defines this for functions which it implements
17105 to always fail with ENOSYS. Some functions are actually named
17106 something starting with __ and the normal name is an alias. */
17107#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17108choke me
17109#else
19650fd6
AS
17110char (*f) () = $ac_func;
17111#endif
17112#ifdef __cplusplus
17113}
087121cc
GM
17114#endif
17115
19650fd6
AS
17116int
17117main ()
17118{
17119return f != $ac_func;
503d2be0
AS
17120 ;
17121 return 0;
17122}
17123_ACEOF
17124rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17126 (eval $ac_link) 2>conftest.er1
503d2be0 17127 ac_status=$?
35996d22
AS
17128 grep -v '^ *+' conftest.er1 >conftest.err
17129 rm -f conftest.er1
17130 cat conftest.err >&5
c0d27fcc 17131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17132 (exit $ac_status); } &&
9adfabc2 17133 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17135 (eval $ac_try) 2>&5
17136 ac_status=$?
17137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17138 (exit $ac_status); }; } &&
17139 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17141 (eval $ac_try) 2>&5
17142 ac_status=$?
c0d27fcc 17143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17144 (exit $ac_status); }; }; then
17145 eval "$as_ac_var=yes"
17146else
17147 echo "$as_me: failed program was:" >&5
19650fd6
AS
17148sed 's/^/| /' conftest.$ac_ext >&5
17149
503d2be0
AS
17150eval "$as_ac_var=no"
17151fi
35996d22
AS
17152rm -f conftest.err conftest.$ac_objext \
17153 conftest$ac_exeext conftest.$ac_ext
503d2be0 17154fi
c0d27fcc 17155echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17156echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17157if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17158 cat >>confdefs.h <<_ACEOF
503d2be0 17159#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17160_ACEOF
087121cc 17161
087121cc
GM
17162fi
17163done
17164
c0d27fcc 17165
ba4481b5
DL
17166# Check this now, so that we will NOT find the above functions in ncurses.
17167# That is because we have not set up to link ncurses in lib-src.
17168# It's better to believe a function is not available
17169# than to expect to find it in ncurses.
503d2be0 17170
c0d27fcc 17171echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
17172echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
17173if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
17174 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17175else
503d2be0 17176 ac_check_lib_save_LIBS=$LIBS
ba4481b5 17177LIBS="-lncurses $LIBS"
503d2be0 17178cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17179/* confdefs.h. */
17180_ACEOF
17181cat confdefs.h >>conftest.$ac_ext
17182cat >>conftest.$ac_ext <<_ACEOF
17183/* end confdefs.h. */
503d2be0 17184
ba4481b5 17185/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17186#ifdef __cplusplus
17187extern "C"
17188#endif
ba4481b5 17189/* We use char because int might match the return type of a gcc2
503d2be0
AS
17190 builtin and then its argument prototype would still apply. */
17191char tparm ();
17192int
17193main ()
17194{
17195tparm ();
17196 ;
17197 return 0;
17198}
17199_ACEOF
17200rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17201if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17202 (eval $ac_link) 2>conftest.er1
503d2be0 17203 ac_status=$?
35996d22
AS
17204 grep -v '^ *+' conftest.er1 >conftest.err
17205 rm -f conftest.er1
17206 cat conftest.err >&5
c0d27fcc 17207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17208 (exit $ac_status); } &&
9adfabc2 17209 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17211 (eval $ac_try) 2>&5
17212 ac_status=$?
17213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17214 (exit $ac_status); }; } &&
17215 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17217 (eval $ac_try) 2>&5
17218 ac_status=$?
c0d27fcc 17219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17220 (exit $ac_status); }; }; then
17221 ac_cv_lib_ncurses_tparm=yes
17222else
17223 echo "$as_me: failed program was:" >&5
19650fd6
AS
17224sed 's/^/| /' conftest.$ac_ext >&5
17225
503d2be0
AS
17226ac_cv_lib_ncurses_tparm=no
17227fi
35996d22
AS
17228rm -f conftest.err conftest.$ac_objext \
17229 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17230LIBS=$ac_check_lib_save_LIBS
17231fi
c0d27fcc 17232echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
17233echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
17234if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 17235 cat >>confdefs.h <<_ACEOF
503d2be0 17236#define HAVE_LIBNCURSES 1
c0d27fcc 17237_ACEOF
ba4481b5
DL
17238
17239 LIBS="-lncurses $LIBS"
17240
ba4481b5
DL
17241fi
17242
c0d27fcc 17243
84e70f78
KR
17244# Do we need the Hesiod library to provide the support routines?
17245if test "$with_hesiod" = yes ; then
17246 # Don't set $LIBS here -- see comments above.
17247 resolv=no
c0d27fcc 17248 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
17249echo $ECHO_N "checking for res_send... $ECHO_C" >&6
17250if test "${ac_cv_func_res_send+set}" = set; then
17251 echo $ECHO_N "(cached) $ECHO_C" >&6
17252else
17253 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17254/* confdefs.h. */
17255_ACEOF
17256cat confdefs.h >>conftest.$ac_ext
17257cat >>conftest.$ac_ext <<_ACEOF
17258/* end confdefs.h. */
35996d22
AS
17259/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
17260 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17261#define res_send innocuous_res_send
17262
84e70f78 17263/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17264 which can conflict with char res_send (); below.
17265 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17266 <limits.h> exists even on freestanding compilers. */
35996d22 17267
19650fd6
AS
17268#ifdef __STDC__
17269# include <limits.h>
17270#else
17271# include <assert.h>
17272#endif
35996d22
AS
17273
17274#undef res_send
17275
84e70f78
KR
17276/* Override any gcc2 internal prototype to avoid an error. */
17277#ifdef __cplusplus
17278extern "C"
19650fd6 17279{
84e70f78
KR
17280#endif
17281/* We use char because int might match the return type of a gcc2
17282 builtin and then its argument prototype would still apply. */
17283char res_send ();
84e70f78
KR
17284/* The GNU C library defines this for functions which it implements
17285 to always fail with ENOSYS. Some functions are actually named
17286 something starting with __ and the normal name is an alias. */
17287#if defined (__stub_res_send) || defined (__stub___res_send)
17288choke me
17289#else
19650fd6
AS
17290char (*f) () = res_send;
17291#endif
17292#ifdef __cplusplus
17293}
cd958eb3
MB
17294#endif
17295
19650fd6
AS
17296int
17297main ()
17298{
17299return f != res_send;
84e70f78
KR
17300 ;
17301 return 0;
17302}
17303_ACEOF
17304rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17305if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17306 (eval $ac_link) 2>conftest.er1
84e70f78 17307 ac_status=$?
35996d22
AS
17308 grep -v '^ *+' conftest.er1 >conftest.err
17309 rm -f conftest.er1
17310 cat conftest.err >&5
c0d27fcc 17311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17312 (exit $ac_status); } &&
9adfabc2 17313 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17315 (eval $ac_try) 2>&5
17316 ac_status=$?
17317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17318 (exit $ac_status); }; } &&
17319 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17321 (eval $ac_try) 2>&5
17322 ac_status=$?
c0d27fcc 17323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17324 (exit $ac_status); }; }; then
17325 ac_cv_func_res_send=yes
17326else
17327 echo "$as_me: failed program was:" >&5
19650fd6
AS
17328sed 's/^/| /' conftest.$ac_ext >&5
17329
84e70f78
KR
17330ac_cv_func_res_send=no
17331fi
35996d22
AS
17332rm -f conftest.err conftest.$ac_objext \
17333 conftest$ac_exeext conftest.$ac_ext
84e70f78 17334fi
c0d27fcc 17335echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
17336echo "${ECHO_T}$ac_cv_func_res_send" >&6
17337if test $ac_cv_func_res_send = yes; then
17338 :
17339else
c0d27fcc 17340 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
17341echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
17342if test "${ac_cv_func___res_send+set}" = set; then
17343 echo $ECHO_N "(cached) $ECHO_C" >&6
17344else
17345 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17346/* confdefs.h. */
17347_ACEOF
17348cat confdefs.h >>conftest.$ac_ext
17349cat >>conftest.$ac_ext <<_ACEOF
17350/* end confdefs.h. */
35996d22
AS
17351/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
17352 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17353#define __res_send innocuous___res_send
17354
84e70f78 17355/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17356 which can conflict with char __res_send (); below.
17357 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17358 <limits.h> exists even on freestanding compilers. */
35996d22 17359
19650fd6
AS
17360#ifdef __STDC__
17361# include <limits.h>
17362#else
17363# include <assert.h>
17364#endif
35996d22
AS
17365
17366#undef __res_send
17367
84e70f78
KR
17368/* Override any gcc2 internal prototype to avoid an error. */
17369#ifdef __cplusplus
17370extern "C"
19650fd6 17371{
84e70f78
KR
17372#endif
17373/* We use char because int might match the return type of a gcc2
17374 builtin and then its argument prototype would still apply. */
17375char __res_send ();
84e70f78
KR
17376/* The GNU C library defines this for functions which it implements
17377 to always fail with ENOSYS. Some functions are actually named
17378 something starting with __ and the normal name is an alias. */
17379#if defined (__stub___res_send) || defined (__stub_____res_send)
17380choke me
17381#else
19650fd6
AS
17382char (*f) () = __res_send;
17383#endif
17384#ifdef __cplusplus
17385}
84e70f78
KR
17386#endif
17387
19650fd6
AS
17388int
17389main ()
17390{
17391return f != __res_send;
84e70f78
KR
17392 ;
17393 return 0;
17394}
17395_ACEOF
17396rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17397if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17398 (eval $ac_link) 2>conftest.er1
84e70f78 17399 ac_status=$?
35996d22
AS
17400 grep -v '^ *+' conftest.er1 >conftest.err
17401 rm -f conftest.er1
17402 cat conftest.err >&5
c0d27fcc 17403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17404 (exit $ac_status); } &&
9adfabc2 17405 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17407 (eval $ac_try) 2>&5
17408 ac_status=$?
17409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17410 (exit $ac_status); }; } &&
17411 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17413 (eval $ac_try) 2>&5
17414 ac_status=$?
c0d27fcc 17415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17416 (exit $ac_status); }; }; then
17417 ac_cv_func___res_send=yes
17418else
17419 echo "$as_me: failed program was:" >&5
19650fd6
AS
17420sed 's/^/| /' conftest.$ac_ext >&5
17421
84e70f78
KR
17422ac_cv_func___res_send=no
17423fi
35996d22
AS
17424rm -f conftest.err conftest.$ac_objext \
17425 conftest$ac_exeext conftest.$ac_ext
84e70f78 17426fi
c0d27fcc 17427echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
17428echo "${ECHO_T}$ac_cv_func___res_send" >&6
17429if test $ac_cv_func___res_send = yes; then
17430 :
17431else
c0d27fcc 17432 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
17433echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
17434if test "${ac_cv_lib_resolv_res_send+set}" = set; then
17435 echo $ECHO_N "(cached) $ECHO_C" >&6
17436else
17437 ac_check_lib_save_LIBS=$LIBS
17438LIBS="-lresolv $LIBS"
17439cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17440/* confdefs.h. */
17441_ACEOF
17442cat confdefs.h >>conftest.$ac_ext
17443cat >>conftest.$ac_ext <<_ACEOF
17444/* end confdefs.h. */
84e70f78
KR
17445
17446/* Override any gcc2 internal prototype to avoid an error. */
17447#ifdef __cplusplus
17448extern "C"
17449#endif
17450/* We use char because int might match the return type of a gcc2
17451 builtin and then its argument prototype would still apply. */
17452char res_send ();
17453int
17454main ()
17455{
17456res_send ();
17457 ;
17458 return 0;
17459}
17460_ACEOF
17461rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17462if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17463 (eval $ac_link) 2>conftest.er1
84e70f78 17464 ac_status=$?
35996d22
AS
17465 grep -v '^ *+' conftest.er1 >conftest.err
17466 rm -f conftest.er1
17467 cat conftest.err >&5
c0d27fcc 17468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17469 (exit $ac_status); } &&
9adfabc2 17470 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17472 (eval $ac_try) 2>&5
17473 ac_status=$?
17474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17475 (exit $ac_status); }; } &&
17476 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17478 (eval $ac_try) 2>&5
17479 ac_status=$?
c0d27fcc 17480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17481 (exit $ac_status); }; }; then
17482 ac_cv_lib_resolv_res_send=yes
17483else
17484 echo "$as_me: failed program was:" >&5
19650fd6
AS
17485sed 's/^/| /' conftest.$ac_ext >&5
17486
84e70f78
KR
17487ac_cv_lib_resolv_res_send=no
17488fi
35996d22
AS
17489rm -f conftest.err conftest.$ac_objext \
17490 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17491LIBS=$ac_check_lib_save_LIBS
17492fi
c0d27fcc 17493echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
17494echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
17495if test $ac_cv_lib_resolv_res_send = yes; then
17496 resolv=yes
17497else
c0d27fcc 17498 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
17499echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
17500if test "${ac_cv_lib_resolv___res_send+set}" = set; then
17501 echo $ECHO_N "(cached) $ECHO_C" >&6
17502else
17503 ac_check_lib_save_LIBS=$LIBS
17504LIBS="-lresolv $LIBS"
17505cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17506/* confdefs.h. */
17507_ACEOF
17508cat confdefs.h >>conftest.$ac_ext
17509cat >>conftest.$ac_ext <<_ACEOF
17510/* end confdefs.h. */
84e70f78
KR
17511
17512/* Override any gcc2 internal prototype to avoid an error. */
17513#ifdef __cplusplus
17514extern "C"
17515#endif
17516/* We use char because int might match the return type of a gcc2
17517 builtin and then its argument prototype would still apply. */
17518char __res_send ();
17519int
17520main ()
17521{
17522__res_send ();
17523 ;
17524 return 0;
17525}
17526_ACEOF
17527rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17528if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17529 (eval $ac_link) 2>conftest.er1
84e70f78 17530 ac_status=$?
35996d22
AS
17531 grep -v '^ *+' conftest.er1 >conftest.err
17532 rm -f conftest.er1
17533 cat conftest.err >&5
c0d27fcc 17534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17535 (exit $ac_status); } &&
9adfabc2 17536 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17538 (eval $ac_try) 2>&5
17539 ac_status=$?
17540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17541 (exit $ac_status); }; } &&
17542 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17544 (eval $ac_try) 2>&5
17545 ac_status=$?
c0d27fcc 17546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17547 (exit $ac_status); }; }; then
17548 ac_cv_lib_resolv___res_send=yes
17549else
17550 echo "$as_me: failed program was:" >&5
19650fd6
AS
17551sed 's/^/| /' conftest.$ac_ext >&5
17552
84e70f78
KR
17553ac_cv_lib_resolv___res_send=no
17554fi
35996d22
AS
17555rm -f conftest.err conftest.$ac_objext \
17556 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17557LIBS=$ac_check_lib_save_LIBS
17558fi
c0d27fcc 17559echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
17560echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
17561if test $ac_cv_lib_resolv___res_send = yes; then
17562 resolv=yes
17563fi
17564
17565fi
17566
17567fi
17568
17569fi
17570
17571 if test "$resolv" = yes ; then
17572 RESOLVLIB=-lresolv
b936fae4 17573
c0d27fcc 17574cat >>confdefs.h <<\_ACEOF
84e70f78 17575#define HAVE_LIBRESOLV 1
c0d27fcc 17576_ACEOF
84e70f78
KR
17577
17578 else
17579 RESOLVLIB=
17580 fi
c0d27fcc 17581 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
17582echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
17583if test "${ac_cv_func_hes_getmailhost+set}" = set; then
17584 echo $ECHO_N "(cached) $ECHO_C" >&6
17585else
17586 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17587/* confdefs.h. */
17588_ACEOF
17589cat confdefs.h >>conftest.$ac_ext
17590cat >>conftest.$ac_ext <<_ACEOF
17591/* end confdefs.h. */
35996d22
AS
17592/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
17593 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17594#define hes_getmailhost innocuous_hes_getmailhost
17595
84e70f78 17596/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17597 which can conflict with char hes_getmailhost (); below.
17598 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17599 <limits.h> exists even on freestanding compilers. */
35996d22 17600
19650fd6
AS
17601#ifdef __STDC__
17602# include <limits.h>
17603#else
17604# include <assert.h>
17605#endif
35996d22
AS
17606
17607#undef hes_getmailhost
17608
84e70f78
KR
17609/* Override any gcc2 internal prototype to avoid an error. */
17610#ifdef __cplusplus
17611extern "C"
19650fd6 17612{
84e70f78
KR
17613#endif
17614/* We use char because int might match the return type of a gcc2
17615 builtin and then its argument prototype would still apply. */
17616char hes_getmailhost ();
84e70f78
KR
17617/* The GNU C library defines this for functions which it implements
17618 to always fail with ENOSYS. Some functions are actually named
17619 something starting with __ and the normal name is an alias. */
17620#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
17621choke me
17622#else
19650fd6
AS
17623char (*f) () = hes_getmailhost;
17624#endif
17625#ifdef __cplusplus
17626}
cd958eb3
MB
17627#endif
17628
19650fd6
AS
17629int
17630main ()
17631{
17632return f != hes_getmailhost;
84e70f78
KR
17633 ;
17634 return 0;
17635}
17636_ACEOF
17637rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17638if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17639 (eval $ac_link) 2>conftest.er1
84e70f78 17640 ac_status=$?
35996d22
AS
17641 grep -v '^ *+' conftest.er1 >conftest.err
17642 rm -f conftest.er1
17643 cat conftest.err >&5
c0d27fcc 17644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17645 (exit $ac_status); } &&
9adfabc2 17646 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17648 (eval $ac_try) 2>&5
17649 ac_status=$?
17650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17651 (exit $ac_status); }; } &&
17652 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17654 (eval $ac_try) 2>&5
17655 ac_status=$?
c0d27fcc 17656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17657 (exit $ac_status); }; }; then
17658 ac_cv_func_hes_getmailhost=yes
17659else
17660 echo "$as_me: failed program was:" >&5
19650fd6
AS
17661sed 's/^/| /' conftest.$ac_ext >&5
17662
84e70f78
KR
17663ac_cv_func_hes_getmailhost=no
17664fi
35996d22
AS
17665rm -f conftest.err conftest.$ac_objext \
17666 conftest$ac_exeext conftest.$ac_ext
84e70f78 17667fi
c0d27fcc 17668echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
17669echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
17670if test $ac_cv_func_hes_getmailhost = yes; then
17671 :
17672else
c0d27fcc 17673 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
17674echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
17675if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
17676 echo $ECHO_N "(cached) $ECHO_C" >&6
17677else
17678 ac_check_lib_save_LIBS=$LIBS
17679LIBS="-lhesiod $RESOLVLIB $LIBS"
17680cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17681/* confdefs.h. */
17682_ACEOF
17683cat confdefs.h >>conftest.$ac_ext
17684cat >>conftest.$ac_ext <<_ACEOF
17685/* end confdefs.h. */
84e70f78
KR
17686
17687/* Override any gcc2 internal prototype to avoid an error. */
17688#ifdef __cplusplus
17689extern "C"
17690#endif
17691/* We use char because int might match the return type of a gcc2
17692 builtin and then its argument prototype would still apply. */
17693char hes_getmailhost ();
17694int
17695main ()
17696{
17697hes_getmailhost ();
17698 ;
17699 return 0;
17700}
17701_ACEOF
17702rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17703if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17704 (eval $ac_link) 2>conftest.er1
84e70f78 17705 ac_status=$?
35996d22
AS
17706 grep -v '^ *+' conftest.er1 >conftest.err
17707 rm -f conftest.er1
17708 cat conftest.err >&5
c0d27fcc 17709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17710 (exit $ac_status); } &&
9adfabc2 17711 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17713 (eval $ac_try) 2>&5
17714 ac_status=$?
17715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17716 (exit $ac_status); }; } &&
17717 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17719 (eval $ac_try) 2>&5
17720 ac_status=$?
c0d27fcc 17721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17722 (exit $ac_status); }; }; then
17723 ac_cv_lib_hesiod_hes_getmailhost=yes
17724else
17725 echo "$as_me: failed program was:" >&5
19650fd6
AS
17726sed 's/^/| /' conftest.$ac_ext >&5
17727
84e70f78
KR
17728ac_cv_lib_hesiod_hes_getmailhost=no
17729fi
35996d22
AS
17730rm -f conftest.err conftest.$ac_objext \
17731 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17732LIBS=$ac_check_lib_save_LIBS
17733fi
c0d27fcc 17734echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
17735echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
17736if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 17737
c0d27fcc 17738cat >>confdefs.h <<\_ACEOF
84e70f78 17739#define HAVE_LIBHESIOD 1
c0d27fcc 17740_ACEOF
84e70f78
KR
17741
17742else
17743 :
17744fi
17745
17746fi
17747
17748fi
17749
a21616bd
KR
17750# These tell us which Kerberos-related libraries to use.
17751if test "${with_kerberos+set}" = set; then
503d2be0 17752
c0d27fcc 17753echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
17754echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
17755if test "${ac_cv_lib_com_err_com_err+set}" = set; then
17756 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17757else
503d2be0 17758 ac_check_lib_save_LIBS=$LIBS
a21616bd 17759LIBS="-lcom_err $LIBS"
503d2be0 17760cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17761/* confdefs.h. */
17762_ACEOF
17763cat confdefs.h >>conftest.$ac_ext
17764cat >>conftest.$ac_ext <<_ACEOF
17765/* end confdefs.h. */
503d2be0 17766
a21616bd 17767/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17768#ifdef __cplusplus
17769extern "C"
17770#endif
a21616bd 17771/* We use char because int might match the return type of a gcc2
503d2be0
AS
17772 builtin and then its argument prototype would still apply. */
17773char com_err ();
17774int
17775main ()
17776{
17777com_err ();
17778 ;
17779 return 0;
17780}
17781_ACEOF
17782rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17783if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17784 (eval $ac_link) 2>conftest.er1
503d2be0 17785 ac_status=$?
35996d22
AS
17786 grep -v '^ *+' conftest.er1 >conftest.err
17787 rm -f conftest.er1
17788 cat conftest.err >&5
c0d27fcc 17789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17790 (exit $ac_status); } &&
9adfabc2 17791 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17793 (eval $ac_try) 2>&5
17794 ac_status=$?
17795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17796 (exit $ac_status); }; } &&
17797 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17799 (eval $ac_try) 2>&5
17800 ac_status=$?
c0d27fcc 17801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17802 (exit $ac_status); }; }; then
17803 ac_cv_lib_com_err_com_err=yes
17804else
17805 echo "$as_me: failed program was:" >&5
19650fd6
AS
17806sed 's/^/| /' conftest.$ac_ext >&5
17807
503d2be0
AS
17808ac_cv_lib_com_err_com_err=no
17809fi
35996d22
AS
17810rm -f conftest.err conftest.$ac_objext \
17811 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17812LIBS=$ac_check_lib_save_LIBS
17813fi
c0d27fcc 17814echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
17815echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
17816if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 17817 cat >>confdefs.h <<_ACEOF
503d2be0 17818#define HAVE_LIBCOM_ERR 1
c0d27fcc 17819_ACEOF
a21616bd
KR
17820
17821 LIBS="-lcom_err $LIBS"
17822
a21616bd
KR
17823fi
17824
c0d27fcc
MR
17825
17826echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
17827echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
17828if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
17829 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17830else
503d2be0 17831 ac_check_lib_save_LIBS=$LIBS
a21616bd 17832LIBS="-lk5crypto $LIBS"
503d2be0 17833cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17834/* confdefs.h. */
17835_ACEOF
17836cat confdefs.h >>conftest.$ac_ext
17837cat >>conftest.$ac_ext <<_ACEOF
17838/* end confdefs.h. */
503d2be0 17839
a21616bd 17840/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17841#ifdef __cplusplus
17842extern "C"
17843#endif
a21616bd 17844/* We use char because int might match the return type of a gcc2
503d2be0
AS
17845 builtin and then its argument prototype would still apply. */
17846char mit_des_cbc_encrypt ();
17847int
17848main ()
17849{
17850mit_des_cbc_encrypt ();
17851 ;
17852 return 0;
17853}
17854_ACEOF
17855rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17856if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17857 (eval $ac_link) 2>conftest.er1
503d2be0 17858 ac_status=$?
35996d22
AS
17859 grep -v '^ *+' conftest.er1 >conftest.err
17860 rm -f conftest.er1
17861 cat conftest.err >&5
c0d27fcc 17862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17863 (exit $ac_status); } &&
9adfabc2 17864 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17866 (eval $ac_try) 2>&5
17867 ac_status=$?
17868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17869 (exit $ac_status); }; } &&
17870 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17872 (eval $ac_try) 2>&5
17873 ac_status=$?
c0d27fcc 17874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17875 (exit $ac_status); }; }; then
17876 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
17877else
17878 echo "$as_me: failed program was:" >&5
19650fd6
AS
17879sed 's/^/| /' conftest.$ac_ext >&5
17880
503d2be0
AS
17881ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
17882fi
35996d22
AS
17883rm -f conftest.err conftest.$ac_objext \
17884 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17885LIBS=$ac_check_lib_save_LIBS
17886fi
c0d27fcc 17887echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
17888echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
17889if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 17890 cat >>confdefs.h <<_ACEOF
503d2be0 17891#define HAVE_LIBK5CRYPTO 1
c0d27fcc 17892_ACEOF
a21616bd
KR
17893
17894 LIBS="-lk5crypto $LIBS"
17895
a21616bd
KR
17896fi
17897
c0d27fcc
MR
17898
17899echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
17900echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
17901if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
17902 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17903else
503d2be0 17904 ac_check_lib_save_LIBS=$LIBS
a21616bd 17905LIBS="-lcrypto $LIBS"
503d2be0 17906cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17907/* confdefs.h. */
17908_ACEOF
17909cat confdefs.h >>conftest.$ac_ext
17910cat >>conftest.$ac_ext <<_ACEOF
17911/* end confdefs.h. */
503d2be0 17912
a21616bd 17913/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17914#ifdef __cplusplus
17915extern "C"
17916#endif
a21616bd 17917/* We use char because int might match the return type of a gcc2
503d2be0
AS
17918 builtin and then its argument prototype would still apply. */
17919char mit_des_cbc_encrypt ();
17920int
17921main ()
17922{
17923mit_des_cbc_encrypt ();
17924 ;
17925 return 0;
17926}
17927_ACEOF
17928rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17929if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17930 (eval $ac_link) 2>conftest.er1
503d2be0 17931 ac_status=$?
35996d22
AS
17932 grep -v '^ *+' conftest.er1 >conftest.err
17933 rm -f conftest.er1
17934 cat conftest.err >&5
c0d27fcc 17935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17936 (exit $ac_status); } &&
9adfabc2 17937 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17939 (eval $ac_try) 2>&5
17940 ac_status=$?
17941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17942 (exit $ac_status); }; } &&
17943 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17945 (eval $ac_try) 2>&5
17946 ac_status=$?
c0d27fcc 17947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17948 (exit $ac_status); }; }; then
17949 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
17950else
17951 echo "$as_me: failed program was:" >&5
19650fd6
AS
17952sed 's/^/| /' conftest.$ac_ext >&5
17953
503d2be0
AS
17954ac_cv_lib_crypto_mit_des_cbc_encrypt=no
17955fi
35996d22
AS
17956rm -f conftest.err conftest.$ac_objext \
17957 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17958LIBS=$ac_check_lib_save_LIBS
17959fi
c0d27fcc 17960echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
17961echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
17962if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 17963 cat >>confdefs.h <<_ACEOF
503d2be0 17964#define HAVE_LIBCRYPTO 1
c0d27fcc 17965_ACEOF
a21616bd
KR
17966
17967 LIBS="-lcrypto $LIBS"
17968
a21616bd
KR
17969fi
17970
c0d27fcc
MR
17971
17972echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
17973echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
17974if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
17975 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17976else
503d2be0 17977 ac_check_lib_save_LIBS=$LIBS
a21616bd 17978LIBS="-lkrb5 $LIBS"
503d2be0 17979cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17980/* confdefs.h. */
17981_ACEOF
17982cat confdefs.h >>conftest.$ac_ext
17983cat >>conftest.$ac_ext <<_ACEOF
17984/* end confdefs.h. */
a21616bd 17985
503d2be0
AS
17986/* Override any gcc2 internal prototype to avoid an error. */
17987#ifdef __cplusplus
17988extern "C"
17989#endif
17990/* We use char because int might match the return type of a gcc2
17991 builtin and then its argument prototype would still apply. */
17992char krb5_init_context ();
17993int
17994main ()
17995{
17996krb5_init_context ();
17997 ;
17998 return 0;
17999}
18000_ACEOF
18001rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18002if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18003 (eval $ac_link) 2>conftest.er1
503d2be0 18004 ac_status=$?
35996d22
AS
18005 grep -v '^ *+' conftest.er1 >conftest.err
18006 rm -f conftest.er1
18007 cat conftest.err >&5
c0d27fcc 18008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18009 (exit $ac_status); } &&
9adfabc2 18010 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18012 (eval $ac_try) 2>&5
18013 ac_status=$?
18014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18015 (exit $ac_status); }; } &&
18016 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18018 (eval $ac_try) 2>&5
18019 ac_status=$?
c0d27fcc 18020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18021 (exit $ac_status); }; }; then
18022 ac_cv_lib_krb5_krb5_init_context=yes
18023else
18024 echo "$as_me: failed program was:" >&5
19650fd6
AS
18025sed 's/^/| /' conftest.$ac_ext >&5
18026
503d2be0
AS
18027ac_cv_lib_krb5_krb5_init_context=no
18028fi
35996d22
AS
18029rm -f conftest.err conftest.$ac_objext \
18030 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18031LIBS=$ac_check_lib_save_LIBS
18032fi
c0d27fcc 18033echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
18034echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
18035if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 18036 cat >>confdefs.h <<_ACEOF
503d2be0 18037#define HAVE_LIBKRB5 1
c0d27fcc 18038_ACEOF
a21616bd
KR
18039
18040 LIBS="-lkrb5 $LIBS"
18041
a21616bd
KR
18042fi
18043
18044 if test "${with_kerberos5+set}" != set; then
503d2be0 18045
c0d27fcc 18046echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
18047echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
18048if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
18049 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18050else
503d2be0 18051 ac_check_lib_save_LIBS=$LIBS
a21616bd 18052LIBS="-ldes425 $LIBS"
503d2be0 18053cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18054/* confdefs.h. */
18055_ACEOF
18056cat confdefs.h >>conftest.$ac_ext
18057cat >>conftest.$ac_ext <<_ACEOF
18058/* end confdefs.h. */
503d2be0 18059
a21616bd 18060/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18061#ifdef __cplusplus
18062extern "C"
18063#endif
a21616bd 18064/* We use char because int might match the return type of a gcc2
503d2be0
AS
18065 builtin and then its argument prototype would still apply. */
18066char des_cbc_encrypt ();
18067int
18068main ()
18069{
18070des_cbc_encrypt ();
18071 ;
18072 return 0;
18073}
18074_ACEOF
18075rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18077 (eval $ac_link) 2>conftest.er1
503d2be0 18078 ac_status=$?
35996d22
AS
18079 grep -v '^ *+' conftest.er1 >conftest.err
18080 rm -f conftest.er1
18081 cat conftest.err >&5
c0d27fcc 18082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18083 (exit $ac_status); } &&
9adfabc2 18084 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18086 (eval $ac_try) 2>&5
18087 ac_status=$?
18088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18089 (exit $ac_status); }; } &&
18090 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18092 (eval $ac_try) 2>&5
18093 ac_status=$?
c0d27fcc 18094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18095 (exit $ac_status); }; }; then
18096 ac_cv_lib_des425_des_cbc_encrypt=yes
18097else
18098 echo "$as_me: failed program was:" >&5
19650fd6
AS
18099sed 's/^/| /' conftest.$ac_ext >&5
18100
503d2be0
AS
18101ac_cv_lib_des425_des_cbc_encrypt=no
18102fi
35996d22
AS
18103rm -f conftest.err conftest.$ac_objext \
18104 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18105LIBS=$ac_check_lib_save_LIBS
18106fi
c0d27fcc 18107echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
18108echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
18109if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 18110 cat >>confdefs.h <<_ACEOF
503d2be0 18111#define HAVE_LIBDES425 1
c0d27fcc 18112_ACEOF
a21616bd
KR
18113
18114 LIBS="-ldes425 $LIBS"
18115
18116else
503d2be0 18117
c0d27fcc 18118echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
18119echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
18120if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
18121 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18122else
503d2be0 18123 ac_check_lib_save_LIBS=$LIBS
a21616bd 18124LIBS="-ldes $LIBS"
503d2be0 18125cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18126/* confdefs.h. */
18127_ACEOF
18128cat confdefs.h >>conftest.$ac_ext
18129cat >>conftest.$ac_ext <<_ACEOF
18130/* end confdefs.h. */
503d2be0 18131
a21616bd 18132/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18133#ifdef __cplusplus
18134extern "C"
18135#endif
a21616bd 18136/* We use char because int might match the return type of a gcc2
503d2be0
AS
18137 builtin and then its argument prototype would still apply. */
18138char des_cbc_encrypt ();
18139int
18140main ()
18141{
18142des_cbc_encrypt ();
18143 ;
18144 return 0;
18145}
18146_ACEOF
18147rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18148if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18149 (eval $ac_link) 2>conftest.er1
503d2be0 18150 ac_status=$?
35996d22
AS
18151 grep -v '^ *+' conftest.er1 >conftest.err
18152 rm -f conftest.er1
18153 cat conftest.err >&5
c0d27fcc 18154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18155 (exit $ac_status); } &&
9adfabc2 18156 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18158 (eval $ac_try) 2>&5
18159 ac_status=$?
18160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18161 (exit $ac_status); }; } &&
18162 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18164 (eval $ac_try) 2>&5
18165 ac_status=$?
c0d27fcc 18166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18167 (exit $ac_status); }; }; then
18168 ac_cv_lib_des_des_cbc_encrypt=yes
18169else
18170 echo "$as_me: failed program was:" >&5
19650fd6
AS
18171sed 's/^/| /' conftest.$ac_ext >&5
18172
503d2be0
AS
18173ac_cv_lib_des_des_cbc_encrypt=no
18174fi
35996d22
AS
18175rm -f conftest.err conftest.$ac_objext \
18176 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18177LIBS=$ac_check_lib_save_LIBS
18178fi
c0d27fcc 18179echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
18180echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
18181if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 18182 cat >>confdefs.h <<_ACEOF
503d2be0 18183#define HAVE_LIBDES 1
c0d27fcc 18184_ACEOF
a21616bd
KR
18185
18186 LIBS="-ldes $LIBS"
18187
a21616bd
KR
18188fi
18189
18190fi
18191
c0d27fcc
MR
18192
18193echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
18194echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
18195if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
18196 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18197else
503d2be0 18198 ac_check_lib_save_LIBS=$LIBS
a21616bd 18199LIBS="-lkrb4 $LIBS"
503d2be0 18200cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18201/* confdefs.h. */
18202_ACEOF
18203cat confdefs.h >>conftest.$ac_ext
18204cat >>conftest.$ac_ext <<_ACEOF
18205/* end confdefs.h. */
503d2be0 18206
a21616bd 18207/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18208#ifdef __cplusplus
18209extern "C"
18210#endif
a21616bd 18211/* We use char because int might match the return type of a gcc2
503d2be0
AS
18212 builtin and then its argument prototype would still apply. */
18213char krb_get_cred ();
18214int
18215main ()
18216{
18217krb_get_cred ();
18218 ;
18219 return 0;
18220}
18221_ACEOF
18222rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18223if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18224 (eval $ac_link) 2>conftest.er1
503d2be0 18225 ac_status=$?
35996d22
AS
18226 grep -v '^ *+' conftest.er1 >conftest.err
18227 rm -f conftest.er1
18228 cat conftest.err >&5
c0d27fcc 18229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18230 (exit $ac_status); } &&
9adfabc2 18231 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18233 (eval $ac_try) 2>&5
18234 ac_status=$?
18235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18236 (exit $ac_status); }; } &&
18237 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18239 (eval $ac_try) 2>&5
18240 ac_status=$?
c0d27fcc 18241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18242 (exit $ac_status); }; }; then
18243 ac_cv_lib_krb4_krb_get_cred=yes
18244else
18245 echo "$as_me: failed program was:" >&5
19650fd6
AS
18246sed 's/^/| /' conftest.$ac_ext >&5
18247
503d2be0
AS
18248ac_cv_lib_krb4_krb_get_cred=no
18249fi
35996d22
AS
18250rm -f conftest.err conftest.$ac_objext \
18251 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18252LIBS=$ac_check_lib_save_LIBS
18253fi
c0d27fcc 18254echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
18255echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
18256if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 18257 cat >>confdefs.h <<_ACEOF
503d2be0 18258#define HAVE_LIBKRB4 1
c0d27fcc 18259_ACEOF
a21616bd
KR
18260
18261 LIBS="-lkrb4 $LIBS"
18262
18263else
503d2be0 18264
c0d27fcc 18265echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
18266echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
18267if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
18268 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18269else
503d2be0 18270 ac_check_lib_save_LIBS=$LIBS
a21616bd 18271LIBS="-lkrb $LIBS"
503d2be0 18272cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18273/* confdefs.h. */
18274_ACEOF
18275cat confdefs.h >>conftest.$ac_ext
18276cat >>conftest.$ac_ext <<_ACEOF
18277/* end confdefs.h. */
503d2be0 18278
a21616bd 18279/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18280#ifdef __cplusplus
18281extern "C"
18282#endif
a21616bd 18283/* We use char because int might match the return type of a gcc2
503d2be0
AS
18284 builtin and then its argument prototype would still apply. */
18285char krb_get_cred ();
18286int
18287main ()
18288{
18289krb_get_cred ();
18290 ;
18291 return 0;
18292}
18293_ACEOF
18294rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18295if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18296 (eval $ac_link) 2>conftest.er1
503d2be0 18297 ac_status=$?
35996d22
AS
18298 grep -v '^ *+' conftest.er1 >conftest.err
18299 rm -f conftest.er1
18300 cat conftest.err >&5
c0d27fcc 18301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18302 (exit $ac_status); } &&
9adfabc2 18303 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18305 (eval $ac_try) 2>&5
18306 ac_status=$?
18307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18308 (exit $ac_status); }; } &&
18309 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18311 (eval $ac_try) 2>&5
18312 ac_status=$?
c0d27fcc 18313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18314 (exit $ac_status); }; }; then
18315 ac_cv_lib_krb_krb_get_cred=yes
18316else
18317 echo "$as_me: failed program was:" >&5
19650fd6
AS
18318sed 's/^/| /' conftest.$ac_ext >&5
18319
503d2be0
AS
18320ac_cv_lib_krb_krb_get_cred=no
18321fi
35996d22
AS
18322rm -f conftest.err conftest.$ac_objext \
18323 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18324LIBS=$ac_check_lib_save_LIBS
18325fi
c0d27fcc 18326echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
18327echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
18328if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 18329 cat >>confdefs.h <<_ACEOF
503d2be0 18330#define HAVE_LIBKRB 1
c0d27fcc 18331_ACEOF
a21616bd
KR
18332
18333 LIBS="-lkrb $LIBS"
18334
a21616bd
KR
18335fi
18336
18337fi
18338
18339 fi
18340
18341 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
18342
18343for ac_header in krb5.h
a21616bd 18344do
503d2be0 18345as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18346if eval "test \"\${$as_ac_Header+set}\" = set"; then
18347 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18348echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18349if eval "test \"\${$as_ac_Header+set}\" = set"; then
18350 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18351fi
18352echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18353echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18354else
c0d27fcc
MR
18355 # Is the header compilable?
18356echo "$as_me:$LINENO: checking $ac_header usability" >&5
18357echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18358cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18359/* confdefs.h. */
18360_ACEOF
18361cat confdefs.h >>conftest.$ac_ext
18362cat >>conftest.$ac_ext <<_ACEOF
18363/* end confdefs.h. */
c0d27fcc
MR
18364$ac_includes_default
18365#include <$ac_header>
18366_ACEOF
18367rm -f conftest.$ac_objext
18368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18369 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18370 ac_status=$?
35996d22
AS
18371 grep -v '^ *+' conftest.er1 >conftest.err
18372 rm -f conftest.er1
18373 cat conftest.err >&5
c0d27fcc
MR
18374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18375 (exit $ac_status); } &&
9adfabc2 18376 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18378 (eval $ac_try) 2>&5
18379 ac_status=$?
18380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18381 (exit $ac_status); }; } &&
18382 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18384 (eval $ac_try) 2>&5
18385 ac_status=$?
18386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18387 (exit $ac_status); }; }; then
18388 ac_header_compiler=yes
18389else
18390 echo "$as_me: failed program was:" >&5
19650fd6
AS
18391sed 's/^/| /' conftest.$ac_ext >&5
18392
c0d27fcc
MR
18393ac_header_compiler=no
18394fi
35996d22 18395rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18396echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18397echo "${ECHO_T}$ac_header_compiler" >&6
18398
18399# Is the header present?
18400echo "$as_me:$LINENO: checking $ac_header presence" >&5
18401echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18402cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18403/* confdefs.h. */
18404_ACEOF
18405cat confdefs.h >>conftest.$ac_ext
18406cat >>conftest.$ac_ext <<_ACEOF
18407/* end confdefs.h. */
503d2be0
AS
18408#include <$ac_header>
18409_ACEOF
c0d27fcc 18410if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18411 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18412 ac_status=$?
6bae0ccf 18413 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18414 rm -f conftest.er1
18415 cat conftest.err >&5
c0d27fcc 18416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18417 (exit $ac_status); } >/dev/null; then
18418 if test -s conftest.err; then
18419 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18420 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18421 else
18422 ac_cpp_err=
18423 fi
18424else
18425 ac_cpp_err=yes
18426fi
18427if test -z "$ac_cpp_err"; then
c0d27fcc 18428 ac_header_preproc=yes
503d2be0
AS
18429else
18430 echo "$as_me: failed program was:" >&5
19650fd6
AS
18431sed 's/^/| /' conftest.$ac_ext >&5
18432
c0d27fcc 18433 ac_header_preproc=no
a21616bd 18434fi
503d2be0 18435rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18436echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18437echo "${ECHO_T}$ac_header_preproc" >&6
18438
18439# So? What about this header?
35996d22
AS
18440case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18441 yes:no: )
c0d27fcc
MR
18442 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18443echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18444 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18445echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18446 ac_header_preproc=yes
19650fd6 18447 ;;
35996d22 18448 no:yes:* )
c0d27fcc
MR
18449 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18450echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18451 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18452echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18453 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18454echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18455 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18456echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18457 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18458echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18459 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18460echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18461 (
18462 cat <<\_ASBOX
35996d22
AS
18463## ------------------------------------------ ##
18464## Report this to the AC_PACKAGE_NAME lists. ##
18465## ------------------------------------------ ##
19650fd6
AS
18466_ASBOX
18467 ) |
18468 sed "s/^/$as_me: WARNING: /" >&2
18469 ;;
c0d27fcc
MR
18470esac
18471echo "$as_me:$LINENO: checking for $ac_header" >&5
18472echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18473if eval "test \"\${$as_ac_Header+set}\" = set"; then
18474 echo $ECHO_N "(cached) $ECHO_C" >&6
18475else
35996d22 18476 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18477fi
c0d27fcc 18478echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18479echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18480
18481fi
503d2be0 18482if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18483 cat >>confdefs.h <<_ACEOF
503d2be0 18484#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18485_ACEOF
503d2be0 18486
a21616bd 18487fi
c0d27fcc 18488
a21616bd
KR
18489done
18490
18491 else
503d2be0
AS
18492
18493for ac_header in des.h
a21616bd 18494do
503d2be0 18495as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18496if eval "test \"\${$as_ac_Header+set}\" = set"; then
18497 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18498echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18499if eval "test \"\${$as_ac_Header+set}\" = set"; then
18500 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18501fi
18502echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18503echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18504else
c0d27fcc
MR
18505 # Is the header compilable?
18506echo "$as_me:$LINENO: checking $ac_header usability" >&5
18507echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18508cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18509/* confdefs.h. */
18510_ACEOF
18511cat confdefs.h >>conftest.$ac_ext
18512cat >>conftest.$ac_ext <<_ACEOF
18513/* end confdefs.h. */
c0d27fcc
MR
18514$ac_includes_default
18515#include <$ac_header>
18516_ACEOF
18517rm -f conftest.$ac_objext
18518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18519 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18520 ac_status=$?
35996d22
AS
18521 grep -v '^ *+' conftest.er1 >conftest.err
18522 rm -f conftest.er1
18523 cat conftest.err >&5
c0d27fcc
MR
18524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18525 (exit $ac_status); } &&
9adfabc2 18526 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18528 (eval $ac_try) 2>&5
18529 ac_status=$?
18530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18531 (exit $ac_status); }; } &&
18532 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18534 (eval $ac_try) 2>&5
18535 ac_status=$?
18536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18537 (exit $ac_status); }; }; then
18538 ac_header_compiler=yes
18539else
18540 echo "$as_me: failed program was:" >&5
19650fd6
AS
18541sed 's/^/| /' conftest.$ac_ext >&5
18542
c0d27fcc
MR
18543ac_header_compiler=no
18544fi
35996d22 18545rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18546echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18547echo "${ECHO_T}$ac_header_compiler" >&6
18548
18549# Is the header present?
18550echo "$as_me:$LINENO: checking $ac_header presence" >&5
18551echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18552cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18553/* confdefs.h. */
18554_ACEOF
18555cat confdefs.h >>conftest.$ac_ext
18556cat >>conftest.$ac_ext <<_ACEOF
18557/* end confdefs.h. */
503d2be0
AS
18558#include <$ac_header>
18559_ACEOF
c0d27fcc 18560if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18561 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18562 ac_status=$?
6bae0ccf 18563 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18564 rm -f conftest.er1
18565 cat conftest.err >&5
c0d27fcc 18566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18567 (exit $ac_status); } >/dev/null; then
18568 if test -s conftest.err; then
18569 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18570 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18571 else
18572 ac_cpp_err=
18573 fi
18574else
18575 ac_cpp_err=yes
18576fi
18577if test -z "$ac_cpp_err"; then
c0d27fcc 18578 ac_header_preproc=yes
503d2be0
AS
18579else
18580 echo "$as_me: failed program was:" >&5
19650fd6
AS
18581sed 's/^/| /' conftest.$ac_ext >&5
18582
c0d27fcc 18583 ac_header_preproc=no
a21616bd 18584fi
503d2be0 18585rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18586echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18587echo "${ECHO_T}$ac_header_preproc" >&6
18588
18589# So? What about this header?
35996d22
AS
18590case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18591 yes:no: )
c0d27fcc
MR
18592 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18593echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18594 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18595echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18596 ac_header_preproc=yes
19650fd6 18597 ;;
35996d22 18598 no:yes:* )
c0d27fcc
MR
18599 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18600echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18601 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18602echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18603 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18604echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18605 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18606echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18607 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18608echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18609 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18610echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18611 (
18612 cat <<\_ASBOX
35996d22
AS
18613## ------------------------------------------ ##
18614## Report this to the AC_PACKAGE_NAME lists. ##
18615## ------------------------------------------ ##
19650fd6
AS
18616_ASBOX
18617 ) |
18618 sed "s/^/$as_me: WARNING: /" >&2
18619 ;;
c0d27fcc
MR
18620esac
18621echo "$as_me:$LINENO: checking for $ac_header" >&5
18622echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18623if eval "test \"\${$as_ac_Header+set}\" = set"; then
18624 echo $ECHO_N "(cached) $ECHO_C" >&6
18625else
35996d22 18626 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18627fi
c0d27fcc 18628echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18629echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18630
18631fi
503d2be0 18632if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18633 cat >>confdefs.h <<_ACEOF
503d2be0 18634#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18635_ACEOF
503d2be0 18636
a21616bd 18637else
503d2be0
AS
18638
18639for ac_header in kerberosIV/des.h
a21616bd 18640do
503d2be0 18641as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18642if eval "test \"\${$as_ac_Header+set}\" = set"; then
18643 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18644echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18645if eval "test \"\${$as_ac_Header+set}\" = set"; then
18646 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18647fi
18648echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18649echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18650else
c0d27fcc
MR
18651 # Is the header compilable?
18652echo "$as_me:$LINENO: checking $ac_header usability" >&5
18653echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18654cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18655/* confdefs.h. */
18656_ACEOF
18657cat confdefs.h >>conftest.$ac_ext
18658cat >>conftest.$ac_ext <<_ACEOF
18659/* end confdefs.h. */
c0d27fcc
MR
18660$ac_includes_default
18661#include <$ac_header>
18662_ACEOF
18663rm -f conftest.$ac_objext
18664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18665 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18666 ac_status=$?
35996d22
AS
18667 grep -v '^ *+' conftest.er1 >conftest.err
18668 rm -f conftest.er1
18669 cat conftest.err >&5
c0d27fcc
MR
18670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18671 (exit $ac_status); } &&
9adfabc2 18672 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18674 (eval $ac_try) 2>&5
18675 ac_status=$?
18676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18677 (exit $ac_status); }; } &&
18678 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18680 (eval $ac_try) 2>&5
18681 ac_status=$?
18682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18683 (exit $ac_status); }; }; then
18684 ac_header_compiler=yes
18685else
18686 echo "$as_me: failed program was:" >&5
19650fd6
AS
18687sed 's/^/| /' conftest.$ac_ext >&5
18688
c0d27fcc
MR
18689ac_header_compiler=no
18690fi
35996d22 18691rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18692echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18693echo "${ECHO_T}$ac_header_compiler" >&6
18694
18695# Is the header present?
18696echo "$as_me:$LINENO: checking $ac_header presence" >&5
18697echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18698cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18699/* confdefs.h. */
18700_ACEOF
18701cat confdefs.h >>conftest.$ac_ext
18702cat >>conftest.$ac_ext <<_ACEOF
18703/* end confdefs.h. */
503d2be0
AS
18704#include <$ac_header>
18705_ACEOF
c0d27fcc 18706if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18707 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18708 ac_status=$?
6bae0ccf 18709 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18710 rm -f conftest.er1
18711 cat conftest.err >&5
c0d27fcc 18712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18713 (exit $ac_status); } >/dev/null; then
18714 if test -s conftest.err; then
18715 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18716 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18717 else
18718 ac_cpp_err=
18719 fi
18720else
18721 ac_cpp_err=yes
18722fi
18723if test -z "$ac_cpp_err"; then
c0d27fcc 18724 ac_header_preproc=yes
503d2be0
AS
18725else
18726 echo "$as_me: failed program was:" >&5
19650fd6
AS
18727sed 's/^/| /' conftest.$ac_ext >&5
18728
c0d27fcc 18729 ac_header_preproc=no
a21616bd 18730fi
503d2be0 18731rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18732echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18733echo "${ECHO_T}$ac_header_preproc" >&6
18734
18735# So? What about this header?
35996d22
AS
18736case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18737 yes:no: )
c0d27fcc
MR
18738 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18739echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18740 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18741echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18742 ac_header_preproc=yes
19650fd6 18743 ;;
35996d22 18744 no:yes:* )
c0d27fcc
MR
18745 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18746echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18747 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18748echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18749 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18750echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18751 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18752echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18753 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18754echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18755 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18756echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18757 (
18758 cat <<\_ASBOX
35996d22
AS
18759## ------------------------------------------ ##
18760## Report this to the AC_PACKAGE_NAME lists. ##
18761## ------------------------------------------ ##
19650fd6
AS
18762_ASBOX
18763 ) |
18764 sed "s/^/$as_me: WARNING: /" >&2
18765 ;;
c0d27fcc
MR
18766esac
18767echo "$as_me:$LINENO: checking for $ac_header" >&5
18768echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18769if eval "test \"\${$as_ac_Header+set}\" = set"; then
18770 echo $ECHO_N "(cached) $ECHO_C" >&6
18771else
35996d22 18772 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18773fi
c0d27fcc 18774echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18775echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18776
18777fi
503d2be0 18778if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18779 cat >>confdefs.h <<_ACEOF
503d2be0 18780#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18781_ACEOF
503d2be0 18782
a21616bd 18783else
503d2be0
AS
18784
18785for ac_header in kerberos/des.h
a21616bd 18786do
503d2be0 18787as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18788if eval "test \"\${$as_ac_Header+set}\" = set"; then
18789 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18790echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18791if eval "test \"\${$as_ac_Header+set}\" = set"; then
18792 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18793fi
18794echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18795echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18796else
c0d27fcc
MR
18797 # Is the header compilable?
18798echo "$as_me:$LINENO: checking $ac_header usability" >&5
18799echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18800cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18801/* confdefs.h. */
18802_ACEOF
18803cat confdefs.h >>conftest.$ac_ext
18804cat >>conftest.$ac_ext <<_ACEOF
18805/* end confdefs.h. */
c0d27fcc
MR
18806$ac_includes_default
18807#include <$ac_header>
18808_ACEOF
18809rm -f conftest.$ac_objext
18810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18811 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18812 ac_status=$?
35996d22
AS
18813 grep -v '^ *+' conftest.er1 >conftest.err
18814 rm -f conftest.er1
18815 cat conftest.err >&5
c0d27fcc
MR
18816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18817 (exit $ac_status); } &&
9adfabc2 18818 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18820 (eval $ac_try) 2>&5
18821 ac_status=$?
18822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18823 (exit $ac_status); }; } &&
18824 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18826 (eval $ac_try) 2>&5
18827 ac_status=$?
18828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18829 (exit $ac_status); }; }; then
18830 ac_header_compiler=yes
18831else
18832 echo "$as_me: failed program was:" >&5
19650fd6
AS
18833sed 's/^/| /' conftest.$ac_ext >&5
18834
c0d27fcc
MR
18835ac_header_compiler=no
18836fi
35996d22 18837rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18838echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18839echo "${ECHO_T}$ac_header_compiler" >&6
18840
18841# Is the header present?
18842echo "$as_me:$LINENO: checking $ac_header presence" >&5
18843echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18844cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18845/* confdefs.h. */
18846_ACEOF
18847cat confdefs.h >>conftest.$ac_ext
18848cat >>conftest.$ac_ext <<_ACEOF
18849/* end confdefs.h. */
503d2be0
AS
18850#include <$ac_header>
18851_ACEOF
c0d27fcc 18852if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18853 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18854 ac_status=$?
6bae0ccf 18855 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18856 rm -f conftest.er1
18857 cat conftest.err >&5
c0d27fcc 18858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18859 (exit $ac_status); } >/dev/null; then
18860 if test -s conftest.err; then
18861 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18862 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18863 else
18864 ac_cpp_err=
18865 fi
18866else
18867 ac_cpp_err=yes
18868fi
18869if test -z "$ac_cpp_err"; then
c0d27fcc 18870 ac_header_preproc=yes
503d2be0
AS
18871else
18872 echo "$as_me: failed program was:" >&5
19650fd6
AS
18873sed 's/^/| /' conftest.$ac_ext >&5
18874
c0d27fcc 18875 ac_header_preproc=no
a21616bd 18876fi
503d2be0 18877rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18878echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18879echo "${ECHO_T}$ac_header_preproc" >&6
18880
18881# So? What about this header?
35996d22
AS
18882case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18883 yes:no: )
c0d27fcc
MR
18884 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18885echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18886 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18887echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18888 ac_header_preproc=yes
19650fd6 18889 ;;
35996d22 18890 no:yes:* )
c0d27fcc
MR
18891 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18892echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18893 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18894echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18895 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18896echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18897 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18898echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18899 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18900echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18901 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18902echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18903 (
18904 cat <<\_ASBOX
35996d22
AS
18905## ------------------------------------------ ##
18906## Report this to the AC_PACKAGE_NAME lists. ##
18907## ------------------------------------------ ##
19650fd6
AS
18908_ASBOX
18909 ) |
18910 sed "s/^/$as_me: WARNING: /" >&2
18911 ;;
c0d27fcc
MR
18912esac
18913echo "$as_me:$LINENO: checking for $ac_header" >&5
18914echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18915if eval "test \"\${$as_ac_Header+set}\" = set"; then
18916 echo $ECHO_N "(cached) $ECHO_C" >&6
18917else
35996d22 18918 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18919fi
c0d27fcc 18920echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18921echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18922
18923fi
503d2be0 18924if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18925 cat >>confdefs.h <<_ACEOF
503d2be0 18926#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18927_ACEOF
a21616bd
KR
18928
18929fi
c0d27fcc 18930
a21616bd
KR
18931done
18932
98418dba 18933fi
c0d27fcc 18934
925c2f3f
EZ
18935done
18936
98418dba 18937fi
c0d27fcc 18938
925c2f3f 18939done
98418dba 18940
c0d27fcc 18941
925c2f3f
EZ
18942for ac_header in krb.h
18943do
18944as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18945if eval "test \"\${$as_ac_Header+set}\" = set"; then
18946 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
18947echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18948if eval "test \"\${$as_ac_Header+set}\" = set"; then
18949 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18950fi
18951echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18952echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18953else
18954 # Is the header compilable?
18955echo "$as_me:$LINENO: checking $ac_header usability" >&5
18956echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18957cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18958/* confdefs.h. */
18959_ACEOF
18960cat confdefs.h >>conftest.$ac_ext
18961cat >>conftest.$ac_ext <<_ACEOF
18962/* end confdefs.h. */
c0d27fcc
MR
18963$ac_includes_default
18964#include <$ac_header>
18965_ACEOF
18966rm -f conftest.$ac_objext
18967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18968 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18969 ac_status=$?
35996d22
AS
18970 grep -v '^ *+' conftest.er1 >conftest.err
18971 rm -f conftest.er1
18972 cat conftest.err >&5
c0d27fcc
MR
18973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18974 (exit $ac_status); } &&
9adfabc2 18975 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18977 (eval $ac_try) 2>&5
18978 ac_status=$?
18979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18980 (exit $ac_status); }; } &&
18981 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18983 (eval $ac_try) 2>&5
18984 ac_status=$?
18985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18986 (exit $ac_status); }; }; then
18987 ac_header_compiler=yes
925c2f3f 18988else
c0d27fcc 18989 echo "$as_me: failed program was:" >&5
19650fd6
AS
18990sed 's/^/| /' conftest.$ac_ext >&5
18991
c0d27fcc
MR
18992ac_header_compiler=no
18993fi
35996d22 18994rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18995echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18996echo "${ECHO_T}$ac_header_compiler" >&6
18997
18998# Is the header present?
18999echo "$as_me:$LINENO: checking $ac_header presence" >&5
19000echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19001cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19002/* confdefs.h. */
19003_ACEOF
19004cat confdefs.h >>conftest.$ac_ext
19005cat >>conftest.$ac_ext <<_ACEOF
19006/* end confdefs.h. */
503d2be0
AS
19007#include <$ac_header>
19008_ACEOF
c0d27fcc 19009if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19010 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19011 ac_status=$?
6bae0ccf 19012 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19013 rm -f conftest.er1
19014 cat conftest.err >&5
c0d27fcc 19015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19016 (exit $ac_status); } >/dev/null; then
19017 if test -s conftest.err; then
19018 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19019 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19020 else
19021 ac_cpp_err=
19022 fi
19023else
19024 ac_cpp_err=yes
19025fi
19026if test -z "$ac_cpp_err"; then
c0d27fcc 19027 ac_header_preproc=yes
503d2be0
AS
19028else
19029 echo "$as_me: failed program was:" >&5
19650fd6
AS
19030sed 's/^/| /' conftest.$ac_ext >&5
19031
c0d27fcc 19032 ac_header_preproc=no
a21616bd 19033fi
503d2be0 19034rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19035echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19036echo "${ECHO_T}$ac_header_preproc" >&6
19037
19038# So? What about this header?
35996d22
AS
19039case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19040 yes:no: )
c0d27fcc
MR
19041 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19042echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19043 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19044echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19045 ac_header_preproc=yes
19650fd6 19046 ;;
35996d22 19047 no:yes:* )
c0d27fcc
MR
19048 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19049echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19050 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19051echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19052 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19053echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19054 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19055echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19056 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19057echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19058 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19059echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19060 (
19061 cat <<\_ASBOX
35996d22
AS
19062## ------------------------------------------ ##
19063## Report this to the AC_PACKAGE_NAME lists. ##
19064## ------------------------------------------ ##
19650fd6
AS
19065_ASBOX
19066 ) |
19067 sed "s/^/$as_me: WARNING: /" >&2
19068 ;;
c0d27fcc
MR
19069esac
19070echo "$as_me:$LINENO: checking for $ac_header" >&5
19071echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19072if eval "test \"\${$as_ac_Header+set}\" = set"; then
19073 echo $ECHO_N "(cached) $ECHO_C" >&6
19074else
35996d22 19075 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19076fi
c0d27fcc 19077echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19078echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19079
19080fi
503d2be0 19081if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19082 cat >>confdefs.h <<_ACEOF
503d2be0 19083#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19084_ACEOF
503d2be0 19085
a21616bd 19086else
503d2be0
AS
19087
19088for ac_header in kerberosIV/krb.h
a21616bd 19089do
503d2be0 19090as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19091if eval "test \"\${$as_ac_Header+set}\" = set"; then
19092 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19093echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19094if eval "test \"\${$as_ac_Header+set}\" = set"; then
19095 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19096fi
19097echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19098echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19099else
c0d27fcc
MR
19100 # Is the header compilable?
19101echo "$as_me:$LINENO: checking $ac_header usability" >&5
19102echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19103cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19104/* confdefs.h. */
19105_ACEOF
19106cat confdefs.h >>conftest.$ac_ext
19107cat >>conftest.$ac_ext <<_ACEOF
19108/* end confdefs.h. */
c0d27fcc
MR
19109$ac_includes_default
19110#include <$ac_header>
19111_ACEOF
19112rm -f conftest.$ac_objext
19113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19114 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19115 ac_status=$?
35996d22
AS
19116 grep -v '^ *+' conftest.er1 >conftest.err
19117 rm -f conftest.er1
19118 cat conftest.err >&5
c0d27fcc
MR
19119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19120 (exit $ac_status); } &&
9adfabc2 19121 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19123 (eval $ac_try) 2>&5
19124 ac_status=$?
19125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19126 (exit $ac_status); }; } &&
19127 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19129 (eval $ac_try) 2>&5
19130 ac_status=$?
19131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19132 (exit $ac_status); }; }; then
19133 ac_header_compiler=yes
19134else
19135 echo "$as_me: failed program was:" >&5
19650fd6
AS
19136sed 's/^/| /' conftest.$ac_ext >&5
19137
c0d27fcc
MR
19138ac_header_compiler=no
19139fi
35996d22 19140rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19141echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19142echo "${ECHO_T}$ac_header_compiler" >&6
19143
19144# Is the header present?
19145echo "$as_me:$LINENO: checking $ac_header presence" >&5
19146echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19147cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19148/* confdefs.h. */
19149_ACEOF
19150cat confdefs.h >>conftest.$ac_ext
19151cat >>conftest.$ac_ext <<_ACEOF
19152/* end confdefs.h. */
503d2be0
AS
19153#include <$ac_header>
19154_ACEOF
c0d27fcc 19155if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19156 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19157 ac_status=$?
6bae0ccf 19158 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19159 rm -f conftest.er1
19160 cat conftest.err >&5
c0d27fcc 19161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19162 (exit $ac_status); } >/dev/null; then
19163 if test -s conftest.err; then
19164 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19165 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19166 else
19167 ac_cpp_err=
19168 fi
19169else
19170 ac_cpp_err=yes
19171fi
19172if test -z "$ac_cpp_err"; then
c0d27fcc 19173 ac_header_preproc=yes
503d2be0
AS
19174else
19175 echo "$as_me: failed program was:" >&5
19650fd6
AS
19176sed 's/^/| /' conftest.$ac_ext >&5
19177
c0d27fcc 19178 ac_header_preproc=no
a21616bd 19179fi
503d2be0 19180rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19181echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19182echo "${ECHO_T}$ac_header_preproc" >&6
19183
19184# So? What about this header?
35996d22
AS
19185case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19186 yes:no: )
c0d27fcc
MR
19187 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19188echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19189 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19190echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19191 ac_header_preproc=yes
19650fd6 19192 ;;
35996d22 19193 no:yes:* )
c0d27fcc
MR
19194 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19195echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19196 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19197echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19198 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19199echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19200 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19201echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19202 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19203echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19204 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19205echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19206 (
19207 cat <<\_ASBOX
35996d22
AS
19208## ------------------------------------------ ##
19209## Report this to the AC_PACKAGE_NAME lists. ##
19210## ------------------------------------------ ##
19650fd6
AS
19211_ASBOX
19212 ) |
19213 sed "s/^/$as_me: WARNING: /" >&2
19214 ;;
c0d27fcc
MR
19215esac
19216echo "$as_me:$LINENO: checking for $ac_header" >&5
19217echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19218if eval "test \"\${$as_ac_Header+set}\" = set"; then
19219 echo $ECHO_N "(cached) $ECHO_C" >&6
19220else
35996d22 19221 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19222fi
c0d27fcc 19223echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19224echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19225
19226fi
503d2be0 19227if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19228 cat >>confdefs.h <<_ACEOF
503d2be0 19229#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19230_ACEOF
503d2be0 19231
a21616bd 19232else
503d2be0
AS
19233
19234for ac_header in kerberos/krb.h
a21616bd 19235do
503d2be0 19236as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19237if eval "test \"\${$as_ac_Header+set}\" = set"; then
19238 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19239echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19240if eval "test \"\${$as_ac_Header+set}\" = set"; then
19241 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19242fi
19243echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19244echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19245else
c0d27fcc
MR
19246 # Is the header compilable?
19247echo "$as_me:$LINENO: checking $ac_header usability" >&5
19248echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19249cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19250/* confdefs.h. */
19251_ACEOF
19252cat confdefs.h >>conftest.$ac_ext
19253cat >>conftest.$ac_ext <<_ACEOF
19254/* end confdefs.h. */
c0d27fcc
MR
19255$ac_includes_default
19256#include <$ac_header>
19257_ACEOF
19258rm -f conftest.$ac_objext
19259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19260 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19261 ac_status=$?
35996d22
AS
19262 grep -v '^ *+' conftest.er1 >conftest.err
19263 rm -f conftest.er1
19264 cat conftest.err >&5
c0d27fcc
MR
19265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19266 (exit $ac_status); } &&
9adfabc2 19267 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19269 (eval $ac_try) 2>&5
19270 ac_status=$?
19271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19272 (exit $ac_status); }; } &&
19273 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19275 (eval $ac_try) 2>&5
19276 ac_status=$?
19277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19278 (exit $ac_status); }; }; then
19279 ac_header_compiler=yes
19280else
19281 echo "$as_me: failed program was:" >&5
19650fd6
AS
19282sed 's/^/| /' conftest.$ac_ext >&5
19283
c0d27fcc
MR
19284ac_header_compiler=no
19285fi
35996d22 19286rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19287echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19288echo "${ECHO_T}$ac_header_compiler" >&6
19289
19290# Is the header present?
19291echo "$as_me:$LINENO: checking $ac_header presence" >&5
19292echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19293cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19294/* confdefs.h. */
19295_ACEOF
19296cat confdefs.h >>conftest.$ac_ext
19297cat >>conftest.$ac_ext <<_ACEOF
19298/* end confdefs.h. */
503d2be0
AS
19299#include <$ac_header>
19300_ACEOF
c0d27fcc 19301if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19302 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19303 ac_status=$?
6bae0ccf 19304 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19305 rm -f conftest.er1
19306 cat conftest.err >&5
c0d27fcc 19307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19308 (exit $ac_status); } >/dev/null; then
19309 if test -s conftest.err; then
19310 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19311 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19312 else
19313 ac_cpp_err=
19314 fi
19315else
19316 ac_cpp_err=yes
19317fi
19318if test -z "$ac_cpp_err"; then
c0d27fcc 19319 ac_header_preproc=yes
503d2be0
AS
19320else
19321 echo "$as_me: failed program was:" >&5
19650fd6
AS
19322sed 's/^/| /' conftest.$ac_ext >&5
19323
c0d27fcc 19324 ac_header_preproc=no
a21616bd 19325fi
503d2be0 19326rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19327echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19328echo "${ECHO_T}$ac_header_preproc" >&6
35996d22
AS
19329
19330# So? What about this header?
19331case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19332 yes:no: )
19333 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19334echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19335 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19336echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19337 ac_header_preproc=yes
19650fd6 19338 ;;
35996d22 19339 no:yes:* )
c0d27fcc
MR
19340 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19341echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19342 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19343echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19344 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19345echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19346 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19347echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19348 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19349echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19350 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19351echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19352 (
19353 cat <<\_ASBOX
35996d22
AS
19354## ------------------------------------------ ##
19355## Report this to the AC_PACKAGE_NAME lists. ##
19356## ------------------------------------------ ##
19650fd6
AS
19357_ASBOX
19358 ) |
19359 sed "s/^/$as_me: WARNING: /" >&2
19360 ;;
c0d27fcc
MR
19361esac
19362echo "$as_me:$LINENO: checking for $ac_header" >&5
19363echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19364if eval "test \"\${$as_ac_Header+set}\" = set"; then
19365 echo $ECHO_N "(cached) $ECHO_C" >&6
19366else
35996d22 19367 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19368fi
c0d27fcc 19369echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19370echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19371
19372fi
503d2be0 19373if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19374 cat >>confdefs.h <<_ACEOF
503d2be0 19375#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19376_ACEOF
503d2be0 19377
a21616bd 19378fi
c0d27fcc 19379
a21616bd
KR
19380done
19381
19382fi
c0d27fcc 19383
a21616bd
KR
19384done
19385
19386fi
c0d27fcc 19387
a21616bd
KR
19388done
19389
19390 fi
503d2be0
AS
19391
19392for ac_header in com_err.h
a21616bd 19393do
503d2be0 19394as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19395if eval "test \"\${$as_ac_Header+set}\" = set"; then
19396 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19397echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19398if eval "test \"\${$as_ac_Header+set}\" = set"; then
19399 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19400fi
19401echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19402echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19403else
c0d27fcc
MR
19404 # Is the header compilable?
19405echo "$as_me:$LINENO: checking $ac_header usability" >&5
19406echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19407cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19408/* confdefs.h. */
19409_ACEOF
19410cat confdefs.h >>conftest.$ac_ext
19411cat >>conftest.$ac_ext <<_ACEOF
19412/* end confdefs.h. */
c0d27fcc
MR
19413$ac_includes_default
19414#include <$ac_header>
19415_ACEOF
19416rm -f conftest.$ac_objext
19417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19418 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19419 ac_status=$?
35996d22
AS
19420 grep -v '^ *+' conftest.er1 >conftest.err
19421 rm -f conftest.er1
19422 cat conftest.err >&5
c0d27fcc
MR
19423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19424 (exit $ac_status); } &&
9adfabc2 19425 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19427 (eval $ac_try) 2>&5
19428 ac_status=$?
19429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19430 (exit $ac_status); }; } &&
19431 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19433 (eval $ac_try) 2>&5
19434 ac_status=$?
19435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19436 (exit $ac_status); }; }; then
19437 ac_header_compiler=yes
19438else
19439 echo "$as_me: failed program was:" >&5
19650fd6
AS
19440sed 's/^/| /' conftest.$ac_ext >&5
19441
c0d27fcc
MR
19442ac_header_compiler=no
19443fi
35996d22 19444rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19445echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19446echo "${ECHO_T}$ac_header_compiler" >&6
19447
19448# Is the header present?
19449echo "$as_me:$LINENO: checking $ac_header presence" >&5
19450echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19451cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19452/* confdefs.h. */
19453_ACEOF
19454cat confdefs.h >>conftest.$ac_ext
19455cat >>conftest.$ac_ext <<_ACEOF
19456/* end confdefs.h. */
503d2be0
AS
19457#include <$ac_header>
19458_ACEOF
c0d27fcc 19459if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19460 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19461 ac_status=$?
6bae0ccf 19462 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19463 rm -f conftest.er1
19464 cat conftest.err >&5
c0d27fcc 19465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19466 (exit $ac_status); } >/dev/null; then
19467 if test -s conftest.err; then
19468 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19469 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19470 else
19471 ac_cpp_err=
19472 fi
19473else
19474 ac_cpp_err=yes
19475fi
19476if test -z "$ac_cpp_err"; then
c0d27fcc 19477 ac_header_preproc=yes
503d2be0
AS
19478else
19479 echo "$as_me: failed program was:" >&5
19650fd6
AS
19480sed 's/^/| /' conftest.$ac_ext >&5
19481
c0d27fcc 19482 ac_header_preproc=no
a21616bd 19483fi
503d2be0 19484rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19485echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19486echo "${ECHO_T}$ac_header_preproc" >&6
19487
19488# So? What about this header?
35996d22
AS
19489case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19490 yes:no: )
c0d27fcc
MR
19491 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19492echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19493 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19494echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19495 ac_header_preproc=yes
19650fd6 19496 ;;
35996d22 19497 no:yes:* )
c0d27fcc
MR
19498 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19499echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19500 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19501echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19502 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19503echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19504 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19505echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19506 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19507echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19508 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19509echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19510 (
19511 cat <<\_ASBOX
35996d22
AS
19512## ------------------------------------------ ##
19513## Report this to the AC_PACKAGE_NAME lists. ##
19514## ------------------------------------------ ##
19650fd6
AS
19515_ASBOX
19516 ) |
19517 sed "s/^/$as_me: WARNING: /" >&2
19518 ;;
c0d27fcc
MR
19519esac
19520echo "$as_me:$LINENO: checking for $ac_header" >&5
19521echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19522if eval "test \"\${$as_ac_Header+set}\" = set"; then
19523 echo $ECHO_N "(cached) $ECHO_C" >&6
19524else
35996d22 19525 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19526fi
c0d27fcc 19527echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19528echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19529
19530fi
503d2be0 19531if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19532 cat >>confdefs.h <<_ACEOF
503d2be0 19533#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19534_ACEOF
503d2be0 19535
a21616bd 19536fi
c0d27fcc 19537
a21616bd
KR
19538done
19539
19540fi
19541
ba4481b5
DL
19542# Solaris requires -lintl if you want strerror (which calls dgettext)
19543# to return localized messages.
503d2be0 19544
c0d27fcc 19545echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
19546echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
19547if test "${ac_cv_lib_intl_dgettext+set}" = set; then
19548 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19549else
503d2be0 19550 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19551LIBS="-lintl $LIBS"
503d2be0 19552cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19553/* confdefs.h. */
19554_ACEOF
19555cat confdefs.h >>conftest.$ac_ext
19556cat >>conftest.$ac_ext <<_ACEOF
19557/* end confdefs.h. */
503d2be0 19558
ba4481b5 19559/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19560#ifdef __cplusplus
19561extern "C"
19562#endif
ba4481b5 19563/* We use char because int might match the return type of a gcc2
503d2be0
AS
19564 builtin and then its argument prototype would still apply. */
19565char dgettext ();
19566int
19567main ()
19568{
19569dgettext ();
19570 ;
19571 return 0;
19572}
19573_ACEOF
19574rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19575if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 19576 (eval $ac_link) 2>conftest.er1
503d2be0 19577 ac_status=$?
35996d22
AS
19578 grep -v '^ *+' conftest.er1 >conftest.err
19579 rm -f conftest.er1
19580 cat conftest.err >&5
c0d27fcc 19581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19582 (exit $ac_status); } &&
9adfabc2 19583 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19585 (eval $ac_try) 2>&5
19586 ac_status=$?
19587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19588 (exit $ac_status); }; } &&
19589 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19591 (eval $ac_try) 2>&5
19592 ac_status=$?
c0d27fcc 19593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19594 (exit $ac_status); }; }; then
19595 ac_cv_lib_intl_dgettext=yes
19596else
19597 echo "$as_me: failed program was:" >&5
19650fd6
AS
19598sed 's/^/| /' conftest.$ac_ext >&5
19599
503d2be0
AS
19600ac_cv_lib_intl_dgettext=no
19601fi
35996d22
AS
19602rm -f conftest.err conftest.$ac_objext \
19603 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19604LIBS=$ac_check_lib_save_LIBS
19605fi
c0d27fcc 19606echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
19607echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
19608if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 19609 cat >>confdefs.h <<_ACEOF
503d2be0 19610#define HAVE_LIBINTL 1
c0d27fcc 19611_ACEOF
ba4481b5
DL
19612
19613 LIBS="-lintl $LIBS"
19614
ba4481b5
DL
19615fi
19616
c0d27fcc
MR
19617
19618echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
19619echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
19620if test "${emacs_cv_localtime_cache+set}" = set; then
19621 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
19622else
19623 if test x$ac_cv_func_tzset = xyes; then
19624if test "$cross_compiling" = yes; then
19625 # If we have tzset, assume the worst when cross-compiling.
19626emacs_cv_localtime_cache=yes
19627else
503d2be0 19628 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19629/* confdefs.h. */
19630_ACEOF
19631cat confdefs.h >>conftest.$ac_ext
19632cat >>conftest.$ac_ext <<_ACEOF
19633/* end confdefs.h. */
ba4481b5 19634#include <time.h>
ba4481b5
DL
19635extern char **environ;
19636unset_TZ ()
19637{
19638 char **from, **to;
19639 for (to = from = environ; (*to = *from); from++)
19640 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
19641 to++;
19642}
19643char TZ_GMT0[] = "TZ=GMT0";
19644char TZ_PST8[] = "TZ=PST8";
19645main()
19646{
19647 time_t now = time ((time_t *) 0);
19648 int hour_GMT0, hour_unset;
19649 if (putenv (TZ_GMT0) != 0)
19650 exit (1);
19651 hour_GMT0 = localtime (&now)->tm_hour;
19652 unset_TZ ();
19653 hour_unset = localtime (&now)->tm_hour;
19654 if (putenv (TZ_PST8) != 0)
19655 exit (1);
19656 if (localtime (&now)->tm_hour == hour_GMT0)
19657 exit (1);
19658 unset_TZ ();
19659 if (localtime (&now)->tm_hour != hour_unset)
19660 exit (1);
19661 exit (0);
19662}
503d2be0
AS
19663_ACEOF
19664rm -f conftest$ac_exeext
c0d27fcc 19665if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
19666 (eval $ac_link) 2>&5
19667 ac_status=$?
c0d27fcc 19668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19669 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 19670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19671 (eval $ac_try) 2>&5
19672 ac_status=$?
c0d27fcc 19673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19674 (exit $ac_status); }; }; then
ba4481b5
DL
19675 emacs_cv_localtime_cache=no
19676else
503d2be0
AS
19677 echo "$as_me: program exited with status $ac_status" >&5
19678echo "$as_me: failed program was:" >&5
19650fd6
AS
19679sed 's/^/| /' conftest.$ac_ext >&5
19680
c0d27fcc 19681( exit $ac_status )
503d2be0 19682emacs_cv_localtime_cache=yes
ba4481b5 19683fi
35996d22 19684rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 19685fi
ba4481b5
DL
19686else
19687 # If we lack tzset, report that localtime does not cache TZ,
19688 # since we can't invalidate the cache if we don't have tzset.
19689 emacs_cv_localtime_cache=no
19690fi
19691fi
c0d27fcc 19692echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 19693echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 19694if test $emacs_cv_localtime_cache = yes; then
b936fae4 19695
c0d27fcc 19696cat >>confdefs.h <<\_ACEOF
ba4481b5 19697#define LOCALTIME_CACHE 1
c0d27fcc 19698_ACEOF
ba4481b5
DL
19699
19700fi
19701
19702if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
19703
19704for ac_func in gettimeofday
48d4b120 19705do
503d2be0 19706as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 19707echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
19708echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19709if eval "test \"\${$as_ac_var+set}\" = set"; then
19710 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 19711else
503d2be0 19712 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19713/* confdefs.h. */
19714_ACEOF
19715cat confdefs.h >>conftest.$ac_ext
19716cat >>conftest.$ac_ext <<_ACEOF
19717/* end confdefs.h. */
35996d22
AS
19718/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19719 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19720#define $ac_func innocuous_$ac_func
19721
48d4b120 19722/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19723 which can conflict with char $ac_func (); below.
19724 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19725 <limits.h> exists even on freestanding compilers. */
35996d22 19726
19650fd6
AS
19727#ifdef __STDC__
19728# include <limits.h>
19729#else
19730# include <assert.h>
19731#endif
35996d22
AS
19732
19733#undef $ac_func
19734
48d4b120 19735/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19736#ifdef __cplusplus
19737extern "C"
19650fd6 19738{
503d2be0 19739#endif
48d4b120 19740/* We use char because int might match the return type of a gcc2
503d2be0
AS
19741 builtin and then its argument prototype would still apply. */
19742char $ac_func ();
48d4b120
DL
19743/* The GNU C library defines this for functions which it implements
19744 to always fail with ENOSYS. Some functions are actually named
19745 something starting with __ and the normal name is an alias. */
19746#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19747choke me
19748#else
19650fd6
AS
19749char (*f) () = $ac_func;
19750#endif
19751#ifdef __cplusplus
19752}
cd958eb3
MB
19753#endif
19754
19650fd6
AS
19755int
19756main ()
19757{
19758return f != $ac_func;
503d2be0
AS
19759 ;
19760 return 0;
19761}
19762_ACEOF
19763rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19764if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 19765 (eval $ac_link) 2>conftest.er1
503d2be0 19766 ac_status=$?
35996d22
AS
19767 grep -v '^ *+' conftest.er1 >conftest.err
19768 rm -f conftest.er1
19769 cat conftest.err >&5
c0d27fcc 19770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19771 (exit $ac_status); } &&
9adfabc2 19772 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19774 (eval $ac_try) 2>&5
19775 ac_status=$?
19776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19777 (exit $ac_status); }; } &&
19778 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19780 (eval $ac_try) 2>&5
19781 ac_status=$?
c0d27fcc 19782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19783 (exit $ac_status); }; }; then
19784 eval "$as_ac_var=yes"
19785else
19786 echo "$as_me: failed program was:" >&5
19650fd6
AS
19787sed 's/^/| /' conftest.$ac_ext >&5
19788
503d2be0
AS
19789eval "$as_ac_var=no"
19790fi
35996d22
AS
19791rm -f conftest.err conftest.$ac_objext \
19792 conftest$ac_exeext conftest.$ac_ext
503d2be0 19793fi
c0d27fcc 19794echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
19795echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19796if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19797 cat >>confdefs.h <<_ACEOF
503d2be0 19798#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19799_ACEOF
48d4b120 19800
48d4b120
DL
19801fi
19802done
19803
b936fae4 19804 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 19805 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
19806echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
19807if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
19808 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19809else
503d2be0 19810 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19811/* confdefs.h. */
19812_ACEOF
19813cat confdefs.h >>conftest.$ac_ext
19814cat >>conftest.$ac_ext <<_ACEOF
19815/* end confdefs.h. */
ba4481b5 19816
a3f08d9e
DL
19817#ifdef TIME_WITH_SYS_TIME
19818#include <sys/time.h>
19819#include <time.h>
19820#else
19821#ifdef HAVE_SYS_TIME_H
19822#include <sys/time.h>
19823#else
19824#include <time.h>
19825#endif
19826#endif
503d2be0
AS
19827int
19828main ()
19829{
a3f08d9e 19830struct timeval time;
b936fae4 19831 gettimeofday (&time, 0);
503d2be0
AS
19832 ;
19833 return 0;
19834}
19835_ACEOF
19836rm -f conftest.$ac_objext
c0d27fcc 19837if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19838 (eval $ac_compile) 2>conftest.er1
503d2be0 19839 ac_status=$?
35996d22
AS
19840 grep -v '^ *+' conftest.er1 >conftest.err
19841 rm -f conftest.er1
19842 cat conftest.err >&5
c0d27fcc 19843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19844 (exit $ac_status); } &&
9adfabc2 19845 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19847 (eval $ac_try) 2>&5
19848 ac_status=$?
19849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19850 (exit $ac_status); }; } &&
19851 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 19852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19853 (eval $ac_try) 2>&5
19854 ac_status=$?
c0d27fcc 19855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19856 (exit $ac_status); }; }; then
ba4481b5
DL
19857 emacs_cv_gettimeofday_two_arguments=yes
19858else
503d2be0 19859 echo "$as_me: failed program was:" >&5
19650fd6
AS
19860sed 's/^/| /' conftest.$ac_ext >&5
19861
503d2be0 19862emacs_cv_gettimeofday_two_arguments=no
ba4481b5 19863fi
35996d22 19864rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 19865fi
c0d27fcc 19866echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 19867echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
19868 if test $emacs_cv_gettimeofday_two_arguments = no; then
19869
c0d27fcc 19870cat >>confdefs.h <<\_ACEOF
ba4481b5 19871#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 19872_ACEOF
ba4481b5 19873
b936fae4 19874 fi
ba4481b5
DL
19875 fi
19876fi
19877
973a76b1
DL
19878# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
19879echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19880echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
19881if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19882 echo $ECHO_N "(cached) $ECHO_C" >&6
19883else
19884 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19885/* confdefs.h. */
19886_ACEOF
19887cat confdefs.h >>conftest.$ac_ext
19888cat >>conftest.$ac_ext <<_ACEOF
19889/* end confdefs.h. */
973a76b1
DL
19890#include <sys/types.h>
19891#include <$ac_cv_struct_tm>
19892
19893
19894int
19895main ()
19896{
19897static struct tm ac_aggr;
19898if (ac_aggr.tm_zone)
19899return 0;
19900 ;
19901 return 0;
19902}
19903_ACEOF
19904rm -f conftest.$ac_objext
19905if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19906 (eval $ac_compile) 2>conftest.er1
973a76b1 19907 ac_status=$?
35996d22
AS
19908 grep -v '^ *+' conftest.er1 >conftest.err
19909 rm -f conftest.er1
19910 cat conftest.err >&5
973a76b1
DL
19911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19912 (exit $ac_status); } &&
9adfabc2 19913 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19915 (eval $ac_try) 2>&5
19916 ac_status=$?
19917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19918 (exit $ac_status); }; } &&
19919 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
19920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19921 (eval $ac_try) 2>&5
19922 ac_status=$?
19923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19924 (exit $ac_status); }; }; then
19925 ac_cv_member_struct_tm_tm_zone=yes
19926else
19927 echo "$as_me: failed program was:" >&5
19650fd6
AS
19928sed 's/^/| /' conftest.$ac_ext >&5
19929
973a76b1 19930cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19931/* confdefs.h. */
19932_ACEOF
19933cat confdefs.h >>conftest.$ac_ext
19934cat >>conftest.$ac_ext <<_ACEOF
19935/* end confdefs.h. */
973a76b1
DL
19936#include <sys/types.h>
19937#include <$ac_cv_struct_tm>
19938
19939
19940int
19941main ()
19942{
19943static struct tm ac_aggr;
19944if (sizeof ac_aggr.tm_zone)
19945return 0;
19946 ;
19947 return 0;
19948}
19949_ACEOF
19950rm -f conftest.$ac_objext
19951if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19952 (eval $ac_compile) 2>conftest.er1
973a76b1 19953 ac_status=$?
35996d22
AS
19954 grep -v '^ *+' conftest.er1 >conftest.err
19955 rm -f conftest.er1
19956 cat conftest.err >&5
973a76b1
DL
19957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19958 (exit $ac_status); } &&
9adfabc2 19959 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19961 (eval $ac_try) 2>&5
19962 ac_status=$?
19963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19964 (exit $ac_status); }; } &&
19965 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
19966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19967 (eval $ac_try) 2>&5
19968 ac_status=$?
19969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19970 (exit $ac_status); }; }; then
19971 ac_cv_member_struct_tm_tm_zone=yes
19972else
19973 echo "$as_me: failed program was:" >&5
19650fd6
AS
19974sed 's/^/| /' conftest.$ac_ext >&5
19975
973a76b1
DL
19976ac_cv_member_struct_tm_tm_zone=no
19977fi
35996d22 19978rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 19979fi
35996d22 19980rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
19981fi
19982echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19983echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
19984if test $ac_cv_member_struct_tm_tm_zone = yes; then
19985
19986cat >>confdefs.h <<_ACEOF
19987#define HAVE_STRUCT_TM_TM_ZONE 1
19988_ACEOF
19989
19990
19991fi
19992
19993if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19994
19995cat >>confdefs.h <<\_ACEOF
19996#define HAVE_TM_ZONE 1
19997_ACEOF
19998
19999else
20000 echo "$as_me:$LINENO: checking for tzname" >&5
20001echo $ECHO_N "checking for tzname... $ECHO_C" >&6
20002if test "${ac_cv_var_tzname+set}" = set; then
20003 echo $ECHO_N "(cached) $ECHO_C" >&6
20004else
20005 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20006/* confdefs.h. */
20007_ACEOF
20008cat confdefs.h >>conftest.$ac_ext
20009cat >>conftest.$ac_ext <<_ACEOF
20010/* end confdefs.h. */
973a76b1
DL
20011#include <time.h>
20012#ifndef tzname /* For SGI. */
20013extern char *tzname[]; /* RS6000 and others reject char **tzname. */
20014#endif
20015
20016int
20017main ()
20018{
20019atoi(*tzname);
20020 ;
20021 return 0;
20022}
20023_ACEOF
20024rm -f conftest.$ac_objext conftest$ac_exeext
20025if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 20026 (eval $ac_link) 2>conftest.er1
973a76b1 20027 ac_status=$?
35996d22
AS
20028 grep -v '^ *+' conftest.er1 >conftest.err
20029 rm -f conftest.er1
20030 cat conftest.err >&5
973a76b1
DL
20031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20032 (exit $ac_status); } &&
9adfabc2 20033 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20035 (eval $ac_try) 2>&5
20036 ac_status=$?
20037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20038 (exit $ac_status); }; } &&
20039 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
20040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20041 (eval $ac_try) 2>&5
20042 ac_status=$?
20043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20044 (exit $ac_status); }; }; then
20045 ac_cv_var_tzname=yes
20046else
20047 echo "$as_me: failed program was:" >&5
19650fd6
AS
20048sed 's/^/| /' conftest.$ac_ext >&5
20049
973a76b1
DL
20050ac_cv_var_tzname=no
20051fi
35996d22
AS
20052rm -f conftest.err conftest.$ac_objext \
20053 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
20054fi
20055echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20056echo "${ECHO_T}$ac_cv_var_tzname" >&6
20057 if test $ac_cv_var_tzname = yes; then
20058
20059cat >>confdefs.h <<\_ACEOF
20060#define HAVE_TZNAME 1
20061_ACEOF
20062
20063 fi
20064fi
20065
20066
48d4b120 20067if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 20068 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
20069echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
20070if test "${emacs_cv_struct_timezone+set}" = set; then
20071 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 20072else
503d2be0 20073 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20074/* confdefs.h. */
20075_ACEOF
20076cat confdefs.h >>conftest.$ac_ext
20077cat >>conftest.$ac_ext <<_ACEOF
20078/* end confdefs.h. */
48d4b120 20079#include <sys/time.h>
503d2be0
AS
20080int
20081main ()
20082{
48d4b120 20083struct timezone tz;
503d2be0
AS
20084 ;
20085 return 0;
20086}
20087_ACEOF
20088rm -f conftest.$ac_objext
c0d27fcc 20089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20090 (eval $ac_compile) 2>conftest.er1
503d2be0 20091 ac_status=$?
35996d22
AS
20092 grep -v '^ *+' conftest.er1 >conftest.err
20093 rm -f conftest.er1
20094 cat conftest.err >&5
c0d27fcc 20095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20096 (exit $ac_status); } &&
9adfabc2 20097 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20099 (eval $ac_try) 2>&5
20100 ac_status=$?
20101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20102 (exit $ac_status); }; } &&
20103 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20105 (eval $ac_try) 2>&5
20106 ac_status=$?
c0d27fcc 20107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20108 (exit $ac_status); }; }; then
48d4b120
DL
20109 if test "$cross_compiling" = yes; then
20110 emacs_cv_struct_timezone=yes
20111else
503d2be0 20112 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20113/* confdefs.h. */
20114_ACEOF
20115cat confdefs.h >>conftest.$ac_ext
20116cat >>conftest.$ac_ext <<_ACEOF
20117/* end confdefs.h. */
48d4b120
DL
20118
20119#ifdef TIME_WITH_SYS_TIME
20120#include <sys/time.h>
20121#include <time.h>
20122#else
20123#ifdef HAVE_SYS_TIME_H
20124#include <sys/time.h>
20125#else
20126#include <time.h>
20127#endif
20128#endif
20129main () {
20130 struct timeval time;
20131 struct timezone dummy;
20132 exit (gettimeofday (&time, &dummy));
20133}
503d2be0
AS
20134_ACEOF
20135rm -f conftest$ac_exeext
c0d27fcc 20136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
20137 (eval $ac_link) 2>&5
20138 ac_status=$?
c0d27fcc 20139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20140 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 20141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20142 (eval $ac_try) 2>&5
20143 ac_status=$?
c0d27fcc 20144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20145 (exit $ac_status); }; }; then
48d4b120
DL
20146 emacs_cv_struct_timezone=yes
20147else
503d2be0
AS
20148 echo "$as_me: program exited with status $ac_status" >&5
20149echo "$as_me: failed program was:" >&5
19650fd6
AS
20150sed 's/^/| /' conftest.$ac_ext >&5
20151
c0d27fcc 20152( exit $ac_status )
503d2be0 20153emacs_cv_struct_timezone=no
48d4b120 20154fi
35996d22 20155rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 20156fi
48d4b120 20157else
503d2be0 20158 echo "$as_me: failed program was:" >&5
19650fd6
AS
20159sed 's/^/| /' conftest.$ac_ext >&5
20160
503d2be0 20161emacs_cv_struct_timezone=no
48d4b120 20162fi
35996d22 20163rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
48d4b120 20164fi
c0d27fcc 20165echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 20166echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
20167fi
20168
ba4481b5 20169ok_so_far=yes
c0d27fcc 20170echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
20171echo $ECHO_N "checking for socket... $ECHO_C" >&6
20172if test "${ac_cv_func_socket+set}" = set; then
20173 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20174else
503d2be0 20175 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20176/* confdefs.h. */
20177_ACEOF
20178cat confdefs.h >>conftest.$ac_ext
20179cat >>conftest.$ac_ext <<_ACEOF
20180/* end confdefs.h. */
35996d22
AS
20181/* Define socket to an innocuous variant, in case <limits.h> declares socket.
20182 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20183#define socket innocuous_socket
20184
ba4481b5 20185/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20186 which can conflict with char socket (); below.
20187 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20188 <limits.h> exists even on freestanding compilers. */
35996d22 20189
19650fd6
AS
20190#ifdef __STDC__
20191# include <limits.h>
20192#else
20193# include <assert.h>
20194#endif
35996d22
AS
20195
20196#undef socket
20197
ba4481b5 20198/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20199#ifdef __cplusplus
20200extern "C"
19650fd6 20201{
503d2be0 20202#endif
ba4481b5 20203/* We use char because int might match the return type of a gcc2
503d2be0
AS
20204 builtin and then its argument prototype would still apply. */
20205char socket ();
ba4481b5
DL
20206/* The GNU C library defines this for functions which it implements
20207 to always fail with ENOSYS. Some functions are actually named
20208 something starting with __ and the normal name is an alias. */
20209#if defined (__stub_socket) || defined (__stub___socket)
20210choke me
20211#else
19650fd6
AS
20212char (*f) () = socket;
20213#endif
20214#ifdef __cplusplus
20215}
cd958eb3
MB
20216#endif
20217
19650fd6
AS
20218int
20219main ()
20220{
20221return f != socket;
503d2be0
AS
20222 ;
20223 return 0;
20224}
20225_ACEOF
20226rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20227if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 20228 (eval $ac_link) 2>conftest.er1
503d2be0 20229 ac_status=$?
35996d22
AS
20230 grep -v '^ *+' conftest.er1 >conftest.err
20231 rm -f conftest.er1
20232 cat conftest.err >&5
c0d27fcc 20233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20234 (exit $ac_status); } &&
9adfabc2 20235 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20237 (eval $ac_try) 2>&5
20238 ac_status=$?
20239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20240 (exit $ac_status); }; } &&
20241 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20243 (eval $ac_try) 2>&5
20244 ac_status=$?
c0d27fcc 20245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20246 (exit $ac_status); }; }; then
20247 ac_cv_func_socket=yes
20248else
20249 echo "$as_me: failed program was:" >&5
19650fd6
AS
20250sed 's/^/| /' conftest.$ac_ext >&5
20251
503d2be0
AS
20252ac_cv_func_socket=no
20253fi
35996d22
AS
20254rm -f conftest.err conftest.$ac_objext \
20255 conftest$ac_exeext conftest.$ac_ext
503d2be0 20256fi
c0d27fcc 20257echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
20258echo "${ECHO_T}$ac_cv_func_socket" >&6
20259if test $ac_cv_func_socket = yes; then
ba4481b5
DL
20260 :
20261else
503d2be0 20262 ok_so_far=no
ba4481b5
DL
20263fi
20264
20265if test $ok_so_far = yes; then
c0d27fcc
MR
20266 if test "${ac_cv_header_netinet_in_h+set}" = set; then
20267 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
20268echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
20269if test "${ac_cv_header_netinet_in_h+set}" = set; then
20270 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20271fi
20272echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
20273echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 20274else
c0d27fcc
MR
20275 # Is the header compilable?
20276echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
20277echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
20278cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20279/* confdefs.h. */
20280_ACEOF
20281cat confdefs.h >>conftest.$ac_ext
20282cat >>conftest.$ac_ext <<_ACEOF
20283/* end confdefs.h. */
c0d27fcc
MR
20284$ac_includes_default
20285#include <netinet/in.h>
20286_ACEOF
20287rm -f conftest.$ac_objext
20288if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20289 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20290 ac_status=$?
35996d22
AS
20291 grep -v '^ *+' conftest.er1 >conftest.err
20292 rm -f conftest.er1
20293 cat conftest.err >&5
c0d27fcc
MR
20294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20295 (exit $ac_status); } &&
9adfabc2 20296 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20298 (eval $ac_try) 2>&5
20299 ac_status=$?
20300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20301 (exit $ac_status); }; } &&
20302 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20304 (eval $ac_try) 2>&5
20305 ac_status=$?
20306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20307 (exit $ac_status); }; }; then
20308 ac_header_compiler=yes
20309else
20310 echo "$as_me: failed program was:" >&5
19650fd6
AS
20311sed 's/^/| /' conftest.$ac_ext >&5
20312
c0d27fcc
MR
20313ac_header_compiler=no
20314fi
35996d22 20315rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20316echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20317echo "${ECHO_T}$ac_header_compiler" >&6
20318
20319# Is the header present?
20320echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
20321echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
20322cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20323/* confdefs.h. */
20324_ACEOF
20325cat confdefs.h >>conftest.$ac_ext
20326cat >>conftest.$ac_ext <<_ACEOF
20327/* end confdefs.h. */
ba4481b5 20328#include <netinet/in.h>
503d2be0 20329_ACEOF
c0d27fcc 20330if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20331 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20332 ac_status=$?
6bae0ccf 20333 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20334 rm -f conftest.er1
20335 cat conftest.err >&5
c0d27fcc 20336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20337 (exit $ac_status); } >/dev/null; then
20338 if test -s conftest.err; then
20339 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20340 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20341 else
20342 ac_cpp_err=
20343 fi
20344else
20345 ac_cpp_err=yes
20346fi
20347if test -z "$ac_cpp_err"; then
c0d27fcc 20348 ac_header_preproc=yes
ba4481b5 20349else
503d2be0 20350 echo "$as_me: failed program was:" >&5
19650fd6
AS
20351sed 's/^/| /' conftest.$ac_ext >&5
20352
c0d27fcc 20353 ac_header_preproc=no
ba4481b5 20354fi
503d2be0 20355rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20356echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20357echo "${ECHO_T}$ac_header_preproc" >&6
20358
20359# So? What about this header?
35996d22
AS
20360case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20361 yes:no: )
c0d27fcc
MR
20362 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
20363echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20364 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
20365echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
20366 ac_header_preproc=yes
19650fd6 20367 ;;
35996d22 20368 no:yes:* )
c0d27fcc
MR
20369 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
20370echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
35996d22
AS
20371 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
20372echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
20373 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
20374echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
20375 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
20376echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20377 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 20378echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20379 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
20380echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20381 (
20382 cat <<\_ASBOX
35996d22
AS
20383## ------------------------------------------ ##
20384## Report this to the AC_PACKAGE_NAME lists. ##
20385## ------------------------------------------ ##
19650fd6
AS
20386_ASBOX
20387 ) |
20388 sed "s/^/$as_me: WARNING: /" >&2
20389 ;;
c0d27fcc
MR
20390esac
20391echo "$as_me:$LINENO: checking for netinet/in.h" >&5
20392echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
20393if test "${ac_cv_header_netinet_in_h+set}" = set; then
20394 echo $ECHO_N "(cached) $ECHO_C" >&6
20395else
20396 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 20397fi
c0d27fcc 20398echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 20399echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
20400
20401fi
503d2be0 20402if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
20403 :
20404else
503d2be0 20405 ok_so_far=no
ba4481b5
DL
20406fi
20407
c0d27fcc 20408
ba4481b5
DL
20409fi
20410if test $ok_so_far = yes; then
c0d27fcc
MR
20411 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20412 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
20413echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
20414if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20415 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20416fi
20417echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
20418echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 20419else
c0d27fcc
MR
20420 # Is the header compilable?
20421echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
20422echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
20423cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20424/* confdefs.h. */
20425_ACEOF
20426cat confdefs.h >>conftest.$ac_ext
20427cat >>conftest.$ac_ext <<_ACEOF
20428/* end confdefs.h. */
c0d27fcc
MR
20429$ac_includes_default
20430#include <arpa/inet.h>
20431_ACEOF
20432rm -f conftest.$ac_objext
20433if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20434 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20435 ac_status=$?
35996d22
AS
20436 grep -v '^ *+' conftest.er1 >conftest.err
20437 rm -f conftest.er1
20438 cat conftest.err >&5
c0d27fcc
MR
20439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20440 (exit $ac_status); } &&
9adfabc2 20441 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20443 (eval $ac_try) 2>&5
20444 ac_status=$?
20445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20446 (exit $ac_status); }; } &&
20447 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20449 (eval $ac_try) 2>&5
20450 ac_status=$?
20451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20452 (exit $ac_status); }; }; then
20453 ac_header_compiler=yes
20454else
20455 echo "$as_me: failed program was:" >&5
19650fd6
AS
20456sed 's/^/| /' conftest.$ac_ext >&5
20457
c0d27fcc
MR
20458ac_header_compiler=no
20459fi
35996d22 20460rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20461echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20462echo "${ECHO_T}$ac_header_compiler" >&6
20463
20464# Is the header present?
20465echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
20466echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
20467cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20468/* confdefs.h. */
20469_ACEOF
20470cat confdefs.h >>conftest.$ac_ext
20471cat >>conftest.$ac_ext <<_ACEOF
20472/* end confdefs.h. */
ba4481b5 20473#include <arpa/inet.h>
503d2be0 20474_ACEOF
c0d27fcc 20475if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20476 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20477 ac_status=$?
6bae0ccf 20478 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20479 rm -f conftest.er1
20480 cat conftest.err >&5
c0d27fcc 20481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20482 (exit $ac_status); } >/dev/null; then
20483 if test -s conftest.err; then
20484 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20485 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20486 else
20487 ac_cpp_err=
20488 fi
20489else
20490 ac_cpp_err=yes
20491fi
20492if test -z "$ac_cpp_err"; then
c0d27fcc 20493 ac_header_preproc=yes
ba4481b5 20494else
503d2be0 20495 echo "$as_me: failed program was:" >&5
19650fd6
AS
20496sed 's/^/| /' conftest.$ac_ext >&5
20497
c0d27fcc 20498 ac_header_preproc=no
ba4481b5 20499fi
503d2be0 20500rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20501echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20502echo "${ECHO_T}$ac_header_preproc" >&6
20503
20504# So? What about this header?
35996d22
AS
20505case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20506 yes:no: )
c0d27fcc
MR
20507 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
20508echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20509 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
20510echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
20511 ac_header_preproc=yes
19650fd6 20512 ;;
35996d22 20513 no:yes:* )
c0d27fcc
MR
20514 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
20515echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
35996d22
AS
20516 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
20517echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
20518 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
20519echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
20520 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
20521echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20522 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 20523echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20524 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
20525echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20526 (
20527 cat <<\_ASBOX
35996d22
AS
20528## ------------------------------------------ ##
20529## Report this to the AC_PACKAGE_NAME lists. ##
20530## ------------------------------------------ ##
19650fd6
AS
20531_ASBOX
20532 ) |
20533 sed "s/^/$as_me: WARNING: /" >&2
20534 ;;
c0d27fcc
MR
20535esac
20536echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
20537echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
20538if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20539 echo $ECHO_N "(cached) $ECHO_C" >&6
20540else
20541 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 20542fi
c0d27fcc 20543echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 20544echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
20545
20546fi
503d2be0 20547if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
20548 :
20549else
503d2be0 20550 ok_so_far=no
ba4481b5
DL
20551fi
20552
c0d27fcc 20553
ba4481b5
DL
20554fi
20555if test $ok_so_far = yes; then
b936fae4 20556
c0d27fcc 20557cat >>confdefs.h <<\_ACEOF
ba4481b5 20558#define HAVE_INET_SOCKETS 1
c0d27fcc 20559_ACEOF
ba4481b5
DL
20560
20561fi
20562
2d2b6695 20563
7862d3a8 20564for ac_header in sys/ioctl.h
2d2b6695
KS
20565do
20566as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20567if eval "test \"\${$as_ac_Header+set}\" = set"; then
20568 echo "$as_me:$LINENO: checking for $ac_header" >&5
20569echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20570if eval "test \"\${$as_ac_Header+set}\" = set"; then
20571 echo $ECHO_N "(cached) $ECHO_C" >&6
20572fi
20573echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20574echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20575else
20576 # Is the header compilable?
20577echo "$as_me:$LINENO: checking $ac_header usability" >&5
20578echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20579cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
20580/* confdefs.h. */
20581_ACEOF
20582cat confdefs.h >>conftest.$ac_ext
20583cat >>conftest.$ac_ext <<_ACEOF
20584/* end confdefs.h. */
20585$ac_includes_default
20586#include <$ac_header>
20587_ACEOF
20588rm -f conftest.$ac_objext
20589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20590 (eval $ac_compile) 2>conftest.er1
2d2b6695 20591 ac_status=$?
35996d22
AS
20592 grep -v '^ *+' conftest.er1 >conftest.err
20593 rm -f conftest.er1
20594 cat conftest.err >&5
2d2b6695
KS
20595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20596 (exit $ac_status); } &&
9adfabc2 20597 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20599 (eval $ac_try) 2>&5
20600 ac_status=$?
20601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20602 (exit $ac_status); }; } &&
20603 { ac_try='test -s conftest.$ac_objext'
2d2b6695
KS
20604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20605 (eval $ac_try) 2>&5
20606 ac_status=$?
20607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20608 (exit $ac_status); }; }; then
20609 ac_header_compiler=yes
20610else
20611 echo "$as_me: failed program was:" >&5
20612sed 's/^/| /' conftest.$ac_ext >&5
20613
20614ac_header_compiler=no
20615fi
35996d22 20616rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2d2b6695
KS
20617echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20618echo "${ECHO_T}$ac_header_compiler" >&6
20619
20620# Is the header present?
20621echo "$as_me:$LINENO: checking $ac_header presence" >&5
20622echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20623cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
20624/* confdefs.h. */
20625_ACEOF
20626cat confdefs.h >>conftest.$ac_ext
20627cat >>conftest.$ac_ext <<_ACEOF
20628/* end confdefs.h. */
20629#include <$ac_header>
20630_ACEOF
20631if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20632 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20633 ac_status=$?
20634 grep -v '^ *+' conftest.er1 >conftest.err
20635 rm -f conftest.er1
20636 cat conftest.err >&5
20637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20638 (exit $ac_status); } >/dev/null; then
20639 if test -s conftest.err; then
20640 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20641 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2d2b6695
KS
20642 else
20643 ac_cpp_err=
20644 fi
20645else
20646 ac_cpp_err=yes
20647fi
20648if test -z "$ac_cpp_err"; then
20649 ac_header_preproc=yes
20650else
20651 echo "$as_me: failed program was:" >&5
20652sed 's/^/| /' conftest.$ac_ext >&5
20653
20654 ac_header_preproc=no
20655fi
20656rm -f conftest.err conftest.$ac_ext
20657echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20658echo "${ECHO_T}$ac_header_preproc" >&6
20659
20660# So? What about this header?
35996d22
AS
20661case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20662 yes:no: )
2d2b6695
KS
20663 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20664echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20665 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20666echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20667 ac_header_preproc=yes
2d2b6695 20668 ;;
35996d22 20669 no:yes:* )
2d2b6695
KS
20670 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20671echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
20672 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20673echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20674 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20675echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20676 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20677echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
20678 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20679echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20680 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20681echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
2d2b6695
KS
20682 (
20683 cat <<\_ASBOX
35996d22
AS
20684## ------------------------------------------ ##
20685## Report this to the AC_PACKAGE_NAME lists. ##
20686## ------------------------------------------ ##
2d2b6695
KS
20687_ASBOX
20688 ) |
20689 sed "s/^/$as_me: WARNING: /" >&2
20690 ;;
20691esac
20692echo "$as_me:$LINENO: checking for $ac_header" >&5
20693echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20694if eval "test \"\${$as_ac_Header+set}\" = set"; then
20695 echo $ECHO_N "(cached) $ECHO_C" >&6
20696else
35996d22 20697 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695
KS
20698fi
20699echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20700echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20701
20702fi
20703if test `eval echo '${'$as_ac_Header'}'` = yes; then
20704 cat >>confdefs.h <<_ACEOF
20705#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20706_ACEOF
20707
20708fi
20709
20710done
20711
20712
ba4481b5 20713if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 20714
c0d27fcc 20715cat >>confdefs.h <<\_ACEOF
ba4481b5 20716#define HAVE_AIX_SMT_EXP 1
c0d27fcc 20717_ACEOF
ba4481b5
DL
20718
20719fi
20720
c0d27fcc 20721echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 20722echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 20723if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 20724 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 20725echo "${ECHO_T}yes" >&6
b936fae4 20726
c0d27fcc 20727cat >>confdefs.h <<\_ACEOF
3d9fec71 20728#define HAVE_DEV_PTMX 1
c0d27fcc 20729_ACEOF
3d9fec71
DL
20730
20731else
c0d27fcc 20732 echo "$as_me:$LINENO: result: no" >&5
503d2be0 20733echo "${ECHO_T}no" >&6
3d9fec71
DL
20734fi
20735
c0d27fcc 20736echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
20737echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
20738if test "${ac_cv_type_pid_t+set}" = set; then
20739 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 20740else
503d2be0 20741 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20742/* confdefs.h. */
20743_ACEOF
20744cat confdefs.h >>conftest.$ac_ext
20745cat >>conftest.$ac_ext <<_ACEOF
20746/* end confdefs.h. */
503d2be0
AS
20747$ac_includes_default
20748int
20749main ()
20750{
20751if ((pid_t *) 0)
20752 return 0;
20753if (sizeof (pid_t))
20754 return 0;
20755 ;
20756 return 0;
20757}
20758_ACEOF
20759rm -f conftest.$ac_objext
c0d27fcc 20760if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20761 (eval $ac_compile) 2>conftest.er1
503d2be0 20762 ac_status=$?
35996d22
AS
20763 grep -v '^ *+' conftest.er1 >conftest.err
20764 rm -f conftest.er1
20765 cat conftest.err >&5
c0d27fcc 20766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20767 (exit $ac_status); } &&
9adfabc2 20768 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20770 (eval $ac_try) 2>&5
20771 ac_status=$?
20772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20773 (exit $ac_status); }; } &&
20774 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20776 (eval $ac_try) 2>&5
20777 ac_status=$?
c0d27fcc 20778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20779 (exit $ac_status); }; }; then
647847ea
DL
20780 ac_cv_type_pid_t=yes
20781else
503d2be0 20782 echo "$as_me: failed program was:" >&5
19650fd6
AS
20783sed 's/^/| /' conftest.$ac_ext >&5
20784
503d2be0 20785ac_cv_type_pid_t=no
647847ea 20786fi
35996d22 20787rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 20788fi
c0d27fcc 20789echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
20790echo "${ECHO_T}$ac_cv_type_pid_t" >&6
20791if test $ac_cv_type_pid_t = yes; then
20792 :
20793else
20794
c0d27fcc 20795cat >>confdefs.h <<_ACEOF
647847ea 20796#define pid_t int
c0d27fcc 20797_ACEOF
647847ea
DL
20798
20799fi
20800
c0d27fcc
MR
20801
20802
503d2be0
AS
20803for ac_header in unistd.h vfork.h
20804do
20805as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20806if eval "test \"\${$as_ac_Header+set}\" = set"; then
20807 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20808echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20809if eval "test \"\${$as_ac_Header+set}\" = set"; then
20810 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20811fi
20812echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20813echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20814else
c0d27fcc
MR
20815 # Is the header compilable?
20816echo "$as_me:$LINENO: checking $ac_header usability" >&5
20817echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20818cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20819/* confdefs.h. */
20820_ACEOF
20821cat confdefs.h >>conftest.$ac_ext
20822cat >>conftest.$ac_ext <<_ACEOF
20823/* end confdefs.h. */
c0d27fcc
MR
20824$ac_includes_default
20825#include <$ac_header>
20826_ACEOF
20827rm -f conftest.$ac_objext
20828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20829 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20830 ac_status=$?
35996d22
AS
20831 grep -v '^ *+' conftest.er1 >conftest.err
20832 rm -f conftest.er1
20833 cat conftest.err >&5
c0d27fcc
MR
20834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20835 (exit $ac_status); } &&
9adfabc2 20836 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20838 (eval $ac_try) 2>&5
20839 ac_status=$?
20840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20841 (exit $ac_status); }; } &&
20842 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20844 (eval $ac_try) 2>&5
20845 ac_status=$?
20846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20847 (exit $ac_status); }; }; then
20848 ac_header_compiler=yes
20849else
20850 echo "$as_me: failed program was:" >&5
19650fd6
AS
20851sed 's/^/| /' conftest.$ac_ext >&5
20852
c0d27fcc
MR
20853ac_header_compiler=no
20854fi
35996d22 20855rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20856echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20857echo "${ECHO_T}$ac_header_compiler" >&6
20858
20859# Is the header present?
20860echo "$as_me:$LINENO: checking $ac_header presence" >&5
20861echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20862cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20863/* confdefs.h. */
20864_ACEOF
20865cat confdefs.h >>conftest.$ac_ext
20866cat >>conftest.$ac_ext <<_ACEOF
20867/* end confdefs.h. */
503d2be0
AS
20868#include <$ac_header>
20869_ACEOF
c0d27fcc 20870if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20871 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20872 ac_status=$?
6bae0ccf 20873 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20874 rm -f conftest.er1
20875 cat conftest.err >&5
c0d27fcc 20876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20877 (exit $ac_status); } >/dev/null; then
20878 if test -s conftest.err; then
20879 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20880 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20881 else
20882 ac_cpp_err=
20883 fi
647847ea 20884else
503d2be0
AS
20885 ac_cpp_err=yes
20886fi
20887if test -z "$ac_cpp_err"; then
c0d27fcc 20888 ac_header_preproc=yes
647847ea 20889else
503d2be0 20890 echo "$as_me: failed program was:" >&5
19650fd6
AS
20891sed 's/^/| /' conftest.$ac_ext >&5
20892
c0d27fcc 20893 ac_header_preproc=no
647847ea 20894fi
503d2be0 20895rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20896echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20897echo "${ECHO_T}$ac_header_preproc" >&6
20898
20899# So? What about this header?
35996d22
AS
20900case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20901 yes:no: )
c0d27fcc
MR
20902 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20903echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20904 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20905echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20906 ac_header_preproc=yes
19650fd6 20907 ;;
35996d22 20908 no:yes:* )
c0d27fcc
MR
20909 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20910echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
20911 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20912echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20913 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20914echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20915 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20916echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20917 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20918echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20919 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20920echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20921 (
20922 cat <<\_ASBOX
35996d22
AS
20923## ------------------------------------------ ##
20924## Report this to the AC_PACKAGE_NAME lists. ##
20925## ------------------------------------------ ##
19650fd6
AS
20926_ASBOX
20927 ) |
20928 sed "s/^/$as_me: WARNING: /" >&2
20929 ;;
c0d27fcc
MR
20930esac
20931echo "$as_me:$LINENO: checking for $ac_header" >&5
20932echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20933if eval "test \"\${$as_ac_Header+set}\" = set"; then
20934 echo $ECHO_N "(cached) $ECHO_C" >&6
20935else
35996d22 20936 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 20937fi
c0d27fcc 20938echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20939echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20940
20941fi
503d2be0 20942if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20943 cat >>confdefs.h <<_ACEOF
503d2be0 20944#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20945_ACEOF
647847ea 20946
73b77ee5 20947fi
c0d27fcc 20948
503d2be0 20949done
73b77ee5 20950
c0d27fcc
MR
20951
20952
503d2be0
AS
20953for ac_func in fork vfork
20954do
20955as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 20956echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
20957echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20958if eval "test \"\${$as_ac_var+set}\" = set"; then
20959 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 20960else
503d2be0 20961 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20962/* confdefs.h. */
20963_ACEOF
20964cat confdefs.h >>conftest.$ac_ext
20965cat >>conftest.$ac_ext <<_ACEOF
20966/* end confdefs.h. */
35996d22
AS
20967/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20968 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20969#define $ac_func innocuous_$ac_func
20970
fa0b693c 20971/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20972 which can conflict with char $ac_func (); below.
20973 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20974 <limits.h> exists even on freestanding compilers. */
35996d22 20975
19650fd6
AS
20976#ifdef __STDC__
20977# include <limits.h>
20978#else
20979# include <assert.h>
20980#endif
35996d22
AS
20981
20982#undef $ac_func
20983
fa0b693c 20984/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20985#ifdef __cplusplus
20986extern "C"
19650fd6 20987{
503d2be0 20988#endif
fa0b693c 20989/* We use char because int might match the return type of a gcc2
503d2be0
AS
20990 builtin and then its argument prototype would still apply. */
20991char $ac_func ();
fa0b693c
GM
20992/* The GNU C library defines this for functions which it implements
20993 to always fail with ENOSYS. Some functions are actually named
20994 something starting with __ and the normal name is an alias. */
503d2be0 20995#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
20996choke me
20997#else
19650fd6
AS
20998char (*f) () = $ac_func;
20999#endif
21000#ifdef __cplusplus
21001}
fa0b693c
GM
21002#endif
21003
19650fd6
AS
21004int
21005main ()
21006{
21007return f != $ac_func;
503d2be0
AS
21008 ;
21009 return 0;
21010}
21011_ACEOF
21012rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 21013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 21014 (eval $ac_link) 2>conftest.er1
503d2be0 21015 ac_status=$?
35996d22
AS
21016 grep -v '^ *+' conftest.er1 >conftest.err
21017 rm -f conftest.er1
21018 cat conftest.err >&5
c0d27fcc 21019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21020 (exit $ac_status); } &&
9adfabc2 21021 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
21022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21023 (eval $ac_try) 2>&5
21024 ac_status=$?
21025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21026 (exit $ac_status); }; } &&
21027 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 21028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21029 (eval $ac_try) 2>&5
21030 ac_status=$?
c0d27fcc 21031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21032 (exit $ac_status); }; }; then
21033 eval "$as_ac_var=yes"
21034else
21035 echo "$as_me: failed program was:" >&5
19650fd6
AS
21036sed 's/^/| /' conftest.$ac_ext >&5
21037
503d2be0
AS
21038eval "$as_ac_var=no"
21039fi
35996d22
AS
21040rm -f conftest.err conftest.$ac_objext \
21041 conftest$ac_exeext conftest.$ac_ext
503d2be0 21042fi
c0d27fcc 21043echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
21044echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21045if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 21046 cat >>confdefs.h <<_ACEOF
503d2be0 21047#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 21048_ACEOF
503d2be0 21049
fa0b693c 21050fi
503d2be0 21051done
fa0b693c 21052
503d2be0 21053if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 21054 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
21055echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21056if test "${ac_cv_func_fork_works+set}" = set; then
21057 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 21058else
503d2be0
AS
21059 if test "$cross_compiling" = yes; then
21060 ac_cv_func_fork_works=cross
21061else
21062 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 21063/* By Ruediger Kuhlmann. */
503d2be0
AS
21064 #include <sys/types.h>
21065 #if HAVE_UNISTD_H
21066 # include <unistd.h>
21067 #endif
21068 /* Some systems only have a dummy stub for fork() */
21069 int main ()
21070 {
35996d22
AS
21071 if (fork() < 0)
21072 exit (1);
21073 exit (0);
503d2be0
AS
21074 }
21075_ACEOF
21076rm -f conftest$ac_exeext
c0d27fcc 21077if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21078 (eval $ac_link) 2>&5
21079 ac_status=$?
c0d27fcc 21080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21081 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21083 (eval $ac_try) 2>&5
21084 ac_status=$?
c0d27fcc 21085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21086 (exit $ac_status); }; }; then
21087 ac_cv_func_fork_works=yes
21088else
21089 echo "$as_me: program exited with status $ac_status" >&5
21090echo "$as_me: failed program was:" >&5
19650fd6
AS
21091sed 's/^/| /' conftest.$ac_ext >&5
21092
c0d27fcc 21093( exit $ac_status )
503d2be0
AS
21094ac_cv_func_fork_works=no
21095fi
35996d22 21096rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
21097fi
21098fi
c0d27fcc 21099echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
21100echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21101
6bae0ccf
DL
21102else
21103 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
21104fi
21105if test "x$ac_cv_func_fork_works" = xcross; then
21106 case $host in
21107 *-*-amigaos* | *-*-msdosdjgpp*)
21108 # Override, as these systems have only a dummy fork() stub
21109 ac_cv_func_fork_works=no
21110 ;;
21111 *)
21112 ac_cv_func_fork_works=yes
21113 ;;
21114 esac
c0d27fcc
MR
21115 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
21116echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 21117fi
73b77ee5 21118ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 21119if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 21120 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
21121echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21122if test "${ac_cv_func_vfork_works+set}" = set; then
21123 echo $ECHO_N "(cached) $ECHO_C" >&6
21124else
21125 if test "$cross_compiling" = yes; then
21126 ac_cv_func_vfork_works=cross
fa0b693c 21127else
503d2be0 21128 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21129/* confdefs.h. */
21130_ACEOF
21131cat confdefs.h >>conftest.$ac_ext
21132cat >>conftest.$ac_ext <<_ACEOF
21133/* end confdefs.h. */
73b77ee5
GM
21134/* Thanks to Paul Eggert for this test. */
21135#include <stdio.h>
19650fd6 21136#include <stdlib.h>
fa0b693c 21137#include <sys/types.h>
73b77ee5 21138#include <sys/stat.h>
19650fd6 21139#include <sys/wait.h>
503d2be0
AS
21140#if HAVE_UNISTD_H
21141# include <unistd.h>
73b77ee5 21142#endif
503d2be0
AS
21143#if HAVE_VFORK_H
21144# include <vfork.h>
73b77ee5
GM
21145#endif
21146/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
21147 argument registers are propagated back to the parent. The compiler
21148 is told about this with #include <vfork.h>, but some compilers
21149 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
21150 static variable whose address is put into a register that is
21151 clobbered by the vfork. */
19650fd6 21152static void
fa0b693c 21153#ifdef __cplusplus
73b77ee5 21154sparc_address_test (int arg)
503d2be0 21155# else
73b77ee5 21156sparc_address_test (arg) int arg;
fa0b693c 21157#endif
fa0b693c 21158{
73b77ee5
GM
21159 static pid_t child;
21160 if (!child) {
21161 child = vfork ();
21162 if (child < 0) {
21163 perror ("vfork");
21164 _exit(2);
21165 }
21166 if (!child) {
21167 arg = getpid();
21168 write(-1, "", 0);
21169 _exit (arg);
21170 }
21171 }
21172}
503d2be0
AS
21173
21174int
21175main ()
21176{
73b77ee5
GM
21177 pid_t parent = getpid ();
21178 pid_t child;
fa0b693c 21179
19650fd6 21180 sparc_address_test (0);
fa0b693c 21181
73b77ee5 21182 child = vfork ();
fa0b693c 21183
73b77ee5 21184 if (child == 0) {
503d2be0
AS
21185 /* Here is another test for sparc vfork register problems. This
21186 test uses lots of local variables, at least as many local
21187 variables as main has allocated so far including compiler
21188 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
21189 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
21190 reuse the register of parent for one of the local variables,
21191 since it will think that parent can't possibly be used any more
21192 in this routine. Assigning to the local variable will thus
21193 munge parent in the parent process. */
73b77ee5
GM
21194 pid_t
21195 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21196 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21197 /* Convince the compiler that p..p7 are live; otherwise, it might
21198 use the same hardware register for all 8 local variables. */
21199 if (p != p1 || p != p2 || p != p3 || p != p4
21200 || p != p5 || p != p6 || p != p7)
21201 _exit(1);
fa0b693c 21202
503d2be0
AS
21203 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21204 from child file descriptors. If the child closes a descriptor
21205 before it execs or exits, this munges the parent's descriptor
21206 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
21207 _exit(close(fileno(stdout)) != 0);
21208 } else {
21209 int status;
21210 struct stat st;
21211
21212 while (wait(&status) != child)
21213 ;
21214 exit(
21215 /* Was there some problem with vforking? */
21216 child < 0
21217
21218 /* Did the child fail? (This shouldn't happen.) */
21219 || status
21220
21221 /* Did the vfork/compiler bug occur? */
21222 || parent != getpid()
fa0b693c 21223
73b77ee5
GM
21224 /* Did the file descriptor bug occur? */
21225 || fstat(fileno(stdout), &st) != 0
21226 );
21227 }
21228}
503d2be0
AS
21229_ACEOF
21230rm -f conftest$ac_exeext
c0d27fcc 21231if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21232 (eval $ac_link) 2>&5
21233 ac_status=$?
c0d27fcc 21234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21235 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21237 (eval $ac_try) 2>&5
21238 ac_status=$?
c0d27fcc 21239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21240 (exit $ac_status); }; }; then
73b77ee5 21241 ac_cv_func_vfork_works=yes
fa0b693c 21242else
503d2be0
AS
21243 echo "$as_me: program exited with status $ac_status" >&5
21244echo "$as_me: failed program was:" >&5
19650fd6
AS
21245sed 's/^/| /' conftest.$ac_ext >&5
21246
c0d27fcc 21247( exit $ac_status )
503d2be0
AS
21248ac_cv_func_vfork_works=no
21249fi
35996d22 21250rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 21251fi
fa0b693c 21252fi
c0d27fcc 21253echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 21254echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 21255
503d2be0
AS
21256fi;
21257if test "x$ac_cv_func_fork_works" = xcross; then
35996d22 21258 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
21259 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
21260echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
21261fi
21262
503d2be0
AS
21263if test "x$ac_cv_func_vfork_works" = xyes; then
21264
c0d27fcc 21265cat >>confdefs.h <<\_ACEOF
503d2be0 21266#define HAVE_WORKING_VFORK 1
c0d27fcc 21267_ACEOF
503d2be0
AS
21268
21269else
21270
c0d27fcc 21271cat >>confdefs.h <<\_ACEOF
73b77ee5 21272#define vfork fork
c0d27fcc 21273_ACEOF
fa0b693c
GM
21274
21275fi
503d2be0
AS
21276if test "x$ac_cv_func_fork_works" = xyes; then
21277
c0d27fcc 21278cat >>confdefs.h <<\_ACEOF
503d2be0 21279#define HAVE_WORKING_FORK 1
c0d27fcc 21280_ACEOF
fa0b693c 21281
503d2be0 21282fi
647847ea 21283
c0d27fcc 21284
6a3a24fa
JD
21285echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
21286echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
21287if test "${emacs_cv_langinfo_codeset+set}" = set; then
21288 echo $ECHO_N "(cached) $ECHO_C" >&6
21289else
21290 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21291/* confdefs.h. */
21292_ACEOF
21293cat confdefs.h >>conftest.$ac_ext
21294cat >>conftest.$ac_ext <<_ACEOF
21295/* end confdefs.h. */
6a3a24fa
JD
21296#include <langinfo.h>
21297int
21298main ()
21299{
21300char* cs = nl_langinfo(CODESET);
21301 ;
21302 return 0;
21303}
21304_ACEOF
21305rm -f conftest.$ac_objext conftest$ac_exeext
21306if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 21307 (eval $ac_link) 2>conftest.er1
6a3a24fa 21308 ac_status=$?
35996d22
AS
21309 grep -v '^ *+' conftest.er1 >conftest.err
21310 rm -f conftest.er1
21311 cat conftest.err >&5
6a3a24fa
JD
21312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21313 (exit $ac_status); } &&
9adfabc2 21314 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
21315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21316 (eval $ac_try) 2>&5
21317 ac_status=$?
21318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21319 (exit $ac_status); }; } &&
21320 { ac_try='test -s conftest$ac_exeext'
6a3a24fa
JD
21321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21322 (eval $ac_try) 2>&5
21323 ac_status=$?
21324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21325 (exit $ac_status); }; }; then
21326 emacs_cv_langinfo_codeset=yes
21327else
21328 echo "$as_me: failed program was:" >&5
19650fd6
AS
21329sed 's/^/| /' conftest.$ac_ext >&5
21330
6a3a24fa
JD
21331emacs_cv_langinfo_codeset=no
21332fi
35996d22
AS
21333rm -f conftest.err conftest.$ac_objext \
21334 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
21335
21336fi
21337echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
21338echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
21339if test $emacs_cv_langinfo_codeset = yes; then
21340
21341cat >>confdefs.h <<\_ACEOF
21342#define HAVE_LANGINFO_CODESET 1
21343_ACEOF
21344
21345fi
21346
c0d27fcc 21347echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
21348echo $ECHO_N "checking for size_t... $ECHO_C" >&6
21349if test "${ac_cv_type_size_t+set}" = set; then
21350 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 21351else
503d2be0 21352 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21353/* confdefs.h. */
21354_ACEOF
21355cat confdefs.h >>conftest.$ac_ext
21356cat >>conftest.$ac_ext <<_ACEOF
21357/* end confdefs.h. */
503d2be0
AS
21358$ac_includes_default
21359int
21360main ()
21361{
21362if ((size_t *) 0)
21363 return 0;
21364if (sizeof (size_t))
21365 return 0;
21366 ;
21367 return 0;
21368}
21369_ACEOF
21370rm -f conftest.$ac_objext
c0d27fcc 21371if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21372 (eval $ac_compile) 2>conftest.er1
503d2be0 21373 ac_status=$?
35996d22
AS
21374 grep -v '^ *+' conftest.er1 >conftest.err
21375 rm -f conftest.er1
21376 cat conftest.err >&5
c0d27fcc 21377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21378 (exit $ac_status); } &&
9adfabc2 21379 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
21380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21381 (eval $ac_try) 2>&5
21382 ac_status=$?
21383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21384 (exit $ac_status); }; } &&
21385 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21387 (eval $ac_try) 2>&5
21388 ac_status=$?
c0d27fcc 21389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21390 (exit $ac_status); }; }; then
8730a8da
DL
21391 ac_cv_type_size_t=yes
21392else
503d2be0 21393 echo "$as_me: failed program was:" >&5
19650fd6
AS
21394sed 's/^/| /' conftest.$ac_ext >&5
21395
503d2be0 21396ac_cv_type_size_t=no
8730a8da 21397fi
35996d22 21398rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 21399fi
c0d27fcc 21400echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
21401echo "${ECHO_T}$ac_cv_type_size_t" >&6
21402if test $ac_cv_type_size_t = yes; then
503d2be0 21403
c0d27fcc
MR
21404cat >>confdefs.h <<_ACEOF
21405#define HAVE_SIZE_T 1
21406_ACEOF
21407
8730a8da
DL
21408
21409fi
21410
c0d27fcc 21411
973a76b1
DL
21412echo "$as_me:$LINENO: checking for mbstate_t" >&5
21413echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
21414if test "${ac_cv_type_mbstate_t+set}" = set; then
21415 echo $ECHO_N "(cached) $ECHO_C" >&6
21416else
21417 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21418/* confdefs.h. */
21419_ACEOF
21420cat confdefs.h >>conftest.$ac_ext
21421cat >>conftest.$ac_ext <<_ACEOF
21422/* end confdefs.h. */
973a76b1
DL
21423$ac_includes_default
21424# include <wchar.h>
21425int
21426main ()
21427{
21428mbstate_t x; return sizeof x;
21429 ;
21430 return 0;
21431}
21432_ACEOF
21433rm -f conftest.$ac_objext
21434if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21435 (eval $ac_compile) 2>conftest.er1
973a76b1 21436 ac_status=$?
35996d22
AS
21437 grep -v '^ *+' conftest.er1 >conftest.err
21438 rm -f conftest.er1
21439 cat conftest.err >&5
973a76b1
DL
21440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21441 (exit $ac_status); } &&
9adfabc2 21442 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
21443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21444 (eval $ac_try) 2>&5
21445 ac_status=$?
21446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21447 (exit $ac_status); }; } &&
21448 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
21449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21450 (eval $ac_try) 2>&5
21451 ac_status=$?
21452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21453 (exit $ac_status); }; }; then
21454 ac_cv_type_mbstate_t=yes
21455else
21456 echo "$as_me: failed program was:" >&5
19650fd6
AS
21457sed 's/^/| /' conftest.$ac_ext >&5
21458
973a76b1
DL
21459ac_cv_type_mbstate_t=no
21460fi
35996d22 21461rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
21462fi
21463echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
21464echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
21465 if test $ac_cv_type_mbstate_t = yes; then
21466
21467cat >>confdefs.h <<\_ACEOF
21468#define HAVE_MBSTATE_T 1
21469_ACEOF
21470
21471 else
21472
21473cat >>confdefs.h <<\_ACEOF
21474#define mbstate_t int
21475_ACEOF
21476
21477 fi
21478
22044edf
DL
21479echo "$as_me:$LINENO: checking for C restrict keyword" >&5
21480echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
21481if test "${emacs_cv_c_restrict+set}" = set; then
21482 echo $ECHO_N "(cached) $ECHO_C" >&6
21483else
21484 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21485/* confdefs.h. */
21486_ACEOF
21487cat confdefs.h >>conftest.$ac_ext
21488cat >>conftest.$ac_ext <<_ACEOF
21489/* end confdefs.h. */
22044edf
DL
21490void fred (int *restrict x);
21491int
21492main ()
21493{
b936fae4 21494
22044edf
DL
21495 ;
21496 return 0;
21497}
c0d27fcc 21498_ACEOF
22044edf
DL
21499rm -f conftest.$ac_objext
21500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21501 (eval $ac_compile) 2>conftest.er1
22044edf 21502 ac_status=$?
35996d22
AS
21503 grep -v '^ *+' conftest.er1 >conftest.err
21504 rm -f conftest.er1
21505 cat conftest.err >&5
22044edf
DL
21506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21507 (exit $ac_status); } &&
9adfabc2 21508 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
21509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21510 (eval $ac_try) 2>&5
21511 ac_status=$?
21512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21513 (exit $ac_status); }; } &&
21514 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21516 (eval $ac_try) 2>&5
21517 ac_status=$?
21518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21519 (exit $ac_status); }; }; then
21520 emacs_cv_c_restrict=yes
21521else
21522 echo "$as_me: failed program was:" >&5
19650fd6
AS
21523sed 's/^/| /' conftest.$ac_ext >&5
21524
22044edf 21525cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21526/* confdefs.h. */
21527_ACEOF
21528cat confdefs.h >>conftest.$ac_ext
21529cat >>conftest.$ac_ext <<_ACEOF
21530/* end confdefs.h. */
22044edf
DL
21531void fred (int *__restrict x);
21532int
21533main ()
21534{
c0d27fcc 21535
22044edf
DL
21536 ;
21537 return 0;
21538}
c0d27fcc 21539_ACEOF
22044edf
DL
21540rm -f conftest.$ac_objext
21541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21542 (eval $ac_compile) 2>conftest.er1
22044edf 21543 ac_status=$?
35996d22
AS
21544 grep -v '^ *+' conftest.er1 >conftest.err
21545 rm -f conftest.er1
21546 cat conftest.err >&5
22044edf
DL
21547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21548 (exit $ac_status); } &&
9adfabc2 21549 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
21550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21551 (eval $ac_try) 2>&5
21552 ac_status=$?
21553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21554 (exit $ac_status); }; } &&
21555 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21557 (eval $ac_try) 2>&5
21558 ac_status=$?
21559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21560 (exit $ac_status); }; }; then
21561 emacs_cv_c_restrict=__restrict
21562else
21563 echo "$as_me: failed program was:" >&5
19650fd6
AS
21564sed 's/^/| /' conftest.$ac_ext >&5
21565
22044edf 21566emacs_cv_c_restrict=no
ba4481b5 21567fi
35996d22 21568rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21569fi
35996d22 21570rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21571fi
22044edf
DL
21572echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
21573echo "${ECHO_T}$emacs_cv_c_restrict" >&6
21574case "$emacs_cv_c_restrict" in
21575 yes) emacs_restrict=restrict;;
21576 no) emacs_restrict="";;
21577 *) emacs_restrict="$emacs_cv_c_restrict";;
21578esac
21579if test "$emacs_restrict" != __restrict; then
b936fae4 21580
22044edf
DL
21581cat >>confdefs.h <<_ACEOF
21582#define __restrict $emacs_restrict
c0d27fcc 21583_ACEOF
ba4481b5
DL
21584
21585fi
ba4481b5 21586
22044edf
DL
21587echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
21588echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
21589if test "${emacs_cv_c_restrict_arr+set}" = set; then
21590 echo $ECHO_N "(cached) $ECHO_C" >&6
21591else
21592 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21593/* confdefs.h. */
21594_ACEOF
21595cat confdefs.h >>conftest.$ac_ext
21596cat >>conftest.$ac_ext <<_ACEOF
21597/* end confdefs.h. */
22044edf
DL
21598void fred (int x[__restrict]);
21599int
21600main ()
21601{
b936fae4 21602
22044edf
DL
21603 ;
21604 return 0;
21605}
c0d27fcc 21606_ACEOF
22044edf
DL
21607rm -f conftest.$ac_objext
21608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21609 (eval $ac_compile) 2>conftest.er1
22044edf 21610 ac_status=$?
35996d22
AS
21611 grep -v '^ *+' conftest.er1 >conftest.err
21612 rm -f conftest.er1
21613 cat conftest.err >&5
22044edf
DL
21614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21615 (exit $ac_status); } &&
9adfabc2 21616 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
21617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21618 (eval $ac_try) 2>&5
21619 ac_status=$?
21620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21621 (exit $ac_status); }; } &&
21622 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21624 (eval $ac_try) 2>&5
21625 ac_status=$?
21626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21627 (exit $ac_status); }; }; then
21628 emacs_cv_c_restrict_arr=yes
21629else
21630 echo "$as_me: failed program was:" >&5
19650fd6
AS
21631sed 's/^/| /' conftest.$ac_ext >&5
21632
22044edf 21633emacs_cv_c_restrict_arr=no
ba4481b5 21634fi
35996d22 21635rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf
DL
21636fi
21637echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
21638echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
21639if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 21640
c0d27fcc 21641cat >>confdefs.h <<\_ACEOF
22044edf 21642#define __restrict_arr __restrict
c0d27fcc 21643_ACEOF
ba4481b5 21644
ba4481b5
DL
21645fi
21646
c0d27fcc 21647
c0d27fcc 21648
22044edf
DL
21649# Set up the CFLAGS for real compilation, so we can substitute it.
21650CFLAGS="$REAL_CFLAGS"
21651CPPFLAGS="$REAL_CPPFLAGS"
21652
21653#### Find out which version of Emacs this is.
21654version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
21655 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
21656if test x"${version}" = x; then
21657 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
21658echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
21659 { (exit 1); exit 1; }; }
21660fi
21661
21662### Specify what sort of things we'll be editing into Makefile and config.h.
21663### Use configuration here uncanonicalized to avoid exceeding size limits.
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
6a3a24fa 21696
22044edf
DL
21697
21698
21699cat >>confdefs.h <<_ACEOF
21700#define EMACS_CONFIGURATION "${canonical}"
21701_ACEOF
21702
21703
21704cat >>confdefs.h <<_ACEOF
21705#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
21706_ACEOF
21707
21708
21709cat >>confdefs.h <<_ACEOF
21710#define config_machfile "${machfile}"
21711_ACEOF
21712
21713
21714cat >>confdefs.h <<_ACEOF
21715#define config_opsysfile "${opsysfile}"
21716_ACEOF
21717
21718
21719cat >>confdefs.h <<_ACEOF
21720#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
21721_ACEOF
21722
21723
21724cat >>confdefs.h <<_ACEOF
21725#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
21726_ACEOF
21727
21728
21729cat >>confdefs.h <<_ACEOF
21730#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
21731_ACEOF
21732
21733
21734cat >>confdefs.h <<_ACEOF
21735#define UNEXEC_SRC ${UNEXEC_SRC}
21736_ACEOF
21737
21738
21739if test "${HAVE_X_WINDOWS}" = "yes" ; then
21740
21741cat >>confdefs.h <<\_ACEOF
21742#define HAVE_X_WINDOWS 1
21743_ACEOF
21744
21745fi
21746if test "${USE_X_TOOLKIT}" != "none" ; then
21747
21748cat >>confdefs.h <<\_ACEOF
21749#define USE_X_TOOLKIT 1
21750_ACEOF
21751
21752fi
21753if test "${HAVE_X11}" = "yes" ; then
21754
21755cat >>confdefs.h <<\_ACEOF
21756#define HAVE_X11 1
21757_ACEOF
21758
21759fi
21760if test "${HAVE_XFREE386}" = "yes" ; then
21761
21762cat >>confdefs.h <<\_ACEOF
21763#define HAVE_XFREE386 1
21764_ACEOF
21765
21766fi
21767if test "${HAVE_MENUS}" = "yes" ; then
21768
21769cat >>confdefs.h <<\_ACEOF
21770#define HAVE_MENUS 1
21771_ACEOF
21772
21773fi
21774if test "${GNU_MALLOC}" = "yes" ; then
21775
21776cat >>confdefs.h <<\_ACEOF
21777#define GNU_MALLOC 1
21778_ACEOF
21779
21780fi
21781if test "${REL_ALLOC}" = "yes" ; then
21782
21783cat >>confdefs.h <<\_ACEOF
21784#define REL_ALLOC 1
21785_ACEOF
21786
21787fi
21788
21789
21790
c0d27fcc
MR
21791
21792
ba4481b5 21793#### Report on what we decided to do.
488dd4c4
JD
21794#### Report GTK as a toolkit, even if it doesn't use Xt.
21795#### It makes printing result more understandable as using GTK sets
21796#### toolkit_scroll_bars to yes by default.
21797if test "${HAVE_GTK}" = "yes"; then
21798 USE_X_TOOLKIT=GTK
21799fi
21800
ba4481b5
DL
21801echo "
21802Configured for \`${canonical}'.
21803
21804 Where should the build process find the source code? ${srcdir}
21805 What operating system and machine description files should Emacs use?
21806 \`${opsysfile}' and \`${machfile}'
21807 What compiler should emacs be built with? ${CC} ${CFLAGS}
21808 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 21809 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 21810 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 21811 What window system should Emacs use? ${window_system}
8e967cf7 21812 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
21813
21814if test -n "${x_includes}"; then
21815echo " Where do we find X Windows header files? ${x_includes}"
21816else
21817echo " Where do we find X Windows header files? Standard dirs"
21818fi
21819if test -n "${x_libraries}"; then
21820echo " Where do we find X Windows libraries? ${x_libraries}"
21821else
21822echo " Where do we find X Windows libraries? Standard dirs"
21823fi
21824
21825echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
21826echo " Does Emacs use -lXpm? ${HAVE_XPM}"
21827echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
21828echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
21829echo " Does Emacs use -lungif? ${HAVE_GIF}"
21830echo " Does Emacs use -lpng? ${HAVE_PNG}"
21831echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
21832echo
21833
d0098f13
JD
21834if test $USE_XASSERTS = yes; then
21835 echo " Compiling with asserts turned on."
d0098f13
JD
21836 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
21837 echo
21838fi
05cf15c6 21839
05cf15c6 21840
05cf15c6 21841
ba4481b5
DL
21842# Remove any trailing slashes in these variables.
21843test "${prefix}" != NONE &&
21844 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
21845test "${exec_prefix}" != NONE &&
21846 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
21847
d0e9bfd2
GM
21848## Check if the C preprocessor will convert `..' to `. .'. If so, set
21849## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
21850## from Makefile.c can correctly provide the arg `-traditional' to the
21851## C preprocessor.
21852
503d2be0 21853cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21854/* confdefs.h. */
21855_ACEOF
21856cat confdefs.h >>conftest.$ac_ext
21857cat >>conftest.$ac_ext <<_ACEOF
21858/* end confdefs.h. */
d0e9bfd2 21859yes..yes
503d2be0 21860_ACEOF
d0e9bfd2 21861if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 21862 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
21863 CPP_NEED_TRADITIONAL=no
21864else
d0e9bfd2
GM
21865 CPP_NEED_TRADITIONAL=yes
21866fi
21867rm -f conftest*
21868
c0d27fcc 21869
6bae0ccf
DL
21870 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"
21871 ac_config_commands="$ac_config_commands default"
503d2be0 21872cat >confcache <<\_ACEOF
ba4481b5
DL
21873# This file is a shell script that caches the results of configure
21874# tests run on this system so they can be shared between configure
503d2be0
AS
21875# scripts and configure runs, see configure's option --config-cache.
21876# It is not useful on other systems. If it contains results you don't
21877# want to keep, you may remove or edit it.
ba4481b5 21878#
503d2be0
AS
21879# config.status only pays attention to the cache file if you give it
21880# the --recheck option to rerun configure.
ba4481b5 21881#
6bae0ccf 21882# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
21883# loading this file, other *unset* `ac_cv_foo' will be assigned the
21884# following values.
21885
21886_ACEOF
21887
ba4481b5
DL
21888# The following way of writing the cache mishandles newlines in values,
21889# but we know of no workaround that is simple, portable, and efficient.
21890# So, don't put newlines in cache variables' values.
21891# Ultrix sh set writes to stderr and can't be redirected directly,
21892# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
21893{
21894 (set) 2>&1 |
21895 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21896 *ac_space=\ *)
21897 # `set' does not quote correctly, so add quotes (double-quote
21898 # substitution turns \\\\ into \\, and sed turns \\ into \).
21899 sed -n \
35996d22
AS
21900 "s/'/'\\\\''/g;
21901 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
503d2be0
AS
21902 ;;
21903 *)
21904 # `set' quotes correctly as required by POSIX, so do not add quotes.
21905 sed -n \
35996d22 21906 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
21907 ;;
21908 esac;
21909} |
21910 sed '
21911 t clear
21912 : clear
21913 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21914 t end
21915 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21916 : end' >>confcache
19650fd6 21917if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 21918 if test -w $cache_file; then
503d2be0
AS
21919 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21920 cat confcache >$cache_file
ba4481b5
DL
21921 else
21922 echo "not updating unwritable cache $cache_file"
21923 fi
21924fi
21925rm -f confcache
21926
ba4481b5
DL
21927test "x$prefix" = xNONE && prefix=$ac_default_prefix
21928# Let make expand exec_prefix.
21929test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21930
503d2be0
AS
21931# VPATH may cause trouble with some makes, so we remove $(srcdir),
21932# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21933# trailing colons and then remove the whole line if VPATH becomes empty
21934# (actually we leave an empty line to preserve line numbers).
ba4481b5 21935if test "x$srcdir" = x.; then
35996d22 21936 ac_vpsub='/^[ ]*VPATH[ ]*=/{
503d2be0
AS
21937s/:*\$(srcdir):*/:/;
21938s/:*\${srcdir}:*/:/;
21939s/:*@srcdir@:*/:/;
35996d22 21940s/^\([^=]*=[ ]*\):*/\1/;
503d2be0 21941s/:*$//;
35996d22 21942s/^[^=]*=[ ]*$//;
503d2be0 21943}'
ba4481b5
DL
21944fi
21945
ba4481b5
DL
21946DEFS=-DHAVE_CONFIG_H
21947
6bae0ccf
DL
21948ac_libobjs=
21949ac_ltlibobjs=
21950for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21951 # 1. Remove the extension, and $U if already installed.
21952 ac_i=`echo "$ac_i" |
35996d22 21953 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6bae0ccf
DL
21954 # 2. Add them.
21955 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21956 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
21957done
21958LIBOBJS=$ac_libobjs
21959
21960LTLIBOBJS=$ac_ltlibobjs
21961
21962
c0d27fcc 21963
ba4481b5 21964: ${CONFIG_STATUS=./config.status}
503d2be0
AS
21965ac_clean_files_save=$ac_clean_files
21966ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 21967{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
21968echo "$as_me: creating $CONFIG_STATUS" >&6;}
21969cat >$CONFIG_STATUS <<_ACEOF
21970#! $SHELL
c0d27fcc 21971# Generated by $as_me.
ba4481b5 21972# Run this file to recreate the current configuration.
ba4481b5 21973# Compiler output produced by configure, useful for debugging
503d2be0 21974# configure, is in config.log if it exists.
ba4481b5 21975
503d2be0 21976debug=false
19650fd6
AS
21977ac_cs_recheck=false
21978ac_cs_silent=false
503d2be0 21979SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
21980_ACEOF
21981
21982cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
21983## --------------------- ##
21984## M4sh Initialization. ##
21985## --------------------- ##
21986
503d2be0
AS
21987# Be Bourne compatible
21988if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21989 emulate sh
21990 NULLCMD=:
6bae0ccf
DL
21991 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21992 # is contrary to our usage. Disable this feature.
21993 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
21994elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21995 set -o posix
21996fi
35996d22 21997DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 21998
c0d27fcc 21999# Support unset when possible.
35996d22 22000if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
22001 as_unset=unset
22002else
22003 as_unset=false
22004fi
22005
6bae0ccf
DL
22006
22007# Work around bugs in pre-3.0 UWIN ksh.
22008$as_unset ENV MAIL MAILPATH
22009PS1='$ '
22010PS2='> '
22011PS4='+ '
22012
22013# NLS nuisances.
19650fd6
AS
22014for as_var in \
22015 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22016 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22017 LC_TELEPHONE LC_TIME
6bae0ccf 22018do
35996d22 22019 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
22020 eval $as_var=C; export $as_var
22021 else
22022 $as_unset $as_var
22023 fi
22024done
22025
22026# Required to use basename.
22027if expr a : '\(a\)' >/dev/null 2>&1; then
22028 as_expr=expr
22029else
22030 as_expr=false
22031fi
22032
22033if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22034 as_basename=basename
22035else
22036 as_basename=false
22037fi
c0d27fcc
MR
22038
22039
503d2be0 22040# Name of the executable.
6bae0ccf 22041as_me=`$as_basename "$0" ||
c0d27fcc
MR
22042$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22043 X"$0" : 'X\(//\)$' \| \
22044 X"$0" : 'X\(/\)$' \| \
22045 . : '\(.\)' 2>/dev/null ||
22046echo X/"$0" |
22047 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22048 /^X\/\(\/\/\)$/{ s//\1/; q; }
22049 /^X\/\(\/\).*/{ s//\1/; q; }
22050 s/.*/./; q'`
22051
6bae0ccf 22052
c0d27fcc
MR
22053# PATH needs CR, and LINENO needs CR and PATH.
22054# Avoid depending upon Character Ranges.
22055as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22056as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22057as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22058as_cr_digits='0123456789'
22059as_cr_alnum=$as_cr_Letters$as_cr_digits
22060
22061# The user is always right.
22062if test "${PATH_SEPARATOR+set}" != set; then
19650fd6
AS
22063 echo "#! /bin/sh" >conf$$.sh
22064 echo "exit 0" >>conf$$.sh
22065 chmod +x conf$$.sh
22066 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
22067 PATH_SEPARATOR=';'
22068 else
22069 PATH_SEPARATOR=:
22070 fi
19650fd6 22071 rm -f conf$$.sh
c0d27fcc
MR
22072fi
22073
22074
22075 as_lineno_1=$LINENO
22076 as_lineno_2=$LINENO
22077 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22078 test "x$as_lineno_1" != "x$as_lineno_2" &&
22079 test "x$as_lineno_3" = "x$as_lineno_2" || {
22080 # Find who we are. Look in the path if we contain no path at all
22081 # relative or not.
22082 case $0 in
22083 *[\\/]* ) as_myself=$0 ;;
22084 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22085for as_dir in $PATH
22086do
22087 IFS=$as_save_IFS
22088 test -z "$as_dir" && as_dir=.
22089 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22090done
22091
22092 ;;
22093 esac
22094 # We did not find ourselves, most probably we were run as `sh COMMAND'
22095 # in which case we are not to be found in the path.
22096 if test "x$as_myself" = x; then
22097 as_myself=$0
22098 fi
22099 if test ! -f "$as_myself"; then
22100 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22101echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22102 { (exit 1); exit 1; }; }
22103 fi
22104 case $CONFIG_SHELL in
22105 '')
22106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22107for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22108do
22109 IFS=$as_save_IFS
22110 test -z "$as_dir" && as_dir=.
22111 for as_base in sh bash ksh sh5; do
22112 case $as_dir in
22113 /*)
22114 if ("$as_dir/$as_base" -c '
22115 as_lineno_1=$LINENO
22116 as_lineno_2=$LINENO
22117 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22118 test "x$as_lineno_1" != "x$as_lineno_2" &&
22119 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
22120 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22121 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
22122 CONFIG_SHELL=$as_dir/$as_base
22123 export CONFIG_SHELL
22124 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22125 fi;;
22126 esac
22127 done
22128done
22129;;
22130 esac
22131
22132 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22133 # uniformly replaced by the line number. The first 'sed' inserts a
22134 # line-number line before each line; the second 'sed' does the real
22135 # work. The second script uses 'N' to pair each line-number line
22136 # with the numbered line, and appends trailing '-' during
22137 # substitution so that $LINENO is not a special case at line end.
22138 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22139 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
22140 sed '=' <$as_myself |
22141 sed '
22142 N
22143 s,$,-,
22144 : loop
22145 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22146 t loop
22147 s,-$,,
22148 s,^['$as_cr_digits']*\n,,
22149 ' >$as_me.lineno &&
22150 chmod +x $as_me.lineno ||
22151 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22152echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22153 { (exit 1); exit 1; }; }
22154
22155 # Don't try to exec as it changes $[0], causing all sort of problems
22156 # (the dirname of $[0] is not the place where we might find the
22157 # original and so on. Autoconf is especially sensible to this).
22158 . ./$as_me.lineno
22159 # Exit status is that of the last command.
22160 exit
22161}
22162
22163
22164case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22165 *c*,-n*) ECHO_N= ECHO_C='
22166' ECHO_T=' ' ;;
22167 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22168 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
22169esac
503d2be0
AS
22170
22171if expr a : '\(a\)' >/dev/null 2>&1; then
22172 as_expr=expr
22173else
22174 as_expr=false
22175fi
22176
22177rm -f conf$$ conf$$.exe conf$$.file
22178echo >conf$$.file
22179if ln -s conf$$.file conf$$ 2>/dev/null; then
22180 # We could just check for DJGPP; but this test a) works b) is more generic
22181 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22182 if test -f conf$$.exe; then
22183 # Don't use ln at all; we don't have any links
22184 as_ln_s='cp -p'
22185 else
22186 as_ln_s='ln -s'
22187 fi
22188elif ln conf$$.file conf$$ 2>/dev/null; then
22189 as_ln_s=ln
22190else
22191 as_ln_s='cp -p'
22192fi
22193rm -f conf$$ conf$$.exe conf$$.file
22194
6bae0ccf
DL
22195if mkdir -p . 2>/dev/null; then
22196 as_mkdir_p=:
22197else
35996d22 22198 test -d ./-p && rmdir ./-p
6bae0ccf
DL
22199 as_mkdir_p=false
22200fi
22201
503d2be0
AS
22202as_executable_p="test -f"
22203
c0d27fcc 22204# Sed expression to map a string onto a valid CPP name.
35996d22 22205as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
22206
22207# Sed expression to map a string onto a valid variable name.
35996d22 22208as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 22209
503d2be0
AS
22210
22211# IFS
22212# We need space, tab and new line, in precisely that order.
22213as_nl='
22214'
22215IFS=" $as_nl"
22216
22217# CDPATH.
6bae0ccf 22218$as_unset CDPATH
503d2be0
AS
22219
22220exec 6>&1
22221
c0d27fcc
MR
22222# Open the log real soon, to keep \$[0] and so on meaningful, and to
22223# report actual input values of CONFIG_FILES etc. instead of their
22224# values after options handling. Logging --version etc. is OK.
22225exec 5>>config.log
22226{
22227 echo
22228 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22229## Running $as_me. ##
22230_ASBOX
22231} >&5
22232cat >&5 <<_CSEOF
22233
22234This file was extended by $as_me, which was
35996d22 22235generated by GNU Autoconf 2.59. Invocation command line was
c0d27fcc
MR
22236
22237 CONFIG_FILES = $CONFIG_FILES
22238 CONFIG_HEADERS = $CONFIG_HEADERS
22239 CONFIG_LINKS = $CONFIG_LINKS
22240 CONFIG_COMMANDS = $CONFIG_COMMANDS
22241 $ $0 $@
22242
22243_CSEOF
22244echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22245echo >&5
503d2be0
AS
22246_ACEOF
22247
22248# Files that config.status was made for.
22249if test -n "$ac_config_files"; then
22250 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22251fi
22252
22253if test -n "$ac_config_headers"; then
22254 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22255fi
22256
22257if test -n "$ac_config_links"; then
22258 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22259fi
22260
22261if test -n "$ac_config_commands"; then
22262 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22263fi
22264
c0d27fcc 22265cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22266
22267ac_cs_usage="\
22268\`$as_me' instantiates files from templates according to the
22269current configuration.
22270
22271Usage: $0 [OPTIONS] [FILE]...
22272
22273 -h, --help print this help, then exit
22274 -V, --version print version number, then exit
19650fd6 22275 -q, --quiet do not print progress messages
503d2be0
AS
22276 -d, --debug don't remove temporary files
22277 --recheck update $as_me by reconfiguring in the same conditions
22278 --file=FILE[:TEMPLATE]
35996d22 22279 instantiate the configuration file FILE
503d2be0 22280 --header=FILE[:TEMPLATE]
35996d22 22281 instantiate the configuration header FILE
503d2be0
AS
22282
22283Configuration files:
22284$config_files
22285
22286Configuration headers:
22287$config_headers
22288
22289Configuration commands:
22290$config_commands
22291
22292Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 22293_ACEOF
503d2be0 22294
c0d27fcc 22295cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22296ac_cs_version="\\
22297config.status
35996d22 22298configured by $0, generated by GNU Autoconf 2.59,
503d2be0
AS
22299 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22300
35996d22 22301Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
22302This config.status script is free software; the Free Software Foundation
22303gives unlimited permission to copy, distribute and modify it."
22304srcdir=$srcdir
22305INSTALL="$INSTALL"
c0d27fcc 22306_ACEOF
503d2be0 22307
c0d27fcc 22308cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22309# If no file are specified by the user, then we need to provide default
22310# value. By we need to know if files were specified by the user.
22311ac_need_defaults=:
22312while test $# != 0
ba4481b5 22313do
503d2be0
AS
22314 case $1 in
22315 --*=*)
22316 ac_option=`expr "x$1" : 'x\([^=]*\)='`
22317 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
22318 ac_shift=:
22319 ;;
22320 -*)
22321 ac_option=$1
22322 ac_optarg=$2
22323 ac_shift=shift
503d2be0 22324 ;;
503d2be0
AS
22325 *) # This is not an option, so the user has probably given explicit
22326 # arguments.
6bae0ccf 22327 ac_option=$1
503d2be0
AS
22328 ac_need_defaults=false;;
22329 esac
22330
6bae0ccf 22331 case $ac_option in
503d2be0 22332 # Handling of the options.
c0d27fcc 22333_ACEOF
f57bd967 22334cat >>$CONFIG_STATUS <<\_ACEOF
19650fd6
AS
22335 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22336 ac_cs_recheck=: ;;
503d2be0
AS
22337 --version | --vers* | -V )
22338 echo "$ac_cs_version"; exit 0 ;;
22339 --he | --h)
22340 # Conflict between --help and --header
c0d27fcc 22341 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
22342Try \`$0 --help' for more information." >&5
22343echo "$as_me: error: ambiguous option: $1
22344Try \`$0 --help' for more information." >&2;}
22345 { (exit 1); exit 1; }; };;
22346 --help | --hel | -h )
22347 echo "$ac_cs_usage"; exit 0 ;;
22348 --debug | --d* | -d )
22349 debug=: ;;
22350 --file | --fil | --fi | --f )
6bae0ccf
DL
22351 $ac_shift
22352 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
22353 ac_need_defaults=false;;
22354 --header | --heade | --head | --hea )
6bae0ccf
DL
22355 $ac_shift
22356 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 22357 ac_need_defaults=false;;
19650fd6
AS
22358 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22359 | -silent | --silent | --silen | --sile | --sil | --si | --s)
22360 ac_cs_silent=: ;;
503d2be0
AS
22361
22362 # This is an error.
c0d27fcc 22363 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
22364Try \`$0 --help' for more information." >&5
22365echo "$as_me: error: unrecognized option: $1
22366Try \`$0 --help' for more information." >&2;}
22367 { (exit 1); exit 1; }; } ;;
22368
22369 *) ac_config_targets="$ac_config_targets $1" ;;
22370
ba4481b5 22371 esac
503d2be0 22372 shift
ba4481b5
DL
22373done
22374
19650fd6
AS
22375ac_configure_extra_args=
22376
22377if $ac_cs_silent; then
22378 exec 6>/dev/null
22379 ac_configure_extra_args="$ac_configure_extra_args --silent"
22380fi
22381
22382_ACEOF
22383cat >>$CONFIG_STATUS <<_ACEOF
22384if \$ac_cs_recheck; then
22385 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
22386 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22387fi
22388
503d2be0 22389_ACEOF
ba4481b5 22390
c0d27fcc 22391cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22392#
22393# INIT-COMMANDS section.
22394#
ba4481b5 22395
503d2be0
AS
22396GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
22397
c0d27fcc
MR
22398_ACEOF
22399
503d2be0 22400
c0d27fcc
MR
22401
22402cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22403for ac_config_target in $ac_config_targets
22404do
22405 case "$ac_config_target" in
22406 # Handling of arguments.
22407 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22408 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
22409 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
22410 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
22411 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
22412 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
22413 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 22414 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 22415 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
22416 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
22417 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22418 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 22419 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
22420echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22421 { (exit 1); exit 1; }; };;
22422 esac
ba4481b5 22423done
503d2be0
AS
22424
22425# If the user did not use the arguments to specify the items to instantiate,
22426# then the envvar interface is used. Set only those that are not.
22427# We use the long form for the default assignment because of an extremely
22428# bizarre bug on SunOS 4.1.3.
22429if $ac_need_defaults; then
22430 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22431 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22432 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 22433fi
503d2be0 22434
19650fd6
AS
22435# Have a temporary directory for convenience. Make it in the build tree
22436# simply because there is no reason to put it here, and in addition,
22437# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
22438# Create a temporary directory, and hook for its removal unless debugging.
22439$debug ||
22440{
22441 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22442 trap '{ (exit 1); exit 1; }' 1 2 13 15
22443}
22444
22445# Create a (secure) tmp directory for tmp files.
19650fd6 22446
503d2be0 22447{
19650fd6 22448 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
22449 test -n "$tmp" && test -d "$tmp"
22450} ||
22451{
19650fd6 22452 tmp=./confstat$$-$RANDOM
503d2be0
AS
22453 (umask 077 && mkdir $tmp)
22454} ||
22455{
19650fd6 22456 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
22457 { (exit 1); exit 1; }
22458}
22459
c0d27fcc 22460_ACEOF
503d2be0 22461
c0d27fcc 22462cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22463
22464#
22465# CONFIG_FILES section.
22466#
22467
22468# No need to generate the scripts if there are no CONFIG_FILES.
22469# This happens for instance when ./config.status config.h
22470if test -n "\$CONFIG_FILES"; then
22471 # Protect against being on the right side of a sed subst in config.status.
22472 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22473 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22474s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
22475s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22476s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22477s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22478s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22479s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22480s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
22481s,@exec_prefix@,$exec_prefix,;t t
22482s,@prefix@,$prefix,;t t
22483s,@program_transform_name@,$program_transform_name,;t t
22484s,@bindir@,$bindir,;t t
22485s,@sbindir@,$sbindir,;t t
22486s,@libexecdir@,$libexecdir,;t t
22487s,@datadir@,$datadir,;t t
22488s,@sysconfdir@,$sysconfdir,;t t
22489s,@sharedstatedir@,$sharedstatedir,;t t
22490s,@localstatedir@,$localstatedir,;t t
22491s,@libdir@,$libdir,;t t
22492s,@includedir@,$includedir,;t t
22493s,@oldincludedir@,$oldincludedir,;t t
22494s,@infodir@,$infodir,;t t
22495s,@mandir@,$mandir,;t t
503d2be0
AS
22496s,@build_alias@,$build_alias,;t t
22497s,@host_alias@,$host_alias,;t t
22498s,@target_alias@,$target_alias,;t t
c0d27fcc 22499s,@DEFS@,$DEFS,;t t
503d2be0
AS
22500s,@ECHO_C@,$ECHO_C,;t t
22501s,@ECHO_N@,$ECHO_N,;t t
22502s,@ECHO_T@,$ECHO_T,;t t
503d2be0 22503s,@LIBS@,$LIBS,;t t
19650fd6 22504s,@MAINT@,$MAINT,;t t
503d2be0
AS
22505s,@build@,$build,;t t
22506s,@build_cpu@,$build_cpu,;t t
22507s,@build_vendor@,$build_vendor,;t t
22508s,@build_os@,$build_os,;t t
22509s,@host@,$host,;t t
22510s,@host_cpu@,$host_cpu,;t t
22511s,@host_vendor@,$host_vendor,;t t
22512s,@host_os@,$host_os,;t t
22513s,@CC@,$CC,;t t
22514s,@CFLAGS@,$CFLAGS,;t t
22515s,@LDFLAGS@,$LDFLAGS,;t t
22516s,@CPPFLAGS@,$CPPFLAGS,;t t
22517s,@ac_ct_CC@,$ac_ct_CC,;t t
22518s,@EXEEXT@,$EXEEXT,;t t
22519s,@OBJEXT@,$OBJEXT,;t t
22520s,@LN_S@,$LN_S,;t t
22521s,@CPP@,$CPP,;t t
22522s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22523s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22524s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
22525s,@RANLIB@,$RANLIB,;t t
22526s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 22527s,@INSTALL_INFO@,$INSTALL_INFO,;t t
6bae0ccf 22528s,@EGREP@,$EGREP,;t t
503d2be0
AS
22529s,@LIBSOUND@,$LIBSOUND,;t t
22530s,@SET_MAKE@,$SET_MAKE,;t t
488dd4c4
JD
22531s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22532s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
22533s,@GTK_LIBS@,$GTK_LIBS,;t t
503d2be0
AS
22534s,@ALLOCA@,$ALLOCA,;t t
22535s,@liblockfile@,$liblockfile,;t t
22536s,@LIBOBJS@,$LIBOBJS,;t t
22537s,@NEED_SETGID@,$NEED_SETGID,;t t
22538s,@KMEM_GROUP@,$KMEM_GROUP,;t t
22539s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
22540s,@version@,$version,;t t
22541s,@configuration@,$configuration,;t t
22542s,@canonical@,$canonical,;t t
22543s,@srcdir@,$srcdir,;t t
22544s,@lispdir@,$lispdir,;t t
22545s,@locallisppath@,$locallisppath,;t t
22546s,@lisppath@,$lisppath,;t t
22547s,@x_default_search_path@,$x_default_search_path,;t t
22548s,@etcdir@,$etcdir,;t t
22549s,@archlibdir@,$archlibdir,;t t
22550s,@docdir@,$docdir,;t t
22551s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
22552s,@gamedir@,$gamedir,;t t
22553s,@gameuser@,$gameuser,;t t
503d2be0
AS
22554s,@c_switch_system@,$c_switch_system,;t t
22555s,@c_switch_machine@,$c_switch_machine,;t t
22556s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
22557s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
22558s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
22559s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
22560s,@machfile@,$machfile,;t t
22561s,@opsysfile@,$opsysfile,;t t
6a3a24fa 22562s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 22563s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
22564CEOF
22565
c0d27fcc 22566_ACEOF
ba4481b5 22567
c0d27fcc 22568 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22569 # Split the substitutions into bite-sized pieces for seds with
22570 # small command number limits, like on Digital OSF/1 and HP-UX.
22571 ac_max_sed_lines=48
22572 ac_sed_frag=1 # Number of current file.
22573 ac_beg=1 # First line for current file.
22574 ac_end=$ac_max_sed_lines # Line after last line for current file.
22575 ac_more_lines=:
22576 ac_sed_cmds=
22577 while $ac_more_lines; do
22578 if test $ac_beg -gt 1; then
22579 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22580 else
22581 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22582 fi
22583 if test ! -s $tmp/subs.frag; then
22584 ac_more_lines=false
22585 else
22586 # The purpose of the label and of the branching condition is to
22587 # speed up the sed processing (if there are no `@' at all, there
22588 # is no need to browse any of the substitutions).
22589 # These are the two extra sed commands mentioned above.
22590 (echo ':t
22591 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22592 if test -z "$ac_sed_cmds"; then
35996d22 22593 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0 22594 else
35996d22 22595 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0
AS
22596 fi
22597 ac_sed_frag=`expr $ac_sed_frag + 1`
22598 ac_beg=$ac_end
22599 ac_end=`expr $ac_end + $ac_max_sed_lines`
22600 fi
22601 done
22602 if test -z "$ac_sed_cmds"; then
22603 ac_sed_cmds=cat
22604 fi
22605fi # test -n "$CONFIG_FILES"
ba4481b5 22606
c0d27fcc
MR
22607_ACEOF
22608cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 22609for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 22610 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
22611 case $ac_file in
22612 - | *:- | *:-:* ) # input from stdin
35996d22
AS
22613 cat >$tmp/stdin
22614 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22615 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22616 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
35996d22 22617 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22618 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
22619 esac
22620
503d2be0 22621 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
22622 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22623$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22624 X"$ac_file" : 'X\(//\)[^/]' \| \
22625 X"$ac_file" : 'X\(//\)$' \| \
22626 X"$ac_file" : 'X\(/\)' \| \
22627 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
22628echo X"$ac_file" |
22629 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22630 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22631 /^X\(\/\/\)$/{ s//\1/; q; }
22632 /^X\(\/\).*/{ s//\1/; q; }
22633 s/.*/./; q'`
6bae0ccf
DL
22634 { if $as_mkdir_p; then
22635 mkdir -p "$ac_dir"
22636 else
22637 as_dir="$ac_dir"
22638 as_dirs=
22639 while test ! -d "$as_dir"; do
22640 as_dirs="$as_dir $as_dirs"
22641 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22642$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22643 X"$as_dir" : 'X\(//\)[^/]' \| \
22644 X"$as_dir" : 'X\(//\)$' \| \
22645 X"$as_dir" : 'X\(/\)' \| \
22646 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
22647echo X"$as_dir" |
22648 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22649 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22650 /^X\(\/\/\)$/{ s//\1/; q; }
22651 /^X\(\/\).*/{ s//\1/; q; }
22652 s/.*/./; q'`
22653 done
22654 test ! -n "$as_dirs" || mkdir $as_dirs
22655 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22656echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22657 { (exit 1); exit 1; }; }; }
503d2be0 22658
c0d27fcc 22659 ac_builddir=.
98418dba 22660
c0d27fcc
MR
22661if test "$ac_dir" != .; then
22662 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22663 # A "../" for each directory in $ac_dir_suffix.
22664 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22665else
22666 ac_dir_suffix= ac_top_builddir=
22667fi
22668
22669case $srcdir in
22670 .) # No --srcdir option. We are building in place.
22671 ac_srcdir=.
22672 if test -z "$ac_top_builddir"; then
22673 ac_top_srcdir=.
22674 else
22675 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22676 fi ;;
22677 [\\/]* | ?:[\\/]* ) # Absolute path.
22678 ac_srcdir=$srcdir$ac_dir_suffix;
22679 ac_top_srcdir=$srcdir ;;
ba4481b5 22680 *) # Relative path.
c0d27fcc
MR
22681 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22682 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22683esac
35996d22
AS
22684
22685# Do not use `cd foo && pwd` to compute absolute paths, because
22686# the directories may not exist.
22687case `pwd` in
22688.) ac_abs_builddir="$ac_dir";;
22689*)
22690 case "$ac_dir" in
22691 .) ac_abs_builddir=`pwd`;;
22692 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22693 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22694 esac;;
22695esac
22696case $ac_abs_builddir in
22697.) ac_abs_top_builddir=${ac_top_builddir}.;;
22698*)
22699 case ${ac_top_builddir}. in
22700 .) ac_abs_top_builddir=$ac_abs_builddir;;
22701 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22702 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22703 esac;;
22704esac
22705case $ac_abs_builddir in
22706.) ac_abs_srcdir=$ac_srcdir;;
22707*)
22708 case $ac_srcdir in
22709 .) ac_abs_srcdir=$ac_abs_builddir;;
22710 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22711 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22712 esac;;
22713esac
22714case $ac_abs_builddir in
22715.) ac_abs_top_srcdir=$ac_top_srcdir;;
22716*)
22717 case $ac_top_srcdir in
22718 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22719 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22720 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22721 esac;;
22722esac
c0d27fcc 22723
ba4481b5 22724
503d2be0
AS
22725 case $INSTALL in
22726 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 22727 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
22728 esac
22729
503d2be0
AS
22730 # Let's still pretend it is `configure' which instantiates (i.e., don't
22731 # use $as_me), people would be surprised to read:
c0d27fcc
MR
22732 # /* config.h. Generated by config.status. */
22733 if test x"$ac_file" = x-; then
22734 configure_input=
22735 else
22736 configure_input="$ac_file. "
22737 fi
22738 configure_input=$configure_input"Generated from `echo $ac_file_in |
35996d22 22739 sed 's,.*/,,'` by configure."
503d2be0
AS
22740
22741 # First look for the input files in the build tree, otherwise in the
22742 # src tree.
22743 ac_file_inputs=`IFS=:
22744 for f in $ac_file_in; do
22745 case $f in
22746 -) echo $tmp/stdin ;;
22747 [\\/$]*)
35996d22
AS
22748 # Absolute (can't be DOS-style, as IFS=:)
22749 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22750echo "$as_me: error: cannot find input file: $f" >&2;}
22751 { (exit 1); exit 1; }; }
35996d22 22752 echo "$f";;
503d2be0 22753 *) # Relative
35996d22
AS
22754 if test -f "$f"; then
22755 # Build tree
22756 echo "$f"
22757 elif test -f "$srcdir/$f"; then
22758 # Source tree
22759 echo "$srcdir/$f"
22760 else
22761 # /dev/null tree
22762 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22763echo "$as_me: error: cannot find input file: $f" >&2;}
22764 { (exit 1); exit 1; }; }
35996d22 22765 fi;;
503d2be0
AS
22766 esac
22767 done` || { (exit 1); exit 1; }
9adfabc2
LK
22768
22769 if test x"$ac_file" != x-; then
22770 { echo "$as_me:$LINENO: creating $ac_file" >&5
22771echo "$as_me: creating $ac_file" >&6;}
22772 rm -f "$ac_file"
22773 fi
c0d27fcc
MR
22774_ACEOF
22775cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22776 sed "$ac_vpsub
22777$extrasub
c0d27fcc
MR
22778_ACEOF
22779cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22780:t
22781/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22782s,@configure_input@,$configure_input,;t t
22783s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 22784s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 22785s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
22786s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22787s,@builddir@,$ac_builddir,;t t
22788s,@abs_builddir@,$ac_abs_builddir,;t t
22789s,@top_builddir@,$ac_top_builddir,;t t
22790s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
22791s,@INSTALL@,$ac_INSTALL,;t t
22792" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22793 rm -f $tmp/stdin
22794 if test x"$ac_file" != x-; then
22795 mv $tmp/out $ac_file
22796 else
22797 cat $tmp/out
22798 rm -f $tmp/out
22799 fi
22800
22801done
c0d27fcc
MR
22802_ACEOF
22803cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 22804
503d2be0
AS
22805#
22806# CONFIG_HEADER section.
22807#
ba4481b5
DL
22808
22809# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22810# NAME is the cpp macro being defined and VALUE is the value it is being given.
22811#
22812# ac_d sets the value in "#define NAME VALUE" lines.
35996d22
AS
22813ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22814ac_dB='[ ].*$,\1#\2'
503d2be0
AS
22815ac_dC=' '
22816ac_dD=',;t'
22817# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
35996d22 22818ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
503d2be0 22819ac_uB='$,\1#\2define\3'
ba4481b5 22820ac_uC=' '
503d2be0 22821ac_uD=',;t'
ba4481b5 22822
503d2be0 22823for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 22824 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
22825 case $ac_file in
22826 - | *:- | *:-:* ) # input from stdin
35996d22
AS
22827 cat >$tmp/stdin
22828 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22829 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22830 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
35996d22 22831 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22832 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
22833 esac
22834
c0d27fcc 22835 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
22836echo "$as_me: creating $ac_file" >&6;}
22837
22838 # First look for the input files in the build tree, otherwise in the
22839 # src tree.
22840 ac_file_inputs=`IFS=:
22841 for f in $ac_file_in; do
22842 case $f in
22843 -) echo $tmp/stdin ;;
22844 [\\/$]*)
35996d22
AS
22845 # Absolute (can't be DOS-style, as IFS=:)
22846 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22847echo "$as_me: error: cannot find input file: $f" >&2;}
22848 { (exit 1); exit 1; }; }
35996d22
AS
22849 # Do quote $f, to prevent DOS paths from being IFS'd.
22850 echo "$f";;
503d2be0 22851 *) # Relative
35996d22
AS
22852 if test -f "$f"; then
22853 # Build tree
22854 echo "$f"
22855 elif test -f "$srcdir/$f"; then
22856 # Source tree
22857 echo "$srcdir/$f"
22858 else
22859 # /dev/null tree
22860 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22861echo "$as_me: error: cannot find input file: $f" >&2;}
22862 { (exit 1); exit 1; }; }
35996d22 22863 fi;;
503d2be0
AS
22864 esac
22865 done` || { (exit 1); exit 1; }
22866 # Remove the trailing spaces.
35996d22 22867 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
503d2be0 22868
c0d27fcc 22869_ACEOF
503d2be0
AS
22870
22871# Transform confdefs.h into two sed scripts, `conftest.defines' and
22872# `conftest.undefs', that substitutes the proper values into
22873# config.h.in to produce config.h. The first handles `#define'
22874# templates, and the second `#undef' templates.
22875# And first: Protect against being on the right side of a sed subst in
22876# config.status. Protect against being in an unquoted here document
22877# in config.status.
22878rm -f conftest.defines conftest.undefs
22879# Using a here document instead of a string reduces the quoting nightmare.
22880# Putting comments in sed scripts is not portable.
22881#
22882# `end' is used to avoid that the second main sed command (meant for
22883# 0-ary CPP macros) applies to n-ary macro definitions.
22884# See the Autoconf documentation for `clear'.
c0d27fcc 22885cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
22886s/[\\&,]/\\&/g
22887s,[\\$`],\\&,g
22888t clear
22889: clear
35996d22 22890s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0 22891t end
35996d22 22892s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
503d2be0 22893: end
c0d27fcc 22894_ACEOF
503d2be0
AS
22895# If some macros were called several times there might be several times
22896# the same #defines, which is useless. Nevertheless, we may not want to
22897# sort them, since we want the *last* AC-DEFINE to be honored.
22898uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22899sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22900rm -f confdef2sed.sed
ba4481b5
DL
22901
22902# This sed command replaces #undef with comments. This is necessary, for
22903# example, in the case of _POSIX_SOURCE, which is predefined and required
22904# on some systems where configure will not decide to define it.
c0d27fcc 22905cat >>conftest.undefs <<\_ACEOF
35996d22 22906s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 22907_ACEOF
ba4481b5 22908
503d2be0
AS
22909# Break up conftest.defines because some shells have a limit on the size
22910# of here documents, and old seds have small limits too (100 cmds).
22911echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
35996d22 22912echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
22913echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22914echo ' :' >>$CONFIG_STATUS
22915rm -f conftest.tail
22916while grep . conftest.defines >/dev/null
22917do
22918 # Write a limited-size here document to $tmp/defines.sed.
22919 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22920 # Speed up: don't consider the non `#define' lines.
35996d22 22921 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
503d2be0
AS
22922 # Work around the forget-to-reset-the-flag bug.
22923 echo 't clr' >>$CONFIG_STATUS
22924 echo ': clr' >>$CONFIG_STATUS
22925 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
22926 echo 'CEOF
22927 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22928 rm -f $tmp/in
22929 mv $tmp/out $tmp/in
22930' >>$CONFIG_STATUS
22931 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
22932 rm -f conftest.defines
22933 mv conftest.tail conftest.defines
22934done
22935rm -f conftest.defines
6bae0ccf 22936echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 22937echo >>$CONFIG_STATUS
ba4481b5 22938
503d2be0
AS
22939# Break up conftest.undefs because some shells have a limit on the size
22940# of here documents, and old seds have small limits too (100 cmds).
22941echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 22942rm -f conftest.tail
503d2be0 22943while grep . conftest.undefs >/dev/null
ba4481b5 22944do
503d2be0
AS
22945 # Write a limited-size here document to $tmp/undefs.sed.
22946 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22947 # Speed up: don't consider the non `#undef'
35996d22 22948 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
503d2be0
AS
22949 # Work around the forget-to-reset-the-flag bug.
22950 echo 't clr' >>$CONFIG_STATUS
22951 echo ': clr' >>$CONFIG_STATUS
22952 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 22953 echo 'CEOF
503d2be0
AS
22954 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22955 rm -f $tmp/in
22956 mv $tmp/out $tmp/in
22957' >>$CONFIG_STATUS
22958 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22959 rm -f conftest.undefs
22960 mv conftest.tail conftest.undefs
ba4481b5 22961done
503d2be0
AS
22962rm -f conftest.undefs
22963
c0d27fcc 22964cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22965 # Let's still pretend it is `configure' which instantiates (i.e., don't
22966 # use $as_me), people would be surprised to read:
c0d27fcc 22967 # /* config.h. Generated by config.status. */
503d2be0 22968 if test x"$ac_file" = x-; then
c0d27fcc 22969 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 22970 else
c0d27fcc 22971 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
22972 fi
22973 cat $tmp/in >>$tmp/config.h
22974 rm -f $tmp/in
22975 if test x"$ac_file" != x-; then
19650fd6 22976 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 22977 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
22978echo "$as_me: $ac_file is unchanged" >&6;}
22979 else
c0d27fcc
MR
22980 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22981$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22982 X"$ac_file" : 'X\(//\)[^/]' \| \
22983 X"$ac_file" : 'X\(//\)$' \| \
22984 X"$ac_file" : 'X\(/\)' \| \
22985 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
22986echo X"$ac_file" |
22987 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22988 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22989 /^X\(\/\/\)$/{ s//\1/; q; }
22990 /^X\(\/\).*/{ s//\1/; q; }
22991 s/.*/./; q'`
6bae0ccf
DL
22992 { if $as_mkdir_p; then
22993 mkdir -p "$ac_dir"
22994 else
22995 as_dir="$ac_dir"
22996 as_dirs=
22997 while test ! -d "$as_dir"; do
22998 as_dirs="$as_dir $as_dirs"
22999 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23000$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
23001 X"$as_dir" : 'X\(//\)[^/]' \| \
23002 X"$as_dir" : 'X\(//\)$' \| \
23003 X"$as_dir" : 'X\(/\)' \| \
23004 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
23005echo X"$as_dir" |
23006 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23007 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23008 /^X\(\/\/\)$/{ s//\1/; q; }
23009 /^X\(\/\).*/{ s//\1/; q; }
23010 s/.*/./; q'`
23011 done
23012 test ! -n "$as_dirs" || mkdir $as_dirs
23013 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23014echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23015 { (exit 1); exit 1; }; }; }
503d2be0 23016
503d2be0
AS
23017 rm -f $ac_file
23018 mv $tmp/config.h $ac_file
ba4481b5 23019 fi
503d2be0
AS
23020 else
23021 cat $tmp/config.h
23022 rm -f $tmp/config.h
ba4481b5 23023 fi
503d2be0 23024done
c0d27fcc
MR
23025_ACEOF
23026cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23027
23028#
23029# CONFIG_COMMANDS section.
23030#
23031for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23032 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23033 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
23034 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
23035$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
23036 X"$ac_dest" : 'X\(//\)[^/]' \| \
23037 X"$ac_dest" : 'X\(//\)$' \| \
23038 X"$ac_dest" : 'X\(/\)' \| \
23039 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
23040echo X"$ac_dest" |
23041 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23042 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23043 /^X\(\/\/\)$/{ s//\1/; q; }
23044 /^X\(\/\).*/{ s//\1/; q; }
23045 s/.*/./; q'`
35996d22
AS
23046 { if $as_mkdir_p; then
23047 mkdir -p "$ac_dir"
23048 else
23049 as_dir="$ac_dir"
23050 as_dirs=
23051 while test ! -d "$as_dir"; do
23052 as_dirs="$as_dir $as_dirs"
23053 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23054$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23055 X"$as_dir" : 'X\(//\)[^/]' \| \
23056 X"$as_dir" : 'X\(//\)$' \| \
23057 X"$as_dir" : 'X\(/\)' \| \
23058 . : '\(.\)' 2>/dev/null ||
23059echo X"$as_dir" |
23060 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23061 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23062 /^X\(\/\/\)$/{ s//\1/; q; }
23063 /^X\(\/\).*/{ s//\1/; q; }
23064 s/.*/./; q'`
23065 done
23066 test ! -n "$as_dirs" || mkdir $as_dirs
23067 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23068echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23069 { (exit 1); exit 1; }; }; }
23070
c0d27fcc
MR
23071 ac_builddir=.
23072
23073if test "$ac_dir" != .; then
23074 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23075 # A "../" for each directory in $ac_dir_suffix.
23076 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23077else
23078 ac_dir_suffix= ac_top_builddir=
23079fi
23080
23081case $srcdir in
23082 .) # No --srcdir option. We are building in place.
23083 ac_srcdir=.
23084 if test -z "$ac_top_builddir"; then
23085 ac_top_srcdir=.
23086 else
23087 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23088 fi ;;
23089 [\\/]* | ?:[\\/]* ) # Absolute path.
23090 ac_srcdir=$srcdir$ac_dir_suffix;
23091 ac_top_srcdir=$srcdir ;;
23092 *) # Relative path.
23093 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23094 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23095esac
35996d22
AS
23096
23097# Do not use `cd foo && pwd` to compute absolute paths, because
23098# the directories may not exist.
23099case `pwd` in
23100.) ac_abs_builddir="$ac_dir";;
23101*)
23102 case "$ac_dir" in
23103 .) ac_abs_builddir=`pwd`;;
23104 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23105 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23106 esac;;
23107esac
23108case $ac_abs_builddir in
23109.) ac_abs_top_builddir=${ac_top_builddir}.;;
23110*)
23111 case ${ac_top_builddir}. in
23112 .) ac_abs_top_builddir=$ac_abs_builddir;;
23113 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23114 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23115 esac;;
23116esac
23117case $ac_abs_builddir in
23118.) ac_abs_srcdir=$ac_srcdir;;
23119*)
23120 case $ac_srcdir in
23121 .) ac_abs_srcdir=$ac_abs_builddir;;
23122 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23123 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23124 esac;;
23125esac
23126case $ac_abs_builddir in
23127.) ac_abs_top_srcdir=$ac_top_srcdir;;
23128*)
23129 case $ac_top_srcdir in
23130 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23131 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23132 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23133 esac;;
23134esac
ba4481b5 23135
c0d27fcc
MR
23136
23137 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
23138echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
23139 case $ac_dest in
23140 default )
ba4481b5
DL
23141
23142### Make the necessary directories, if they don't exist.
23143for dir in etc lisp ; do
23144 test -d ${dir} || mkdir ${dir}
23145done
23146
23147# Build src/Makefile from ${srcdir}/src/Makefile.c
23148# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
23149# This must be done after src/config.h is built, since we rely on that file.
23150
23151# Now get this: Some word that is part of the ${srcdir} directory name
23152# or the ${configuration} value might, just might, happen to be an
23153# identifier like `sun4' or `i386' or something, and be predefined by
23154# the C preprocessor to some helpful value like 1, or maybe the empty
23155# string. Needless to say consequent macro substitutions are less
23156# than conducive to the makefile finding the correct directory.
23157undefs="`echo $top_srcdir $configuration $canonical |
23158sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
23159 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
23160`"
23161
23162echo creating src/epaths.h
4aa6b955 23163${MAKE-make} epaths-force
ba4481b5 23164
1c203d4c
DL
23165# As of 2000-11-19, newest development versions of GNU cpp preprocess
23166# `..' to `. .' unless invoked with -traditional
23167
d0e9bfd2 23168if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
23169 CPPFLAGS="$CPPFLAGS -traditional"
23170fi
23171
ba4481b5
DL
23172echo creating lib-src/Makefile
23173( cd lib-src
23174 rm -f junk.c junk1.c junk2.c
23175 sed -e '/start of cpp stuff/q' \
23176 < Makefile.c > junk1.c
23177 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 23178 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 23179 < Makefile.c > junk.c
503d2be0 23180 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
23181 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
23182 cat junk1.c junk2.c > Makefile.new
23183 rm -f junk.c junk1.c junk2.c
23184 chmod 444 Makefile.new
23185 mv -f Makefile.new Makefile
23186)
23187
23188echo creating src/Makefile
23189( cd src
23190 rm -f junk.c junk1.c junk2.c
23191 sed -e '/start of cpp stuff/q' \
23192 < Makefile.c > junk1.c
23193 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 23194 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 23195 < Makefile.c > junk.c
503d2be0 23196 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
23197 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
23198 cat junk1.c junk2.c > Makefile.new
23199 rm -f junk.c junk1.c junk2.c
23200 chmod 444 Makefile.new
23201 mv -f Makefile.new Makefile
23202)
23203
503d2be0 23204if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 23205 echo creating src/.gdbinit
503d2be0 23206 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
23207fi
23208
23209# This is how we know whether to re-run configure in certain cases.
23210touch src/config.stamp
23211
503d2be0
AS
23212 ;;
23213 esac
23214done
c0d27fcc 23215_ACEOF
503d2be0 23216
c0d27fcc 23217cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 23218
503d2be0 23219{ (exit 0); exit 0; }
c0d27fcc 23220_ACEOF
ba4481b5 23221chmod +x $CONFIG_STATUS
503d2be0
AS
23222ac_clean_files=$ac_clean_files_save
23223
c0d27fcc 23224
503d2be0
AS
23225# configure is writing to config.log, and then calls config.status.
23226# config.status does its own redirection, appending to config.log.
23227# Unfortunately, on DOS this fails, as config.log is still kept open
23228# by configure, so config.status won't be able to write to it; its
23229# output is simply discarded. So we exec the FD to /dev/null,
23230# effectively closing config.log, so it can be properly (re)opened and
23231# appended to by config.status. When coming back to configure, we
23232# need to make the FD available again.
23233if test "$no_create" != yes; then
23234 ac_cs_success=:
19650fd6
AS
23235 ac_config_status_args=
23236 test "$silent" = yes &&
23237 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 23238 exec 5>/dev/null
19650fd6 23239 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
23240 exec 5>>config.log
23241 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23242 # would make configure fail if this is the last instruction.
23243 $ac_cs_success || { (exit 1); exit 1; }
23244fi
f5f47add 23245
c0d27fcc 23246