(query-replace-lazy-highlight): Add lazy-highlight group.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
35996d22 3# Generated by GNU Autoconf 2.59.
ba4481b5 4#
35996d22 5# Copyright (C) 2003 Free Software Foundation, Inc.
ba4481b5
DL
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
c0d27fcc
MR
8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
503d2be0
AS
11
12# Be Bourne compatible
13if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
15 NULLCMD=:
6bae0ccf
DL
16 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17 # is contrary to our usage. Disable this feature.
18 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
21fi
35996d22 22DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 23
c0d27fcc 24# Support unset when possible.
35996d22 25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
26 as_unset=unset
27else
28 as_unset=false
29fi
30
6bae0ccf
DL
31
32# Work around bugs in pre-3.0 UWIN ksh.
33$as_unset ENV MAIL MAILPATH
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
19650fd6
AS
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
6bae0ccf 43do
35996d22 44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
45 eval $as_var=C; export $as_var
46 else
47 $as_unset $as_var
48 fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54else
55 as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60else
61 as_basename=false
62fi
c0d27fcc
MR
63
64
503d2be0 65# Name of the executable.
6bae0ccf 66as_me=`$as_basename "$0" ||
c0d27fcc
MR
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
76
6bae0ccf 77
c0d27fcc
MR
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
19650fd6
AS
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
19650fd6 96 rm -f conf$$.sh
c0d27fcc
MR
97fi
98
99
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
116
117 ;;
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
137 /*)
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
166 N
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
184}
185
186
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
192esac
503d2be0
AS
193
194if expr a : '\(a\)' >/dev/null 2>&1; then
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
207 as_ln_s='cp -p'
208 else
209 as_ln_s='ln -s'
210 fi
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
216rm -f conf$$ conf$$.exe conf$$.file
217
6bae0ccf
DL
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
35996d22 221 test -d ./-p && rmdir ./-p
6bae0ccf
DL
222 as_mkdir_p=false
223fi
224
503d2be0
AS
225as_executable_p="test -f"
226
c0d27fcc 227# Sed expression to map a string onto a valid CPP name.
35996d22 228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
229
230# Sed expression to map a string onto a valid variable name.
35996d22 231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 232
503d2be0
AS
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
6bae0ccf 241$as_unset CDPATH
c0d27fcc 242
503d2be0
AS
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
ba4481b5 254ac_default_prefix=/usr/local
6bae0ccf 255ac_config_libobj_dir=.
503d2be0
AS
256cross_compiling=no
257subdirs=
c0d27fcc
MR
258MFLAGS=
259MAKEFLAGS=
503d2be0
AS
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
c0d27fcc
MR
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
503d2be0 274ac_unique_file="src/lisp.h"
6bae0ccf 275ac_config_libobj_dir=src
503d2be0
AS
276# Factoring default headers for most tests.
277ac_includes_default="\
278#include <stdio.h>
279#if HAVE_SYS_TYPES_H
280# include <sys/types.h>
281#endif
282#if HAVE_SYS_STAT_H
283# include <sys/stat.h>
284#endif
285#if STDC_HEADERS
286# include <stdlib.h>
287# include <stddef.h>
288#else
289# if HAVE_STDLIB_H
290# include <stdlib.h>
291# endif
292#endif
293#if HAVE_STRING_H
294# if !STDC_HEADERS && HAVE_MEMORY_H
295# include <memory.h>
296# endif
297# include <string.h>
298#endif
299#if HAVE_STRINGS_H
300# include <strings.h>
301#endif
302#if HAVE_INTTYPES_H
303# include <inttypes.h>
304#else
305# if HAVE_STDINT_H
306# include <stdint.h>
307# endif
308#endif
309#if HAVE_UNISTD_H
310# include <unistd.h>
311#endif"
ba4481b5 312
f17e308a 313ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO EGREP LIBSOUND SET_MAKE PKG_CONFIG GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS'
6bae0ccf 314ac_subst_files=''
c0d27fcc 315
ba4481b5 316# Initialize some variables set by options.
503d2be0
AS
317ac_init_help=
318ac_init_version=false
ba4481b5
DL
319# The variables have the same names as the options, with
320# dashes changed to underlines.
503d2be0 321cache_file=/dev/null
ba4481b5 322exec_prefix=NONE
ba4481b5 323no_create=
ba4481b5
DL
324no_recursion=
325prefix=NONE
326program_prefix=NONE
327program_suffix=NONE
328program_transform_name=s,x,x,
329silent=
330site=
331srcdir=
ba4481b5
DL
332verbose=
333x_includes=NONE
334x_libraries=NONE
503d2be0
AS
335
336# Installation directory options.
337# These are left unexpanded so users can "make install exec_prefix=/foo"
338# and all the variables that are supposed to be based on exec_prefix
339# by default will actually change.
340# Use braces instead of parens because sh, perl, etc. also accept them.
ba4481b5
DL
341bindir='${exec_prefix}/bin'
342sbindir='${exec_prefix}/sbin'
343libexecdir='${exec_prefix}/libexec'
344datadir='${prefix}/share'
345sysconfdir='${prefix}/etc'
346sharedstatedir='${prefix}/com'
347localstatedir='${prefix}/var'
348libdir='${exec_prefix}/lib'
349includedir='${prefix}/include'
350oldincludedir='/usr/include'
351infodir='${prefix}/info'
352mandir='${prefix}/man'
353
ba4481b5
DL
354ac_prev=
355for ac_option
356do
ba4481b5
DL
357 # If the previous option needs an argument, assign it.
358 if test -n "$ac_prev"; then
359 eval "$ac_prev=\$ac_option"
360 ac_prev=
361 continue
362 fi
363
503d2be0 364 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
ba4481b5
DL
365
366 # Accept the important Cygnus configure options, so we can diagnose typos.
367
503d2be0 368 case $ac_option in
ba4481b5
DL
369
370 -bindir | --bindir | --bindi | --bind | --bin | --bi)
371 ac_prev=bindir ;;
372 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 373 bindir=$ac_optarg ;;
ba4481b5
DL
374
375 -build | --build | --buil | --bui | --bu)
503d2be0 376 ac_prev=build_alias ;;
ba4481b5 377 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 378 build_alias=$ac_optarg ;;
ba4481b5
DL
379
380 -cache-file | --cache-file | --cache-fil | --cache-fi \
381 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
382 ac_prev=cache_file ;;
383 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
384 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
385 cache_file=$ac_optarg ;;
386
387 --config-cache | -C)
388 cache_file=config.cache ;;
ba4481b5
DL
389
390 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
391 ac_prev=datadir ;;
392 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
393 | --da=*)
503d2be0 394 datadir=$ac_optarg ;;
ba4481b5
DL
395
396 -disable-* | --disable-*)
503d2be0 397 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 398 # Reject names that are not valid shell variable names.
503d2be0
AS
399 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
401 { (exit 1); exit 1; }; }
402 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
403 eval "enable_$ac_feature=no" ;;
ba4481b5
DL
404
405 -enable-* | --enable-*)
503d2be0 406 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 407 # Reject names that are not valid shell variable names.
503d2be0
AS
408 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
409 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
410 { (exit 1); exit 1; }; }
411 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
412 case $ac_option in
413 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
414 *) ac_optarg=yes ;;
415 esac
503d2be0 416 eval "enable_$ac_feature='$ac_optarg'" ;;
ba4481b5
DL
417
418 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
419 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
420 | --exec | --exe | --ex)
421 ac_prev=exec_prefix ;;
422 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
423 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
424 | --exec=* | --exe=* | --ex=*)
503d2be0 425 exec_prefix=$ac_optarg ;;
ba4481b5
DL
426
427 -gas | --gas | --ga | --g)
428 # Obsolete; use --with-gas.
429 with_gas=yes ;;
430
503d2be0
AS
431 -help | --help | --hel | --he | -h)
432 ac_init_help=long ;;
433 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
434 ac_init_help=recursive ;;
435 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
436 ac_init_help=short ;;
ba4481b5
DL
437
438 -host | --host | --hos | --ho)
503d2be0 439 ac_prev=host_alias ;;
ba4481b5 440 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 441 host_alias=$ac_optarg ;;
ba4481b5
DL
442
443 -includedir | --includedir | --includedi | --included | --include \
444 | --includ | --inclu | --incl | --inc)
445 ac_prev=includedir ;;
446 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
447 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 448 includedir=$ac_optarg ;;
ba4481b5
DL
449
450 -infodir | --infodir | --infodi | --infod | --info | --inf)
451 ac_prev=infodir ;;
452 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 453 infodir=$ac_optarg ;;
ba4481b5
DL
454
455 -libdir | --libdir | --libdi | --libd)
456 ac_prev=libdir ;;
457 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 458 libdir=$ac_optarg ;;
ba4481b5
DL
459
460 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
461 | --libexe | --libex | --libe)
462 ac_prev=libexecdir ;;
463 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
464 | --libexe=* | --libex=* | --libe=*)
503d2be0 465 libexecdir=$ac_optarg ;;
ba4481b5
DL
466
467 -localstatedir | --localstatedir | --localstatedi | --localstated \
468 | --localstate | --localstat | --localsta | --localst \
469 | --locals | --local | --loca | --loc | --lo)
470 ac_prev=localstatedir ;;
471 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
472 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
473 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
503d2be0 474 localstatedir=$ac_optarg ;;
ba4481b5
DL
475
476 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
477 ac_prev=mandir ;;
478 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 479 mandir=$ac_optarg ;;
ba4481b5
DL
480
481 -nfp | --nfp | --nf)
482 # Obsolete; use --without-fp.
483 with_fp=no ;;
484
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 486 | --no-cr | --no-c | -n)
ba4481b5
DL
487 no_create=yes ;;
488
489 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
490 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
491 no_recursion=yes ;;
492
493 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
494 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
495 | --oldin | --oldi | --old | --ol | --o)
496 ac_prev=oldincludedir ;;
497 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
498 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
499 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 500 oldincludedir=$ac_optarg ;;
ba4481b5
DL
501
502 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
503 ac_prev=prefix ;;
504 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 505 prefix=$ac_optarg ;;
ba4481b5
DL
506
507 -program-prefix | --program-prefix | --program-prefi | --program-pref \
508 | --program-pre | --program-pr | --program-p)
509 ac_prev=program_prefix ;;
510 -program-prefix=* | --program-prefix=* | --program-prefi=* \
511 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 512 program_prefix=$ac_optarg ;;
ba4481b5
DL
513
514 -program-suffix | --program-suffix | --program-suffi | --program-suff \
515 | --program-suf | --program-su | --program-s)
516 ac_prev=program_suffix ;;
517 -program-suffix=* | --program-suffix=* | --program-suffi=* \
518 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 519 program_suffix=$ac_optarg ;;
ba4481b5
DL
520
521 -program-transform-name | --program-transform-name \
522 | --program-transform-nam | --program-transform-na \
523 | --program-transform-n | --program-transform- \
524 | --program-transform | --program-transfor \
525 | --program-transfo | --program-transf \
526 | --program-trans | --program-tran \
527 | --progr-tra | --program-tr | --program-t)
528 ac_prev=program_transform_name ;;
529 -program-transform-name=* | --program-transform-name=* \
530 | --program-transform-nam=* | --program-transform-na=* \
531 | --program-transform-n=* | --program-transform-=* \
532 | --program-transform=* | --program-transfor=* \
533 | --program-transfo=* | --program-transf=* \
534 | --program-trans=* | --program-tran=* \
535 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 536 program_transform_name=$ac_optarg ;;
ba4481b5
DL
537
538 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
539 | -silent | --silent | --silen | --sile | --sil)
540 silent=yes ;;
541
542 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
543 ac_prev=sbindir ;;
544 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
545 | --sbi=* | --sb=*)
503d2be0 546 sbindir=$ac_optarg ;;
ba4481b5
DL
547
548 -sharedstatedir | --sharedstatedir | --sharedstatedi \
549 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
550 | --sharedst | --shareds | --shared | --share | --shar \
551 | --sha | --sh)
552 ac_prev=sharedstatedir ;;
553 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
554 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
555 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
556 | --sha=* | --sh=*)
503d2be0 557 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
558
559 -site | --site | --sit)
560 ac_prev=site ;;
561 -site=* | --site=* | --sit=*)
503d2be0 562 site=$ac_optarg ;;
ba4481b5
DL
563
564 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
565 ac_prev=srcdir ;;
566 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 567 srcdir=$ac_optarg ;;
ba4481b5
DL
568
569 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
570 | --syscon | --sysco | --sysc | --sys | --sy)
571 ac_prev=sysconfdir ;;
572 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
573 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 574 sysconfdir=$ac_optarg ;;
ba4481b5
DL
575
576 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 577 ac_prev=target_alias ;;
ba4481b5 578 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 579 target_alias=$ac_optarg ;;
ba4481b5
DL
580
581 -v | -verbose | --verbose | --verbos | --verbo | --verb)
582 verbose=yes ;;
583
503d2be0
AS
584 -version | --version | --versio | --versi | --vers | -V)
585 ac_init_version=: ;;
ba4481b5
DL
586
587 -with-* | --with-*)
503d2be0 588 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 589 # Reject names that are not valid shell variable names.
503d2be0
AS
590 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
591 { echo "$as_me: error: invalid package name: $ac_package" >&2
592 { (exit 1); exit 1; }; }
ba4481b5 593 ac_package=`echo $ac_package| sed 's/-/_/g'`
503d2be0
AS
594 case $ac_option in
595 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
596 *) ac_optarg=yes ;;
597 esac
503d2be0 598 eval "with_$ac_package='$ac_optarg'" ;;
ba4481b5
DL
599
600 -without-* | --without-*)
503d2be0 601 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 602 # Reject names that are not valid shell variable names.
503d2be0
AS
603 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
604 { echo "$as_me: error: invalid package name: $ac_package" >&2
605 { (exit 1); exit 1; }; }
606 ac_package=`echo $ac_package | sed 's/-/_/g'`
607 eval "with_$ac_package=no" ;;
ba4481b5
DL
608
609 --x)
610 # Obsolete; use --with-x.
611 with_x=yes ;;
612
613 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
614 | --x-incl | --x-inc | --x-in | --x-i)
615 ac_prev=x_includes ;;
616 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
617 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 618 x_includes=$ac_optarg ;;
ba4481b5
DL
619
620 -x-libraries | --x-libraries | --x-librarie | --x-librari \
621 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
622 ac_prev=x_libraries ;;
623 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
624 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 625 x_libraries=$ac_optarg ;;
ba4481b5 626
503d2be0
AS
627 -*) { echo "$as_me: error: unrecognized option: $ac_option
628Try \`$0 --help' for more information." >&2
629 { (exit 1); exit 1; }; }
ba4481b5
DL
630 ;;
631
503d2be0
AS
632 *=*)
633 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
634 # Reject names that are not valid shell variable names.
635 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
636 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
637 { (exit 1); exit 1; }; }
638 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
639 eval "$ac_envvar='$ac_optarg'"
640 export $ac_envvar ;;
641
ba4481b5 642 *)
503d2be0
AS
643 # FIXME: should be removed in autoconf 3.0.
644 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
645 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
646 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
647 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
648 ;;
649
650 esac
651done
652
653if test -n "$ac_prev"; then
503d2be0
AS
654 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
655 { echo "$as_me: error: missing argument to $ac_option" >&2
656 { (exit 1); exit 1; }; }
ba4481b5 657fi
ba4481b5 658
503d2be0
AS
659# Be sure to have absolute paths.
660for ac_var in exec_prefix prefix
661do
662 eval ac_val=$`echo $ac_var`
663 case $ac_val in
664 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
c0d27fcc 665 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
503d2be0
AS
666 { (exit 1); exit 1; }; };;
667 esac
668done
ba4481b5 669
503d2be0
AS
670# Be sure to have absolute paths.
671for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
35996d22 672 localstatedir libdir includedir oldincludedir infodir mandir
ba4481b5 673do
503d2be0
AS
674 eval ac_val=$`echo $ac_var`
675 case $ac_val in
676 [\\/$]* | ?:[\\/]* ) ;;
c0d27fcc 677 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
503d2be0 678 { (exit 1); exit 1; }; };;
ba4481b5
DL
679 esac
680done
681
503d2be0
AS
682# There might be people who depend on the old broken behavior: `$host'
683# used to hold the argument of --host etc.
c0d27fcc 684# FIXME: To remove some day.
503d2be0
AS
685build=$build_alias
686host=$host_alias
687target=$target_alias
688
c0d27fcc 689# FIXME: To remove some day.
503d2be0
AS
690if test "x$host_alias" != x; then
691 if test "x$build_alias" = x; then
692 cross_compiling=maybe
693 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
694 If a cross compiler is detected then cross compile mode will be used." >&2
695 elif test "x$build_alias" != "x$host_alias"; then
696 cross_compiling=yes
697 fi
698fi
ba4481b5 699
503d2be0
AS
700ac_tool_prefix=
701test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 702
503d2be0 703test "$silent" = yes && exec 6>/dev/null
ba4481b5 704
c0d27fcc 705
ba4481b5
DL
706# Find the source files, if location was not specified.
707if test -z "$srcdir"; then
708 ac_srcdir_defaulted=yes
709 # Try the directory containing this script, then its parent.
c0d27fcc
MR
710 ac_confdir=`(dirname "$0") 2>/dev/null ||
711$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
712 X"$0" : 'X\(//\)[^/]' \| \
713 X"$0" : 'X\(//\)$' \| \
714 X"$0" : 'X\(/\)' \| \
715 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
716echo X"$0" |
717 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
718 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
719 /^X\(\/\/\)$/{ s//\1/; q; }
720 /^X\(\/\).*/{ s//\1/; q; }
721 s/.*/./; q'`
ba4481b5
DL
722 srcdir=$ac_confdir
723 if test ! -r $srcdir/$ac_unique_file; then
724 srcdir=..
725 fi
726else
727 ac_srcdir_defaulted=no
728fi
729if test ! -r $srcdir/$ac_unique_file; then
730 if test "$ac_srcdir_defaulted" = yes; then
c0d27fcc 731 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
503d2be0 732 { (exit 1); exit 1; }; }
ba4481b5 733 else
c0d27fcc 734 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 735 { (exit 1); exit 1; }; }
ba4481b5
DL
736 fi
737fi
6bae0ccf
DL
738(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
739 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
740 { (exit 1); exit 1; }; }
503d2be0
AS
741srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
742ac_env_build_alias_set=${build_alias+set}
743ac_env_build_alias_value=$build_alias
744ac_cv_env_build_alias_set=${build_alias+set}
745ac_cv_env_build_alias_value=$build_alias
746ac_env_host_alias_set=${host_alias+set}
747ac_env_host_alias_value=$host_alias
748ac_cv_env_host_alias_set=${host_alias+set}
749ac_cv_env_host_alias_value=$host_alias
750ac_env_target_alias_set=${target_alias+set}
751ac_env_target_alias_value=$target_alias
752ac_cv_env_target_alias_set=${target_alias+set}
753ac_cv_env_target_alias_value=$target_alias
754ac_env_CC_set=${CC+set}
755ac_env_CC_value=$CC
756ac_cv_env_CC_set=${CC+set}
757ac_cv_env_CC_value=$CC
758ac_env_CFLAGS_set=${CFLAGS+set}
759ac_env_CFLAGS_value=$CFLAGS
760ac_cv_env_CFLAGS_set=${CFLAGS+set}
761ac_cv_env_CFLAGS_value=$CFLAGS
762ac_env_LDFLAGS_set=${LDFLAGS+set}
763ac_env_LDFLAGS_value=$LDFLAGS
764ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
765ac_cv_env_LDFLAGS_value=$LDFLAGS
766ac_env_CPPFLAGS_set=${CPPFLAGS+set}
767ac_env_CPPFLAGS_value=$CPPFLAGS
768ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
769ac_cv_env_CPPFLAGS_value=$CPPFLAGS
770ac_env_CPP_set=${CPP+set}
771ac_env_CPP_value=$CPP
772ac_cv_env_CPP_set=${CPP+set}
773ac_cv_env_CPP_value=$CPP
774
775#
776# Report the --help message.
777#
778if test "$ac_init_help" = "long"; then
779 # Omit some internal or obsolete options to make the list less imposing.
780 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 781 cat <<_ACEOF
503d2be0
AS
782\`configure' configures this package to adapt to many kinds of systems.
783
784Usage: $0 [OPTION]... [VAR=VALUE]...
785
786To assign environment variables (e.g., CC, CFLAGS...), specify them as
787VAR=VALUE. See below for descriptions of some of the useful variables.
788
789Defaults for the options are specified in brackets.
790
791Configuration:
792 -h, --help display this help and exit
793 --help=short display options specific to this package
794 --help=recursive display the short help of all the included packages
795 -V, --version display version information and exit
796 -q, --quiet, --silent do not print \`checking...' messages
797 --cache-file=FILE cache test results in FILE [disabled]
798 -C, --config-cache alias for \`--cache-file=config.cache'
799 -n, --no-create do not create output files
800 --srcdir=DIR find the sources in DIR [configure dir or \`..']
801
c0d27fcc 802_ACEOF
503d2be0 803
c0d27fcc 804 cat <<_ACEOF
503d2be0
AS
805Installation directories:
806 --prefix=PREFIX install architecture-independent files in PREFIX
35996d22 807 [$ac_default_prefix]
503d2be0 808 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
35996d22 809 [PREFIX]
503d2be0
AS
810
811By default, \`make install' will install all the files in
812\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
813an installation prefix other than \`$ac_default_prefix' using \`--prefix',
814for instance \`--prefix=\$HOME'.
815
816For better control, use the options below.
817
818Fine tuning of the installation directories:
819 --bindir=DIR user executables [EPREFIX/bin]
820 --sbindir=DIR system admin executables [EPREFIX/sbin]
821 --libexecdir=DIR program executables [EPREFIX/libexec]
822 --datadir=DIR read-only architecture-independent data [PREFIX/share]
823 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
824 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
825 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
826 --libdir=DIR object code libraries [EPREFIX/lib]
827 --includedir=DIR C header files [PREFIX/include]
828 --oldincludedir=DIR C header files for non-gcc [/usr/include]
829 --infodir=DIR info documentation [PREFIX/info]
830 --mandir=DIR man documentation [PREFIX/man]
c0d27fcc 831_ACEOF
503d2be0 832
c0d27fcc 833 cat <<\_ACEOF
503d2be0 834
ba5da88a
PJ
835Program names:
836 --program-prefix=PREFIX prepend PREFIX to installed program names
837 --program-suffix=SUFFIX append SUFFIX to installed program names
838 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
839
503d2be0
AS
840X features:
841 --x-includes=DIR X include files are in DIR
842 --x-libraries=DIR X library files are in DIR
843
844System types:
845 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
846 --host=HOST cross-compile to build programs to run on HOST [BUILD]
847_ACEOF
503d2be0
AS
848fi
849
850if test -n "$ac_init_help"; then
851
c0d27fcc 852 cat <<\_ACEOF
503d2be0
AS
853
854Optional Features:
855 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
856 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6a3a24fa
JD
857 --enable-carbon-app[=DIR] [DIR=/Application]
858 specify install directory for Emacs.app on Mac OS X
19650fd6
AS
859 --enable-maintainer-mode enable make rules and dependencies not useful
860 (and sometimes confusing) to the casual installer
503d2be0
AS
861 --disable-largefile omit support for large files
862
863Optional Packages:
864 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
865 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
866 --without-gcc don't use GCC to compile Emacs if GCC is found
867 --without-pop don't support POP mail retrieval with movemail
868 --with-kerberos support Kerberos-authenticated POP
869 --with-kerberos5 support Kerberos version 5 authenticated POP
870 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 871 --without-sound don't compile with sound support
488dd4c4
JD
872 --with-x-toolkit=KIT use an X toolkit
873 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
874 --with-xpm use -lXpm for displaying XPM images
875 --with-jpeg use -ljpeg for displaying JPEG images
876 --with-tiff use -ltiff for displaying TIFF images
877 --with-gif use -lungif for displaying GIF images
878 --with-png use -lpng for displaying PNG images
488dd4c4
JD
879 --with-gtk use GTK (same as --with-x-toolkit=gtk)
880 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 881 --without-toolkit-scroll-bars
cc227489
MB
882 don't use Motif or Xaw3d scroll bars
883 --without-xim don't use X11 XIM
e0f712ba 884 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
885 --with-x use the X Window System
886
887Some influential environment variables:
888 CC C compiler command
889 CFLAGS C compiler flags
890 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
891 nonstandard directory <lib dir>
892 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
893 headers in a nonstandard directory <include dir>
894 CPP C preprocessor
895
896Use these variables to override the choices made by `configure' or to help
897it to find libraries and programs with nonstandard names/locations.
898
c0d27fcc 899_ACEOF
503d2be0
AS
900fi
901
902if test "$ac_init_help" = "recursive"; then
903 # If there are subdirs, report their specific --help.
904 ac_popdir=`pwd`
c0d27fcc
MR
905 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
906 test -d $ac_dir || continue
907 ac_builddir=.
908
909if test "$ac_dir" != .; then
910 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
911 # A "../" for each directory in $ac_dir_suffix.
912 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
913else
914 ac_dir_suffix= ac_top_builddir=
915fi
503d2be0 916
c0d27fcc
MR
917case $srcdir in
918 .) # No --srcdir option. We are building in place.
919 ac_srcdir=.
920 if test -z "$ac_top_builddir"; then
921 ac_top_srcdir=.
922 else
923 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
924 fi ;;
925 [\\/]* | ?:[\\/]* ) # Absolute path.
926 ac_srcdir=$srcdir$ac_dir_suffix;
927 ac_top_srcdir=$srcdir ;;
928 *) # Relative path.
929 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
930 ac_top_srcdir=$ac_top_builddir$srcdir ;;
931esac
35996d22
AS
932
933# Do not use `cd foo && pwd` to compute absolute paths, because
934# the directories may not exist.
935case `pwd` in
936.) ac_abs_builddir="$ac_dir";;
937*)
938 case "$ac_dir" in
939 .) ac_abs_builddir=`pwd`;;
940 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
941 *) ac_abs_builddir=`pwd`/"$ac_dir";;
942 esac;;
943esac
944case $ac_abs_builddir in
945.) ac_abs_top_builddir=${ac_top_builddir}.;;
946*)
947 case ${ac_top_builddir}. in
948 .) ac_abs_top_builddir=$ac_abs_builddir;;
949 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
950 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
951 esac;;
952esac
953case $ac_abs_builddir in
954.) ac_abs_srcdir=$ac_srcdir;;
955*)
956 case $ac_srcdir in
957 .) ac_abs_srcdir=$ac_abs_builddir;;
958 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
959 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
960 esac;;
961esac
962case $ac_abs_builddir in
963.) ac_abs_top_srcdir=$ac_top_srcdir;;
964*)
965 case $ac_top_srcdir in
966 .) ac_abs_top_srcdir=$ac_abs_builddir;;
967 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
968 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
969 esac;;
970esac
c0d27fcc
MR
971
972 cd $ac_dir
503d2be0 973 # Check for guested configure; otherwise get Cygnus style configure.
c0d27fcc 974 if test -f $ac_srcdir/configure.gnu; then
503d2be0 975 echo
c0d27fcc
MR
976 $SHELL $ac_srcdir/configure.gnu --help=recursive
977 elif test -f $ac_srcdir/configure; then
503d2be0 978 echo
c0d27fcc
MR
979 $SHELL $ac_srcdir/configure --help=recursive
980 elif test -f $ac_srcdir/configure.ac ||
35996d22 981 test -f $ac_srcdir/configure.in; then
503d2be0
AS
982 echo
983 $ac_configure --help
984 else
c0d27fcc 985 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
503d2be0 986 fi
c08e6004 987 cd "$ac_popdir"
503d2be0
AS
988 done
989fi
990
991test -n "$ac_init_help" && exit 0
992if $ac_init_version; then
c0d27fcc 993 cat <<\_ACEOF
503d2be0 994
35996d22 995Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
996This configure script is free software; the Free Software Foundation
997gives unlimited permission to copy, distribute and modify it.
c0d27fcc 998_ACEOF
503d2be0
AS
999 exit 0
1000fi
1001exec 5>config.log
c0d27fcc 1002cat >&5 <<_ACEOF
503d2be0
AS
1003This file contains any messages produced by compilers while
1004running configure, to aid debugging if configure makes a mistake.
1005
1006It was created by $as_me, which was
35996d22 1007generated by GNU Autoconf 2.59. Invocation command line was
503d2be0
AS
1008
1009 $ $0 $@
1010
c0d27fcc 1011_ACEOF
503d2be0
AS
1012{
1013cat <<_ASUNAME
c0d27fcc
MR
1014## --------- ##
1015## Platform. ##
1016## --------- ##
503d2be0
AS
1017
1018hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1019uname -m = `(uname -m) 2>/dev/null || echo unknown`
1020uname -r = `(uname -r) 2>/dev/null || echo unknown`
1021uname -s = `(uname -s) 2>/dev/null || echo unknown`
1022uname -v = `(uname -v) 2>/dev/null || echo unknown`
1023
1024/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1025/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1026
1027/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1028/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1029/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1030hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1031/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1032/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1033/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1034
925c2f3f 1035_ASUNAME
c0d27fcc
MR
1036
1037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1038for as_dir in $PATH
1039do
1040 IFS=$as_save_IFS
1041 test -z "$as_dir" && as_dir=.
1042 echo "PATH: $as_dir"
1043done
1044
503d2be0
AS
1045} >&5
1046
c0d27fcc
MR
1047cat >&5 <<_ACEOF
1048
1049
1050## ----------- ##
1051## Core tests. ##
1052## ----------- ##
1053
1054_ACEOF
503d2be0 1055
503d2be0
AS
1056
1057# Keep a trace of the command line.
1058# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1059# Strip out --silent because we don't want to record it for future runs.
503d2be0 1060# Also quote any args containing shell meta-characters.
19650fd6 1061# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1062ac_configure_args=
19650fd6
AS
1063ac_configure_args0=
1064ac_configure_args1=
503d2be0 1065ac_sep=
19650fd6
AS
1066ac_must_keep_next=false
1067for ac_pass in 1 2
503d2be0 1068do
19650fd6
AS
1069 for ac_arg
1070 do
1071 case $ac_arg in
1072 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1073 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1074 | -silent | --silent | --silen | --sile | --sil)
1075 continue ;;
1076 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1077 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1078 esac
1079 case $ac_pass in
1080 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1081 2)
1082 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1083 if test $ac_must_keep_next = true; then
35996d22 1084 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1085 else
35996d22
AS
1086 case $ac_arg in
1087 *=* | --config-cache | -C | -disable-* | --disable-* \
1088 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1089 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1090 | -with-* | --with-* | -without-* | --without-* | --x)
1091 case "$ac_configure_args0 " in
1092 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1093 esac
1094 ;;
1095 -* ) ac_must_keep_next=true ;;
1096 esac
19650fd6
AS
1097 fi
1098 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1099 # Get rid of the leading space.
1100 ac_sep=" "
1101 ;;
1102 esac
1103 done
503d2be0 1104done
19650fd6
AS
1105$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1106$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1107
1108# When interrupted or exit'd, cleanup temporary files, and complete
1109# config.log. We remove comments because anyway the quotes in there
1110# would cause problems or look ugly.
c0d27fcc
MR
1111# WARNING: Be sure not to use single quotes in there, as some shells,
1112# such as our DU 5.0 friend, will then `close' the trap.
503d2be0
AS
1113trap 'exit_status=$?
1114 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1115 {
1116 echo
6bae0ccf 1117
c0d27fcc
MR
1118 cat <<\_ASBOX
1119## ---------------- ##
1120## Cache variables. ##
1121## ---------------- ##
1122_ASBOX
1123 echo
1124 # The following way of writing the cache mishandles newlines in values,
503d2be0
AS
1125{
1126 (set) 2>&1 |
1127 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1128 *ac_space=\ *)
1129 sed -n \
35996d22
AS
1130 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1131 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
503d2be0
AS
1132 ;;
1133 *)
1134 sed -n \
35996d22 1135 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
1136 ;;
1137 esac;
c0d27fcc
MR
1138}
1139 echo
6bae0ccf
DL
1140
1141 cat <<\_ASBOX
1142## ----------------- ##
1143## Output variables. ##
1144## ----------------- ##
1145_ASBOX
1146 echo
1147 for ac_var in $ac_subst_vars
1148 do
1149 eval ac_val=$`echo $ac_var`
1150 echo "$ac_var='"'"'$ac_val'"'"'"
1151 done | sort
1152 echo
1153
1154 if test -n "$ac_subst_files"; then
1155 cat <<\_ASBOX
1156## ------------- ##
1157## Output files. ##
1158## ------------- ##
1159_ASBOX
1160 echo
1161 for ac_var in $ac_subst_files
1162 do
1163 eval ac_val=$`echo $ac_var`
35996d22 1164 echo "$ac_var='"'"'$ac_val'"'"'"
6bae0ccf
DL
1165 done | sort
1166 echo
1167 fi
1168
c0d27fcc
MR
1169 if test -s confdefs.h; then
1170 cat <<\_ASBOX
1171## ----------- ##
1172## confdefs.h. ##
1173## ----------- ##
1174_ASBOX
1175 echo
6bae0ccf 1176 sed "/^$/d" confdefs.h | sort
c0d27fcc
MR
1177 echo
1178 fi
1179 test "$ac_signal" != 0 &&
1180 echo "$as_me: caught signal $ac_signal"
1181 echo "$as_me: exit $exit_status"
1182 } >&5
35996d22 1183 rm -f core *.core &&
c0d27fcc 1184 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0
AS
1185 exit $exit_status
1186 ' 0
1187for ac_signal in 1 2 13 15; do
1188 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1189done
1190ac_signal=0
1191
1192# confdefs.h avoids OS command line length limits that DEFS can exceed.
1193rm -rf conftest* confdefs.h
1194# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1195echo >confdefs.h
ba4481b5 1196
c0d27fcc
MR
1197# Predefined preprocessor variables.
1198
1199cat >>confdefs.h <<_ACEOF
1200#define PACKAGE_NAME "$PACKAGE_NAME"
1201_ACEOF
1202
1203
1204cat >>confdefs.h <<_ACEOF
1205#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1206_ACEOF
1207
1208
1209cat >>confdefs.h <<_ACEOF
1210#define PACKAGE_VERSION "$PACKAGE_VERSION"
1211_ACEOF
1212
1213
1214cat >>confdefs.h <<_ACEOF
1215#define PACKAGE_STRING "$PACKAGE_STRING"
1216_ACEOF
1217
1218
1219cat >>confdefs.h <<_ACEOF
1220#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1221_ACEOF
1222
1223
503d2be0 1224# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
1225# Prefer explicitly selected file to automatically selected ones.
1226if test -z "$CONFIG_SITE"; then
1227 if test "x$prefix" != xNONE; then
1228 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1229 else
1230 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1231 fi
1232fi
1233for ac_site_file in $CONFIG_SITE; do
1234 if test -r "$ac_site_file"; then
c0d27fcc 1235 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1236echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1237 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1238 . "$ac_site_file"
1239 fi
1240done
1241
1242if test -r "$cache_file"; then
503d2be0
AS
1243 # Some versions of bash will fail to source /dev/null (special
1244 # files actually), so we avoid doing that.
1245 if test -f "$cache_file"; then
c0d27fcc 1246 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1247echo "$as_me: loading cache $cache_file" >&6;}
1248 case $cache_file in
1249 [\\/]* | ?:[\\/]* ) . $cache_file;;
1250 *) . ./$cache_file;;
1251 esac
1252 fi
ba4481b5 1253else
c0d27fcc 1254 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1255echo "$as_me: creating cache $cache_file" >&6;}
1256 >$cache_file
1257fi
1258
1259# Check that the precious variables saved in the cache have kept the same
1260# value.
1261ac_cache_corrupted=false
1262for ac_var in `(set) 2>&1 |
35996d22 1263 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
503d2be0
AS
1264 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1265 eval ac_new_set=\$ac_env_${ac_var}_set
1266 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1267 eval ac_new_val="\$ac_env_${ac_var}_value"
1268 case $ac_old_set,$ac_new_set in
1269 set,)
c0d27fcc 1270 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1271echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1272 ac_cache_corrupted=: ;;
1273 ,set)
c0d27fcc 1274 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1275echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1276 ac_cache_corrupted=: ;;
1277 ,);;
1278 *)
1279 if test "x$ac_old_val" != "x$ac_new_val"; then
35996d22 1280 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1281echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
35996d22 1282 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1283echo "$as_me: former value: $ac_old_val" >&2;}
35996d22 1284 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1285echo "$as_me: current value: $ac_new_val" >&2;}
35996d22 1286 ac_cache_corrupted=:
503d2be0
AS
1287 fi;;
1288 esac
c0d27fcc 1289 # Pass precious variables to config.status.
503d2be0
AS
1290 if test "$ac_new_set" = set; then
1291 case $ac_new_val in
1292 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
c0d27fcc
MR
1293 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1294 *) ac_arg=$ac_var=$ac_new_val ;;
1295 esac
1296 case " $ac_configure_args " in
1297 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1298 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1299 esac
1300 fi
1301done
1302if $ac_cache_corrupted; then
c0d27fcc 1303 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1304echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1305 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1306echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1307 { (exit 1); exit 1; }; }
ba4481b5
DL
1308fi
1309
1310ac_ext=c
ba4481b5 1311ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
1312ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1313ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1314ac_compiler_gnu=$ac_cv_c_compiler_gnu
1315
c0d27fcc
MR
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
ba4481b5 1332
6bae0ccf
DL
1333
1334 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1335
c0d27fcc 1336
ba5da88a
PJ
1337test "$program_prefix" != NONE &&
1338 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1339# Use a double $ so make ignores it.
1340test "$program_suffix" != NONE &&
1341 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1342# Double any \ or $. echo might interpret backslashes.
1343# By default was `s,x,x', remove it if useless.
1344cat <<\_ACEOF >conftest.sed
1345s/[\\$]/&&/g;s/;s,x,x,$//
1346_ACEOF
1347program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1348rm conftest.sed
1349
c0d27fcc 1350
ba4481b5
DL
1351lispdir='${datadir}/emacs/${version}/lisp'
1352locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1353'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1354lisppath='${locallisppath}:${lispdir}'
1355etcdir='${datadir}/emacs/${version}/etc'
1356archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1357docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1358gamedir='${localstatedir}/games/emacs'
98418dba
CW
1359
1360gameuser=games
1361
c0d27fcc 1362
ba4481b5
DL
1363# Check whether --with-gcc or --without-gcc was given.
1364if test "${with_gcc+set}" = set; then
1365 withval="$with_gcc"
503d2be0
AS
1366
1367fi;
ba4481b5
DL
1368
1369# Check whether --with-pop or --without-pop was given.
1370if test "${with_pop+set}" = set; then
1371 withval="$with_pop"
243cf185 1372 if test "$withval" = yes; then
c0d27fcc 1373 cat >>confdefs.h <<\_ACEOF
ba4481b5 1374#define MAIL_USE_POP 1
c0d27fcc 1375_ACEOF
ba4481b5 1376
243cf185
DL
1377else :
1378fi
3d9fec71 1379else
c0d27fcc 1380 cat >>confdefs.h <<\_ACEOF
3d9fec71 1381#define MAIL_USE_POP 1
c0d27fcc 1382_ACEOF
3d9fec71 1383
503d2be0 1384fi;
ba4481b5 1385
c0d27fcc 1386
a21616bd
KR
1387# Check whether --with-kerberos or --without-kerberos was given.
1388if test "${with_kerberos+set}" = set; then
1389 withval="$with_kerberos"
c0d27fcc 1390 cat >>confdefs.h <<\_ACEOF
a21616bd 1391#define KERBEROS 1
c0d27fcc 1392_ACEOF
a21616bd 1393
503d2be0 1394fi;
a21616bd 1395
c0d27fcc 1396
a21616bd
KR
1397# Check whether --with-kerberos5 or --without-kerberos5 was given.
1398if test "${with_kerberos5+set}" = set; then
1399 withval="$with_kerberos5"
1400 if test "${with_kerberos5+set}" = set; then
1401 if test "${with_kerberos+set}" != set; then
1402 with_kerberos=yes
c0d27fcc 1403 cat >>confdefs.h <<\_ACEOF
a21616bd 1404#define KERBEROS 1
c0d27fcc 1405_ACEOF
a21616bd
KR
1406
1407 fi
1408fi
b936fae4 1409
c0d27fcc 1410cat >>confdefs.h <<\_ACEOF
a21616bd 1411#define KERBEROS5 1
c0d27fcc 1412_ACEOF
a21616bd 1413
503d2be0 1414fi;
a21616bd 1415
ba4481b5
DL
1416# Check whether --with-hesiod or --without-hesiod was given.
1417if test "${with_hesiod+set}" = set; then
1418 withval="$with_hesiod"
b936fae4 1419
c0d27fcc 1420cat >>confdefs.h <<\_ACEOF
ba4481b5 1421#define HESIOD 1
c0d27fcc 1422_ACEOF
ba4481b5 1423
503d2be0 1424fi;
ba4481b5 1425
c0d27fcc 1426
2c9dccc9
PJ
1427# Check whether --with-sound or --without-sound was given.
1428if test "${with_sound+set}" = set; then
1429 withval="$with_sound"
1430
1431fi;
1432
c0d27fcc 1433
ba4481b5
DL
1434# Check whether --with-x-toolkit or --without-x-toolkit was given.
1435if test "${with_x_toolkit+set}" = set; then
1436 withval="$with_x_toolkit"
1437 case "${withval}" in
1438 y | ye | yes ) val=athena ;;
1439 n | no ) val=no ;;
1440 l | lu | luc | luci | lucid ) val=lucid ;;
1441 a | at | ath | athe | athen | athena ) val=athena ;;
1442 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1443 g | gt | gtk ) val=gtk ;;
ba4481b5 1444 * )
c0d27fcc 1445{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1446this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1447Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1448echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1449this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1450Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1451 { (exit 1); exit 1; }; }
ba4481b5
DL
1452 ;;
1453 esac
1454 with_x_toolkit=$val
1455
503d2be0 1456fi;
ba4481b5
DL
1457
1458# Check whether --with-xpm or --without-xpm was given.
1459if test "${with_xpm+set}" = set; then
1460 withval="$with_xpm"
503d2be0
AS
1461
1462fi;
ba4481b5
DL
1463
1464# Check whether --with-jpeg or --without-jpeg was given.
1465if test "${with_jpeg+set}" = set; then
1466 withval="$with_jpeg"
503d2be0
AS
1467
1468fi;
ba4481b5
DL
1469
1470# Check whether --with-tiff or --without-tiff was given.
1471if test "${with_tiff+set}" = set; then
1472 withval="$with_tiff"
503d2be0
AS
1473
1474fi;
ba4481b5
DL
1475
1476# Check whether --with-gif or --without-gif was given.
1477if test "${with_gif+set}" = set; then
1478 withval="$with_gif"
503d2be0
AS
1479
1480fi;
ba4481b5
DL
1481
1482# Check whether --with-png or --without-png was given.
1483if test "${with_png+set}" = set; then
1484 withval="$with_png"
503d2be0
AS
1485
1486fi;
ba4481b5 1487
488dd4c4
JD
1488# Check whether --with-gtk or --without-gtk was given.
1489if test "${with_gtk+set}" = set; then
1490 withval="$with_gtk"
1491
1492fi;
1493
1494# Check whether --with-pkg-config-prog or --without-pkg-config-prog was given.
1495if test "${with_pkg_config_prog+set}" = set; then
1496 withval="$with_pkg_config_prog"
1497
1498fi;
1499
ba4481b5
DL
1500# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1501if test "${with_toolkit_scroll_bars+set}" = set; then
1502 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1503
1504fi;
ba4481b5 1505
1d36487c
GM
1506# Check whether --with-xim or --without-xim was given.
1507if test "${with_xim+set}" = set; then
1508 withval="$with_xim"
1d36487c 1509
503d2be0 1510fi;
ba4481b5 1511
e0f712ba
AC
1512# Check whether --with-carbon or --without-carbon was given.
1513if test "${with_carbon+set}" = set; then
1514 withval="$with_carbon"
1515
1516fi;
6a3a24fa
JD
1517# Check whether --enable-carbon-app or --disable-carbon-app was given.
1518if test "${enable_carbon_app+set}" = set; then
1519 enableval="$enable_carbon_app"
1520 carbon_appdir_x=${enableval}
1521fi;
e0f712ba 1522
19650fd6
AS
1523# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1524if test "${enable_maintainer_mode+set}" = set; then
1525 enableval="$enable_maintainer_mode"
1526 USE_MAINTAINER_MODE=$enableval
1527else
1528 USE_MAINTAINER_MODE=no
1529fi;
1530if test $USE_MAINTAINER_MODE = yes; then
1531 MAINT=
1532else
1533 MAINT=#
1534fi
1535
1536
ba4481b5 1537#### Make srcdir absolute, if it isn't already. It's important to
17494071 1538#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1539#### give you automounter prefixes, which can go away. We do all this
1540#### so Emacs can find its files when run uninstalled.
17494071
GM
1541## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1542unset CDPATH
ba4481b5
DL
1543case "${srcdir}" in
1544 /* ) ;;
1545 . )
1546 ## We may be able to use the $PWD environment variable to make this
1547 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
1548 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1549 ## but that tested only for a well-formed and valid PWD,
1550 ## it did not object when PWD was well-formed and valid but just wrong.
1551 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
1552 then
1553 srcdir="$PWD"
1554 else
1555 srcdir="`(cd ${srcdir}; pwd)`"
1556 fi
1557 ;;
1558 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1559esac
1560
1561#### Check if the source directory already has a configured system in it.
1562if test `pwd` != `(cd ${srcdir} && pwd)` \
1563 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 1564 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1565 as a build directory right now; it has been configured in its own
1566 right. To configure in another directory as well, you MUST
1567 use GNU make. If you do not have GNU make, then you must
1568 now do \`make distclean' in ${srcdir},
1569 and then run $0 again." >&5
1570echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1571 as a build directory right now; it has been configured in its own
1572 right. To configure in another directory as well, you MUST
1573 use GNU make. If you do not have GNU make, then you must
1574 now do \`make distclean' in ${srcdir},
503d2be0 1575 and then run $0 again." >&2;}
ba4481b5
DL
1576fi
1577
1578#### Given the configuration name, set machfile and opsysfile to the
1579#### names of the m/*.h and s/*.h files we should use.
1580
1581### Canonicalize the configuration name.
1582
1583ac_aux_dir=
1584for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1585 if test -f $ac_dir/install-sh; then
1586 ac_aux_dir=$ac_dir
1587 ac_install_sh="$ac_aux_dir/install-sh -c"
1588 break
1589 elif test -f $ac_dir/install.sh; then
1590 ac_aux_dir=$ac_dir
1591 ac_install_sh="$ac_aux_dir/install.sh -c"
1592 break
503d2be0
AS
1593 elif test -f $ac_dir/shtool; then
1594 ac_aux_dir=$ac_dir
1595 ac_install_sh="$ac_aux_dir/shtool install -c"
1596 break
ba4481b5
DL
1597 fi
1598done
1599if test -z "$ac_aux_dir"; then
c0d27fcc 1600 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1601echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1602 { (exit 1); exit 1; }; }
ba4481b5 1603fi
503d2be0
AS
1604ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1605ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1606ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1607
1608# Make sure we can run config.sub.
503d2be0 1609$ac_config_sub sun4 >/dev/null 2>&1 ||
c0d27fcc 1610 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1611echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1612 { (exit 1); exit 1; }; }
1613
c0d27fcc 1614echo "$as_me:$LINENO: checking build system type" >&5
503d2be0
AS
1615echo $ECHO_N "checking build system type... $ECHO_C" >&6
1616if test "${ac_cv_build+set}" = set; then
1617 echo $ECHO_N "(cached) $ECHO_C" >&6
1618else
1619 ac_cv_build_alias=$build_alias
1620test -z "$ac_cv_build_alias" &&
1621 ac_cv_build_alias=`$ac_config_guess`
1622test -z "$ac_cv_build_alias" &&
c0d27fcc 1623 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1624echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1625 { (exit 1); exit 1; }; }
1626ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
c0d27fcc
MR
1627 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1628echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
503d2be0
AS
1629 { (exit 1); exit 1; }; }
1630
1631fi
c0d27fcc 1632echo "$as_me:$LINENO: result: $ac_cv_build" >&5
503d2be0
AS
1633echo "${ECHO_T}$ac_cv_build" >&6
1634build=$ac_cv_build
1635build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1636build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1637build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1638
c0d27fcc
MR
1639
1640echo "$as_me:$LINENO: checking host system type" >&5
503d2be0
AS
1641echo $ECHO_N "checking host system type... $ECHO_C" >&6
1642if test "${ac_cv_host+set}" = set; then
1643 echo $ECHO_N "(cached) $ECHO_C" >&6
1644else
1645 ac_cv_host_alias=$host_alias
1646test -z "$ac_cv_host_alias" &&
1647 ac_cv_host_alias=$ac_cv_build_alias
1648ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
c0d27fcc 1649 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1650echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1651 { (exit 1); exit 1; }; }
1652
1653fi
c0d27fcc 1654echo "$as_me:$LINENO: result: $ac_cv_host" >&5
503d2be0
AS
1655echo "${ECHO_T}$ac_cv_host" >&6
1656host=$ac_cv_host
1657host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1658host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1659host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5 1660
c0d27fcc 1661
ba4481b5 1662canonical=$host
531a3336 1663configuration=${host_alias-$host}
ba4481b5 1664
c0d27fcc 1665
22044edf 1666
ba4481b5
DL
1667### If you add support for a new configuration, add code to this
1668### switch statement to recognize your configuration name and select
1669### the appropriate operating system and machine description files.
1670
1671### You would hope that you could choose an m/*.h file pretty much
1672### based on the machine portion of the configuration name, and an s-
1673### file based on the operating system portion. However, it turns out
1674### that each m/*.h file is pretty manufacturer-specific - for
1675### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1676### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1677### machines. So we basically have to have a special case for each
1678### configuration name.
1679###
1680### As far as handling version numbers on operating systems is
1681### concerned, make sure things will fail in a fixable way. If
1682### /etc/MACHINES doesn't say anything about version numbers, be
1683### prepared to handle anything reasonably. If version numbers
1684### matter, be sure /etc/MACHINES says something about it.
1685###
1686### Eric Raymond says we should accept strings like "sysvr4" to mean
1687### "System V Release 4"; he writes, "The old convention encouraged
1688### confusion between `system' and `release' levels'."
1689
1690machine='' opsys='' unported=no
1691case "${canonical}" in
1692
1096bcc0
GM
1693 ## FreeBSD ports
1694 *-*-freebsd* )
1695 opsys=freebsd
1696 case "${canonical}" in
1697 alpha*-*-freebsd*) machine=alpha ;;
1698 i[3456]86-*-freebsd*) machine=intel386 ;;
1699 esac
1700 ;;
1701
ba4481b5
DL
1702 ## NetBSD ports
1703 *-*-netbsd* )
1704 opsys=netbsd
dd038e26 1705 if test -f /usr/lib/crti.o; then
f57bd967
DL
1706
1707cat >>confdefs.h <<\_ACEOF
1708#define HAVE_CRTIN
dd038e26
AS
1709_ACEOF
1710
1711 fi
1712
ba4481b5
DL
1713 case "${canonical}" in
1714 alpha*-*-netbsd*) machine=alpha ;;
1715 i[3456]86-*-netbsd*) machine=intel386 ;;
1716 m68k-*-netbsd*)
1717 # This is somewhat bogus.
1718 machine=hp9000s300 ;;
1719 powerpc-apple-netbsd*) machine=macppc ;;
1720 mips-*-netbsd*) machine=pmax ;;
2df636f4 1721 mipsel-*-netbsd*) machine=pmax ;;
97836269 1722 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 1723 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1724 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1725 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1726 vax-*-netbsd*) machine=vax ;;
2df636f4 1727 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1728 esac
1729 ;;
1730
1731 ## OpenBSD ports
1732 *-*-openbsd* )
1733 opsys=openbsd
1734 case "${canonical}" in
1735 alpha*-*-openbsd*) machine=alpha ;;
1736 i386-*-openbsd*) machine=intel386 ;;
1737 m68k-*-openbsd*) machine=hp9000s300 ;;
1738 mipsel-*-openbsd*) machine=pmax ;;
1739 ns32k-*-openbsd*) machine=ns32000 ;;
1740 sparc-*-openbsd*) machine=sparc ;;
1741 vax-*-openbsd*) machine=vax ;;
1742 esac
1743 ;;
1744
1745 ## Acorn RISCiX:
1746 arm-acorn-riscix1.1* )
1747 machine=acorn opsys=riscix1-1
1748 ;;
1749 arm-acorn-riscix1.2* | arm-acorn-riscix )
1750 ## This name is riscix12 instead of riscix1.2
1751 ## to avoid a file name conflict on MSDOS.
1752 machine=acorn opsys=riscix12
1753 ;;
1754
1755 ## BSDI ports
1756 *-*-bsdi* )
1757 opsys=bsdi
1758 case "${canonical}" in
1759 i[345]86-*-bsdi*) machine=intel386 ;;
1760 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1761 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1762 esac
1763 case "${canonical}" in
1764 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1765 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1766 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1767 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1768 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1769 esac
1770 ;;
1771
1772 ## Alliant machines
1773 ## Strictly speaking, we need the version of the alliant operating
1774 ## system to choose the right machine file, but currently the
1775 ## configuration name doesn't tell us enough to choose the right
1776 ## one; we need to give alliants their own operating system name to
1777 ## do this right. When someone cares, they can help us.
1778 fx80-alliant-* )
1779 machine=alliant4 opsys=bsd4-2
1780 ;;
1781 i860-alliant-* )
1782 machine=alliant-2800 opsys=bsd4-3
1783 ;;
1784
1785 ## Alpha (DEC) machines.
1786 alpha*-dec-osf* )
1787 machine=alpha opsys=osf1
1788 # This is needed to find X11R6.1 libraries for certain tests.
1789 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1790 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1791 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1792 # due to non-traditional preprocessing with the current compiler
1793 # defaults. OSF 4 can also have that compiler version, and there
1794 # seems always to have been a usable /usr/bin/cpp.
1795 NON_GNU_CPP=/usr/bin/cpp
ca512671 1796 case "${canonical}" in
a55b799a 1797 alpha*-dec-osf[5-9]*)
bb17930d 1798 opsys=osf5-0 ;;
ca512671 1799 esac
ba4481b5
DL
1800 ;;
1801
1802 alpha*-*-linux-gnu* )
1803 machine=alpha opsys=gnu-linux
1804 ;;
1805
c4bb2108
DL
1806 arm*-*-linux-gnu* )
1807 machine=arm opsys=gnu-linux
1808 ;;
1809
1810 ppc-*-linux | \
1811 powerpc-*-linux* )
3aeecf97 1812 machine=macppc opsys=gnu-linux
c4bb2108
DL
1813 ;;
1814
ba4481b5
DL
1815 ## Altos 3068
1816 m68*-altos-sysv* )
1817 machine=altos opsys=usg5-2
1818 ;;
1819
1820 ## Amdahl UTS
1821 580-amdahl-sysv* )
1822 machine=amdahl opsys=usg5-2-2
1823 ;;
1824
1825 ## Apollo, Domain/OS
1826 m68*-apollo-* )
1827 machine=apollo opsys=bsd4-3
1828 ;;
1829
1830 ## AT&T 3b2, 3b5, 3b15, 3b20
1831 we32k-att-sysv* )
1832 machine=att3b opsys=usg5-2-2
1833 ;;
1834
1835 ## AT&T 3b1 - The Mighty Unix PC!
1836 m68*-att-sysv* )
1837 machine=7300 opsys=usg5-2-2
1838 ;;
1839
1840 ## Bull dpx20
1841 rs6000-bull-bosx* )
1842 machine=ibmrs6000 opsys=aix3-2
1843 ;;
1844
1845 ## Bull dpx2
1846 m68*-bull-sysv3* )
1847 machine=dpx2 opsys=usg5-3
1848 ;;
1849
1850 ## Bull sps7
1851 m68*-bull-sysv2* )
1852 machine=sps7 opsys=usg5-2
1853 ;;
1854
1855 ## CCI 5/32, 6/32 -- see "Tahoe".
1856
1857 ## Celerity
1858 ## I don't know what configuration name to use for this; config.sub
1859 ## doesn't seem to know anything about it. Hey, Celerity users, get
1860 ## in touch with us!
1861 celerity-celerity-bsd* )
1862 machine=celerity opsys=bsd4-2
1863 ;;
1864
1865 ## Clipper
1866 ## What operating systems does this chip run that Emacs has been
1867 ## tested on?
1868 clipper-* )
1869 machine=clipper
1870 ## We'll use the catch-all code at the bottom to guess the
1871 ## operating system.
1872 ;;
1873
df645f7c
AS
1874 ## Compaq Nonstop
1875 mips-compaq-nonstopux* )
1876 machine=nonstopux opsys=nonstopux
1877 ;;
1878
ba4481b5
DL
1879 ## Convex
1880 *-convex-bsd* | *-convex-convexos* )
1881 machine=convex opsys=bsd4-3
1882 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1883 NON_GNU_CPP="cc -E -P"
1884 ;;
1885
1886 ## Cubix QBx/386
1887 i[3456]86-cubix-sysv* )
1888 machine=intel386 opsys=usg5-3
1889 ;;
1890
1891 ## Cydra 5
1892 cydra*-cydrome-sysv* )
1893 machine=cydra5 opsys=usg5-3
1894 ;;
1895
1896 ## Data General AViiON Machines
1897 ## DG changed naming conventions with the release of 5.4.4.10, they
1898 ## dropped the initial 5.4 but left the intervening R. Because of the
1899 ## R this shouldn't conflict with older versions of the OS (which I
1900 ## think were named like dgux4.*). In addition, DG new AViiONs series
1901 ## uses either Motorola M88k or Intel Pentium CPUs.
1902 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1903 machine=aviion opsys=dgux4
1904 ;;
1905 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1906 ## This name is dgux5-4-3 instead of dgux5-4r3
1907 ## to avoid a file name conflict on MSDOS.
1908 machine=aviion opsys=dgux5-4-3
1909 ;;
1910 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1911 machine=aviion opsys=dgux5-4r2
1912 ;;
1913 m88k-dg-dgux* )
1914 machine=aviion opsys=dgux
1915 ;;
1916
1917 ## Data General AViiON Intel (x86) Machines
1918 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1919 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1920 i[345]86-dg-dguxR4* )
1921 machine=aviion-intel opsys=dgux4
1922 ;;
1923
1924 ## DECstations
1925 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1926 machine=pmax opsys=bsd4-2
1927 ;;
1928 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1929 machine=pmax opsys=bsd4-3
1930 ;;
1931 mips-dec-ultrix* )
1932 machine=pmax opsys=ultrix4-3
1933 ;;
1934 mips-dec-osf* )
1935 machine=pmax opsys=osf1
1936 ;;
1937 mips-dec-mach_bsd4.3* )
1938 machine=pmax opsys=mach-bsd4-3
1939 ;;
1940
cd890796
JD
1941 ## Motorola Delta machines
1942 m68k-motorola-sysv* | m68000-motorola-sysv* )
1943 machine=delta opsys=usg5-3
1944 if test -z "`type gnucc | grep 'not found'`"
1945 then
1946 if test -s /etc/167config
1947 then CC="gnucc -m68040"
1948 else CC="gnucc -m68881"
1949 fi
1950 else
1951 if test -z "`type gcc | grep 'not found'`"
1952 then CC=gcc
1953 else CC=cc
1954 fi
1955 fi
1956 ;;
ba4481b5
DL
1957 m88k-motorola-sysv4* )
1958 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1959 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1960 # I hope there are not other 4.0 versions for this machine
1961 # which really need usg5-4 instead.
1962 machine=delta88k opsys=usg5-4-2
1963 ;;
1964 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1965 machine=delta88k opsys=usg5-3
1966 ;;
1967
1968 ## Dual machines
1969 m68*-dual-sysv* )
1970 machine=dual opsys=usg5-2
1971 ;;
1972 m68*-dual-uniplus* )
1973 machine=dual opsys=unipl5-2
1974 ;;
1975
1976 ## Elxsi 6400
1977 elxsi-elxsi-sysv* )
1978 machine=elxsi opsys=usg5-2
1979 ;;
1980
1981 ## Encore machines
1982 ns16k-encore-bsd* )
1983 machine=ns16000 opsys=umax
1984 ;;
1985
65171e3a
DL
1986 ## The GEC 63 - apparently, this port isn't really finished yet.
1987 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
1988
1989 ## Gould Power Node and NP1
1990 pn-gould-bsd4.2* )
1991 machine=gould opsys=bsd4-2
1992 ;;
1993 pn-gould-bsd4.3* )
1994 machine=gould opsys=bsd4-3
1995 ;;
1996 np1-gould-bsd* )
1997 machine=gould-np1 opsys=bsd4-3
1998 ;;
1999
2000 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2001 ## as far as Emacs is concerned).
2002 m88k-harris-cxux* )
2003 # Build needs to be different on 7.0 and later releases
2004 case "`uname -r`" in
2005 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2006 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2007 esac
2008 NON_GNU_CPP="/lib/cpp"
2009 ;;
2010 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2011 m68k-harris-cxux* )
2012 machine=nh3000 opsys=cxux
2013 ;;
2014 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2015 powerpc-harris-powerunix )
2016 machine=nh6000 opsys=powerunix
2017 NON_GNU_CPP="cc -Xo -E -P"
2018 ;;
2019 ## SR2001/SR2201 running HI-UX/MPP
2020 hppa1.1-hitachi-hiuxmpp* )
2021 machine=sr2k opsys=hiuxmpp
2022 ;;
89a336fa
GM
2023 hppa1.1-hitachi-hiuxwe2* )
2024 machine=sr2k opsys=hiuxwe2
2025 ;;
ba4481b5
DL
2026 ## Honeywell XPS100
2027 xps*-honeywell-sysv* )
2028 machine=xps100 opsys=usg5-2
2029 ;;
2030
2031 ## HP 9000 series 200 or 300
2032 m68*-hp-bsd* )
2033 machine=hp9000s300 opsys=bsd4-3
2034 ;;
2035 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2036 m68*-hp-hpux* )
2037 case "`uname -r`" in
2038 ## Someone's system reports A.B8.05 for this.
2039 ## I wonder what other possibilities there are.
2040 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2041 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2042 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2043 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2044 *) machine=hp9000s300 opsys=hpux ;;
2045 esac
2046 ;;
2047
2048 ## HP 9000 series 700 and 800, running HP/UX
2049 hppa*-hp-hpux7* )
2050 machine=hp800 opsys=hpux
2051 ;;
2052 hppa*-hp-hpux8* )
2053 machine=hp800 opsys=hpux8
2054 ;;
2055 hppa*-hp-hpux9shr* )
2056 machine=hp800 opsys=hpux9shr
2057 ;;
2058 hppa*-hp-hpux9* )
2059 machine=hp800 opsys=hpux9
2060 ;;
b0e44248
RB
2061 hppa*-hp-hpux10.2* )
2062 machine=hp800 opsys=hpux10-20
2063 ;;
cc227489 2064 hppa*-hp-hpux10* )
ba4481b5
DL
2065 machine=hp800 opsys=hpux10
2066 ;;
cc227489
MB
2067 hppa*-hp-hpux1[1-9]* )
2068 machine=hp800 opsys=hpux11
2069 ;;
ba4481b5 2070
409d9577
GM
2071 hppa*-*-linux-gnu* )
2072 machine=hp800 opsys=gnu-linux
2073 ;;
2074
ba4481b5
DL
2075 ## HP 9000 series 700 and 800, running HP/UX
2076 hppa*-hp-hpux* )
2077 ## Cross-compilation? Nah!
2078 case "`uname -r`" in
2079 ## Someone's system reports A.B8.05 for this.
2080 ## I wonder what other possibilities there are.
2081 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2082 *.08.* ) machine=hp800 opsys=hpux8 ;;
2083 *.09.* ) machine=hp800 opsys=hpux9 ;;
2084 *) machine=hp800 opsys=hpux10 ;;
2085 esac
2086 ;;
2087 hppa*-*-nextstep* )
2088 machine=hp800 opsys=nextstep
2089 ;;
2090
2091 ## Orion machines
2092 orion-orion-bsd* )
2093 machine=orion opsys=bsd4-2
2094 ;;
2095 clipper-orion-bsd* )
2096 machine=orion105 opsys=bsd4-2
2097 ;;
2098
2099 ## IBM machines
2100 i[3456]86-ibm-aix1.1* )
2101 machine=ibmps2-aix opsys=usg5-2-2
2102 ;;
2103 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2104 machine=ibmps2-aix opsys=usg5-3
2105 ;;
2106 i370-ibm-aix*)
2107 machine=ibm370aix opsys=usg5-3
2108 ;;
55597d70 2109 s390-*-linux-gnu* )
138f0859
GM
2110 machine=ibms390 opsys=gnu-linux
2111 ;;
ba4481b5
DL
2112 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2113 machine=ibmrs6000 opsys=aix3-1
2114 ;;
2115 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2116 machine=ibmrs6000 opsys=aix3-2-5
2117 ;;
2118 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2119 machine=ibmrs6000 opsys=aix4-1
2120 ;;
2121 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2122 machine=ibmrs6000 opsys=aix4-2
2123 ;;
55597d70 2124 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2125 machine=ibmrs6000 opsys=aix4-2
2126 ;;
ba4481b5
DL
2127 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2128 machine=ibmrs6000 opsys=aix4
2129 ;;
2130 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2131 machine=ibmrs6000 opsys=aix4-1
2132 ;;
2133 rs6000-ibm-aix* | powerpc-ibm-aix* )
2134 machine=ibmrs6000 opsys=aix3-2
2135 ;;
2136 romp-ibm-bsd4.3* )
2137 machine=ibmrt opsys=bsd4-3
2138 ;;
2139 romp-ibm-bsd4.2* )
2140 machine=ibmrt opsys=bsd4-2
2141 ;;
2142 romp-ibm-aos4.3* )
2143 machine=ibmrt opsys=bsd4-3
2144 ;;
2145 romp-ibm-aos4.2* )
2146 machine=ibmrt opsys=bsd4-2
2147 ;;
2148 romp-ibm-aos* )
2149 machine=ibmrt opsys=bsd4-3
2150 ;;
2151 romp-ibm-bsd* )
2152 machine=ibmrt opsys=bsd4-3
2153 ;;
2154 romp-ibm-aix* )
2155 machine=ibmrt-aix opsys=usg5-2-2
2156 ;;
2157
2158 ## Integrated Solutions `Optimum V'
2159 m68*-isi-bsd4.2* )
2160 machine=isi-ov opsys=bsd4-2
2161 ;;
2162 m68*-isi-bsd4.3* )
2163 machine=isi-ov opsys=bsd4-3
2164 ;;
2165
2166 ## Intel 386 machines where we do care about the manufacturer
2167 i[3456]86-intsys-sysv* )
2168 machine=is386 opsys=usg5-2-2
2169 ;;
2170
2171 ## Prime EXL
2172 i[3456]86-prime-sysv* )
2173 machine=i386 opsys=usg5-3
2174 ;;
2175
2176 ## Sequent Symmetry running Dynix
2177 i[3456]86-sequent-bsd* )
2178 machine=symmetry opsys=bsd4-3
2179 ;;
2180
2181 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2182 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2183 machine=sequent-ptx opsys=ptx4
2184 NON_GNU_CPP=/lib/cpp
2185 ;;
2186
2187 ## Sequent Symmetry running DYNIX/ptx
2188 ## Use the old cpp rather than the newer ANSI one.
2189 i[3456]86-sequent-ptx* )
2190 machine=sequent-ptx opsys=ptx
2191 NON_GNU_CPP="/lib/cpp"
2192 ;;
2193
2194 ## ncr machine running svr4.3.
2195 i[3456]86-ncr-sysv4.3 )
2196 machine=ncr386 opsys=usg5-4-3
2197 ;;
2198
2199 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2200 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2201 i[3456]86-ncr-sysv* )
2202 machine=ncr386 opsys=usg5-4-2
2203 ;;
2204
2205 ## Intel Paragon OSF/1
2206 i860-intel-osf1* )
2207 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2208 ;;
2209
2210 ## Intel 860
2211 i860-*-sysv4* )
2212 machine=i860 opsys=usg5-4
2213 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2214 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2215 ;;
2216
c76e04a8
GM
2217 ## Macintosh PowerPC
2218 powerpc*-*-linux-gnu* )
2219 machine=macppc opsys=gnu-linux
2220 ;;
2221
ba4481b5
DL
2222 ## Masscomp machines
2223 m68*-masscomp-rtu* )
2224 machine=masscomp opsys=rtu
2225 ;;
2226
2227 ## Megatest machines
2228 m68*-megatest-bsd* )
2229 machine=mega68 opsys=bsd4-2
2230 ;;
2231
2232 ## Workstations sold by MIPS
2233 ## This is not necessarily all workstations using the MIPS processor -
2234 ## Irises are produced by SGI, and DECstations by DEC.
2235
2236 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2237 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2238 ## it gives for choosing between the alternatives seems to be "Use
2239 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2240 ## the BSD world." I'll assume that these are instructions for
2241 ## handling two odd situations, and that every other situation
2242 ## should use mips.h and usg5-2-2, they being listed first.
2243 mips-mips-usg* )
2244 machine=mips4
2245 ## Fall through to the general code at the bottom to decide on the OS.
2246 ;;
2247 mips-mips-riscos4* )
2248 machine=mips4 opsys=bsd4-3
2249 NON_GNU_CC="cc -systype bsd43"
2250 NON_GNU_CPP="cc -systype bsd43 -E"
2251 ;;
2252 mips-mips-riscos5* )
2253 machine=mips4 opsys=riscos5
2254 NON_GNU_CC="cc -systype bsd43"
2255 NON_GNU_CPP="cc -systype bsd43 -E"
2256 ;;
2257 mips-mips-bsd* )
2258 machine=mips opsys=bsd4-3
2259 ;;
2260 mips-mips-* )
2261 machine=mips opsys=usg5-2-2
2262 ;;
2263
2264 ## NeXT
2265 m68*-next-* | m68k-*-nextstep* )
2266 machine=m68k opsys=nextstep
2267 ;;
2268
2269 ## The complete machine from National Semiconductor
2270 ns32k-ns-genix* )
2271 machine=ns32000 opsys=usg5-2
2272 ;;
2273
2274 ## NCR machines
2275 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2276 machine=tower32 opsys=usg5-2-2
2277 ;;
2278 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2279 machine=tower32v3 opsys=usg5-3
2280 ;;
2281
2282 ## NEC EWS4800
2283 mips-nec-sysv4*)
2284 machine=ews4800 opsys=ux4800
2285 ;;
2286
2287 ## Nixdorf Targon 31
2288 m68*-nixdorf-sysv* )
2289 machine=targon31 opsys=usg5-2-2
2290 ;;
2291
2292 ## Nu (TI or LMI)
2293 m68*-nu-sysv* )
2294 machine=nu opsys=usg5-2
2295 ;;
2296
2297 ## Plexus
2298 m68*-plexus-sysv* )
2299 machine=plexus opsys=usg5-2
2300 ;;
2301
ba4481b5
DL
2302 ## Pyramid machines
2303 ## I don't really have any idea what sort of processor the Pyramid has,
2304 ## so I'm assuming it is its own architecture.
2305 pyramid-pyramid-bsd* )
2306 machine=pyramid opsys=bsd4-2
2307 ;;
2308
2309 ## Sequent Balance
2310 ns32k-sequent-bsd4.2* )
2311 machine=sequent opsys=bsd4-2
2312 ;;
2313 ns32k-sequent-bsd4.3* )
2314 machine=sequent opsys=bsd4-3
2315 ;;
2316
2317 ## Siemens Nixdorf
2318 mips-siemens-sysv* | mips-sni-sysv*)
2319 machine=mips-siemens opsys=usg5-4
2320 NON_GNU_CC=/usr/ccs/bin/cc
2321 NON_GNU_CPP=/usr/ccs/lib/cpp
2322 ;;
2323
2324 ## Silicon Graphics machines
2325 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2326 m68*-sgi-iris3.5* )
2327 machine=irist opsys=iris3-5
2328 ;;
2329 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2330 machine=irist opsys=iris3-6
2331 ;;
2332 ## Iris 4D
2333 mips-sgi-irix3* )
2334 machine=iris4d opsys=irix3-3
2335 ;;
2336 mips-sgi-irix4* )
2337 machine=iris4d opsys=irix4-0
2338 ;;
2339 mips-sgi-irix6.5 )
2340 machine=iris4d opsys=irix6-5
946173ad
DL
2341 # Without defining _LANGUAGE_C, things get masked out in the headers
2342 # so that, for instance, grepping for `free' in stdlib.h fails and
2343 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2344 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2345 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2346 ;;
2347 mips-sgi-irix6* )
2348 machine=iris4d opsys=irix6-0
c4bb2108 2349 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2350 # but presumably it does no harm.
2351 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2352 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2353 NON_GCC_TEST_OPTIONS=-32
2354 ;;
2355 mips-sgi-irix5.[01]* )
2356 machine=iris4d opsys=irix5-0
2357 ;;
2358 mips-sgi-irix5* | mips-sgi-irix* )
2359 machine=iris4d opsys=irix5-2
2360 ;;
2361
2362 ## SONY machines
2363 m68*-sony-bsd4.2* )
2364 machine=news opsys=bsd4-2
2365 ;;
2366 m68*-sony-bsd4.3* )
2367 machine=news opsys=bsd4-3
2368 ;;
2369 m68*-sony-newsos3* | m68*-sony-news3*)
2370 machine=news opsys=bsd4-3
2371 ;;
2372 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2373 machine=news-risc opsys=bsd4-3
2374 ;;
2375 mips-sony-newsos6* )
2376 machine=news-r6 opsys=newsos6
2377 ;;
2378 mips-sony-news* )
2379 machine=news-risc opsys=newsos5
2380 ;;
2381
2382 ## Stride
2383 m68*-stride-sysv* )
2384 machine=stride opsys=usg5-2
2385 ;;
2386
2387 ## Suns
2388 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2389 machine=sparc opsys=gnu-linux
2390 ;;
2391
d054101f 2392 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2393 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2394 | rs6000-*-solaris2*)
2395 case "${canonical}" in
2396 m68*-sunos1* ) machine=sun1 ;;
2397 m68*-sunos2* ) machine=sun2 ;;
2398 m68* ) machine=sun3 ;;
2399 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2400 i[3456]86-*-* ) machine=intel386 ;;
2401 powerpcle* ) machine=powerpcle ;;
2402 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2403 sparc* ) machine=sparc ;;
2404 * ) unported=yes ;;
2405 esac
2406 case "${canonical}" in
2407 ## The Sun386 didn't get past 4.0.
2408 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2409 *-sunos4.0* ) opsys=sunos4-0 ;;
2410 *-sunos4.1.[3-9]*noshare )
2411 ## This name is sunos413 instead of sunos4-1-3
2412 ## to avoid a file name conflict on MSDOS.
2413 opsys=sunos413
2414 NON_GNU_CPP=/usr/lib/cpp
2415 NON_GCC_TEST_OPTIONS=-Bstatic
2416 GCC_TEST_OPTIONS=-static
2417 ;;
2418 *-sunos4.1.[3-9]* | *-sunos4shr*)
2419 opsys=sunos4shr
2420 NON_GNU_CPP=/usr/lib/cpp
2421 ;;
2422 *-sunos4* | *-sunos )
2423 opsys=sunos4-1
2424 NON_GCC_TEST_OPTIONS=-Bstatic
2425 GCC_TEST_OPTIONS=-static
2426 ;;
2427 *-sunos5.3* | *-solaris2.3* )
2428 opsys=sol2-3
2429 NON_GNU_CPP=/usr/ccs/lib/cpp
2430 ;;
2431 *-sunos5.4* | *-solaris2.4* )
2432 opsys=sol2-4
2433 NON_GNU_CPP=/usr/ccs/lib/cpp
2434 RANLIB="ar -ts"
2435 ;;
2436 *-sunos5.5* | *-solaris2.5* )
2437 opsys=sol2-5
2438 NON_GNU_CPP=/usr/ccs/lib/cpp
2439 RANLIB="ar -ts"
2440 ;;
8e967cf7
MR
2441 *-sunos5.6* | *-solaris2.6* )
2442 opsys=sol2-6
2443 NON_GNU_CPP=/usr/ccs/lib/cpp
2444 RANLIB="ar -ts"
2445 ;;
ba4481b5 2446 *-sunos5* | *-solaris* )
9e71690e 2447 opsys=sol2-6
ba4481b5
DL
2448 NON_GNU_CPP=/usr/ccs/lib/cpp
2449 ;;
2450 * ) opsys=bsd4-2 ;;
2451 esac
2452 ## Watch out for a compiler that we know will not work.
2453 case "${canonical}" in
2454 *-solaris* | *-sunos5* )
2455 if [ "x$CC" = x/usr/ucb/cc ]; then
2456 ## /usr/ucb/cc doesn't work;
2457 ## we should find some other compiler that does work.
2458 unset CC
2459 fi
2460 ;;
2461 *) ;;
2462 esac
2463 ;;
2464 sparc-*-nextstep* )
2465 machine=sparc opsys=nextstep
2466 ;;
2467
2468 ## Tadpole 68k
2469 m68*-tadpole-sysv* )
2470 machine=tad68k opsys=usg5-3
2471 ;;
2472
2473 ## Tahoe machines
2474 tahoe-tahoe-bsd4.2* )
2475 machine=tahoe opsys=bsd4-2
2476 ;;
2477 tahoe-tahoe-bsd4.3* )
2478 machine=tahoe opsys=bsd4-3
2479 ;;
2480
2481 ## Tandem Integrity S2
2482 mips-tandem-sysv* )
2483 machine=tandem-s2 opsys=usg5-3
2484 ;;
2485
2486 ## Tektronix XD88
2487 m88k-tektronix-sysv3* )
2488 machine=tekxd88 opsys=usg5-3
2489 ;;
2490
2491 ## Tektronix 16000 box (6130?)
2492 ns16k-tektronix-bsd* )
2493 machine=ns16000 opsys=bsd4-2
2494 ;;
2495 ## Tektronix 4300
2496 ## src/m/tek4300.h hints that this is a m68k machine.
2497 m68*-tektronix-bsd* )
2498 machine=tek4300 opsys=bsd4-3
2499 ;;
2500
2501 ## Titan P2 or P3
2502 ## We seem to have lost the machine-description file titan.h!
2503 titan-titan-sysv* )
2504 machine=titan opsys=usg5-3
2505 ;;
2506
2507 ## Ustation E30 (SS5E)
2508 m68*-unisys-uniplus* )
2509 machine=ustation opsystem=unipl5-2
2510 ;;
2511
2512 ## Vaxen.
2513 vax-dec-* )
2514 machine=vax
2515 case "${canonical}" in
2516 *-bsd4.1* ) opsys=bsd4-1 ;;
2517 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2518 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2519 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2520 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2521 *-vms* ) opsys=vms ;;
2522 * ) unported=yes
2523 esac
2524 ;;
2525
2526 ## Whitechapel MG1
2527 ns16k-whitechapel-* )
2528 machine=mg1
2529 ## We don't know what sort of OS runs on these; we'll let the
2530 ## operating system guessing code below try.
2531 ;;
2532
2533 ## Wicat
2534 m68*-wicat-sysv* )
2535 machine=wicat opsys=usg5-2
2536 ;;
2537
f4988be7
GM
2538 ## IA-64
2539 ia64*-*-linux* )
2540 machine=ia64 opsys=gnu-linux
2541 ;;
2542
ba4481b5
DL
2543 ## Intel 386 machines where we don't care about the manufacturer
2544 i[3456]86-*-* )
2545 machine=intel386
2546 case "${canonical}" in
c60ee5e7 2547 *-cygwin ) opsys=cygwin ;;
9f817ea4 2548 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2549 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2550 *-isc2.2* ) opsys=isc2-2 ;;
2551 *-isc4.0* ) opsys=isc4-0 ;;
2552 *-isc4.* ) opsys=isc4-1
2553 GCC_TEST_OPTIONS=-posix
2554 NON_GCC_TEST_OPTIONS=-Xp
2555 ;;
2556 *-isc* ) opsys=isc3-0 ;;
2557 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2558 *-esix* ) opsys=esix ;;
2559 *-xenix* ) opsys=xenix ;;
2560 *-linux-gnu* ) opsys=gnu-linux ;;
2561 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2562 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2563 NON_GNU_CPP=/lib/cpp
2564 # Prevent -belf from being passed to $CPP.
2565 # /lib/cpp does not accept it.
2566 OVERRIDE_CPPFLAGS=" "
2567 ;;
2568 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2569 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2570 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2571 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2572 *-nextstep* ) opsys=nextstep ;;
2573 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2574 esac
2575 ;;
2576
2577 ## m68k Linux-based GNU system
2578 m68k-*-linux-gnu* )
2579 machine=m68k opsys=gnu-linux
2580 ;;
2581
2582 ## Mips Linux-based GNU system
cd958eb3 2583 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2584 machine=mips opsys=gnu-linux
2585 ;;
2586
2587 ## UXP/DS
2588 sparc-fujitsu-sysv4* )
2589 machine=sparc opsys=uxpds
2590 NON_GNU_CPP=/usr/ccs/lib/cpp
2591 RANLIB="ar -ts"
2592 ;;
2593
2594 ## UXP/V
2595 f301-fujitsu-uxpv4.1)
2596 machine=f301 opsys=uxpv
2597 ;;
2598
e0f712ba
AC
2599 ## Darwin / Mac OS X
2600 powerpc-apple-darwin* )
2601 machine=powermac opsys=darwin
2602 # Define CPP as follows to make autoconf work correctly.
2a75d75d 2603 CPP="${CC-cc} -E -no-cpp-precomp"
c14dc0ed
AS
2604 # Use fink packages if available.
2605 if test -d /sw/include && test -d /sw/lib; then
2606 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2607 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2608 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2609 fi
e0f712ba
AC
2610 ;;
2611
598a2813
AS
2612 ## AMD x86-64 Linux-based GNU system
2613 x86_64-*-linux-gnu* )
24b01ec4 2614 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2615 ;;
2616
ba4481b5
DL
2617 * )
2618 unported=yes
2619 ;;
2620esac
2621
2622### If the code above didn't choose an operating system, just choose
2623### an operating system based on the configuration name. You really
2624### only want to use this when you have no idea what the right
2625### operating system is; if you know what operating systems a machine
2626### runs, it's cleaner to make it explicit in the case statement
2627### above.
2628if test x"${opsys}" = x; then
2629 case "${canonical}" in
2630 *-gnu* ) opsys=gnu ;;
2631 *-bsd4.[01] ) opsys=bsd4-1 ;;
2632 *-bsd4.2 ) opsys=bsd4-2 ;;
2633 *-bsd4.3 ) opsys=bsd4-3 ;;
2634 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2635 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2636 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2637 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2638 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2639 *-sysv5uw* ) opsys=unixware ;;
2640 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2641 *-sysv4.1* | *-sysvr4.1* )
2642 NON_GNU_CPP=/usr/lib/cpp
2643 opsys=usg5-4 ;;
2644 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2645 if [ x$NON_GNU_CPP = x ]; then
2646 if [ -f /usr/ccs/lib/cpp ]; then
2647 NON_GNU_CPP=/usr/ccs/lib/cpp
2648 else
2649 NON_GNU_CPP=/lib/cpp
2650 fi
2651 fi
2652 opsys=usg5-4-2 ;;
2653 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2654 * )
2655 unported=yes
2656 ;;
2657 esac
2658fi
2659
c0d27fcc 2660
22044edf 2661
ba4481b5 2662if test $unported = yes; then
c0d27fcc 2663 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2664Check \`etc/MACHINES' for recognized configuration names." >&5
2665echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2666Check \`etc/MACHINES' for recognized configuration names." >&2;}
2667 { (exit 1); exit 1; }; }
ba4481b5
DL
2668fi
2669
2670machfile="m/${machine}.h"
2671opsysfile="s/${opsys}.h"
2672
c0d27fcc 2673
ba4481b5
DL
2674#### Choose a compiler.
2675test -n "$CC" && cc_specified=yes
2676
2677# Save the value of CFLAGS that the user specified.
2678SPECIFIED_CFLAGS="$CFLAGS"
2679
2680case ${with_gcc} in
2681 "yes" ) CC="gcc" GCC=yes ;;
2682 "no" ) : ${CC=cc} ;;
503d2be0
AS
2683 * )
2684esac
2685ac_ext=c
2686ac_cpp='$CPP $CPPFLAGS'
2687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689ac_compiler_gnu=$ac_cv_c_compiler_gnu
2690if test -n "$ac_tool_prefix"; then
2691 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2692set dummy ${ac_tool_prefix}gcc; ac_word=$2
c0d27fcc 2693echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2694echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2695if test "${ac_cv_prog_CC+set}" = set; then
2696 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2697else
2698 if test -n "$CC"; then
2699 ac_cv_prog_CC="$CC" # Let the user override the test.
2700else
c0d27fcc
MR
2701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2702for as_dir in $PATH
2703do
2704 IFS=$as_save_IFS
2705 test -z "$as_dir" && as_dir=.
2706 for ac_exec_ext in '' $ac_executable_extensions; do
2707 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2708 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2709 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2710 break 2
2711 fi
2712done
503d2be0
AS
2713done
2714
ba4481b5
DL
2715fi
2716fi
503d2be0 2717CC=$ac_cv_prog_CC
ba4481b5 2718if test -n "$CC"; then
c0d27fcc 2719 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2720echo "${ECHO_T}$CC" >&6
2721else
c0d27fcc 2722 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2723echo "${ECHO_T}no" >&6
2724fi
2725
2726fi
2727if test -z "$ac_cv_prog_CC"; then
2728 ac_ct_CC=$CC
2729 # Extract the first word of "gcc", so it can be a program name with args.
2730set dummy gcc; ac_word=$2
c0d27fcc 2731echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2732echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2733if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2734 echo $ECHO_N "(cached) $ECHO_C" >&6
2735else
2736 if test -n "$ac_ct_CC"; then
2737 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2738else
c0d27fcc
MR
2739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2740for as_dir in $PATH
2741do
2742 IFS=$as_save_IFS
2743 test -z "$as_dir" && as_dir=.
2744 for ac_exec_ext in '' $ac_executable_extensions; do
2745 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2746 ac_cv_prog_ac_ct_CC="gcc"
2747 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2748 break 2
2749 fi
2750done
503d2be0
AS
2751done
2752
2753fi
2754fi
2755ac_ct_CC=$ac_cv_prog_ac_ct_CC
2756if test -n "$ac_ct_CC"; then
c0d27fcc 2757 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0 2758echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2759else
c0d27fcc 2760 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2761echo "${ECHO_T}no" >&6
2762fi
2763
2764 CC=$ac_ct_CC
2765else
2766 CC="$ac_cv_prog_CC"
ba4481b5
DL
2767fi
2768
2769if test -z "$CC"; then
503d2be0
AS
2770 if test -n "$ac_tool_prefix"; then
2771 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2772set dummy ${ac_tool_prefix}cc; ac_word=$2
c0d27fcc 2773echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2774echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2775if test "${ac_cv_prog_CC+set}" = set; then
2776 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2777else
2778 if test -n "$CC"; then
2779 ac_cv_prog_CC="$CC" # Let the user override the test.
2780else
c0d27fcc
MR
2781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2782for as_dir in $PATH
2783do
2784 IFS=$as_save_IFS
2785 test -z "$as_dir" && as_dir=.
2786 for ac_exec_ext in '' $ac_executable_extensions; do
2787 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2788 ac_cv_prog_CC="${ac_tool_prefix}cc"
2789 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2790 break 2
2791 fi
2792done
503d2be0
AS
2793done
2794
2795fi
2796fi
2797CC=$ac_cv_prog_CC
2798if test -n "$CC"; then
c0d27fcc 2799 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2800echo "${ECHO_T}$CC" >&6
2801else
c0d27fcc 2802 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2803echo "${ECHO_T}no" >&6
2804fi
2805
2806fi
2807if test -z "$ac_cv_prog_CC"; then
2808 ac_ct_CC=$CC
2809 # Extract the first word of "cc", so it can be a program name with args.
2810set dummy cc; ac_word=$2
c0d27fcc 2811echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2812echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2813if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2814 echo $ECHO_N "(cached) $ECHO_C" >&6
2815else
2816 if test -n "$ac_ct_CC"; then
2817 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2818else
c0d27fcc
MR
2819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2820for as_dir in $PATH
2821do
2822 IFS=$as_save_IFS
2823 test -z "$as_dir" && as_dir=.
2824 for ac_exec_ext in '' $ac_executable_extensions; do
2825 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2826 ac_cv_prog_ac_ct_CC="cc"
2827 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2828 break 2
2829 fi
2830done
503d2be0
AS
2831done
2832
2833fi
2834fi
2835ac_ct_CC=$ac_cv_prog_ac_ct_CC
2836if test -n "$ac_ct_CC"; then
c0d27fcc 2837 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2838echo "${ECHO_T}$ac_ct_CC" >&6
2839else
c0d27fcc 2840 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2841echo "${ECHO_T}no" >&6
2842fi
2843
2844 CC=$ac_ct_CC
2845else
2846 CC="$ac_cv_prog_CC"
2847fi
2848
2849fi
2850if test -z "$CC"; then
2851 # Extract the first word of "cc", so it can be a program name with args.
2852set dummy cc; ac_word=$2
c0d27fcc 2853echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2854echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2855if test "${ac_cv_prog_CC+set}" = set; then
2856 echo $ECHO_N "(cached) $ECHO_C" >&6
2857else
2858 if test -n "$CC"; then
2859 ac_cv_prog_CC="$CC" # Let the user override the test.
2860else
2861 ac_prog_rejected=no
c0d27fcc
MR
2862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2863for as_dir in $PATH
2864do
2865 IFS=$as_save_IFS
2866 test -z "$as_dir" && as_dir=.
2867 for ac_exec_ext in '' $ac_executable_extensions; do
2868 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2869 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2870 ac_prog_rejected=yes
2871 continue
2872 fi
2873 ac_cv_prog_CC="cc"
2874 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2875 break 2
2876 fi
2877done
503d2be0
AS
2878done
2879
ba4481b5
DL
2880if test $ac_prog_rejected = yes; then
2881 # We found a bogon in the path, so make sure we never use it.
2882 set dummy $ac_cv_prog_CC
2883 shift
503d2be0 2884 if test $# != 0; then
ba4481b5
DL
2885 # We chose a different compiler from the bogus one.
2886 # However, it has the same basename, so the bogon will be chosen
2887 # first if we set CC to just the basename; use the full file name.
2888 shift
6bae0ccf 2889 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2890 fi
2891fi
2892fi
2893fi
503d2be0 2894CC=$ac_cv_prog_CC
ba4481b5 2895if test -n "$CC"; then
c0d27fcc 2896 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2897echo "${ECHO_T}$CC" >&6
ba4481b5 2898else
c0d27fcc 2899 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2900echo "${ECHO_T}no" >&6
ba4481b5
DL
2901fi
2902
503d2be0
AS
2903fi
2904if test -z "$CC"; then
2905 if test -n "$ac_tool_prefix"; then
2906 for ac_prog in cl
2907 do
2908 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2909set dummy $ac_tool_prefix$ac_prog; ac_word=$2
c0d27fcc 2910echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2911echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2912if test "${ac_cv_prog_CC+set}" = set; then
2913 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2914else
2915 if test -n "$CC"; then
2916 ac_cv_prog_CC="$CC" # Let the user override the test.
2917else
c0d27fcc
MR
2918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2919for as_dir in $PATH
2920do
2921 IFS=$as_save_IFS
2922 test -z "$as_dir" && as_dir=.
2923 for ac_exec_ext in '' $ac_executable_extensions; do
2924 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2925 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2926 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2927 break 2
2928 fi
2929done
503d2be0
AS
2930done
2931
c4bb2108
DL
2932fi
2933fi
503d2be0 2934CC=$ac_cv_prog_CC
c4bb2108 2935if test -n "$CC"; then
c0d27fcc 2936 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2937echo "${ECHO_T}$CC" >&6
c4bb2108 2938else
c0d27fcc 2939 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2940echo "${ECHO_T}no" >&6
2941fi
2942
2943 test -n "$CC" && break
2944 done
2945fi
2946if test -z "$CC"; then
2947 ac_ct_CC=$CC
2948 for ac_prog in cl
2949do
2950 # Extract the first word of "$ac_prog", so it can be a program name with args.
2951set dummy $ac_prog; ac_word=$2
c0d27fcc 2952echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2953echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2954if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2955 echo $ECHO_N "(cached) $ECHO_C" >&6
2956else
2957 if test -n "$ac_ct_CC"; then
2958 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2959else
c0d27fcc
MR
2960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2961for as_dir in $PATH
2962do
2963 IFS=$as_save_IFS
2964 test -z "$as_dir" && as_dir=.
2965 for ac_exec_ext in '' $ac_executable_extensions; do
2966 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2967 ac_cv_prog_ac_ct_CC="$ac_prog"
2968 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2969 break 2
2970 fi
2971done
503d2be0
AS
2972done
2973
c4bb2108 2974fi
503d2be0
AS
2975fi
2976ac_ct_CC=$ac_cv_prog_ac_ct_CC
2977if test -n "$ac_ct_CC"; then
c0d27fcc 2978 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2979echo "${ECHO_T}$ac_ct_CC" >&6
2980else
c0d27fcc 2981 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2982echo "${ECHO_T}no" >&6
ba4481b5
DL
2983fi
2984
503d2be0
AS
2985 test -n "$ac_ct_CC" && break
2986done
ba4481b5 2987
503d2be0
AS
2988 CC=$ac_ct_CC
2989fi
2990
2991fi
ba4481b5 2992
c0d27fcc 2993
19650fd6
AS
2994test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2995See \`config.log' for more details." >&5
2996echo "$as_me: error: no acceptable C compiler found in \$PATH
2997See \`config.log' for more details." >&2;}
503d2be0 2998 { (exit 1); exit 1; }; }
c4bb2108 2999
503d2be0 3000# Provide some information about the compiler.
c0d27fcc 3001echo "$as_me:$LINENO:" \
503d2be0
AS
3002 "checking for C compiler version" >&5
3003ac_compiler=`set X $ac_compile; echo $2`
c0d27fcc 3004{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
3005 (eval $ac_compiler --version </dev/null >&5) 2>&5
3006 ac_status=$?
c0d27fcc 3007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3008 (exit $ac_status); }
c0d27fcc 3009{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
3010 (eval $ac_compiler -v </dev/null >&5) 2>&5
3011 ac_status=$?
c0d27fcc 3012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3013 (exit $ac_status); }
c0d27fcc 3014{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
3015 (eval $ac_compiler -V </dev/null >&5) 2>&5
3016 ac_status=$?
c0d27fcc 3017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3018 (exit $ac_status); }
3019
3020cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3021/* confdefs.h. */
3022_ACEOF
3023cat confdefs.h >>conftest.$ac_ext
3024cat >>conftest.$ac_ext <<_ACEOF
3025/* end confdefs.h. */
c4bb2108 3026
503d2be0
AS
3027int
3028main ()
3029{
3030
3031 ;
3032 return 0;
3033}
3034_ACEOF
3035ac_clean_files_save=$ac_clean_files
19650fd6 3036ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3037# Try to create an executable without -o first, disregard a.out.
3038# It will help us diagnose broken compilers, and finding out an intuition
3039# of exeext.
35996d22
AS
3040echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3041echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
503d2be0 3042ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
c0d27fcc 3043if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
503d2be0
AS
3044 (eval $ac_link_default) 2>&5
3045 ac_status=$?
c0d27fcc 3046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3047 (exit $ac_status); }; then
3048 # Find the output, starting from the most likely. This scheme is
3049# not robust to junk in `.', hence go to wildcards (a.*) only as a last
3050# resort.
c0d27fcc
MR
3051
3052# Be careful to initialize this variable, since it used to be cached.
3053# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
3054ac_cv_exeext=
19650fd6
AS
3055# b.out is created by i960 compilers.
3056for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
3057do
6bae0ccf 3058 test -f "$ac_file" || continue
503d2be0 3059 case $ac_file in
19650fd6 3060 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
35996d22 3061 ;;
19650fd6 3062 conftest.$ac_ext )
35996d22
AS
3063 # This is the source file.
3064 ;;
19650fd6 3065 [ab].out )
35996d22
AS
3066 # We found the default executable, but exeext='' is most
3067 # certainly right.
3068 break;;
19650fd6 3069 *.* )
35996d22
AS
3070 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3071 # FIXME: I believe we export ac_cv_exeext for Libtool,
3072 # but it would be cool to find out if it's true. Does anybody
3073 # maintain Libtool? --akim.
3074 export ac_cv_exeext
3075 break;;
19650fd6 3076 * )
35996d22 3077 break;;
503d2be0
AS
3078 esac
3079done
3080else
3081 echo "$as_me: failed program was:" >&5
19650fd6
AS
3082sed 's/^/| /' conftest.$ac_ext >&5
3083
6bae0ccf 3084{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3085See \`config.log' for more details." >&5
6bae0ccf 3086echo "$as_me: error: C compiler cannot create executables
19650fd6 3087See \`config.log' for more details." >&2;}
503d2be0
AS
3088 { (exit 77); exit 77; }; }
3089fi
3090
3091ac_exeext=$ac_cv_exeext
c0d27fcc 3092echo "$as_me:$LINENO: result: $ac_file" >&5
503d2be0
AS
3093echo "${ECHO_T}$ac_file" >&6
3094
3095# Check the compiler produces executables we can run. If not, either
3096# the compiler is broken, or we cross compile.
c0d27fcc 3097echo "$as_me:$LINENO: checking whether the C compiler works" >&5
503d2be0
AS
3098echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
3099# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3100# If not cross compiling, check that we can run a simple program.
3101if test "$cross_compiling" != yes; then
3102 if { ac_try='./$ac_file'
c0d27fcc 3103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3104 (eval $ac_try) 2>&5
3105 ac_status=$?
c0d27fcc 3106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3107 (exit $ac_status); }; }; then
3108 cross_compiling=no
ba4481b5 3109 else
503d2be0
AS
3110 if test "$cross_compiling" = maybe; then
3111 cross_compiling=yes
3112 else
c0d27fcc 3113 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3114If you meant to cross compile, use \`--host'.
3115See \`config.log' for more details." >&5
503d2be0 3116echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3117If you meant to cross compile, use \`--host'.
3118See \`config.log' for more details." >&2;}
503d2be0
AS
3119 { (exit 1); exit 1; }; }
3120 fi
ba4481b5 3121 fi
503d2be0 3122fi
c0d27fcc 3123echo "$as_me:$LINENO: result: yes" >&5
503d2be0
AS
3124echo "${ECHO_T}yes" >&6
3125
19650fd6 3126rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0
AS
3127ac_clean_files=$ac_clean_files_save
3128# Check the compiler produces executables we can run. If not, either
3129# the compiler is broken, or we cross compile.
c0d27fcc 3130echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
503d2be0 3131echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
c0d27fcc 3132echo "$as_me:$LINENO: result: $cross_compiling" >&5
503d2be0
AS
3133echo "${ECHO_T}$cross_compiling" >&6
3134
c0d27fcc
MR
3135echo "$as_me:$LINENO: checking for suffix of executables" >&5
3136echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3137if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
3138 (eval $ac_link) 2>&5
3139 ac_status=$?
c0d27fcc 3140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3141 (exit $ac_status); }; then
3142 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3143# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3144# work properly (i.e., refer to `conftest.exe'), while it won't with
3145# `rm'.
6bae0ccf
DL
3146for ac_file in conftest.exe conftest conftest.*; do
3147 test -f "$ac_file" || continue
503d2be0 3148 case $ac_file in
6bae0ccf 3149 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
503d2be0 3150 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
35996d22
AS
3151 export ac_cv_exeext
3152 break;;
503d2be0
AS
3153 * ) break;;
3154 esac
3155done
ba4481b5 3156else
19650fd6
AS
3157 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3158See \`config.log' for more details." >&5
3159echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3160See \`config.log' for more details." >&2;}
503d2be0 3161 { (exit 1); exit 1; }; }
ba4481b5 3162fi
ba4481b5 3163
503d2be0 3164rm -f conftest$ac_cv_exeext
c0d27fcc 3165echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
503d2be0 3166echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 3167
503d2be0
AS
3168rm -f conftest.$ac_ext
3169EXEEXT=$ac_cv_exeext
3170ac_exeext=$EXEEXT
c0d27fcc
MR
3171echo "$as_me:$LINENO: checking for suffix of object files" >&5
3172echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
503d2be0
AS
3173if test "${ac_cv_objext+set}" = set; then
3174 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3175else
503d2be0 3176 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3177/* confdefs.h. */
3178_ACEOF
3179cat confdefs.h >>conftest.$ac_ext
3180cat >>conftest.$ac_ext <<_ACEOF
3181/* end confdefs.h. */
ba4481b5 3182
503d2be0
AS
3183int
3184main ()
3185{
ba4481b5 3186
503d2be0
AS
3187 ;
3188 return 0;
3189}
3190_ACEOF
3191rm -f conftest.o conftest.obj
c0d27fcc 3192if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3193 (eval $ac_compile) 2>&5
3194 ac_status=$?
c0d27fcc 3195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3196 (exit $ac_status); }; then
3197 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3198 case $ac_file in
6bae0ccf 3199 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
503d2be0
AS
3200 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3201 break;;
3202 esac
3203done
c4bb2108 3204else
503d2be0 3205 echo "$as_me: failed program was:" >&5
19650fd6
AS
3206sed 's/^/| /' conftest.$ac_ext >&5
3207
3208{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3209See \`config.log' for more details." >&5
3210echo "$as_me: error: cannot compute suffix of object files: cannot compile
3211See \`config.log' for more details." >&2;}
503d2be0 3212 { (exit 1); exit 1; }; }
c4bb2108
DL
3213fi
3214
503d2be0
AS
3215rm -f conftest.$ac_cv_objext conftest.$ac_ext
3216fi
c0d27fcc 3217echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
503d2be0
AS
3218echo "${ECHO_T}$ac_cv_objext" >&6
3219OBJEXT=$ac_cv_objext
3220ac_objext=$OBJEXT
c0d27fcc 3221echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
3222echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3223if test "${ac_cv_c_compiler_gnu+set}" = set; then
3224 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3225else
503d2be0 3226 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3227/* confdefs.h. */
3228_ACEOF
3229cat confdefs.h >>conftest.$ac_ext
3230cat >>conftest.$ac_ext <<_ACEOF
3231/* end confdefs.h. */
503d2be0
AS
3232
3233int
3234main ()
3235{
3236#ifndef __GNUC__
3237 choke me
3238#endif
3239
3240 ;
3241 return 0;
3242}
3243_ACEOF
3244rm -f conftest.$ac_objext
c0d27fcc 3245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3246 (eval $ac_compile) 2>conftest.er1
503d2be0 3247 ac_status=$?
35996d22
AS
3248 grep -v '^ *+' conftest.er1 >conftest.err
3249 rm -f conftest.er1
3250 cat conftest.err >&5
c0d27fcc 3251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3252 (exit $ac_status); } &&
c08e6004 3253 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
3254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3255 (eval $ac_try) 2>&5
3256 ac_status=$?
3257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3258 (exit $ac_status); }; } &&
3259 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3261 (eval $ac_try) 2>&5
3262 ac_status=$?
c0d27fcc 3263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3264 (exit $ac_status); }; }; then
3265 ac_compiler_gnu=yes
3266else
3267 echo "$as_me: failed program was:" >&5
19650fd6
AS
3268sed 's/^/| /' conftest.$ac_ext >&5
3269
503d2be0
AS
3270ac_compiler_gnu=no
3271fi
35996d22 3272rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3273ac_cv_c_compiler_gnu=$ac_compiler_gnu
3274
3275fi
c0d27fcc 3276echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
3277echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3278GCC=`test $ac_compiler_gnu = yes && echo yes`
3279ac_test_CFLAGS=${CFLAGS+set}
3280ac_save_CFLAGS=$CFLAGS
3281CFLAGS="-g"
c0d27fcc 3282echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
503d2be0
AS
3283echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3284if test "${ac_cv_prog_cc_g+set}" = set; then
3285 echo $ECHO_N "(cached) $ECHO_C" >&6
3286else
3287 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3288/* confdefs.h. */
3289_ACEOF
3290cat confdefs.h >>conftest.$ac_ext
3291cat >>conftest.$ac_ext <<_ACEOF
3292/* end confdefs.h. */
503d2be0
AS
3293
3294int
3295main ()
3296{
3297
3298 ;
3299 return 0;
3300}
3301_ACEOF
3302rm -f conftest.$ac_objext
c0d27fcc 3303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3304 (eval $ac_compile) 2>conftest.er1
503d2be0 3305 ac_status=$?
35996d22
AS
3306 grep -v '^ *+' conftest.er1 >conftest.err
3307 rm -f conftest.er1
3308 cat conftest.err >&5
c0d27fcc 3309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3310 (exit $ac_status); } &&
c08e6004 3311 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
3312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3313 (eval $ac_try) 2>&5
3314 ac_status=$?
3315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3316 (exit $ac_status); }; } &&
3317 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3319 (eval $ac_try) 2>&5
3320 ac_status=$?
c0d27fcc 3321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3322 (exit $ac_status); }; }; then
ba4481b5
DL
3323 ac_cv_prog_cc_g=yes
3324else
503d2be0 3325 echo "$as_me: failed program was:" >&5
19650fd6
AS
3326sed 's/^/| /' conftest.$ac_ext >&5
3327
503d2be0 3328ac_cv_prog_cc_g=no
ba4481b5 3329fi
35996d22 3330rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 3331fi
c0d27fcc 3332echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
503d2be0 3333echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 3334if test "$ac_test_CFLAGS" = set; then
503d2be0 3335 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3336elif test $ac_cv_prog_cc_g = yes; then
3337 if test "$GCC" = yes; then
ba4481b5
DL
3338 CFLAGS="-g -O2"
3339 else
c4bb2108 3340 CFLAGS="-g"
ba4481b5 3341 fi
22afa6e8 3342else
c4bb2108
DL
3343 if test "$GCC" = yes; then
3344 CFLAGS="-O2"
3345 else
3346 CFLAGS=
3347 fi
ba4481b5 3348fi
6bae0ccf
DL
3349echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3350echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3351if test "${ac_cv_prog_cc_stdc+set}" = set; then
3352 echo $ECHO_N "(cached) $ECHO_C" >&6
3353else
3354 ac_cv_prog_cc_stdc=no
3355ac_save_CC=$CC
3356cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3357/* confdefs.h. */
3358_ACEOF
3359cat confdefs.h >>conftest.$ac_ext
3360cat >>conftest.$ac_ext <<_ACEOF
3361/* end confdefs.h. */
6bae0ccf
DL
3362#include <stdarg.h>
3363#include <stdio.h>
3364#include <sys/types.h>
3365#include <sys/stat.h>
3366/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3367struct buf { int x; };
3368FILE * (*rcsopen) (struct buf *, struct stat *, int);
3369static char *e (p, i)
3370 char **p;
3371 int i;
3372{
3373 return p[i];
3374}
3375static char *f (char * (*g) (char **, int), char **p, ...)
3376{
3377 char *s;
3378 va_list v;
3379 va_start (v,p);
3380 s = g (p, va_arg (v,int));
3381 va_end (v);
3382 return s;
3383}
35996d22
AS
3384
3385/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3386 function prototypes and stuff, but not '\xHH' hex character constants.
3387 These don't provoke an error unfortunately, instead are silently treated
3388 as 'x'. The following induces an error, until -std1 is added to get
3389 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3390 array size at least. It's necessary to write '\x00'==0 to get something
3391 that's true only with -std1. */
3392int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3393
6bae0ccf
DL
3394int test (int i, double x);
3395struct s1 {int (*f) (int a);};
3396struct s2 {int (*f) (double a);};
3397int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3398int argc;
3399char **argv;
3400int
3401main ()
3402{
3403return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3404 ;
3405 return 0;
3406}
3407_ACEOF
3408# Don't try gcc -ansi; that turns off useful extensions and
3409# breaks some systems' header files.
3410# AIX -qlanglvl=ansi
3411# Ultrix and OSF/1 -std1
3412# HP-UX 10.20 and later -Ae
3413# HP-UX older versions -Aa -D_HPUX_SOURCE
3414# SVR4 -Xc -D__EXTENSIONS__
3415for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3416do
3417 CC="$ac_save_CC $ac_arg"
3418 rm -f conftest.$ac_objext
3419if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3420 (eval $ac_compile) 2>conftest.er1
6bae0ccf 3421 ac_status=$?
35996d22
AS
3422 grep -v '^ *+' conftest.er1 >conftest.err
3423 rm -f conftest.er1
3424 cat conftest.err >&5
6bae0ccf
DL
3425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3426 (exit $ac_status); } &&
c08e6004 3427 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
3428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3429 (eval $ac_try) 2>&5
3430 ac_status=$?
3431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3432 (exit $ac_status); }; } &&
3433 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
3434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3435 (eval $ac_try) 2>&5
3436 ac_status=$?
3437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3438 (exit $ac_status); }; }; then
3439 ac_cv_prog_cc_stdc=$ac_arg
3440break
3441else
3442 echo "$as_me: failed program was:" >&5
19650fd6
AS
3443sed 's/^/| /' conftest.$ac_ext >&5
3444
6bae0ccf 3445fi
35996d22 3446rm -f conftest.err conftest.$ac_objext
6bae0ccf
DL
3447done
3448rm -f conftest.$ac_ext conftest.$ac_objext
3449CC=$ac_save_CC
3450
3451fi
3452
3453case "x$ac_cv_prog_cc_stdc" in
3454 x|xno)
3455 echo "$as_me:$LINENO: result: none needed" >&5
3456echo "${ECHO_T}none needed" >&6 ;;
3457 *)
3458 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3459echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3460 CC="$CC $ac_cv_prog_cc_stdc" ;;
3461esac
3462
503d2be0
AS
3463# Some people use a C++ compiler to compile C. Since we use `exit',
3464# in C++ we need to declare it. In case someone uses the same compiler
3465# for both compiling C and C++ we need to have the C++ compiler decide
3466# the declaration of exit, since it's the most demanding environment.
3467cat >conftest.$ac_ext <<_ACEOF
3468#ifndef __cplusplus
3469 choke me
3470#endif
3471_ACEOF
3472rm -f conftest.$ac_objext
c0d27fcc 3473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3474 (eval $ac_compile) 2>conftest.er1
503d2be0 3475 ac_status=$?
35996d22
AS
3476 grep -v '^ *+' conftest.er1 >conftest.err
3477 rm -f conftest.er1
3478 cat conftest.err >&5
c0d27fcc 3479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3480 (exit $ac_status); } &&
c08e6004 3481 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
3482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3483 (eval $ac_try) 2>&5
3484 ac_status=$?
3485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3486 (exit $ac_status); }; } &&
3487 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3489 (eval $ac_try) 2>&5
3490 ac_status=$?
c0d27fcc 3491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3492 (exit $ac_status); }; }; then
3493 for ac_declaration in \
35996d22 3494 '' \
503d2be0
AS
3495 'extern "C" void std::exit (int) throw (); using std::exit;' \
3496 'extern "C" void std::exit (int); using std::exit;' \
3497 'extern "C" void exit (int) throw ();' \
3498 'extern "C" void exit (int);' \
cffcede7 3499 'void exit (int);'
503d2be0
AS
3500do
3501 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3502/* confdefs.h. */
3503_ACEOF
3504cat confdefs.h >>conftest.$ac_ext
3505cat >>conftest.$ac_ext <<_ACEOF
3506/* end confdefs.h. */
57669b57 3507$ac_declaration
35996d22 3508#include <stdlib.h>
503d2be0
AS
3509int
3510main ()
3511{
3512exit (42);
3513 ;
3514 return 0;
3515}
3516_ACEOF
3517rm -f conftest.$ac_objext
c0d27fcc 3518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3519 (eval $ac_compile) 2>conftest.er1
503d2be0 3520 ac_status=$?
35996d22
AS
3521 grep -v '^ *+' conftest.er1 >conftest.err
3522 rm -f conftest.er1
3523 cat conftest.err >&5
c0d27fcc 3524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3525 (exit $ac_status); } &&
c08e6004 3526 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
3527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3528 (eval $ac_try) 2>&5
3529 ac_status=$?
3530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3531 (exit $ac_status); }; } &&
3532 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3534 (eval $ac_try) 2>&5
3535 ac_status=$?
c0d27fcc 3536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3537 (exit $ac_status); }; }; then
3538 :
3539else
3540 echo "$as_me: failed program was:" >&5
19650fd6
AS
3541sed 's/^/| /' conftest.$ac_ext >&5
3542
503d2be0
AS
3543continue
3544fi
35996d22 3545rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 3546 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3547/* confdefs.h. */
3548_ACEOF
3549cat confdefs.h >>conftest.$ac_ext
3550cat >>conftest.$ac_ext <<_ACEOF
3551/* end confdefs.h. */
503d2be0
AS
3552$ac_declaration
3553int
3554main ()
3555{
3556exit (42);
3557 ;
3558 return 0;
3559}
3560_ACEOF
3561rm -f conftest.$ac_objext
c0d27fcc 3562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3563 (eval $ac_compile) 2>conftest.er1
503d2be0 3564 ac_status=$?
35996d22
AS
3565 grep -v '^ *+' conftest.er1 >conftest.err
3566 rm -f conftest.er1
3567 cat conftest.err >&5
c0d27fcc 3568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3569 (exit $ac_status); } &&
c08e6004 3570 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
3571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3572 (eval $ac_try) 2>&5
3573 ac_status=$?
3574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3575 (exit $ac_status); }; } &&
3576 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3578 (eval $ac_try) 2>&5
3579 ac_status=$?
c0d27fcc 3580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3581 (exit $ac_status); }; }; then
3582 break
3583else
3584 echo "$as_me: failed program was:" >&5
19650fd6
AS
3585sed 's/^/| /' conftest.$ac_ext >&5
3586
503d2be0 3587fi
35996d22 3588rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3589done
3590rm -f conftest*
3591if test -n "$ac_declaration"; then
3592 echo '#ifdef __cplusplus' >>confdefs.h
3593 echo $ac_declaration >>confdefs.h
3594 echo '#endif' >>confdefs.h
3595fi
ba4481b5 3596
503d2be0
AS
3597else
3598 echo "$as_me: failed program was:" >&5
19650fd6
AS
3599sed 's/^/| /' conftest.$ac_ext >&5
3600
503d2be0 3601fi
35996d22 3602rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3603ac_ext=c
3604ac_cpp='$CPP $CPPFLAGS'
3605ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3606ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3607ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3608
c0d27fcc 3609
ba4481b5
DL
3610# On Suns, sometimes $CPP names a directory.
3611if test -n "$CPP" && test -d "$CPP"; then
3612 CPP=
3613fi
3614
3615#### Some systems specify a CPP to use unless we are using GCC.
3616#### Now that we know whether we are using GCC, we can decide whether
3617#### to use that one.
3618if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3619then
3620 CPP="$NON_GNU_CPP"
3621fi
3622
3623#### Some systems specify a CC to use unless we are using GCC.
3624#### Now that we know whether we are using GCC, we can decide whether
3625#### to use that one.
3626if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3627 test x$cc_specified != xyes
3628then
3629 CC="$NON_GNU_CC"
3630fi
3631
3632if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3633then
3634 CC="$CC $GCC_TEST_OPTIONS"
3635fi
3636
3637if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3638then
3639 CC="$CC $NON_GCC_TEST_OPTIONS"
3640fi
3641
6a3a24fa 3642#### Some other nice autoconf tests.
ba4481b5 3643
c0d27fcc 3644echo "$as_me:$LINENO: checking whether ln -s works" >&5
503d2be0
AS
3645echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3646LN_S=$as_ln_s
3647if test "$LN_S" = "ln -s"; then
c0d27fcc 3648 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 3649echo "${ECHO_T}yes" >&6
ba4481b5 3650else
c0d27fcc 3651 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
503d2be0 3652echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
3653fi
3654
503d2be0
AS
3655ac_ext=c
3656ac_cpp='$CPP $CPPFLAGS'
3657ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3658ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3659ac_compiler_gnu=$ac_cv_c_compiler_gnu
c0d27fcc 3660echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
503d2be0 3661echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
3662# On Suns, sometimes $CPP names a directory.
3663if test -n "$CPP" && test -d "$CPP"; then
3664 CPP=
3665fi
3666if test -z "$CPP"; then
503d2be0
AS
3667 if test "${ac_cv_prog_CPP+set}" = set; then
3668 echo $ECHO_N "(cached) $ECHO_C" >&6
3669else
3670 # Double quotes because CPP needs to be expanded
3671 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3672 do
3673 ac_preproc_ok=false
3674for ac_c_preproc_warn_flag in '' yes
3675do
3676 # Use a header file that comes with gcc, so configuring glibc
3677 # with a fresh cross-compiler works.
19650fd6
AS
3678 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3679 # <limits.h> exists even on freestanding compilers.
ba4481b5 3680 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3681 # not just through cpp. "Syntax error" is here to catch this case.
3682 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3683/* confdefs.h. */
3684_ACEOF
3685cat confdefs.h >>conftest.$ac_ext
3686cat >>conftest.$ac_ext <<_ACEOF
3687/* end confdefs.h. */
3688#ifdef __STDC__
3689# include <limits.h>
3690#else
3691# include <assert.h>
3692#endif
35996d22 3693 Syntax error
503d2be0 3694_ACEOF
c0d27fcc 3695if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3696 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3697 ac_status=$?
6bae0ccf 3698 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3699 rm -f conftest.er1
3700 cat conftest.err >&5
c0d27fcc 3701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3702 (exit $ac_status); } >/dev/null; then
3703 if test -s conftest.err; then
3704 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3705 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3706 else
3707 ac_cpp_err=
3708 fi
3709else
3710 ac_cpp_err=yes
3711fi
3712if test -z "$ac_cpp_err"; then
ba4481b5
DL
3713 :
3714else
503d2be0 3715 echo "$as_me: failed program was:" >&5
19650fd6
AS
3716sed 's/^/| /' conftest.$ac_ext >&5
3717
503d2be0
AS
3718 # Broken: fails on valid input.
3719continue
3720fi
3721rm -f conftest.err conftest.$ac_ext
3722
3723 # OK, works on sane cases. Now check whether non-existent headers
3724 # can be detected and how.
3725 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3726/* confdefs.h. */
3727_ACEOF
3728cat confdefs.h >>conftest.$ac_ext
3729cat >>conftest.$ac_ext <<_ACEOF
3730/* end confdefs.h. */
503d2be0
AS
3731#include <ac_nonexistent.h>
3732_ACEOF
c0d27fcc 3733if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3734 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3735 ac_status=$?
6bae0ccf 3736 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3737 rm -f conftest.er1
3738 cat conftest.err >&5
c0d27fcc 3739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3740 (exit $ac_status); } >/dev/null; then
3741 if test -s conftest.err; then
3742 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3743 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3744 else
3745 ac_cpp_err=
3746 fi
3747else
3748 ac_cpp_err=yes
3749fi
3750if test -z "$ac_cpp_err"; then
3751 # Broken: success on invalid input.
3752continue
c4bb2108 3753else
503d2be0 3754 echo "$as_me: failed program was:" >&5
19650fd6
AS
3755sed 's/^/| /' conftest.$ac_ext >&5
3756
503d2be0
AS
3757 # Passes both tests.
3758ac_preproc_ok=:
3759break
3760fi
3761rm -f conftest.err conftest.$ac_ext
3762
3763done
3764# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3765rm -f conftest.err conftest.$ac_ext
3766if $ac_preproc_ok; then
3767 break
3768fi
3769
3770 done
3771 ac_cv_prog_CPP=$CPP
3772
3773fi
3774 CPP=$ac_cv_prog_CPP
3775else
3776 ac_cv_prog_CPP=$CPP
3777fi
c0d27fcc 3778echo "$as_me:$LINENO: result: $CPP" >&5
503d2be0
AS
3779echo "${ECHO_T}$CPP" >&6
3780ac_preproc_ok=false
3781for ac_c_preproc_warn_flag in '' yes
3782do
3783 # Use a header file that comes with gcc, so configuring glibc
3784 # with a fresh cross-compiler works.
19650fd6
AS
3785 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3786 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
3787 # On the NeXT, cc -E runs the code through the compiler's parser,
3788 # not just through cpp. "Syntax error" is here to catch this case.
3789 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3790/* confdefs.h. */
3791_ACEOF
3792cat confdefs.h >>conftest.$ac_ext
3793cat >>conftest.$ac_ext <<_ACEOF
3794/* end confdefs.h. */
3795#ifdef __STDC__
3796# include <limits.h>
3797#else
3798# include <assert.h>
3799#endif
35996d22 3800 Syntax error
503d2be0 3801_ACEOF
c0d27fcc 3802if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3803 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3804 ac_status=$?
6bae0ccf 3805 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3806 rm -f conftest.er1
3807 cat conftest.err >&5
c0d27fcc 3808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3809 (exit $ac_status); } >/dev/null; then
3810 if test -s conftest.err; then
3811 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3812 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3813 else
3814 ac_cpp_err=
3815 fi
3816else
3817 ac_cpp_err=yes
3818fi
3819if test -z "$ac_cpp_err"; then
ba4481b5
DL
3820 :
3821else
503d2be0 3822 echo "$as_me: failed program was:" >&5
19650fd6
AS
3823sed 's/^/| /' conftest.$ac_ext >&5
3824
503d2be0
AS
3825 # Broken: fails on valid input.
3826continue
3827fi
3828rm -f conftest.err conftest.$ac_ext
3829
3830 # OK, works on sane cases. Now check whether non-existent headers
3831 # can be detected and how.
3832 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3833/* confdefs.h. */
3834_ACEOF
3835cat confdefs.h >>conftest.$ac_ext
3836cat >>conftest.$ac_ext <<_ACEOF
3837/* end confdefs.h. */
503d2be0
AS
3838#include <ac_nonexistent.h>
3839_ACEOF
c0d27fcc 3840if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3841 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3842 ac_status=$?
6bae0ccf 3843 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3844 rm -f conftest.er1
3845 cat conftest.err >&5
c0d27fcc 3846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3847 (exit $ac_status); } >/dev/null; then
3848 if test -s conftest.err; then
3849 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3850 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3851 else
3852 ac_cpp_err=
3853 fi
3854else
3855 ac_cpp_err=yes
c4bb2108 3856fi
503d2be0
AS
3857if test -z "$ac_cpp_err"; then
3858 # Broken: success on invalid input.
3859continue
3860else
3861 echo "$as_me: failed program was:" >&5
19650fd6
AS
3862sed 's/^/| /' conftest.$ac_ext >&5
3863
503d2be0
AS
3864 # Passes both tests.
3865ac_preproc_ok=:
3866break
ba4481b5 3867fi
503d2be0
AS
3868rm -f conftest.err conftest.$ac_ext
3869
3870done
3871# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3872rm -f conftest.err conftest.$ac_ext
3873if $ac_preproc_ok; then
3874 :
ba4481b5 3875else
19650fd6
AS
3876 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3877See \`config.log' for more details." >&5
3878echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3879See \`config.log' for more details." >&2;}
503d2be0 3880 { (exit 1); exit 1; }; }
ba4481b5 3881fi
503d2be0
AS
3882
3883ac_ext=c
3884ac_cpp='$CPP $CPPFLAGS'
3885ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3886ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3887ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3888
3889# Find a good install program. We prefer a C program (faster),
3890# so one script is as good as another. But avoid the broken or
3891# incompatible versions:
3892# SysV /etc/install, /usr/sbin/install
3893# SunOS /usr/etc/install
3894# IRIX /sbin/install
3895# AIX /bin/install
503d2be0 3896# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3897# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3898# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3899# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
35996d22 3900# OS/2's system install, which has a completely different semantic
ba4481b5 3901# ./install, which can be erroneously created by make from ./install.sh.
c0d27fcc
MR
3902echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3903echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
ba4481b5 3904if test -z "$INSTALL"; then
503d2be0
AS
3905if test "${ac_cv_path_install+set}" = set; then
3906 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3907else
c0d27fcc
MR
3908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3909for as_dir in $PATH
3910do
3911 IFS=$as_save_IFS
3912 test -z "$as_dir" && as_dir=.
3913 # Account for people who put trailing slashes in PATH elements.
3914case $as_dir/ in
3915 ./ | .// | /cC/* | \
3916 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
35996d22 3917 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
3918 /usr/ucb/* ) ;;
3919 *)
3920 # OSF1 and SCO ODT 3.0 have their own names for install.
3921 # Don't use installbsd from OSF since it installs stuff as root
3922 # by default.
3923 for ac_prog in ginstall scoinst install; do
3924 for ac_exec_ext in '' $ac_executable_extensions; do
35996d22
AS
3925 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3926 if test $ac_prog = install &&
3927 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3928 # AIX install. It has an incompatible calling convention.
3929 :
3930 elif test $ac_prog = install &&
3931 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3932 # program-specific install script used by HP pwplus--don't use.
3933 :
3934 else
3935 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3936 break 3
3937 fi
3938 fi
ba4481b5 3939 done
c0d27fcc
MR
3940 done
3941 ;;
3942esac
3943done
3944
ba4481b5
DL
3945
3946fi
3947 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3948 INSTALL=$ac_cv_path_install
ba4481b5
DL
3949 else
3950 # As a last resort, use the slow shell script. We don't cache a
3951 # path for INSTALL within a source directory, because that will
3952 # break other packages using the cache if that directory is
3953 # removed, or if the path is relative.
503d2be0 3954 INSTALL=$ac_install_sh
ba4481b5
DL
3955 fi
3956fi
c0d27fcc 3957echo "$as_me:$LINENO: result: $INSTALL" >&5
503d2be0 3958echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3959
3960# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3961# It thinks the first close brace ends the variable substitution.
3962test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3963
503d2be0 3964test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3965
ba4481b5
DL
3966test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3967
c0d27fcc
MR
3968if test "x$RANLIB" = x; then
3969 if test -n "$ac_tool_prefix"; then
3970 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3971set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3972echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0 3973echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c0d27fcc 3974if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 3975 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3976else
3977 if test -n "$RANLIB"; then
3978 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3979else
c0d27fcc
MR
3980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3981for as_dir in $PATH
3982do
3983 IFS=$as_save_IFS
3984 test -z "$as_dir" && as_dir=.
3985 for ac_exec_ext in '' $ac_executable_extensions; do
3986 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3987 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3988 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3989 break 2
3990 fi
3991done
503d2be0
AS
3992done
3993
7397acc4
DL
3994fi
3995fi
503d2be0 3996RANLIB=$ac_cv_prog_RANLIB
7397acc4 3997if test -n "$RANLIB"; then
c0d27fcc 3998 echo "$as_me:$LINENO: result: $RANLIB" >&5
503d2be0
AS
3999echo "${ECHO_T}$RANLIB" >&6
4000else
c0d27fcc 4001 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4002echo "${ECHO_T}no" >&6
4003fi
4004
4005fi
4006if test -z "$ac_cv_prog_RANLIB"; then
4007 ac_ct_RANLIB=$RANLIB
4008 # Extract the first word of "ranlib", so it can be a program name with args.
4009set dummy ranlib; ac_word=$2
c0d27fcc 4010echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
4011echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4012if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4013 echo $ECHO_N "(cached) $ECHO_C" >&6
4014else
4015 if test -n "$ac_ct_RANLIB"; then
4016 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4017else
c0d27fcc
MR
4018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4019for as_dir in $PATH
4020do
4021 IFS=$as_save_IFS
4022 test -z "$as_dir" && as_dir=.
4023 for ac_exec_ext in '' $ac_executable_extensions; do
4024 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4025 ac_cv_prog_ac_ct_RANLIB="ranlib"
4026 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4027 break 2
4028 fi
4029done
503d2be0
AS
4030done
4031
4032 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4033fi
4034fi
4035ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4036if test -n "$ac_ct_RANLIB"; then
c0d27fcc 4037 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
503d2be0
AS
4038echo "${ECHO_T}$ac_ct_RANLIB" >&6
4039else
c0d27fcc 4040 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4041echo "${ECHO_T}no" >&6
4042fi
4043
4044 RANLIB=$ac_ct_RANLIB
7397acc4 4045else
503d2be0 4046 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
4047fi
4048
4049fi
9e71690e
DK
4050# Extract the first word of "install-info", so it can be a program name with args.
4051set dummy install-info; ac_word=$2
4052echo "$as_me:$LINENO: checking for $ac_word" >&5
4053echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4054if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4055 echo $ECHO_N "(cached) $ECHO_C" >&6
4056else
4057 case $INSTALL_INFO in
4058 [\\/]* | ?:[\\/]*)
4059 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4060 ;;
4061 *)
4062 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4063for as_dir in $PATH
4064do
4065 IFS=$as_save_IFS
4066 test -z "$as_dir" && as_dir=.
4067 for ac_exec_ext in '' $ac_executable_extensions; do
4068 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4069 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4070 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4071 break 2
4072 fi
4073done
4074done
4075
4076 ;;
4077esac
4078fi
4079INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4080
4081if test -n "$INSTALL_INFO"; then
4082 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4083echo "${ECHO_T}$INSTALL_INFO" >&6
4084else
4085 echo "$as_me:$LINENO: result: no" >&5
4086echo "${ECHO_T}no" >&6
4087fi
4088
4089# Extract the first word of "install-info", so it can be a program name with args.
4090set dummy install-info; ac_word=$2
4091echo "$as_me:$LINENO: checking for $ac_word" >&5
4092echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4093if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4094 echo $ECHO_N "(cached) $ECHO_C" >&6
4095else
4096 case $INSTALL_INFO in
4097 [\\/]* | ?:[\\/]*)
4098 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4099 ;;
4100 *)
4101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4102for as_dir in /usr/sbin
4103do
4104 IFS=$as_save_IFS
4105 test -z "$as_dir" && as_dir=.
4106 for ac_exec_ext in '' $ac_executable_extensions; do
4107 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4108 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4109 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4110 break 2
4111 fi
4112done
4113done
4114
4115 ;;
4116esac
4117fi
4118INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4119
4120if test -n "$INSTALL_INFO"; then
4121 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4122echo "${ECHO_T}$INSTALL_INFO" >&6
4123else
4124 echo "$as_me:$LINENO: result: no" >&5
4125echo "${ECHO_T}no" >&6
4126fi
4127
4128# Extract the first word of "install-info", so it can be a program name with args.
4129set dummy install-info; ac_word=$2
4130echo "$as_me:$LINENO: checking for $ac_word" >&5
4131echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4132if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4133 echo $ECHO_N "(cached) $ECHO_C" >&6
4134else
4135 case $INSTALL_INFO in
4136 [\\/]* | ?:[\\/]*)
4137 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4138 ;;
4139 *)
4140 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4141for as_dir in /sbin
4142do
4143 IFS=$as_save_IFS
4144 test -z "$as_dir" && as_dir=.
4145 for ac_exec_ext in '' $ac_executable_extensions; do
4146 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4147 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4148 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4149 break 2
4150 fi
4151done
4152done
4153
4154 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4155 ;;
4156esac
4157fi
4158INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4159
4160if test -n "$INSTALL_INFO"; then
4161 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4162echo "${ECHO_T}$INSTALL_INFO" >&6
4163else
4164 echo "$as_me:$LINENO: result: no" >&5
4165echo "${ECHO_T}no" >&6
4166fi
4167
ba4481b5 4168
c0d27fcc 4169
8e967cf7
MR
4170if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4171then
4172 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4173fi
4174
4175if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4176then
4177 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4178fi
4179
c0d27fcc 4180
fe239f0f 4181late_LDFLAGS=$LDFLAGS
4af002d6 4182if test "$GCC" = yes; then
fe239f0f
AS
4183 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
4184else
4185 LDFLAGS="$LDFLAGS -znocombreloc"
4186fi
4187
4188echo "$as_me:$LINENO: checking For -znocombreloc" >&5
4189echo $ECHO_N "checking For -znocombreloc... $ECHO_C" >&6
4190
4191cat >conftest.$ac_ext <<_ACEOF
4192main(){return 0;}
4193_ACEOF
4194rm -f conftest.$ac_objext conftest$ac_exeext
4195if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4196 (eval $ac_link) 2>conftest.er1
4197 ac_status=$?
4198 grep -v '^ *+' conftest.er1 >conftest.err
4199 rm -f conftest.er1
4200 cat conftest.err >&5
4201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4202 (exit $ac_status); } &&
c08e6004 4203 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
fe239f0f
AS
4204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4205 (eval $ac_try) 2>&5
4206 ac_status=$?
4207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4208 (exit $ac_status); }; } &&
4209 { ac_try='test -s conftest$ac_exeext'
4210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4211 (eval $ac_try) 2>&5
4212 ac_status=$?
4213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4214 (exit $ac_status); }; }; then
4215 echo "$as_me:$LINENO: result: yes" >&5
4216echo "${ECHO_T}yes" >&6
4217else
4218 echo "$as_me: failed program was:" >&5
4219sed 's/^/| /' conftest.$ac_ext >&5
4220
4221LDFLAGS=$late_LDFLAGS
4222 echo "$as_me:$LINENO: result: no" >&5
4223echo "${ECHO_T}no" >&6
4224fi
4225rm -f conftest.err conftest.$ac_objext \
4226 conftest$ac_exeext conftest.$ac_ext
4227
c0d27fcc 4228
6bae0ccf
DL
4229echo "$as_me:$LINENO: checking for egrep" >&5
4230echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4231if test "${ac_cv_prog_egrep+set}" = set; then
4232 echo $ECHO_N "(cached) $ECHO_C" >&6
4233else
4234 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4235 then ac_cv_prog_egrep='grep -E'
4236 else ac_cv_prog_egrep='egrep'
4237 fi
4238fi
4239echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4240echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4241 EGREP=$ac_cv_prog_egrep
4242
4243
c0d27fcc
MR
4244
4245echo "$as_me:$LINENO: checking for AIX" >&5
503d2be0
AS
4246echo $ECHO_N "checking for AIX... $ECHO_C" >&6
4247cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4248/* confdefs.h. */
4249_ACEOF
4250cat confdefs.h >>conftest.$ac_ext
4251cat >>conftest.$ac_ext <<_ACEOF
4252/* end confdefs.h. */
ba4481b5
DL
4253#ifdef _AIX
4254 yes
4255#endif
4256
503d2be0 4257_ACEOF
ba4481b5 4258if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4259 $EGREP "yes" >/dev/null 2>&1; then
c0d27fcc 4260 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 4261echo "${ECHO_T}yes" >&6
c0d27fcc 4262cat >>confdefs.h <<\_ACEOF
ba4481b5 4263#define _ALL_SOURCE 1
c0d27fcc 4264_ACEOF
ba4481b5
DL
4265
4266else
c0d27fcc 4267 echo "$as_me:$LINENO: result: no" >&5
503d2be0 4268echo "${ECHO_T}no" >&6
ba4481b5
DL
4269fi
4270rm -f conftest*
4271
c0d27fcc
MR
4272
4273
4489ece2 4274
3b33a005
DL
4275#### Extract some information from the operating system and machine files.
4276
c0d27fcc 4277{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 4278 - which libraries the lib-src programs will want, and
503d2be0
AS
4279 - whether the GNU malloc routines are usable..." >&5
4280echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 4281 - which libraries the lib-src programs will want, and
503d2be0 4282 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
4283
4284### First figure out CFLAGS (which we use for running the compiler here)
4285### and REAL_CFLAGS (which we use for real compilation).
4286### The two are the same except on a few systems, where they are made
4287### different to work around various lossages. For example,
4288### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
4289### as implying static linking.
4290
4291### If the CFLAGS env var is specified, we use that value
4292### instead of the default.
4293
4294### It's not important that this name contain the PID; you can't run
4295### two configures in the same directory and have anything work
4296### anyway.
4297tempcname="conftest.c"
4298
4299echo '
4300#include "'${srcdir}'/src/'${opsysfile}'"
4301#include "'${srcdir}'/src/'${machfile}'"
4302#ifndef LIBS_MACHINE
4303#define LIBS_MACHINE
4304#endif
4305#ifndef LIBS_SYSTEM
4306#define LIBS_SYSTEM
4307#endif
4308#ifndef C_SWITCH_SYSTEM
4309#define C_SWITCH_SYSTEM
4310#endif
4311#ifndef C_SWITCH_MACHINE
4312#define C_SWITCH_MACHINE
4313#endif
4314configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
4315configure___ c_switch_system=C_SWITCH_SYSTEM
4316configure___ c_switch_machine=C_SWITCH_MACHINE
4317
4318#ifndef LIB_X11_LIB
4319#define LIB_X11_LIB -lX11
4320#endif
4321
4322#ifndef LIBX11_MACHINE
4323#define LIBX11_MACHINE
4324#endif
4325
4326#ifndef LIBX11_SYSTEM
4327#define LIBX11_SYSTEM
4328#endif
4329configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
4330
4331#ifdef UNEXEC
4332configure___ unexec=UNEXEC
4333#else
4334configure___ unexec=unexec.o
4335#endif
4336
4337#ifdef SYSTEM_MALLOC
4338configure___ system_malloc=yes
4339#else
4340configure___ system_malloc=no
4341#endif
4342
ef9e4345
GM
4343#ifdef USE_MMAP_FOR_BUFFERS
4344configure___ use_mmap_for_buffers=yes
73b77ee5 4345#else
ef9e4345 4346configure___ use_mmap_for_buffers=no
73b77ee5
GM
4347#endif
4348
3b33a005
DL
4349#ifndef C_DEBUG_SWITCH
4350#define C_DEBUG_SWITCH -g
4351#endif
4352
4353#ifndef C_OPTIMIZE_SWITCH
4354#ifdef __GNUC__
4355#define C_OPTIMIZE_SWITCH -O2
4356#else
4357#define C_OPTIMIZE_SWITCH -O
4358#endif
4359#endif
4360
4361#ifndef LD_SWITCH_MACHINE
4362#define LD_SWITCH_MACHINE
4363#endif
4364
4365#ifndef LD_SWITCH_SYSTEM
4366#define LD_SWITCH_SYSTEM
4367#endif
4368
4369#ifndef LD_SWITCH_X_SITE_AUX
4370#define LD_SWITCH_X_SITE_AUX
503d2be0 4371#endif
3b33a005
DL
4372
4373configure___ ld_switch_system=LD_SWITCH_SYSTEM
4374configure___ ld_switch_machine=LD_SWITCH_MACHINE
4375
4376#ifdef THIS_IS_CONFIGURE
4377
4378/* Get the CFLAGS for tests in configure. */
4379#ifdef __GNUC__
4380configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4381#else
4382configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4383#endif
4384
4385#else /* not THIS_IS_CONFIGURE */
4386
4387/* Get the CFLAGS for real compilation. */
4388#ifdef __GNUC__
4389configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4390#else
4391configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4392#endif
4393
4394#endif /* not THIS_IS_CONFIGURE */
4395' > ${tempcname}
4396
4397# The value of CPP is a quoted variable reference, so we need to do this
4398# to get its actual value...
4399CPP=`eval "echo $CPP"`
4400eval `${CPP} -Isrc ${tempcname} \
4401 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4402if test "x$SPECIFIED_CFLAGS" = x; then
4403 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
4404 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4405else
4406 REAL_CFLAGS="$CFLAGS"
4407fi
4408rm ${tempcname}
4409
4410ac_link="$ac_link $ld_switch_machine $ld_switch_system"
4411
4412### Make sure subsequent tests use flags consistent with the build flags.
4413
4414if test x"${OVERRIDE_CPPFLAGS}" != x; then
4415 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
4416else
4417 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
4418fi
4419
6bae0ccf
DL
4420
4421
22044edf
DL
4422
4423cat >>confdefs.h <<\_ACEOF
4424#define _GNU_SOURCE 1
4425_ACEOF
4426
4427
4428
503d2be0 4429# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
4430if test "${enable_largefile+set}" = set; then
4431 enableval="$enable_largefile"
f4988be7 4432
503d2be0
AS
4433fi;
4434if test "$enable_largefile" != no; then
f4988be7 4435
c0d27fcc 4436 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
503d2be0
AS
4437echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4438if test "${ac_cv_sys_largefile_CC+set}" = set; then
4439 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4440else
f4988be7 4441 ac_cv_sys_largefile_CC=no
503d2be0
AS
4442 if test "$GCC" != yes; then
4443 ac_save_CC=$CC
4444 while :; do
4445 # IRIX 6.2 and later do not support large files by default,
4446 # so use the C compiler's -n32 option if that helps.
35996d22 4447 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4448/* confdefs.h. */
4449_ACEOF
4450cat confdefs.h >>conftest.$ac_ext
4451cat >>conftest.$ac_ext <<_ACEOF
4452/* end confdefs.h. */
f4988be7 4453#include <sys/types.h>
503d2be0
AS
4454 /* Check that off_t can represent 2**63 - 1 correctly.
4455 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4456 since some C++ compilers masquerading as C compilers
4457 incorrectly reject 9223372036854775807. */
4458#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4459 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4460 && LARGE_OFF_T % 2147483647 == 1)
4461 ? 1 : -1];
4462int
4463main ()
4464{
f4988be7 4465
503d2be0
AS
4466 ;
4467 return 0;
4468}
4469_ACEOF
4470 rm -f conftest.$ac_objext
c0d27fcc 4471if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4472 (eval $ac_compile) 2>conftest.er1
503d2be0 4473 ac_status=$?
35996d22
AS
4474 grep -v '^ *+' conftest.er1 >conftest.err
4475 rm -f conftest.er1
4476 cat conftest.err >&5
c0d27fcc 4477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4478 (exit $ac_status); } &&
c08e6004 4479 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
4480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4481 (eval $ac_try) 2>&5
4482 ac_status=$?
4483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4484 (exit $ac_status); }; } &&
4485 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4487 (eval $ac_try) 2>&5
4488 ac_status=$?
c0d27fcc 4489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4490 (exit $ac_status); }; }; then
4491 break
b192d653 4492else
503d2be0 4493 echo "$as_me: failed program was:" >&5
19650fd6
AS
4494sed 's/^/| /' conftest.$ac_ext >&5
4495
503d2be0 4496fi
35996d22 4497rm -f conftest.err conftest.$ac_objext
503d2be0
AS
4498 CC="$CC -n32"
4499 rm -f conftest.$ac_objext
c0d27fcc 4500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4501 (eval $ac_compile) 2>conftest.er1
503d2be0 4502 ac_status=$?
35996d22
AS
4503 grep -v '^ *+' conftest.er1 >conftest.err
4504 rm -f conftest.er1
4505 cat conftest.err >&5
c0d27fcc 4506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4507 (exit $ac_status); } &&
c08e6004 4508 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
4509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4510 (eval $ac_try) 2>&5
4511 ac_status=$?
4512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4513 (exit $ac_status); }; } &&
4514 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4516 (eval $ac_try) 2>&5
4517 ac_status=$?
c0d27fcc 4518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4519 (exit $ac_status); }; }; then
4520 ac_cv_sys_largefile_CC=' -n32'; break
4521else
4522 echo "$as_me: failed program was:" >&5
19650fd6
AS
4523sed 's/^/| /' conftest.$ac_ext >&5
4524
503d2be0 4525fi
35996d22
AS
4526rm -f conftest.err conftest.$ac_objext
4527 break
503d2be0
AS
4528 done
4529 CC=$ac_save_CC
4530 rm -f conftest.$ac_ext
4531 fi
b192d653 4532fi
c0d27fcc 4533echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
4534echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4535 if test "$ac_cv_sys_largefile_CC" != no; then
4536 CC=$CC$ac_cv_sys_largefile_CC
4537 fi
b192d653 4538
c0d27fcc 4539 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
4540echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4541if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4542 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4543else
503d2be0 4544 while :; do
f4988be7 4545 ac_cv_sys_file_offset_bits=no
503d2be0 4546 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4547/* confdefs.h. */
4548_ACEOF
4549cat confdefs.h >>conftest.$ac_ext
4550cat >>conftest.$ac_ext <<_ACEOF
4551/* end confdefs.h. */
f4988be7 4552#include <sys/types.h>
503d2be0
AS
4553 /* Check that off_t can represent 2**63 - 1 correctly.
4554 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4555 since some C++ compilers masquerading as C compilers
4556 incorrectly reject 9223372036854775807. */
4557#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4558 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4559 && LARGE_OFF_T % 2147483647 == 1)
4560 ? 1 : -1];
4561int
4562main ()
4563{
f4988be7 4564
503d2be0
AS
4565 ;
4566 return 0;
4567}
4568_ACEOF
4569rm -f conftest.$ac_objext
c0d27fcc 4570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4571 (eval $ac_compile) 2>conftest.er1
503d2be0 4572 ac_status=$?
35996d22
AS
4573 grep -v '^ *+' conftest.er1 >conftest.err
4574 rm -f conftest.er1
4575 cat conftest.err >&5
c0d27fcc 4576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4577 (exit $ac_status); } &&
c08e6004 4578 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
4579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4580 (eval $ac_try) 2>&5
4581 ac_status=$?
4582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4583 (exit $ac_status); }; } &&
4584 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4586 (eval $ac_try) 2>&5
4587 ac_status=$?
c0d27fcc 4588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4589 (exit $ac_status); }; }; then
4590 break
f4988be7 4591else
503d2be0 4592 echo "$as_me: failed program was:" >&5
19650fd6
AS
4593sed 's/^/| /' conftest.$ac_ext >&5
4594
503d2be0 4595fi
35996d22 4596rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4597 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4598/* confdefs.h. */
4599_ACEOF
4600cat confdefs.h >>conftest.$ac_ext
4601cat >>conftest.$ac_ext <<_ACEOF
4602/* end confdefs.h. */
f4988be7
GM
4603#define _FILE_OFFSET_BITS 64
4604#include <sys/types.h>
503d2be0
AS
4605 /* Check that off_t can represent 2**63 - 1 correctly.
4606 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4607 since some C++ compilers masquerading as C compilers
4608 incorrectly reject 9223372036854775807. */
4609#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4610 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4611 && LARGE_OFF_T % 2147483647 == 1)
4612 ? 1 : -1];
4613int
4614main ()
4615{
4616
4617 ;
4618 return 0;
4619}
4620_ACEOF
4621rm -f conftest.$ac_objext
c0d27fcc 4622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4623 (eval $ac_compile) 2>conftest.er1
503d2be0 4624 ac_status=$?
35996d22
AS
4625 grep -v '^ *+' conftest.er1 >conftest.err
4626 rm -f conftest.er1
4627 cat conftest.err >&5
c0d27fcc 4628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4629 (exit $ac_status); } &&
c08e6004 4630 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
4631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4632 (eval $ac_try) 2>&5
4633 ac_status=$?
4634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4635 (exit $ac_status); }; } &&
4636 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4638 (eval $ac_try) 2>&5
4639 ac_status=$?
c0d27fcc 4640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4641 (exit $ac_status); }; }; then
4642 ac_cv_sys_file_offset_bits=64; break
4643else
4644 echo "$as_me: failed program was:" >&5
19650fd6
AS
4645sed 's/^/| /' conftest.$ac_ext >&5
4646
503d2be0 4647fi
35996d22 4648rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
4649 break
4650done
ba4481b5 4651fi
c0d27fcc 4652echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
4653echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
4654if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 4655
c0d27fcc 4656cat >>confdefs.h <<_ACEOF
f4988be7 4657#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 4658_ACEOF
f4988be7 4659
503d2be0
AS
4660fi
4661rm -f conftest*
c0d27fcc 4662 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
4663echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
4664if test "${ac_cv_sys_large_files+set}" = set; then
4665 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4666else
503d2be0 4667 while :; do
f4988be7 4668 ac_cv_sys_large_files=no
503d2be0 4669 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4670/* confdefs.h. */
4671_ACEOF
4672cat confdefs.h >>conftest.$ac_ext
4673cat >>conftest.$ac_ext <<_ACEOF
4674/* end confdefs.h. */
503d2be0
AS
4675#include <sys/types.h>
4676 /* Check that off_t can represent 2**63 - 1 correctly.
4677 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4678 since some C++ compilers masquerading as C compilers
4679 incorrectly reject 9223372036854775807. */
4680#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4681 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4682 && LARGE_OFF_T % 2147483647 == 1)
4683 ? 1 : -1];
4684int
4685main ()
4686{
ba4481b5 4687
503d2be0
AS
4688 ;
4689 return 0;
4690}
4691_ACEOF
4692rm -f conftest.$ac_objext
c0d27fcc 4693if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4694 (eval $ac_compile) 2>conftest.er1
503d2be0 4695 ac_status=$?
35996d22
AS
4696 grep -v '^ *+' conftest.er1 >conftest.err
4697 rm -f conftest.er1
4698 cat conftest.err >&5
c0d27fcc 4699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4700 (exit $ac_status); } &&
c08e6004 4701 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
4702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4703 (eval $ac_try) 2>&5
4704 ac_status=$?
4705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4706 (exit $ac_status); }; } &&
4707 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4709 (eval $ac_try) 2>&5
4710 ac_status=$?
c0d27fcc 4711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4712 (exit $ac_status); }; }; then
4713 break
ba4481b5 4714else
503d2be0 4715 echo "$as_me: failed program was:" >&5
19650fd6
AS
4716sed 's/^/| /' conftest.$ac_ext >&5
4717
503d2be0 4718fi
35996d22 4719rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4720 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4721/* confdefs.h. */
4722_ACEOF
4723cat confdefs.h >>conftest.$ac_ext
4724cat >>conftest.$ac_ext <<_ACEOF
4725/* end confdefs.h. */
f4988be7 4726#define _LARGE_FILES 1
503d2be0
AS
4727#include <sys/types.h>
4728 /* Check that off_t can represent 2**63 - 1 correctly.
4729 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4730 since some C++ compilers masquerading as C compilers
4731 incorrectly reject 9223372036854775807. */
4732#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4733 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4734 && LARGE_OFF_T % 2147483647 == 1)
4735 ? 1 : -1];
4736int
4737main ()
4738{
f4988be7 4739
503d2be0
AS
4740 ;
4741 return 0;
4742}
4743_ACEOF
4744rm -f conftest.$ac_objext
c0d27fcc 4745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4746 (eval $ac_compile) 2>conftest.er1
503d2be0 4747 ac_status=$?
35996d22
AS
4748 grep -v '^ *+' conftest.er1 >conftest.err
4749 rm -f conftest.er1
4750 cat conftest.err >&5
c0d27fcc 4751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4752 (exit $ac_status); } &&
c08e6004 4753 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
4754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4755 (eval $ac_try) 2>&5
4756 ac_status=$?
4757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4758 (exit $ac_status); }; } &&
4759 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4761 (eval $ac_try) 2>&5
4762 ac_status=$?
c0d27fcc 4763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4764 (exit $ac_status); }; }; then
4765 ac_cv_sys_large_files=1; break
4766else
4767 echo "$as_me: failed program was:" >&5
19650fd6
AS
4768sed 's/^/| /' conftest.$ac_ext >&5
4769
503d2be0 4770fi
35996d22 4771rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
4772 break
4773done
ba4481b5 4774fi
c0d27fcc 4775echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
4776echo "${ECHO_T}$ac_cv_sys_large_files" >&6
4777if test "$ac_cv_sys_large_files" != no; then
ba4481b5 4778
c0d27fcc 4779cat >>confdefs.h <<_ACEOF
f4988be7 4780#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 4781_ACEOF
ba4481b5 4782
503d2be0
AS
4783fi
4784rm -f conftest*
4785fi
ba4481b5 4786
c0d27fcc 4787
2c9dccc9
PJ
4788if test "${with_sound}" != "no"; then
4789 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
4790 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4791echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4792if test "${ac_cv_header_stdc+set}" = set; then
4793 echo $ECHO_N "(cached) $ECHO_C" >&6
4794else
4795 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4796/* confdefs.h. */
4797_ACEOF
4798cat confdefs.h >>conftest.$ac_ext
4799cat >>conftest.$ac_ext <<_ACEOF
4800/* end confdefs.h. */
c0d27fcc
MR
4801#include <stdlib.h>
4802#include <stdarg.h>
4803#include <string.h>
4804#include <float.h>
98418dba 4805
19650fd6
AS
4806int
4807main ()
4808{
4809
4810 ;
4811 return 0;
4812}
c0d27fcc 4813_ACEOF
19650fd6
AS
4814rm -f conftest.$ac_objext
4815if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4816 (eval $ac_compile) 2>conftest.er1
cd958eb3 4817 ac_status=$?
35996d22
AS
4818 grep -v '^ *+' conftest.er1 >conftest.err
4819 rm -f conftest.er1
4820 cat conftest.err >&5
cd958eb3 4821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 4822 (exit $ac_status); } &&
c08e6004 4823 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
4824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4825 (eval $ac_try) 2>&5
4826 ac_status=$?
4827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4828 (exit $ac_status); }; } &&
4829 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
4830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4831 (eval $ac_try) 2>&5
4832 ac_status=$?
4833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4834 (exit $ac_status); }; }; then
c0d27fcc
MR
4835 ac_cv_header_stdc=yes
4836else
4837 echo "$as_me: failed program was:" >&5
19650fd6
AS
4838sed 's/^/| /' conftest.$ac_ext >&5
4839
4840ac_cv_header_stdc=no
c0d27fcc 4841fi
35996d22 4842rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4843
4844if test $ac_cv_header_stdc = yes; then
4845 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4846 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4847/* confdefs.h. */
4848_ACEOF
4849cat confdefs.h >>conftest.$ac_ext
4850cat >>conftest.$ac_ext <<_ACEOF
4851/* end confdefs.h. */
c0d27fcc
MR
4852#include <string.h>
4853
4854_ACEOF
4855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4856 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
4857 :
4858else
4859 ac_cv_header_stdc=no
4860fi
4861rm -f conftest*
4862
4863fi
4864
4865if test $ac_cv_header_stdc = yes; then
4866 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4867 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4868/* confdefs.h. */
4869_ACEOF
4870cat confdefs.h >>conftest.$ac_ext
4871cat >>conftest.$ac_ext <<_ACEOF
4872/* end confdefs.h. */
c0d27fcc
MR
4873#include <stdlib.h>
4874
4875_ACEOF
4876if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4877 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
4878 :
4879else
4880 ac_cv_header_stdc=no
4881fi
4882rm -f conftest*
4883
4884fi
4885
4886if test $ac_cv_header_stdc = yes; then
4887 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4888 if test "$cross_compiling" = yes; then
4889 :
4890else
4891 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4892/* confdefs.h. */
4893_ACEOF
4894cat confdefs.h >>conftest.$ac_ext
4895cat >>conftest.$ac_ext <<_ACEOF
4896/* end confdefs.h. */
c0d27fcc
MR
4897#include <ctype.h>
4898#if ((' ' & 0x0FF) == 0x020)
4899# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4900# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4901#else
19650fd6 4902# define ISLOWER(c) \
35996d22
AS
4903 (('a' <= (c) && (c) <= 'i') \
4904 || ('j' <= (c) && (c) <= 'r') \
4905 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
4906# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4907#endif
4908
4909#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4910int
4911main ()
4912{
4913 int i;
4914 for (i = 0; i < 256; i++)
4915 if (XOR (islower (i), ISLOWER (i))
35996d22 4916 || toupper (i) != TOUPPER (i))
c0d27fcc
MR
4917 exit(2);
4918 exit (0);
4919}
4920_ACEOF
4921rm -f conftest$ac_exeext
4922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4923 (eval $ac_link) 2>&5
4924 ac_status=$?
4925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4926 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4928 (eval $ac_try) 2>&5
4929 ac_status=$?
4930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4931 (exit $ac_status); }; }; then
4932 :
4933else
4934 echo "$as_me: program exited with status $ac_status" >&5
4935echo "$as_me: failed program was:" >&5
19650fd6
AS
4936sed 's/^/| /' conftest.$ac_ext >&5
4937
c0d27fcc
MR
4938( exit $ac_status )
4939ac_cv_header_stdc=no
4940fi
35996d22 4941rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4942fi
4943fi
4944fi
4945echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4946echo "${ECHO_T}$ac_cv_header_stdc" >&6
4947if test $ac_cv_header_stdc = yes; then
4948
4949cat >>confdefs.h <<\_ACEOF
4950#define STDC_HEADERS 1
4951_ACEOF
4952
4953fi
4954
4955# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
35996d22 4966 inttypes.h stdint.h unistd.h
98418dba
CW
4967do
4968as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc 4969echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
4970echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4971if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 4972 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4973else
925c2f3f 4974 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4975/* confdefs.h. */
4976_ACEOF
4977cat confdefs.h >>conftest.$ac_ext
4978cat >>conftest.$ac_ext <<_ACEOF
4979/* end confdefs.h. */
c0d27fcc
MR
4980$ac_includes_default
4981
4982#include <$ac_header>
4983_ACEOF
4984rm -f conftest.$ac_objext
4985if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4986 (eval $ac_compile) 2>conftest.er1
c0d27fcc 4987 ac_status=$?
35996d22
AS
4988 grep -v '^ *+' conftest.er1 >conftest.err
4989 rm -f conftest.er1
4990 cat conftest.err >&5
c0d27fcc
MR
4991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4992 (exit $ac_status); } &&
c08e6004 4993 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
4994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4995 (eval $ac_try) 2>&5
4996 ac_status=$?
4997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4998 (exit $ac_status); }; } &&
4999 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5001 (eval $ac_try) 2>&5
5002 ac_status=$?
5003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5004 (exit $ac_status); }; }; then
5005 eval "$as_ac_Header=yes"
5006else
5007 echo "$as_me: failed program was:" >&5
19650fd6
AS
5008sed 's/^/| /' conftest.$ac_ext >&5
5009
c0d27fcc
MR
5010eval "$as_ac_Header=no"
5011fi
35996d22 5012rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5013fi
5014echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5015echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5016if test `eval echo '${'$as_ac_Header'}'` = yes; then
5017 cat >>confdefs.h <<_ACEOF
5018#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5019_ACEOF
5020
5021fi
5022
5023done
5024
5025
5026
5027
5028
5029for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5030do
5031as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5032if eval "test \"\${$as_ac_Header+set}\" = set"; then
5033 echo "$as_me:$LINENO: checking for $ac_header" >&5
5034echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5035if eval "test \"\${$as_ac_Header+set}\" = set"; then
5036 echo $ECHO_N "(cached) $ECHO_C" >&6
5037fi
5038echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5039echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5040else
5041 # Is the header compilable?
5042echo "$as_me:$LINENO: checking $ac_header usability" >&5
5043echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5044cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5045/* confdefs.h. */
5046_ACEOF
5047cat confdefs.h >>conftest.$ac_ext
5048cat >>conftest.$ac_ext <<_ACEOF
5049/* end confdefs.h. */
c0d27fcc 5050$ac_includes_default
98418dba 5051#include <$ac_header>
503d2be0 5052_ACEOF
c0d27fcc
MR
5053rm -f conftest.$ac_objext
5054if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5055 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5056 ac_status=$?
35996d22
AS
5057 grep -v '^ *+' conftest.er1 >conftest.err
5058 rm -f conftest.er1
5059 cat conftest.err >&5
c0d27fcc
MR
5060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5061 (exit $ac_status); } &&
c08e6004 5062 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5064 (eval $ac_try) 2>&5
5065 ac_status=$?
5066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5067 (exit $ac_status); }; } &&
5068 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5070 (eval $ac_try) 2>&5
5071 ac_status=$?
5072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5073 (exit $ac_status); }; }; then
5074 ac_header_compiler=yes
5075else
5076 echo "$as_me: failed program was:" >&5
19650fd6
AS
5077sed 's/^/| /' conftest.$ac_ext >&5
5078
c0d27fcc
MR
5079ac_header_compiler=no
5080fi
35996d22 5081rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5082echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5083echo "${ECHO_T}$ac_header_compiler" >&6
5084
5085# Is the header present?
5086echo "$as_me:$LINENO: checking $ac_header presence" >&5
5087echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5088cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5089/* confdefs.h. */
5090_ACEOF
5091cat confdefs.h >>conftest.$ac_ext
5092cat >>conftest.$ac_ext <<_ACEOF
5093/* end confdefs.h. */
c0d27fcc
MR
5094#include <$ac_header>
5095_ACEOF
5096if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5097 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5098 ac_status=$?
6bae0ccf 5099 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5100 rm -f conftest.er1
5101 cat conftest.err >&5
c0d27fcc 5102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5103 (exit $ac_status); } >/dev/null; then
5104 if test -s conftest.err; then
5105 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5106 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5107 else
5108 ac_cpp_err=
5109 fi
5110else
5111 ac_cpp_err=yes
5112fi
5113if test -z "$ac_cpp_err"; then
c0d27fcc 5114 ac_header_preproc=yes
f4988be7 5115else
503d2be0 5116 echo "$as_me: failed program was:" >&5
19650fd6
AS
5117sed 's/^/| /' conftest.$ac_ext >&5
5118
c0d27fcc 5119 ac_header_preproc=no
f4988be7 5120fi
98418dba 5121rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5122echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5123echo "${ECHO_T}$ac_header_preproc" >&6
5124
5125# So? What about this header?
35996d22
AS
5126case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5127 yes:no: )
c0d27fcc
MR
5128 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5129echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
5130 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5131echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5132 ac_header_preproc=yes
19650fd6 5133 ;;
35996d22 5134 no:yes:* )
c0d27fcc
MR
5135 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5136echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
5137 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5138echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5139 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5140echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5141 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5142echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5143 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5144echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
5145 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5146echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5147 (
5148 cat <<\_ASBOX
35996d22
AS
5149## ------------------------------------------ ##
5150## Report this to the AC_PACKAGE_NAME lists. ##
5151## ------------------------------------------ ##
19650fd6
AS
5152_ASBOX
5153 ) |
5154 sed "s/^/$as_me: WARNING: /" >&2
5155 ;;
c0d27fcc
MR
5156esac
5157echo "$as_me:$LINENO: checking for $ac_header" >&5
5158echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5159if eval "test \"\${$as_ac_Header+set}\" = set"; then
5160 echo $ECHO_N "(cached) $ECHO_C" >&6
5161else
35996d22 5162 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 5163fi
c0d27fcc 5164echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5165echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5166
5167fi
98418dba 5168if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5169 cat >>confdefs.h <<_ACEOF
98418dba 5170#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5171_ACEOF
f4988be7
GM
5172
5173fi
c0d27fcc 5174
98418dba
CW
5175done
5176
5177 # Emulation library used on NetBSD.
c0d27fcc 5178 echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
5179echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
5180if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 5181 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5182else
98418dba
CW
5183 ac_check_lib_save_LIBS=$LIBS
5184LIBS="-lossaudio $LIBS"
5185cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5186/* confdefs.h. */
5187_ACEOF
5188cat confdefs.h >>conftest.$ac_ext
5189cat >>conftest.$ac_ext <<_ACEOF
5190/* end confdefs.h. */
98418dba
CW
5191
5192/* Override any gcc2 internal prototype to avoid an error. */
5193#ifdef __cplusplus
5194extern "C"
f4988be7 5195#endif
98418dba
CW
5196/* We use char because int might match the return type of a gcc2
5197 builtin and then its argument prototype would still apply. */
5198char _oss_ioctl ();
503d2be0
AS
5199int
5200main ()
5201{
98418dba 5202_oss_ioctl ();
503d2be0
AS
5203 ;
5204 return 0;
5205}
5206_ACEOF
98418dba 5207rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 5208if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 5209 (eval $ac_link) 2>conftest.er1
503d2be0 5210 ac_status=$?
35996d22
AS
5211 grep -v '^ *+' conftest.er1 >conftest.err
5212 rm -f conftest.er1
5213 cat conftest.err >&5
c0d27fcc 5214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5215 (exit $ac_status); } &&
c08e6004 5216 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5218 (eval $ac_try) 2>&5
5219 ac_status=$?
5220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5221 (exit $ac_status); }; } &&
5222 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 5223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5224 (eval $ac_try) 2>&5
5225 ac_status=$?
c0d27fcc 5226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5227 (exit $ac_status); }; }; then
98418dba 5228 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 5229else
503d2be0 5230 echo "$as_me: failed program was:" >&5
19650fd6
AS
5231sed 's/^/| /' conftest.$ac_ext >&5
5232
98418dba 5233ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 5234fi
35996d22
AS
5235rm -f conftest.err conftest.$ac_objext \
5236 conftest$ac_exeext conftest.$ac_ext
98418dba 5237LIBS=$ac_check_lib_save_LIBS
f4988be7 5238fi
c0d27fcc 5239echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
5240echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
5241if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
5242 LIBSOUND=-lossaudio
5243else
5244 LIBSOUND=
5245fi
5246
c0d27fcc 5247
f4988be7 5248fi
c0d27fcc
MR
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
22044edf
DL
5267
5268
973a76b1 5269
cffcede7 5270
c0d27fcc 5271
f4988be7 5272
98418dba
CW
5273for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5274 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5275 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
cffcede7 5276 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h
98418dba
CW
5277do
5278as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5279if eval "test \"\${$as_ac_Header+set}\" = set"; then
5280 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5281echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5282if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5283 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5284fi
5285echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5286echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5287else
c0d27fcc
MR
5288 # Is the header compilable?
5289echo "$as_me:$LINENO: checking $ac_header usability" >&5
5290echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5291cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5292/* confdefs.h. */
5293_ACEOF
5294cat confdefs.h >>conftest.$ac_ext
5295cat >>conftest.$ac_ext <<_ACEOF
5296/* end confdefs.h. */
c0d27fcc
MR
5297$ac_includes_default
5298#include <$ac_header>
5299_ACEOF
5300rm -f conftest.$ac_objext
5301if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5302 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5303 ac_status=$?
35996d22
AS
5304 grep -v '^ *+' conftest.er1 >conftest.err
5305 rm -f conftest.er1
5306 cat conftest.err >&5
c0d27fcc
MR
5307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5308 (exit $ac_status); } &&
c08e6004 5309 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5311 (eval $ac_try) 2>&5
5312 ac_status=$?
5313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5314 (exit $ac_status); }; } &&
5315 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5317 (eval $ac_try) 2>&5
5318 ac_status=$?
5319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5320 (exit $ac_status); }; }; then
5321 ac_header_compiler=yes
5322else
5323 echo "$as_me: failed program was:" >&5
19650fd6
AS
5324sed 's/^/| /' conftest.$ac_ext >&5
5325
c0d27fcc
MR
5326ac_header_compiler=no
5327fi
35996d22 5328rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5329echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5330echo "${ECHO_T}$ac_header_compiler" >&6
5331
5332# Is the header present?
5333echo "$as_me:$LINENO: checking $ac_header presence" >&5
5334echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5335cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5336/* confdefs.h. */
5337_ACEOF
5338cat confdefs.h >>conftest.$ac_ext
5339cat >>conftest.$ac_ext <<_ACEOF
5340/* end confdefs.h. */
98418dba 5341#include <$ac_header>
503d2be0 5342_ACEOF
c0d27fcc 5343if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5344 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5345 ac_status=$?
6bae0ccf 5346 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5347 rm -f conftest.er1
5348 cat conftest.err >&5
c0d27fcc 5349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5350 (exit $ac_status); } >/dev/null; then
5351 if test -s conftest.err; then
5352 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5353 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5354 else
5355 ac_cpp_err=
5356 fi
5357else
5358 ac_cpp_err=yes
5359fi
5360if test -z "$ac_cpp_err"; then
c0d27fcc 5361 ac_header_preproc=yes
34ec9ebe 5362else
503d2be0 5363 echo "$as_me: failed program was:" >&5
19650fd6
AS
5364sed 's/^/| /' conftest.$ac_ext >&5
5365
c0d27fcc 5366 ac_header_preproc=no
34ec9ebe 5367fi
98418dba 5368rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5369echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5370echo "${ECHO_T}$ac_header_preproc" >&6
5371
5372# So? What about this header?
35996d22
AS
5373case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5374 yes:no: )
c0d27fcc
MR
5375 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5376echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
5377 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5378echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5379 ac_header_preproc=yes
19650fd6 5380 ;;
35996d22 5381 no:yes:* )
c0d27fcc
MR
5382 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5383echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
5384 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5385echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5386 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5387echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5388 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5389echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5390 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5391echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
5392 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5393echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5394 (
5395 cat <<\_ASBOX
35996d22
AS
5396## ------------------------------------------ ##
5397## Report this to the AC_PACKAGE_NAME lists. ##
5398## ------------------------------------------ ##
19650fd6
AS
5399_ASBOX
5400 ) |
5401 sed "s/^/$as_me: WARNING: /" >&2
5402 ;;
c0d27fcc
MR
5403esac
5404echo "$as_me:$LINENO: checking for $ac_header" >&5
5405echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5406if eval "test \"\${$as_ac_Header+set}\" = set"; then
5407 echo $ECHO_N "(cached) $ECHO_C" >&6
5408else
35996d22 5409 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 5410fi
c0d27fcc 5411echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5412echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5413
5414fi
98418dba 5415if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5416 cat >>confdefs.h <<_ACEOF
98418dba 5417#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5418_ACEOF
34ec9ebe 5419
98418dba 5420fi
c0d27fcc 5421
98418dba
CW
5422done
5423
22044edf 5424
f17e308a
JD
5425echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
5426echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6
5427cat >conftest.$ac_ext <<_ACEOF
5428/* confdefs.h. */
5429_ACEOF
5430cat confdefs.h >>conftest.$ac_ext
5431cat >>conftest.$ac_ext <<_ACEOF
5432/* end confdefs.h. */
5433#include <sys/personality.h>
5434int
5435main ()
5436{
5437personality (PER_LINUX32)
5438 ;
5439 return 0;
5440}
5441_ACEOF
5442rm -f conftest.$ac_objext
5443if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5444 (eval $ac_compile) 2>conftest.er1
5445 ac_status=$?
5446 grep -v '^ *+' conftest.er1 >conftest.err
5447 rm -f conftest.er1
5448 cat conftest.err >&5
5449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5450 (exit $ac_status); } &&
c08e6004 5451 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
f17e308a
JD
5452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5453 (eval $ac_try) 2>&5
5454 ac_status=$?
5455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5456 (exit $ac_status); }; } &&
5457 { ac_try='test -s conftest.$ac_objext'
5458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5459 (eval $ac_try) 2>&5
5460 ac_status=$?
5461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5462 (exit $ac_status); }; }; then
5463 emacs_cv_personality_linux32=yes
5464else
5465 echo "$as_me: failed program was:" >&5
5466sed 's/^/| /' conftest.$ac_ext >&5
5467
5468emacs_cv_personality_linux32=no
5469fi
5470rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5471echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
5472echo "${ECHO_T}$emacs_cv_personality_linux32" >&6
5473
5474if test $emacs_cv_personality_linux32 = yes; then
5475
5476cat >>confdefs.h <<\_ACEOF
5477#define HAVE_PERSONALITY_LINUX32 1
5478_ACEOF
5479
5480fi
5481
5482
22044edf
DL
5483for ac_header in term.h
5484do
5485as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5486echo "$as_me:$LINENO: checking for $ac_header" >&5
5487echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5488if eval "test \"\${$as_ac_Header+set}\" = set"; then
5489 echo $ECHO_N "(cached) $ECHO_C" >&6
5490else
5491 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5492/* confdefs.h. */
5493_ACEOF
5494cat confdefs.h >>conftest.$ac_ext
5495cat >>conftest.$ac_ext <<_ACEOF
5496/* end confdefs.h. */
22044edf
DL
5497#include <$ac_header>
5498_ACEOF
5499if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5500 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5501 ac_status=$?
5502 grep -v '^ *+' conftest.er1 >conftest.err
5503 rm -f conftest.er1
5504 cat conftest.err >&5
5505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5506 (exit $ac_status); } >/dev/null; then
5507 if test -s conftest.err; then
5508 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5509 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22044edf
DL
5510 else
5511 ac_cpp_err=
5512 fi
5513else
5514 ac_cpp_err=yes
5515fi
5516if test -z "$ac_cpp_err"; then
5517 eval "$as_ac_Header=yes"
5518else
5519 echo "$as_me: failed program was:" >&5
19650fd6
AS
5520sed 's/^/| /' conftest.$ac_ext >&5
5521
22044edf
DL
5522 eval "$as_ac_Header=no"
5523fi
5524rm -f conftest.err conftest.$ac_ext
5525fi
5526echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5527echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5528if test `eval echo '${'$as_ac_Header'}'` = yes; then
5529 cat >>confdefs.h <<_ACEOF
5530#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5531_ACEOF
5532
5533fi
5534
5535done
5536
c0d27fcc 5537echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
5538echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5539if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 5540 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5541else
503d2be0 5542 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5543/* confdefs.h. */
5544_ACEOF
5545cat confdefs.h >>conftest.$ac_ext
5546cat >>conftest.$ac_ext <<_ACEOF
5547/* end confdefs.h. */
98418dba
CW
5548#include <stdlib.h>
5549#include <stdarg.h>
5550#include <string.h>
5551#include <float.h>
5552
19650fd6
AS
5553int
5554main ()
5555{
5556
5557 ;
5558 return 0;
5559}
98418dba 5560_ACEOF
19650fd6
AS
5561rm -f conftest.$ac_objext
5562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5563 (eval $ac_compile) 2>conftest.er1
cd958eb3 5564 ac_status=$?
35996d22
AS
5565 grep -v '^ *+' conftest.er1 >conftest.err
5566 rm -f conftest.er1
5567 cat conftest.err >&5
cd958eb3 5568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 5569 (exit $ac_status); } &&
c08e6004 5570 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5572 (eval $ac_try) 2>&5
5573 ac_status=$?
5574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5575 (exit $ac_status); }; } &&
5576 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
5577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5578 (eval $ac_try) 2>&5
5579 ac_status=$?
5580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581 (exit $ac_status); }; }; then
98418dba 5582 ac_cv_header_stdc=yes
ba4481b5 5583else
503d2be0 5584 echo "$as_me: failed program was:" >&5
19650fd6
AS
5585sed 's/^/| /' conftest.$ac_ext >&5
5586
5587ac_cv_header_stdc=no
ba4481b5 5588fi
35996d22 5589rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
5590
5591if test $ac_cv_header_stdc = yes; then
5592 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5593 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5594/* confdefs.h. */
5595_ACEOF
5596cat confdefs.h >>conftest.$ac_ext
5597cat >>conftest.$ac_ext <<_ACEOF
5598/* end confdefs.h. */
98418dba
CW
5599#include <string.h>
5600
5601_ACEOF
5602if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5603 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
5604 :
5605else
5606 ac_cv_header_stdc=no
ba4481b5 5607fi
98418dba 5608rm -f conftest*
ba4481b5
DL
5609
5610fi
5611
98418dba
CW
5612if test $ac_cv_header_stdc = yes; then
5613 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5614 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5615/* confdefs.h. */
5616_ACEOF
5617cat confdefs.h >>conftest.$ac_ext
5618cat >>conftest.$ac_ext <<_ACEOF
5619/* end confdefs.h. */
98418dba
CW
5620#include <stdlib.h>
5621
5622_ACEOF
5623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5624 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
5625 :
5626else
5627 ac_cv_header_stdc=no
5628fi
5629rm -f conftest*
5630
5631fi
5632
5633if test $ac_cv_header_stdc = yes; then
5634 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5635 if test "$cross_compiling" = yes; then
5636 :
d42122a3 5637else
503d2be0 5638 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5639/* confdefs.h. */
5640_ACEOF
5641cat confdefs.h >>conftest.$ac_ext
5642cat >>conftest.$ac_ext <<_ACEOF
5643/* end confdefs.h. */
98418dba
CW
5644#include <ctype.h>
5645#if ((' ' & 0x0FF) == 0x020)
5646# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5647# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5648#else
19650fd6 5649# define ISLOWER(c) \
35996d22
AS
5650 (('a' <= (c) && (c) <= 'i') \
5651 || ('j' <= (c) && (c) <= 'r') \
5652 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
5653# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5654#endif
5655
5656#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
5657int
5658main ()
5659{
98418dba
CW
5660 int i;
5661 for (i = 0; i < 256; i++)
5662 if (XOR (islower (i), ISLOWER (i))
35996d22 5663 || toupper (i) != TOUPPER (i))
98418dba
CW
5664 exit(2);
5665 exit (0);
503d2be0
AS
5666}
5667_ACEOF
98418dba 5668rm -f conftest$ac_exeext
c0d27fcc 5669if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 5670 (eval $ac_link) 2>&5
503d2be0 5671 ac_status=$?
c0d27fcc 5672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 5673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 5674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5675 (eval $ac_try) 2>&5
5676 ac_status=$?
c0d27fcc 5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5678 (exit $ac_status); }; }; then
98418dba 5679 :
d42122a3 5680else
98418dba
CW
5681 echo "$as_me: program exited with status $ac_status" >&5
5682echo "$as_me: failed program was:" >&5
19650fd6
AS
5683sed 's/^/| /' conftest.$ac_ext >&5
5684
c0d27fcc 5685( exit $ac_status )
98418dba 5686ac_cv_header_stdc=no
d42122a3 5687fi
35996d22 5688rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 5689fi
98418dba
CW
5690fi
5691fi
c0d27fcc 5692echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
98418dba
CW
5693echo "${ECHO_T}$ac_cv_header_stdc" >&6
5694if test $ac_cv_header_stdc = yes; then
5695
c0d27fcc 5696cat >>confdefs.h <<\_ACEOF
98418dba 5697#define STDC_HEADERS 1
c0d27fcc 5698_ACEOF
d42122a3
DL
5699
5700fi
5701
c0d27fcc 5702echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
5703echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5704if test "${ac_cv_header_time+set}" = set; then
503d2be0 5705 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5706else
503d2be0 5707 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5708/* confdefs.h. */
5709_ACEOF
5710cat confdefs.h >>conftest.$ac_ext
5711cat >>conftest.$ac_ext <<_ACEOF
5712/* end confdefs.h. */
ba4481b5 5713#include <sys/types.h>
98418dba 5714#include <sys/time.h>
ba4481b5 5715#include <time.h>
503d2be0
AS
5716
5717int
5718main ()
5719{
98418dba
CW
5720if ((struct tm *) 0)
5721return 0;
503d2be0
AS
5722 ;
5723 return 0;
5724}
5725_ACEOF
5726rm -f conftest.$ac_objext
c0d27fcc 5727if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5728 (eval $ac_compile) 2>conftest.er1
503d2be0 5729 ac_status=$?
35996d22
AS
5730 grep -v '^ *+' conftest.er1 >conftest.err
5731 rm -f conftest.er1
5732 cat conftest.err >&5
c0d27fcc 5733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5734 (exit $ac_status); } &&
c08e6004 5735 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5737 (eval $ac_try) 2>&5
5738 ac_status=$?
5739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5740 (exit $ac_status); }; } &&
5741 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5743 (eval $ac_try) 2>&5
5744 ac_status=$?
c0d27fcc 5745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5746 (exit $ac_status); }; }; then
98418dba 5747 ac_cv_header_time=yes
ba4481b5 5748else
503d2be0 5749 echo "$as_me: failed program was:" >&5
19650fd6
AS
5750sed 's/^/| /' conftest.$ac_ext >&5
5751
98418dba 5752ac_cv_header_time=no
ba4481b5 5753fi
35996d22 5754rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 5755fi
c0d27fcc 5756echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
5757echo "${ECHO_T}$ac_cv_header_time" >&6
5758if test $ac_cv_header_time = yes; then
503d2be0 5759
c0d27fcc 5760cat >>confdefs.h <<\_ACEOF
98418dba 5761#define TIME_WITH_SYS_TIME 1
c0d27fcc 5762_ACEOF
ba4481b5
DL
5763
5764fi
5765
cd958eb3
MB
5766echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
5767echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
5768if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 5769 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5770else
503d2be0 5771 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5772/* confdefs.h. */
5773_ACEOF
5774cat confdefs.h >>conftest.$ac_ext
5775cat >>conftest.$ac_ext <<_ACEOF
5776/* end confdefs.h. */
cd958eb3
MB
5777$ac_includes_default
5778int
5779main ()
5780{
5781#ifndef sys_siglist
5782 char *p = (char *) sys_siglist;
98418dba 5783#endif
503d2be0 5784
cd958eb3
MB
5785 ;
5786 return 0;
5787}
5788_ACEOF
5789rm -f conftest.$ac_objext
5790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5791 (eval $ac_compile) 2>conftest.er1
cd958eb3 5792 ac_status=$?
35996d22
AS
5793 grep -v '^ *+' conftest.er1 >conftest.err
5794 rm -f conftest.er1
5795 cat conftest.err >&5
cd958eb3
MB
5796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5797 (exit $ac_status); } &&
c08e6004 5798 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5800 (eval $ac_try) 2>&5
5801 ac_status=$?
5802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5803 (exit $ac_status); }; } &&
5804 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
5805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5806 (eval $ac_try) 2>&5
5807 ac_status=$?
5808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5809 (exit $ac_status); }; }; then
5810 ac_cv_have_decl_sys_siglist=yes
5811else
5812 echo "$as_me: failed program was:" >&5
19650fd6
AS
5813sed 's/^/| /' conftest.$ac_ext >&5
5814
cd958eb3
MB
5815ac_cv_have_decl_sys_siglist=no
5816fi
35996d22 5817rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
5818fi
5819echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
5820echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
5821if test $ac_cv_have_decl_sys_siglist = yes; then
5822
5823cat >>confdefs.h <<_ACEOF
5824#define HAVE_DECL_SYS_SIGLIST 1
5825_ACEOF
5826
5827
5828else
5829 cat >>confdefs.h <<_ACEOF
5830#define HAVE_DECL_SYS_SIGLIST 0
5831_ACEOF
5832
5833
5834fi
5835
5836
5837if test $ac_cv_have_decl_sys_siglist != yes; then
5838 # For Tru64, at least:
5839 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
5840echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
5841if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
5842 echo $ECHO_N "(cached) $ECHO_C" >&6
5843else
5844 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5845/* confdefs.h. */
5846_ACEOF
5847cat confdefs.h >>conftest.$ac_ext
5848cat >>conftest.$ac_ext <<_ACEOF
5849/* end confdefs.h. */
cd958eb3 5850$ac_includes_default
503d2be0
AS
5851int
5852main ()
5853{
cd958eb3
MB
5854#ifndef __sys_siglist
5855 char *p = (char *) __sys_siglist;
5856#endif
5857
503d2be0
AS
5858 ;
5859 return 0;
5860}
5861_ACEOF
5862rm -f conftest.$ac_objext
c0d27fcc 5863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5864 (eval $ac_compile) 2>conftest.er1
503d2be0 5865 ac_status=$?
35996d22
AS
5866 grep -v '^ *+' conftest.er1 >conftest.err
5867 rm -f conftest.er1
5868 cat conftest.err >&5
c0d27fcc 5869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5870 (exit $ac_status); } &&
c08e6004 5871 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5873 (eval $ac_try) 2>&5
5874 ac_status=$?
5875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5876 (exit $ac_status); }; } &&
5877 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5879 (eval $ac_try) 2>&5
5880 ac_status=$?
c0d27fcc 5881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5882 (exit $ac_status); }; }; then
cd958eb3 5883 ac_cv_have_decl___sys_siglist=yes
ba4481b5 5884else
503d2be0 5885 echo "$as_me: failed program was:" >&5
19650fd6
AS
5886sed 's/^/| /' conftest.$ac_ext >&5
5887
cd958eb3 5888ac_cv_have_decl___sys_siglist=no
ba4481b5 5889fi
35996d22 5890rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5891fi
cd958eb3
MB
5892echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
5893echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6
5894if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 5895
cd958eb3
MB
5896cat >>confdefs.h <<_ACEOF
5897#define HAVE_DECL___SYS_SIGLIST 1
5898_ACEOF
5899
5900
5901else
5902 cat >>confdefs.h <<_ACEOF
5903#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 5904_ACEOF
503d2be0 5905
cd958eb3 5906
ba4481b5
DL
5907fi
5908
cd958eb3
MB
5909
5910 if test $ac_cv_have_decl___sys_siglist = yes; then
5911
5912cat >>confdefs.h <<\_ACEOF
5913#define sys_siglist __sys_siglist
5914_ACEOF
5915
5916 fi
5917fi
c0d27fcc 5918echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
5919echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
5920if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 5921 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5922else
503d2be0 5923 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5924/* confdefs.h. */
5925_ACEOF
5926cat confdefs.h >>conftest.$ac_ext
5927cat >>conftest.$ac_ext <<_ACEOF
5928/* end confdefs.h. */
98418dba
CW
5929#include <sys/types.h>
5930#include <sys/wait.h>
5931#ifndef WEXITSTATUS
5932# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5933#endif
5934#ifndef WIFEXITED
5935# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 5936#endif
503d2be0
AS
5937
5938int
5939main ()
5940{
98418dba
CW
5941 int s;
5942 wait (&s);
5943 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
5944 ;
5945 return 0;
5946}
5947_ACEOF
98418dba 5948rm -f conftest.$ac_objext
c0d27fcc 5949if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5950 (eval $ac_compile) 2>conftest.er1
503d2be0 5951 ac_status=$?
35996d22
AS
5952 grep -v '^ *+' conftest.er1 >conftest.err
5953 rm -f conftest.er1
5954 cat conftest.err >&5
c0d27fcc 5955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5956 (exit $ac_status); } &&
c08e6004 5957 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
5958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5959 (eval $ac_try) 2>&5
5960 ac_status=$?
5961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5962 (exit $ac_status); }; } &&
5963 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5965 (eval $ac_try) 2>&5
5966 ac_status=$?
c0d27fcc 5967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5968 (exit $ac_status); }; }; then
98418dba 5969 ac_cv_header_sys_wait_h=yes
ba4481b5 5970else
503d2be0 5971 echo "$as_me: failed program was:" >&5
19650fd6
AS
5972sed 's/^/| /' conftest.$ac_ext >&5
5973
98418dba 5974ac_cv_header_sys_wait_h=no
ba4481b5 5975fi
35996d22 5976rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 5977fi
c0d27fcc 5978echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
5979echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
5980if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 5981
c0d27fcc 5982cat >>confdefs.h <<\_ACEOF
98418dba 5983#define HAVE_SYS_WAIT_H 1
c0d27fcc 5984_ACEOF
ba4481b5 5985
ba4481b5
DL
5986fi
5987
c0d27fcc
MR
5988
5989echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
5990echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
5991if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 5992 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 5993else
503d2be0 5994 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5995/* confdefs.h. */
5996_ACEOF
5997cat confdefs.h >>conftest.$ac_ext
5998cat >>conftest.$ac_ext <<_ACEOF
5999/* end confdefs.h. */
98418dba
CW
6000#ifdef TIME_WITH_SYS_TIME
6001#include <sys/time.h>
6002#include <time.h>
6003#else
6004#ifdef HAVE_SYS_TIME_H
6005#include <sys/time.h>
6006#else
1113b624 6007#include <time.h>
98418dba
CW
6008#endif
6009#endif
6010#ifdef HAVE_UTIME_H
6011#include <utime.h>
6012#endif
503d2be0
AS
6013int
6014main ()
6015{
98418dba 6016static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
6017 ;
6018 return 0;
6019}
6020_ACEOF
98418dba 6021rm -f conftest.$ac_objext
c0d27fcc 6022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6023 (eval $ac_compile) 2>conftest.er1
503d2be0 6024 ac_status=$?
35996d22
AS
6025 grep -v '^ *+' conftest.er1 >conftest.err
6026 rm -f conftest.er1
6027 cat conftest.err >&5
c0d27fcc 6028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6029 (exit $ac_status); } &&
c08e6004 6030 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6032 (eval $ac_try) 2>&5
6033 ac_status=$?
6034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6035 (exit $ac_status); }; } &&
6036 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6038 (eval $ac_try) 2>&5
6039 ac_status=$?
c0d27fcc 6040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6041 (exit $ac_status); }; }; then
98418dba 6042 emacs_cv_struct_utimbuf=yes
1113b624 6043else
503d2be0 6044 echo "$as_me: failed program was:" >&5
19650fd6
AS
6045sed 's/^/| /' conftest.$ac_ext >&5
6046
98418dba 6047emacs_cv_struct_utimbuf=no
1113b624 6048fi
35996d22 6049rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 6050fi
c0d27fcc 6051echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
6052echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
6053if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 6054
c0d27fcc 6055cat >>confdefs.h <<\_ACEOF
98418dba 6056#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 6057_ACEOF
1113b624
PE
6058
6059fi
ba4481b5 6060
c0d27fcc 6061echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
6062echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6063if test "${ac_cv_type_signal+set}" = set; then
503d2be0 6064 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6065else
98418dba 6066 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6067/* confdefs.h. */
6068_ACEOF
6069cat confdefs.h >>conftest.$ac_ext
6070cat >>conftest.$ac_ext <<_ACEOF
6071/* end confdefs.h. */
7397acc4 6072#include <sys/types.h>
98418dba
CW
6073#include <signal.h>
6074#ifdef signal
6075# undef signal
6076#endif
6077#ifdef __cplusplus
6078extern "C" void (*signal (int, void (*)(int)))(int);
6079#else
6080void (*signal ()) ();
6081#endif
6082
503d2be0
AS
6083int
6084main ()
6085{
98418dba 6086int i;
503d2be0
AS
6087 ;
6088 return 0;
6089}
6090_ACEOF
98418dba 6091rm -f conftest.$ac_objext
c0d27fcc 6092if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6093 (eval $ac_compile) 2>conftest.er1
503d2be0 6094 ac_status=$?
35996d22
AS
6095 grep -v '^ *+' conftest.er1 >conftest.err
6096 rm -f conftest.er1
6097 cat conftest.err >&5
c0d27fcc 6098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6099 (exit $ac_status); } &&
c08e6004 6100 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6102 (eval $ac_try) 2>&5
6103 ac_status=$?
6104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6105 (exit $ac_status); }; } &&
6106 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6108 (eval $ac_try) 2>&5
6109 ac_status=$?
c0d27fcc 6110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6111 (exit $ac_status); }; }; then
98418dba 6112 ac_cv_type_signal=void
503d2be0
AS
6113else
6114 echo "$as_me: failed program was:" >&5
19650fd6
AS
6115sed 's/^/| /' conftest.$ac_ext >&5
6116
98418dba 6117ac_cv_type_signal=int
503d2be0 6118fi
35996d22 6119rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6120fi
c0d27fcc 6121echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 6122echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 6123
c0d27fcc 6124cat >>confdefs.h <<_ACEOF
98418dba 6125#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
6126_ACEOF
6127
503d2be0 6128
c0d27fcc
MR
6129
6130echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
6131echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
6132if test "${emacs_cv_speed_t+set}" = set; then
6133 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6134else
98418dba 6135 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6136/* confdefs.h. */
6137_ACEOF
6138cat confdefs.h >>conftest.$ac_ext
6139cat >>conftest.$ac_ext <<_ACEOF
6140/* end confdefs.h. */
98418dba 6141#include <termios.h>
98418dba
CW
6142int
6143main ()
6144{
6145speed_t x = 1;
6146 ;
6147 return 0;
6148}
6149_ACEOF
6150rm -f conftest.$ac_objext
c0d27fcc 6151if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6152 (eval $ac_compile) 2>conftest.er1
98418dba 6153 ac_status=$?
35996d22
AS
6154 grep -v '^ *+' conftest.er1 >conftest.err
6155 rm -f conftest.er1
6156 cat conftest.err >&5
c0d27fcc 6157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6158 (exit $ac_status); } &&
c08e6004 6159 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6161 (eval $ac_try) 2>&5
6162 ac_status=$?
6163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6164 (exit $ac_status); }; } &&
6165 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6167 (eval $ac_try) 2>&5
6168 ac_status=$?
c0d27fcc 6169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6170 (exit $ac_status); }; }; then
6171 emacs_cv_speed_t=yes
6172else
6173 echo "$as_me: failed program was:" >&5
19650fd6
AS
6174sed 's/^/| /' conftest.$ac_ext >&5
6175
98418dba
CW
6176emacs_cv_speed_t=no
6177fi
35996d22 6178rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 6179fi
c0d27fcc 6180echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
6181echo "${ECHO_T}$emacs_cv_speed_t" >&6
6182if test $emacs_cv_speed_t = yes; then
b936fae4 6183
c0d27fcc 6184cat >>confdefs.h <<\_ACEOF
98418dba 6185#define HAVE_SPEED_T 1
c0d27fcc 6186_ACEOF
98418dba 6187
7397acc4
DL
6188fi
6189
c0d27fcc 6190echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
6191echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
6192if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 6193 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6194else
503d2be0 6195 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6196/* confdefs.h. */
6197_ACEOF
6198cat confdefs.h >>conftest.$ac_ext
6199cat >>conftest.$ac_ext <<_ACEOF
6200/* end confdefs.h. */
98418dba
CW
6201#ifdef TIME_WITH_SYS_TIME
6202#include <sys/time.h>
6203#include <time.h>
6204#else
6205#ifdef HAVE_SYS_TIME_H
6206#include <sys/time.h>
6207#else
6208#include <time.h>
6209#endif
6210#endif
503d2be0
AS
6211int
6212main ()
6213{
98418dba 6214static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
6215 ;
6216 return 0;
6217}
6218_ACEOF
6219rm -f conftest.$ac_objext
c0d27fcc 6220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6221 (eval $ac_compile) 2>conftest.er1
503d2be0 6222 ac_status=$?
35996d22
AS
6223 grep -v '^ *+' conftest.er1 >conftest.err
6224 rm -f conftest.er1
6225 cat conftest.err >&5
c0d27fcc 6226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6227 (exit $ac_status); } &&
c08e6004 6228 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6230 (eval $ac_try) 2>&5
6231 ac_status=$?
6232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6233 (exit $ac_status); }; } &&
6234 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6236 (eval $ac_try) 2>&5
6237 ac_status=$?
c0d27fcc 6238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6239 (exit $ac_status); }; }; then
98418dba 6240 emacs_cv_struct_timeval=yes
7397acc4 6241else
503d2be0 6242 echo "$as_me: failed program was:" >&5
19650fd6
AS
6243sed 's/^/| /' conftest.$ac_ext >&5
6244
98418dba 6245emacs_cv_struct_timeval=no
7397acc4 6246fi
35996d22 6247rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6248fi
c0d27fcc 6249echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
6250echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
6251HAVE_TIMEVAL=$emacs_cv_struct_timeval
6252if test $emacs_cv_struct_timeval = yes; then
b936fae4 6253
c0d27fcc 6254cat >>confdefs.h <<\_ACEOF
98418dba 6255#define HAVE_TIMEVAL 1
c0d27fcc 6256_ACEOF
7397acc4
DL
6257
6258fi
6259
c0d27fcc 6260echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
6261echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
6262if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 6263 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6264else
503d2be0 6265 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6266/* confdefs.h. */
6267_ACEOF
6268cat confdefs.h >>conftest.$ac_ext
6269cat >>conftest.$ac_ext <<_ACEOF
6270/* end confdefs.h. */
98418dba 6271#include <math.h>
503d2be0
AS
6272int
6273main ()
6274{
98418dba 6275static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
6276 ;
6277 return 0;
ba4481b5 6278}
503d2be0
AS
6279_ACEOF
6280rm -f conftest.$ac_objext
c0d27fcc 6281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6282 (eval $ac_compile) 2>conftest.er1
503d2be0 6283 ac_status=$?
35996d22
AS
6284 grep -v '^ *+' conftest.er1 >conftest.err
6285 rm -f conftest.er1
6286 cat conftest.err >&5
c0d27fcc 6287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6288 (exit $ac_status); } &&
c08e6004 6289 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6291 (eval $ac_try) 2>&5
6292 ac_status=$?
6293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6294 (exit $ac_status); }; } &&
6295 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6297 (eval $ac_try) 2>&5
6298 ac_status=$?
c0d27fcc 6299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6300 (exit $ac_status); }; }; then
98418dba 6301 emacs_cv_struct_exception=yes
ba4481b5 6302else
503d2be0 6303 echo "$as_me: failed program was:" >&5
19650fd6
AS
6304sed 's/^/| /' conftest.$ac_ext >&5
6305
98418dba 6306emacs_cv_struct_exception=no
ba4481b5 6307fi
35996d22 6308rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6309fi
c0d27fcc 6310echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
6311echo "${ECHO_T}$emacs_cv_struct_exception" >&6
6312HAVE_EXCEPTION=$emacs_cv_struct_exception
6313if test $emacs_cv_struct_exception != yes; then
b936fae4 6314
c0d27fcc 6315cat >>confdefs.h <<\_ACEOF
98418dba 6316#define NO_MATHERR 1
c0d27fcc 6317_ACEOF
ba4481b5
DL
6318
6319fi
6320
7862d3a8
AS
6321
6322for ac_header in sys/socket.h
6323do
6324as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6325if eval "test \"\${$as_ac_Header+set}\" = set"; then
6326 echo "$as_me:$LINENO: checking for $ac_header" >&5
6327echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6328if eval "test \"\${$as_ac_Header+set}\" = set"; then
6329 echo $ECHO_N "(cached) $ECHO_C" >&6
6330fi
6331echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6332echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6333else
6334 # Is the header compilable?
6335echo "$as_me:$LINENO: checking $ac_header usability" >&5
6336echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6337cat >conftest.$ac_ext <<_ACEOF
6338/* confdefs.h. */
6339_ACEOF
6340cat confdefs.h >>conftest.$ac_ext
6341cat >>conftest.$ac_ext <<_ACEOF
6342/* end confdefs.h. */
6343$ac_includes_default
6344#include <$ac_header>
6345_ACEOF
6346rm -f conftest.$ac_objext
6347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6348 (eval $ac_compile) 2>conftest.er1
6349 ac_status=$?
6350 grep -v '^ *+' conftest.er1 >conftest.err
6351 rm -f conftest.er1
6352 cat conftest.err >&5
6353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6354 (exit $ac_status); } &&
c08e6004 6355 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7862d3a8
AS
6356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6357 (eval $ac_try) 2>&5
6358 ac_status=$?
6359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6360 (exit $ac_status); }; } &&
6361 { ac_try='test -s conftest.$ac_objext'
6362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6363 (eval $ac_try) 2>&5
6364 ac_status=$?
6365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6366 (exit $ac_status); }; }; then
6367 ac_header_compiler=yes
6368else
6369 echo "$as_me: failed program was:" >&5
6370sed 's/^/| /' conftest.$ac_ext >&5
6371
6372ac_header_compiler=no
6373fi
6374rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6375echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6376echo "${ECHO_T}$ac_header_compiler" >&6
6377
6378# Is the header present?
6379echo "$as_me:$LINENO: checking $ac_header presence" >&5
6380echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6381cat >conftest.$ac_ext <<_ACEOF
6382/* confdefs.h. */
6383_ACEOF
6384cat confdefs.h >>conftest.$ac_ext
6385cat >>conftest.$ac_ext <<_ACEOF
6386/* end confdefs.h. */
6387#include <$ac_header>
6388_ACEOF
6389if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6390 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6391 ac_status=$?
6392 grep -v '^ *+' conftest.er1 >conftest.err
6393 rm -f conftest.er1
6394 cat conftest.err >&5
6395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6396 (exit $ac_status); } >/dev/null; then
6397 if test -s conftest.err; then
6398 ac_cpp_err=$ac_c_preproc_warn_flag
6399 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6400 else
6401 ac_cpp_err=
6402 fi
6403else
6404 ac_cpp_err=yes
6405fi
6406if test -z "$ac_cpp_err"; then
6407 ac_header_preproc=yes
6408else
6409 echo "$as_me: failed program was:" >&5
6410sed 's/^/| /' conftest.$ac_ext >&5
6411
6412 ac_header_preproc=no
6413fi
6414rm -f conftest.err conftest.$ac_ext
6415echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6416echo "${ECHO_T}$ac_header_preproc" >&6
6417
6418# So? What about this header?
6419case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6420 yes:no: )
6421 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6422echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6423 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6424echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6425 ac_header_preproc=yes
6426 ;;
6427 no:yes:* )
6428 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6429echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6430 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6431echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6432 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6433echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6434 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6435echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6436 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6437echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6438 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6439echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6440 (
6441 cat <<\_ASBOX
6442## ------------------------------------------ ##
6443## Report this to the AC_PACKAGE_NAME lists. ##
6444## ------------------------------------------ ##
6445_ASBOX
6446 ) |
6447 sed "s/^/$as_me: WARNING: /" >&2
6448 ;;
6449esac
6450echo "$as_me:$LINENO: checking for $ac_header" >&5
6451echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6452if eval "test \"\${$as_ac_Header+set}\" = set"; then
6453 echo $ECHO_N "(cached) $ECHO_C" >&6
6454else
6455 eval "$as_ac_Header=\$ac_header_preproc"
6456fi
6457echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6458echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6459
6460fi
6461if test `eval echo '${'$as_ac_Header'}'` = yes; then
6462 cat >>confdefs.h <<_ACEOF
6463#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6464_ACEOF
6465
6466fi
6467
6468done
6469
6470
6471for ac_header in net/if.h
6472do
6473as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6474echo "$as_me:$LINENO: checking for $ac_header" >&5
6475echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6476if eval "test \"\${$as_ac_Header+set}\" = set"; then
6477 echo $ECHO_N "(cached) $ECHO_C" >&6
6478else
6479 cat >conftest.$ac_ext <<_ACEOF
6480/* confdefs.h. */
6481_ACEOF
6482cat confdefs.h >>conftest.$ac_ext
6483cat >>conftest.$ac_ext <<_ACEOF
6484/* end confdefs.h. */
6485$ac_includes_default
6486#if HAVE_SYS_SOCKET_H
6487#include <sys/socket.h>
6488#endif
6489
6490#include <$ac_header>
6491_ACEOF
6492rm -f conftest.$ac_objext
6493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6494 (eval $ac_compile) 2>conftest.er1
6495 ac_status=$?
6496 grep -v '^ *+' conftest.er1 >conftest.err
6497 rm -f conftest.er1
6498 cat conftest.err >&5
6499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6500 (exit $ac_status); } &&
c08e6004 6501 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7862d3a8
AS
6502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6503 (eval $ac_try) 2>&5
6504 ac_status=$?
6505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6506 (exit $ac_status); }; } &&
6507 { ac_try='test -s conftest.$ac_objext'
6508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6509 (eval $ac_try) 2>&5
6510 ac_status=$?
6511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6512 (exit $ac_status); }; }; then
6513 eval "$as_ac_Header=yes"
6514else
6515 echo "$as_me: failed program was:" >&5
6516sed 's/^/| /' conftest.$ac_ext >&5
6517
6518eval "$as_ac_Header=no"
6519fi
6520rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6521fi
6522echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6523echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6524if test `eval echo '${'$as_ac_Header'}'` = yes; then
6525 cat >>confdefs.h <<_ACEOF
6526#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6527_ACEOF
6528
6529fi
6530
6531done
6532
6533
c0d27fcc 6534echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
6535echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
6536if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 6537 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6538else
503d2be0 6539 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6540/* confdefs.h. */
6541_ACEOF
6542cat confdefs.h >>conftest.$ac_ext
6543cat >>conftest.$ac_ext <<_ACEOF
6544/* end confdefs.h. */
98418dba
CW
6545#include <sys/types.h>
6546#include <time.h>
7397acc4 6547
503d2be0
AS
6548int
6549main ()
6550{
98418dba 6551struct tm *tp; tp->tm_sec;
503d2be0
AS
6552 ;
6553 return 0;
6554}
6555_ACEOF
6556rm -f conftest.$ac_objext
c0d27fcc 6557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6558 (eval $ac_compile) 2>conftest.er1
503d2be0 6559 ac_status=$?
35996d22
AS
6560 grep -v '^ *+' conftest.er1 >conftest.err
6561 rm -f conftest.er1
6562 cat conftest.err >&5
c0d27fcc 6563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6564 (exit $ac_status); } &&
c08e6004 6565 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
c0d27fcc 6566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6567 (eval $ac_try) 2>&5
6568 ac_status=$?
c0d27fcc 6569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
6570 (exit $ac_status); }; } &&
6571 { ac_try='test -s conftest.$ac_objext'
6572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6573 (eval $ac_try) 2>&5
6574 ac_status=$?
6575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6576 (exit $ac_status); }; }; then
6577 ac_cv_struct_tm=time.h
6578else
503d2be0 6579 echo "$as_me: failed program was:" >&5
19650fd6
AS
6580sed 's/^/| /' conftest.$ac_ext >&5
6581
98418dba 6582ac_cv_struct_tm=sys/time.h
7397acc4 6583fi
35996d22 6584rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6585fi
c0d27fcc 6586echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
6587echo "${ECHO_T}$ac_cv_struct_tm" >&6
6588if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 6589
c0d27fcc 6590cat >>confdefs.h <<\_ACEOF
98418dba 6591#define TM_IN_SYS_TIME 1
c0d27fcc 6592_ACEOF
7397acc4
DL
6593
6594fi
ba4481b5 6595
c0d27fcc 6596echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
6597echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
6598if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 6599 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6600else
98418dba 6601 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6602/* confdefs.h. */
6603_ACEOF
6604cat confdefs.h >>conftest.$ac_ext
6605cat >>conftest.$ac_ext <<_ACEOF
6606/* end confdefs.h. */
98418dba
CW
6607#include <sys/types.h>
6608#include <$ac_cv_struct_tm>
ba4481b5 6609
c0d27fcc 6610
98418dba
CW
6611int
6612main ()
6613{
6614static struct tm ac_aggr;
6615if (ac_aggr.tm_zone)
6616return 0;
6617 ;
6618 return 0;
6619}
6620_ACEOF
6621rm -f conftest.$ac_objext
c0d27fcc 6622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6623 (eval $ac_compile) 2>conftest.er1
98418dba 6624 ac_status=$?
35996d22
AS
6625 grep -v '^ *+' conftest.er1 >conftest.err
6626 rm -f conftest.er1
6627 cat conftest.err >&5
c0d27fcc 6628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6629 (exit $ac_status); } &&
c08e6004 6630 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6632 (eval $ac_try) 2>&5
6633 ac_status=$?
6634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6635 (exit $ac_status); }; } &&
6636 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6638 (eval $ac_try) 2>&5
6639 ac_status=$?
c0d27fcc 6640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6641 (exit $ac_status); }; }; then
6642 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 6643else
98418dba 6644 echo "$as_me: failed program was:" >&5
19650fd6
AS
6645sed 's/^/| /' conftest.$ac_ext >&5
6646
6bae0ccf 6647cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6648/* confdefs.h. */
6649_ACEOF
6650cat confdefs.h >>conftest.$ac_ext
6651cat >>conftest.$ac_ext <<_ACEOF
6652/* end confdefs.h. */
6bae0ccf
DL
6653#include <sys/types.h>
6654#include <$ac_cv_struct_tm>
6655
6656
6657int
6658main ()
6659{
6660static struct tm ac_aggr;
6661if (sizeof ac_aggr.tm_zone)
6662return 0;
6663 ;
6664 return 0;
6665}
6666_ACEOF
6667rm -f conftest.$ac_objext
6668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6669 (eval $ac_compile) 2>conftest.er1
6bae0ccf 6670 ac_status=$?
35996d22
AS
6671 grep -v '^ *+' conftest.er1 >conftest.err
6672 rm -f conftest.er1
6673 cat conftest.err >&5
6bae0ccf
DL
6674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6675 (exit $ac_status); } &&
c08e6004 6676 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6678 (eval $ac_try) 2>&5
6679 ac_status=$?
6680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6681 (exit $ac_status); }; } &&
6682 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
6683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6684 (eval $ac_try) 2>&5
6685 ac_status=$?
6686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6687 (exit $ac_status); }; }; then
6688 ac_cv_member_struct_tm_tm_zone=yes
6689else
6690 echo "$as_me: failed program was:" >&5
19650fd6
AS
6691sed 's/^/| /' conftest.$ac_ext >&5
6692
98418dba 6693ac_cv_member_struct_tm_tm_zone=no
ba4481b5 6694fi
35996d22 6695rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6696fi
35996d22 6697rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 6698fi
c0d27fcc 6699echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
6700echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
6701if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 6702
c0d27fcc 6703cat >>confdefs.h <<_ACEOF
98418dba 6704#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
6705_ACEOF
6706
ba4481b5 6707
98418dba 6708fi
ba4481b5 6709
98418dba 6710if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 6711
c0d27fcc 6712cat >>confdefs.h <<\_ACEOF
98418dba 6713#define HAVE_TM_ZONE 1
c0d27fcc 6714_ACEOF
ba4481b5 6715
ba4481b5 6716else
c0d27fcc 6717 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
6718echo $ECHO_N "checking for tzname... $ECHO_C" >&6
6719if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 6720 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6721else
98418dba 6722 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6723/* confdefs.h. */
6724_ACEOF
6725cat confdefs.h >>conftest.$ac_ext
6726cat >>conftest.$ac_ext <<_ACEOF
6727/* end confdefs.h. */
98418dba
CW
6728#include <time.h>
6729#ifndef tzname /* For SGI. */
6730extern char *tzname[]; /* RS6000 and others reject char **tzname. */
6731#endif
6732
98418dba
CW
6733int
6734main ()
6735{
6736atoi(*tzname);
6737 ;
6738 return 0;
6739}
6740_ACEOF
6741rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6742if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 6743 (eval $ac_link) 2>conftest.er1
98418dba 6744 ac_status=$?
35996d22
AS
6745 grep -v '^ *+' conftest.er1 >conftest.err
6746 rm -f conftest.er1
6747 cat conftest.err >&5
c0d27fcc 6748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6749 (exit $ac_status); } &&
c08e6004 6750 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6752 (eval $ac_try) 2>&5
6753 ac_status=$?
6754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6755 (exit $ac_status); }; } &&
6756 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6758 (eval $ac_try) 2>&5
6759 ac_status=$?
c0d27fcc 6760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6761 (exit $ac_status); }; }; then
6762 ac_cv_var_tzname=yes
6763else
6764 echo "$as_me: failed program was:" >&5
19650fd6
AS
6765sed 's/^/| /' conftest.$ac_ext >&5
6766
98418dba 6767ac_cv_var_tzname=no
ba4481b5 6768fi
35996d22
AS
6769rm -f conftest.err conftest.$ac_objext \
6770 conftest$ac_exeext conftest.$ac_ext
98418dba 6771fi
c0d27fcc 6772echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
6773echo "${ECHO_T}$ac_cv_var_tzname" >&6
6774 if test $ac_cv_var_tzname = yes; then
ba4481b5 6775
c0d27fcc 6776cat >>confdefs.h <<\_ACEOF
98418dba 6777#define HAVE_TZNAME 1
c0d27fcc 6778_ACEOF
503d2be0 6779
98418dba
CW
6780 fi
6781fi
503d2be0 6782
c0d27fcc 6783echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
6784echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
6785if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
6786 echo $ECHO_N "(cached) $ECHO_C" >&6
6787else
6788 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6789/* confdefs.h. */
6790_ACEOF
6791cat confdefs.h >>conftest.$ac_ext
6792cat >>conftest.$ac_ext <<_ACEOF
6793/* end confdefs.h. */
98418dba 6794#include <time.h>
b936fae4 6795
98418dba
CW
6796int
6797main ()
6798{
b936fae4
AS
6799static struct tm ac_aggr;
6800if (ac_aggr.tm_gmtoff)
6801return 0;
98418dba
CW
6802 ;
6803 return 0;
6804}
6805_ACEOF
b936fae4 6806rm -f conftest.$ac_objext
c0d27fcc 6807if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6808 (eval $ac_compile) 2>conftest.er1
98418dba 6809 ac_status=$?
35996d22
AS
6810 grep -v '^ *+' conftest.er1 >conftest.err
6811 rm -f conftest.er1
6812 cat conftest.err >&5
c0d27fcc 6813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6814 (exit $ac_status); } &&
c08e6004 6815 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6817 (eval $ac_try) 2>&5
6818 ac_status=$?
6819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6820 (exit $ac_status); }; } &&
6821 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6823 (eval $ac_try) 2>&5
6824 ac_status=$?
c0d27fcc 6825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6826 (exit $ac_status); }; }; then
b936fae4 6827 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
6828else
6829 echo "$as_me: failed program was:" >&5
19650fd6
AS
6830sed 's/^/| /' conftest.$ac_ext >&5
6831
8799b3e4 6832cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6833/* confdefs.h. */
6834_ACEOF
6835cat confdefs.h >>conftest.$ac_ext
6836cat >>conftest.$ac_ext <<_ACEOF
6837/* end confdefs.h. */
6bae0ccf
DL
6838#include <time.h>
6839
8799b3e4
CW
6840int
6841main ()
6842{
6bae0ccf
DL
6843static struct tm ac_aggr;
6844if (sizeof ac_aggr.tm_gmtoff)
6845return 0;
8799b3e4
CW
6846 ;
6847 return 0;
6848}
6849_ACEOF
6bae0ccf 6850rm -f conftest.$ac_objext
c0d27fcc 6851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6852 (eval $ac_compile) 2>conftest.er1
8799b3e4 6853 ac_status=$?
35996d22
AS
6854 grep -v '^ *+' conftest.er1 >conftest.err
6855 rm -f conftest.er1
6856 cat conftest.err >&5
c0d27fcc 6857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6858 (exit $ac_status); } &&
c08e6004 6859 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6861 (eval $ac_try) 2>&5
6862 ac_status=$?
6863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6864 (exit $ac_status); }; } &&
6865 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
6867 (eval $ac_try) 2>&5
6868 ac_status=$?
c0d27fcc 6869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6870 (exit $ac_status); }; }; then
6bae0ccf 6871 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
6872else
6873 echo "$as_me: failed program was:" >&5
19650fd6
AS
6874sed 's/^/| /' conftest.$ac_ext >&5
6875
6bae0ccf 6876ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 6877fi
35996d22 6878rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 6879fi
35996d22 6880rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 6881fi
6bae0ccf
DL
6882echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
6883echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
6884if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
6885
6886cat >>confdefs.h <<\_ACEOF
6887#define HAVE_TM_GMTOFF 1
6888_ACEOF
6889
6890fi
6891
96f3a036
DL
6892echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
6893echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6
6894if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
6895 echo $ECHO_N "(cached) $ECHO_C" >&6
6896else
6897 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
6898/* confdefs.h. */
6899_ACEOF
6900cat confdefs.h >>conftest.$ac_ext
6901cat >>conftest.$ac_ext <<_ACEOF
6902/* end confdefs.h. */
7862d3a8
AS
6903$ac_includes_default
6904#if HAVE_SYS_SOCKET_H
6905#include <sys/socket.h>
6906#endif
6907#if HAVE_NET_IF_H
96f3a036 6908#include <net/if.h>
7862d3a8 6909#endif
96f3a036
DL
6910
6911int
6912main ()
6913{
6914static struct ifreq ac_aggr;
6915if (ac_aggr.ifr_flags)
6916return 0;
6917 ;
6918 return 0;
6919}
6920_ACEOF
6921rm -f conftest.$ac_objext
6922if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6923 (eval $ac_compile) 2>conftest.er1
96f3a036 6924 ac_status=$?
35996d22
AS
6925 grep -v '^ *+' conftest.er1 >conftest.err
6926 rm -f conftest.er1
6927 cat conftest.err >&5
96f3a036
DL
6928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6929 (exit $ac_status); } &&
c08e6004 6930 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6932 (eval $ac_try) 2>&5
6933 ac_status=$?
6934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6935 (exit $ac_status); }; } &&
6936 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
6937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6938 (eval $ac_try) 2>&5
6939 ac_status=$?
6940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6941 (exit $ac_status); }; }; then
6942 ac_cv_member_struct_ifreq_ifr_flags=yes
6943else
6944 echo "$as_me: failed program was:" >&5
6945sed 's/^/| /' conftest.$ac_ext >&5
6946
6947cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
6948/* confdefs.h. */
6949_ACEOF
6950cat confdefs.h >>conftest.$ac_ext
6951cat >>conftest.$ac_ext <<_ACEOF
6952/* end confdefs.h. */
7862d3a8
AS
6953$ac_includes_default
6954#if HAVE_SYS_SOCKET_H
6955#include <sys/socket.h>
6956#endif
6957#if HAVE_NET_IF_H
96f3a036 6958#include <net/if.h>
7862d3a8 6959#endif
96f3a036
DL
6960
6961int
6962main ()
6963{
6964static struct ifreq ac_aggr;
6965if (sizeof ac_aggr.ifr_flags)
6966return 0;
6967 ;
6968 return 0;
6969}
6970_ACEOF
6971rm -f conftest.$ac_objext
6972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6973 (eval $ac_compile) 2>conftest.er1
96f3a036 6974 ac_status=$?
35996d22
AS
6975 grep -v '^ *+' conftest.er1 >conftest.err
6976 rm -f conftest.er1
6977 cat conftest.err >&5
96f3a036
DL
6978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6979 (exit $ac_status); } &&
c08e6004 6980 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
6981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6982 (eval $ac_try) 2>&5
6983 ac_status=$?
6984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6985 (exit $ac_status); }; } &&
6986 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
6987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6988 (eval $ac_try) 2>&5
6989 ac_status=$?
6990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6991 (exit $ac_status); }; }; then
6992 ac_cv_member_struct_ifreq_ifr_flags=yes
6993else
6994 echo "$as_me: failed program was:" >&5
6995sed 's/^/| /' conftest.$ac_ext >&5
6996
6997ac_cv_member_struct_ifreq_ifr_flags=no
6998fi
35996d22 6999rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7000fi
35996d22 7001rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7002fi
7003echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
7004echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6
7005if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
7006
7007cat >>confdefs.h <<_ACEOF
7008#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
7009_ACEOF
7010
7011
7012fi
7013echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
7014echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6
7015if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
7016 echo $ECHO_N "(cached) $ECHO_C" >&6
7017else
7018 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7019/* confdefs.h. */
7020_ACEOF
7021cat confdefs.h >>conftest.$ac_ext
7022cat >>conftest.$ac_ext <<_ACEOF
7023/* end confdefs.h. */
7862d3a8
AS
7024$ac_includes_default
7025#if HAVE_SYS_SOCKET_H
7026#include <sys/socket.h>
7027#endif
7028#if HAVE_NET_IF_H
96f3a036 7029#include <net/if.h>
7862d3a8 7030#endif
96f3a036
DL
7031
7032int
7033main ()
7034{
7035static struct ifreq ac_aggr;
7036if (ac_aggr.ifr_hwaddr)
7037return 0;
7038 ;
7039 return 0;
7040}
7041_ACEOF
7042rm -f conftest.$ac_objext
7043if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7044 (eval $ac_compile) 2>conftest.er1
96f3a036 7045 ac_status=$?
35996d22
AS
7046 grep -v '^ *+' conftest.er1 >conftest.err
7047 rm -f conftest.er1
7048 cat conftest.err >&5
96f3a036
DL
7049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7050 (exit $ac_status); } &&
c08e6004 7051 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7053 (eval $ac_try) 2>&5
7054 ac_status=$?
7055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7056 (exit $ac_status); }; } &&
7057 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7059 (eval $ac_try) 2>&5
7060 ac_status=$?
7061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7062 (exit $ac_status); }; }; then
7063 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7064else
7065 echo "$as_me: failed program was:" >&5
7066sed 's/^/| /' conftest.$ac_ext >&5
7067
7068cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7069/* confdefs.h. */
7070_ACEOF
7071cat confdefs.h >>conftest.$ac_ext
7072cat >>conftest.$ac_ext <<_ACEOF
7073/* end confdefs.h. */
7862d3a8
AS
7074$ac_includes_default
7075#if HAVE_SYS_SOCKET_H
7076#include <sys/socket.h>
7077#endif
7078#if HAVE_NET_IF_H
96f3a036 7079#include <net/if.h>
7862d3a8 7080#endif
96f3a036
DL
7081
7082int
7083main ()
7084{
7085static struct ifreq ac_aggr;
7086if (sizeof ac_aggr.ifr_hwaddr)
7087return 0;
7088 ;
7089 return 0;
7090}
7091_ACEOF
7092rm -f conftest.$ac_objext
7093if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7094 (eval $ac_compile) 2>conftest.er1
96f3a036 7095 ac_status=$?
35996d22
AS
7096 grep -v '^ *+' conftest.er1 >conftest.err
7097 rm -f conftest.er1
7098 cat conftest.err >&5
96f3a036
DL
7099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7100 (exit $ac_status); } &&
c08e6004 7101 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7103 (eval $ac_try) 2>&5
7104 ac_status=$?
7105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7106 (exit $ac_status); }; } &&
7107 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7109 (eval $ac_try) 2>&5
7110 ac_status=$?
7111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7112 (exit $ac_status); }; }; then
7113 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7114else
7115 echo "$as_me: failed program was:" >&5
7116sed 's/^/| /' conftest.$ac_ext >&5
7117
7118ac_cv_member_struct_ifreq_ifr_hwaddr=no
7119fi
35996d22 7120rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7121fi
35996d22 7122rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7123fi
7124echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
7125echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6
7126if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
7127
7128cat >>confdefs.h <<_ACEOF
7129#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
7130_ACEOF
7131
7132
7133fi
7134echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
7135echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6
7136if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
7137 echo $ECHO_N "(cached) $ECHO_C" >&6
7138else
7139 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7140/* confdefs.h. */
7141_ACEOF
7142cat confdefs.h >>conftest.$ac_ext
7143cat >>conftest.$ac_ext <<_ACEOF
7144/* end confdefs.h. */
7862d3a8
AS
7145$ac_includes_default
7146#if HAVE_SYS_SOCKET_H
7147#include <sys/socket.h>
7148#endif
7149#if HAVE_NET_IF_H
96f3a036 7150#include <net/if.h>
7862d3a8 7151#endif
96f3a036
DL
7152
7153int
7154main ()
7155{
7156static struct ifreq ac_aggr;
7157if (ac_aggr.ifr_netmask)
7158return 0;
7159 ;
7160 return 0;
7161}
7162_ACEOF
7163rm -f conftest.$ac_objext
7164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7165 (eval $ac_compile) 2>conftest.er1
96f3a036 7166 ac_status=$?
35996d22
AS
7167 grep -v '^ *+' conftest.er1 >conftest.err
7168 rm -f conftest.er1
7169 cat conftest.err >&5
96f3a036
DL
7170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7171 (exit $ac_status); } &&
c08e6004 7172 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7174 (eval $ac_try) 2>&5
7175 ac_status=$?
7176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7177 (exit $ac_status); }; } &&
7178 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7180 (eval $ac_try) 2>&5
7181 ac_status=$?
7182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7183 (exit $ac_status); }; }; then
7184 ac_cv_member_struct_ifreq_ifr_netmask=yes
7185else
7186 echo "$as_me: failed program was:" >&5
7187sed 's/^/| /' conftest.$ac_ext >&5
7188
7189cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7190/* confdefs.h. */
7191_ACEOF
7192cat confdefs.h >>conftest.$ac_ext
7193cat >>conftest.$ac_ext <<_ACEOF
7194/* end confdefs.h. */
7862d3a8
AS
7195$ac_includes_default
7196#if HAVE_SYS_SOCKET_H
7197#include <sys/socket.h>
7198#endif
7199#if HAVE_NET_IF_H
96f3a036 7200#include <net/if.h>
7862d3a8 7201#endif
96f3a036
DL
7202
7203int
7204main ()
7205{
7206static struct ifreq ac_aggr;
7207if (sizeof ac_aggr.ifr_netmask)
7208return 0;
7209 ;
7210 return 0;
7211}
7212_ACEOF
7213rm -f conftest.$ac_objext
7214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7215 (eval $ac_compile) 2>conftest.er1
96f3a036 7216 ac_status=$?
35996d22
AS
7217 grep -v '^ *+' conftest.er1 >conftest.err
7218 rm -f conftest.er1
7219 cat conftest.err >&5
96f3a036
DL
7220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7221 (exit $ac_status); } &&
c08e6004 7222 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7224 (eval $ac_try) 2>&5
7225 ac_status=$?
7226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7227 (exit $ac_status); }; } &&
7228 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7230 (eval $ac_try) 2>&5
7231 ac_status=$?
7232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7233 (exit $ac_status); }; }; then
7234 ac_cv_member_struct_ifreq_ifr_netmask=yes
7235else
7236 echo "$as_me: failed program was:" >&5
7237sed 's/^/| /' conftest.$ac_ext >&5
7238
7239ac_cv_member_struct_ifreq_ifr_netmask=no
7240fi
35996d22 7241rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7242fi
35996d22 7243rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7244fi
7245echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
7246echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6
7247if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
7248
7249cat >>confdefs.h <<_ACEOF
7250#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
7251_ACEOF
7252
7253
7254fi
7255echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
7256echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6
7257if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
7258 echo $ECHO_N "(cached) $ECHO_C" >&6
7259else
7260 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7261/* confdefs.h. */
7262_ACEOF
7263cat confdefs.h >>conftest.$ac_ext
7264cat >>conftest.$ac_ext <<_ACEOF
7265/* end confdefs.h. */
7862d3a8
AS
7266$ac_includes_default
7267#if HAVE_SYS_SOCKET_H
7268#include <sys/socket.h>
7269#endif
7270#if HAVE_NET_IF_H
96f3a036 7271#include <net/if.h>
7862d3a8 7272#endif
96f3a036
DL
7273
7274int
7275main ()
7276{
7277static struct ifreq ac_aggr;
7278if (ac_aggr.ifr_broadaddr)
7279return 0;
7280 ;
7281 return 0;
7282}
7283_ACEOF
7284rm -f conftest.$ac_objext
7285if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7286 (eval $ac_compile) 2>conftest.er1
96f3a036 7287 ac_status=$?
35996d22
AS
7288 grep -v '^ *+' conftest.er1 >conftest.err
7289 rm -f conftest.er1
7290 cat conftest.err >&5
96f3a036
DL
7291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7292 (exit $ac_status); } &&
c08e6004 7293 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7295 (eval $ac_try) 2>&5
7296 ac_status=$?
7297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7298 (exit $ac_status); }; } &&
7299 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7301 (eval $ac_try) 2>&5
7302 ac_status=$?
7303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7304 (exit $ac_status); }; }; then
7305 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7306else
7307 echo "$as_me: failed program was:" >&5
7308sed 's/^/| /' conftest.$ac_ext >&5
7309
7310cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7311/* confdefs.h. */
7312_ACEOF
7313cat confdefs.h >>conftest.$ac_ext
7314cat >>conftest.$ac_ext <<_ACEOF
7315/* end confdefs.h. */
7862d3a8
AS
7316$ac_includes_default
7317#if HAVE_SYS_SOCKET_H
7318#include <sys/socket.h>
7319#endif
7320#if HAVE_NET_IF_H
96f3a036 7321#include <net/if.h>
7862d3a8 7322#endif
96f3a036
DL
7323
7324int
7325main ()
7326{
7327static struct ifreq ac_aggr;
7328if (sizeof ac_aggr.ifr_broadaddr)
7329return 0;
7330 ;
7331 return 0;
7332}
7333_ACEOF
7334rm -f conftest.$ac_objext
7335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7336 (eval $ac_compile) 2>conftest.er1
96f3a036 7337 ac_status=$?
35996d22
AS
7338 grep -v '^ *+' conftest.er1 >conftest.err
7339 rm -f conftest.er1
7340 cat conftest.err >&5
96f3a036
DL
7341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7342 (exit $ac_status); } &&
c08e6004 7343 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7345 (eval $ac_try) 2>&5
7346 ac_status=$?
7347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7348 (exit $ac_status); }; } &&
7349 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7351 (eval $ac_try) 2>&5
7352 ac_status=$?
7353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7354 (exit $ac_status); }; }; then
7355 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7356else
7357 echo "$as_me: failed program was:" >&5
7358sed 's/^/| /' conftest.$ac_ext >&5
7359
7360ac_cv_member_struct_ifreq_ifr_broadaddr=no
7361fi
35996d22 7362rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7363fi
35996d22 7364rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7365fi
7366echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
7367echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6
7368if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
7369
7370cat >>confdefs.h <<_ACEOF
7371#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
7372_ACEOF
7373
7374
7375fi
7376echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
7377echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6
7378if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
7379 echo $ECHO_N "(cached) $ECHO_C" >&6
7380else
7381 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7382/* confdefs.h. */
7383_ACEOF
7384cat confdefs.h >>conftest.$ac_ext
7385cat >>conftest.$ac_ext <<_ACEOF
7386/* end confdefs.h. */
7862d3a8
AS
7387$ac_includes_default
7388#if HAVE_SYS_SOCKET_H
7389#include <sys/socket.h>
7390#endif
7391#if HAVE_NET_IF_H
96f3a036 7392#include <net/if.h>
7862d3a8 7393#endif
96f3a036
DL
7394
7395int
7396main ()
7397{
7398static struct ifreq ac_aggr;
7399if (ac_aggr.ifr_addr)
7400return 0;
7401 ;
7402 return 0;
7403}
7404_ACEOF
7405rm -f conftest.$ac_objext
7406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7407 (eval $ac_compile) 2>conftest.er1
96f3a036 7408 ac_status=$?
35996d22
AS
7409 grep -v '^ *+' conftest.er1 >conftest.err
7410 rm -f conftest.er1
7411 cat conftest.err >&5
96f3a036
DL
7412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7413 (exit $ac_status); } &&
c08e6004 7414 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7416 (eval $ac_try) 2>&5
7417 ac_status=$?
7418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7419 (exit $ac_status); }; } &&
7420 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7422 (eval $ac_try) 2>&5
7423 ac_status=$?
7424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7425 (exit $ac_status); }; }; then
7426 ac_cv_member_struct_ifreq_ifr_addr=yes
7427else
7428 echo "$as_me: failed program was:" >&5
7429sed 's/^/| /' conftest.$ac_ext >&5
7430
7431cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7432/* confdefs.h. */
7433_ACEOF
7434cat confdefs.h >>conftest.$ac_ext
7435cat >>conftest.$ac_ext <<_ACEOF
7436/* end confdefs.h. */
7862d3a8
AS
7437$ac_includes_default
7438#if HAVE_SYS_SOCKET_H
7439#include <sys/socket.h>
7440#endif
7441#if HAVE_NET_IF_H
96f3a036 7442#include <net/if.h>
7862d3a8 7443#endif
96f3a036
DL
7444
7445int
7446main ()
7447{
7448static struct ifreq ac_aggr;
7449if (sizeof ac_aggr.ifr_addr)
7450return 0;
7451 ;
7452 return 0;
7453}
7454_ACEOF
7455rm -f conftest.$ac_objext
7456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7457 (eval $ac_compile) 2>conftest.er1
96f3a036 7458 ac_status=$?
35996d22
AS
7459 grep -v '^ *+' conftest.er1 >conftest.err
7460 rm -f conftest.er1
7461 cat conftest.err >&5
96f3a036
DL
7462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7463 (exit $ac_status); } &&
c08e6004 7464 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7466 (eval $ac_try) 2>&5
7467 ac_status=$?
7468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7469 (exit $ac_status); }; } &&
7470 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7472 (eval $ac_try) 2>&5
7473 ac_status=$?
7474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7475 (exit $ac_status); }; }; then
7476 ac_cv_member_struct_ifreq_ifr_addr=yes
7477else
7478 echo "$as_me: failed program was:" >&5
7479sed 's/^/| /' conftest.$ac_ext >&5
7480
7481ac_cv_member_struct_ifreq_ifr_addr=no
7482fi
35996d22 7483rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7484fi
35996d22 7485rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7486fi
7487echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
7488echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6
7489if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
7490
7491cat >>confdefs.h <<_ACEOF
7492#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
7493_ACEOF
7494
7495
7496fi
7497
8799b3e4 7498
8799b3e4 7499
c0d27fcc 7500echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
7501echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
7502if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 7503 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7504echo "${ECHO_T}yes" >&6
7505
c0d27fcc 7506cat >>confdefs.h <<\_ACEOF
98418dba 7507#define PROTOTYPES 1
c0d27fcc
MR
7508_ACEOF
7509
7510
7511cat >>confdefs.h <<\_ACEOF
7512#define __PROTOTYPES 1
7513_ACEOF
98418dba
CW
7514
7515else
c0d27fcc 7516 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7517echo "${ECHO_T}no" >&6
7518fi
7519
c0d27fcc 7520echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
7521echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
7522if test "${ac_cv_c_volatile+set}" = set; then
7523 echo $ECHO_N "(cached) $ECHO_C" >&6
7524else
7525 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7526/* confdefs.h. */
7527_ACEOF
7528cat confdefs.h >>conftest.$ac_ext
7529cat >>conftest.$ac_ext <<_ACEOF
7530/* end confdefs.h. */
98418dba 7531
98418dba
CW
7532int
7533main ()
7534{
7535
7536volatile int x;
7537int * volatile y;
7538 ;
7539 return 0;
7540}
7541_ACEOF
7542rm -f conftest.$ac_objext
c0d27fcc 7543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7544 (eval $ac_compile) 2>conftest.er1
98418dba 7545 ac_status=$?
35996d22
AS
7546 grep -v '^ *+' conftest.er1 >conftest.err
7547 rm -f conftest.er1
7548 cat conftest.err >&5
c0d27fcc 7549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7550 (exit $ac_status); } &&
c08e6004 7551 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7553 (eval $ac_try) 2>&5
7554 ac_status=$?
7555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7556 (exit $ac_status); }; } &&
7557 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7559 (eval $ac_try) 2>&5
7560 ac_status=$?
c0d27fcc 7561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7562 (exit $ac_status); }; }; then
7563 ac_cv_c_volatile=yes
7564else
7565 echo "$as_me: failed program was:" >&5
19650fd6
AS
7566sed 's/^/| /' conftest.$ac_ext >&5
7567
98418dba
CW
7568ac_cv_c_volatile=no
7569fi
35996d22 7570rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7571fi
c0d27fcc 7572echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
7573echo "${ECHO_T}$ac_cv_c_volatile" >&6
7574if test $ac_cv_c_volatile = no; then
7575
c0d27fcc 7576cat >>confdefs.h <<\_ACEOF
98418dba 7577#define volatile
c0d27fcc 7578_ACEOF
98418dba
CW
7579
7580fi
7581
c0d27fcc 7582echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
7583echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
7584if test "${ac_cv_c_const+set}" = set; then
7585 echo $ECHO_N "(cached) $ECHO_C" >&6
7586else
7587 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7588/* confdefs.h. */
7589_ACEOF
7590cat confdefs.h >>conftest.$ac_ext
7591cat >>conftest.$ac_ext <<_ACEOF
7592/* end confdefs.h. */
98418dba 7593
98418dba
CW
7594int
7595main ()
7596{
7597/* FIXME: Include the comments suggested by Paul. */
7598#ifndef __cplusplus
7599 /* Ultrix mips cc rejects this. */
7600 typedef int charset[2];
7601 const charset x;
7602 /* SunOS 4.1.1 cc rejects this. */
7603 char const *const *ccp;
7604 char **p;
7605 /* NEC SVR4.0.2 mips cc rejects this. */
7606 struct point {int x, y;};
7607 static struct point const zero = {0,0};
7608 /* AIX XL C 1.02.0.0 rejects this.
7609 It does not let you subtract one const X* pointer from another in
7610 an arm of an if-expression whose if-part is not a constant
7611 expression */
7612 const char *g = "string";
7613 ccp = &g + (g ? g-g : 0);
7614 /* HPUX 7.0 cc rejects these. */
7615 ++ccp;
7616 p = (char**) ccp;
7617 ccp = (char const *const *) p;
7618 { /* SCO 3.2v4 cc rejects this. */
7619 char *t;
7620 char const *s = 0 ? (char *) 0 : (char const *) 0;
7621
7622 *t++ = 0;
7623 }
7624 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
7625 int x[] = {25, 17};
7626 const int *foo = &x[0];
7627 ++foo;
7628 }
7629 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7630 typedef const int *iptr;
7631 iptr p = 0;
7632 ++p;
7633 }
7634 { /* AIX XL C 1.02.0.0 rejects this saying
7635 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7636 struct s { int j; const int *ap[3]; };
7637 struct s *b; b->j = 5;
7638 }
7639 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7640 const int foo = 10;
7641 }
7642#endif
7643
7644 ;
7645 return 0;
7646}
7647_ACEOF
7648rm -f conftest.$ac_objext
c0d27fcc 7649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7650 (eval $ac_compile) 2>conftest.er1
98418dba 7651 ac_status=$?
35996d22
AS
7652 grep -v '^ *+' conftest.er1 >conftest.err
7653 rm -f conftest.er1
7654 cat conftest.err >&5
c0d27fcc 7655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7656 (exit $ac_status); } &&
c08e6004 7657 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7659 (eval $ac_try) 2>&5
7660 ac_status=$?
7661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7662 (exit $ac_status); }; } &&
7663 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7665 (eval $ac_try) 2>&5
7666 ac_status=$?
c0d27fcc 7667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7668 (exit $ac_status); }; }; then
7669 ac_cv_c_const=yes
7670else
7671 echo "$as_me: failed program was:" >&5
19650fd6
AS
7672sed 's/^/| /' conftest.$ac_ext >&5
7673
98418dba
CW
7674ac_cv_c_const=no
7675fi
35996d22 7676rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7677fi
c0d27fcc 7678echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
7679echo "${ECHO_T}$ac_cv_c_const" >&6
7680if test $ac_cv_c_const = no; then
7681
c0d27fcc 7682cat >>confdefs.h <<\_ACEOF
98418dba 7683#define const
c0d27fcc 7684_ACEOF
98418dba
CW
7685
7686fi
7687
c0d27fcc 7688echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
7689echo $ECHO_N "checking for void * support... $ECHO_C" >&6
7690if test "${emacs_cv_void_star+set}" = set; then
7691 echo $ECHO_N "(cached) $ECHO_C" >&6
7692else
7693 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7694/* confdefs.h. */
7695_ACEOF
7696cat confdefs.h >>conftest.$ac_ext
7697cat >>conftest.$ac_ext <<_ACEOF
7698/* end confdefs.h. */
98418dba 7699
98418dba
CW
7700int
7701main ()
7702{
7703void * foo;
7704 ;
7705 return 0;
7706}
7707_ACEOF
7708rm -f conftest.$ac_objext
c0d27fcc 7709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7710 (eval $ac_compile) 2>conftest.er1
98418dba 7711 ac_status=$?
35996d22
AS
7712 grep -v '^ *+' conftest.er1 >conftest.err
7713 rm -f conftest.er1
7714 cat conftest.err >&5
c0d27fcc 7715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7716 (exit $ac_status); } &&
c08e6004 7717 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
7718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7719 (eval $ac_try) 2>&5
7720 ac_status=$?
7721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7722 (exit $ac_status); }; } &&
7723 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7725 (eval $ac_try) 2>&5
7726 ac_status=$?
c0d27fcc 7727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7728 (exit $ac_status); }; }; then
7729 emacs_cv_void_star=yes
7730else
7731 echo "$as_me: failed program was:" >&5
19650fd6
AS
7732sed 's/^/| /' conftest.$ac_ext >&5
7733
98418dba
CW
7734emacs_cv_void_star=no
7735fi
35996d22 7736rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7737fi
c0d27fcc 7738echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
7739echo "${ECHO_T}$emacs_cv_void_star" >&6
7740if test $emacs_cv_void_star = yes; then
c0d27fcc 7741 cat >>confdefs.h <<\_ACEOF
98418dba 7742#define POINTER_TYPE void
c0d27fcc 7743_ACEOF
98418dba
CW
7744
7745else
c0d27fcc 7746 cat >>confdefs.h <<\_ACEOF
98418dba 7747#define POINTER_TYPE char
c0d27fcc 7748_ACEOF
98418dba
CW
7749
7750fi
7751
c0d27fcc 7752
4494a266
JD
7753
7754
cd958eb3 7755
19650fd6
AS
7756echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7757echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
35996d22 7758set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
98418dba
CW
7759if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
7760 echo $ECHO_N "(cached) $ECHO_C" >&6
7761else
c0d27fcc 7762 cat >conftest.make <<\_ACEOF
98418dba 7763all:
19650fd6 7764 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 7765_ACEOF
98418dba
CW
7766# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7767eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
7768if test -n "$ac_maketemp"; then
7769 eval ac_cv_prog_make_${ac_make}_set=yes
7770else
7771 eval ac_cv_prog_make_${ac_make}_set=no
7772fi
7773rm -f conftest.make
7774fi
7775if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 7776 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7777echo "${ECHO_T}yes" >&6
7778 SET_MAKE=
7779else
c0d27fcc 7780 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7781echo "${ECHO_T}no" >&6
7782 SET_MAKE="MAKE=${MAKE-make}"
7783fi
7784
c0d27fcc
MR
7785
7786echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
7787echo $ECHO_N "checking for long file names... $ECHO_C" >&6
7788if test "${ac_cv_sys_long_file_names+set}" = set; then
7789 echo $ECHO_N "(cached) $ECHO_C" >&6
7790else
7791 ac_cv_sys_long_file_names=yes
7792# Test for long file names in all the places we know might matter:
7793# . the current directory, where building will happen
7794# $prefix/lib where we will be installing things
7795# $exec_prefix/lib likewise
7796# eval it to expand exec_prefix.
7797# $TMPDIR if set, where it might want to write temporary files
7798# if $TMPDIR is not set:
7799# /tmp where it might want to write temporary files
7800# /var/tmp likewise
7801# /usr/tmp likewise
7802if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
7803 ac_tmpdirs=$TMPDIR
7804else
7805 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
7806fi
7807for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
7808 test -d $ac_dir || continue
7809 test -w $ac_dir || continue # It is less confusing to not echo anything here.
7810 ac_xdir=$ac_dir/cf$$
7811 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
7812 ac_tf1=$ac_xdir/conftest9012345
7813 ac_tf2=$ac_xdir/conftest9012346
7814 (echo 1 >$ac_tf1) 2>/dev/null
7815 (echo 2 >$ac_tf2) 2>/dev/null
7816 ac_val=`cat $ac_tf1 2>/dev/null`
7817 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
7818 ac_cv_sys_long_file_names=no
7819 rm -rf $ac_xdir 2>/dev/null
7820 break
7821 fi
7822 rm -rf $ac_xdir 2>/dev/null
7823done
7824fi
c0d27fcc 7825echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
7826echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
7827if test $ac_cv_sys_long_file_names = yes; then
7828
c0d27fcc 7829cat >>confdefs.h <<\_ACEOF
98418dba 7830#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 7831_ACEOF
98418dba
CW
7832
7833fi
7834
c0d27fcc 7835
98418dba
CW
7836#### Choose a window system.
7837
c0d27fcc 7838echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
7839echo $ECHO_N "checking for X... $ECHO_C" >&6
7840
c08e6004 7841ac_path_x_has_been_run=yes
c0d27fcc 7842
98418dba
CW
7843# Check whether --with-x or --without-x was given.
7844if test "${with_x+set}" = set; then
7845 withval="$with_x"
7846
7847fi;
7848# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7849if test "x$with_x" = xno; then
7850 # The user explicitly disabled X.
7851 have_x=disabled
7852else
7853 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
7854 # Both variables are already set.
7855 have_x=yes
7856 else
7857 if test "${ac_cv_have_x+set}" = set; then
7858 echo $ECHO_N "(cached) $ECHO_C" >&6
7859else
7860 # One or both of the vars are not set, and there is no cached value.
7861ac_x_includes=no ac_x_libraries=no
7862rm -fr conftest.dir
7863if mkdir conftest.dir; then
7864 cd conftest.dir
7865 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 7866 cat >Imakefile <<'_ACEOF'
98418dba
CW
7867acfindx:
7868 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 7869_ACEOF
98418dba
CW
7870 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
7871 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7872 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7873 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7874 for ac_extension in a so sl; do
7875 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
35996d22
AS
7876 test -f $ac_im_libdir/libX11.$ac_extension; then
7877 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
7878 fi
7879 done
7880 # Screen out bogus values from the imake configuration. They are
7881 # bogus both because they are the default anyway, and because
7882 # using them would break gcc on systems where it needs fixed includes.
7883 case $ac_im_incroot in
7884 /usr/include) ;;
7885 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7886 esac
7887 case $ac_im_usrlibdir in
7888 /usr/lib | /lib) ;;
7889 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7890 esac
7891 fi
7892 cd ..
7893 rm -fr conftest.dir
7894fi
7895
7896# Standard set of common directories for X headers.
7897# Check X11 before X11Rn because it is often a symlink to the current release.
7898ac_x_header_dirs='
7899/usr/X11/include
7900/usr/X11R6/include
7901/usr/X11R5/include
7902/usr/X11R4/include
7903
7904/usr/include/X11
7905/usr/include/X11R6
7906/usr/include/X11R5
7907/usr/include/X11R4
7908
7909/usr/local/X11/include
7910/usr/local/X11R6/include
7911/usr/local/X11R5/include
7912/usr/local/X11R4/include
7913
7914/usr/local/include/X11
7915/usr/local/include/X11R6
7916/usr/local/include/X11R5
7917/usr/local/include/X11R4
7918
7919/usr/X386/include
7920/usr/x386/include
7921/usr/XFree86/include/X11
7922
7923/usr/include
7924/usr/local/include
7925/usr/unsupported/include
7926/usr/athena/include
7927/usr/local/x11r5/include
7928/usr/lpp/Xamples/include
7929
7930/usr/openwin/include
7931/usr/openwin/share/include'
7932
7933if test "$ac_x_includes" = no; then
c08e6004 7934 # Guess where to find include files, by looking for a specified header file.
98418dba
CW
7935 # First, try using that file with no special directory specified.
7936 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7937/* confdefs.h. */
7938_ACEOF
7939cat confdefs.h >>conftest.$ac_ext
7940cat >>conftest.$ac_ext <<_ACEOF
7941/* end confdefs.h. */
98418dba
CW
7942#include <X11/Intrinsic.h>
7943_ACEOF
c0d27fcc 7944if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7945 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7946 ac_status=$?
6bae0ccf 7947 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
7948 rm -f conftest.er1
7949 cat conftest.err >&5
c0d27fcc 7950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7951 (exit $ac_status); } >/dev/null; then
7952 if test -s conftest.err; then
7953 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 7954 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
7955 else
7956 ac_cpp_err=
7957 fi
7958else
7959 ac_cpp_err=yes
7960fi
7961if test -z "$ac_cpp_err"; then
7962 # We can compile using X headers with no special include directory.
7963ac_x_includes=
7964else
7965 echo "$as_me: failed program was:" >&5
19650fd6
AS
7966sed 's/^/| /' conftest.$ac_ext >&5
7967
98418dba
CW
7968 for ac_dir in $ac_x_header_dirs; do
7969 if test -r "$ac_dir/X11/Intrinsic.h"; then
7970 ac_x_includes=$ac_dir
7971 break
7972 fi
7973done
7974fi
7975rm -f conftest.err conftest.$ac_ext
7976fi # $ac_x_includes = no
7977
7978if test "$ac_x_libraries" = no; then
7979 # Check for the libraries.
7980 # See if we find them without any special options.
7981 # Don't add to $LIBS permanently.
7982 ac_save_LIBS=$LIBS
7983 LIBS="-lXt $LIBS"
7984 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7985/* confdefs.h. */
7986_ACEOF
7987cat confdefs.h >>conftest.$ac_ext
7988cat >>conftest.$ac_ext <<_ACEOF
7989/* end confdefs.h. */
98418dba 7990#include <X11/Intrinsic.h>
98418dba
CW
7991int
7992main ()
7993{
7994XtMalloc (0)
7995 ;
7996 return 0;
7997}
7998_ACEOF
7999rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8000if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8001 (eval $ac_link) 2>conftest.er1
98418dba 8002 ac_status=$?
35996d22
AS
8003 grep -v '^ *+' conftest.er1 >conftest.err
8004 rm -f conftest.er1
8005 cat conftest.err >&5
c0d27fcc 8006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8007 (exit $ac_status); } &&
c08e6004 8008 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
8009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8010 (eval $ac_try) 2>&5
8011 ac_status=$?
8012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8013 (exit $ac_status); }; } &&
8014 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8016 (eval $ac_try) 2>&5
8017 ac_status=$?
c0d27fcc 8018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8019 (exit $ac_status); }; }; then
8020 LIBS=$ac_save_LIBS
8021# We can link X programs with no special library path.
8022ac_x_libraries=
8023else
8024 echo "$as_me: failed program was:" >&5
19650fd6
AS
8025sed 's/^/| /' conftest.$ac_ext >&5
8026
98418dba
CW
8027LIBS=$ac_save_LIBS
8028for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8029do
8030 # Don't even attempt the hair of trying to link an X program!
8031 for ac_extension in a so sl; do
8032 if test -r $ac_dir/libXt.$ac_extension; then
8033 ac_x_libraries=$ac_dir
8034 break 2
8035 fi
8036 done
8037done
8038fi
35996d22
AS
8039rm -f conftest.err conftest.$ac_objext \
8040 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8041fi # $ac_x_libraries = no
8042
8043if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8044 # Didn't find X anywhere. Cache the known absence of X.
8045 ac_cv_have_x="have_x=no"
8046else
8047 # Record where we found X for the cache.
8048 ac_cv_have_x="have_x=yes \
35996d22 8049 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
98418dba
CW
8050fi
8051fi
8052
8053 fi
8054 eval "$ac_cv_have_x"
8055fi # $with_x != no
8056
8057if test "$have_x" != yes; then
c0d27fcc 8058 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
8059echo "${ECHO_T}$have_x" >&6
8060 no_x=yes
8061else
8062 # If each of the values was on the command line, it overrides each guess.
8063 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8064 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8065 # Update the cache value to reflect the command line values.
8066 ac_cv_have_x="have_x=yes \
8067 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
c08e6004
MA
8068 # It might be that x_includes is empty (headers are found in the
8069 # standard search path. Then output the corresponding message
8070 ac_out_x_includes=$x_includes
8071 test "x$x_includes" = x && ac_out_x_includes="in standard search path"
8072 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $ac_out_x_includes" >&5
8073echo "${ECHO_T}libraries $x_libraries, headers $ac_out_x_includes" >&6
98418dba
CW
8074fi
8075
8076if test "$no_x" = yes; then
8077 window_system=none
8078else
8079 window_system=x11
8080fi
8081
8082if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8083 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
8084 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
8085 x_default_search_path=""
8086 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
8087 x_search_path="\
8088${x_library}/X11/%L/%T/%N%C%S:\
8089${x_library}/X11/%l/%T/%N%C%S:\
8090${x_library}/X11/%T/%N%C%S:\
8091${x_library}/X11/%L/%T/%N%S:\
8092${x_library}/X11/%l/%T/%N%S:\
8093${x_library}/X11/%T/%N%S"
8094 if test x"${x_default_search_path}" = x; then
8095 x_default_search_path=${x_search_path}
8096 else
8097 x_default_search_path="${x_search_path}:${x_default_search_path}"
8098 fi
8099 done
8100fi
8101if test "${x_includes}" != NONE && test -n "${x_includes}"; then
8102 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
8103fi
8104
8105if test x"${x_includes}" = x; then
8106 bitmapdir=/usr/include/X11/bitmaps
8107else
8108 # accumulate include directories that have X11 bitmap subdirectories
8109 bmd_acc="dummyval"
8110 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
8111 if test -d "${bmd}/X11/bitmaps"; then
8112 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
8113 fi
8114 if test -d "${bmd}/bitmaps"; then
8115 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
8116 fi
8117 done
8118 if test ${bmd_acc} != "dummyval"; then
8119 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
8120 fi
8121fi
8122
8123case "${window_system}" in
8124 x11 )
8125 HAVE_X_WINDOWS=yes
8126 HAVE_X11=yes
8127 case "${with_x_toolkit}" in
8128 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
8129 motif ) USE_X_TOOLKIT=MOTIF ;;
488dd4c4
JD
8130 gtk ) with_gtk=yes
8131 USE_X_TOOLKIT=none ;;
98418dba
CW
8132 no ) USE_X_TOOLKIT=none ;;
8133 * ) USE_X_TOOLKIT=maybe ;;
8134 esac
8135 ;;
8136 none )
8137 HAVE_X_WINDOWS=no
8138 HAVE_X11=no
8139 USE_X_TOOLKIT=none
8140 ;;
8141esac
8142
8143### If we're using X11, we should use the X menu package.
8144HAVE_MENUS=no
8145case ${HAVE_X11} in
8146 yes ) HAVE_MENUS=yes ;;
8147esac
8148
8149if test "${opsys}" = "hpux9"; then
8150 case "${x_libraries}" in
8151 *X11R4* )
8152 opsysfile="s/hpux9-x11r4.h"
8153 ;;
8154 esac
8155fi
8156
8157if test "${opsys}" = "hpux9shr"; then
8158 case "${x_libraries}" in
8159 *X11R4* )
8160 opsysfile="s/hpux9shxr4.h"
8161 ;;
8162 esac
8163fi
8164
8165### Compute the unexec source name from the object name.
8166UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
8167
8168# Do the opsystem or machine files prohibit the use of the GNU malloc?
8169# Assume not, until told otherwise.
8170GNU_MALLOC=yes
8171doug_lea_malloc=yes
c0d27fcc 8172echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
8173echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
8174if test "${ac_cv_func_malloc_get_state+set}" = set; then
8175 echo $ECHO_N "(cached) $ECHO_C" >&6
8176else
8177 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8178/* confdefs.h. */
8179_ACEOF
8180cat confdefs.h >>conftest.$ac_ext
8181cat >>conftest.$ac_ext <<_ACEOF
8182/* end confdefs.h. */
35996d22
AS
8183/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
8184 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8185#define malloc_get_state innocuous_malloc_get_state
8186
98418dba 8187/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8188 which can conflict with char malloc_get_state (); below.
8189 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8190 <limits.h> exists even on freestanding compilers. */
35996d22 8191
19650fd6
AS
8192#ifdef __STDC__
8193# include <limits.h>
8194#else
8195# include <assert.h>
8196#endif
35996d22
AS
8197
8198#undef malloc_get_state
8199
98418dba
CW
8200/* Override any gcc2 internal prototype to avoid an error. */
8201#ifdef __cplusplus
8202extern "C"
19650fd6 8203{
98418dba
CW
8204#endif
8205/* We use char because int might match the return type of a gcc2
8206 builtin and then its argument prototype would still apply. */
8207char malloc_get_state ();
98418dba
CW
8208/* The GNU C library defines this for functions which it implements
8209 to always fail with ENOSYS. Some functions are actually named
8210 something starting with __ and the normal name is an alias. */
8211#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
8212choke me
8213#else
19650fd6
AS
8214char (*f) () = malloc_get_state;
8215#endif
8216#ifdef __cplusplus
8217}
98418dba
CW
8218#endif
8219
19650fd6
AS
8220int
8221main ()
8222{
8223return f != malloc_get_state;
98418dba
CW
8224 ;
8225 return 0;
8226}
8227_ACEOF
8228rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8229if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8230 (eval $ac_link) 2>conftest.er1
98418dba 8231 ac_status=$?
35996d22
AS
8232 grep -v '^ *+' conftest.er1 >conftest.err
8233 rm -f conftest.er1
8234 cat conftest.err >&5
c0d27fcc 8235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8236 (exit $ac_status); } &&
c08e6004 8237 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
8238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8239 (eval $ac_try) 2>&5
8240 ac_status=$?
8241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8242 (exit $ac_status); }; } &&
8243 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8245 (eval $ac_try) 2>&5
8246 ac_status=$?
c0d27fcc 8247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8248 (exit $ac_status); }; }; then
8249 ac_cv_func_malloc_get_state=yes
8250else
8251 echo "$as_me: failed program was:" >&5
19650fd6
AS
8252sed 's/^/| /' conftest.$ac_ext >&5
8253
98418dba
CW
8254ac_cv_func_malloc_get_state=no
8255fi
35996d22
AS
8256rm -f conftest.err conftest.$ac_objext \
8257 conftest$ac_exeext conftest.$ac_ext
98418dba 8258fi
c0d27fcc 8259echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
8260echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
8261if test $ac_cv_func_malloc_get_state = yes; then
8262 :
8263else
8264 doug_lea_malloc=no
8265fi
8266
c0d27fcc 8267echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
8268echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
8269if test "${ac_cv_func_malloc_set_state+set}" = set; then
8270 echo $ECHO_N "(cached) $ECHO_C" >&6
8271else
8272 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8273/* confdefs.h. */
8274_ACEOF
8275cat confdefs.h >>conftest.$ac_ext
8276cat >>conftest.$ac_ext <<_ACEOF
8277/* end confdefs.h. */
35996d22
AS
8278/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
8279 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8280#define malloc_set_state innocuous_malloc_set_state
8281
98418dba 8282/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8283 which can conflict with char malloc_set_state (); below.
8284 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8285 <limits.h> exists even on freestanding compilers. */
35996d22 8286
19650fd6
AS
8287#ifdef __STDC__
8288# include <limits.h>
8289#else
8290# include <assert.h>
8291#endif
35996d22
AS
8292
8293#undef malloc_set_state
8294
98418dba
CW
8295/* Override any gcc2 internal prototype to avoid an error. */
8296#ifdef __cplusplus
8297extern "C"
19650fd6 8298{
98418dba
CW
8299#endif
8300/* We use char because int might match the return type of a gcc2
8301 builtin and then its argument prototype would still apply. */
8302char malloc_set_state ();
98418dba
CW
8303/* The GNU C library defines this for functions which it implements
8304 to always fail with ENOSYS. Some functions are actually named
8305 something starting with __ and the normal name is an alias. */
8306#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
8307choke me
8308#else
19650fd6
AS
8309char (*f) () = malloc_set_state;
8310#endif
8311#ifdef __cplusplus
8312}
98418dba
CW
8313#endif
8314
19650fd6
AS
8315int
8316main ()
8317{
8318return f != malloc_set_state;
98418dba
CW
8319 ;
8320 return 0;
8321}
8322_ACEOF
8323rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8324if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8325 (eval $ac_link) 2>conftest.er1
98418dba 8326 ac_status=$?
35996d22
AS
8327 grep -v '^ *+' conftest.er1 >conftest.err
8328 rm -f conftest.er1
8329 cat conftest.err >&5
c0d27fcc 8330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8331 (exit $ac_status); } &&
c08e6004 8332 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
8333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8334 (eval $ac_try) 2>&5
8335 ac_status=$?
8336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337 (exit $ac_status); }; } &&
8338 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8340 (eval $ac_try) 2>&5
8341 ac_status=$?
c0d27fcc 8342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8343 (exit $ac_status); }; }; then
8344 ac_cv_func_malloc_set_state=yes
8345else
8346 echo "$as_me: failed program was:" >&5
19650fd6
AS
8347sed 's/^/| /' conftest.$ac_ext >&5
8348
98418dba
CW
8349ac_cv_func_malloc_set_state=no
8350fi
35996d22
AS
8351rm -f conftest.err conftest.$ac_objext \
8352 conftest$ac_exeext conftest.$ac_ext
98418dba 8353fi
c0d27fcc 8354echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
8355echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
8356if test $ac_cv_func_malloc_set_state = yes; then
8357 :
8358else
8359 doug_lea_malloc=no
8360fi
8361
c0d27fcc 8362echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
8363echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
8364if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
8365 echo $ECHO_N "(cached) $ECHO_C" >&6
8366else
8367 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8368/* confdefs.h. */
8369_ACEOF
8370cat confdefs.h >>conftest.$ac_ext
8371cat >>conftest.$ac_ext <<_ACEOF
8372/* end confdefs.h. */
98418dba 8373extern void (* __after_morecore_hook)();
98418dba
CW
8374int
8375main ()
8376{
8377__after_morecore_hook = 0
8378 ;
8379 return 0;
8380}
8381_ACEOF
8382rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8383if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8384 (eval $ac_link) 2>conftest.er1
98418dba 8385 ac_status=$?
35996d22
AS
8386 grep -v '^ *+' conftest.er1 >conftest.err
8387 rm -f conftest.er1
8388 cat conftest.err >&5
c0d27fcc 8389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8390 (exit $ac_status); } &&
c08e6004 8391 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
8392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8393 (eval $ac_try) 2>&5
8394 ac_status=$?
8395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8396 (exit $ac_status); }; } &&
8397 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8399 (eval $ac_try) 2>&5
8400 ac_status=$?
c0d27fcc 8401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8402 (exit $ac_status); }; }; then
8403 emacs_cv_var___after_morecore_hook=yes
8404else
8405 echo "$as_me: failed program was:" >&5
19650fd6
AS
8406sed 's/^/| /' conftest.$ac_ext >&5
8407
98418dba
CW
8408emacs_cv_var___after_morecore_hook=no
8409fi
35996d22
AS
8410rm -f conftest.err conftest.$ac_objext \
8411 conftest$ac_exeext conftest.$ac_ext
98418dba 8412fi
c0d27fcc 8413echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
8414echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
8415if test $emacs_cv_var___after_morecore_hook = no; then
8416 doug_lea_malloc=no
8417fi
8418if test "${system_malloc}" = "yes"; then
8419 GNU_MALLOC=no
8420 GNU_MALLOC_reason="
8421 (The GNU allocators don't work with this system configuration.)"
8422fi
8423if test "$doug_lea_malloc" = "yes" ; then
8424 if test "$GNU_MALLOC" = yes ; then
8425 GNU_MALLOC_reason="
8426 (Using Doug Lea's new malloc from the GNU C Library.)"
8427 fi
b936fae4 8428
c0d27fcc 8429cat >>confdefs.h <<\_ACEOF
98418dba 8430#define DOUG_LEA_MALLOC 1
c0d27fcc 8431_ACEOF
98418dba
CW
8432
8433fi
8434
8435if test x"${REL_ALLOC}" = x; then
8436 REL_ALLOC=${GNU_MALLOC}
8437fi
8438
8439
c0d27fcc
MR
8440
8441
8442for ac_header in stdlib.h unistd.h
98418dba
CW
8443do
8444as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
8445if eval "test \"\${$as_ac_Header+set}\" = set"; then
8446 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
8447echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8448if eval "test \"\${$as_ac_Header+set}\" = set"; then
8449 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
8450fi
8451echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8452echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 8453else
c0d27fcc
MR
8454 # Is the header compilable?
8455echo "$as_me:$LINENO: checking $ac_header usability" >&5
8456echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8457cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8458/* confdefs.h. */
8459_ACEOF
8460cat confdefs.h >>conftest.$ac_ext
8461cat >>conftest.$ac_ext <<_ACEOF
8462/* end confdefs.h. */
98418dba
CW
8463$ac_includes_default
8464#include <$ac_header>
8465_ACEOF
8466rm -f conftest.$ac_objext
c0d27fcc 8467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 8468 (eval $ac_compile) 2>conftest.er1
98418dba 8469 ac_status=$?
35996d22
AS
8470 grep -v '^ *+' conftest.er1 >conftest.err
8471 rm -f conftest.er1
8472 cat conftest.err >&5
c0d27fcc 8473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8474 (exit $ac_status); } &&
c08e6004 8475 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
8476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8477 (eval $ac_try) 2>&5
8478 ac_status=$?
8479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8480 (exit $ac_status); }; } &&
8481 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8483 (eval $ac_try) 2>&5
8484 ac_status=$?
c0d27fcc 8485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8486 (exit $ac_status); }; }; then
c0d27fcc 8487 ac_header_compiler=yes
98418dba
CW
8488else
8489 echo "$as_me: failed program was:" >&5
19650fd6
AS
8490sed 's/^/| /' conftest.$ac_ext >&5
8491
c0d27fcc 8492ac_header_compiler=no
98418dba 8493fi
35996d22 8494rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
8495echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8496echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 8497
c0d27fcc
MR
8498# Is the header present?
8499echo "$as_me:$LINENO: checking $ac_header presence" >&5
8500echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8501cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8502/* confdefs.h. */
8503_ACEOF
8504cat confdefs.h >>conftest.$ac_ext
8505cat >>conftest.$ac_ext <<_ACEOF
8506/* end confdefs.h. */
98418dba
CW
8507#include <$ac_header>
8508_ACEOF
c0d27fcc 8509if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8510 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8511 ac_status=$?
6bae0ccf 8512 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8513 rm -f conftest.er1
8514 cat conftest.err >&5
c0d27fcc 8515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8516 (exit $ac_status); } >/dev/null; then
8517 if test -s conftest.err; then
8518 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 8519 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8520 else
8521 ac_cpp_err=
8522 fi
8523else
8524 ac_cpp_err=yes
8525fi
8526if test -z "$ac_cpp_err"; then
c0d27fcc 8527 ac_header_preproc=yes
98418dba
CW
8528else
8529 echo "$as_me: failed program was:" >&5
19650fd6
AS
8530sed 's/^/| /' conftest.$ac_ext >&5
8531
c0d27fcc 8532 ac_header_preproc=no
98418dba
CW
8533fi
8534rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
8535echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8536echo "${ECHO_T}$ac_header_preproc" >&6
8537
8538# So? What about this header?
35996d22
AS
8539case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8540 yes:no: )
c0d27fcc
MR
8541 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8542echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
8543 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8544echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8545 ac_header_preproc=yes
19650fd6 8546 ;;
35996d22 8547 no:yes:* )
c0d27fcc
MR
8548 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8549echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
8550 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8551echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8552 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8553echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8554 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8555echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 8556 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 8557echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
8558 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8559echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
8560 (
8561 cat <<\_ASBOX
35996d22
AS
8562## ------------------------------------------ ##
8563## Report this to the AC_PACKAGE_NAME lists. ##
8564## ------------------------------------------ ##
19650fd6
AS
8565_ASBOX
8566 ) |
8567 sed "s/^/$as_me: WARNING: /" >&2
8568 ;;
c0d27fcc
MR
8569esac
8570echo "$as_me:$LINENO: checking for $ac_header" >&5
8571echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8572if eval "test \"\${$as_ac_Header+set}\" = set"; then
8573 echo $ECHO_N "(cached) $ECHO_C" >&6
8574else
35996d22 8575 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 8576fi
c0d27fcc 8577echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 8578echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
8579
8580fi
98418dba 8581if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 8582 cat >>confdefs.h <<_ACEOF
98418dba 8583#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 8584_ACEOF
98418dba
CW
8585
8586fi
c0d27fcc 8587
98418dba
CW
8588done
8589
c0d27fcc 8590
98418dba
CW
8591for ac_func in getpagesize
8592do
8593as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 8594echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
8595echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8596if eval "test \"\${$as_ac_var+set}\" = set"; then
8597 echo $ECHO_N "(cached) $ECHO_C" >&6
8598else
8599 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8600/* confdefs.h. */
8601_ACEOF
8602cat confdefs.h >>conftest.$ac_ext
8603cat >>conftest.$ac_ext <<_ACEOF
8604/* end confdefs.h. */
35996d22
AS
8605/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8606 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8607#define $ac_func innocuous_$ac_func
8608
98418dba 8609/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8610 which can conflict with char $ac_func (); below.
8611 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8612 <limits.h> exists even on freestanding compilers. */
35996d22 8613
19650fd6
AS
8614#ifdef __STDC__
8615# include <limits.h>
8616#else
8617# include <assert.h>
8618#endif
35996d22
AS
8619
8620#undef $ac_func
8621
98418dba
CW
8622/* Override any gcc2 internal prototype to avoid an error. */
8623#ifdef __cplusplus
8624extern "C"
19650fd6 8625{
98418dba
CW
8626#endif
8627/* We use char because int might match the return type of a gcc2
8628 builtin and then its argument prototype would still apply. */
8629char $ac_func ();
98418dba
CW
8630/* The GNU C library defines this for functions which it implements
8631 to always fail with ENOSYS. Some functions are actually named
8632 something starting with __ and the normal name is an alias. */
8633#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8634choke me
8635#else
19650fd6
AS
8636char (*f) () = $ac_func;
8637#endif
8638#ifdef __cplusplus
8639}
98418dba
CW
8640#endif
8641
19650fd6
AS
8642int
8643main ()
8644{
8645return f != $ac_func;
98418dba
CW
8646 ;
8647 return 0;
8648}
8649_ACEOF
8650rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8651if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8652 (eval $ac_link) 2>conftest.er1
98418dba 8653 ac_status=$?
35996d22
AS
8654 grep -v '^ *+' conftest.er1 >conftest.err
8655 rm -f conftest.er1
8656 cat conftest.err >&5
c0d27fcc 8657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8658 (exit $ac_status); } &&
c08e6004 8659 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
8660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8661 (eval $ac_try) 2>&5
8662 ac_status=$?
8663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8664 (exit $ac_status); }; } &&
8665 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8667 (eval $ac_try) 2>&5
8668 ac_status=$?
c0d27fcc 8669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8670 (exit $ac_status); }; }; then
8671 eval "$as_ac_var=yes"
8672else
8673 echo "$as_me: failed program was:" >&5
19650fd6
AS
8674sed 's/^/| /' conftest.$ac_ext >&5
8675
98418dba
CW
8676eval "$as_ac_var=no"
8677fi
35996d22
AS
8678rm -f conftest.err conftest.$ac_objext \
8679 conftest$ac_exeext conftest.$ac_ext
98418dba 8680fi
c0d27fcc 8681echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
8682echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8683if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 8684 cat >>confdefs.h <<_ACEOF
98418dba 8685#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 8686_ACEOF
98418dba
CW
8687
8688fi
8689done
8690
c0d27fcc 8691echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
8692echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
8693if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8694 echo $ECHO_N "(cached) $ECHO_C" >&6
8695else
8696 if test "$cross_compiling" = yes; then
8697 ac_cv_func_mmap_fixed_mapped=no
8698else
8699 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8700/* confdefs.h. */
8701_ACEOF
8702cat confdefs.h >>conftest.$ac_ext
8703cat >>conftest.$ac_ext <<_ACEOF
8704/* end confdefs.h. */
98418dba 8705$ac_includes_default
c0d27fcc
MR
8706/* malloc might have been renamed as rpl_malloc. */
8707#undef malloc
8708
98418dba
CW
8709/* Thanks to Mike Haertel and Jim Avera for this test.
8710 Here is a matrix of mmap possibilities:
8711 mmap private not fixed
8712 mmap private fixed at somewhere currently unmapped
8713 mmap private fixed at somewhere already mapped
8714 mmap shared not fixed
8715 mmap shared fixed at somewhere currently unmapped
8716 mmap shared fixed at somewhere already mapped
8717 For private mappings, we should verify that changes cannot be read()
8718 back from the file, nor mmap's back from the file at a different
8719 address. (There have been systems where private was not correctly
8720 implemented like the infamous i386 svr4.0, and systems where the
8721 VM page cache was not coherent with the file system buffer cache
8722 like early versions of FreeBSD and possibly contemporary NetBSD.)
8723 For shared mappings, we should conversely verify that changes get
c0d27fcc 8724 propagated back to all the places they're supposed to be.
98418dba
CW
8725
8726 Grep wants private fixed already mapped.
8727 The main things grep needs to know about mmap are:
8728 * does it exist and is it safe to write into the mmap'd area
8729 * how to use it (BSD variants) */
8730
8731#include <fcntl.h>
8732#include <sys/mman.h>
8733
8734#if !STDC_HEADERS && !HAVE_STDLIB_H
8735char *malloc ();
8736#endif
8737
8738/* This mess was copied from the GNU getpagesize.h. */
8739#if !HAVE_GETPAGESIZE
8740/* Assume that all systems that can run configure have sys/param.h. */
8741# if !HAVE_SYS_PARAM_H
8742# define HAVE_SYS_PARAM_H 1
8743# endif
8744
8745# ifdef _SC_PAGESIZE
8746# define getpagesize() sysconf(_SC_PAGESIZE)
8747# else /* no _SC_PAGESIZE */
8748# if HAVE_SYS_PARAM_H
8749# include <sys/param.h>
8750# ifdef EXEC_PAGESIZE
8751# define getpagesize() EXEC_PAGESIZE
8752# else /* no EXEC_PAGESIZE */
8753# ifdef NBPG
8754# define getpagesize() NBPG * CLSIZE
8755# ifndef CLSIZE
8756# define CLSIZE 1
8757# endif /* no CLSIZE */
8758# else /* no NBPG */
8759# ifdef NBPC
8760# define getpagesize() NBPC
8761# else /* no NBPC */
8762# ifdef PAGESIZE
8763# define getpagesize() PAGESIZE
8764# endif /* PAGESIZE */
8765# endif /* no NBPC */
8766# endif /* no NBPG */
8767# endif /* no EXEC_PAGESIZE */
8768# else /* no HAVE_SYS_PARAM_H */
8769# define getpagesize() 8192 /* punt totally */
8770# endif /* no HAVE_SYS_PARAM_H */
8771# endif /* no _SC_PAGESIZE */
8772
8773#endif /* no HAVE_GETPAGESIZE */
8774
8775int
8776main ()
8777{
8778 char *data, *data2, *data3;
8779 int i, pagesize;
8780 int fd;
8781
8782 pagesize = getpagesize ();
8783
8784 /* First, make a file with some known garbage in it. */
8785 data = (char *) malloc (pagesize);
8786 if (!data)
8787 exit (1);
8788 for (i = 0; i < pagesize; ++i)
8789 *(data + i) = rand ();
8790 umask (0);
8791 fd = creat ("conftest.mmap", 0600);
8792 if (fd < 0)
8793 exit (1);
8794 if (write (fd, data, pagesize) != pagesize)
8795 exit (1);
8796 close (fd);
8797
8798 /* Next, try to mmap the file at a fixed address which already has
8799 something else allocated at it. If we can, also make sure that
8800 we see the same garbage. */
8801 fd = open ("conftest.mmap", O_RDWR);
8802 if (fd < 0)
8803 exit (1);
8804 data2 = (char *) malloc (2 * pagesize);
8805 if (!data2)
8806 exit (1);
35996d22 8807 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 8808 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
35996d22 8809 MAP_PRIVATE | MAP_FIXED, fd, 0L))
98418dba
CW
8810 exit (1);
8811 for (i = 0; i < pagesize; ++i)
8812 if (*(data + i) != *(data2 + i))
8813 exit (1);
8814
8815 /* Finally, make sure that changes to the mapped area do not
8816 percolate back to the file as seen by read(). (This is a bug on
8817 some variants of i386 svr4.0.) */
8818 for (i = 0; i < pagesize; ++i)
8819 *(data2 + i) = *(data2 + i) + 1;
8820 data3 = (char *) malloc (pagesize);
8821 if (!data3)
8822 exit (1);
8823 if (read (fd, data3, pagesize) != pagesize)
8824 exit (1);
8825 for (i = 0; i < pagesize; ++i)
8826 if (*(data + i) != *(data3 + i))
8827 exit (1);
8828 close (fd);
8829 exit (0);
8830}
8831_ACEOF
8832rm -f conftest$ac_exeext
c0d27fcc 8833if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8834 (eval $ac_link) 2>&5
8835 ac_status=$?
c0d27fcc 8836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8837 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 8838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8839 (eval $ac_try) 2>&5
8840 ac_status=$?
c0d27fcc 8841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8842 (exit $ac_status); }; }; then
8843 ac_cv_func_mmap_fixed_mapped=yes
8844else
8845 echo "$as_me: program exited with status $ac_status" >&5
8846echo "$as_me: failed program was:" >&5
19650fd6
AS
8847sed 's/^/| /' conftest.$ac_ext >&5
8848
c0d27fcc 8849( exit $ac_status )
98418dba
CW
8850ac_cv_func_mmap_fixed_mapped=no
8851fi
35996d22 8852rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
8853fi
8854fi
c0d27fcc 8855echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
8856echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
8857if test $ac_cv_func_mmap_fixed_mapped = yes; then
8858
c0d27fcc 8859cat >>confdefs.h <<\_ACEOF
98418dba 8860#define HAVE_MMAP 1
c0d27fcc 8861_ACEOF
98418dba
CW
8862
8863fi
8864rm -f conftest.mmap
8865
8866if test $use_mmap_for_buffers = yes; then
8867 REL_ALLOC=no
8868fi
8869
8870LIBS="$libsrc_libs $LIBS"
8871
c0d27fcc
MR
8872
8873echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
8874echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
8875if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
8876 echo $ECHO_N "(cached) $ECHO_C" >&6
8877else
8878 ac_check_lib_save_LIBS=$LIBS
8879LIBS="-ldnet $LIBS"
8880cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8881/* confdefs.h. */
8882_ACEOF
8883cat confdefs.h >>conftest.$ac_ext
8884cat >>conftest.$ac_ext <<_ACEOF
8885/* end confdefs.h. */
98418dba
CW
8886
8887/* Override any gcc2 internal prototype to avoid an error. */
8888#ifdef __cplusplus
8889extern "C"
8890#endif
8891/* We use char because int might match the return type of a gcc2
8892 builtin and then its argument prototype would still apply. */
8893char dnet_ntoa ();
98418dba
CW
8894int
8895main ()
8896{
8897dnet_ntoa ();
8898 ;
8899 return 0;
8900}
8901_ACEOF
8902rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8903if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8904 (eval $ac_link) 2>conftest.er1
98418dba 8905 ac_status=$?
35996d22
AS
8906 grep -v '^ *+' conftest.er1 >conftest.err
8907 rm -f conftest.er1
8908 cat conftest.err >&5
c0d27fcc 8909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8910 (exit $ac_status); } &&
c08e6004 8911 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
8912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8913 (eval $ac_try) 2>&5
8914 ac_status=$?
8915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8916 (exit $ac_status); }; } &&
8917 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8919 (eval $ac_try) 2>&5
8920 ac_status=$?
c0d27fcc 8921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8922 (exit $ac_status); }; }; then
8923 ac_cv_lib_dnet_dnet_ntoa=yes
8924else
8925 echo "$as_me: failed program was:" >&5
19650fd6
AS
8926sed 's/^/| /' conftest.$ac_ext >&5
8927
98418dba
CW
8928ac_cv_lib_dnet_dnet_ntoa=no
8929fi
35996d22
AS
8930rm -f conftest.err conftest.$ac_objext \
8931 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8932LIBS=$ac_check_lib_save_LIBS
8933fi
c0d27fcc 8934echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
8935echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
8936if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 8937 cat >>confdefs.h <<_ACEOF
98418dba 8938#define HAVE_LIBDNET 1
c0d27fcc 8939_ACEOF
98418dba
CW
8940
8941 LIBS="-ldnet $LIBS"
8942
8943fi
8944
c0d27fcc
MR
8945
8946echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
8947echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
8948if test "${ac_cv_lib_Xbsd_main+set}" = set; then
8949 echo $ECHO_N "(cached) $ECHO_C" >&6
8950else
8951 ac_check_lib_save_LIBS=$LIBS
8952LIBS="-lXbsd $LIBS"
8953cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8954/* confdefs.h. */
8955_ACEOF
8956cat confdefs.h >>conftest.$ac_ext
8957cat >>conftest.$ac_ext <<_ACEOF
8958/* end confdefs.h. */
98418dba 8959
c0d27fcc 8960
98418dba
CW
8961int
8962main ()
8963{
8964main ();
8965 ;
8966 return 0;
8967}
8968_ACEOF
8969rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8970if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8971 (eval $ac_link) 2>conftest.er1
98418dba 8972 ac_status=$?
35996d22
AS
8973 grep -v '^ *+' conftest.er1 >conftest.err
8974 rm -f conftest.er1
8975 cat conftest.err >&5
c0d27fcc 8976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8977 (exit $ac_status); } &&
c08e6004 8978 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
8979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8980 (eval $ac_try) 2>&5
8981 ac_status=$?
8982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8983 (exit $ac_status); }; } &&
8984 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8986 (eval $ac_try) 2>&5
8987 ac_status=$?
c0d27fcc 8988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8989 (exit $ac_status); }; }; then
8990 ac_cv_lib_Xbsd_main=yes
8991else
8992 echo "$as_me: failed program was:" >&5
19650fd6
AS
8993sed 's/^/| /' conftest.$ac_ext >&5
8994
98418dba
CW
8995ac_cv_lib_Xbsd_main=no
8996fi
35996d22
AS
8997rm -f conftest.err conftest.$ac_objext \
8998 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8999LIBS=$ac_check_lib_save_LIBS
9000fi
c0d27fcc 9001echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
9002echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
9003if test $ac_cv_lib_Xbsd_main = yes; then
9004 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
9005fi
9006
c0d27fcc
MR
9007
9008
9009echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
9010echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
9011if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
9012 echo $ECHO_N "(cached) $ECHO_C" >&6
9013else
9014 ac_check_lib_save_LIBS=$LIBS
9015LIBS="-lpthreads $LIBS"
9016cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9017/* confdefs.h. */
9018_ACEOF
9019cat confdefs.h >>conftest.$ac_ext
9020cat >>conftest.$ac_ext <<_ACEOF
9021/* end confdefs.h. */
98418dba
CW
9022
9023/* Override any gcc2 internal prototype to avoid an error. */
9024#ifdef __cplusplus
9025extern "C"
9026#endif
9027/* We use char because int might match the return type of a gcc2
9028 builtin and then its argument prototype would still apply. */
9029char cma_open ();
98418dba
CW
9030int
9031main ()
9032{
9033cma_open ();
9034 ;
9035 return 0;
9036}
9037_ACEOF
9038rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9040 (eval $ac_link) 2>conftest.er1
98418dba 9041 ac_status=$?
35996d22
AS
9042 grep -v '^ *+' conftest.er1 >conftest.err
9043 rm -f conftest.er1
9044 cat conftest.err >&5
c0d27fcc 9045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9046 (exit $ac_status); } &&
c08e6004 9047 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9049 (eval $ac_try) 2>&5
9050 ac_status=$?
9051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9052 (exit $ac_status); }; } &&
9053 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9055 (eval $ac_try) 2>&5
9056 ac_status=$?
c0d27fcc 9057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9058 (exit $ac_status); }; }; then
9059 ac_cv_lib_pthreads_cma_open=yes
9060else
9061 echo "$as_me: failed program was:" >&5
19650fd6
AS
9062sed 's/^/| /' conftest.$ac_ext >&5
9063
98418dba
CW
9064ac_cv_lib_pthreads_cma_open=no
9065fi
35996d22
AS
9066rm -f conftest.err conftest.$ac_objext \
9067 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9068LIBS=$ac_check_lib_save_LIBS
9069fi
c0d27fcc 9070echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
9071echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
9072if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 9073 cat >>confdefs.h <<_ACEOF
98418dba 9074#define HAVE_LIBPTHREADS 1
c0d27fcc 9075_ACEOF
98418dba
CW
9076
9077 LIBS="-lpthreads $LIBS"
9078
9079fi
9080
c0d27fcc
MR
9081
9082echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
9083echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
9084if test -d /usr/X386/include; then
9085 HAVE_XFREE386=yes
9086 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
9087else
9088 HAVE_XFREE386=no
9089fi
c0d27fcc 9090echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
9091echo "${ECHO_T}$HAVE_XFREE386" >&6
9092
55597d70
DL
9093
9094case ${host_os} in
9095aix*)
9096 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
9097echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
9098if test "${gdb_cv_bigtoc+set}" = set; then
9099 echo $ECHO_N "(cached) $ECHO_C" >&6
9100else
9101
9102 case $GCC in
9103 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9104 *) gdb_cv_bigtoc=-bbigtoc ;;
9105 esac
9106
9107 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9108 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9109/* confdefs.h. */
9110_ACEOF
9111cat confdefs.h >>conftest.$ac_ext
9112cat >>conftest.$ac_ext <<_ACEOF
9113/* end confdefs.h. */
55597d70
DL
9114
9115int
9116main ()
9117{
9118int i;
9119 ;
9120 return 0;
9121}
9122_ACEOF
9123rm -f conftest.$ac_objext conftest$ac_exeext
9124if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9125 (eval $ac_link) 2>conftest.er1
55597d70 9126 ac_status=$?
35996d22
AS
9127 grep -v '^ *+' conftest.er1 >conftest.err
9128 rm -f conftest.er1
9129 cat conftest.err >&5
55597d70
DL
9130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9131 (exit $ac_status); } &&
c08e6004 9132 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9134 (eval $ac_try) 2>&5
9135 ac_status=$?
9136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9137 (exit $ac_status); }; } &&
9138 { ac_try='test -s conftest$ac_exeext'
55597d70
DL
9139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9140 (eval $ac_try) 2>&5
9141 ac_status=$?
9142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9143 (exit $ac_status); }; }; then
9144 :
9145else
9146 echo "$as_me: failed program was:" >&5
19650fd6
AS
9147sed 's/^/| /' conftest.$ac_ext >&5
9148
55597d70
DL
9149gdb_cv_bigtoc=
9150fi
35996d22
AS
9151rm -f conftest.err conftest.$ac_objext \
9152 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
9153
9154fi
9155echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
9156echo "${ECHO_T}$gdb_cv_bigtoc" >&6
9157 ;;
9158esac
9159
ae1a998c
RS
9160# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
9161# used for the tests that follow. We set them back to REAL_CFLAGS and
9162# REAL_CPPFLAGS later on.
98418dba
CW
9163
9164REAL_CPPFLAGS="$CPPFLAGS"
9165
9166if test "${HAVE_X11}" = "yes"; then
9167 DEFS="$C_SWITCH_X_SITE $DEFS"
9168 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
9169 LIBS="$LIBX $LIBS"
9170 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
9171 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
9172
9173 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
9174 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
9175 # but it's more convenient here to set LD_RUN_PATH
9176 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
9177 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
9178 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
9179 export LD_RUN_PATH
9180 fi
9181
9182 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 9183 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
9184echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
9185 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9186/* confdefs.h. */
9187_ACEOF
9188cat confdefs.h >>conftest.$ac_ext
9189cat >>conftest.$ac_ext <<_ACEOF
9190/* end confdefs.h. */
98418dba 9191
98418dba
CW
9192int
9193main ()
9194{
9195XOpenDisplay ("foo");
9196 ;
9197 return 0;
9198}
9199_ACEOF
9200rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9201if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9202 (eval $ac_link) 2>conftest.er1
98418dba 9203 ac_status=$?
35996d22
AS
9204 grep -v '^ *+' conftest.er1 >conftest.err
9205 rm -f conftest.er1
9206 cat conftest.err >&5
c0d27fcc 9207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9208 (exit $ac_status); } &&
c08e6004 9209 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
c0d27fcc 9210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9211 (eval $ac_try) 2>&5
9212 ac_status=$?
c0d27fcc 9213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
9214 (exit $ac_status); }; } &&
9215 { ac_try='test -s conftest$ac_exeext'
9216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9217 (eval $ac_try) 2>&5
9218 ac_status=$?
9219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9220 (exit $ac_status); }; }; then
9221 xlinux_first_failure=no
98418dba
CW
9222else
9223 echo "$as_me: failed program was:" >&5
19650fd6
AS
9224sed 's/^/| /' conftest.$ac_ext >&5
9225
98418dba
CW
9226xlinux_first_failure=yes
9227fi
35996d22
AS
9228rm -f conftest.err conftest.$ac_objext \
9229 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9230 if test "${xlinux_first_failure}" = "yes"; then
9231 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
9232 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
9233 OLD_CPPFLAGS="$CPPFLAGS"
9234 OLD_LIBS="$LIBS"
9235 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
9236 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
9237 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
9238 LIBS="$LIBS -b i486-linuxaout"
9239 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9240/* confdefs.h. */
9241_ACEOF
9242cat confdefs.h >>conftest.$ac_ext
9243cat >>conftest.$ac_ext <<_ACEOF
9244/* end confdefs.h. */
98418dba 9245
98418dba
CW
9246int
9247main ()
9248{
9249XOpenDisplay ("foo");
9250 ;
9251 return 0;
9252}
9253_ACEOF
9254rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9255if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9256 (eval $ac_link) 2>conftest.er1
98418dba 9257 ac_status=$?
35996d22
AS
9258 grep -v '^ *+' conftest.er1 >conftest.err
9259 rm -f conftest.er1
9260 cat conftest.err >&5
c0d27fcc 9261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9262 (exit $ac_status); } &&
c08e6004 9263 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9265 (eval $ac_try) 2>&5
9266 ac_status=$?
9267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9268 (exit $ac_status); }; } &&
9269 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9271 (eval $ac_try) 2>&5
9272 ac_status=$?
c0d27fcc 9273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9274 (exit $ac_status); }; }; then
9275 xlinux_second_failure=no
9276else
9277 echo "$as_me: failed program was:" >&5
19650fd6
AS
9278sed 's/^/| /' conftest.$ac_ext >&5
9279
98418dba
CW
9280xlinux_second_failure=yes
9281fi
35996d22
AS
9282rm -f conftest.err conftest.$ac_objext \
9283 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9284 if test "${xlinux_second_failure}" = "yes"; then
9285 # If we get the same failure with -b, there is no use adding -b.
9286 # So take it out. This plays safe.
9287 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
9288 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
9289 CPPFLAGS="$OLD_CPPFLAGS"
9290 LIBS="$OLD_LIBS"
c0d27fcc 9291 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9292echo "${ECHO_T}no" >&6
9293 else
c0d27fcc 9294 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
9295echo "${ECHO_T}yes" >&6
9296 fi
9297 else
c0d27fcc 9298 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9299echo "${ECHO_T}no" >&6
9300 fi
9301 fi
9302
9303 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
9304 # header files included from there.
c0d27fcc 9305 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
9306echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
9307 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9308/* confdefs.h. */
9309_ACEOF
9310cat confdefs.h >>conftest.$ac_ext
9311cat >>conftest.$ac_ext <<_ACEOF
9312/* end confdefs.h. */
98418dba
CW
9313#include <X11/Xlib.h>
9314#include <X11/XKBlib.h>
98418dba
CW
9315int
9316main ()
9317{
9318XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
9319 ;
9320 return 0;
9321}
9322_ACEOF
9323rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9324if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9325 (eval $ac_link) 2>conftest.er1
98418dba 9326 ac_status=$?
35996d22
AS
9327 grep -v '^ *+' conftest.er1 >conftest.err
9328 rm -f conftest.er1
9329 cat conftest.err >&5
c0d27fcc 9330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9331 (exit $ac_status); } &&
c08e6004 9332 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9334 (eval $ac_try) 2>&5
9335 ac_status=$?
9336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9337 (exit $ac_status); }; } &&
9338 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9340 (eval $ac_try) 2>&5
9341 ac_status=$?
c0d27fcc 9342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9343 (exit $ac_status); }; }; then
9344 emacs_xkb=yes
9345else
9346 echo "$as_me: failed program was:" >&5
19650fd6
AS
9347sed 's/^/| /' conftest.$ac_ext >&5
9348
98418dba
CW
9349emacs_xkb=no
9350fi
35996d22
AS
9351rm -f conftest.err conftest.$ac_objext \
9352 conftest$ac_exeext conftest.$ac_ext
c0d27fcc 9353 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
9354echo "${ECHO_T}$emacs_xkb" >&6
9355 if test $emacs_xkb = yes; then
b936fae4 9356
c0d27fcc 9357cat >>confdefs.h <<\_ACEOF
98418dba 9358#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 9359_ACEOF
98418dba
CW
9360
9361 fi
9362
c0d27fcc
MR
9363
9364
9365
9366
98418dba
CW
9367for ac_func in XrmSetDatabase XScreenResourceString \
9368XScreenNumberOfScreen XSetWMProtocols
9369do
9370as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 9371echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
9372echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9373if eval "test \"\${$as_ac_var+set}\" = set"; then
9374 echo $ECHO_N "(cached) $ECHO_C" >&6
9375else
9376 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9377/* confdefs.h. */
9378_ACEOF
9379cat confdefs.h >>conftest.$ac_ext
9380cat >>conftest.$ac_ext <<_ACEOF
9381/* end confdefs.h. */
35996d22
AS
9382/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9383 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9384#define $ac_func innocuous_$ac_func
9385
98418dba 9386/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9387 which can conflict with char $ac_func (); below.
9388 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9389 <limits.h> exists even on freestanding compilers. */
35996d22 9390
19650fd6
AS
9391#ifdef __STDC__
9392# include <limits.h>
9393#else
9394# include <assert.h>
9395#endif
35996d22
AS
9396
9397#undef $ac_func
9398
98418dba
CW
9399/* Override any gcc2 internal prototype to avoid an error. */
9400#ifdef __cplusplus
9401extern "C"
19650fd6 9402{
98418dba
CW
9403#endif
9404/* We use char because int might match the return type of a gcc2
9405 builtin and then its argument prototype would still apply. */
9406char $ac_func ();
98418dba
CW
9407/* The GNU C library defines this for functions which it implements
9408 to always fail with ENOSYS. Some functions are actually named
9409 something starting with __ and the normal name is an alias. */
9410#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9411choke me
9412#else
19650fd6
AS
9413char (*f) () = $ac_func;
9414#endif
9415#ifdef __cplusplus
9416}
98418dba
CW
9417#endif
9418
19650fd6
AS
9419int
9420main ()
9421{
9422return f != $ac_func;
98418dba
CW
9423 ;
9424 return 0;
9425}
9426_ACEOF
9427rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9428if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9429 (eval $ac_link) 2>conftest.er1
98418dba 9430 ac_status=$?
35996d22
AS
9431 grep -v '^ *+' conftest.er1 >conftest.err
9432 rm -f conftest.er1
9433 cat conftest.err >&5
c0d27fcc 9434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9435 (exit $ac_status); } &&
c08e6004 9436 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9438 (eval $ac_try) 2>&5
9439 ac_status=$?
9440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9441 (exit $ac_status); }; } &&
9442 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9444 (eval $ac_try) 2>&5
9445 ac_status=$?
c0d27fcc 9446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9447 (exit $ac_status); }; }; then
9448 eval "$as_ac_var=yes"
9449else
9450 echo "$as_me: failed program was:" >&5
19650fd6
AS
9451sed 's/^/| /' conftest.$ac_ext >&5
9452
98418dba
CW
9453eval "$as_ac_var=no"
9454fi
35996d22
AS
9455rm -f conftest.err conftest.$ac_objext \
9456 conftest$ac_exeext conftest.$ac_ext
98418dba 9457fi
c0d27fcc 9458echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
9459echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9460if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9461 cat >>confdefs.h <<_ACEOF
98418dba 9462#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9463_ACEOF
98418dba
CW
9464
9465fi
9466done
9467
9468fi
9469
9470if test "${window_system}" = "x11"; then
c0d27fcc 9471 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
9472echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
9473 if test "${emacs_cv_x11_version_6+set}" = set; then
9474 echo $ECHO_N "(cached) $ECHO_C" >&6
9475else
9476 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9477/* confdefs.h. */
9478_ACEOF
9479cat confdefs.h >>conftest.$ac_ext
9480cat >>conftest.$ac_ext <<_ACEOF
9481/* end confdefs.h. */
98418dba 9482#include <X11/Xlib.h>
98418dba
CW
9483int
9484main ()
9485{
9486#if XlibSpecificationRelease < 6
9487fail;
9488#endif
9489
9490 ;
9491 return 0;
9492}
9493_ACEOF
9494rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9495if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9496 (eval $ac_link) 2>conftest.er1
98418dba 9497 ac_status=$?
35996d22
AS
9498 grep -v '^ *+' conftest.er1 >conftest.err
9499 rm -f conftest.er1
9500 cat conftest.err >&5
c0d27fcc 9501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9502 (exit $ac_status); } &&
c08e6004 9503 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9505 (eval $ac_try) 2>&5
9506 ac_status=$?
9507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9508 (exit $ac_status); }; } &&
9509 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9511 (eval $ac_try) 2>&5
9512 ac_status=$?
c0d27fcc 9513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9514 (exit $ac_status); }; }; then
9515 emacs_cv_x11_version_6=yes
9516else
9517 echo "$as_me: failed program was:" >&5
19650fd6
AS
9518sed 's/^/| /' conftest.$ac_ext >&5
9519
98418dba
CW
9520emacs_cv_x11_version_6=no
9521fi
35996d22
AS
9522rm -f conftest.err conftest.$ac_objext \
9523 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9524fi
9525
9526 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 9527 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 9528echo "${ECHO_T}6 or newer" >&6
b936fae4 9529
c0d27fcc 9530cat >>confdefs.h <<\_ACEOF
98418dba 9531#define HAVE_X11R6 1
c0d27fcc 9532_ACEOF
98418dba
CW
9533
9534 else
c0d27fcc 9535 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
9536echo "${ECHO_T}before 6" >&6
9537 fi
9538fi
9539
9540if test "${window_system}" = "x11"; then
c0d27fcc 9541 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
9542echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
9543 if test "${emacs_cv_x11_version_5+set}" = set; then
9544 echo $ECHO_N "(cached) $ECHO_C" >&6
9545else
9546 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9547/* confdefs.h. */
9548_ACEOF
9549cat confdefs.h >>conftest.$ac_ext
9550cat >>conftest.$ac_ext <<_ACEOF
9551/* end confdefs.h. */
98418dba 9552#include <X11/Xlib.h>
98418dba
CW
9553int
9554main ()
9555{
9556#if XlibSpecificationRelease < 5
9557fail;
9558#endif
9559
9560 ;
9561 return 0;
9562}
9563_ACEOF
9564rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9565if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9566 (eval $ac_link) 2>conftest.er1
98418dba 9567 ac_status=$?
35996d22
AS
9568 grep -v '^ *+' conftest.er1 >conftest.err
9569 rm -f conftest.er1
9570 cat conftest.err >&5
c0d27fcc 9571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9572 (exit $ac_status); } &&
c08e6004 9573 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9575 (eval $ac_try) 2>&5
9576 ac_status=$?
9577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9578 (exit $ac_status); }; } &&
9579 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9581 (eval $ac_try) 2>&5
9582 ac_status=$?
c0d27fcc 9583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9584 (exit $ac_status); }; }; then
9585 emacs_cv_x11_version_5=yes
9586else
9587 echo "$as_me: failed program was:" >&5
19650fd6
AS
9588sed 's/^/| /' conftest.$ac_ext >&5
9589
98418dba
CW
9590emacs_cv_x11_version_5=no
9591fi
35996d22
AS
9592rm -f conftest.err conftest.$ac_objext \
9593 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9594fi
9595
9596 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 9597 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
9598echo "${ECHO_T}5 or newer" >&6
9599 HAVE_X11R5=yes
b936fae4 9600
c0d27fcc 9601cat >>confdefs.h <<\_ACEOF
98418dba 9602#define HAVE_X11R5 1
c0d27fcc 9603_ACEOF
98418dba
CW
9604
9605 else
9606 HAVE_X11R5=no
c0d27fcc 9607 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
9608echo "${ECHO_T}before 5" >&6
9609 fi
9610fi
9611
488dd4c4
JD
9612
9613
9614HAVE_GTK=no
9615if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 9616 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
9617 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
9618echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
9619 { (exit 1); exit 1; }; };
9620 fi
9621 GLIB_REQUIRED=2.0.1
e512ece1 9622 GTK_REQUIRED=2.0.1
488dd4c4
JD
9623 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
9624
9625 if test "X${with_pkg_config_prog}" != X; then
9626 PKG_CONFIG="${with_pkg_config_prog}"
9627 fi
9628
9629 succeeded=no
9630
9631 if test -z "$PKG_CONFIG"; then
9632 # Extract the first word of "pkg-config", so it can be a program name with args.
9633set dummy pkg-config; ac_word=$2
9634echo "$as_me:$LINENO: checking for $ac_word" >&5
9635echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9636if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9637 echo $ECHO_N "(cached) $ECHO_C" >&6
9638else
9639 case $PKG_CONFIG in
9640 [\\/]* | ?:[\\/]*)
9641 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9642 ;;
9643 *)
9644 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9645for as_dir in $PATH
9646do
9647 IFS=$as_save_IFS
9648 test -z "$as_dir" && as_dir=.
9649 for ac_exec_ext in '' $ac_executable_extensions; do
9650 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9651 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9652 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9653 break 2
9654 fi
9655done
9656done
9657
9658 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9659 ;;
9660esac
9661fi
9662PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9663
9664if test -n "$PKG_CONFIG"; then
9665 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
9666echo "${ECHO_T}$PKG_CONFIG" >&6
9667else
9668 echo "$as_me:$LINENO: result: no" >&5
9669echo "${ECHO_T}no" >&6
9670fi
9671
9672 fi
9673
9674 if test "$PKG_CONFIG" = "no" ; then
9675 echo "*** The pkg-config script could not be found. Make sure it is"
9676 echo "*** in your path, or give the full path to pkg-config with"
9677 echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog."
9678 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
9679 else
9680 PKG_CONFIG_MIN_VERSION=0.9.0
9681 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9682 echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
9683echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6
9684
9685 if $PKG_CONFIG --exists "$GTK_MODULES" ; then
9686 echo "$as_me:$LINENO: result: yes" >&5
9687echo "${ECHO_T}yes" >&6
9688 succeeded=yes
9689
9690 echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
9691echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
9692 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
9693 echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
9694echo "${ECHO_T}$GTK_CFLAGS" >&6
9695
9696 echo "$as_me:$LINENO: checking GTK_LIBS" >&5
9697echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
9698 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
9699 echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
9700echo "${ECHO_T}$GTK_LIBS" >&6
9701 else
9702 GTK_CFLAGS=""
9703 GTK_LIBS=""
9704 ## If we have a custom action on failure, don't print errors, but
9705 ## do set a variable so people can do so.
9706 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
9707 echo $GTK_PKG_ERRORS
9708 fi
9709
9710
9711
9712 else
9713 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9714 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9715 fi
9716 fi
9717
9718 if test $succeeded = yes; then
9719 :
9720 else
9721 { { 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
9722echo "$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;}
9723 { (exit 1); exit 1; }; }
9724 fi
9725
9726
9727
9728 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
9729 CFLAGS="$CFLAGS $GTK_CFLAGS"
9730 LIBS="$GTK_LIBS $LIBS"
488dd4c4
JD
9731 HAVE_GTK=yes
9732
9733cat >>confdefs.h <<\_ACEOF
9734#define HAVE_GTK 1
9735_ACEOF
9736
9737 USE_X_TOOLKIT=none
9738
d0a80c21
JD
9739 if test "$with_toolkit_scroll_bars" != no; then
9740 with_toolkit_scroll_bars=yes
9741 fi
57669b57
JD
9742
9743 HAVE_GTK_MULTIDISPLAY=no
9744
9745for ac_func in gdk_display_open
9746do
9747as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9748echo "$as_me:$LINENO: checking for $ac_func" >&5
9749echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9750if eval "test \"\${$as_ac_var+set}\" = set"; then
9751 echo $ECHO_N "(cached) $ECHO_C" >&6
9752else
9753 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
9754/* confdefs.h. */
9755_ACEOF
9756cat confdefs.h >>conftest.$ac_ext
9757cat >>conftest.$ac_ext <<_ACEOF
9758/* end confdefs.h. */
35996d22
AS
9759/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9760 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9761#define $ac_func innocuous_$ac_func
9762
57669b57
JD
9763/* System header to define __stub macros and hopefully few prototypes,
9764 which can conflict with char $ac_func (); below.
9765 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9766 <limits.h> exists even on freestanding compilers. */
35996d22 9767
57669b57
JD
9768#ifdef __STDC__
9769# include <limits.h>
9770#else
9771# include <assert.h>
9772#endif
35996d22
AS
9773
9774#undef $ac_func
9775
57669b57
JD
9776/* Override any gcc2 internal prototype to avoid an error. */
9777#ifdef __cplusplus
9778extern "C"
9779{
9780#endif
9781/* We use char because int might match the return type of a gcc2
9782 builtin and then its argument prototype would still apply. */
9783char $ac_func ();
9784/* The GNU C library defines this for functions which it implements
9785 to always fail with ENOSYS. Some functions are actually named
9786 something starting with __ and the normal name is an alias. */
9787#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9788choke me
9789#else
9790char (*f) () = $ac_func;
9791#endif
9792#ifdef __cplusplus
9793}
9794#endif
9795
9796int
9797main ()
9798{
9799return f != $ac_func;
9800 ;
9801 return 0;
9802}
9803_ACEOF
9804rm -f conftest.$ac_objext conftest$ac_exeext
9805if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9806 (eval $ac_link) 2>conftest.er1
57669b57 9807 ac_status=$?
35996d22
AS
9808 grep -v '^ *+' conftest.er1 >conftest.err
9809 rm -f conftest.er1
9810 cat conftest.err >&5
57669b57
JD
9811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9812 (exit $ac_status); } &&
c08e6004 9813 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
9814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9815 (eval $ac_try) 2>&5
9816 ac_status=$?
9817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9818 (exit $ac_status); }; } &&
9819 { ac_try='test -s conftest$ac_exeext'
57669b57
JD
9820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9821 (eval $ac_try) 2>&5
9822 ac_status=$?
9823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9824 (exit $ac_status); }; }; then
9825 eval "$as_ac_var=yes"
9826else
9827 echo "$as_me: failed program was:" >&5
9828sed 's/^/| /' conftest.$ac_ext >&5
9829
9830eval "$as_ac_var=no"
9831fi
35996d22
AS
9832rm -f conftest.err conftest.$ac_objext \
9833 conftest$ac_exeext conftest.$ac_ext
57669b57
JD
9834fi
9835echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9836echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9837if test `eval echo '${'$as_ac_var'}'` = yes; then
9838 cat >>confdefs.h <<_ACEOF
9839#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9840_ACEOF
9841 HAVE_GTK_MULTIDISPLAY=yes
9842fi
9843done
9844
9845 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
9846
9847cat >>confdefs.h <<\_ACEOF
9848#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
9849_ACEOF
9850
9851 fi
9852 HAVE_GTK_FILE_SELECTION=no
9853
9854for ac_func in gtk_file_selection_new
9855do
9856as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9857echo "$as_me:$LINENO: checking for $ac_func" >&5
9858echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9859if eval "test \"\${$as_ac_var+set}\" = set"; then
9860 echo $ECHO_N "(cached) $ECHO_C" >&6
9861else
9862 cat >conftest.$ac_ext <<_ACEOF
9863/* confdefs.h. */
9864_ACEOF
9865cat confdefs.h >>conftest.$ac_ext
9866cat >>conftest.$ac_ext <<_ACEOF
9867/* end confdefs.h. */
9868/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9869 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9870#define $ac_func innocuous_$ac_func
9871
9872/* System header to define __stub macros and hopefully few prototypes,
9873 which can conflict with char $ac_func (); below.
9874 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9875 <limits.h> exists even on freestanding compilers. */
9876
9877#ifdef __STDC__
9878# include <limits.h>
9879#else
9880# include <assert.h>
9881#endif
9882
9883#undef $ac_func
9884
9885/* Override any gcc2 internal prototype to avoid an error. */
9886#ifdef __cplusplus
9887extern "C"
9888{
9889#endif
9890/* We use char because int might match the return type of a gcc2
9891 builtin and then its argument prototype would still apply. */
9892char $ac_func ();
9893/* The GNU C library defines this for functions which it implements
9894 to always fail with ENOSYS. Some functions are actually named
9895 something starting with __ and the normal name is an alias. */
9896#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9897choke me
9898#else
9899char (*f) () = $ac_func;
9900#endif
9901#ifdef __cplusplus
9902}
9903#endif
9904
9905int
9906main ()
9907{
9908return f != $ac_func;
9909 ;
9910 return 0;
9911}
9912_ACEOF
9913rm -f conftest.$ac_objext conftest$ac_exeext
9914if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9915 (eval $ac_link) 2>conftest.er1
9916 ac_status=$?
9917 grep -v '^ *+' conftest.er1 >conftest.err
9918 rm -f conftest.er1
9919 cat conftest.err >&5
9920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9921 (exit $ac_status); } &&
9922 { ac_try='test -z "$ac_c_werror_flag"
9923 || test ! -s conftest.err'
9924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9925 (eval $ac_try) 2>&5
9926 ac_status=$?
9927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9928 (exit $ac_status); }; } &&
9929 { ac_try='test -s conftest$ac_exeext'
9930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9931 (eval $ac_try) 2>&5
9932 ac_status=$?
9933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9934 (exit $ac_status); }; }; then
9935 eval "$as_ac_var=yes"
9936else
9937 echo "$as_me: failed program was:" >&5
9938sed 's/^/| /' conftest.$ac_ext >&5
9939
9940eval "$as_ac_var=no"
9941fi
9942rm -f conftest.err conftest.$ac_objext \
9943 conftest$ac_exeext conftest.$ac_ext
9944fi
9945echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9946echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9947if test `eval echo '${'$as_ac_var'}'` = yes; then
9948 cat >>confdefs.h <<_ACEOF
9949#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9950_ACEOF
9951 HAVE_GTK_FILE_SELECTION=yes
9952fi
9953done
9954
9955
9956 HAVE_GTK_FILE_CHOOSER=no
9957
9958for ac_func in gtk_file_chooser_dialog_new
9959do
9960as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9961echo "$as_me:$LINENO: checking for $ac_func" >&5
9962echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9963if eval "test \"\${$as_ac_var+set}\" = set"; then
9964 echo $ECHO_N "(cached) $ECHO_C" >&6
9965else
9966 cat >conftest.$ac_ext <<_ACEOF
9967/* confdefs.h. */
9968_ACEOF
9969cat confdefs.h >>conftest.$ac_ext
9970cat >>conftest.$ac_ext <<_ACEOF
9971/* end confdefs.h. */
9972/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9973 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9974#define $ac_func innocuous_$ac_func
9975
9976/* System header to define __stub macros and hopefully few prototypes,
9977 which can conflict with char $ac_func (); below.
9978 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9979 <limits.h> exists even on freestanding compilers. */
9980
9981#ifdef __STDC__
9982# include <limits.h>
9983#else
9984# include <assert.h>
9985#endif
9986
9987#undef $ac_func
9988
9989/* Override any gcc2 internal prototype to avoid an error. */
9990#ifdef __cplusplus
9991extern "C"
9992{
9993#endif
9994/* We use char because int might match the return type of a gcc2
9995 builtin and then its argument prototype would still apply. */
9996char $ac_func ();
9997/* The GNU C library defines this for functions which it implements
9998 to always fail with ENOSYS. Some functions are actually named
9999 something starting with __ and the normal name is an alias. */
10000#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10001choke me
10002#else
10003char (*f) () = $ac_func;
10004#endif
10005#ifdef __cplusplus
10006}
10007#endif
10008
10009int
10010main ()
10011{
10012return f != $ac_func;
10013 ;
10014 return 0;
10015}
10016_ACEOF
10017rm -f conftest.$ac_objext conftest$ac_exeext
10018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10019 (eval $ac_link) 2>conftest.er1
10020 ac_status=$?
10021 grep -v '^ *+' conftest.er1 >conftest.err
10022 rm -f conftest.er1
10023 cat conftest.err >&5
10024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10025 (exit $ac_status); } &&
10026 { ac_try='test -z "$ac_c_werror_flag"
10027 || test ! -s conftest.err'
10028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10029 (eval $ac_try) 2>&5
10030 ac_status=$?
10031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10032 (exit $ac_status); }; } &&
10033 { ac_try='test -s conftest$ac_exeext'
10034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10035 (eval $ac_try) 2>&5
10036 ac_status=$?
10037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10038 (exit $ac_status); }; }; then
10039 eval "$as_ac_var=yes"
10040else
10041 echo "$as_me: failed program was:" >&5
10042sed 's/^/| /' conftest.$ac_ext >&5
10043
10044eval "$as_ac_var=no"
10045fi
10046rm -f conftest.err conftest.$ac_objext \
10047 conftest$ac_exeext conftest.$ac_ext
10048fi
10049echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10050echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10051if test `eval echo '${'$as_ac_var'}'` = yes; then
10052 cat >>confdefs.h <<_ACEOF
10053#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10054_ACEOF
10055 HAVE_GTK_FILE_CHOOSER=yes
10056fi
10057done
10058
10059
10060 if test "$HAVE_GTK_FILE_SELECTION" = yes \
10061 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10062
10063cat >>confdefs.h <<\_ACEOF
10064#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
10065_ACEOF
10066
b8bdffbe
JD
10067 fi
10068
10069 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10070 HAVE_GTK_AND_PTHREAD=no
10071
10072for ac_header in pthread.h
10073do
10074as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10075if eval "test \"\${$as_ac_Header+set}\" = set"; then
10076 echo "$as_me:$LINENO: checking for $ac_header" >&5
10077echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10078if eval "test \"\${$as_ac_Header+set}\" = set"; then
10079 echo $ECHO_N "(cached) $ECHO_C" >&6
10080fi
10081echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10082echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10083else
10084 # Is the header compilable?
10085echo "$as_me:$LINENO: checking $ac_header usability" >&5
10086echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10087cat >conftest.$ac_ext <<_ACEOF
10088/* confdefs.h. */
10089_ACEOF
10090cat confdefs.h >>conftest.$ac_ext
10091cat >>conftest.$ac_ext <<_ACEOF
10092/* end confdefs.h. */
10093$ac_includes_default
10094#include <$ac_header>
10095_ACEOF
10096rm -f conftest.$ac_objext
10097if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10098 (eval $ac_compile) 2>conftest.er1
10099 ac_status=$?
10100 grep -v '^ *+' conftest.er1 >conftest.err
10101 rm -f conftest.er1
10102 cat conftest.err >&5
10103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10104 (exit $ac_status); } &&
10105 { ac_try='test -z "$ac_c_werror_flag"
10106 || test ! -s conftest.err'
10107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10108 (eval $ac_try) 2>&5
10109 ac_status=$?
10110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10111 (exit $ac_status); }; } &&
10112 { ac_try='test -s conftest.$ac_objext'
10113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10114 (eval $ac_try) 2>&5
10115 ac_status=$?
10116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10117 (exit $ac_status); }; }; then
10118 ac_header_compiler=yes
10119else
10120 echo "$as_me: failed program was:" >&5
10121sed 's/^/| /' conftest.$ac_ext >&5
10122
10123ac_header_compiler=no
10124fi
10125rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10126echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10127echo "${ECHO_T}$ac_header_compiler" >&6
10128
10129# Is the header present?
10130echo "$as_me:$LINENO: checking $ac_header presence" >&5
10131echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10132cat >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#include <$ac_header>
10139_ACEOF
10140if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10141 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10142 ac_status=$?
10143 grep -v '^ *+' conftest.er1 >conftest.err
10144 rm -f conftest.er1
10145 cat conftest.err >&5
10146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10147 (exit $ac_status); } >/dev/null; then
10148 if test -s conftest.err; then
10149 ac_cpp_err=$ac_c_preproc_warn_flag
10150 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10151 else
10152 ac_cpp_err=
10153 fi
10154else
10155 ac_cpp_err=yes
10156fi
10157if test -z "$ac_cpp_err"; then
10158 ac_header_preproc=yes
10159else
10160 echo "$as_me: failed program was:" >&5
10161sed 's/^/| /' conftest.$ac_ext >&5
10162
10163 ac_header_preproc=no
10164fi
10165rm -f conftest.err conftest.$ac_ext
10166echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10167echo "${ECHO_T}$ac_header_preproc" >&6
10168
10169# So? What about this header?
10170case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10171 yes:no: )
10172 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10173echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10174 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10175echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10176 ac_header_preproc=yes
10177 ;;
10178 no:yes:* )
10179 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10180echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10181 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10182echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10183 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10184echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10185 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10186echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
10187 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10188echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10189 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10190echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10191 (
10192 cat <<\_ASBOX
10193## ------------------------------------------ ##
10194## Report this to the AC_PACKAGE_NAME lists. ##
10195## ------------------------------------------ ##
10196_ASBOX
10197 ) |
10198 sed "s/^/$as_me: WARNING: /" >&2
10199 ;;
10200esac
10201echo "$as_me:$LINENO: checking for $ac_header" >&5
10202echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10203if eval "test \"\${$as_ac_Header+set}\" = set"; then
10204 echo $ECHO_N "(cached) $ECHO_C" >&6
10205else
10206 eval "$as_ac_Header=\$ac_header_preproc"
10207fi
10208echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10209echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10210
10211fi
10212if test `eval echo '${'$as_ac_Header'}'` = yes; then
10213 cat >>confdefs.h <<_ACEOF
10214#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10215_ACEOF
10216
10217fi
10218
10219done
10220
10221 if test "$ac_cv_header_pthread_h"; then
10222 echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
10223echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6
10224if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
10225 echo $ECHO_N "(cached) $ECHO_C" >&6
10226else
10227 ac_check_lib_save_LIBS=$LIBS
10228LIBS="-lpthread $LIBS"
10229cat >conftest.$ac_ext <<_ACEOF
10230/* confdefs.h. */
10231_ACEOF
10232cat confdefs.h >>conftest.$ac_ext
10233cat >>conftest.$ac_ext <<_ACEOF
10234/* end confdefs.h. */
10235
10236/* Override any gcc2 internal prototype to avoid an error. */
10237#ifdef __cplusplus
10238extern "C"
10239#endif
10240/* We use char because int might match the return type of a gcc2
10241 builtin and then its argument prototype would still apply. */
10242char pthread_self ();
10243int
10244main ()
10245{
10246pthread_self ();
10247 ;
10248 return 0;
10249}
10250_ACEOF
10251rm -f conftest.$ac_objext conftest$ac_exeext
10252if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10253 (eval $ac_link) 2>conftest.er1
10254 ac_status=$?
10255 grep -v '^ *+' conftest.er1 >conftest.err
10256 rm -f conftest.er1
10257 cat conftest.err >&5
10258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10259 (exit $ac_status); } &&
10260 { ac_try='test -z "$ac_c_werror_flag"
10261 || test ! -s conftest.err'
10262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10263 (eval $ac_try) 2>&5
10264 ac_status=$?
10265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10266 (exit $ac_status); }; } &&
10267 { ac_try='test -s conftest$ac_exeext'
10268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10269 (eval $ac_try) 2>&5
10270 ac_status=$?
10271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10272 (exit $ac_status); }; }; then
10273 ac_cv_lib_pthread_pthread_self=yes
10274else
10275 echo "$as_me: failed program was:" >&5
10276sed 's/^/| /' conftest.$ac_ext >&5
10277
10278ac_cv_lib_pthread_pthread_self=no
10279fi
10280rm -f conftest.err conftest.$ac_objext \
10281 conftest$ac_exeext conftest.$ac_ext
10282LIBS=$ac_check_lib_save_LIBS
10283fi
10284echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
10285echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6
10286if test $ac_cv_lib_pthread_pthread_self = yes; then
10287 HAVE_GTK_AND_PTHREAD=yes
10288fi
10289
10290 fi
10291 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
10292 GTK_LIBS="$GTK_LIBS -lpthread"
10293
10294cat >>confdefs.h <<\_ACEOF
10295#define HAVE_GTK_AND_PTHREAD 1
10296_ACEOF
10297
10298 fi
57669b57 10299 fi
488dd4c4
JD
10300fi
10301
98418dba
CW
10302if test x"${USE_X_TOOLKIT}" = xmaybe; then
10303 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 10304 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
10305echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
10306 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
10307 echo $ECHO_N "(cached) $ECHO_C" >&6
10308else
10309 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10310/* confdefs.h. */
10311_ACEOF
10312cat confdefs.h >>conftest.$ac_ext
10313cat >>conftest.$ac_ext <<_ACEOF
10314/* end confdefs.h. */
98418dba
CW
10315
10316#include <X11/Intrinsic.h>
10317#include <X11/Xaw/Simple.h>
98418dba
CW
10318int
10319main ()
10320{
10321
10322 ;
10323 return 0;
10324}
10325_ACEOF
10326rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10328 (eval $ac_link) 2>conftest.er1
98418dba 10329 ac_status=$?
35996d22
AS
10330 grep -v '^ *+' conftest.er1 >conftest.err
10331 rm -f conftest.er1
10332 cat conftest.err >&5
c0d27fcc 10333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10334 (exit $ac_status); } &&
c08e6004 10335 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
10336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10337 (eval $ac_try) 2>&5
10338 ac_status=$?
10339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10340 (exit $ac_status); }; } &&
10341 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10343 (eval $ac_try) 2>&5
10344 ac_status=$?
c0d27fcc 10345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10346 (exit $ac_status); }; }; then
10347 emacs_cv_x11_version_5_with_xaw=yes
10348else
10349 echo "$as_me: failed program was:" >&5
19650fd6
AS
10350sed 's/^/| /' conftest.$ac_ext >&5
10351
98418dba
CW
10352emacs_cv_x11_version_5_with_xaw=no
10353fi
35996d22
AS
10354rm -f conftest.err conftest.$ac_objext \
10355 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10356fi
10357
10358 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 10359 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
10360echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
10361 USE_X_TOOLKIT=LUCID
10362 else
c0d27fcc 10363 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
10364echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
10365 USE_X_TOOLKIT=none
10366 fi
10367 else
10368 USE_X_TOOLKIT=none
10369 fi
10370fi
10371
10372X_TOOLKIT_TYPE=$USE_X_TOOLKIT
10373
10374if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 10375 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
10376echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
10377 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
10378 echo $ECHO_N "(cached) $ECHO_C" >&6
10379else
10380 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10381/* confdefs.h. */
10382_ACEOF
10383cat confdefs.h >>conftest.$ac_ext
10384cat >>conftest.$ac_ext <<_ACEOF
10385/* end confdefs.h. */
98418dba 10386#include <X11/Intrinsic.h>
98418dba
CW
10387int
10388main ()
10389{
10390#if XtSpecificationRelease < 6
10391fail;
10392#endif
10393
10394 ;
10395 return 0;
10396}
10397_ACEOF
10398rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10400 (eval $ac_link) 2>conftest.er1
98418dba 10401 ac_status=$?
35996d22
AS
10402 grep -v '^ *+' conftest.er1 >conftest.err
10403 rm -f conftest.er1
10404 cat conftest.err >&5
c0d27fcc 10405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10406 (exit $ac_status); } &&
c08e6004 10407 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
10408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10409 (eval $ac_try) 2>&5
10410 ac_status=$?
10411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10412 (exit $ac_status); }; } &&
10413 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10415 (eval $ac_try) 2>&5
10416 ac_status=$?
c0d27fcc 10417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10418 (exit $ac_status); }; }; then
10419 emacs_cv_x11_toolkit_version_6=yes
10420else
10421 echo "$as_me: failed program was:" >&5
19650fd6
AS
10422sed 's/^/| /' conftest.$ac_ext >&5
10423
98418dba
CW
10424emacs_cv_x11_toolkit_version_6=no
10425fi
35996d22
AS
10426rm -f conftest.err conftest.$ac_objext \
10427 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10428fi
10429
10430 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
10431 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 10432 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 10433echo "${ECHO_T}6 or newer" >&6
b936fae4 10434
c0d27fcc 10435cat >>confdefs.h <<\_ACEOF
98418dba 10436#define HAVE_X11XTR6 1
c0d27fcc 10437_ACEOF
98418dba
CW
10438
10439 else
c0d27fcc 10440 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
10441echo "${ECHO_T}before 6" >&6
10442 fi
10443
10444 OLDLIBS="$LIBS"
10445 if test x$HAVE_X11XTR6 = xyes; then
10446 LIBS="-lXt -lSM -lICE $LIBS"
10447 else
10448 LIBS="-lXt $LIBS"
10449 fi
10450
c0d27fcc 10451echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
10452echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
10453if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
10454 echo $ECHO_N "(cached) $ECHO_C" >&6
10455else
10456 ac_check_lib_save_LIBS=$LIBS
10457LIBS="-lXmu $LIBS"
10458cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10459/* confdefs.h. */
10460_ACEOF
10461cat confdefs.h >>conftest.$ac_ext
10462cat >>conftest.$ac_ext <<_ACEOF
10463/* end confdefs.h. */
98418dba
CW
10464
10465/* Override any gcc2 internal prototype to avoid an error. */
10466#ifdef __cplusplus
10467extern "C"
10468#endif
10469/* We use char because int might match the return type of a gcc2
10470 builtin and then its argument prototype would still apply. */
10471char XmuConvertStandardSelection ();
98418dba
CW
10472int
10473main ()
10474{
10475XmuConvertStandardSelection ();
10476 ;
10477 return 0;
10478}
10479_ACEOF
10480rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10481if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10482 (eval $ac_link) 2>conftest.er1
98418dba 10483 ac_status=$?
35996d22
AS
10484 grep -v '^ *+' conftest.er1 >conftest.err
10485 rm -f conftest.er1
10486 cat conftest.err >&5
c0d27fcc 10487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10488 (exit $ac_status); } &&
c08e6004 10489 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
10490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10491 (eval $ac_try) 2>&5
10492 ac_status=$?
10493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10494 (exit $ac_status); }; } &&
10495 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10497 (eval $ac_try) 2>&5
10498 ac_status=$?
c0d27fcc 10499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10500 (exit $ac_status); }; }; then
10501 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
10502else
10503 echo "$as_me: failed program was:" >&5
19650fd6
AS
10504sed 's/^/| /' conftest.$ac_ext >&5
10505
98418dba
CW
10506ac_cv_lib_Xmu_XmuConvertStandardSelection=no
10507fi
35996d22
AS
10508rm -f conftest.err conftest.$ac_objext \
10509 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10510LIBS=$ac_check_lib_save_LIBS
10511fi
c0d27fcc 10512echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
10513echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
10514if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 10515 cat >>confdefs.h <<_ACEOF
98418dba 10516#define HAVE_LIBXMU 1
c0d27fcc 10517_ACEOF
98418dba
CW
10518
10519 LIBS="-lXmu $LIBS"
10520
10521fi
10522
10523 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
10524fi
10525
10526# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
10527if test "${HAVE_X11}" = "yes"; then
10528 if test "${USE_X_TOOLKIT}" != "none"; then
10529
c0d27fcc 10530echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
10531echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
10532if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
10533 echo $ECHO_N "(cached) $ECHO_C" >&6
10534else
10535 ac_check_lib_save_LIBS=$LIBS
10536LIBS="-lXext $LIBS"
10537cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10538/* confdefs.h. */
10539_ACEOF
10540cat confdefs.h >>conftest.$ac_ext
10541cat >>conftest.$ac_ext <<_ACEOF
10542/* end confdefs.h. */
98418dba
CW
10543
10544/* Override any gcc2 internal prototype to avoid an error. */
10545#ifdef __cplusplus
10546extern "C"
10547#endif
10548/* We use char because int might match the return type of a gcc2
10549 builtin and then its argument prototype would still apply. */
10550char XShapeQueryExtension ();
98418dba
CW
10551int
10552main ()
10553{
10554XShapeQueryExtension ();
10555 ;
10556 return 0;
10557}
10558_ACEOF
10559rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10561 (eval $ac_link) 2>conftest.er1
98418dba 10562 ac_status=$?
35996d22
AS
10563 grep -v '^ *+' conftest.er1 >conftest.err
10564 rm -f conftest.er1
10565 cat conftest.err >&5
c0d27fcc 10566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10567 (exit $ac_status); } &&
c08e6004 10568 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
10569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10570 (eval $ac_try) 2>&5
10571 ac_status=$?
10572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10573 (exit $ac_status); }; } &&
10574 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10576 (eval $ac_try) 2>&5
10577 ac_status=$?
c0d27fcc 10578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10579 (exit $ac_status); }; }; then
10580 ac_cv_lib_Xext_XShapeQueryExtension=yes
10581else
10582 echo "$as_me: failed program was:" >&5
19650fd6
AS
10583sed 's/^/| /' conftest.$ac_ext >&5
10584
98418dba
CW
10585ac_cv_lib_Xext_XShapeQueryExtension=no
10586fi
35996d22
AS
10587rm -f conftest.err conftest.$ac_objext \
10588 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10589LIBS=$ac_check_lib_save_LIBS
10590fi
c0d27fcc 10591echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
10592echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
10593if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 10594 cat >>confdefs.h <<_ACEOF
98418dba 10595#define HAVE_LIBXEXT 1
c0d27fcc 10596_ACEOF
98418dba
CW
10597
10598 LIBS="-lXext $LIBS"
10599
10600fi
10601
10602 fi
10603fi
10604
10605if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 10606 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
8e967cf7
MR
10607echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
10608if test "${emacs_cv_lesstif+set}" = set; then
10609 echo $ECHO_N "(cached) $ECHO_C" >&6
10610else
ae1a998c
RS
10611 # We put this in CFLAGS temporarily to precede other -I options
10612 # that might be in CFLAGS temporarily.
10613 # We put this in CPPFLAGS where it precedes the other -I options.
10614 OLD_CPPFLAGS=$CPPFLAGS
10615 OLD_CFLAGS=$CFLAGS
10616 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
10617 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
8e967cf7 10618 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10619/* confdefs.h. */
10620_ACEOF
10621cat confdefs.h >>conftest.$ac_ext
10622cat >>conftest.$ac_ext <<_ACEOF
10623/* end confdefs.h. */
8e967cf7
MR
10624#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
10625int
10626main ()
10627{
10628int x = 5;
10629 ;
10630 return 0;
10631}
10632_ACEOF
10633rm -f conftest.$ac_objext
c0d27fcc 10634if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 10635 (eval $ac_compile) 2>conftest.er1
8e967cf7 10636 ac_status=$?
35996d22
AS
10637 grep -v '^ *+' conftest.er1 >conftest.err
10638 rm -f conftest.er1
10639 cat conftest.err >&5
c0d27fcc 10640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7 10641 (exit $ac_status); } &&
c08e6004 10642 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
10643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10644 (eval $ac_try) 2>&5
10645 ac_status=$?
10646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10647 (exit $ac_status); }; } &&
10648 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 10649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8e967cf7
MR
10650 (eval $ac_try) 2>&5
10651 ac_status=$?
c0d27fcc 10652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7
MR
10653 (exit $ac_status); }; }; then
10654 emacs_cv_lesstif=yes
10655else
10656 echo "$as_me: failed program was:" >&5
19650fd6
AS
10657sed 's/^/| /' conftest.$ac_ext >&5
10658
8e967cf7
MR
10659emacs_cv_lesstif=no
10660fi
35996d22 10661rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8e967cf7 10662fi
c0d27fcc 10663echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
8e967cf7
MR
10664echo "${ECHO_T}$emacs_cv_lesstif" >&6
10665 if test $emacs_cv_lesstif = yes; then
ae1a998c
RS
10666 # Make sure this -I option remains in CPPFLAGS after it is set
10667 # back to REAL_CPPFLAGS.
10668 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
10669 # have those other -I options anyway. Ultimately, having this
10670 # directory ultimately in CPPFLAGS will be enough.
10671 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
8e967cf7 10672 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
ae1a998c
RS
10673 else
10674 CFLAGS=$OLD_CFLAGS
10675 CPPFLAGS=$OLD_CPPFLAGS
8e967cf7 10676 fi
c0d27fcc 10677 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
10678echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
10679if test "${emacs_cv_motif_version_2_1+set}" = set; then
10680 echo $ECHO_N "(cached) $ECHO_C" >&6
10681else
10682 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10683/* confdefs.h. */
10684_ACEOF
10685cat confdefs.h >>conftest.$ac_ext
10686cat >>conftest.$ac_ext <<_ACEOF
10687/* end confdefs.h. */
98418dba 10688#include <Xm/Xm.h>
98418dba
CW
10689int
10690main ()
10691{
10692#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
10693int x = 5;
10694#else
10695Motif version prior to 2.1.
10696#endif
10697 ;
10698 return 0;
10699}
10700_ACEOF
10701rm -f conftest.$ac_objext
c0d27fcc 10702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 10703 (eval $ac_compile) 2>conftest.er1
98418dba 10704 ac_status=$?
35996d22
AS
10705 grep -v '^ *+' conftest.er1 >conftest.err
10706 rm -f conftest.er1
10707 cat conftest.err >&5
c0d27fcc 10708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10709 (exit $ac_status); } &&
c08e6004 10710 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
10711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10712 (eval $ac_try) 2>&5
10713 ac_status=$?
10714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10715 (exit $ac_status); }; } &&
10716 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 10717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10718 (eval $ac_try) 2>&5
10719 ac_status=$?
c0d27fcc 10720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10721 (exit $ac_status); }; }; then
10722 emacs_cv_motif_version_2_1=yes
10723else
10724 echo "$as_me: failed program was:" >&5
19650fd6
AS
10725sed 's/^/| /' conftest.$ac_ext >&5
10726
98418dba
CW
10727emacs_cv_motif_version_2_1=no
10728fi
35996d22 10729rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 10730fi
c0d27fcc 10731echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
10732echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
10733 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
10734 if test $emacs_cv_motif_version_2_1 = yes; then
10735 HAVE_LIBXP=no
b936fae4 10736
c0d27fcc 10737cat >>confdefs.h <<\_ACEOF
98418dba 10738#define HAVE_MOTIF_2_1 1
c0d27fcc 10739_ACEOF
98418dba 10740
c0d27fcc 10741 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
10742echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
10743if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
10744 echo $ECHO_N "(cached) $ECHO_C" >&6
10745else
10746 ac_check_lib_save_LIBS=$LIBS
10747LIBS="-lXp $LIBS"
10748cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10749/* confdefs.h. */
10750_ACEOF
10751cat confdefs.h >>conftest.$ac_ext
10752cat >>conftest.$ac_ext <<_ACEOF
10753/* end confdefs.h. */
98418dba
CW
10754
10755/* Override any gcc2 internal prototype to avoid an error. */
10756#ifdef __cplusplus
10757extern "C"
10758#endif
10759/* We use char because int might match the return type of a gcc2
10760 builtin and then its argument prototype would still apply. */
10761char XpCreateContext ();
98418dba
CW
10762int
10763main ()
10764{
10765XpCreateContext ();
10766 ;
10767 return 0;
10768}
10769_ACEOF
10770rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10771if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10772 (eval $ac_link) 2>conftest.er1
98418dba 10773 ac_status=$?
35996d22
AS
10774 grep -v '^ *+' conftest.er1 >conftest.err
10775 rm -f conftest.er1
10776 cat conftest.err >&5
c0d27fcc 10777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10778 (exit $ac_status); } &&
c08e6004 10779 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
10780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10781 (eval $ac_try) 2>&5
10782 ac_status=$?
10783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10784 (exit $ac_status); }; } &&
10785 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10787 (eval $ac_try) 2>&5
10788 ac_status=$?
c0d27fcc 10789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10790 (exit $ac_status); }; }; then
10791 ac_cv_lib_Xp_XpCreateContext=yes
10792else
10793 echo "$as_me: failed program was:" >&5
19650fd6
AS
10794sed 's/^/| /' conftest.$ac_ext >&5
10795
98418dba
CW
10796ac_cv_lib_Xp_XpCreateContext=no
10797fi
35996d22
AS
10798rm -f conftest.err conftest.$ac_objext \
10799 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10800LIBS=$ac_check_lib_save_LIBS
10801fi
c0d27fcc 10802echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
10803echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
10804if test $ac_cv_lib_Xp_XpCreateContext = yes; then
10805 HAVE_LIBXP=yes
10806fi
503d2be0 10807
98418dba 10808 if test ${HAVE_LIBXP} = yes; then
b936fae4 10809
c0d27fcc 10810cat >>confdefs.h <<\_ACEOF
98418dba 10811#define HAVE_LIBXP 1
c0d27fcc 10812_ACEOF
503d2be0 10813
98418dba
CW
10814 fi
10815 fi
10816fi
10817
10818### Is -lXaw3d available?
10819HAVE_XAW3D=no
10820if test "${HAVE_X11}" = "yes"; then
10821 if test "${USE_X_TOOLKIT}" != "none"; then
22044edf 10822 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
10823echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
10824if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
10825 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 10826else
22044edf 10827 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10828/* confdefs.h. */
10829_ACEOF
10830cat confdefs.h >>conftest.$ac_ext
10831cat >>conftest.$ac_ext <<_ACEOF
10832/* end confdefs.h. */
98418dba 10833#include <X11/Xaw3d/Scrollbar.h>
503d2be0 10834_ACEOF
c0d27fcc 10835if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10836 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10837 ac_status=$?
6bae0ccf 10838 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
10839 rm -f conftest.er1
10840 cat conftest.err >&5
c0d27fcc 10841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10842 (exit $ac_status); } >/dev/null; then
10843 if test -s conftest.err; then
10844 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 10845 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
10846 else
10847 ac_cpp_err=
10848 fi
10849else
10850 ac_cpp_err=yes
10851fi
10852if test -z "$ac_cpp_err"; then
22044edf 10853 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 10854else
503d2be0 10855 echo "$as_me: failed program was:" >&5
19650fd6
AS
10856sed 's/^/| /' conftest.$ac_ext >&5
10857
22044edf 10858 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 10859fi
503d2be0 10860rm -f conftest.err conftest.$ac_ext
98418dba 10861fi
c0d27fcc 10862echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 10863echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 10864if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 10865 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
10866echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
10867if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
10868 echo $ECHO_N "(cached) $ECHO_C" >&6
10869else
10870 ac_check_lib_save_LIBS=$LIBS
10871LIBS="-lXaw3d $LIBS"
10872cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10873/* confdefs.h. */
10874_ACEOF
10875cat confdefs.h >>conftest.$ac_ext
10876cat >>conftest.$ac_ext <<_ACEOF
10877/* end confdefs.h. */
98418dba
CW
10878
10879/* Override any gcc2 internal prototype to avoid an error. */
10880#ifdef __cplusplus
10881extern "C"
10882#endif
10883/* We use char because int might match the return type of a gcc2
10884 builtin and then its argument prototype would still apply. */
10885char XawScrollbarSetThumb ();
503d2be0
AS
10886int
10887main ()
10888{
98418dba 10889XawScrollbarSetThumb ();
503d2be0
AS
10890 ;
10891 return 0;
10892}
10893_ACEOF
10894rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10895if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10896 (eval $ac_link) 2>conftest.er1
503d2be0 10897 ac_status=$?
35996d22
AS
10898 grep -v '^ *+' conftest.er1 >conftest.err
10899 rm -f conftest.er1
10900 cat conftest.err >&5
c0d27fcc 10901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10902 (exit $ac_status); } &&
c08e6004 10903 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
10904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10905 (eval $ac_try) 2>&5
10906 ac_status=$?
10907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10908 (exit $ac_status); }; } &&
10909 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10911 (eval $ac_try) 2>&5
10912 ac_status=$?
c0d27fcc 10913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10914 (exit $ac_status); }; }; then
98418dba 10915 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 10916else
503d2be0 10917 echo "$as_me: failed program was:" >&5
19650fd6
AS
10918sed 's/^/| /' conftest.$ac_ext >&5
10919
98418dba 10920ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 10921fi
35996d22
AS
10922rm -f conftest.err conftest.$ac_objext \
10923 conftest$ac_exeext conftest.$ac_ext
98418dba 10924LIBS=$ac_check_lib_save_LIBS
ba4481b5 10925fi
c0d27fcc 10926echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
10927echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
10928if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
10929 HAVE_XAW3D=yes
ba4481b5 10930fi
503d2be0 10931
ba4481b5
DL
10932fi
10933
c0d27fcc 10934
98418dba 10935 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 10936
c0d27fcc 10937cat >>confdefs.h <<\_ACEOF
98418dba 10938#define HAVE_XAW3D 1
c0d27fcc 10939_ACEOF
98418dba 10940
ba4481b5 10941 fi
98418dba 10942 fi
ba4481b5
DL
10943fi
10944
c0d27fcc
MR
10945
10946
98418dba
CW
10947USE_TOOLKIT_SCROLL_BARS=no
10948if test "${with_toolkit_scroll_bars}" != "no"; then
10949 if test "${USE_X_TOOLKIT}" != "none"; then
10950 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 10951 cat >>confdefs.h <<\_ACEOF
98418dba 10952#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 10953_ACEOF
98418dba
CW
10954
10955 HAVE_XAW3D=no
10956 USE_TOOLKIT_SCROLL_BARS=yes
10957 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 10958 cat >>confdefs.h <<\_ACEOF
98418dba 10959#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 10960_ACEOF
98418dba
CW
10961
10962 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 10963 fi
488dd4c4
JD
10964 elif test "${HAVE_GTK}" = "yes"; then
10965 cat >>confdefs.h <<\_ACEOF
10966#define USE_TOOLKIT_SCROLL_BARS 1
10967_ACEOF
10968
10969 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
10970 fi
10971fi
10972
abd39b57 10973cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
10974/* confdefs.h. */
10975_ACEOF
10976cat confdefs.h >>conftest.$ac_ext
10977cat >>conftest.$ac_ext <<_ACEOF
10978/* end confdefs.h. */
10979
10980 #include <X11/Xlib.h>
10981 #include <X11/Xresource.h>
10982int
10983main ()
10984{
10985XIMProc callback;
10986 ;
10987 return 0;
10988}
10989_ACEOF
10990rm -f conftest.$ac_objext
10991if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 10992 (eval $ac_compile) 2>conftest.er1
abd39b57 10993 ac_status=$?
35996d22
AS
10994 grep -v '^ *+' conftest.er1 >conftest.err
10995 rm -f conftest.er1
10996 cat conftest.err >&5
abd39b57
AC
10997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10998 (exit $ac_status); } &&
c08e6004 10999 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11001 (eval $ac_try) 2>&5
11002 ac_status=$?
11003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11004 (exit $ac_status); }; } &&
11005 { ac_try='test -s conftest.$ac_objext'
abd39b57
AC
11006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11007 (eval $ac_try) 2>&5
11008 ac_status=$?
11009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11010 (exit $ac_status); }; }; then
11011 HAVE_XIM=yes
11012
11013cat >>confdefs.h <<\_ACEOF
11014#define HAVE_XIM 1
11015_ACEOF
11016
11017else
11018 echo "$as_me: failed program was:" >&5
11019sed 's/^/| /' conftest.$ac_ext >&5
11020
11021HAVE_XIM=no
11022fi
35996d22 11023rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 11024
c0d27fcc 11025
98418dba 11026if test "${with_xim}" != "no"; then
b936fae4 11027
c0d27fcc 11028cat >>confdefs.h <<\_ACEOF
98418dba 11029#define USE_XIM 1
c0d27fcc 11030_ACEOF
98418dba 11031
793fa0d7 11032fi
abd39b57
AC
11033
11034
11035if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
11036 late_CFLAGS=$CFLAGS
11037 if test "$GCC" = yes; then
11038 CFLAGS="$CFLAGS --pedantic-errors"
11039 fi
cffcede7 11040 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11041/* confdefs.h. */
11042_ACEOF
11043cat confdefs.h >>conftest.$ac_ext
11044cat >>conftest.$ac_ext <<_ACEOF
11045/* end confdefs.h. */
cffcede7
JD
11046
11047#include <X11/Xlib.h>
11048#include <X11/Xresource.h>
11049int
11050main ()
11051{
11052Display *display;
11053XrmDatabase db;
11054char *res_name;
11055char *res_class;
11056XIMProc callback;
11057XPointer *client_data;
849d80cf
DL
11058#ifndef __GNUC__
11059/* If we're not using GCC, it's probably not XFree86, and this is
11060 probably right, but we can't use something like --pedantic-errors. */
11061extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11062 char*, XIMProc, XPointer*);
11063#endif
cffcede7
JD
11064(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11065 client_data);
11066 ;
11067 return 0;
11068}
11069_ACEOF
11070rm -f conftest.$ac_objext
11071if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11072 (eval $ac_compile) 2>conftest.er1
cffcede7 11073 ac_status=$?
35996d22
AS
11074 grep -v '^ *+' conftest.er1 >conftest.err
11075 rm -f conftest.er1
11076 cat conftest.err >&5
cffcede7
JD
11077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11078 (exit $ac_status); } &&
c08e6004 11079 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11081 (eval $ac_try) 2>&5
11082 ac_status=$?
11083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11084 (exit $ac_status); }; } &&
11085 { ac_try='test -s conftest.$ac_objext'
cffcede7
JD
11086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11087 (eval $ac_try) 2>&5
11088 ac_status=$?
11089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11090 (exit $ac_status); }; }; then
11091 emacs_cv_arg6_star=yes
11092else
11093 echo "$as_me: failed program was:" >&5
19650fd6
AS
11094sed 's/^/| /' conftest.$ac_ext >&5
11095
cffcede7 11096fi
35996d22 11097rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
11098
11099 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 11100 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11101#define XRegisterIMInstantiateCallback_arg6 XPointer*
11102_ACEOF
11103
11104 else
f57bd967 11105 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11106#define XRegisterIMInstantiateCallback_arg6 XPointer
11107_ACEOF
11108
11109 fi
849d80cf 11110 CFLAGS=$late_CFLAGS
98418dba
CW
11111fi
11112
11113### Use -lXpm if available, unless `--with-xpm=no'.
11114HAVE_XPM=no
11115if test "${HAVE_X11}" = "yes"; then
11116 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
11117 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11118 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
11119echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11120if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11121 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11122fi
11123echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
11124echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 11125else
c0d27fcc
MR
11126 # Is the header compilable?
11127echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
11128echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
11129cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11130/* confdefs.h. */
11131_ACEOF
11132cat confdefs.h >>conftest.$ac_ext
11133cat >>conftest.$ac_ext <<_ACEOF
11134/* end confdefs.h. */
c0d27fcc
MR
11135$ac_includes_default
11136#include <X11/xpm.h>
11137_ACEOF
11138rm -f conftest.$ac_objext
11139if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11140 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11141 ac_status=$?
35996d22
AS
11142 grep -v '^ *+' conftest.er1 >conftest.err
11143 rm -f conftest.er1
11144 cat conftest.err >&5
c0d27fcc
MR
11145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11146 (exit $ac_status); } &&
c08e6004 11147 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11149 (eval $ac_try) 2>&5
11150 ac_status=$?
11151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11152 (exit $ac_status); }; } &&
11153 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11155 (eval $ac_try) 2>&5
11156 ac_status=$?
11157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11158 (exit $ac_status); }; }; then
11159 ac_header_compiler=yes
11160else
11161 echo "$as_me: failed program was:" >&5
19650fd6
AS
11162sed 's/^/| /' conftest.$ac_ext >&5
11163
c0d27fcc
MR
11164ac_header_compiler=no
11165fi
35996d22 11166rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11167echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11168echo "${ECHO_T}$ac_header_compiler" >&6
11169
11170# Is the header present?
11171echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
11172echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
11173cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11174/* confdefs.h. */
11175_ACEOF
11176cat confdefs.h >>conftest.$ac_ext
11177cat >>conftest.$ac_ext <<_ACEOF
11178/* end confdefs.h. */
98418dba
CW
11179#include <X11/xpm.h>
11180_ACEOF
c0d27fcc 11181if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11182 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11183 ac_status=$?
6bae0ccf 11184 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11185 rm -f conftest.er1
11186 cat conftest.err >&5
c0d27fcc 11187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11188 (exit $ac_status); } >/dev/null; then
11189 if test -s conftest.err; then
11190 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11191 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11192 else
11193 ac_cpp_err=
11194 fi
11195else
11196 ac_cpp_err=yes
11197fi
11198if test -z "$ac_cpp_err"; then
c0d27fcc 11199 ac_header_preproc=yes
98418dba
CW
11200else
11201 echo "$as_me: failed program was:" >&5
19650fd6
AS
11202sed 's/^/| /' conftest.$ac_ext >&5
11203
c0d27fcc 11204 ac_header_preproc=no
98418dba
CW
11205fi
11206rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11207echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11208echo "${ECHO_T}$ac_header_preproc" >&6
11209
11210# So? What about this header?
35996d22
AS
11211case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11212 yes:no: )
c0d27fcc
MR
11213 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
11214echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11215 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
11216echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
11217 ac_header_preproc=yes
19650fd6 11218 ;;
35996d22 11219 no:yes:* )
c0d27fcc
MR
11220 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
11221echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
35996d22
AS
11222 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
11223echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
11224 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
11225echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
11226 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
11227echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 11228 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
19650fd6 11229echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11230 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
11231echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11232 (
11233 cat <<\_ASBOX
35996d22
AS
11234## ------------------------------------------ ##
11235## Report this to the AC_PACKAGE_NAME lists. ##
11236## ------------------------------------------ ##
19650fd6
AS
11237_ASBOX
11238 ) |
11239 sed "s/^/$as_me: WARNING: /" >&2
11240 ;;
c0d27fcc
MR
11241esac
11242echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
11243echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11244if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11245 echo $ECHO_N "(cached) $ECHO_C" >&6
11246else
11247 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 11248fi
c0d27fcc 11249echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 11250echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
11251
11252fi
98418dba 11253if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 11254 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
11255echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
11256if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 11257 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11258else
98418dba
CW
11259 ac_check_lib_save_LIBS=$LIBS
11260LIBS="-lXpm -lX11 $LIBS"
11261cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11262/* confdefs.h. */
11263_ACEOF
11264cat confdefs.h >>conftest.$ac_ext
11265cat >>conftest.$ac_ext <<_ACEOF
11266/* end confdefs.h. */
98418dba 11267
ba4481b5 11268/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11269#ifdef __cplusplus
11270extern "C"
11271#endif
ba4481b5 11272/* We use char because int might match the return type of a gcc2
503d2be0 11273 builtin and then its argument prototype would still apply. */
98418dba 11274char XpmReadFileToPixmap ();
503d2be0
AS
11275int
11276main ()
11277{
98418dba 11278XpmReadFileToPixmap ();
503d2be0
AS
11279 ;
11280 return 0;
11281}
11282_ACEOF
11283rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11285 (eval $ac_link) 2>conftest.er1
503d2be0 11286 ac_status=$?
35996d22
AS
11287 grep -v '^ *+' conftest.er1 >conftest.err
11288 rm -f conftest.er1
11289 cat conftest.err >&5
c0d27fcc 11290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11291 (exit $ac_status); } &&
c08e6004 11292 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11294 (eval $ac_try) 2>&5
11295 ac_status=$?
11296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11297 (exit $ac_status); }; } &&
11298 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11300 (eval $ac_try) 2>&5
11301 ac_status=$?
c0d27fcc 11302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11303 (exit $ac_status); }; }; then
98418dba 11304 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
11305else
11306 echo "$as_me: failed program was:" >&5
19650fd6
AS
11307sed 's/^/| /' conftest.$ac_ext >&5
11308
98418dba 11309ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 11310fi
35996d22
AS
11311rm -f conftest.err conftest.$ac_objext \
11312 conftest$ac_exeext conftest.$ac_ext
98418dba 11313LIBS=$ac_check_lib_save_LIBS
503d2be0 11314fi
c0d27fcc 11315echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
11316echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
11317if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
11318 HAVE_XPM=yes
ba4481b5
DL
11319fi
11320
98418dba
CW
11321fi
11322
c0d27fcc 11323
98418dba 11324 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11325 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
11326echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
11327 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11328/* confdefs.h. */
11329_ACEOF
11330cat confdefs.h >>conftest.$ac_ext
11331cat >>conftest.$ac_ext <<_ACEOF
11332/* end confdefs.h. */
98418dba
CW
11333#include "X11/xpm.h"
11334#ifndef XpmReturnAllocPixels
11335no_return_alloc_pixels
503d2be0 11336#endif
ba4481b5 11337
98418dba
CW
11338_ACEOF
11339if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11340 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
11341 HAVE_XPM=no
11342else
11343 HAVE_XPM=yes
11344fi
11345rm -f conftest*
ba4481b5 11346
c0d27fcc 11347
98418dba 11348 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11349 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
11350echo "${ECHO_T}yes" >&6
11351 else
c0d27fcc 11352 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
11353echo "${ECHO_T}no" >&6
11354 fi
11355 fi
11356 fi
11357
11358 if test "${HAVE_XPM}" = "yes"; then
b936fae4 11359
c0d27fcc 11360cat >>confdefs.h <<\_ACEOF
98418dba 11361#define HAVE_XPM 1
c0d27fcc 11362_ACEOF
98418dba
CW
11363
11364 fi
11365fi
11366
11367### Use -ljpeg if available, unless `--with-jpeg=no'.
11368HAVE_JPEG=no
11369if test "${HAVE_X11}" = "yes"; then
11370 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
11371 if test "${ac_cv_header_jerror_h+set}" = set; then
11372 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
11373echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11374if test "${ac_cv_header_jerror_h+set}" = set; then
11375 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11376fi
11377echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
11378echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 11379else
c0d27fcc
MR
11380 # Is the header compilable?
11381echo "$as_me:$LINENO: checking jerror.h usability" >&5
11382echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
11383cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11384/* confdefs.h. */
11385_ACEOF
11386cat confdefs.h >>conftest.$ac_ext
11387cat >>conftest.$ac_ext <<_ACEOF
11388/* end confdefs.h. */
c0d27fcc
MR
11389$ac_includes_default
11390#include <jerror.h>
11391_ACEOF
11392rm -f conftest.$ac_objext
11393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11394 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11395 ac_status=$?
35996d22
AS
11396 grep -v '^ *+' conftest.er1 >conftest.err
11397 rm -f conftest.er1
11398 cat conftest.err >&5
c0d27fcc
MR
11399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11400 (exit $ac_status); } &&
c08e6004 11401 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11403 (eval $ac_try) 2>&5
11404 ac_status=$?
11405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11406 (exit $ac_status); }; } &&
11407 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11409 (eval $ac_try) 2>&5
11410 ac_status=$?
11411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11412 (exit $ac_status); }; }; then
11413 ac_header_compiler=yes
11414else
11415 echo "$as_me: failed program was:" >&5
19650fd6
AS
11416sed 's/^/| /' conftest.$ac_ext >&5
11417
c0d27fcc
MR
11418ac_header_compiler=no
11419fi
35996d22 11420rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11421echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11422echo "${ECHO_T}$ac_header_compiler" >&6
11423
11424# Is the header present?
11425echo "$as_me:$LINENO: checking jerror.h presence" >&5
11426echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
11427cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11428/* confdefs.h. */
11429_ACEOF
11430cat confdefs.h >>conftest.$ac_ext
11431cat >>conftest.$ac_ext <<_ACEOF
11432/* end confdefs.h. */
98418dba
CW
11433#include <jerror.h>
11434_ACEOF
c0d27fcc 11435if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11436 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11437 ac_status=$?
6bae0ccf 11438 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11439 rm -f conftest.er1
11440 cat conftest.err >&5
c0d27fcc 11441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11442 (exit $ac_status); } >/dev/null; then
11443 if test -s conftest.err; then
11444 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11445 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11446 else
11447 ac_cpp_err=
11448 fi
11449else
11450 ac_cpp_err=yes
503d2be0 11451fi
98418dba 11452if test -z "$ac_cpp_err"; then
c0d27fcc 11453 ac_header_preproc=yes
ba4481b5 11454else
98418dba 11455 echo "$as_me: failed program was:" >&5
19650fd6
AS
11456sed 's/^/| /' conftest.$ac_ext >&5
11457
c0d27fcc 11458 ac_header_preproc=no
98418dba
CW
11459fi
11460rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11461echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11462echo "${ECHO_T}$ac_header_preproc" >&6
11463
11464# So? What about this header?
35996d22
AS
11465case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11466 yes:no: )
c0d27fcc
MR
11467 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
11468echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11469 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
11470echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
11471 ac_header_preproc=yes
19650fd6 11472 ;;
35996d22 11473 no:yes:* )
c0d27fcc
MR
11474 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
11475echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
35996d22
AS
11476 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
11477echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
11478 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
11479echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
11480 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
11481echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 11482 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 11483echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11484 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
11485echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11486 (
11487 cat <<\_ASBOX
35996d22
AS
11488## ------------------------------------------ ##
11489## Report this to the AC_PACKAGE_NAME lists. ##
11490## ------------------------------------------ ##
19650fd6
AS
11491_ASBOX
11492 ) |
11493 sed "s/^/$as_me: WARNING: /" >&2
11494 ;;
c0d27fcc
MR
11495esac
11496echo "$as_me:$LINENO: checking for jerror.h" >&5
11497echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11498if test "${ac_cv_header_jerror_h+set}" = set; then
11499 echo $ECHO_N "(cached) $ECHO_C" >&6
11500else
11501 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 11502fi
c0d27fcc 11503echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 11504echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
11505
11506fi
98418dba 11507if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 11508 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
11509echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
11510if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 11511 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11512else
98418dba
CW
11513 ac_check_lib_save_LIBS=$LIBS
11514LIBS="-ljpeg $LIBS"
11515cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11516/* confdefs.h. */
11517_ACEOF
11518cat confdefs.h >>conftest.$ac_ext
11519cat >>conftest.$ac_ext <<_ACEOF
11520/* end confdefs.h. */
98418dba
CW
11521
11522/* Override any gcc2 internal prototype to avoid an error. */
11523#ifdef __cplusplus
11524extern "C"
11525#endif
11526/* We use char because int might match the return type of a gcc2
11527 builtin and then its argument prototype would still apply. */
11528char jpeg_destroy_compress ();
503d2be0
AS
11529int
11530main ()
11531{
98418dba 11532jpeg_destroy_compress ();
503d2be0
AS
11533 ;
11534 return 0;
11535}
11536_ACEOF
11537rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11538if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11539 (eval $ac_link) 2>conftest.er1
503d2be0 11540 ac_status=$?
35996d22
AS
11541 grep -v '^ *+' conftest.er1 >conftest.err
11542 rm -f conftest.er1
11543 cat conftest.err >&5
c0d27fcc 11544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11545 (exit $ac_status); } &&
c08e6004 11546 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11548 (eval $ac_try) 2>&5
11549 ac_status=$?
11550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11551 (exit $ac_status); }; } &&
11552 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11554 (eval $ac_try) 2>&5
11555 ac_status=$?
c0d27fcc 11556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11557 (exit $ac_status); }; }; then
98418dba 11558 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 11559else
503d2be0 11560 echo "$as_me: failed program was:" >&5
19650fd6
AS
11561sed 's/^/| /' conftest.$ac_ext >&5
11562
98418dba 11563ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 11564fi
35996d22
AS
11565rm -f conftest.err conftest.$ac_objext \
11566 conftest$ac_exeext conftest.$ac_ext
98418dba 11567LIBS=$ac_check_lib_save_LIBS
ba4481b5 11568fi
c0d27fcc 11569echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
11570echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
11571if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
11572 HAVE_JPEG=yes
ba4481b5 11573fi
98418dba 11574
ba4481b5 11575fi
98418dba 11576
c0d27fcc 11577
ba4481b5 11578 fi
ba4481b5 11579
c0d27fcc 11580
98418dba 11581 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 11582 cat >>confdefs.h <<\_ACEOF
98418dba 11583#define HAVE_JPEG 1
c0d27fcc 11584_ACEOF
98418dba
CW
11585
11586 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11587/* confdefs.h. */
11588_ACEOF
11589cat confdefs.h >>conftest.$ac_ext
11590cat >>conftest.$ac_ext <<_ACEOF
11591/* end confdefs.h. */
22044edf 11592#include <jpeglib.h>
98418dba
CW
11593 version=JPEG_LIB_VERSION
11594
11595_ACEOF
11596if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11597 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 11598 cat >>confdefs.h <<\_ACEOF
98418dba 11599#define HAVE_JPEG 1
c0d27fcc 11600_ACEOF
ba4481b5 11601
98418dba 11602else
c0d27fcc 11603 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
11604echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
11605 HAVE_JPEG=no
ba4481b5 11606fi
98418dba 11607rm -f conftest*
ba4481b5 11608
98418dba
CW
11609 fi
11610fi
503d2be0 11611
98418dba
CW
11612### Use -lpng if available, unless `--with-png=no'.
11613HAVE_PNG=no
11614if test "${HAVE_X11}" = "yes"; then
11615 if test "${with_png}" != "no"; then
f57bd967
DL
11616 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
11617 # in /usr/include/libpng.
11618
11619
11620for ac_header in png.h libpng/png.h
11621do
11622as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11623if eval "test \"\${$as_ac_Header+set}\" = set"; then
11624 echo "$as_me:$LINENO: checking for $ac_header" >&5
11625echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11626if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 11627 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 11628fi
f57bd967
DL
11629echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11630echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
503d2be0 11631else
c0d27fcc 11632 # Is the header compilable?
f57bd967
DL
11633echo "$as_me:$LINENO: checking $ac_header usability" >&5
11634echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
c0d27fcc 11635cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11636/* confdefs.h. */
11637_ACEOF
11638cat confdefs.h >>conftest.$ac_ext
11639cat >>conftest.$ac_ext <<_ACEOF
11640/* end confdefs.h. */
c0d27fcc 11641$ac_includes_default
f57bd967 11642#include <$ac_header>
c0d27fcc
MR
11643_ACEOF
11644rm -f conftest.$ac_objext
11645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11646 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11647 ac_status=$?
35996d22
AS
11648 grep -v '^ *+' conftest.er1 >conftest.err
11649 rm -f conftest.er1
11650 cat conftest.err >&5
c0d27fcc
MR
11651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11652 (exit $ac_status); } &&
c08e6004 11653 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11655 (eval $ac_try) 2>&5
11656 ac_status=$?
11657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11658 (exit $ac_status); }; } &&
11659 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11661 (eval $ac_try) 2>&5
11662 ac_status=$?
11663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11664 (exit $ac_status); }; }; then
11665 ac_header_compiler=yes
11666else
11667 echo "$as_me: failed program was:" >&5
19650fd6
AS
11668sed 's/^/| /' conftest.$ac_ext >&5
11669
c0d27fcc
MR
11670ac_header_compiler=no
11671fi
35996d22 11672rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11673echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11674echo "${ECHO_T}$ac_header_compiler" >&6
11675
11676# Is the header present?
f57bd967
DL
11677echo "$as_me:$LINENO: checking $ac_header presence" >&5
11678echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
c0d27fcc 11679cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11680/* confdefs.h. */
11681_ACEOF
11682cat confdefs.h >>conftest.$ac_ext
11683cat >>conftest.$ac_ext <<_ACEOF
11684/* end confdefs.h. */
f57bd967 11685#include <$ac_header>
503d2be0 11686_ACEOF
c0d27fcc 11687if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11688 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11689 ac_status=$?
6bae0ccf 11690 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11691 rm -f conftest.er1
11692 cat conftest.err >&5
c0d27fcc 11693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11694 (exit $ac_status); } >/dev/null; then
11695 if test -s conftest.err; then
11696 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11697 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
11698 else
11699 ac_cpp_err=
11700 fi
11701else
11702 ac_cpp_err=yes
11703fi
11704if test -z "$ac_cpp_err"; then
c0d27fcc 11705 ac_header_preproc=yes
503d2be0
AS
11706else
11707 echo "$as_me: failed program was:" >&5
19650fd6
AS
11708sed 's/^/| /' conftest.$ac_ext >&5
11709
c0d27fcc 11710 ac_header_preproc=no
ba4481b5 11711fi
503d2be0 11712rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11713echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11714echo "${ECHO_T}$ac_header_preproc" >&6
11715
11716# So? What about this header?
35996d22
AS
11717case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11718 yes:no: )
f57bd967
DL
11719 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11720echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11721 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11722echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11723 ac_header_preproc=yes
19650fd6 11724 ;;
35996d22 11725 no:yes:* )
f57bd967
DL
11726 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11727echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
11728 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11729echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11730 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11731echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11732 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11733echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 11734 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 11735echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11736 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11737echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11738 (
11739 cat <<\_ASBOX
35996d22
AS
11740## ------------------------------------------ ##
11741## Report this to the AC_PACKAGE_NAME lists. ##
11742## ------------------------------------------ ##
19650fd6
AS
11743_ASBOX
11744 ) |
11745 sed "s/^/$as_me: WARNING: /" >&2
11746 ;;
c0d27fcc 11747esac
f57bd967
DL
11748echo "$as_me:$LINENO: checking for $ac_header" >&5
11749echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11750if eval "test \"\${$as_ac_Header+set}\" = set"; then
c0d27fcc
MR
11751 echo $ECHO_N "(cached) $ECHO_C" >&6
11752else
35996d22 11753 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967
DL
11754fi
11755echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11756echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11757
ba4481b5 11758fi
f57bd967
DL
11759if test `eval echo '${'$as_ac_Header'}'` = yes; then
11760 cat >>confdefs.h <<_ACEOF
11761#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11762_ACEOF
c0d27fcc
MR
11763
11764fi
f57bd967
DL
11765
11766done
11767
11768 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
11769 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
11770echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
11771if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 11772 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11773else
98418dba
CW
11774 ac_check_lib_save_LIBS=$LIBS
11775LIBS="-lpng -lz -lm $LIBS"
11776cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11777/* confdefs.h. */
11778_ACEOF
11779cat confdefs.h >>conftest.$ac_ext
11780cat >>conftest.$ac_ext <<_ACEOF
11781/* end confdefs.h. */
98418dba 11782
ba4481b5 11783/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11784#ifdef __cplusplus
11785extern "C"
11786#endif
ba4481b5 11787/* We use char because int might match the return type of a gcc2
503d2be0 11788 builtin and then its argument prototype would still apply. */
98418dba 11789char png_get_channels ();
503d2be0
AS
11790int
11791main ()
11792{
98418dba 11793png_get_channels ();
503d2be0
AS
11794 ;
11795 return 0;
11796}
11797_ACEOF
11798rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11800 (eval $ac_link) 2>conftest.er1
503d2be0 11801 ac_status=$?
35996d22
AS
11802 grep -v '^ *+' conftest.er1 >conftest.err
11803 rm -f conftest.er1
11804 cat conftest.err >&5
c0d27fcc 11805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11806 (exit $ac_status); } &&
c08e6004 11807 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11809 (eval $ac_try) 2>&5
11810 ac_status=$?
11811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11812 (exit $ac_status); }; } &&
11813 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11815 (eval $ac_try) 2>&5
11816 ac_status=$?
c0d27fcc 11817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11818 (exit $ac_status); }; }; then
98418dba 11819 ac_cv_lib_png_png_get_channels=yes
73b77ee5 11820else
98418dba 11821 echo "$as_me: failed program was:" >&5
19650fd6
AS
11822sed 's/^/| /' conftest.$ac_ext >&5
11823
98418dba 11824ac_cv_lib_png_png_get_channels=no
73b77ee5 11825fi
35996d22
AS
11826rm -f conftest.err conftest.$ac_objext \
11827 conftest$ac_exeext conftest.$ac_ext
98418dba 11828LIBS=$ac_check_lib_save_LIBS
73b77ee5 11829fi
c0d27fcc 11830echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
11831echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
11832if test $ac_cv_lib_png_png_get_channels = yes; then
11833 HAVE_PNG=yes
73b77ee5 11834fi
503d2be0 11835
f57bd967 11836 fi
98418dba
CW
11837 fi
11838
11839 if test "${HAVE_PNG}" = "yes"; then
b936fae4 11840
c0d27fcc 11841cat >>confdefs.h <<\_ACEOF
98418dba 11842#define HAVE_PNG 1
c0d27fcc 11843_ACEOF
73b77ee5 11844
98418dba 11845 fi
73b77ee5
GM
11846fi
11847
98418dba
CW
11848### Use -ltiff if available, unless `--with-tiff=no'.
11849HAVE_TIFF=no
11850if test "${HAVE_X11}" = "yes"; then
11851 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
11852 if test "${ac_cv_header_tiffio_h+set}" = set; then
11853 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
11854echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
11855if test "${ac_cv_header_tiffio_h+set}" = set; then
11856 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11857fi
11858echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
11859echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 11860else
c0d27fcc
MR
11861 # Is the header compilable?
11862echo "$as_me:$LINENO: checking tiffio.h usability" >&5
11863echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
11864cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11865/* confdefs.h. */
11866_ACEOF
11867cat confdefs.h >>conftest.$ac_ext
11868cat >>conftest.$ac_ext <<_ACEOF
11869/* end confdefs.h. */
c0d27fcc
MR
11870$ac_includes_default
11871#include <tiffio.h>
11872_ACEOF
11873rm -f conftest.$ac_objext
11874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11875 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11876 ac_status=$?
35996d22
AS
11877 grep -v '^ *+' conftest.er1 >conftest.err
11878 rm -f conftest.er1
11879 cat conftest.err >&5
c0d27fcc
MR
11880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11881 (exit $ac_status); } &&
c08e6004 11882 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
11883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11884 (eval $ac_try) 2>&5
11885 ac_status=$?
11886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11887 (exit $ac_status); }; } &&
11888 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11890 (eval $ac_try) 2>&5
11891 ac_status=$?
11892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11893 (exit $ac_status); }; }; then
11894 ac_header_compiler=yes
11895else
11896 echo "$as_me: failed program was:" >&5
19650fd6
AS
11897sed 's/^/| /' conftest.$ac_ext >&5
11898
c0d27fcc
MR
11899ac_header_compiler=no
11900fi
35996d22 11901rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11902echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11903echo "${ECHO_T}$ac_header_compiler" >&6
11904
11905# Is the header present?
11906echo "$as_me:$LINENO: checking tiffio.h presence" >&5
11907echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
11908cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11909/* confdefs.h. */
11910_ACEOF
11911cat confdefs.h >>conftest.$ac_ext
11912cat >>conftest.$ac_ext <<_ACEOF
11913/* end confdefs.h. */
98418dba
CW
11914#include <tiffio.h>
11915_ACEOF
c0d27fcc 11916if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11917 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11918 ac_status=$?
6bae0ccf 11919 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11920 rm -f conftest.er1
11921 cat conftest.err >&5
c0d27fcc 11922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11923 (exit $ac_status); } >/dev/null; then
11924 if test -s conftest.err; then
11925 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11926 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11927 else
11928 ac_cpp_err=
11929 fi
11930else
11931 ac_cpp_err=yes
11932fi
11933if test -z "$ac_cpp_err"; then
c0d27fcc 11934 ac_header_preproc=yes
98418dba
CW
11935else
11936 echo "$as_me: failed program was:" >&5
19650fd6
AS
11937sed 's/^/| /' conftest.$ac_ext >&5
11938
c0d27fcc 11939 ac_header_preproc=no
98418dba
CW
11940fi
11941rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11942echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11943echo "${ECHO_T}$ac_header_preproc" >&6
11944
11945# So? What about this header?
35996d22
AS
11946case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11947 yes:no: )
c0d27fcc
MR
11948 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
11949echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11950 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
11951echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
11952 ac_header_preproc=yes
19650fd6 11953 ;;
35996d22 11954 no:yes:* )
c0d27fcc
MR
11955 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
11956echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
35996d22
AS
11957 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
11958echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
11959 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
11960echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
11961 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
11962echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 11963 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 11964echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11965 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
11966echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11967 (
11968 cat <<\_ASBOX
35996d22
AS
11969## ------------------------------------------ ##
11970## Report this to the AC_PACKAGE_NAME lists. ##
11971## ------------------------------------------ ##
19650fd6
AS
11972_ASBOX
11973 ) |
11974 sed "s/^/$as_me: WARNING: /" >&2
11975 ;;
c0d27fcc
MR
11976esac
11977echo "$as_me:$LINENO: checking for tiffio.h" >&5
11978echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
11979if test "${ac_cv_header_tiffio_h+set}" = set; then
11980 echo $ECHO_N "(cached) $ECHO_C" >&6
11981else
11982 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 11983fi
c0d27fcc 11984echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 11985echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
11986
11987fi
98418dba
CW
11988if test $ac_cv_header_tiffio_h = yes; then
11989 tifflibs="-lz -lm"
11990 # At least one tiff package requires the jpeg library.
11991 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 11992 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
11993echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
11994if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 11995 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 11996else
503d2be0 11997 ac_check_lib_save_LIBS=$LIBS
98418dba 11998LIBS="-ltiff $tifflibs $LIBS"
503d2be0 11999cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12000/* confdefs.h. */
12001_ACEOF
12002cat confdefs.h >>conftest.$ac_ext
12003cat >>conftest.$ac_ext <<_ACEOF
12004/* end confdefs.h. */
503d2be0 12005
73b77ee5 12006/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12007#ifdef __cplusplus
12008extern "C"
12009#endif
73b77ee5 12010/* We use char because int might match the return type of a gcc2
503d2be0 12011 builtin and then its argument prototype would still apply. */
98418dba 12012char TIFFGetVersion ();
503d2be0
AS
12013int
12014main ()
12015{
98418dba 12016TIFFGetVersion ();
503d2be0
AS
12017 ;
12018 return 0;
12019}
12020_ACEOF
12021rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12022if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12023 (eval $ac_link) 2>conftest.er1
503d2be0 12024 ac_status=$?
35996d22
AS
12025 grep -v '^ *+' conftest.er1 >conftest.err
12026 rm -f conftest.er1
12027 cat conftest.err >&5
c0d27fcc 12028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12029 (exit $ac_status); } &&
c08e6004 12030 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
12031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12032 (eval $ac_try) 2>&5
12033 ac_status=$?
12034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12035 (exit $ac_status); }; } &&
12036 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12038 (eval $ac_try) 2>&5
12039 ac_status=$?
c0d27fcc 12040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12041 (exit $ac_status); }; }; then
98418dba 12042 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
12043else
12044 echo "$as_me: failed program was:" >&5
19650fd6
AS
12045sed 's/^/| /' conftest.$ac_ext >&5
12046
98418dba 12047ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 12048fi
35996d22
AS
12049rm -f conftest.err conftest.$ac_objext \
12050 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12051LIBS=$ac_check_lib_save_LIBS
12052fi
c0d27fcc 12053echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
12054echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
12055if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
12056 HAVE_TIFF=yes
12057fi
12058
12059fi
73b77ee5 12060
c0d27fcc 12061
98418dba
CW
12062 fi
12063
12064 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 12065
c0d27fcc 12066cat >>confdefs.h <<\_ACEOF
98418dba 12067#define HAVE_TIFF 1
c0d27fcc 12068_ACEOF
98418dba
CW
12069
12070 fi
73b77ee5
GM
12071fi
12072
98418dba
CW
12073### Use -lgif if available, unless `--with-gif=no'.
12074HAVE_GIF=no
12075if test "${HAVE_X11}" = "yes"; then
12076 if test "${with_gif}" != "no"; then
c0d27fcc
MR
12077 if test "${ac_cv_header_gif_lib_h+set}" = set; then
12078 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
12079echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12080if test "${ac_cv_header_gif_lib_h+set}" = set; then
12081 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12082fi
12083echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
12084echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 12085else
c0d27fcc
MR
12086 # Is the header compilable?
12087echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
12088echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
12089cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12090/* confdefs.h. */
12091_ACEOF
12092cat confdefs.h >>conftest.$ac_ext
12093cat >>conftest.$ac_ext <<_ACEOF
12094/* end confdefs.h. */
c0d27fcc
MR
12095$ac_includes_default
12096#include <gif_lib.h>
12097_ACEOF
12098rm -f conftest.$ac_objext
12099if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12100 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12101 ac_status=$?
35996d22
AS
12102 grep -v '^ *+' conftest.er1 >conftest.err
12103 rm -f conftest.er1
12104 cat conftest.err >&5
c0d27fcc
MR
12105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12106 (exit $ac_status); } &&
c08e6004 12107 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
12108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12109 (eval $ac_try) 2>&5
12110 ac_status=$?
12111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12112 (exit $ac_status); }; } &&
12113 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12115 (eval $ac_try) 2>&5
12116 ac_status=$?
12117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12118 (exit $ac_status); }; }; then
12119 ac_header_compiler=yes
12120else
12121 echo "$as_me: failed program was:" >&5
19650fd6
AS
12122sed 's/^/| /' conftest.$ac_ext >&5
12123
c0d27fcc
MR
12124ac_header_compiler=no
12125fi
35996d22 12126rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12127echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12128echo "${ECHO_T}$ac_header_compiler" >&6
12129
12130# Is the header present?
12131echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
12132echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
12133cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12134/* confdefs.h. */
12135_ACEOF
12136cat confdefs.h >>conftest.$ac_ext
12137cat >>conftest.$ac_ext <<_ACEOF
12138/* end confdefs.h. */
98418dba
CW
12139#include <gif_lib.h>
12140_ACEOF
c0d27fcc 12141if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12142 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12143 ac_status=$?
6bae0ccf 12144 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12145 rm -f conftest.er1
12146 cat conftest.err >&5
c0d27fcc 12147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12148 (exit $ac_status); } >/dev/null; then
12149 if test -s conftest.err; then
12150 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12151 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12152 else
12153 ac_cpp_err=
12154 fi
12155else
12156 ac_cpp_err=yes
12157fi
12158if test -z "$ac_cpp_err"; then
c0d27fcc 12159 ac_header_preproc=yes
98418dba
CW
12160else
12161 echo "$as_me: failed program was:" >&5
19650fd6
AS
12162sed 's/^/| /' conftest.$ac_ext >&5
12163
c0d27fcc 12164 ac_header_preproc=no
98418dba
CW
12165fi
12166rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12167echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12168echo "${ECHO_T}$ac_header_preproc" >&6
12169
12170# So? What about this header?
35996d22
AS
12171case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12172 yes:no: )
c0d27fcc
MR
12173 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12174echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12175 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
12176echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
12177 ac_header_preproc=yes
19650fd6 12178 ;;
35996d22 12179 no:yes:* )
c0d27fcc
MR
12180 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
12181echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
35996d22
AS
12182 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
12183echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
12184 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
12185echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
12186 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
12187echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12188 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 12189echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12190 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
12191echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12192 (
12193 cat <<\_ASBOX
35996d22
AS
12194## ------------------------------------------ ##
12195## Report this to the AC_PACKAGE_NAME lists. ##
12196## ------------------------------------------ ##
19650fd6
AS
12197_ASBOX
12198 ) |
12199 sed "s/^/$as_me: WARNING: /" >&2
12200 ;;
c0d27fcc
MR
12201esac
12202echo "$as_me:$LINENO: checking for gif_lib.h" >&5
12203echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12204if test "${ac_cv_header_gif_lib_h+set}" = set; then
12205 echo $ECHO_N "(cached) $ECHO_C" >&6
12206else
12207 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 12208fi
c0d27fcc 12209echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 12210echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
12211
12212fi
98418dba
CW
12213if test $ac_cv_header_gif_lib_h = yes; then
12214 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12215# Earlier versions can crash Emacs.
c0d27fcc 12216 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
12217echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
12218if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 12219 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12220else
503d2be0 12221 ac_check_lib_save_LIBS=$LIBS
98418dba 12222LIBS="-lungif $LIBS"
503d2be0 12223cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12224/* confdefs.h. */
12225_ACEOF
12226cat confdefs.h >>conftest.$ac_ext
12227cat >>conftest.$ac_ext <<_ACEOF
12228/* end confdefs.h. */
73b77ee5 12229
98418dba
CW
12230/* Override any gcc2 internal prototype to avoid an error. */
12231#ifdef __cplusplus
12232extern "C"
12233#endif
12234/* We use char because int might match the return type of a gcc2
12235 builtin and then its argument prototype would still apply. */
12236char EGifPutExtensionLast ();
503d2be0
AS
12237int
12238main ()
12239{
98418dba 12240EGifPutExtensionLast ();
503d2be0
AS
12241 ;
12242 return 0;
12243}
12244_ACEOF
12245rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12246if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12247 (eval $ac_link) 2>conftest.er1
503d2be0 12248 ac_status=$?
35996d22
AS
12249 grep -v '^ *+' conftest.er1 >conftest.err
12250 rm -f conftest.er1
12251 cat conftest.err >&5
c0d27fcc 12252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12253 (exit $ac_status); } &&
c08e6004 12254 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
c0d27fcc 12255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
12256 (eval $ac_try) 2>&5
12257 ac_status=$?
c0d27fcc 12258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
12259 (exit $ac_status); }; } &&
12260 { ac_try='test -s conftest$ac_exeext'
12261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12262 (eval $ac_try) 2>&5
12263 ac_status=$?
12264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12265 (exit $ac_status); }; }; then
12266 ac_cv_lib_ungif_EGifPutExtensionLast=yes
12267else
98418dba 12268 echo "$as_me: failed program was:" >&5
19650fd6
AS
12269sed 's/^/| /' conftest.$ac_ext >&5
12270
98418dba
CW
12271ac_cv_lib_ungif_EGifPutExtensionLast=no
12272fi
35996d22
AS
12273rm -f conftest.err conftest.$ac_objext \
12274 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12275LIBS=$ac_check_lib_save_LIBS
12276fi
c0d27fcc 12277echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
12278echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
12279if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
12280 HAVE_GIF=yes
12281fi
12282
12283fi
12284
c0d27fcc 12285
98418dba
CW
12286 fi
12287
12288 if test "${HAVE_GIF}" = "yes"; then
b936fae4 12289
c0d27fcc 12290cat >>confdefs.h <<\_ACEOF
98418dba 12291#define HAVE_GIF 1
c0d27fcc 12292_ACEOF
98418dba
CW
12293
12294 fi
12295fi
12296
c0d27fcc
MR
12297### Use Mac OS X Carbon API to implement GUI.
12298HAVE_CARBON=no
12299if test "${with_carbon}" != "no"; then
12300 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
12301 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
12302echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
12303if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
12304 echo $ECHO_N "(cached) $ECHO_C" >&6
12305fi
12306echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
12307echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
12308else
12309 # Is the header compilable?
12310echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
12311echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
12312cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12313/* confdefs.h. */
12314_ACEOF
12315cat confdefs.h >>conftest.$ac_ext
12316cat >>conftest.$ac_ext <<_ACEOF
12317/* end confdefs.h. */
c0d27fcc
MR
12318$ac_includes_default
12319#include <Carbon/Carbon.h>
12320_ACEOF
12321rm -f conftest.$ac_objext
12322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12323 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12324 ac_status=$?
35996d22
AS
12325 grep -v '^ *+' conftest.er1 >conftest.err
12326 rm -f conftest.er1
12327 cat conftest.err >&5
c0d27fcc
MR
12328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12329 (exit $ac_status); } &&
c08e6004 12330 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
12331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12332 (eval $ac_try) 2>&5
12333 ac_status=$?
12334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12335 (exit $ac_status); }; } &&
12336 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12338 (eval $ac_try) 2>&5
12339 ac_status=$?
12340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12341 (exit $ac_status); }; }; then
12342 ac_header_compiler=yes
12343else
12344 echo "$as_me: failed program was:" >&5
19650fd6
AS
12345sed 's/^/| /' conftest.$ac_ext >&5
12346
c0d27fcc
MR
12347ac_header_compiler=no
12348fi
35996d22 12349rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12350echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12351echo "${ECHO_T}$ac_header_compiler" >&6
12352
12353# Is the header present?
12354echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
12355echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
12356cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12357/* confdefs.h. */
12358_ACEOF
12359cat confdefs.h >>conftest.$ac_ext
12360cat >>conftest.$ac_ext <<_ACEOF
12361/* end confdefs.h. */
e0f712ba
AC
12362#include <Carbon/Carbon.h>
12363_ACEOF
c0d27fcc 12364if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
e0f712ba
AC
12365 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12366 ac_status=$?
6bae0ccf 12367 grep -v '^ *+' conftest.er1 >conftest.err
e0f712ba
AC
12368 rm -f conftest.er1
12369 cat conftest.err >&5
c0d27fcc 12370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
e0f712ba
AC
12371 (exit $ac_status); } >/dev/null; then
12372 if test -s conftest.err; then
12373 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12374 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
e0f712ba
AC
12375 else
12376 ac_cpp_err=
12377 fi
12378else
12379 ac_cpp_err=yes
12380fi
12381if test -z "$ac_cpp_err"; then
c0d27fcc 12382 ac_header_preproc=yes
e0f712ba
AC
12383else
12384 echo "$as_me: failed program was:" >&5
19650fd6
AS
12385sed 's/^/| /' conftest.$ac_ext >&5
12386
c0d27fcc 12387 ac_header_preproc=no
e0f712ba
AC
12388fi
12389rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12390echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12391echo "${ECHO_T}$ac_header_preproc" >&6
12392
12393# So? What about this header?
35996d22
AS
12394case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12395 yes:no: )
c0d27fcc
MR
12396 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
12397echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12398 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
12399echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
12400 ac_header_preproc=yes
19650fd6 12401 ;;
35996d22 12402 no:yes:* )
c0d27fcc
MR
12403 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
12404echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
35996d22
AS
12405 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
12406echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
12407 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
12408echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
12409 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
12410echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12411 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
19650fd6 12412echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12413 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
12414echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12415 (
12416 cat <<\_ASBOX
35996d22
AS
12417## ------------------------------------------ ##
12418## Report this to the AC_PACKAGE_NAME lists. ##
12419## ------------------------------------------ ##
19650fd6
AS
12420_ASBOX
12421 ) |
12422 sed "s/^/$as_me: WARNING: /" >&2
12423 ;;
c0d27fcc
MR
12424esac
12425echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
12426echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
12427if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
12428 echo $ECHO_N "(cached) $ECHO_C" >&6
12429else
12430 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
e0f712ba 12431fi
c0d27fcc 12432echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
e0f712ba 12433echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
c0d27fcc
MR
12434
12435fi
e0f712ba
AC
12436if test $ac_cv_header_Carbon_Carbon_h = yes; then
12437 HAVE_CARBON=yes
12438fi
12439
c0d27fcc 12440
e0f712ba
AC
12441fi
12442
cef11da2
ST
12443if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12444 echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12445echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12446if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12447 echo $ECHO_N "(cached) $ECHO_C" >&6
12448fi
12449echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12450echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12451else
12452 # Is the header compilable?
12453echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
12454echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6
12455cat >conftest.$ac_ext <<_ACEOF
12456/* confdefs.h. */
12457_ACEOF
12458cat confdefs.h >>conftest.$ac_ext
12459cat >>conftest.$ac_ext <<_ACEOF
12460/* end confdefs.h. */
12461$ac_includes_default
12462#include <malloc/malloc.h>
12463_ACEOF
12464rm -f conftest.$ac_objext
12465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12466 (eval $ac_compile) 2>conftest.er1
12467 ac_status=$?
12468 grep -v '^ *+' conftest.er1 >conftest.err
12469 rm -f conftest.er1
12470 cat conftest.err >&5
12471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12472 (exit $ac_status); } &&
c08e6004 12473 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
cef11da2
ST
12474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12475 (eval $ac_try) 2>&5
12476 ac_status=$?
12477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12478 (exit $ac_status); }; } &&
12479 { ac_try='test -s conftest.$ac_objext'
12480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12481 (eval $ac_try) 2>&5
12482 ac_status=$?
12483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12484 (exit $ac_status); }; }; then
12485 ac_header_compiler=yes
12486else
12487 echo "$as_me: failed program was:" >&5
12488sed 's/^/| /' conftest.$ac_ext >&5
12489
12490ac_header_compiler=no
12491fi
12492rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12493echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12494echo "${ECHO_T}$ac_header_compiler" >&6
12495
12496# Is the header present?
12497echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
12498echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6
12499cat >conftest.$ac_ext <<_ACEOF
12500/* confdefs.h. */
12501_ACEOF
12502cat confdefs.h >>conftest.$ac_ext
12503cat >>conftest.$ac_ext <<_ACEOF
12504/* end confdefs.h. */
12505#include <malloc/malloc.h>
12506_ACEOF
12507if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12508 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12509 ac_status=$?
12510 grep -v '^ *+' conftest.er1 >conftest.err
12511 rm -f conftest.er1
12512 cat conftest.err >&5
12513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12514 (exit $ac_status); } >/dev/null; then
12515 if test -s conftest.err; then
12516 ac_cpp_err=$ac_c_preproc_warn_flag
12517 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12518 else
12519 ac_cpp_err=
12520 fi
12521else
12522 ac_cpp_err=yes
12523fi
12524if test -z "$ac_cpp_err"; then
12525 ac_header_preproc=yes
12526else
12527 echo "$as_me: failed program was:" >&5
12528sed 's/^/| /' conftest.$ac_ext >&5
12529
12530 ac_header_preproc=no
12531fi
12532rm -f conftest.err conftest.$ac_ext
12533echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12534echo "${ECHO_T}$ac_header_preproc" >&6
12535
12536# So? What about this header?
12537case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12538 yes:no: )
12539 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
12540echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12541 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
12542echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
12543 ac_header_preproc=yes
12544 ;;
12545 no:yes:* )
12546 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
12547echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
12548 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
12549echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
12550 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
12551echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
12552 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
12553echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
12554 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
12555echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
12556 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
12557echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
12558 (
12559 cat <<\_ASBOX
12560## ------------------------------------------ ##
12561## Report this to the AC_PACKAGE_NAME lists. ##
12562## ------------------------------------------ ##
12563_ASBOX
12564 ) |
12565 sed "s/^/$as_me: WARNING: /" >&2
12566 ;;
12567esac
12568echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12569echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12570if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12571 echo $ECHO_N "(cached) $ECHO_C" >&6
12572else
12573 ac_cv_header_malloc_malloc_h=$ac_header_preproc
12574fi
12575echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12576echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12577
12578fi
12579if test $ac_cv_header_malloc_malloc_h = yes; then
12580
12581cat >>confdefs.h <<\_ACEOF
12582#define HAVE_MALLOC_MALLOC_H 1
12583_ACEOF
12584
12585fi
12586
12587
12588
e0f712ba 12589if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 12590
c0d27fcc 12591cat >>confdefs.h <<\_ACEOF
e0f712ba 12592#define HAVE_CARBON 1
c0d27fcc 12593_ACEOF
e0f712ba 12594
6a3a24fa
JD
12595 window_system=mac
12596 ## Specify the install directory
12597 carbon_appdir=
12598 if test "${carbon_appdir_x}" != ""; then
12599 case ${carbon_appdir_x} in
12600 y | ye | yes) carbon_appdir=/Applications ;;
12601 * ) carbon_appdir=${carbon_appdir_x} ;;
12602 esac
12603 fi
8f417b3b
AS
12604 # We also have mouse menus.
12605 HAVE_MENUS=yes
e0f712ba
AC
12606fi
12607
98418dba
CW
12608### Use session management (-lSM -lICE) if available
12609HAVE_X_SM=no
12610if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
12611 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12612 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
12613echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
12614if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12615 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12616fi
12617echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
12618echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 12619else
c0d27fcc
MR
12620 # Is the header compilable?
12621echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
12622echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
12623cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12624/* confdefs.h. */
12625_ACEOF
12626cat confdefs.h >>conftest.$ac_ext
12627cat >>conftest.$ac_ext <<_ACEOF
12628/* end confdefs.h. */
c0d27fcc
MR
12629$ac_includes_default
12630#include <X11/SM/SMlib.h>
12631_ACEOF
12632rm -f conftest.$ac_objext
12633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12634 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12635 ac_status=$?
35996d22
AS
12636 grep -v '^ *+' conftest.er1 >conftest.err
12637 rm -f conftest.er1
12638 cat conftest.err >&5
c0d27fcc
MR
12639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12640 (exit $ac_status); } &&
c08e6004 12641 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
12642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12643 (eval $ac_try) 2>&5
12644 ac_status=$?
12645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12646 (exit $ac_status); }; } &&
12647 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12649 (eval $ac_try) 2>&5
12650 ac_status=$?
12651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12652 (exit $ac_status); }; }; then
12653 ac_header_compiler=yes
12654else
12655 echo "$as_me: failed program was:" >&5
19650fd6
AS
12656sed 's/^/| /' conftest.$ac_ext >&5
12657
c0d27fcc
MR
12658ac_header_compiler=no
12659fi
35996d22 12660rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12661echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12662echo "${ECHO_T}$ac_header_compiler" >&6
12663
12664# Is the header present?
12665echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
12666echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
12667cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12668/* confdefs.h. */
12669_ACEOF
12670cat confdefs.h >>conftest.$ac_ext
12671cat >>conftest.$ac_ext <<_ACEOF
12672/* end confdefs.h. */
98418dba
CW
12673#include <X11/SM/SMlib.h>
12674_ACEOF
c0d27fcc 12675if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12676 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12677 ac_status=$?
6bae0ccf 12678 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12679 rm -f conftest.er1
12680 cat conftest.err >&5
c0d27fcc 12681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12682 (exit $ac_status); } >/dev/null; then
12683 if test -s conftest.err; then
12684 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12685 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12686 else
12687 ac_cpp_err=
12688 fi
12689else
12690 ac_cpp_err=yes
503d2be0 12691fi
98418dba 12692if test -z "$ac_cpp_err"; then
c0d27fcc 12693 ac_header_preproc=yes
98418dba
CW
12694else
12695 echo "$as_me: failed program was:" >&5
19650fd6
AS
12696sed 's/^/| /' conftest.$ac_ext >&5
12697
c0d27fcc 12698 ac_header_preproc=no
98418dba
CW
12699fi
12700rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12701echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12702echo "${ECHO_T}$ac_header_preproc" >&6
12703
12704# So? What about this header?
35996d22
AS
12705case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12706 yes:no: )
c0d27fcc
MR
12707 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12708echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12709 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
12710echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
12711 ac_header_preproc=yes
19650fd6 12712 ;;
35996d22 12713 no:yes:* )
c0d27fcc
MR
12714 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
12715echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
35996d22
AS
12716 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
12717echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
12718 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
12719echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
12720 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
12721echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12722 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 12723echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12724 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
12725echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12726 (
12727 cat <<\_ASBOX
35996d22
AS
12728## ------------------------------------------ ##
12729## Report this to the AC_PACKAGE_NAME lists. ##
12730## ------------------------------------------ ##
19650fd6
AS
12731_ASBOX
12732 ) |
12733 sed "s/^/$as_me: WARNING: /" >&2
12734 ;;
c0d27fcc
MR
12735esac
12736echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
12737echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
12738if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12739 echo $ECHO_N "(cached) $ECHO_C" >&6
12740else
12741 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 12742fi
c0d27fcc 12743echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 12744echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
12745
12746fi
98418dba 12747if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 12748 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
12749echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
12750if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 12751 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12752else
503d2be0 12753 ac_check_lib_save_LIBS=$LIBS
1660500f 12754LIBS="-lSM -lICE $LIBS"
503d2be0 12755cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12756/* confdefs.h. */
12757_ACEOF
12758cat confdefs.h >>conftest.$ac_ext
12759cat >>conftest.$ac_ext <<_ACEOF
12760/* end confdefs.h. */
503d2be0 12761
73b77ee5 12762/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12763#ifdef __cplusplus
12764extern "C"
12765#endif
73b77ee5 12766/* We use char because int might match the return type of a gcc2
503d2be0 12767 builtin and then its argument prototype would still apply. */
98418dba 12768char SmcOpenConnection ();
503d2be0
AS
12769int
12770main ()
12771{
98418dba 12772SmcOpenConnection ();
503d2be0
AS
12773 ;
12774 return 0;
12775}
12776_ACEOF
12777rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12778if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12779 (eval $ac_link) 2>conftest.er1
503d2be0 12780 ac_status=$?
35996d22
AS
12781 grep -v '^ *+' conftest.er1 >conftest.err
12782 rm -f conftest.er1
12783 cat conftest.err >&5
c0d27fcc 12784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12785 (exit $ac_status); } &&
c08e6004 12786 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
12787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12788 (eval $ac_try) 2>&5
12789 ac_status=$?
12790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12791 (exit $ac_status); }; } &&
12792 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12794 (eval $ac_try) 2>&5
12795 ac_status=$?
c0d27fcc 12796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12797 (exit $ac_status); }; }; then
98418dba 12798 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
12799else
12800 echo "$as_me: failed program was:" >&5
19650fd6
AS
12801sed 's/^/| /' conftest.$ac_ext >&5
12802
98418dba 12803ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 12804fi
35996d22
AS
12805rm -f conftest.err conftest.$ac_objext \
12806 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12807LIBS=$ac_check_lib_save_LIBS
12808fi
c0d27fcc 12809echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
12810echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
12811if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
12812 HAVE_X_SM=yes
73b77ee5
GM
12813fi
12814
73b77ee5 12815fi
73b77ee5 12816
c0d27fcc
MR
12817
12818
98418dba 12819 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 12820
c0d27fcc 12821cat >>confdefs.h <<\_ACEOF
98418dba 12822#define HAVE_X_SM 1
c0d27fcc 12823_ACEOF
73b77ee5 12824
98418dba
CW
12825 case "$LIBS" in
12826 *-lSM*) ;;
12827 *) LIBS="-lSM -lICE $LIBS" ;;
12828 esac
73b77ee5 12829 fi
98418dba 12830fi
73b77ee5 12831
98418dba 12832# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 12833echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
12834echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
12835if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
12836 echo $ECHO_N "(cached) $ECHO_C" >&6
12837else
12838 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12839/* confdefs.h. */
12840_ACEOF
12841cat confdefs.h >>conftest.$ac_ext
12842cat >>conftest.$ac_ext <<_ACEOF
12843/* end confdefs.h. */
98418dba 12844#include <netdb.h>
503d2be0
AS
12845int
12846main ()
12847{
98418dba 12848return h_errno;
503d2be0
AS
12849 ;
12850 return 0;
12851}
12852_ACEOF
12853rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12854if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12855 (eval $ac_link) 2>conftest.er1
503d2be0 12856 ac_status=$?
35996d22
AS
12857 grep -v '^ *+' conftest.er1 >conftest.err
12858 rm -f conftest.er1
12859 cat conftest.err >&5
c0d27fcc 12860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12861 (exit $ac_status); } &&
c08e6004 12862 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
12863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12864 (eval $ac_try) 2>&5
12865 ac_status=$?
12866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12867 (exit $ac_status); }; } &&
12868 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12870 (eval $ac_try) 2>&5
12871 ac_status=$?
c0d27fcc 12872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12873 (exit $ac_status); }; }; then
98418dba 12874 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 12875else
503d2be0 12876 echo "$as_me: failed program was:" >&5
19650fd6
AS
12877sed 's/^/| /' conftest.$ac_ext >&5
12878
98418dba 12879emacs_cv_netdb_declares_h_errno=no
73b77ee5 12880fi
35996d22
AS
12881rm -f conftest.err conftest.$ac_objext \
12882 conftest$ac_exeext conftest.$ac_ext
98418dba 12883fi
c0d27fcc 12884echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
12885echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
12886if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 12887
c0d27fcc 12888cat >>confdefs.h <<\_ACEOF
98418dba 12889#define HAVE_H_ERRNO 1
c0d27fcc 12890_ACEOF
73b77ee5 12891
98418dba
CW
12892fi
12893
12894# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12895# for constant arguments. Useless!
c0d27fcc 12896echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
12897echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
12898if test "${ac_cv_working_alloca_h+set}" = set; then
12899 echo $ECHO_N "(cached) $ECHO_C" >&6
12900else
12901 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12902/* confdefs.h. */
12903_ACEOF
12904cat confdefs.h >>conftest.$ac_ext
12905cat >>conftest.$ac_ext <<_ACEOF
12906/* end confdefs.h. */
98418dba 12907#include <alloca.h>
503d2be0
AS
12908int
12909main ()
12910{
98418dba 12911char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
12912 ;
12913 return 0;
12914}
12915_ACEOF
12916rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12917if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12918 (eval $ac_link) 2>conftest.er1
503d2be0 12919 ac_status=$?
35996d22
AS
12920 grep -v '^ *+' conftest.er1 >conftest.err
12921 rm -f conftest.er1
12922 cat conftest.err >&5
c0d27fcc 12923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12924 (exit $ac_status); } &&
c08e6004 12925 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
12926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12927 (eval $ac_try) 2>&5
12928 ac_status=$?
12929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12930 (exit $ac_status); }; } &&
12931 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12933 (eval $ac_try) 2>&5
12934 ac_status=$?
c0d27fcc 12935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12936 (exit $ac_status); }; }; then
98418dba 12937 ac_cv_working_alloca_h=yes
73b77ee5 12938else
503d2be0 12939 echo "$as_me: failed program was:" >&5
19650fd6
AS
12940sed 's/^/| /' conftest.$ac_ext >&5
12941
98418dba 12942ac_cv_working_alloca_h=no
73b77ee5 12943fi
35996d22
AS
12944rm -f conftest.err conftest.$ac_objext \
12945 conftest$ac_exeext conftest.$ac_ext
98418dba 12946fi
c0d27fcc 12947echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
12948echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
12949if test $ac_cv_working_alloca_h = yes; then
73b77ee5 12950
c0d27fcc 12951cat >>confdefs.h <<\_ACEOF
98418dba 12952#define HAVE_ALLOCA_H 1
c0d27fcc 12953_ACEOF
98418dba
CW
12954
12955fi
12956
c0d27fcc 12957echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
12958echo $ECHO_N "checking for alloca... $ECHO_C" >&6
12959if test "${ac_cv_func_alloca_works+set}" = set; then
12960 echo $ECHO_N "(cached) $ECHO_C" >&6
12961else
503d2be0 12962 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12963/* confdefs.h. */
12964_ACEOF
12965cat confdefs.h >>conftest.$ac_ext
12966cat >>conftest.$ac_ext <<_ACEOF
12967/* end confdefs.h. */
98418dba
CW
12968#ifdef __GNUC__
12969# define alloca __builtin_alloca
12970#else
12971# ifdef _MSC_VER
12972# include <malloc.h>
12973# define alloca _alloca
12974# else
12975# if HAVE_ALLOCA_H
12976# include <alloca.h>
12977# else
12978# ifdef _AIX
12979 #pragma alloca
12980# else
12981# ifndef alloca /* predefined by HP cc +Olibcalls */
12982char *alloca ();
12983# endif
12984# endif
12985# endif
12986# endif
12987#endif
12988
503d2be0
AS
12989int
12990main ()
12991{
98418dba 12992char *p = (char *) alloca (1);
503d2be0
AS
12993 ;
12994 return 0;
12995}
12996_ACEOF
12997rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12998if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12999 (eval $ac_link) 2>conftest.er1
503d2be0 13000 ac_status=$?
35996d22
AS
13001 grep -v '^ *+' conftest.er1 >conftest.err
13002 rm -f conftest.er1
13003 cat conftest.err >&5
c0d27fcc 13004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13005 (exit $ac_status); } &&
c08e6004 13006 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13008 (eval $ac_try) 2>&5
13009 ac_status=$?
13010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13011 (exit $ac_status); }; } &&
13012 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13014 (eval $ac_try) 2>&5
13015 ac_status=$?
c0d27fcc 13016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13017 (exit $ac_status); }; }; then
98418dba 13018 ac_cv_func_alloca_works=yes
ac95a621 13019else
503d2be0 13020 echo "$as_me: failed program was:" >&5
19650fd6
AS
13021sed 's/^/| /' conftest.$ac_ext >&5
13022
98418dba 13023ac_cv_func_alloca_works=no
ac95a621 13024fi
35996d22
AS
13025rm -f conftest.err conftest.$ac_objext \
13026 conftest$ac_exeext conftest.$ac_ext
98418dba 13027fi
c0d27fcc 13028echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 13029echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 13030
98418dba
CW
13031if test $ac_cv_func_alloca_works = yes; then
13032
c0d27fcc 13033cat >>confdefs.h <<\_ACEOF
98418dba 13034#define HAVE_ALLOCA 1
c0d27fcc 13035_ACEOF
98418dba
CW
13036
13037else
13038 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13039# that cause trouble. Some versions do not even contain alloca or
13040# contain a buggy version. If you still want to use their alloca,
13041# use ar to extract alloca.o from them instead of compiling alloca.c.
13042
13043ALLOCA=alloca.$ac_objext
13044
c0d27fcc 13045cat >>confdefs.h <<\_ACEOF
98418dba 13046#define C_ALLOCA 1
c0d27fcc 13047_ACEOF
98418dba 13048
c0d27fcc
MR
13049
13050echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
13051echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
13052if test "${ac_cv_os_cray+set}" = set; then
13053 echo $ECHO_N "(cached) $ECHO_C" >&6
13054else
13055 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13056/* confdefs.h. */
13057_ACEOF
13058cat confdefs.h >>conftest.$ac_ext
13059cat >>conftest.$ac_ext <<_ACEOF
13060/* end confdefs.h. */
98418dba
CW
13061#if defined(CRAY) && ! defined(CRAY2)
13062webecray
13063#else
13064wenotbecray
13065#endif
13066
13067_ACEOF
13068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13069 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
13070 ac_cv_os_cray=yes
13071else
13072 ac_cv_os_cray=no
13073fi
13074rm -f conftest*
ac95a621 13075
98418dba 13076fi
c0d27fcc 13077echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
13078echo "${ECHO_T}$ac_cv_os_cray" >&6
13079if test $ac_cv_os_cray = yes; then
13080 for ac_func in _getb67 GETB67 getb67; do
13081 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13082echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
13083echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13084if eval "test \"\${$as_ac_var+set}\" = set"; then
13085 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13086else
503d2be0 13087 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13088/* confdefs.h. */
13089_ACEOF
13090cat confdefs.h >>conftest.$ac_ext
13091cat >>conftest.$ac_ext <<_ACEOF
13092/* end confdefs.h. */
35996d22
AS
13093/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13094 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13095#define $ac_func innocuous_$ac_func
13096
73b77ee5 13097/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13098 which can conflict with char $ac_func (); below.
13099 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13100 <limits.h> exists even on freestanding compilers. */
35996d22 13101
19650fd6
AS
13102#ifdef __STDC__
13103# include <limits.h>
13104#else
13105# include <assert.h>
13106#endif
35996d22
AS
13107
13108#undef $ac_func
13109
73b77ee5 13110/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13111#ifdef __cplusplus
13112extern "C"
19650fd6 13113{
503d2be0 13114#endif
73b77ee5 13115/* We use char because int might match the return type of a gcc2
503d2be0
AS
13116 builtin and then its argument prototype would still apply. */
13117char $ac_func ();
73b77ee5
GM
13118/* The GNU C library defines this for functions which it implements
13119 to always fail with ENOSYS. Some functions are actually named
13120 something starting with __ and the normal name is an alias. */
13121#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13122choke me
13123#else
19650fd6
AS
13124char (*f) () = $ac_func;
13125#endif
13126#ifdef __cplusplus
13127}
73b77ee5
GM
13128#endif
13129
19650fd6
AS
13130int
13131main ()
13132{
13133return f != $ac_func;
503d2be0
AS
13134 ;
13135 return 0;
13136}
13137_ACEOF
13138rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13139if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13140 (eval $ac_link) 2>conftest.er1
503d2be0 13141 ac_status=$?
35996d22
AS
13142 grep -v '^ *+' conftest.er1 >conftest.err
13143 rm -f conftest.er1
13144 cat conftest.err >&5
c0d27fcc 13145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13146 (exit $ac_status); } &&
c08e6004 13147 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13149 (eval $ac_try) 2>&5
13150 ac_status=$?
13151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13152 (exit $ac_status); }; } &&
13153 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13155 (eval $ac_try) 2>&5
13156 ac_status=$?
c0d27fcc 13157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13158 (exit $ac_status); }; }; then
13159 eval "$as_ac_var=yes"
13160else
13161 echo "$as_me: failed program was:" >&5
19650fd6
AS
13162sed 's/^/| /' conftest.$ac_ext >&5
13163
503d2be0
AS
13164eval "$as_ac_var=no"
13165fi
35996d22
AS
13166rm -f conftest.err conftest.$ac_objext \
13167 conftest$ac_exeext conftest.$ac_ext
503d2be0 13168fi
c0d27fcc 13169echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13170echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13171if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 13172
c0d27fcc 13173cat >>confdefs.h <<_ACEOF
98418dba 13174#define CRAY_STACKSEG_END $ac_func
c0d27fcc 13175_ACEOF
98418dba
CW
13176
13177 break
73b77ee5 13178fi
73b77ee5 13179
98418dba 13180 done
73b77ee5
GM
13181fi
13182
c0d27fcc 13183echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
13184echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
13185if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 13186 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
13187else
13188 if test "$cross_compiling" = yes; then
13189 ac_cv_c_stack_direction=0
73b77ee5 13190else
503d2be0 13191 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13192/* confdefs.h. */
13193_ACEOF
13194cat confdefs.h >>conftest.$ac_ext
13195cat >>conftest.$ac_ext <<_ACEOF
13196/* end confdefs.h. */
503d2be0 13197int
98418dba 13198find_stack_direction ()
503d2be0 13199{
98418dba
CW
13200 static char *addr = 0;
13201 auto char dummy;
13202 if (addr == 0)
13203 {
13204 addr = &dummy;
13205 return find_stack_direction ();
13206 }
73b77ee5 13207 else
98418dba
CW
13208 return (&dummy > addr) ? 1 : -1;
13209}
ba4481b5 13210
503d2be0
AS
13211int
13212main ()
13213{
98418dba 13214 exit (find_stack_direction () < 0);
503d2be0
AS
13215}
13216_ACEOF
98418dba 13217rm -f conftest$ac_exeext
c0d27fcc 13218if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13219 (eval $ac_link) 2>&5
13220 ac_status=$?
c0d27fcc 13221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13222 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 13223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13224 (eval $ac_try) 2>&5
13225 ac_status=$?
c0d27fcc 13226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13227 (exit $ac_status); }; }; then
98418dba 13228 ac_cv_c_stack_direction=1
ba4481b5 13229else
98418dba
CW
13230 echo "$as_me: program exited with status $ac_status" >&5
13231echo "$as_me: failed program was:" >&5
19650fd6
AS
13232sed 's/^/| /' conftest.$ac_ext >&5
13233
c0d27fcc 13234( exit $ac_status )
98418dba 13235ac_cv_c_stack_direction=-1
ba4481b5 13236fi
35996d22 13237rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 13238fi
98418dba 13239fi
c0d27fcc 13240echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
13241echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
13242
c0d27fcc 13243cat >>confdefs.h <<_ACEOF
98418dba 13244#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
13245_ACEOF
13246
ba4481b5 13247
ba4481b5
DL
13248fi
13249
c0d27fcc 13250
98418dba
CW
13251# fmod, logb, and frexp are found in -lm on most systems.
13252# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
13253
c0d27fcc 13254echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
13255echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
13256if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 13257 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13258else
98418dba
CW
13259 ac_check_lib_save_LIBS=$LIBS
13260LIBS="-lm $LIBS"
13261cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13262/* confdefs.h. */
13263_ACEOF
13264cat confdefs.h >>conftest.$ac_ext
13265cat >>conftest.$ac_ext <<_ACEOF
13266/* end confdefs.h. */
ba4481b5 13267
98418dba
CW
13268/* Override any gcc2 internal prototype to avoid an error. */
13269#ifdef __cplusplus
13270extern "C"
13271#endif
13272/* We use char because int might match the return type of a gcc2
13273 builtin and then its argument prototype would still apply. */
13274char sqrt ();
503d2be0
AS
13275int
13276main ()
13277{
98418dba 13278sqrt ();
503d2be0
AS
13279 ;
13280 return 0;
13281}
13282_ACEOF
13283rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13285 (eval $ac_link) 2>conftest.er1
503d2be0 13286 ac_status=$?
35996d22
AS
13287 grep -v '^ *+' conftest.er1 >conftest.err
13288 rm -f conftest.er1
13289 cat conftest.err >&5
c0d27fcc 13290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13291 (exit $ac_status); } &&
c08e6004 13292 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13294 (eval $ac_try) 2>&5
13295 ac_status=$?
13296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13297 (exit $ac_status); }; } &&
13298 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13300 (eval $ac_try) 2>&5
13301 ac_status=$?
c0d27fcc 13302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13303 (exit $ac_status); }; }; then
98418dba 13304 ac_cv_lib_m_sqrt=yes
ba4481b5 13305else
503d2be0 13306 echo "$as_me: failed program was:" >&5
19650fd6
AS
13307sed 's/^/| /' conftest.$ac_ext >&5
13308
98418dba 13309ac_cv_lib_m_sqrt=no
ba4481b5 13310fi
35996d22
AS
13311rm -f conftest.err conftest.$ac_objext \
13312 conftest$ac_exeext conftest.$ac_ext
98418dba 13313LIBS=$ac_check_lib_save_LIBS
ba4481b5 13314fi
c0d27fcc 13315echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
13316echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
13317if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 13318 cat >>confdefs.h <<_ACEOF
98418dba 13319#define HAVE_LIBM 1
c0d27fcc 13320_ACEOF
98418dba
CW
13321
13322 LIBS="-lm $LIBS"
ba4481b5 13323
ba4481b5
DL
13324fi
13325
c0d27fcc 13326
55597d70
DL
13327# Check for mail-locking functions in a "mail" library. Probably this should
13328# have the same check as for liblockfile below.
98418dba 13329
c0d27fcc 13330echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
13331echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
13332if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 13333 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13334else
98418dba
CW
13335 ac_check_lib_save_LIBS=$LIBS
13336LIBS="-lmail $LIBS"
13337cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13338/* confdefs.h. */
13339_ACEOF
13340cat confdefs.h >>conftest.$ac_ext
13341cat >>conftest.$ac_ext <<_ACEOF
13342/* end confdefs.h. */
98418dba
CW
13343
13344/* Override any gcc2 internal prototype to avoid an error. */
13345#ifdef __cplusplus
13346extern "C"
13347#endif
13348/* We use char because int might match the return type of a gcc2
13349 builtin and then its argument prototype would still apply. */
13350char maillock ();
503d2be0
AS
13351int
13352main ()
13353{
98418dba 13354maillock ();
503d2be0
AS
13355 ;
13356 return 0;
13357}
13358_ACEOF
13359rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13360if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13361 (eval $ac_link) 2>conftest.er1
503d2be0 13362 ac_status=$?
35996d22
AS
13363 grep -v '^ *+' conftest.er1 >conftest.err
13364 rm -f conftest.er1
13365 cat conftest.err >&5
c0d27fcc 13366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13367 (exit $ac_status); } &&
c08e6004 13368 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13370 (eval $ac_try) 2>&5
13371 ac_status=$?
13372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13373 (exit $ac_status); }; } &&
13374 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13376 (eval $ac_try) 2>&5
13377 ac_status=$?
c0d27fcc 13378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13379 (exit $ac_status); }; }; then
98418dba 13380 ac_cv_lib_mail_maillock=yes
ba4481b5 13381else
503d2be0 13382 echo "$as_me: failed program was:" >&5
19650fd6
AS
13383sed 's/^/| /' conftest.$ac_ext >&5
13384
98418dba 13385ac_cv_lib_mail_maillock=no
ba4481b5 13386fi
35996d22
AS
13387rm -f conftest.err conftest.$ac_objext \
13388 conftest$ac_exeext conftest.$ac_ext
98418dba 13389LIBS=$ac_check_lib_save_LIBS
ba4481b5 13390fi
c0d27fcc 13391echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
13392echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
13393if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 13394 cat >>confdefs.h <<_ACEOF
98418dba 13395#define HAVE_LIBMAIL 1
c0d27fcc 13396_ACEOF
ba4481b5 13397
98418dba 13398 LIBS="-lmail $LIBS"
ba4481b5 13399
98418dba 13400fi
ba4481b5 13401
c0d27fcc
MR
13402
13403echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
13404echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
13405if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 13406 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13407else
503d2be0 13408 ac_check_lib_save_LIBS=$LIBS
98418dba 13409LIBS="-llockfile $LIBS"
503d2be0 13410cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13411/* confdefs.h. */
13412_ACEOF
13413cat confdefs.h >>conftest.$ac_ext
13414cat >>conftest.$ac_ext <<_ACEOF
13415/* end confdefs.h. */
503d2be0 13416
ba4481b5 13417/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13418#ifdef __cplusplus
13419extern "C"
13420#endif
ba4481b5 13421/* We use char because int might match the return type of a gcc2
503d2be0 13422 builtin and then its argument prototype would still apply. */
98418dba 13423char maillock ();
503d2be0
AS
13424int
13425main ()
13426{
98418dba 13427maillock ();
503d2be0
AS
13428 ;
13429 return 0;
13430}
13431_ACEOF
13432rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13433if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13434 (eval $ac_link) 2>conftest.er1
503d2be0 13435 ac_status=$?
35996d22
AS
13436 grep -v '^ *+' conftest.er1 >conftest.err
13437 rm -f conftest.er1
13438 cat conftest.err >&5
c0d27fcc 13439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13440 (exit $ac_status); } &&
c08e6004 13441 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13443 (eval $ac_try) 2>&5
13444 ac_status=$?
13445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13446 (exit $ac_status); }; } &&
13447 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13449 (eval $ac_try) 2>&5
13450 ac_status=$?
c0d27fcc 13451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13452 (exit $ac_status); }; }; then
98418dba 13453 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
13454else
13455 echo "$as_me: failed program was:" >&5
19650fd6
AS
13456sed 's/^/| /' conftest.$ac_ext >&5
13457
98418dba
CW
13458ac_cv_lib_lockfile_maillock=no
13459fi
35996d22
AS
13460rm -f conftest.err conftest.$ac_objext \
13461 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13462LIBS=$ac_check_lib_save_LIBS
13463fi
c0d27fcc 13464echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
13465echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
13466if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 13467 cat >>confdefs.h <<_ACEOF
98418dba 13468#define HAVE_LIBLOCKFILE 1
c0d27fcc 13469_ACEOF
98418dba
CW
13470
13471 LIBS="-llockfile $LIBS"
13472
13473fi
13474
13475# If we have the shared liblockfile, assume we must use it for mail
13476# locking (e.g. Debian). If we couldn't link against liblockfile
13477# (no liblockfile.a installed), ensure that we don't need to.
13478if test "$ac_cv_lib_lockfile_maillock" = no; then
13479 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13480set dummy liblockfile.so; ac_word=$2
c0d27fcc 13481echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
13482echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13483if test "${ac_cv_prog_liblockfile+set}" = set; then
13484 echo $ECHO_N "(cached) $ECHO_C" >&6
13485else
13486 if test -n "$liblockfile"; then
13487 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13488else
c0d27fcc 13489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
13490as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13491for as_dir in $as_dummy
c0d27fcc
MR
13492do
13493 IFS=$as_save_IFS
13494 test -z "$as_dir" && as_dir=.
13495 for ac_exec_ext in '' $ac_executable_extensions; do
13496 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13497 ac_cv_prog_liblockfile="yes"
13498 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13499 break 2
13500 fi
13501done
98418dba
CW
13502done
13503
13504 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 13505fi
503d2be0 13506fi
98418dba
CW
13507liblockfile=$ac_cv_prog_liblockfile
13508if test -n "$liblockfile"; then
c0d27fcc 13509 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
13510echo "${ECHO_T}$liblockfile" >&6
13511else
c0d27fcc 13512 echo "$as_me:$LINENO: result: no" >&5
98418dba 13513echo "${ECHO_T}no" >&6
ba4481b5
DL
13514fi
13515
98418dba 13516 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 13517 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
13518This probably means that movemail could lose mail.
13519There may be a \`development' package to install containing liblockfile." >&5
13520echo "$as_me: error: Shared liblockfile found but can't link against it.
13521This probably means that movemail could lose mail.
13522There may be a \`development' package to install containing liblockfile." >&2;}
13523 { (exit 1); exit 1; }; }
98418dba 13524 else :
55597d70 13525 fi
98418dba 13526fi
503d2be0 13527
98418dba
CW
13528for ac_func in touchlock
13529do
13530as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13531echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
13532echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13533if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13534 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 13535else
98418dba 13536 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13537/* confdefs.h. */
13538_ACEOF
13539cat confdefs.h >>conftest.$ac_ext
13540cat >>conftest.$ac_ext <<_ACEOF
13541/* end confdefs.h. */
35996d22
AS
13542/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13543 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13544#define $ac_func innocuous_$ac_func
13545
98418dba 13546/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13547 which can conflict with char $ac_func (); below.
13548 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13549 <limits.h> exists even on freestanding compilers. */
35996d22 13550
19650fd6
AS
13551#ifdef __STDC__
13552# include <limits.h>
13553#else
13554# include <assert.h>
13555#endif
35996d22
AS
13556
13557#undef $ac_func
13558
457b792c 13559/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13560#ifdef __cplusplus
13561extern "C"
19650fd6 13562{
503d2be0 13563#endif
457b792c 13564/* We use char because int might match the return type of a gcc2
503d2be0 13565 builtin and then its argument prototype would still apply. */
98418dba 13566char $ac_func ();
98418dba
CW
13567/* The GNU C library defines this for functions which it implements
13568 to always fail with ENOSYS. Some functions are actually named
13569 something starting with __ and the normal name is an alias. */
13570#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13571choke me
13572#else
19650fd6
AS
13573char (*f) () = $ac_func;
13574#endif
13575#ifdef __cplusplus
13576}
cd958eb3
MB
13577#endif
13578
19650fd6
AS
13579int
13580main ()
13581{
13582return f != $ac_func;
503d2be0
AS
13583 ;
13584 return 0;
13585}
13586_ACEOF
13587rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13588if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13589 (eval $ac_link) 2>conftest.er1
503d2be0 13590 ac_status=$?
35996d22
AS
13591 grep -v '^ *+' conftest.er1 >conftest.err
13592 rm -f conftest.er1
13593 cat conftest.err >&5
c0d27fcc 13594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13595 (exit $ac_status); } &&
c08e6004 13596 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13598 (eval $ac_try) 2>&5
13599 ac_status=$?
13600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13601 (exit $ac_status); }; } &&
13602 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13604 (eval $ac_try) 2>&5
13605 ac_status=$?
c0d27fcc 13606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13607 (exit $ac_status); }; }; then
98418dba 13608 eval "$as_ac_var=yes"
503d2be0
AS
13609else
13610 echo "$as_me: failed program was:" >&5
19650fd6
AS
13611sed 's/^/| /' conftest.$ac_ext >&5
13612
98418dba 13613eval "$as_ac_var=no"
503d2be0 13614fi
35996d22
AS
13615rm -f conftest.err conftest.$ac_objext \
13616 conftest$ac_exeext conftest.$ac_ext
503d2be0 13617fi
c0d27fcc 13618echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
13619echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13620if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13621 cat >>confdefs.h <<_ACEOF
98418dba 13622#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13623_ACEOF
457b792c 13624
457b792c 13625fi
98418dba 13626done
457b792c 13627
c0d27fcc 13628
98418dba
CW
13629for ac_header in maillock.h
13630do
13631as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
13632if eval "test \"\${$as_ac_Header+set}\" = set"; then
13633 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
13634echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13635if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 13636 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13637fi
13638echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13639echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 13640else
c0d27fcc
MR
13641 # Is the header compilable?
13642echo "$as_me:$LINENO: checking $ac_header usability" >&5
13643echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13644cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13645/* confdefs.h. */
13646_ACEOF
13647cat confdefs.h >>conftest.$ac_ext
13648cat >>conftest.$ac_ext <<_ACEOF
13649/* end confdefs.h. */
c0d27fcc
MR
13650$ac_includes_default
13651#include <$ac_header>
13652_ACEOF
13653rm -f conftest.$ac_objext
13654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 13655 (eval $ac_compile) 2>conftest.er1
c0d27fcc 13656 ac_status=$?
35996d22
AS
13657 grep -v '^ *+' conftest.er1 >conftest.err
13658 rm -f conftest.er1
13659 cat conftest.err >&5
c0d27fcc
MR
13660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13661 (exit $ac_status); } &&
c08e6004 13662 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13664 (eval $ac_try) 2>&5
13665 ac_status=$?
13666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13667 (exit $ac_status); }; } &&
13668 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13670 (eval $ac_try) 2>&5
13671 ac_status=$?
13672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13673 (exit $ac_status); }; }; then
13674 ac_header_compiler=yes
13675else
13676 echo "$as_me: failed program was:" >&5
19650fd6
AS
13677sed 's/^/| /' conftest.$ac_ext >&5
13678
c0d27fcc
MR
13679ac_header_compiler=no
13680fi
35996d22 13681rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
13682echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13683echo "${ECHO_T}$ac_header_compiler" >&6
13684
13685# Is the header present?
13686echo "$as_me:$LINENO: checking $ac_header presence" >&5
13687echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13688cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13689/* confdefs.h. */
13690_ACEOF
13691cat confdefs.h >>conftest.$ac_ext
13692cat >>conftest.$ac_ext <<_ACEOF
13693/* end confdefs.h. */
98418dba 13694#include <$ac_header>
503d2be0 13695_ACEOF
c0d27fcc 13696if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 13697 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 13698 ac_status=$?
6bae0ccf 13699 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13700 rm -f conftest.er1
13701 cat conftest.err >&5
c0d27fcc 13702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13703 (exit $ac_status); } >/dev/null; then
13704 if test -s conftest.err; then
13705 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 13706 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
13707 else
13708 ac_cpp_err=
13709 fi
503d2be0 13710else
98418dba 13711 ac_cpp_err=yes
503d2be0 13712fi
98418dba 13713if test -z "$ac_cpp_err"; then
c0d27fcc 13714 ac_header_preproc=yes
98418dba
CW
13715else
13716 echo "$as_me: failed program was:" >&5
19650fd6
AS
13717sed 's/^/| /' conftest.$ac_ext >&5
13718
c0d27fcc 13719 ac_header_preproc=no
503d2be0 13720fi
98418dba 13721rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13722echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13723echo "${ECHO_T}$ac_header_preproc" >&6
13724
13725# So? What about this header?
35996d22
AS
13726case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13727 yes:no: )
c0d27fcc
MR
13728 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13729echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
13730 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13731echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13732 ac_header_preproc=yes
19650fd6 13733 ;;
35996d22 13734 no:yes:* )
c0d27fcc
MR
13735 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13736echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
13737 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13738echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13739 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13740echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13741 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13742echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13743 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13744echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
13745 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13746echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
13747 (
13748 cat <<\_ASBOX
35996d22
AS
13749## ------------------------------------------ ##
13750## Report this to the AC_PACKAGE_NAME lists. ##
13751## ------------------------------------------ ##
19650fd6
AS
13752_ASBOX
13753 ) |
13754 sed "s/^/$as_me: WARNING: /" >&2
13755 ;;
c0d27fcc
MR
13756esac
13757echo "$as_me:$LINENO: checking for $ac_header" >&5
13758echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13759if eval "test \"\${$as_ac_Header+set}\" = set"; then
13760 echo $ECHO_N "(cached) $ECHO_C" >&6
13761else
35996d22 13762 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 13763fi
c0d27fcc 13764echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 13765echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
13766
13767fi
98418dba 13768if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 13769 cat >>confdefs.h <<_ACEOF
98418dba 13770#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 13771_ACEOF
48d4b120 13772
ba4481b5 13773fi
c0d27fcc 13774
98418dba
CW
13775done
13776
c0d27fcc
MR
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
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
22044edf
DL
13832
13833
c0d27fcc 13834
b0e44248
RB
13835
13836
973a76b1
DL
13837
13838
13839
cd958eb3 13840
25ca0bca 13841
ea92fc9f 13842
c0d27fcc
MR
13843
13844
98418dba 13845for ac_func in gethostname getdomainname dup2 \
ea92fc9f 13846rename closedir mkdir rmdir sysinfo getrusage \
98418dba
CW
13847random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
13848strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 13849utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
13850__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
13851sendto recvfrom getsockopt setsockopt getsockname getpeername \
b0e44248 13852gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
4489ece2 13853memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
13854do
13855as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13856echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
13857echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13858if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13859 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13860else
503d2be0 13861 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13862/* confdefs.h. */
13863_ACEOF
13864cat confdefs.h >>conftest.$ac_ext
13865cat >>conftest.$ac_ext <<_ACEOF
13866/* end confdefs.h. */
35996d22
AS
13867/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13868 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13869#define $ac_func innocuous_$ac_func
13870
98418dba 13871/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13872 which can conflict with char $ac_func (); below.
13873 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13874 <limits.h> exists even on freestanding compilers. */
35996d22 13875
19650fd6
AS
13876#ifdef __STDC__
13877# include <limits.h>
13878#else
13879# include <assert.h>
13880#endif
35996d22
AS
13881
13882#undef $ac_func
13883
ba4481b5 13884/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13885#ifdef __cplusplus
13886extern "C"
19650fd6 13887{
503d2be0 13888#endif
ba4481b5 13889/* We use char because int might match the return type of a gcc2
503d2be0 13890 builtin and then its argument prototype would still apply. */
98418dba 13891char $ac_func ();
98418dba
CW
13892/* The GNU C library defines this for functions which it implements
13893 to always fail with ENOSYS. Some functions are actually named
13894 something starting with __ and the normal name is an alias. */
13895#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13896choke me
13897#else
19650fd6
AS
13898char (*f) () = $ac_func;
13899#endif
13900#ifdef __cplusplus
13901}
98418dba
CW
13902#endif
13903
19650fd6
AS
13904int
13905main ()
13906{
13907return f != $ac_func;
503d2be0
AS
13908 ;
13909 return 0;
13910}
13911_ACEOF
13912rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13913if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13914 (eval $ac_link) 2>conftest.er1
503d2be0 13915 ac_status=$?
35996d22
AS
13916 grep -v '^ *+' conftest.er1 >conftest.err
13917 rm -f conftest.er1
13918 cat conftest.err >&5
c0d27fcc 13919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13920 (exit $ac_status); } &&
c08e6004 13921 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13923 (eval $ac_try) 2>&5
13924 ac_status=$?
13925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13926 (exit $ac_status); }; } &&
13927 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13929 (eval $ac_try) 2>&5
13930 ac_status=$?
c0d27fcc 13931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13932 (exit $ac_status); }; }; then
98418dba 13933 eval "$as_ac_var=yes"
503d2be0
AS
13934else
13935 echo "$as_me: failed program was:" >&5
19650fd6
AS
13936sed 's/^/| /' conftest.$ac_ext >&5
13937
98418dba 13938eval "$as_ac_var=no"
503d2be0 13939fi
35996d22
AS
13940rm -f conftest.err conftest.$ac_objext \
13941 conftest$ac_exeext conftest.$ac_ext
ba4481b5 13942fi
c0d27fcc 13943echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
13944echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13945if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13946 cat >>confdefs.h <<_ACEOF
98418dba 13947#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13948_ACEOF
ba4481b5 13949
ba4481b5 13950fi
98418dba 13951done
ba4481b5 13952
c0d27fcc
MR
13953
13954
98418dba
CW
13955for ac_header in sys/un.h
13956do
13957as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
13958if eval "test \"\${$as_ac_Header+set}\" = set"; then
13959 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
13960echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13961if eval "test \"\${$as_ac_Header+set}\" = set"; then
13962 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13963fi
13964echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13965echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 13966else
c0d27fcc
MR
13967 # Is the header compilable?
13968echo "$as_me:$LINENO: checking $ac_header usability" >&5
13969echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13970cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13971/* confdefs.h. */
13972_ACEOF
13973cat confdefs.h >>conftest.$ac_ext
13974cat >>conftest.$ac_ext <<_ACEOF
13975/* end confdefs.h. */
c0d27fcc
MR
13976$ac_includes_default
13977#include <$ac_header>
13978_ACEOF
13979rm -f conftest.$ac_objext
13980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 13981 (eval $ac_compile) 2>conftest.er1
c0d27fcc 13982 ac_status=$?
35996d22
AS
13983 grep -v '^ *+' conftest.er1 >conftest.err
13984 rm -f conftest.er1
13985 cat conftest.err >&5
c0d27fcc
MR
13986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13987 (exit $ac_status); } &&
c08e6004 13988 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
13989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13990 (eval $ac_try) 2>&5
13991 ac_status=$?
13992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13993 (exit $ac_status); }; } &&
13994 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13996 (eval $ac_try) 2>&5
13997 ac_status=$?
13998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13999 (exit $ac_status); }; }; then
14000 ac_header_compiler=yes
14001else
14002 echo "$as_me: failed program was:" >&5
19650fd6
AS
14003sed 's/^/| /' conftest.$ac_ext >&5
14004
c0d27fcc
MR
14005ac_header_compiler=no
14006fi
35996d22 14007rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14008echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14009echo "${ECHO_T}$ac_header_compiler" >&6
14010
14011# Is the header present?
14012echo "$as_me:$LINENO: checking $ac_header presence" >&5
14013echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14014cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14015/* confdefs.h. */
14016_ACEOF
14017cat confdefs.h >>conftest.$ac_ext
14018cat >>conftest.$ac_ext <<_ACEOF
14019/* end confdefs.h. */
98418dba 14020#include <$ac_header>
503d2be0 14021_ACEOF
c0d27fcc 14022if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14023 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14024 ac_status=$?
6bae0ccf 14025 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14026 rm -f conftest.er1
14027 cat conftest.err >&5
c0d27fcc 14028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14029 (exit $ac_status); } >/dev/null; then
14030 if test -s conftest.err; then
14031 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 14032 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14033 else
14034 ac_cpp_err=
14035 fi
14036else
14037 ac_cpp_err=yes
14038fi
14039if test -z "$ac_cpp_err"; then
c0d27fcc 14040 ac_header_preproc=yes
ba4481b5 14041else
503d2be0 14042 echo "$as_me: failed program was:" >&5
19650fd6
AS
14043sed 's/^/| /' conftest.$ac_ext >&5
14044
c0d27fcc 14045 ac_header_preproc=no
ba4481b5 14046fi
503d2be0 14047rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14048echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14049echo "${ECHO_T}$ac_header_preproc" >&6
14050
14051# So? What about this header?
35996d22
AS
14052case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14053 yes:no: )
c0d27fcc
MR
14054 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14055echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
14056 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14057echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14058 ac_header_preproc=yes
19650fd6 14059 ;;
35996d22 14060 no:yes:* )
c0d27fcc
MR
14061 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14062echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
14063 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14064echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14065 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14066echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14067 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14068echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14069 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14070echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
14071 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14072echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14073 (
14074 cat <<\_ASBOX
35996d22
AS
14075## ------------------------------------------ ##
14076## Report this to the AC_PACKAGE_NAME lists. ##
14077## ------------------------------------------ ##
19650fd6
AS
14078_ASBOX
14079 ) |
14080 sed "s/^/$as_me: WARNING: /" >&2
14081 ;;
c0d27fcc
MR
14082esac
14083echo "$as_me:$LINENO: checking for $ac_header" >&5
14084echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14085if eval "test \"\${$as_ac_Header+set}\" = set"; then
14086 echo $ECHO_N "(cached) $ECHO_C" >&6
14087else
35996d22 14088 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14089fi
c0d27fcc 14090echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 14091echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14092
14093fi
925c2f3f 14094if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14095 cat >>confdefs.h <<_ACEOF
925c2f3f 14096#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14097_ACEOF
503d2be0 14098
925c2f3f 14099fi
c0d27fcc 14100
925c2f3f
EZ
14101done
14102
c0d27fcc
MR
14103
14104
14105
35996d22
AS
14106
14107for ac_header in stdlib.h sys/time.h unistd.h
925c2f3f
EZ
14108do
14109as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14110if eval "test \"\${$as_ac_Header+set}\" = set"; then
14111 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
14112echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14113if eval "test \"\${$as_ac_Header+set}\" = set"; then
14114 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14115fi
14116echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14117echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 14118else
c0d27fcc
MR
14119 # Is the header compilable?
14120echo "$as_me:$LINENO: checking $ac_header usability" >&5
14121echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14122cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14123/* confdefs.h. */
14124_ACEOF
14125cat confdefs.h >>conftest.$ac_ext
14126cat >>conftest.$ac_ext <<_ACEOF
14127/* end confdefs.h. */
c0d27fcc
MR
14128$ac_includes_default
14129#include <$ac_header>
14130_ACEOF
14131rm -f conftest.$ac_objext
14132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 14133 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14134 ac_status=$?
35996d22
AS
14135 grep -v '^ *+' conftest.er1 >conftest.err
14136 rm -f conftest.er1
14137 cat conftest.err >&5
c0d27fcc
MR
14138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14139 (exit $ac_status); } &&
c08e6004 14140 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
14141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14142 (eval $ac_try) 2>&5
14143 ac_status=$?
14144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14145 (exit $ac_status); }; } &&
14146 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14148 (eval $ac_try) 2>&5
14149 ac_status=$?
14150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14151 (exit $ac_status); }; }; then
14152 ac_header_compiler=yes
14153else
14154 echo "$as_me: failed program was:" >&5
19650fd6
AS
14155sed 's/^/| /' conftest.$ac_ext >&5
14156
c0d27fcc
MR
14157ac_header_compiler=no
14158fi
35996d22 14159rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14160echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14161echo "${ECHO_T}$ac_header_compiler" >&6
14162
14163# Is the header present?
14164echo "$as_me:$LINENO: checking $ac_header presence" >&5
14165echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14166cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14167/* confdefs.h. */
14168_ACEOF
14169cat confdefs.h >>conftest.$ac_ext
14170cat >>conftest.$ac_ext <<_ACEOF
14171/* end confdefs.h. */
98418dba 14172#include <$ac_header>
503d2be0 14173_ACEOF
c0d27fcc 14174if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14175 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14176 ac_status=$?
6bae0ccf 14177 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14178 rm -f conftest.er1
14179 cat conftest.err >&5
c0d27fcc 14180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14181 (exit $ac_status); } >/dev/null; then
14182 if test -s conftest.err; then
14183 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 14184 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14185 else
14186 ac_cpp_err=
14187 fi
14188else
14189 ac_cpp_err=yes
14190fi
14191if test -z "$ac_cpp_err"; then
c0d27fcc 14192 ac_header_preproc=yes
98418dba
CW
14193else
14194 echo "$as_me: failed program was:" >&5
19650fd6
AS
14195sed 's/^/| /' conftest.$ac_ext >&5
14196
c0d27fcc 14197 ac_header_preproc=no
98418dba
CW
14198fi
14199rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14200echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14201echo "${ECHO_T}$ac_header_preproc" >&6
14202
14203# So? What about this header?
35996d22
AS
14204case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14205 yes:no: )
c0d27fcc
MR
14206 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14207echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
14208 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14209echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14210 ac_header_preproc=yes
19650fd6 14211 ;;
35996d22 14212 no:yes:* )
c0d27fcc
MR
14213 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14214echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
14215 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14216echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14217 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14218echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14219 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14220echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14221 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14222echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
14223 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14224echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14225 (
14226 cat <<\_ASBOX
35996d22
AS
14227## ------------------------------------------ ##
14228## Report this to the AC_PACKAGE_NAME lists. ##
14229## ------------------------------------------ ##
19650fd6
AS
14230_ASBOX
14231 ) |
14232 sed "s/^/$as_me: WARNING: /" >&2
14233 ;;
c0d27fcc
MR
14234esac
14235echo "$as_me:$LINENO: checking for $ac_header" >&5
14236echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14237if eval "test \"\${$as_ac_Header+set}\" = set"; then
14238 echo $ECHO_N "(cached) $ECHO_C" >&6
14239else
35996d22 14240 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 14241fi
c0d27fcc 14242echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14243echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14244
14245fi
98418dba 14246if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14247 cat >>confdefs.h <<_ACEOF
98418dba 14248#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14249_ACEOF
98418dba
CW
14250
14251fi
c0d27fcc 14252
98418dba
CW
14253done
14254
c0d27fcc 14255
98418dba
CW
14256for ac_func in alarm
14257do
14258as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14259echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14260echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14261if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14262 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14263else
98418dba 14264 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14265/* confdefs.h. */
14266_ACEOF
14267cat confdefs.h >>conftest.$ac_ext
14268cat >>conftest.$ac_ext <<_ACEOF
14269/* end confdefs.h. */
35996d22
AS
14270/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14271 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14272#define $ac_func innocuous_$ac_func
14273
98418dba 14274/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14275 which can conflict with char $ac_func (); below.
14276 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14277 <limits.h> exists even on freestanding compilers. */
35996d22 14278
19650fd6
AS
14279#ifdef __STDC__
14280# include <limits.h>
14281#else
14282# include <assert.h>
14283#endif
35996d22
AS
14284
14285#undef $ac_func
14286
ba4481b5 14287/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14288#ifdef __cplusplus
14289extern "C"
19650fd6 14290{
503d2be0 14291#endif
ba4481b5 14292/* We use char because int might match the return type of a gcc2
503d2be0 14293 builtin and then its argument prototype would still apply. */
98418dba 14294char $ac_func ();
98418dba
CW
14295/* The GNU C library defines this for functions which it implements
14296 to always fail with ENOSYS. Some functions are actually named
14297 something starting with __ and the normal name is an alias. */
14298#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14299choke me
14300#else
19650fd6
AS
14301char (*f) () = $ac_func;
14302#endif
14303#ifdef __cplusplus
14304}
98418dba
CW
14305#endif
14306
19650fd6
AS
14307int
14308main ()
14309{
14310return f != $ac_func;
503d2be0
AS
14311 ;
14312 return 0;
14313}
14314_ACEOF
14315rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14316if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14317 (eval $ac_link) 2>conftest.er1
503d2be0 14318 ac_status=$?
35996d22
AS
14319 grep -v '^ *+' conftest.er1 >conftest.err
14320 rm -f conftest.er1
14321 cat conftest.err >&5
c0d27fcc 14322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14323 (exit $ac_status); } &&
c08e6004 14324 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
14325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14326 (eval $ac_try) 2>&5
14327 ac_status=$?
14328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14329 (exit $ac_status); }; } &&
14330 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14332 (eval $ac_try) 2>&5
14333 ac_status=$?
c0d27fcc 14334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14335 (exit $ac_status); }; }; then
98418dba 14336 eval "$as_ac_var=yes"
503d2be0
AS
14337else
14338 echo "$as_me: failed program was:" >&5
19650fd6
AS
14339sed 's/^/| /' conftest.$ac_ext >&5
14340
98418dba 14341eval "$as_ac_var=no"
503d2be0 14342fi
35996d22
AS
14343rm -f conftest.err conftest.$ac_objext \
14344 conftest$ac_exeext conftest.$ac_ext
ffe36136 14345fi
c0d27fcc 14346echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14347echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14348if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14349 cat >>confdefs.h <<_ACEOF
98418dba 14350#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14351_ACEOF
ffe36136 14352
ba4481b5 14353fi
98418dba 14354done
ba4481b5 14355
c0d27fcc 14356echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
14357echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
14358if test "${ac_cv_func_working_mktime+set}" = set; then
14359 echo $ECHO_N "(cached) $ECHO_C" >&6
14360else
14361 if test "$cross_compiling" = yes; then
14362 ac_cv_func_working_mktime=no
14363else
14364 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14365/* confdefs.h. */
14366_ACEOF
14367cat confdefs.h >>conftest.$ac_ext
14368cat >>conftest.$ac_ext <<_ACEOF
14369/* end confdefs.h. */
98418dba
CW
14370/* Test program from Paul Eggert and Tony Leneis. */
14371#if TIME_WITH_SYS_TIME
14372# include <sys/time.h>
14373# include <time.h>
14374#else
14375# if HAVE_SYS_TIME_H
14376# include <sys/time.h>
14377# else
14378# include <time.h>
14379# endif
14380#endif
ba4481b5 14381
35996d22
AS
14382#if HAVE_STDLIB_H
14383# include <stdlib.h>
14384#endif
14385
98418dba
CW
14386#if HAVE_UNISTD_H
14387# include <unistd.h>
14388#endif
ba4481b5 14389
98418dba
CW
14390#if !HAVE_ALARM
14391# define alarm(X) /* empty */
14392#endif
df645f7c 14393
98418dba
CW
14394/* Work around redefinition to rpl_putenv by other config tests. */
14395#undef putenv
df645f7c 14396
98418dba 14397static time_t time_t_max;
35996d22 14398static time_t time_t_min;
df645f7c 14399
98418dba 14400/* Values we'll use to set the TZ environment variable. */
35996d22
AS
14401static char *tz_strings[] = {
14402 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
14403 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
14404};
14405#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 14406
98418dba
CW
14407/* Fail if mktime fails to convert a date in the spring-forward gap.
14408 Based on a problem report from Andreas Jaeger. */
14409static void
14410spring_forward_gap ()
14411{
14412 /* glibc (up to about 1998-10-07) failed this test. */
14413 struct tm tm;
14414
14415 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
14416 instead of "TZ=America/Vancouver" in order to detect the bug even
14417 on systems that don't support the Olson extension, or don't have the
14418 full zoneinfo tables installed. */
14419 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
14420
14421 tm.tm_year = 98;
14422 tm.tm_mon = 3;
14423 tm.tm_mday = 5;
14424 tm.tm_hour = 2;
14425 tm.tm_min = 0;
14426 tm.tm_sec = 0;
14427 tm.tm_isdst = -1;
14428 if (mktime (&tm) == (time_t)-1)
14429 exit (1);
14430}
14431
14432static void
35996d22 14433mktime_test1 (now)
98418dba
CW
14434 time_t now;
14435{
14436 struct tm *lt;
14437 if ((lt = localtime (&now)) && mktime (lt) != now)
14438 exit (1);
35996d22
AS
14439}
14440
14441static void
14442mktime_test (now)
14443 time_t now;
14444{
14445 mktime_test1 (now);
14446 mktime_test1 ((time_t) (time_t_max - now));
14447 mktime_test1 ((time_t) (time_t_min + now));
98418dba
CW
14448}
14449
14450static void
14451irix_6_4_bug ()
14452{
14453 /* Based on code from Ariel Faigon. */
14454 struct tm tm;
14455 tm.tm_year = 96;
14456 tm.tm_mon = 3;
14457 tm.tm_mday = 0;
14458 tm.tm_hour = 0;
14459 tm.tm_min = 0;
14460 tm.tm_sec = 0;
14461 tm.tm_isdst = -1;
14462 mktime (&tm);
14463 if (tm.tm_mon != 2 || tm.tm_mday != 31)
14464 exit (1);
14465}
14466
14467static void
14468bigtime_test (j)
14469 int j;
14470{
14471 struct tm tm;
14472 time_t now;
14473 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
14474 now = mktime (&tm);
14475 if (now != (time_t) -1)
14476 {
14477 struct tm *lt = localtime (&now);
14478 if (! (lt
14479 && lt->tm_year == tm.tm_year
14480 && lt->tm_mon == tm.tm_mon
14481 && lt->tm_mday == tm.tm_mday
14482 && lt->tm_hour == tm.tm_hour
14483 && lt->tm_min == tm.tm_min
14484 && lt->tm_sec == tm.tm_sec
14485 && lt->tm_yday == tm.tm_yday
14486 && lt->tm_wday == tm.tm_wday
14487 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
14488 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
14489 exit (1);
14490 }
14491}
14492
14493int
14494main ()
14495{
14496 time_t t, delta;
14497 int i, j;
14498
14499 /* This test makes some buggy mktime implementations loop.
14500 Give up after 60 seconds; a mktime slower than that
14501 isn't worth using anyway. */
14502 alarm (60);
14503
14504 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
14505 continue;
14506 time_t_max--;
35996d22
AS
14507 if ((time_t) -1 < 0)
14508 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
14509 continue;
98418dba
CW
14510 delta = time_t_max / 997; /* a suitable prime number */
14511 for (i = 0; i < N_STRINGS; i++)
14512 {
14513 if (tz_strings[i])
14514 putenv (tz_strings[i]);
503d2be0 14515
98418dba
CW
14516 for (t = 0; t <= time_t_max - delta; t += delta)
14517 mktime_test (t);
35996d22
AS
14518 mktime_test ((time_t) 1);
14519 mktime_test ((time_t) (60 * 60));
14520 mktime_test ((time_t) (60 * 60 * 24));
98418dba
CW
14521
14522 for (j = 1; 0 < j; j *= 2)
35996d22 14523 bigtime_test (j);
98418dba
CW
14524 bigtime_test (j - 1);
14525 }
14526 irix_6_4_bug ();
14527 spring_forward_gap ();
14528 exit (0);
503d2be0
AS
14529}
14530_ACEOF
98418dba 14531rm -f conftest$ac_exeext
c0d27fcc 14532if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14533 (eval $ac_link) 2>&5
14534 ac_status=$?
c0d27fcc 14535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14536 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 14537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14538 (eval $ac_try) 2>&5
14539 ac_status=$?
c0d27fcc 14540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14541 (exit $ac_status); }; }; then
98418dba 14542 ac_cv_func_working_mktime=yes
503d2be0 14543else
98418dba
CW
14544 echo "$as_me: program exited with status $ac_status" >&5
14545echo "$as_me: failed program was:" >&5
19650fd6
AS
14546sed 's/^/| /' conftest.$ac_ext >&5
14547
c0d27fcc 14548( exit $ac_status )
98418dba 14549ac_cv_func_working_mktime=no
503d2be0 14550fi
35996d22 14551rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 14552fi
ba4481b5 14553fi
c0d27fcc 14554echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
14555echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
14556if test $ac_cv_func_working_mktime = no; then
35996d22
AS
14557 case $LIBOBJS in
14558 "mktime.$ac_objext" | \
14559 *" mktime.$ac_objext" | \
14560 "mktime.$ac_objext "* | \
14561 *" mktime.$ac_objext "* ) ;;
14562 *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;;
14563esac
14564
ba4481b5
DL
14565fi
14566
98418dba 14567if test "$ac_cv_func_working_mktime" = no; then
b936fae4 14568
c0d27fcc 14569cat >>confdefs.h <<\_ACEOF
98418dba 14570#define BROKEN_MKTIME 1
c0d27fcc 14571_ACEOF
ba4481b5 14572
ba4481b5 14573fi
503d2be0 14574
98418dba
CW
14575ac_have_func=no # yes means we've found a way to get the load average.
14576
6bae0ccf
DL
14577# Make sure getloadavg.c is where it belongs, at configure-time.
14578test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
14579 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
14580echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
14581 { (exit 1); exit 1; }; }
14582
98418dba
CW
14583ac_save_LIBS=$LIBS
14584
14585# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 14586(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
14587echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
14588if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 14589 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14590else
503d2be0 14591 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14592/* confdefs.h. */
14593_ACEOF
14594cat confdefs.h >>conftest.$ac_ext
14595cat >>conftest.$ac_ext <<_ACEOF
14596/* end confdefs.h. */
35996d22
AS
14597/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
14598 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14599#define getloadavg innocuous_getloadavg
14600
98418dba 14601/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14602 which can conflict with char getloadavg (); below.
14603 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14604 <limits.h> exists even on freestanding compilers. */
35996d22 14605
19650fd6
AS
14606#ifdef __STDC__
14607# include <limits.h>
14608#else
14609# include <assert.h>
14610#endif
35996d22
AS
14611
14612#undef getloadavg
14613
ba4481b5 14614/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14615#ifdef __cplusplus
14616extern "C"
19650fd6 14617{
503d2be0 14618#endif
ba4481b5 14619/* We use char because int might match the return type of a gcc2
503d2be0 14620 builtin and then its argument prototype would still apply. */
98418dba 14621char getloadavg ();
98418dba
CW
14622/* The GNU C library defines this for functions which it implements
14623 to always fail with ENOSYS. Some functions are actually named
14624 something starting with __ and the normal name is an alias. */
14625#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
14626choke me
14627#else
19650fd6
AS
14628char (*f) () = getloadavg;
14629#endif
14630#ifdef __cplusplus
14631}
cd958eb3
MB
14632#endif
14633
19650fd6
AS
14634int
14635main ()
14636{
14637return f != getloadavg;
503d2be0
AS
14638 ;
14639 return 0;
14640}
14641_ACEOF
14642rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14644 (eval $ac_link) 2>conftest.er1
503d2be0 14645 ac_status=$?
35996d22
AS
14646 grep -v '^ *+' conftest.er1 >conftest.err
14647 rm -f conftest.er1
14648 cat conftest.err >&5
c0d27fcc 14649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14650 (exit $ac_status); } &&
c08e6004 14651 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
14652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14653 (eval $ac_try) 2>&5
14654 ac_status=$?
14655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14656 (exit $ac_status); }; } &&
14657 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14659 (eval $ac_try) 2>&5
14660 ac_status=$?
c0d27fcc 14661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14662 (exit $ac_status); }; }; then
98418dba 14663 ac_cv_func_getloadavg=yes
503d2be0
AS
14664else
14665 echo "$as_me: failed program was:" >&5
19650fd6
AS
14666sed 's/^/| /' conftest.$ac_ext >&5
14667
98418dba 14668ac_cv_func_getloadavg=no
503d2be0 14669fi
35996d22
AS
14670rm -f conftest.err conftest.$ac_objext \
14671 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14672fi
c0d27fcc 14673echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
14674echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
14675if test $ac_cv_func_getloadavg = yes; then
14676 exit 0
14677else
14678 exit 1
ba4481b5 14679fi
98418dba 14680) && ac_have_func=yes
ba4481b5 14681
98418dba 14682# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 14683
98418dba
CW
14684for ac_func in pstat_getdynamic
14685do
14686as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14687echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14688echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14689if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14690 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14691else
503d2be0 14692 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14693/* confdefs.h. */
14694_ACEOF
14695cat confdefs.h >>conftest.$ac_ext
14696cat >>conftest.$ac_ext <<_ACEOF
14697/* end confdefs.h. */
35996d22
AS
14698/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14699 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14700#define $ac_func innocuous_$ac_func
14701
98418dba 14702/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14703 which can conflict with char $ac_func (); below.
14704 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14705 <limits.h> exists even on freestanding compilers. */
35996d22 14706
19650fd6
AS
14707#ifdef __STDC__
14708# include <limits.h>
14709#else
14710# include <assert.h>
14711#endif
35996d22
AS
14712
14713#undef $ac_func
14714
ba4481b5 14715/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14716#ifdef __cplusplus
14717extern "C"
19650fd6 14718{
503d2be0 14719#endif
ba4481b5 14720/* We use char because int might match the return type of a gcc2
503d2be0 14721 builtin and then its argument prototype would still apply. */
98418dba 14722char $ac_func ();
98418dba
CW
14723/* The GNU C library defines this for functions which it implements
14724 to always fail with ENOSYS. Some functions are actually named
14725 something starting with __ and the normal name is an alias. */
14726#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14727choke me
14728#else
19650fd6
AS
14729char (*f) () = $ac_func;
14730#endif
14731#ifdef __cplusplus
14732}
98418dba
CW
14733#endif
14734
19650fd6
AS
14735int
14736main ()
14737{
14738return f != $ac_func;
98418dba
CW
14739 ;
14740 return 0;
14741}
f21fadcc 14742_ACEOF
98418dba 14743rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14744if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14745 (eval $ac_link) 2>conftest.er1
f21fadcc 14746 ac_status=$?
35996d22
AS
14747 grep -v '^ *+' conftest.er1 >conftest.err
14748 rm -f conftest.er1
14749 cat conftest.err >&5
c0d27fcc 14750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14751 (exit $ac_status); } &&
c08e6004 14752 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
14753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14754 (eval $ac_try) 2>&5
14755 ac_status=$?
14756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14757 (exit $ac_status); }; } &&
14758 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
14760 (eval $ac_try) 2>&5
14761 ac_status=$?
c0d27fcc 14762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
14763 (exit $ac_status); }; }; then
14764 eval "$as_ac_var=yes"
f21fadcc
JD
14765else
14766 echo "$as_me: failed program was:" >&5
19650fd6
AS
14767sed 's/^/| /' conftest.$ac_ext >&5
14768
98418dba 14769eval "$as_ac_var=no"
f21fadcc 14770fi
35996d22
AS
14771rm -f conftest.err conftest.$ac_objext \
14772 conftest$ac_exeext conftest.$ac_ext
f21fadcc 14773fi
c0d27fcc 14774echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14775echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14776if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14777 cat >>confdefs.h <<_ACEOF
98418dba 14778#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14779_ACEOF
98418dba
CW
14780
14781fi
14782done
14783
c0d27fcc 14784
98418dba
CW
14785# Solaris has libkstat which does not require root.
14786
c0d27fcc 14787echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
14788echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
14789if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
14790 echo $ECHO_N "(cached) $ECHO_C" >&6
14791else
14792 ac_check_lib_save_LIBS=$LIBS
98418dba 14793LIBS="-lkstat $LIBS"
f21fadcc 14794cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14795/* confdefs.h. */
14796_ACEOF
14797cat confdefs.h >>conftest.$ac_ext
14798cat >>conftest.$ac_ext <<_ACEOF
14799/* end confdefs.h. */
f21fadcc
JD
14800
14801/* Override any gcc2 internal prototype to avoid an error. */
14802#ifdef __cplusplus
14803extern "C"
14804#endif
14805/* We use char because int might match the return type of a gcc2
14806 builtin and then its argument prototype would still apply. */
98418dba 14807char kstat_open ();
f21fadcc
JD
14808int
14809main ()
14810{
98418dba 14811kstat_open ();
f21fadcc
JD
14812 ;
14813 return 0;
14814}
14815_ACEOF
14816rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14818 (eval $ac_link) 2>conftest.er1
f21fadcc 14819 ac_status=$?
35996d22
AS
14820 grep -v '^ *+' conftest.er1 >conftest.err
14821 rm -f conftest.er1
14822 cat conftest.err >&5
c0d27fcc 14823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 14824 (exit $ac_status); } &&
c08e6004 14825 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
14826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14827 (eval $ac_try) 2>&5
14828 ac_status=$?
14829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14830 (exit $ac_status); }; } &&
14831 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
14833 (eval $ac_try) 2>&5
14834 ac_status=$?
c0d27fcc 14835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 14836 (exit $ac_status); }; }; then
98418dba 14837 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
14838else
14839 echo "$as_me: failed program was:" >&5
19650fd6
AS
14840sed 's/^/| /' conftest.$ac_ext >&5
14841
98418dba 14842ac_cv_lib_kstat_kstat_open=no
f21fadcc 14843fi
35996d22
AS
14844rm -f conftest.err conftest.$ac_objext \
14845 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
14846LIBS=$ac_check_lib_save_LIBS
14847fi
c0d27fcc 14848echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
14849echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
14850if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 14851 cat >>confdefs.h <<_ACEOF
98418dba 14852#define HAVE_LIBKSTAT 1
c0d27fcc 14853_ACEOF
f21fadcc 14854
98418dba 14855 LIBS="-lkstat $LIBS"
f21fadcc 14856
f21fadcc
JD
14857fi
14858
98418dba
CW
14859test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
14860
14861# Some systems with -lutil have (and need) -lkvm as well, some do not.
14862# On Solaris, -lkvm requires nlist from -lelf, so check that first
14863# to get the right answer into the cache.
14864# For kstat on solaris, we need libelf to force the definition of SVR4 below.
14865if test $ac_have_func = no; then
c0d27fcc 14866 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
14867echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
14868if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 14869 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14870else
98418dba
CW
14871 ac_check_lib_save_LIBS=$LIBS
14872LIBS="-lelf $LIBS"
14873cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14874/* confdefs.h. */
14875_ACEOF
14876cat confdefs.h >>conftest.$ac_ext
14877cat >>conftest.$ac_ext <<_ACEOF
14878/* end confdefs.h. */
98418dba
CW
14879
14880/* Override any gcc2 internal prototype to avoid an error. */
14881#ifdef __cplusplus
14882extern "C"
14883#endif
14884/* We use char because int might match the return type of a gcc2
14885 builtin and then its argument prototype would still apply. */
14886char elf_begin ();
503d2be0
AS
14887int
14888main ()
14889{
98418dba 14890elf_begin ();
503d2be0
AS
14891 ;
14892 return 0;
14893}
14894_ACEOF
14895rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14896if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14897 (eval $ac_link) 2>conftest.er1
503d2be0 14898 ac_status=$?
35996d22
AS
14899 grep -v '^ *+' conftest.er1 >conftest.err
14900 rm -f conftest.er1
14901 cat conftest.err >&5
c0d27fcc 14902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14903 (exit $ac_status); } &&
c08e6004 14904 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
14905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14906 (eval $ac_try) 2>&5
14907 ac_status=$?
14908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14909 (exit $ac_status); }; } &&
14910 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14912 (eval $ac_try) 2>&5
14913 ac_status=$?
c0d27fcc 14914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14915 (exit $ac_status); }; }; then
98418dba 14916 ac_cv_lib_elf_elf_begin=yes
ba4481b5 14917else
503d2be0 14918 echo "$as_me: failed program was:" >&5
19650fd6
AS
14919sed 's/^/| /' conftest.$ac_ext >&5
14920
98418dba 14921ac_cv_lib_elf_elf_begin=no
ba4481b5 14922fi
35996d22
AS
14923rm -f conftest.err conftest.$ac_objext \
14924 conftest$ac_exeext conftest.$ac_ext
98418dba 14925LIBS=$ac_check_lib_save_LIBS
ba4481b5 14926fi
c0d27fcc 14927echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
14928echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
14929if test $ac_cv_lib_elf_elf_begin = yes; then
14930 LIBS="-lelf $LIBS"
ba4481b5
DL
14931fi
14932
98418dba
CW
14933fi
14934if test $ac_have_func = no; then
c0d27fcc 14935 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
14936echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
14937if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 14938 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14939else
98418dba
CW
14940 ac_check_lib_save_LIBS=$LIBS
14941LIBS="-lkvm $LIBS"
14942cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14943/* confdefs.h. */
14944_ACEOF
14945cat confdefs.h >>conftest.$ac_ext
14946cat >>conftest.$ac_ext <<_ACEOF
14947/* end confdefs.h. */
98418dba
CW
14948
14949/* Override any gcc2 internal prototype to avoid an error. */
14950#ifdef __cplusplus
14951extern "C"
14952#endif
14953/* We use char because int might match the return type of a gcc2
14954 builtin and then its argument prototype would still apply. */
14955char kvm_open ();
503d2be0
AS
14956int
14957main ()
14958{
98418dba 14959kvm_open ();
503d2be0
AS
14960 ;
14961 return 0;
14962}
14963_ACEOF
14964rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14965if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14966 (eval $ac_link) 2>conftest.er1
503d2be0 14967 ac_status=$?
35996d22
AS
14968 grep -v '^ *+' conftest.er1 >conftest.err
14969 rm -f conftest.er1
14970 cat conftest.err >&5
c0d27fcc 14971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14972 (exit $ac_status); } &&
c08e6004 14973 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
14974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14975 (eval $ac_try) 2>&5
14976 ac_status=$?
14977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14978 (exit $ac_status); }; } &&
14979 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14981 (eval $ac_try) 2>&5
14982 ac_status=$?
c0d27fcc 14983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14984 (exit $ac_status); }; }; then
98418dba 14985 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
14986else
14987 echo "$as_me: failed program was:" >&5
19650fd6
AS
14988sed 's/^/| /' conftest.$ac_ext >&5
14989
98418dba 14990ac_cv_lib_kvm_kvm_open=no
503d2be0 14991fi
35996d22
AS
14992rm -f conftest.err conftest.$ac_objext \
14993 conftest$ac_exeext conftest.$ac_ext
98418dba 14994LIBS=$ac_check_lib_save_LIBS
503d2be0 14995fi
c0d27fcc 14996echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
14997echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
14998if test $ac_cv_lib_kvm_kvm_open = yes; then
14999 LIBS="-lkvm $LIBS"
ba4481b5
DL
15000fi
15001
98418dba 15002 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 15003 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
15004echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
15005if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 15006 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15007else
98418dba
CW
15008 ac_check_lib_save_LIBS=$LIBS
15009LIBS="-lutil $LIBS"
15010cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15011/* confdefs.h. */
15012_ACEOF
15013cat confdefs.h >>conftest.$ac_ext
15014cat >>conftest.$ac_ext <<_ACEOF
15015/* end confdefs.h. */
98418dba
CW
15016
15017/* Override any gcc2 internal prototype to avoid an error. */
15018#ifdef __cplusplus
15019extern "C"
15020#endif
15021/* We use char because int might match the return type of a gcc2
15022 builtin and then its argument prototype would still apply. */
15023char getloadavg ();
503d2be0
AS
15024int
15025main ()
15026{
98418dba 15027getloadavg ();
503d2be0
AS
15028 ;
15029 return 0;
15030}
15031_ACEOF
15032rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15033if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15034 (eval $ac_link) 2>conftest.er1
503d2be0 15035 ac_status=$?
35996d22
AS
15036 grep -v '^ *+' conftest.er1 >conftest.err
15037 rm -f conftest.er1
15038 cat conftest.err >&5
c0d27fcc 15039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15040 (exit $ac_status); } &&
c08e6004 15041 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
c0d27fcc 15042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15043 (eval $ac_try) 2>&5
15044 ac_status=$?
c0d27fcc 15045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
15046 (exit $ac_status); }; } &&
15047 { ac_try='test -s conftest$ac_exeext'
15048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15049 (eval $ac_try) 2>&5
15050 ac_status=$?
15051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15052 (exit $ac_status); }; }; then
15053 ac_cv_lib_util_getloadavg=yes
15054else
503d2be0 15055 echo "$as_me: failed program was:" >&5
19650fd6
AS
15056sed 's/^/| /' conftest.$ac_ext >&5
15057
98418dba 15058ac_cv_lib_util_getloadavg=no
ba4481b5 15059fi
35996d22
AS
15060rm -f conftest.err conftest.$ac_objext \
15061 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15062LIBS=$ac_check_lib_save_LIBS
15063fi
c0d27fcc 15064echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
15065echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
15066if test $ac_cv_lib_util_getloadavg = yes; then
15067 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 15068fi
503d2be0 15069
98418dba 15070fi
ba4481b5 15071
98418dba
CW
15072if test $ac_have_func = no; then
15073 # There is a commonly available library for RS/6000 AIX.
15074 # Since it is not a standard part of AIX, it might be installed locally.
15075 ac_getloadavg_LIBS=$LIBS
15076 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 15077 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
15078echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
15079if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 15080 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15081else
98418dba
CW
15082 ac_check_lib_save_LIBS=$LIBS
15083LIBS="-lgetloadavg $LIBS"
15084cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15085/* confdefs.h. */
15086_ACEOF
15087cat confdefs.h >>conftest.$ac_ext
15088cat >>conftest.$ac_ext <<_ACEOF
15089/* end confdefs.h. */
ba4481b5 15090
98418dba
CW
15091/* Override any gcc2 internal prototype to avoid an error. */
15092#ifdef __cplusplus
15093extern "C"
15094#endif
15095/* We use char because int might match the return type of a gcc2
15096 builtin and then its argument prototype would still apply. */
15097char getloadavg ();
98418dba
CW
15098int
15099main ()
15100{
15101getloadavg ();
15102 ;
15103 return 0;
15104}
503d2be0 15105_ACEOF
98418dba 15106rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15107if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15108 (eval $ac_link) 2>conftest.er1
98418dba 15109 ac_status=$?
35996d22
AS
15110 grep -v '^ *+' conftest.er1 >conftest.err
15111 rm -f conftest.er1
15112 cat conftest.err >&5
c0d27fcc 15113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15114 (exit $ac_status); } &&
c08e6004 15115 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15117 (eval $ac_try) 2>&5
15118 ac_status=$?
15119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15120 (exit $ac_status); }; } &&
15121 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15123 (eval $ac_try) 2>&5
15124 ac_status=$?
c0d27fcc 15125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15126 (exit $ac_status); }; }; then
15127 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 15128else
98418dba 15129 echo "$as_me: failed program was:" >&5
19650fd6
AS
15130sed 's/^/| /' conftest.$ac_ext >&5
15131
98418dba
CW
15132ac_cv_lib_getloadavg_getloadavg=no
15133fi
35996d22
AS
15134rm -f conftest.err conftest.$ac_objext \
15135 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15136LIBS=$ac_check_lib_save_LIBS
15137fi
c0d27fcc 15138echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
15139echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
15140if test $ac_cv_lib_getloadavg_getloadavg = yes; then
15141 LIBS="-lgetloadavg $LIBS"
15142else
15143 LIBS=$ac_getloadavg_LIBS
ba4481b5 15144fi
ba4481b5
DL
15145
15146fi
98418dba
CW
15147
15148# Make sure it is really in the library, if we think we found it,
15149# otherwise set up the replacement function.
15150
15151for ac_func in getloadavg
15152do
15153as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15154echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15155echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15156if eval "test \"\${$as_ac_var+set}\" = set"; then
15157 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15158else
503d2be0 15159 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15160/* confdefs.h. */
15161_ACEOF
15162cat confdefs.h >>conftest.$ac_ext
15163cat >>conftest.$ac_ext <<_ACEOF
15164/* end confdefs.h. */
35996d22
AS
15165/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15166 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15167#define $ac_func innocuous_$ac_func
15168
ba4481b5 15169/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15170 which can conflict with char $ac_func (); below.
15171 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15172 <limits.h> exists even on freestanding compilers. */
35996d22 15173
19650fd6
AS
15174#ifdef __STDC__
15175# include <limits.h>
15176#else
15177# include <assert.h>
15178#endif
35996d22
AS
15179
15180#undef $ac_func
15181
ba4481b5 15182/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15183#ifdef __cplusplus
15184extern "C"
19650fd6 15185{
503d2be0 15186#endif
ba4481b5 15187/* We use char because int might match the return type of a gcc2
503d2be0
AS
15188 builtin and then its argument prototype would still apply. */
15189char $ac_func ();
ba4481b5
DL
15190/* The GNU C library defines this for functions which it implements
15191 to always fail with ENOSYS. Some functions are actually named
15192 something starting with __ and the normal name is an alias. */
15193#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15194choke me
15195#else
19650fd6
AS
15196char (*f) () = $ac_func;
15197#endif
15198#ifdef __cplusplus
15199}
cd958eb3
MB
15200#endif
15201
19650fd6
AS
15202int
15203main ()
15204{
15205return f != $ac_func;
503d2be0
AS
15206 ;
15207 return 0;
15208}
15209_ACEOF
15210rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15211if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15212 (eval $ac_link) 2>conftest.er1
503d2be0 15213 ac_status=$?
35996d22
AS
15214 grep -v '^ *+' conftest.er1 >conftest.err
15215 rm -f conftest.er1
15216 cat conftest.err >&5
c0d27fcc 15217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15218 (exit $ac_status); } &&
c08e6004 15219 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15221 (eval $ac_try) 2>&5
15222 ac_status=$?
15223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15224 (exit $ac_status); }; } &&
15225 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15227 (eval $ac_try) 2>&5
15228 ac_status=$?
c0d27fcc 15229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15230 (exit $ac_status); }; }; then
15231 eval "$as_ac_var=yes"
15232else
15233 echo "$as_me: failed program was:" >&5
19650fd6
AS
15234sed 's/^/| /' conftest.$ac_ext >&5
15235
503d2be0
AS
15236eval "$as_ac_var=no"
15237fi
35996d22
AS
15238rm -f conftest.err conftest.$ac_objext \
15239 conftest$ac_exeext conftest.$ac_ext
503d2be0 15240fi
c0d27fcc 15241echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15242echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15243if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15244 cat >>confdefs.h <<_ACEOF
98418dba 15245#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15246_ACEOF
503d2be0 15247
98418dba 15248else
35996d22
AS
15249 case $LIBOBJS in
15250 "getloadavg.$ac_objext" | \
15251 *" getloadavg.$ac_objext" | \
15252 "getloadavg.$ac_objext "* | \
15253 *" getloadavg.$ac_objext "* ) ;;
15254 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" ;;
15255esac
15256
ba4481b5 15257
c0d27fcc 15258cat >>confdefs.h <<\_ACEOF
98418dba 15259#define C_GETLOADAVG 1
c0d27fcc 15260_ACEOF
ba4481b5 15261
98418dba
CW
15262# Figure out what our getloadavg.c needs.
15263ac_have_func=no
c0d27fcc
MR
15264if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15265 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
15266echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15267if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 15268 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15269fi
15270echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
15271echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 15272else
c0d27fcc
MR
15273 # Is the header compilable?
15274echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
15275echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
15276cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15277/* confdefs.h. */
15278_ACEOF
15279cat confdefs.h >>conftest.$ac_ext
15280cat >>conftest.$ac_ext <<_ACEOF
15281/* end confdefs.h. */
c0d27fcc
MR
15282$ac_includes_default
15283#include <sys/dg_sys_info.h>
15284_ACEOF
15285rm -f conftest.$ac_objext
15286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15287 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15288 ac_status=$?
35996d22
AS
15289 grep -v '^ *+' conftest.er1 >conftest.err
15290 rm -f conftest.er1
15291 cat conftest.err >&5
c0d27fcc
MR
15292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15293 (exit $ac_status); } &&
c08e6004 15294 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15296 (eval $ac_try) 2>&5
15297 ac_status=$?
15298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15299 (exit $ac_status); }; } &&
15300 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15302 (eval $ac_try) 2>&5
15303 ac_status=$?
15304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15305 (exit $ac_status); }; }; then
15306 ac_header_compiler=yes
15307else
15308 echo "$as_me: failed program was:" >&5
19650fd6
AS
15309sed 's/^/| /' conftest.$ac_ext >&5
15310
c0d27fcc
MR
15311ac_header_compiler=no
15312fi
35996d22 15313rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15314echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15315echo "${ECHO_T}$ac_header_compiler" >&6
15316
15317# Is the header present?
15318echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
15319echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
15320cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15321/* confdefs.h. */
15322_ACEOF
15323cat confdefs.h >>conftest.$ac_ext
15324cat >>conftest.$ac_ext <<_ACEOF
15325/* end confdefs.h. */
98418dba
CW
15326#include <sys/dg_sys_info.h>
15327_ACEOF
c0d27fcc 15328if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
15329 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15330 ac_status=$?
6bae0ccf 15331 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15332 rm -f conftest.er1
15333 cat conftest.err >&5
c0d27fcc 15334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15335 (exit $ac_status); } >/dev/null; then
15336 if test -s conftest.err; then
15337 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15338 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15339 else
15340 ac_cpp_err=
15341 fi
15342else
15343 ac_cpp_err=yes
ba4481b5 15344fi
98418dba 15345if test -z "$ac_cpp_err"; then
c0d27fcc 15346 ac_header_preproc=yes
98418dba
CW
15347else
15348 echo "$as_me: failed program was:" >&5
19650fd6
AS
15349sed 's/^/| /' conftest.$ac_ext >&5
15350
c0d27fcc 15351 ac_header_preproc=no
ba4481b5 15352fi
98418dba 15353rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15354echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15355echo "${ECHO_T}$ac_header_preproc" >&6
15356
15357# So? What about this header?
35996d22
AS
15358case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15359 yes:no: )
c0d27fcc
MR
15360 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
15361echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15362 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
15363echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
15364 ac_header_preproc=yes
19650fd6 15365 ;;
35996d22 15366 no:yes:* )
c0d27fcc
MR
15367 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
15368echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
35996d22
AS
15369 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
15370echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
15371 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
15372echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
15373 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
15374echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15375 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 15376echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15377 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
15378echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15379 (
15380 cat <<\_ASBOX
35996d22
AS
15381## ------------------------------------------ ##
15382## Report this to the AC_PACKAGE_NAME lists. ##
15383## ------------------------------------------ ##
19650fd6
AS
15384_ASBOX
15385 ) |
15386 sed "s/^/$as_me: WARNING: /" >&2
15387 ;;
c0d27fcc
MR
15388esac
15389echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
15390echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15391if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15392 echo $ECHO_N "(cached) $ECHO_C" >&6
15393else
15394 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 15395fi
c0d27fcc 15396echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 15397echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
15398
15399fi
98418dba
CW
15400if test $ac_cv_header_sys_dg_sys_info_h = yes; then
15401 ac_have_func=yes
ba4481b5 15402
c0d27fcc 15403cat >>confdefs.h <<\_ACEOF
98418dba 15404#define DGUX 1
c0d27fcc
MR
15405_ACEOF
15406
503d2be0 15407
c0d27fcc 15408echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
15409echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
15410if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 15411 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15412else
503d2be0 15413 ac_check_lib_save_LIBS=$LIBS
98418dba 15414LIBS="-ldgc $LIBS"
503d2be0 15415cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15416/* confdefs.h. */
15417_ACEOF
15418cat confdefs.h >>conftest.$ac_ext
15419cat >>conftest.$ac_ext <<_ACEOF
15420/* end confdefs.h. */
503d2be0 15421
ba4481b5 15422/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15423#ifdef __cplusplus
15424extern "C"
15425#endif
ba4481b5 15426/* We use char because int might match the return type of a gcc2
503d2be0 15427 builtin and then its argument prototype would still apply. */
98418dba 15428char dg_sys_info ();
503d2be0
AS
15429int
15430main ()
15431{
98418dba 15432dg_sys_info ();
503d2be0
AS
15433 ;
15434 return 0;
15435}
15436_ACEOF
15437rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15438if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15439 (eval $ac_link) 2>conftest.er1
503d2be0 15440 ac_status=$?
35996d22
AS
15441 grep -v '^ *+' conftest.er1 >conftest.err
15442 rm -f conftest.er1
15443 cat conftest.err >&5
c0d27fcc 15444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15445 (exit $ac_status); } &&
c08e6004 15446 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15448 (eval $ac_try) 2>&5
15449 ac_status=$?
15450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15451 (exit $ac_status); }; } &&
15452 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15454 (eval $ac_try) 2>&5
15455 ac_status=$?
c0d27fcc 15456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15457 (exit $ac_status); }; }; then
98418dba 15458 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
15459else
15460 echo "$as_me: failed program was:" >&5
19650fd6
AS
15461sed 's/^/| /' conftest.$ac_ext >&5
15462
98418dba 15463ac_cv_lib_dgc_dg_sys_info=no
503d2be0 15464fi
35996d22
AS
15465rm -f conftest.err conftest.$ac_objext \
15466 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15467LIBS=$ac_check_lib_save_LIBS
15468fi
c0d27fcc 15469echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
15470echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
15471if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 15472 cat >>confdefs.h <<_ACEOF
98418dba 15473#define HAVE_LIBDGC 1
c0d27fcc 15474_ACEOF
ba4481b5 15475
98418dba 15476 LIBS="-ldgc $LIBS"
ba4481b5 15477
ba4481b5
DL
15478fi
15479
98418dba 15480fi
503d2be0 15481
c0d27fcc
MR
15482
15483
15484if test "${ac_cv_header_locale_h+set}" = set; then
15485 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
15486echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
15487if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 15488 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15489fi
15490echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
15491echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 15492else
c0d27fcc
MR
15493 # Is the header compilable?
15494echo "$as_me:$LINENO: checking locale.h usability" >&5
15495echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
15496cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15497/* confdefs.h. */
15498_ACEOF
15499cat confdefs.h >>conftest.$ac_ext
15500cat >>conftest.$ac_ext <<_ACEOF
15501/* end confdefs.h. */
c0d27fcc
MR
15502$ac_includes_default
15503#include <locale.h>
15504_ACEOF
15505rm -f conftest.$ac_objext
15506if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15507 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15508 ac_status=$?
35996d22
AS
15509 grep -v '^ *+' conftest.er1 >conftest.err
15510 rm -f conftest.er1
15511 cat conftest.err >&5
c0d27fcc
MR
15512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15513 (exit $ac_status); } &&
c08e6004 15514 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15516 (eval $ac_try) 2>&5
15517 ac_status=$?
15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519 (exit $ac_status); }; } &&
15520 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15522 (eval $ac_try) 2>&5
15523 ac_status=$?
15524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15525 (exit $ac_status); }; }; then
15526 ac_header_compiler=yes
15527else
15528 echo "$as_me: failed program was:" >&5
19650fd6
AS
15529sed 's/^/| /' conftest.$ac_ext >&5
15530
c0d27fcc
MR
15531ac_header_compiler=no
15532fi
35996d22 15533rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15534echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15535echo "${ECHO_T}$ac_header_compiler" >&6
15536
15537# Is the header present?
15538echo "$as_me:$LINENO: checking locale.h presence" >&5
15539echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
15540cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15541/* confdefs.h. */
15542_ACEOF
15543cat confdefs.h >>conftest.$ac_ext
15544cat >>conftest.$ac_ext <<_ACEOF
15545/* end confdefs.h. */
98418dba 15546#include <locale.h>
503d2be0 15547_ACEOF
c0d27fcc 15548if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 15549 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 15550 ac_status=$?
6bae0ccf 15551 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15552 rm -f conftest.er1
15553 cat conftest.err >&5
c0d27fcc 15554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15555 (exit $ac_status); } >/dev/null; then
15556 if test -s conftest.err; then
15557 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15558 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15559 else
15560 ac_cpp_err=
15561 fi
503d2be0 15562else
98418dba 15563 ac_cpp_err=yes
503d2be0 15564fi
98418dba 15565if test -z "$ac_cpp_err"; then
c0d27fcc 15566 ac_header_preproc=yes
98418dba
CW
15567else
15568 echo "$as_me: failed program was:" >&5
19650fd6
AS
15569sed 's/^/| /' conftest.$ac_ext >&5
15570
c0d27fcc 15571 ac_header_preproc=no
ba4481b5 15572fi
98418dba 15573rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15574echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15575echo "${ECHO_T}$ac_header_preproc" >&6
15576
15577# So? What about this header?
35996d22
AS
15578case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15579 yes:no: )
c0d27fcc
MR
15580 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
15581echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15582 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
15583echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
15584 ac_header_preproc=yes
19650fd6 15585 ;;
35996d22 15586 no:yes:* )
c0d27fcc
MR
15587 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
15588echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
35996d22
AS
15589 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
15590echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
15591 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
15592echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
15593 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
15594echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15595 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 15596echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15597 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
15598echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15599 (
15600 cat <<\_ASBOX
35996d22
AS
15601## ------------------------------------------ ##
15602## Report this to the AC_PACKAGE_NAME lists. ##
15603## ------------------------------------------ ##
19650fd6
AS
15604_ASBOX
15605 ) |
15606 sed "s/^/$as_me: WARNING: /" >&2
15607 ;;
c0d27fcc
MR
15608esac
15609echo "$as_me:$LINENO: checking for locale.h" >&5
15610echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
15611if test "${ac_cv_header_locale_h+set}" = set; then
15612 echo $ECHO_N "(cached) $ECHO_C" >&6
15613else
15614 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 15615fi
c0d27fcc 15616echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
15617echo "${ECHO_T}$ac_cv_header_locale_h" >&6
15618
c0d27fcc
MR
15619fi
15620
15621
15622
98418dba 15623for ac_func in setlocale
ba4481b5 15624do
503d2be0 15625as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15626echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15627echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15628if eval "test \"\${$as_ac_var+set}\" = set"; then
15629 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15630else
503d2be0 15631 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15632/* confdefs.h. */
15633_ACEOF
15634cat confdefs.h >>conftest.$ac_ext
15635cat >>conftest.$ac_ext <<_ACEOF
15636/* end confdefs.h. */
35996d22
AS
15637/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15638 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15639#define $ac_func innocuous_$ac_func
15640
ba4481b5 15641/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15642 which can conflict with char $ac_func (); below.
15643 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15644 <limits.h> exists even on freestanding compilers. */
35996d22 15645
19650fd6
AS
15646#ifdef __STDC__
15647# include <limits.h>
15648#else
15649# include <assert.h>
15650#endif
35996d22
AS
15651
15652#undef $ac_func
15653
ba4481b5 15654/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15655#ifdef __cplusplus
15656extern "C"
19650fd6 15657{
503d2be0 15658#endif
ba4481b5 15659/* We use char because int might match the return type of a gcc2
503d2be0
AS
15660 builtin and then its argument prototype would still apply. */
15661char $ac_func ();
ba4481b5
DL
15662/* The GNU C library defines this for functions which it implements
15663 to always fail with ENOSYS. Some functions are actually named
15664 something starting with __ and the normal name is an alias. */
15665#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15666choke me
15667#else
19650fd6
AS
15668char (*f) () = $ac_func;
15669#endif
15670#ifdef __cplusplus
15671}
ba4481b5
DL
15672#endif
15673
19650fd6
AS
15674int
15675main ()
15676{
15677return f != $ac_func;
503d2be0
AS
15678 ;
15679 return 0;
15680}
15681_ACEOF
15682rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15683if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15684 (eval $ac_link) 2>conftest.er1
503d2be0 15685 ac_status=$?
35996d22
AS
15686 grep -v '^ *+' conftest.er1 >conftest.err
15687 rm -f conftest.er1
15688 cat conftest.err >&5
c0d27fcc 15689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15690 (exit $ac_status); } &&
c08e6004 15691 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15693 (eval $ac_try) 2>&5
15694 ac_status=$?
15695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15696 (exit $ac_status); }; } &&
15697 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15699 (eval $ac_try) 2>&5
15700 ac_status=$?
c0d27fcc 15701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15702 (exit $ac_status); }; }; then
15703 eval "$as_ac_var=yes"
15704else
15705 echo "$as_me: failed program was:" >&5
19650fd6
AS
15706sed 's/^/| /' conftest.$ac_ext >&5
15707
503d2be0
AS
15708eval "$as_ac_var=no"
15709fi
35996d22
AS
15710rm -f conftest.err conftest.$ac_objext \
15711 conftest$ac_exeext conftest.$ac_ext
503d2be0 15712fi
c0d27fcc 15713echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15714echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15715if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15716 cat >>confdefs.h <<_ACEOF
503d2be0 15717#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15718_ACEOF
ba4481b5 15719
ba4481b5
DL
15720fi
15721done
15722
c0d27fcc 15723
98418dba
CW
15724# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
15725# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
15726# Irix 4.0.5F has the header but not the library.
15727if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
15728 ac_have_func=yes
15729
c0d27fcc 15730cat >>confdefs.h <<\_ACEOF
98418dba 15731#define SVR4 1
c0d27fcc 15732_ACEOF
98418dba
CW
15733
15734fi
15735
15736if test $ac_have_func = no; then
c0d27fcc
MR
15737 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
15738 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
15739echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
15740if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 15741 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15742fi
15743echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
15744echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 15745else
c0d27fcc
MR
15746 # Is the header compilable?
15747echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
15748echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
15749cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15750/* confdefs.h. */
15751_ACEOF
15752cat confdefs.h >>conftest.$ac_ext
15753cat >>conftest.$ac_ext <<_ACEOF
15754/* end confdefs.h. */
c0d27fcc
MR
15755$ac_includes_default
15756#include <inq_stats/cpustats.h>
15757_ACEOF
15758rm -f conftest.$ac_objext
15759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15760 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15761 ac_status=$?
35996d22
AS
15762 grep -v '^ *+' conftest.er1 >conftest.err
15763 rm -f conftest.er1
15764 cat conftest.err >&5
c0d27fcc
MR
15765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15766 (exit $ac_status); } &&
c08e6004 15767 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15769 (eval $ac_try) 2>&5
15770 ac_status=$?
15771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15772 (exit $ac_status); }; } &&
15773 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15775 (eval $ac_try) 2>&5
15776 ac_status=$?
15777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15778 (exit $ac_status); }; }; then
15779 ac_header_compiler=yes
15780else
15781 echo "$as_me: failed program was:" >&5
19650fd6
AS
15782sed 's/^/| /' conftest.$ac_ext >&5
15783
c0d27fcc
MR
15784ac_header_compiler=no
15785fi
35996d22 15786rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15787echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15788echo "${ECHO_T}$ac_header_compiler" >&6
15789
15790# Is the header present?
15791echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
15792echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
15793cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15794/* confdefs.h. */
15795_ACEOF
15796cat confdefs.h >>conftest.$ac_ext
15797cat >>conftest.$ac_ext <<_ACEOF
15798/* end confdefs.h. */
98418dba 15799#include <inq_stats/cpustats.h>
503d2be0 15800_ACEOF
c0d27fcc 15801if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15802 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15803 ac_status=$?
6bae0ccf 15804 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15805 rm -f conftest.er1
15806 cat conftest.err >&5
c0d27fcc 15807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15808 (exit $ac_status); } >/dev/null; then
15809 if test -s conftest.err; then
15810 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15811 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
15812 else
15813 ac_cpp_err=
15814 fi
15815else
15816 ac_cpp_err=yes
15817fi
15818if test -z "$ac_cpp_err"; then
c0d27fcc 15819 ac_header_preproc=yes
503d2be0
AS
15820else
15821 echo "$as_me: failed program was:" >&5
19650fd6
AS
15822sed 's/^/| /' conftest.$ac_ext >&5
15823
c0d27fcc 15824 ac_header_preproc=no
ba4481b5 15825fi
503d2be0 15826rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15827echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15828echo "${ECHO_T}$ac_header_preproc" >&6
15829
15830# So? What about this header?
35996d22
AS
15831case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15832 yes:no: )
c0d27fcc
MR
15833 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
15834echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15835 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
15836echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
15837 ac_header_preproc=yes
19650fd6 15838 ;;
35996d22 15839 no:yes:* )
c0d27fcc
MR
15840 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
15841echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
35996d22
AS
15842 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
15843echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
15844 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
15845echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
15846 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
15847echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15848 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 15849echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15850 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
15851echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15852 (
15853 cat <<\_ASBOX
35996d22
AS
15854## ------------------------------------------ ##
15855## Report this to the AC_PACKAGE_NAME lists. ##
15856## ------------------------------------------ ##
19650fd6
AS
15857_ASBOX
15858 ) |
15859 sed "s/^/$as_me: WARNING: /" >&2
15860 ;;
c0d27fcc
MR
15861esac
15862echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
15863echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
15864if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
15865 echo $ECHO_N "(cached) $ECHO_C" >&6
15866else
15867 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 15868fi
c0d27fcc 15869echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 15870echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
15871
15872fi
98418dba
CW
15873if test $ac_cv_header_inq_stats_cpustats_h = yes; then
15874 ac_have_func=yes
ba4481b5 15875
c0d27fcc 15876cat >>confdefs.h <<\_ACEOF
98418dba 15877#define UMAX 1
c0d27fcc 15878_ACEOF
98418dba 15879
c0d27fcc
MR
15880
15881cat >>confdefs.h <<\_ACEOF
98418dba 15882#define UMAX4_3 1
c0d27fcc 15883_ACEOF
98418dba
CW
15884
15885fi
15886
c0d27fcc 15887
98418dba
CW
15888fi
15889
15890if test $ac_have_func = no; then
c0d27fcc
MR
15891 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
15892 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
15893echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
15894if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 15895 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15896fi
15897echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
15898echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 15899else
c0d27fcc
MR
15900 # Is the header compilable?
15901echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
15902echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
15903cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15904/* confdefs.h. */
15905_ACEOF
15906cat confdefs.h >>conftest.$ac_ext
15907cat >>conftest.$ac_ext <<_ACEOF
15908/* end confdefs.h. */
c0d27fcc
MR
15909$ac_includes_default
15910#include <sys/cpustats.h>
15911_ACEOF
15912rm -f conftest.$ac_objext
15913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15914 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15915 ac_status=$?
35996d22
AS
15916 grep -v '^ *+' conftest.er1 >conftest.err
15917 rm -f conftest.er1
15918 cat conftest.err >&5
c0d27fcc
MR
15919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15920 (exit $ac_status); } &&
c08e6004 15921 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
15922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15923 (eval $ac_try) 2>&5
15924 ac_status=$?
15925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15926 (exit $ac_status); }; } &&
15927 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15929 (eval $ac_try) 2>&5
15930 ac_status=$?
15931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15932 (exit $ac_status); }; }; then
15933 ac_header_compiler=yes
15934else
15935 echo "$as_me: failed program was:" >&5
19650fd6
AS
15936sed 's/^/| /' conftest.$ac_ext >&5
15937
c0d27fcc
MR
15938ac_header_compiler=no
15939fi
35996d22 15940rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15941echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15942echo "${ECHO_T}$ac_header_compiler" >&6
15943
15944# Is the header present?
15945echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
15946echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
15947cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15948/* confdefs.h. */
15949_ACEOF
15950cat confdefs.h >>conftest.$ac_ext
15951cat >>conftest.$ac_ext <<_ACEOF
15952/* end confdefs.h. */
98418dba
CW
15953#include <sys/cpustats.h>
15954_ACEOF
c0d27fcc 15955if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
15956 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15957 ac_status=$?
6bae0ccf 15958 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15959 rm -f conftest.er1
15960 cat conftest.err >&5
c0d27fcc 15961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15962 (exit $ac_status); } >/dev/null; then
15963 if test -s conftest.err; then
15964 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15965 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15966 else
15967 ac_cpp_err=
15968 fi
15969else
15970 ac_cpp_err=yes
503d2be0 15971fi
98418dba 15972if test -z "$ac_cpp_err"; then
c0d27fcc 15973 ac_header_preproc=yes
98418dba
CW
15974else
15975 echo "$as_me: failed program was:" >&5
19650fd6
AS
15976sed 's/^/| /' conftest.$ac_ext >&5
15977
c0d27fcc 15978 ac_header_preproc=no
98418dba
CW
15979fi
15980rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15981echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15982echo "${ECHO_T}$ac_header_preproc" >&6
15983
15984# So? What about this header?
35996d22
AS
15985case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15986 yes:no: )
c0d27fcc
MR
15987 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
15988echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15989 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
15990echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
15991 ac_header_preproc=yes
19650fd6 15992 ;;
35996d22 15993 no:yes:* )
c0d27fcc
MR
15994 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
15995echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
35996d22
AS
15996 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
15997echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
15998 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
15999echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
16000 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16001echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16002 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16003echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16004 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
16005echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16006 (
16007 cat <<\_ASBOX
35996d22
AS
16008## ------------------------------------------ ##
16009## Report this to the AC_PACKAGE_NAME lists. ##
16010## ------------------------------------------ ##
19650fd6
AS
16011_ASBOX
16012 ) |
16013 sed "s/^/$as_me: WARNING: /" >&2
16014 ;;
c0d27fcc
MR
16015esac
16016echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
16017echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16018if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16019 echo $ECHO_N "(cached) $ECHO_C" >&6
16020else
16021 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 16022fi
c0d27fcc 16023echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 16024echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
16025
16026fi
98418dba 16027if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 16028 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 16029#define UMAX 1
c0d27fcc 16030_ACEOF
ba4481b5 16031
98418dba
CW
16032fi
16033
c0d27fcc 16034
98418dba
CW
16035fi
16036
16037if test $ac_have_func = no; then
16038
16039for ac_header in mach/mach.h
2c9dccc9
PJ
16040do
16041as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16042if eval "test \"\${$as_ac_Header+set}\" = set"; then
16043 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
16044echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16045if eval "test \"\${$as_ac_Header+set}\" = set"; then
16046 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16047fi
16048echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16049echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16050else
c0d27fcc
MR
16051 # Is the header compilable?
16052echo "$as_me:$LINENO: checking $ac_header usability" >&5
16053echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16054cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16055/* confdefs.h. */
16056_ACEOF
16057cat confdefs.h >>conftest.$ac_ext
16058cat >>conftest.$ac_ext <<_ACEOF
16059/* end confdefs.h. */
c0d27fcc
MR
16060$ac_includes_default
16061#include <$ac_header>
16062_ACEOF
16063rm -f conftest.$ac_objext
16064if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16065 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16066 ac_status=$?
35996d22
AS
16067 grep -v '^ *+' conftest.er1 >conftest.err
16068 rm -f conftest.er1
16069 cat conftest.err >&5
c0d27fcc
MR
16070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16071 (exit $ac_status); } &&
c08e6004 16072 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16074 (eval $ac_try) 2>&5
16075 ac_status=$?
16076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16077 (exit $ac_status); }; } &&
16078 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16080 (eval $ac_try) 2>&5
16081 ac_status=$?
16082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16083 (exit $ac_status); }; }; then
16084 ac_header_compiler=yes
16085else
16086 echo "$as_me: failed program was:" >&5
19650fd6
AS
16087sed 's/^/| /' conftest.$ac_ext >&5
16088
c0d27fcc
MR
16089ac_header_compiler=no
16090fi
35996d22 16091rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16092echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16093echo "${ECHO_T}$ac_header_compiler" >&6
16094
16095# Is the header present?
16096echo "$as_me:$LINENO: checking $ac_header presence" >&5
16097echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16098cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16099/* confdefs.h. */
16100_ACEOF
16101cat confdefs.h >>conftest.$ac_ext
16102cat >>conftest.$ac_ext <<_ACEOF
16103/* end confdefs.h. */
2c9dccc9
PJ
16104#include <$ac_header>
16105_ACEOF
c0d27fcc 16106if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
16107 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16108 ac_status=$?
6bae0ccf 16109 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
16110 rm -f conftest.er1
16111 cat conftest.err >&5
c0d27fcc 16112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
16113 (exit $ac_status); } >/dev/null; then
16114 if test -s conftest.err; then
16115 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 16116 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2c9dccc9
PJ
16117 else
16118 ac_cpp_err=
16119 fi
16120else
16121 ac_cpp_err=yes
16122fi
16123if test -z "$ac_cpp_err"; then
c0d27fcc
MR
16124 ac_header_preproc=yes
16125else
16126 echo "$as_me: failed program was:" >&5
19650fd6
AS
16127sed 's/^/| /' conftest.$ac_ext >&5
16128
c0d27fcc
MR
16129 ac_header_preproc=no
16130fi
16131rm -f conftest.err conftest.$ac_ext
16132echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16133echo "${ECHO_T}$ac_header_preproc" >&6
16134
16135# So? What about this header?
35996d22
AS
16136case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16137 yes:no: )
c0d27fcc
MR
16138 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16139echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16140 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16141echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16142 ac_header_preproc=yes
19650fd6 16143 ;;
35996d22 16144 no:yes:* )
c0d27fcc
MR
16145 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16146echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
16147 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16148echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16149 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16150echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16151 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16152echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16153 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16154echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16155 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16156echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16157 (
16158 cat <<\_ASBOX
35996d22
AS
16159## ------------------------------------------ ##
16160## Report this to the AC_PACKAGE_NAME lists. ##
16161## ------------------------------------------ ##
19650fd6
AS
16162_ASBOX
16163 ) |
16164 sed "s/^/$as_me: WARNING: /" >&2
16165 ;;
c0d27fcc
MR
16166esac
16167echo "$as_me:$LINENO: checking for $ac_header" >&5
16168echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16169if eval "test \"\${$as_ac_Header+set}\" = set"; then
16170 echo $ECHO_N "(cached) $ECHO_C" >&6
16171else
35996d22 16172 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc
MR
16173fi
16174echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16175echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16176
16177fi
16178if test `eval echo '${'$as_ac_Header'}'` = yes; then
16179 cat >>confdefs.h <<_ACEOF
16180#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16181_ACEOF
16182
16183fi
16184
16185done
16186
16187fi
16188
16189
16190for ac_header in nlist.h
16191do
16192as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16193if eval "test \"\${$as_ac_Header+set}\" = set"; then
16194 echo "$as_me:$LINENO: checking for $ac_header" >&5
16195echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16196if eval "test \"\${$as_ac_Header+set}\" = set"; then
16197 echo $ECHO_N "(cached) $ECHO_C" >&6
16198fi
16199echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16200echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16201else
16202 # Is the header compilable?
16203echo "$as_me:$LINENO: checking $ac_header usability" >&5
16204echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16205cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16206/* confdefs.h. */
16207_ACEOF
16208cat confdefs.h >>conftest.$ac_ext
16209cat >>conftest.$ac_ext <<_ACEOF
16210/* end confdefs.h. */
c0d27fcc
MR
16211$ac_includes_default
16212#include <$ac_header>
16213_ACEOF
16214rm -f conftest.$ac_objext
16215if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16216 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16217 ac_status=$?
35996d22
AS
16218 grep -v '^ *+' conftest.er1 >conftest.err
16219 rm -f conftest.er1
16220 cat conftest.err >&5
c0d27fcc
MR
16221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16222 (exit $ac_status); } &&
c08e6004 16223 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16225 (eval $ac_try) 2>&5
16226 ac_status=$?
16227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16228 (exit $ac_status); }; } &&
16229 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16231 (eval $ac_try) 2>&5
16232 ac_status=$?
16233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16234 (exit $ac_status); }; }; then
16235 ac_header_compiler=yes
2c9dccc9
PJ
16236else
16237 echo "$as_me: failed program was:" >&5
19650fd6
AS
16238sed 's/^/| /' conftest.$ac_ext >&5
16239
c0d27fcc 16240ac_header_compiler=no
98418dba 16241fi
35996d22 16242rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16243echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16244echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 16245
c0d27fcc
MR
16246# Is the header present?
16247echo "$as_me:$LINENO: checking $ac_header presence" >&5
16248echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16249cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16250/* confdefs.h. */
16251_ACEOF
16252cat confdefs.h >>conftest.$ac_ext
16253cat >>conftest.$ac_ext <<_ACEOF
16254/* end confdefs.h. */
503d2be0
AS
16255#include <$ac_header>
16256_ACEOF
c0d27fcc 16257if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16258 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16259 ac_status=$?
6bae0ccf 16260 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16261 rm -f conftest.er1
16262 cat conftest.err >&5
c0d27fcc 16263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16264 (exit $ac_status); } >/dev/null; then
16265 if test -s conftest.err; then
16266 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 16267 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16268 else
16269 ac_cpp_err=
16270 fi
16271else
16272 ac_cpp_err=yes
16273fi
16274if test -z "$ac_cpp_err"; then
c0d27fcc 16275 ac_header_preproc=yes
503d2be0
AS
16276else
16277 echo "$as_me: failed program was:" >&5
19650fd6
AS
16278sed 's/^/| /' conftest.$ac_ext >&5
16279
c0d27fcc 16280 ac_header_preproc=no
b5de8dc0 16281fi
503d2be0 16282rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16283echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16284echo "${ECHO_T}$ac_header_preproc" >&6
16285
16286# So? What about this header?
35996d22
AS
16287case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16288 yes:no: )
c0d27fcc
MR
16289 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16290echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16291 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16292echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16293 ac_header_preproc=yes
19650fd6 16294 ;;
35996d22 16295 no:yes:* )
c0d27fcc
MR
16296 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16297echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
16298 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16299echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16300 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16301echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16302 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16303echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16304 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16305echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16306 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16307echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16308 (
16309 cat <<\_ASBOX
35996d22
AS
16310## ------------------------------------------ ##
16311## Report this to the AC_PACKAGE_NAME lists. ##
16312## ------------------------------------------ ##
19650fd6
AS
16313_ASBOX
16314 ) |
16315 sed "s/^/$as_me: WARNING: /" >&2
16316 ;;
c0d27fcc
MR
16317esac
16318echo "$as_me:$LINENO: checking for $ac_header" >&5
16319echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16320if eval "test \"\${$as_ac_Header+set}\" = set"; then
16321 echo $ECHO_N "(cached) $ECHO_C" >&6
16322else
35996d22 16323 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 16324fi
c0d27fcc 16325echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16326echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16327
16328fi
98418dba 16329if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16330 cat >>confdefs.h <<_ACEOF
98418dba 16331#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
16332_ACEOF
16333 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
16334echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
16335if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 16336 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 16337else
503d2be0 16338 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16339/* confdefs.h. */
16340_ACEOF
16341cat confdefs.h >>conftest.$ac_ext
16342cat >>conftest.$ac_ext <<_ACEOF
16343/* end confdefs.h. */
98418dba 16344#include <nlist.h>
b5de8dc0 16345
503d2be0
AS
16346int
16347main ()
16348{
98418dba
CW
16349static struct nlist ac_aggr;
16350if (ac_aggr.n_un.n_name)
16351return 0;
503d2be0
AS
16352 ;
16353 return 0;
16354}
16355_ACEOF
98418dba 16356rm -f conftest.$ac_objext
c0d27fcc 16357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16358 (eval $ac_compile) 2>conftest.er1
503d2be0 16359 ac_status=$?
35996d22
AS
16360 grep -v '^ *+' conftest.er1 >conftest.err
16361 rm -f conftest.er1
16362 cat conftest.err >&5
c0d27fcc 16363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16364 (exit $ac_status); } &&
c08e6004 16365 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16367 (eval $ac_try) 2>&5
16368 ac_status=$?
16369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16370 (exit $ac_status); }; } &&
16371 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16373 (eval $ac_try) 2>&5
16374 ac_status=$?
c0d27fcc 16375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16376 (exit $ac_status); }; }; then
98418dba 16377 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
16378else
16379 echo "$as_me: failed program was:" >&5
19650fd6
AS
16380sed 's/^/| /' conftest.$ac_ext >&5
16381
6bae0ccf 16382cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16383/* confdefs.h. */
16384_ACEOF
16385cat confdefs.h >>conftest.$ac_ext
16386cat >>conftest.$ac_ext <<_ACEOF
16387/* end confdefs.h. */
6bae0ccf
DL
16388#include <nlist.h>
16389
16390int
16391main ()
16392{
16393static struct nlist ac_aggr;
16394if (sizeof ac_aggr.n_un.n_name)
16395return 0;
16396 ;
16397 return 0;
16398}
16399_ACEOF
16400rm -f conftest.$ac_objext
16401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16402 (eval $ac_compile) 2>conftest.er1
6bae0ccf 16403 ac_status=$?
35996d22
AS
16404 grep -v '^ *+' conftest.er1 >conftest.err
16405 rm -f conftest.er1
16406 cat conftest.err >&5
6bae0ccf
DL
16407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16408 (exit $ac_status); } &&
c08e6004 16409 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16411 (eval $ac_try) 2>&5
16412 ac_status=$?
16413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16414 (exit $ac_status); }; } &&
16415 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
16416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16417 (eval $ac_try) 2>&5
16418 ac_status=$?
16419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16420 (exit $ac_status); }; }; then
16421 ac_cv_member_struct_nlist_n_un_n_name=yes
16422else
16423 echo "$as_me: failed program was:" >&5
19650fd6
AS
16424sed 's/^/| /' conftest.$ac_ext >&5
16425
98418dba 16426ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 16427fi
35996d22 16428rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 16429fi
35996d22 16430rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 16431fi
c0d27fcc 16432echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
16433echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
16434if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 16435
c0d27fcc 16436cat >>confdefs.h <<_ACEOF
98418dba 16437#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 16438_ACEOF
b5de8dc0 16439
c0d27fcc
MR
16440
16441cat >>confdefs.h <<\_ACEOF
98418dba 16442#define NLIST_NAME_UNION 1
c0d27fcc 16443_ACEOF
b5de8dc0 16444
98418dba 16445fi
b5de8dc0 16446
c0d27fcc 16447
98418dba 16448fi
c0d27fcc 16449
98418dba 16450done
b5de8dc0 16451
98418dba
CW
16452fi
16453done
b5de8dc0 16454
c0d27fcc 16455
98418dba 16456# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 16457echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
16458echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
16459if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
16460 echo $ECHO_N "(cached) $ECHO_C" >&6
16461else
16462 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16463/* confdefs.h. */
16464_ACEOF
16465cat confdefs.h >>conftest.$ac_ext
16466cat >>conftest.$ac_ext <<_ACEOF
16467/* end confdefs.h. */
6bae0ccf 16468#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
16469#ifdef LDAV_PRIVILEGED
16470Yowza Am I SETGID yet
16471#endif
16472_ACEOF
16473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 16474 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
16475 ac_cv_func_getloadavg_setgid=yes
16476else
16477 ac_cv_func_getloadavg_setgid=no
16478fi
16479rm -f conftest*
b5de8dc0 16480
98418dba 16481fi
c0d27fcc 16482echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
16483echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
16484if test $ac_cv_func_getloadavg_setgid = yes; then
16485 NEED_SETGID=true
b5de8dc0 16486
c0d27fcc 16487cat >>confdefs.h <<\_ACEOF
98418dba 16488#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 16489_ACEOF
98418dba 16490
b5de8dc0 16491else
98418dba 16492 NEED_SETGID=false
b5de8dc0 16493fi
98418dba
CW
16494
16495if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 16496 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
16497echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
16498if test "${ac_cv_group_kmem+set}" = set; then
16499 echo $ECHO_N "(cached) $ECHO_C" >&6
16500else
16501 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
16502 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
16503 # If we got an error (system does not support symlinks), try without -L.
16504 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
16505 ac_cv_group_kmem=`echo $ac_ls_output \
35996d22 16506 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
16507 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
16508 / /s/.* //;p;'`
16509
b5de8dc0 16510fi
c0d27fcc 16511echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
16512echo "${ECHO_T}$ac_cv_group_kmem" >&6
16513 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 16514fi
98418dba
CW
16515if test "x$ac_save_LIBS" = x; then
16516 GETLOADAVG_LIBS=$LIBS
16517else
16518 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 16519fi
98418dba 16520LIBS=$ac_save_LIBS
b5de8dc0 16521
c0d27fcc
MR
16522
16523
16524echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
16525echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16526if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 16527 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 16528else
b936fae4
AS
16529 while :; do
16530 ac_cv_sys_largefile_source=no
503d2be0 16531 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16532/* confdefs.h. */
16533_ACEOF
16534cat confdefs.h >>conftest.$ac_ext
16535cat >>conftest.$ac_ext <<_ACEOF
16536/* end confdefs.h. */
b936fae4 16537#include <stdio.h>
503d2be0
AS
16538int
16539main ()
16540{
b936fae4
AS
16541return !fseeko;
16542 ;
16543 return 0;
16544}
16545_ACEOF
16546rm -f conftest.$ac_objext
c0d27fcc 16547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16548 (eval $ac_compile) 2>conftest.er1
b936fae4 16549 ac_status=$?
35996d22
AS
16550 grep -v '^ *+' conftest.er1 >conftest.err
16551 rm -f conftest.er1
16552 cat conftest.err >&5
c0d27fcc 16553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 16554 (exit $ac_status); } &&
c08e6004 16555 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16557 (eval $ac_try) 2>&5
16558 ac_status=$?
16559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16560 (exit $ac_status); }; } &&
16561 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
16563 (eval $ac_try) 2>&5
16564 ac_status=$?
c0d27fcc 16565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
16566 (exit $ac_status); }; }; then
16567 break
16568else
16569 echo "$as_me: failed program was:" >&5
19650fd6
AS
16570sed 's/^/| /' conftest.$ac_ext >&5
16571
b936fae4 16572fi
35996d22 16573rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4 16574 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16575/* confdefs.h. */
16576_ACEOF
16577cat confdefs.h >>conftest.$ac_ext
16578cat >>conftest.$ac_ext <<_ACEOF
16579/* end confdefs.h. */
b936fae4
AS
16580#define _LARGEFILE_SOURCE 1
16581#include <stdio.h>
b936fae4
AS
16582int
16583main ()
16584{
16585return !fseeko;
16586 ;
16587 return 0;
16588}
16589_ACEOF
16590rm -f conftest.$ac_objext
c0d27fcc 16591if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16592 (eval $ac_compile) 2>conftest.er1
b936fae4 16593 ac_status=$?
35996d22
AS
16594 grep -v '^ *+' conftest.er1 >conftest.err
16595 rm -f conftest.er1
16596 cat conftest.err >&5
c0d27fcc 16597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 16598 (exit $ac_status); } &&
c08e6004 16599 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16601 (eval $ac_try) 2>&5
16602 ac_status=$?
16603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16604 (exit $ac_status); }; } &&
16605 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
16607 (eval $ac_try) 2>&5
16608 ac_status=$?
c0d27fcc 16609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
16610 (exit $ac_status); }; }; then
16611 ac_cv_sys_largefile_source=1; break
16612else
16613 echo "$as_me: failed program was:" >&5
19650fd6
AS
16614sed 's/^/| /' conftest.$ac_ext >&5
16615
b936fae4 16616fi
35996d22 16617rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4
AS
16618 break
16619done
16620fi
c0d27fcc 16621echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
16622echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16623if test "$ac_cv_sys_largefile_source" != no; then
16624
c0d27fcc 16625cat >>confdefs.h <<_ACEOF
b936fae4 16626#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 16627_ACEOF
b936fae4
AS
16628
16629fi
16630rm -f conftest*
4c343001 16631
b936fae4
AS
16632# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16633# in glibc 2.1.3, but that breaks too many other things.
16634# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 16635echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
16636echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16637if test "${ac_cv_func_fseeko+set}" = set; then
16638 echo $ECHO_N "(cached) $ECHO_C" >&6
16639else
16640 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16641/* confdefs.h. */
16642_ACEOF
16643cat confdefs.h >>conftest.$ac_ext
16644cat >>conftest.$ac_ext <<_ACEOF
16645/* end confdefs.h. */
b936fae4 16646#include <stdio.h>
b936fae4
AS
16647int
16648main ()
16649{
16650return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
16651 ;
16652 return 0;
16653}
16654_ACEOF
16655rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16656if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16657 (eval $ac_link) 2>conftest.er1
503d2be0 16658 ac_status=$?
35996d22
AS
16659 grep -v '^ *+' conftest.er1 >conftest.err
16660 rm -f conftest.er1
16661 cat conftest.err >&5
c0d27fcc 16662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16663 (exit $ac_status); } &&
c08e6004 16664 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16666 (eval $ac_try) 2>&5
16667 ac_status=$?
16668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16669 (exit $ac_status); }; } &&
16670 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16672 (eval $ac_try) 2>&5
16673 ac_status=$?
c0d27fcc 16674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16675 (exit $ac_status); }; }; then
b936fae4 16676 ac_cv_func_fseeko=yes
503d2be0
AS
16677else
16678 echo "$as_me: failed program was:" >&5
19650fd6
AS
16679sed 's/^/| /' conftest.$ac_ext >&5
16680
b936fae4 16681ac_cv_func_fseeko=no
503d2be0 16682fi
35996d22
AS
16683rm -f conftest.err conftest.$ac_objext \
16684 conftest$ac_exeext conftest.$ac_ext
503d2be0 16685fi
c0d27fcc 16686echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
16687echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16688if test $ac_cv_func_fseeko = yes; then
16689
c0d27fcc 16690cat >>confdefs.h <<\_ACEOF
b936fae4 16691#define HAVE_FSEEKO 1
c0d27fcc 16692_ACEOF
b936fae4 16693
4c343001
DL
16694fi
16695
c0d27fcc 16696
cd958eb3
MB
16697echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
16698echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
16699if test "${ac_cv_func_getpgrp_void+set}" = set; then
16700 echo $ECHO_N "(cached) $ECHO_C" >&6
16701else
16702 # Use it with a single arg.
16703cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16704/* confdefs.h. */
16705_ACEOF
16706cat confdefs.h >>conftest.$ac_ext
16707cat >>conftest.$ac_ext <<_ACEOF
16708/* end confdefs.h. */
cd958eb3
MB
16709$ac_includes_default
16710int
16711main ()
16712{
16713getpgrp (0);
16714 ;
16715 return 0;
16716}
16717_ACEOF
16718rm -f conftest.$ac_objext
16719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16720 (eval $ac_compile) 2>conftest.er1
cd958eb3 16721 ac_status=$?
35996d22
AS
16722 grep -v '^ *+' conftest.er1 >conftest.err
16723 rm -f conftest.er1
16724 cat conftest.err >&5
cd958eb3
MB
16725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16726 (exit $ac_status); } &&
c08e6004 16727 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16729 (eval $ac_try) 2>&5
16730 ac_status=$?
16731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16732 (exit $ac_status); }; } &&
16733 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
16734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16735 (eval $ac_try) 2>&5
16736 ac_status=$?
16737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16738 (exit $ac_status); }; }; then
16739 ac_cv_func_getpgrp_void=no
16740else
16741 echo "$as_me: failed program was:" >&5
19650fd6
AS
16742sed 's/^/| /' conftest.$ac_ext >&5
16743
cd958eb3
MB
16744ac_cv_func_getpgrp_void=yes
16745fi
35996d22 16746rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
16747
16748fi
16749echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
16750echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
16751if test $ac_cv_func_getpgrp_void = yes; then
16752
16753cat >>confdefs.h <<\_ACEOF
16754#define GETPGRP_VOID 1
16755_ACEOF
16756
16757fi
16758
16759
973a76b1
DL
16760
16761for ac_func in strftime
16762do
16763as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16764echo "$as_me:$LINENO: checking for $ac_func" >&5
16765echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16766if eval "test \"\${$as_ac_var+set}\" = set"; then
16767 echo $ECHO_N "(cached) $ECHO_C" >&6
16768else
16769 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16770/* confdefs.h. */
16771_ACEOF
16772cat confdefs.h >>conftest.$ac_ext
16773cat >>conftest.$ac_ext <<_ACEOF
16774/* end confdefs.h. */
35996d22
AS
16775/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16776 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16777#define $ac_func innocuous_$ac_func
16778
973a76b1 16779/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16780 which can conflict with char $ac_func (); below.
16781 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16782 <limits.h> exists even on freestanding compilers. */
35996d22 16783
19650fd6
AS
16784#ifdef __STDC__
16785# include <limits.h>
16786#else
16787# include <assert.h>
16788#endif
35996d22
AS
16789
16790#undef $ac_func
16791
973a76b1
DL
16792/* Override any gcc2 internal prototype to avoid an error. */
16793#ifdef __cplusplus
16794extern "C"
19650fd6 16795{
973a76b1
DL
16796#endif
16797/* We use char because int might match the return type of a gcc2
16798 builtin and then its argument prototype would still apply. */
16799char $ac_func ();
16800/* The GNU C library defines this for functions which it implements
16801 to always fail with ENOSYS. Some functions are actually named
16802 something starting with __ and the normal name is an alias. */
16803#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16804choke me
16805#else
19650fd6
AS
16806char (*f) () = $ac_func;
16807#endif
16808#ifdef __cplusplus
16809}
973a76b1
DL
16810#endif
16811
19650fd6
AS
16812int
16813main ()
16814{
16815return f != $ac_func;
973a76b1
DL
16816 ;
16817 return 0;
16818}
16819_ACEOF
16820rm -f conftest.$ac_objext conftest$ac_exeext
16821if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16822 (eval $ac_link) 2>conftest.er1
973a76b1 16823 ac_status=$?
35996d22
AS
16824 grep -v '^ *+' conftest.er1 >conftest.err
16825 rm -f conftest.er1
16826 cat conftest.err >&5
973a76b1
DL
16827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16828 (exit $ac_status); } &&
c08e6004 16829 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16831 (eval $ac_try) 2>&5
16832 ac_status=$?
16833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16834 (exit $ac_status); }; } &&
16835 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
16836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16837 (eval $ac_try) 2>&5
16838 ac_status=$?
16839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16840 (exit $ac_status); }; }; then
16841 eval "$as_ac_var=yes"
16842else
16843 echo "$as_me: failed program was:" >&5
19650fd6
AS
16844sed 's/^/| /' conftest.$ac_ext >&5
16845
973a76b1
DL
16846eval "$as_ac_var=no"
16847fi
35996d22
AS
16848rm -f conftest.err conftest.$ac_objext \
16849 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
16850fi
16851echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16852echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16853if test `eval echo '${'$as_ac_var'}'` = yes; then
16854 cat >>confdefs.h <<_ACEOF
16855#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16856_ACEOF
16857
16858else
16859 # strftime is in -lintl on SCO UNIX.
16860echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
16861echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
16862if test "${ac_cv_lib_intl_strftime+set}" = set; then
16863 echo $ECHO_N "(cached) $ECHO_C" >&6
16864else
16865 ac_check_lib_save_LIBS=$LIBS
16866LIBS="-lintl $LIBS"
16867cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16868/* confdefs.h. */
16869_ACEOF
16870cat confdefs.h >>conftest.$ac_ext
16871cat >>conftest.$ac_ext <<_ACEOF
16872/* end confdefs.h. */
973a76b1
DL
16873
16874/* Override any gcc2 internal prototype to avoid an error. */
16875#ifdef __cplusplus
16876extern "C"
16877#endif
16878/* We use char because int might match the return type of a gcc2
16879 builtin and then its argument prototype would still apply. */
16880char strftime ();
16881int
16882main ()
16883{
16884strftime ();
16885 ;
16886 return 0;
16887}
16888_ACEOF
16889rm -f conftest.$ac_objext conftest$ac_exeext
16890if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16891 (eval $ac_link) 2>conftest.er1
973a76b1 16892 ac_status=$?
35996d22
AS
16893 grep -v '^ *+' conftest.er1 >conftest.err
16894 rm -f conftest.er1
16895 cat conftest.err >&5
973a76b1
DL
16896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16897 (exit $ac_status); } &&
c08e6004 16898 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
16899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16900 (eval $ac_try) 2>&5
16901 ac_status=$?
16902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16903 (exit $ac_status); }; } &&
16904 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
16905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16906 (eval $ac_try) 2>&5
16907 ac_status=$?
16908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16909 (exit $ac_status); }; }; then
16910 ac_cv_lib_intl_strftime=yes
16911else
16912 echo "$as_me: failed program was:" >&5
19650fd6
AS
16913sed 's/^/| /' conftest.$ac_ext >&5
16914
973a76b1
DL
16915ac_cv_lib_intl_strftime=no
16916fi
35996d22
AS
16917rm -f conftest.err conftest.$ac_objext \
16918 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
16919LIBS=$ac_check_lib_save_LIBS
16920fi
16921echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
16922echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
16923if test $ac_cv_lib_intl_strftime = yes; then
16924 cat >>confdefs.h <<\_ACEOF
16925#define HAVE_STRFTIME 1
16926_ACEOF
16927
16928LIBS="-lintl $LIBS"
16929fi
16930
16931fi
16932done
16933
16934
b936fae4
AS
16935# UNIX98 PTYs.
16936
16937for ac_func in grantpt
503d2be0
AS
16938do
16939as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 16940echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
16941echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16942if eval "test \"\${$as_ac_var+set}\" = set"; then
16943 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 16944else
503d2be0 16945 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16946/* confdefs.h. */
16947_ACEOF
16948cat confdefs.h >>conftest.$ac_ext
16949cat >>conftest.$ac_ext <<_ACEOF
16950/* end confdefs.h. */
35996d22
AS
16951/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16952 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16953#define $ac_func innocuous_$ac_func
16954
503d2be0 16955/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16956 which can conflict with char $ac_func (); below.
16957 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16958 <limits.h> exists even on freestanding compilers. */
35996d22 16959
19650fd6
AS
16960#ifdef __STDC__
16961# include <limits.h>
16962#else
16963# include <assert.h>
16964#endif
35996d22
AS
16965
16966#undef $ac_func
16967
4c343001 16968/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16969#ifdef __cplusplus
16970extern "C"
19650fd6 16971{
503d2be0 16972#endif
4c343001 16973/* We use char because int might match the return type of a gcc2
503d2be0
AS
16974 builtin and then its argument prototype would still apply. */
16975char $ac_func ();
503d2be0
AS
16976/* The GNU C library defines this for functions which it implements
16977 to always fail with ENOSYS. Some functions are actually named
16978 something starting with __ and the normal name is an alias. */
16979#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16980choke me
16981#else
19650fd6
AS
16982char (*f) () = $ac_func;
16983#endif
16984#ifdef __cplusplus
16985}
503d2be0 16986#endif
4c343001 16987
19650fd6
AS
16988int
16989main ()
16990{
16991return f != $ac_func;
503d2be0
AS
16992 ;
16993 return 0;
16994}
16995_ACEOF
16996rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16997if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16998 (eval $ac_link) 2>conftest.er1
503d2be0 16999 ac_status=$?
35996d22
AS
17000 grep -v '^ *+' conftest.er1 >conftest.err
17001 rm -f conftest.er1
17002 cat conftest.err >&5
c0d27fcc 17003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17004 (exit $ac_status); } &&
c08e6004 17005 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17007 (eval $ac_try) 2>&5
17008 ac_status=$?
17009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17010 (exit $ac_status); }; } &&
17011 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17013 (eval $ac_try) 2>&5
17014 ac_status=$?
c0d27fcc 17015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17016 (exit $ac_status); }; }; then
17017 eval "$as_ac_var=yes"
17018else
17019 echo "$as_me: failed program was:" >&5
19650fd6
AS
17020sed 's/^/| /' conftest.$ac_ext >&5
17021
503d2be0
AS
17022eval "$as_ac_var=no"
17023fi
35996d22
AS
17024rm -f conftest.err conftest.$ac_objext \
17025 conftest$ac_exeext conftest.$ac_ext
503d2be0 17026fi
c0d27fcc 17027echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17028echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17029if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17030 cat >>confdefs.h <<_ACEOF
503d2be0 17031#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17032_ACEOF
4c343001
DL
17033
17034fi
503d2be0
AS
17035done
17036
c0d27fcc 17037
b936fae4 17038# PTY-related GNU extensions.
4c343001 17039
b936fae4
AS
17040for ac_func in getpt
17041do
17042as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 17043echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
17044echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17045if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 17046 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17047else
b936fae4 17048 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17049/* confdefs.h. */
17050_ACEOF
17051cat confdefs.h >>conftest.$ac_ext
17052cat >>conftest.$ac_ext <<_ACEOF
17053/* end confdefs.h. */
35996d22
AS
17054/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17055 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17056#define $ac_func innocuous_$ac_func
17057
087121cc 17058/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17059 which can conflict with char $ac_func (); below.
17060 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17061 <limits.h> exists even on freestanding compilers. */
35996d22 17062
19650fd6
AS
17063#ifdef __STDC__
17064# include <limits.h>
17065#else
17066# include <assert.h>
17067#endif
35996d22
AS
17068
17069#undef $ac_func
17070
087121cc 17071/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17072#ifdef __cplusplus
17073extern "C"
19650fd6 17074{
503d2be0 17075#endif
087121cc 17076/* We use char because int might match the return type of a gcc2
503d2be0
AS
17077 builtin and then its argument prototype would still apply. */
17078char $ac_func ();
087121cc
GM
17079/* The GNU C library defines this for functions which it implements
17080 to always fail with ENOSYS. Some functions are actually named
17081 something starting with __ and the normal name is an alias. */
17082#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17083choke me
17084#else
19650fd6
AS
17085char (*f) () = $ac_func;
17086#endif
17087#ifdef __cplusplus
17088}
087121cc
GM
17089#endif
17090
19650fd6
AS
17091int
17092main ()
17093{
17094return f != $ac_func;
503d2be0
AS
17095 ;
17096 return 0;
17097}
17098_ACEOF
17099rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17100if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17101 (eval $ac_link) 2>conftest.er1
503d2be0 17102 ac_status=$?
35996d22
AS
17103 grep -v '^ *+' conftest.er1 >conftest.err
17104 rm -f conftest.er1
17105 cat conftest.err >&5
c0d27fcc 17106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17107 (exit $ac_status); } &&
c08e6004 17108 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17110 (eval $ac_try) 2>&5
17111 ac_status=$?
17112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17113 (exit $ac_status); }; } &&
17114 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17116 (eval $ac_try) 2>&5
17117 ac_status=$?
c0d27fcc 17118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17119 (exit $ac_status); }; }; then
17120 eval "$as_ac_var=yes"
17121else
17122 echo "$as_me: failed program was:" >&5
19650fd6
AS
17123sed 's/^/| /' conftest.$ac_ext >&5
17124
503d2be0
AS
17125eval "$as_ac_var=no"
17126fi
35996d22
AS
17127rm -f conftest.err conftest.$ac_objext \
17128 conftest$ac_exeext conftest.$ac_ext
503d2be0 17129fi
c0d27fcc 17130echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17131echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17132if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17133 cat >>confdefs.h <<_ACEOF
503d2be0 17134#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17135_ACEOF
087121cc 17136
087121cc
GM
17137fi
17138done
17139
c0d27fcc 17140
ba4481b5
DL
17141# Check this now, so that we will NOT find the above functions in ncurses.
17142# That is because we have not set up to link ncurses in lib-src.
17143# It's better to believe a function is not available
17144# than to expect to find it in ncurses.
503d2be0 17145
c0d27fcc 17146echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
17147echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
17148if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
17149 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17150else
503d2be0 17151 ac_check_lib_save_LIBS=$LIBS
ba4481b5 17152LIBS="-lncurses $LIBS"
503d2be0 17153cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17154/* confdefs.h. */
17155_ACEOF
17156cat confdefs.h >>conftest.$ac_ext
17157cat >>conftest.$ac_ext <<_ACEOF
17158/* end confdefs.h. */
503d2be0 17159
ba4481b5 17160/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17161#ifdef __cplusplus
17162extern "C"
17163#endif
ba4481b5 17164/* We use char because int might match the return type of a gcc2
503d2be0
AS
17165 builtin and then its argument prototype would still apply. */
17166char tparm ();
17167int
17168main ()
17169{
17170tparm ();
17171 ;
17172 return 0;
17173}
17174_ACEOF
17175rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17176if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17177 (eval $ac_link) 2>conftest.er1
503d2be0 17178 ac_status=$?
35996d22
AS
17179 grep -v '^ *+' conftest.er1 >conftest.err
17180 rm -f conftest.er1
17181 cat conftest.err >&5
c0d27fcc 17182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17183 (exit $ac_status); } &&
c08e6004 17184 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17186 (eval $ac_try) 2>&5
17187 ac_status=$?
17188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17189 (exit $ac_status); }; } &&
17190 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17192 (eval $ac_try) 2>&5
17193 ac_status=$?
c0d27fcc 17194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17195 (exit $ac_status); }; }; then
17196 ac_cv_lib_ncurses_tparm=yes
17197else
17198 echo "$as_me: failed program was:" >&5
19650fd6
AS
17199sed 's/^/| /' conftest.$ac_ext >&5
17200
503d2be0
AS
17201ac_cv_lib_ncurses_tparm=no
17202fi
35996d22
AS
17203rm -f conftest.err conftest.$ac_objext \
17204 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17205LIBS=$ac_check_lib_save_LIBS
17206fi
c0d27fcc 17207echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
17208echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
17209if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 17210 cat >>confdefs.h <<_ACEOF
503d2be0 17211#define HAVE_LIBNCURSES 1
c0d27fcc 17212_ACEOF
ba4481b5
DL
17213
17214 LIBS="-lncurses $LIBS"
17215
ba4481b5
DL
17216fi
17217
c0d27fcc 17218
84e70f78
KR
17219# Do we need the Hesiod library to provide the support routines?
17220if test "$with_hesiod" = yes ; then
17221 # Don't set $LIBS here -- see comments above.
17222 resolv=no
c0d27fcc 17223 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
17224echo $ECHO_N "checking for res_send... $ECHO_C" >&6
17225if test "${ac_cv_func_res_send+set}" = set; then
17226 echo $ECHO_N "(cached) $ECHO_C" >&6
17227else
17228 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17229/* confdefs.h. */
17230_ACEOF
17231cat confdefs.h >>conftest.$ac_ext
17232cat >>conftest.$ac_ext <<_ACEOF
17233/* end confdefs.h. */
35996d22
AS
17234/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
17235 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17236#define res_send innocuous_res_send
17237
84e70f78 17238/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17239 which can conflict with char res_send (); below.
17240 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17241 <limits.h> exists even on freestanding compilers. */
35996d22 17242
19650fd6
AS
17243#ifdef __STDC__
17244# include <limits.h>
17245#else
17246# include <assert.h>
17247#endif
35996d22
AS
17248
17249#undef res_send
17250
84e70f78
KR
17251/* Override any gcc2 internal prototype to avoid an error. */
17252#ifdef __cplusplus
17253extern "C"
19650fd6 17254{
84e70f78
KR
17255#endif
17256/* We use char because int might match the return type of a gcc2
17257 builtin and then its argument prototype would still apply. */
17258char res_send ();
84e70f78
KR
17259/* The GNU C library defines this for functions which it implements
17260 to always fail with ENOSYS. Some functions are actually named
17261 something starting with __ and the normal name is an alias. */
17262#if defined (__stub_res_send) || defined (__stub___res_send)
17263choke me
17264#else
19650fd6
AS
17265char (*f) () = res_send;
17266#endif
17267#ifdef __cplusplus
17268}
cd958eb3
MB
17269#endif
17270
19650fd6
AS
17271int
17272main ()
17273{
17274return f != res_send;
84e70f78
KR
17275 ;
17276 return 0;
17277}
17278_ACEOF
17279rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17280if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17281 (eval $ac_link) 2>conftest.er1
84e70f78 17282 ac_status=$?
35996d22
AS
17283 grep -v '^ *+' conftest.er1 >conftest.err
17284 rm -f conftest.er1
17285 cat conftest.err >&5
c0d27fcc 17286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17287 (exit $ac_status); } &&
c08e6004 17288 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17290 (eval $ac_try) 2>&5
17291 ac_status=$?
17292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17293 (exit $ac_status); }; } &&
17294 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17296 (eval $ac_try) 2>&5
17297 ac_status=$?
c0d27fcc 17298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17299 (exit $ac_status); }; }; then
17300 ac_cv_func_res_send=yes
17301else
17302 echo "$as_me: failed program was:" >&5
19650fd6
AS
17303sed 's/^/| /' conftest.$ac_ext >&5
17304
84e70f78
KR
17305ac_cv_func_res_send=no
17306fi
35996d22
AS
17307rm -f conftest.err conftest.$ac_objext \
17308 conftest$ac_exeext conftest.$ac_ext
84e70f78 17309fi
c0d27fcc 17310echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
17311echo "${ECHO_T}$ac_cv_func_res_send" >&6
17312if test $ac_cv_func_res_send = yes; then
17313 :
17314else
c0d27fcc 17315 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
17316echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
17317if test "${ac_cv_func___res_send+set}" = set; then
17318 echo $ECHO_N "(cached) $ECHO_C" >&6
17319else
17320 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17321/* confdefs.h. */
17322_ACEOF
17323cat confdefs.h >>conftest.$ac_ext
17324cat >>conftest.$ac_ext <<_ACEOF
17325/* end confdefs.h. */
35996d22
AS
17326/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
17327 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17328#define __res_send innocuous___res_send
17329
84e70f78 17330/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17331 which can conflict with char __res_send (); below.
17332 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17333 <limits.h> exists even on freestanding compilers. */
35996d22 17334
19650fd6
AS
17335#ifdef __STDC__
17336# include <limits.h>
17337#else
17338# include <assert.h>
17339#endif
35996d22
AS
17340
17341#undef __res_send
17342
84e70f78
KR
17343/* Override any gcc2 internal prototype to avoid an error. */
17344#ifdef __cplusplus
17345extern "C"
19650fd6 17346{
84e70f78
KR
17347#endif
17348/* We use char because int might match the return type of a gcc2
17349 builtin and then its argument prototype would still apply. */
17350char __res_send ();
84e70f78
KR
17351/* The GNU C library defines this for functions which it implements
17352 to always fail with ENOSYS. Some functions are actually named
17353 something starting with __ and the normal name is an alias. */
17354#if defined (__stub___res_send) || defined (__stub_____res_send)
17355choke me
17356#else
19650fd6
AS
17357char (*f) () = __res_send;
17358#endif
17359#ifdef __cplusplus
17360}
84e70f78
KR
17361#endif
17362
19650fd6
AS
17363int
17364main ()
17365{
17366return f != __res_send;
84e70f78
KR
17367 ;
17368 return 0;
17369}
17370_ACEOF
17371rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17372if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17373 (eval $ac_link) 2>conftest.er1
84e70f78 17374 ac_status=$?
35996d22
AS
17375 grep -v '^ *+' conftest.er1 >conftest.err
17376 rm -f conftest.er1
17377 cat conftest.err >&5
c0d27fcc 17378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17379 (exit $ac_status); } &&
c08e6004 17380 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17382 (eval $ac_try) 2>&5
17383 ac_status=$?
17384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17385 (exit $ac_status); }; } &&
17386 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17388 (eval $ac_try) 2>&5
17389 ac_status=$?
c0d27fcc 17390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17391 (exit $ac_status); }; }; then
17392 ac_cv_func___res_send=yes
17393else
17394 echo "$as_me: failed program was:" >&5
19650fd6
AS
17395sed 's/^/| /' conftest.$ac_ext >&5
17396
84e70f78
KR
17397ac_cv_func___res_send=no
17398fi
35996d22
AS
17399rm -f conftest.err conftest.$ac_objext \
17400 conftest$ac_exeext conftest.$ac_ext
84e70f78 17401fi
c0d27fcc 17402echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
17403echo "${ECHO_T}$ac_cv_func___res_send" >&6
17404if test $ac_cv_func___res_send = yes; then
17405 :
17406else
c0d27fcc 17407 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
17408echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
17409if test "${ac_cv_lib_resolv_res_send+set}" = set; then
17410 echo $ECHO_N "(cached) $ECHO_C" >&6
17411else
17412 ac_check_lib_save_LIBS=$LIBS
17413LIBS="-lresolv $LIBS"
17414cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17415/* confdefs.h. */
17416_ACEOF
17417cat confdefs.h >>conftest.$ac_ext
17418cat >>conftest.$ac_ext <<_ACEOF
17419/* end confdefs.h. */
84e70f78
KR
17420
17421/* Override any gcc2 internal prototype to avoid an error. */
17422#ifdef __cplusplus
17423extern "C"
17424#endif
17425/* We use char because int might match the return type of a gcc2
17426 builtin and then its argument prototype would still apply. */
17427char res_send ();
17428int
17429main ()
17430{
17431res_send ();
17432 ;
17433 return 0;
17434}
17435_ACEOF
17436rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17437if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17438 (eval $ac_link) 2>conftest.er1
84e70f78 17439 ac_status=$?
35996d22
AS
17440 grep -v '^ *+' conftest.er1 >conftest.err
17441 rm -f conftest.er1
17442 cat conftest.err >&5
c0d27fcc 17443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17444 (exit $ac_status); } &&
c08e6004 17445 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17447 (eval $ac_try) 2>&5
17448 ac_status=$?
17449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17450 (exit $ac_status); }; } &&
17451 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17453 (eval $ac_try) 2>&5
17454 ac_status=$?
c0d27fcc 17455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17456 (exit $ac_status); }; }; then
17457 ac_cv_lib_resolv_res_send=yes
17458else
17459 echo "$as_me: failed program was:" >&5
19650fd6
AS
17460sed 's/^/| /' conftest.$ac_ext >&5
17461
84e70f78
KR
17462ac_cv_lib_resolv_res_send=no
17463fi
35996d22
AS
17464rm -f conftest.err conftest.$ac_objext \
17465 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17466LIBS=$ac_check_lib_save_LIBS
17467fi
c0d27fcc 17468echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
17469echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
17470if test $ac_cv_lib_resolv_res_send = yes; then
17471 resolv=yes
17472else
c0d27fcc 17473 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
17474echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
17475if test "${ac_cv_lib_resolv___res_send+set}" = set; then
17476 echo $ECHO_N "(cached) $ECHO_C" >&6
17477else
17478 ac_check_lib_save_LIBS=$LIBS
17479LIBS="-lresolv $LIBS"
17480cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17481/* confdefs.h. */
17482_ACEOF
17483cat confdefs.h >>conftest.$ac_ext
17484cat >>conftest.$ac_ext <<_ACEOF
17485/* end confdefs.h. */
84e70f78
KR
17486
17487/* Override any gcc2 internal prototype to avoid an error. */
17488#ifdef __cplusplus
17489extern "C"
17490#endif
17491/* We use char because int might match the return type of a gcc2
17492 builtin and then its argument prototype would still apply. */
17493char __res_send ();
17494int
17495main ()
17496{
17497__res_send ();
17498 ;
17499 return 0;
17500}
17501_ACEOF
17502rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17503if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17504 (eval $ac_link) 2>conftest.er1
84e70f78 17505 ac_status=$?
35996d22
AS
17506 grep -v '^ *+' conftest.er1 >conftest.err
17507 rm -f conftest.er1
17508 cat conftest.err >&5
c0d27fcc 17509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17510 (exit $ac_status); } &&
c08e6004 17511 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17513 (eval $ac_try) 2>&5
17514 ac_status=$?
17515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17516 (exit $ac_status); }; } &&
17517 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17519 (eval $ac_try) 2>&5
17520 ac_status=$?
c0d27fcc 17521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17522 (exit $ac_status); }; }; then
17523 ac_cv_lib_resolv___res_send=yes
17524else
17525 echo "$as_me: failed program was:" >&5
19650fd6
AS
17526sed 's/^/| /' conftest.$ac_ext >&5
17527
84e70f78
KR
17528ac_cv_lib_resolv___res_send=no
17529fi
35996d22
AS
17530rm -f conftest.err conftest.$ac_objext \
17531 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17532LIBS=$ac_check_lib_save_LIBS
17533fi
c0d27fcc 17534echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
17535echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
17536if test $ac_cv_lib_resolv___res_send = yes; then
17537 resolv=yes
17538fi
17539
17540fi
17541
17542fi
17543
17544fi
17545
17546 if test "$resolv" = yes ; then
17547 RESOLVLIB=-lresolv
b936fae4 17548
c0d27fcc 17549cat >>confdefs.h <<\_ACEOF
84e70f78 17550#define HAVE_LIBRESOLV 1
c0d27fcc 17551_ACEOF
84e70f78
KR
17552
17553 else
17554 RESOLVLIB=
17555 fi
c0d27fcc 17556 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
17557echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
17558if test "${ac_cv_func_hes_getmailhost+set}" = set; then
17559 echo $ECHO_N "(cached) $ECHO_C" >&6
17560else
17561 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17562/* confdefs.h. */
17563_ACEOF
17564cat confdefs.h >>conftest.$ac_ext
17565cat >>conftest.$ac_ext <<_ACEOF
17566/* end confdefs.h. */
35996d22
AS
17567/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
17568 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17569#define hes_getmailhost innocuous_hes_getmailhost
17570
84e70f78 17571/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17572 which can conflict with char hes_getmailhost (); below.
17573 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17574 <limits.h> exists even on freestanding compilers. */
35996d22 17575
19650fd6
AS
17576#ifdef __STDC__
17577# include <limits.h>
17578#else
17579# include <assert.h>
17580#endif
35996d22
AS
17581
17582#undef hes_getmailhost
17583
84e70f78
KR
17584/* Override any gcc2 internal prototype to avoid an error. */
17585#ifdef __cplusplus
17586extern "C"
19650fd6 17587{
84e70f78
KR
17588#endif
17589/* We use char because int might match the return type of a gcc2
17590 builtin and then its argument prototype would still apply. */
17591char hes_getmailhost ();
84e70f78
KR
17592/* The GNU C library defines this for functions which it implements
17593 to always fail with ENOSYS. Some functions are actually named
17594 something starting with __ and the normal name is an alias. */
17595#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
17596choke me
17597#else
19650fd6
AS
17598char (*f) () = hes_getmailhost;
17599#endif
17600#ifdef __cplusplus
17601}
cd958eb3
MB
17602#endif
17603
19650fd6
AS
17604int
17605main ()
17606{
17607return f != hes_getmailhost;
84e70f78
KR
17608 ;
17609 return 0;
17610}
17611_ACEOF
17612rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17613if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17614 (eval $ac_link) 2>conftest.er1
84e70f78 17615 ac_status=$?
35996d22
AS
17616 grep -v '^ *+' conftest.er1 >conftest.err
17617 rm -f conftest.er1
17618 cat conftest.err >&5
c0d27fcc 17619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17620 (exit $ac_status); } &&
c08e6004 17621 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17623 (eval $ac_try) 2>&5
17624 ac_status=$?
17625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17626 (exit $ac_status); }; } &&
17627 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17629 (eval $ac_try) 2>&5
17630 ac_status=$?
c0d27fcc 17631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17632 (exit $ac_status); }; }; then
17633 ac_cv_func_hes_getmailhost=yes
17634else
17635 echo "$as_me: failed program was:" >&5
19650fd6
AS
17636sed 's/^/| /' conftest.$ac_ext >&5
17637
84e70f78
KR
17638ac_cv_func_hes_getmailhost=no
17639fi
35996d22
AS
17640rm -f conftest.err conftest.$ac_objext \
17641 conftest$ac_exeext conftest.$ac_ext
84e70f78 17642fi
c0d27fcc 17643echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
17644echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
17645if test $ac_cv_func_hes_getmailhost = yes; then
17646 :
17647else
c0d27fcc 17648 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
17649echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
17650if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
17651 echo $ECHO_N "(cached) $ECHO_C" >&6
17652else
17653 ac_check_lib_save_LIBS=$LIBS
17654LIBS="-lhesiod $RESOLVLIB $LIBS"
17655cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17656/* confdefs.h. */
17657_ACEOF
17658cat confdefs.h >>conftest.$ac_ext
17659cat >>conftest.$ac_ext <<_ACEOF
17660/* end confdefs.h. */
84e70f78
KR
17661
17662/* Override any gcc2 internal prototype to avoid an error. */
17663#ifdef __cplusplus
17664extern "C"
17665#endif
17666/* We use char because int might match the return type of a gcc2
17667 builtin and then its argument prototype would still apply. */
17668char hes_getmailhost ();
17669int
17670main ()
17671{
17672hes_getmailhost ();
17673 ;
17674 return 0;
17675}
17676_ACEOF
17677rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17678if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17679 (eval $ac_link) 2>conftest.er1
84e70f78 17680 ac_status=$?
35996d22
AS
17681 grep -v '^ *+' conftest.er1 >conftest.err
17682 rm -f conftest.er1
17683 cat conftest.err >&5
c0d27fcc 17684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17685 (exit $ac_status); } &&
c08e6004 17686 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17688 (eval $ac_try) 2>&5
17689 ac_status=$?
17690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17691 (exit $ac_status); }; } &&
17692 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17694 (eval $ac_try) 2>&5
17695 ac_status=$?
c0d27fcc 17696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17697 (exit $ac_status); }; }; then
17698 ac_cv_lib_hesiod_hes_getmailhost=yes
17699else
17700 echo "$as_me: failed program was:" >&5
19650fd6
AS
17701sed 's/^/| /' conftest.$ac_ext >&5
17702
84e70f78
KR
17703ac_cv_lib_hesiod_hes_getmailhost=no
17704fi
35996d22
AS
17705rm -f conftest.err conftest.$ac_objext \
17706 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17707LIBS=$ac_check_lib_save_LIBS
17708fi
c0d27fcc 17709echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
17710echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
17711if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 17712
c0d27fcc 17713cat >>confdefs.h <<\_ACEOF
84e70f78 17714#define HAVE_LIBHESIOD 1
c0d27fcc 17715_ACEOF
84e70f78
KR
17716
17717else
17718 :
17719fi
17720
17721fi
17722
17723fi
17724
a21616bd
KR
17725# These tell us which Kerberos-related libraries to use.
17726if test "${with_kerberos+set}" = set; then
503d2be0 17727
c0d27fcc 17728echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
17729echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
17730if test "${ac_cv_lib_com_err_com_err+set}" = set; then
17731 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17732else
503d2be0 17733 ac_check_lib_save_LIBS=$LIBS
a21616bd 17734LIBS="-lcom_err $LIBS"
503d2be0 17735cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17736/* confdefs.h. */
17737_ACEOF
17738cat confdefs.h >>conftest.$ac_ext
17739cat >>conftest.$ac_ext <<_ACEOF
17740/* end confdefs.h. */
503d2be0 17741
a21616bd 17742/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17743#ifdef __cplusplus
17744extern "C"
17745#endif
a21616bd 17746/* We use char because int might match the return type of a gcc2
503d2be0
AS
17747 builtin and then its argument prototype would still apply. */
17748char com_err ();
17749int
17750main ()
17751{
17752com_err ();
17753 ;
17754 return 0;
17755}
17756_ACEOF
17757rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17758if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17759 (eval $ac_link) 2>conftest.er1
503d2be0 17760 ac_status=$?
35996d22
AS
17761 grep -v '^ *+' conftest.er1 >conftest.err
17762 rm -f conftest.er1
17763 cat conftest.err >&5
c0d27fcc 17764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17765 (exit $ac_status); } &&
c08e6004 17766 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17768 (eval $ac_try) 2>&5
17769 ac_status=$?
17770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17771 (exit $ac_status); }; } &&
17772 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17774 (eval $ac_try) 2>&5
17775 ac_status=$?
c0d27fcc 17776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17777 (exit $ac_status); }; }; then
17778 ac_cv_lib_com_err_com_err=yes
17779else
17780 echo "$as_me: failed program was:" >&5
19650fd6
AS
17781sed 's/^/| /' conftest.$ac_ext >&5
17782
503d2be0
AS
17783ac_cv_lib_com_err_com_err=no
17784fi
35996d22
AS
17785rm -f conftest.err conftest.$ac_objext \
17786 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17787LIBS=$ac_check_lib_save_LIBS
17788fi
c0d27fcc 17789echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
17790echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
17791if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 17792 cat >>confdefs.h <<_ACEOF
503d2be0 17793#define HAVE_LIBCOM_ERR 1
c0d27fcc 17794_ACEOF
a21616bd
KR
17795
17796 LIBS="-lcom_err $LIBS"
17797
a21616bd
KR
17798fi
17799
c0d27fcc
MR
17800
17801echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
17802echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
17803if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
17804 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17805else
503d2be0 17806 ac_check_lib_save_LIBS=$LIBS
a21616bd 17807LIBS="-lk5crypto $LIBS"
503d2be0 17808cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17809/* confdefs.h. */
17810_ACEOF
17811cat confdefs.h >>conftest.$ac_ext
17812cat >>conftest.$ac_ext <<_ACEOF
17813/* end confdefs.h. */
503d2be0 17814
a21616bd 17815/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17816#ifdef __cplusplus
17817extern "C"
17818#endif
a21616bd 17819/* We use char because int might match the return type of a gcc2
503d2be0
AS
17820 builtin and then its argument prototype would still apply. */
17821char mit_des_cbc_encrypt ();
17822int
17823main ()
17824{
17825mit_des_cbc_encrypt ();
17826 ;
17827 return 0;
17828}
17829_ACEOF
17830rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17831if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17832 (eval $ac_link) 2>conftest.er1
503d2be0 17833 ac_status=$?
35996d22
AS
17834 grep -v '^ *+' conftest.er1 >conftest.err
17835 rm -f conftest.er1
17836 cat conftest.err >&5
c0d27fcc 17837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17838 (exit $ac_status); } &&
c08e6004 17839 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17841 (eval $ac_try) 2>&5
17842 ac_status=$?
17843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17844 (exit $ac_status); }; } &&
17845 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17847 (eval $ac_try) 2>&5
17848 ac_status=$?
c0d27fcc 17849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17850 (exit $ac_status); }; }; then
17851 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
17852else
17853 echo "$as_me: failed program was:" >&5
19650fd6
AS
17854sed 's/^/| /' conftest.$ac_ext >&5
17855
503d2be0
AS
17856ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
17857fi
35996d22
AS
17858rm -f conftest.err conftest.$ac_objext \
17859 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17860LIBS=$ac_check_lib_save_LIBS
17861fi
c0d27fcc 17862echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
17863echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
17864if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 17865 cat >>confdefs.h <<_ACEOF
503d2be0 17866#define HAVE_LIBK5CRYPTO 1
c0d27fcc 17867_ACEOF
a21616bd
KR
17868
17869 LIBS="-lk5crypto $LIBS"
17870
a21616bd
KR
17871fi
17872
c0d27fcc
MR
17873
17874echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
17875echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
17876if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
17877 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17878else
503d2be0 17879 ac_check_lib_save_LIBS=$LIBS
a21616bd 17880LIBS="-lcrypto $LIBS"
503d2be0 17881cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17882/* confdefs.h. */
17883_ACEOF
17884cat confdefs.h >>conftest.$ac_ext
17885cat >>conftest.$ac_ext <<_ACEOF
17886/* end confdefs.h. */
503d2be0 17887
a21616bd 17888/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17889#ifdef __cplusplus
17890extern "C"
17891#endif
a21616bd 17892/* We use char because int might match the return type of a gcc2
503d2be0
AS
17893 builtin and then its argument prototype would still apply. */
17894char mit_des_cbc_encrypt ();
17895int
17896main ()
17897{
17898mit_des_cbc_encrypt ();
17899 ;
17900 return 0;
17901}
17902_ACEOF
17903rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17904if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17905 (eval $ac_link) 2>conftest.er1
503d2be0 17906 ac_status=$?
35996d22
AS
17907 grep -v '^ *+' conftest.er1 >conftest.err
17908 rm -f conftest.er1
17909 cat conftest.err >&5
c0d27fcc 17910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17911 (exit $ac_status); } &&
c08e6004 17912 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17914 (eval $ac_try) 2>&5
17915 ac_status=$?
17916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17917 (exit $ac_status); }; } &&
17918 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17920 (eval $ac_try) 2>&5
17921 ac_status=$?
c0d27fcc 17922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17923 (exit $ac_status); }; }; then
17924 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
17925else
17926 echo "$as_me: failed program was:" >&5
19650fd6
AS
17927sed 's/^/| /' conftest.$ac_ext >&5
17928
503d2be0
AS
17929ac_cv_lib_crypto_mit_des_cbc_encrypt=no
17930fi
35996d22
AS
17931rm -f conftest.err conftest.$ac_objext \
17932 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17933LIBS=$ac_check_lib_save_LIBS
17934fi
c0d27fcc 17935echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
17936echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
17937if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 17938 cat >>confdefs.h <<_ACEOF
503d2be0 17939#define HAVE_LIBCRYPTO 1
c0d27fcc 17940_ACEOF
a21616bd
KR
17941
17942 LIBS="-lcrypto $LIBS"
17943
a21616bd
KR
17944fi
17945
c0d27fcc
MR
17946
17947echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
17948echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
17949if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
17950 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17951else
503d2be0 17952 ac_check_lib_save_LIBS=$LIBS
a21616bd 17953LIBS="-lkrb5 $LIBS"
503d2be0 17954cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17955/* confdefs.h. */
17956_ACEOF
17957cat confdefs.h >>conftest.$ac_ext
17958cat >>conftest.$ac_ext <<_ACEOF
17959/* end confdefs.h. */
a21616bd 17960
503d2be0
AS
17961/* Override any gcc2 internal prototype to avoid an error. */
17962#ifdef __cplusplus
17963extern "C"
17964#endif
17965/* We use char because int might match the return type of a gcc2
17966 builtin and then its argument prototype would still apply. */
17967char krb5_init_context ();
17968int
17969main ()
17970{
17971krb5_init_context ();
17972 ;
17973 return 0;
17974}
17975_ACEOF
17976rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17977if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17978 (eval $ac_link) 2>conftest.er1
503d2be0 17979 ac_status=$?
35996d22
AS
17980 grep -v '^ *+' conftest.er1 >conftest.err
17981 rm -f conftest.er1
17982 cat conftest.err >&5
c0d27fcc 17983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17984 (exit $ac_status); } &&
c08e6004 17985 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
17986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17987 (eval $ac_try) 2>&5
17988 ac_status=$?
17989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17990 (exit $ac_status); }; } &&
17991 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17993 (eval $ac_try) 2>&5
17994 ac_status=$?
c0d27fcc 17995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17996 (exit $ac_status); }; }; then
17997 ac_cv_lib_krb5_krb5_init_context=yes
17998else
17999 echo "$as_me: failed program was:" >&5
19650fd6
AS
18000sed 's/^/| /' conftest.$ac_ext >&5
18001
503d2be0
AS
18002ac_cv_lib_krb5_krb5_init_context=no
18003fi
35996d22
AS
18004rm -f conftest.err conftest.$ac_objext \
18005 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18006LIBS=$ac_check_lib_save_LIBS
18007fi
c0d27fcc 18008echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
18009echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
18010if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 18011 cat >>confdefs.h <<_ACEOF
503d2be0 18012#define HAVE_LIBKRB5 1
c0d27fcc 18013_ACEOF
a21616bd
KR
18014
18015 LIBS="-lkrb5 $LIBS"
18016
a21616bd
KR
18017fi
18018
18019 if test "${with_kerberos5+set}" != set; then
503d2be0 18020
c0d27fcc 18021echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
18022echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
18023if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
18024 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18025else
503d2be0 18026 ac_check_lib_save_LIBS=$LIBS
a21616bd 18027LIBS="-ldes425 $LIBS"
503d2be0 18028cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18029/* confdefs.h. */
18030_ACEOF
18031cat confdefs.h >>conftest.$ac_ext
18032cat >>conftest.$ac_ext <<_ACEOF
18033/* end confdefs.h. */
503d2be0 18034
a21616bd 18035/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18036#ifdef __cplusplus
18037extern "C"
18038#endif
a21616bd 18039/* We use char because int might match the return type of a gcc2
503d2be0
AS
18040 builtin and then its argument prototype would still apply. */
18041char des_cbc_encrypt ();
18042int
18043main ()
18044{
18045des_cbc_encrypt ();
18046 ;
18047 return 0;
18048}
18049_ACEOF
18050rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18052 (eval $ac_link) 2>conftest.er1
503d2be0 18053 ac_status=$?
35996d22
AS
18054 grep -v '^ *+' conftest.er1 >conftest.err
18055 rm -f conftest.er1
18056 cat conftest.err >&5
c0d27fcc 18057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18058 (exit $ac_status); } &&
c08e6004 18059 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18061 (eval $ac_try) 2>&5
18062 ac_status=$?
18063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18064 (exit $ac_status); }; } &&
18065 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18067 (eval $ac_try) 2>&5
18068 ac_status=$?
c0d27fcc 18069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18070 (exit $ac_status); }; }; then
18071 ac_cv_lib_des425_des_cbc_encrypt=yes
18072else
18073 echo "$as_me: failed program was:" >&5
19650fd6
AS
18074sed 's/^/| /' conftest.$ac_ext >&5
18075
503d2be0
AS
18076ac_cv_lib_des425_des_cbc_encrypt=no
18077fi
35996d22
AS
18078rm -f conftest.err conftest.$ac_objext \
18079 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18080LIBS=$ac_check_lib_save_LIBS
18081fi
c0d27fcc 18082echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
18083echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
18084if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 18085 cat >>confdefs.h <<_ACEOF
503d2be0 18086#define HAVE_LIBDES425 1
c0d27fcc 18087_ACEOF
a21616bd
KR
18088
18089 LIBS="-ldes425 $LIBS"
18090
18091else
503d2be0 18092
c0d27fcc 18093echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
18094echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
18095if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
18096 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18097else
503d2be0 18098 ac_check_lib_save_LIBS=$LIBS
a21616bd 18099LIBS="-ldes $LIBS"
503d2be0 18100cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18101/* confdefs.h. */
18102_ACEOF
18103cat confdefs.h >>conftest.$ac_ext
18104cat >>conftest.$ac_ext <<_ACEOF
18105/* end confdefs.h. */
503d2be0 18106
a21616bd 18107/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18108#ifdef __cplusplus
18109extern "C"
18110#endif
a21616bd 18111/* We use char because int might match the return type of a gcc2
503d2be0
AS
18112 builtin and then its argument prototype would still apply. */
18113char des_cbc_encrypt ();
18114int
18115main ()
18116{
18117des_cbc_encrypt ();
18118 ;
18119 return 0;
18120}
18121_ACEOF
18122rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18123if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18124 (eval $ac_link) 2>conftest.er1
503d2be0 18125 ac_status=$?
35996d22
AS
18126 grep -v '^ *+' conftest.er1 >conftest.err
18127 rm -f conftest.er1
18128 cat conftest.err >&5
c0d27fcc 18129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18130 (exit $ac_status); } &&
c08e6004 18131 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18133 (eval $ac_try) 2>&5
18134 ac_status=$?
18135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18136 (exit $ac_status); }; } &&
18137 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18139 (eval $ac_try) 2>&5
18140 ac_status=$?
c0d27fcc 18141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18142 (exit $ac_status); }; }; then
18143 ac_cv_lib_des_des_cbc_encrypt=yes
18144else
18145 echo "$as_me: failed program was:" >&5
19650fd6
AS
18146sed 's/^/| /' conftest.$ac_ext >&5
18147
503d2be0
AS
18148ac_cv_lib_des_des_cbc_encrypt=no
18149fi
35996d22
AS
18150rm -f conftest.err conftest.$ac_objext \
18151 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18152LIBS=$ac_check_lib_save_LIBS
18153fi
c0d27fcc 18154echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
18155echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
18156if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 18157 cat >>confdefs.h <<_ACEOF
503d2be0 18158#define HAVE_LIBDES 1
c0d27fcc 18159_ACEOF
a21616bd
KR
18160
18161 LIBS="-ldes $LIBS"
18162
a21616bd
KR
18163fi
18164
18165fi
18166
c0d27fcc
MR
18167
18168echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
18169echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
18170if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
18171 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18172else
503d2be0 18173 ac_check_lib_save_LIBS=$LIBS
a21616bd 18174LIBS="-lkrb4 $LIBS"
503d2be0 18175cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18176/* confdefs.h. */
18177_ACEOF
18178cat confdefs.h >>conftest.$ac_ext
18179cat >>conftest.$ac_ext <<_ACEOF
18180/* end confdefs.h. */
503d2be0 18181
a21616bd 18182/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18183#ifdef __cplusplus
18184extern "C"
18185#endif
a21616bd 18186/* We use char because int might match the return type of a gcc2
503d2be0
AS
18187 builtin and then its argument prototype would still apply. */
18188char krb_get_cred ();
18189int
18190main ()
18191{
18192krb_get_cred ();
18193 ;
18194 return 0;
18195}
18196_ACEOF
18197rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18198if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18199 (eval $ac_link) 2>conftest.er1
503d2be0 18200 ac_status=$?
35996d22
AS
18201 grep -v '^ *+' conftest.er1 >conftest.err
18202 rm -f conftest.er1
18203 cat conftest.err >&5
c0d27fcc 18204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18205 (exit $ac_status); } &&
c08e6004 18206 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18208 (eval $ac_try) 2>&5
18209 ac_status=$?
18210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18211 (exit $ac_status); }; } &&
18212 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18214 (eval $ac_try) 2>&5
18215 ac_status=$?
c0d27fcc 18216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18217 (exit $ac_status); }; }; then
18218 ac_cv_lib_krb4_krb_get_cred=yes
18219else
18220 echo "$as_me: failed program was:" >&5
19650fd6
AS
18221sed 's/^/| /' conftest.$ac_ext >&5
18222
503d2be0
AS
18223ac_cv_lib_krb4_krb_get_cred=no
18224fi
35996d22
AS
18225rm -f conftest.err conftest.$ac_objext \
18226 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18227LIBS=$ac_check_lib_save_LIBS
18228fi
c0d27fcc 18229echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
18230echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
18231if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 18232 cat >>confdefs.h <<_ACEOF
503d2be0 18233#define HAVE_LIBKRB4 1
c0d27fcc 18234_ACEOF
a21616bd
KR
18235
18236 LIBS="-lkrb4 $LIBS"
18237
18238else
503d2be0 18239
c0d27fcc 18240echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
18241echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
18242if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
18243 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18244else
503d2be0 18245 ac_check_lib_save_LIBS=$LIBS
a21616bd 18246LIBS="-lkrb $LIBS"
503d2be0 18247cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18248/* confdefs.h. */
18249_ACEOF
18250cat confdefs.h >>conftest.$ac_ext
18251cat >>conftest.$ac_ext <<_ACEOF
18252/* end confdefs.h. */
503d2be0 18253
a21616bd 18254/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18255#ifdef __cplusplus
18256extern "C"
18257#endif
a21616bd 18258/* We use char because int might match the return type of a gcc2
503d2be0
AS
18259 builtin and then its argument prototype would still apply. */
18260char krb_get_cred ();
18261int
18262main ()
18263{
18264krb_get_cred ();
18265 ;
18266 return 0;
18267}
18268_ACEOF
18269rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18270if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18271 (eval $ac_link) 2>conftest.er1
503d2be0 18272 ac_status=$?
35996d22
AS
18273 grep -v '^ *+' conftest.er1 >conftest.err
18274 rm -f conftest.er1
18275 cat conftest.err >&5
c0d27fcc 18276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18277 (exit $ac_status); } &&
c08e6004 18278 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18280 (eval $ac_try) 2>&5
18281 ac_status=$?
18282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18283 (exit $ac_status); }; } &&
18284 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18286 (eval $ac_try) 2>&5
18287 ac_status=$?
c0d27fcc 18288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18289 (exit $ac_status); }; }; then
18290 ac_cv_lib_krb_krb_get_cred=yes
18291else
18292 echo "$as_me: failed program was:" >&5
19650fd6
AS
18293sed 's/^/| /' conftest.$ac_ext >&5
18294
503d2be0
AS
18295ac_cv_lib_krb_krb_get_cred=no
18296fi
35996d22
AS
18297rm -f conftest.err conftest.$ac_objext \
18298 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18299LIBS=$ac_check_lib_save_LIBS
18300fi
c0d27fcc 18301echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
18302echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
18303if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 18304 cat >>confdefs.h <<_ACEOF
503d2be0 18305#define HAVE_LIBKRB 1
c0d27fcc 18306_ACEOF
a21616bd
KR
18307
18308 LIBS="-lkrb $LIBS"
18309
a21616bd
KR
18310fi
18311
18312fi
18313
18314 fi
18315
18316 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
18317
18318for ac_header in krb5.h
a21616bd 18319do
503d2be0 18320as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18321if eval "test \"\${$as_ac_Header+set}\" = set"; then
18322 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18323echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18324if eval "test \"\${$as_ac_Header+set}\" = set"; then
18325 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18326fi
18327echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18328echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18329else
c0d27fcc
MR
18330 # Is the header compilable?
18331echo "$as_me:$LINENO: checking $ac_header usability" >&5
18332echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18333cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18334/* confdefs.h. */
18335_ACEOF
18336cat confdefs.h >>conftest.$ac_ext
18337cat >>conftest.$ac_ext <<_ACEOF
18338/* end confdefs.h. */
c0d27fcc
MR
18339$ac_includes_default
18340#include <$ac_header>
18341_ACEOF
18342rm -f conftest.$ac_objext
18343if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18344 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18345 ac_status=$?
35996d22
AS
18346 grep -v '^ *+' conftest.er1 >conftest.err
18347 rm -f conftest.er1
18348 cat conftest.err >&5
c0d27fcc
MR
18349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18350 (exit $ac_status); } &&
c08e6004 18351 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18353 (eval $ac_try) 2>&5
18354 ac_status=$?
18355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18356 (exit $ac_status); }; } &&
18357 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18359 (eval $ac_try) 2>&5
18360 ac_status=$?
18361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18362 (exit $ac_status); }; }; then
18363 ac_header_compiler=yes
18364else
18365 echo "$as_me: failed program was:" >&5
19650fd6
AS
18366sed 's/^/| /' conftest.$ac_ext >&5
18367
c0d27fcc
MR
18368ac_header_compiler=no
18369fi
35996d22 18370rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18371echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18372echo "${ECHO_T}$ac_header_compiler" >&6
18373
18374# Is the header present?
18375echo "$as_me:$LINENO: checking $ac_header presence" >&5
18376echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18377cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18378/* confdefs.h. */
18379_ACEOF
18380cat confdefs.h >>conftest.$ac_ext
18381cat >>conftest.$ac_ext <<_ACEOF
18382/* end confdefs.h. */
503d2be0
AS
18383#include <$ac_header>
18384_ACEOF
c0d27fcc 18385if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18386 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18387 ac_status=$?
6bae0ccf 18388 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18389 rm -f conftest.er1
18390 cat conftest.err >&5
c0d27fcc 18391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18392 (exit $ac_status); } >/dev/null; then
18393 if test -s conftest.err; then
18394 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18395 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18396 else
18397 ac_cpp_err=
18398 fi
18399else
18400 ac_cpp_err=yes
18401fi
18402if test -z "$ac_cpp_err"; then
c0d27fcc 18403 ac_header_preproc=yes
503d2be0
AS
18404else
18405 echo "$as_me: failed program was:" >&5
19650fd6
AS
18406sed 's/^/| /' conftest.$ac_ext >&5
18407
c0d27fcc 18408 ac_header_preproc=no
a21616bd 18409fi
503d2be0 18410rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18411echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18412echo "${ECHO_T}$ac_header_preproc" >&6
18413
18414# So? What about this header?
35996d22
AS
18415case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18416 yes:no: )
c0d27fcc
MR
18417 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18418echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18419 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18420echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18421 ac_header_preproc=yes
19650fd6 18422 ;;
35996d22 18423 no:yes:* )
c0d27fcc
MR
18424 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18425echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18426 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18427echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18428 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18429echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18430 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18431echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18432 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18433echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18434 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18435echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18436 (
18437 cat <<\_ASBOX
35996d22
AS
18438## ------------------------------------------ ##
18439## Report this to the AC_PACKAGE_NAME lists. ##
18440## ------------------------------------------ ##
19650fd6
AS
18441_ASBOX
18442 ) |
18443 sed "s/^/$as_me: WARNING: /" >&2
18444 ;;
c0d27fcc
MR
18445esac
18446echo "$as_me:$LINENO: checking for $ac_header" >&5
18447echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18448if eval "test \"\${$as_ac_Header+set}\" = set"; then
18449 echo $ECHO_N "(cached) $ECHO_C" >&6
18450else
35996d22 18451 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18452fi
c0d27fcc 18453echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18454echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18455
18456fi
503d2be0 18457if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18458 cat >>confdefs.h <<_ACEOF
503d2be0 18459#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18460_ACEOF
503d2be0 18461
a21616bd 18462fi
c0d27fcc 18463
a21616bd
KR
18464done
18465
18466 else
503d2be0
AS
18467
18468for ac_header in des.h
a21616bd 18469do
503d2be0 18470as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18471if eval "test \"\${$as_ac_Header+set}\" = set"; then
18472 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18473echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18474if eval "test \"\${$as_ac_Header+set}\" = set"; then
18475 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18476fi
18477echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18478echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18479else
c0d27fcc
MR
18480 # Is the header compilable?
18481echo "$as_me:$LINENO: checking $ac_header usability" >&5
18482echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18483cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18484/* confdefs.h. */
18485_ACEOF
18486cat confdefs.h >>conftest.$ac_ext
18487cat >>conftest.$ac_ext <<_ACEOF
18488/* end confdefs.h. */
c0d27fcc
MR
18489$ac_includes_default
18490#include <$ac_header>
18491_ACEOF
18492rm -f conftest.$ac_objext
18493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18494 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18495 ac_status=$?
35996d22
AS
18496 grep -v '^ *+' conftest.er1 >conftest.err
18497 rm -f conftest.er1
18498 cat conftest.err >&5
c0d27fcc
MR
18499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18500 (exit $ac_status); } &&
c08e6004 18501 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18503 (eval $ac_try) 2>&5
18504 ac_status=$?
18505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18506 (exit $ac_status); }; } &&
18507 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18509 (eval $ac_try) 2>&5
18510 ac_status=$?
18511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18512 (exit $ac_status); }; }; then
18513 ac_header_compiler=yes
18514else
18515 echo "$as_me: failed program was:" >&5
19650fd6
AS
18516sed 's/^/| /' conftest.$ac_ext >&5
18517
c0d27fcc
MR
18518ac_header_compiler=no
18519fi
35996d22 18520rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18521echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18522echo "${ECHO_T}$ac_header_compiler" >&6
18523
18524# Is the header present?
18525echo "$as_me:$LINENO: checking $ac_header presence" >&5
18526echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18527cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18528/* confdefs.h. */
18529_ACEOF
18530cat confdefs.h >>conftest.$ac_ext
18531cat >>conftest.$ac_ext <<_ACEOF
18532/* end confdefs.h. */
503d2be0
AS
18533#include <$ac_header>
18534_ACEOF
c0d27fcc 18535if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18536 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18537 ac_status=$?
6bae0ccf 18538 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18539 rm -f conftest.er1
18540 cat conftest.err >&5
c0d27fcc 18541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18542 (exit $ac_status); } >/dev/null; then
18543 if test -s conftest.err; then
18544 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18545 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18546 else
18547 ac_cpp_err=
18548 fi
18549else
18550 ac_cpp_err=yes
18551fi
18552if test -z "$ac_cpp_err"; then
c0d27fcc 18553 ac_header_preproc=yes
503d2be0
AS
18554else
18555 echo "$as_me: failed program was:" >&5
19650fd6
AS
18556sed 's/^/| /' conftest.$ac_ext >&5
18557
c0d27fcc 18558 ac_header_preproc=no
a21616bd 18559fi
503d2be0 18560rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18561echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18562echo "${ECHO_T}$ac_header_preproc" >&6
18563
18564# So? What about this header?
35996d22
AS
18565case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18566 yes:no: )
c0d27fcc
MR
18567 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18568echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18569 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18570echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18571 ac_header_preproc=yes
19650fd6 18572 ;;
35996d22 18573 no:yes:* )
c0d27fcc
MR
18574 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18575echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18576 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18577echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18578 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18579echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18580 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18581echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18582 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18583echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18584 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18585echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18586 (
18587 cat <<\_ASBOX
35996d22
AS
18588## ------------------------------------------ ##
18589## Report this to the AC_PACKAGE_NAME lists. ##
18590## ------------------------------------------ ##
19650fd6
AS
18591_ASBOX
18592 ) |
18593 sed "s/^/$as_me: WARNING: /" >&2
18594 ;;
c0d27fcc
MR
18595esac
18596echo "$as_me:$LINENO: checking for $ac_header" >&5
18597echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18598if eval "test \"\${$as_ac_Header+set}\" = set"; then
18599 echo $ECHO_N "(cached) $ECHO_C" >&6
18600else
35996d22 18601 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18602fi
c0d27fcc 18603echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18604echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18605
18606fi
503d2be0 18607if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18608 cat >>confdefs.h <<_ACEOF
503d2be0 18609#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18610_ACEOF
503d2be0 18611
a21616bd 18612else
503d2be0
AS
18613
18614for ac_header in kerberosIV/des.h
a21616bd 18615do
503d2be0 18616as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18617if eval "test \"\${$as_ac_Header+set}\" = set"; then
18618 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18619echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18620if eval "test \"\${$as_ac_Header+set}\" = set"; then
18621 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18622fi
18623echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18624echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18625else
c0d27fcc
MR
18626 # Is the header compilable?
18627echo "$as_me:$LINENO: checking $ac_header usability" >&5
18628echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18629cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18630/* confdefs.h. */
18631_ACEOF
18632cat confdefs.h >>conftest.$ac_ext
18633cat >>conftest.$ac_ext <<_ACEOF
18634/* end confdefs.h. */
c0d27fcc
MR
18635$ac_includes_default
18636#include <$ac_header>
18637_ACEOF
18638rm -f conftest.$ac_objext
18639if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18640 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18641 ac_status=$?
35996d22
AS
18642 grep -v '^ *+' conftest.er1 >conftest.err
18643 rm -f conftest.er1
18644 cat conftest.err >&5
c0d27fcc
MR
18645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18646 (exit $ac_status); } &&
c08e6004 18647 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18649 (eval $ac_try) 2>&5
18650 ac_status=$?
18651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18652 (exit $ac_status); }; } &&
18653 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18655 (eval $ac_try) 2>&5
18656 ac_status=$?
18657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18658 (exit $ac_status); }; }; then
18659 ac_header_compiler=yes
18660else
18661 echo "$as_me: failed program was:" >&5
19650fd6
AS
18662sed 's/^/| /' conftest.$ac_ext >&5
18663
c0d27fcc
MR
18664ac_header_compiler=no
18665fi
35996d22 18666rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18667echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18668echo "${ECHO_T}$ac_header_compiler" >&6
18669
18670# Is the header present?
18671echo "$as_me:$LINENO: checking $ac_header presence" >&5
18672echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18673cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18674/* confdefs.h. */
18675_ACEOF
18676cat confdefs.h >>conftest.$ac_ext
18677cat >>conftest.$ac_ext <<_ACEOF
18678/* end confdefs.h. */
503d2be0
AS
18679#include <$ac_header>
18680_ACEOF
c0d27fcc 18681if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18682 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18683 ac_status=$?
6bae0ccf 18684 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18685 rm -f conftest.er1
18686 cat conftest.err >&5
c0d27fcc 18687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18688 (exit $ac_status); } >/dev/null; then
18689 if test -s conftest.err; then
18690 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18691 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18692 else
18693 ac_cpp_err=
18694 fi
18695else
18696 ac_cpp_err=yes
18697fi
18698if test -z "$ac_cpp_err"; then
c0d27fcc 18699 ac_header_preproc=yes
503d2be0
AS
18700else
18701 echo "$as_me: failed program was:" >&5
19650fd6
AS
18702sed 's/^/| /' conftest.$ac_ext >&5
18703
c0d27fcc 18704 ac_header_preproc=no
a21616bd 18705fi
503d2be0 18706rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18707echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18708echo "${ECHO_T}$ac_header_preproc" >&6
18709
18710# So? What about this header?
35996d22
AS
18711case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18712 yes:no: )
c0d27fcc
MR
18713 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18714echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18715 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18716echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18717 ac_header_preproc=yes
19650fd6 18718 ;;
35996d22 18719 no:yes:* )
c0d27fcc
MR
18720 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18721echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18722 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18723echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18724 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18725echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18726 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18727echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18728 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18729echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18730 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18731echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18732 (
18733 cat <<\_ASBOX
35996d22
AS
18734## ------------------------------------------ ##
18735## Report this to the AC_PACKAGE_NAME lists. ##
18736## ------------------------------------------ ##
19650fd6
AS
18737_ASBOX
18738 ) |
18739 sed "s/^/$as_me: WARNING: /" >&2
18740 ;;
c0d27fcc
MR
18741esac
18742echo "$as_me:$LINENO: checking for $ac_header" >&5
18743echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18744if eval "test \"\${$as_ac_Header+set}\" = set"; then
18745 echo $ECHO_N "(cached) $ECHO_C" >&6
18746else
35996d22 18747 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18748fi
c0d27fcc 18749echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18750echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18751
18752fi
503d2be0 18753if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18754 cat >>confdefs.h <<_ACEOF
503d2be0 18755#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18756_ACEOF
503d2be0 18757
a21616bd 18758else
503d2be0
AS
18759
18760for ac_header in kerberos/des.h
a21616bd 18761do
503d2be0 18762as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18763if eval "test \"\${$as_ac_Header+set}\" = set"; then
18764 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18765echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18766if eval "test \"\${$as_ac_Header+set}\" = set"; then
18767 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18768fi
18769echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18770echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18771else
c0d27fcc
MR
18772 # Is the header compilable?
18773echo "$as_me:$LINENO: checking $ac_header usability" >&5
18774echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18775cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18776/* confdefs.h. */
18777_ACEOF
18778cat confdefs.h >>conftest.$ac_ext
18779cat >>conftest.$ac_ext <<_ACEOF
18780/* end confdefs.h. */
c0d27fcc
MR
18781$ac_includes_default
18782#include <$ac_header>
18783_ACEOF
18784rm -f conftest.$ac_objext
18785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18786 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18787 ac_status=$?
35996d22
AS
18788 grep -v '^ *+' conftest.er1 >conftest.err
18789 rm -f conftest.er1
18790 cat conftest.err >&5
c0d27fcc
MR
18791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18792 (exit $ac_status); } &&
c08e6004 18793 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18795 (eval $ac_try) 2>&5
18796 ac_status=$?
18797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18798 (exit $ac_status); }; } &&
18799 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18801 (eval $ac_try) 2>&5
18802 ac_status=$?
18803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18804 (exit $ac_status); }; }; then
18805 ac_header_compiler=yes
18806else
18807 echo "$as_me: failed program was:" >&5
19650fd6
AS
18808sed 's/^/| /' conftest.$ac_ext >&5
18809
c0d27fcc
MR
18810ac_header_compiler=no
18811fi
35996d22 18812rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18813echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18814echo "${ECHO_T}$ac_header_compiler" >&6
18815
18816# Is the header present?
18817echo "$as_me:$LINENO: checking $ac_header presence" >&5
18818echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18819cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18820/* confdefs.h. */
18821_ACEOF
18822cat confdefs.h >>conftest.$ac_ext
18823cat >>conftest.$ac_ext <<_ACEOF
18824/* end confdefs.h. */
503d2be0
AS
18825#include <$ac_header>
18826_ACEOF
c0d27fcc 18827if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18828 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18829 ac_status=$?
6bae0ccf 18830 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18831 rm -f conftest.er1
18832 cat conftest.err >&5
c0d27fcc 18833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18834 (exit $ac_status); } >/dev/null; then
18835 if test -s conftest.err; then
18836 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18837 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18838 else
18839 ac_cpp_err=
18840 fi
18841else
18842 ac_cpp_err=yes
18843fi
18844if test -z "$ac_cpp_err"; then
c0d27fcc 18845 ac_header_preproc=yes
503d2be0
AS
18846else
18847 echo "$as_me: failed program was:" >&5
19650fd6
AS
18848sed 's/^/| /' conftest.$ac_ext >&5
18849
c0d27fcc 18850 ac_header_preproc=no
a21616bd 18851fi
503d2be0 18852rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18853echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18854echo "${ECHO_T}$ac_header_preproc" >&6
18855
18856# So? What about this header?
35996d22
AS
18857case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18858 yes:no: )
c0d27fcc
MR
18859 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18860echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18861 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18862echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18863 ac_header_preproc=yes
19650fd6 18864 ;;
35996d22 18865 no:yes:* )
c0d27fcc
MR
18866 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18867echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18868 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18869echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18870 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18871echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18872 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18873echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18874 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18875echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18876 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18877echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18878 (
18879 cat <<\_ASBOX
35996d22
AS
18880## ------------------------------------------ ##
18881## Report this to the AC_PACKAGE_NAME lists. ##
18882## ------------------------------------------ ##
19650fd6
AS
18883_ASBOX
18884 ) |
18885 sed "s/^/$as_me: WARNING: /" >&2
18886 ;;
c0d27fcc
MR
18887esac
18888echo "$as_me:$LINENO: checking for $ac_header" >&5
18889echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18890if eval "test \"\${$as_ac_Header+set}\" = set"; then
18891 echo $ECHO_N "(cached) $ECHO_C" >&6
18892else
35996d22 18893 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18894fi
c0d27fcc 18895echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18896echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18897
18898fi
503d2be0 18899if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18900 cat >>confdefs.h <<_ACEOF
503d2be0 18901#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18902_ACEOF
a21616bd
KR
18903
18904fi
c0d27fcc 18905
a21616bd
KR
18906done
18907
98418dba 18908fi
c0d27fcc 18909
925c2f3f
EZ
18910done
18911
98418dba 18912fi
c0d27fcc 18913
925c2f3f 18914done
98418dba 18915
c0d27fcc 18916
925c2f3f
EZ
18917for ac_header in krb.h
18918do
18919as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18920if eval "test \"\${$as_ac_Header+set}\" = set"; then
18921 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
18922echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18923if eval "test \"\${$as_ac_Header+set}\" = set"; then
18924 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18925fi
18926echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18927echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18928else
18929 # Is the header compilable?
18930echo "$as_me:$LINENO: checking $ac_header usability" >&5
18931echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18932cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18933/* confdefs.h. */
18934_ACEOF
18935cat confdefs.h >>conftest.$ac_ext
18936cat >>conftest.$ac_ext <<_ACEOF
18937/* end confdefs.h. */
c0d27fcc
MR
18938$ac_includes_default
18939#include <$ac_header>
18940_ACEOF
18941rm -f conftest.$ac_objext
18942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18943 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18944 ac_status=$?
35996d22
AS
18945 grep -v '^ *+' conftest.er1 >conftest.err
18946 rm -f conftest.er1
18947 cat conftest.err >&5
c0d27fcc
MR
18948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18949 (exit $ac_status); } &&
c08e6004 18950 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
18951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18952 (eval $ac_try) 2>&5
18953 ac_status=$?
18954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18955 (exit $ac_status); }; } &&
18956 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18958 (eval $ac_try) 2>&5
18959 ac_status=$?
18960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18961 (exit $ac_status); }; }; then
18962 ac_header_compiler=yes
925c2f3f 18963else
c0d27fcc 18964 echo "$as_me: failed program was:" >&5
19650fd6
AS
18965sed 's/^/| /' conftest.$ac_ext >&5
18966
c0d27fcc
MR
18967ac_header_compiler=no
18968fi
35996d22 18969rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18970echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18971echo "${ECHO_T}$ac_header_compiler" >&6
18972
18973# Is the header present?
18974echo "$as_me:$LINENO: checking $ac_header presence" >&5
18975echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18976cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18977/* confdefs.h. */
18978_ACEOF
18979cat confdefs.h >>conftest.$ac_ext
18980cat >>conftest.$ac_ext <<_ACEOF
18981/* end confdefs.h. */
503d2be0
AS
18982#include <$ac_header>
18983_ACEOF
c0d27fcc 18984if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18985 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18986 ac_status=$?
6bae0ccf 18987 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18988 rm -f conftest.er1
18989 cat conftest.err >&5
c0d27fcc 18990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18991 (exit $ac_status); } >/dev/null; then
18992 if test -s conftest.err; then
18993 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18994 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18995 else
18996 ac_cpp_err=
18997 fi
18998else
18999 ac_cpp_err=yes
19000fi
19001if test -z "$ac_cpp_err"; then
c0d27fcc 19002 ac_header_preproc=yes
503d2be0
AS
19003else
19004 echo "$as_me: failed program was:" >&5
19650fd6
AS
19005sed 's/^/| /' conftest.$ac_ext >&5
19006
c0d27fcc 19007 ac_header_preproc=no
a21616bd 19008fi
503d2be0 19009rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19010echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19011echo "${ECHO_T}$ac_header_preproc" >&6
19012
19013# So? What about this header?
35996d22
AS
19014case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19015 yes:no: )
c0d27fcc
MR
19016 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19017echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19018 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19019echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19020 ac_header_preproc=yes
19650fd6 19021 ;;
35996d22 19022 no:yes:* )
c0d27fcc
MR
19023 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19024echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19025 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19026echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19027 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19028echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19029 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19030echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19031 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19032echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19033 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19034echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19035 (
19036 cat <<\_ASBOX
35996d22
AS
19037## ------------------------------------------ ##
19038## Report this to the AC_PACKAGE_NAME lists. ##
19039## ------------------------------------------ ##
19650fd6
AS
19040_ASBOX
19041 ) |
19042 sed "s/^/$as_me: WARNING: /" >&2
19043 ;;
c0d27fcc
MR
19044esac
19045echo "$as_me:$LINENO: checking for $ac_header" >&5
19046echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19047if eval "test \"\${$as_ac_Header+set}\" = set"; then
19048 echo $ECHO_N "(cached) $ECHO_C" >&6
19049else
35996d22 19050 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19051fi
c0d27fcc 19052echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19053echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19054
19055fi
503d2be0 19056if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19057 cat >>confdefs.h <<_ACEOF
503d2be0 19058#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19059_ACEOF
503d2be0 19060
a21616bd 19061else
503d2be0
AS
19062
19063for ac_header in kerberosIV/krb.h
a21616bd 19064do
503d2be0 19065as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19066if eval "test \"\${$as_ac_Header+set}\" = set"; then
19067 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19068echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19069if eval "test \"\${$as_ac_Header+set}\" = set"; then
19070 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19071fi
19072echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19073echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19074else
c0d27fcc
MR
19075 # Is the header compilable?
19076echo "$as_me:$LINENO: checking $ac_header usability" >&5
19077echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19078cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19079/* confdefs.h. */
19080_ACEOF
19081cat confdefs.h >>conftest.$ac_ext
19082cat >>conftest.$ac_ext <<_ACEOF
19083/* end confdefs.h. */
c0d27fcc
MR
19084$ac_includes_default
19085#include <$ac_header>
19086_ACEOF
19087rm -f conftest.$ac_objext
19088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19089 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19090 ac_status=$?
35996d22
AS
19091 grep -v '^ *+' conftest.er1 >conftest.err
19092 rm -f conftest.er1
19093 cat conftest.err >&5
c0d27fcc
MR
19094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19095 (exit $ac_status); } &&
c08e6004 19096 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19098 (eval $ac_try) 2>&5
19099 ac_status=$?
19100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19101 (exit $ac_status); }; } &&
19102 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19104 (eval $ac_try) 2>&5
19105 ac_status=$?
19106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19107 (exit $ac_status); }; }; then
19108 ac_header_compiler=yes
19109else
19110 echo "$as_me: failed program was:" >&5
19650fd6
AS
19111sed 's/^/| /' conftest.$ac_ext >&5
19112
c0d27fcc
MR
19113ac_header_compiler=no
19114fi
35996d22 19115rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19116echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19117echo "${ECHO_T}$ac_header_compiler" >&6
19118
19119# Is the header present?
19120echo "$as_me:$LINENO: checking $ac_header presence" >&5
19121echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19122cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19123/* confdefs.h. */
19124_ACEOF
19125cat confdefs.h >>conftest.$ac_ext
19126cat >>conftest.$ac_ext <<_ACEOF
19127/* end confdefs.h. */
503d2be0
AS
19128#include <$ac_header>
19129_ACEOF
c0d27fcc 19130if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19131 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19132 ac_status=$?
6bae0ccf 19133 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19134 rm -f conftest.er1
19135 cat conftest.err >&5
c0d27fcc 19136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19137 (exit $ac_status); } >/dev/null; then
19138 if test -s conftest.err; then
19139 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19140 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19141 else
19142 ac_cpp_err=
19143 fi
19144else
19145 ac_cpp_err=yes
19146fi
19147if test -z "$ac_cpp_err"; then
c0d27fcc 19148 ac_header_preproc=yes
503d2be0
AS
19149else
19150 echo "$as_me: failed program was:" >&5
19650fd6
AS
19151sed 's/^/| /' conftest.$ac_ext >&5
19152
c0d27fcc 19153 ac_header_preproc=no
a21616bd 19154fi
503d2be0 19155rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19156echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19157echo "${ECHO_T}$ac_header_preproc" >&6
19158
19159# So? What about this header?
35996d22
AS
19160case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19161 yes:no: )
c0d27fcc
MR
19162 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19163echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19164 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19165echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19166 ac_header_preproc=yes
19650fd6 19167 ;;
35996d22 19168 no:yes:* )
c0d27fcc
MR
19169 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19170echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19171 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19172echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19173 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19174echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19175 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19176echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19177 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19178echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19179 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19180echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19181 (
19182 cat <<\_ASBOX
35996d22
AS
19183## ------------------------------------------ ##
19184## Report this to the AC_PACKAGE_NAME lists. ##
19185## ------------------------------------------ ##
19650fd6
AS
19186_ASBOX
19187 ) |
19188 sed "s/^/$as_me: WARNING: /" >&2
19189 ;;
c0d27fcc
MR
19190esac
19191echo "$as_me:$LINENO: checking for $ac_header" >&5
19192echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19193if eval "test \"\${$as_ac_Header+set}\" = set"; then
19194 echo $ECHO_N "(cached) $ECHO_C" >&6
19195else
35996d22 19196 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19197fi
c0d27fcc 19198echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19199echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19200
19201fi
503d2be0 19202if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19203 cat >>confdefs.h <<_ACEOF
503d2be0 19204#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19205_ACEOF
503d2be0 19206
a21616bd 19207else
503d2be0
AS
19208
19209for ac_header in kerberos/krb.h
a21616bd 19210do
503d2be0 19211as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19212if eval "test \"\${$as_ac_Header+set}\" = set"; then
19213 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19214echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19215if eval "test \"\${$as_ac_Header+set}\" = set"; then
19216 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19217fi
19218echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19219echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19220else
c0d27fcc
MR
19221 # Is the header compilable?
19222echo "$as_me:$LINENO: checking $ac_header usability" >&5
19223echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19224cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19225/* confdefs.h. */
19226_ACEOF
19227cat confdefs.h >>conftest.$ac_ext
19228cat >>conftest.$ac_ext <<_ACEOF
19229/* end confdefs.h. */
c0d27fcc
MR
19230$ac_includes_default
19231#include <$ac_header>
19232_ACEOF
19233rm -f conftest.$ac_objext
19234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19235 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19236 ac_status=$?
35996d22
AS
19237 grep -v '^ *+' conftest.er1 >conftest.err
19238 rm -f conftest.er1
19239 cat conftest.err >&5
c0d27fcc
MR
19240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19241 (exit $ac_status); } &&
c08e6004 19242 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19244 (eval $ac_try) 2>&5
19245 ac_status=$?
19246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19247 (exit $ac_status); }; } &&
19248 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19250 (eval $ac_try) 2>&5
19251 ac_status=$?
19252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19253 (exit $ac_status); }; }; then
19254 ac_header_compiler=yes
19255else
19256 echo "$as_me: failed program was:" >&5
19650fd6
AS
19257sed 's/^/| /' conftest.$ac_ext >&5
19258
c0d27fcc
MR
19259ac_header_compiler=no
19260fi
35996d22 19261rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19262echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19263echo "${ECHO_T}$ac_header_compiler" >&6
19264
19265# Is the header present?
19266echo "$as_me:$LINENO: checking $ac_header presence" >&5
19267echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19268cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19269/* confdefs.h. */
19270_ACEOF
19271cat confdefs.h >>conftest.$ac_ext
19272cat >>conftest.$ac_ext <<_ACEOF
19273/* end confdefs.h. */
503d2be0
AS
19274#include <$ac_header>
19275_ACEOF
c0d27fcc 19276if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19277 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19278 ac_status=$?
6bae0ccf 19279 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19280 rm -f conftest.er1
19281 cat conftest.err >&5
c0d27fcc 19282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19283 (exit $ac_status); } >/dev/null; then
19284 if test -s conftest.err; then
19285 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19286 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19287 else
19288 ac_cpp_err=
19289 fi
19290else
19291 ac_cpp_err=yes
19292fi
19293if test -z "$ac_cpp_err"; then
c0d27fcc 19294 ac_header_preproc=yes
503d2be0
AS
19295else
19296 echo "$as_me: failed program was:" >&5
19650fd6
AS
19297sed 's/^/| /' conftest.$ac_ext >&5
19298
c0d27fcc 19299 ac_header_preproc=no
a21616bd 19300fi
503d2be0 19301rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19302echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19303echo "${ECHO_T}$ac_header_preproc" >&6
35996d22
AS
19304
19305# So? What about this header?
19306case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19307 yes:no: )
19308 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19309echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19310 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19311echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19312 ac_header_preproc=yes
19650fd6 19313 ;;
35996d22 19314 no:yes:* )
c0d27fcc
MR
19315 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19316echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19317 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19318echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19319 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19320echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19321 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19322echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19323 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19324echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19325 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19326echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19327 (
19328 cat <<\_ASBOX
35996d22
AS
19329## ------------------------------------------ ##
19330## Report this to the AC_PACKAGE_NAME lists. ##
19331## ------------------------------------------ ##
19650fd6
AS
19332_ASBOX
19333 ) |
19334 sed "s/^/$as_me: WARNING: /" >&2
19335 ;;
c0d27fcc
MR
19336esac
19337echo "$as_me:$LINENO: checking for $ac_header" >&5
19338echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19339if eval "test \"\${$as_ac_Header+set}\" = set"; then
19340 echo $ECHO_N "(cached) $ECHO_C" >&6
19341else
35996d22 19342 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19343fi
c0d27fcc 19344echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19345echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19346
19347fi
503d2be0 19348if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19349 cat >>confdefs.h <<_ACEOF
503d2be0 19350#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19351_ACEOF
503d2be0 19352
a21616bd 19353fi
c0d27fcc 19354
a21616bd
KR
19355done
19356
19357fi
c0d27fcc 19358
a21616bd
KR
19359done
19360
19361fi
c0d27fcc 19362
a21616bd
KR
19363done
19364
19365 fi
503d2be0
AS
19366
19367for ac_header in com_err.h
a21616bd 19368do
503d2be0 19369as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19370if eval "test \"\${$as_ac_Header+set}\" = set"; then
19371 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19372echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19373if eval "test \"\${$as_ac_Header+set}\" = set"; then
19374 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19375fi
19376echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19377echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19378else
c0d27fcc
MR
19379 # Is the header compilable?
19380echo "$as_me:$LINENO: checking $ac_header usability" >&5
19381echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19382cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19383/* confdefs.h. */
19384_ACEOF
19385cat confdefs.h >>conftest.$ac_ext
19386cat >>conftest.$ac_ext <<_ACEOF
19387/* end confdefs.h. */
c0d27fcc
MR
19388$ac_includes_default
19389#include <$ac_header>
19390_ACEOF
19391rm -f conftest.$ac_objext
19392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19393 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19394 ac_status=$?
35996d22
AS
19395 grep -v '^ *+' conftest.er1 >conftest.err
19396 rm -f conftest.er1
19397 cat conftest.err >&5
c0d27fcc
MR
19398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19399 (exit $ac_status); } &&
c08e6004 19400 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19402 (eval $ac_try) 2>&5
19403 ac_status=$?
19404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19405 (exit $ac_status); }; } &&
19406 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19408 (eval $ac_try) 2>&5
19409 ac_status=$?
19410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19411 (exit $ac_status); }; }; then
19412 ac_header_compiler=yes
19413else
19414 echo "$as_me: failed program was:" >&5
19650fd6
AS
19415sed 's/^/| /' conftest.$ac_ext >&5
19416
c0d27fcc
MR
19417ac_header_compiler=no
19418fi
35996d22 19419rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19420echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19421echo "${ECHO_T}$ac_header_compiler" >&6
19422
19423# Is the header present?
19424echo "$as_me:$LINENO: checking $ac_header presence" >&5
19425echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19426cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19427/* confdefs.h. */
19428_ACEOF
19429cat confdefs.h >>conftest.$ac_ext
19430cat >>conftest.$ac_ext <<_ACEOF
19431/* end confdefs.h. */
503d2be0
AS
19432#include <$ac_header>
19433_ACEOF
c0d27fcc 19434if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19435 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19436 ac_status=$?
6bae0ccf 19437 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19438 rm -f conftest.er1
19439 cat conftest.err >&5
c0d27fcc 19440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19441 (exit $ac_status); } >/dev/null; then
19442 if test -s conftest.err; then
19443 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19444 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19445 else
19446 ac_cpp_err=
19447 fi
19448else
19449 ac_cpp_err=yes
19450fi
19451if test -z "$ac_cpp_err"; then
c0d27fcc 19452 ac_header_preproc=yes
503d2be0
AS
19453else
19454 echo "$as_me: failed program was:" >&5
19650fd6
AS
19455sed 's/^/| /' conftest.$ac_ext >&5
19456
c0d27fcc 19457 ac_header_preproc=no
a21616bd 19458fi
503d2be0 19459rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19460echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19461echo "${ECHO_T}$ac_header_preproc" >&6
19462
19463# So? What about this header?
35996d22
AS
19464case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19465 yes:no: )
c0d27fcc
MR
19466 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19467echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19468 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19469echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19470 ac_header_preproc=yes
19650fd6 19471 ;;
35996d22 19472 no:yes:* )
c0d27fcc
MR
19473 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19474echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19475 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19476echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19477 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19478echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19479 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19480echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19481 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19482echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19483 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19484echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19485 (
19486 cat <<\_ASBOX
35996d22
AS
19487## ------------------------------------------ ##
19488## Report this to the AC_PACKAGE_NAME lists. ##
19489## ------------------------------------------ ##
19650fd6
AS
19490_ASBOX
19491 ) |
19492 sed "s/^/$as_me: WARNING: /" >&2
19493 ;;
c0d27fcc
MR
19494esac
19495echo "$as_me:$LINENO: checking for $ac_header" >&5
19496echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19497if eval "test \"\${$as_ac_Header+set}\" = set"; then
19498 echo $ECHO_N "(cached) $ECHO_C" >&6
19499else
35996d22 19500 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19501fi
c0d27fcc 19502echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19503echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19504
19505fi
503d2be0 19506if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19507 cat >>confdefs.h <<_ACEOF
503d2be0 19508#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19509_ACEOF
503d2be0 19510
a21616bd 19511fi
c0d27fcc 19512
a21616bd
KR
19513done
19514
19515fi
19516
ba4481b5
DL
19517# Solaris requires -lintl if you want strerror (which calls dgettext)
19518# to return localized messages.
503d2be0 19519
c0d27fcc 19520echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
19521echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
19522if test "${ac_cv_lib_intl_dgettext+set}" = set; then
19523 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19524else
503d2be0 19525 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19526LIBS="-lintl $LIBS"
503d2be0 19527cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19528/* confdefs.h. */
19529_ACEOF
19530cat confdefs.h >>conftest.$ac_ext
19531cat >>conftest.$ac_ext <<_ACEOF
19532/* end confdefs.h. */
503d2be0 19533
ba4481b5 19534/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19535#ifdef __cplusplus
19536extern "C"
19537#endif
ba4481b5 19538/* We use char because int might match the return type of a gcc2
503d2be0
AS
19539 builtin and then its argument prototype would still apply. */
19540char dgettext ();
19541int
19542main ()
19543{
19544dgettext ();
19545 ;
19546 return 0;
19547}
19548_ACEOF
19549rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 19551 (eval $ac_link) 2>conftest.er1
503d2be0 19552 ac_status=$?
35996d22
AS
19553 grep -v '^ *+' conftest.er1 >conftest.err
19554 rm -f conftest.er1
19555 cat conftest.err >&5
c0d27fcc 19556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19557 (exit $ac_status); } &&
c08e6004 19558 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19560 (eval $ac_try) 2>&5
19561 ac_status=$?
19562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19563 (exit $ac_status); }; } &&
19564 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19566 (eval $ac_try) 2>&5
19567 ac_status=$?
c0d27fcc 19568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19569 (exit $ac_status); }; }; then
19570 ac_cv_lib_intl_dgettext=yes
19571else
19572 echo "$as_me: failed program was:" >&5
19650fd6
AS
19573sed 's/^/| /' conftest.$ac_ext >&5
19574
503d2be0
AS
19575ac_cv_lib_intl_dgettext=no
19576fi
35996d22
AS
19577rm -f conftest.err conftest.$ac_objext \
19578 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19579LIBS=$ac_check_lib_save_LIBS
19580fi
c0d27fcc 19581echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
19582echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
19583if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 19584 cat >>confdefs.h <<_ACEOF
503d2be0 19585#define HAVE_LIBINTL 1
c0d27fcc 19586_ACEOF
ba4481b5
DL
19587
19588 LIBS="-lintl $LIBS"
19589
ba4481b5
DL
19590fi
19591
c0d27fcc
MR
19592
19593echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
19594echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
19595if test "${emacs_cv_localtime_cache+set}" = set; then
19596 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
19597else
19598 if test x$ac_cv_func_tzset = xyes; then
19599if test "$cross_compiling" = yes; then
19600 # If we have tzset, assume the worst when cross-compiling.
19601emacs_cv_localtime_cache=yes
19602else
503d2be0 19603 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19604/* confdefs.h. */
19605_ACEOF
19606cat confdefs.h >>conftest.$ac_ext
19607cat >>conftest.$ac_ext <<_ACEOF
19608/* end confdefs.h. */
ba4481b5 19609#include <time.h>
ba4481b5
DL
19610extern char **environ;
19611unset_TZ ()
19612{
19613 char **from, **to;
19614 for (to = from = environ; (*to = *from); from++)
19615 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
19616 to++;
19617}
19618char TZ_GMT0[] = "TZ=GMT0";
19619char TZ_PST8[] = "TZ=PST8";
19620main()
19621{
19622 time_t now = time ((time_t *) 0);
19623 int hour_GMT0, hour_unset;
19624 if (putenv (TZ_GMT0) != 0)
19625 exit (1);
19626 hour_GMT0 = localtime (&now)->tm_hour;
19627 unset_TZ ();
19628 hour_unset = localtime (&now)->tm_hour;
19629 if (putenv (TZ_PST8) != 0)
19630 exit (1);
19631 if (localtime (&now)->tm_hour == hour_GMT0)
19632 exit (1);
19633 unset_TZ ();
19634 if (localtime (&now)->tm_hour != hour_unset)
19635 exit (1);
19636 exit (0);
19637}
503d2be0
AS
19638_ACEOF
19639rm -f conftest$ac_exeext
c0d27fcc 19640if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
19641 (eval $ac_link) 2>&5
19642 ac_status=$?
c0d27fcc 19643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19644 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 19645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19646 (eval $ac_try) 2>&5
19647 ac_status=$?
c0d27fcc 19648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19649 (exit $ac_status); }; }; then
ba4481b5
DL
19650 emacs_cv_localtime_cache=no
19651else
503d2be0
AS
19652 echo "$as_me: program exited with status $ac_status" >&5
19653echo "$as_me: failed program was:" >&5
19650fd6
AS
19654sed 's/^/| /' conftest.$ac_ext >&5
19655
c0d27fcc 19656( exit $ac_status )
503d2be0 19657emacs_cv_localtime_cache=yes
ba4481b5 19658fi
35996d22 19659rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 19660fi
ba4481b5
DL
19661else
19662 # If we lack tzset, report that localtime does not cache TZ,
19663 # since we can't invalidate the cache if we don't have tzset.
19664 emacs_cv_localtime_cache=no
19665fi
19666fi
c0d27fcc 19667echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 19668echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 19669if test $emacs_cv_localtime_cache = yes; then
b936fae4 19670
c0d27fcc 19671cat >>confdefs.h <<\_ACEOF
ba4481b5 19672#define LOCALTIME_CACHE 1
c0d27fcc 19673_ACEOF
ba4481b5
DL
19674
19675fi
19676
19677if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
19678
19679for ac_func in gettimeofday
48d4b120 19680do
503d2be0 19681as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 19682echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
19683echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19684if eval "test \"\${$as_ac_var+set}\" = set"; then
19685 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 19686else
503d2be0 19687 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19688/* confdefs.h. */
19689_ACEOF
19690cat confdefs.h >>conftest.$ac_ext
19691cat >>conftest.$ac_ext <<_ACEOF
19692/* end confdefs.h. */
35996d22
AS
19693/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19694 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19695#define $ac_func innocuous_$ac_func
19696
48d4b120 19697/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19698 which can conflict with char $ac_func (); below.
19699 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19700 <limits.h> exists even on freestanding compilers. */
35996d22 19701
19650fd6
AS
19702#ifdef __STDC__
19703# include <limits.h>
19704#else
19705# include <assert.h>
19706#endif
35996d22
AS
19707
19708#undef $ac_func
19709
48d4b120 19710/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19711#ifdef __cplusplus
19712extern "C"
19650fd6 19713{
503d2be0 19714#endif
48d4b120 19715/* We use char because int might match the return type of a gcc2
503d2be0
AS
19716 builtin and then its argument prototype would still apply. */
19717char $ac_func ();
48d4b120
DL
19718/* The GNU C library defines this for functions which it implements
19719 to always fail with ENOSYS. Some functions are actually named
19720 something starting with __ and the normal name is an alias. */
19721#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19722choke me
19723#else
19650fd6
AS
19724char (*f) () = $ac_func;
19725#endif
19726#ifdef __cplusplus
19727}
cd958eb3
MB
19728#endif
19729
19650fd6
AS
19730int
19731main ()
19732{
19733return f != $ac_func;
503d2be0
AS
19734 ;
19735 return 0;
19736}
19737_ACEOF
19738rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19739if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 19740 (eval $ac_link) 2>conftest.er1
503d2be0 19741 ac_status=$?
35996d22
AS
19742 grep -v '^ *+' conftest.er1 >conftest.err
19743 rm -f conftest.er1
19744 cat conftest.err >&5
c0d27fcc 19745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19746 (exit $ac_status); } &&
c08e6004 19747 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19749 (eval $ac_try) 2>&5
19750 ac_status=$?
19751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19752 (exit $ac_status); }; } &&
19753 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19755 (eval $ac_try) 2>&5
19756 ac_status=$?
c0d27fcc 19757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19758 (exit $ac_status); }; }; then
19759 eval "$as_ac_var=yes"
19760else
19761 echo "$as_me: failed program was:" >&5
19650fd6
AS
19762sed 's/^/| /' conftest.$ac_ext >&5
19763
503d2be0
AS
19764eval "$as_ac_var=no"
19765fi
35996d22
AS
19766rm -f conftest.err conftest.$ac_objext \
19767 conftest$ac_exeext conftest.$ac_ext
503d2be0 19768fi
c0d27fcc 19769echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
19770echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19771if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19772 cat >>confdefs.h <<_ACEOF
503d2be0 19773#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19774_ACEOF
48d4b120 19775
48d4b120
DL
19776fi
19777done
19778
b936fae4 19779 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 19780 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
19781echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
19782if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
19783 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19784else
503d2be0 19785 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19786/* confdefs.h. */
19787_ACEOF
19788cat confdefs.h >>conftest.$ac_ext
19789cat >>conftest.$ac_ext <<_ACEOF
19790/* end confdefs.h. */
ba4481b5 19791
a3f08d9e
DL
19792#ifdef TIME_WITH_SYS_TIME
19793#include <sys/time.h>
19794#include <time.h>
19795#else
19796#ifdef HAVE_SYS_TIME_H
19797#include <sys/time.h>
19798#else
19799#include <time.h>
19800#endif
19801#endif
503d2be0
AS
19802int
19803main ()
19804{
a3f08d9e 19805struct timeval time;
b936fae4 19806 gettimeofday (&time, 0);
503d2be0
AS
19807 ;
19808 return 0;
19809}
19810_ACEOF
19811rm -f conftest.$ac_objext
c0d27fcc 19812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19813 (eval $ac_compile) 2>conftest.er1
503d2be0 19814 ac_status=$?
35996d22
AS
19815 grep -v '^ *+' conftest.er1 >conftest.err
19816 rm -f conftest.er1
19817 cat conftest.err >&5
c0d27fcc 19818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19819 (exit $ac_status); } &&
c08e6004 19820 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19822 (eval $ac_try) 2>&5
19823 ac_status=$?
19824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19825 (exit $ac_status); }; } &&
19826 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 19827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19828 (eval $ac_try) 2>&5
19829 ac_status=$?
c0d27fcc 19830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19831 (exit $ac_status); }; }; then
ba4481b5
DL
19832 emacs_cv_gettimeofday_two_arguments=yes
19833else
503d2be0 19834 echo "$as_me: failed program was:" >&5
19650fd6
AS
19835sed 's/^/| /' conftest.$ac_ext >&5
19836
503d2be0 19837emacs_cv_gettimeofday_two_arguments=no
ba4481b5 19838fi
35996d22 19839rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 19840fi
c0d27fcc 19841echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 19842echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
19843 if test $emacs_cv_gettimeofday_two_arguments = no; then
19844
c0d27fcc 19845cat >>confdefs.h <<\_ACEOF
ba4481b5 19846#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 19847_ACEOF
ba4481b5 19848
b936fae4 19849 fi
ba4481b5
DL
19850 fi
19851fi
19852
973a76b1
DL
19853# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
19854echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19855echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
19856if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19857 echo $ECHO_N "(cached) $ECHO_C" >&6
19858else
19859 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19860/* confdefs.h. */
19861_ACEOF
19862cat confdefs.h >>conftest.$ac_ext
19863cat >>conftest.$ac_ext <<_ACEOF
19864/* end confdefs.h. */
973a76b1
DL
19865#include <sys/types.h>
19866#include <$ac_cv_struct_tm>
19867
19868
19869int
19870main ()
19871{
19872static struct tm ac_aggr;
19873if (ac_aggr.tm_zone)
19874return 0;
19875 ;
19876 return 0;
19877}
19878_ACEOF
19879rm -f conftest.$ac_objext
19880if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19881 (eval $ac_compile) 2>conftest.er1
973a76b1 19882 ac_status=$?
35996d22
AS
19883 grep -v '^ *+' conftest.er1 >conftest.err
19884 rm -f conftest.er1
19885 cat conftest.err >&5
973a76b1
DL
19886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19887 (exit $ac_status); } &&
c08e6004 19888 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19890 (eval $ac_try) 2>&5
19891 ac_status=$?
19892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19893 (exit $ac_status); }; } &&
19894 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
19895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19896 (eval $ac_try) 2>&5
19897 ac_status=$?
19898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19899 (exit $ac_status); }; }; then
19900 ac_cv_member_struct_tm_tm_zone=yes
19901else
19902 echo "$as_me: failed program was:" >&5
19650fd6
AS
19903sed 's/^/| /' conftest.$ac_ext >&5
19904
973a76b1 19905cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19906/* confdefs.h. */
19907_ACEOF
19908cat confdefs.h >>conftest.$ac_ext
19909cat >>conftest.$ac_ext <<_ACEOF
19910/* end confdefs.h. */
973a76b1
DL
19911#include <sys/types.h>
19912#include <$ac_cv_struct_tm>
19913
19914
19915int
19916main ()
19917{
19918static struct tm ac_aggr;
19919if (sizeof ac_aggr.tm_zone)
19920return 0;
19921 ;
19922 return 0;
19923}
19924_ACEOF
19925rm -f conftest.$ac_objext
19926if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19927 (eval $ac_compile) 2>conftest.er1
973a76b1 19928 ac_status=$?
35996d22
AS
19929 grep -v '^ *+' conftest.er1 >conftest.err
19930 rm -f conftest.er1
19931 cat conftest.err >&5
973a76b1
DL
19932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19933 (exit $ac_status); } &&
c08e6004 19934 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
19935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19936 (eval $ac_try) 2>&5
19937 ac_status=$?
19938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19939 (exit $ac_status); }; } &&
19940 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
19941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19942 (eval $ac_try) 2>&5
19943 ac_status=$?
19944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19945 (exit $ac_status); }; }; then
19946 ac_cv_member_struct_tm_tm_zone=yes
19947else
19948 echo "$as_me: failed program was:" >&5
19650fd6
AS
19949sed 's/^/| /' conftest.$ac_ext >&5
19950
973a76b1
DL
19951ac_cv_member_struct_tm_tm_zone=no
19952fi
35996d22 19953rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 19954fi
35996d22 19955rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
19956fi
19957echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19958echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
19959if test $ac_cv_member_struct_tm_tm_zone = yes; then
19960
19961cat >>confdefs.h <<_ACEOF
19962#define HAVE_STRUCT_TM_TM_ZONE 1
19963_ACEOF
19964
19965
19966fi
19967
19968if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19969
19970cat >>confdefs.h <<\_ACEOF
19971#define HAVE_TM_ZONE 1
19972_ACEOF
19973
19974else
19975 echo "$as_me:$LINENO: checking for tzname" >&5
19976echo $ECHO_N "checking for tzname... $ECHO_C" >&6
19977if test "${ac_cv_var_tzname+set}" = set; then
19978 echo $ECHO_N "(cached) $ECHO_C" >&6
19979else
19980 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19981/* confdefs.h. */
19982_ACEOF
19983cat confdefs.h >>conftest.$ac_ext
19984cat >>conftest.$ac_ext <<_ACEOF
19985/* end confdefs.h. */
973a76b1
DL
19986#include <time.h>
19987#ifndef tzname /* For SGI. */
19988extern char *tzname[]; /* RS6000 and others reject char **tzname. */
19989#endif
19990
19991int
19992main ()
19993{
19994atoi(*tzname);
19995 ;
19996 return 0;
19997}
19998_ACEOF
19999rm -f conftest.$ac_objext conftest$ac_exeext
20000if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 20001 (eval $ac_link) 2>conftest.er1
973a76b1 20002 ac_status=$?
35996d22
AS
20003 grep -v '^ *+' conftest.er1 >conftest.err
20004 rm -f conftest.er1
20005 cat conftest.err >&5
973a76b1
DL
20006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20007 (exit $ac_status); } &&
c08e6004 20008 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20010 (eval $ac_try) 2>&5
20011 ac_status=$?
20012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20013 (exit $ac_status); }; } &&
20014 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
20015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20016 (eval $ac_try) 2>&5
20017 ac_status=$?
20018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20019 (exit $ac_status); }; }; then
20020 ac_cv_var_tzname=yes
20021else
20022 echo "$as_me: failed program was:" >&5
19650fd6
AS
20023sed 's/^/| /' conftest.$ac_ext >&5
20024
973a76b1
DL
20025ac_cv_var_tzname=no
20026fi
35996d22
AS
20027rm -f conftest.err conftest.$ac_objext \
20028 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
20029fi
20030echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20031echo "${ECHO_T}$ac_cv_var_tzname" >&6
20032 if test $ac_cv_var_tzname = yes; then
20033
20034cat >>confdefs.h <<\_ACEOF
20035#define HAVE_TZNAME 1
20036_ACEOF
20037
20038 fi
20039fi
20040
20041
48d4b120 20042if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 20043 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
20044echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
20045if test "${emacs_cv_struct_timezone+set}" = set; then
20046 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 20047else
503d2be0 20048 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20049/* confdefs.h. */
20050_ACEOF
20051cat confdefs.h >>conftest.$ac_ext
20052cat >>conftest.$ac_ext <<_ACEOF
20053/* end confdefs.h. */
48d4b120 20054#include <sys/time.h>
503d2be0
AS
20055int
20056main ()
20057{
48d4b120 20058struct timezone tz;
503d2be0
AS
20059 ;
20060 return 0;
20061}
20062_ACEOF
20063rm -f conftest.$ac_objext
c0d27fcc 20064if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20065 (eval $ac_compile) 2>conftest.er1
503d2be0 20066 ac_status=$?
35996d22
AS
20067 grep -v '^ *+' conftest.er1 >conftest.err
20068 rm -f conftest.er1
20069 cat conftest.err >&5
c0d27fcc 20070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20071 (exit $ac_status); } &&
c08e6004 20072 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20074 (eval $ac_try) 2>&5
20075 ac_status=$?
20076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20077 (exit $ac_status); }; } &&
20078 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20080 (eval $ac_try) 2>&5
20081 ac_status=$?
c0d27fcc 20082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20083 (exit $ac_status); }; }; then
48d4b120
DL
20084 if test "$cross_compiling" = yes; then
20085 emacs_cv_struct_timezone=yes
20086else
503d2be0 20087 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20088/* confdefs.h. */
20089_ACEOF
20090cat confdefs.h >>conftest.$ac_ext
20091cat >>conftest.$ac_ext <<_ACEOF
20092/* end confdefs.h. */
48d4b120
DL
20093
20094#ifdef TIME_WITH_SYS_TIME
20095#include <sys/time.h>
20096#include <time.h>
20097#else
20098#ifdef HAVE_SYS_TIME_H
20099#include <sys/time.h>
20100#else
20101#include <time.h>
20102#endif
20103#endif
20104main () {
20105 struct timeval time;
20106 struct timezone dummy;
20107 exit (gettimeofday (&time, &dummy));
20108}
503d2be0
AS
20109_ACEOF
20110rm -f conftest$ac_exeext
c0d27fcc 20111if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
20112 (eval $ac_link) 2>&5
20113 ac_status=$?
c0d27fcc 20114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20115 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 20116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20117 (eval $ac_try) 2>&5
20118 ac_status=$?
c0d27fcc 20119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20120 (exit $ac_status); }; }; then
48d4b120
DL
20121 emacs_cv_struct_timezone=yes
20122else
503d2be0
AS
20123 echo "$as_me: program exited with status $ac_status" >&5
20124echo "$as_me: failed program was:" >&5
19650fd6
AS
20125sed 's/^/| /' conftest.$ac_ext >&5
20126
c0d27fcc 20127( exit $ac_status )
503d2be0 20128emacs_cv_struct_timezone=no
48d4b120 20129fi
35996d22 20130rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 20131fi
48d4b120 20132else
503d2be0 20133 echo "$as_me: failed program was:" >&5
19650fd6
AS
20134sed 's/^/| /' conftest.$ac_ext >&5
20135
503d2be0 20136emacs_cv_struct_timezone=no
48d4b120 20137fi
35996d22 20138rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
48d4b120 20139fi
c0d27fcc 20140echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 20141echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
20142fi
20143
ba4481b5 20144ok_so_far=yes
c0d27fcc 20145echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
20146echo $ECHO_N "checking for socket... $ECHO_C" >&6
20147if test "${ac_cv_func_socket+set}" = set; then
20148 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20149else
503d2be0 20150 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20151/* confdefs.h. */
20152_ACEOF
20153cat confdefs.h >>conftest.$ac_ext
20154cat >>conftest.$ac_ext <<_ACEOF
20155/* end confdefs.h. */
35996d22
AS
20156/* Define socket to an innocuous variant, in case <limits.h> declares socket.
20157 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20158#define socket innocuous_socket
20159
ba4481b5 20160/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20161 which can conflict with char socket (); below.
20162 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20163 <limits.h> exists even on freestanding compilers. */
35996d22 20164
19650fd6
AS
20165#ifdef __STDC__
20166# include <limits.h>
20167#else
20168# include <assert.h>
20169#endif
35996d22
AS
20170
20171#undef socket
20172
ba4481b5 20173/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20174#ifdef __cplusplus
20175extern "C"
19650fd6 20176{
503d2be0 20177#endif
ba4481b5 20178/* We use char because int might match the return type of a gcc2
503d2be0
AS
20179 builtin and then its argument prototype would still apply. */
20180char socket ();
ba4481b5
DL
20181/* The GNU C library defines this for functions which it implements
20182 to always fail with ENOSYS. Some functions are actually named
20183 something starting with __ and the normal name is an alias. */
20184#if defined (__stub_socket) || defined (__stub___socket)
20185choke me
20186#else
19650fd6
AS
20187char (*f) () = socket;
20188#endif
20189#ifdef __cplusplus
20190}
cd958eb3
MB
20191#endif
20192
19650fd6
AS
20193int
20194main ()
20195{
20196return f != socket;
503d2be0
AS
20197 ;
20198 return 0;
20199}
20200_ACEOF
20201rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20202if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 20203 (eval $ac_link) 2>conftest.er1
503d2be0 20204 ac_status=$?
35996d22
AS
20205 grep -v '^ *+' conftest.er1 >conftest.err
20206 rm -f conftest.er1
20207 cat conftest.err >&5
c0d27fcc 20208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20209 (exit $ac_status); } &&
c08e6004 20210 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20212 (eval $ac_try) 2>&5
20213 ac_status=$?
20214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20215 (exit $ac_status); }; } &&
20216 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20218 (eval $ac_try) 2>&5
20219 ac_status=$?
c0d27fcc 20220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20221 (exit $ac_status); }; }; then
20222 ac_cv_func_socket=yes
20223else
20224 echo "$as_me: failed program was:" >&5
19650fd6
AS
20225sed 's/^/| /' conftest.$ac_ext >&5
20226
503d2be0
AS
20227ac_cv_func_socket=no
20228fi
35996d22
AS
20229rm -f conftest.err conftest.$ac_objext \
20230 conftest$ac_exeext conftest.$ac_ext
503d2be0 20231fi
c0d27fcc 20232echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
20233echo "${ECHO_T}$ac_cv_func_socket" >&6
20234if test $ac_cv_func_socket = yes; then
ba4481b5
DL
20235 :
20236else
503d2be0 20237 ok_so_far=no
ba4481b5
DL
20238fi
20239
20240if test $ok_so_far = yes; then
c0d27fcc
MR
20241 if test "${ac_cv_header_netinet_in_h+set}" = set; then
20242 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
20243echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
20244if test "${ac_cv_header_netinet_in_h+set}" = set; then
20245 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20246fi
20247echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
20248echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 20249else
c0d27fcc
MR
20250 # Is the header compilable?
20251echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
20252echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
20253cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20254/* confdefs.h. */
20255_ACEOF
20256cat confdefs.h >>conftest.$ac_ext
20257cat >>conftest.$ac_ext <<_ACEOF
20258/* end confdefs.h. */
c0d27fcc
MR
20259$ac_includes_default
20260#include <netinet/in.h>
20261_ACEOF
20262rm -f conftest.$ac_objext
20263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20264 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20265 ac_status=$?
35996d22
AS
20266 grep -v '^ *+' conftest.er1 >conftest.err
20267 rm -f conftest.er1
20268 cat conftest.err >&5
c0d27fcc
MR
20269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20270 (exit $ac_status); } &&
c08e6004 20271 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20273 (eval $ac_try) 2>&5
20274 ac_status=$?
20275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20276 (exit $ac_status); }; } &&
20277 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20279 (eval $ac_try) 2>&5
20280 ac_status=$?
20281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20282 (exit $ac_status); }; }; then
20283 ac_header_compiler=yes
20284else
20285 echo "$as_me: failed program was:" >&5
19650fd6
AS
20286sed 's/^/| /' conftest.$ac_ext >&5
20287
c0d27fcc
MR
20288ac_header_compiler=no
20289fi
35996d22 20290rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20291echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20292echo "${ECHO_T}$ac_header_compiler" >&6
20293
20294# Is the header present?
20295echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
20296echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
20297cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20298/* confdefs.h. */
20299_ACEOF
20300cat confdefs.h >>conftest.$ac_ext
20301cat >>conftest.$ac_ext <<_ACEOF
20302/* end confdefs.h. */
ba4481b5 20303#include <netinet/in.h>
503d2be0 20304_ACEOF
c0d27fcc 20305if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20306 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20307 ac_status=$?
6bae0ccf 20308 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20309 rm -f conftest.er1
20310 cat conftest.err >&5
c0d27fcc 20311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20312 (exit $ac_status); } >/dev/null; then
20313 if test -s conftest.err; then
20314 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20315 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20316 else
20317 ac_cpp_err=
20318 fi
20319else
20320 ac_cpp_err=yes
20321fi
20322if test -z "$ac_cpp_err"; then
c0d27fcc 20323 ac_header_preproc=yes
ba4481b5 20324else
503d2be0 20325 echo "$as_me: failed program was:" >&5
19650fd6
AS
20326sed 's/^/| /' conftest.$ac_ext >&5
20327
c0d27fcc 20328 ac_header_preproc=no
ba4481b5 20329fi
503d2be0 20330rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20331echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20332echo "${ECHO_T}$ac_header_preproc" >&6
20333
20334# So? What about this header?
35996d22
AS
20335case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20336 yes:no: )
c0d27fcc
MR
20337 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
20338echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20339 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
20340echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
20341 ac_header_preproc=yes
19650fd6 20342 ;;
35996d22 20343 no:yes:* )
c0d27fcc
MR
20344 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
20345echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
35996d22
AS
20346 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
20347echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
20348 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
20349echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
20350 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
20351echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20352 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 20353echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20354 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
20355echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20356 (
20357 cat <<\_ASBOX
35996d22
AS
20358## ------------------------------------------ ##
20359## Report this to the AC_PACKAGE_NAME lists. ##
20360## ------------------------------------------ ##
19650fd6
AS
20361_ASBOX
20362 ) |
20363 sed "s/^/$as_me: WARNING: /" >&2
20364 ;;
c0d27fcc
MR
20365esac
20366echo "$as_me:$LINENO: checking for netinet/in.h" >&5
20367echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
20368if test "${ac_cv_header_netinet_in_h+set}" = set; then
20369 echo $ECHO_N "(cached) $ECHO_C" >&6
20370else
20371 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 20372fi
c0d27fcc 20373echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 20374echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
20375
20376fi
503d2be0 20377if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
20378 :
20379else
503d2be0 20380 ok_so_far=no
ba4481b5
DL
20381fi
20382
c0d27fcc 20383
ba4481b5
DL
20384fi
20385if test $ok_so_far = yes; then
c0d27fcc
MR
20386 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20387 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
20388echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
20389if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20390 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20391fi
20392echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
20393echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 20394else
c0d27fcc
MR
20395 # Is the header compilable?
20396echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
20397echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
20398cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20399/* confdefs.h. */
20400_ACEOF
20401cat confdefs.h >>conftest.$ac_ext
20402cat >>conftest.$ac_ext <<_ACEOF
20403/* end confdefs.h. */
c0d27fcc
MR
20404$ac_includes_default
20405#include <arpa/inet.h>
20406_ACEOF
20407rm -f conftest.$ac_objext
20408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20409 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20410 ac_status=$?
35996d22
AS
20411 grep -v '^ *+' conftest.er1 >conftest.err
20412 rm -f conftest.er1
20413 cat conftest.err >&5
c0d27fcc
MR
20414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20415 (exit $ac_status); } &&
c08e6004 20416 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20418 (eval $ac_try) 2>&5
20419 ac_status=$?
20420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20421 (exit $ac_status); }; } &&
20422 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20424 (eval $ac_try) 2>&5
20425 ac_status=$?
20426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20427 (exit $ac_status); }; }; then
20428 ac_header_compiler=yes
20429else
20430 echo "$as_me: failed program was:" >&5
19650fd6
AS
20431sed 's/^/| /' conftest.$ac_ext >&5
20432
c0d27fcc
MR
20433ac_header_compiler=no
20434fi
35996d22 20435rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20436echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20437echo "${ECHO_T}$ac_header_compiler" >&6
20438
20439# Is the header present?
20440echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
20441echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
20442cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20443/* confdefs.h. */
20444_ACEOF
20445cat confdefs.h >>conftest.$ac_ext
20446cat >>conftest.$ac_ext <<_ACEOF
20447/* end confdefs.h. */
ba4481b5 20448#include <arpa/inet.h>
503d2be0 20449_ACEOF
c0d27fcc 20450if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20451 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20452 ac_status=$?
6bae0ccf 20453 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20454 rm -f conftest.er1
20455 cat conftest.err >&5
c0d27fcc 20456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20457 (exit $ac_status); } >/dev/null; then
20458 if test -s conftest.err; then
20459 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20460 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20461 else
20462 ac_cpp_err=
20463 fi
20464else
20465 ac_cpp_err=yes
20466fi
20467if test -z "$ac_cpp_err"; then
c0d27fcc 20468 ac_header_preproc=yes
ba4481b5 20469else
503d2be0 20470 echo "$as_me: failed program was:" >&5
19650fd6
AS
20471sed 's/^/| /' conftest.$ac_ext >&5
20472
c0d27fcc 20473 ac_header_preproc=no
ba4481b5 20474fi
503d2be0 20475rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20476echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20477echo "${ECHO_T}$ac_header_preproc" >&6
20478
20479# So? What about this header?
35996d22
AS
20480case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20481 yes:no: )
c0d27fcc
MR
20482 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
20483echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20484 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
20485echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
20486 ac_header_preproc=yes
19650fd6 20487 ;;
35996d22 20488 no:yes:* )
c0d27fcc
MR
20489 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
20490echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
35996d22
AS
20491 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
20492echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
20493 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
20494echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
20495 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
20496echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20497 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 20498echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20499 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
20500echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20501 (
20502 cat <<\_ASBOX
35996d22
AS
20503## ------------------------------------------ ##
20504## Report this to the AC_PACKAGE_NAME lists. ##
20505## ------------------------------------------ ##
19650fd6
AS
20506_ASBOX
20507 ) |
20508 sed "s/^/$as_me: WARNING: /" >&2
20509 ;;
c0d27fcc
MR
20510esac
20511echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
20512echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
20513if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20514 echo $ECHO_N "(cached) $ECHO_C" >&6
20515else
20516 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 20517fi
c0d27fcc 20518echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 20519echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
20520
20521fi
503d2be0 20522if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
20523 :
20524else
503d2be0 20525 ok_so_far=no
ba4481b5
DL
20526fi
20527
c0d27fcc 20528
ba4481b5
DL
20529fi
20530if test $ok_so_far = yes; then
b936fae4 20531
c0d27fcc 20532cat >>confdefs.h <<\_ACEOF
ba4481b5 20533#define HAVE_INET_SOCKETS 1
c0d27fcc 20534_ACEOF
ba4481b5
DL
20535
20536fi
20537
2d2b6695 20538
7862d3a8 20539for ac_header in sys/ioctl.h
2d2b6695
KS
20540do
20541as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20542if eval "test \"\${$as_ac_Header+set}\" = set"; then
20543 echo "$as_me:$LINENO: checking for $ac_header" >&5
20544echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20545if eval "test \"\${$as_ac_Header+set}\" = set"; then
20546 echo $ECHO_N "(cached) $ECHO_C" >&6
20547fi
20548echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20549echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20550else
20551 # Is the header compilable?
20552echo "$as_me:$LINENO: checking $ac_header usability" >&5
20553echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20554cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
20555/* confdefs.h. */
20556_ACEOF
20557cat confdefs.h >>conftest.$ac_ext
20558cat >>conftest.$ac_ext <<_ACEOF
20559/* end confdefs.h. */
20560$ac_includes_default
20561#include <$ac_header>
20562_ACEOF
20563rm -f conftest.$ac_objext
20564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20565 (eval $ac_compile) 2>conftest.er1
2d2b6695 20566 ac_status=$?
35996d22
AS
20567 grep -v '^ *+' conftest.er1 >conftest.err
20568 rm -f conftest.er1
20569 cat conftest.err >&5
2d2b6695
KS
20570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20571 (exit $ac_status); } &&
c08e6004 20572 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20574 (eval $ac_try) 2>&5
20575 ac_status=$?
20576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20577 (exit $ac_status); }; } &&
20578 { ac_try='test -s conftest.$ac_objext'
2d2b6695
KS
20579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20580 (eval $ac_try) 2>&5
20581 ac_status=$?
20582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20583 (exit $ac_status); }; }; then
20584 ac_header_compiler=yes
20585else
20586 echo "$as_me: failed program was:" >&5
20587sed 's/^/| /' conftest.$ac_ext >&5
20588
20589ac_header_compiler=no
20590fi
35996d22 20591rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2d2b6695
KS
20592echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20593echo "${ECHO_T}$ac_header_compiler" >&6
20594
20595# Is the header present?
20596echo "$as_me:$LINENO: checking $ac_header presence" >&5
20597echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20598cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
20599/* confdefs.h. */
20600_ACEOF
20601cat confdefs.h >>conftest.$ac_ext
20602cat >>conftest.$ac_ext <<_ACEOF
20603/* end confdefs.h. */
20604#include <$ac_header>
20605_ACEOF
20606if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20607 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20608 ac_status=$?
20609 grep -v '^ *+' conftest.er1 >conftest.err
20610 rm -f conftest.er1
20611 cat conftest.err >&5
20612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20613 (exit $ac_status); } >/dev/null; then
20614 if test -s conftest.err; then
20615 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20616 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2d2b6695
KS
20617 else
20618 ac_cpp_err=
20619 fi
20620else
20621 ac_cpp_err=yes
20622fi
20623if test -z "$ac_cpp_err"; then
20624 ac_header_preproc=yes
20625else
20626 echo "$as_me: failed program was:" >&5
20627sed 's/^/| /' conftest.$ac_ext >&5
20628
20629 ac_header_preproc=no
20630fi
20631rm -f conftest.err conftest.$ac_ext
20632echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20633echo "${ECHO_T}$ac_header_preproc" >&6
20634
20635# So? What about this header?
35996d22
AS
20636case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20637 yes:no: )
2d2b6695
KS
20638 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20639echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20640 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20641echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20642 ac_header_preproc=yes
2d2b6695 20643 ;;
35996d22 20644 no:yes:* )
2d2b6695
KS
20645 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20646echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
20647 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20648echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20649 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20650echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20651 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20652echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
20653 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20654echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20655 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20656echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
2d2b6695
KS
20657 (
20658 cat <<\_ASBOX
35996d22
AS
20659## ------------------------------------------ ##
20660## Report this to the AC_PACKAGE_NAME lists. ##
20661## ------------------------------------------ ##
2d2b6695
KS
20662_ASBOX
20663 ) |
20664 sed "s/^/$as_me: WARNING: /" >&2
20665 ;;
20666esac
20667echo "$as_me:$LINENO: checking for $ac_header" >&5
20668echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20669if eval "test \"\${$as_ac_Header+set}\" = set"; then
20670 echo $ECHO_N "(cached) $ECHO_C" >&6
20671else
35996d22 20672 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695
KS
20673fi
20674echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20675echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20676
20677fi
20678if test `eval echo '${'$as_ac_Header'}'` = yes; then
20679 cat >>confdefs.h <<_ACEOF
20680#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20681_ACEOF
20682
20683fi
20684
20685done
20686
20687
ba4481b5 20688if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 20689
c0d27fcc 20690cat >>confdefs.h <<\_ACEOF
ba4481b5 20691#define HAVE_AIX_SMT_EXP 1
c0d27fcc 20692_ACEOF
ba4481b5
DL
20693
20694fi
20695
c0d27fcc 20696echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 20697echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 20698if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 20699 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 20700echo "${ECHO_T}yes" >&6
b936fae4 20701
c0d27fcc 20702cat >>confdefs.h <<\_ACEOF
3d9fec71 20703#define HAVE_DEV_PTMX 1
c0d27fcc 20704_ACEOF
3d9fec71
DL
20705
20706else
c0d27fcc 20707 echo "$as_me:$LINENO: result: no" >&5
503d2be0 20708echo "${ECHO_T}no" >&6
3d9fec71
DL
20709fi
20710
c0d27fcc 20711echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
20712echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
20713if test "${ac_cv_type_pid_t+set}" = set; then
20714 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 20715else
503d2be0 20716 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20717/* confdefs.h. */
20718_ACEOF
20719cat confdefs.h >>conftest.$ac_ext
20720cat >>conftest.$ac_ext <<_ACEOF
20721/* end confdefs.h. */
503d2be0
AS
20722$ac_includes_default
20723int
20724main ()
20725{
20726if ((pid_t *) 0)
20727 return 0;
20728if (sizeof (pid_t))
20729 return 0;
20730 ;
20731 return 0;
20732}
20733_ACEOF
20734rm -f conftest.$ac_objext
c0d27fcc 20735if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20736 (eval $ac_compile) 2>conftest.er1
503d2be0 20737 ac_status=$?
35996d22
AS
20738 grep -v '^ *+' conftest.er1 >conftest.err
20739 rm -f conftest.er1
20740 cat conftest.err >&5
c0d27fcc 20741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20742 (exit $ac_status); } &&
c08e6004 20743 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20745 (eval $ac_try) 2>&5
20746 ac_status=$?
20747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20748 (exit $ac_status); }; } &&
20749 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20751 (eval $ac_try) 2>&5
20752 ac_status=$?
c0d27fcc 20753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20754 (exit $ac_status); }; }; then
647847ea
DL
20755 ac_cv_type_pid_t=yes
20756else
503d2be0 20757 echo "$as_me: failed program was:" >&5
19650fd6
AS
20758sed 's/^/| /' conftest.$ac_ext >&5
20759
503d2be0 20760ac_cv_type_pid_t=no
647847ea 20761fi
35996d22 20762rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 20763fi
c0d27fcc 20764echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
20765echo "${ECHO_T}$ac_cv_type_pid_t" >&6
20766if test $ac_cv_type_pid_t = yes; then
20767 :
20768else
20769
c0d27fcc 20770cat >>confdefs.h <<_ACEOF
647847ea 20771#define pid_t int
c0d27fcc 20772_ACEOF
647847ea
DL
20773
20774fi
20775
c0d27fcc
MR
20776
20777
503d2be0
AS
20778for ac_header in unistd.h vfork.h
20779do
20780as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20781if eval "test \"\${$as_ac_Header+set}\" = set"; then
20782 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20783echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20784if eval "test \"\${$as_ac_Header+set}\" = set"; then
20785 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20786fi
20787echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20788echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20789else
c0d27fcc
MR
20790 # Is the header compilable?
20791echo "$as_me:$LINENO: checking $ac_header usability" >&5
20792echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20793cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20794/* confdefs.h. */
20795_ACEOF
20796cat confdefs.h >>conftest.$ac_ext
20797cat >>conftest.$ac_ext <<_ACEOF
20798/* end confdefs.h. */
c0d27fcc
MR
20799$ac_includes_default
20800#include <$ac_header>
20801_ACEOF
20802rm -f conftest.$ac_objext
20803if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20804 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20805 ac_status=$?
35996d22
AS
20806 grep -v '^ *+' conftest.er1 >conftest.err
20807 rm -f conftest.er1
20808 cat conftest.err >&5
c0d27fcc
MR
20809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20810 (exit $ac_status); } &&
c08e6004 20811 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20813 (eval $ac_try) 2>&5
20814 ac_status=$?
20815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20816 (exit $ac_status); }; } &&
20817 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20819 (eval $ac_try) 2>&5
20820 ac_status=$?
20821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20822 (exit $ac_status); }; }; then
20823 ac_header_compiler=yes
20824else
20825 echo "$as_me: failed program was:" >&5
19650fd6
AS
20826sed 's/^/| /' conftest.$ac_ext >&5
20827
c0d27fcc
MR
20828ac_header_compiler=no
20829fi
35996d22 20830rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20831echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20832echo "${ECHO_T}$ac_header_compiler" >&6
20833
20834# Is the header present?
20835echo "$as_me:$LINENO: checking $ac_header presence" >&5
20836echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20837cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20838/* confdefs.h. */
20839_ACEOF
20840cat confdefs.h >>conftest.$ac_ext
20841cat >>conftest.$ac_ext <<_ACEOF
20842/* end confdefs.h. */
503d2be0
AS
20843#include <$ac_header>
20844_ACEOF
c0d27fcc 20845if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20846 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20847 ac_status=$?
6bae0ccf 20848 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20849 rm -f conftest.er1
20850 cat conftest.err >&5
c0d27fcc 20851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20852 (exit $ac_status); } >/dev/null; then
20853 if test -s conftest.err; then
20854 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20855 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20856 else
20857 ac_cpp_err=
20858 fi
647847ea 20859else
503d2be0
AS
20860 ac_cpp_err=yes
20861fi
20862if test -z "$ac_cpp_err"; then
c0d27fcc 20863 ac_header_preproc=yes
647847ea 20864else
503d2be0 20865 echo "$as_me: failed program was:" >&5
19650fd6
AS
20866sed 's/^/| /' conftest.$ac_ext >&5
20867
c0d27fcc 20868 ac_header_preproc=no
647847ea 20869fi
503d2be0 20870rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20871echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20872echo "${ECHO_T}$ac_header_preproc" >&6
20873
20874# So? What about this header?
35996d22
AS
20875case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20876 yes:no: )
c0d27fcc
MR
20877 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20878echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20879 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20880echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20881 ac_header_preproc=yes
19650fd6 20882 ;;
35996d22 20883 no:yes:* )
c0d27fcc
MR
20884 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20885echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
20886 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20887echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20888 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20889echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20890 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20891echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20892 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20893echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20894 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20895echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20896 (
20897 cat <<\_ASBOX
35996d22
AS
20898## ------------------------------------------ ##
20899## Report this to the AC_PACKAGE_NAME lists. ##
20900## ------------------------------------------ ##
19650fd6
AS
20901_ASBOX
20902 ) |
20903 sed "s/^/$as_me: WARNING: /" >&2
20904 ;;
c0d27fcc
MR
20905esac
20906echo "$as_me:$LINENO: checking for $ac_header" >&5
20907echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20908if eval "test \"\${$as_ac_Header+set}\" = set"; then
20909 echo $ECHO_N "(cached) $ECHO_C" >&6
20910else
35996d22 20911 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 20912fi
c0d27fcc 20913echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20914echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20915
20916fi
503d2be0 20917if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20918 cat >>confdefs.h <<_ACEOF
503d2be0 20919#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20920_ACEOF
647847ea 20921
73b77ee5 20922fi
c0d27fcc 20923
503d2be0 20924done
73b77ee5 20925
c0d27fcc
MR
20926
20927
503d2be0
AS
20928for ac_func in fork vfork
20929do
20930as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 20931echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
20932echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20933if eval "test \"\${$as_ac_var+set}\" = set"; then
20934 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 20935else
503d2be0 20936 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20937/* confdefs.h. */
20938_ACEOF
20939cat confdefs.h >>conftest.$ac_ext
20940cat >>conftest.$ac_ext <<_ACEOF
20941/* end confdefs.h. */
35996d22
AS
20942/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20943 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20944#define $ac_func innocuous_$ac_func
20945
fa0b693c 20946/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20947 which can conflict with char $ac_func (); below.
20948 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20949 <limits.h> exists even on freestanding compilers. */
35996d22 20950
19650fd6
AS
20951#ifdef __STDC__
20952# include <limits.h>
20953#else
20954# include <assert.h>
20955#endif
35996d22
AS
20956
20957#undef $ac_func
20958
fa0b693c 20959/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20960#ifdef __cplusplus
20961extern "C"
19650fd6 20962{
503d2be0 20963#endif
fa0b693c 20964/* We use char because int might match the return type of a gcc2
503d2be0
AS
20965 builtin and then its argument prototype would still apply. */
20966char $ac_func ();
fa0b693c
GM
20967/* The GNU C library defines this for functions which it implements
20968 to always fail with ENOSYS. Some functions are actually named
20969 something starting with __ and the normal name is an alias. */
503d2be0 20970#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
20971choke me
20972#else
19650fd6
AS
20973char (*f) () = $ac_func;
20974#endif
20975#ifdef __cplusplus
20976}
fa0b693c
GM
20977#endif
20978
19650fd6
AS
20979int
20980main ()
20981{
20982return f != $ac_func;
503d2be0
AS
20983 ;
20984 return 0;
20985}
20986_ACEOF
20987rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20988if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 20989 (eval $ac_link) 2>conftest.er1
503d2be0 20990 ac_status=$?
35996d22
AS
20991 grep -v '^ *+' conftest.er1 >conftest.err
20992 rm -f conftest.er1
20993 cat conftest.err >&5
c0d27fcc 20994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20995 (exit $ac_status); } &&
c08e6004 20996 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
20997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20998 (eval $ac_try) 2>&5
20999 ac_status=$?
21000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21001 (exit $ac_status); }; } &&
21002 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 21003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21004 (eval $ac_try) 2>&5
21005 ac_status=$?
c0d27fcc 21006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21007 (exit $ac_status); }; }; then
21008 eval "$as_ac_var=yes"
21009else
21010 echo "$as_me: failed program was:" >&5
19650fd6
AS
21011sed 's/^/| /' conftest.$ac_ext >&5
21012
503d2be0
AS
21013eval "$as_ac_var=no"
21014fi
35996d22
AS
21015rm -f conftest.err conftest.$ac_objext \
21016 conftest$ac_exeext conftest.$ac_ext
503d2be0 21017fi
c0d27fcc 21018echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
21019echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21020if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 21021 cat >>confdefs.h <<_ACEOF
503d2be0 21022#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 21023_ACEOF
503d2be0 21024
fa0b693c 21025fi
503d2be0 21026done
fa0b693c 21027
503d2be0 21028if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 21029 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
21030echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21031if test "${ac_cv_func_fork_works+set}" = set; then
21032 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 21033else
503d2be0
AS
21034 if test "$cross_compiling" = yes; then
21035 ac_cv_func_fork_works=cross
21036else
21037 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 21038/* By Ruediger Kuhlmann. */
503d2be0
AS
21039 #include <sys/types.h>
21040 #if HAVE_UNISTD_H
21041 # include <unistd.h>
21042 #endif
21043 /* Some systems only have a dummy stub for fork() */
21044 int main ()
21045 {
35996d22
AS
21046 if (fork() < 0)
21047 exit (1);
21048 exit (0);
503d2be0
AS
21049 }
21050_ACEOF
21051rm -f conftest$ac_exeext
c0d27fcc 21052if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21053 (eval $ac_link) 2>&5
21054 ac_status=$?
c0d27fcc 21055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21056 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21058 (eval $ac_try) 2>&5
21059 ac_status=$?
c0d27fcc 21060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21061 (exit $ac_status); }; }; then
21062 ac_cv_func_fork_works=yes
21063else
21064 echo "$as_me: program exited with status $ac_status" >&5
21065echo "$as_me: failed program was:" >&5
19650fd6
AS
21066sed 's/^/| /' conftest.$ac_ext >&5
21067
c0d27fcc 21068( exit $ac_status )
503d2be0
AS
21069ac_cv_func_fork_works=no
21070fi
35996d22 21071rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
21072fi
21073fi
c0d27fcc 21074echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
21075echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21076
6bae0ccf
DL
21077else
21078 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
21079fi
21080if test "x$ac_cv_func_fork_works" = xcross; then
21081 case $host in
21082 *-*-amigaos* | *-*-msdosdjgpp*)
21083 # Override, as these systems have only a dummy fork() stub
21084 ac_cv_func_fork_works=no
21085 ;;
21086 *)
21087 ac_cv_func_fork_works=yes
21088 ;;
21089 esac
c0d27fcc
MR
21090 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
21091echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 21092fi
73b77ee5 21093ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 21094if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 21095 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
21096echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21097if test "${ac_cv_func_vfork_works+set}" = set; then
21098 echo $ECHO_N "(cached) $ECHO_C" >&6
21099else
21100 if test "$cross_compiling" = yes; then
21101 ac_cv_func_vfork_works=cross
fa0b693c 21102else
503d2be0 21103 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21104/* confdefs.h. */
21105_ACEOF
21106cat confdefs.h >>conftest.$ac_ext
21107cat >>conftest.$ac_ext <<_ACEOF
21108/* end confdefs.h. */
73b77ee5
GM
21109/* Thanks to Paul Eggert for this test. */
21110#include <stdio.h>
19650fd6 21111#include <stdlib.h>
fa0b693c 21112#include <sys/types.h>
73b77ee5 21113#include <sys/stat.h>
19650fd6 21114#include <sys/wait.h>
503d2be0
AS
21115#if HAVE_UNISTD_H
21116# include <unistd.h>
73b77ee5 21117#endif
503d2be0
AS
21118#if HAVE_VFORK_H
21119# include <vfork.h>
73b77ee5
GM
21120#endif
21121/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
21122 argument registers are propagated back to the parent. The compiler
21123 is told about this with #include <vfork.h>, but some compilers
21124 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
21125 static variable whose address is put into a register that is
21126 clobbered by the vfork. */
19650fd6 21127static void
fa0b693c 21128#ifdef __cplusplus
73b77ee5 21129sparc_address_test (int arg)
503d2be0 21130# else
73b77ee5 21131sparc_address_test (arg) int arg;
fa0b693c 21132#endif
fa0b693c 21133{
73b77ee5
GM
21134 static pid_t child;
21135 if (!child) {
21136 child = vfork ();
21137 if (child < 0) {
21138 perror ("vfork");
21139 _exit(2);
21140 }
21141 if (!child) {
21142 arg = getpid();
21143 write(-1, "", 0);
21144 _exit (arg);
21145 }
21146 }
21147}
503d2be0
AS
21148
21149int
21150main ()
21151{
73b77ee5
GM
21152 pid_t parent = getpid ();
21153 pid_t child;
fa0b693c 21154
19650fd6 21155 sparc_address_test (0);
fa0b693c 21156
73b77ee5 21157 child = vfork ();
fa0b693c 21158
73b77ee5 21159 if (child == 0) {
503d2be0
AS
21160 /* Here is another test for sparc vfork register problems. This
21161 test uses lots of local variables, at least as many local
21162 variables as main has allocated so far including compiler
21163 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
21164 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
21165 reuse the register of parent for one of the local variables,
21166 since it will think that parent can't possibly be used any more
21167 in this routine. Assigning to the local variable will thus
21168 munge parent in the parent process. */
73b77ee5
GM
21169 pid_t
21170 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21171 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21172 /* Convince the compiler that p..p7 are live; otherwise, it might
21173 use the same hardware register for all 8 local variables. */
21174 if (p != p1 || p != p2 || p != p3 || p != p4
21175 || p != p5 || p != p6 || p != p7)
21176 _exit(1);
fa0b693c 21177
503d2be0
AS
21178 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21179 from child file descriptors. If the child closes a descriptor
21180 before it execs or exits, this munges the parent's descriptor
21181 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
21182 _exit(close(fileno(stdout)) != 0);
21183 } else {
21184 int status;
21185 struct stat st;
21186
21187 while (wait(&status) != child)
21188 ;
21189 exit(
21190 /* Was there some problem with vforking? */
21191 child < 0
21192
21193 /* Did the child fail? (This shouldn't happen.) */
21194 || status
21195
21196 /* Did the vfork/compiler bug occur? */
21197 || parent != getpid()
fa0b693c 21198
73b77ee5
GM
21199 /* Did the file descriptor bug occur? */
21200 || fstat(fileno(stdout), &st) != 0
21201 );
21202 }
21203}
503d2be0
AS
21204_ACEOF
21205rm -f conftest$ac_exeext
c0d27fcc 21206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21207 (eval $ac_link) 2>&5
21208 ac_status=$?
c0d27fcc 21209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21210 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21212 (eval $ac_try) 2>&5
21213 ac_status=$?
c0d27fcc 21214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21215 (exit $ac_status); }; }; then
73b77ee5 21216 ac_cv_func_vfork_works=yes
fa0b693c 21217else
503d2be0
AS
21218 echo "$as_me: program exited with status $ac_status" >&5
21219echo "$as_me: failed program was:" >&5
19650fd6
AS
21220sed 's/^/| /' conftest.$ac_ext >&5
21221
c0d27fcc 21222( exit $ac_status )
503d2be0
AS
21223ac_cv_func_vfork_works=no
21224fi
35996d22 21225rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 21226fi
fa0b693c 21227fi
c0d27fcc 21228echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 21229echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 21230
503d2be0
AS
21231fi;
21232if test "x$ac_cv_func_fork_works" = xcross; then
35996d22 21233 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
21234 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
21235echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
21236fi
21237
503d2be0
AS
21238if test "x$ac_cv_func_vfork_works" = xyes; then
21239
c0d27fcc 21240cat >>confdefs.h <<\_ACEOF
503d2be0 21241#define HAVE_WORKING_VFORK 1
c0d27fcc 21242_ACEOF
503d2be0
AS
21243
21244else
21245
c0d27fcc 21246cat >>confdefs.h <<\_ACEOF
73b77ee5 21247#define vfork fork
c0d27fcc 21248_ACEOF
fa0b693c
GM
21249
21250fi
503d2be0
AS
21251if test "x$ac_cv_func_fork_works" = xyes; then
21252
c0d27fcc 21253cat >>confdefs.h <<\_ACEOF
503d2be0 21254#define HAVE_WORKING_FORK 1
c0d27fcc 21255_ACEOF
fa0b693c 21256
503d2be0 21257fi
647847ea 21258
c0d27fcc 21259
6a3a24fa
JD
21260echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
21261echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
21262if test "${emacs_cv_langinfo_codeset+set}" = set; then
21263 echo $ECHO_N "(cached) $ECHO_C" >&6
21264else
21265 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21266/* confdefs.h. */
21267_ACEOF
21268cat confdefs.h >>conftest.$ac_ext
21269cat >>conftest.$ac_ext <<_ACEOF
21270/* end confdefs.h. */
6a3a24fa
JD
21271#include <langinfo.h>
21272int
21273main ()
21274{
21275char* cs = nl_langinfo(CODESET);
21276 ;
21277 return 0;
21278}
21279_ACEOF
21280rm -f conftest.$ac_objext conftest$ac_exeext
21281if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 21282 (eval $ac_link) 2>conftest.er1
6a3a24fa 21283 ac_status=$?
35996d22
AS
21284 grep -v '^ *+' conftest.er1 >conftest.err
21285 rm -f conftest.er1
21286 cat conftest.err >&5
6a3a24fa
JD
21287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21288 (exit $ac_status); } &&
c08e6004 21289 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
21290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21291 (eval $ac_try) 2>&5
21292 ac_status=$?
21293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21294 (exit $ac_status); }; } &&
21295 { ac_try='test -s conftest$ac_exeext'
6a3a24fa
JD
21296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21297 (eval $ac_try) 2>&5
21298 ac_status=$?
21299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21300 (exit $ac_status); }; }; then
21301 emacs_cv_langinfo_codeset=yes
21302else
21303 echo "$as_me: failed program was:" >&5
19650fd6
AS
21304sed 's/^/| /' conftest.$ac_ext >&5
21305
6a3a24fa
JD
21306emacs_cv_langinfo_codeset=no
21307fi
35996d22
AS
21308rm -f conftest.err conftest.$ac_objext \
21309 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
21310
21311fi
21312echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
21313echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
21314if test $emacs_cv_langinfo_codeset = yes; then
21315
21316cat >>confdefs.h <<\_ACEOF
21317#define HAVE_LANGINFO_CODESET 1
21318_ACEOF
21319
21320fi
21321
c0d27fcc 21322echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
21323echo $ECHO_N "checking for size_t... $ECHO_C" >&6
21324if test "${ac_cv_type_size_t+set}" = set; then
21325 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 21326else
503d2be0 21327 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21328/* confdefs.h. */
21329_ACEOF
21330cat confdefs.h >>conftest.$ac_ext
21331cat >>conftest.$ac_ext <<_ACEOF
21332/* end confdefs.h. */
503d2be0
AS
21333$ac_includes_default
21334int
21335main ()
21336{
21337if ((size_t *) 0)
21338 return 0;
21339if (sizeof (size_t))
21340 return 0;
21341 ;
21342 return 0;
21343}
21344_ACEOF
21345rm -f conftest.$ac_objext
c0d27fcc 21346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21347 (eval $ac_compile) 2>conftest.er1
503d2be0 21348 ac_status=$?
35996d22
AS
21349 grep -v '^ *+' conftest.er1 >conftest.err
21350 rm -f conftest.er1
21351 cat conftest.err >&5
c0d27fcc 21352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21353 (exit $ac_status); } &&
c08e6004 21354 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
21355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21356 (eval $ac_try) 2>&5
21357 ac_status=$?
21358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21359 (exit $ac_status); }; } &&
21360 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21362 (eval $ac_try) 2>&5
21363 ac_status=$?
c0d27fcc 21364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21365 (exit $ac_status); }; }; then
8730a8da
DL
21366 ac_cv_type_size_t=yes
21367else
503d2be0 21368 echo "$as_me: failed program was:" >&5
19650fd6
AS
21369sed 's/^/| /' conftest.$ac_ext >&5
21370
503d2be0 21371ac_cv_type_size_t=no
8730a8da 21372fi
35996d22 21373rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 21374fi
c0d27fcc 21375echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
21376echo "${ECHO_T}$ac_cv_type_size_t" >&6
21377if test $ac_cv_type_size_t = yes; then
503d2be0 21378
c0d27fcc
MR
21379cat >>confdefs.h <<_ACEOF
21380#define HAVE_SIZE_T 1
21381_ACEOF
21382
8730a8da
DL
21383
21384fi
21385
c0d27fcc 21386
973a76b1
DL
21387echo "$as_me:$LINENO: checking for mbstate_t" >&5
21388echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
21389if test "${ac_cv_type_mbstate_t+set}" = set; then
21390 echo $ECHO_N "(cached) $ECHO_C" >&6
21391else
21392 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21393/* confdefs.h. */
21394_ACEOF
21395cat confdefs.h >>conftest.$ac_ext
21396cat >>conftest.$ac_ext <<_ACEOF
21397/* end confdefs.h. */
973a76b1
DL
21398$ac_includes_default
21399# include <wchar.h>
21400int
21401main ()
21402{
21403mbstate_t x; return sizeof x;
21404 ;
21405 return 0;
21406}
21407_ACEOF
21408rm -f conftest.$ac_objext
21409if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21410 (eval $ac_compile) 2>conftest.er1
973a76b1 21411 ac_status=$?
35996d22
AS
21412 grep -v '^ *+' conftest.er1 >conftest.err
21413 rm -f conftest.er1
21414 cat conftest.err >&5
973a76b1
DL
21415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21416 (exit $ac_status); } &&
c08e6004 21417 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
21418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21419 (eval $ac_try) 2>&5
21420 ac_status=$?
21421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21422 (exit $ac_status); }; } &&
21423 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
21424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21425 (eval $ac_try) 2>&5
21426 ac_status=$?
21427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21428 (exit $ac_status); }; }; then
21429 ac_cv_type_mbstate_t=yes
21430else
21431 echo "$as_me: failed program was:" >&5
19650fd6
AS
21432sed 's/^/| /' conftest.$ac_ext >&5
21433
973a76b1
DL
21434ac_cv_type_mbstate_t=no
21435fi
35996d22 21436rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
21437fi
21438echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
21439echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
21440 if test $ac_cv_type_mbstate_t = yes; then
21441
21442cat >>confdefs.h <<\_ACEOF
21443#define HAVE_MBSTATE_T 1
21444_ACEOF
21445
21446 else
21447
21448cat >>confdefs.h <<\_ACEOF
21449#define mbstate_t int
21450_ACEOF
21451
21452 fi
21453
22044edf
DL
21454echo "$as_me:$LINENO: checking for C restrict keyword" >&5
21455echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
21456if test "${emacs_cv_c_restrict+set}" = set; then
21457 echo $ECHO_N "(cached) $ECHO_C" >&6
21458else
21459 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21460/* confdefs.h. */
21461_ACEOF
21462cat confdefs.h >>conftest.$ac_ext
21463cat >>conftest.$ac_ext <<_ACEOF
21464/* end confdefs.h. */
22044edf
DL
21465void fred (int *restrict x);
21466int
21467main ()
21468{
b936fae4 21469
22044edf
DL
21470 ;
21471 return 0;
21472}
c0d27fcc 21473_ACEOF
22044edf
DL
21474rm -f conftest.$ac_objext
21475if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21476 (eval $ac_compile) 2>conftest.er1
22044edf 21477 ac_status=$?
35996d22
AS
21478 grep -v '^ *+' conftest.er1 >conftest.err
21479 rm -f conftest.er1
21480 cat conftest.err >&5
22044edf
DL
21481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21482 (exit $ac_status); } &&
c08e6004 21483 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
21484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21485 (eval $ac_try) 2>&5
21486 ac_status=$?
21487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21488 (exit $ac_status); }; } &&
21489 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21491 (eval $ac_try) 2>&5
21492 ac_status=$?
21493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21494 (exit $ac_status); }; }; then
21495 emacs_cv_c_restrict=yes
21496else
21497 echo "$as_me: failed program was:" >&5
19650fd6
AS
21498sed 's/^/| /' conftest.$ac_ext >&5
21499
22044edf 21500cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21501/* confdefs.h. */
21502_ACEOF
21503cat confdefs.h >>conftest.$ac_ext
21504cat >>conftest.$ac_ext <<_ACEOF
21505/* end confdefs.h. */
22044edf
DL
21506void fred (int *__restrict x);
21507int
21508main ()
21509{
c0d27fcc 21510
22044edf
DL
21511 ;
21512 return 0;
21513}
c0d27fcc 21514_ACEOF
22044edf
DL
21515rm -f conftest.$ac_objext
21516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21517 (eval $ac_compile) 2>conftest.er1
22044edf 21518 ac_status=$?
35996d22
AS
21519 grep -v '^ *+' conftest.er1 >conftest.err
21520 rm -f conftest.er1
21521 cat conftest.err >&5
22044edf
DL
21522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21523 (exit $ac_status); } &&
c08e6004 21524 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
21525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21526 (eval $ac_try) 2>&5
21527 ac_status=$?
21528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21529 (exit $ac_status); }; } &&
21530 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21532 (eval $ac_try) 2>&5
21533 ac_status=$?
21534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21535 (exit $ac_status); }; }; then
21536 emacs_cv_c_restrict=__restrict
21537else
21538 echo "$as_me: failed program was:" >&5
19650fd6
AS
21539sed 's/^/| /' conftest.$ac_ext >&5
21540
22044edf 21541emacs_cv_c_restrict=no
ba4481b5 21542fi
35996d22 21543rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21544fi
35996d22 21545rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21546fi
22044edf
DL
21547echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
21548echo "${ECHO_T}$emacs_cv_c_restrict" >&6
21549case "$emacs_cv_c_restrict" in
21550 yes) emacs_restrict=restrict;;
21551 no) emacs_restrict="";;
21552 *) emacs_restrict="$emacs_cv_c_restrict";;
21553esac
21554if test "$emacs_restrict" != __restrict; then
b936fae4 21555
22044edf
DL
21556cat >>confdefs.h <<_ACEOF
21557#define __restrict $emacs_restrict
c0d27fcc 21558_ACEOF
ba4481b5
DL
21559
21560fi
ba4481b5 21561
22044edf
DL
21562echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
21563echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
21564if test "${emacs_cv_c_restrict_arr+set}" = set; then
21565 echo $ECHO_N "(cached) $ECHO_C" >&6
21566else
21567 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21568/* confdefs.h. */
21569_ACEOF
21570cat confdefs.h >>conftest.$ac_ext
21571cat >>conftest.$ac_ext <<_ACEOF
21572/* end confdefs.h. */
22044edf
DL
21573void fred (int x[__restrict]);
21574int
21575main ()
21576{
b936fae4 21577
22044edf
DL
21578 ;
21579 return 0;
21580}
c0d27fcc 21581_ACEOF
22044edf
DL
21582rm -f conftest.$ac_objext
21583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21584 (eval $ac_compile) 2>conftest.er1
22044edf 21585 ac_status=$?
35996d22
AS
21586 grep -v '^ *+' conftest.er1 >conftest.err
21587 rm -f conftest.er1
21588 cat conftest.err >&5
22044edf
DL
21589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21590 (exit $ac_status); } &&
c08e6004 21591 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
35996d22
AS
21592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21593 (eval $ac_try) 2>&5
21594 ac_status=$?
21595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21596 (exit $ac_status); }; } &&
21597 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21599 (eval $ac_try) 2>&5
21600 ac_status=$?
21601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21602 (exit $ac_status); }; }; then
21603 emacs_cv_c_restrict_arr=yes
21604else
21605 echo "$as_me: failed program was:" >&5
19650fd6
AS
21606sed 's/^/| /' conftest.$ac_ext >&5
21607
22044edf 21608emacs_cv_c_restrict_arr=no
ba4481b5 21609fi
35996d22 21610rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf
DL
21611fi
21612echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
21613echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
21614if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 21615
c0d27fcc 21616cat >>confdefs.h <<\_ACEOF
22044edf 21617#define __restrict_arr __restrict
c0d27fcc 21618_ACEOF
ba4481b5 21619
ba4481b5
DL
21620fi
21621
c0d27fcc 21622
c0d27fcc 21623
22044edf
DL
21624# Set up the CFLAGS for real compilation, so we can substitute it.
21625CFLAGS="$REAL_CFLAGS"
21626CPPFLAGS="$REAL_CPPFLAGS"
21627
21628#### Find out which version of Emacs this is.
21629version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
21630 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
21631if test x"${version}" = x; then
21632 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
21633echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
21634 { (exit 1); exit 1; }; }
21635fi
21636
21637### Specify what sort of things we'll be editing into Makefile and config.h.
21638### Use configuration here uncanonicalized to avoid exceeding size limits.
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
6a3a24fa 21671
22044edf
DL
21672
21673
21674cat >>confdefs.h <<_ACEOF
21675#define EMACS_CONFIGURATION "${canonical}"
21676_ACEOF
21677
21678
21679cat >>confdefs.h <<_ACEOF
21680#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
21681_ACEOF
21682
21683
21684cat >>confdefs.h <<_ACEOF
21685#define config_machfile "${machfile}"
21686_ACEOF
21687
21688
21689cat >>confdefs.h <<_ACEOF
21690#define config_opsysfile "${opsysfile}"
21691_ACEOF
21692
21693
21694cat >>confdefs.h <<_ACEOF
21695#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
21696_ACEOF
21697
21698
21699cat >>confdefs.h <<_ACEOF
21700#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
21701_ACEOF
21702
21703
21704cat >>confdefs.h <<_ACEOF
21705#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
21706_ACEOF
21707
21708
21709cat >>confdefs.h <<_ACEOF
21710#define UNEXEC_SRC ${UNEXEC_SRC}
21711_ACEOF
21712
21713
21714if test "${HAVE_X_WINDOWS}" = "yes" ; then
21715
21716cat >>confdefs.h <<\_ACEOF
21717#define HAVE_X_WINDOWS 1
21718_ACEOF
21719
21720fi
21721if test "${USE_X_TOOLKIT}" != "none" ; then
21722
21723cat >>confdefs.h <<\_ACEOF
21724#define USE_X_TOOLKIT 1
21725_ACEOF
21726
21727fi
21728if test "${HAVE_X11}" = "yes" ; then
21729
21730cat >>confdefs.h <<\_ACEOF
21731#define HAVE_X11 1
21732_ACEOF
21733
21734fi
21735if test "${HAVE_XFREE386}" = "yes" ; then
21736
21737cat >>confdefs.h <<\_ACEOF
21738#define HAVE_XFREE386 1
21739_ACEOF
21740
21741fi
21742if test "${HAVE_MENUS}" = "yes" ; then
21743
21744cat >>confdefs.h <<\_ACEOF
21745#define HAVE_MENUS 1
21746_ACEOF
21747
21748fi
21749if test "${GNU_MALLOC}" = "yes" ; then
21750
21751cat >>confdefs.h <<\_ACEOF
21752#define GNU_MALLOC 1
21753_ACEOF
21754
21755fi
21756if test "${REL_ALLOC}" = "yes" ; then
21757
21758cat >>confdefs.h <<\_ACEOF
21759#define REL_ALLOC 1
21760_ACEOF
21761
21762fi
21763
21764
21765
c0d27fcc
MR
21766
21767
ba4481b5 21768#### Report on what we decided to do.
488dd4c4
JD
21769#### Report GTK as a toolkit, even if it doesn't use Xt.
21770#### It makes printing result more understandable as using GTK sets
21771#### toolkit_scroll_bars to yes by default.
21772if test "${HAVE_GTK}" = "yes"; then
21773 USE_X_TOOLKIT=GTK
21774fi
21775
ba4481b5
DL
21776echo "
21777Configured for \`${canonical}'.
21778
21779 Where should the build process find the source code? ${srcdir}
21780 What operating system and machine description files should Emacs use?
21781 \`${opsysfile}' and \`${machfile}'
21782 What compiler should emacs be built with? ${CC} ${CFLAGS}
21783 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 21784 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 21785 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 21786 What window system should Emacs use? ${window_system}
8e967cf7 21787 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
21788
21789if test -n "${x_includes}"; then
21790echo " Where do we find X Windows header files? ${x_includes}"
21791else
21792echo " Where do we find X Windows header files? Standard dirs"
21793fi
21794if test -n "${x_libraries}"; then
21795echo " Where do we find X Windows libraries? ${x_libraries}"
21796else
21797echo " Where do we find X Windows libraries? Standard dirs"
21798fi
21799
21800echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
21801echo " Does Emacs use -lXpm? ${HAVE_XPM}"
21802echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
21803echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
21804echo " Does Emacs use -lungif? ${HAVE_GIF}"
21805echo " Does Emacs use -lpng? ${HAVE_PNG}"
21806echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
21807echo
21808
05cf15c6
JD
21809if test "$emacs_cv_randomheap" = warn; then
21810 { echo "$as_me:$LINENO: WARNING:
21811**********************************************************************
21812
21813Heap start address is randomized and no workaround is known.
21814Emacs will probably dump core when temacs is run in the build phase.
21815Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS'
21816for further information.
21817
21818**********************************************************************
21819" >&5
21820echo "$as_me: WARNING:
21821**********************************************************************
21822
21823Heap start address is randomized and no workaround is known.
21824Emacs will probably dump core when temacs is run in the build phase.
21825Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS'
21826for further information.
21827
21828**********************************************************************
21829" >&2;}
21830fi
21831
ba4481b5
DL
21832# Remove any trailing slashes in these variables.
21833test "${prefix}" != NONE &&
21834 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
21835test "${exec_prefix}" != NONE &&
21836 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
21837
d0e9bfd2
GM
21838## Check if the C preprocessor will convert `..' to `. .'. If so, set
21839## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
21840## from Makefile.c can correctly provide the arg `-traditional' to the
21841## C preprocessor.
21842
503d2be0 21843cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21844/* confdefs.h. */
21845_ACEOF
21846cat confdefs.h >>conftest.$ac_ext
21847cat >>conftest.$ac_ext <<_ACEOF
21848/* end confdefs.h. */
d0e9bfd2 21849yes..yes
503d2be0 21850_ACEOF
d0e9bfd2 21851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 21852 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
21853 CPP_NEED_TRADITIONAL=no
21854else
d0e9bfd2
GM
21855 CPP_NEED_TRADITIONAL=yes
21856fi
21857rm -f conftest*
21858
c0d27fcc 21859
6bae0ccf
DL
21860 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"
21861 ac_config_commands="$ac_config_commands default"
503d2be0 21862cat >confcache <<\_ACEOF
ba4481b5
DL
21863# This file is a shell script that caches the results of configure
21864# tests run on this system so they can be shared between configure
503d2be0
AS
21865# scripts and configure runs, see configure's option --config-cache.
21866# It is not useful on other systems. If it contains results you don't
21867# want to keep, you may remove or edit it.
ba4481b5 21868#
503d2be0
AS
21869# config.status only pays attention to the cache file if you give it
21870# the --recheck option to rerun configure.
ba4481b5 21871#
6bae0ccf 21872# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
21873# loading this file, other *unset* `ac_cv_foo' will be assigned the
21874# following values.
21875
21876_ACEOF
21877
ba4481b5
DL
21878# The following way of writing the cache mishandles newlines in values,
21879# but we know of no workaround that is simple, portable, and efficient.
21880# So, don't put newlines in cache variables' values.
21881# Ultrix sh set writes to stderr and can't be redirected directly,
21882# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
21883{
21884 (set) 2>&1 |
21885 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21886 *ac_space=\ *)
21887 # `set' does not quote correctly, so add quotes (double-quote
21888 # substitution turns \\\\ into \\, and sed turns \\ into \).
21889 sed -n \
35996d22
AS
21890 "s/'/'\\\\''/g;
21891 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
503d2be0
AS
21892 ;;
21893 *)
21894 # `set' quotes correctly as required by POSIX, so do not add quotes.
21895 sed -n \
35996d22 21896 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
21897 ;;
21898 esac;
21899} |
21900 sed '
21901 t clear
21902 : clear
21903 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21904 t end
21905 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21906 : end' >>confcache
19650fd6 21907if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 21908 if test -w $cache_file; then
503d2be0
AS
21909 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21910 cat confcache >$cache_file
ba4481b5
DL
21911 else
21912 echo "not updating unwritable cache $cache_file"
21913 fi
21914fi
21915rm -f confcache
21916
ba4481b5
DL
21917test "x$prefix" = xNONE && prefix=$ac_default_prefix
21918# Let make expand exec_prefix.
21919test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21920
503d2be0
AS
21921# VPATH may cause trouble with some makes, so we remove $(srcdir),
21922# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21923# trailing colons and then remove the whole line if VPATH becomes empty
21924# (actually we leave an empty line to preserve line numbers).
ba4481b5 21925if test "x$srcdir" = x.; then
35996d22 21926 ac_vpsub='/^[ ]*VPATH[ ]*=/{
503d2be0
AS
21927s/:*\$(srcdir):*/:/;
21928s/:*\${srcdir}:*/:/;
21929s/:*@srcdir@:*/:/;
35996d22 21930s/^\([^=]*=[ ]*\):*/\1/;
503d2be0 21931s/:*$//;
35996d22 21932s/^[^=]*=[ ]*$//;
503d2be0 21933}'
ba4481b5
DL
21934fi
21935
ba4481b5
DL
21936DEFS=-DHAVE_CONFIG_H
21937
6bae0ccf
DL
21938ac_libobjs=
21939ac_ltlibobjs=
21940for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21941 # 1. Remove the extension, and $U if already installed.
21942 ac_i=`echo "$ac_i" |
35996d22 21943 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6bae0ccf
DL
21944 # 2. Add them.
21945 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21946 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
21947done
21948LIBOBJS=$ac_libobjs
21949
21950LTLIBOBJS=$ac_ltlibobjs
21951
21952
c0d27fcc 21953
ba4481b5 21954: ${CONFIG_STATUS=./config.status}
503d2be0
AS
21955ac_clean_files_save=$ac_clean_files
21956ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 21957{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
21958echo "$as_me: creating $CONFIG_STATUS" >&6;}
21959cat >$CONFIG_STATUS <<_ACEOF
21960#! $SHELL
c0d27fcc 21961# Generated by $as_me.
ba4481b5 21962# Run this file to recreate the current configuration.
ba4481b5 21963# Compiler output produced by configure, useful for debugging
503d2be0 21964# configure, is in config.log if it exists.
ba4481b5 21965
503d2be0 21966debug=false
19650fd6
AS
21967ac_cs_recheck=false
21968ac_cs_silent=false
503d2be0 21969SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
21970_ACEOF
21971
21972cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
21973## --------------------- ##
21974## M4sh Initialization. ##
21975## --------------------- ##
21976
503d2be0
AS
21977# Be Bourne compatible
21978if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21979 emulate sh
21980 NULLCMD=:
6bae0ccf
DL
21981 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21982 # is contrary to our usage. Disable this feature.
21983 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
21984elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21985 set -o posix
21986fi
35996d22 21987DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 21988
c0d27fcc 21989# Support unset when possible.
35996d22 21990if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
21991 as_unset=unset
21992else
21993 as_unset=false
21994fi
21995
6bae0ccf
DL
21996
21997# Work around bugs in pre-3.0 UWIN ksh.
21998$as_unset ENV MAIL MAILPATH
21999PS1='$ '
22000PS2='> '
22001PS4='+ '
22002
22003# NLS nuisances.
19650fd6
AS
22004for as_var in \
22005 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22006 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22007 LC_TELEPHONE LC_TIME
6bae0ccf 22008do
35996d22 22009 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
22010 eval $as_var=C; export $as_var
22011 else
22012 $as_unset $as_var
22013 fi
22014done
22015
22016# Required to use basename.
22017if expr a : '\(a\)' >/dev/null 2>&1; then
22018 as_expr=expr
22019else
22020 as_expr=false
22021fi
22022
22023if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22024 as_basename=basename
22025else
22026 as_basename=false
22027fi
c0d27fcc
MR
22028
22029
503d2be0 22030# Name of the executable.
6bae0ccf 22031as_me=`$as_basename "$0" ||
c0d27fcc
MR
22032$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22033 X"$0" : 'X\(//\)$' \| \
22034 X"$0" : 'X\(/\)$' \| \
22035 . : '\(.\)' 2>/dev/null ||
22036echo X/"$0" |
22037 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22038 /^X\/\(\/\/\)$/{ s//\1/; q; }
22039 /^X\/\(\/\).*/{ s//\1/; q; }
22040 s/.*/./; q'`
22041
6bae0ccf 22042
c0d27fcc
MR
22043# PATH needs CR, and LINENO needs CR and PATH.
22044# Avoid depending upon Character Ranges.
22045as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22046as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22047as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22048as_cr_digits='0123456789'
22049as_cr_alnum=$as_cr_Letters$as_cr_digits
22050
22051# The user is always right.
22052if test "${PATH_SEPARATOR+set}" != set; then
19650fd6
AS
22053 echo "#! /bin/sh" >conf$$.sh
22054 echo "exit 0" >>conf$$.sh
22055 chmod +x conf$$.sh
22056 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
22057 PATH_SEPARATOR=';'
22058 else
22059 PATH_SEPARATOR=:
22060 fi
19650fd6 22061 rm -f conf$$.sh
c0d27fcc
MR
22062fi
22063
22064
22065 as_lineno_1=$LINENO
22066 as_lineno_2=$LINENO
22067 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22068 test "x$as_lineno_1" != "x$as_lineno_2" &&
22069 test "x$as_lineno_3" = "x$as_lineno_2" || {
22070 # Find who we are. Look in the path if we contain no path at all
22071 # relative or not.
22072 case $0 in
22073 *[\\/]* ) as_myself=$0 ;;
22074 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22075for as_dir in $PATH
22076do
22077 IFS=$as_save_IFS
22078 test -z "$as_dir" && as_dir=.
22079 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22080done
22081
22082 ;;
22083 esac
22084 # We did not find ourselves, most probably we were run as `sh COMMAND'
22085 # in which case we are not to be found in the path.
22086 if test "x$as_myself" = x; then
22087 as_myself=$0
22088 fi
22089 if test ! -f "$as_myself"; then
22090 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22091echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22092 { (exit 1); exit 1; }; }
22093 fi
22094 case $CONFIG_SHELL in
22095 '')
22096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22097for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22098do
22099 IFS=$as_save_IFS
22100 test -z "$as_dir" && as_dir=.
22101 for as_base in sh bash ksh sh5; do
22102 case $as_dir in
22103 /*)
22104 if ("$as_dir/$as_base" -c '
22105 as_lineno_1=$LINENO
22106 as_lineno_2=$LINENO
22107 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22108 test "x$as_lineno_1" != "x$as_lineno_2" &&
22109 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
22110 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22111 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
22112 CONFIG_SHELL=$as_dir/$as_base
22113 export CONFIG_SHELL
22114 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22115 fi;;
22116 esac
22117 done
22118done
22119;;
22120 esac
22121
22122 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22123 # uniformly replaced by the line number. The first 'sed' inserts a
22124 # line-number line before each line; the second 'sed' does the real
22125 # work. The second script uses 'N' to pair each line-number line
22126 # with the numbered line, and appends trailing '-' during
22127 # substitution so that $LINENO is not a special case at line end.
22128 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22129 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
22130 sed '=' <$as_myself |
22131 sed '
22132 N
22133 s,$,-,
22134 : loop
22135 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22136 t loop
22137 s,-$,,
22138 s,^['$as_cr_digits']*\n,,
22139 ' >$as_me.lineno &&
22140 chmod +x $as_me.lineno ||
22141 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22142echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22143 { (exit 1); exit 1; }; }
22144
22145 # Don't try to exec as it changes $[0], causing all sort of problems
22146 # (the dirname of $[0] is not the place where we might find the
22147 # original and so on. Autoconf is especially sensible to this).
22148 . ./$as_me.lineno
22149 # Exit status is that of the last command.
22150 exit
22151}
22152
22153
22154case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22155 *c*,-n*) ECHO_N= ECHO_C='
22156' ECHO_T=' ' ;;
22157 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22158 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
22159esac
503d2be0
AS
22160
22161if expr a : '\(a\)' >/dev/null 2>&1; then
22162 as_expr=expr
22163else
22164 as_expr=false
22165fi
22166
22167rm -f conf$$ conf$$.exe conf$$.file
22168echo >conf$$.file
22169if ln -s conf$$.file conf$$ 2>/dev/null; then
22170 # We could just check for DJGPP; but this test a) works b) is more generic
22171 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22172 if test -f conf$$.exe; then
22173 # Don't use ln at all; we don't have any links
22174 as_ln_s='cp -p'
22175 else
22176 as_ln_s='ln -s'
22177 fi
22178elif ln conf$$.file conf$$ 2>/dev/null; then
22179 as_ln_s=ln
22180else
22181 as_ln_s='cp -p'
22182fi
22183rm -f conf$$ conf$$.exe conf$$.file
22184
6bae0ccf
DL
22185if mkdir -p . 2>/dev/null; then
22186 as_mkdir_p=:
22187else
35996d22 22188 test -d ./-p && rmdir ./-p
6bae0ccf
DL
22189 as_mkdir_p=false
22190fi
22191
503d2be0
AS
22192as_executable_p="test -f"
22193
c0d27fcc 22194# Sed expression to map a string onto a valid CPP name.
35996d22 22195as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
22196
22197# Sed expression to map a string onto a valid variable name.
35996d22 22198as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 22199
503d2be0
AS
22200
22201# IFS
22202# We need space, tab and new line, in precisely that order.
22203as_nl='
22204'
22205IFS=" $as_nl"
22206
22207# CDPATH.
6bae0ccf 22208$as_unset CDPATH
503d2be0
AS
22209
22210exec 6>&1
22211
c0d27fcc
MR
22212# Open the log real soon, to keep \$[0] and so on meaningful, and to
22213# report actual input values of CONFIG_FILES etc. instead of their
22214# values after options handling. Logging --version etc. is OK.
22215exec 5>>config.log
22216{
22217 echo
22218 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22219## Running $as_me. ##
22220_ASBOX
22221} >&5
22222cat >&5 <<_CSEOF
22223
22224This file was extended by $as_me, which was
35996d22 22225generated by GNU Autoconf 2.59. Invocation command line was
c0d27fcc
MR
22226
22227 CONFIG_FILES = $CONFIG_FILES
22228 CONFIG_HEADERS = $CONFIG_HEADERS
22229 CONFIG_LINKS = $CONFIG_LINKS
22230 CONFIG_COMMANDS = $CONFIG_COMMANDS
22231 $ $0 $@
22232
22233_CSEOF
22234echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22235echo >&5
503d2be0
AS
22236_ACEOF
22237
22238# Files that config.status was made for.
22239if test -n "$ac_config_files"; then
22240 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22241fi
22242
22243if test -n "$ac_config_headers"; then
22244 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22245fi
22246
22247if test -n "$ac_config_links"; then
22248 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22249fi
22250
22251if test -n "$ac_config_commands"; then
22252 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22253fi
22254
c0d27fcc 22255cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22256
22257ac_cs_usage="\
22258\`$as_me' instantiates files from templates according to the
22259current configuration.
22260
22261Usage: $0 [OPTIONS] [FILE]...
22262
22263 -h, --help print this help, then exit
22264 -V, --version print version number, then exit
19650fd6 22265 -q, --quiet do not print progress messages
503d2be0
AS
22266 -d, --debug don't remove temporary files
22267 --recheck update $as_me by reconfiguring in the same conditions
22268 --file=FILE[:TEMPLATE]
35996d22 22269 instantiate the configuration file FILE
503d2be0 22270 --header=FILE[:TEMPLATE]
35996d22 22271 instantiate the configuration header FILE
503d2be0
AS
22272
22273Configuration files:
22274$config_files
22275
22276Configuration headers:
22277$config_headers
22278
22279Configuration commands:
22280$config_commands
22281
22282Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 22283_ACEOF
503d2be0 22284
c0d27fcc 22285cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22286ac_cs_version="\\
22287config.status
35996d22 22288configured by $0, generated by GNU Autoconf 2.59,
503d2be0
AS
22289 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22290
35996d22 22291Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
22292This config.status script is free software; the Free Software Foundation
22293gives unlimited permission to copy, distribute and modify it."
22294srcdir=$srcdir
22295INSTALL="$INSTALL"
c0d27fcc 22296_ACEOF
503d2be0 22297
c0d27fcc 22298cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22299# If no file are specified by the user, then we need to provide default
22300# value. By we need to know if files were specified by the user.
22301ac_need_defaults=:
22302while test $# != 0
ba4481b5 22303do
503d2be0
AS
22304 case $1 in
22305 --*=*)
22306 ac_option=`expr "x$1" : 'x\([^=]*\)='`
22307 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
22308 ac_shift=:
22309 ;;
22310 -*)
22311 ac_option=$1
22312 ac_optarg=$2
22313 ac_shift=shift
503d2be0 22314 ;;
503d2be0
AS
22315 *) # This is not an option, so the user has probably given explicit
22316 # arguments.
6bae0ccf 22317 ac_option=$1
503d2be0
AS
22318 ac_need_defaults=false;;
22319 esac
22320
6bae0ccf 22321 case $ac_option in
503d2be0 22322 # Handling of the options.
c0d27fcc 22323_ACEOF
f57bd967 22324cat >>$CONFIG_STATUS <<\_ACEOF
19650fd6
AS
22325 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22326 ac_cs_recheck=: ;;
503d2be0
AS
22327 --version | --vers* | -V )
22328 echo "$ac_cs_version"; exit 0 ;;
22329 --he | --h)
22330 # Conflict between --help and --header
c0d27fcc 22331 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
22332Try \`$0 --help' for more information." >&5
22333echo "$as_me: error: ambiguous option: $1
22334Try \`$0 --help' for more information." >&2;}
22335 { (exit 1); exit 1; }; };;
22336 --help | --hel | -h )
22337 echo "$ac_cs_usage"; exit 0 ;;
22338 --debug | --d* | -d )
22339 debug=: ;;
22340 --file | --fil | --fi | --f )
6bae0ccf
DL
22341 $ac_shift
22342 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
22343 ac_need_defaults=false;;
22344 --header | --heade | --head | --hea )
6bae0ccf
DL
22345 $ac_shift
22346 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 22347 ac_need_defaults=false;;
19650fd6
AS
22348 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22349 | -silent | --silent | --silen | --sile | --sil | --si | --s)
22350 ac_cs_silent=: ;;
503d2be0
AS
22351
22352 # This is an error.
c0d27fcc 22353 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
22354Try \`$0 --help' for more information." >&5
22355echo "$as_me: error: unrecognized option: $1
22356Try \`$0 --help' for more information." >&2;}
22357 { (exit 1); exit 1; }; } ;;
22358
22359 *) ac_config_targets="$ac_config_targets $1" ;;
22360
ba4481b5 22361 esac
503d2be0 22362 shift
ba4481b5
DL
22363done
22364
19650fd6
AS
22365ac_configure_extra_args=
22366
22367if $ac_cs_silent; then
22368 exec 6>/dev/null
22369 ac_configure_extra_args="$ac_configure_extra_args --silent"
22370fi
22371
22372_ACEOF
22373cat >>$CONFIG_STATUS <<_ACEOF
22374if \$ac_cs_recheck; then
22375 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
22376 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22377fi
22378
503d2be0 22379_ACEOF
ba4481b5 22380
c0d27fcc 22381cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22382#
22383# INIT-COMMANDS section.
22384#
ba4481b5 22385
503d2be0
AS
22386GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
22387
c0d27fcc
MR
22388_ACEOF
22389
503d2be0 22390
c0d27fcc
MR
22391
22392cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22393for ac_config_target in $ac_config_targets
22394do
22395 case "$ac_config_target" in
22396 # Handling of arguments.
22397 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22398 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
22399 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
22400 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
22401 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
22402 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
22403 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 22404 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 22405 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
22406 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
22407 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22408 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 22409 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
22410echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22411 { (exit 1); exit 1; }; };;
22412 esac
ba4481b5 22413done
503d2be0
AS
22414
22415# If the user did not use the arguments to specify the items to instantiate,
22416# then the envvar interface is used. Set only those that are not.
22417# We use the long form for the default assignment because of an extremely
22418# bizarre bug on SunOS 4.1.3.
22419if $ac_need_defaults; then
22420 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22421 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22422 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 22423fi
503d2be0 22424
19650fd6
AS
22425# Have a temporary directory for convenience. Make it in the build tree
22426# simply because there is no reason to put it here, and in addition,
22427# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
22428# Create a temporary directory, and hook for its removal unless debugging.
22429$debug ||
22430{
22431 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22432 trap '{ (exit 1); exit 1; }' 1 2 13 15
22433}
22434
22435# Create a (secure) tmp directory for tmp files.
19650fd6 22436
503d2be0 22437{
19650fd6 22438 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
22439 test -n "$tmp" && test -d "$tmp"
22440} ||
22441{
19650fd6 22442 tmp=./confstat$$-$RANDOM
503d2be0
AS
22443 (umask 077 && mkdir $tmp)
22444} ||
22445{
19650fd6 22446 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
22447 { (exit 1); exit 1; }
22448}
22449
c0d27fcc 22450_ACEOF
503d2be0 22451
c0d27fcc 22452cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22453
22454#
22455# CONFIG_FILES section.
22456#
22457
22458# No need to generate the scripts if there are no CONFIG_FILES.
22459# This happens for instance when ./config.status config.h
22460if test -n "\$CONFIG_FILES"; then
22461 # Protect against being on the right side of a sed subst in config.status.
22462 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22463 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22464s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
22465s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22466s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22467s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22468s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22469s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22470s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
22471s,@exec_prefix@,$exec_prefix,;t t
22472s,@prefix@,$prefix,;t t
22473s,@program_transform_name@,$program_transform_name,;t t
22474s,@bindir@,$bindir,;t t
22475s,@sbindir@,$sbindir,;t t
22476s,@libexecdir@,$libexecdir,;t t
22477s,@datadir@,$datadir,;t t
22478s,@sysconfdir@,$sysconfdir,;t t
22479s,@sharedstatedir@,$sharedstatedir,;t t
22480s,@localstatedir@,$localstatedir,;t t
22481s,@libdir@,$libdir,;t t
22482s,@includedir@,$includedir,;t t
22483s,@oldincludedir@,$oldincludedir,;t t
22484s,@infodir@,$infodir,;t t
22485s,@mandir@,$mandir,;t t
503d2be0
AS
22486s,@build_alias@,$build_alias,;t t
22487s,@host_alias@,$host_alias,;t t
22488s,@target_alias@,$target_alias,;t t
c0d27fcc 22489s,@DEFS@,$DEFS,;t t
503d2be0
AS
22490s,@ECHO_C@,$ECHO_C,;t t
22491s,@ECHO_N@,$ECHO_N,;t t
22492s,@ECHO_T@,$ECHO_T,;t t
503d2be0 22493s,@LIBS@,$LIBS,;t t
19650fd6 22494s,@MAINT@,$MAINT,;t t
503d2be0
AS
22495s,@build@,$build,;t t
22496s,@build_cpu@,$build_cpu,;t t
22497s,@build_vendor@,$build_vendor,;t t
22498s,@build_os@,$build_os,;t t
22499s,@host@,$host,;t t
22500s,@host_cpu@,$host_cpu,;t t
22501s,@host_vendor@,$host_vendor,;t t
22502s,@host_os@,$host_os,;t t
22503s,@CC@,$CC,;t t
22504s,@CFLAGS@,$CFLAGS,;t t
22505s,@LDFLAGS@,$LDFLAGS,;t t
22506s,@CPPFLAGS@,$CPPFLAGS,;t t
22507s,@ac_ct_CC@,$ac_ct_CC,;t t
22508s,@EXEEXT@,$EXEEXT,;t t
22509s,@OBJEXT@,$OBJEXT,;t t
22510s,@LN_S@,$LN_S,;t t
22511s,@CPP@,$CPP,;t t
22512s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22513s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22514s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
22515s,@RANLIB@,$RANLIB,;t t
22516s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 22517s,@INSTALL_INFO@,$INSTALL_INFO,;t t
6bae0ccf 22518s,@EGREP@,$EGREP,;t t
503d2be0
AS
22519s,@LIBSOUND@,$LIBSOUND,;t t
22520s,@SET_MAKE@,$SET_MAKE,;t t
488dd4c4
JD
22521s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22522s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
22523s,@GTK_LIBS@,$GTK_LIBS,;t t
503d2be0
AS
22524s,@ALLOCA@,$ALLOCA,;t t
22525s,@liblockfile@,$liblockfile,;t t
22526s,@LIBOBJS@,$LIBOBJS,;t t
22527s,@NEED_SETGID@,$NEED_SETGID,;t t
22528s,@KMEM_GROUP@,$KMEM_GROUP,;t t
22529s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
22530s,@version@,$version,;t t
22531s,@configuration@,$configuration,;t t
22532s,@canonical@,$canonical,;t t
22533s,@srcdir@,$srcdir,;t t
22534s,@lispdir@,$lispdir,;t t
22535s,@locallisppath@,$locallisppath,;t t
22536s,@lisppath@,$lisppath,;t t
22537s,@x_default_search_path@,$x_default_search_path,;t t
22538s,@etcdir@,$etcdir,;t t
22539s,@archlibdir@,$archlibdir,;t t
22540s,@docdir@,$docdir,;t t
22541s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
22542s,@gamedir@,$gamedir,;t t
22543s,@gameuser@,$gameuser,;t t
503d2be0
AS
22544s,@c_switch_system@,$c_switch_system,;t t
22545s,@c_switch_machine@,$c_switch_machine,;t t
22546s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
22547s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
22548s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
22549s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
22550s,@machfile@,$machfile,;t t
22551s,@opsysfile@,$opsysfile,;t t
6a3a24fa 22552s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 22553s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
22554CEOF
22555
c0d27fcc 22556_ACEOF
ba4481b5 22557
c0d27fcc 22558 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22559 # Split the substitutions into bite-sized pieces for seds with
22560 # small command number limits, like on Digital OSF/1 and HP-UX.
22561 ac_max_sed_lines=48
22562 ac_sed_frag=1 # Number of current file.
22563 ac_beg=1 # First line for current file.
22564 ac_end=$ac_max_sed_lines # Line after last line for current file.
22565 ac_more_lines=:
22566 ac_sed_cmds=
22567 while $ac_more_lines; do
22568 if test $ac_beg -gt 1; then
22569 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22570 else
22571 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22572 fi
22573 if test ! -s $tmp/subs.frag; then
22574 ac_more_lines=false
22575 else
22576 # The purpose of the label and of the branching condition is to
22577 # speed up the sed processing (if there are no `@' at all, there
22578 # is no need to browse any of the substitutions).
22579 # These are the two extra sed commands mentioned above.
22580 (echo ':t
22581 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22582 if test -z "$ac_sed_cmds"; then
35996d22 22583 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0 22584 else
35996d22 22585 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0
AS
22586 fi
22587 ac_sed_frag=`expr $ac_sed_frag + 1`
22588 ac_beg=$ac_end
22589 ac_end=`expr $ac_end + $ac_max_sed_lines`
22590 fi
22591 done
22592 if test -z "$ac_sed_cmds"; then
22593 ac_sed_cmds=cat
22594 fi
22595fi # test -n "$CONFIG_FILES"
ba4481b5 22596
c0d27fcc
MR
22597_ACEOF
22598cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 22599for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 22600 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
22601 case $ac_file in
22602 - | *:- | *:-:* ) # input from stdin
35996d22
AS
22603 cat >$tmp/stdin
22604 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22605 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22606 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
35996d22 22607 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22608 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
22609 esac
22610
503d2be0 22611 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
22612 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22613$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22614 X"$ac_file" : 'X\(//\)[^/]' \| \
22615 X"$ac_file" : 'X\(//\)$' \| \
22616 X"$ac_file" : 'X\(/\)' \| \
22617 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
22618echo X"$ac_file" |
22619 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22620 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22621 /^X\(\/\/\)$/{ s//\1/; q; }
22622 /^X\(\/\).*/{ s//\1/; q; }
22623 s/.*/./; q'`
6bae0ccf
DL
22624 { if $as_mkdir_p; then
22625 mkdir -p "$ac_dir"
22626 else
22627 as_dir="$ac_dir"
22628 as_dirs=
22629 while test ! -d "$as_dir"; do
22630 as_dirs="$as_dir $as_dirs"
22631 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22632$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22633 X"$as_dir" : 'X\(//\)[^/]' \| \
22634 X"$as_dir" : 'X\(//\)$' \| \
22635 X"$as_dir" : 'X\(/\)' \| \
22636 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
22637echo X"$as_dir" |
22638 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22639 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22640 /^X\(\/\/\)$/{ s//\1/; q; }
22641 /^X\(\/\).*/{ s//\1/; q; }
22642 s/.*/./; q'`
22643 done
22644 test ! -n "$as_dirs" || mkdir $as_dirs
22645 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22646echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22647 { (exit 1); exit 1; }; }; }
503d2be0 22648
c0d27fcc 22649 ac_builddir=.
98418dba 22650
c0d27fcc
MR
22651if test "$ac_dir" != .; then
22652 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22653 # A "../" for each directory in $ac_dir_suffix.
22654 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22655else
22656 ac_dir_suffix= ac_top_builddir=
22657fi
22658
22659case $srcdir in
22660 .) # No --srcdir option. We are building in place.
22661 ac_srcdir=.
22662 if test -z "$ac_top_builddir"; then
22663 ac_top_srcdir=.
22664 else
22665 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22666 fi ;;
22667 [\\/]* | ?:[\\/]* ) # Absolute path.
22668 ac_srcdir=$srcdir$ac_dir_suffix;
22669 ac_top_srcdir=$srcdir ;;
ba4481b5 22670 *) # Relative path.
c0d27fcc
MR
22671 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22672 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22673esac
35996d22
AS
22674
22675# Do not use `cd foo && pwd` to compute absolute paths, because
22676# the directories may not exist.
22677case `pwd` in
22678.) ac_abs_builddir="$ac_dir";;
22679*)
22680 case "$ac_dir" in
22681 .) ac_abs_builddir=`pwd`;;
22682 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22683 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22684 esac;;
22685esac
22686case $ac_abs_builddir in
22687.) ac_abs_top_builddir=${ac_top_builddir}.;;
22688*)
22689 case ${ac_top_builddir}. in
22690 .) ac_abs_top_builddir=$ac_abs_builddir;;
22691 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22692 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22693 esac;;
22694esac
22695case $ac_abs_builddir in
22696.) ac_abs_srcdir=$ac_srcdir;;
22697*)
22698 case $ac_srcdir in
22699 .) ac_abs_srcdir=$ac_abs_builddir;;
22700 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22701 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22702 esac;;
22703esac
22704case $ac_abs_builddir in
22705.) ac_abs_top_srcdir=$ac_top_srcdir;;
22706*)
22707 case $ac_top_srcdir in
22708 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22709 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22710 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22711 esac;;
22712esac
c0d27fcc 22713
ba4481b5 22714
503d2be0
AS
22715 case $INSTALL in
22716 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 22717 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
22718 esac
22719
503d2be0
AS
22720 # Let's still pretend it is `configure' which instantiates (i.e., don't
22721 # use $as_me), people would be surprised to read:
c0d27fcc
MR
22722 # /* config.h. Generated by config.status. */
22723 if test x"$ac_file" = x-; then
22724 configure_input=
22725 else
22726 configure_input="$ac_file. "
22727 fi
22728 configure_input=$configure_input"Generated from `echo $ac_file_in |
35996d22 22729 sed 's,.*/,,'` by configure."
503d2be0
AS
22730
22731 # First look for the input files in the build tree, otherwise in the
22732 # src tree.
22733 ac_file_inputs=`IFS=:
22734 for f in $ac_file_in; do
22735 case $f in
22736 -) echo $tmp/stdin ;;
22737 [\\/$]*)
35996d22
AS
22738 # Absolute (can't be DOS-style, as IFS=:)
22739 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22740echo "$as_me: error: cannot find input file: $f" >&2;}
22741 { (exit 1); exit 1; }; }
35996d22 22742 echo "$f";;
503d2be0 22743 *) # Relative
35996d22
AS
22744 if test -f "$f"; then
22745 # Build tree
22746 echo "$f"
22747 elif test -f "$srcdir/$f"; then
22748 # Source tree
22749 echo "$srcdir/$f"
22750 else
22751 # /dev/null tree
22752 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22753echo "$as_me: error: cannot find input file: $f" >&2;}
22754 { (exit 1); exit 1; }; }
35996d22 22755 fi;;
503d2be0
AS
22756 esac
22757 done` || { (exit 1); exit 1; }
c08e6004
MA
22758
22759 if test x"$ac_file" != x-; then
22760 { echo "$as_me:$LINENO: creating $ac_file" >&5
22761echo "$as_me: creating $ac_file" >&6;}
22762 rm -f "$ac_file"
22763 fi
c0d27fcc
MR
22764_ACEOF
22765cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22766 sed "$ac_vpsub
22767$extrasub
c0d27fcc
MR
22768_ACEOF
22769cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22770:t
22771/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22772s,@configure_input@,$configure_input,;t t
22773s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 22774s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 22775s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
22776s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22777s,@builddir@,$ac_builddir,;t t
22778s,@abs_builddir@,$ac_abs_builddir,;t t
22779s,@top_builddir@,$ac_top_builddir,;t t
22780s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
22781s,@INSTALL@,$ac_INSTALL,;t t
22782" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22783 rm -f $tmp/stdin
22784 if test x"$ac_file" != x-; then
22785 mv $tmp/out $ac_file
22786 else
22787 cat $tmp/out
22788 rm -f $tmp/out
22789 fi
22790
22791done
c0d27fcc
MR
22792_ACEOF
22793cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 22794
503d2be0
AS
22795#
22796# CONFIG_HEADER section.
22797#
ba4481b5
DL
22798
22799# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22800# NAME is the cpp macro being defined and VALUE is the value it is being given.
22801#
22802# ac_d sets the value in "#define NAME VALUE" lines.
35996d22
AS
22803ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22804ac_dB='[ ].*$,\1#\2'
503d2be0
AS
22805ac_dC=' '
22806ac_dD=',;t'
22807# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
35996d22 22808ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
503d2be0 22809ac_uB='$,\1#\2define\3'
ba4481b5 22810ac_uC=' '
503d2be0 22811ac_uD=',;t'
ba4481b5 22812
503d2be0 22813for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 22814 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
22815 case $ac_file in
22816 - | *:- | *:-:* ) # input from stdin
35996d22
AS
22817 cat >$tmp/stdin
22818 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22819 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22820 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
35996d22 22821 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22822 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
22823 esac
22824
c0d27fcc 22825 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
22826echo "$as_me: creating $ac_file" >&6;}
22827
22828 # First look for the input files in the build tree, otherwise in the
22829 # src tree.
22830 ac_file_inputs=`IFS=:
22831 for f in $ac_file_in; do
22832 case $f in
22833 -) echo $tmp/stdin ;;
22834 [\\/$]*)
35996d22
AS
22835 # Absolute (can't be DOS-style, as IFS=:)
22836 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22837echo "$as_me: error: cannot find input file: $f" >&2;}
22838 { (exit 1); exit 1; }; }
35996d22
AS
22839 # Do quote $f, to prevent DOS paths from being IFS'd.
22840 echo "$f";;
503d2be0 22841 *) # Relative
35996d22
AS
22842 if test -f "$f"; then
22843 # Build tree
22844 echo "$f"
22845 elif test -f "$srcdir/$f"; then
22846 # Source tree
22847 echo "$srcdir/$f"
22848 else
22849 # /dev/null tree
22850 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22851echo "$as_me: error: cannot find input file: $f" >&2;}
22852 { (exit 1); exit 1; }; }
35996d22 22853 fi;;
503d2be0
AS
22854 esac
22855 done` || { (exit 1); exit 1; }
22856 # Remove the trailing spaces.
35996d22 22857 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
503d2be0 22858
c0d27fcc 22859_ACEOF
503d2be0
AS
22860
22861# Transform confdefs.h into two sed scripts, `conftest.defines' and
22862# `conftest.undefs', that substitutes the proper values into
22863# config.h.in to produce config.h. The first handles `#define'
22864# templates, and the second `#undef' templates.
22865# And first: Protect against being on the right side of a sed subst in
22866# config.status. Protect against being in an unquoted here document
22867# in config.status.
22868rm -f conftest.defines conftest.undefs
22869# Using a here document instead of a string reduces the quoting nightmare.
22870# Putting comments in sed scripts is not portable.
22871#
22872# `end' is used to avoid that the second main sed command (meant for
22873# 0-ary CPP macros) applies to n-ary macro definitions.
22874# See the Autoconf documentation for `clear'.
c0d27fcc 22875cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
22876s/[\\&,]/\\&/g
22877s,[\\$`],\\&,g
22878t clear
22879: clear
35996d22 22880s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0 22881t end
35996d22 22882s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
503d2be0 22883: end
c0d27fcc 22884_ACEOF
503d2be0
AS
22885# If some macros were called several times there might be several times
22886# the same #defines, which is useless. Nevertheless, we may not want to
22887# sort them, since we want the *last* AC-DEFINE to be honored.
22888uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22889sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22890rm -f confdef2sed.sed
ba4481b5
DL
22891
22892# This sed command replaces #undef with comments. This is necessary, for
22893# example, in the case of _POSIX_SOURCE, which is predefined and required
22894# on some systems where configure will not decide to define it.
c0d27fcc 22895cat >>conftest.undefs <<\_ACEOF
35996d22 22896s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 22897_ACEOF
ba4481b5 22898
503d2be0
AS
22899# Break up conftest.defines because some shells have a limit on the size
22900# of here documents, and old seds have small limits too (100 cmds).
22901echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
35996d22 22902echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
22903echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22904echo ' :' >>$CONFIG_STATUS
22905rm -f conftest.tail
22906while grep . conftest.defines >/dev/null
22907do
22908 # Write a limited-size here document to $tmp/defines.sed.
22909 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22910 # Speed up: don't consider the non `#define' lines.
35996d22 22911 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
503d2be0
AS
22912 # Work around the forget-to-reset-the-flag bug.
22913 echo 't clr' >>$CONFIG_STATUS
22914 echo ': clr' >>$CONFIG_STATUS
22915 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
22916 echo 'CEOF
22917 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22918 rm -f $tmp/in
22919 mv $tmp/out $tmp/in
22920' >>$CONFIG_STATUS
22921 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
22922 rm -f conftest.defines
22923 mv conftest.tail conftest.defines
22924done
22925rm -f conftest.defines
6bae0ccf 22926echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 22927echo >>$CONFIG_STATUS
ba4481b5 22928
503d2be0
AS
22929# Break up conftest.undefs because some shells have a limit on the size
22930# of here documents, and old seds have small limits too (100 cmds).
22931echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 22932rm -f conftest.tail
503d2be0 22933while grep . conftest.undefs >/dev/null
ba4481b5 22934do
503d2be0
AS
22935 # Write a limited-size here document to $tmp/undefs.sed.
22936 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22937 # Speed up: don't consider the non `#undef'
35996d22 22938 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
503d2be0
AS
22939 # Work around the forget-to-reset-the-flag bug.
22940 echo 't clr' >>$CONFIG_STATUS
22941 echo ': clr' >>$CONFIG_STATUS
22942 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 22943 echo 'CEOF
503d2be0
AS
22944 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22945 rm -f $tmp/in
22946 mv $tmp/out $tmp/in
22947' >>$CONFIG_STATUS
22948 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22949 rm -f conftest.undefs
22950 mv conftest.tail conftest.undefs
ba4481b5 22951done
503d2be0
AS
22952rm -f conftest.undefs
22953
c0d27fcc 22954cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22955 # Let's still pretend it is `configure' which instantiates (i.e., don't
22956 # use $as_me), people would be surprised to read:
c0d27fcc 22957 # /* config.h. Generated by config.status. */
503d2be0 22958 if test x"$ac_file" = x-; then
c0d27fcc 22959 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 22960 else
c0d27fcc 22961 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
22962 fi
22963 cat $tmp/in >>$tmp/config.h
22964 rm -f $tmp/in
22965 if test x"$ac_file" != x-; then
19650fd6 22966 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 22967 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
22968echo "$as_me: $ac_file is unchanged" >&6;}
22969 else
c0d27fcc
MR
22970 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22971$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22972 X"$ac_file" : 'X\(//\)[^/]' \| \
22973 X"$ac_file" : 'X\(//\)$' \| \
22974 X"$ac_file" : 'X\(/\)' \| \
22975 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
22976echo X"$ac_file" |
22977 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22978 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22979 /^X\(\/\/\)$/{ s//\1/; q; }
22980 /^X\(\/\).*/{ s//\1/; q; }
22981 s/.*/./; q'`
6bae0ccf
DL
22982 { if $as_mkdir_p; then
22983 mkdir -p "$ac_dir"
22984 else
22985 as_dir="$ac_dir"
22986 as_dirs=
22987 while test ! -d "$as_dir"; do
22988 as_dirs="$as_dir $as_dirs"
22989 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22990$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22991 X"$as_dir" : 'X\(//\)[^/]' \| \
22992 X"$as_dir" : 'X\(//\)$' \| \
22993 X"$as_dir" : 'X\(/\)' \| \
22994 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
22995echo X"$as_dir" |
22996 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22997 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22998 /^X\(\/\/\)$/{ s//\1/; q; }
22999 /^X\(\/\).*/{ s//\1/; q; }
23000 s/.*/./; q'`
23001 done
23002 test ! -n "$as_dirs" || mkdir $as_dirs
23003 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23004echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23005 { (exit 1); exit 1; }; }; }
503d2be0 23006
503d2be0
AS
23007 rm -f $ac_file
23008 mv $tmp/config.h $ac_file
ba4481b5 23009 fi
503d2be0
AS
23010 else
23011 cat $tmp/config.h
23012 rm -f $tmp/config.h
ba4481b5 23013 fi
503d2be0 23014done
c0d27fcc
MR
23015_ACEOF
23016cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23017
23018#
23019# CONFIG_COMMANDS section.
23020#
23021for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23022 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23023 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
23024 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
23025$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
23026 X"$ac_dest" : 'X\(//\)[^/]' \| \
23027 X"$ac_dest" : 'X\(//\)$' \| \
23028 X"$ac_dest" : 'X\(/\)' \| \
23029 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
23030echo X"$ac_dest" |
23031 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23032 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23033 /^X\(\/\/\)$/{ s//\1/; q; }
23034 /^X\(\/\).*/{ s//\1/; q; }
23035 s/.*/./; q'`
35996d22
AS
23036 { if $as_mkdir_p; then
23037 mkdir -p "$ac_dir"
23038 else
23039 as_dir="$ac_dir"
23040 as_dirs=
23041 while test ! -d "$as_dir"; do
23042 as_dirs="$as_dir $as_dirs"
23043 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23044$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23045 X"$as_dir" : 'X\(//\)[^/]' \| \
23046 X"$as_dir" : 'X\(//\)$' \| \
23047 X"$as_dir" : 'X\(/\)' \| \
23048 . : '\(.\)' 2>/dev/null ||
23049echo X"$as_dir" |
23050 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23051 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23052 /^X\(\/\/\)$/{ s//\1/; q; }
23053 /^X\(\/\).*/{ s//\1/; q; }
23054 s/.*/./; q'`
23055 done
23056 test ! -n "$as_dirs" || mkdir $as_dirs
23057 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23058echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23059 { (exit 1); exit 1; }; }; }
23060
c0d27fcc
MR
23061 ac_builddir=.
23062
23063if test "$ac_dir" != .; then
23064 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23065 # A "../" for each directory in $ac_dir_suffix.
23066 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23067else
23068 ac_dir_suffix= ac_top_builddir=
23069fi
23070
23071case $srcdir in
23072 .) # No --srcdir option. We are building in place.
23073 ac_srcdir=.
23074 if test -z "$ac_top_builddir"; then
23075 ac_top_srcdir=.
23076 else
23077 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23078 fi ;;
23079 [\\/]* | ?:[\\/]* ) # Absolute path.
23080 ac_srcdir=$srcdir$ac_dir_suffix;
23081 ac_top_srcdir=$srcdir ;;
23082 *) # Relative path.
23083 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23084 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23085esac
35996d22
AS
23086
23087# Do not use `cd foo && pwd` to compute absolute paths, because
23088# the directories may not exist.
23089case `pwd` in
23090.) ac_abs_builddir="$ac_dir";;
23091*)
23092 case "$ac_dir" in
23093 .) ac_abs_builddir=`pwd`;;
23094 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23095 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23096 esac;;
23097esac
23098case $ac_abs_builddir in
23099.) ac_abs_top_builddir=${ac_top_builddir}.;;
23100*)
23101 case ${ac_top_builddir}. in
23102 .) ac_abs_top_builddir=$ac_abs_builddir;;
23103 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23104 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23105 esac;;
23106esac
23107case $ac_abs_builddir in
23108.) ac_abs_srcdir=$ac_srcdir;;
23109*)
23110 case $ac_srcdir in
23111 .) ac_abs_srcdir=$ac_abs_builddir;;
23112 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23113 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23114 esac;;
23115esac
23116case $ac_abs_builddir in
23117.) ac_abs_top_srcdir=$ac_top_srcdir;;
23118*)
23119 case $ac_top_srcdir in
23120 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23121 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23122 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23123 esac;;
23124esac
ba4481b5 23125
c0d27fcc
MR
23126
23127 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
23128echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
23129 case $ac_dest in
23130 default )
ba4481b5
DL
23131
23132### Make the necessary directories, if they don't exist.
23133for dir in etc lisp ; do
23134 test -d ${dir} || mkdir ${dir}
23135done
23136
23137# Build src/Makefile from ${srcdir}/src/Makefile.c
23138# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
23139# This must be done after src/config.h is built, since we rely on that file.
23140
23141# Now get this: Some word that is part of the ${srcdir} directory name
23142# or the ${configuration} value might, just might, happen to be an
23143# identifier like `sun4' or `i386' or something, and be predefined by
23144# the C preprocessor to some helpful value like 1, or maybe the empty
23145# string. Needless to say consequent macro substitutions are less
23146# than conducive to the makefile finding the correct directory.
23147undefs="`echo $top_srcdir $configuration $canonical |
23148sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
23149 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
23150`"
23151
23152echo creating src/epaths.h
4aa6b955 23153${MAKE-make} epaths-force
ba4481b5 23154
1c203d4c
DL
23155# As of 2000-11-19, newest development versions of GNU cpp preprocess
23156# `..' to `. .' unless invoked with -traditional
23157
d0e9bfd2 23158if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
23159 CPPFLAGS="$CPPFLAGS -traditional"
23160fi
23161
ba4481b5
DL
23162echo creating lib-src/Makefile
23163( cd lib-src
23164 rm -f junk.c junk1.c junk2.c
23165 sed -e '/start of cpp stuff/q' \
23166 < Makefile.c > junk1.c
23167 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 23168 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 23169 < Makefile.c > junk.c
503d2be0 23170 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
23171 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
23172 cat junk1.c junk2.c > Makefile.new
23173 rm -f junk.c junk1.c junk2.c
23174 chmod 444 Makefile.new
23175 mv -f Makefile.new Makefile
23176)
23177
23178echo creating src/Makefile
23179( cd src
23180 rm -f junk.c junk1.c junk2.c
23181 sed -e '/start of cpp stuff/q' \
23182 < Makefile.c > junk1.c
23183 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 23184 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 23185 < Makefile.c > junk.c
503d2be0 23186 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
23187 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
23188 cat junk1.c junk2.c > Makefile.new
23189 rm -f junk.c junk1.c junk2.c
23190 chmod 444 Makefile.new
23191 mv -f Makefile.new Makefile
23192)
23193
503d2be0 23194if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 23195 echo creating src/.gdbinit
503d2be0 23196 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
23197fi
23198
23199# This is how we know whether to re-run configure in certain cases.
23200touch src/config.stamp
23201
503d2be0
AS
23202 ;;
23203 esac
23204done
c0d27fcc 23205_ACEOF
503d2be0 23206
c0d27fcc 23207cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 23208
503d2be0 23209{ (exit 0); exit 0; }
c0d27fcc 23210_ACEOF
ba4481b5 23211chmod +x $CONFIG_STATUS
503d2be0
AS
23212ac_clean_files=$ac_clean_files_save
23213
c0d27fcc 23214
503d2be0
AS
23215# configure is writing to config.log, and then calls config.status.
23216# config.status does its own redirection, appending to config.log.
23217# Unfortunately, on DOS this fails, as config.log is still kept open
23218# by configure, so config.status won't be able to write to it; its
23219# output is simply discarded. So we exec the FD to /dev/null,
23220# effectively closing config.log, so it can be properly (re)opened and
23221# appended to by config.status. When coming back to configure, we
23222# need to make the FD available again.
23223if test "$no_create" != yes; then
23224 ac_cs_success=:
19650fd6
AS
23225 ac_config_status_args=
23226 test "$silent" = yes &&
23227 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 23228 exec 5>/dev/null
19650fd6 23229 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
23230 exec 5>>config.log
23231 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23232 # would make configure fail if this is the last instruction.
23233 $ac_cs_success || { (exit 1); exit 1; }
23234fi
f5f47add 23235
c0d27fcc 23236