Fix F10 behaviour. (Reported by Bernard Adrian.)
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
edfaf76d 3# Generated by GNU Autoconf 2.59.
ba4481b5 4#
439f58ee 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
edfaf76d 22DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 23
c0d27fcc 24# Support unset when possible.
edfaf76d 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
edfaf76d 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
edfaf76d 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.
edfaf76d 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.
edfaf76d 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
439f58ee 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 CPP EGREP LN_S INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO GZIP_PROG LIBSOUND PKG_CONFIG ALSA_CFLAGS ALSA_LIBS CFLAGS_SOUND SET_MAKE GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS GETOPT_H GETOPTOBJS 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 \
edfaf76d 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\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
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
edfaf76d 807 [$ac_default_prefix]
503d2be0 808 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 809 [PREFIX]
503d2be0
AS
810
811By default, \`make install' will install all the files in
812\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
813an installation prefix other than \`$ac_default_prefix' using \`--prefix',
814for instance \`--prefix=\$HOME'.
815
816For better control, use the options below.
817
818Fine tuning of the installation directories:
819 --bindir=DIR user executables [EPREFIX/bin]
820 --sbindir=DIR system admin executables [EPREFIX/sbin]
821 --libexecdir=DIR program executables [EPREFIX/libexec]
822 --datadir=DIR read-only architecture-independent data [PREFIX/share]
823 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
824 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
825 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
826 --libdir=DIR object code libraries [EPREFIX/lib]
827 --includedir=DIR C header files [PREFIX/include]
828 --oldincludedir=DIR C header files for non-gcc [/usr/include]
829 --infodir=DIR info documentation [PREFIX/info]
830 --mandir=DIR man documentation [PREFIX/man]
c0d27fcc 831_ACEOF
503d2be0 832
c0d27fcc 833 cat <<\_ACEOF
503d2be0 834
ba5da88a
PJ
835Program names:
836 --program-prefix=PREFIX prepend PREFIX to installed program names
837 --program-suffix=SUFFIX append SUFFIX to installed program names
838 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
839
503d2be0
AS
840X features:
841 --x-includes=DIR X include files are in DIR
842 --x-libraries=DIR X library files are in DIR
843
844System types:
845 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
846 --host=HOST cross-compile to build programs to run on HOST [BUILD]
847_ACEOF
503d2be0
AS
848fi
849
850if test -n "$ac_init_help"; then
851
c0d27fcc 852 cat <<\_ACEOF
503d2be0
AS
853
854Optional Features:
855 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
856 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6a3a24fa
JD
857 --enable-carbon-app[=DIR] [DIR=/Application]
858 specify install directory for Emacs.app on Mac OS X
d0098f13 859 --enable-asserts compile code with asserts enabled
19650fd6
AS
860 --enable-maintainer-mode enable make rules and dependencies not useful
861 (and sometimes confusing) to the casual installer
9adfabc2
LK
862 --enable-locallisppath=PATH
863 directories Emacs should search for lisp files
864 specific to this site
503d2be0
AS
865 --disable-largefile omit support for large files
866
867Optional Packages:
868 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
869 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
870 --without-gcc don't use GCC to compile Emacs if GCC is found
871 --without-pop don't support POP mail retrieval with movemail
872 --with-kerberos support Kerberos-authenticated POP
873 --with-kerberos5 support Kerberos version 5 authenticated POP
874 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 875 --without-sound don't compile with sound support
488dd4c4
JD
876 --with-x-toolkit=KIT use an X toolkit
877 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
878 --with-xpm use -lXpm for displaying XPM images
879 --with-jpeg use -ljpeg for displaying JPEG images
880 --with-tiff use -ltiff for displaying TIFF images
881 --with-gif use -lungif for displaying GIF images
882 --with-png use -lpng for displaying PNG images
488dd4c4
JD
883 --with-gtk use GTK (same as --with-x-toolkit=gtk)
884 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 885 --without-toolkit-scroll-bars
cc227489
MB
886 don't use Motif or Xaw3d scroll bars
887 --without-xim don't use X11 XIM
e0f712ba 888 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
889 --with-x use the X Window System
890
891Some influential environment variables:
892 CC C compiler command
893 CFLAGS C compiler flags
894 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
895 nonstandard directory <lib dir>
896 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
897 headers in a nonstandard directory <include dir>
898 CPP C preprocessor
899
900Use these variables to override the choices made by `configure' or to help
901it to find libraries and programs with nonstandard names/locations.
902
c0d27fcc 903_ACEOF
503d2be0
AS
904fi
905
906if test "$ac_init_help" = "recursive"; then
907 # If there are subdirs, report their specific --help.
908 ac_popdir=`pwd`
c0d27fcc
MR
909 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
910 test -d $ac_dir || continue
911 ac_builddir=.
912
913if test "$ac_dir" != .; then
914 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
915 # A "../" for each directory in $ac_dir_suffix.
916 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
917else
918 ac_dir_suffix= ac_top_builddir=
919fi
503d2be0 920
c0d27fcc
MR
921case $srcdir in
922 .) # No --srcdir option. We are building in place.
923 ac_srcdir=.
924 if test -z "$ac_top_builddir"; then
925 ac_top_srcdir=.
926 else
927 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
928 fi ;;
929 [\\/]* | ?:[\\/]* ) # Absolute path.
930 ac_srcdir=$srcdir$ac_dir_suffix;
931 ac_top_srcdir=$srcdir ;;
932 *) # Relative path.
933 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
934 ac_top_srcdir=$ac_top_builddir$srcdir ;;
935esac
edfaf76d
LK
936
937# Do not use `cd foo && pwd` to compute absolute paths, because
938# the directories may not exist.
939case `pwd` in
940.) ac_abs_builddir="$ac_dir";;
941*)
942 case "$ac_dir" in
943 .) ac_abs_builddir=`pwd`;;
944 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
945 *) ac_abs_builddir=`pwd`/"$ac_dir";;
946 esac;;
947esac
948case $ac_abs_builddir in
949.) ac_abs_top_builddir=${ac_top_builddir}.;;
950*)
951 case ${ac_top_builddir}. in
952 .) ac_abs_top_builddir=$ac_abs_builddir;;
953 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
954 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
955 esac;;
956esac
957case $ac_abs_builddir in
958.) ac_abs_srcdir=$ac_srcdir;;
959*)
960 case $ac_srcdir in
961 .) ac_abs_srcdir=$ac_abs_builddir;;
962 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
963 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
964 esac;;
965esac
966case $ac_abs_builddir in
967.) ac_abs_top_srcdir=$ac_top_srcdir;;
968*)
969 case $ac_top_srcdir in
970 .) ac_abs_top_srcdir=$ac_abs_builddir;;
971 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
972 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
973 esac;;
974esac
c0d27fcc
MR
975
976 cd $ac_dir
503d2be0 977 # Check for guested configure; otherwise get Cygnus style configure.
c0d27fcc 978 if test -f $ac_srcdir/configure.gnu; then
503d2be0 979 echo
c0d27fcc
MR
980 $SHELL $ac_srcdir/configure.gnu --help=recursive
981 elif test -f $ac_srcdir/configure; then
503d2be0 982 echo
c0d27fcc
MR
983 $SHELL $ac_srcdir/configure --help=recursive
984 elif test -f $ac_srcdir/configure.ac ||
edfaf76d 985 test -f $ac_srcdir/configure.in; then
503d2be0
AS
986 echo
987 $ac_configure --help
988 else
c0d27fcc 989 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
503d2be0 990 fi
8ae52ca6 991 cd "$ac_popdir"
503d2be0
AS
992 done
993fi
994
995test -n "$ac_init_help" && exit 0
996if $ac_init_version; then
c0d27fcc 997 cat <<\_ACEOF
503d2be0 998
edfaf76d 999Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
1000This configure script is free software; the Free Software Foundation
1001gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1002_ACEOF
503d2be0
AS
1003 exit 0
1004fi
1005exec 5>config.log
c0d27fcc 1006cat >&5 <<_ACEOF
503d2be0
AS
1007This file contains any messages produced by compilers while
1008running configure, to aid debugging if configure makes a mistake.
1009
1010It was created by $as_me, which was
edfaf76d 1011generated by GNU Autoconf 2.59. Invocation command line was
503d2be0
AS
1012
1013 $ $0 $@
1014
c0d27fcc 1015_ACEOF
503d2be0
AS
1016{
1017cat <<_ASUNAME
c0d27fcc
MR
1018## --------- ##
1019## Platform. ##
1020## --------- ##
503d2be0
AS
1021
1022hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1023uname -m = `(uname -m) 2>/dev/null || echo unknown`
1024uname -r = `(uname -r) 2>/dev/null || echo unknown`
1025uname -s = `(uname -s) 2>/dev/null || echo unknown`
1026uname -v = `(uname -v) 2>/dev/null || echo unknown`
1027
1028/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1029/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1030
1031/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1032/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1033/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1034hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1035/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1036/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1037/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1038
925c2f3f 1039_ASUNAME
c0d27fcc
MR
1040
1041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1042for as_dir in $PATH
1043do
1044 IFS=$as_save_IFS
1045 test -z "$as_dir" && as_dir=.
1046 echo "PATH: $as_dir"
1047done
1048
503d2be0
AS
1049} >&5
1050
c0d27fcc
MR
1051cat >&5 <<_ACEOF
1052
1053
1054## ----------- ##
1055## Core tests. ##
1056## ----------- ##
1057
1058_ACEOF
503d2be0 1059
503d2be0
AS
1060
1061# Keep a trace of the command line.
1062# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1063# Strip out --silent because we don't want to record it for future runs.
503d2be0 1064# Also quote any args containing shell meta-characters.
19650fd6 1065# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1066ac_configure_args=
19650fd6
AS
1067ac_configure_args0=
1068ac_configure_args1=
503d2be0 1069ac_sep=
19650fd6
AS
1070ac_must_keep_next=false
1071for ac_pass in 1 2
503d2be0 1072do
19650fd6
AS
1073 for ac_arg
1074 do
1075 case $ac_arg in
1076 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1077 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1078 | -silent | --silent | --silen | --sile | --sil)
1079 continue ;;
1080 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1081 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1082 esac
1083 case $ac_pass in
1084 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1085 2)
1086 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1087 if test $ac_must_keep_next = true; then
edfaf76d 1088 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1089 else
edfaf76d
LK
1090 case $ac_arg in
1091 *=* | --config-cache | -C | -disable-* | --disable-* \
1092 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1093 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1094 | -with-* | --with-* | -without-* | --without-* | --x)
1095 case "$ac_configure_args0 " in
1096 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1097 esac
1098 ;;
1099 -* ) ac_must_keep_next=true ;;
1100 esac
19650fd6
AS
1101 fi
1102 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1103 # Get rid of the leading space.
1104 ac_sep=" "
1105 ;;
1106 esac
1107 done
503d2be0 1108done
19650fd6
AS
1109$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1110$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1111
1112# When interrupted or exit'd, cleanup temporary files, and complete
1113# config.log. We remove comments because anyway the quotes in there
1114# would cause problems or look ugly.
c0d27fcc
MR
1115# WARNING: Be sure not to use single quotes in there, as some shells,
1116# such as our DU 5.0 friend, will then `close' the trap.
503d2be0
AS
1117trap 'exit_status=$?
1118 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1119 {
1120 echo
6bae0ccf 1121
c0d27fcc
MR
1122 cat <<\_ASBOX
1123## ---------------- ##
1124## Cache variables. ##
1125## ---------------- ##
1126_ASBOX
1127 echo
1128 # The following way of writing the cache mishandles newlines in values,
503d2be0
AS
1129{
1130 (set) 2>&1 |
1131 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1132 *ac_space=\ *)
1133 sed -n \
edfaf76d
LK
1134 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1135 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
503d2be0
AS
1136 ;;
1137 *)
1138 sed -n \
edfaf76d 1139 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
1140 ;;
1141 esac;
c0d27fcc
MR
1142}
1143 echo
6bae0ccf
DL
1144
1145 cat <<\_ASBOX
1146## ----------------- ##
1147## Output variables. ##
1148## ----------------- ##
1149_ASBOX
1150 echo
1151 for ac_var in $ac_subst_vars
1152 do
1153 eval ac_val=$`echo $ac_var`
1154 echo "$ac_var='"'"'$ac_val'"'"'"
1155 done | sort
1156 echo
1157
1158 if test -n "$ac_subst_files"; then
1159 cat <<\_ASBOX
1160## ------------- ##
1161## Output files. ##
1162## ------------- ##
1163_ASBOX
1164 echo
1165 for ac_var in $ac_subst_files
1166 do
1167 eval ac_val=$`echo $ac_var`
edfaf76d 1168 echo "$ac_var='"'"'$ac_val'"'"'"
6bae0ccf
DL
1169 done | sort
1170 echo
1171 fi
1172
c0d27fcc
MR
1173 if test -s confdefs.h; then
1174 cat <<\_ASBOX
1175## ----------- ##
1176## confdefs.h. ##
1177## ----------- ##
1178_ASBOX
1179 echo
6bae0ccf 1180 sed "/^$/d" confdefs.h | sort
c0d27fcc
MR
1181 echo
1182 fi
1183 test "$ac_signal" != 0 &&
1184 echo "$as_me: caught signal $ac_signal"
1185 echo "$as_me: exit $exit_status"
1186 } >&5
edfaf76d 1187 rm -f core *.core &&
c0d27fcc 1188 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0
AS
1189 exit $exit_status
1190 ' 0
1191for ac_signal in 1 2 13 15; do
1192 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1193done
1194ac_signal=0
1195
1196# confdefs.h avoids OS command line length limits that DEFS can exceed.
1197rm -rf conftest* confdefs.h
1198# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1199echo >confdefs.h
ba4481b5 1200
c0d27fcc
MR
1201# Predefined preprocessor variables.
1202
1203cat >>confdefs.h <<_ACEOF
1204#define PACKAGE_NAME "$PACKAGE_NAME"
1205_ACEOF
1206
1207
1208cat >>confdefs.h <<_ACEOF
1209#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1210_ACEOF
1211
1212
1213cat >>confdefs.h <<_ACEOF
1214#define PACKAGE_VERSION "$PACKAGE_VERSION"
1215_ACEOF
1216
1217
1218cat >>confdefs.h <<_ACEOF
1219#define PACKAGE_STRING "$PACKAGE_STRING"
1220_ACEOF
1221
1222
1223cat >>confdefs.h <<_ACEOF
1224#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1225_ACEOF
1226
1227
503d2be0 1228# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
1229# Prefer explicitly selected file to automatically selected ones.
1230if test -z "$CONFIG_SITE"; then
1231 if test "x$prefix" != xNONE; then
1232 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1233 else
1234 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1235 fi
1236fi
1237for ac_site_file in $CONFIG_SITE; do
1238 if test -r "$ac_site_file"; then
c0d27fcc 1239 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1240echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1241 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1242 . "$ac_site_file"
1243 fi
1244done
1245
1246if test -r "$cache_file"; then
503d2be0
AS
1247 # Some versions of bash will fail to source /dev/null (special
1248 # files actually), so we avoid doing that.
1249 if test -f "$cache_file"; then
c0d27fcc 1250 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1251echo "$as_me: loading cache $cache_file" >&6;}
1252 case $cache_file in
1253 [\\/]* | ?:[\\/]* ) . $cache_file;;
1254 *) . ./$cache_file;;
1255 esac
1256 fi
ba4481b5 1257else
c0d27fcc 1258 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1259echo "$as_me: creating cache $cache_file" >&6;}
1260 >$cache_file
1261fi
1262
1263# Check that the precious variables saved in the cache have kept the same
1264# value.
1265ac_cache_corrupted=false
1266for ac_var in `(set) 2>&1 |
edfaf76d 1267 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
503d2be0
AS
1268 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1269 eval ac_new_set=\$ac_env_${ac_var}_set
1270 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1271 eval ac_new_val="\$ac_env_${ac_var}_value"
1272 case $ac_old_set,$ac_new_set in
1273 set,)
c0d27fcc 1274 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1275echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1276 ac_cache_corrupted=: ;;
1277 ,set)
c0d27fcc 1278 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1279echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1280 ac_cache_corrupted=: ;;
1281 ,);;
1282 *)
1283 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1284 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1285echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1286 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1287echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1288 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1289echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1290 ac_cache_corrupted=:
503d2be0
AS
1291 fi;;
1292 esac
c0d27fcc 1293 # Pass precious variables to config.status.
503d2be0
AS
1294 if test "$ac_new_set" = set; then
1295 case $ac_new_val in
1296 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
c0d27fcc
MR
1297 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1298 *) ac_arg=$ac_var=$ac_new_val ;;
1299 esac
1300 case " $ac_configure_args " in
1301 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1302 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1303 esac
1304 fi
1305done
1306if $ac_cache_corrupted; then
c0d27fcc 1307 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1308echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1309 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1310echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1311 { (exit 1); exit 1; }; }
ba4481b5
DL
1312fi
1313
1314ac_ext=c
ba4481b5 1315ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
1316ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1317ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1318ac_compiler_gnu=$ac_cv_c_compiler_gnu
1319
c0d27fcc
MR
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
ba4481b5 1336
6bae0ccf
DL
1337
1338 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1339
c0d27fcc 1340
ba5da88a
PJ
1341test "$program_prefix" != NONE &&
1342 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1343# Use a double $ so make ignores it.
1344test "$program_suffix" != NONE &&
1345 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1346# Double any \ or $. echo might interpret backslashes.
1347# By default was `s,x,x', remove it if useless.
1348cat <<\_ACEOF >conftest.sed
1349s/[\\$]/&&/g;s/;s,x,x,$//
1350_ACEOF
1351program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1352rm conftest.sed
1353
c0d27fcc 1354
ba4481b5
DL
1355lispdir='${datadir}/emacs/${version}/lisp'
1356locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1357'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1358lisppath='${locallisppath}:${lispdir}'
1359etcdir='${datadir}/emacs/${version}/etc'
1360archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1361docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1362gamedir='${localstatedir}/games/emacs'
98418dba
CW
1363
1364gameuser=games
1365
c0d27fcc 1366
ba4481b5
DL
1367# Check whether --with-gcc or --without-gcc was given.
1368if test "${with_gcc+set}" = set; then
1369 withval="$with_gcc"
503d2be0
AS
1370
1371fi;
ba4481b5
DL
1372
1373# Check whether --with-pop or --without-pop was given.
1374if test "${with_pop+set}" = set; then
1375 withval="$with_pop"
243cf185 1376 if test "$withval" = yes; then
c0d27fcc 1377 cat >>confdefs.h <<\_ACEOF
ba4481b5 1378#define MAIL_USE_POP 1
c0d27fcc 1379_ACEOF
ba4481b5 1380
243cf185
DL
1381else :
1382fi
3d9fec71 1383else
c0d27fcc 1384 cat >>confdefs.h <<\_ACEOF
3d9fec71 1385#define MAIL_USE_POP 1
c0d27fcc 1386_ACEOF
3d9fec71 1387
503d2be0 1388fi;
ba4481b5 1389
c0d27fcc 1390
a21616bd
KR
1391# Check whether --with-kerberos or --without-kerberos was given.
1392if test "${with_kerberos+set}" = set; then
1393 withval="$with_kerberos"
c0d27fcc 1394 cat >>confdefs.h <<\_ACEOF
a21616bd 1395#define KERBEROS 1
c0d27fcc 1396_ACEOF
a21616bd 1397
503d2be0 1398fi;
a21616bd 1399
c0d27fcc 1400
a21616bd
KR
1401# Check whether --with-kerberos5 or --without-kerberos5 was given.
1402if test "${with_kerberos5+set}" = set; then
1403 withval="$with_kerberos5"
1404 if test "${with_kerberos5+set}" = set; then
1405 if test "${with_kerberos+set}" != set; then
1406 with_kerberos=yes
c0d27fcc 1407 cat >>confdefs.h <<\_ACEOF
a21616bd 1408#define KERBEROS 1
c0d27fcc 1409_ACEOF
a21616bd
KR
1410
1411 fi
1412fi
b936fae4 1413
c0d27fcc 1414cat >>confdefs.h <<\_ACEOF
a21616bd 1415#define KERBEROS5 1
c0d27fcc 1416_ACEOF
a21616bd 1417
503d2be0 1418fi;
a21616bd 1419
ba4481b5
DL
1420# Check whether --with-hesiod or --without-hesiod was given.
1421if test "${with_hesiod+set}" = set; then
1422 withval="$with_hesiod"
b936fae4 1423
c0d27fcc 1424cat >>confdefs.h <<\_ACEOF
ba4481b5 1425#define HESIOD 1
c0d27fcc 1426_ACEOF
ba4481b5 1427
503d2be0 1428fi;
ba4481b5 1429
c0d27fcc 1430
2c9dccc9
PJ
1431# Check whether --with-sound or --without-sound was given.
1432if test "${with_sound+set}" = set; then
1433 withval="$with_sound"
1434
1435fi;
1436
c0d27fcc 1437
ba4481b5
DL
1438# Check whether --with-x-toolkit or --without-x-toolkit was given.
1439if test "${with_x_toolkit+set}" = set; then
1440 withval="$with_x_toolkit"
1441 case "${withval}" in
1442 y | ye | yes ) val=athena ;;
1443 n | no ) val=no ;;
1444 l | lu | luc | luci | lucid ) val=lucid ;;
1445 a | at | ath | athe | athen | athena ) val=athena ;;
1446 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1447 g | gt | gtk ) val=gtk ;;
ba4481b5 1448 * )
c0d27fcc 1449{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1450this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1451Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1452echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1453this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1454Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1455 { (exit 1); exit 1; }; }
ba4481b5
DL
1456 ;;
1457 esac
1458 with_x_toolkit=$val
1459
503d2be0 1460fi;
ba4481b5
DL
1461
1462# Check whether --with-xpm or --without-xpm was given.
1463if test "${with_xpm+set}" = set; then
1464 withval="$with_xpm"
503d2be0
AS
1465
1466fi;
ba4481b5
DL
1467
1468# Check whether --with-jpeg or --without-jpeg was given.
1469if test "${with_jpeg+set}" = set; then
1470 withval="$with_jpeg"
503d2be0
AS
1471
1472fi;
ba4481b5
DL
1473
1474# Check whether --with-tiff or --without-tiff was given.
1475if test "${with_tiff+set}" = set; then
1476 withval="$with_tiff"
503d2be0
AS
1477
1478fi;
ba4481b5
DL
1479
1480# Check whether --with-gif or --without-gif was given.
1481if test "${with_gif+set}" = set; then
1482 withval="$with_gif"
503d2be0
AS
1483
1484fi;
ba4481b5
DL
1485
1486# Check whether --with-png or --without-png was given.
1487if test "${with_png+set}" = set; then
1488 withval="$with_png"
503d2be0
AS
1489
1490fi;
ba4481b5 1491
488dd4c4
JD
1492# Check whether --with-gtk or --without-gtk was given.
1493if test "${with_gtk+set}" = set; then
1494 withval="$with_gtk"
1495
1496fi;
1497
1498# Check whether --with-pkg-config-prog or --without-pkg-config-prog was given.
1499if test "${with_pkg_config_prog+set}" = set; then
1500 withval="$with_pkg_config_prog"
1501
1502fi;
1503
ba4481b5
DL
1504# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1505if test "${with_toolkit_scroll_bars+set}" = set; then
1506 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1507
1508fi;
ba4481b5 1509
1d36487c
GM
1510# Check whether --with-xim or --without-xim was given.
1511if test "${with_xim+set}" = set; then
1512 withval="$with_xim"
1d36487c 1513
503d2be0 1514fi;
ba4481b5 1515
e0f712ba
AC
1516# Check whether --with-carbon or --without-carbon was given.
1517if test "${with_carbon+set}" = set; then
1518 withval="$with_carbon"
1519
1520fi;
6a3a24fa
JD
1521# Check whether --enable-carbon-app or --disable-carbon-app was given.
1522if test "${enable_carbon_app+set}" = set; then
1523 enableval="$enable_carbon_app"
1524 carbon_appdir_x=${enableval}
1525fi;
e0f712ba 1526
d0098f13
JD
1527# Check whether --enable-asserts or --disable-asserts was given.
1528if test "${enable_asserts+set}" = set; then
1529 enableval="$enable_asserts"
1530 USE_XASSERTS=$enableval
1531else
1532 USE_XASSERTS=no
1533fi;
1534
19650fd6
AS
1535# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1536if test "${enable_maintainer_mode+set}" = set; then
1537 enableval="$enable_maintainer_mode"
1538 USE_MAINTAINER_MODE=$enableval
1539else
1540 USE_MAINTAINER_MODE=no
1541fi;
1542if test $USE_MAINTAINER_MODE = yes; then
1543 MAINT=
1544else
1545 MAINT=#
1546fi
1547
1548
9adfabc2
LK
1549# Check whether --enable-locallisppath or --disable-locallisppath was given.
1550if test "${enable_locallisppath+set}" = set; then
1551 enableval="$enable_locallisppath"
1552 if test "${enableval}" = "no"; then
1553 locallisppath=
1554elif test "${enableval}" != "yes"; then
1555 locallisppath=${enableval}
1556fi
1557fi;
1558
ba4481b5 1559#### Make srcdir absolute, if it isn't already. It's important to
17494071 1560#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1561#### give you automounter prefixes, which can go away. We do all this
1562#### so Emacs can find its files when run uninstalled.
17494071
GM
1563## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1564unset CDPATH
ba4481b5
DL
1565case "${srcdir}" in
1566 /* ) ;;
1567 . )
1568 ## We may be able to use the $PWD environment variable to make this
1569 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
1570 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1571 ## but that tested only for a well-formed and valid PWD,
1572 ## it did not object when PWD was well-formed and valid but just wrong.
1573 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
1574 then
1575 srcdir="$PWD"
1576 else
1577 srcdir="`(cd ${srcdir}; pwd)`"
1578 fi
1579 ;;
1580 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1581esac
1582
1583#### Check if the source directory already has a configured system in it.
1584if test `pwd` != `(cd ${srcdir} && pwd)` \
1585 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 1586 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1587 as a build directory right now; it has been configured in its own
1588 right. To configure in another directory as well, you MUST
1589 use GNU make. If you do not have GNU make, then you must
1590 now do \`make distclean' in ${srcdir},
1591 and then run $0 again." >&5
1592echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1593 as a build directory right now; it has been configured in its own
1594 right. To configure in another directory as well, you MUST
1595 use GNU make. If you do not have GNU make, then you must
1596 now do \`make distclean' in ${srcdir},
503d2be0 1597 and then run $0 again." >&2;}
ba4481b5
DL
1598fi
1599
1600#### Given the configuration name, set machfile and opsysfile to the
1601#### names of the m/*.h and s/*.h files we should use.
1602
1603### Canonicalize the configuration name.
1604
1605ac_aux_dir=
1606for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1607 if test -f $ac_dir/install-sh; then
1608 ac_aux_dir=$ac_dir
1609 ac_install_sh="$ac_aux_dir/install-sh -c"
1610 break
1611 elif test -f $ac_dir/install.sh; then
1612 ac_aux_dir=$ac_dir
1613 ac_install_sh="$ac_aux_dir/install.sh -c"
1614 break
503d2be0
AS
1615 elif test -f $ac_dir/shtool; then
1616 ac_aux_dir=$ac_dir
1617 ac_install_sh="$ac_aux_dir/shtool install -c"
1618 break
ba4481b5
DL
1619 fi
1620done
1621if test -z "$ac_aux_dir"; then
c0d27fcc 1622 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1623echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1624 { (exit 1); exit 1; }; }
ba4481b5 1625fi
503d2be0
AS
1626ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1627ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1628ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1629
1630# Make sure we can run config.sub.
503d2be0 1631$ac_config_sub sun4 >/dev/null 2>&1 ||
c0d27fcc 1632 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1633echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1634 { (exit 1); exit 1; }; }
1635
c0d27fcc 1636echo "$as_me:$LINENO: checking build system type" >&5
503d2be0
AS
1637echo $ECHO_N "checking build system type... $ECHO_C" >&6
1638if test "${ac_cv_build+set}" = set; then
1639 echo $ECHO_N "(cached) $ECHO_C" >&6
1640else
1641 ac_cv_build_alias=$build_alias
1642test -z "$ac_cv_build_alias" &&
1643 ac_cv_build_alias=`$ac_config_guess`
1644test -z "$ac_cv_build_alias" &&
c0d27fcc 1645 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1646echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1647 { (exit 1); exit 1; }; }
1648ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
c0d27fcc
MR
1649 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1650echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
503d2be0
AS
1651 { (exit 1); exit 1; }; }
1652
1653fi
c0d27fcc 1654echo "$as_me:$LINENO: result: $ac_cv_build" >&5
503d2be0
AS
1655echo "${ECHO_T}$ac_cv_build" >&6
1656build=$ac_cv_build
1657build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1658build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1659build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1660
c0d27fcc
MR
1661
1662echo "$as_me:$LINENO: checking host system type" >&5
503d2be0
AS
1663echo $ECHO_N "checking host system type... $ECHO_C" >&6
1664if test "${ac_cv_host+set}" = set; then
1665 echo $ECHO_N "(cached) $ECHO_C" >&6
1666else
1667 ac_cv_host_alias=$host_alias
1668test -z "$ac_cv_host_alias" &&
1669 ac_cv_host_alias=$ac_cv_build_alias
1670ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
c0d27fcc 1671 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1672echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1673 { (exit 1); exit 1; }; }
1674
1675fi
c0d27fcc 1676echo "$as_me:$LINENO: result: $ac_cv_host" >&5
503d2be0
AS
1677echo "${ECHO_T}$ac_cv_host" >&6
1678host=$ac_cv_host
1679host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1680host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1681host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5 1682
c0d27fcc 1683
ba4481b5 1684canonical=$host
531a3336 1685configuration=${host_alias-$host}
ba4481b5 1686
c0d27fcc 1687
22044edf 1688
ba4481b5
DL
1689### If you add support for a new configuration, add code to this
1690### switch statement to recognize your configuration name and select
1691### the appropriate operating system and machine description files.
1692
1693### You would hope that you could choose an m/*.h file pretty much
1694### based on the machine portion of the configuration name, and an s-
1695### file based on the operating system portion. However, it turns out
1696### that each m/*.h file is pretty manufacturer-specific - for
1697### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1698### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1699### machines. So we basically have to have a special case for each
1700### configuration name.
1701###
1702### As far as handling version numbers on operating systems is
1703### concerned, make sure things will fail in a fixable way. If
1704### /etc/MACHINES doesn't say anything about version numbers, be
1705### prepared to handle anything reasonably. If version numbers
1706### matter, be sure /etc/MACHINES says something about it.
1707###
1708### Eric Raymond says we should accept strings like "sysvr4" to mean
1709### "System V Release 4"; he writes, "The old convention encouraged
1710### confusion between `system' and `release' levels'."
1711
1712machine='' opsys='' unported=no
1713case "${canonical}" in
1714
1096bcc0
GM
1715 ## FreeBSD ports
1716 *-*-freebsd* )
1717 opsys=freebsd
1718 case "${canonical}" in
1719 alpha*-*-freebsd*) machine=alpha ;;
1720 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 1721 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
1722 esac
1723 ;;
1724
ba4481b5
DL
1725 ## NetBSD ports
1726 *-*-netbsd* )
1727 opsys=netbsd
dd038e26 1728 if test -f /usr/lib/crti.o; then
f57bd967
DL
1729
1730cat >>confdefs.h <<\_ACEOF
1731#define HAVE_CRTIN
dd038e26
AS
1732_ACEOF
1733
1734 fi
1735
ba4481b5
DL
1736 case "${canonical}" in
1737 alpha*-*-netbsd*) machine=alpha ;;
1738 i[3456]86-*-netbsd*) machine=intel386 ;;
1739 m68k-*-netbsd*)
1740 # This is somewhat bogus.
1741 machine=hp9000s300 ;;
1742 powerpc-apple-netbsd*) machine=macppc ;;
1743 mips-*-netbsd*) machine=pmax ;;
2df636f4 1744 mipsel-*-netbsd*) machine=pmax ;;
97836269 1745 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 1746 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1747 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1748 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1749 vax-*-netbsd*) machine=vax ;;
2df636f4 1750 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1751 esac
1752 ;;
1753
1754 ## OpenBSD ports
1755 *-*-openbsd* )
1756 opsys=openbsd
1757 case "${canonical}" in
1758 alpha*-*-openbsd*) machine=alpha ;;
1759 i386-*-openbsd*) machine=intel386 ;;
1760 m68k-*-openbsd*) machine=hp9000s300 ;;
1761 mipsel-*-openbsd*) machine=pmax ;;
1762 ns32k-*-openbsd*) machine=ns32000 ;;
1763 sparc-*-openbsd*) machine=sparc ;;
1764 vax-*-openbsd*) machine=vax ;;
1765 esac
1766 ;;
1767
10a3b1a1
EZ
1768 ## LynxOS ports
1769 *-*-lynxos* )
1770 opsys=lynxos
1771 case "${canonical}" in
1772 i[3456]86-*-lynxos*) machine=intel386 ;;
1773 powerpc-*-lynxos*) machine=powerpc ;;
1774 esac
1775 ;;
1776
ba4481b5
DL
1777 ## Acorn RISCiX:
1778 arm-acorn-riscix1.1* )
1779 machine=acorn opsys=riscix1-1
1780 ;;
1781 arm-acorn-riscix1.2* | arm-acorn-riscix )
1782 ## This name is riscix12 instead of riscix1.2
1783 ## to avoid a file name conflict on MSDOS.
1784 machine=acorn opsys=riscix12
1785 ;;
1786
1787 ## BSDI ports
1788 *-*-bsdi* )
1789 opsys=bsdi
1790 case "${canonical}" in
1791 i[345]86-*-bsdi*) machine=intel386 ;;
1792 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1793 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1794 esac
1795 case "${canonical}" in
1796 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1797 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1798 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1799 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1800 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1801 esac
1802 ;;
1803
1804 ## Alliant machines
1805 ## Strictly speaking, we need the version of the alliant operating
1806 ## system to choose the right machine file, but currently the
1807 ## configuration name doesn't tell us enough to choose the right
1808 ## one; we need to give alliants their own operating system name to
1809 ## do this right. When someone cares, they can help us.
1810 fx80-alliant-* )
1811 machine=alliant4 opsys=bsd4-2
1812 ;;
1813 i860-alliant-* )
1814 machine=alliant-2800 opsys=bsd4-3
1815 ;;
1816
1817 ## Alpha (DEC) machines.
1818 alpha*-dec-osf* )
1819 machine=alpha opsys=osf1
1820 # This is needed to find X11R6.1 libraries for certain tests.
1821 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1822 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1823 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1824 # due to non-traditional preprocessing with the current compiler
1825 # defaults. OSF 4 can also have that compiler version, and there
1826 # seems always to have been a usable /usr/bin/cpp.
1827 NON_GNU_CPP=/usr/bin/cpp
ca512671 1828 case "${canonical}" in
a55b799a 1829 alpha*-dec-osf[5-9]*)
bb17930d 1830 opsys=osf5-0 ;;
ca512671 1831 esac
ba4481b5
DL
1832 ;;
1833
1834 alpha*-*-linux-gnu* )
1835 machine=alpha opsys=gnu-linux
1836 ;;
1837
c4bb2108
DL
1838 arm*-*-linux-gnu* )
1839 machine=arm opsys=gnu-linux
1840 ;;
1841
ba4481b5
DL
1842 ## Altos 3068
1843 m68*-altos-sysv* )
1844 machine=altos opsys=usg5-2
1845 ;;
1846
1847 ## Amdahl UTS
1848 580-amdahl-sysv* )
1849 machine=amdahl opsys=usg5-2-2
1850 ;;
1851
1852 ## Apollo, Domain/OS
1853 m68*-apollo-* )
1854 machine=apollo opsys=bsd4-3
1855 ;;
1856
1857 ## AT&T 3b2, 3b5, 3b15, 3b20
1858 we32k-att-sysv* )
1859 machine=att3b opsys=usg5-2-2
1860 ;;
1861
1862 ## AT&T 3b1 - The Mighty Unix PC!
1863 m68*-att-sysv* )
1864 machine=7300 opsys=usg5-2-2
1865 ;;
1866
1867 ## Bull dpx20
1868 rs6000-bull-bosx* )
1869 machine=ibmrs6000 opsys=aix3-2
1870 ;;
1871
1872 ## Bull dpx2
1873 m68*-bull-sysv3* )
1874 machine=dpx2 opsys=usg5-3
1875 ;;
1876
1877 ## Bull sps7
1878 m68*-bull-sysv2* )
1879 machine=sps7 opsys=usg5-2
1880 ;;
1881
1882 ## CCI 5/32, 6/32 -- see "Tahoe".
1883
1884 ## Celerity
1885 ## I don't know what configuration name to use for this; config.sub
1886 ## doesn't seem to know anything about it. Hey, Celerity users, get
1887 ## in touch with us!
1888 celerity-celerity-bsd* )
1889 machine=celerity opsys=bsd4-2
1890 ;;
1891
1892 ## Clipper
1893 ## What operating systems does this chip run that Emacs has been
1894 ## tested on?
1895 clipper-* )
1896 machine=clipper
1897 ## We'll use the catch-all code at the bottom to guess the
1898 ## operating system.
1899 ;;
1900
df645f7c
AS
1901 ## Compaq Nonstop
1902 mips-compaq-nonstopux* )
1903 machine=nonstopux opsys=nonstopux
1904 ;;
1905
ba4481b5
DL
1906 ## Convex
1907 *-convex-bsd* | *-convex-convexos* )
1908 machine=convex opsys=bsd4-3
1909 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1910 NON_GNU_CPP="cc -E -P"
1911 ;;
1912
1913 ## Cubix QBx/386
1914 i[3456]86-cubix-sysv* )
1915 machine=intel386 opsys=usg5-3
1916 ;;
1917
1918 ## Cydra 5
1919 cydra*-cydrome-sysv* )
1920 machine=cydra5 opsys=usg5-3
1921 ;;
1922
1923 ## Data General AViiON Machines
1924 ## DG changed naming conventions with the release of 5.4.4.10, they
1925 ## dropped the initial 5.4 but left the intervening R. Because of the
1926 ## R this shouldn't conflict with older versions of the OS (which I
1927 ## think were named like dgux4.*). In addition, DG new AViiONs series
1928 ## uses either Motorola M88k or Intel Pentium CPUs.
1929 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1930 machine=aviion opsys=dgux4
1931 ;;
1932 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1933 ## This name is dgux5-4-3 instead of dgux5-4r3
1934 ## to avoid a file name conflict on MSDOS.
1935 machine=aviion opsys=dgux5-4-3
1936 ;;
1937 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1938 machine=aviion opsys=dgux5-4r2
1939 ;;
1940 m88k-dg-dgux* )
1941 machine=aviion opsys=dgux
1942 ;;
1943
1944 ## Data General AViiON Intel (x86) Machines
1945 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1946 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1947 i[345]86-dg-dguxR4* )
1948 machine=aviion-intel opsys=dgux4
1949 ;;
1950
1951 ## DECstations
1952 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1953 machine=pmax opsys=bsd4-2
1954 ;;
1955 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1956 machine=pmax opsys=bsd4-3
1957 ;;
1958 mips-dec-ultrix* )
1959 machine=pmax opsys=ultrix4-3
1960 ;;
1961 mips-dec-osf* )
1962 machine=pmax opsys=osf1
1963 ;;
1964 mips-dec-mach_bsd4.3* )
1965 machine=pmax opsys=mach-bsd4-3
1966 ;;
1967
cd890796
JD
1968 ## Motorola Delta machines
1969 m68k-motorola-sysv* | m68000-motorola-sysv* )
1970 machine=delta opsys=usg5-3
1971 if test -z "`type gnucc | grep 'not found'`"
1972 then
1973 if test -s /etc/167config
1974 then CC="gnucc -m68040"
1975 else CC="gnucc -m68881"
1976 fi
1977 else
1978 if test -z "`type gcc | grep 'not found'`"
1979 then CC=gcc
1980 else CC=cc
1981 fi
1982 fi
1983 ;;
ba4481b5
DL
1984 m88k-motorola-sysv4* )
1985 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1986 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1987 # I hope there are not other 4.0 versions for this machine
1988 # which really need usg5-4 instead.
1989 machine=delta88k opsys=usg5-4-2
1990 ;;
1991 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1992 machine=delta88k opsys=usg5-3
1993 ;;
1994
1995 ## Dual machines
1996 m68*-dual-sysv* )
1997 machine=dual opsys=usg5-2
1998 ;;
1999 m68*-dual-uniplus* )
2000 machine=dual opsys=unipl5-2
2001 ;;
2002
2003 ## Elxsi 6400
2004 elxsi-elxsi-sysv* )
2005 machine=elxsi opsys=usg5-2
2006 ;;
2007
2008 ## Encore machines
2009 ns16k-encore-bsd* )
2010 machine=ns16000 opsys=umax
2011 ;;
2012
65171e3a
DL
2013 ## The GEC 63 - apparently, this port isn't really finished yet.
2014 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
2015
2016 ## Gould Power Node and NP1
2017 pn-gould-bsd4.2* )
2018 machine=gould opsys=bsd4-2
2019 ;;
2020 pn-gould-bsd4.3* )
2021 machine=gould opsys=bsd4-3
2022 ;;
2023 np1-gould-bsd* )
2024 machine=gould-np1 opsys=bsd4-3
2025 ;;
2026
2027 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2028 ## as far as Emacs is concerned).
2029 m88k-harris-cxux* )
2030 # Build needs to be different on 7.0 and later releases
2031 case "`uname -r`" in
2032 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2033 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2034 esac
2035 NON_GNU_CPP="/lib/cpp"
2036 ;;
2037 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2038 m68k-harris-cxux* )
2039 machine=nh3000 opsys=cxux
2040 ;;
2041 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2042 powerpc-harris-powerunix )
2043 machine=nh6000 opsys=powerunix
2044 NON_GNU_CPP="cc -Xo -E -P"
2045 ;;
2046 ## SR2001/SR2201 running HI-UX/MPP
2047 hppa1.1-hitachi-hiuxmpp* )
2048 machine=sr2k opsys=hiuxmpp
2049 ;;
89a336fa
GM
2050 hppa1.1-hitachi-hiuxwe2* )
2051 machine=sr2k opsys=hiuxwe2
2052 ;;
ba4481b5
DL
2053 ## Honeywell XPS100
2054 xps*-honeywell-sysv* )
2055 machine=xps100 opsys=usg5-2
2056 ;;
2057
2058 ## HP 9000 series 200 or 300
2059 m68*-hp-bsd* )
2060 machine=hp9000s300 opsys=bsd4-3
2061 ;;
2062 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2063 m68*-hp-hpux* )
2064 case "`uname -r`" in
2065 ## Someone's system reports A.B8.05 for this.
2066 ## I wonder what other possibilities there are.
2067 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2068 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2069 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2070 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2071 *) machine=hp9000s300 opsys=hpux ;;
2072 esac
2073 ;;
2074
2075 ## HP 9000 series 700 and 800, running HP/UX
2076 hppa*-hp-hpux7* )
2077 machine=hp800 opsys=hpux
2078 ;;
2079 hppa*-hp-hpux8* )
2080 machine=hp800 opsys=hpux8
2081 ;;
2082 hppa*-hp-hpux9shr* )
2083 machine=hp800 opsys=hpux9shr
2084 ;;
2085 hppa*-hp-hpux9* )
2086 machine=hp800 opsys=hpux9
2087 ;;
b0e44248
RB
2088 hppa*-hp-hpux10.2* )
2089 machine=hp800 opsys=hpux10-20
2090 ;;
cc227489 2091 hppa*-hp-hpux10* )
ba4481b5
DL
2092 machine=hp800 opsys=hpux10
2093 ;;
cc227489
MB
2094 hppa*-hp-hpux1[1-9]* )
2095 machine=hp800 opsys=hpux11
7c00e1e9 2096 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
cc227489 2097 ;;
ba4481b5 2098
409d9577
GM
2099 hppa*-*-linux-gnu* )
2100 machine=hp800 opsys=gnu-linux
2101 ;;
2102
ba4481b5
DL
2103 ## HP 9000 series 700 and 800, running HP/UX
2104 hppa*-hp-hpux* )
2105 ## Cross-compilation? Nah!
2106 case "`uname -r`" in
2107 ## Someone's system reports A.B8.05 for this.
2108 ## I wonder what other possibilities there are.
2109 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2110 *.08.* ) machine=hp800 opsys=hpux8 ;;
2111 *.09.* ) machine=hp800 opsys=hpux9 ;;
2112 *) machine=hp800 opsys=hpux10 ;;
2113 esac
2114 ;;
2115 hppa*-*-nextstep* )
2116 machine=hp800 opsys=nextstep
2117 ;;
2118
2119 ## Orion machines
2120 orion-orion-bsd* )
2121 machine=orion opsys=bsd4-2
2122 ;;
2123 clipper-orion-bsd* )
2124 machine=orion105 opsys=bsd4-2
2125 ;;
2126
2127 ## IBM machines
2128 i[3456]86-ibm-aix1.1* )
2129 machine=ibmps2-aix opsys=usg5-2-2
2130 ;;
2131 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2132 machine=ibmps2-aix opsys=usg5-3
2133 ;;
2134 i370-ibm-aix*)
2135 machine=ibm370aix opsys=usg5-3
2136 ;;
55597d70 2137 s390-*-linux-gnu* )
138f0859
GM
2138 machine=ibms390 opsys=gnu-linux
2139 ;;
bcdb1378
EZ
2140 s390x-*-linux-gnu* )
2141 machine=ibms390x opsys=gnu-linux
2142 ;;
ba4481b5
DL
2143 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2144 machine=ibmrs6000 opsys=aix3-1
2145 ;;
2146 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2147 machine=ibmrs6000 opsys=aix3-2-5
2148 ;;
2149 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2150 machine=ibmrs6000 opsys=aix4-1
2151 ;;
2152 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2153 machine=ibmrs6000 opsys=aix4-2
2154 ;;
55597d70 2155 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2156 machine=ibmrs6000 opsys=aix4-2
2157 ;;
ba4481b5
DL
2158 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2159 machine=ibmrs6000 opsys=aix4
2160 ;;
2161 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2162 machine=ibmrs6000 opsys=aix4-1
2163 ;;
2164 rs6000-ibm-aix* | powerpc-ibm-aix* )
2165 machine=ibmrs6000 opsys=aix3-2
2166 ;;
2167 romp-ibm-bsd4.3* )
2168 machine=ibmrt opsys=bsd4-3
2169 ;;
2170 romp-ibm-bsd4.2* )
2171 machine=ibmrt opsys=bsd4-2
2172 ;;
2173 romp-ibm-aos4.3* )
2174 machine=ibmrt opsys=bsd4-3
2175 ;;
2176 romp-ibm-aos4.2* )
2177 machine=ibmrt opsys=bsd4-2
2178 ;;
2179 romp-ibm-aos* )
2180 machine=ibmrt opsys=bsd4-3
2181 ;;
2182 romp-ibm-bsd* )
2183 machine=ibmrt opsys=bsd4-3
2184 ;;
2185 romp-ibm-aix* )
2186 machine=ibmrt-aix opsys=usg5-2-2
2187 ;;
2188
2189 ## Integrated Solutions `Optimum V'
2190 m68*-isi-bsd4.2* )
2191 machine=isi-ov opsys=bsd4-2
2192 ;;
2193 m68*-isi-bsd4.3* )
2194 machine=isi-ov opsys=bsd4-3
2195 ;;
2196
2197 ## Intel 386 machines where we do care about the manufacturer
2198 i[3456]86-intsys-sysv* )
2199 machine=is386 opsys=usg5-2-2
2200 ;;
2201
2202 ## Prime EXL
2203 i[3456]86-prime-sysv* )
2204 machine=i386 opsys=usg5-3
2205 ;;
2206
2207 ## Sequent Symmetry running Dynix
2208 i[3456]86-sequent-bsd* )
2209 machine=symmetry opsys=bsd4-3
2210 ;;
2211
2212 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2213 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2214 machine=sequent-ptx opsys=ptx4
2215 NON_GNU_CPP=/lib/cpp
2216 ;;
2217
2218 ## Sequent Symmetry running DYNIX/ptx
2219 ## Use the old cpp rather than the newer ANSI one.
2220 i[3456]86-sequent-ptx* )
2221 machine=sequent-ptx opsys=ptx
2222 NON_GNU_CPP="/lib/cpp"
2223 ;;
2224
2225 ## ncr machine running svr4.3.
2226 i[3456]86-ncr-sysv4.3 )
2227 machine=ncr386 opsys=usg5-4-3
2228 ;;
2229
2230 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2231 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2232 i[3456]86-ncr-sysv* )
2233 machine=ncr386 opsys=usg5-4-2
2234 ;;
2235
2236 ## Intel Paragon OSF/1
2237 i860-intel-osf1* )
2238 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2239 ;;
2240
2241 ## Intel 860
2242 i860-*-sysv4* )
2243 machine=i860 opsys=usg5-4
2244 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2245 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2246 ;;
2247
c76e04a8
GM
2248 ## Macintosh PowerPC
2249 powerpc*-*-linux-gnu* )
2250 machine=macppc opsys=gnu-linux
2251 ;;
2252
ba4481b5
DL
2253 ## Masscomp machines
2254 m68*-masscomp-rtu* )
2255 machine=masscomp opsys=rtu
2256 ;;
2257
2258 ## Megatest machines
2259 m68*-megatest-bsd* )
2260 machine=mega68 opsys=bsd4-2
2261 ;;
2262
2263 ## Workstations sold by MIPS
2264 ## This is not necessarily all workstations using the MIPS processor -
2265 ## Irises are produced by SGI, and DECstations by DEC.
2266
2267 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2268 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2269 ## it gives for choosing between the alternatives seems to be "Use
2270 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2271 ## the BSD world." I'll assume that these are instructions for
2272 ## handling two odd situations, and that every other situation
2273 ## should use mips.h and usg5-2-2, they being listed first.
2274 mips-mips-usg* )
2275 machine=mips4
2276 ## Fall through to the general code at the bottom to decide on the OS.
2277 ;;
2278 mips-mips-riscos4* )
2279 machine=mips4 opsys=bsd4-3
2280 NON_GNU_CC="cc -systype bsd43"
2281 NON_GNU_CPP="cc -systype bsd43 -E"
2282 ;;
2283 mips-mips-riscos5* )
2284 machine=mips4 opsys=riscos5
2285 NON_GNU_CC="cc -systype bsd43"
2286 NON_GNU_CPP="cc -systype bsd43 -E"
2287 ;;
2288 mips-mips-bsd* )
2289 machine=mips opsys=bsd4-3
2290 ;;
2291 mips-mips-* )
2292 machine=mips opsys=usg5-2-2
2293 ;;
2294
2295 ## NeXT
2296 m68*-next-* | m68k-*-nextstep* )
2297 machine=m68k opsys=nextstep
2298 ;;
2299
2300 ## The complete machine from National Semiconductor
2301 ns32k-ns-genix* )
2302 machine=ns32000 opsys=usg5-2
2303 ;;
2304
2305 ## NCR machines
2306 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2307 machine=tower32 opsys=usg5-2-2
2308 ;;
2309 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2310 machine=tower32v3 opsys=usg5-3
2311 ;;
2312
2313 ## NEC EWS4800
2314 mips-nec-sysv4*)
2315 machine=ews4800 opsys=ux4800
2316 ;;
2317
2318 ## Nixdorf Targon 31
2319 m68*-nixdorf-sysv* )
2320 machine=targon31 opsys=usg5-2-2
2321 ;;
2322
2323 ## Nu (TI or LMI)
2324 m68*-nu-sysv* )
2325 machine=nu opsys=usg5-2
2326 ;;
2327
2328 ## Plexus
2329 m68*-plexus-sysv* )
2330 machine=plexus opsys=usg5-2
2331 ;;
2332
ba4481b5
DL
2333 ## Pyramid machines
2334 ## I don't really have any idea what sort of processor the Pyramid has,
2335 ## so I'm assuming it is its own architecture.
2336 pyramid-pyramid-bsd* )
2337 machine=pyramid opsys=bsd4-2
2338 ;;
2339
2340 ## Sequent Balance
2341 ns32k-sequent-bsd4.2* )
2342 machine=sequent opsys=bsd4-2
2343 ;;
2344 ns32k-sequent-bsd4.3* )
2345 machine=sequent opsys=bsd4-3
2346 ;;
2347
2348 ## Siemens Nixdorf
2349 mips-siemens-sysv* | mips-sni-sysv*)
2350 machine=mips-siemens opsys=usg5-4
2351 NON_GNU_CC=/usr/ccs/bin/cc
2352 NON_GNU_CPP=/usr/ccs/lib/cpp
2353 ;;
2354
2355 ## Silicon Graphics machines
2356 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2357 m68*-sgi-iris3.5* )
2358 machine=irist opsys=iris3-5
2359 ;;
2360 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2361 machine=irist opsys=iris3-6
2362 ;;
2363 ## Iris 4D
2364 mips-sgi-irix3* )
2365 machine=iris4d opsys=irix3-3
2366 ;;
2367 mips-sgi-irix4* )
2368 machine=iris4d opsys=irix4-0
2369 ;;
2370 mips-sgi-irix6.5 )
2371 machine=iris4d opsys=irix6-5
946173ad
DL
2372 # Without defining _LANGUAGE_C, things get masked out in the headers
2373 # so that, for instance, grepping for `free' in stdlib.h fails and
2374 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2375 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2376 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2377 ;;
2378 mips-sgi-irix6* )
2379 machine=iris4d opsys=irix6-0
c4bb2108 2380 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2381 # but presumably it does no harm.
2382 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2383 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2384 NON_GCC_TEST_OPTIONS=-32
2385 ;;
2386 mips-sgi-irix5.[01]* )
2387 machine=iris4d opsys=irix5-0
2388 ;;
2389 mips-sgi-irix5* | mips-sgi-irix* )
2390 machine=iris4d opsys=irix5-2
2391 ;;
2392
2393 ## SONY machines
2394 m68*-sony-bsd4.2* )
2395 machine=news opsys=bsd4-2
2396 ;;
2397 m68*-sony-bsd4.3* )
2398 machine=news opsys=bsd4-3
2399 ;;
2400 m68*-sony-newsos3* | m68*-sony-news3*)
2401 machine=news opsys=bsd4-3
2402 ;;
2403 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2404 machine=news-risc opsys=bsd4-3
2405 ;;
2406 mips-sony-newsos6* )
2407 machine=news-r6 opsys=newsos6
2408 ;;
2409 mips-sony-news* )
2410 machine=news-risc opsys=newsos5
2411 ;;
2412
2413 ## Stride
2414 m68*-stride-sysv* )
2415 machine=stride opsys=usg5-2
2416 ;;
2417
2418 ## Suns
2419 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2420 machine=sparc opsys=gnu-linux
2421 ;;
2422
d054101f 2423 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2424 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2425 | rs6000-*-solaris2*)
2426 case "${canonical}" in
2427 m68*-sunos1* ) machine=sun1 ;;
2428 m68*-sunos2* ) machine=sun2 ;;
2429 m68* ) machine=sun3 ;;
2430 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2431 i[3456]86-*-* ) machine=intel386 ;;
2432 powerpcle* ) machine=powerpcle ;;
2433 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2434 sparc* ) machine=sparc ;;
2435 * ) unported=yes ;;
2436 esac
2437 case "${canonical}" in
2438 ## The Sun386 didn't get past 4.0.
2439 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2440 *-sunos4.0* ) opsys=sunos4-0 ;;
2441 *-sunos4.1.[3-9]*noshare )
2442 ## This name is sunos413 instead of sunos4-1-3
2443 ## to avoid a file name conflict on MSDOS.
2444 opsys=sunos413
2445 NON_GNU_CPP=/usr/lib/cpp
2446 NON_GCC_TEST_OPTIONS=-Bstatic
2447 GCC_TEST_OPTIONS=-static
2448 ;;
2449 *-sunos4.1.[3-9]* | *-sunos4shr*)
2450 opsys=sunos4shr
2451 NON_GNU_CPP=/usr/lib/cpp
2452 ;;
2453 *-sunos4* | *-sunos )
2454 opsys=sunos4-1
2455 NON_GCC_TEST_OPTIONS=-Bstatic
2456 GCC_TEST_OPTIONS=-static
2457 ;;
2458 *-sunos5.3* | *-solaris2.3* )
2459 opsys=sol2-3
2460 NON_GNU_CPP=/usr/ccs/lib/cpp
2461 ;;
2462 *-sunos5.4* | *-solaris2.4* )
2463 opsys=sol2-4
2464 NON_GNU_CPP=/usr/ccs/lib/cpp
2465 RANLIB="ar -ts"
2466 ;;
2467 *-sunos5.5* | *-solaris2.5* )
2468 opsys=sol2-5
2469 NON_GNU_CPP=/usr/ccs/lib/cpp
2470 RANLIB="ar -ts"
2471 ;;
8e967cf7
MR
2472 *-sunos5.6* | *-solaris2.6* )
2473 opsys=sol2-6
2474 NON_GNU_CPP=/usr/ccs/lib/cpp
2475 RANLIB="ar -ts"
2476 ;;
ba4481b5 2477 *-sunos5* | *-solaris* )
9e71690e 2478 opsys=sol2-6
ba4481b5
DL
2479 NON_GNU_CPP=/usr/ccs/lib/cpp
2480 ;;
2481 * ) opsys=bsd4-2 ;;
2482 esac
2483 ## Watch out for a compiler that we know will not work.
2484 case "${canonical}" in
2485 *-solaris* | *-sunos5* )
2486 if [ "x$CC" = x/usr/ucb/cc ]; then
2487 ## /usr/ucb/cc doesn't work;
2488 ## we should find some other compiler that does work.
2489 unset CC
2490 fi
2491 ;;
2492 *) ;;
2493 esac
2494 ;;
2495 sparc-*-nextstep* )
2496 machine=sparc opsys=nextstep
2497 ;;
2498
2499 ## Tadpole 68k
2500 m68*-tadpole-sysv* )
2501 machine=tad68k opsys=usg5-3
2502 ;;
2503
2504 ## Tahoe machines
2505 tahoe-tahoe-bsd4.2* )
2506 machine=tahoe opsys=bsd4-2
2507 ;;
2508 tahoe-tahoe-bsd4.3* )
2509 machine=tahoe opsys=bsd4-3
2510 ;;
2511
2512 ## Tandem Integrity S2
2513 mips-tandem-sysv* )
2514 machine=tandem-s2 opsys=usg5-3
2515 ;;
2516
2517 ## Tektronix XD88
2518 m88k-tektronix-sysv3* )
2519 machine=tekxd88 opsys=usg5-3
2520 ;;
2521
2522 ## Tektronix 16000 box (6130?)
2523 ns16k-tektronix-bsd* )
2524 machine=ns16000 opsys=bsd4-2
2525 ;;
2526 ## Tektronix 4300
2527 ## src/m/tek4300.h hints that this is a m68k machine.
2528 m68*-tektronix-bsd* )
2529 machine=tek4300 opsys=bsd4-3
2530 ;;
2531
2532 ## Titan P2 or P3
2533 ## We seem to have lost the machine-description file titan.h!
2534 titan-titan-sysv* )
2535 machine=titan opsys=usg5-3
2536 ;;
2537
2538 ## Ustation E30 (SS5E)
2539 m68*-unisys-uniplus* )
2540 machine=ustation opsystem=unipl5-2
2541 ;;
2542
2543 ## Vaxen.
2544 vax-dec-* )
2545 machine=vax
2546 case "${canonical}" in
2547 *-bsd4.1* ) opsys=bsd4-1 ;;
2548 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2549 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2550 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2551 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2552 *-vms* ) opsys=vms ;;
2553 * ) unported=yes
2554 esac
2555 ;;
2556
2557 ## Whitechapel MG1
2558 ns16k-whitechapel-* )
2559 machine=mg1
2560 ## We don't know what sort of OS runs on these; we'll let the
2561 ## operating system guessing code below try.
2562 ;;
2563
2564 ## Wicat
2565 m68*-wicat-sysv* )
2566 machine=wicat opsys=usg5-2
2567 ;;
2568
f4988be7
GM
2569 ## IA-64
2570 ia64*-*-linux* )
2571 machine=ia64 opsys=gnu-linux
2572 ;;
2573
ba4481b5
DL
2574 ## Intel 386 machines where we don't care about the manufacturer
2575 i[3456]86-*-* )
2576 machine=intel386
2577 case "${canonical}" in
c60ee5e7 2578 *-cygwin ) opsys=cygwin ;;
eae54018 2579 *-darwin* ) opsys=darwin
23fd4483
ST
2580 CPP="${CC-cc} -E -no-cpp-precomp"
2581 ;;
ba4481b5
DL
2582 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2583 *-isc2.2* ) opsys=isc2-2 ;;
2584 *-isc4.0* ) opsys=isc4-0 ;;
2585 *-isc4.* ) opsys=isc4-1
2586 GCC_TEST_OPTIONS=-posix
2587 NON_GCC_TEST_OPTIONS=-Xp
2588 ;;
2589 *-isc* ) opsys=isc3-0 ;;
2590 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2591 *-esix* ) opsys=esix ;;
2592 *-xenix* ) opsys=xenix ;;
2593 *-linux-gnu* ) opsys=gnu-linux ;;
2594 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2595 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2596 NON_GNU_CPP=/lib/cpp
2597 # Prevent -belf from being passed to $CPP.
2598 # /lib/cpp does not accept it.
2599 OVERRIDE_CPPFLAGS=" "
2600 ;;
2601 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2602 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2603 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2604 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2605 *-nextstep* ) opsys=nextstep ;;
2606 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2607 esac
2608 ;;
2609
2610 ## m68k Linux-based GNU system
2611 m68k-*-linux-gnu* )
2612 machine=m68k opsys=gnu-linux
2613 ;;
2614
2615 ## Mips Linux-based GNU system
cd958eb3 2616 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2617 machine=mips opsys=gnu-linux
2618 ;;
2619
2620 ## UXP/DS
2621 sparc-fujitsu-sysv4* )
2622 machine=sparc opsys=uxpds
2623 NON_GNU_CPP=/usr/ccs/lib/cpp
2624 RANLIB="ar -ts"
2625 ;;
2626
2627 ## UXP/V
2628 f301-fujitsu-uxpv4.1)
2629 machine=f301 opsys=uxpv
2630 ;;
2631
e0f712ba
AC
2632 ## Darwin / Mac OS X
2633 powerpc-apple-darwin* )
2634 machine=powermac opsys=darwin
2635 # Define CPP as follows to make autoconf work correctly.
2a75d75d 2636 CPP="${CC-cc} -E -no-cpp-precomp"
8ae52ca6
RF
2637 # Use fink packages if available.
2638 if test -d /sw/include && test -d /sw/lib; then
2639 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2640 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2641 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2642 fi
e0f712ba
AC
2643 ;;
2644
598a2813
AS
2645 ## AMD x86-64 Linux-based GNU system
2646 x86_64-*-linux-gnu* )
24b01ec4 2647 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2648 ;;
2649
ba4481b5
DL
2650 * )
2651 unported=yes
2652 ;;
2653esac
2654
2655### If the code above didn't choose an operating system, just choose
2656### an operating system based on the configuration name. You really
2657### only want to use this when you have no idea what the right
2658### operating system is; if you know what operating systems a machine
2659### runs, it's cleaner to make it explicit in the case statement
2660### above.
2661if test x"${opsys}" = x; then
2662 case "${canonical}" in
2663 *-gnu* ) opsys=gnu ;;
2664 *-bsd4.[01] ) opsys=bsd4-1 ;;
2665 *-bsd4.2 ) opsys=bsd4-2 ;;
2666 *-bsd4.3 ) opsys=bsd4-3 ;;
2667 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2668 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2669 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2670 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2671 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2672 *-sysv5uw* ) opsys=unixware ;;
2673 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2674 *-sysv4.1* | *-sysvr4.1* )
2675 NON_GNU_CPP=/usr/lib/cpp
2676 opsys=usg5-4 ;;
2677 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2678 if [ x$NON_GNU_CPP = x ]; then
2679 if [ -f /usr/ccs/lib/cpp ]; then
2680 NON_GNU_CPP=/usr/ccs/lib/cpp
2681 else
2682 NON_GNU_CPP=/lib/cpp
2683 fi
2684 fi
2685 opsys=usg5-4-2 ;;
2686 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2687 * )
2688 unported=yes
2689 ;;
2690 esac
2691fi
2692
c0d27fcc 2693
22044edf 2694
ba4481b5 2695if test $unported = yes; then
c0d27fcc 2696 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2697Check \`etc/MACHINES' for recognized configuration names." >&5
2698echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2699Check \`etc/MACHINES' for recognized configuration names." >&2;}
2700 { (exit 1); exit 1; }; }
ba4481b5
DL
2701fi
2702
2703machfile="m/${machine}.h"
2704opsysfile="s/${opsys}.h"
2705
c0d27fcc 2706
ba4481b5
DL
2707#### Choose a compiler.
2708test -n "$CC" && cc_specified=yes
2709
2710# Save the value of CFLAGS that the user specified.
2711SPECIFIED_CFLAGS="$CFLAGS"
2712
2713case ${with_gcc} in
2714 "yes" ) CC="gcc" GCC=yes ;;
2715 "no" ) : ${CC=cc} ;;
503d2be0
AS
2716 * )
2717esac
2718ac_ext=c
2719ac_cpp='$CPP $CPPFLAGS'
2720ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2721ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2722ac_compiler_gnu=$ac_cv_c_compiler_gnu
2723if test -n "$ac_tool_prefix"; then
2724 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2725set dummy ${ac_tool_prefix}gcc; ac_word=$2
c0d27fcc 2726echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2727echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2728if test "${ac_cv_prog_CC+set}" = set; then
2729 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2730else
2731 if test -n "$CC"; then
2732 ac_cv_prog_CC="$CC" # Let the user override the test.
2733else
c0d27fcc
MR
2734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2735for as_dir in $PATH
2736do
2737 IFS=$as_save_IFS
2738 test -z "$as_dir" && as_dir=.
2739 for ac_exec_ext in '' $ac_executable_extensions; do
2740 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2741 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2742 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2743 break 2
2744 fi
2745done
503d2be0
AS
2746done
2747
ba4481b5
DL
2748fi
2749fi
503d2be0 2750CC=$ac_cv_prog_CC
ba4481b5 2751if test -n "$CC"; then
c0d27fcc 2752 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2753echo "${ECHO_T}$CC" >&6
2754else
c0d27fcc 2755 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2756echo "${ECHO_T}no" >&6
2757fi
2758
2759fi
2760if test -z "$ac_cv_prog_CC"; then
2761 ac_ct_CC=$CC
2762 # Extract the first word of "gcc", so it can be a program name with args.
2763set dummy gcc; ac_word=$2
c0d27fcc 2764echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2765echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2766if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2767 echo $ECHO_N "(cached) $ECHO_C" >&6
2768else
2769 if test -n "$ac_ct_CC"; then
2770 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2771else
c0d27fcc
MR
2772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2773for as_dir in $PATH
2774do
2775 IFS=$as_save_IFS
2776 test -z "$as_dir" && as_dir=.
2777 for ac_exec_ext in '' $ac_executable_extensions; do
2778 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2779 ac_cv_prog_ac_ct_CC="gcc"
2780 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2781 break 2
2782 fi
2783done
503d2be0
AS
2784done
2785
2786fi
2787fi
2788ac_ct_CC=$ac_cv_prog_ac_ct_CC
2789if test -n "$ac_ct_CC"; then
c0d27fcc 2790 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0 2791echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2792else
c0d27fcc 2793 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2794echo "${ECHO_T}no" >&6
2795fi
2796
2797 CC=$ac_ct_CC
2798else
2799 CC="$ac_cv_prog_CC"
ba4481b5
DL
2800fi
2801
2802if test -z "$CC"; then
503d2be0
AS
2803 if test -n "$ac_tool_prefix"; then
2804 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2805set dummy ${ac_tool_prefix}cc; ac_word=$2
c0d27fcc 2806echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2807echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2808if test "${ac_cv_prog_CC+set}" = set; then
2809 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2810else
2811 if test -n "$CC"; then
2812 ac_cv_prog_CC="$CC" # Let the user override the test.
2813else
c0d27fcc
MR
2814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2815for as_dir in $PATH
2816do
2817 IFS=$as_save_IFS
2818 test -z "$as_dir" && as_dir=.
2819 for ac_exec_ext in '' $ac_executable_extensions; do
2820 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2821 ac_cv_prog_CC="${ac_tool_prefix}cc"
2822 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2823 break 2
2824 fi
2825done
503d2be0
AS
2826done
2827
2828fi
2829fi
2830CC=$ac_cv_prog_CC
2831if test -n "$CC"; then
c0d27fcc 2832 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2833echo "${ECHO_T}$CC" >&6
2834else
c0d27fcc 2835 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2836echo "${ECHO_T}no" >&6
2837fi
2838
2839fi
2840if test -z "$ac_cv_prog_CC"; then
2841 ac_ct_CC=$CC
2842 # Extract the first word of "cc", so it can be a program name with args.
2843set dummy cc; ac_word=$2
c0d27fcc 2844echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2845echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2846if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2847 echo $ECHO_N "(cached) $ECHO_C" >&6
2848else
2849 if test -n "$ac_ct_CC"; then
2850 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2851else
c0d27fcc
MR
2852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2853for as_dir in $PATH
2854do
2855 IFS=$as_save_IFS
2856 test -z "$as_dir" && as_dir=.
2857 for ac_exec_ext in '' $ac_executable_extensions; do
2858 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2859 ac_cv_prog_ac_ct_CC="cc"
2860 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2861 break 2
2862 fi
2863done
503d2be0
AS
2864done
2865
2866fi
2867fi
2868ac_ct_CC=$ac_cv_prog_ac_ct_CC
2869if test -n "$ac_ct_CC"; then
c0d27fcc 2870 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2871echo "${ECHO_T}$ac_ct_CC" >&6
2872else
c0d27fcc 2873 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2874echo "${ECHO_T}no" >&6
2875fi
2876
2877 CC=$ac_ct_CC
2878else
2879 CC="$ac_cv_prog_CC"
2880fi
2881
2882fi
2883if test -z "$CC"; then
2884 # Extract the first word of "cc", so it can be a program name with args.
2885set dummy cc; ac_word=$2
c0d27fcc 2886echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2887echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2888if test "${ac_cv_prog_CC+set}" = set; then
2889 echo $ECHO_N "(cached) $ECHO_C" >&6
2890else
2891 if test -n "$CC"; then
2892 ac_cv_prog_CC="$CC" # Let the user override the test.
2893else
2894 ac_prog_rejected=no
c0d27fcc
MR
2895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2896for as_dir in $PATH
2897do
2898 IFS=$as_save_IFS
2899 test -z "$as_dir" && as_dir=.
2900 for ac_exec_ext in '' $ac_executable_extensions; do
2901 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2902 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2903 ac_prog_rejected=yes
2904 continue
2905 fi
2906 ac_cv_prog_CC="cc"
2907 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2908 break 2
2909 fi
2910done
503d2be0
AS
2911done
2912
ba4481b5
DL
2913if test $ac_prog_rejected = yes; then
2914 # We found a bogon in the path, so make sure we never use it.
2915 set dummy $ac_cv_prog_CC
2916 shift
503d2be0 2917 if test $# != 0; then
ba4481b5
DL
2918 # We chose a different compiler from the bogus one.
2919 # However, it has the same basename, so the bogon will be chosen
2920 # first if we set CC to just the basename; use the full file name.
2921 shift
6bae0ccf 2922 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2923 fi
2924fi
2925fi
2926fi
503d2be0 2927CC=$ac_cv_prog_CC
ba4481b5 2928if test -n "$CC"; then
c0d27fcc 2929 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2930echo "${ECHO_T}$CC" >&6
ba4481b5 2931else
c0d27fcc 2932 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2933echo "${ECHO_T}no" >&6
ba4481b5
DL
2934fi
2935
503d2be0
AS
2936fi
2937if test -z "$CC"; then
2938 if test -n "$ac_tool_prefix"; then
2939 for ac_prog in cl
2940 do
2941 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2942set dummy $ac_tool_prefix$ac_prog; ac_word=$2
c0d27fcc 2943echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2944echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2945if test "${ac_cv_prog_CC+set}" = set; then
2946 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2947else
2948 if test -n "$CC"; then
2949 ac_cv_prog_CC="$CC" # Let the user override the test.
2950else
c0d27fcc
MR
2951as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2952for as_dir in $PATH
2953do
2954 IFS=$as_save_IFS
2955 test -z "$as_dir" && as_dir=.
2956 for ac_exec_ext in '' $ac_executable_extensions; do
2957 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2958 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2959 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2960 break 2
2961 fi
2962done
503d2be0
AS
2963done
2964
c4bb2108
DL
2965fi
2966fi
503d2be0 2967CC=$ac_cv_prog_CC
c4bb2108 2968if test -n "$CC"; then
c0d27fcc 2969 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2970echo "${ECHO_T}$CC" >&6
c4bb2108 2971else
c0d27fcc 2972 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2973echo "${ECHO_T}no" >&6
2974fi
2975
2976 test -n "$CC" && break
2977 done
2978fi
2979if test -z "$CC"; then
2980 ac_ct_CC=$CC
2981 for ac_prog in cl
2982do
2983 # Extract the first word of "$ac_prog", so it can be a program name with args.
2984set dummy $ac_prog; ac_word=$2
c0d27fcc 2985echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2986echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2987if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2988 echo $ECHO_N "(cached) $ECHO_C" >&6
2989else
2990 if test -n "$ac_ct_CC"; then
2991 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2992else
c0d27fcc
MR
2993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2994for as_dir in $PATH
2995do
2996 IFS=$as_save_IFS
2997 test -z "$as_dir" && as_dir=.
2998 for ac_exec_ext in '' $ac_executable_extensions; do
2999 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3000 ac_cv_prog_ac_ct_CC="$ac_prog"
3001 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3002 break 2
3003 fi
3004done
503d2be0
AS
3005done
3006
c4bb2108 3007fi
503d2be0
AS
3008fi
3009ac_ct_CC=$ac_cv_prog_ac_ct_CC
3010if test -n "$ac_ct_CC"; then
c0d27fcc 3011 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
3012echo "${ECHO_T}$ac_ct_CC" >&6
3013else
c0d27fcc 3014 echo "$as_me:$LINENO: result: no" >&5
503d2be0 3015echo "${ECHO_T}no" >&6
ba4481b5
DL
3016fi
3017
503d2be0
AS
3018 test -n "$ac_ct_CC" && break
3019done
ba4481b5 3020
503d2be0
AS
3021 CC=$ac_ct_CC
3022fi
3023
3024fi
ba4481b5 3025
c0d27fcc 3026
19650fd6
AS
3027test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3028See \`config.log' for more details." >&5
3029echo "$as_me: error: no acceptable C compiler found in \$PATH
3030See \`config.log' for more details." >&2;}
503d2be0 3031 { (exit 1); exit 1; }; }
c4bb2108 3032
503d2be0 3033# Provide some information about the compiler.
c0d27fcc 3034echo "$as_me:$LINENO:" \
503d2be0
AS
3035 "checking for C compiler version" >&5
3036ac_compiler=`set X $ac_compile; echo $2`
c0d27fcc 3037{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
3038 (eval $ac_compiler --version </dev/null >&5) 2>&5
3039 ac_status=$?
c0d27fcc 3040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3041 (exit $ac_status); }
c0d27fcc 3042{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
3043 (eval $ac_compiler -v </dev/null >&5) 2>&5
3044 ac_status=$?
c0d27fcc 3045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3046 (exit $ac_status); }
c0d27fcc 3047{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
3048 (eval $ac_compiler -V </dev/null >&5) 2>&5
3049 ac_status=$?
c0d27fcc 3050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3051 (exit $ac_status); }
3052
3053cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3054/* confdefs.h. */
3055_ACEOF
3056cat confdefs.h >>conftest.$ac_ext
3057cat >>conftest.$ac_ext <<_ACEOF
3058/* end confdefs.h. */
c4bb2108 3059
503d2be0
AS
3060int
3061main ()
3062{
3063
3064 ;
3065 return 0;
3066}
3067_ACEOF
3068ac_clean_files_save=$ac_clean_files
19650fd6 3069ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3070# Try to create an executable without -o first, disregard a.out.
3071# It will help us diagnose broken compilers, and finding out an intuition
3072# of exeext.
edfaf76d
LK
3073echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3074echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
503d2be0 3075ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
c0d27fcc 3076if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
503d2be0
AS
3077 (eval $ac_link_default) 2>&5
3078 ac_status=$?
c0d27fcc 3079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3080 (exit $ac_status); }; then
3081 # Find the output, starting from the most likely. This scheme is
3082# not robust to junk in `.', hence go to wildcards (a.*) only as a last
3083# resort.
c0d27fcc
MR
3084
3085# Be careful to initialize this variable, since it used to be cached.
3086# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
3087ac_cv_exeext=
19650fd6
AS
3088# b.out is created by i960 compilers.
3089for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
3090do
6bae0ccf 3091 test -f "$ac_file" || continue
503d2be0 3092 case $ac_file in
19650fd6 3093 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
edfaf76d 3094 ;;
19650fd6 3095 conftest.$ac_ext )
edfaf76d
LK
3096 # This is the source file.
3097 ;;
19650fd6 3098 [ab].out )
edfaf76d
LK
3099 # We found the default executable, but exeext='' is most
3100 # certainly right.
3101 break;;
19650fd6 3102 *.* )
edfaf76d
LK
3103 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3104 # FIXME: I believe we export ac_cv_exeext for Libtool,
3105 # but it would be cool to find out if it's true. Does anybody
3106 # maintain Libtool? --akim.
3107 export ac_cv_exeext
3108 break;;
19650fd6 3109 * )
edfaf76d 3110 break;;
503d2be0
AS
3111 esac
3112done
3113else
3114 echo "$as_me: failed program was:" >&5
19650fd6
AS
3115sed 's/^/| /' conftest.$ac_ext >&5
3116
6bae0ccf 3117{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3118See \`config.log' for more details." >&5
6bae0ccf 3119echo "$as_me: error: C compiler cannot create executables
19650fd6 3120See \`config.log' for more details." >&2;}
503d2be0
AS
3121 { (exit 77); exit 77; }; }
3122fi
3123
3124ac_exeext=$ac_cv_exeext
c0d27fcc 3125echo "$as_me:$LINENO: result: $ac_file" >&5
503d2be0
AS
3126echo "${ECHO_T}$ac_file" >&6
3127
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 the C compiler works" >&5
503d2be0
AS
3131echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
3132# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3133# If not cross compiling, check that we can run a simple program.
3134if test "$cross_compiling" != yes; then
3135 if { ac_try='./$ac_file'
c0d27fcc 3136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3137 (eval $ac_try) 2>&5
3138 ac_status=$?
c0d27fcc 3139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3140 (exit $ac_status); }; }; then
3141 cross_compiling=no
ba4481b5 3142 else
503d2be0
AS
3143 if test "$cross_compiling" = maybe; then
3144 cross_compiling=yes
3145 else
c0d27fcc 3146 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3147If you meant to cross compile, use \`--host'.
3148See \`config.log' for more details." >&5
503d2be0 3149echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3150If you meant to cross compile, use \`--host'.
3151See \`config.log' for more details." >&2;}
503d2be0
AS
3152 { (exit 1); exit 1; }; }
3153 fi
ba4481b5 3154 fi
503d2be0 3155fi
c0d27fcc 3156echo "$as_me:$LINENO: result: yes" >&5
503d2be0
AS
3157echo "${ECHO_T}yes" >&6
3158
19650fd6 3159rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0
AS
3160ac_clean_files=$ac_clean_files_save
3161# Check the compiler produces executables we can run. If not, either
3162# the compiler is broken, or we cross compile.
c0d27fcc 3163echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
503d2be0 3164echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
c0d27fcc 3165echo "$as_me:$LINENO: result: $cross_compiling" >&5
503d2be0
AS
3166echo "${ECHO_T}$cross_compiling" >&6
3167
c0d27fcc
MR
3168echo "$as_me:$LINENO: checking for suffix of executables" >&5
3169echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3170if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
3171 (eval $ac_link) 2>&5
3172 ac_status=$?
c0d27fcc 3173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3174 (exit $ac_status); }; then
3175 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3176# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3177# work properly (i.e., refer to `conftest.exe'), while it won't with
3178# `rm'.
6bae0ccf
DL
3179for ac_file in conftest.exe conftest conftest.*; do
3180 test -f "$ac_file" || continue
503d2be0 3181 case $ac_file in
6bae0ccf 3182 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
503d2be0 3183 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d
LK
3184 export ac_cv_exeext
3185 break;;
503d2be0
AS
3186 * ) break;;
3187 esac
3188done
ba4481b5 3189else
19650fd6
AS
3190 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3191See \`config.log' for more details." >&5
3192echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3193See \`config.log' for more details." >&2;}
503d2be0 3194 { (exit 1); exit 1; }; }
ba4481b5 3195fi
ba4481b5 3196
503d2be0 3197rm -f conftest$ac_cv_exeext
c0d27fcc 3198echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
503d2be0 3199echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 3200
503d2be0
AS
3201rm -f conftest.$ac_ext
3202EXEEXT=$ac_cv_exeext
3203ac_exeext=$EXEEXT
c0d27fcc
MR
3204echo "$as_me:$LINENO: checking for suffix of object files" >&5
3205echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
503d2be0
AS
3206if test "${ac_cv_objext+set}" = set; then
3207 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3208else
503d2be0 3209 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3210/* confdefs.h. */
3211_ACEOF
3212cat confdefs.h >>conftest.$ac_ext
3213cat >>conftest.$ac_ext <<_ACEOF
3214/* end confdefs.h. */
ba4481b5 3215
503d2be0
AS
3216int
3217main ()
3218{
ba4481b5 3219
503d2be0
AS
3220 ;
3221 return 0;
3222}
3223_ACEOF
3224rm -f conftest.o conftest.obj
c0d27fcc 3225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3226 (eval $ac_compile) 2>&5
3227 ac_status=$?
c0d27fcc 3228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3229 (exit $ac_status); }; then
3230 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3231 case $ac_file in
6bae0ccf 3232 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
503d2be0
AS
3233 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3234 break;;
3235 esac
3236done
c4bb2108 3237else
503d2be0 3238 echo "$as_me: failed program was:" >&5
19650fd6
AS
3239sed 's/^/| /' conftest.$ac_ext >&5
3240
3241{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3242See \`config.log' for more details." >&5
3243echo "$as_me: error: cannot compute suffix of object files: cannot compile
3244See \`config.log' for more details." >&2;}
503d2be0 3245 { (exit 1); exit 1; }; }
c4bb2108
DL
3246fi
3247
503d2be0
AS
3248rm -f conftest.$ac_cv_objext conftest.$ac_ext
3249fi
c0d27fcc 3250echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
503d2be0
AS
3251echo "${ECHO_T}$ac_cv_objext" >&6
3252OBJEXT=$ac_cv_objext
3253ac_objext=$OBJEXT
c0d27fcc 3254echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
3255echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3256if test "${ac_cv_c_compiler_gnu+set}" = set; then
3257 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3258else
503d2be0 3259 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3260/* confdefs.h. */
3261_ACEOF
3262cat confdefs.h >>conftest.$ac_ext
3263cat >>conftest.$ac_ext <<_ACEOF
3264/* end confdefs.h. */
503d2be0
AS
3265
3266int
3267main ()
3268{
3269#ifndef __GNUC__
3270 choke me
3271#endif
3272
3273 ;
3274 return 0;
3275}
3276_ACEOF
3277rm -f conftest.$ac_objext
c0d27fcc 3278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3279 (eval $ac_compile) 2>conftest.er1
503d2be0 3280 ac_status=$?
edfaf76d
LK
3281 grep -v '^ *+' conftest.er1 >conftest.err
3282 rm -f conftest.er1
3283 cat conftest.err >&5
c0d27fcc 3284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3285 (exit $ac_status); } &&
8ae52ca6 3286 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
3287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3288 (eval $ac_try) 2>&5
3289 ac_status=$?
3290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3291 (exit $ac_status); }; } &&
3292 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3294 (eval $ac_try) 2>&5
3295 ac_status=$?
c0d27fcc 3296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3297 (exit $ac_status); }; }; then
3298 ac_compiler_gnu=yes
3299else
3300 echo "$as_me: failed program was:" >&5
19650fd6
AS
3301sed 's/^/| /' conftest.$ac_ext >&5
3302
503d2be0
AS
3303ac_compiler_gnu=no
3304fi
edfaf76d 3305rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3306ac_cv_c_compiler_gnu=$ac_compiler_gnu
3307
3308fi
c0d27fcc 3309echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
3310echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3311GCC=`test $ac_compiler_gnu = yes && echo yes`
3312ac_test_CFLAGS=${CFLAGS+set}
3313ac_save_CFLAGS=$CFLAGS
3314CFLAGS="-g"
c0d27fcc 3315echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
503d2be0
AS
3316echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3317if test "${ac_cv_prog_cc_g+set}" = set; then
3318 echo $ECHO_N "(cached) $ECHO_C" >&6
3319else
3320 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3321/* confdefs.h. */
3322_ACEOF
3323cat confdefs.h >>conftest.$ac_ext
3324cat >>conftest.$ac_ext <<_ACEOF
3325/* end confdefs.h. */
503d2be0
AS
3326
3327int
3328main ()
3329{
3330
3331 ;
3332 return 0;
3333}
3334_ACEOF
3335rm -f conftest.$ac_objext
c0d27fcc 3336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3337 (eval $ac_compile) 2>conftest.er1
503d2be0 3338 ac_status=$?
edfaf76d
LK
3339 grep -v '^ *+' conftest.er1 >conftest.err
3340 rm -f conftest.er1
3341 cat conftest.err >&5
c0d27fcc 3342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3343 (exit $ac_status); } &&
8ae52ca6 3344 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
3345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3346 (eval $ac_try) 2>&5
3347 ac_status=$?
3348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3349 (exit $ac_status); }; } &&
3350 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3352 (eval $ac_try) 2>&5
3353 ac_status=$?
c0d27fcc 3354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3355 (exit $ac_status); }; }; then
ba4481b5
DL
3356 ac_cv_prog_cc_g=yes
3357else
503d2be0 3358 echo "$as_me: failed program was:" >&5
19650fd6
AS
3359sed 's/^/| /' conftest.$ac_ext >&5
3360
503d2be0 3361ac_cv_prog_cc_g=no
ba4481b5 3362fi
edfaf76d 3363rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 3364fi
c0d27fcc 3365echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
503d2be0 3366echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 3367if test "$ac_test_CFLAGS" = set; then
503d2be0 3368 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3369elif test $ac_cv_prog_cc_g = yes; then
3370 if test "$GCC" = yes; then
ba4481b5
DL
3371 CFLAGS="-g -O2"
3372 else
c4bb2108 3373 CFLAGS="-g"
ba4481b5 3374 fi
22afa6e8 3375else
c4bb2108
DL
3376 if test "$GCC" = yes; then
3377 CFLAGS="-O2"
3378 else
3379 CFLAGS=
3380 fi
ba4481b5 3381fi
6bae0ccf
DL
3382echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3383echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3384if test "${ac_cv_prog_cc_stdc+set}" = set; then
3385 echo $ECHO_N "(cached) $ECHO_C" >&6
3386else
3387 ac_cv_prog_cc_stdc=no
3388ac_save_CC=$CC
3389cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3390/* confdefs.h. */
3391_ACEOF
3392cat confdefs.h >>conftest.$ac_ext
3393cat >>conftest.$ac_ext <<_ACEOF
3394/* end confdefs.h. */
6bae0ccf
DL
3395#include <stdarg.h>
3396#include <stdio.h>
3397#include <sys/types.h>
3398#include <sys/stat.h>
3399/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3400struct buf { int x; };
3401FILE * (*rcsopen) (struct buf *, struct stat *, int);
3402static char *e (p, i)
3403 char **p;
3404 int i;
3405{
3406 return p[i];
3407}
3408static char *f (char * (*g) (char **, int), char **p, ...)
3409{
3410 char *s;
3411 va_list v;
3412 va_start (v,p);
3413 s = g (p, va_arg (v,int));
3414 va_end (v);
3415 return s;
3416}
edfaf76d
LK
3417
3418/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3419 function prototypes and stuff, but not '\xHH' hex character constants.
3420 These don't provoke an error unfortunately, instead are silently treated
3421 as 'x'. The following induces an error, until -std1 is added to get
3422 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3423 array size at least. It's necessary to write '\x00'==0 to get something
3424 that's true only with -std1. */
3425int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3426
6bae0ccf
DL
3427int test (int i, double x);
3428struct s1 {int (*f) (int a);};
3429struct s2 {int (*f) (double a);};
3430int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3431int argc;
3432char **argv;
3433int
3434main ()
3435{
3436return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3437 ;
3438 return 0;
3439}
3440_ACEOF
3441# Don't try gcc -ansi; that turns off useful extensions and
3442# breaks some systems' header files.
3443# AIX -qlanglvl=ansi
3444# Ultrix and OSF/1 -std1
3445# HP-UX 10.20 and later -Ae
3446# HP-UX older versions -Aa -D_HPUX_SOURCE
3447# SVR4 -Xc -D__EXTENSIONS__
3448for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3449do
3450 CC="$ac_save_CC $ac_arg"
3451 rm -f conftest.$ac_objext
3452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3453 (eval $ac_compile) 2>conftest.er1
6bae0ccf 3454 ac_status=$?
edfaf76d
LK
3455 grep -v '^ *+' conftest.er1 >conftest.err
3456 rm -f conftest.er1
3457 cat conftest.err >&5
6bae0ccf
DL
3458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3459 (exit $ac_status); } &&
8ae52ca6 3460 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
3461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3462 (eval $ac_try) 2>&5
3463 ac_status=$?
3464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3465 (exit $ac_status); }; } &&
3466 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
3467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3468 (eval $ac_try) 2>&5
3469 ac_status=$?
3470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3471 (exit $ac_status); }; }; then
3472 ac_cv_prog_cc_stdc=$ac_arg
3473break
3474else
3475 echo "$as_me: failed program was:" >&5
19650fd6
AS
3476sed 's/^/| /' conftest.$ac_ext >&5
3477
6bae0ccf 3478fi
edfaf76d 3479rm -f conftest.err conftest.$ac_objext
6bae0ccf
DL
3480done
3481rm -f conftest.$ac_ext conftest.$ac_objext
3482CC=$ac_save_CC
3483
3484fi
3485
3486case "x$ac_cv_prog_cc_stdc" in
3487 x|xno)
3488 echo "$as_me:$LINENO: result: none needed" >&5
3489echo "${ECHO_T}none needed" >&6 ;;
3490 *)
3491 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3492echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3493 CC="$CC $ac_cv_prog_cc_stdc" ;;
3494esac
3495
503d2be0
AS
3496# Some people use a C++ compiler to compile C. Since we use `exit',
3497# in C++ we need to declare it. In case someone uses the same compiler
3498# for both compiling C and C++ we need to have the C++ compiler decide
3499# the declaration of exit, since it's the most demanding environment.
3500cat >conftest.$ac_ext <<_ACEOF
3501#ifndef __cplusplus
3502 choke me
3503#endif
3504_ACEOF
3505rm -f conftest.$ac_objext
c0d27fcc 3506if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3507 (eval $ac_compile) 2>conftest.er1
503d2be0 3508 ac_status=$?
edfaf76d
LK
3509 grep -v '^ *+' conftest.er1 >conftest.err
3510 rm -f conftest.er1
3511 cat conftest.err >&5
c0d27fcc 3512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3513 (exit $ac_status); } &&
8ae52ca6 3514 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
3515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3516 (eval $ac_try) 2>&5
3517 ac_status=$?
3518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3519 (exit $ac_status); }; } &&
3520 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3522 (eval $ac_try) 2>&5
3523 ac_status=$?
c0d27fcc 3524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3525 (exit $ac_status); }; }; then
3526 for ac_declaration in \
edfaf76d 3527 '' \
503d2be0
AS
3528 'extern "C" void std::exit (int) throw (); using std::exit;' \
3529 'extern "C" void std::exit (int); using std::exit;' \
3530 'extern "C" void exit (int) throw ();' \
3531 'extern "C" void exit (int);' \
cffcede7 3532 'void exit (int);'
503d2be0
AS
3533do
3534 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3535/* confdefs.h. */
3536_ACEOF
3537cat confdefs.h >>conftest.$ac_ext
3538cat >>conftest.$ac_ext <<_ACEOF
3539/* end confdefs.h. */
7c9e5167 3540$ac_declaration
edfaf76d 3541#include <stdlib.h>
503d2be0
AS
3542int
3543main ()
3544{
3545exit (42);
3546 ;
3547 return 0;
3548}
3549_ACEOF
3550rm -f conftest.$ac_objext
c0d27fcc 3551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3552 (eval $ac_compile) 2>conftest.er1
503d2be0 3553 ac_status=$?
edfaf76d
LK
3554 grep -v '^ *+' conftest.er1 >conftest.err
3555 rm -f conftest.er1
3556 cat conftest.err >&5
c0d27fcc 3557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3558 (exit $ac_status); } &&
8ae52ca6 3559 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
3560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3561 (eval $ac_try) 2>&5
3562 ac_status=$?
3563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3564 (exit $ac_status); }; } &&
3565 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3567 (eval $ac_try) 2>&5
3568 ac_status=$?
c0d27fcc 3569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3570 (exit $ac_status); }; }; then
3571 :
3572else
3573 echo "$as_me: failed program was:" >&5
19650fd6
AS
3574sed 's/^/| /' conftest.$ac_ext >&5
3575
503d2be0
AS
3576continue
3577fi
edfaf76d 3578rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 3579 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3580/* confdefs.h. */
3581_ACEOF
3582cat confdefs.h >>conftest.$ac_ext
3583cat >>conftest.$ac_ext <<_ACEOF
3584/* end confdefs.h. */
503d2be0
AS
3585$ac_declaration
3586int
3587main ()
3588{
3589exit (42);
3590 ;
3591 return 0;
3592}
3593_ACEOF
3594rm -f conftest.$ac_objext
c0d27fcc 3595if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3596 (eval $ac_compile) 2>conftest.er1
503d2be0 3597 ac_status=$?
edfaf76d
LK
3598 grep -v '^ *+' conftest.er1 >conftest.err
3599 rm -f conftest.er1
3600 cat conftest.err >&5
c0d27fcc 3601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3602 (exit $ac_status); } &&
8ae52ca6 3603 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
3604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3605 (eval $ac_try) 2>&5
3606 ac_status=$?
3607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3608 (exit $ac_status); }; } &&
3609 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3611 (eval $ac_try) 2>&5
3612 ac_status=$?
c0d27fcc 3613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3614 (exit $ac_status); }; }; then
3615 break
3616else
3617 echo "$as_me: failed program was:" >&5
19650fd6
AS
3618sed 's/^/| /' conftest.$ac_ext >&5
3619
503d2be0 3620fi
edfaf76d 3621rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3622done
3623rm -f conftest*
3624if test -n "$ac_declaration"; then
3625 echo '#ifdef __cplusplus' >>confdefs.h
3626 echo $ac_declaration >>confdefs.h
3627 echo '#endif' >>confdefs.h
3628fi
ba4481b5 3629
503d2be0
AS
3630else
3631 echo "$as_me: failed program was:" >&5
19650fd6
AS
3632sed 's/^/| /' conftest.$ac_ext >&5
3633
503d2be0 3634fi
edfaf76d 3635rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3636ac_ext=c
3637ac_cpp='$CPP $CPPFLAGS'
3638ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3639ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3640ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3641
c0d27fcc 3642
ba4481b5
DL
3643# On Suns, sometimes $CPP names a directory.
3644if test -n "$CPP" && test -d "$CPP"; then
3645 CPP=
3646fi
3647
3648#### Some systems specify a CPP to use unless we are using GCC.
3649#### Now that we know whether we are using GCC, we can decide whether
3650#### to use that one.
3651if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3652then
3653 CPP="$NON_GNU_CPP"
3654fi
3655
3656#### Some systems specify a CC to use unless we are using GCC.
3657#### Now that we know whether we are using GCC, we can decide whether
3658#### to use that one.
3659if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3660 test x$cc_specified != xyes
3661then
3662 CC="$NON_GNU_CC"
3663fi
3664
3665if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3666then
3667 CC="$CC $GCC_TEST_OPTIONS"
3668fi
3669
3670if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3671then
3672 CC="$CC $NON_GCC_TEST_OPTIONS"
3673fi
3674
e143ad11
AS
3675
3676ac_ext=c
3677ac_cpp='$CPP $CPPFLAGS'
3678ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3679ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3680ac_compiler_gnu=$ac_cv_c_compiler_gnu
3681echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3682echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3683# On Suns, sometimes $CPP names a directory.
3684if test -n "$CPP" && test -d "$CPP"; then
3685 CPP=
3686fi
3687if test -z "$CPP"; then
3688 if test "${ac_cv_prog_CPP+set}" = set; then
3689 echo $ECHO_N "(cached) $ECHO_C" >&6
3690else
3691 # Double quotes because CPP needs to be expanded
3692 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3693 do
3694 ac_preproc_ok=false
3695for ac_c_preproc_warn_flag in '' yes
3696do
3697 # Use a header file that comes with gcc, so configuring glibc
3698 # with a fresh cross-compiler works.
3699 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3700 # <limits.h> exists even on freestanding compilers.
3701 # On the NeXT, cc -E runs the code through the compiler's parser,
3702 # not just through cpp. "Syntax error" is here to catch this case.
3703 cat >conftest.$ac_ext <<_ACEOF
3704/* confdefs.h. */
3705_ACEOF
3706cat confdefs.h >>conftest.$ac_ext
3707cat >>conftest.$ac_ext <<_ACEOF
3708/* end confdefs.h. */
3709#ifdef __STDC__
3710# include <limits.h>
3711#else
3712# include <assert.h>
3713#endif
3714 Syntax error
3715_ACEOF
3716if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3717 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3718 ac_status=$?
3719 grep -v '^ *+' conftest.er1 >conftest.err
3720 rm -f conftest.er1
3721 cat conftest.err >&5
3722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3723 (exit $ac_status); } >/dev/null; then
3724 if test -s conftest.err; then
3725 ac_cpp_err=$ac_c_preproc_warn_flag
3726 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3727 else
3728 ac_cpp_err=
3729 fi
3730else
3731 ac_cpp_err=yes
3732fi
3733if test -z "$ac_cpp_err"; then
3734 :
3735else
3736 echo "$as_me: failed program was:" >&5
3737sed 's/^/| /' conftest.$ac_ext >&5
3738
3739 # Broken: fails on valid input.
3740continue
3741fi
3742rm -f conftest.err conftest.$ac_ext
3743
3744 # OK, works on sane cases. Now check whether non-existent headers
3745 # can be detected and how.
3746 cat >conftest.$ac_ext <<_ACEOF
3747/* confdefs.h. */
3748_ACEOF
3749cat confdefs.h >>conftest.$ac_ext
3750cat >>conftest.$ac_ext <<_ACEOF
3751/* end confdefs.h. */
3752#include <ac_nonexistent.h>
3753_ACEOF
3754if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3755 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3756 ac_status=$?
3757 grep -v '^ *+' conftest.er1 >conftest.err
3758 rm -f conftest.er1
3759 cat conftest.err >&5
3760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3761 (exit $ac_status); } >/dev/null; then
3762 if test -s conftest.err; then
3763 ac_cpp_err=$ac_c_preproc_warn_flag
3764 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3765 else
3766 ac_cpp_err=
3767 fi
3768else
3769 ac_cpp_err=yes
3770fi
3771if test -z "$ac_cpp_err"; then
3772 # Broken: success on invalid input.
3773continue
3774else
3775 echo "$as_me: failed program was:" >&5
3776sed 's/^/| /' conftest.$ac_ext >&5
3777
3778 # Passes both tests.
3779ac_preproc_ok=:
3780break
3781fi
3782rm -f conftest.err conftest.$ac_ext
3783
3784done
3785# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3786rm -f conftest.err conftest.$ac_ext
3787if $ac_preproc_ok; then
3788 break
3789fi
3790
3791 done
3792 ac_cv_prog_CPP=$CPP
3793
3794fi
3795 CPP=$ac_cv_prog_CPP
3796else
3797 ac_cv_prog_CPP=$CPP
3798fi
3799echo "$as_me:$LINENO: result: $CPP" >&5
3800echo "${ECHO_T}$CPP" >&6
3801ac_preproc_ok=false
3802for ac_c_preproc_warn_flag in '' yes
3803do
3804 # Use a header file that comes with gcc, so configuring glibc
3805 # with a fresh cross-compiler works.
3806 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3807 # <limits.h> exists even on freestanding compilers.
3808 # On the NeXT, cc -E runs the code through the compiler's parser,
3809 # not just through cpp. "Syntax error" is here to catch this case.
3810 cat >conftest.$ac_ext <<_ACEOF
3811/* confdefs.h. */
3812_ACEOF
3813cat confdefs.h >>conftest.$ac_ext
3814cat >>conftest.$ac_ext <<_ACEOF
3815/* end confdefs.h. */
3816#ifdef __STDC__
3817# include <limits.h>
3818#else
3819# include <assert.h>
3820#endif
3821 Syntax error
3822_ACEOF
3823if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3824 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3825 ac_status=$?
3826 grep -v '^ *+' conftest.er1 >conftest.err
3827 rm -f conftest.er1
3828 cat conftest.err >&5
3829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3830 (exit $ac_status); } >/dev/null; then
3831 if test -s conftest.err; then
3832 ac_cpp_err=$ac_c_preproc_warn_flag
3833 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3834 else
3835 ac_cpp_err=
3836 fi
3837else
3838 ac_cpp_err=yes
3839fi
3840if test -z "$ac_cpp_err"; then
3841 :
3842else
3843 echo "$as_me: failed program was:" >&5
3844sed 's/^/| /' conftest.$ac_ext >&5
3845
3846 # Broken: fails on valid input.
3847continue
3848fi
3849rm -f conftest.err conftest.$ac_ext
3850
3851 # OK, works on sane cases. Now check whether non-existent headers
3852 # can be detected and how.
3853 cat >conftest.$ac_ext <<_ACEOF
3854/* confdefs.h. */
3855_ACEOF
3856cat confdefs.h >>conftest.$ac_ext
3857cat >>conftest.$ac_ext <<_ACEOF
3858/* end confdefs.h. */
3859#include <ac_nonexistent.h>
3860_ACEOF
3861if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3862 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3863 ac_status=$?
3864 grep -v '^ *+' conftest.er1 >conftest.err
3865 rm -f conftest.er1
3866 cat conftest.err >&5
3867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3868 (exit $ac_status); } >/dev/null; then
3869 if test -s conftest.err; then
3870 ac_cpp_err=$ac_c_preproc_warn_flag
3871 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3872 else
3873 ac_cpp_err=
3874 fi
3875else
3876 ac_cpp_err=yes
3877fi
3878if test -z "$ac_cpp_err"; then
3879 # Broken: success on invalid input.
3880continue
3881else
3882 echo "$as_me: failed program was:" >&5
3883sed 's/^/| /' conftest.$ac_ext >&5
3884
3885 # Passes both tests.
3886ac_preproc_ok=:
3887break
3888fi
3889rm -f conftest.err conftest.$ac_ext
3890
3891done
3892# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3893rm -f conftest.err conftest.$ac_ext
3894if $ac_preproc_ok; then
3895 :
3896else
3897 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3898See \`config.log' for more details." >&5
3899echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3900See \`config.log' for more details." >&2;}
3901 { (exit 1); exit 1; }; }
3902fi
3903
3904ac_ext=c
3905ac_cpp='$CPP $CPPFLAGS'
3906ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3907ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3908ac_compiler_gnu=$ac_cv_c_compiler_gnu
3909
3910
3911echo "$as_me:$LINENO: checking for egrep" >&5
3912echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3913if test "${ac_cv_prog_egrep+set}" = set; then
3914 echo $ECHO_N "(cached) $ECHO_C" >&6
3915else
3916 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3917 then ac_cv_prog_egrep='grep -E'
3918 else ac_cv_prog_egrep='egrep'
3919 fi
3920fi
3921echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3922echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3923 EGREP=$ac_cv_prog_egrep
3924
3925
3926
3927echo "$as_me:$LINENO: checking for AIX" >&5
3928echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3929cat >conftest.$ac_ext <<_ACEOF
3930/* confdefs.h. */
3931_ACEOF
3932cat confdefs.h >>conftest.$ac_ext
3933cat >>conftest.$ac_ext <<_ACEOF
3934/* end confdefs.h. */
3935#ifdef _AIX
3936 yes
3937#endif
3938
3939_ACEOF
3940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3941 $EGREP "yes" >/dev/null 2>&1; then
3942 echo "$as_me:$LINENO: result: yes" >&5
3943echo "${ECHO_T}yes" >&6
3944cat >>confdefs.h <<\_ACEOF
3945#define _ALL_SOURCE 1
3946_ACEOF
3947
3948else
3949 echo "$as_me:$LINENO: result: no" >&5
3950echo "${ECHO_T}no" >&6
3951fi
3952rm -f conftest*
3953
3954
3955
3956cat >>confdefs.h <<\_ACEOF
3957#define _GNU_SOURCE 1
3958_ACEOF
3959
3960
3961
01abe918
CY
3962### Use -Wno-pointer-sign if the compiler supports it
3963echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
3964echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6
3965SAVE_CFLAGS="$CFLAGS"
3966CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
3967cat >conftest.$ac_ext <<_ACEOF
3968/* confdefs.h. */
3969_ACEOF
3970cat confdefs.h >>conftest.$ac_ext
3971cat >>conftest.$ac_ext <<_ACEOF
3972/* end confdefs.h. */
3973
3974int
3975main ()
3976{
3977
3978 ;
3979 return 0;
3980}
3981_ACEOF
3982rm -f conftest.$ac_objext
3983if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3984 (eval $ac_compile) 2>conftest.er1
3985 ac_status=$?
3986 grep -v '^ *+' conftest.er1 >conftest.err
3987 rm -f conftest.er1
3988 cat conftest.err >&5
3989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3990 (exit $ac_status); } &&
3991 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3993 (eval $ac_try) 2>&5
3994 ac_status=$?
3995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3996 (exit $ac_status); }; } &&
3997 { ac_try='test -s conftest.$ac_objext'
3998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3999 (eval $ac_try) 2>&5
4000 ac_status=$?
4001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4002 (exit $ac_status); }; }; then
4003 has_option=yes
4004else
4005 echo "$as_me: failed program was:" >&5
4006sed 's/^/| /' conftest.$ac_ext >&5
4007
4008has_option=no
4009fi
4010rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4011if test $has_option = yes; then
4012 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4013fi
4014echo "$as_me:$LINENO: result: $has_option" >&5
4015echo "${ECHO_T}$has_option" >&6
4016CFLAGS="$SAVE_CFLAGS"
4017unset has_option
4018unset SAVE_CFLAGS
4019
6a3a24fa 4020#### Some other nice autoconf tests.
ba4481b5 4021
c0d27fcc 4022echo "$as_me:$LINENO: checking whether ln -s works" >&5
503d2be0
AS
4023echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4024LN_S=$as_ln_s
4025if test "$LN_S" = "ln -s"; then
c0d27fcc 4026 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 4027echo "${ECHO_T}yes" >&6
ba4481b5 4028else
c0d27fcc 4029 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
503d2be0 4030echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
4031fi
4032
503d2be0
AS
4033ac_ext=c
4034ac_cpp='$CPP $CPPFLAGS'
4035ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4036ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4037ac_compiler_gnu=$ac_cv_c_compiler_gnu
c0d27fcc 4038echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
503d2be0 4039echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
4040# On Suns, sometimes $CPP names a directory.
4041if test -n "$CPP" && test -d "$CPP"; then
4042 CPP=
4043fi
4044if test -z "$CPP"; then
503d2be0
AS
4045 if test "${ac_cv_prog_CPP+set}" = set; then
4046 echo $ECHO_N "(cached) $ECHO_C" >&6
4047else
4048 # Double quotes because CPP needs to be expanded
4049 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4050 do
4051 ac_preproc_ok=false
4052for ac_c_preproc_warn_flag in '' yes
4053do
4054 # Use a header file that comes with gcc, so configuring glibc
4055 # with a fresh cross-compiler works.
19650fd6
AS
4056 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4057 # <limits.h> exists even on freestanding compilers.
ba4481b5 4058 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4059 # not just through cpp. "Syntax error" is here to catch this case.
4060 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4061/* confdefs.h. */
4062_ACEOF
4063cat confdefs.h >>conftest.$ac_ext
4064cat >>conftest.$ac_ext <<_ACEOF
4065/* end confdefs.h. */
4066#ifdef __STDC__
4067# include <limits.h>
4068#else
4069# include <assert.h>
4070#endif
edfaf76d 4071 Syntax error
503d2be0 4072_ACEOF
c0d27fcc 4073if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4074 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4075 ac_status=$?
6bae0ccf 4076 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4077 rm -f conftest.er1
4078 cat conftest.err >&5
c0d27fcc 4079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4080 (exit $ac_status); } >/dev/null; then
4081 if test -s conftest.err; then
4082 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4083 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4084 else
4085 ac_cpp_err=
4086 fi
4087else
4088 ac_cpp_err=yes
4089fi
4090if test -z "$ac_cpp_err"; then
ba4481b5
DL
4091 :
4092else
503d2be0 4093 echo "$as_me: failed program was:" >&5
19650fd6
AS
4094sed 's/^/| /' conftest.$ac_ext >&5
4095
503d2be0
AS
4096 # Broken: fails on valid input.
4097continue
4098fi
4099rm -f conftest.err conftest.$ac_ext
4100
4101 # OK, works on sane cases. Now check whether non-existent headers
4102 # can be detected and how.
4103 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4104/* confdefs.h. */
4105_ACEOF
4106cat confdefs.h >>conftest.$ac_ext
4107cat >>conftest.$ac_ext <<_ACEOF
4108/* end confdefs.h. */
503d2be0
AS
4109#include <ac_nonexistent.h>
4110_ACEOF
c0d27fcc 4111if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4112 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4113 ac_status=$?
6bae0ccf 4114 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4115 rm -f conftest.er1
4116 cat conftest.err >&5
c0d27fcc 4117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4118 (exit $ac_status); } >/dev/null; then
4119 if test -s conftest.err; then
4120 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4121 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4122 else
4123 ac_cpp_err=
4124 fi
4125else
4126 ac_cpp_err=yes
4127fi
4128if test -z "$ac_cpp_err"; then
4129 # Broken: success on invalid input.
4130continue
c4bb2108 4131else
503d2be0 4132 echo "$as_me: failed program was:" >&5
19650fd6
AS
4133sed 's/^/| /' conftest.$ac_ext >&5
4134
503d2be0
AS
4135 # Passes both tests.
4136ac_preproc_ok=:
4137break
4138fi
4139rm -f conftest.err conftest.$ac_ext
4140
4141done
4142# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4143rm -f conftest.err conftest.$ac_ext
4144if $ac_preproc_ok; then
4145 break
4146fi
4147
4148 done
4149 ac_cv_prog_CPP=$CPP
4150
4151fi
4152 CPP=$ac_cv_prog_CPP
4153else
4154 ac_cv_prog_CPP=$CPP
4155fi
c0d27fcc 4156echo "$as_me:$LINENO: result: $CPP" >&5
503d2be0
AS
4157echo "${ECHO_T}$CPP" >&6
4158ac_preproc_ok=false
4159for ac_c_preproc_warn_flag in '' yes
4160do
4161 # Use a header file that comes with gcc, so configuring glibc
4162 # with a fresh cross-compiler works.
19650fd6
AS
4163 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4164 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4165 # On the NeXT, cc -E runs the code through the compiler's parser,
4166 # not just through cpp. "Syntax error" is here to catch this case.
4167 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4168/* confdefs.h. */
4169_ACEOF
4170cat confdefs.h >>conftest.$ac_ext
4171cat >>conftest.$ac_ext <<_ACEOF
4172/* end confdefs.h. */
4173#ifdef __STDC__
4174# include <limits.h>
4175#else
4176# include <assert.h>
4177#endif
edfaf76d 4178 Syntax error
503d2be0 4179_ACEOF
c0d27fcc 4180if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4181 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4182 ac_status=$?
6bae0ccf 4183 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4184 rm -f conftest.er1
4185 cat conftest.err >&5
c0d27fcc 4186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4187 (exit $ac_status); } >/dev/null; then
4188 if test -s conftest.err; then
4189 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4190 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4191 else
4192 ac_cpp_err=
4193 fi
4194else
4195 ac_cpp_err=yes
4196fi
4197if test -z "$ac_cpp_err"; then
ba4481b5
DL
4198 :
4199else
503d2be0 4200 echo "$as_me: failed program was:" >&5
19650fd6
AS
4201sed 's/^/| /' conftest.$ac_ext >&5
4202
503d2be0
AS
4203 # Broken: fails on valid input.
4204continue
4205fi
4206rm -f conftest.err conftest.$ac_ext
4207
4208 # OK, works on sane cases. Now check whether non-existent headers
4209 # can be detected and how.
4210 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4211/* confdefs.h. */
4212_ACEOF
4213cat confdefs.h >>conftest.$ac_ext
4214cat >>conftest.$ac_ext <<_ACEOF
4215/* end confdefs.h. */
503d2be0
AS
4216#include <ac_nonexistent.h>
4217_ACEOF
c0d27fcc 4218if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4219 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4220 ac_status=$?
6bae0ccf 4221 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4222 rm -f conftest.er1
4223 cat conftest.err >&5
c0d27fcc 4224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4225 (exit $ac_status); } >/dev/null; then
4226 if test -s conftest.err; then
4227 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4228 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4229 else
4230 ac_cpp_err=
4231 fi
4232else
4233 ac_cpp_err=yes
c4bb2108 4234fi
503d2be0
AS
4235if test -z "$ac_cpp_err"; then
4236 # Broken: success on invalid input.
4237continue
4238else
4239 echo "$as_me: failed program was:" >&5
19650fd6
AS
4240sed 's/^/| /' conftest.$ac_ext >&5
4241
503d2be0
AS
4242 # Passes both tests.
4243ac_preproc_ok=:
4244break
ba4481b5 4245fi
503d2be0
AS
4246rm -f conftest.err conftest.$ac_ext
4247
4248done
4249# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4250rm -f conftest.err conftest.$ac_ext
4251if $ac_preproc_ok; then
4252 :
ba4481b5 4253else
19650fd6
AS
4254 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4255See \`config.log' for more details." >&5
4256echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4257See \`config.log' for more details." >&2;}
503d2be0 4258 { (exit 1); exit 1; }; }
ba4481b5 4259fi
503d2be0
AS
4260
4261ac_ext=c
4262ac_cpp='$CPP $CPPFLAGS'
4263ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4264ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4265ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4266
4267# Find a good install program. We prefer a C program (faster),
4268# so one script is as good as another. But avoid the broken or
4269# incompatible versions:
4270# SysV /etc/install, /usr/sbin/install
4271# SunOS /usr/etc/install
4272# IRIX /sbin/install
4273# AIX /bin/install
503d2be0 4274# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4275# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4276# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4277# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4278# OS/2's system install, which has a completely different semantic
ba4481b5 4279# ./install, which can be erroneously created by make from ./install.sh.
c0d27fcc
MR
4280echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4281echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
ba4481b5 4282if test -z "$INSTALL"; then
503d2be0
AS
4283if test "${ac_cv_path_install+set}" = set; then
4284 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4285else
c0d27fcc
MR
4286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4287for as_dir in $PATH
4288do
4289 IFS=$as_save_IFS
4290 test -z "$as_dir" && as_dir=.
4291 # Account for people who put trailing slashes in PATH elements.
4292case $as_dir/ in
4293 ./ | .// | /cC/* | \
4294 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4295 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4296 /usr/ucb/* ) ;;
4297 *)
4298 # OSF1 and SCO ODT 3.0 have their own names for install.
4299 # Don't use installbsd from OSF since it installs stuff as root
4300 # by default.
4301 for ac_prog in ginstall scoinst install; do
4302 for ac_exec_ext in '' $ac_executable_extensions; do
edfaf76d
LK
4303 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4304 if test $ac_prog = install &&
4305 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4306 # AIX install. It has an incompatible calling convention.
4307 :
4308 elif test $ac_prog = install &&
4309 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4310 # program-specific install script used by HP pwplus--don't use.
4311 :
4312 else
4313 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4314 break 3
4315 fi
4316 fi
ba4481b5 4317 done
c0d27fcc
MR
4318 done
4319 ;;
4320esac
4321done
4322
ba4481b5
DL
4323
4324fi
4325 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4326 INSTALL=$ac_cv_path_install
ba4481b5
DL
4327 else
4328 # As a last resort, use the slow shell script. We don't cache a
4329 # path for INSTALL within a source directory, because that will
4330 # break other packages using the cache if that directory is
4331 # removed, or if the path is relative.
503d2be0 4332 INSTALL=$ac_install_sh
ba4481b5
DL
4333 fi
4334fi
c0d27fcc 4335echo "$as_me:$LINENO: result: $INSTALL" >&5
503d2be0 4336echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
4337
4338# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4339# It thinks the first close brace ends the variable substitution.
4340test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4341
503d2be0 4342test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 4343
ba4481b5
DL
4344test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4345
c0d27fcc
MR
4346if test "x$RANLIB" = x; then
4347 if test -n "$ac_tool_prefix"; then
4348 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4349set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4350echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0 4351echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c0d27fcc 4352if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 4353 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
4354else
4355 if test -n "$RANLIB"; then
4356 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4357else
c0d27fcc
MR
4358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4359for as_dir in $PATH
4360do
4361 IFS=$as_save_IFS
4362 test -z "$as_dir" && as_dir=.
4363 for ac_exec_ext in '' $ac_executable_extensions; do
4364 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4365 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4366 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4367 break 2
4368 fi
4369done
503d2be0
AS
4370done
4371
7397acc4
DL
4372fi
4373fi
503d2be0 4374RANLIB=$ac_cv_prog_RANLIB
7397acc4 4375if test -n "$RANLIB"; then
c0d27fcc 4376 echo "$as_me:$LINENO: result: $RANLIB" >&5
503d2be0
AS
4377echo "${ECHO_T}$RANLIB" >&6
4378else
c0d27fcc 4379 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4380echo "${ECHO_T}no" >&6
4381fi
4382
4383fi
4384if test -z "$ac_cv_prog_RANLIB"; then
4385 ac_ct_RANLIB=$RANLIB
4386 # Extract the first word of "ranlib", so it can be a program name with args.
4387set dummy ranlib; ac_word=$2
c0d27fcc 4388echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
4389echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4390if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4391 echo $ECHO_N "(cached) $ECHO_C" >&6
4392else
4393 if test -n "$ac_ct_RANLIB"; then
4394 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4395else
c0d27fcc
MR
4396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4397for as_dir in $PATH
4398do
4399 IFS=$as_save_IFS
4400 test -z "$as_dir" && as_dir=.
4401 for ac_exec_ext in '' $ac_executable_extensions; do
4402 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4403 ac_cv_prog_ac_ct_RANLIB="ranlib"
4404 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4405 break 2
4406 fi
4407done
503d2be0
AS
4408done
4409
4410 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4411fi
4412fi
4413ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4414if test -n "$ac_ct_RANLIB"; then
c0d27fcc 4415 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
503d2be0
AS
4416echo "${ECHO_T}$ac_ct_RANLIB" >&6
4417else
c0d27fcc 4418 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4419echo "${ECHO_T}no" >&6
4420fi
4421
4422 RANLIB=$ac_ct_RANLIB
7397acc4 4423else
503d2be0 4424 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
4425fi
4426
4427fi
9e71690e
DK
4428# Extract the first word of "install-info", so it can be a program name with args.
4429set dummy install-info; ac_word=$2
4430echo "$as_me:$LINENO: checking for $ac_word" >&5
4431echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4432if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4433 echo $ECHO_N "(cached) $ECHO_C" >&6
4434else
4435 case $INSTALL_INFO in
4436 [\\/]* | ?:[\\/]*)
4437 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4438 ;;
4439 *)
4440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4441for as_dir in $PATH
4442do
4443 IFS=$as_save_IFS
4444 test -z "$as_dir" && as_dir=.
4445 for ac_exec_ext in '' $ac_executable_extensions; do
4446 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4447 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4448 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4449 break 2
4450 fi
4451done
4452done
4453
4454 ;;
4455esac
4456fi
4457INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4458
4459if test -n "$INSTALL_INFO"; then
4460 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4461echo "${ECHO_T}$INSTALL_INFO" >&6
4462else
4463 echo "$as_me:$LINENO: result: no" >&5
4464echo "${ECHO_T}no" >&6
4465fi
4466
4467# Extract the first word of "install-info", so it can be a program name with args.
4468set dummy install-info; ac_word=$2
4469echo "$as_me:$LINENO: checking for $ac_word" >&5
4470echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4471if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4472 echo $ECHO_N "(cached) $ECHO_C" >&6
4473else
4474 case $INSTALL_INFO in
4475 [\\/]* | ?:[\\/]*)
4476 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4477 ;;
4478 *)
4479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4480for as_dir in /usr/sbin
4481do
4482 IFS=$as_save_IFS
4483 test -z "$as_dir" && as_dir=.
4484 for ac_exec_ext in '' $ac_executable_extensions; do
4485 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4486 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4487 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4488 break 2
4489 fi
4490done
4491done
4492
4493 ;;
4494esac
4495fi
4496INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4497
4498if test -n "$INSTALL_INFO"; then
4499 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4500echo "${ECHO_T}$INSTALL_INFO" >&6
4501else
4502 echo "$as_me:$LINENO: result: no" >&5
4503echo "${ECHO_T}no" >&6
4504fi
4505
4506# Extract the first word of "install-info", so it can be a program name with args.
4507set dummy install-info; ac_word=$2
4508echo "$as_me:$LINENO: checking for $ac_word" >&5
4509echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4510if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4511 echo $ECHO_N "(cached) $ECHO_C" >&6
4512else
4513 case $INSTALL_INFO in
4514 [\\/]* | ?:[\\/]*)
4515 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4516 ;;
4517 *)
4518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4519for as_dir in /sbin
4520do
4521 IFS=$as_save_IFS
4522 test -z "$as_dir" && as_dir=.
4523 for ac_exec_ext in '' $ac_executable_extensions; do
4524 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4525 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4526 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4527 break 2
4528 fi
4529done
4530done
4531
4532 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4533 ;;
4534esac
4535fi
4536INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4537
4538if test -n "$INSTALL_INFO"; then
4539 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4540echo "${ECHO_T}$INSTALL_INFO" >&6
4541else
4542 echo "$as_me:$LINENO: result: no" >&5
4543echo "${ECHO_T}no" >&6
4544fi
4545
8ae52ca6
RF
4546# Extract the first word of "gzip", so it can be a program name with args.
4547set dummy gzip; ac_word=$2
4548echo "$as_me:$LINENO: checking for $ac_word" >&5
4549echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
46e35e9f 4550if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
4551 echo $ECHO_N "(cached) $ECHO_C" >&6
4552else
46e35e9f 4553 case $GZIP_PROG in
8ae52ca6 4554 [\\/]* | ?:[\\/]*)
46e35e9f 4555 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
4556 ;;
4557 *)
4558 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4559for as_dir in $PATH
4560do
4561 IFS=$as_save_IFS
4562 test -z "$as_dir" && as_dir=.
4563 for ac_exec_ext in '' $ac_executable_extensions; do
4564 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46e35e9f 4565 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
4566 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4567 break 2
4568 fi
4569done
4570done
4571
4572 ;;
4573esac
4574fi
46e35e9f 4575GZIP_PROG=$ac_cv_path_GZIP_PROG
8ae52ca6 4576
46e35e9f
AS
4577if test -n "$GZIP_PROG"; then
4578 echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
4579echo "${ECHO_T}$GZIP_PROG" >&6
8ae52ca6
RF
4580else
4581 echo "$as_me:$LINENO: result: no" >&5
4582echo "${ECHO_T}no" >&6
4583fi
4584
ba4481b5 4585
c0d27fcc 4586
8e967cf7
MR
4587if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4588then
4589 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4590fi
4591
4592if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4593then
4594 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4595fi
4596
c0d27fcc 4597
fe239f0f 4598late_LDFLAGS=$LDFLAGS
4af002d6 4599if test "$GCC" = yes; then
fe239f0f
AS
4600 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
4601else
4602 LDFLAGS="$LDFLAGS -znocombreloc"
4603fi
4604
edfaf76d
LK
4605echo "$as_me:$LINENO: checking for -znocombreloc" >&5
4606echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6
fe239f0f
AS
4607cat >conftest.$ac_ext <<_ACEOF
4608main(){return 0;}
4609_ACEOF
4610rm -f conftest.$ac_objext conftest$ac_exeext
4611if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 4612 (eval $ac_link) 2>conftest.er1
fe239f0f 4613 ac_status=$?
edfaf76d
LK
4614 grep -v '^ *+' conftest.er1 >conftest.err
4615 rm -f conftest.er1
4616 cat conftest.err >&5
fe239f0f
AS
4617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4618 (exit $ac_status); } &&
8ae52ca6 4619 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
4620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4621 (eval $ac_try) 2>&5
4622 ac_status=$?
4623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4624 (exit $ac_status); }; } &&
4625 { ac_try='test -s conftest$ac_exeext'
fe239f0f
AS
4626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4627 (eval $ac_try) 2>&5
4628 ac_status=$?
4629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4630 (exit $ac_status); }; }; then
4631 echo "$as_me:$LINENO: result: yes" >&5
4632echo "${ECHO_T}yes" >&6
4633else
4634 echo "$as_me: failed program was:" >&5
4635sed 's/^/| /' conftest.$ac_ext >&5
4636
4637LDFLAGS=$late_LDFLAGS
4638 echo "$as_me:$LINENO: result: no" >&5
4639echo "${ECHO_T}no" >&6
4640fi
edfaf76d
LK
4641rm -f conftest.err conftest.$ac_objext \
4642 conftest$ac_exeext conftest.$ac_ext
fe239f0f 4643
3b33a005
DL
4644#### Extract some information from the operating system and machine files.
4645
c0d27fcc 4646{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 4647 - which libraries the lib-src programs will want, and
503d2be0
AS
4648 - whether the GNU malloc routines are usable..." >&5
4649echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 4650 - which libraries the lib-src programs will want, and
503d2be0 4651 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
4652
4653### First figure out CFLAGS (which we use for running the compiler here)
4654### and REAL_CFLAGS (which we use for real compilation).
4655### The two are the same except on a few systems, where they are made
4656### different to work around various lossages. For example,
4657### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
4658### as implying static linking.
4659
4660### If the CFLAGS env var is specified, we use that value
4661### instead of the default.
4662
4663### It's not important that this name contain the PID; you can't run
4664### two configures in the same directory and have anything work
4665### anyway.
4666tempcname="conftest.c"
4667
4668echo '
4669#include "'${srcdir}'/src/'${opsysfile}'"
4670#include "'${srcdir}'/src/'${machfile}'"
4671#ifndef LIBS_MACHINE
4672#define LIBS_MACHINE
4673#endif
4674#ifndef LIBS_SYSTEM
4675#define LIBS_SYSTEM
4676#endif
4677#ifndef C_SWITCH_SYSTEM
4678#define C_SWITCH_SYSTEM
4679#endif
4680#ifndef C_SWITCH_MACHINE
4681#define C_SWITCH_MACHINE
4682#endif
4683configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
4684configure___ c_switch_system=C_SWITCH_SYSTEM
4685configure___ c_switch_machine=C_SWITCH_MACHINE
4686
4687#ifndef LIB_X11_LIB
4688#define LIB_X11_LIB -lX11
4689#endif
4690
4691#ifndef LIBX11_MACHINE
4692#define LIBX11_MACHINE
4693#endif
4694
4695#ifndef LIBX11_SYSTEM
4696#define LIBX11_SYSTEM
4697#endif
4698configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
4699
4700#ifdef UNEXEC
4701configure___ unexec=UNEXEC
4702#else
4703configure___ unexec=unexec.o
4704#endif
4705
4706#ifdef SYSTEM_MALLOC
4707configure___ system_malloc=yes
4708#else
4709configure___ system_malloc=no
4710#endif
4711
ef9e4345
GM
4712#ifdef USE_MMAP_FOR_BUFFERS
4713configure___ use_mmap_for_buffers=yes
73b77ee5 4714#else
ef9e4345 4715configure___ use_mmap_for_buffers=no
73b77ee5
GM
4716#endif
4717
3b33a005
DL
4718#ifndef C_DEBUG_SWITCH
4719#define C_DEBUG_SWITCH -g
4720#endif
4721
4722#ifndef C_OPTIMIZE_SWITCH
4723#ifdef __GNUC__
4724#define C_OPTIMIZE_SWITCH -O2
4725#else
4726#define C_OPTIMIZE_SWITCH -O
4727#endif
4728#endif
4729
01abe918
CY
4730#ifndef C_WARNINGS_SWITCH
4731#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
4732#endif
4733
3b33a005
DL
4734#ifndef LD_SWITCH_MACHINE
4735#define LD_SWITCH_MACHINE
4736#endif
4737
4738#ifndef LD_SWITCH_SYSTEM
4739#define LD_SWITCH_SYSTEM
4740#endif
4741
4742#ifndef LD_SWITCH_X_SITE_AUX
4743#define LD_SWITCH_X_SITE_AUX
503d2be0 4744#endif
3b33a005
DL
4745
4746configure___ ld_switch_system=LD_SWITCH_SYSTEM
4747configure___ ld_switch_machine=LD_SWITCH_MACHINE
4748
4749#ifdef THIS_IS_CONFIGURE
4750
4751/* Get the CFLAGS for tests in configure. */
4752#ifdef __GNUC__
4753configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4754#else
4755configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4756#endif
4757
4758#else /* not THIS_IS_CONFIGURE */
4759
4760/* Get the CFLAGS for real compilation. */
4761#ifdef __GNUC__
01abe918 4762configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
4763#else
4764configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4765#endif
4766
4767#endif /* not THIS_IS_CONFIGURE */
4768' > ${tempcname}
4769
4770# The value of CPP is a quoted variable reference, so we need to do this
4771# to get its actual value...
4772CPP=`eval "echo $CPP"`
4773eval `${CPP} -Isrc ${tempcname} \
4774 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4775if test "x$SPECIFIED_CFLAGS" = x; then
4776 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
4777 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4778else
4779 REAL_CFLAGS="$CFLAGS"
4780fi
4781rm ${tempcname}
4782
4783ac_link="$ac_link $ld_switch_machine $ld_switch_system"
4784
4785### Make sure subsequent tests use flags consistent with the build flags.
4786
4787if test x"${OVERRIDE_CPPFLAGS}" != x; then
4788 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
4789else
4790 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
4791fi
4792
6bae0ccf
DL
4793
4794
503d2be0 4795# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
4796if test "${enable_largefile+set}" = set; then
4797 enableval="$enable_largefile"
f4988be7 4798
503d2be0
AS
4799fi;
4800if test "$enable_largefile" != no; then
f4988be7 4801
c0d27fcc 4802 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
503d2be0
AS
4803echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4804if test "${ac_cv_sys_largefile_CC+set}" = set; then
4805 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4806else
f4988be7 4807 ac_cv_sys_largefile_CC=no
503d2be0
AS
4808 if test "$GCC" != yes; then
4809 ac_save_CC=$CC
4810 while :; do
4811 # IRIX 6.2 and later do not support large files by default,
4812 # so use the C compiler's -n32 option if that helps.
edfaf76d 4813 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4814/* confdefs.h. */
4815_ACEOF
4816cat confdefs.h >>conftest.$ac_ext
4817cat >>conftest.$ac_ext <<_ACEOF
4818/* end confdefs.h. */
f4988be7 4819#include <sys/types.h>
503d2be0
AS
4820 /* Check that off_t can represent 2**63 - 1 correctly.
4821 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4822 since some C++ compilers masquerading as C compilers
4823 incorrectly reject 9223372036854775807. */
4824#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4825 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4826 && LARGE_OFF_T % 2147483647 == 1)
4827 ? 1 : -1];
4828int
4829main ()
4830{
f4988be7 4831
503d2be0
AS
4832 ;
4833 return 0;
4834}
4835_ACEOF
4836 rm -f conftest.$ac_objext
c0d27fcc 4837if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4838 (eval $ac_compile) 2>conftest.er1
503d2be0 4839 ac_status=$?
edfaf76d
LK
4840 grep -v '^ *+' conftest.er1 >conftest.err
4841 rm -f conftest.er1
4842 cat conftest.err >&5
c0d27fcc 4843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4844 (exit $ac_status); } &&
8ae52ca6 4845 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
4846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4847 (eval $ac_try) 2>&5
4848 ac_status=$?
4849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4850 (exit $ac_status); }; } &&
4851 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4853 (eval $ac_try) 2>&5
4854 ac_status=$?
c0d27fcc 4855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4856 (exit $ac_status); }; }; then
4857 break
b192d653 4858else
503d2be0 4859 echo "$as_me: failed program was:" >&5
19650fd6
AS
4860sed 's/^/| /' conftest.$ac_ext >&5
4861
503d2be0 4862fi
edfaf76d 4863rm -f conftest.err conftest.$ac_objext
503d2be0
AS
4864 CC="$CC -n32"
4865 rm -f conftest.$ac_objext
c0d27fcc 4866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4867 (eval $ac_compile) 2>conftest.er1
503d2be0 4868 ac_status=$?
edfaf76d
LK
4869 grep -v '^ *+' conftest.er1 >conftest.err
4870 rm -f conftest.er1
4871 cat conftest.err >&5
c0d27fcc 4872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4873 (exit $ac_status); } &&
8ae52ca6 4874 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
4875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4876 (eval $ac_try) 2>&5
4877 ac_status=$?
4878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4879 (exit $ac_status); }; } &&
4880 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4882 (eval $ac_try) 2>&5
4883 ac_status=$?
c0d27fcc 4884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4885 (exit $ac_status); }; }; then
4886 ac_cv_sys_largefile_CC=' -n32'; break
4887else
4888 echo "$as_me: failed program was:" >&5
19650fd6
AS
4889sed 's/^/| /' conftest.$ac_ext >&5
4890
503d2be0 4891fi
edfaf76d
LK
4892rm -f conftest.err conftest.$ac_objext
4893 break
503d2be0
AS
4894 done
4895 CC=$ac_save_CC
4896 rm -f conftest.$ac_ext
4897 fi
b192d653 4898fi
c0d27fcc 4899echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
4900echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4901 if test "$ac_cv_sys_largefile_CC" != no; then
4902 CC=$CC$ac_cv_sys_largefile_CC
4903 fi
b192d653 4904
c0d27fcc 4905 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
4906echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4907if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4908 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4909else
503d2be0 4910 while :; do
f4988be7 4911 ac_cv_sys_file_offset_bits=no
503d2be0 4912 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4913/* confdefs.h. */
4914_ACEOF
4915cat confdefs.h >>conftest.$ac_ext
4916cat >>conftest.$ac_ext <<_ACEOF
4917/* end confdefs.h. */
f4988be7 4918#include <sys/types.h>
503d2be0
AS
4919 /* Check that off_t can represent 2**63 - 1 correctly.
4920 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4921 since some C++ compilers masquerading as C compilers
4922 incorrectly reject 9223372036854775807. */
4923#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4924 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4925 && LARGE_OFF_T % 2147483647 == 1)
4926 ? 1 : -1];
4927int
4928main ()
4929{
f4988be7 4930
503d2be0
AS
4931 ;
4932 return 0;
4933}
4934_ACEOF
4935rm -f conftest.$ac_objext
c0d27fcc 4936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4937 (eval $ac_compile) 2>conftest.er1
503d2be0 4938 ac_status=$?
edfaf76d
LK
4939 grep -v '^ *+' conftest.er1 >conftest.err
4940 rm -f conftest.er1
4941 cat conftest.err >&5
c0d27fcc 4942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4943 (exit $ac_status); } &&
8ae52ca6 4944 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
4945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4946 (eval $ac_try) 2>&5
4947 ac_status=$?
4948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4949 (exit $ac_status); }; } &&
4950 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4952 (eval $ac_try) 2>&5
4953 ac_status=$?
c0d27fcc 4954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4955 (exit $ac_status); }; }; then
4956 break
f4988be7 4957else
503d2be0 4958 echo "$as_me: failed program was:" >&5
19650fd6
AS
4959sed 's/^/| /' conftest.$ac_ext >&5
4960
503d2be0 4961fi
edfaf76d 4962rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4963 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4964/* confdefs.h. */
4965_ACEOF
4966cat confdefs.h >>conftest.$ac_ext
4967cat >>conftest.$ac_ext <<_ACEOF
4968/* end confdefs.h. */
f4988be7
GM
4969#define _FILE_OFFSET_BITS 64
4970#include <sys/types.h>
503d2be0
AS
4971 /* Check that off_t can represent 2**63 - 1 correctly.
4972 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4973 since some C++ compilers masquerading as C compilers
4974 incorrectly reject 9223372036854775807. */
4975#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4976 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4977 && LARGE_OFF_T % 2147483647 == 1)
4978 ? 1 : -1];
4979int
4980main ()
4981{
4982
4983 ;
4984 return 0;
4985}
4986_ACEOF
4987rm -f conftest.$ac_objext
c0d27fcc 4988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4989 (eval $ac_compile) 2>conftest.er1
503d2be0 4990 ac_status=$?
edfaf76d
LK
4991 grep -v '^ *+' conftest.er1 >conftest.err
4992 rm -f conftest.er1
4993 cat conftest.err >&5
c0d27fcc 4994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4995 (exit $ac_status); } &&
8ae52ca6 4996 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
4997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4998 (eval $ac_try) 2>&5
4999 ac_status=$?
5000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5001 (exit $ac_status); }; } &&
5002 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5004 (eval $ac_try) 2>&5
5005 ac_status=$?
c0d27fcc 5006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5007 (exit $ac_status); }; }; then
5008 ac_cv_sys_file_offset_bits=64; break
5009else
5010 echo "$as_me: failed program was:" >&5
19650fd6
AS
5011sed 's/^/| /' conftest.$ac_ext >&5
5012
503d2be0 5013fi
edfaf76d 5014rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
5015 break
5016done
ba4481b5 5017fi
c0d27fcc 5018echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
5019echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
5020if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 5021
c0d27fcc 5022cat >>confdefs.h <<_ACEOF
f4988be7 5023#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5024_ACEOF
f4988be7 5025
503d2be0
AS
5026fi
5027rm -f conftest*
c0d27fcc 5028 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
5029echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
5030if test "${ac_cv_sys_large_files+set}" = set; then
5031 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5032else
503d2be0 5033 while :; do
f4988be7 5034 ac_cv_sys_large_files=no
503d2be0 5035 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5036/* confdefs.h. */
5037_ACEOF
5038cat confdefs.h >>conftest.$ac_ext
5039cat >>conftest.$ac_ext <<_ACEOF
5040/* end confdefs.h. */
503d2be0
AS
5041#include <sys/types.h>
5042 /* Check that off_t can represent 2**63 - 1 correctly.
5043 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5044 since some C++ compilers masquerading as C compilers
5045 incorrectly reject 9223372036854775807. */
5046#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5047 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5048 && LARGE_OFF_T % 2147483647 == 1)
5049 ? 1 : -1];
5050int
5051main ()
5052{
ba4481b5 5053
503d2be0
AS
5054 ;
5055 return 0;
5056}
5057_ACEOF
5058rm -f conftest.$ac_objext
c0d27fcc 5059if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5060 (eval $ac_compile) 2>conftest.er1
503d2be0 5061 ac_status=$?
edfaf76d
LK
5062 grep -v '^ *+' conftest.er1 >conftest.err
5063 rm -f conftest.er1
5064 cat conftest.err >&5
c0d27fcc 5065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5066 (exit $ac_status); } &&
8ae52ca6 5067 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
5068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5069 (eval $ac_try) 2>&5
5070 ac_status=$?
5071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5072 (exit $ac_status); }; } &&
5073 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5075 (eval $ac_try) 2>&5
5076 ac_status=$?
c0d27fcc 5077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5078 (exit $ac_status); }; }; then
5079 break
ba4481b5 5080else
503d2be0 5081 echo "$as_me: failed program was:" >&5
19650fd6
AS
5082sed 's/^/| /' conftest.$ac_ext >&5
5083
503d2be0 5084fi
edfaf76d 5085rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5086 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5087/* confdefs.h. */
5088_ACEOF
5089cat confdefs.h >>conftest.$ac_ext
5090cat >>conftest.$ac_ext <<_ACEOF
5091/* end confdefs.h. */
f4988be7 5092#define _LARGE_FILES 1
503d2be0
AS
5093#include <sys/types.h>
5094 /* Check that off_t can represent 2**63 - 1 correctly.
5095 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5096 since some C++ compilers masquerading as C compilers
5097 incorrectly reject 9223372036854775807. */
5098#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5099 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5100 && LARGE_OFF_T % 2147483647 == 1)
5101 ? 1 : -1];
5102int
5103main ()
5104{
f4988be7 5105
503d2be0
AS
5106 ;
5107 return 0;
5108}
5109_ACEOF
5110rm -f conftest.$ac_objext
c0d27fcc 5111if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5112 (eval $ac_compile) 2>conftest.er1
503d2be0 5113 ac_status=$?
edfaf76d
LK
5114 grep -v '^ *+' conftest.er1 >conftest.err
5115 rm -f conftest.er1
5116 cat conftest.err >&5
c0d27fcc 5117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5118 (exit $ac_status); } &&
8ae52ca6 5119 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
5120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5121 (eval $ac_try) 2>&5
5122 ac_status=$?
5123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5124 (exit $ac_status); }; } &&
5125 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5127 (eval $ac_try) 2>&5
5128 ac_status=$?
c0d27fcc 5129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5130 (exit $ac_status); }; }; then
5131 ac_cv_sys_large_files=1; break
5132else
5133 echo "$as_me: failed program was:" >&5
19650fd6
AS
5134sed 's/^/| /' conftest.$ac_ext >&5
5135
503d2be0 5136fi
edfaf76d 5137rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
5138 break
5139done
ba4481b5 5140fi
c0d27fcc 5141echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
5142echo "${ECHO_T}$ac_cv_sys_large_files" >&6
5143if test "$ac_cv_sys_large_files" != no; then
ba4481b5 5144
c0d27fcc 5145cat >>confdefs.h <<_ACEOF
f4988be7 5146#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5147_ACEOF
ba4481b5 5148
503d2be0
AS
5149fi
5150rm -f conftest*
5151fi
ba4481b5 5152
c0d27fcc 5153
439f58ee
JD
5154
5155
5156
5157
2c9dccc9
PJ
5158if test "${with_sound}" != "no"; then
5159 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
5160 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5161echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5162if test "${ac_cv_header_stdc+set}" = set; then
5163 echo $ECHO_N "(cached) $ECHO_C" >&6
5164else
5165 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5166/* confdefs.h. */
5167_ACEOF
5168cat confdefs.h >>conftest.$ac_ext
5169cat >>conftest.$ac_ext <<_ACEOF
5170/* end confdefs.h. */
c0d27fcc
MR
5171#include <stdlib.h>
5172#include <stdarg.h>
5173#include <string.h>
5174#include <float.h>
98418dba 5175
19650fd6
AS
5176int
5177main ()
5178{
5179
5180 ;
5181 return 0;
5182}
c0d27fcc 5183_ACEOF
19650fd6
AS
5184rm -f conftest.$ac_objext
5185if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5186 (eval $ac_compile) 2>conftest.er1
cd958eb3 5187 ac_status=$?
edfaf76d
LK
5188 grep -v '^ *+' conftest.er1 >conftest.err
5189 rm -f conftest.er1
5190 cat conftest.err >&5
cd958eb3 5191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 5192 (exit $ac_status); } &&
8ae52ca6 5193 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
5194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5195 (eval $ac_try) 2>&5
5196 ac_status=$?
5197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5198 (exit $ac_status); }; } &&
5199 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
5200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5201 (eval $ac_try) 2>&5
5202 ac_status=$?
5203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5204 (exit $ac_status); }; }; then
c0d27fcc
MR
5205 ac_cv_header_stdc=yes
5206else
5207 echo "$as_me: failed program was:" >&5
19650fd6
AS
5208sed 's/^/| /' conftest.$ac_ext >&5
5209
5210ac_cv_header_stdc=no
c0d27fcc 5211fi
edfaf76d 5212rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5213
5214if test $ac_cv_header_stdc = yes; then
5215 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5216 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5217/* confdefs.h. */
5218_ACEOF
5219cat confdefs.h >>conftest.$ac_ext
5220cat >>conftest.$ac_ext <<_ACEOF
5221/* end confdefs.h. */
c0d27fcc
MR
5222#include <string.h>
5223
5224_ACEOF
5225if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5226 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
5227 :
5228else
5229 ac_cv_header_stdc=no
5230fi
5231rm -f conftest*
5232
5233fi
5234
5235if test $ac_cv_header_stdc = yes; then
5236 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5237 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5238/* confdefs.h. */
5239_ACEOF
5240cat confdefs.h >>conftest.$ac_ext
5241cat >>conftest.$ac_ext <<_ACEOF
5242/* end confdefs.h. */
c0d27fcc
MR
5243#include <stdlib.h>
5244
5245_ACEOF
5246if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5247 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
5248 :
5249else
5250 ac_cv_header_stdc=no
5251fi
5252rm -f conftest*
5253
5254fi
5255
5256if test $ac_cv_header_stdc = yes; then
5257 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5258 if test "$cross_compiling" = yes; then
5259 :
5260else
5261 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5262/* confdefs.h. */
5263_ACEOF
5264cat confdefs.h >>conftest.$ac_ext
5265cat >>conftest.$ac_ext <<_ACEOF
5266/* end confdefs.h. */
c0d27fcc
MR
5267#include <ctype.h>
5268#if ((' ' & 0x0FF) == 0x020)
5269# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5270# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5271#else
19650fd6 5272# define ISLOWER(c) \
edfaf76d
LK
5273 (('a' <= (c) && (c) <= 'i') \
5274 || ('j' <= (c) && (c) <= 'r') \
5275 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
5276# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5277#endif
5278
5279#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5280int
5281main ()
5282{
5283 int i;
5284 for (i = 0; i < 256; i++)
5285 if (XOR (islower (i), ISLOWER (i))
edfaf76d 5286 || toupper (i) != TOUPPER (i))
c0d27fcc
MR
5287 exit(2);
5288 exit (0);
5289}
5290_ACEOF
5291rm -f conftest$ac_exeext
5292if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5293 (eval $ac_link) 2>&5
5294 ac_status=$?
5295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5296 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5298 (eval $ac_try) 2>&5
5299 ac_status=$?
5300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5301 (exit $ac_status); }; }; then
5302 :
5303else
5304 echo "$as_me: program exited with status $ac_status" >&5
5305echo "$as_me: failed program was:" >&5
19650fd6
AS
5306sed 's/^/| /' conftest.$ac_ext >&5
5307
c0d27fcc
MR
5308( exit $ac_status )
5309ac_cv_header_stdc=no
5310fi
edfaf76d 5311rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5312fi
5313fi
5314fi
5315echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5316echo "${ECHO_T}$ac_cv_header_stdc" >&6
5317if test $ac_cv_header_stdc = yes; then
5318
5319cat >>confdefs.h <<\_ACEOF
5320#define STDC_HEADERS 1
5321_ACEOF
5322
5323fi
5324
5325# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 5336 inttypes.h stdint.h unistd.h
98418dba
CW
5337do
5338as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc 5339echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5340echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5341if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5342 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5343else
925c2f3f 5344 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5345/* confdefs.h. */
5346_ACEOF
5347cat confdefs.h >>conftest.$ac_ext
5348cat >>conftest.$ac_ext <<_ACEOF
5349/* end confdefs.h. */
c0d27fcc
MR
5350$ac_includes_default
5351
5352#include <$ac_header>
5353_ACEOF
5354rm -f conftest.$ac_objext
5355if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5356 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5357 ac_status=$?
edfaf76d
LK
5358 grep -v '^ *+' conftest.er1 >conftest.err
5359 rm -f conftest.er1
5360 cat conftest.err >&5
c0d27fcc
MR
5361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5362 (exit $ac_status); } &&
8ae52ca6 5363 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
5364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5365 (eval $ac_try) 2>&5
5366 ac_status=$?
5367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5368 (exit $ac_status); }; } &&
5369 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5371 (eval $ac_try) 2>&5
5372 ac_status=$?
5373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5374 (exit $ac_status); }; }; then
5375 eval "$as_ac_Header=yes"
5376else
5377 echo "$as_me: failed program was:" >&5
19650fd6
AS
5378sed 's/^/| /' conftest.$ac_ext >&5
5379
c0d27fcc
MR
5380eval "$as_ac_Header=no"
5381fi
edfaf76d 5382rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5383fi
5384echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5385echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5386if test `eval echo '${'$as_ac_Header'}'` = yes; then
5387 cat >>confdefs.h <<_ACEOF
5388#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5389_ACEOF
5390
5391fi
5392
5393done
5394
5395
5396
5397
5398
5399for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5400do
5401as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5402if eval "test \"\${$as_ac_Header+set}\" = set"; then
5403 echo "$as_me:$LINENO: checking for $ac_header" >&5
5404echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5405if eval "test \"\${$as_ac_Header+set}\" = set"; then
5406 echo $ECHO_N "(cached) $ECHO_C" >&6
5407fi
5408echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5409echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5410else
5411 # Is the header compilable?
5412echo "$as_me:$LINENO: checking $ac_header usability" >&5
5413echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5414cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5415/* confdefs.h. */
5416_ACEOF
5417cat confdefs.h >>conftest.$ac_ext
5418cat >>conftest.$ac_ext <<_ACEOF
5419/* end confdefs.h. */
c0d27fcc 5420$ac_includes_default
98418dba 5421#include <$ac_header>
503d2be0 5422_ACEOF
c0d27fcc
MR
5423rm -f conftest.$ac_objext
5424if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5425 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5426 ac_status=$?
edfaf76d
LK
5427 grep -v '^ *+' conftest.er1 >conftest.err
5428 rm -f conftest.er1
5429 cat conftest.err >&5
c0d27fcc
MR
5430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5431 (exit $ac_status); } &&
8ae52ca6 5432 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
5433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5434 (eval $ac_try) 2>&5
5435 ac_status=$?
5436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5437 (exit $ac_status); }; } &&
5438 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5440 (eval $ac_try) 2>&5
5441 ac_status=$?
5442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5443 (exit $ac_status); }; }; then
5444 ac_header_compiler=yes
5445else
5446 echo "$as_me: failed program was:" >&5
19650fd6
AS
5447sed 's/^/| /' conftest.$ac_ext >&5
5448
c0d27fcc
MR
5449ac_header_compiler=no
5450fi
edfaf76d 5451rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5452echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5453echo "${ECHO_T}$ac_header_compiler" >&6
5454
5455# Is the header present?
5456echo "$as_me:$LINENO: checking $ac_header presence" >&5
5457echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5458cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5459/* confdefs.h. */
5460_ACEOF
5461cat confdefs.h >>conftest.$ac_ext
5462cat >>conftest.$ac_ext <<_ACEOF
5463/* end confdefs.h. */
c0d27fcc
MR
5464#include <$ac_header>
5465_ACEOF
5466if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5467 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5468 ac_status=$?
6bae0ccf 5469 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5470 rm -f conftest.er1
5471 cat conftest.err >&5
c0d27fcc 5472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5473 (exit $ac_status); } >/dev/null; then
5474 if test -s conftest.err; then
5475 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5476 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5477 else
5478 ac_cpp_err=
5479 fi
5480else
5481 ac_cpp_err=yes
5482fi
5483if test -z "$ac_cpp_err"; then
c0d27fcc 5484 ac_header_preproc=yes
f4988be7 5485else
503d2be0 5486 echo "$as_me: failed program was:" >&5
19650fd6
AS
5487sed 's/^/| /' conftest.$ac_ext >&5
5488
c0d27fcc 5489 ac_header_preproc=no
f4988be7 5490fi
98418dba 5491rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5492echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5493echo "${ECHO_T}$ac_header_preproc" >&6
5494
5495# So? What about this header?
edfaf76d
LK
5496case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5497 yes:no: )
c0d27fcc
MR
5498 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5499echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
5500 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5501echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5502 ac_header_preproc=yes
19650fd6 5503 ;;
edfaf76d 5504 no:yes:* )
c0d27fcc
MR
5505 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5506echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
5507 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5508echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5509 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5510echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5511 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5512echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5513 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5514echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
5515 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5516echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5517 (
5518 cat <<\_ASBOX
edfaf76d
LK
5519## ------------------------------------------ ##
5520## Report this to the AC_PACKAGE_NAME lists. ##
5521## ------------------------------------------ ##
19650fd6
AS
5522_ASBOX
5523 ) |
5524 sed "s/^/$as_me: WARNING: /" >&2
5525 ;;
c0d27fcc
MR
5526esac
5527echo "$as_me:$LINENO: checking for $ac_header" >&5
5528echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5529if eval "test \"\${$as_ac_Header+set}\" = set"; then
5530 echo $ECHO_N "(cached) $ECHO_C" >&6
5531else
edfaf76d 5532 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 5533fi
c0d27fcc 5534echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5535echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5536
5537fi
98418dba 5538if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5539 cat >>confdefs.h <<_ACEOF
98418dba 5540#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5541_ACEOF
f4988be7
GM
5542
5543fi
c0d27fcc 5544
98418dba
CW
5545done
5546
5547 # Emulation library used on NetBSD.
c0d27fcc 5548 echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
5549echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
5550if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 5551 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5552else
98418dba
CW
5553 ac_check_lib_save_LIBS=$LIBS
5554LIBS="-lossaudio $LIBS"
5555cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5556/* confdefs.h. */
5557_ACEOF
5558cat confdefs.h >>conftest.$ac_ext
5559cat >>conftest.$ac_ext <<_ACEOF
5560/* end confdefs.h. */
98418dba
CW
5561
5562/* Override any gcc2 internal prototype to avoid an error. */
5563#ifdef __cplusplus
5564extern "C"
f4988be7 5565#endif
98418dba
CW
5566/* We use char because int might match the return type of a gcc2
5567 builtin and then its argument prototype would still apply. */
5568char _oss_ioctl ();
503d2be0
AS
5569int
5570main ()
5571{
98418dba 5572_oss_ioctl ();
503d2be0
AS
5573 ;
5574 return 0;
5575}
5576_ACEOF
98418dba 5577rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 5578if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 5579 (eval $ac_link) 2>conftest.er1
503d2be0 5580 ac_status=$?
edfaf76d
LK
5581 grep -v '^ *+' conftest.er1 >conftest.err
5582 rm -f conftest.er1
5583 cat conftest.err >&5
c0d27fcc 5584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5585 (exit $ac_status); } &&
8ae52ca6 5586 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
5587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5588 (eval $ac_try) 2>&5
5589 ac_status=$?
5590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5591 (exit $ac_status); }; } &&
5592 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 5593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5594 (eval $ac_try) 2>&5
5595 ac_status=$?
c0d27fcc 5596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5597 (exit $ac_status); }; }; then
98418dba 5598 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 5599else
503d2be0 5600 echo "$as_me: failed program was:" >&5
19650fd6
AS
5601sed 's/^/| /' conftest.$ac_ext >&5
5602
98418dba 5603ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 5604fi
edfaf76d
LK
5605rm -f conftest.err conftest.$ac_objext \
5606 conftest$ac_exeext conftest.$ac_ext
98418dba 5607LIBS=$ac_check_lib_save_LIBS
f4988be7 5608fi
c0d27fcc 5609echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
5610echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
5611if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
5612 LIBSOUND=-lossaudio
5613else
5614 LIBSOUND=
5615fi
5616
c0d27fcc 5617
439f58ee
JD
5618
5619 ALSA_REQUIRED=1.0.0
5620 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
5621 if test "X${with_pkg_config_prog}" != X; then
5622 PKG_CONFIG="${with_pkg_config_prog}"
5623 fi
5624
5625 succeeded=no
5626
5627 if test -z "$PKG_CONFIG"; then
5628 # Extract the first word of "pkg-config", so it can be a program name with args.
5629set dummy pkg-config; ac_word=$2
5630echo "$as_me:$LINENO: checking for $ac_word" >&5
5631echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5632if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5633 echo $ECHO_N "(cached) $ECHO_C" >&6
5634else
5635 case $PKG_CONFIG in
5636 [\\/]* | ?:[\\/]*)
5637 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5638 ;;
5639 *)
5640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5641for as_dir in $PATH
5642do
5643 IFS=$as_save_IFS
5644 test -z "$as_dir" && as_dir=.
5645 for ac_exec_ext in '' $ac_executable_extensions; do
5646 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5647 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5648 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5649 break 2
5650 fi
5651done
5652done
5653
5654 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
5655 ;;
5656esac
5657fi
5658PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5659
5660if test -n "$PKG_CONFIG"; then
5661 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
5662echo "${ECHO_T}$PKG_CONFIG" >&6
5663else
5664 echo "$as_me:$LINENO: result: no" >&5
5665echo "${ECHO_T}no" >&6
5666fi
5667
5668 fi
5669
5670 if test "$PKG_CONFIG" = "no" ; then
5671 HAVE_ALSA=no
5672 else
5673 PKG_CONFIG_MIN_VERSION=0.9.0
5674 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5675 echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
5676echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6
5677
67db6aa2 5678 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
439f58ee
JD
5679 echo "$as_me:$LINENO: result: yes" >&5
5680echo "${ECHO_T}yes" >&6
5681 succeeded=yes
5682
5683 echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
5684echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6
5685 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"`
5686 echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
5687echo "${ECHO_T}$ALSA_CFLAGS" >&6
5688
5689 echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
5690echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6
5691 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"`
5692 echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
5693echo "${ECHO_T}$ALSA_LIBS" >&6
5694 else
5695 echo "$as_me:$LINENO: result: no" >&5
5696echo "${ECHO_T}no" >&6
5697 ALSA_CFLAGS=""
5698 ALSA_LIBS=""
5699 ## If we have a custom action on failure, don't print errors, but
5700 ## do set a variable so people can do so.
5701 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
5702
5703 fi
5704
5705
5706
5707 else
5708 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
5709 echo "*** See http://www.freedesktop.org/software/pkgconfig"
5710 fi
5711 fi
5712
5713 if test $succeeded = yes; then
5714 HAVE_ALSA=yes
5715 else
5716 HAVE_ALSA=no
5717 fi
5718
5719 if test $HAVE_ALSA = yes; then
5720 LIBSOUND="$LIBSOUND $ALSA_LIBS"
5721 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
5722
5723cat >>confdefs.h <<\_ACEOF
5724#define HAVE_ALSA 1
5725_ACEOF
5726
5727 fi
5728
f4988be7 5729fi
c0d27fcc
MR
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
22044edf
DL
5748
5749
973a76b1 5750
cffcede7 5751
551ffc27 5752
226e2359 5753
c0d27fcc 5754
f4988be7 5755
98418dba
CW
5756for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5757 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5758 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 5759 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 5760 sys/utsname.h pwd.h
98418dba
CW
5761do
5762as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5763if eval "test \"\${$as_ac_Header+set}\" = set"; then
5764 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5765echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5766if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5767 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5768fi
5769echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5770echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5771else
c0d27fcc
MR
5772 # Is the header compilable?
5773echo "$as_me:$LINENO: checking $ac_header usability" >&5
5774echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5775cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5776/* confdefs.h. */
5777_ACEOF
5778cat confdefs.h >>conftest.$ac_ext
5779cat >>conftest.$ac_ext <<_ACEOF
5780/* end confdefs.h. */
c0d27fcc
MR
5781$ac_includes_default
5782#include <$ac_header>
5783_ACEOF
5784rm -f conftest.$ac_objext
5785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5786 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5787 ac_status=$?
edfaf76d
LK
5788 grep -v '^ *+' conftest.er1 >conftest.err
5789 rm -f conftest.er1
5790 cat conftest.err >&5
c0d27fcc
MR
5791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5792 (exit $ac_status); } &&
8ae52ca6 5793 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
5794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5795 (eval $ac_try) 2>&5
5796 ac_status=$?
5797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5798 (exit $ac_status); }; } &&
5799 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5801 (eval $ac_try) 2>&5
5802 ac_status=$?
5803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5804 (exit $ac_status); }; }; then
5805 ac_header_compiler=yes
5806else
5807 echo "$as_me: failed program was:" >&5
19650fd6
AS
5808sed 's/^/| /' conftest.$ac_ext >&5
5809
c0d27fcc
MR
5810ac_header_compiler=no
5811fi
edfaf76d 5812rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5813echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5814echo "${ECHO_T}$ac_header_compiler" >&6
5815
5816# Is the header present?
5817echo "$as_me:$LINENO: checking $ac_header presence" >&5
5818echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5819cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5820/* confdefs.h. */
5821_ACEOF
5822cat confdefs.h >>conftest.$ac_ext
5823cat >>conftest.$ac_ext <<_ACEOF
5824/* end confdefs.h. */
98418dba 5825#include <$ac_header>
503d2be0 5826_ACEOF
c0d27fcc 5827if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5828 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5829 ac_status=$?
6bae0ccf 5830 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5831 rm -f conftest.er1
5832 cat conftest.err >&5
c0d27fcc 5833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5834 (exit $ac_status); } >/dev/null; then
5835 if test -s conftest.err; then
5836 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5837 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5838 else
5839 ac_cpp_err=
5840 fi
5841else
5842 ac_cpp_err=yes
5843fi
5844if test -z "$ac_cpp_err"; then
c0d27fcc 5845 ac_header_preproc=yes
34ec9ebe 5846else
503d2be0 5847 echo "$as_me: failed program was:" >&5
19650fd6
AS
5848sed 's/^/| /' conftest.$ac_ext >&5
5849
c0d27fcc 5850 ac_header_preproc=no
34ec9ebe 5851fi
98418dba 5852rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5853echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5854echo "${ECHO_T}$ac_header_preproc" >&6
5855
5856# So? What about this header?
edfaf76d
LK
5857case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5858 yes:no: )
c0d27fcc
MR
5859 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5860echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
5861 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5862echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5863 ac_header_preproc=yes
19650fd6 5864 ;;
edfaf76d 5865 no:yes:* )
c0d27fcc
MR
5866 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5867echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
5868 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5869echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5870 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5871echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5872 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5873echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5874 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5875echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
5876 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5877echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5878 (
5879 cat <<\_ASBOX
edfaf76d
LK
5880## ------------------------------------------ ##
5881## Report this to the AC_PACKAGE_NAME lists. ##
5882## ------------------------------------------ ##
19650fd6
AS
5883_ASBOX
5884 ) |
5885 sed "s/^/$as_me: WARNING: /" >&2
5886 ;;
c0d27fcc
MR
5887esac
5888echo "$as_me:$LINENO: checking for $ac_header" >&5
5889echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5890if eval "test \"\${$as_ac_Header+set}\" = set"; then
5891 echo $ECHO_N "(cached) $ECHO_C" >&6
5892else
edfaf76d 5893 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 5894fi
c0d27fcc 5895echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5896echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5897
5898fi
98418dba 5899if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5900 cat >>confdefs.h <<_ACEOF
98418dba 5901#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5902_ACEOF
34ec9ebe 5903
98418dba 5904fi
c0d27fcc 5905
98418dba
CW
5906done
5907
22044edf 5908
f17e308a
JD
5909echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
5910echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6
5911cat >conftest.$ac_ext <<_ACEOF
5912/* confdefs.h. */
5913_ACEOF
5914cat confdefs.h >>conftest.$ac_ext
5915cat >>conftest.$ac_ext <<_ACEOF
5916/* end confdefs.h. */
5917#include <sys/personality.h>
5918int
5919main ()
5920{
5921personality (PER_LINUX32)
5922 ;
5923 return 0;
5924}
5925_ACEOF
5926rm -f conftest.$ac_objext
5927if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5928 (eval $ac_compile) 2>conftest.er1
f17e308a 5929 ac_status=$?
edfaf76d
LK
5930 grep -v '^ *+' conftest.er1 >conftest.err
5931 rm -f conftest.er1
5932 cat conftest.err >&5
f17e308a
JD
5933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5934 (exit $ac_status); } &&
8ae52ca6 5935 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
5936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5937 (eval $ac_try) 2>&5
5938 ac_status=$?
5939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5940 (exit $ac_status); }; } &&
5941 { ac_try='test -s conftest.$ac_objext'
f17e308a
JD
5942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5943 (eval $ac_try) 2>&5
5944 ac_status=$?
5945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5946 (exit $ac_status); }; }; then
5947 emacs_cv_personality_linux32=yes
5948else
5949 echo "$as_me: failed program was:" >&5
5950sed 's/^/| /' conftest.$ac_ext >&5
5951
5952emacs_cv_personality_linux32=no
5953fi
edfaf76d 5954rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f17e308a
JD
5955echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
5956echo "${ECHO_T}$emacs_cv_personality_linux32" >&6
5957
5958if test $emacs_cv_personality_linux32 = yes; then
5959
5960cat >>confdefs.h <<\_ACEOF
5961#define HAVE_PERSONALITY_LINUX32 1
5962_ACEOF
5963
5964fi
5965
5966
22044edf
DL
5967for ac_header in term.h
5968do
5969as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5970echo "$as_me:$LINENO: checking for $ac_header" >&5
5971echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5972if eval "test \"\${$as_ac_Header+set}\" = set"; then
5973 echo $ECHO_N "(cached) $ECHO_C" >&6
5974else
5975 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5976/* confdefs.h. */
5977_ACEOF
5978cat confdefs.h >>conftest.$ac_ext
5979cat >>conftest.$ac_ext <<_ACEOF
5980/* end confdefs.h. */
22044edf
DL
5981#include <$ac_header>
5982_ACEOF
5983if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5984 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5985 ac_status=$?
5986 grep -v '^ *+' conftest.er1 >conftest.err
5987 rm -f conftest.er1
5988 cat conftest.err >&5
5989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5990 (exit $ac_status); } >/dev/null; then
5991 if test -s conftest.err; then
5992 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5993 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22044edf
DL
5994 else
5995 ac_cpp_err=
5996 fi
5997else
5998 ac_cpp_err=yes
5999fi
6000if test -z "$ac_cpp_err"; then
6001 eval "$as_ac_Header=yes"
6002else
6003 echo "$as_me: failed program was:" >&5
19650fd6
AS
6004sed 's/^/| /' conftest.$ac_ext >&5
6005
22044edf
DL
6006 eval "$as_ac_Header=no"
6007fi
6008rm -f conftest.err conftest.$ac_ext
6009fi
6010echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6011echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6012if test `eval echo '${'$as_ac_Header'}'` = yes; then
6013 cat >>confdefs.h <<_ACEOF
6014#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6015_ACEOF
6016
6017fi
6018
6019done
6020
c0d27fcc 6021echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
6022echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6023if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6024 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6025else
503d2be0 6026 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6027/* confdefs.h. */
6028_ACEOF
6029cat confdefs.h >>conftest.$ac_ext
6030cat >>conftest.$ac_ext <<_ACEOF
6031/* end confdefs.h. */
98418dba
CW
6032#include <stdlib.h>
6033#include <stdarg.h>
6034#include <string.h>
6035#include <float.h>
6036
19650fd6
AS
6037int
6038main ()
6039{
6040
6041 ;
6042 return 0;
6043}
98418dba 6044_ACEOF
19650fd6
AS
6045rm -f conftest.$ac_objext
6046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6047 (eval $ac_compile) 2>conftest.er1
cd958eb3 6048 ac_status=$?
edfaf76d
LK
6049 grep -v '^ *+' conftest.er1 >conftest.err
6050 rm -f conftest.er1
6051 cat conftest.err >&5
cd958eb3 6052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 6053 (exit $ac_status); } &&
8ae52ca6 6054 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
6055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6056 (eval $ac_try) 2>&5
6057 ac_status=$?
6058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6059 (exit $ac_status); }; } &&
6060 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
6061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6062 (eval $ac_try) 2>&5
6063 ac_status=$?
6064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6065 (exit $ac_status); }; }; then
98418dba 6066 ac_cv_header_stdc=yes
ba4481b5 6067else
503d2be0 6068 echo "$as_me: failed program was:" >&5
19650fd6
AS
6069sed 's/^/| /' conftest.$ac_ext >&5
6070
6071ac_cv_header_stdc=no
ba4481b5 6072fi
edfaf76d 6073rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6074
6075if test $ac_cv_header_stdc = yes; then
6076 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6077 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6078/* confdefs.h. */
6079_ACEOF
6080cat confdefs.h >>conftest.$ac_ext
6081cat >>conftest.$ac_ext <<_ACEOF
6082/* end confdefs.h. */
98418dba
CW
6083#include <string.h>
6084
6085_ACEOF
6086if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6087 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6088 :
6089else
6090 ac_cv_header_stdc=no
ba4481b5 6091fi
98418dba 6092rm -f conftest*
ba4481b5
DL
6093
6094fi
6095
98418dba
CW
6096if test $ac_cv_header_stdc = yes; then
6097 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6098 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6099/* confdefs.h. */
6100_ACEOF
6101cat confdefs.h >>conftest.$ac_ext
6102cat >>conftest.$ac_ext <<_ACEOF
6103/* end confdefs.h. */
98418dba
CW
6104#include <stdlib.h>
6105
6106_ACEOF
6107if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6108 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6109 :
6110else
6111 ac_cv_header_stdc=no
6112fi
6113rm -f conftest*
6114
6115fi
6116
6117if test $ac_cv_header_stdc = yes; then
6118 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6119 if test "$cross_compiling" = yes; then
6120 :
d42122a3 6121else
503d2be0 6122 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6123/* confdefs.h. */
6124_ACEOF
6125cat confdefs.h >>conftest.$ac_ext
6126cat >>conftest.$ac_ext <<_ACEOF
6127/* end confdefs.h. */
98418dba
CW
6128#include <ctype.h>
6129#if ((' ' & 0x0FF) == 0x020)
6130# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6131# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6132#else
19650fd6 6133# define ISLOWER(c) \
edfaf76d
LK
6134 (('a' <= (c) && (c) <= 'i') \
6135 || ('j' <= (c) && (c) <= 'r') \
6136 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6137# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6138#endif
6139
6140#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6141int
6142main ()
6143{
98418dba
CW
6144 int i;
6145 for (i = 0; i < 256; i++)
6146 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6147 || toupper (i) != TOUPPER (i))
98418dba
CW
6148 exit(2);
6149 exit (0);
503d2be0
AS
6150}
6151_ACEOF
98418dba 6152rm -f conftest$ac_exeext
c0d27fcc 6153if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 6154 (eval $ac_link) 2>&5
503d2be0 6155 ac_status=$?
c0d27fcc 6156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6157 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 6158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6159 (eval $ac_try) 2>&5
6160 ac_status=$?
c0d27fcc 6161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6162 (exit $ac_status); }; }; then
98418dba 6163 :
d42122a3 6164else
98418dba
CW
6165 echo "$as_me: program exited with status $ac_status" >&5
6166echo "$as_me: failed program was:" >&5
19650fd6
AS
6167sed 's/^/| /' conftest.$ac_ext >&5
6168
c0d27fcc 6169( exit $ac_status )
98418dba 6170ac_cv_header_stdc=no
d42122a3 6171fi
edfaf76d 6172rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6173fi
98418dba
CW
6174fi
6175fi
c0d27fcc 6176echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
98418dba
CW
6177echo "${ECHO_T}$ac_cv_header_stdc" >&6
6178if test $ac_cv_header_stdc = yes; then
6179
c0d27fcc 6180cat >>confdefs.h <<\_ACEOF
98418dba 6181#define STDC_HEADERS 1
c0d27fcc 6182_ACEOF
d42122a3
DL
6183
6184fi
6185
c0d27fcc 6186echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
6187echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
6188if test "${ac_cv_header_time+set}" = set; then
503d2be0 6189 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6190else
503d2be0 6191 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6192/* confdefs.h. */
6193_ACEOF
6194cat confdefs.h >>conftest.$ac_ext
6195cat >>conftest.$ac_ext <<_ACEOF
6196/* end confdefs.h. */
ba4481b5 6197#include <sys/types.h>
98418dba 6198#include <sys/time.h>
ba4481b5 6199#include <time.h>
503d2be0
AS
6200
6201int
6202main ()
6203{
98418dba
CW
6204if ((struct tm *) 0)
6205return 0;
503d2be0
AS
6206 ;
6207 return 0;
6208}
6209_ACEOF
6210rm -f conftest.$ac_objext
c0d27fcc 6211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6212 (eval $ac_compile) 2>conftest.er1
503d2be0 6213 ac_status=$?
edfaf76d
LK
6214 grep -v '^ *+' conftest.er1 >conftest.err
6215 rm -f conftest.er1
6216 cat conftest.err >&5
c0d27fcc 6217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6218 (exit $ac_status); } &&
8ae52ca6 6219 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
6220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6221 (eval $ac_try) 2>&5
6222 ac_status=$?
6223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6224 (exit $ac_status); }; } &&
6225 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6227 (eval $ac_try) 2>&5
6228 ac_status=$?
c0d27fcc 6229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6230 (exit $ac_status); }; }; then
98418dba 6231 ac_cv_header_time=yes
ba4481b5 6232else
503d2be0 6233 echo "$as_me: failed program was:" >&5
19650fd6
AS
6234sed 's/^/| /' conftest.$ac_ext >&5
6235
98418dba 6236ac_cv_header_time=no
ba4481b5 6237fi
edfaf76d 6238rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6239fi
c0d27fcc 6240echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
6241echo "${ECHO_T}$ac_cv_header_time" >&6
6242if test $ac_cv_header_time = yes; then
503d2be0 6243
c0d27fcc 6244cat >>confdefs.h <<\_ACEOF
98418dba 6245#define TIME_WITH_SYS_TIME 1
c0d27fcc 6246_ACEOF
ba4481b5
DL
6247
6248fi
6249
cd958eb3
MB
6250echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6251echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
6252if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6253 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6254else
503d2be0 6255 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6256/* confdefs.h. */
6257_ACEOF
6258cat confdefs.h >>conftest.$ac_ext
6259cat >>conftest.$ac_ext <<_ACEOF
6260/* end confdefs.h. */
cd958eb3
MB
6261$ac_includes_default
6262int
6263main ()
6264{
6265#ifndef sys_siglist
6266 char *p = (char *) sys_siglist;
98418dba 6267#endif
503d2be0 6268
cd958eb3
MB
6269 ;
6270 return 0;
6271}
6272_ACEOF
6273rm -f conftest.$ac_objext
6274if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6275 (eval $ac_compile) 2>conftest.er1
cd958eb3 6276 ac_status=$?
edfaf76d
LK
6277 grep -v '^ *+' conftest.er1 >conftest.err
6278 rm -f conftest.er1
6279 cat conftest.err >&5
cd958eb3
MB
6280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6281 (exit $ac_status); } &&
8ae52ca6 6282 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
6283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6284 (eval $ac_try) 2>&5
6285 ac_status=$?
6286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6287 (exit $ac_status); }; } &&
6288 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
6289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6290 (eval $ac_try) 2>&5
6291 ac_status=$?
6292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6293 (exit $ac_status); }; }; then
6294 ac_cv_have_decl_sys_siglist=yes
6295else
6296 echo "$as_me: failed program was:" >&5
19650fd6
AS
6297sed 's/^/| /' conftest.$ac_ext >&5
6298
cd958eb3
MB
6299ac_cv_have_decl_sys_siglist=no
6300fi
edfaf76d 6301rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
6302fi
6303echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6304echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
6305if test $ac_cv_have_decl_sys_siglist = yes; then
6306
6307cat >>confdefs.h <<_ACEOF
6308#define HAVE_DECL_SYS_SIGLIST 1
6309_ACEOF
6310
6311
6312else
6313 cat >>confdefs.h <<_ACEOF
6314#define HAVE_DECL_SYS_SIGLIST 0
6315_ACEOF
6316
6317
6318fi
6319
6320
6321if test $ac_cv_have_decl_sys_siglist != yes; then
6322 # For Tru64, at least:
6323 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6324echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
6325if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
6326 echo $ECHO_N "(cached) $ECHO_C" >&6
6327else
6328 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6329/* confdefs.h. */
6330_ACEOF
6331cat confdefs.h >>conftest.$ac_ext
6332cat >>conftest.$ac_ext <<_ACEOF
6333/* end confdefs.h. */
cd958eb3 6334$ac_includes_default
503d2be0
AS
6335int
6336main ()
6337{
cd958eb3
MB
6338#ifndef __sys_siglist
6339 char *p = (char *) __sys_siglist;
6340#endif
6341
503d2be0
AS
6342 ;
6343 return 0;
6344}
6345_ACEOF
6346rm -f conftest.$ac_objext
c0d27fcc 6347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6348 (eval $ac_compile) 2>conftest.er1
503d2be0 6349 ac_status=$?
edfaf76d
LK
6350 grep -v '^ *+' conftest.er1 >conftest.err
6351 rm -f conftest.er1
6352 cat conftest.err >&5
c0d27fcc 6353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6354 (exit $ac_status); } &&
8ae52ca6 6355 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
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'
c0d27fcc 6362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6363 (eval $ac_try) 2>&5
6364 ac_status=$?
c0d27fcc 6365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6366 (exit $ac_status); }; }; then
cd958eb3 6367 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6368else
503d2be0 6369 echo "$as_me: failed program was:" >&5
19650fd6
AS
6370sed 's/^/| /' conftest.$ac_ext >&5
6371
cd958eb3 6372ac_cv_have_decl___sys_siglist=no
ba4481b5 6373fi
edfaf76d 6374rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6375fi
cd958eb3
MB
6376echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6377echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6
6378if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6379
cd958eb3
MB
6380cat >>confdefs.h <<_ACEOF
6381#define HAVE_DECL___SYS_SIGLIST 1
6382_ACEOF
6383
6384
6385else
6386 cat >>confdefs.h <<_ACEOF
6387#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 6388_ACEOF
503d2be0 6389
cd958eb3 6390
ba4481b5
DL
6391fi
6392
cd958eb3
MB
6393
6394 if test $ac_cv_have_decl___sys_siglist = yes; then
6395
6396cat >>confdefs.h <<\_ACEOF
6397#define sys_siglist __sys_siglist
6398_ACEOF
6399
6400 fi
6401fi
c0d27fcc 6402echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
6403echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
6404if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 6405 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6406else
503d2be0 6407 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6408/* confdefs.h. */
6409_ACEOF
6410cat confdefs.h >>conftest.$ac_ext
6411cat >>conftest.$ac_ext <<_ACEOF
6412/* end confdefs.h. */
98418dba
CW
6413#include <sys/types.h>
6414#include <sys/wait.h>
6415#ifndef WEXITSTATUS
6416# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6417#endif
6418#ifndef WIFEXITED
6419# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 6420#endif
503d2be0
AS
6421
6422int
6423main ()
6424{
98418dba
CW
6425 int s;
6426 wait (&s);
6427 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
6428 ;
6429 return 0;
6430}
6431_ACEOF
98418dba 6432rm -f conftest.$ac_objext
c0d27fcc 6433if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6434 (eval $ac_compile) 2>conftest.er1
503d2be0 6435 ac_status=$?
edfaf76d
LK
6436 grep -v '^ *+' conftest.er1 >conftest.err
6437 rm -f conftest.er1
6438 cat conftest.err >&5
c0d27fcc 6439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6440 (exit $ac_status); } &&
8ae52ca6 6441 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
6442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6443 (eval $ac_try) 2>&5
6444 ac_status=$?
6445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6446 (exit $ac_status); }; } &&
6447 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6449 (eval $ac_try) 2>&5
6450 ac_status=$?
c0d27fcc 6451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6452 (exit $ac_status); }; }; then
98418dba 6453 ac_cv_header_sys_wait_h=yes
ba4481b5 6454else
503d2be0 6455 echo "$as_me: failed program was:" >&5
19650fd6
AS
6456sed 's/^/| /' conftest.$ac_ext >&5
6457
98418dba 6458ac_cv_header_sys_wait_h=no
ba4481b5 6459fi
edfaf76d 6460rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6461fi
c0d27fcc 6462echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
6463echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
6464if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 6465
c0d27fcc 6466cat >>confdefs.h <<\_ACEOF
98418dba 6467#define HAVE_SYS_WAIT_H 1
c0d27fcc 6468_ACEOF
ba4481b5 6469
ba4481b5
DL
6470fi
6471
c0d27fcc
MR
6472
6473echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
6474echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
6475if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 6476 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 6477else
503d2be0 6478 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6479/* confdefs.h. */
6480_ACEOF
6481cat confdefs.h >>conftest.$ac_ext
6482cat >>conftest.$ac_ext <<_ACEOF
6483/* end confdefs.h. */
98418dba
CW
6484#ifdef TIME_WITH_SYS_TIME
6485#include <sys/time.h>
6486#include <time.h>
6487#else
6488#ifdef HAVE_SYS_TIME_H
6489#include <sys/time.h>
6490#else
1113b624 6491#include <time.h>
98418dba
CW
6492#endif
6493#endif
6494#ifdef HAVE_UTIME_H
6495#include <utime.h>
6496#endif
503d2be0
AS
6497int
6498main ()
6499{
98418dba 6500static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
6501 ;
6502 return 0;
6503}
6504_ACEOF
98418dba 6505rm -f conftest.$ac_objext
c0d27fcc 6506if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6507 (eval $ac_compile) 2>conftest.er1
503d2be0 6508 ac_status=$?
edfaf76d
LK
6509 grep -v '^ *+' conftest.er1 >conftest.err
6510 rm -f conftest.er1
6511 cat conftest.err >&5
c0d27fcc 6512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6513 (exit $ac_status); } &&
8ae52ca6 6514 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
6515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6516 (eval $ac_try) 2>&5
6517 ac_status=$?
6518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6519 (exit $ac_status); }; } &&
6520 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6522 (eval $ac_try) 2>&5
6523 ac_status=$?
c0d27fcc 6524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6525 (exit $ac_status); }; }; then
98418dba 6526 emacs_cv_struct_utimbuf=yes
1113b624 6527else
503d2be0 6528 echo "$as_me: failed program was:" >&5
19650fd6
AS
6529sed 's/^/| /' conftest.$ac_ext >&5
6530
98418dba 6531emacs_cv_struct_utimbuf=no
1113b624 6532fi
edfaf76d 6533rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 6534fi
c0d27fcc 6535echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
6536echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
6537if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 6538
c0d27fcc 6539cat >>confdefs.h <<\_ACEOF
98418dba 6540#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 6541_ACEOF
1113b624
PE
6542
6543fi
ba4481b5 6544
c0d27fcc 6545echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
6546echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6547if test "${ac_cv_type_signal+set}" = set; then
503d2be0 6548 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6549else
98418dba 6550 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6551/* confdefs.h. */
6552_ACEOF
6553cat confdefs.h >>conftest.$ac_ext
6554cat >>conftest.$ac_ext <<_ACEOF
6555/* end confdefs.h. */
7397acc4 6556#include <sys/types.h>
98418dba
CW
6557#include <signal.h>
6558#ifdef signal
6559# undef signal
6560#endif
6561#ifdef __cplusplus
6562extern "C" void (*signal (int, void (*)(int)))(int);
6563#else
6564void (*signal ()) ();
6565#endif
6566
503d2be0
AS
6567int
6568main ()
6569{
98418dba 6570int i;
503d2be0
AS
6571 ;
6572 return 0;
6573}
6574_ACEOF
98418dba 6575rm -f conftest.$ac_objext
c0d27fcc 6576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6577 (eval $ac_compile) 2>conftest.er1
503d2be0 6578 ac_status=$?
edfaf76d
LK
6579 grep -v '^ *+' conftest.er1 >conftest.err
6580 rm -f conftest.er1
6581 cat conftest.err >&5
c0d27fcc 6582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6583 (exit $ac_status); } &&
8ae52ca6 6584 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
6585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6586 (eval $ac_try) 2>&5
6587 ac_status=$?
6588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6589 (exit $ac_status); }; } &&
6590 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6592 (eval $ac_try) 2>&5
6593 ac_status=$?
c0d27fcc 6594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6595 (exit $ac_status); }; }; then
98418dba 6596 ac_cv_type_signal=void
503d2be0
AS
6597else
6598 echo "$as_me: failed program was:" >&5
19650fd6
AS
6599sed 's/^/| /' conftest.$ac_ext >&5
6600
98418dba 6601ac_cv_type_signal=int
503d2be0 6602fi
edfaf76d 6603rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6604fi
c0d27fcc 6605echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 6606echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 6607
c0d27fcc 6608cat >>confdefs.h <<_ACEOF
98418dba 6609#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
6610_ACEOF
6611
503d2be0 6612
c0d27fcc
MR
6613
6614echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
6615echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
6616if test "${emacs_cv_speed_t+set}" = set; then
6617 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6618else
98418dba 6619 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6620/* confdefs.h. */
6621_ACEOF
6622cat confdefs.h >>conftest.$ac_ext
6623cat >>conftest.$ac_ext <<_ACEOF
6624/* end confdefs.h. */
98418dba 6625#include <termios.h>
98418dba
CW
6626int
6627main ()
6628{
6629speed_t x = 1;
6630 ;
6631 return 0;
6632}
6633_ACEOF
6634rm -f conftest.$ac_objext
c0d27fcc 6635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6636 (eval $ac_compile) 2>conftest.er1
98418dba 6637 ac_status=$?
edfaf76d
LK
6638 grep -v '^ *+' conftest.er1 >conftest.err
6639 rm -f conftest.er1
6640 cat conftest.err >&5
c0d27fcc 6641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6642 (exit $ac_status); } &&
8ae52ca6 6643 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
6644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6645 (eval $ac_try) 2>&5
6646 ac_status=$?
6647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6648 (exit $ac_status); }; } &&
6649 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6651 (eval $ac_try) 2>&5
6652 ac_status=$?
c0d27fcc 6653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6654 (exit $ac_status); }; }; then
6655 emacs_cv_speed_t=yes
6656else
6657 echo "$as_me: failed program was:" >&5
19650fd6
AS
6658sed 's/^/| /' conftest.$ac_ext >&5
6659
98418dba
CW
6660emacs_cv_speed_t=no
6661fi
edfaf76d 6662rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 6663fi
c0d27fcc 6664echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
6665echo "${ECHO_T}$emacs_cv_speed_t" >&6
6666if test $emacs_cv_speed_t = yes; then
b936fae4 6667
c0d27fcc 6668cat >>confdefs.h <<\_ACEOF
98418dba 6669#define HAVE_SPEED_T 1
c0d27fcc 6670_ACEOF
98418dba 6671
7397acc4
DL
6672fi
6673
c0d27fcc 6674echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
6675echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
6676if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 6677 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6678else
503d2be0 6679 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6680/* confdefs.h. */
6681_ACEOF
6682cat confdefs.h >>conftest.$ac_ext
6683cat >>conftest.$ac_ext <<_ACEOF
6684/* end confdefs.h. */
98418dba
CW
6685#ifdef TIME_WITH_SYS_TIME
6686#include <sys/time.h>
6687#include <time.h>
6688#else
6689#ifdef HAVE_SYS_TIME_H
6690#include <sys/time.h>
6691#else
6692#include <time.h>
6693#endif
6694#endif
503d2be0
AS
6695int
6696main ()
6697{
98418dba 6698static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
6699 ;
6700 return 0;
6701}
6702_ACEOF
6703rm -f conftest.$ac_objext
c0d27fcc 6704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6705 (eval $ac_compile) 2>conftest.er1
503d2be0 6706 ac_status=$?
edfaf76d
LK
6707 grep -v '^ *+' conftest.er1 >conftest.err
6708 rm -f conftest.er1
6709 cat conftest.err >&5
c0d27fcc 6710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6711 (exit $ac_status); } &&
8ae52ca6 6712 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
c0d27fcc 6713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6714 (eval $ac_try) 2>&5
6715 ac_status=$?
c0d27fcc 6716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
6717 (exit $ac_status); }; } &&
6718 { ac_try='test -s conftest.$ac_objext'
6719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6720 (eval $ac_try) 2>&5
6721 ac_status=$?
6722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6723 (exit $ac_status); }; }; then
6724 emacs_cv_struct_timeval=yes
6725else
503d2be0 6726 echo "$as_me: failed program was:" >&5
19650fd6
AS
6727sed 's/^/| /' conftest.$ac_ext >&5
6728
98418dba 6729emacs_cv_struct_timeval=no
7397acc4 6730fi
edfaf76d 6731rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6732fi
c0d27fcc 6733echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
6734echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
6735HAVE_TIMEVAL=$emacs_cv_struct_timeval
6736if test $emacs_cv_struct_timeval = yes; then
b936fae4 6737
c0d27fcc 6738cat >>confdefs.h <<\_ACEOF
98418dba 6739#define HAVE_TIMEVAL 1
c0d27fcc 6740_ACEOF
7397acc4
DL
6741
6742fi
6743
c0d27fcc 6744echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
6745echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
6746if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 6747 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6748else
503d2be0 6749 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6750/* confdefs.h. */
6751_ACEOF
6752cat confdefs.h >>conftest.$ac_ext
6753cat >>conftest.$ac_ext <<_ACEOF
6754/* end confdefs.h. */
98418dba 6755#include <math.h>
503d2be0
AS
6756int
6757main ()
6758{
98418dba 6759static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
6760 ;
6761 return 0;
ba4481b5 6762}
503d2be0
AS
6763_ACEOF
6764rm -f conftest.$ac_objext
c0d27fcc 6765if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6766 (eval $ac_compile) 2>conftest.er1
503d2be0 6767 ac_status=$?
edfaf76d
LK
6768 grep -v '^ *+' conftest.er1 >conftest.err
6769 rm -f conftest.er1
6770 cat conftest.err >&5
c0d27fcc 6771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6772 (exit $ac_status); } &&
8ae52ca6 6773 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
6774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6775 (eval $ac_try) 2>&5
6776 ac_status=$?
6777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6778 (exit $ac_status); }; } &&
6779 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6781 (eval $ac_try) 2>&5
6782 ac_status=$?
c0d27fcc 6783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6784 (exit $ac_status); }; }; then
98418dba 6785 emacs_cv_struct_exception=yes
ba4481b5 6786else
503d2be0 6787 echo "$as_me: failed program was:" >&5
19650fd6
AS
6788sed 's/^/| /' conftest.$ac_ext >&5
6789
98418dba 6790emacs_cv_struct_exception=no
ba4481b5 6791fi
edfaf76d 6792rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6793fi
c0d27fcc 6794echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
6795echo "${ECHO_T}$emacs_cv_struct_exception" >&6
6796HAVE_EXCEPTION=$emacs_cv_struct_exception
6797if test $emacs_cv_struct_exception != yes; then
b936fae4 6798
c0d27fcc 6799cat >>confdefs.h <<\_ACEOF
98418dba 6800#define NO_MATHERR 1
c0d27fcc 6801_ACEOF
ba4481b5
DL
6802
6803fi
6804
7862d3a8
AS
6805
6806for ac_header in sys/socket.h
6807do
6808as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6809if eval "test \"\${$as_ac_Header+set}\" = set"; then
6810 echo "$as_me:$LINENO: checking for $ac_header" >&5
6811echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6812if eval "test \"\${$as_ac_Header+set}\" = set"; then
6813 echo $ECHO_N "(cached) $ECHO_C" >&6
6814fi
6815echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6816echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6817else
6818 # Is the header compilable?
6819echo "$as_me:$LINENO: checking $ac_header usability" >&5
6820echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6821cat >conftest.$ac_ext <<_ACEOF
6822/* confdefs.h. */
6823_ACEOF
6824cat confdefs.h >>conftest.$ac_ext
6825cat >>conftest.$ac_ext <<_ACEOF
6826/* end confdefs.h. */
6827$ac_includes_default
6828#include <$ac_header>
6829_ACEOF
6830rm -f conftest.$ac_objext
6831if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6832 (eval $ac_compile) 2>conftest.er1
7862d3a8 6833 ac_status=$?
edfaf76d
LK
6834 grep -v '^ *+' conftest.er1 >conftest.err
6835 rm -f conftest.er1
6836 cat conftest.err >&5
7862d3a8
AS
6837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6838 (exit $ac_status); } &&
8ae52ca6 6839 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
6840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6841 (eval $ac_try) 2>&5
6842 ac_status=$?
6843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6844 (exit $ac_status); }; } &&
6845 { ac_try='test -s conftest.$ac_objext'
7862d3a8
AS
6846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6847 (eval $ac_try) 2>&5
6848 ac_status=$?
6849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6850 (exit $ac_status); }; }; then
6851 ac_header_compiler=yes
6852else
6853 echo "$as_me: failed program was:" >&5
6854sed 's/^/| /' conftest.$ac_ext >&5
6855
6856ac_header_compiler=no
6857fi
edfaf76d 6858rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8
AS
6859echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6860echo "${ECHO_T}$ac_header_compiler" >&6
6861
6862# Is the header present?
6863echo "$as_me:$LINENO: checking $ac_header presence" >&5
6864echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6865cat >conftest.$ac_ext <<_ACEOF
6866/* confdefs.h. */
6867_ACEOF
6868cat confdefs.h >>conftest.$ac_ext
6869cat >>conftest.$ac_ext <<_ACEOF
6870/* end confdefs.h. */
6871#include <$ac_header>
6872_ACEOF
6873if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6874 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6875 ac_status=$?
6876 grep -v '^ *+' conftest.er1 >conftest.err
6877 rm -f conftest.er1
6878 cat conftest.err >&5
6879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6880 (exit $ac_status); } >/dev/null; then
6881 if test -s conftest.err; then
6882 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 6883 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7862d3a8
AS
6884 else
6885 ac_cpp_err=
6886 fi
6887else
6888 ac_cpp_err=yes
6889fi
6890if test -z "$ac_cpp_err"; then
6891 ac_header_preproc=yes
6892else
6893 echo "$as_me: failed program was:" >&5
6894sed 's/^/| /' conftest.$ac_ext >&5
6895
6896 ac_header_preproc=no
6897fi
6898rm -f conftest.err conftest.$ac_ext
6899echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6900echo "${ECHO_T}$ac_header_preproc" >&6
6901
6902# So? What about this header?
edfaf76d
LK
6903case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6904 yes:no: )
7862d3a8
AS
6905 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6906echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6907 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6908echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6909 ac_header_preproc=yes
7862d3a8 6910 ;;
edfaf76d 6911 no:yes:* )
7862d3a8
AS
6912 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6913echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6914 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6915echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6916 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6917echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6918 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6919echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
6920 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6921echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6922 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6923echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7862d3a8
AS
6924 (
6925 cat <<\_ASBOX
edfaf76d
LK
6926## ------------------------------------------ ##
6927## Report this to the AC_PACKAGE_NAME lists. ##
6928## ------------------------------------------ ##
7862d3a8
AS
6929_ASBOX
6930 ) |
6931 sed "s/^/$as_me: WARNING: /" >&2
6932 ;;
6933esac
6934echo "$as_me:$LINENO: checking for $ac_header" >&5
6935echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6936if eval "test \"\${$as_ac_Header+set}\" = set"; then
6937 echo $ECHO_N "(cached) $ECHO_C" >&6
6938else
edfaf76d 6939 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8
AS
6940fi
6941echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6942echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6943
6944fi
6945if test `eval echo '${'$as_ac_Header'}'` = yes; then
6946 cat >>confdefs.h <<_ACEOF
6947#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6948_ACEOF
6949
6950fi
6951
6952done
6953
6954
6955for ac_header in net/if.h
6956do
6957as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6958echo "$as_me:$LINENO: checking for $ac_header" >&5
6959echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6960if eval "test \"\${$as_ac_Header+set}\" = set"; then
6961 echo $ECHO_N "(cached) $ECHO_C" >&6
6962else
6963 cat >conftest.$ac_ext <<_ACEOF
6964/* confdefs.h. */
6965_ACEOF
6966cat confdefs.h >>conftest.$ac_ext
6967cat >>conftest.$ac_ext <<_ACEOF
6968/* end confdefs.h. */
6969$ac_includes_default
6970#if HAVE_SYS_SOCKET_H
6971#include <sys/socket.h>
6972#endif
6973
6974#include <$ac_header>
6975_ACEOF
6976rm -f conftest.$ac_objext
6977if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6978 (eval $ac_compile) 2>conftest.er1
7862d3a8 6979 ac_status=$?
edfaf76d
LK
6980 grep -v '^ *+' conftest.er1 >conftest.err
6981 rm -f conftest.er1
6982 cat conftest.err >&5
7862d3a8
AS
6983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6984 (exit $ac_status); } &&
8ae52ca6 6985 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
6986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6987 (eval $ac_try) 2>&5
6988 ac_status=$?
6989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6990 (exit $ac_status); }; } &&
6991 { ac_try='test -s conftest.$ac_objext'
7862d3a8
AS
6992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6993 (eval $ac_try) 2>&5
6994 ac_status=$?
6995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6996 (exit $ac_status); }; }; then
6997 eval "$as_ac_Header=yes"
6998else
6999 echo "$as_me: failed program was:" >&5
7000sed 's/^/| /' conftest.$ac_ext >&5
7001
7002eval "$as_ac_Header=no"
7003fi
edfaf76d 7004rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8
AS
7005fi
7006echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7007echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7008if test `eval echo '${'$as_ac_Header'}'` = yes; then
7009 cat >>confdefs.h <<_ACEOF
7010#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7011_ACEOF
7012
7013fi
7014
7015done
7016
7017
c0d27fcc 7018echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
7019echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
7020if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7021 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7022else
503d2be0 7023 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7024/* confdefs.h. */
7025_ACEOF
7026cat confdefs.h >>conftest.$ac_ext
7027cat >>conftest.$ac_ext <<_ACEOF
7028/* end confdefs.h. */
98418dba
CW
7029#include <sys/types.h>
7030#include <time.h>
7397acc4 7031
503d2be0
AS
7032int
7033main ()
7034{
98418dba 7035struct tm *tp; tp->tm_sec;
503d2be0
AS
7036 ;
7037 return 0;
7038}
7039_ACEOF
7040rm -f conftest.$ac_objext
c0d27fcc 7041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7042 (eval $ac_compile) 2>conftest.er1
503d2be0 7043 ac_status=$?
edfaf76d
LK
7044 grep -v '^ *+' conftest.er1 >conftest.err
7045 rm -f conftest.er1
7046 cat conftest.err >&5
c0d27fcc 7047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7048 (exit $ac_status); } &&
8ae52ca6 7049 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
7050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7051 (eval $ac_try) 2>&5
7052 ac_status=$?
7053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7054 (exit $ac_status); }; } &&
7055 { ac_try='test -s conftest.$ac_objext'
35996d22
AS
7056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7057 (eval $ac_try) 2>&5
7058 ac_status=$?
7059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7060 (exit $ac_status); }; }; then
7061 ac_cv_struct_tm=time.h
7062else
503d2be0 7063 echo "$as_me: failed program was:" >&5
19650fd6
AS
7064sed 's/^/| /' conftest.$ac_ext >&5
7065
98418dba 7066ac_cv_struct_tm=sys/time.h
7397acc4 7067fi
edfaf76d 7068rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7069fi
c0d27fcc 7070echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
7071echo "${ECHO_T}$ac_cv_struct_tm" >&6
7072if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7073
c0d27fcc 7074cat >>confdefs.h <<\_ACEOF
98418dba 7075#define TM_IN_SYS_TIME 1
c0d27fcc 7076_ACEOF
7397acc4
DL
7077
7078fi
ba4481b5 7079
c0d27fcc 7080echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
7081echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
7082if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7083 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7084else
98418dba 7085 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7086/* confdefs.h. */
7087_ACEOF
7088cat confdefs.h >>conftest.$ac_ext
7089cat >>conftest.$ac_ext <<_ACEOF
7090/* end confdefs.h. */
98418dba
CW
7091#include <sys/types.h>
7092#include <$ac_cv_struct_tm>
ba4481b5 7093
c0d27fcc 7094
98418dba
CW
7095int
7096main ()
7097{
7098static struct tm ac_aggr;
7099if (ac_aggr.tm_zone)
7100return 0;
7101 ;
7102 return 0;
7103}
7104_ACEOF
7105rm -f conftest.$ac_objext
c0d27fcc 7106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7107 (eval $ac_compile) 2>conftest.er1
98418dba 7108 ac_status=$?
edfaf76d
LK
7109 grep -v '^ *+' conftest.er1 >conftest.err
7110 rm -f conftest.er1
7111 cat conftest.err >&5
c0d27fcc 7112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7113 (exit $ac_status); } &&
8ae52ca6 7114 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
7115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7116 (eval $ac_try) 2>&5
7117 ac_status=$?
7118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7119 (exit $ac_status); }; } &&
7120 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7122 (eval $ac_try) 2>&5
7123 ac_status=$?
c0d27fcc 7124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7125 (exit $ac_status); }; }; then
7126 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7127else
98418dba 7128 echo "$as_me: failed program was:" >&5
19650fd6
AS
7129sed 's/^/| /' conftest.$ac_ext >&5
7130
6bae0ccf 7131cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7132/* confdefs.h. */
7133_ACEOF
7134cat confdefs.h >>conftest.$ac_ext
7135cat >>conftest.$ac_ext <<_ACEOF
7136/* end confdefs.h. */
6bae0ccf
DL
7137#include <sys/types.h>
7138#include <$ac_cv_struct_tm>
7139
7140
7141int
7142main ()
7143{
7144static struct tm ac_aggr;
7145if (sizeof ac_aggr.tm_zone)
7146return 0;
7147 ;
7148 return 0;
7149}
7150_ACEOF
7151rm -f conftest.$ac_objext
7152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7153 (eval $ac_compile) 2>conftest.er1
6bae0ccf 7154 ac_status=$?
edfaf76d
LK
7155 grep -v '^ *+' conftest.er1 >conftest.err
7156 rm -f conftest.er1
7157 cat conftest.err >&5
6bae0ccf
DL
7158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7159 (exit $ac_status); } &&
8ae52ca6 7160 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
7161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7162 (eval $ac_try) 2>&5
7163 ac_status=$?
7164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7165 (exit $ac_status); }; } &&
7166 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
7167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7168 (eval $ac_try) 2>&5
7169 ac_status=$?
7170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7171 (exit $ac_status); }; }; then
7172 ac_cv_member_struct_tm_tm_zone=yes
7173else
7174 echo "$as_me: failed program was:" >&5
19650fd6
AS
7175sed 's/^/| /' conftest.$ac_ext >&5
7176
98418dba 7177ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7178fi
edfaf76d 7179rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7180fi
edfaf76d 7181rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7182fi
c0d27fcc 7183echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
7184echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
7185if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7186
c0d27fcc 7187cat >>confdefs.h <<_ACEOF
98418dba 7188#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7189_ACEOF
7190
ba4481b5 7191
98418dba 7192fi
ba4481b5 7193
98418dba 7194if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7195
c0d27fcc 7196cat >>confdefs.h <<\_ACEOF
98418dba 7197#define HAVE_TM_ZONE 1
c0d27fcc 7198_ACEOF
ba4481b5 7199
ba4481b5 7200else
c0d27fcc 7201 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
7202echo $ECHO_N "checking for tzname... $ECHO_C" >&6
7203if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 7204 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7205else
98418dba 7206 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7207/* confdefs.h. */
7208_ACEOF
7209cat confdefs.h >>conftest.$ac_ext
7210cat >>conftest.$ac_ext <<_ACEOF
7211/* end confdefs.h. */
98418dba
CW
7212#include <time.h>
7213#ifndef tzname /* For SGI. */
7214extern char *tzname[]; /* RS6000 and others reject char **tzname. */
7215#endif
7216
98418dba
CW
7217int
7218main ()
7219{
7220atoi(*tzname);
7221 ;
7222 return 0;
7223}
7224_ACEOF
7225rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7226if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 7227 (eval $ac_link) 2>conftest.er1
98418dba 7228 ac_status=$?
edfaf76d
LK
7229 grep -v '^ *+' conftest.er1 >conftest.err
7230 rm -f conftest.er1
7231 cat conftest.err >&5
c0d27fcc 7232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7233 (exit $ac_status); } &&
8ae52ca6 7234 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
7235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7236 (eval $ac_try) 2>&5
7237 ac_status=$?
7238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7239 (exit $ac_status); }; } &&
7240 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7242 (eval $ac_try) 2>&5
7243 ac_status=$?
c0d27fcc 7244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7245 (exit $ac_status); }; }; then
7246 ac_cv_var_tzname=yes
7247else
7248 echo "$as_me: failed program was:" >&5
19650fd6
AS
7249sed 's/^/| /' conftest.$ac_ext >&5
7250
98418dba 7251ac_cv_var_tzname=no
ba4481b5 7252fi
edfaf76d
LK
7253rm -f conftest.err conftest.$ac_objext \
7254 conftest$ac_exeext conftest.$ac_ext
98418dba 7255fi
c0d27fcc 7256echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
7257echo "${ECHO_T}$ac_cv_var_tzname" >&6
7258 if test $ac_cv_var_tzname = yes; then
ba4481b5 7259
c0d27fcc 7260cat >>confdefs.h <<\_ACEOF
98418dba 7261#define HAVE_TZNAME 1
c0d27fcc 7262_ACEOF
503d2be0 7263
98418dba
CW
7264 fi
7265fi
503d2be0 7266
c0d27fcc 7267echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
7268echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
7269if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
7270 echo $ECHO_N "(cached) $ECHO_C" >&6
7271else
7272 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7273/* confdefs.h. */
7274_ACEOF
7275cat confdefs.h >>conftest.$ac_ext
7276cat >>conftest.$ac_ext <<_ACEOF
7277/* end confdefs.h. */
98418dba 7278#include <time.h>
b936fae4 7279
98418dba
CW
7280int
7281main ()
7282{
b936fae4
AS
7283static struct tm ac_aggr;
7284if (ac_aggr.tm_gmtoff)
7285return 0;
98418dba
CW
7286 ;
7287 return 0;
7288}
7289_ACEOF
b936fae4 7290rm -f conftest.$ac_objext
c0d27fcc 7291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7292 (eval $ac_compile) 2>conftest.er1
98418dba 7293 ac_status=$?
edfaf76d
LK
7294 grep -v '^ *+' conftest.er1 >conftest.err
7295 rm -f conftest.er1
7296 cat conftest.err >&5
c0d27fcc 7297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7298 (exit $ac_status); } &&
8ae52ca6 7299 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
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); }; } &&
7305 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7307 (eval $ac_try) 2>&5
7308 ac_status=$?
c0d27fcc 7309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7310 (exit $ac_status); }; }; then
b936fae4 7311 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
7312else
7313 echo "$as_me: failed program was:" >&5
19650fd6
AS
7314sed 's/^/| /' conftest.$ac_ext >&5
7315
8799b3e4 7316cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7317/* confdefs.h. */
7318_ACEOF
7319cat confdefs.h >>conftest.$ac_ext
7320cat >>conftest.$ac_ext <<_ACEOF
7321/* end confdefs.h. */
6bae0ccf
DL
7322#include <time.h>
7323
8799b3e4
CW
7324int
7325main ()
7326{
6bae0ccf
DL
7327static struct tm ac_aggr;
7328if (sizeof ac_aggr.tm_gmtoff)
7329return 0;
8799b3e4
CW
7330 ;
7331 return 0;
7332}
7333_ACEOF
6bae0ccf 7334rm -f conftest.$ac_objext
c0d27fcc 7335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7336 (eval $ac_compile) 2>conftest.er1
8799b3e4 7337 ac_status=$?
edfaf76d
LK
7338 grep -v '^ *+' conftest.er1 >conftest.err
7339 rm -f conftest.er1
7340 cat conftest.err >&5
c0d27fcc 7341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 7342 (exit $ac_status); } &&
8ae52ca6 7343 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
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'
c0d27fcc 7350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
7351 (eval $ac_try) 2>&5
7352 ac_status=$?
c0d27fcc 7353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 7354 (exit $ac_status); }; }; then
6bae0ccf 7355 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
7356else
7357 echo "$as_me: failed program was:" >&5
19650fd6
AS
7358sed 's/^/| /' conftest.$ac_ext >&5
7359
6bae0ccf 7360ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7361fi
edfaf76d 7362rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7363fi
edfaf76d 7364rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7365fi
6bae0ccf
DL
7366echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7367echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
7368if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
7369
7370cat >>confdefs.h <<\_ACEOF
7371#define HAVE_TM_GMTOFF 1
7372_ACEOF
7373
7374fi
7375
96f3a036
DL
7376echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
7377echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6
7378if test "${ac_cv_member_struct_ifreq_ifr_flags+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_flags)
7400return 0;
7401 ;
7402 return 0;
7403}
7404_ACEOF
7405rm -f conftest.$ac_objext
7406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7407 (eval $ac_compile) 2>conftest.er1
96f3a036 7408 ac_status=$?
edfaf76d
LK
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); } &&
8ae52ca6 7414 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
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_flags=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_flags)
7450return 0;
7451 ;
7452 return 0;
7453}
7454_ACEOF
7455rm -f conftest.$ac_objext
7456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7457 (eval $ac_compile) 2>conftest.er1
96f3a036 7458 ac_status=$?
edfaf76d
LK
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); } &&
8ae52ca6 7464 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
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_flags=yes
7477else
7478 echo "$as_me: failed program was:" >&5
7479sed 's/^/| /' conftest.$ac_ext >&5
7480
7481ac_cv_member_struct_ifreq_ifr_flags=no
7482fi
edfaf76d 7483rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7484fi
edfaf76d 7485rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7486fi
7487echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
7488echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6
7489if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
7490
7491cat >>confdefs.h <<_ACEOF
7492#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
7493_ACEOF
7494
7495
7496fi
7497echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
7498echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6
7499if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
7500 echo $ECHO_N "(cached) $ECHO_C" >&6
7501else
7502 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7503/* confdefs.h. */
7504_ACEOF
7505cat confdefs.h >>conftest.$ac_ext
7506cat >>conftest.$ac_ext <<_ACEOF
7507/* end confdefs.h. */
7862d3a8
AS
7508$ac_includes_default
7509#if HAVE_SYS_SOCKET_H
7510#include <sys/socket.h>
7511#endif
7512#if HAVE_NET_IF_H
96f3a036 7513#include <net/if.h>
7862d3a8 7514#endif
96f3a036
DL
7515
7516int
7517main ()
7518{
7519static struct ifreq ac_aggr;
7520if (ac_aggr.ifr_hwaddr)
7521return 0;
7522 ;
7523 return 0;
7524}
7525_ACEOF
7526rm -f conftest.$ac_objext
7527if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7528 (eval $ac_compile) 2>conftest.er1
96f3a036 7529 ac_status=$?
edfaf76d
LK
7530 grep -v '^ *+' conftest.er1 >conftest.err
7531 rm -f conftest.er1
7532 cat conftest.err >&5
96f3a036
DL
7533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7534 (exit $ac_status); } &&
8ae52ca6 7535 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
7536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7537 (eval $ac_try) 2>&5
7538 ac_status=$?
7539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7540 (exit $ac_status); }; } &&
7541 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7543 (eval $ac_try) 2>&5
7544 ac_status=$?
7545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7546 (exit $ac_status); }; }; then
7547 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7548else
7549 echo "$as_me: failed program was:" >&5
7550sed 's/^/| /' conftest.$ac_ext >&5
7551
7552cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7553/* confdefs.h. */
7554_ACEOF
7555cat confdefs.h >>conftest.$ac_ext
7556cat >>conftest.$ac_ext <<_ACEOF
7557/* end confdefs.h. */
7862d3a8
AS
7558$ac_includes_default
7559#if HAVE_SYS_SOCKET_H
7560#include <sys/socket.h>
7561#endif
7562#if HAVE_NET_IF_H
96f3a036 7563#include <net/if.h>
7862d3a8 7564#endif
96f3a036
DL
7565
7566int
7567main ()
7568{
7569static struct ifreq ac_aggr;
7570if (sizeof ac_aggr.ifr_hwaddr)
7571return 0;
7572 ;
7573 return 0;
7574}
7575_ACEOF
7576rm -f conftest.$ac_objext
7577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7578 (eval $ac_compile) 2>conftest.er1
96f3a036 7579 ac_status=$?
edfaf76d
LK
7580 grep -v '^ *+' conftest.er1 >conftest.err
7581 rm -f conftest.er1
7582 cat conftest.err >&5
96f3a036
DL
7583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7584 (exit $ac_status); } &&
8ae52ca6 7585 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
7586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7587 (eval $ac_try) 2>&5
7588 ac_status=$?
7589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7590 (exit $ac_status); }; } &&
7591 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7593 (eval $ac_try) 2>&5
7594 ac_status=$?
7595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7596 (exit $ac_status); }; }; then
7597 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7598else
7599 echo "$as_me: failed program was:" >&5
7600sed 's/^/| /' conftest.$ac_ext >&5
7601
7602ac_cv_member_struct_ifreq_ifr_hwaddr=no
7603fi
edfaf76d 7604rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7605fi
edfaf76d 7606rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7607fi
7608echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
7609echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6
7610if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
7611
7612cat >>confdefs.h <<_ACEOF
7613#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
7614_ACEOF
7615
7616
7617fi
7618echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
7619echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6
7620if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
7621 echo $ECHO_N "(cached) $ECHO_C" >&6
7622else
7623 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7624/* confdefs.h. */
7625_ACEOF
7626cat confdefs.h >>conftest.$ac_ext
7627cat >>conftest.$ac_ext <<_ACEOF
7628/* end confdefs.h. */
7862d3a8
AS
7629$ac_includes_default
7630#if HAVE_SYS_SOCKET_H
7631#include <sys/socket.h>
7632#endif
7633#if HAVE_NET_IF_H
96f3a036 7634#include <net/if.h>
7862d3a8 7635#endif
96f3a036
DL
7636
7637int
7638main ()
7639{
7640static struct ifreq ac_aggr;
7641if (ac_aggr.ifr_netmask)
7642return 0;
7643 ;
7644 return 0;
7645}
7646_ACEOF
7647rm -f conftest.$ac_objext
7648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7649 (eval $ac_compile) 2>conftest.er1
96f3a036 7650 ac_status=$?
edfaf76d
LK
7651 grep -v '^ *+' conftest.er1 >conftest.err
7652 rm -f conftest.er1
7653 cat conftest.err >&5
96f3a036
DL
7654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7655 (exit $ac_status); } &&
8ae52ca6 7656 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
7657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7658 (eval $ac_try) 2>&5
7659 ac_status=$?
7660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7661 (exit $ac_status); }; } &&
7662 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7664 (eval $ac_try) 2>&5
7665 ac_status=$?
7666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7667 (exit $ac_status); }; }; then
7668 ac_cv_member_struct_ifreq_ifr_netmask=yes
7669else
7670 echo "$as_me: failed program was:" >&5
7671sed 's/^/| /' conftest.$ac_ext >&5
7672
7673cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7674/* confdefs.h. */
7675_ACEOF
7676cat confdefs.h >>conftest.$ac_ext
7677cat >>conftest.$ac_ext <<_ACEOF
7678/* end confdefs.h. */
7862d3a8
AS
7679$ac_includes_default
7680#if HAVE_SYS_SOCKET_H
7681#include <sys/socket.h>
7682#endif
7683#if HAVE_NET_IF_H
96f3a036 7684#include <net/if.h>
7862d3a8 7685#endif
96f3a036
DL
7686
7687int
7688main ()
7689{
7690static struct ifreq ac_aggr;
7691if (sizeof ac_aggr.ifr_netmask)
7692return 0;
7693 ;
7694 return 0;
7695}
7696_ACEOF
7697rm -f conftest.$ac_objext
7698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7699 (eval $ac_compile) 2>conftest.er1
96f3a036 7700 ac_status=$?
edfaf76d
LK
7701 grep -v '^ *+' conftest.er1 >conftest.err
7702 rm -f conftest.er1
7703 cat conftest.err >&5
96f3a036
DL
7704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7705 (exit $ac_status); } &&
8ae52ca6 7706 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
7707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7708 (eval $ac_try) 2>&5
7709 ac_status=$?
7710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7711 (exit $ac_status); }; } &&
7712 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7714 (eval $ac_try) 2>&5
7715 ac_status=$?
7716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7717 (exit $ac_status); }; }; then
7718 ac_cv_member_struct_ifreq_ifr_netmask=yes
7719else
7720 echo "$as_me: failed program was:" >&5
7721sed 's/^/| /' conftest.$ac_ext >&5
7722
7723ac_cv_member_struct_ifreq_ifr_netmask=no
7724fi
edfaf76d 7725rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7726fi
edfaf76d 7727rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7728fi
7729echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
7730echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6
7731if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
7732
7733cat >>confdefs.h <<_ACEOF
7734#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
7735_ACEOF
7736
7737
7738fi
7739echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
7740echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6
7741if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
7742 echo $ECHO_N "(cached) $ECHO_C" >&6
7743else
7744 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7745/* confdefs.h. */
7746_ACEOF
7747cat confdefs.h >>conftest.$ac_ext
7748cat >>conftest.$ac_ext <<_ACEOF
7749/* end confdefs.h. */
7862d3a8
AS
7750$ac_includes_default
7751#if HAVE_SYS_SOCKET_H
7752#include <sys/socket.h>
7753#endif
7754#if HAVE_NET_IF_H
96f3a036 7755#include <net/if.h>
7862d3a8 7756#endif
96f3a036
DL
7757
7758int
7759main ()
7760{
7761static struct ifreq ac_aggr;
7762if (ac_aggr.ifr_broadaddr)
7763return 0;
7764 ;
7765 return 0;
7766}
7767_ACEOF
7768rm -f conftest.$ac_objext
7769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7770 (eval $ac_compile) 2>conftest.er1
96f3a036 7771 ac_status=$?
edfaf76d
LK
7772 grep -v '^ *+' conftest.er1 >conftest.err
7773 rm -f conftest.er1
7774 cat conftest.err >&5
96f3a036
DL
7775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7776 (exit $ac_status); } &&
8ae52ca6 7777 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
7778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7779 (eval $ac_try) 2>&5
7780 ac_status=$?
7781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7782 (exit $ac_status); }; } &&
7783 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7785 (eval $ac_try) 2>&5
7786 ac_status=$?
7787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7788 (exit $ac_status); }; }; then
7789 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7790else
7791 echo "$as_me: failed program was:" >&5
7792sed 's/^/| /' conftest.$ac_ext >&5
7793
7794cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7795/* confdefs.h. */
7796_ACEOF
7797cat confdefs.h >>conftest.$ac_ext
7798cat >>conftest.$ac_ext <<_ACEOF
7799/* end confdefs.h. */
7862d3a8
AS
7800$ac_includes_default
7801#if HAVE_SYS_SOCKET_H
7802#include <sys/socket.h>
7803#endif
7804#if HAVE_NET_IF_H
96f3a036 7805#include <net/if.h>
7862d3a8 7806#endif
96f3a036
DL
7807
7808int
7809main ()
7810{
7811static struct ifreq ac_aggr;
7812if (sizeof ac_aggr.ifr_broadaddr)
7813return 0;
7814 ;
7815 return 0;
7816}
7817_ACEOF
7818rm -f conftest.$ac_objext
7819if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7820 (eval $ac_compile) 2>conftest.er1
96f3a036 7821 ac_status=$?
edfaf76d
LK
7822 grep -v '^ *+' conftest.er1 >conftest.err
7823 rm -f conftest.er1
7824 cat conftest.err >&5
96f3a036
DL
7825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7826 (exit $ac_status); } &&
8ae52ca6 7827 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
7828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7829 (eval $ac_try) 2>&5
7830 ac_status=$?
7831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7832 (exit $ac_status); }; } &&
7833 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7835 (eval $ac_try) 2>&5
7836 ac_status=$?
7837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7838 (exit $ac_status); }; }; then
7839 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7840else
7841 echo "$as_me: failed program was:" >&5
7842sed 's/^/| /' conftest.$ac_ext >&5
7843
7844ac_cv_member_struct_ifreq_ifr_broadaddr=no
7845fi
edfaf76d 7846rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7847fi
edfaf76d 7848rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7849fi
7850echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
7851echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6
7852if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
7853
7854cat >>confdefs.h <<_ACEOF
7855#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
7856_ACEOF
7857
7858
7859fi
7860echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
7861echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6
7862if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
7863 echo $ECHO_N "(cached) $ECHO_C" >&6
7864else
7865 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7866/* confdefs.h. */
7867_ACEOF
7868cat confdefs.h >>conftest.$ac_ext
7869cat >>conftest.$ac_ext <<_ACEOF
7870/* end confdefs.h. */
7862d3a8
AS
7871$ac_includes_default
7872#if HAVE_SYS_SOCKET_H
7873#include <sys/socket.h>
7874#endif
7875#if HAVE_NET_IF_H
96f3a036 7876#include <net/if.h>
7862d3a8 7877#endif
96f3a036
DL
7878
7879int
7880main ()
7881{
7882static struct ifreq ac_aggr;
7883if (ac_aggr.ifr_addr)
7884return 0;
7885 ;
7886 return 0;
7887}
7888_ACEOF
7889rm -f conftest.$ac_objext
7890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7891 (eval $ac_compile) 2>conftest.er1
96f3a036 7892 ac_status=$?
edfaf76d
LK
7893 grep -v '^ *+' conftest.er1 >conftest.err
7894 rm -f conftest.er1
7895 cat conftest.err >&5
96f3a036
DL
7896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7897 (exit $ac_status); } &&
8ae52ca6 7898 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
7899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7900 (eval $ac_try) 2>&5
7901 ac_status=$?
7902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7903 (exit $ac_status); }; } &&
7904 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7906 (eval $ac_try) 2>&5
7907 ac_status=$?
7908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7909 (exit $ac_status); }; }; then
7910 ac_cv_member_struct_ifreq_ifr_addr=yes
7911else
7912 echo "$as_me: failed program was:" >&5
7913sed 's/^/| /' conftest.$ac_ext >&5
7914
7915cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7916/* confdefs.h. */
7917_ACEOF
7918cat confdefs.h >>conftest.$ac_ext
7919cat >>conftest.$ac_ext <<_ACEOF
7920/* end confdefs.h. */
7862d3a8
AS
7921$ac_includes_default
7922#if HAVE_SYS_SOCKET_H
7923#include <sys/socket.h>
7924#endif
7925#if HAVE_NET_IF_H
96f3a036 7926#include <net/if.h>
7862d3a8 7927#endif
96f3a036
DL
7928
7929int
7930main ()
7931{
7932static struct ifreq ac_aggr;
7933if (sizeof ac_aggr.ifr_addr)
7934return 0;
7935 ;
7936 return 0;
7937}
7938_ACEOF
7939rm -f conftest.$ac_objext
7940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7941 (eval $ac_compile) 2>conftest.er1
96f3a036 7942 ac_status=$?
edfaf76d
LK
7943 grep -v '^ *+' conftest.er1 >conftest.err
7944 rm -f conftest.er1
7945 cat conftest.err >&5
96f3a036
DL
7946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7947 (exit $ac_status); } &&
8ae52ca6 7948 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
7949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7950 (eval $ac_try) 2>&5
7951 ac_status=$?
7952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7953 (exit $ac_status); }; } &&
7954 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7956 (eval $ac_try) 2>&5
7957 ac_status=$?
7958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7959 (exit $ac_status); }; }; then
7960 ac_cv_member_struct_ifreq_ifr_addr=yes
7961else
7962 echo "$as_me: failed program was:" >&5
7963sed 's/^/| /' conftest.$ac_ext >&5
7964
7965ac_cv_member_struct_ifreq_ifr_addr=no
7966fi
edfaf76d 7967rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7968fi
edfaf76d 7969rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7970fi
7971echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
7972echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6
7973if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
7974
7975cat >>confdefs.h <<_ACEOF
7976#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
7977_ACEOF
7978
7979
7980fi
7981
8799b3e4 7982
8799b3e4 7983
c0d27fcc 7984echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
7985echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
7986if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 7987 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7988echo "${ECHO_T}yes" >&6
7989
c0d27fcc 7990cat >>confdefs.h <<\_ACEOF
98418dba 7991#define PROTOTYPES 1
c0d27fcc
MR
7992_ACEOF
7993
7994
7995cat >>confdefs.h <<\_ACEOF
7996#define __PROTOTYPES 1
7997_ACEOF
98418dba
CW
7998
7999else
c0d27fcc 8000 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
8001echo "${ECHO_T}no" >&6
8002fi
8003
c0d27fcc 8004echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
8005echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
8006if test "${ac_cv_c_volatile+set}" = set; then
8007 echo $ECHO_N "(cached) $ECHO_C" >&6
8008else
8009 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8010/* confdefs.h. */
8011_ACEOF
8012cat confdefs.h >>conftest.$ac_ext
8013cat >>conftest.$ac_ext <<_ACEOF
8014/* end confdefs.h. */
98418dba 8015
98418dba
CW
8016int
8017main ()
8018{
8019
8020volatile int x;
8021int * volatile y;
8022 ;
8023 return 0;
8024}
8025_ACEOF
8026rm -f conftest.$ac_objext
c0d27fcc 8027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8028 (eval $ac_compile) 2>conftest.er1
98418dba 8029 ac_status=$?
edfaf76d
LK
8030 grep -v '^ *+' conftest.er1 >conftest.err
8031 rm -f conftest.er1
8032 cat conftest.err >&5
c0d27fcc 8033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8034 (exit $ac_status); } &&
8ae52ca6 8035 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
8036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8037 (eval $ac_try) 2>&5
8038 ac_status=$?
8039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8040 (exit $ac_status); }; } &&
8041 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8043 (eval $ac_try) 2>&5
8044 ac_status=$?
c0d27fcc 8045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8046 (exit $ac_status); }; }; then
8047 ac_cv_c_volatile=yes
8048else
8049 echo "$as_me: failed program was:" >&5
19650fd6
AS
8050sed 's/^/| /' conftest.$ac_ext >&5
8051
98418dba
CW
8052ac_cv_c_volatile=no
8053fi
edfaf76d 8054rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8055fi
c0d27fcc 8056echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
8057echo "${ECHO_T}$ac_cv_c_volatile" >&6
8058if test $ac_cv_c_volatile = no; then
8059
c0d27fcc 8060cat >>confdefs.h <<\_ACEOF
98418dba 8061#define volatile
c0d27fcc 8062_ACEOF
98418dba
CW
8063
8064fi
8065
c0d27fcc 8066echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
8067echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
8068if test "${ac_cv_c_const+set}" = set; then
8069 echo $ECHO_N "(cached) $ECHO_C" >&6
8070else
8071 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8072/* confdefs.h. */
8073_ACEOF
8074cat confdefs.h >>conftest.$ac_ext
8075cat >>conftest.$ac_ext <<_ACEOF
8076/* end confdefs.h. */
98418dba 8077
98418dba
CW
8078int
8079main ()
8080{
8081/* FIXME: Include the comments suggested by Paul. */
8082#ifndef __cplusplus
8083 /* Ultrix mips cc rejects this. */
8084 typedef int charset[2];
8085 const charset x;
8086 /* SunOS 4.1.1 cc rejects this. */
8087 char const *const *ccp;
8088 char **p;
8089 /* NEC SVR4.0.2 mips cc rejects this. */
8090 struct point {int x, y;};
8091 static struct point const zero = {0,0};
8092 /* AIX XL C 1.02.0.0 rejects this.
8093 It does not let you subtract one const X* pointer from another in
8094 an arm of an if-expression whose if-part is not a constant
8095 expression */
8096 const char *g = "string";
8097 ccp = &g + (g ? g-g : 0);
8098 /* HPUX 7.0 cc rejects these. */
8099 ++ccp;
8100 p = (char**) ccp;
8101 ccp = (char const *const *) p;
8102 { /* SCO 3.2v4 cc rejects this. */
8103 char *t;
8104 char const *s = 0 ? (char *) 0 : (char const *) 0;
8105
8106 *t++ = 0;
8107 }
8108 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8109 int x[] = {25, 17};
8110 const int *foo = &x[0];
8111 ++foo;
8112 }
8113 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8114 typedef const int *iptr;
8115 iptr p = 0;
8116 ++p;
8117 }
8118 { /* AIX XL C 1.02.0.0 rejects this saying
8119 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8120 struct s { int j; const int *ap[3]; };
8121 struct s *b; b->j = 5;
8122 }
8123 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8124 const int foo = 10;
8125 }
8126#endif
8127
8128 ;
8129 return 0;
8130}
8131_ACEOF
8132rm -f conftest.$ac_objext
c0d27fcc 8133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8134 (eval $ac_compile) 2>conftest.er1
98418dba 8135 ac_status=$?
edfaf76d
LK
8136 grep -v '^ *+' conftest.er1 >conftest.err
8137 rm -f conftest.er1
8138 cat conftest.err >&5
c0d27fcc 8139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8140 (exit $ac_status); } &&
8ae52ca6 8141 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
8142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8143 (eval $ac_try) 2>&5
8144 ac_status=$?
8145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8146 (exit $ac_status); }; } &&
8147 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8149 (eval $ac_try) 2>&5
8150 ac_status=$?
c0d27fcc 8151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8152 (exit $ac_status); }; }; then
8153 ac_cv_c_const=yes
8154else
8155 echo "$as_me: failed program was:" >&5
19650fd6
AS
8156sed 's/^/| /' conftest.$ac_ext >&5
8157
98418dba
CW
8158ac_cv_c_const=no
8159fi
edfaf76d 8160rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8161fi
c0d27fcc 8162echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
8163echo "${ECHO_T}$ac_cv_c_const" >&6
8164if test $ac_cv_c_const = no; then
8165
c0d27fcc 8166cat >>confdefs.h <<\_ACEOF
98418dba 8167#define const
c0d27fcc 8168_ACEOF
98418dba
CW
8169
8170fi
8171
c0d27fcc 8172echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
8173echo $ECHO_N "checking for void * support... $ECHO_C" >&6
8174if test "${emacs_cv_void_star+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. */
98418dba 8183
98418dba
CW
8184int
8185main ()
8186{
8187void * foo;
8188 ;
8189 return 0;
8190}
8191_ACEOF
8192rm -f conftest.$ac_objext
c0d27fcc 8193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8194 (eval $ac_compile) 2>conftest.er1
98418dba 8195 ac_status=$?
edfaf76d
LK
8196 grep -v '^ *+' conftest.er1 >conftest.err
8197 rm -f conftest.er1
8198 cat conftest.err >&5
c0d27fcc 8199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8200 (exit $ac_status); } &&
8ae52ca6 8201 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
8202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8203 (eval $ac_try) 2>&5
8204 ac_status=$?
8205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8206 (exit $ac_status); }; } &&
8207 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8209 (eval $ac_try) 2>&5
8210 ac_status=$?
c0d27fcc 8211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8212 (exit $ac_status); }; }; then
8213 emacs_cv_void_star=yes
8214else
8215 echo "$as_me: failed program was:" >&5
19650fd6
AS
8216sed 's/^/| /' conftest.$ac_ext >&5
8217
98418dba
CW
8218emacs_cv_void_star=no
8219fi
edfaf76d 8220rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8221fi
c0d27fcc 8222echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
8223echo "${ECHO_T}$emacs_cv_void_star" >&6
8224if test $emacs_cv_void_star = yes; then
c0d27fcc 8225 cat >>confdefs.h <<\_ACEOF
98418dba 8226#define POINTER_TYPE void
c0d27fcc 8227_ACEOF
98418dba
CW
8228
8229else
c0d27fcc 8230 cat >>confdefs.h <<\_ACEOF
98418dba 8231#define POINTER_TYPE char
c0d27fcc 8232_ACEOF
98418dba
CW
8233
8234fi
8235
c0d27fcc 8236
4494a266
JD
8237
8238
cd958eb3 8239
19650fd6
AS
8240echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8241echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
edfaf76d 8242set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
98418dba
CW
8243if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
8244 echo $ECHO_N "(cached) $ECHO_C" >&6
8245else
c0d27fcc 8246 cat >conftest.make <<\_ACEOF
98418dba 8247all:
19650fd6 8248 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 8249_ACEOF
98418dba
CW
8250# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8251eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
8252if test -n "$ac_maketemp"; then
8253 eval ac_cv_prog_make_${ac_make}_set=yes
8254else
8255 eval ac_cv_prog_make_${ac_make}_set=no
8256fi
8257rm -f conftest.make
8258fi
8259if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 8260 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
8261echo "${ECHO_T}yes" >&6
8262 SET_MAKE=
8263else
c0d27fcc 8264 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
8265echo "${ECHO_T}no" >&6
8266 SET_MAKE="MAKE=${MAKE-make}"
8267fi
8268
c0d27fcc
MR
8269
8270echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
8271echo $ECHO_N "checking for long file names... $ECHO_C" >&6
8272if test "${ac_cv_sys_long_file_names+set}" = set; then
8273 echo $ECHO_N "(cached) $ECHO_C" >&6
8274else
8275 ac_cv_sys_long_file_names=yes
8276# Test for long file names in all the places we know might matter:
8277# . the current directory, where building will happen
8278# $prefix/lib where we will be installing things
8279# $exec_prefix/lib likewise
8280# eval it to expand exec_prefix.
8281# $TMPDIR if set, where it might want to write temporary files
8282# if $TMPDIR is not set:
8283# /tmp where it might want to write temporary files
8284# /var/tmp likewise
8285# /usr/tmp likewise
8286if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
8287 ac_tmpdirs=$TMPDIR
8288else
8289 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
8290fi
8291for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
8292 test -d $ac_dir || continue
8293 test -w $ac_dir || continue # It is less confusing to not echo anything here.
8294 ac_xdir=$ac_dir/cf$$
8295 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
8296 ac_tf1=$ac_xdir/conftest9012345
8297 ac_tf2=$ac_xdir/conftest9012346
8298 (echo 1 >$ac_tf1) 2>/dev/null
8299 (echo 2 >$ac_tf2) 2>/dev/null
8300 ac_val=`cat $ac_tf1 2>/dev/null`
8301 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
8302 ac_cv_sys_long_file_names=no
8303 rm -rf $ac_xdir 2>/dev/null
8304 break
8305 fi
8306 rm -rf $ac_xdir 2>/dev/null
8307done
8308fi
c0d27fcc 8309echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
8310echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
8311if test $ac_cv_sys_long_file_names = yes; then
8312
c0d27fcc 8313cat >>confdefs.h <<\_ACEOF
98418dba 8314#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8315_ACEOF
98418dba
CW
8316
8317fi
8318
c0d27fcc 8319
98418dba
CW
8320#### Choose a window system.
8321
c0d27fcc 8322echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
8323echo $ECHO_N "checking for X... $ECHO_C" >&6
8324
8ae52ca6 8325ac_path_x_has_been_run=yes
c0d27fcc 8326
98418dba
CW
8327# Check whether --with-x or --without-x was given.
8328if test "${with_x+set}" = set; then
8329 withval="$with_x"
8330
8331fi;
8332# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8333if test "x$with_x" = xno; then
8334 # The user explicitly disabled X.
8335 have_x=disabled
8336else
8337 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8338 # Both variables are already set.
8339 have_x=yes
8340 else
8341 if test "${ac_cv_have_x+set}" = set; then
8342 echo $ECHO_N "(cached) $ECHO_C" >&6
8343else
8344 # One or both of the vars are not set, and there is no cached value.
8345ac_x_includes=no ac_x_libraries=no
8346rm -fr conftest.dir
8347if mkdir conftest.dir; then
8348 cd conftest.dir
8349 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 8350 cat >Imakefile <<'_ACEOF'
98418dba
CW
8351acfindx:
8352 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 8353_ACEOF
98418dba
CW
8354 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8355 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8356 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8357 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8358 for ac_extension in a so sl; do
8359 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
edfaf76d
LK
8360 test -f $ac_im_libdir/libX11.$ac_extension; then
8361 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8362 fi
8363 done
8364 # Screen out bogus values from the imake configuration. They are
8365 # bogus both because they are the default anyway, and because
8366 # using them would break gcc on systems where it needs fixed includes.
8367 case $ac_im_incroot in
8368 /usr/include) ;;
8369 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8370 esac
8371 case $ac_im_usrlibdir in
8372 /usr/lib | /lib) ;;
8373 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8374 esac
8375 fi
8376 cd ..
8377 rm -fr conftest.dir
8378fi
8379
8380# Standard set of common directories for X headers.
8381# Check X11 before X11Rn because it is often a symlink to the current release.
8382ac_x_header_dirs='
8383/usr/X11/include
8384/usr/X11R6/include
8385/usr/X11R5/include
8386/usr/X11R4/include
8387
8388/usr/include/X11
8389/usr/include/X11R6
8390/usr/include/X11R5
8391/usr/include/X11R4
8392
8393/usr/local/X11/include
8394/usr/local/X11R6/include
8395/usr/local/X11R5/include
8396/usr/local/X11R4/include
8397
8398/usr/local/include/X11
8399/usr/local/include/X11R6
8400/usr/local/include/X11R5
8401/usr/local/include/X11R4
8402
8403/usr/X386/include
8404/usr/x386/include
8405/usr/XFree86/include/X11
8406
8407/usr/include
8408/usr/local/include
8409/usr/unsupported/include
8410/usr/athena/include
8411/usr/local/x11r5/include
8412/usr/lpp/Xamples/include
8413
8414/usr/openwin/include
8415/usr/openwin/share/include'
8416
8417if test "$ac_x_includes" = no; then
8ae52ca6 8418 # Guess where to find include files, by looking for a specified header file.
98418dba
CW
8419 # First, try using that file with no special directory specified.
8420 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8421/* confdefs.h. */
8422_ACEOF
8423cat confdefs.h >>conftest.$ac_ext
8424cat >>conftest.$ac_ext <<_ACEOF
8425/* end confdefs.h. */
c3a63088 8426#include <X11/Xlib.h>
98418dba 8427_ACEOF
c0d27fcc 8428if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8429 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8430 ac_status=$?
6bae0ccf 8431 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8432 rm -f conftest.er1
8433 cat conftest.err >&5
c0d27fcc 8434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8435 (exit $ac_status); } >/dev/null; then
8436 if test -s conftest.err; then
8437 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 8438 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8439 else
8440 ac_cpp_err=
8441 fi
8442else
8443 ac_cpp_err=yes
8444fi
8445if test -z "$ac_cpp_err"; then
8446 # We can compile using X headers with no special include directory.
8447ac_x_includes=
8448else
8449 echo "$as_me: failed program was:" >&5
19650fd6
AS
8450sed 's/^/| /' conftest.$ac_ext >&5
8451
98418dba 8452 for ac_dir in $ac_x_header_dirs; do
c3a63088 8453 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
8454 ac_x_includes=$ac_dir
8455 break
8456 fi
8457done
8458fi
8459rm -f conftest.err conftest.$ac_ext
8460fi # $ac_x_includes = no
8461
8462if test "$ac_x_libraries" = no; then
8463 # Check for the libraries.
8464 # See if we find them without any special options.
8465 # Don't add to $LIBS permanently.
8466 ac_save_LIBS=$LIBS
c3a63088 8467 LIBS="-lX11 $LIBS"
98418dba 8468 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8469/* confdefs.h. */
8470_ACEOF
8471cat confdefs.h >>conftest.$ac_ext
8472cat >>conftest.$ac_ext <<_ACEOF
8473/* end confdefs.h. */
c3a63088 8474#include <X11/Xlib.h>
98418dba
CW
8475int
8476main ()
8477{
c3a63088 8478XrmInitialize ()
98418dba
CW
8479 ;
8480 return 0;
8481}
8482_ACEOF
8483rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8484if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8485 (eval $ac_link) 2>conftest.er1
98418dba 8486 ac_status=$?
edfaf76d
LK
8487 grep -v '^ *+' conftest.er1 >conftest.err
8488 rm -f conftest.er1
8489 cat conftest.err >&5
c0d27fcc 8490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8491 (exit $ac_status); } &&
8ae52ca6 8492 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
8493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8494 (eval $ac_try) 2>&5
8495 ac_status=$?
8496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8497 (exit $ac_status); }; } &&
8498 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8500 (eval $ac_try) 2>&5
8501 ac_status=$?
c0d27fcc 8502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8503 (exit $ac_status); }; }; then
8504 LIBS=$ac_save_LIBS
8505# We can link X programs with no special library path.
8506ac_x_libraries=
8507else
8508 echo "$as_me: failed program was:" >&5
19650fd6
AS
8509sed 's/^/| /' conftest.$ac_ext >&5
8510
98418dba
CW
8511LIBS=$ac_save_LIBS
8512for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8513do
8514 # Don't even attempt the hair of trying to link an X program!
8515 for ac_extension in a so sl; do
c3a63088 8516 if test -r $ac_dir/libX11.$ac_extension; then
98418dba
CW
8517 ac_x_libraries=$ac_dir
8518 break 2
8519 fi
8520 done
8521done
8522fi
edfaf76d
LK
8523rm -f conftest.err conftest.$ac_objext \
8524 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8525fi # $ac_x_libraries = no
8526
8527if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8528 # Didn't find X anywhere. Cache the known absence of X.
8529 ac_cv_have_x="have_x=no"
8530else
8531 # Record where we found X for the cache.
8532 ac_cv_have_x="have_x=yes \
edfaf76d 8533 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
98418dba
CW
8534fi
8535fi
8536
8537 fi
8538 eval "$ac_cv_have_x"
8539fi # $with_x != no
8540
8541if test "$have_x" != yes; then
c0d27fcc 8542 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
8543echo "${ECHO_T}$have_x" >&6
8544 no_x=yes
8545else
8546 # If each of the values was on the command line, it overrides each guess.
8547 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8548 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8549 # Update the cache value to reflect the command line values.
8550 ac_cv_have_x="have_x=yes \
8551 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8ae52ca6
RF
8552 # It might be that x_includes is empty (headers are found in the
8553 # standard search path. Then output the corresponding message
8554 ac_out_x_includes=$x_includes
8555 test "x$x_includes" = x && ac_out_x_includes="in standard search path"
8556 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $ac_out_x_includes" >&5
8557echo "${ECHO_T}libraries $x_libraries, headers $ac_out_x_includes" >&6
98418dba
CW
8558fi
8559
8560if test "$no_x" = yes; then
8561 window_system=none
8562else
8563 window_system=x11
8564fi
8565
8566if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8567 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
8568 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
8569 x_default_search_path=""
8570 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
8571 x_search_path="\
8572${x_library}/X11/%L/%T/%N%C%S:\
8573${x_library}/X11/%l/%T/%N%C%S:\
8574${x_library}/X11/%T/%N%C%S:\
8575${x_library}/X11/%L/%T/%N%S:\
8576${x_library}/X11/%l/%T/%N%S:\
8577${x_library}/X11/%T/%N%S"
8578 if test x"${x_default_search_path}" = x; then
8579 x_default_search_path=${x_search_path}
8580 else
8581 x_default_search_path="${x_search_path}:${x_default_search_path}"
8582 fi
8583 done
8584fi
8585if test "${x_includes}" != NONE && test -n "${x_includes}"; then
8586 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
8587fi
8588
8589if test x"${x_includes}" = x; then
8590 bitmapdir=/usr/include/X11/bitmaps
8591else
8592 # accumulate include directories that have X11 bitmap subdirectories
8593 bmd_acc="dummyval"
8594 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
8595 if test -d "${bmd}/X11/bitmaps"; then
8596 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
8597 fi
8598 if test -d "${bmd}/bitmaps"; then
8599 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
8600 fi
8601 done
8602 if test ${bmd_acc} != "dummyval"; then
8603 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
8604 fi
8605fi
8606
5d6da11e 8607HAVE_CARBON=no
1d4d5604
YM
8608if test "${with_carbon}" != no; then
8609 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
5d6da11e
YM
8610 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
8611echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
8612if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8613 echo $ECHO_N "(cached) $ECHO_C" >&6
8614fi
8615echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
8616echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
8617else
8618 # Is the header compilable?
8619echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
8620echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
8621cat >conftest.$ac_ext <<_ACEOF
8622/* confdefs.h. */
8623_ACEOF
8624cat confdefs.h >>conftest.$ac_ext
8625cat >>conftest.$ac_ext <<_ACEOF
8626/* end confdefs.h. */
8627$ac_includes_default
8628#include <Carbon/Carbon.h>
8629_ACEOF
8630rm -f conftest.$ac_objext
8631if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8632 (eval $ac_compile) 2>conftest.er1
5d6da11e 8633 ac_status=$?
edfaf76d
LK
8634 grep -v '^ *+' conftest.er1 >conftest.err
8635 rm -f conftest.er1
8636 cat conftest.err >&5
5d6da11e
YM
8637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8638 (exit $ac_status); } &&
8ae52ca6 8639 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
8640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8641 (eval $ac_try) 2>&5
8642 ac_status=$?
8643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8644 (exit $ac_status); }; } &&
8645 { ac_try='test -s conftest.$ac_objext'
5d6da11e
YM
8646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8647 (eval $ac_try) 2>&5
8648 ac_status=$?
8649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8650 (exit $ac_status); }; }; then
8651 ac_header_compiler=yes
8652else
8653 echo "$as_me: failed program was:" >&5
8654sed 's/^/| /' conftest.$ac_ext >&5
8655
8656ac_header_compiler=no
8657fi
edfaf76d 8658rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5d6da11e
YM
8659echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8660echo "${ECHO_T}$ac_header_compiler" >&6
8661
8662# Is the header present?
8663echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
8664echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
8665cat >conftest.$ac_ext <<_ACEOF
8666/* confdefs.h. */
8667_ACEOF
8668cat confdefs.h >>conftest.$ac_ext
8669cat >>conftest.$ac_ext <<_ACEOF
8670/* end confdefs.h. */
8671#include <Carbon/Carbon.h>
8672_ACEOF
8673if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8674 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8675 ac_status=$?
8676 grep -v '^ *+' conftest.er1 >conftest.err
8677 rm -f conftest.er1
8678 cat conftest.err >&5
8679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8680 (exit $ac_status); } >/dev/null; then
8681 if test -s conftest.err; then
8682 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 8683 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5d6da11e
YM
8684 else
8685 ac_cpp_err=
8686 fi
8687else
8688 ac_cpp_err=yes
8689fi
8690if test -z "$ac_cpp_err"; then
8691 ac_header_preproc=yes
8692else
8693 echo "$as_me: failed program was:" >&5
8694sed 's/^/| /' conftest.$ac_ext >&5
8695
8696 ac_header_preproc=no
8697fi
8698rm -f conftest.err conftest.$ac_ext
8699echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8700echo "${ECHO_T}$ac_header_preproc" >&6
8701
8702# So? What about this header?
edfaf76d
LK
8703case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8704 yes:no: )
5d6da11e
YM
8705 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
8706echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
8707 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
8708echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
8709 ac_header_preproc=yes
5d6da11e 8710 ;;
edfaf76d 8711 no:yes:* )
5d6da11e
YM
8712 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
8713echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
8714 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
8715echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
8716 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
8717echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
8718 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
8719echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
8720 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
8721echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
8722 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
8723echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
5d6da11e
YM
8724 (
8725 cat <<\_ASBOX
edfaf76d
LK
8726## ------------------------------------------ ##
8727## Report this to the AC_PACKAGE_NAME lists. ##
8728## ------------------------------------------ ##
5d6da11e
YM
8729_ASBOX
8730 ) |
8731 sed "s/^/$as_me: WARNING: /" >&2
8732 ;;
8733esac
8734echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
8735echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
8736if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8737 echo $ECHO_N "(cached) $ECHO_C" >&6
8738else
8739 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
8740fi
8741echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
8742echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
8743
8744fi
8745if test $ac_cv_header_Carbon_Carbon_h = yes; then
8746 HAVE_CARBON=yes
8747fi
8748
8749
1d4d5604
YM
8750fi
8751if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
8752 if test "${with_carbon+set}" != set \
8753 && test "${carbon_appdir_x+set}" != set; then
8754 HAVE_CARBON=no
5d6da11e
YM
8755 fi
8756fi
1d4d5604
YM
8757if test "${HAVE_CARBON}" = yes; then
8758 window_system=mac
8759fi
8760
8761case "${window_system}" in
8762 x11 )
8763 HAVE_X_WINDOWS=yes
8764 HAVE_X11=yes
8765 case "${with_x_toolkit}" in
8766 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
8767 motif ) USE_X_TOOLKIT=MOTIF ;;
8768 gtk ) with_gtk=yes
8769 USE_X_TOOLKIT=none ;;
8770 no ) USE_X_TOOLKIT=none ;;
8771 * ) USE_X_TOOLKIT=maybe ;;
8772 esac
8773 ;;
8774 mac | none )
8775 HAVE_X_WINDOWS=no
8776 HAVE_X11=no
8777 USE_X_TOOLKIT=none
8778 ;;
8779esac
8780
8781### If we're using X11, we should use the X menu package.
8782HAVE_MENUS=no
8783case ${HAVE_X11} in
8784 yes ) HAVE_MENUS=yes ;;
8785esac
8786
8787if test "${opsys}" = "hpux9"; then
8788 case "${x_libraries}" in
8789 *X11R4* )
8790 opsysfile="s/hpux9-x11r4.h"
8791 ;;
8792 esac
8793fi
8794
8795if test "${opsys}" = "hpux9shr"; then
8796 case "${x_libraries}" in
8797 *X11R4* )
8798 opsysfile="s/hpux9shxr4.h"
8799 ;;
8800 esac
8801fi
5d6da11e 8802
98418dba
CW
8803### Compute the unexec source name from the object name.
8804UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
8805
8806# Do the opsystem or machine files prohibit the use of the GNU malloc?
8807# Assume not, until told otherwise.
8808GNU_MALLOC=yes
8809doug_lea_malloc=yes
c0d27fcc 8810echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
8811echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
8812if test "${ac_cv_func_malloc_get_state+set}" = set; then
8813 echo $ECHO_N "(cached) $ECHO_C" >&6
8814else
8815 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8816/* confdefs.h. */
8817_ACEOF
8818cat confdefs.h >>conftest.$ac_ext
8819cat >>conftest.$ac_ext <<_ACEOF
8820/* end confdefs.h. */
edfaf76d
LK
8821/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
8822 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8823#define malloc_get_state innocuous_malloc_get_state
8824
98418dba 8825/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8826 which can conflict with char malloc_get_state (); below.
8827 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8828 <limits.h> exists even on freestanding compilers. */
edfaf76d 8829
19650fd6
AS
8830#ifdef __STDC__
8831# include <limits.h>
8832#else
8833# include <assert.h>
8834#endif
edfaf76d
LK
8835
8836#undef malloc_get_state
8837
98418dba
CW
8838/* Override any gcc2 internal prototype to avoid an error. */
8839#ifdef __cplusplus
8840extern "C"
19650fd6 8841{
98418dba
CW
8842#endif
8843/* We use char because int might match the return type of a gcc2
8844 builtin and then its argument prototype would still apply. */
8845char malloc_get_state ();
98418dba
CW
8846/* The GNU C library defines this for functions which it implements
8847 to always fail with ENOSYS. Some functions are actually named
8848 something starting with __ and the normal name is an alias. */
8849#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
8850choke me
8851#else
19650fd6
AS
8852char (*f) () = malloc_get_state;
8853#endif
8854#ifdef __cplusplus
8855}
98418dba
CW
8856#endif
8857
19650fd6
AS
8858int
8859main ()
8860{
8861return f != malloc_get_state;
98418dba
CW
8862 ;
8863 return 0;
8864}
8865_ACEOF
8866rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8867if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8868 (eval $ac_link) 2>conftest.er1
98418dba 8869 ac_status=$?
edfaf76d
LK
8870 grep -v '^ *+' conftest.er1 >conftest.err
8871 rm -f conftest.er1
8872 cat conftest.err >&5
c0d27fcc 8873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8874 (exit $ac_status); } &&
8ae52ca6 8875 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
8876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8877 (eval $ac_try) 2>&5
8878 ac_status=$?
8879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8880 (exit $ac_status); }; } &&
8881 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8883 (eval $ac_try) 2>&5
8884 ac_status=$?
c0d27fcc 8885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8886 (exit $ac_status); }; }; then
8887 ac_cv_func_malloc_get_state=yes
8888else
8889 echo "$as_me: failed program was:" >&5
19650fd6
AS
8890sed 's/^/| /' conftest.$ac_ext >&5
8891
98418dba
CW
8892ac_cv_func_malloc_get_state=no
8893fi
edfaf76d
LK
8894rm -f conftest.err conftest.$ac_objext \
8895 conftest$ac_exeext conftest.$ac_ext
98418dba 8896fi
c0d27fcc 8897echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
8898echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
8899if test $ac_cv_func_malloc_get_state = yes; then
8900 :
8901else
8902 doug_lea_malloc=no
8903fi
8904
c0d27fcc 8905echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
8906echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
8907if test "${ac_cv_func_malloc_set_state+set}" = set; then
8908 echo $ECHO_N "(cached) $ECHO_C" >&6
8909else
8910 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8911/* confdefs.h. */
8912_ACEOF
8913cat confdefs.h >>conftest.$ac_ext
8914cat >>conftest.$ac_ext <<_ACEOF
8915/* end confdefs.h. */
edfaf76d
LK
8916/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
8917 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8918#define malloc_set_state innocuous_malloc_set_state
8919
98418dba 8920/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8921 which can conflict with char malloc_set_state (); below.
8922 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8923 <limits.h> exists even on freestanding compilers. */
edfaf76d 8924
19650fd6
AS
8925#ifdef __STDC__
8926# include <limits.h>
8927#else
8928# include <assert.h>
8929#endif
edfaf76d
LK
8930
8931#undef malloc_set_state
8932
98418dba
CW
8933/* Override any gcc2 internal prototype to avoid an error. */
8934#ifdef __cplusplus
8935extern "C"
19650fd6 8936{
98418dba
CW
8937#endif
8938/* We use char because int might match the return type of a gcc2
8939 builtin and then its argument prototype would still apply. */
8940char malloc_set_state ();
98418dba
CW
8941/* The GNU C library defines this for functions which it implements
8942 to always fail with ENOSYS. Some functions are actually named
8943 something starting with __ and the normal name is an alias. */
8944#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
8945choke me
8946#else
19650fd6
AS
8947char (*f) () = malloc_set_state;
8948#endif
8949#ifdef __cplusplus
8950}
98418dba
CW
8951#endif
8952
19650fd6
AS
8953int
8954main ()
8955{
8956return f != malloc_set_state;
98418dba
CW
8957 ;
8958 return 0;
8959}
8960_ACEOF
8961rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8962if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8963 (eval $ac_link) 2>conftest.er1
98418dba 8964 ac_status=$?
edfaf76d
LK
8965 grep -v '^ *+' conftest.er1 >conftest.err
8966 rm -f conftest.er1
8967 cat conftest.err >&5
c0d27fcc 8968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8969 (exit $ac_status); } &&
8ae52ca6 8970 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
8971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8972 (eval $ac_try) 2>&5
8973 ac_status=$?
8974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8975 (exit $ac_status); }; } &&
8976 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8978 (eval $ac_try) 2>&5
8979 ac_status=$?
c0d27fcc 8980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8981 (exit $ac_status); }; }; then
8982 ac_cv_func_malloc_set_state=yes
8983else
8984 echo "$as_me: failed program was:" >&5
19650fd6
AS
8985sed 's/^/| /' conftest.$ac_ext >&5
8986
98418dba
CW
8987ac_cv_func_malloc_set_state=no
8988fi
edfaf76d
LK
8989rm -f conftest.err conftest.$ac_objext \
8990 conftest$ac_exeext conftest.$ac_ext
98418dba 8991fi
c0d27fcc 8992echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
8993echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
8994if test $ac_cv_func_malloc_set_state = yes; then
8995 :
8996else
8997 doug_lea_malloc=no
8998fi
8999
c0d27fcc 9000echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
9001echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
9002if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9003 echo $ECHO_N "(cached) $ECHO_C" >&6
9004else
9005 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9006/* confdefs.h. */
9007_ACEOF
9008cat confdefs.h >>conftest.$ac_ext
9009cat >>conftest.$ac_ext <<_ACEOF
9010/* end confdefs.h. */
98418dba 9011extern void (* __after_morecore_hook)();
98418dba
CW
9012int
9013main ()
9014{
9015__after_morecore_hook = 0
9016 ;
9017 return 0;
9018}
9019_ACEOF
9020rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9021if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9022 (eval $ac_link) 2>conftest.er1
98418dba 9023 ac_status=$?
edfaf76d
LK
9024 grep -v '^ *+' conftest.er1 >conftest.err
9025 rm -f conftest.er1
9026 cat conftest.err >&5
c0d27fcc 9027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9028 (exit $ac_status); } &&
8ae52ca6 9029 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
9030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9031 (eval $ac_try) 2>&5
9032 ac_status=$?
9033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9034 (exit $ac_status); }; } &&
9035 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9037 (eval $ac_try) 2>&5
9038 ac_status=$?
c0d27fcc 9039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9040 (exit $ac_status); }; }; then
9041 emacs_cv_var___after_morecore_hook=yes
9042else
9043 echo "$as_me: failed program was:" >&5
19650fd6
AS
9044sed 's/^/| /' conftest.$ac_ext >&5
9045
98418dba
CW
9046emacs_cv_var___after_morecore_hook=no
9047fi
edfaf76d
LK
9048rm -f conftest.err conftest.$ac_objext \
9049 conftest$ac_exeext conftest.$ac_ext
98418dba 9050fi
c0d27fcc 9051echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
9052echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
9053if test $emacs_cv_var___after_morecore_hook = no; then
9054 doug_lea_malloc=no
9055fi
9056if test "${system_malloc}" = "yes"; then
9057 GNU_MALLOC=no
9058 GNU_MALLOC_reason="
9059 (The GNU allocators don't work with this system configuration.)"
9060fi
9061if test "$doug_lea_malloc" = "yes" ; then
9062 if test "$GNU_MALLOC" = yes ; then
9063 GNU_MALLOC_reason="
9064 (Using Doug Lea's new malloc from the GNU C Library.)"
9065 fi
b936fae4 9066
c0d27fcc 9067cat >>confdefs.h <<\_ACEOF
98418dba 9068#define DOUG_LEA_MALLOC 1
c0d27fcc 9069_ACEOF
98418dba
CW
9070
9071fi
9072
9073if test x"${REL_ALLOC}" = x; then
9074 REL_ALLOC=${GNU_MALLOC}
9075fi
9076
9077
c0d27fcc
MR
9078
9079
9080for ac_header in stdlib.h unistd.h
98418dba
CW
9081do
9082as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
9083if eval "test \"\${$as_ac_Header+set}\" = set"; then
9084 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
9085echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9086if eval "test \"\${$as_ac_Header+set}\" = set"; then
9087 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9088fi
9089echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9090echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 9091else
c0d27fcc
MR
9092 # Is the header compilable?
9093echo "$as_me:$LINENO: checking $ac_header usability" >&5
9094echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9095cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9096/* confdefs.h. */
9097_ACEOF
9098cat confdefs.h >>conftest.$ac_ext
9099cat >>conftest.$ac_ext <<_ACEOF
9100/* end confdefs.h. */
98418dba
CW
9101$ac_includes_default
9102#include <$ac_header>
9103_ACEOF
9104rm -f conftest.$ac_objext
c0d27fcc 9105if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 9106 (eval $ac_compile) 2>conftest.er1
98418dba 9107 ac_status=$?
edfaf76d
LK
9108 grep -v '^ *+' conftest.er1 >conftest.err
9109 rm -f conftest.er1
9110 cat conftest.err >&5
c0d27fcc 9111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9112 (exit $ac_status); } &&
8ae52ca6 9113 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
9114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9115 (eval $ac_try) 2>&5
9116 ac_status=$?
9117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9118 (exit $ac_status); }; } &&
9119 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 9120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9121 (eval $ac_try) 2>&5
9122 ac_status=$?
c0d27fcc 9123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9124 (exit $ac_status); }; }; then
c0d27fcc 9125 ac_header_compiler=yes
98418dba
CW
9126else
9127 echo "$as_me: failed program was:" >&5
19650fd6
AS
9128sed 's/^/| /' conftest.$ac_ext >&5
9129
c0d27fcc 9130ac_header_compiler=no
98418dba 9131fi
edfaf76d 9132rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
9133echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9134echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 9135
c0d27fcc
MR
9136# Is the header present?
9137echo "$as_me:$LINENO: checking $ac_header presence" >&5
9138echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9139cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9140/* confdefs.h. */
9141_ACEOF
9142cat confdefs.h >>conftest.$ac_ext
9143cat >>conftest.$ac_ext <<_ACEOF
9144/* end confdefs.h. */
98418dba
CW
9145#include <$ac_header>
9146_ACEOF
c0d27fcc 9147if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9148 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9149 ac_status=$?
6bae0ccf 9150 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9151 rm -f conftest.er1
9152 cat conftest.err >&5
c0d27fcc 9153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9154 (exit $ac_status); } >/dev/null; then
9155 if test -s conftest.err; then
9156 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 9157 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
9158 else
9159 ac_cpp_err=
9160 fi
9161else
9162 ac_cpp_err=yes
9163fi
9164if test -z "$ac_cpp_err"; then
c0d27fcc 9165 ac_header_preproc=yes
98418dba
CW
9166else
9167 echo "$as_me: failed program was:" >&5
19650fd6
AS
9168sed 's/^/| /' conftest.$ac_ext >&5
9169
c0d27fcc 9170 ac_header_preproc=no
98418dba
CW
9171fi
9172rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9173echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9174echo "${ECHO_T}$ac_header_preproc" >&6
9175
9176# So? What about this header?
edfaf76d
LK
9177case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9178 yes:no: )
c0d27fcc
MR
9179 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9180echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9181 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9182echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9183 ac_header_preproc=yes
9184 ;;
9185 no:yes:* )
9186 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9187echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9188 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9189echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9190 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9191echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9192 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9193echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9194 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9195echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9196 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9197echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7c9e5167
JD
9198 (
9199 cat <<\_ASBOX
edfaf76d
LK
9200## ------------------------------------------ ##
9201## Report this to the AC_PACKAGE_NAME lists. ##
9202## ------------------------------------------ ##
19650fd6
AS
9203_ASBOX
9204 ) |
9205 sed "s/^/$as_me: WARNING: /" >&2
9206 ;;
c0d27fcc
MR
9207esac
9208echo "$as_me:$LINENO: checking for $ac_header" >&5
9209echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9210if eval "test \"\${$as_ac_Header+set}\" = set"; then
9211 echo $ECHO_N "(cached) $ECHO_C" >&6
9212else
edfaf76d 9213 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9214fi
c0d27fcc 9215echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 9216echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
9217
9218fi
98418dba 9219if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9220 cat >>confdefs.h <<_ACEOF
98418dba 9221#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9222_ACEOF
98418dba
CW
9223
9224fi
c0d27fcc 9225
98418dba
CW
9226done
9227
c0d27fcc 9228
98418dba
CW
9229for ac_func in getpagesize
9230do
9231as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 9232echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
9233echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9234if eval "test \"\${$as_ac_var+set}\" = set"; then
9235 echo $ECHO_N "(cached) $ECHO_C" >&6
9236else
9237 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9238/* confdefs.h. */
9239_ACEOF
9240cat confdefs.h >>conftest.$ac_ext
9241cat >>conftest.$ac_ext <<_ACEOF
9242/* end confdefs.h. */
edfaf76d
LK
9243/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9244 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9245#define $ac_func innocuous_$ac_func
9246
98418dba 9247/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9248 which can conflict with char $ac_func (); below.
9249 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9250 <limits.h> exists even on freestanding compilers. */
edfaf76d 9251
19650fd6
AS
9252#ifdef __STDC__
9253# include <limits.h>
9254#else
9255# include <assert.h>
9256#endif
edfaf76d
LK
9257
9258#undef $ac_func
9259
98418dba
CW
9260/* Override any gcc2 internal prototype to avoid an error. */
9261#ifdef __cplusplus
9262extern "C"
19650fd6 9263{
98418dba
CW
9264#endif
9265/* We use char because int might match the return type of a gcc2
9266 builtin and then its argument prototype would still apply. */
9267char $ac_func ();
98418dba
CW
9268/* The GNU C library defines this for functions which it implements
9269 to always fail with ENOSYS. Some functions are actually named
9270 something starting with __ and the normal name is an alias. */
9271#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9272choke me
9273#else
19650fd6
AS
9274char (*f) () = $ac_func;
9275#endif
9276#ifdef __cplusplus
9277}
98418dba
CW
9278#endif
9279
19650fd6
AS
9280int
9281main ()
9282{
9283return f != $ac_func;
98418dba
CW
9284 ;
9285 return 0;
9286}
9287_ACEOF
9288rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9289if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9290 (eval $ac_link) 2>conftest.er1
98418dba 9291 ac_status=$?
edfaf76d
LK
9292 grep -v '^ *+' conftest.er1 >conftest.err
9293 rm -f conftest.er1
9294 cat conftest.err >&5
c0d27fcc 9295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9296 (exit $ac_status); } &&
8ae52ca6 9297 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
9298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9299 (eval $ac_try) 2>&5
9300 ac_status=$?
9301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9302 (exit $ac_status); }; } &&
9303 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9305 (eval $ac_try) 2>&5
9306 ac_status=$?
c0d27fcc 9307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9308 (exit $ac_status); }; }; then
9309 eval "$as_ac_var=yes"
9310else
9311 echo "$as_me: failed program was:" >&5
19650fd6
AS
9312sed 's/^/| /' conftest.$ac_ext >&5
9313
98418dba
CW
9314eval "$as_ac_var=no"
9315fi
edfaf76d
LK
9316rm -f conftest.err conftest.$ac_objext \
9317 conftest$ac_exeext conftest.$ac_ext
98418dba 9318fi
c0d27fcc 9319echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
9320echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9321if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9322 cat >>confdefs.h <<_ACEOF
98418dba 9323#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9324_ACEOF
98418dba
CW
9325
9326fi
9327done
9328
c0d27fcc 9329echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
9330echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
9331if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9332 echo $ECHO_N "(cached) $ECHO_C" >&6
9333else
9334 if test "$cross_compiling" = yes; then
9335 ac_cv_func_mmap_fixed_mapped=no
9336else
9337 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9338/* confdefs.h. */
9339_ACEOF
9340cat confdefs.h >>conftest.$ac_ext
9341cat >>conftest.$ac_ext <<_ACEOF
9342/* end confdefs.h. */
98418dba 9343$ac_includes_default
c0d27fcc
MR
9344/* malloc might have been renamed as rpl_malloc. */
9345#undef malloc
9346
98418dba
CW
9347/* Thanks to Mike Haertel and Jim Avera for this test.
9348 Here is a matrix of mmap possibilities:
9349 mmap private not fixed
9350 mmap private fixed at somewhere currently unmapped
9351 mmap private fixed at somewhere already mapped
9352 mmap shared not fixed
9353 mmap shared fixed at somewhere currently unmapped
9354 mmap shared fixed at somewhere already mapped
9355 For private mappings, we should verify that changes cannot be read()
9356 back from the file, nor mmap's back from the file at a different
9357 address. (There have been systems where private was not correctly
9358 implemented like the infamous i386 svr4.0, and systems where the
9359 VM page cache was not coherent with the file system buffer cache
9360 like early versions of FreeBSD and possibly contemporary NetBSD.)
9361 For shared mappings, we should conversely verify that changes get
c0d27fcc 9362 propagated back to all the places they're supposed to be.
98418dba
CW
9363
9364 Grep wants private fixed already mapped.
9365 The main things grep needs to know about mmap are:
9366 * does it exist and is it safe to write into the mmap'd area
9367 * how to use it (BSD variants) */
9368
9369#include <fcntl.h>
9370#include <sys/mman.h>
9371
9372#if !STDC_HEADERS && !HAVE_STDLIB_H
9373char *malloc ();
9374#endif
9375
9376/* This mess was copied from the GNU getpagesize.h. */
9377#if !HAVE_GETPAGESIZE
9378/* Assume that all systems that can run configure have sys/param.h. */
9379# if !HAVE_SYS_PARAM_H
9380# define HAVE_SYS_PARAM_H 1
9381# endif
9382
9383# ifdef _SC_PAGESIZE
9384# define getpagesize() sysconf(_SC_PAGESIZE)
9385# else /* no _SC_PAGESIZE */
9386# if HAVE_SYS_PARAM_H
9387# include <sys/param.h>
9388# ifdef EXEC_PAGESIZE
9389# define getpagesize() EXEC_PAGESIZE
9390# else /* no EXEC_PAGESIZE */
9391# ifdef NBPG
9392# define getpagesize() NBPG * CLSIZE
9393# ifndef CLSIZE
9394# define CLSIZE 1
9395# endif /* no CLSIZE */
9396# else /* no NBPG */
9397# ifdef NBPC
9398# define getpagesize() NBPC
9399# else /* no NBPC */
9400# ifdef PAGESIZE
9401# define getpagesize() PAGESIZE
9402# endif /* PAGESIZE */
9403# endif /* no NBPC */
9404# endif /* no NBPG */
9405# endif /* no EXEC_PAGESIZE */
9406# else /* no HAVE_SYS_PARAM_H */
9407# define getpagesize() 8192 /* punt totally */
9408# endif /* no HAVE_SYS_PARAM_H */
9409# endif /* no _SC_PAGESIZE */
9410
9411#endif /* no HAVE_GETPAGESIZE */
9412
9413int
9414main ()
9415{
9416 char *data, *data2, *data3;
9417 int i, pagesize;
9418 int fd;
9419
9420 pagesize = getpagesize ();
9421
9422 /* First, make a file with some known garbage in it. */
9423 data = (char *) malloc (pagesize);
9424 if (!data)
9425 exit (1);
9426 for (i = 0; i < pagesize; ++i)
9427 *(data + i) = rand ();
9428 umask (0);
9429 fd = creat ("conftest.mmap", 0600);
9430 if (fd < 0)
9431 exit (1);
9432 if (write (fd, data, pagesize) != pagesize)
9433 exit (1);
9434 close (fd);
9435
9436 /* Next, try to mmap the file at a fixed address which already has
9437 something else allocated at it. If we can, also make sure that
9438 we see the same garbage. */
9439 fd = open ("conftest.mmap", O_RDWR);
9440 if (fd < 0)
9441 exit (1);
9442 data2 = (char *) malloc (2 * pagesize);
9443 if (!data2)
9444 exit (1);
edfaf76d 9445 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 9446 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 9447 MAP_PRIVATE | MAP_FIXED, fd, 0L))
98418dba
CW
9448 exit (1);
9449 for (i = 0; i < pagesize; ++i)
9450 if (*(data + i) != *(data2 + i))
9451 exit (1);
9452
9453 /* Finally, make sure that changes to the mapped area do not
9454 percolate back to the file as seen by read(). (This is a bug on
9455 some variants of i386 svr4.0.) */
9456 for (i = 0; i < pagesize; ++i)
9457 *(data2 + i) = *(data2 + i) + 1;
9458 data3 = (char *) malloc (pagesize);
9459 if (!data3)
9460 exit (1);
9461 if (read (fd, data3, pagesize) != pagesize)
9462 exit (1);
9463 for (i = 0; i < pagesize; ++i)
9464 if (*(data + i) != *(data3 + i))
9465 exit (1);
9466 close (fd);
9467 exit (0);
9468}
9469_ACEOF
9470rm -f conftest$ac_exeext
c0d27fcc 9471if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
9472 (eval $ac_link) 2>&5
9473 ac_status=$?
c0d27fcc 9474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9475 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 9476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9477 (eval $ac_try) 2>&5
9478 ac_status=$?
c0d27fcc 9479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9480 (exit $ac_status); }; }; then
9481 ac_cv_func_mmap_fixed_mapped=yes
9482else
9483 echo "$as_me: program exited with status $ac_status" >&5
9484echo "$as_me: failed program was:" >&5
19650fd6
AS
9485sed 's/^/| /' conftest.$ac_ext >&5
9486
c0d27fcc 9487( exit $ac_status )
98418dba
CW
9488ac_cv_func_mmap_fixed_mapped=no
9489fi
edfaf76d 9490rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
9491fi
9492fi
c0d27fcc 9493echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
9494echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
9495if test $ac_cv_func_mmap_fixed_mapped = yes; then
9496
c0d27fcc 9497cat >>confdefs.h <<\_ACEOF
98418dba 9498#define HAVE_MMAP 1
c0d27fcc 9499_ACEOF
98418dba
CW
9500
9501fi
9502rm -f conftest.mmap
9503
9504if test $use_mmap_for_buffers = yes; then
9505 REL_ALLOC=no
9506fi
9507
9508LIBS="$libsrc_libs $LIBS"
9509
c0d27fcc
MR
9510
9511echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
9512echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9513if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9514 echo $ECHO_N "(cached) $ECHO_C" >&6
9515else
9516 ac_check_lib_save_LIBS=$LIBS
9517LIBS="-ldnet $LIBS"
9518cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9519/* confdefs.h. */
9520_ACEOF
9521cat confdefs.h >>conftest.$ac_ext
9522cat >>conftest.$ac_ext <<_ACEOF
9523/* end confdefs.h. */
98418dba
CW
9524
9525/* Override any gcc2 internal prototype to avoid an error. */
9526#ifdef __cplusplus
9527extern "C"
9528#endif
9529/* We use char because int might match the return type of a gcc2
9530 builtin and then its argument prototype would still apply. */
9531char dnet_ntoa ();
98418dba
CW
9532int
9533main ()
9534{
9535dnet_ntoa ();
9536 ;
9537 return 0;
9538}
9539_ACEOF
9540rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9541if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9542 (eval $ac_link) 2>conftest.er1
98418dba 9543 ac_status=$?
edfaf76d
LK
9544 grep -v '^ *+' conftest.er1 >conftest.err
9545 rm -f conftest.er1
9546 cat conftest.err >&5
c0d27fcc 9547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9548 (exit $ac_status); } &&
8ae52ca6 9549 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
9550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9551 (eval $ac_try) 2>&5
9552 ac_status=$?
9553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9554 (exit $ac_status); }; } &&
9555 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9557 (eval $ac_try) 2>&5
9558 ac_status=$?
c0d27fcc 9559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9560 (exit $ac_status); }; }; then
9561 ac_cv_lib_dnet_dnet_ntoa=yes
9562else
9563 echo "$as_me: failed program was:" >&5
19650fd6
AS
9564sed 's/^/| /' conftest.$ac_ext >&5
9565
98418dba
CW
9566ac_cv_lib_dnet_dnet_ntoa=no
9567fi
edfaf76d
LK
9568rm -f conftest.err conftest.$ac_objext \
9569 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9570LIBS=$ac_check_lib_save_LIBS
9571fi
c0d27fcc 9572echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
9573echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9574if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 9575 cat >>confdefs.h <<_ACEOF
98418dba 9576#define HAVE_LIBDNET 1
c0d27fcc 9577_ACEOF
98418dba
CW
9578
9579 LIBS="-ldnet $LIBS"
9580
9581fi
9582
c0d27fcc
MR
9583
9584echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
9585echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
9586if test "${ac_cv_lib_Xbsd_main+set}" = set; then
9587 echo $ECHO_N "(cached) $ECHO_C" >&6
9588else
9589 ac_check_lib_save_LIBS=$LIBS
9590LIBS="-lXbsd $LIBS"
9591cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9592/* confdefs.h. */
9593_ACEOF
9594cat confdefs.h >>conftest.$ac_ext
9595cat >>conftest.$ac_ext <<_ACEOF
9596/* end confdefs.h. */
98418dba 9597
c0d27fcc 9598
98418dba
CW
9599int
9600main ()
9601{
9602main ();
9603 ;
9604 return 0;
9605}
9606_ACEOF
9607rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9608if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9609 (eval $ac_link) 2>conftest.er1
98418dba 9610 ac_status=$?
edfaf76d
LK
9611 grep -v '^ *+' conftest.er1 >conftest.err
9612 rm -f conftest.er1
9613 cat conftest.err >&5
c0d27fcc 9614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9615 (exit $ac_status); } &&
8ae52ca6 9616 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
9617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9618 (eval $ac_try) 2>&5
9619 ac_status=$?
9620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9621 (exit $ac_status); }; } &&
9622 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9624 (eval $ac_try) 2>&5
9625 ac_status=$?
c0d27fcc 9626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9627 (exit $ac_status); }; }; then
9628 ac_cv_lib_Xbsd_main=yes
9629else
9630 echo "$as_me: failed program was:" >&5
19650fd6
AS
9631sed 's/^/| /' conftest.$ac_ext >&5
9632
98418dba
CW
9633ac_cv_lib_Xbsd_main=no
9634fi
edfaf76d
LK
9635rm -f conftest.err conftest.$ac_objext \
9636 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9637LIBS=$ac_check_lib_save_LIBS
9638fi
c0d27fcc 9639echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
9640echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
9641if test $ac_cv_lib_Xbsd_main = yes; then
9642 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
9643fi
9644
c0d27fcc
MR
9645
9646
9647echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
9648echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
9649if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
9650 echo $ECHO_N "(cached) $ECHO_C" >&6
9651else
9652 ac_check_lib_save_LIBS=$LIBS
9653LIBS="-lpthreads $LIBS"
9654cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9655/* confdefs.h. */
9656_ACEOF
9657cat confdefs.h >>conftest.$ac_ext
9658cat >>conftest.$ac_ext <<_ACEOF
9659/* end confdefs.h. */
98418dba
CW
9660
9661/* Override any gcc2 internal prototype to avoid an error. */
9662#ifdef __cplusplus
9663extern "C"
9664#endif
9665/* We use char because int might match the return type of a gcc2
9666 builtin and then its argument prototype would still apply. */
9667char cma_open ();
98418dba
CW
9668int
9669main ()
9670{
9671cma_open ();
9672 ;
9673 return 0;
9674}
9675_ACEOF
9676rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9677if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9678 (eval $ac_link) 2>conftest.er1
98418dba 9679 ac_status=$?
edfaf76d
LK
9680 grep -v '^ *+' conftest.er1 >conftest.err
9681 rm -f conftest.er1
9682 cat conftest.err >&5
c0d27fcc 9683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9684 (exit $ac_status); } &&
8ae52ca6 9685 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
9686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9687 (eval $ac_try) 2>&5
9688 ac_status=$?
9689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9690 (exit $ac_status); }; } &&
9691 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9693 (eval $ac_try) 2>&5
9694 ac_status=$?
c0d27fcc 9695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9696 (exit $ac_status); }; }; then
9697 ac_cv_lib_pthreads_cma_open=yes
9698else
9699 echo "$as_me: failed program was:" >&5
19650fd6
AS
9700sed 's/^/| /' conftest.$ac_ext >&5
9701
98418dba
CW
9702ac_cv_lib_pthreads_cma_open=no
9703fi
edfaf76d
LK
9704rm -f conftest.err conftest.$ac_objext \
9705 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9706LIBS=$ac_check_lib_save_LIBS
9707fi
c0d27fcc 9708echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
9709echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
9710if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 9711 cat >>confdefs.h <<_ACEOF
98418dba 9712#define HAVE_LIBPTHREADS 1
c0d27fcc 9713_ACEOF
98418dba
CW
9714
9715 LIBS="-lpthreads $LIBS"
9716
9717fi
9718
c0d27fcc
MR
9719
9720echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
9721echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
9722if test -d /usr/X386/include; then
9723 HAVE_XFREE386=yes
9724 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
9725else
9726 HAVE_XFREE386=no
9727fi
c0d27fcc 9728echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
9729echo "${ECHO_T}$HAVE_XFREE386" >&6
9730
55597d70
DL
9731
9732case ${host_os} in
9733aix*)
9734 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
9735echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
9736if test "${gdb_cv_bigtoc+set}" = set; then
9737 echo $ECHO_N "(cached) $ECHO_C" >&6
9738else
9739
9740 case $GCC in
9741 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9742 *) gdb_cv_bigtoc=-bbigtoc ;;
9743 esac
9744
9745 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9746 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9747/* confdefs.h. */
9748_ACEOF
9749cat confdefs.h >>conftest.$ac_ext
9750cat >>conftest.$ac_ext <<_ACEOF
9751/* end confdefs.h. */
55597d70
DL
9752
9753int
9754main ()
9755{
9756int i;
9757 ;
9758 return 0;
9759}
9760_ACEOF
9761rm -f conftest.$ac_objext conftest$ac_exeext
9762if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9763 (eval $ac_link) 2>conftest.er1
55597d70 9764 ac_status=$?
edfaf76d
LK
9765 grep -v '^ *+' conftest.er1 >conftest.err
9766 rm -f conftest.er1
9767 cat conftest.err >&5
55597d70
DL
9768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9769 (exit $ac_status); } &&
8ae52ca6 9770 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
9771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9772 (eval $ac_try) 2>&5
9773 ac_status=$?
9774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9775 (exit $ac_status); }; } &&
9776 { ac_try='test -s conftest$ac_exeext'
55597d70
DL
9777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9778 (eval $ac_try) 2>&5
9779 ac_status=$?
9780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9781 (exit $ac_status); }; }; then
9782 :
9783else
9784 echo "$as_me: failed program was:" >&5
19650fd6
AS
9785sed 's/^/| /' conftest.$ac_ext >&5
9786
55597d70
DL
9787gdb_cv_bigtoc=
9788fi
edfaf76d
LK
9789rm -f conftest.err conftest.$ac_objext \
9790 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
9791
9792fi
9793echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
9794echo "${ECHO_T}$gdb_cv_bigtoc" >&6
9795 ;;
9796esac
9797
ae1a998c
RS
9798# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
9799# used for the tests that follow. We set them back to REAL_CFLAGS and
9800# REAL_CPPFLAGS later on.
98418dba
CW
9801
9802REAL_CPPFLAGS="$CPPFLAGS"
9803
9804if test "${HAVE_X11}" = "yes"; then
9805 DEFS="$C_SWITCH_X_SITE $DEFS"
9806 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
9807 LIBS="$LIBX $LIBS"
9808 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
9809 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
9810
9811 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
9812 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
9813 # but it's more convenient here to set LD_RUN_PATH
9814 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
9815 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
9816 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
9817 export LD_RUN_PATH
9818 fi
9819
9820 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 9821 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
9822echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
9823 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9824/* confdefs.h. */
9825_ACEOF
9826cat confdefs.h >>conftest.$ac_ext
9827cat >>conftest.$ac_ext <<_ACEOF
9828/* end confdefs.h. */
98418dba 9829
98418dba
CW
9830int
9831main ()
9832{
9833XOpenDisplay ("foo");
9834 ;
9835 return 0;
9836}
9837_ACEOF
9838rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9839if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9840 (eval $ac_link) 2>conftest.er1
98418dba 9841 ac_status=$?
edfaf76d
LK
9842 grep -v '^ *+' conftest.er1 >conftest.err
9843 rm -f conftest.er1
9844 cat conftest.err >&5
c0d27fcc 9845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9846 (exit $ac_status); } &&
8ae52ca6 9847 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
9848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9849 (eval $ac_try) 2>&5
9850 ac_status=$?
9851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9852 (exit $ac_status); }; } &&
9853 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
9854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9855 (eval $ac_try) 2>&5
9856 ac_status=$?
9857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9858 (exit $ac_status); }; }; then
9859 xlinux_first_failure=no
98418dba
CW
9860else
9861 echo "$as_me: failed program was:" >&5
19650fd6
AS
9862sed 's/^/| /' conftest.$ac_ext >&5
9863
98418dba
CW
9864xlinux_first_failure=yes
9865fi
edfaf76d
LK
9866rm -f conftest.err conftest.$ac_objext \
9867 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9868 if test "${xlinux_first_failure}" = "yes"; then
9869 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
9870 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
9871 OLD_CPPFLAGS="$CPPFLAGS"
9872 OLD_LIBS="$LIBS"
9873 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
9874 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
9875 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
9876 LIBS="$LIBS -b i486-linuxaout"
9877 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9878/* confdefs.h. */
9879_ACEOF
9880cat confdefs.h >>conftest.$ac_ext
9881cat >>conftest.$ac_ext <<_ACEOF
9882/* end confdefs.h. */
98418dba 9883
98418dba
CW
9884int
9885main ()
9886{
9887XOpenDisplay ("foo");
9888 ;
9889 return 0;
9890}
9891_ACEOF
9892rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9893if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9894 (eval $ac_link) 2>conftest.er1
98418dba 9895 ac_status=$?
edfaf76d
LK
9896 grep -v '^ *+' conftest.er1 >conftest.err
9897 rm -f conftest.er1
9898 cat conftest.err >&5
c0d27fcc 9899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9900 (exit $ac_status); } &&
8ae52ca6 9901 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
9902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9903 (eval $ac_try) 2>&5
9904 ac_status=$?
9905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9906 (exit $ac_status); }; } &&
9907 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9909 (eval $ac_try) 2>&5
9910 ac_status=$?
c0d27fcc 9911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9912 (exit $ac_status); }; }; then
9913 xlinux_second_failure=no
9914else
9915 echo "$as_me: failed program was:" >&5
19650fd6
AS
9916sed 's/^/| /' conftest.$ac_ext >&5
9917
98418dba
CW
9918xlinux_second_failure=yes
9919fi
edfaf76d
LK
9920rm -f conftest.err conftest.$ac_objext \
9921 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9922 if test "${xlinux_second_failure}" = "yes"; then
9923 # If we get the same failure with -b, there is no use adding -b.
9924 # So take it out. This plays safe.
9925 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
9926 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
9927 CPPFLAGS="$OLD_CPPFLAGS"
9928 LIBS="$OLD_LIBS"
c0d27fcc 9929 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9930echo "${ECHO_T}no" >&6
9931 else
c0d27fcc 9932 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
9933echo "${ECHO_T}yes" >&6
9934 fi
9935 else
c0d27fcc 9936 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9937echo "${ECHO_T}no" >&6
9938 fi
9939 fi
9940
9941 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
9942 # header files included from there.
c0d27fcc 9943 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
9944echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
9945 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9946/* confdefs.h. */
9947_ACEOF
9948cat confdefs.h >>conftest.$ac_ext
9949cat >>conftest.$ac_ext <<_ACEOF
9950/* end confdefs.h. */
98418dba
CW
9951#include <X11/Xlib.h>
9952#include <X11/XKBlib.h>
98418dba
CW
9953int
9954main ()
9955{
9956XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
9957 ;
9958 return 0;
9959}
9960_ACEOF
9961rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9962if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9963 (eval $ac_link) 2>conftest.er1
98418dba 9964 ac_status=$?
edfaf76d
LK
9965 grep -v '^ *+' conftest.er1 >conftest.err
9966 rm -f conftest.er1
9967 cat conftest.err >&5
c0d27fcc 9968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9969 (exit $ac_status); } &&
8ae52ca6 9970 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
9971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9972 (eval $ac_try) 2>&5
9973 ac_status=$?
9974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9975 (exit $ac_status); }; } &&
9976 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9978 (eval $ac_try) 2>&5
9979 ac_status=$?
c0d27fcc 9980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9981 (exit $ac_status); }; }; then
9982 emacs_xkb=yes
9983else
9984 echo "$as_me: failed program was:" >&5
19650fd6
AS
9985sed 's/^/| /' conftest.$ac_ext >&5
9986
98418dba
CW
9987emacs_xkb=no
9988fi
edfaf76d
LK
9989rm -f conftest.err conftest.$ac_objext \
9990 conftest$ac_exeext conftest.$ac_ext
c0d27fcc 9991 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
9992echo "${ECHO_T}$emacs_xkb" >&6
9993 if test $emacs_xkb = yes; then
b936fae4 9994
c0d27fcc 9995cat >>confdefs.h <<\_ACEOF
98418dba 9996#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 9997_ACEOF
98418dba
CW
9998
9999 fi
10000
c0d27fcc
MR
10001
10002
10003
10004
98418dba
CW
10005for ac_func in XrmSetDatabase XScreenResourceString \
10006XScreenNumberOfScreen XSetWMProtocols
10007do
10008as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 10009echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
10010echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10011if eval "test \"\${$as_ac_var+set}\" = set"; then
10012 echo $ECHO_N "(cached) $ECHO_C" >&6
10013else
10014 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10015/* confdefs.h. */
10016_ACEOF
10017cat confdefs.h >>conftest.$ac_ext
10018cat >>conftest.$ac_ext <<_ACEOF
10019/* end confdefs.h. */
edfaf76d
LK
10020/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10021 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10022#define $ac_func innocuous_$ac_func
10023
98418dba 10024/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10025 which can conflict with char $ac_func (); below.
10026 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10027 <limits.h> exists even on freestanding compilers. */
edfaf76d 10028
19650fd6
AS
10029#ifdef __STDC__
10030# include <limits.h>
10031#else
10032# include <assert.h>
10033#endif
edfaf76d
LK
10034
10035#undef $ac_func
10036
98418dba
CW
10037/* Override any gcc2 internal prototype to avoid an error. */
10038#ifdef __cplusplus
10039extern "C"
19650fd6 10040{
98418dba
CW
10041#endif
10042/* We use char because int might match the return type of a gcc2
10043 builtin and then its argument prototype would still apply. */
10044char $ac_func ();
98418dba
CW
10045/* The GNU C library defines this for functions which it implements
10046 to always fail with ENOSYS. Some functions are actually named
10047 something starting with __ and the normal name is an alias. */
10048#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10049choke me
10050#else
19650fd6
AS
10051char (*f) () = $ac_func;
10052#endif
10053#ifdef __cplusplus
10054}
98418dba
CW
10055#endif
10056
19650fd6
AS
10057int
10058main ()
10059{
10060return f != $ac_func;
98418dba
CW
10061 ;
10062 return 0;
10063}
10064_ACEOF
10065rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10066if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10067 (eval $ac_link) 2>conftest.er1
98418dba 10068 ac_status=$?
edfaf76d
LK
10069 grep -v '^ *+' conftest.er1 >conftest.err
10070 rm -f conftest.er1
10071 cat conftest.err >&5
c0d27fcc 10072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10073 (exit $ac_status); } &&
8ae52ca6 10074 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
10075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10076 (eval $ac_try) 2>&5
10077 ac_status=$?
10078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10079 (exit $ac_status); }; } &&
10080 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10082 (eval $ac_try) 2>&5
10083 ac_status=$?
c0d27fcc 10084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10085 (exit $ac_status); }; }; then
10086 eval "$as_ac_var=yes"
10087else
10088 echo "$as_me: failed program was:" >&5
19650fd6
AS
10089sed 's/^/| /' conftest.$ac_ext >&5
10090
98418dba
CW
10091eval "$as_ac_var=no"
10092fi
edfaf76d
LK
10093rm -f conftest.err conftest.$ac_objext \
10094 conftest$ac_exeext conftest.$ac_ext
98418dba 10095fi
c0d27fcc 10096echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
10097echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10098if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10099 cat >>confdefs.h <<_ACEOF
98418dba 10100#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10101_ACEOF
98418dba
CW
10102
10103fi
10104done
10105
10106fi
10107
10108if test "${window_system}" = "x11"; then
c0d27fcc 10109 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
10110echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
10111 if test "${emacs_cv_x11_version_6+set}" = set; then
10112 echo $ECHO_N "(cached) $ECHO_C" >&6
10113else
10114 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10115/* confdefs.h. */
10116_ACEOF
10117cat confdefs.h >>conftest.$ac_ext
10118cat >>conftest.$ac_ext <<_ACEOF
10119/* end confdefs.h. */
98418dba 10120#include <X11/Xlib.h>
98418dba
CW
10121int
10122main ()
10123{
10124#if XlibSpecificationRelease < 6
10125fail;
10126#endif
10127
10128 ;
10129 return 0;
10130}
10131_ACEOF
10132rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10133if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10134 (eval $ac_link) 2>conftest.er1
98418dba 10135 ac_status=$?
edfaf76d
LK
10136 grep -v '^ *+' conftest.er1 >conftest.err
10137 rm -f conftest.er1
10138 cat conftest.err >&5
c0d27fcc 10139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10140 (exit $ac_status); } &&
8ae52ca6 10141 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
10142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10143 (eval $ac_try) 2>&5
10144 ac_status=$?
10145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10146 (exit $ac_status); }; } &&
10147 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10149 (eval $ac_try) 2>&5
10150 ac_status=$?
c0d27fcc 10151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10152 (exit $ac_status); }; }; then
10153 emacs_cv_x11_version_6=yes
10154else
10155 echo "$as_me: failed program was:" >&5
19650fd6
AS
10156sed 's/^/| /' conftest.$ac_ext >&5
10157
98418dba
CW
10158emacs_cv_x11_version_6=no
10159fi
edfaf76d
LK
10160rm -f conftest.err conftest.$ac_objext \
10161 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10162fi
10163
10164 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 10165 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 10166echo "${ECHO_T}6 or newer" >&6
b936fae4 10167
c0d27fcc 10168cat >>confdefs.h <<\_ACEOF
98418dba 10169#define HAVE_X11R6 1
c0d27fcc 10170_ACEOF
98418dba
CW
10171
10172 else
c0d27fcc 10173 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
10174echo "${ECHO_T}before 6" >&6
10175 fi
10176fi
10177
10178if test "${window_system}" = "x11"; then
c0d27fcc 10179 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
10180echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
10181 if test "${emacs_cv_x11_version_5+set}" = set; then
10182 echo $ECHO_N "(cached) $ECHO_C" >&6
10183else
10184 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10185/* confdefs.h. */
10186_ACEOF
10187cat confdefs.h >>conftest.$ac_ext
10188cat >>conftest.$ac_ext <<_ACEOF
10189/* end confdefs.h. */
98418dba 10190#include <X11/Xlib.h>
98418dba
CW
10191int
10192main ()
10193{
10194#if XlibSpecificationRelease < 5
10195fail;
10196#endif
10197
10198 ;
10199 return 0;
10200}
10201_ACEOF
10202rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10203if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10204 (eval $ac_link) 2>conftest.er1
98418dba 10205 ac_status=$?
edfaf76d
LK
10206 grep -v '^ *+' conftest.er1 >conftest.err
10207 rm -f conftest.er1
10208 cat conftest.err >&5
c0d27fcc 10209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10210 (exit $ac_status); } &&
8ae52ca6 10211 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
10212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10213 (eval $ac_try) 2>&5
10214 ac_status=$?
10215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10216 (exit $ac_status); }; } &&
10217 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10219 (eval $ac_try) 2>&5
10220 ac_status=$?
c0d27fcc 10221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10222 (exit $ac_status); }; }; then
10223 emacs_cv_x11_version_5=yes
10224else
10225 echo "$as_me: failed program was:" >&5
19650fd6
AS
10226sed 's/^/| /' conftest.$ac_ext >&5
10227
98418dba
CW
10228emacs_cv_x11_version_5=no
10229fi
edfaf76d
LK
10230rm -f conftest.err conftest.$ac_objext \
10231 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10232fi
10233
10234 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 10235 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
10236echo "${ECHO_T}5 or newer" >&6
10237 HAVE_X11R5=yes
b936fae4 10238
c0d27fcc 10239cat >>confdefs.h <<\_ACEOF
98418dba 10240#define HAVE_X11R5 1
c0d27fcc 10241_ACEOF
98418dba
CW
10242
10243 else
10244 HAVE_X11R5=no
c0d27fcc 10245 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
10246echo "${ECHO_T}before 5" >&6
10247 fi
10248fi
10249
488dd4c4
JD
10250HAVE_GTK=no
10251if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 10252 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
10253 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
10254echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
10255 { (exit 1); exit 1; }; };
10256 fi
448541bc
JD
10257 GLIB_REQUIRED=2.4
10258 GTK_REQUIRED=2.4
488dd4c4
JD
10259 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10260
10261 if test "X${with_pkg_config_prog}" != X; then
10262 PKG_CONFIG="${with_pkg_config_prog}"
10263 fi
10264
10265 succeeded=no
10266
10267 if test -z "$PKG_CONFIG"; then
10268 # Extract the first word of "pkg-config", so it can be a program name with args.
10269set dummy pkg-config; ac_word=$2
10270echo "$as_me:$LINENO: checking for $ac_word" >&5
10271echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10272if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10273 echo $ECHO_N "(cached) $ECHO_C" >&6
10274else
10275 case $PKG_CONFIG in
10276 [\\/]* | ?:[\\/]*)
10277 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10278 ;;
10279 *)
10280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10281for as_dir in $PATH
10282do
10283 IFS=$as_save_IFS
10284 test -z "$as_dir" && as_dir=.
10285 for ac_exec_ext in '' $ac_executable_extensions; do
10286 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10287 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10288 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10289 break 2
10290 fi
10291done
10292done
10293
10294 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10295 ;;
10296esac
10297fi
10298PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10299
10300if test -n "$PKG_CONFIG"; then
10301 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10302echo "${ECHO_T}$PKG_CONFIG" >&6
10303else
10304 echo "$as_me:$LINENO: result: no" >&5
10305echo "${ECHO_T}no" >&6
10306fi
10307
10308 fi
10309
10310 if test "$PKG_CONFIG" = "no" ; then
439f58ee
JD
10311 { { echo "$as_me:$LINENO: error:
10312 *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >&5
10313echo "$as_me: error:
10314 *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >&2;}
10315 { (exit 1); exit 1; }; }
488dd4c4
JD
10316 else
10317 PKG_CONFIG_MIN_VERSION=0.9.0
10318 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10319 echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
10320echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6
10321
67db6aa2 10322 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
488dd4c4
JD
10323 echo "$as_me:$LINENO: result: yes" >&5
10324echo "${ECHO_T}yes" >&6
10325 succeeded=yes
10326
10327 echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
10328echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
10329 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
10330 echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
10331echo "${ECHO_T}$GTK_CFLAGS" >&6
10332
10333 echo "$as_me:$LINENO: checking GTK_LIBS" >&5
10334echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
10335 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
10336 echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
10337echo "${ECHO_T}$GTK_LIBS" >&6
10338 else
439f58ee
JD
10339 echo "$as_me:$LINENO: result: no" >&5
10340echo "${ECHO_T}no" >&6
488dd4c4
JD
10341 GTK_CFLAGS=""
10342 GTK_LIBS=""
10343 ## If we have a custom action on failure, don't print errors, but
10344 ## do set a variable so people can do so.
10345 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
10346 echo $GTK_PKG_ERRORS
10347 fi
10348
10349
10350
10351 else
10352 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10353 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10354 fi
10355 fi
10356
10357 if test $succeeded = yes; then
10358 :
10359 else
10360 { { 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
10361echo "$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;}
10362 { (exit 1); exit 1; }; }
10363 fi
10364
10365
10366
10367 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
10368 CFLAGS="$CFLAGS $GTK_CFLAGS"
10369 LIBS="$GTK_LIBS $LIBS"
488dd4c4
JD
10370 HAVE_GTK=yes
10371
10372cat >>confdefs.h <<\_ACEOF
10373#define HAVE_GTK 1
10374_ACEOF
10375
10376 USE_X_TOOLKIT=none
10377
d0a80c21
JD
10378 if test "$with_toolkit_scroll_bars" != no; then
10379 with_toolkit_scroll_bars=yes
10380 fi
57669b57 10381
5f6a587f 10382 HAVE_GTK_MULTIDISPLAY=no
57669b57 10383
572a3cc2
JD
10384 HAVE_GTK_FILE_SELECTION=no
10385
10386for ac_func in gtk_file_selection_new
10387do
10388as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10389echo "$as_me:$LINENO: checking for $ac_func" >&5
10390echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10391if eval "test \"\${$as_ac_var+set}\" = set"; then
10392 echo $ECHO_N "(cached) $ECHO_C" >&6
10393else
10394 cat >conftest.$ac_ext <<_ACEOF
10395/* confdefs.h. */
10396_ACEOF
10397cat confdefs.h >>conftest.$ac_ext
10398cat >>conftest.$ac_ext <<_ACEOF
10399/* end confdefs.h. */
edfaf76d
LK
10400/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10401 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10402#define $ac_func innocuous_$ac_func
10403
572a3cc2
JD
10404/* System header to define __stub macros and hopefully few prototypes,
10405 which can conflict with char $ac_func (); below.
10406 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10407 <limits.h> exists even on freestanding compilers. */
edfaf76d 10408
572a3cc2
JD
10409#ifdef __STDC__
10410# include <limits.h>
10411#else
10412# include <assert.h>
10413#endif
edfaf76d
LK
10414
10415#undef $ac_func
10416
572a3cc2
JD
10417/* Override any gcc2 internal prototype to avoid an error. */
10418#ifdef __cplusplus
10419extern "C"
10420{
10421#endif
10422/* We use char because int might match the return type of a gcc2
10423 builtin and then its argument prototype would still apply. */
10424char $ac_func ();
10425/* The GNU C library defines this for functions which it implements
10426 to always fail with ENOSYS. Some functions are actually named
10427 something starting with __ and the normal name is an alias. */
10428#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10429choke me
10430#else
10431char (*f) () = $ac_func;
10432#endif
10433#ifdef __cplusplus
10434}
10435#endif
10436
10437int
10438main ()
10439{
10440return f != $ac_func;
10441 ;
10442 return 0;
10443}
10444_ACEOF
10445rm -f conftest.$ac_objext conftest$ac_exeext
10446if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10447 (eval $ac_link) 2>conftest.er1
572a3cc2 10448 ac_status=$?
edfaf76d
LK
10449 grep -v '^ *+' conftest.er1 >conftest.err
10450 rm -f conftest.er1
10451 cat conftest.err >&5
572a3cc2
JD
10452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10453 (exit $ac_status); } &&
8ae52ca6 10454 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
10455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10456 (eval $ac_try) 2>&5
10457 ac_status=$?
10458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10459 (exit $ac_status); }; } &&
10460 { ac_try='test -s conftest$ac_exeext'
572a3cc2
JD
10461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10462 (eval $ac_try) 2>&5
10463 ac_status=$?
10464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10465 (exit $ac_status); }; }; then
10466 eval "$as_ac_var=yes"
10467else
10468 echo "$as_me: failed program was:" >&5
10469sed 's/^/| /' conftest.$ac_ext >&5
10470
10471eval "$as_ac_var=no"
10472fi
edfaf76d
LK
10473rm -f conftest.err conftest.$ac_objext \
10474 conftest$ac_exeext conftest.$ac_ext
572a3cc2
JD
10475fi
10476echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10477echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10478if test `eval echo '${'$as_ac_var'}'` = yes; then
10479 cat >>confdefs.h <<_ACEOF
10480#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10481_ACEOF
10482 HAVE_GTK_FILE_SELECTION=yes
10483fi
10484done
10485
10486
10487 HAVE_GTK_FILE_CHOOSER=no
10488
10489for ac_func in gtk_file_chooser_dialog_new
10490do
10491as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10492echo "$as_me:$LINENO: checking for $ac_func" >&5
10493echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10494if eval "test \"\${$as_ac_var+set}\" = set"; then
10495 echo $ECHO_N "(cached) $ECHO_C" >&6
10496else
10497 cat >conftest.$ac_ext <<_ACEOF
10498/* confdefs.h. */
10499_ACEOF
10500cat confdefs.h >>conftest.$ac_ext
10501cat >>conftest.$ac_ext <<_ACEOF
10502/* end confdefs.h. */
edfaf76d
LK
10503/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10504 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10505#define $ac_func innocuous_$ac_func
10506
572a3cc2
JD
10507/* System header to define __stub macros and hopefully few prototypes,
10508 which can conflict with char $ac_func (); below.
10509 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10510 <limits.h> exists even on freestanding compilers. */
edfaf76d 10511
572a3cc2
JD
10512#ifdef __STDC__
10513# include <limits.h>
10514#else
10515# include <assert.h>
10516#endif
edfaf76d
LK
10517
10518#undef $ac_func
10519
572a3cc2
JD
10520/* Override any gcc2 internal prototype to avoid an error. */
10521#ifdef __cplusplus
10522extern "C"
10523{
10524#endif
10525/* We use char because int might match the return type of a gcc2
10526 builtin and then its argument prototype would still apply. */
10527char $ac_func ();
10528/* The GNU C library defines this for functions which it implements
10529 to always fail with ENOSYS. Some functions are actually named
10530 something starting with __ and the normal name is an alias. */
10531#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10532choke me
10533#else
10534char (*f) () = $ac_func;
10535#endif
10536#ifdef __cplusplus
10537}
10538#endif
10539
10540int
10541main ()
10542{
10543return f != $ac_func;
10544 ;
10545 return 0;
10546}
10547_ACEOF
10548rm -f conftest.$ac_objext conftest$ac_exeext
10549if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10550 (eval $ac_link) 2>conftest.er1
572a3cc2 10551 ac_status=$?
edfaf76d
LK
10552 grep -v '^ *+' conftest.er1 >conftest.err
10553 rm -f conftest.er1
10554 cat conftest.err >&5
572a3cc2
JD
10555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10556 (exit $ac_status); } &&
8ae52ca6 10557 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
10558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10559 (eval $ac_try) 2>&5
10560 ac_status=$?
10561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10562 (exit $ac_status); }; } &&
10563 { ac_try='test -s conftest$ac_exeext'
572a3cc2
JD
10564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10565 (eval $ac_try) 2>&5
10566 ac_status=$?
10567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10568 (exit $ac_status); }; }; then
10569 eval "$as_ac_var=yes"
10570else
10571 echo "$as_me: failed program was:" >&5
10572sed 's/^/| /' conftest.$ac_ext >&5
10573
10574eval "$as_ac_var=no"
10575fi
edfaf76d
LK
10576rm -f conftest.err conftest.$ac_objext \
10577 conftest$ac_exeext conftest.$ac_ext
572a3cc2
JD
10578fi
10579echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10580echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10581if test `eval echo '${'$as_ac_var'}'` = yes; then
10582 cat >>confdefs.h <<_ACEOF
10583#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10584_ACEOF
10585 HAVE_GTK_FILE_CHOOSER=yes
10586fi
10587done
10588
10589
10590 if test "$HAVE_GTK_FILE_SELECTION" = yes \
10591 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10592
10593cat >>confdefs.h <<\_ACEOF
10594#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
10595_ACEOF
10596
b8bdffbe
JD
10597 fi
10598
10599 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10600 HAVE_GTK_AND_PTHREAD=no
10601
10602for ac_header in pthread.h
10603do
10604as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10605if eval "test \"\${$as_ac_Header+set}\" = set"; then
10606 echo "$as_me:$LINENO: checking for $ac_header" >&5
10607echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10608if eval "test \"\${$as_ac_Header+set}\" = set"; then
10609 echo $ECHO_N "(cached) $ECHO_C" >&6
10610fi
10611echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10612echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10613else
10614 # Is the header compilable?
10615echo "$as_me:$LINENO: checking $ac_header usability" >&5
10616echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10617cat >conftest.$ac_ext <<_ACEOF
10618/* confdefs.h. */
10619_ACEOF
10620cat confdefs.h >>conftest.$ac_ext
10621cat >>conftest.$ac_ext <<_ACEOF
10622/* end confdefs.h. */
10623$ac_includes_default
10624#include <$ac_header>
10625_ACEOF
10626rm -f conftest.$ac_objext
10627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 10628 (eval $ac_compile) 2>conftest.er1
b8bdffbe 10629 ac_status=$?
edfaf76d
LK
10630 grep -v '^ *+' conftest.er1 >conftest.err
10631 rm -f conftest.er1
10632 cat conftest.err >&5
b8bdffbe
JD
10633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10634 (exit $ac_status); } &&
8ae52ca6 10635 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
10636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10637 (eval $ac_try) 2>&5
10638 ac_status=$?
10639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10640 (exit $ac_status); }; } &&
10641 { ac_try='test -s conftest.$ac_objext'
b8bdffbe
JD
10642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10643 (eval $ac_try) 2>&5
10644 ac_status=$?
10645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10646 (exit $ac_status); }; }; then
10647 ac_header_compiler=yes
10648else
10649 echo "$as_me: failed program was:" >&5
10650sed 's/^/| /' conftest.$ac_ext >&5
10651
10652ac_header_compiler=no
10653fi
edfaf76d 10654rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b8bdffbe
JD
10655echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10656echo "${ECHO_T}$ac_header_compiler" >&6
10657
10658# Is the header present?
10659echo "$as_me:$LINENO: checking $ac_header presence" >&5
10660echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10661cat >conftest.$ac_ext <<_ACEOF
10662/* confdefs.h. */
10663_ACEOF
10664cat confdefs.h >>conftest.$ac_ext
10665cat >>conftest.$ac_ext <<_ACEOF
10666/* end confdefs.h. */
10667#include <$ac_header>
10668_ACEOF
10669if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10670 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10671 ac_status=$?
10672 grep -v '^ *+' conftest.er1 >conftest.err
10673 rm -f conftest.er1
10674 cat conftest.err >&5
10675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10676 (exit $ac_status); } >/dev/null; then
10677 if test -s conftest.err; then
10678 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 10679 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
b8bdffbe
JD
10680 else
10681 ac_cpp_err=
10682 fi
10683else
10684 ac_cpp_err=yes
10685fi
10686if test -z "$ac_cpp_err"; then
10687 ac_header_preproc=yes
10688else
10689 echo "$as_me: failed program was:" >&5
10690sed 's/^/| /' conftest.$ac_ext >&5
10691
10692 ac_header_preproc=no
10693fi
10694rm -f conftest.err conftest.$ac_ext
10695echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10696echo "${ECHO_T}$ac_header_preproc" >&6
10697
10698# So? What about this header?
edfaf76d
LK
10699case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10700 yes:no: )
b8bdffbe
JD
10701 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10702echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
10703 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10704echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10705 ac_header_preproc=yes
b8bdffbe 10706 ;;
edfaf76d 10707 no:yes:* )
b8bdffbe
JD
10708 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10709echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
10710 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10711echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10712 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10713echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10714 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10715echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
10716 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10717echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
10718 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10719echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b8bdffbe
JD
10720 (
10721 cat <<\_ASBOX
edfaf76d
LK
10722## ------------------------------------------ ##
10723## Report this to the AC_PACKAGE_NAME lists. ##
10724## ------------------------------------------ ##
b8bdffbe
JD
10725_ASBOX
10726 ) |
10727 sed "s/^/$as_me: WARNING: /" >&2
10728 ;;
10729esac
10730echo "$as_me:$LINENO: checking for $ac_header" >&5
10731echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10732if eval "test \"\${$as_ac_Header+set}\" = set"; then
10733 echo $ECHO_N "(cached) $ECHO_C" >&6
10734else
edfaf76d 10735 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe
JD
10736fi
10737echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10738echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10739
10740fi
10741if test `eval echo '${'$as_ac_Header'}'` = yes; then
10742 cat >>confdefs.h <<_ACEOF
10743#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10744_ACEOF
10745
10746fi
10747
10748done
10749
10750 if test "$ac_cv_header_pthread_h"; then
10751 echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
10752echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6
10753if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
10754 echo $ECHO_N "(cached) $ECHO_C" >&6
10755else
10756 ac_check_lib_save_LIBS=$LIBS
10757LIBS="-lpthread $LIBS"
10758cat >conftest.$ac_ext <<_ACEOF
10759/* confdefs.h. */
10760_ACEOF
10761cat confdefs.h >>conftest.$ac_ext
10762cat >>conftest.$ac_ext <<_ACEOF
10763/* end confdefs.h. */
10764
10765/* Override any gcc2 internal prototype to avoid an error. */
10766#ifdef __cplusplus
10767extern "C"
10768#endif
10769/* We use char because int might match the return type of a gcc2
10770 builtin and then its argument prototype would still apply. */
10771char pthread_self ();
10772int
10773main ()
10774{
10775pthread_self ();
10776 ;
10777 return 0;
10778}
10779_ACEOF
10780rm -f conftest.$ac_objext conftest$ac_exeext
10781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10782 (eval $ac_link) 2>conftest.er1
b8bdffbe 10783 ac_status=$?
edfaf76d
LK
10784 grep -v '^ *+' conftest.er1 >conftest.err
10785 rm -f conftest.er1
10786 cat conftest.err >&5
b8bdffbe
JD
10787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10788 (exit $ac_status); } &&
8ae52ca6 10789 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
10790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10791 (eval $ac_try) 2>&5
10792 ac_status=$?
10793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10794 (exit $ac_status); }; } &&
10795 { ac_try='test -s conftest$ac_exeext'
b8bdffbe
JD
10796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10797 (eval $ac_try) 2>&5
10798 ac_status=$?
10799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10800 (exit $ac_status); }; }; then
10801 ac_cv_lib_pthread_pthread_self=yes
10802else
10803 echo "$as_me: failed program was:" >&5
10804sed 's/^/| /' conftest.$ac_ext >&5
10805
10806ac_cv_lib_pthread_pthread_self=no
10807fi
edfaf76d
LK
10808rm -f conftest.err conftest.$ac_objext \
10809 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
10810LIBS=$ac_check_lib_save_LIBS
10811fi
10812echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
10813echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6
10814if test $ac_cv_lib_pthread_pthread_self = yes; then
10815 HAVE_GTK_AND_PTHREAD=yes
10816fi
10817
10818 fi
10819 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
10820 GTK_LIBS="$GTK_LIBS -lpthread"
10821
10822cat >>confdefs.h <<\_ACEOF
10823#define HAVE_GTK_AND_PTHREAD 1
10824_ACEOF
10825
10826 fi
57669b57 10827 fi
488dd4c4
JD
10828fi
10829
98418dba
CW
10830if test x"${USE_X_TOOLKIT}" = xmaybe; then
10831 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 10832 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
10833echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
10834 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
10835 echo $ECHO_N "(cached) $ECHO_C" >&6
10836else
10837 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10838/* confdefs.h. */
10839_ACEOF
10840cat confdefs.h >>conftest.$ac_ext
10841cat >>conftest.$ac_ext <<_ACEOF
10842/* end confdefs.h. */
98418dba
CW
10843
10844#include <X11/Intrinsic.h>
10845#include <X11/Xaw/Simple.h>
98418dba
CW
10846int
10847main ()
10848{
10849
10850 ;
10851 return 0;
10852}
10853_ACEOF
10854rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10855if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10856 (eval $ac_link) 2>conftest.er1
98418dba 10857 ac_status=$?
edfaf76d
LK
10858 grep -v '^ *+' conftest.er1 >conftest.err
10859 rm -f conftest.er1
10860 cat conftest.err >&5
c0d27fcc 10861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10862 (exit $ac_status); } &&
8ae52ca6 10863 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
10864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10865 (eval $ac_try) 2>&5
10866 ac_status=$?
10867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10868 (exit $ac_status); }; } &&
10869 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10871 (eval $ac_try) 2>&5
10872 ac_status=$?
c0d27fcc 10873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10874 (exit $ac_status); }; }; then
10875 emacs_cv_x11_version_5_with_xaw=yes
10876else
10877 echo "$as_me: failed program was:" >&5
19650fd6
AS
10878sed 's/^/| /' conftest.$ac_ext >&5
10879
98418dba
CW
10880emacs_cv_x11_version_5_with_xaw=no
10881fi
edfaf76d
LK
10882rm -f conftest.err conftest.$ac_objext \
10883 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10884fi
10885
10886 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 10887 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
10888echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
10889 USE_X_TOOLKIT=LUCID
10890 else
c0d27fcc 10891 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
10892echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
10893 USE_X_TOOLKIT=none
10894 fi
10895 else
10896 USE_X_TOOLKIT=none
10897 fi
10898fi
10899
10900X_TOOLKIT_TYPE=$USE_X_TOOLKIT
10901
10902if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 10903 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
10904echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
10905 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
10906 echo $ECHO_N "(cached) $ECHO_C" >&6
10907else
10908 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10909/* confdefs.h. */
10910_ACEOF
10911cat confdefs.h >>conftest.$ac_ext
10912cat >>conftest.$ac_ext <<_ACEOF
10913/* end confdefs.h. */
98418dba 10914#include <X11/Intrinsic.h>
98418dba
CW
10915int
10916main ()
10917{
10918#if XtSpecificationRelease < 6
10919fail;
10920#endif
10921
10922 ;
10923 return 0;
10924}
10925_ACEOF
10926rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10927if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10928 (eval $ac_link) 2>conftest.er1
98418dba 10929 ac_status=$?
edfaf76d
LK
10930 grep -v '^ *+' conftest.er1 >conftest.err
10931 rm -f conftest.er1
10932 cat conftest.err >&5
c0d27fcc 10933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10934 (exit $ac_status); } &&
8ae52ca6 10935 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
10936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10937 (eval $ac_try) 2>&5
10938 ac_status=$?
10939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10940 (exit $ac_status); }; } &&
10941 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10943 (eval $ac_try) 2>&5
10944 ac_status=$?
c0d27fcc 10945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10946 (exit $ac_status); }; }; then
10947 emacs_cv_x11_toolkit_version_6=yes
10948else
10949 echo "$as_me: failed program was:" >&5
19650fd6
AS
10950sed 's/^/| /' conftest.$ac_ext >&5
10951
98418dba
CW
10952emacs_cv_x11_toolkit_version_6=no
10953fi
edfaf76d
LK
10954rm -f conftest.err conftest.$ac_objext \
10955 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10956fi
10957
10958 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
10959 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 10960 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 10961echo "${ECHO_T}6 or newer" >&6
b936fae4 10962
c0d27fcc 10963cat >>confdefs.h <<\_ACEOF
98418dba 10964#define HAVE_X11XTR6 1
c0d27fcc 10965_ACEOF
98418dba
CW
10966
10967 else
c0d27fcc 10968 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
10969echo "${ECHO_T}before 6" >&6
10970 fi
10971
10972 OLDLIBS="$LIBS"
10973 if test x$HAVE_X11XTR6 = xyes; then
10974 LIBS="-lXt -lSM -lICE $LIBS"
10975 else
10976 LIBS="-lXt $LIBS"
10977 fi
10978
c0d27fcc 10979echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
10980echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
10981if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
10982 echo $ECHO_N "(cached) $ECHO_C" >&6
10983else
10984 ac_check_lib_save_LIBS=$LIBS
10985LIBS="-lXmu $LIBS"
10986cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10987/* confdefs.h. */
10988_ACEOF
10989cat confdefs.h >>conftest.$ac_ext
10990cat >>conftest.$ac_ext <<_ACEOF
10991/* end confdefs.h. */
98418dba
CW
10992
10993/* Override any gcc2 internal prototype to avoid an error. */
10994#ifdef __cplusplus
10995extern "C"
10996#endif
10997/* We use char because int might match the return type of a gcc2
10998 builtin and then its argument prototype would still apply. */
10999char XmuConvertStandardSelection ();
98418dba
CW
11000int
11001main ()
11002{
11003XmuConvertStandardSelection ();
11004 ;
11005 return 0;
11006}
11007_ACEOF
11008rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11009if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11010 (eval $ac_link) 2>conftest.er1
98418dba 11011 ac_status=$?
edfaf76d
LK
11012 grep -v '^ *+' conftest.er1 >conftest.err
11013 rm -f conftest.er1
11014 cat conftest.err >&5
c0d27fcc 11015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11016 (exit $ac_status); } &&
8ae52ca6 11017 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
11018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11019 (eval $ac_try) 2>&5
11020 ac_status=$?
11021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11022 (exit $ac_status); }; } &&
11023 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11025 (eval $ac_try) 2>&5
11026 ac_status=$?
c0d27fcc 11027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11028 (exit $ac_status); }; }; then
11029 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11030else
11031 echo "$as_me: failed program was:" >&5
19650fd6
AS
11032sed 's/^/| /' conftest.$ac_ext >&5
11033
98418dba
CW
11034ac_cv_lib_Xmu_XmuConvertStandardSelection=no
11035fi
edfaf76d
LK
11036rm -f conftest.err conftest.$ac_objext \
11037 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11038LIBS=$ac_check_lib_save_LIBS
11039fi
c0d27fcc 11040echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
11041echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
11042if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 11043 cat >>confdefs.h <<_ACEOF
98418dba 11044#define HAVE_LIBXMU 1
c0d27fcc 11045_ACEOF
98418dba
CW
11046
11047 LIBS="-lXmu $LIBS"
11048
11049fi
11050
11051 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11052fi
11053
11054# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11055if test "${HAVE_X11}" = "yes"; then
11056 if test "${USE_X_TOOLKIT}" != "none"; then
11057
c0d27fcc 11058echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
11059echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
11060if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
11061 echo $ECHO_N "(cached) $ECHO_C" >&6
11062else
11063 ac_check_lib_save_LIBS=$LIBS
11064LIBS="-lXext $LIBS"
11065cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11066/* confdefs.h. */
11067_ACEOF
11068cat confdefs.h >>conftest.$ac_ext
11069cat >>conftest.$ac_ext <<_ACEOF
11070/* end confdefs.h. */
98418dba
CW
11071
11072/* Override any gcc2 internal prototype to avoid an error. */
11073#ifdef __cplusplus
11074extern "C"
11075#endif
11076/* We use char because int might match the return type of a gcc2
11077 builtin and then its argument prototype would still apply. */
11078char XShapeQueryExtension ();
98418dba
CW
11079int
11080main ()
11081{
11082XShapeQueryExtension ();
11083 ;
11084 return 0;
11085}
11086_ACEOF
11087rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11088if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11089 (eval $ac_link) 2>conftest.er1
98418dba 11090 ac_status=$?
edfaf76d
LK
11091 grep -v '^ *+' conftest.er1 >conftest.err
11092 rm -f conftest.er1
11093 cat conftest.err >&5
c0d27fcc 11094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11095 (exit $ac_status); } &&
8ae52ca6 11096 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
11097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11098 (eval $ac_try) 2>&5
11099 ac_status=$?
11100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11101 (exit $ac_status); }; } &&
11102 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11104 (eval $ac_try) 2>&5
11105 ac_status=$?
c0d27fcc 11106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11107 (exit $ac_status); }; }; then
11108 ac_cv_lib_Xext_XShapeQueryExtension=yes
11109else
11110 echo "$as_me: failed program was:" >&5
19650fd6
AS
11111sed 's/^/| /' conftest.$ac_ext >&5
11112
98418dba
CW
11113ac_cv_lib_Xext_XShapeQueryExtension=no
11114fi
edfaf76d
LK
11115rm -f conftest.err conftest.$ac_objext \
11116 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11117LIBS=$ac_check_lib_save_LIBS
11118fi
c0d27fcc 11119echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
11120echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
11121if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 11122 cat >>confdefs.h <<_ACEOF
98418dba 11123#define HAVE_LIBXEXT 1
c0d27fcc 11124_ACEOF
98418dba
CW
11125
11126 LIBS="-lXext $LIBS"
11127
11128fi
11129
11130 fi
11131fi
11132
11133if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 11134 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
11135echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
11136if test "${emacs_cv_motif_version_2_1+set}" = set; then
11137 echo $ECHO_N "(cached) $ECHO_C" >&6
11138else
11139 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11140/* confdefs.h. */
11141_ACEOF
11142cat confdefs.h >>conftest.$ac_ext
11143cat >>conftest.$ac_ext <<_ACEOF
11144/* end confdefs.h. */
98418dba 11145#include <Xm/Xm.h>
98418dba
CW
11146int
11147main ()
11148{
11149#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
11150int x = 5;
11151#else
11152Motif version prior to 2.1.
11153#endif
11154 ;
11155 return 0;
11156}
11157_ACEOF
11158rm -f conftest.$ac_objext
c0d27fcc 11159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11160 (eval $ac_compile) 2>conftest.er1
98418dba 11161 ac_status=$?
edfaf76d
LK
11162 grep -v '^ *+' conftest.er1 >conftest.err
11163 rm -f conftest.er1
11164 cat conftest.err >&5
c0d27fcc 11165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11166 (exit $ac_status); } &&
8ae52ca6 11167 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
11168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11169 (eval $ac_try) 2>&5
11170 ac_status=$?
11171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11172 (exit $ac_status); }; } &&
11173 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 11174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11175 (eval $ac_try) 2>&5
11176 ac_status=$?
c0d27fcc 11177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11178 (exit $ac_status); }; }; then
11179 emacs_cv_motif_version_2_1=yes
11180else
11181 echo "$as_me: failed program was:" >&5
19650fd6
AS
11182sed 's/^/| /' conftest.$ac_ext >&5
11183
98418dba
CW
11184emacs_cv_motif_version_2_1=no
11185fi
edfaf76d 11186rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 11187fi
c0d27fcc 11188echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
11189echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
11190 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
11191 if test $emacs_cv_motif_version_2_1 = yes; then
11192 HAVE_LIBXP=no
b936fae4 11193
c0d27fcc 11194cat >>confdefs.h <<\_ACEOF
98418dba 11195#define HAVE_MOTIF_2_1 1
c0d27fcc 11196_ACEOF
98418dba 11197
c0d27fcc 11198 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
11199echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
11200if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
11201 echo $ECHO_N "(cached) $ECHO_C" >&6
11202else
11203 ac_check_lib_save_LIBS=$LIBS
11204LIBS="-lXp $LIBS"
11205cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11206/* confdefs.h. */
11207_ACEOF
11208cat confdefs.h >>conftest.$ac_ext
11209cat >>conftest.$ac_ext <<_ACEOF
11210/* end confdefs.h. */
98418dba
CW
11211
11212/* Override any gcc2 internal prototype to avoid an error. */
11213#ifdef __cplusplus
11214extern "C"
11215#endif
11216/* We use char because int might match the return type of a gcc2
11217 builtin and then its argument prototype would still apply. */
11218char XpCreateContext ();
98418dba
CW
11219int
11220main ()
11221{
11222XpCreateContext ();
11223 ;
11224 return 0;
11225}
11226_ACEOF
11227rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11228if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11229 (eval $ac_link) 2>conftest.er1
98418dba 11230 ac_status=$?
edfaf76d
LK
11231 grep -v '^ *+' conftest.er1 >conftest.err
11232 rm -f conftest.er1
11233 cat conftest.err >&5
c0d27fcc 11234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11235 (exit $ac_status); } &&
8ae52ca6 11236 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
11237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11238 (eval $ac_try) 2>&5
11239 ac_status=$?
11240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11241 (exit $ac_status); }; } &&
11242 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11244 (eval $ac_try) 2>&5
11245 ac_status=$?
c0d27fcc 11246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11247 (exit $ac_status); }; }; then
11248 ac_cv_lib_Xp_XpCreateContext=yes
11249else
11250 echo "$as_me: failed program was:" >&5
19650fd6
AS
11251sed 's/^/| /' conftest.$ac_ext >&5
11252
98418dba
CW
11253ac_cv_lib_Xp_XpCreateContext=no
11254fi
edfaf76d
LK
11255rm -f conftest.err conftest.$ac_objext \
11256 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11257LIBS=$ac_check_lib_save_LIBS
11258fi
c0d27fcc 11259echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
11260echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
11261if test $ac_cv_lib_Xp_XpCreateContext = yes; then
11262 HAVE_LIBXP=yes
11263fi
503d2be0 11264
98418dba 11265 if test ${HAVE_LIBXP} = yes; then
b936fae4 11266
c0d27fcc 11267cat >>confdefs.h <<\_ACEOF
98418dba 11268#define HAVE_LIBXP 1
c0d27fcc 11269_ACEOF
503d2be0 11270
98418dba 11271 fi
4693dbc9
SM
11272 else
11273 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
11274echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
11275if test "${emacs_cv_lesstif+set}" = set; then
11276 echo $ECHO_N "(cached) $ECHO_C" >&6
11277else
11278 # We put this in CFLAGS temporarily to precede other -I options
11279 # that might be in CFLAGS temporarily.
11280 # We put this in CPPFLAGS where it precedes the other -I options.
11281 OLD_CPPFLAGS=$CPPFLAGS
11282 OLD_CFLAGS=$CFLAGS
11283 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
11284 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
11285 cat >conftest.$ac_ext <<_ACEOF
11286/* confdefs.h. */
11287_ACEOF
11288cat confdefs.h >>conftest.$ac_ext
11289cat >>conftest.$ac_ext <<_ACEOF
11290/* end confdefs.h. */
11291#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
11292int
11293main ()
11294{
11295int x = 5;
11296 ;
11297 return 0;
11298}
11299_ACEOF
11300rm -f conftest.$ac_objext
11301if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11302 (eval $ac_compile) 2>conftest.er1
4693dbc9 11303 ac_status=$?
edfaf76d
LK
11304 grep -v '^ *+' conftest.er1 >conftest.err
11305 rm -f conftest.er1
11306 cat conftest.err >&5
4693dbc9
SM
11307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11308 (exit $ac_status); } &&
8ae52ca6 11309 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
11310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11311 (eval $ac_try) 2>&5
11312 ac_status=$?
11313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11314 (exit $ac_status); }; } &&
11315 { ac_try='test -s conftest.$ac_objext'
4693dbc9
SM
11316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11317 (eval $ac_try) 2>&5
11318 ac_status=$?
11319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11320 (exit $ac_status); }; }; then
11321 emacs_cv_lesstif=yes
11322else
11323 echo "$as_me: failed program was:" >&5
11324sed 's/^/| /' conftest.$ac_ext >&5
11325
11326emacs_cv_lesstif=no
11327fi
edfaf76d 11328rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9
SM
11329fi
11330echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
11331echo "${ECHO_T}$emacs_cv_lesstif" >&6
11332 if test $emacs_cv_lesstif = yes; then
11333 # Make sure this -I option remains in CPPFLAGS after it is set
11334 # back to REAL_CPPFLAGS.
11335 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
11336 # have those other -I options anyway. Ultimately, having this
11337 # directory ultimately in CPPFLAGS will be enough.
11338 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
11339 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
11340 else
11341 CFLAGS=$OLD_CFLAGS
11342 CPPFLAGS=$OLD_CPPFLAGS
11343 fi
98418dba
CW
11344 fi
11345fi
11346
11347### Is -lXaw3d available?
11348HAVE_XAW3D=no
11349if test "${HAVE_X11}" = "yes"; then
7c00e1e9 11350 if test "${USE_X_TOOLKIT}" != "none" && test "${with_toolkit_scroll_bars}" != "no"; then
22044edf 11351 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
11352echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
11353if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
11354 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11355else
22044edf 11356 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11357/* confdefs.h. */
11358_ACEOF
11359cat confdefs.h >>conftest.$ac_ext
11360cat >>conftest.$ac_ext <<_ACEOF
11361/* end confdefs.h. */
98418dba 11362#include <X11/Xaw3d/Scrollbar.h>
503d2be0 11363_ACEOF
c0d27fcc 11364if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11365 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11366 ac_status=$?
6bae0ccf 11367 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11368 rm -f conftest.er1
11369 cat conftest.err >&5
c0d27fcc 11370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11371 (exit $ac_status); } >/dev/null; then
11372 if test -s conftest.err; then
11373 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 11374 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
11375 else
11376 ac_cpp_err=
11377 fi
11378else
11379 ac_cpp_err=yes
11380fi
11381if test -z "$ac_cpp_err"; then
22044edf 11382 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 11383else
503d2be0 11384 echo "$as_me: failed program was:" >&5
19650fd6
AS
11385sed 's/^/| /' conftest.$ac_ext >&5
11386
22044edf 11387 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 11388fi
503d2be0 11389rm -f conftest.err conftest.$ac_ext
98418dba 11390fi
c0d27fcc 11391echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 11392echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 11393if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 11394 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
11395echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
11396if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
11397 echo $ECHO_N "(cached) $ECHO_C" >&6
11398else
11399 ac_check_lib_save_LIBS=$LIBS
11400LIBS="-lXaw3d $LIBS"
11401cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11402/* confdefs.h. */
11403_ACEOF
11404cat confdefs.h >>conftest.$ac_ext
11405cat >>conftest.$ac_ext <<_ACEOF
11406/* end confdefs.h. */
98418dba
CW
11407
11408/* Override any gcc2 internal prototype to avoid an error. */
11409#ifdef __cplusplus
11410extern "C"
11411#endif
11412/* We use char because int might match the return type of a gcc2
11413 builtin and then its argument prototype would still apply. */
11414char XawScrollbarSetThumb ();
503d2be0
AS
11415int
11416main ()
11417{
98418dba 11418XawScrollbarSetThumb ();
503d2be0
AS
11419 ;
11420 return 0;
11421}
11422_ACEOF
11423rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11424if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11425 (eval $ac_link) 2>conftest.er1
503d2be0 11426 ac_status=$?
edfaf76d
LK
11427 grep -v '^ *+' conftest.er1 >conftest.err
11428 rm -f conftest.er1
11429 cat conftest.err >&5
c0d27fcc 11430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11431 (exit $ac_status); } &&
8ae52ca6 11432 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
11433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11434 (eval $ac_try) 2>&5
11435 ac_status=$?
11436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11437 (exit $ac_status); }; } &&
11438 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11440 (eval $ac_try) 2>&5
11441 ac_status=$?
c0d27fcc 11442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11443 (exit $ac_status); }; }; then
98418dba 11444 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 11445else
503d2be0 11446 echo "$as_me: failed program was:" >&5
19650fd6
AS
11447sed 's/^/| /' conftest.$ac_ext >&5
11448
98418dba 11449ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 11450fi
edfaf76d
LK
11451rm -f conftest.err conftest.$ac_objext \
11452 conftest$ac_exeext conftest.$ac_ext
98418dba 11453LIBS=$ac_check_lib_save_LIBS
ba4481b5 11454fi
c0d27fcc 11455echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
11456echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
11457if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
11458 HAVE_XAW3D=yes
ba4481b5 11459fi
503d2be0 11460
ba4481b5
DL
11461fi
11462
c0d27fcc 11463
98418dba 11464 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 11465
c0d27fcc 11466cat >>confdefs.h <<\_ACEOF
98418dba 11467#define HAVE_XAW3D 1
c0d27fcc 11468_ACEOF
98418dba 11469
ba4481b5 11470 fi
98418dba 11471 fi
ba4481b5
DL
11472fi
11473
c0d27fcc
MR
11474
11475
98418dba
CW
11476USE_TOOLKIT_SCROLL_BARS=no
11477if test "${with_toolkit_scroll_bars}" != "no"; then
11478 if test "${USE_X_TOOLKIT}" != "none"; then
11479 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 11480 cat >>confdefs.h <<\_ACEOF
98418dba 11481#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11482_ACEOF
98418dba
CW
11483
11484 HAVE_XAW3D=no
11485 USE_TOOLKIT_SCROLL_BARS=yes
11486 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 11487 cat >>confdefs.h <<\_ACEOF
98418dba 11488#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11489_ACEOF
98418dba
CW
11490
11491 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 11492 fi
488dd4c4
JD
11493 elif test "${HAVE_GTK}" = "yes"; then
11494 cat >>confdefs.h <<\_ACEOF
11495#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
11496_ACEOF
11497
11498 USE_TOOLKIT_SCROLL_BARS=yes
11499 elif test "${HAVE_CARBON}" = "yes"; then
11500 cat >>confdefs.h <<\_ACEOF
11501#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
11502_ACEOF
11503
11504 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
11505 fi
11506fi
11507
abd39b57 11508cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
11509/* confdefs.h. */
11510_ACEOF
11511cat confdefs.h >>conftest.$ac_ext
11512cat >>conftest.$ac_ext <<_ACEOF
11513/* end confdefs.h. */
11514
11515 #include <X11/Xlib.h>
11516 #include <X11/Xresource.h>
11517int
11518main ()
11519{
11520XIMProc callback;
11521 ;
11522 return 0;
11523}
11524_ACEOF
11525rm -f conftest.$ac_objext
11526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11527 (eval $ac_compile) 2>conftest.er1
abd39b57 11528 ac_status=$?
edfaf76d
LK
11529 grep -v '^ *+' conftest.er1 >conftest.err
11530 rm -f conftest.er1
11531 cat conftest.err >&5
abd39b57
AC
11532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11533 (exit $ac_status); } &&
8ae52ca6 11534 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
11535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11536 (eval $ac_try) 2>&5
11537 ac_status=$?
11538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11539 (exit $ac_status); }; } &&
11540 { ac_try='test -s conftest.$ac_objext'
abd39b57
AC
11541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11542 (eval $ac_try) 2>&5
11543 ac_status=$?
11544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11545 (exit $ac_status); }; }; then
11546 HAVE_XIM=yes
11547
11548cat >>confdefs.h <<\_ACEOF
11549#define HAVE_XIM 1
11550_ACEOF
11551
11552else
11553 echo "$as_me: failed program was:" >&5
11554sed 's/^/| /' conftest.$ac_ext >&5
11555
11556HAVE_XIM=no
11557fi
edfaf76d 11558rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 11559
c0d27fcc 11560
98418dba 11561if test "${with_xim}" != "no"; then
b936fae4 11562
c0d27fcc 11563cat >>confdefs.h <<\_ACEOF
98418dba 11564#define USE_XIM 1
c0d27fcc 11565_ACEOF
98418dba 11566
793fa0d7 11567fi
abd39b57
AC
11568
11569
11570if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
11571 late_CFLAGS=$CFLAGS
11572 if test "$GCC" = yes; then
11573 CFLAGS="$CFLAGS --pedantic-errors"
11574 fi
cffcede7 11575 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11576/* confdefs.h. */
11577_ACEOF
11578cat confdefs.h >>conftest.$ac_ext
11579cat >>conftest.$ac_ext <<_ACEOF
11580/* end confdefs.h. */
cffcede7
JD
11581
11582#include <X11/Xlib.h>
11583#include <X11/Xresource.h>
11584int
11585main ()
11586{
11587Display *display;
11588XrmDatabase db;
11589char *res_name;
11590char *res_class;
11591XIMProc callback;
11592XPointer *client_data;
849d80cf
DL
11593#ifndef __GNUC__
11594/* If we're not using GCC, it's probably not XFree86, and this is
11595 probably right, but we can't use something like --pedantic-errors. */
11596extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11597 char*, XIMProc, XPointer*);
11598#endif
cffcede7
JD
11599(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11600 client_data);
11601 ;
11602 return 0;
11603}
11604_ACEOF
11605rm -f conftest.$ac_objext
11606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11607 (eval $ac_compile) 2>conftest.er1
cffcede7 11608 ac_status=$?
edfaf76d
LK
11609 grep -v '^ *+' conftest.er1 >conftest.err
11610 rm -f conftest.er1
11611 cat conftest.err >&5
cffcede7
JD
11612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11613 (exit $ac_status); } &&
8ae52ca6 11614 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
11615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11616 (eval $ac_try) 2>&5
11617 ac_status=$?
11618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11619 (exit $ac_status); }; } &&
11620 { ac_try='test -s conftest.$ac_objext'
cffcede7
JD
11621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11622 (eval $ac_try) 2>&5
11623 ac_status=$?
11624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11625 (exit $ac_status); }; }; then
11626 emacs_cv_arg6_star=yes
11627else
11628 echo "$as_me: failed program was:" >&5
19650fd6
AS
11629sed 's/^/| /' conftest.$ac_ext >&5
11630
cffcede7 11631fi
edfaf76d 11632rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
11633
11634 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 11635 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11636#define XRegisterIMInstantiateCallback_arg6 XPointer*
11637_ACEOF
11638
11639 else
f57bd967 11640 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11641#define XRegisterIMInstantiateCallback_arg6 XPointer
11642_ACEOF
11643
11644 fi
849d80cf 11645 CFLAGS=$late_CFLAGS
98418dba
CW
11646fi
11647
11648### Use -lXpm if available, unless `--with-xpm=no'.
11649HAVE_XPM=no
11650if test "${HAVE_X11}" = "yes"; then
11651 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
11652 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11653 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
11654echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11655if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11656 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11657fi
11658echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
11659echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 11660else
c0d27fcc
MR
11661 # Is the header compilable?
11662echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
11663echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
11664cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11665/* confdefs.h. */
11666_ACEOF
11667cat confdefs.h >>conftest.$ac_ext
11668cat >>conftest.$ac_ext <<_ACEOF
11669/* end confdefs.h. */
c0d27fcc
MR
11670$ac_includes_default
11671#include <X11/xpm.h>
11672_ACEOF
11673rm -f conftest.$ac_objext
11674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11675 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11676 ac_status=$?
edfaf76d
LK
11677 grep -v '^ *+' conftest.er1 >conftest.err
11678 rm -f conftest.er1
11679 cat conftest.err >&5
c0d27fcc
MR
11680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11681 (exit $ac_status); } &&
8ae52ca6 11682 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
11683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11684 (eval $ac_try) 2>&5
11685 ac_status=$?
11686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11687 (exit $ac_status); }; } &&
11688 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11690 (eval $ac_try) 2>&5
11691 ac_status=$?
11692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11693 (exit $ac_status); }; }; then
11694 ac_header_compiler=yes
11695else
11696 echo "$as_me: failed program was:" >&5
19650fd6
AS
11697sed 's/^/| /' conftest.$ac_ext >&5
11698
c0d27fcc
MR
11699ac_header_compiler=no
11700fi
edfaf76d 11701rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11702echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11703echo "${ECHO_T}$ac_header_compiler" >&6
11704
11705# Is the header present?
11706echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
11707echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
11708cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11709/* confdefs.h. */
11710_ACEOF
11711cat confdefs.h >>conftest.$ac_ext
11712cat >>conftest.$ac_ext <<_ACEOF
11713/* end confdefs.h. */
98418dba
CW
11714#include <X11/xpm.h>
11715_ACEOF
c0d27fcc 11716if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11717 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11718 ac_status=$?
6bae0ccf 11719 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11720 rm -f conftest.er1
11721 cat conftest.err >&5
c0d27fcc 11722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11723 (exit $ac_status); } >/dev/null; then
11724 if test -s conftest.err; then
11725 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 11726 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11727 else
11728 ac_cpp_err=
11729 fi
11730else
11731 ac_cpp_err=yes
11732fi
11733if test -z "$ac_cpp_err"; then
c0d27fcc 11734 ac_header_preproc=yes
98418dba
CW
11735else
11736 echo "$as_me: failed program was:" >&5
19650fd6
AS
11737sed 's/^/| /' conftest.$ac_ext >&5
11738
c0d27fcc 11739 ac_header_preproc=no
98418dba
CW
11740fi
11741rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11742echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11743echo "${ECHO_T}$ac_header_preproc" >&6
11744
11745# So? What about this header?
edfaf76d
LK
11746case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11747 yes:no: )
c0d27fcc
MR
11748 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
11749echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11750 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
11751echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
11752 ac_header_preproc=yes
11753 ;;
11754 no:yes:* )
11755 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
11756echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
11757 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
11758echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
11759 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
11760echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
11761 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
11762echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
11763 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
11764echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11765 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
11766echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
7c9e5167
JD
11767 (
11768 cat <<\_ASBOX
edfaf76d
LK
11769## ------------------------------------------ ##
11770## Report this to the AC_PACKAGE_NAME lists. ##
11771## ------------------------------------------ ##
19650fd6
AS
11772_ASBOX
11773 ) |
11774 sed "s/^/$as_me: WARNING: /" >&2
11775 ;;
c0d27fcc
MR
11776esac
11777echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
11778echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11779if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11780 echo $ECHO_N "(cached) $ECHO_C" >&6
11781else
11782 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 11783fi
c0d27fcc 11784echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 11785echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
11786
11787fi
98418dba 11788if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 11789 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
11790echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
11791if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 11792 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11793else
98418dba
CW
11794 ac_check_lib_save_LIBS=$LIBS
11795LIBS="-lXpm -lX11 $LIBS"
11796cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11797/* confdefs.h. */
11798_ACEOF
11799cat confdefs.h >>conftest.$ac_ext
11800cat >>conftest.$ac_ext <<_ACEOF
11801/* end confdefs.h. */
98418dba 11802
ba4481b5 11803/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11804#ifdef __cplusplus
11805extern "C"
11806#endif
ba4481b5 11807/* We use char because int might match the return type of a gcc2
503d2be0 11808 builtin and then its argument prototype would still apply. */
98418dba 11809char XpmReadFileToPixmap ();
503d2be0
AS
11810int
11811main ()
11812{
98418dba 11813XpmReadFileToPixmap ();
503d2be0
AS
11814 ;
11815 return 0;
11816}
11817_ACEOF
11818rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11819if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11820 (eval $ac_link) 2>conftest.er1
503d2be0 11821 ac_status=$?
edfaf76d
LK
11822 grep -v '^ *+' conftest.er1 >conftest.err
11823 rm -f conftest.er1
11824 cat conftest.err >&5
c0d27fcc 11825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11826 (exit $ac_status); } &&
8ae52ca6 11827 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
11828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11829 (eval $ac_try) 2>&5
11830 ac_status=$?
11831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11832 (exit $ac_status); }; } &&
11833 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11835 (eval $ac_try) 2>&5
11836 ac_status=$?
c0d27fcc 11837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11838 (exit $ac_status); }; }; then
98418dba 11839 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
11840else
11841 echo "$as_me: failed program was:" >&5
19650fd6
AS
11842sed 's/^/| /' conftest.$ac_ext >&5
11843
98418dba 11844ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 11845fi
edfaf76d
LK
11846rm -f conftest.err conftest.$ac_objext \
11847 conftest$ac_exeext conftest.$ac_ext
98418dba 11848LIBS=$ac_check_lib_save_LIBS
503d2be0 11849fi
c0d27fcc 11850echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
11851echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
11852if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
11853 HAVE_XPM=yes
ba4481b5
DL
11854fi
11855
98418dba
CW
11856fi
11857
c0d27fcc 11858
98418dba 11859 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11860 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
11861echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
11862 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11863/* confdefs.h. */
11864_ACEOF
11865cat confdefs.h >>conftest.$ac_ext
11866cat >>conftest.$ac_ext <<_ACEOF
11867/* end confdefs.h. */
98418dba
CW
11868#include "X11/xpm.h"
11869#ifndef XpmReturnAllocPixels
11870no_return_alloc_pixels
503d2be0 11871#endif
ba4481b5 11872
98418dba
CW
11873_ACEOF
11874if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11875 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
11876 HAVE_XPM=no
11877else
11878 HAVE_XPM=yes
11879fi
11880rm -f conftest*
ba4481b5 11881
c0d27fcc 11882
98418dba 11883 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11884 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
11885echo "${ECHO_T}yes" >&6
11886 else
c0d27fcc 11887 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
11888echo "${ECHO_T}no" >&6
11889 fi
11890 fi
11891 fi
11892
11893 if test "${HAVE_XPM}" = "yes"; then
b936fae4 11894
c0d27fcc 11895cat >>confdefs.h <<\_ACEOF
98418dba 11896#define HAVE_XPM 1
c0d27fcc 11897_ACEOF
98418dba
CW
11898
11899 fi
11900fi
11901
11902### Use -ljpeg if available, unless `--with-jpeg=no'.
11903HAVE_JPEG=no
11904if test "${HAVE_X11}" = "yes"; then
11905 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
11906 if test "${ac_cv_header_jerror_h+set}" = set; then
11907 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
11908echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11909if test "${ac_cv_header_jerror_h+set}" = set; then
11910 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11911fi
11912echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
11913echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 11914else
c0d27fcc
MR
11915 # Is the header compilable?
11916echo "$as_me:$LINENO: checking jerror.h usability" >&5
11917echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
11918cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11919/* confdefs.h. */
11920_ACEOF
11921cat confdefs.h >>conftest.$ac_ext
11922cat >>conftest.$ac_ext <<_ACEOF
11923/* end confdefs.h. */
c0d27fcc
MR
11924$ac_includes_default
11925#include <jerror.h>
11926_ACEOF
11927rm -f conftest.$ac_objext
11928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11929 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11930 ac_status=$?
edfaf76d
LK
11931 grep -v '^ *+' conftest.er1 >conftest.err
11932 rm -f conftest.er1
11933 cat conftest.err >&5
c0d27fcc
MR
11934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11935 (exit $ac_status); } &&
8ae52ca6 11936 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
11937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11938 (eval $ac_try) 2>&5
11939 ac_status=$?
11940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11941 (exit $ac_status); }; } &&
11942 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11944 (eval $ac_try) 2>&5
11945 ac_status=$?
11946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11947 (exit $ac_status); }; }; then
11948 ac_header_compiler=yes
11949else
11950 echo "$as_me: failed program was:" >&5
19650fd6
AS
11951sed 's/^/| /' conftest.$ac_ext >&5
11952
c0d27fcc
MR
11953ac_header_compiler=no
11954fi
edfaf76d 11955rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11956echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11957echo "${ECHO_T}$ac_header_compiler" >&6
11958
11959# Is the header present?
11960echo "$as_me:$LINENO: checking jerror.h presence" >&5
11961echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
11962cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11963/* confdefs.h. */
11964_ACEOF
11965cat confdefs.h >>conftest.$ac_ext
11966cat >>conftest.$ac_ext <<_ACEOF
11967/* end confdefs.h. */
98418dba
CW
11968#include <jerror.h>
11969_ACEOF
c0d27fcc 11970if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11971 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11972 ac_status=$?
6bae0ccf 11973 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11974 rm -f conftest.er1
11975 cat conftest.err >&5
c0d27fcc 11976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11977 (exit $ac_status); } >/dev/null; then
11978 if test -s conftest.err; then
11979 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 11980 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11981 else
11982 ac_cpp_err=
11983 fi
11984else
11985 ac_cpp_err=yes
503d2be0 11986fi
98418dba 11987if test -z "$ac_cpp_err"; then
c0d27fcc 11988 ac_header_preproc=yes
ba4481b5 11989else
98418dba 11990 echo "$as_me: failed program was:" >&5
19650fd6
AS
11991sed 's/^/| /' conftest.$ac_ext >&5
11992
c0d27fcc 11993 ac_header_preproc=no
98418dba
CW
11994fi
11995rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11996echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11997echo "${ECHO_T}$ac_header_preproc" >&6
11998
11999# So? What about this header?
edfaf76d
LK
12000case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12001 yes:no: )
c0d27fcc
MR
12002 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
12003echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12004 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
12005echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
12006 ac_header_preproc=yes
19650fd6 12007 ;;
edfaf76d 12008 no:yes:* )
c0d27fcc
MR
12009 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
12010echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12011 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
12012echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
12013 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
12014echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
12015 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
12016echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12017 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 12018echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12019 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
12020echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12021 (
12022 cat <<\_ASBOX
edfaf76d
LK
12023## ------------------------------------------ ##
12024## Report this to the AC_PACKAGE_NAME lists. ##
12025## ------------------------------------------ ##
19650fd6
AS
12026_ASBOX
12027 ) |
12028 sed "s/^/$as_me: WARNING: /" >&2
12029 ;;
c0d27fcc
MR
12030esac
12031echo "$as_me:$LINENO: checking for jerror.h" >&5
12032echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
12033if test "${ac_cv_header_jerror_h+set}" = set; then
12034 echo $ECHO_N "(cached) $ECHO_C" >&6
12035else
12036 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 12037fi
c0d27fcc 12038echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 12039echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
12040
12041fi
98418dba 12042if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 12043 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
12044echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
12045if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 12046 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12047else
98418dba
CW
12048 ac_check_lib_save_LIBS=$LIBS
12049LIBS="-ljpeg $LIBS"
12050cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12051/* confdefs.h. */
12052_ACEOF
12053cat confdefs.h >>conftest.$ac_ext
12054cat >>conftest.$ac_ext <<_ACEOF
12055/* end confdefs.h. */
98418dba
CW
12056
12057/* Override any gcc2 internal prototype to avoid an error. */
12058#ifdef __cplusplus
12059extern "C"
12060#endif
12061/* We use char because int might match the return type of a gcc2
12062 builtin and then its argument prototype would still apply. */
12063char jpeg_destroy_compress ();
503d2be0
AS
12064int
12065main ()
12066{
98418dba 12067jpeg_destroy_compress ();
503d2be0
AS
12068 ;
12069 return 0;
12070}
12071_ACEOF
12072rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12073if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12074 (eval $ac_link) 2>conftest.er1
503d2be0 12075 ac_status=$?
edfaf76d
LK
12076 grep -v '^ *+' conftest.er1 >conftest.err
12077 rm -f conftest.er1
12078 cat conftest.err >&5
c0d27fcc 12079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12080 (exit $ac_status); } &&
8ae52ca6 12081 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
12082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12083 (eval $ac_try) 2>&5
12084 ac_status=$?
12085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12086 (exit $ac_status); }; } &&
12087 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12089 (eval $ac_try) 2>&5
12090 ac_status=$?
c0d27fcc 12091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12092 (exit $ac_status); }; }; then
98418dba 12093 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 12094else
503d2be0 12095 echo "$as_me: failed program was:" >&5
19650fd6
AS
12096sed 's/^/| /' conftest.$ac_ext >&5
12097
98418dba 12098ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 12099fi
edfaf76d
LK
12100rm -f conftest.err conftest.$ac_objext \
12101 conftest$ac_exeext conftest.$ac_ext
98418dba 12102LIBS=$ac_check_lib_save_LIBS
ba4481b5 12103fi
c0d27fcc 12104echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
12105echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
12106if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
12107 HAVE_JPEG=yes
ba4481b5 12108fi
98418dba 12109
ba4481b5 12110fi
98418dba 12111
c0d27fcc 12112
ba4481b5 12113 fi
ba4481b5 12114
c0d27fcc 12115
98418dba 12116 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 12117 cat >>confdefs.h <<\_ACEOF
98418dba 12118#define HAVE_JPEG 1
c0d27fcc 12119_ACEOF
98418dba
CW
12120
12121 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12122/* confdefs.h. */
12123_ACEOF
12124cat confdefs.h >>conftest.$ac_ext
12125cat >>conftest.$ac_ext <<_ACEOF
12126/* end confdefs.h. */
22044edf 12127#include <jpeglib.h>
98418dba
CW
12128 version=JPEG_LIB_VERSION
12129
12130_ACEOF
12131if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 12132 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 12133 cat >>confdefs.h <<\_ACEOF
98418dba 12134#define HAVE_JPEG 1
c0d27fcc 12135_ACEOF
ba4481b5 12136
98418dba 12137else
c0d27fcc 12138 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
12139echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12140 HAVE_JPEG=no
ba4481b5 12141fi
98418dba 12142rm -f conftest*
ba4481b5 12143
98418dba
CW
12144 fi
12145fi
503d2be0 12146
98418dba
CW
12147### Use -lpng if available, unless `--with-png=no'.
12148HAVE_PNG=no
12149if test "${HAVE_X11}" = "yes"; then
12150 if test "${with_png}" != "no"; then
f57bd967
DL
12151 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12152 # in /usr/include/libpng.
12153
12154
12155for ac_header in png.h libpng/png.h
12156do
12157as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12158if eval "test \"\${$as_ac_Header+set}\" = set"; then
12159 echo "$as_me:$LINENO: checking for $ac_header" >&5
12160echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12161if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 12162 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 12163fi
f57bd967
DL
12164echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12165echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
503d2be0 12166else
c0d27fcc 12167 # Is the header compilable?
f57bd967
DL
12168echo "$as_me:$LINENO: checking $ac_header usability" >&5
12169echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
c0d27fcc 12170cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12171/* confdefs.h. */
12172_ACEOF
12173cat confdefs.h >>conftest.$ac_ext
12174cat >>conftest.$ac_ext <<_ACEOF
12175/* end confdefs.h. */
c0d27fcc 12176$ac_includes_default
f57bd967 12177#include <$ac_header>
c0d27fcc
MR
12178_ACEOF
12179rm -f conftest.$ac_objext
12180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12181 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12182 ac_status=$?
edfaf76d
LK
12183 grep -v '^ *+' conftest.er1 >conftest.err
12184 rm -f conftest.er1
12185 cat conftest.err >&5
c0d27fcc
MR
12186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12187 (exit $ac_status); } &&
8ae52ca6 12188 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
12189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12190 (eval $ac_try) 2>&5
12191 ac_status=$?
12192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12193 (exit $ac_status); }; } &&
12194 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12196 (eval $ac_try) 2>&5
12197 ac_status=$?
12198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12199 (exit $ac_status); }; }; then
12200 ac_header_compiler=yes
12201else
12202 echo "$as_me: failed program was:" >&5
19650fd6
AS
12203sed 's/^/| /' conftest.$ac_ext >&5
12204
c0d27fcc
MR
12205ac_header_compiler=no
12206fi
edfaf76d 12207rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12208echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12209echo "${ECHO_T}$ac_header_compiler" >&6
12210
12211# Is the header present?
f57bd967
DL
12212echo "$as_me:$LINENO: checking $ac_header presence" >&5
12213echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
c0d27fcc 12214cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12215/* confdefs.h. */
12216_ACEOF
12217cat confdefs.h >>conftest.$ac_ext
12218cat >>conftest.$ac_ext <<_ACEOF
12219/* end confdefs.h. */
f57bd967 12220#include <$ac_header>
503d2be0 12221_ACEOF
c0d27fcc 12222if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
12223 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12224 ac_status=$?
6bae0ccf 12225 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
12226 rm -f conftest.er1
12227 cat conftest.err >&5
c0d27fcc 12228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12229 (exit $ac_status); } >/dev/null; then
12230 if test -s conftest.err; then
12231 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12232 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
12233 else
12234 ac_cpp_err=
12235 fi
12236else
12237 ac_cpp_err=yes
12238fi
12239if test -z "$ac_cpp_err"; then
c0d27fcc 12240 ac_header_preproc=yes
503d2be0
AS
12241else
12242 echo "$as_me: failed program was:" >&5
19650fd6
AS
12243sed 's/^/| /' conftest.$ac_ext >&5
12244
c0d27fcc 12245 ac_header_preproc=no
ba4481b5 12246fi
503d2be0 12247rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12248echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12249echo "${ECHO_T}$ac_header_preproc" >&6
12250
12251# So? What about this header?
edfaf76d
LK
12252case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12253 yes:no: )
f57bd967
DL
12254 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12255echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12256 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12257echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12258 ac_header_preproc=yes
19650fd6 12259 ;;
edfaf76d 12260 no:yes:* )
f57bd967
DL
12261 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12262echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
12263 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12264echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12265 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12266echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12267 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12268echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 12269 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 12270echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12271 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12272echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12273 (
12274 cat <<\_ASBOX
edfaf76d
LK
12275## ------------------------------------------ ##
12276## Report this to the AC_PACKAGE_NAME lists. ##
12277## ------------------------------------------ ##
19650fd6
AS
12278_ASBOX
12279 ) |
12280 sed "s/^/$as_me: WARNING: /" >&2
12281 ;;
c0d27fcc 12282esac
f57bd967
DL
12283echo "$as_me:$LINENO: checking for $ac_header" >&5
12284echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12285if eval "test \"\${$as_ac_Header+set}\" = set"; then
c0d27fcc
MR
12286 echo $ECHO_N "(cached) $ECHO_C" >&6
12287else
edfaf76d 12288 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967
DL
12289fi
12290echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12291echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12292
ba4481b5 12293fi
f57bd967
DL
12294if test `eval echo '${'$as_ac_Header'}'` = yes; then
12295 cat >>confdefs.h <<_ACEOF
12296#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12297_ACEOF
c0d27fcc
MR
12298
12299fi
f57bd967
DL
12300
12301done
12302
12303 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12304 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
12305echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
12306if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 12307 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12308else
98418dba
CW
12309 ac_check_lib_save_LIBS=$LIBS
12310LIBS="-lpng -lz -lm $LIBS"
12311cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12312/* confdefs.h. */
12313_ACEOF
12314cat confdefs.h >>conftest.$ac_ext
12315cat >>conftest.$ac_ext <<_ACEOF
12316/* end confdefs.h. */
98418dba 12317
ba4481b5 12318/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12319#ifdef __cplusplus
12320extern "C"
12321#endif
ba4481b5 12322/* We use char because int might match the return type of a gcc2
503d2be0 12323 builtin and then its argument prototype would still apply. */
98418dba 12324char png_get_channels ();
503d2be0
AS
12325int
12326main ()
12327{
98418dba 12328png_get_channels ();
503d2be0
AS
12329 ;
12330 return 0;
12331}
12332_ACEOF
12333rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12334if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12335 (eval $ac_link) 2>conftest.er1
503d2be0 12336 ac_status=$?
edfaf76d
LK
12337 grep -v '^ *+' conftest.er1 >conftest.err
12338 rm -f conftest.er1
12339 cat conftest.err >&5
c0d27fcc 12340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12341 (exit $ac_status); } &&
8ae52ca6 12342 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
12343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12344 (eval $ac_try) 2>&5
12345 ac_status=$?
12346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12347 (exit $ac_status); }; } &&
12348 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12350 (eval $ac_try) 2>&5
12351 ac_status=$?
c0d27fcc 12352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12353 (exit $ac_status); }; }; then
98418dba 12354 ac_cv_lib_png_png_get_channels=yes
73b77ee5 12355else
98418dba 12356 echo "$as_me: failed program was:" >&5
19650fd6
AS
12357sed 's/^/| /' conftest.$ac_ext >&5
12358
98418dba 12359ac_cv_lib_png_png_get_channels=no
73b77ee5 12360fi
edfaf76d
LK
12361rm -f conftest.err conftest.$ac_objext \
12362 conftest$ac_exeext conftest.$ac_ext
98418dba 12363LIBS=$ac_check_lib_save_LIBS
73b77ee5 12364fi
c0d27fcc 12365echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
12366echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
12367if test $ac_cv_lib_png_png_get_channels = yes; then
12368 HAVE_PNG=yes
73b77ee5 12369fi
503d2be0 12370
f57bd967 12371 fi
98418dba
CW
12372 fi
12373
12374 if test "${HAVE_PNG}" = "yes"; then
b936fae4 12375
c0d27fcc 12376cat >>confdefs.h <<\_ACEOF
98418dba 12377#define HAVE_PNG 1
c0d27fcc 12378_ACEOF
73b77ee5 12379
98418dba 12380 fi
73b77ee5
GM
12381fi
12382
98418dba
CW
12383### Use -ltiff if available, unless `--with-tiff=no'.
12384HAVE_TIFF=no
12385if test "${HAVE_X11}" = "yes"; then
12386 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
12387 if test "${ac_cv_header_tiffio_h+set}" = set; then
12388 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
12389echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12390if test "${ac_cv_header_tiffio_h+set}" = set; then
12391 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12392fi
12393echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
12394echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 12395else
c0d27fcc
MR
12396 # Is the header compilable?
12397echo "$as_me:$LINENO: checking tiffio.h usability" >&5
12398echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
12399cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12400/* confdefs.h. */
12401_ACEOF
12402cat confdefs.h >>conftest.$ac_ext
12403cat >>conftest.$ac_ext <<_ACEOF
12404/* end confdefs.h. */
c0d27fcc
MR
12405$ac_includes_default
12406#include <tiffio.h>
12407_ACEOF
12408rm -f conftest.$ac_objext
12409if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12410 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12411 ac_status=$?
edfaf76d
LK
12412 grep -v '^ *+' conftest.er1 >conftest.err
12413 rm -f conftest.er1
12414 cat conftest.err >&5
c0d27fcc
MR
12415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12416 (exit $ac_status); } &&
8ae52ca6 12417 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
12418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12419 (eval $ac_try) 2>&5
12420 ac_status=$?
12421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12422 (exit $ac_status); }; } &&
12423 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12425 (eval $ac_try) 2>&5
12426 ac_status=$?
12427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12428 (exit $ac_status); }; }; then
12429 ac_header_compiler=yes
12430else
12431 echo "$as_me: failed program was:" >&5
19650fd6
AS
12432sed 's/^/| /' conftest.$ac_ext >&5
12433
c0d27fcc
MR
12434ac_header_compiler=no
12435fi
edfaf76d 12436rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12437echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12438echo "${ECHO_T}$ac_header_compiler" >&6
12439
12440# Is the header present?
12441echo "$as_me:$LINENO: checking tiffio.h presence" >&5
12442echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
12443cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12444/* confdefs.h. */
12445_ACEOF
12446cat confdefs.h >>conftest.$ac_ext
12447cat >>conftest.$ac_ext <<_ACEOF
12448/* end confdefs.h. */
98418dba
CW
12449#include <tiffio.h>
12450_ACEOF
c0d27fcc 12451if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12452 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12453 ac_status=$?
6bae0ccf 12454 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12455 rm -f conftest.er1
12456 cat conftest.err >&5
c0d27fcc 12457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12458 (exit $ac_status); } >/dev/null; then
12459 if test -s conftest.err; then
12460 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12461 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12462 else
12463 ac_cpp_err=
12464 fi
12465else
12466 ac_cpp_err=yes
12467fi
12468if test -z "$ac_cpp_err"; then
c0d27fcc 12469 ac_header_preproc=yes
98418dba
CW
12470else
12471 echo "$as_me: failed program was:" >&5
19650fd6
AS
12472sed 's/^/| /' conftest.$ac_ext >&5
12473
c0d27fcc 12474 ac_header_preproc=no
98418dba
CW
12475fi
12476rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12477echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12478echo "${ECHO_T}$ac_header_preproc" >&6
12479
12480# So? What about this header?
edfaf76d
LK
12481case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12482 yes:no: )
c0d27fcc
MR
12483 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
12484echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12485 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
12486echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
12487 ac_header_preproc=yes
19650fd6 12488 ;;
edfaf76d 12489 no:yes:* )
c0d27fcc
MR
12490 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
12491echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12492 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
12493echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
12494 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
12495echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
12496 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
12497echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12498 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 12499echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12500 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
12501echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12502 (
12503 cat <<\_ASBOX
edfaf76d
LK
12504## ------------------------------------------ ##
12505## Report this to the AC_PACKAGE_NAME lists. ##
12506## ------------------------------------------ ##
19650fd6
AS
12507_ASBOX
12508 ) |
12509 sed "s/^/$as_me: WARNING: /" >&2
12510 ;;
c0d27fcc
MR
12511esac
12512echo "$as_me:$LINENO: checking for tiffio.h" >&5
12513echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12514if test "${ac_cv_header_tiffio_h+set}" = set; then
12515 echo $ECHO_N "(cached) $ECHO_C" >&6
12516else
12517 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 12518fi
c0d27fcc 12519echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 12520echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
12521
12522fi
98418dba
CW
12523if test $ac_cv_header_tiffio_h = yes; then
12524 tifflibs="-lz -lm"
12525 # At least one tiff package requires the jpeg library.
12526 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 12527 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
12528echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
12529if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 12530 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12531else
503d2be0 12532 ac_check_lib_save_LIBS=$LIBS
98418dba 12533LIBS="-ltiff $tifflibs $LIBS"
503d2be0 12534cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12535/* confdefs.h. */
12536_ACEOF
12537cat confdefs.h >>conftest.$ac_ext
12538cat >>conftest.$ac_ext <<_ACEOF
12539/* end confdefs.h. */
503d2be0 12540
73b77ee5 12541/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12542#ifdef __cplusplus
12543extern "C"
12544#endif
73b77ee5 12545/* We use char because int might match the return type of a gcc2
503d2be0 12546 builtin and then its argument prototype would still apply. */
98418dba 12547char TIFFGetVersion ();
503d2be0
AS
12548int
12549main ()
12550{
98418dba 12551TIFFGetVersion ();
503d2be0
AS
12552 ;
12553 return 0;
12554}
12555_ACEOF
12556rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12557if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12558 (eval $ac_link) 2>conftest.er1
503d2be0 12559 ac_status=$?
edfaf76d
LK
12560 grep -v '^ *+' conftest.er1 >conftest.err
12561 rm -f conftest.er1
12562 cat conftest.err >&5
c0d27fcc 12563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12564 (exit $ac_status); } &&
8ae52ca6 12565 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
12566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12567 (eval $ac_try) 2>&5
12568 ac_status=$?
12569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12570 (exit $ac_status); }; } &&
12571 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12573 (eval $ac_try) 2>&5
12574 ac_status=$?
c0d27fcc 12575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12576 (exit $ac_status); }; }; then
98418dba 12577 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
12578else
12579 echo "$as_me: failed program was:" >&5
19650fd6
AS
12580sed 's/^/| /' conftest.$ac_ext >&5
12581
98418dba 12582ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 12583fi
edfaf76d
LK
12584rm -f conftest.err conftest.$ac_objext \
12585 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12586LIBS=$ac_check_lib_save_LIBS
12587fi
c0d27fcc 12588echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
12589echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
12590if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
12591 HAVE_TIFF=yes
12592fi
12593
12594fi
73b77ee5 12595
c0d27fcc 12596
98418dba
CW
12597 fi
12598
12599 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 12600
c0d27fcc 12601cat >>confdefs.h <<\_ACEOF
98418dba 12602#define HAVE_TIFF 1
c0d27fcc 12603_ACEOF
98418dba
CW
12604
12605 fi
73b77ee5
GM
12606fi
12607
98418dba
CW
12608### Use -lgif if available, unless `--with-gif=no'.
12609HAVE_GIF=no
12610if test "${HAVE_X11}" = "yes"; then
12611 if test "${with_gif}" != "no"; then
c0d27fcc
MR
12612 if test "${ac_cv_header_gif_lib_h+set}" = set; then
12613 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
12614echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12615if test "${ac_cv_header_gif_lib_h+set}" = set; then
12616 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12617fi
12618echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
12619echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 12620else
c0d27fcc
MR
12621 # Is the header compilable?
12622echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
12623echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
12624cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12625/* confdefs.h. */
12626_ACEOF
12627cat confdefs.h >>conftest.$ac_ext
12628cat >>conftest.$ac_ext <<_ACEOF
12629/* end confdefs.h. */
c0d27fcc
MR
12630$ac_includes_default
12631#include <gif_lib.h>
12632_ACEOF
12633rm -f conftest.$ac_objext
12634if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12635 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12636 ac_status=$?
edfaf76d
LK
12637 grep -v '^ *+' conftest.er1 >conftest.err
12638 rm -f conftest.er1
12639 cat conftest.err >&5
c0d27fcc
MR
12640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12641 (exit $ac_status); } &&
8ae52ca6 12642 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
12643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12644 (eval $ac_try) 2>&5
12645 ac_status=$?
12646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12647 (exit $ac_status); }; } &&
12648 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12650 (eval $ac_try) 2>&5
12651 ac_status=$?
12652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12653 (exit $ac_status); }; }; then
12654 ac_header_compiler=yes
12655else
12656 echo "$as_me: failed program was:" >&5
19650fd6
AS
12657sed 's/^/| /' conftest.$ac_ext >&5
12658
c0d27fcc
MR
12659ac_header_compiler=no
12660fi
edfaf76d 12661rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12662echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12663echo "${ECHO_T}$ac_header_compiler" >&6
12664
12665# Is the header present?
12666echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
12667echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
12668cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12669/* confdefs.h. */
12670_ACEOF
12671cat confdefs.h >>conftest.$ac_ext
12672cat >>conftest.$ac_ext <<_ACEOF
12673/* end confdefs.h. */
98418dba
CW
12674#include <gif_lib.h>
12675_ACEOF
c0d27fcc 12676if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12677 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12678 ac_status=$?
6bae0ccf 12679 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12680 rm -f conftest.er1
12681 cat conftest.err >&5
c0d27fcc 12682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12683 (exit $ac_status); } >/dev/null; then
12684 if test -s conftest.err; then
12685 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12686 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12687 else
12688 ac_cpp_err=
12689 fi
12690else
12691 ac_cpp_err=yes
12692fi
12693if test -z "$ac_cpp_err"; then
c0d27fcc 12694 ac_header_preproc=yes
98418dba
CW
12695else
12696 echo "$as_me: failed program was:" >&5
19650fd6
AS
12697sed 's/^/| /' conftest.$ac_ext >&5
12698
c0d27fcc 12699 ac_header_preproc=no
98418dba
CW
12700fi
12701rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12702echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12703echo "${ECHO_T}$ac_header_preproc" >&6
12704
12705# So? What about this header?
edfaf76d
LK
12706case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12707 yes:no: )
c0d27fcc
MR
12708 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12709echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12710 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
12711echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
12712 ac_header_preproc=yes
19650fd6 12713 ;;
edfaf76d 12714 no:yes:* )
c0d27fcc
MR
12715 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
12716echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12717 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
12718echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
12719 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
12720echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
12721 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
12722echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12723 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 12724echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12725 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
12726echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12727 (
12728 cat <<\_ASBOX
edfaf76d
LK
12729## ------------------------------------------ ##
12730## Report this to the AC_PACKAGE_NAME lists. ##
12731## ------------------------------------------ ##
19650fd6
AS
12732_ASBOX
12733 ) |
12734 sed "s/^/$as_me: WARNING: /" >&2
12735 ;;
c0d27fcc
MR
12736esac
12737echo "$as_me:$LINENO: checking for gif_lib.h" >&5
12738echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12739if test "${ac_cv_header_gif_lib_h+set}" = set; then
12740 echo $ECHO_N "(cached) $ECHO_C" >&6
12741else
12742 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 12743fi
c0d27fcc 12744echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 12745echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
12746
12747fi
98418dba
CW
12748if test $ac_cv_header_gif_lib_h = yes; then
12749 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12750# Earlier versions can crash Emacs.
c0d27fcc 12751 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
12752echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
12753if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 12754 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12755else
503d2be0 12756 ac_check_lib_save_LIBS=$LIBS
98418dba 12757LIBS="-lungif $LIBS"
503d2be0 12758cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12759/* confdefs.h. */
12760_ACEOF
12761cat confdefs.h >>conftest.$ac_ext
12762cat >>conftest.$ac_ext <<_ACEOF
12763/* end confdefs.h. */
73b77ee5 12764
98418dba
CW
12765/* Override any gcc2 internal prototype to avoid an error. */
12766#ifdef __cplusplus
12767extern "C"
12768#endif
12769/* We use char because int might match the return type of a gcc2
12770 builtin and then its argument prototype would still apply. */
12771char EGifPutExtensionLast ();
503d2be0
AS
12772int
12773main ()
12774{
98418dba 12775EGifPutExtensionLast ();
503d2be0
AS
12776 ;
12777 return 0;
12778}
12779_ACEOF
12780rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12782 (eval $ac_link) 2>conftest.er1
503d2be0 12783 ac_status=$?
edfaf76d
LK
12784 grep -v '^ *+' conftest.er1 >conftest.err
12785 rm -f conftest.er1
12786 cat conftest.err >&5
c0d27fcc 12787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12788 (exit $ac_status); } &&
8ae52ca6 12789 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
12790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12791 (eval $ac_try) 2>&5
12792 ac_status=$?
12793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12794 (exit $ac_status); }; } &&
12795 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
12796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12797 (eval $ac_try) 2>&5
12798 ac_status=$?
12799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12800 (exit $ac_status); }; }; then
12801 ac_cv_lib_ungif_EGifPutExtensionLast=yes
12802else
98418dba 12803 echo "$as_me: failed program was:" >&5
19650fd6
AS
12804sed 's/^/| /' conftest.$ac_ext >&5
12805
98418dba
CW
12806ac_cv_lib_ungif_EGifPutExtensionLast=no
12807fi
edfaf76d
LK
12808rm -f conftest.err conftest.$ac_objext \
12809 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12810LIBS=$ac_check_lib_save_LIBS
12811fi
c0d27fcc 12812echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
12813echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
12814if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
12815 HAVE_GIF=yes
12816fi
12817
12818fi
12819
c0d27fcc 12820
98418dba
CW
12821 fi
12822
12823 if test "${HAVE_GIF}" = "yes"; then
b936fae4 12824
c0d27fcc 12825cat >>confdefs.h <<\_ACEOF
98418dba 12826#define HAVE_GIF 1
c0d27fcc 12827_ACEOF
98418dba
CW
12828
12829 fi
12830fi
12831
cef11da2
ST
12832if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12833 echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12834echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12835if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12836 echo $ECHO_N "(cached) $ECHO_C" >&6
12837fi
12838echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12839echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12840else
12841 # Is the header compilable?
12842echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
12843echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6
12844cat >conftest.$ac_ext <<_ACEOF
12845/* confdefs.h. */
12846_ACEOF
12847cat confdefs.h >>conftest.$ac_ext
12848cat >>conftest.$ac_ext <<_ACEOF
12849/* end confdefs.h. */
12850$ac_includes_default
12851#include <malloc/malloc.h>
12852_ACEOF
12853rm -f conftest.$ac_objext
12854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12855 (eval $ac_compile) 2>conftest.er1
cef11da2 12856 ac_status=$?
edfaf76d
LK
12857 grep -v '^ *+' conftest.er1 >conftest.err
12858 rm -f conftest.er1
12859 cat conftest.err >&5
cef11da2
ST
12860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12861 (exit $ac_status); } &&
8ae52ca6 12862 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
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_objext'
cef11da2
ST
12869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12870 (eval $ac_try) 2>&5
12871 ac_status=$?
12872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12873 (exit $ac_status); }; }; then
12874 ac_header_compiler=yes
12875else
12876 echo "$as_me: failed program was:" >&5
12877sed 's/^/| /' conftest.$ac_ext >&5
12878
12879ac_header_compiler=no
12880fi
edfaf76d 12881rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cef11da2
ST
12882echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12883echo "${ECHO_T}$ac_header_compiler" >&6
12884
12885# Is the header present?
12886echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
12887echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6
12888cat >conftest.$ac_ext <<_ACEOF
12889/* confdefs.h. */
12890_ACEOF
12891cat confdefs.h >>conftest.$ac_ext
12892cat >>conftest.$ac_ext <<_ACEOF
12893/* end confdefs.h. */
12894#include <malloc/malloc.h>
12895_ACEOF
12896if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12897 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12898 ac_status=$?
12899 grep -v '^ *+' conftest.er1 >conftest.err
12900 rm -f conftest.er1
12901 cat conftest.err >&5
12902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12903 (exit $ac_status); } >/dev/null; then
12904 if test -s conftest.err; then
12905 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12906 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
cef11da2
ST
12907 else
12908 ac_cpp_err=
12909 fi
12910else
12911 ac_cpp_err=yes
12912fi
12913if test -z "$ac_cpp_err"; then
12914 ac_header_preproc=yes
12915else
12916 echo "$as_me: failed program was:" >&5
12917sed 's/^/| /' conftest.$ac_ext >&5
12918
12919 ac_header_preproc=no
12920fi
12921rm -f conftest.err conftest.$ac_ext
12922echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12923echo "${ECHO_T}$ac_header_preproc" >&6
12924
12925# So? What about this header?
edfaf76d
LK
12926case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12927 yes:no: )
cef11da2
ST
12928 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
12929echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12930 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
12931echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
12932 ac_header_preproc=yes
cef11da2 12933 ;;
edfaf76d 12934 no:yes:* )
cef11da2
ST
12935 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
12936echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12937 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
12938echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
12939 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
12940echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
12941 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
12942echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
12943 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
12944echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12945 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
12946echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
cef11da2
ST
12947 (
12948 cat <<\_ASBOX
edfaf76d
LK
12949## ------------------------------------------ ##
12950## Report this to the AC_PACKAGE_NAME lists. ##
12951## ------------------------------------------ ##
cef11da2
ST
12952_ASBOX
12953 ) |
12954 sed "s/^/$as_me: WARNING: /" >&2
12955 ;;
12956esac
12957echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12958echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12959if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12960 echo $ECHO_N "(cached) $ECHO_C" >&6
12961else
12962 ac_cv_header_malloc_malloc_h=$ac_header_preproc
12963fi
12964echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12965echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12966
12967fi
12968if test $ac_cv_header_malloc_malloc_h = yes; then
12969
12970cat >>confdefs.h <<\_ACEOF
12971#define HAVE_MALLOC_MALLOC_H 1
12972_ACEOF
12973
12974fi
12975
12976
12977
5d6da11e 12978### Use Mac OS X Carbon API to implement GUI.
e0f712ba 12979if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 12980
c0d27fcc 12981cat >>confdefs.h <<\_ACEOF
e0f712ba 12982#define HAVE_CARBON 1
c0d27fcc 12983_ACEOF
e0f712ba 12984
6a3a24fa
JD
12985 ## Specify the install directory
12986 carbon_appdir=
12987 if test "${carbon_appdir_x}" != ""; then
12988 case ${carbon_appdir_x} in
12989 y | ye | yes) carbon_appdir=/Applications ;;
12990 * ) carbon_appdir=${carbon_appdir_x} ;;
12991 esac
12992 fi
8f417b3b
AS
12993 # We also have mouse menus.
12994 HAVE_MENUS=yes
7c9e5167
JD
12995
12996 tmp_CFLAGS="$CFLAGS"
12997 CFLAGS="$CFLAGS -framework Carbon"
12998 echo "$as_me:$LINENO: checking for CancelMenuTracking" >&5
12999echo $ECHO_N "checking for CancelMenuTracking... $ECHO_C" >&6
13000if test "${ac_cv_func_CancelMenuTracking+set}" = set; then
13001 echo $ECHO_N "(cached) $ECHO_C" >&6
13002else
13003 cat >conftest.$ac_ext <<_ACEOF
7c9e5167
JD
13004/* confdefs.h. */
13005_ACEOF
13006cat confdefs.h >>conftest.$ac_ext
13007cat >>conftest.$ac_ext <<_ACEOF
13008/* end confdefs.h. */
edfaf76d
LK
13009/* Define CancelMenuTracking to an innocuous variant, in case <limits.h> declares CancelMenuTracking.
13010 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13011#define CancelMenuTracking innocuous_CancelMenuTracking
13012
7c9e5167
JD
13013/* System header to define __stub macros and hopefully few prototypes,
13014 which can conflict with char CancelMenuTracking (); below.
13015 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13016 <limits.h> exists even on freestanding compilers. */
edfaf76d 13017
7c9e5167
JD
13018#ifdef __STDC__
13019# include <limits.h>
13020#else
13021# include <assert.h>
13022#endif
edfaf76d
LK
13023
13024#undef CancelMenuTracking
13025
7c9e5167
JD
13026/* Override any gcc2 internal prototype to avoid an error. */
13027#ifdef __cplusplus
13028extern "C"
13029{
13030#endif
13031/* We use char because int might match the return type of a gcc2
13032 builtin and then its argument prototype would still apply. */
13033char CancelMenuTracking ();
13034/* The GNU C library defines this for functions which it implements
13035 to always fail with ENOSYS. Some functions are actually named
13036 something starting with __ and the normal name is an alias. */
13037#if defined (__stub_CancelMenuTracking) || defined (__stub___CancelMenuTracking)
13038choke me
13039#else
13040char (*f) () = CancelMenuTracking;
13041#endif
13042#ifdef __cplusplus
13043}
13044#endif
13045
13046int
13047main ()
13048{
13049return f != CancelMenuTracking;
13050 ;
13051 return 0;
13052}
13053_ACEOF
13054rm -f conftest.$ac_objext conftest$ac_exeext
13055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13056 (eval $ac_link) 2>conftest.er1
7c9e5167 13057 ac_status=$?
edfaf76d
LK
13058 grep -v '^ *+' conftest.er1 >conftest.err
13059 rm -f conftest.er1
13060 cat conftest.err >&5
7c9e5167
JD
13061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13062 (exit $ac_status); } &&
8ae52ca6 13063 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
13064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13065 (eval $ac_try) 2>&5
13066 ac_status=$?
13067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13068 (exit $ac_status); }; } &&
13069 { ac_try='test -s conftest$ac_exeext'
7c9e5167
JD
13070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13071 (eval $ac_try) 2>&5
13072 ac_status=$?
13073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13074 (exit $ac_status); }; }; then
13075 ac_cv_func_CancelMenuTracking=yes
13076else
13077 echo "$as_me: failed program was:" >&5
13078sed 's/^/| /' conftest.$ac_ext >&5
13079
13080ac_cv_func_CancelMenuTracking=no
13081fi
edfaf76d
LK
13082rm -f conftest.err conftest.$ac_objext \
13083 conftest$ac_exeext conftest.$ac_ext
7c9e5167
JD
13084fi
13085echo "$as_me:$LINENO: result: $ac_cv_func_CancelMenuTracking" >&5
13086echo "${ECHO_T}$ac_cv_func_CancelMenuTracking" >&6
13087if test $ac_cv_func_CancelMenuTracking = yes; then
13088 have_cmt=yes
13089else
13090 have_cmt=no
13091fi
13092
13093 if test "$have_cmt" = yes; then
13094
13095cat >>confdefs.h <<\_ACEOF
13096#define HAVE_CANCELMENUTRACKING 1
13097_ACEOF
13098
13099 fi
13100 CFLAGS="$tmp_CFLAGS"
e0f712ba
AC
13101fi
13102
98418dba
CW
13103### Use session management (-lSM -lICE) if available
13104HAVE_X_SM=no
13105if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
13106 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13107 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
13108echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
13109if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13110 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13111fi
13112echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
13113echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 13114else
c0d27fcc
MR
13115 # Is the header compilable?
13116echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
13117echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
13118cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13119/* confdefs.h. */
13120_ACEOF
13121cat confdefs.h >>conftest.$ac_ext
13122cat >>conftest.$ac_ext <<_ACEOF
13123/* end confdefs.h. */
c0d27fcc
MR
13124$ac_includes_default
13125#include <X11/SM/SMlib.h>
13126_ACEOF
13127rm -f conftest.$ac_objext
13128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 13129 (eval $ac_compile) 2>conftest.er1
c0d27fcc 13130 ac_status=$?
edfaf76d
LK
13131 grep -v '^ *+' conftest.er1 >conftest.err
13132 rm -f conftest.er1
13133 cat conftest.err >&5
c0d27fcc
MR
13134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13135 (exit $ac_status); } &&
8ae52ca6 13136 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
13137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13138 (eval $ac_try) 2>&5
13139 ac_status=$?
13140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13141 (exit $ac_status); }; } &&
13142 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13144 (eval $ac_try) 2>&5
13145 ac_status=$?
13146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13147 (exit $ac_status); }; }; then
13148 ac_header_compiler=yes
13149else
13150 echo "$as_me: failed program was:" >&5
19650fd6
AS
13151sed 's/^/| /' conftest.$ac_ext >&5
13152
c0d27fcc
MR
13153ac_header_compiler=no
13154fi
edfaf76d 13155rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
13156echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13157echo "${ECHO_T}$ac_header_compiler" >&6
13158
13159# Is the header present?
13160echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
13161echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
13162cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13163/* confdefs.h. */
13164_ACEOF
13165cat confdefs.h >>conftest.$ac_ext
13166cat >>conftest.$ac_ext <<_ACEOF
13167/* end confdefs.h. */
98418dba
CW
13168#include <X11/SM/SMlib.h>
13169_ACEOF
c0d27fcc 13170if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
13171 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13172 ac_status=$?
6bae0ccf 13173 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13174 rm -f conftest.er1
13175 cat conftest.err >&5
c0d27fcc 13176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13177 (exit $ac_status); } >/dev/null; then
13178 if test -s conftest.err; then
13179 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 13180 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
13181 else
13182 ac_cpp_err=
13183 fi
13184else
13185 ac_cpp_err=yes
503d2be0 13186fi
98418dba 13187if test -z "$ac_cpp_err"; then
c0d27fcc 13188 ac_header_preproc=yes
98418dba
CW
13189else
13190 echo "$as_me: failed program was:" >&5
19650fd6
AS
13191sed 's/^/| /' conftest.$ac_ext >&5
13192
c0d27fcc 13193 ac_header_preproc=no
98418dba
CW
13194fi
13195rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13196echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13197echo "${ECHO_T}$ac_header_preproc" >&6
13198
13199# So? What about this header?
edfaf76d
LK
13200case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13201 yes:no: )
c0d27fcc
MR
13202 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
13203echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13204 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
13205echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
13206 ac_header_preproc=yes
19650fd6 13207 ;;
edfaf76d 13208 no:yes:* )
c0d27fcc
MR
13209 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
13210echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13211 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
13212echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
13213 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
13214echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
13215 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
13216echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13217 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 13218echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13219 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
13220echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
13221 (
13222 cat <<\_ASBOX
edfaf76d
LK
13223## ------------------------------------------ ##
13224## Report this to the AC_PACKAGE_NAME lists. ##
13225## ------------------------------------------ ##
19650fd6
AS
13226_ASBOX
13227 ) |
13228 sed "s/^/$as_me: WARNING: /" >&2
13229 ;;
c0d27fcc
MR
13230esac
13231echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
13232echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
13233if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13234 echo $ECHO_N "(cached) $ECHO_C" >&6
13235else
13236 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 13237fi
c0d27fcc 13238echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 13239echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
13240
13241fi
98418dba 13242if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 13243 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
13244echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
13245if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 13246 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13247else
503d2be0 13248 ac_check_lib_save_LIBS=$LIBS
1660500f 13249LIBS="-lSM -lICE $LIBS"
503d2be0 13250cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13251/* confdefs.h. */
13252_ACEOF
13253cat confdefs.h >>conftest.$ac_ext
13254cat >>conftest.$ac_ext <<_ACEOF
13255/* end confdefs.h. */
503d2be0 13256
73b77ee5 13257/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13258#ifdef __cplusplus
13259extern "C"
13260#endif
73b77ee5 13261/* We use char because int might match the return type of a gcc2
503d2be0 13262 builtin and then its argument prototype would still apply. */
98418dba 13263char SmcOpenConnection ();
503d2be0
AS
13264int
13265main ()
13266{
98418dba 13267SmcOpenConnection ();
503d2be0
AS
13268 ;
13269 return 0;
13270}
13271_ACEOF
13272rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13273if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13274 (eval $ac_link) 2>conftest.er1
503d2be0 13275 ac_status=$?
edfaf76d
LK
13276 grep -v '^ *+' conftest.er1 >conftest.err
13277 rm -f conftest.er1
13278 cat conftest.err >&5
c0d27fcc 13279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13280 (exit $ac_status); } &&
8ae52ca6 13281 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
13282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13283 (eval $ac_try) 2>&5
13284 ac_status=$?
13285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13286 (exit $ac_status); }; } &&
13287 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13289 (eval $ac_try) 2>&5
13290 ac_status=$?
c0d27fcc 13291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13292 (exit $ac_status); }; }; then
98418dba 13293 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
13294else
13295 echo "$as_me: failed program was:" >&5
19650fd6
AS
13296sed 's/^/| /' conftest.$ac_ext >&5
13297
98418dba 13298ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 13299fi
edfaf76d
LK
13300rm -f conftest.err conftest.$ac_objext \
13301 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
13302LIBS=$ac_check_lib_save_LIBS
13303fi
c0d27fcc 13304echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
13305echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
13306if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
13307 HAVE_X_SM=yes
73b77ee5
GM
13308fi
13309
73b77ee5 13310fi
73b77ee5 13311
c0d27fcc
MR
13312
13313
98418dba 13314 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 13315
c0d27fcc 13316cat >>confdefs.h <<\_ACEOF
98418dba 13317#define HAVE_X_SM 1
c0d27fcc 13318_ACEOF
73b77ee5 13319
98418dba
CW
13320 case "$LIBS" in
13321 *-lSM*) ;;
13322 *) LIBS="-lSM -lICE $LIBS" ;;
13323 esac
73b77ee5 13324 fi
98418dba 13325fi
73b77ee5 13326
98418dba 13327# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 13328echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
13329echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
13330if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
13331 echo $ECHO_N "(cached) $ECHO_C" >&6
13332else
13333 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13334/* confdefs.h. */
13335_ACEOF
13336cat confdefs.h >>conftest.$ac_ext
13337cat >>conftest.$ac_ext <<_ACEOF
13338/* end confdefs.h. */
98418dba 13339#include <netdb.h>
503d2be0
AS
13340int
13341main ()
13342{
98418dba 13343return h_errno;
503d2be0
AS
13344 ;
13345 return 0;
13346}
13347_ACEOF
13348rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13349if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13350 (eval $ac_link) 2>conftest.er1
503d2be0 13351 ac_status=$?
edfaf76d
LK
13352 grep -v '^ *+' conftest.er1 >conftest.err
13353 rm -f conftest.er1
13354 cat conftest.err >&5
c0d27fcc 13355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13356 (exit $ac_status); } &&
8ae52ca6 13357 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
13358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13359 (eval $ac_try) 2>&5
13360 ac_status=$?
13361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13362 (exit $ac_status); }; } &&
13363 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13365 (eval $ac_try) 2>&5
13366 ac_status=$?
c0d27fcc 13367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13368 (exit $ac_status); }; }; then
98418dba 13369 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 13370else
503d2be0 13371 echo "$as_me: failed program was:" >&5
19650fd6
AS
13372sed 's/^/| /' conftest.$ac_ext >&5
13373
98418dba 13374emacs_cv_netdb_declares_h_errno=no
73b77ee5 13375fi
edfaf76d
LK
13376rm -f conftest.err conftest.$ac_objext \
13377 conftest$ac_exeext conftest.$ac_ext
98418dba 13378fi
c0d27fcc 13379echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
13380echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
13381if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 13382
c0d27fcc 13383cat >>confdefs.h <<\_ACEOF
98418dba 13384#define HAVE_H_ERRNO 1
c0d27fcc 13385_ACEOF
73b77ee5 13386
98418dba
CW
13387fi
13388
13389# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13390# for constant arguments. Useless!
c0d27fcc 13391echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
13392echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
13393if test "${ac_cv_working_alloca_h+set}" = set; then
13394 echo $ECHO_N "(cached) $ECHO_C" >&6
13395else
13396 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13397/* confdefs.h. */
13398_ACEOF
13399cat confdefs.h >>conftest.$ac_ext
13400cat >>conftest.$ac_ext <<_ACEOF
13401/* end confdefs.h. */
98418dba 13402#include <alloca.h>
503d2be0
AS
13403int
13404main ()
13405{
98418dba 13406char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
13407 ;
13408 return 0;
13409}
13410_ACEOF
13411rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13412if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13413 (eval $ac_link) 2>conftest.er1
503d2be0 13414 ac_status=$?
edfaf76d
LK
13415 grep -v '^ *+' conftest.er1 >conftest.err
13416 rm -f conftest.er1
13417 cat conftest.err >&5
c0d27fcc 13418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13419 (exit $ac_status); } &&
8ae52ca6 13420 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
13421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13422 (eval $ac_try) 2>&5
13423 ac_status=$?
13424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13425 (exit $ac_status); }; } &&
13426 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13428 (eval $ac_try) 2>&5
13429 ac_status=$?
c0d27fcc 13430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13431 (exit $ac_status); }; }; then
98418dba 13432 ac_cv_working_alloca_h=yes
73b77ee5 13433else
503d2be0 13434 echo "$as_me: failed program was:" >&5
19650fd6
AS
13435sed 's/^/| /' conftest.$ac_ext >&5
13436
98418dba 13437ac_cv_working_alloca_h=no
73b77ee5 13438fi
edfaf76d
LK
13439rm -f conftest.err conftest.$ac_objext \
13440 conftest$ac_exeext conftest.$ac_ext
98418dba 13441fi
c0d27fcc 13442echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
13443echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
13444if test $ac_cv_working_alloca_h = yes; then
73b77ee5 13445
c0d27fcc 13446cat >>confdefs.h <<\_ACEOF
98418dba 13447#define HAVE_ALLOCA_H 1
c0d27fcc 13448_ACEOF
98418dba
CW
13449
13450fi
13451
c0d27fcc 13452echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
13453echo $ECHO_N "checking for alloca... $ECHO_C" >&6
13454if test "${ac_cv_func_alloca_works+set}" = set; then
13455 echo $ECHO_N "(cached) $ECHO_C" >&6
13456else
503d2be0 13457 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13458/* confdefs.h. */
13459_ACEOF
13460cat confdefs.h >>conftest.$ac_ext
13461cat >>conftest.$ac_ext <<_ACEOF
13462/* end confdefs.h. */
98418dba
CW
13463#ifdef __GNUC__
13464# define alloca __builtin_alloca
13465#else
13466# ifdef _MSC_VER
13467# include <malloc.h>
13468# define alloca _alloca
13469# else
13470# if HAVE_ALLOCA_H
13471# include <alloca.h>
13472# else
13473# ifdef _AIX
13474 #pragma alloca
13475# else
13476# ifndef alloca /* predefined by HP cc +Olibcalls */
13477char *alloca ();
13478# endif
13479# endif
13480# endif
13481# endif
13482#endif
13483
503d2be0
AS
13484int
13485main ()
13486{
98418dba 13487char *p = (char *) alloca (1);
503d2be0
AS
13488 ;
13489 return 0;
13490}
13491_ACEOF
13492rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13493if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13494 (eval $ac_link) 2>conftest.er1
503d2be0 13495 ac_status=$?
edfaf76d
LK
13496 grep -v '^ *+' conftest.er1 >conftest.err
13497 rm -f conftest.er1
13498 cat conftest.err >&5
c0d27fcc 13499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13500 (exit $ac_status); } &&
8ae52ca6 13501 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
13502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13503 (eval $ac_try) 2>&5
13504 ac_status=$?
13505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13506 (exit $ac_status); }; } &&
13507 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13509 (eval $ac_try) 2>&5
13510 ac_status=$?
c0d27fcc 13511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13512 (exit $ac_status); }; }; then
98418dba 13513 ac_cv_func_alloca_works=yes
ac95a621 13514else
503d2be0 13515 echo "$as_me: failed program was:" >&5
19650fd6
AS
13516sed 's/^/| /' conftest.$ac_ext >&5
13517
98418dba 13518ac_cv_func_alloca_works=no
ac95a621 13519fi
edfaf76d
LK
13520rm -f conftest.err conftest.$ac_objext \
13521 conftest$ac_exeext conftest.$ac_ext
98418dba 13522fi
c0d27fcc 13523echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 13524echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 13525
98418dba
CW
13526if test $ac_cv_func_alloca_works = yes; then
13527
c0d27fcc 13528cat >>confdefs.h <<\_ACEOF
98418dba 13529#define HAVE_ALLOCA 1
c0d27fcc 13530_ACEOF
98418dba
CW
13531
13532else
13533 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13534# that cause trouble. Some versions do not even contain alloca or
13535# contain a buggy version. If you still want to use their alloca,
13536# use ar to extract alloca.o from them instead of compiling alloca.c.
13537
13538ALLOCA=alloca.$ac_objext
13539
c0d27fcc 13540cat >>confdefs.h <<\_ACEOF
98418dba 13541#define C_ALLOCA 1
c0d27fcc 13542_ACEOF
98418dba 13543
c0d27fcc
MR
13544
13545echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
13546echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
13547if test "${ac_cv_os_cray+set}" = set; then
13548 echo $ECHO_N "(cached) $ECHO_C" >&6
13549else
13550 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13551/* confdefs.h. */
13552_ACEOF
13553cat confdefs.h >>conftest.$ac_ext
13554cat >>conftest.$ac_ext <<_ACEOF
13555/* end confdefs.h. */
98418dba
CW
13556#if defined(CRAY) && ! defined(CRAY2)
13557webecray
13558#else
13559wenotbecray
13560#endif
13561
13562_ACEOF
13563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13564 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
13565 ac_cv_os_cray=yes
13566else
13567 ac_cv_os_cray=no
13568fi
13569rm -f conftest*
ac95a621 13570
98418dba 13571fi
c0d27fcc 13572echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
13573echo "${ECHO_T}$ac_cv_os_cray" >&6
13574if test $ac_cv_os_cray = yes; then
13575 for ac_func in _getb67 GETB67 getb67; do
13576 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13577echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
13578echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13579if eval "test \"\${$as_ac_var+set}\" = set"; then
13580 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13581else
503d2be0 13582 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13583/* confdefs.h. */
13584_ACEOF
13585cat confdefs.h >>conftest.$ac_ext
13586cat >>conftest.$ac_ext <<_ACEOF
13587/* end confdefs.h. */
edfaf76d
LK
13588/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13589 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13590#define $ac_func innocuous_$ac_func
13591
73b77ee5 13592/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13593 which can conflict with char $ac_func (); below.
13594 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13595 <limits.h> exists even on freestanding compilers. */
edfaf76d 13596
19650fd6
AS
13597#ifdef __STDC__
13598# include <limits.h>
13599#else
13600# include <assert.h>
13601#endif
edfaf76d
LK
13602
13603#undef $ac_func
13604
73b77ee5 13605/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13606#ifdef __cplusplus
13607extern "C"
19650fd6 13608{
503d2be0 13609#endif
73b77ee5 13610/* We use char because int might match the return type of a gcc2
503d2be0
AS
13611 builtin and then its argument prototype would still apply. */
13612char $ac_func ();
73b77ee5
GM
13613/* The GNU C library defines this for functions which it implements
13614 to always fail with ENOSYS. Some functions are actually named
13615 something starting with __ and the normal name is an alias. */
13616#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13617choke me
13618#else
19650fd6
AS
13619char (*f) () = $ac_func;
13620#endif
13621#ifdef __cplusplus
13622}
73b77ee5
GM
13623#endif
13624
19650fd6
AS
13625int
13626main ()
13627{
13628return f != $ac_func;
503d2be0
AS
13629 ;
13630 return 0;
13631}
13632_ACEOF
13633rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13634if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13635 (eval $ac_link) 2>conftest.er1
503d2be0 13636 ac_status=$?
edfaf76d
LK
13637 grep -v '^ *+' conftest.er1 >conftest.err
13638 rm -f conftest.er1
13639 cat conftest.err >&5
c0d27fcc 13640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13641 (exit $ac_status); } &&
8ae52ca6 13642 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
13643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13644 (eval $ac_try) 2>&5
13645 ac_status=$?
13646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13647 (exit $ac_status); }; } &&
13648 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13650 (eval $ac_try) 2>&5
13651 ac_status=$?
c0d27fcc 13652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13653 (exit $ac_status); }; }; then
13654 eval "$as_ac_var=yes"
13655else
13656 echo "$as_me: failed program was:" >&5
19650fd6
AS
13657sed 's/^/| /' conftest.$ac_ext >&5
13658
503d2be0
AS
13659eval "$as_ac_var=no"
13660fi
edfaf76d
LK
13661rm -f conftest.err conftest.$ac_objext \
13662 conftest$ac_exeext conftest.$ac_ext
503d2be0 13663fi
c0d27fcc 13664echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13665echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13666if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 13667
c0d27fcc 13668cat >>confdefs.h <<_ACEOF
98418dba 13669#define CRAY_STACKSEG_END $ac_func
c0d27fcc 13670_ACEOF
98418dba
CW
13671
13672 break
73b77ee5 13673fi
73b77ee5 13674
98418dba 13675 done
73b77ee5
GM
13676fi
13677
c0d27fcc 13678echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
13679echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
13680if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 13681 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
13682else
13683 if test "$cross_compiling" = yes; then
13684 ac_cv_c_stack_direction=0
73b77ee5 13685else
503d2be0 13686 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13687/* confdefs.h. */
13688_ACEOF
13689cat confdefs.h >>conftest.$ac_ext
13690cat >>conftest.$ac_ext <<_ACEOF
13691/* end confdefs.h. */
503d2be0 13692int
98418dba 13693find_stack_direction ()
503d2be0 13694{
98418dba
CW
13695 static char *addr = 0;
13696 auto char dummy;
13697 if (addr == 0)
13698 {
13699 addr = &dummy;
13700 return find_stack_direction ();
13701 }
73b77ee5 13702 else
98418dba
CW
13703 return (&dummy > addr) ? 1 : -1;
13704}
ba4481b5 13705
503d2be0
AS
13706int
13707main ()
13708{
98418dba 13709 exit (find_stack_direction () < 0);
503d2be0
AS
13710}
13711_ACEOF
98418dba 13712rm -f conftest$ac_exeext
c0d27fcc 13713if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13714 (eval $ac_link) 2>&5
13715 ac_status=$?
c0d27fcc 13716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13717 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 13718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13719 (eval $ac_try) 2>&5
13720 ac_status=$?
c0d27fcc 13721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13722 (exit $ac_status); }; }; then
98418dba 13723 ac_cv_c_stack_direction=1
ba4481b5 13724else
98418dba
CW
13725 echo "$as_me: program exited with status $ac_status" >&5
13726echo "$as_me: failed program was:" >&5
19650fd6
AS
13727sed 's/^/| /' conftest.$ac_ext >&5
13728
c0d27fcc 13729( exit $ac_status )
98418dba 13730ac_cv_c_stack_direction=-1
ba4481b5 13731fi
edfaf76d 13732rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 13733fi
98418dba 13734fi
c0d27fcc 13735echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
13736echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
13737
c0d27fcc 13738cat >>confdefs.h <<_ACEOF
98418dba 13739#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
13740_ACEOF
13741
ba4481b5 13742
ba4481b5
DL
13743fi
13744
c0d27fcc 13745
98418dba
CW
13746# fmod, logb, and frexp are found in -lm on most systems.
13747# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
13748
c0d27fcc 13749echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
13750echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
13751if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 13752 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13753else
98418dba
CW
13754 ac_check_lib_save_LIBS=$LIBS
13755LIBS="-lm $LIBS"
13756cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13757/* confdefs.h. */
13758_ACEOF
13759cat confdefs.h >>conftest.$ac_ext
13760cat >>conftest.$ac_ext <<_ACEOF
13761/* end confdefs.h. */
ba4481b5 13762
98418dba
CW
13763/* Override any gcc2 internal prototype to avoid an error. */
13764#ifdef __cplusplus
13765extern "C"
13766#endif
13767/* We use char because int might match the return type of a gcc2
13768 builtin and then its argument prototype would still apply. */
13769char sqrt ();
503d2be0
AS
13770int
13771main ()
13772{
98418dba 13773sqrt ();
503d2be0
AS
13774 ;
13775 return 0;
13776}
13777_ACEOF
13778rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13779if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13780 (eval $ac_link) 2>conftest.er1
503d2be0 13781 ac_status=$?
edfaf76d
LK
13782 grep -v '^ *+' conftest.er1 >conftest.err
13783 rm -f conftest.er1
13784 cat conftest.err >&5
c0d27fcc 13785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13786 (exit $ac_status); } &&
8ae52ca6 13787 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
13788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13789 (eval $ac_try) 2>&5
13790 ac_status=$?
13791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13792 (exit $ac_status); }; } &&
13793 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13795 (eval $ac_try) 2>&5
13796 ac_status=$?
c0d27fcc 13797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13798 (exit $ac_status); }; }; then
98418dba 13799 ac_cv_lib_m_sqrt=yes
ba4481b5 13800else
503d2be0 13801 echo "$as_me: failed program was:" >&5
19650fd6
AS
13802sed 's/^/| /' conftest.$ac_ext >&5
13803
98418dba 13804ac_cv_lib_m_sqrt=no
ba4481b5 13805fi
edfaf76d
LK
13806rm -f conftest.err conftest.$ac_objext \
13807 conftest$ac_exeext conftest.$ac_ext
98418dba 13808LIBS=$ac_check_lib_save_LIBS
ba4481b5 13809fi
c0d27fcc 13810echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
13811echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
13812if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 13813 cat >>confdefs.h <<_ACEOF
98418dba 13814#define HAVE_LIBM 1
c0d27fcc 13815_ACEOF
98418dba
CW
13816
13817 LIBS="-lm $LIBS"
ba4481b5 13818
ba4481b5
DL
13819fi
13820
c0d27fcc 13821
55597d70
DL
13822# Check for mail-locking functions in a "mail" library. Probably this should
13823# have the same check as for liblockfile below.
98418dba 13824
c0d27fcc 13825echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
13826echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
13827if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 13828 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13829else
98418dba
CW
13830 ac_check_lib_save_LIBS=$LIBS
13831LIBS="-lmail $LIBS"
13832cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13833/* confdefs.h. */
13834_ACEOF
13835cat confdefs.h >>conftest.$ac_ext
13836cat >>conftest.$ac_ext <<_ACEOF
13837/* end confdefs.h. */
98418dba
CW
13838
13839/* Override any gcc2 internal prototype to avoid an error. */
13840#ifdef __cplusplus
13841extern "C"
13842#endif
13843/* We use char because int might match the return type of a gcc2
13844 builtin and then its argument prototype would still apply. */
13845char maillock ();
503d2be0
AS
13846int
13847main ()
13848{
98418dba 13849maillock ();
503d2be0
AS
13850 ;
13851 return 0;
13852}
13853_ACEOF
13854rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13855if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13856 (eval $ac_link) 2>conftest.er1
503d2be0 13857 ac_status=$?
edfaf76d
LK
13858 grep -v '^ *+' conftest.er1 >conftest.err
13859 rm -f conftest.er1
13860 cat conftest.err >&5
c0d27fcc 13861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13862 (exit $ac_status); } &&
8ae52ca6 13863 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
13864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13865 (eval $ac_try) 2>&5
13866 ac_status=$?
13867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13868 (exit $ac_status); }; } &&
13869 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13871 (eval $ac_try) 2>&5
13872 ac_status=$?
c0d27fcc 13873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13874 (exit $ac_status); }; }; then
98418dba 13875 ac_cv_lib_mail_maillock=yes
ba4481b5 13876else
503d2be0 13877 echo "$as_me: failed program was:" >&5
19650fd6
AS
13878sed 's/^/| /' conftest.$ac_ext >&5
13879
98418dba 13880ac_cv_lib_mail_maillock=no
ba4481b5 13881fi
edfaf76d
LK
13882rm -f conftest.err conftest.$ac_objext \
13883 conftest$ac_exeext conftest.$ac_ext
98418dba 13884LIBS=$ac_check_lib_save_LIBS
ba4481b5 13885fi
c0d27fcc 13886echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
13887echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
13888if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 13889 cat >>confdefs.h <<_ACEOF
98418dba 13890#define HAVE_LIBMAIL 1
c0d27fcc 13891_ACEOF
ba4481b5 13892
98418dba 13893 LIBS="-lmail $LIBS"
ba4481b5 13894
98418dba 13895fi
ba4481b5 13896
c0d27fcc
MR
13897
13898echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
13899echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
13900if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 13901 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13902else
503d2be0 13903 ac_check_lib_save_LIBS=$LIBS
98418dba 13904LIBS="-llockfile $LIBS"
503d2be0 13905cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13906/* confdefs.h. */
13907_ACEOF
13908cat confdefs.h >>conftest.$ac_ext
13909cat >>conftest.$ac_ext <<_ACEOF
13910/* end confdefs.h. */
503d2be0 13911
ba4481b5 13912/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13913#ifdef __cplusplus
13914extern "C"
13915#endif
ba4481b5 13916/* We use char because int might match the return type of a gcc2
503d2be0 13917 builtin and then its argument prototype would still apply. */
98418dba 13918char maillock ();
503d2be0
AS
13919int
13920main ()
13921{
98418dba 13922maillock ();
503d2be0
AS
13923 ;
13924 return 0;
13925}
13926_ACEOF
13927rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13928if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13929 (eval $ac_link) 2>conftest.er1
503d2be0 13930 ac_status=$?
edfaf76d
LK
13931 grep -v '^ *+' conftest.er1 >conftest.err
13932 rm -f conftest.er1
13933 cat conftest.err >&5
c0d27fcc 13934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13935 (exit $ac_status); } &&
8ae52ca6 13936 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
13937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13938 (eval $ac_try) 2>&5
13939 ac_status=$?
13940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13941 (exit $ac_status); }; } &&
13942 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13944 (eval $ac_try) 2>&5
13945 ac_status=$?
c0d27fcc 13946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13947 (exit $ac_status); }; }; then
98418dba 13948 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
13949else
13950 echo "$as_me: failed program was:" >&5
19650fd6
AS
13951sed 's/^/| /' conftest.$ac_ext >&5
13952
98418dba
CW
13953ac_cv_lib_lockfile_maillock=no
13954fi
edfaf76d
LK
13955rm -f conftest.err conftest.$ac_objext \
13956 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13957LIBS=$ac_check_lib_save_LIBS
13958fi
c0d27fcc 13959echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
13960echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
13961if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 13962 cat >>confdefs.h <<_ACEOF
98418dba 13963#define HAVE_LIBLOCKFILE 1
c0d27fcc 13964_ACEOF
98418dba
CW
13965
13966 LIBS="-llockfile $LIBS"
13967
13968fi
13969
13970# If we have the shared liblockfile, assume we must use it for mail
13971# locking (e.g. Debian). If we couldn't link against liblockfile
13972# (no liblockfile.a installed), ensure that we don't need to.
13973if test "$ac_cv_lib_lockfile_maillock" = no; then
13974 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13975set dummy liblockfile.so; ac_word=$2
c0d27fcc 13976echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
13977echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13978if test "${ac_cv_prog_liblockfile+set}" = set; then
13979 echo $ECHO_N "(cached) $ECHO_C" >&6
13980else
13981 if test -n "$liblockfile"; then
13982 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13983else
c0d27fcc 13984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
13985as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13986for as_dir in $as_dummy
c0d27fcc
MR
13987do
13988 IFS=$as_save_IFS
13989 test -z "$as_dir" && as_dir=.
13990 for ac_exec_ext in '' $ac_executable_extensions; do
13991 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13992 ac_cv_prog_liblockfile="yes"
13993 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13994 break 2
13995 fi
13996done
98418dba
CW
13997done
13998
13999 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 14000fi
503d2be0 14001fi
98418dba
CW
14002liblockfile=$ac_cv_prog_liblockfile
14003if test -n "$liblockfile"; then
c0d27fcc 14004 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
14005echo "${ECHO_T}$liblockfile" >&6
14006else
c0d27fcc 14007 echo "$as_me:$LINENO: result: no" >&5
98418dba 14008echo "${ECHO_T}no" >&6
ba4481b5
DL
14009fi
14010
98418dba 14011 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 14012 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
14013This probably means that movemail could lose mail.
14014There may be a \`development' package to install containing liblockfile." >&5
14015echo "$as_me: error: Shared liblockfile found but can't link against it.
14016This probably means that movemail could lose mail.
14017There may be a \`development' package to install containing liblockfile." >&2;}
14018 { (exit 1); exit 1; }; }
98418dba 14019 else :
55597d70 14020 fi
98418dba 14021fi
503d2be0 14022
98418dba
CW
14023for ac_func in touchlock
14024do
14025as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14026echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14027echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14028if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14029 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 14030else
98418dba 14031 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14032/* confdefs.h. */
14033_ACEOF
14034cat confdefs.h >>conftest.$ac_ext
14035cat >>conftest.$ac_ext <<_ACEOF
14036/* end confdefs.h. */
edfaf76d
LK
14037/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14038 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14039#define $ac_func innocuous_$ac_func
14040
98418dba 14041/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14042 which can conflict with char $ac_func (); below.
14043 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14044 <limits.h> exists even on freestanding compilers. */
edfaf76d 14045
19650fd6
AS
14046#ifdef __STDC__
14047# include <limits.h>
14048#else
14049# include <assert.h>
14050#endif
edfaf76d
LK
14051
14052#undef $ac_func
14053
457b792c 14054/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14055#ifdef __cplusplus
14056extern "C"
19650fd6 14057{
503d2be0 14058#endif
457b792c 14059/* We use char because int might match the return type of a gcc2
503d2be0 14060 builtin and then its argument prototype would still apply. */
98418dba 14061char $ac_func ();
98418dba
CW
14062/* The GNU C library defines this for functions which it implements
14063 to always fail with ENOSYS. Some functions are actually named
14064 something starting with __ and the normal name is an alias. */
14065#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14066choke me
14067#else
19650fd6
AS
14068char (*f) () = $ac_func;
14069#endif
14070#ifdef __cplusplus
14071}
cd958eb3
MB
14072#endif
14073
19650fd6
AS
14074int
14075main ()
14076{
14077return f != $ac_func;
503d2be0
AS
14078 ;
14079 return 0;
14080}
14081_ACEOF
14082rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14083if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14084 (eval $ac_link) 2>conftest.er1
503d2be0 14085 ac_status=$?
edfaf76d
LK
14086 grep -v '^ *+' conftest.er1 >conftest.err
14087 rm -f conftest.er1
14088 cat conftest.err >&5
c0d27fcc 14089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14090 (exit $ac_status); } &&
8ae52ca6 14091 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
14092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14093 (eval $ac_try) 2>&5
14094 ac_status=$?
14095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14096 (exit $ac_status); }; } &&
14097 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14099 (eval $ac_try) 2>&5
14100 ac_status=$?
c0d27fcc 14101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14102 (exit $ac_status); }; }; then
98418dba 14103 eval "$as_ac_var=yes"
503d2be0
AS
14104else
14105 echo "$as_me: failed program was:" >&5
19650fd6
AS
14106sed 's/^/| /' conftest.$ac_ext >&5
14107
98418dba 14108eval "$as_ac_var=no"
503d2be0 14109fi
edfaf76d
LK
14110rm -f conftest.err conftest.$ac_objext \
14111 conftest$ac_exeext conftest.$ac_ext
503d2be0 14112fi
c0d27fcc 14113echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14114echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14115if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14116 cat >>confdefs.h <<_ACEOF
98418dba 14117#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14118_ACEOF
457b792c 14119
457b792c 14120fi
98418dba 14121done
457b792c 14122
c0d27fcc 14123
98418dba
CW
14124for ac_header in maillock.h
14125do
14126as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14127if eval "test \"\${$as_ac_Header+set}\" = set"; then
14128 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
14129echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14130if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 14131 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14132fi
14133echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14134echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 14135else
c0d27fcc
MR
14136 # Is the header compilable?
14137echo "$as_me:$LINENO: checking $ac_header usability" >&5
14138echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14139cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14140/* confdefs.h. */
14141_ACEOF
14142cat confdefs.h >>conftest.$ac_ext
14143cat >>conftest.$ac_ext <<_ACEOF
14144/* end confdefs.h. */
c0d27fcc
MR
14145$ac_includes_default
14146#include <$ac_header>
14147_ACEOF
14148rm -f conftest.$ac_objext
14149if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14150 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14151 ac_status=$?
edfaf76d
LK
14152 grep -v '^ *+' conftest.er1 >conftest.err
14153 rm -f conftest.er1
14154 cat conftest.err >&5
c0d27fcc
MR
14155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14156 (exit $ac_status); } &&
8ae52ca6 14157 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
14158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14159 (eval $ac_try) 2>&5
14160 ac_status=$?
14161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14162 (exit $ac_status); }; } &&
14163 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14165 (eval $ac_try) 2>&5
14166 ac_status=$?
14167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14168 (exit $ac_status); }; }; then
14169 ac_header_compiler=yes
14170else
14171 echo "$as_me: failed program was:" >&5
19650fd6
AS
14172sed 's/^/| /' conftest.$ac_ext >&5
14173
c0d27fcc
MR
14174ac_header_compiler=no
14175fi
edfaf76d 14176rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14177echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14178echo "${ECHO_T}$ac_header_compiler" >&6
14179
14180# Is the header present?
14181echo "$as_me:$LINENO: checking $ac_header presence" >&5
14182echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14183cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14184/* confdefs.h. */
14185_ACEOF
14186cat confdefs.h >>conftest.$ac_ext
14187cat >>conftest.$ac_ext <<_ACEOF
14188/* end confdefs.h. */
98418dba 14189#include <$ac_header>
503d2be0 14190_ACEOF
c0d27fcc 14191if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 14192 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 14193 ac_status=$?
6bae0ccf 14194 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14195 rm -f conftest.er1
14196 cat conftest.err >&5
c0d27fcc 14197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
14198 (exit $ac_status); } >/dev/null; then
14199 if test -s conftest.err; then
14200 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14201 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
14202 else
14203 ac_cpp_err=
14204 fi
503d2be0 14205else
98418dba 14206 ac_cpp_err=yes
503d2be0 14207fi
98418dba 14208if test -z "$ac_cpp_err"; then
c0d27fcc 14209 ac_header_preproc=yes
98418dba
CW
14210else
14211 echo "$as_me: failed program was:" >&5
19650fd6
AS
14212sed 's/^/| /' conftest.$ac_ext >&5
14213
c0d27fcc 14214 ac_header_preproc=no
503d2be0 14215fi
98418dba 14216rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14217echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14218echo "${ECHO_T}$ac_header_preproc" >&6
14219
14220# So? What about this header?
edfaf76d
LK
14221case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14222 yes:no: )
c0d27fcc
MR
14223 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14224echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14225 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14226echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14227 ac_header_preproc=yes
19650fd6 14228 ;;
edfaf76d 14229 no:yes:* )
c0d27fcc
MR
14230 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14231echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14232 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14233echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14234 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14235echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14236 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14237echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14238 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14239echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14240 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14241echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14242 (
14243 cat <<\_ASBOX
edfaf76d
LK
14244## ------------------------------------------ ##
14245## Report this to the AC_PACKAGE_NAME lists. ##
14246## ------------------------------------------ ##
19650fd6
AS
14247_ASBOX
14248 ) |
14249 sed "s/^/$as_me: WARNING: /" >&2
14250 ;;
c0d27fcc
MR
14251esac
14252echo "$as_me:$LINENO: checking for $ac_header" >&5
14253echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14254if eval "test \"\${$as_ac_Header+set}\" = set"; then
14255 echo $ECHO_N "(cached) $ECHO_C" >&6
14256else
edfaf76d 14257 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14258fi
c0d27fcc 14259echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14260echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14261
14262fi
98418dba 14263if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14264 cat >>confdefs.h <<_ACEOF
98418dba 14265#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14266_ACEOF
48d4b120 14267
ba4481b5 14268fi
c0d27fcc 14269
98418dba
CW
14270done
14271
c0d27fcc
MR
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
22044edf
DL
14327
14328
c0d27fcc 14329
b0e44248
RB
14330
14331
973a76b1
DL
14332
14333
14334
cd958eb3 14335
25ca0bca 14336
ea92fc9f 14337
e2fcf543 14338
c0d27fcc
MR
14339
14340
98418dba 14341for ac_func in gethostname getdomainname dup2 \
e2fcf543 14342rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
98418dba
CW
14343random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
14344strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 14345utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
14346__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
14347sendto recvfrom getsockopt setsockopt getsockname getpeername \
b0e44248 14348gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
4489ece2 14349memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
14350do
14351as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14352echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14353echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14354if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14355 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14356else
503d2be0 14357 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14358/* confdefs.h. */
14359_ACEOF
14360cat confdefs.h >>conftest.$ac_ext
14361cat >>conftest.$ac_ext <<_ACEOF
14362/* end confdefs.h. */
edfaf76d
LK
14363/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14364 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14365#define $ac_func innocuous_$ac_func
14366
98418dba 14367/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14368 which can conflict with char $ac_func (); below.
14369 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14370 <limits.h> exists even on freestanding compilers. */
edfaf76d 14371
19650fd6
AS
14372#ifdef __STDC__
14373# include <limits.h>
14374#else
14375# include <assert.h>
14376#endif
edfaf76d
LK
14377
14378#undef $ac_func
14379
ba4481b5 14380/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14381#ifdef __cplusplus
14382extern "C"
19650fd6 14383{
503d2be0 14384#endif
ba4481b5 14385/* We use char because int might match the return type of a gcc2
503d2be0 14386 builtin and then its argument prototype would still apply. */
98418dba 14387char $ac_func ();
98418dba
CW
14388/* The GNU C library defines this for functions which it implements
14389 to always fail with ENOSYS. Some functions are actually named
14390 something starting with __ and the normal name is an alias. */
14391#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14392choke me
14393#else
19650fd6
AS
14394char (*f) () = $ac_func;
14395#endif
14396#ifdef __cplusplus
14397}
98418dba
CW
14398#endif
14399
19650fd6
AS
14400int
14401main ()
14402{
14403return f != $ac_func;
503d2be0
AS
14404 ;
14405 return 0;
14406}
14407_ACEOF
14408rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14409if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14410 (eval $ac_link) 2>conftest.er1
503d2be0 14411 ac_status=$?
edfaf76d
LK
14412 grep -v '^ *+' conftest.er1 >conftest.err
14413 rm -f conftest.er1
14414 cat conftest.err >&5
c0d27fcc 14415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14416 (exit $ac_status); } &&
8ae52ca6 14417 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
c0d27fcc 14418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14419 (eval $ac_try) 2>&5
14420 ac_status=$?
c0d27fcc 14421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
14422 (exit $ac_status); }; } &&
14423 { ac_try='test -s conftest$ac_exeext'
14424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14425 (eval $ac_try) 2>&5
14426 ac_status=$?
14427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14428 (exit $ac_status); }; }; then
98418dba 14429 eval "$as_ac_var=yes"
503d2be0
AS
14430else
14431 echo "$as_me: failed program was:" >&5
19650fd6
AS
14432sed 's/^/| /' conftest.$ac_ext >&5
14433
98418dba 14434eval "$as_ac_var=no"
503d2be0 14435fi
edfaf76d
LK
14436rm -f conftest.err conftest.$ac_objext \
14437 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14438fi
c0d27fcc 14439echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14440echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14441if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14442 cat >>confdefs.h <<_ACEOF
98418dba 14443#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14444_ACEOF
ba4481b5 14445
ba4481b5 14446fi
98418dba 14447done
ba4481b5 14448
c0d27fcc
MR
14449
14450
98418dba
CW
14451for ac_header in sys/un.h
14452do
14453as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14454if eval "test \"\${$as_ac_Header+set}\" = set"; then
14455 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
14456echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14457if eval "test \"\${$as_ac_Header+set}\" = set"; then
14458 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14459fi
14460echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14461echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 14462else
c0d27fcc
MR
14463 # Is the header compilable?
14464echo "$as_me:$LINENO: checking $ac_header usability" >&5
14465echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14466cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14467/* confdefs.h. */
14468_ACEOF
14469cat confdefs.h >>conftest.$ac_ext
14470cat >>conftest.$ac_ext <<_ACEOF
14471/* end confdefs.h. */
c0d27fcc
MR
14472$ac_includes_default
14473#include <$ac_header>
14474_ACEOF
14475rm -f conftest.$ac_objext
14476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14477 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14478 ac_status=$?
edfaf76d
LK
14479 grep -v '^ *+' conftest.er1 >conftest.err
14480 rm -f conftest.er1
14481 cat conftest.err >&5
c0d27fcc
MR
14482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14483 (exit $ac_status); } &&
8ae52ca6 14484 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
14485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14486 (eval $ac_try) 2>&5
14487 ac_status=$?
14488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14489 (exit $ac_status); }; } &&
14490 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14492 (eval $ac_try) 2>&5
14493 ac_status=$?
14494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14495 (exit $ac_status); }; }; then
14496 ac_header_compiler=yes
14497else
14498 echo "$as_me: failed program was:" >&5
19650fd6
AS
14499sed 's/^/| /' conftest.$ac_ext >&5
14500
c0d27fcc
MR
14501ac_header_compiler=no
14502fi
edfaf76d 14503rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14504echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14505echo "${ECHO_T}$ac_header_compiler" >&6
14506
14507# Is the header present?
14508echo "$as_me:$LINENO: checking $ac_header presence" >&5
14509echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14510cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14511/* confdefs.h. */
14512_ACEOF
14513cat confdefs.h >>conftest.$ac_ext
14514cat >>conftest.$ac_ext <<_ACEOF
14515/* end confdefs.h. */
98418dba 14516#include <$ac_header>
503d2be0 14517_ACEOF
c0d27fcc 14518if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14519 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14520 ac_status=$?
6bae0ccf 14521 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14522 rm -f conftest.er1
14523 cat conftest.err >&5
c0d27fcc 14524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14525 (exit $ac_status); } >/dev/null; then
14526 if test -s conftest.err; then
14527 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14528 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14529 else
14530 ac_cpp_err=
14531 fi
14532else
14533 ac_cpp_err=yes
14534fi
14535if test -z "$ac_cpp_err"; then
c0d27fcc 14536 ac_header_preproc=yes
ba4481b5 14537else
503d2be0 14538 echo "$as_me: failed program was:" >&5
19650fd6
AS
14539sed 's/^/| /' conftest.$ac_ext >&5
14540
c0d27fcc 14541 ac_header_preproc=no
ba4481b5 14542fi
503d2be0 14543rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14544echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14545echo "${ECHO_T}$ac_header_preproc" >&6
14546
14547# So? What about this header?
edfaf76d
LK
14548case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14549 yes:no: )
c0d27fcc
MR
14550 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14551echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14552 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14553echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14554 ac_header_preproc=yes
19650fd6 14555 ;;
edfaf76d 14556 no:yes:* )
c0d27fcc
MR
14557 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14558echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14559 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14560echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14561 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14562echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14563 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14564echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14565 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14566echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14567 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14568echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14569 (
14570 cat <<\_ASBOX
edfaf76d
LK
14571## ------------------------------------------ ##
14572## Report this to the AC_PACKAGE_NAME lists. ##
14573## ------------------------------------------ ##
19650fd6
AS
14574_ASBOX
14575 ) |
14576 sed "s/^/$as_me: WARNING: /" >&2
14577 ;;
c0d27fcc
MR
14578esac
14579echo "$as_me:$LINENO: checking for $ac_header" >&5
14580echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14581if eval "test \"\${$as_ac_Header+set}\" = set"; then
14582 echo $ECHO_N "(cached) $ECHO_C" >&6
14583else
edfaf76d 14584 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14585fi
c0d27fcc 14586echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 14587echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14588
14589fi
925c2f3f 14590if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14591 cat >>confdefs.h <<_ACEOF
925c2f3f 14592#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14593_ACEOF
503d2be0 14594
925c2f3f 14595fi
c0d27fcc 14596
925c2f3f
EZ
14597done
14598
c0d27fcc
MR
14599
14600
14601
edfaf76d
LK
14602
14603for ac_header in stdlib.h sys/time.h unistd.h
925c2f3f
EZ
14604do
14605as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14606if eval "test \"\${$as_ac_Header+set}\" = set"; then
14607 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
14608echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14609if eval "test \"\${$as_ac_Header+set}\" = set"; then
14610 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14611fi
14612echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14613echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 14614else
c0d27fcc
MR
14615 # Is the header compilable?
14616echo "$as_me:$LINENO: checking $ac_header usability" >&5
14617echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14618cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14619/* confdefs.h. */
14620_ACEOF
14621cat confdefs.h >>conftest.$ac_ext
14622cat >>conftest.$ac_ext <<_ACEOF
14623/* end confdefs.h. */
c0d27fcc
MR
14624$ac_includes_default
14625#include <$ac_header>
14626_ACEOF
14627rm -f conftest.$ac_objext
14628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14629 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14630 ac_status=$?
edfaf76d
LK
14631 grep -v '^ *+' conftest.er1 >conftest.err
14632 rm -f conftest.er1
14633 cat conftest.err >&5
c0d27fcc
MR
14634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14635 (exit $ac_status); } &&
8ae52ca6 14636 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
14637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14638 (eval $ac_try) 2>&5
14639 ac_status=$?
14640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14641 (exit $ac_status); }; } &&
14642 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14644 (eval $ac_try) 2>&5
14645 ac_status=$?
14646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14647 (exit $ac_status); }; }; then
14648 ac_header_compiler=yes
14649else
14650 echo "$as_me: failed program was:" >&5
19650fd6
AS
14651sed 's/^/| /' conftest.$ac_ext >&5
14652
c0d27fcc
MR
14653ac_header_compiler=no
14654fi
edfaf76d 14655rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14656echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14657echo "${ECHO_T}$ac_header_compiler" >&6
14658
14659# Is the header present?
14660echo "$as_me:$LINENO: checking $ac_header presence" >&5
14661echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14662cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14663/* confdefs.h. */
14664_ACEOF
14665cat confdefs.h >>conftest.$ac_ext
14666cat >>conftest.$ac_ext <<_ACEOF
14667/* end confdefs.h. */
98418dba 14668#include <$ac_header>
503d2be0 14669_ACEOF
c0d27fcc 14670if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14671 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14672 ac_status=$?
6bae0ccf 14673 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14674 rm -f conftest.er1
14675 cat conftest.err >&5
c0d27fcc 14676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14677 (exit $ac_status); } >/dev/null; then
14678 if test -s conftest.err; then
14679 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14680 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14681 else
14682 ac_cpp_err=
14683 fi
14684else
14685 ac_cpp_err=yes
14686fi
14687if test -z "$ac_cpp_err"; then
c0d27fcc 14688 ac_header_preproc=yes
98418dba
CW
14689else
14690 echo "$as_me: failed program was:" >&5
19650fd6
AS
14691sed 's/^/| /' conftest.$ac_ext >&5
14692
c0d27fcc 14693 ac_header_preproc=no
98418dba
CW
14694fi
14695rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14696echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14697echo "${ECHO_T}$ac_header_preproc" >&6
14698
14699# So? What about this header?
edfaf76d
LK
14700case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14701 yes:no: )
c0d27fcc
MR
14702 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14703echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14704 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14705echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14706 ac_header_preproc=yes
19650fd6 14707 ;;
edfaf76d 14708 no:yes:* )
c0d27fcc
MR
14709 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14710echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14711 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14712echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14713 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14714echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14715 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14716echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14717 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14718echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14719 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14720echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14721 (
14722 cat <<\_ASBOX
edfaf76d
LK
14723## ------------------------------------------ ##
14724## Report this to the AC_PACKAGE_NAME lists. ##
14725## ------------------------------------------ ##
19650fd6
AS
14726_ASBOX
14727 ) |
14728 sed "s/^/$as_me: WARNING: /" >&2
14729 ;;
c0d27fcc
MR
14730esac
14731echo "$as_me:$LINENO: checking for $ac_header" >&5
14732echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14733if eval "test \"\${$as_ac_Header+set}\" = set"; then
14734 echo $ECHO_N "(cached) $ECHO_C" >&6
14735else
edfaf76d 14736 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 14737fi
c0d27fcc 14738echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14739echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14740
14741fi
98418dba 14742if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14743 cat >>confdefs.h <<_ACEOF
98418dba 14744#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14745_ACEOF
98418dba
CW
14746
14747fi
c0d27fcc 14748
98418dba
CW
14749done
14750
c0d27fcc 14751
98418dba
CW
14752for ac_func in alarm
14753do
14754as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14755echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14756echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14757if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14758 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14759else
98418dba 14760 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14761/* confdefs.h. */
14762_ACEOF
14763cat confdefs.h >>conftest.$ac_ext
14764cat >>conftest.$ac_ext <<_ACEOF
14765/* end confdefs.h. */
edfaf76d
LK
14766/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14767 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14768#define $ac_func innocuous_$ac_func
14769
98418dba 14770/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14771 which can conflict with char $ac_func (); below.
14772 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14773 <limits.h> exists even on freestanding compilers. */
edfaf76d 14774
19650fd6
AS
14775#ifdef __STDC__
14776# include <limits.h>
14777#else
14778# include <assert.h>
14779#endif
edfaf76d
LK
14780
14781#undef $ac_func
14782
ba4481b5 14783/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14784#ifdef __cplusplus
14785extern "C"
19650fd6 14786{
503d2be0 14787#endif
ba4481b5 14788/* We use char because int might match the return type of a gcc2
503d2be0 14789 builtin and then its argument prototype would still apply. */
98418dba 14790char $ac_func ();
98418dba
CW
14791/* The GNU C library defines this for functions which it implements
14792 to always fail with ENOSYS. Some functions are actually named
14793 something starting with __ and the normal name is an alias. */
14794#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14795choke me
14796#else
19650fd6
AS
14797char (*f) () = $ac_func;
14798#endif
14799#ifdef __cplusplus
14800}
98418dba
CW
14801#endif
14802
19650fd6
AS
14803int
14804main ()
14805{
14806return f != $ac_func;
503d2be0
AS
14807 ;
14808 return 0;
14809}
14810_ACEOF
14811rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14812if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14813 (eval $ac_link) 2>conftest.er1
503d2be0 14814 ac_status=$?
edfaf76d
LK
14815 grep -v '^ *+' conftest.er1 >conftest.err
14816 rm -f conftest.er1
14817 cat conftest.err >&5
c0d27fcc 14818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14819 (exit $ac_status); } &&
8ae52ca6 14820 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
14821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14822 (eval $ac_try) 2>&5
14823 ac_status=$?
14824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14825 (exit $ac_status); }; } &&
14826 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14828 (eval $ac_try) 2>&5
14829 ac_status=$?
c0d27fcc 14830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14831 (exit $ac_status); }; }; then
98418dba 14832 eval "$as_ac_var=yes"
503d2be0
AS
14833else
14834 echo "$as_me: failed program was:" >&5
19650fd6
AS
14835sed 's/^/| /' conftest.$ac_ext >&5
14836
98418dba 14837eval "$as_ac_var=no"
503d2be0 14838fi
edfaf76d
LK
14839rm -f conftest.err conftest.$ac_objext \
14840 conftest$ac_exeext conftest.$ac_ext
ffe36136 14841fi
c0d27fcc 14842echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14843echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14844if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14845 cat >>confdefs.h <<_ACEOF
98418dba 14846#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14847_ACEOF
ffe36136 14848
ba4481b5 14849fi
98418dba 14850done
ba4481b5 14851
c0d27fcc 14852echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
14853echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
14854if test "${ac_cv_func_working_mktime+set}" = set; then
14855 echo $ECHO_N "(cached) $ECHO_C" >&6
14856else
14857 if test "$cross_compiling" = yes; then
14858 ac_cv_func_working_mktime=no
14859else
14860 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14861/* confdefs.h. */
14862_ACEOF
14863cat confdefs.h >>conftest.$ac_ext
14864cat >>conftest.$ac_ext <<_ACEOF
14865/* end confdefs.h. */
98418dba
CW
14866/* Test program from Paul Eggert and Tony Leneis. */
14867#if TIME_WITH_SYS_TIME
14868# include <sys/time.h>
14869# include <time.h>
14870#else
14871# if HAVE_SYS_TIME_H
14872# include <sys/time.h>
14873# else
14874# include <time.h>
14875# endif
14876#endif
ba4481b5 14877
edfaf76d
LK
14878#if HAVE_STDLIB_H
14879# include <stdlib.h>
14880#endif
14881
98418dba
CW
14882#if HAVE_UNISTD_H
14883# include <unistd.h>
14884#endif
ba4481b5 14885
98418dba
CW
14886#if !HAVE_ALARM
14887# define alarm(X) /* empty */
14888#endif
df645f7c 14889
98418dba
CW
14890/* Work around redefinition to rpl_putenv by other config tests. */
14891#undef putenv
df645f7c 14892
98418dba 14893static time_t time_t_max;
edfaf76d 14894static time_t time_t_min;
df645f7c 14895
98418dba 14896/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
14897static char *tz_strings[] = {
14898 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
14899 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
14900};
14901#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 14902
98418dba
CW
14903/* Fail if mktime fails to convert a date in the spring-forward gap.
14904 Based on a problem report from Andreas Jaeger. */
14905static void
14906spring_forward_gap ()
14907{
14908 /* glibc (up to about 1998-10-07) failed this test. */
14909 struct tm tm;
14910
14911 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
14912 instead of "TZ=America/Vancouver" in order to detect the bug even
14913 on systems that don't support the Olson extension, or don't have the
14914 full zoneinfo tables installed. */
14915 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
14916
14917 tm.tm_year = 98;
14918 tm.tm_mon = 3;
14919 tm.tm_mday = 5;
14920 tm.tm_hour = 2;
14921 tm.tm_min = 0;
14922 tm.tm_sec = 0;
14923 tm.tm_isdst = -1;
14924 if (mktime (&tm) == (time_t)-1)
14925 exit (1);
14926}
14927
14928static void
edfaf76d 14929mktime_test1 (now)
98418dba
CW
14930 time_t now;
14931{
14932 struct tm *lt;
14933 if ((lt = localtime (&now)) && mktime (lt) != now)
14934 exit (1);
edfaf76d
LK
14935}
14936
14937static void
14938mktime_test (now)
14939 time_t now;
14940{
14941 mktime_test1 (now);
14942 mktime_test1 ((time_t) (time_t_max - now));
14943 mktime_test1 ((time_t) (time_t_min + now));
98418dba
CW
14944}
14945
14946static void
14947irix_6_4_bug ()
14948{
14949 /* Based on code from Ariel Faigon. */
14950 struct tm tm;
14951 tm.tm_year = 96;
14952 tm.tm_mon = 3;
14953 tm.tm_mday = 0;
14954 tm.tm_hour = 0;
14955 tm.tm_min = 0;
14956 tm.tm_sec = 0;
14957 tm.tm_isdst = -1;
14958 mktime (&tm);
14959 if (tm.tm_mon != 2 || tm.tm_mday != 31)
14960 exit (1);
14961}
14962
14963static void
14964bigtime_test (j)
14965 int j;
14966{
14967 struct tm tm;
14968 time_t now;
14969 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
14970 now = mktime (&tm);
14971 if (now != (time_t) -1)
14972 {
14973 struct tm *lt = localtime (&now);
14974 if (! (lt
14975 && lt->tm_year == tm.tm_year
14976 && lt->tm_mon == tm.tm_mon
14977 && lt->tm_mday == tm.tm_mday
14978 && lt->tm_hour == tm.tm_hour
14979 && lt->tm_min == tm.tm_min
14980 && lt->tm_sec == tm.tm_sec
14981 && lt->tm_yday == tm.tm_yday
14982 && lt->tm_wday == tm.tm_wday
14983 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
14984 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
14985 exit (1);
14986 }
14987}
14988
14989int
14990main ()
14991{
14992 time_t t, delta;
14993 int i, j;
14994
14995 /* This test makes some buggy mktime implementations loop.
14996 Give up after 60 seconds; a mktime slower than that
14997 isn't worth using anyway. */
14998 alarm (60);
14999
15000 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
15001 continue;
15002 time_t_max--;
edfaf76d
LK
15003 if ((time_t) -1 < 0)
15004 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
15005 continue;
98418dba
CW
15006 delta = time_t_max / 997; /* a suitable prime number */
15007 for (i = 0; i < N_STRINGS; i++)
15008 {
15009 if (tz_strings[i])
15010 putenv (tz_strings[i]);
503d2be0 15011
98418dba
CW
15012 for (t = 0; t <= time_t_max - delta; t += delta)
15013 mktime_test (t);
edfaf76d
LK
15014 mktime_test ((time_t) 1);
15015 mktime_test ((time_t) (60 * 60));
15016 mktime_test ((time_t) (60 * 60 * 24));
98418dba
CW
15017
15018 for (j = 1; 0 < j; j *= 2)
edfaf76d 15019 bigtime_test (j);
98418dba
CW
15020 bigtime_test (j - 1);
15021 }
15022 irix_6_4_bug ();
15023 spring_forward_gap ();
15024 exit (0);
503d2be0
AS
15025}
15026_ACEOF
98418dba 15027rm -f conftest$ac_exeext
c0d27fcc 15028if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15029 (eval $ac_link) 2>&5
15030 ac_status=$?
c0d27fcc 15031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15032 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 15033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15034 (eval $ac_try) 2>&5
15035 ac_status=$?
c0d27fcc 15036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15037 (exit $ac_status); }; }; then
98418dba 15038 ac_cv_func_working_mktime=yes
503d2be0 15039else
98418dba
CW
15040 echo "$as_me: program exited with status $ac_status" >&5
15041echo "$as_me: failed program was:" >&5
19650fd6
AS
15042sed 's/^/| /' conftest.$ac_ext >&5
15043
c0d27fcc 15044( exit $ac_status )
98418dba 15045ac_cv_func_working_mktime=no
503d2be0 15046fi
edfaf76d 15047rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 15048fi
ba4481b5 15049fi
c0d27fcc 15050echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
15051echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
15052if test $ac_cv_func_working_mktime = no; then
edfaf76d
LK
15053 case $LIBOBJS in
15054 "mktime.$ac_objext" | \
15055 *" mktime.$ac_objext" | \
15056 "mktime.$ac_objext "* | \
15057 *" mktime.$ac_objext "* ) ;;
15058 *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;;
15059esac
15060
ba4481b5
DL
15061fi
15062
98418dba 15063if test "$ac_cv_func_working_mktime" = no; then
b936fae4 15064
c0d27fcc 15065cat >>confdefs.h <<\_ACEOF
98418dba 15066#define BROKEN_MKTIME 1
c0d27fcc 15067_ACEOF
ba4481b5 15068
ba4481b5 15069fi
503d2be0 15070
98418dba
CW
15071ac_have_func=no # yes means we've found a way to get the load average.
15072
6bae0ccf
DL
15073# Make sure getloadavg.c is where it belongs, at configure-time.
15074test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
15075 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
15076echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
15077 { (exit 1); exit 1; }; }
15078
98418dba
CW
15079ac_save_LIBS=$LIBS
15080
15081# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 15082(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
15083echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
15084if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 15085 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15086else
503d2be0 15087 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15088/* confdefs.h. */
15089_ACEOF
15090cat confdefs.h >>conftest.$ac_ext
15091cat >>conftest.$ac_ext <<_ACEOF
15092/* end confdefs.h. */
edfaf76d
LK
15093/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
15094 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15095#define getloadavg innocuous_getloadavg
15096
98418dba 15097/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15098 which can conflict with char getloadavg (); below.
15099 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15100 <limits.h> exists even on freestanding compilers. */
edfaf76d 15101
19650fd6
AS
15102#ifdef __STDC__
15103# include <limits.h>
15104#else
15105# include <assert.h>
15106#endif
edfaf76d
LK
15107
15108#undef getloadavg
15109
ba4481b5 15110/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15111#ifdef __cplusplus
15112extern "C"
19650fd6 15113{
503d2be0 15114#endif
ba4481b5 15115/* We use char because int might match the return type of a gcc2
503d2be0 15116 builtin and then its argument prototype would still apply. */
98418dba 15117char getloadavg ();
98418dba
CW
15118/* The GNU C library defines this for functions which it implements
15119 to always fail with ENOSYS. Some functions are actually named
15120 something starting with __ and the normal name is an alias. */
15121#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
15122choke me
15123#else
19650fd6
AS
15124char (*f) () = getloadavg;
15125#endif
15126#ifdef __cplusplus
15127}
cd958eb3
MB
15128#endif
15129
19650fd6
AS
15130int
15131main ()
15132{
15133return f != getloadavg;
503d2be0
AS
15134 ;
15135 return 0;
15136}
15137_ACEOF
15138rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15139if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15140 (eval $ac_link) 2>conftest.er1
503d2be0 15141 ac_status=$?
edfaf76d
LK
15142 grep -v '^ *+' conftest.er1 >conftest.err
15143 rm -f conftest.er1
15144 cat conftest.err >&5
c0d27fcc 15145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15146 (exit $ac_status); } &&
8ae52ca6 15147 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
15148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15149 (eval $ac_try) 2>&5
15150 ac_status=$?
15151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15152 (exit $ac_status); }; } &&
15153 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15155 (eval $ac_try) 2>&5
15156 ac_status=$?
c0d27fcc 15157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15158 (exit $ac_status); }; }; then
98418dba 15159 ac_cv_func_getloadavg=yes
503d2be0
AS
15160else
15161 echo "$as_me: failed program was:" >&5
19650fd6
AS
15162sed 's/^/| /' conftest.$ac_ext >&5
15163
98418dba 15164ac_cv_func_getloadavg=no
503d2be0 15165fi
edfaf76d
LK
15166rm -f conftest.err conftest.$ac_objext \
15167 conftest$ac_exeext conftest.$ac_ext
ba4481b5 15168fi
c0d27fcc 15169echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
15170echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
15171if test $ac_cv_func_getloadavg = yes; then
15172 exit 0
15173else
15174 exit 1
ba4481b5 15175fi
98418dba 15176) && ac_have_func=yes
ba4481b5 15177
98418dba 15178# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 15179
98418dba
CW
15180for ac_func in pstat_getdynamic
15181do
15182as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15183echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
15184echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15185if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 15186 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15187else
503d2be0 15188 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15189/* confdefs.h. */
15190_ACEOF
15191cat confdefs.h >>conftest.$ac_ext
15192cat >>conftest.$ac_ext <<_ACEOF
15193/* end confdefs.h. */
edfaf76d
LK
15194/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15195 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15196#define $ac_func innocuous_$ac_func
15197
98418dba 15198/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15199 which can conflict with char $ac_func (); below.
15200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15201 <limits.h> exists even on freestanding compilers. */
edfaf76d 15202
19650fd6
AS
15203#ifdef __STDC__
15204# include <limits.h>
15205#else
15206# include <assert.h>
15207#endif
edfaf76d
LK
15208
15209#undef $ac_func
15210
ba4481b5 15211/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15212#ifdef __cplusplus
15213extern "C"
19650fd6 15214{
503d2be0 15215#endif
ba4481b5 15216/* We use char because int might match the return type of a gcc2
503d2be0 15217 builtin and then its argument prototype would still apply. */
98418dba 15218char $ac_func ();
98418dba
CW
15219/* The GNU C library defines this for functions which it implements
15220 to always fail with ENOSYS. Some functions are actually named
15221 something starting with __ and the normal name is an alias. */
15222#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15223choke me
15224#else
19650fd6
AS
15225char (*f) () = $ac_func;
15226#endif
15227#ifdef __cplusplus
15228}
98418dba
CW
15229#endif
15230
19650fd6
AS
15231int
15232main ()
15233{
15234return f != $ac_func;
98418dba
CW
15235 ;
15236 return 0;
15237}
f21fadcc 15238_ACEOF
98418dba 15239rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15240if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15241 (eval $ac_link) 2>conftest.er1
f21fadcc 15242 ac_status=$?
edfaf76d
LK
15243 grep -v '^ *+' conftest.er1 >conftest.err
15244 rm -f conftest.er1
15245 cat conftest.err >&5
c0d27fcc 15246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15247 (exit $ac_status); } &&
8ae52ca6 15248 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
15249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15250 (eval $ac_try) 2>&5
15251 ac_status=$?
15252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15253 (exit $ac_status); }; } &&
15254 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15256 (eval $ac_try) 2>&5
15257 ac_status=$?
c0d27fcc 15258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15259 (exit $ac_status); }; }; then
15260 eval "$as_ac_var=yes"
f21fadcc
JD
15261else
15262 echo "$as_me: failed program was:" >&5
19650fd6
AS
15263sed 's/^/| /' conftest.$ac_ext >&5
15264
98418dba 15265eval "$as_ac_var=no"
f21fadcc 15266fi
edfaf76d
LK
15267rm -f conftest.err conftest.$ac_objext \
15268 conftest$ac_exeext conftest.$ac_ext
f21fadcc 15269fi
c0d27fcc 15270echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
15271echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15272if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15273 cat >>confdefs.h <<_ACEOF
98418dba 15274#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15275_ACEOF
98418dba
CW
15276
15277fi
15278done
15279
c0d27fcc 15280
98418dba
CW
15281# Solaris has libkstat which does not require root.
15282
c0d27fcc 15283echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
15284echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
15285if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
15286 echo $ECHO_N "(cached) $ECHO_C" >&6
15287else
15288 ac_check_lib_save_LIBS=$LIBS
98418dba 15289LIBS="-lkstat $LIBS"
f21fadcc 15290cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15291/* confdefs.h. */
15292_ACEOF
15293cat confdefs.h >>conftest.$ac_ext
15294cat >>conftest.$ac_ext <<_ACEOF
15295/* end confdefs.h. */
f21fadcc
JD
15296
15297/* Override any gcc2 internal prototype to avoid an error. */
15298#ifdef __cplusplus
15299extern "C"
15300#endif
15301/* We use char because int might match the return type of a gcc2
15302 builtin and then its argument prototype would still apply. */
98418dba 15303char kstat_open ();
f21fadcc
JD
15304int
15305main ()
15306{
98418dba 15307kstat_open ();
f21fadcc
JD
15308 ;
15309 return 0;
15310}
15311_ACEOF
15312rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15313if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15314 (eval $ac_link) 2>conftest.er1
f21fadcc 15315 ac_status=$?
edfaf76d
LK
15316 grep -v '^ *+' conftest.er1 >conftest.err
15317 rm -f conftest.er1
15318 cat conftest.err >&5
c0d27fcc 15319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 15320 (exit $ac_status); } &&
8ae52ca6 15321 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
15322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15323 (eval $ac_try) 2>&5
15324 ac_status=$?
15325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15326 (exit $ac_status); }; } &&
15327 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
15329 (eval $ac_try) 2>&5
15330 ac_status=$?
c0d27fcc 15331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 15332 (exit $ac_status); }; }; then
98418dba 15333 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
15334else
15335 echo "$as_me: failed program was:" >&5
19650fd6
AS
15336sed 's/^/| /' conftest.$ac_ext >&5
15337
98418dba 15338ac_cv_lib_kstat_kstat_open=no
f21fadcc 15339fi
edfaf76d
LK
15340rm -f conftest.err conftest.$ac_objext \
15341 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
15342LIBS=$ac_check_lib_save_LIBS
15343fi
c0d27fcc 15344echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
15345echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
15346if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 15347 cat >>confdefs.h <<_ACEOF
98418dba 15348#define HAVE_LIBKSTAT 1
c0d27fcc 15349_ACEOF
f21fadcc 15350
98418dba 15351 LIBS="-lkstat $LIBS"
f21fadcc 15352
f21fadcc
JD
15353fi
15354
98418dba
CW
15355test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
15356
15357# Some systems with -lutil have (and need) -lkvm as well, some do not.
15358# On Solaris, -lkvm requires nlist from -lelf, so check that first
15359# to get the right answer into the cache.
15360# For kstat on solaris, we need libelf to force the definition of SVR4 below.
15361if test $ac_have_func = no; then
c0d27fcc 15362 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
15363echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
15364if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 15365 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15366else
98418dba
CW
15367 ac_check_lib_save_LIBS=$LIBS
15368LIBS="-lelf $LIBS"
15369cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15370/* confdefs.h. */
15371_ACEOF
15372cat confdefs.h >>conftest.$ac_ext
15373cat >>conftest.$ac_ext <<_ACEOF
15374/* end confdefs.h. */
98418dba
CW
15375
15376/* Override any gcc2 internal prototype to avoid an error. */
15377#ifdef __cplusplus
15378extern "C"
15379#endif
15380/* We use char because int might match the return type of a gcc2
15381 builtin and then its argument prototype would still apply. */
15382char elf_begin ();
503d2be0
AS
15383int
15384main ()
15385{
98418dba 15386elf_begin ();
503d2be0
AS
15387 ;
15388 return 0;
15389}
15390_ACEOF
15391rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15392if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15393 (eval $ac_link) 2>conftest.er1
503d2be0 15394 ac_status=$?
edfaf76d
LK
15395 grep -v '^ *+' conftest.er1 >conftest.err
15396 rm -f conftest.er1
15397 cat conftest.err >&5
c0d27fcc 15398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15399 (exit $ac_status); } &&
8ae52ca6 15400 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
15401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15402 (eval $ac_try) 2>&5
15403 ac_status=$?
15404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15405 (exit $ac_status); }; } &&
15406 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15408 (eval $ac_try) 2>&5
15409 ac_status=$?
c0d27fcc 15410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15411 (exit $ac_status); }; }; then
98418dba 15412 ac_cv_lib_elf_elf_begin=yes
ba4481b5 15413else
503d2be0 15414 echo "$as_me: failed program was:" >&5
19650fd6
AS
15415sed 's/^/| /' conftest.$ac_ext >&5
15416
98418dba 15417ac_cv_lib_elf_elf_begin=no
ba4481b5 15418fi
edfaf76d
LK
15419rm -f conftest.err conftest.$ac_objext \
15420 conftest$ac_exeext conftest.$ac_ext
98418dba 15421LIBS=$ac_check_lib_save_LIBS
ba4481b5 15422fi
c0d27fcc 15423echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
15424echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
15425if test $ac_cv_lib_elf_elf_begin = yes; then
15426 LIBS="-lelf $LIBS"
ba4481b5
DL
15427fi
15428
98418dba
CW
15429fi
15430if test $ac_have_func = no; then
c0d27fcc 15431 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
15432echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
15433if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 15434 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15435else
98418dba
CW
15436 ac_check_lib_save_LIBS=$LIBS
15437LIBS="-lkvm $LIBS"
15438cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15439/* confdefs.h. */
15440_ACEOF
15441cat confdefs.h >>conftest.$ac_ext
15442cat >>conftest.$ac_ext <<_ACEOF
15443/* end confdefs.h. */
98418dba
CW
15444
15445/* Override any gcc2 internal prototype to avoid an error. */
15446#ifdef __cplusplus
15447extern "C"
15448#endif
15449/* We use char because int might match the return type of a gcc2
15450 builtin and then its argument prototype would still apply. */
15451char kvm_open ();
503d2be0
AS
15452int
15453main ()
15454{
98418dba 15455kvm_open ();
503d2be0
AS
15456 ;
15457 return 0;
15458}
15459_ACEOF
15460rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15461if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15462 (eval $ac_link) 2>conftest.er1
503d2be0 15463 ac_status=$?
edfaf76d
LK
15464 grep -v '^ *+' conftest.er1 >conftest.err
15465 rm -f conftest.er1
15466 cat conftest.err >&5
c0d27fcc 15467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15468 (exit $ac_status); } &&
8ae52ca6 15469 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
15470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15471 (eval $ac_try) 2>&5
15472 ac_status=$?
15473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15474 (exit $ac_status); }; } &&
15475 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15477 (eval $ac_try) 2>&5
15478 ac_status=$?
c0d27fcc 15479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15480 (exit $ac_status); }; }; then
98418dba 15481 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
15482else
15483 echo "$as_me: failed program was:" >&5
19650fd6
AS
15484sed 's/^/| /' conftest.$ac_ext >&5
15485
98418dba 15486ac_cv_lib_kvm_kvm_open=no
503d2be0 15487fi
edfaf76d
LK
15488rm -f conftest.err conftest.$ac_objext \
15489 conftest$ac_exeext conftest.$ac_ext
98418dba 15490LIBS=$ac_check_lib_save_LIBS
503d2be0 15491fi
c0d27fcc 15492echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
15493echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
15494if test $ac_cv_lib_kvm_kvm_open = yes; then
15495 LIBS="-lkvm $LIBS"
ba4481b5
DL
15496fi
15497
98418dba 15498 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 15499 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
15500echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
15501if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 15502 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15503else
98418dba
CW
15504 ac_check_lib_save_LIBS=$LIBS
15505LIBS="-lutil $LIBS"
15506cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15507/* confdefs.h. */
15508_ACEOF
15509cat confdefs.h >>conftest.$ac_ext
15510cat >>conftest.$ac_ext <<_ACEOF
15511/* end confdefs.h. */
98418dba
CW
15512
15513/* Override any gcc2 internal prototype to avoid an error. */
15514#ifdef __cplusplus
15515extern "C"
15516#endif
15517/* We use char because int might match the return type of a gcc2
15518 builtin and then its argument prototype would still apply. */
15519char getloadavg ();
503d2be0
AS
15520int
15521main ()
15522{
98418dba 15523getloadavg ();
503d2be0
AS
15524 ;
15525 return 0;
15526}
15527_ACEOF
15528rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15529if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15530 (eval $ac_link) 2>conftest.er1
503d2be0 15531 ac_status=$?
edfaf76d
LK
15532 grep -v '^ *+' conftest.er1 >conftest.err
15533 rm -f conftest.er1
15534 cat conftest.err >&5
c0d27fcc 15535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15536 (exit $ac_status); } &&
8ae52ca6 15537 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
15538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15539 (eval $ac_try) 2>&5
15540 ac_status=$?
15541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15542 (exit $ac_status); }; } &&
15543 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
15544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15545 (eval $ac_try) 2>&5
15546 ac_status=$?
15547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15548 (exit $ac_status); }; }; then
15549 ac_cv_lib_util_getloadavg=yes
15550else
503d2be0 15551 echo "$as_me: failed program was:" >&5
19650fd6
AS
15552sed 's/^/| /' conftest.$ac_ext >&5
15553
98418dba 15554ac_cv_lib_util_getloadavg=no
ba4481b5 15555fi
edfaf76d
LK
15556rm -f conftest.err conftest.$ac_objext \
15557 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15558LIBS=$ac_check_lib_save_LIBS
15559fi
c0d27fcc 15560echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
15561echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
15562if test $ac_cv_lib_util_getloadavg = yes; then
15563 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 15564fi
503d2be0 15565
98418dba 15566fi
ba4481b5 15567
98418dba
CW
15568if test $ac_have_func = no; then
15569 # There is a commonly available library for RS/6000 AIX.
15570 # Since it is not a standard part of AIX, it might be installed locally.
15571 ac_getloadavg_LIBS=$LIBS
15572 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 15573 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
15574echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
15575if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 15576 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15577else
98418dba
CW
15578 ac_check_lib_save_LIBS=$LIBS
15579LIBS="-lgetloadavg $LIBS"
15580cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15581/* confdefs.h. */
15582_ACEOF
15583cat confdefs.h >>conftest.$ac_ext
15584cat >>conftest.$ac_ext <<_ACEOF
15585/* end confdefs.h. */
ba4481b5 15586
98418dba
CW
15587/* Override any gcc2 internal prototype to avoid an error. */
15588#ifdef __cplusplus
15589extern "C"
15590#endif
15591/* We use char because int might match the return type of a gcc2
15592 builtin and then its argument prototype would still apply. */
15593char getloadavg ();
98418dba
CW
15594int
15595main ()
15596{
15597getloadavg ();
15598 ;
15599 return 0;
15600}
503d2be0 15601_ACEOF
98418dba 15602rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15603if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15604 (eval $ac_link) 2>conftest.er1
98418dba 15605 ac_status=$?
edfaf76d
LK
15606 grep -v '^ *+' conftest.er1 >conftest.err
15607 rm -f conftest.er1
15608 cat conftest.err >&5
c0d27fcc 15609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15610 (exit $ac_status); } &&
8ae52ca6 15611 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
15612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15613 (eval $ac_try) 2>&5
15614 ac_status=$?
15615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15616 (exit $ac_status); }; } &&
15617 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15619 (eval $ac_try) 2>&5
15620 ac_status=$?
c0d27fcc 15621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15622 (exit $ac_status); }; }; then
15623 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 15624else
98418dba 15625 echo "$as_me: failed program was:" >&5
19650fd6
AS
15626sed 's/^/| /' conftest.$ac_ext >&5
15627
98418dba
CW
15628ac_cv_lib_getloadavg_getloadavg=no
15629fi
edfaf76d
LK
15630rm -f conftest.err conftest.$ac_objext \
15631 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15632LIBS=$ac_check_lib_save_LIBS
15633fi
c0d27fcc 15634echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
15635echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
15636if test $ac_cv_lib_getloadavg_getloadavg = yes; then
15637 LIBS="-lgetloadavg $LIBS"
15638else
15639 LIBS=$ac_getloadavg_LIBS
ba4481b5 15640fi
ba4481b5
DL
15641
15642fi
98418dba
CW
15643
15644# Make sure it is really in the library, if we think we found it,
15645# otherwise set up the replacement function.
15646
15647for ac_func in getloadavg
15648do
15649as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15650echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15651echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15652if eval "test \"\${$as_ac_var+set}\" = set"; then
15653 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15654else
503d2be0 15655 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15656/* confdefs.h. */
15657_ACEOF
15658cat confdefs.h >>conftest.$ac_ext
15659cat >>conftest.$ac_ext <<_ACEOF
15660/* end confdefs.h. */
edfaf76d
LK
15661/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15662 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15663#define $ac_func innocuous_$ac_func
15664
ba4481b5 15665/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15666 which can conflict with char $ac_func (); below.
15667 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15668 <limits.h> exists even on freestanding compilers. */
edfaf76d 15669
19650fd6
AS
15670#ifdef __STDC__
15671# include <limits.h>
15672#else
15673# include <assert.h>
15674#endif
edfaf76d
LK
15675
15676#undef $ac_func
15677
ba4481b5 15678/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15679#ifdef __cplusplus
15680extern "C"
19650fd6 15681{
503d2be0 15682#endif
ba4481b5 15683/* We use char because int might match the return type of a gcc2
503d2be0
AS
15684 builtin and then its argument prototype would still apply. */
15685char $ac_func ();
ba4481b5
DL
15686/* The GNU C library defines this for functions which it implements
15687 to always fail with ENOSYS. Some functions are actually named
15688 something starting with __ and the normal name is an alias. */
15689#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15690choke me
15691#else
19650fd6
AS
15692char (*f) () = $ac_func;
15693#endif
15694#ifdef __cplusplus
15695}
cd958eb3
MB
15696#endif
15697
19650fd6
AS
15698int
15699main ()
15700{
15701return f != $ac_func;
503d2be0
AS
15702 ;
15703 return 0;
15704}
15705_ACEOF
15706rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15707if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15708 (eval $ac_link) 2>conftest.er1
503d2be0 15709 ac_status=$?
edfaf76d
LK
15710 grep -v '^ *+' conftest.er1 >conftest.err
15711 rm -f conftest.er1
15712 cat conftest.err >&5
c0d27fcc 15713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15714 (exit $ac_status); } &&
8ae52ca6 15715 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
15716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15717 (eval $ac_try) 2>&5
15718 ac_status=$?
15719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15720 (exit $ac_status); }; } &&
15721 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15723 (eval $ac_try) 2>&5
15724 ac_status=$?
c0d27fcc 15725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15726 (exit $ac_status); }; }; then
15727 eval "$as_ac_var=yes"
15728else
15729 echo "$as_me: failed program was:" >&5
19650fd6
AS
15730sed 's/^/| /' conftest.$ac_ext >&5
15731
503d2be0
AS
15732eval "$as_ac_var=no"
15733fi
edfaf76d
LK
15734rm -f conftest.err conftest.$ac_objext \
15735 conftest$ac_exeext conftest.$ac_ext
503d2be0 15736fi
c0d27fcc 15737echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15738echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15739if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15740 cat >>confdefs.h <<_ACEOF
98418dba 15741#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15742_ACEOF
503d2be0 15743
98418dba 15744else
edfaf76d
LK
15745 case $LIBOBJS in
15746 "getloadavg.$ac_objext" | \
15747 *" getloadavg.$ac_objext" | \
15748 "getloadavg.$ac_objext "* | \
15749 *" getloadavg.$ac_objext "* ) ;;
15750 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" ;;
15751esac
15752
ba4481b5 15753
c0d27fcc 15754cat >>confdefs.h <<\_ACEOF
98418dba 15755#define C_GETLOADAVG 1
c0d27fcc 15756_ACEOF
ba4481b5 15757
98418dba
CW
15758# Figure out what our getloadavg.c needs.
15759ac_have_func=no
c0d27fcc
MR
15760if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15761 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
15762echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15763if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 15764 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15765fi
15766echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
15767echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 15768else
c0d27fcc
MR
15769 # Is the header compilable?
15770echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
15771echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
15772cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15773/* confdefs.h. */
15774_ACEOF
15775cat confdefs.h >>conftest.$ac_ext
15776cat >>conftest.$ac_ext <<_ACEOF
15777/* end confdefs.h. */
c0d27fcc
MR
15778$ac_includes_default
15779#include <sys/dg_sys_info.h>
15780_ACEOF
15781rm -f conftest.$ac_objext
15782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 15783 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15784 ac_status=$?
edfaf76d
LK
15785 grep -v '^ *+' conftest.er1 >conftest.err
15786 rm -f conftest.er1
15787 cat conftest.err >&5
c0d27fcc
MR
15788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15789 (exit $ac_status); } &&
8ae52ca6 15790 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
15791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15792 (eval $ac_try) 2>&5
15793 ac_status=$?
15794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15795 (exit $ac_status); }; } &&
15796 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15798 (eval $ac_try) 2>&5
15799 ac_status=$?
15800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15801 (exit $ac_status); }; }; then
15802 ac_header_compiler=yes
15803else
15804 echo "$as_me: failed program was:" >&5
19650fd6
AS
15805sed 's/^/| /' conftest.$ac_ext >&5
15806
c0d27fcc
MR
15807ac_header_compiler=no
15808fi
edfaf76d 15809rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15810echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15811echo "${ECHO_T}$ac_header_compiler" >&6
15812
15813# Is the header present?
15814echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
15815echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
15816cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15817/* confdefs.h. */
15818_ACEOF
15819cat confdefs.h >>conftest.$ac_ext
15820cat >>conftest.$ac_ext <<_ACEOF
15821/* end confdefs.h. */
98418dba
CW
15822#include <sys/dg_sys_info.h>
15823_ACEOF
c0d27fcc 15824if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
15825 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15826 ac_status=$?
6bae0ccf 15827 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15828 rm -f conftest.er1
15829 cat conftest.err >&5
c0d27fcc 15830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15831 (exit $ac_status); } >/dev/null; then
15832 if test -s conftest.err; then
15833 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 15834 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15835 else
15836 ac_cpp_err=
15837 fi
15838else
15839 ac_cpp_err=yes
ba4481b5 15840fi
98418dba 15841if test -z "$ac_cpp_err"; then
c0d27fcc 15842 ac_header_preproc=yes
98418dba
CW
15843else
15844 echo "$as_me: failed program was:" >&5
19650fd6
AS
15845sed 's/^/| /' conftest.$ac_ext >&5
15846
c0d27fcc 15847 ac_header_preproc=no
ba4481b5 15848fi
98418dba 15849rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15850echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15851echo "${ECHO_T}$ac_header_preproc" >&6
15852
15853# So? What about this header?
edfaf76d
LK
15854case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15855 yes:no: )
c0d27fcc
MR
15856 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
15857echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15858 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
15859echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
15860 ac_header_preproc=yes
19650fd6 15861 ;;
edfaf76d 15862 no:yes:* )
c0d27fcc
MR
15863 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
15864echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15865 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
15866echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
15867 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
15868echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
15869 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
15870echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15871 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 15872echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15873 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
15874echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15875 (
15876 cat <<\_ASBOX
edfaf76d
LK
15877## ------------------------------------------ ##
15878## Report this to the AC_PACKAGE_NAME lists. ##
15879## ------------------------------------------ ##
19650fd6
AS
15880_ASBOX
15881 ) |
15882 sed "s/^/$as_me: WARNING: /" >&2
15883 ;;
c0d27fcc
MR
15884esac
15885echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
15886echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15887if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15888 echo $ECHO_N "(cached) $ECHO_C" >&6
15889else
15890 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 15891fi
c0d27fcc 15892echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 15893echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
15894
15895fi
98418dba
CW
15896if test $ac_cv_header_sys_dg_sys_info_h = yes; then
15897 ac_have_func=yes
ba4481b5 15898
c0d27fcc 15899cat >>confdefs.h <<\_ACEOF
98418dba 15900#define DGUX 1
c0d27fcc
MR
15901_ACEOF
15902
503d2be0 15903
c0d27fcc 15904echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
15905echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
15906if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 15907 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15908else
503d2be0 15909 ac_check_lib_save_LIBS=$LIBS
98418dba 15910LIBS="-ldgc $LIBS"
503d2be0 15911cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15912/* confdefs.h. */
15913_ACEOF
15914cat confdefs.h >>conftest.$ac_ext
15915cat >>conftest.$ac_ext <<_ACEOF
15916/* end confdefs.h. */
503d2be0 15917
ba4481b5 15918/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15919#ifdef __cplusplus
15920extern "C"
15921#endif
ba4481b5 15922/* We use char because int might match the return type of a gcc2
503d2be0 15923 builtin and then its argument prototype would still apply. */
98418dba 15924char dg_sys_info ();
503d2be0
AS
15925int
15926main ()
15927{
98418dba 15928dg_sys_info ();
503d2be0
AS
15929 ;
15930 return 0;
15931}
15932_ACEOF
15933rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15934if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15935 (eval $ac_link) 2>conftest.er1
503d2be0 15936 ac_status=$?
edfaf76d
LK
15937 grep -v '^ *+' conftest.er1 >conftest.err
15938 rm -f conftest.er1
15939 cat conftest.err >&5
c0d27fcc 15940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15941 (exit $ac_status); } &&
8ae52ca6 15942 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
15943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15944 (eval $ac_try) 2>&5
15945 ac_status=$?
15946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15947 (exit $ac_status); }; } &&
15948 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15950 (eval $ac_try) 2>&5
15951 ac_status=$?
c0d27fcc 15952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15953 (exit $ac_status); }; }; then
98418dba 15954 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
15955else
15956 echo "$as_me: failed program was:" >&5
19650fd6
AS
15957sed 's/^/| /' conftest.$ac_ext >&5
15958
98418dba 15959ac_cv_lib_dgc_dg_sys_info=no
503d2be0 15960fi
edfaf76d
LK
15961rm -f conftest.err conftest.$ac_objext \
15962 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15963LIBS=$ac_check_lib_save_LIBS
15964fi
c0d27fcc 15965echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
15966echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
15967if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 15968 cat >>confdefs.h <<_ACEOF
98418dba 15969#define HAVE_LIBDGC 1
c0d27fcc 15970_ACEOF
ba4481b5 15971
98418dba 15972 LIBS="-ldgc $LIBS"
ba4481b5 15973
ba4481b5
DL
15974fi
15975
98418dba 15976fi
503d2be0 15977
c0d27fcc
MR
15978
15979
15980if test "${ac_cv_header_locale_h+set}" = set; then
15981 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
15982echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
15983if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 15984 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15985fi
15986echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
15987echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 15988else
c0d27fcc
MR
15989 # Is the header compilable?
15990echo "$as_me:$LINENO: checking locale.h usability" >&5
15991echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
15992cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15993/* confdefs.h. */
15994_ACEOF
15995cat confdefs.h >>conftest.$ac_ext
15996cat >>conftest.$ac_ext <<_ACEOF
15997/* end confdefs.h. */
c0d27fcc
MR
15998$ac_includes_default
15999#include <locale.h>
16000_ACEOF
16001rm -f conftest.$ac_objext
16002if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16003 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16004 ac_status=$?
edfaf76d
LK
16005 grep -v '^ *+' conftest.er1 >conftest.err
16006 rm -f conftest.er1
16007 cat conftest.err >&5
c0d27fcc
MR
16008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16009 (exit $ac_status); } &&
8ae52ca6 16010 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
16011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16012 (eval $ac_try) 2>&5
16013 ac_status=$?
16014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16015 (exit $ac_status); }; } &&
16016 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16018 (eval $ac_try) 2>&5
16019 ac_status=$?
16020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16021 (exit $ac_status); }; }; then
16022 ac_header_compiler=yes
16023else
16024 echo "$as_me: failed program was:" >&5
19650fd6
AS
16025sed 's/^/| /' conftest.$ac_ext >&5
16026
c0d27fcc
MR
16027ac_header_compiler=no
16028fi
edfaf76d 16029rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16030echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16031echo "${ECHO_T}$ac_header_compiler" >&6
16032
16033# Is the header present?
16034echo "$as_me:$LINENO: checking locale.h presence" >&5
16035echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
16036cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16037/* confdefs.h. */
16038_ACEOF
16039cat confdefs.h >>conftest.$ac_ext
16040cat >>conftest.$ac_ext <<_ACEOF
16041/* end confdefs.h. */
98418dba 16042#include <locale.h>
503d2be0 16043_ACEOF
c0d27fcc 16044if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 16045 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 16046 ac_status=$?
6bae0ccf 16047 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16048 rm -f conftest.er1
16049 cat conftest.err >&5
c0d27fcc 16050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16051 (exit $ac_status); } >/dev/null; then
16052 if test -s conftest.err; then
16053 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16054 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16055 else
16056 ac_cpp_err=
16057 fi
503d2be0 16058else
98418dba 16059 ac_cpp_err=yes
503d2be0 16060fi
98418dba 16061if test -z "$ac_cpp_err"; then
c0d27fcc 16062 ac_header_preproc=yes
98418dba
CW
16063else
16064 echo "$as_me: failed program was:" >&5
19650fd6
AS
16065sed 's/^/| /' conftest.$ac_ext >&5
16066
c0d27fcc 16067 ac_header_preproc=no
ba4481b5 16068fi
98418dba 16069rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16070echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16071echo "${ECHO_T}$ac_header_preproc" >&6
16072
16073# So? What about this header?
edfaf76d
LK
16074case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16075 yes:no: )
c0d27fcc
MR
16076 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
16077echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16078 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
16079echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
16080 ac_header_preproc=yes
19650fd6 16081 ;;
edfaf76d 16082 no:yes:* )
c0d27fcc
MR
16083 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
16084echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16085 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
16086echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
16087 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
16088echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
16089 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
16090echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16091 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 16092echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16093 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
16094echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16095 (
16096 cat <<\_ASBOX
edfaf76d
LK
16097## ------------------------------------------ ##
16098## Report this to the AC_PACKAGE_NAME lists. ##
16099## ------------------------------------------ ##
19650fd6
AS
16100_ASBOX
16101 ) |
16102 sed "s/^/$as_me: WARNING: /" >&2
16103 ;;
c0d27fcc
MR
16104esac
16105echo "$as_me:$LINENO: checking for locale.h" >&5
16106echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
16107if test "${ac_cv_header_locale_h+set}" = set; then
16108 echo $ECHO_N "(cached) $ECHO_C" >&6
16109else
16110 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 16111fi
c0d27fcc 16112echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
16113echo "${ECHO_T}$ac_cv_header_locale_h" >&6
16114
c0d27fcc
MR
16115fi
16116
16117
16118
98418dba 16119for ac_func in setlocale
ba4481b5 16120do
503d2be0 16121as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 16122echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
16123echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16124if eval "test \"\${$as_ac_var+set}\" = set"; then
16125 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16126else
503d2be0 16127 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16128/* confdefs.h. */
16129_ACEOF
16130cat confdefs.h >>conftest.$ac_ext
16131cat >>conftest.$ac_ext <<_ACEOF
16132/* end confdefs.h. */
edfaf76d
LK
16133/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16134 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16135#define $ac_func innocuous_$ac_func
16136
ba4481b5 16137/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16138 which can conflict with char $ac_func (); below.
16139 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16140 <limits.h> exists even on freestanding compilers. */
edfaf76d 16141
19650fd6
AS
16142#ifdef __STDC__
16143# include <limits.h>
16144#else
16145# include <assert.h>
16146#endif
edfaf76d
LK
16147
16148#undef $ac_func
16149
ba4481b5 16150/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16151#ifdef __cplusplus
16152extern "C"
19650fd6 16153{
503d2be0 16154#endif
ba4481b5 16155/* We use char because int might match the return type of a gcc2
503d2be0
AS
16156 builtin and then its argument prototype would still apply. */
16157char $ac_func ();
ba4481b5
DL
16158/* The GNU C library defines this for functions which it implements
16159 to always fail with ENOSYS. Some functions are actually named
16160 something starting with __ and the normal name is an alias. */
16161#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16162choke me
16163#else
19650fd6
AS
16164char (*f) () = $ac_func;
16165#endif
16166#ifdef __cplusplus
16167}
ba4481b5
DL
16168#endif
16169
19650fd6
AS
16170int
16171main ()
16172{
16173return f != $ac_func;
503d2be0
AS
16174 ;
16175 return 0;
16176}
16177_ACEOF
16178rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16179if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 16180 (eval $ac_link) 2>conftest.er1
503d2be0 16181 ac_status=$?
edfaf76d
LK
16182 grep -v '^ *+' conftest.er1 >conftest.err
16183 rm -f conftest.er1
16184 cat conftest.err >&5
c0d27fcc 16185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16186 (exit $ac_status); } &&
8ae52ca6 16187 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
16188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16189 (eval $ac_try) 2>&5
16190 ac_status=$?
16191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16192 (exit $ac_status); }; } &&
16193 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16195 (eval $ac_try) 2>&5
16196 ac_status=$?
c0d27fcc 16197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16198 (exit $ac_status); }; }; then
16199 eval "$as_ac_var=yes"
16200else
16201 echo "$as_me: failed program was:" >&5
19650fd6
AS
16202sed 's/^/| /' conftest.$ac_ext >&5
16203
503d2be0
AS
16204eval "$as_ac_var=no"
16205fi
edfaf76d
LK
16206rm -f conftest.err conftest.$ac_objext \
16207 conftest$ac_exeext conftest.$ac_ext
503d2be0 16208fi
c0d27fcc 16209echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
16210echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16211if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16212 cat >>confdefs.h <<_ACEOF
503d2be0 16213#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16214_ACEOF
ba4481b5 16215
ba4481b5
DL
16216fi
16217done
16218
c0d27fcc 16219
98418dba
CW
16220# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
16221# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
16222# Irix 4.0.5F has the header but not the library.
16223if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
16224 ac_have_func=yes
16225
c0d27fcc 16226cat >>confdefs.h <<\_ACEOF
98418dba 16227#define SVR4 1
c0d27fcc 16228_ACEOF
98418dba
CW
16229
16230fi
16231
16232if test $ac_have_func = no; then
c0d27fcc
MR
16233 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
16234 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
16235echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
16236if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 16237 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16238fi
16239echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
16240echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 16241else
c0d27fcc
MR
16242 # Is the header compilable?
16243echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
16244echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
16245cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16246/* confdefs.h. */
16247_ACEOF
16248cat confdefs.h >>conftest.$ac_ext
16249cat >>conftest.$ac_ext <<_ACEOF
16250/* end confdefs.h. */
c0d27fcc
MR
16251$ac_includes_default
16252#include <inq_stats/cpustats.h>
16253_ACEOF
16254rm -f conftest.$ac_objext
16255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16256 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16257 ac_status=$?
edfaf76d
LK
16258 grep -v '^ *+' conftest.er1 >conftest.err
16259 rm -f conftest.er1
16260 cat conftest.err >&5
c0d27fcc
MR
16261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16262 (exit $ac_status); } &&
8ae52ca6 16263 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
16264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16265 (eval $ac_try) 2>&5
16266 ac_status=$?
16267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16268 (exit $ac_status); }; } &&
16269 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16271 (eval $ac_try) 2>&5
16272 ac_status=$?
16273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16274 (exit $ac_status); }; }; then
16275 ac_header_compiler=yes
16276else
16277 echo "$as_me: failed program was:" >&5
19650fd6
AS
16278sed 's/^/| /' conftest.$ac_ext >&5
16279
c0d27fcc
MR
16280ac_header_compiler=no
16281fi
edfaf76d 16282rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16283echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16284echo "${ECHO_T}$ac_header_compiler" >&6
16285
16286# Is the header present?
16287echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
16288echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
16289cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16290/* confdefs.h. */
16291_ACEOF
16292cat confdefs.h >>conftest.$ac_ext
16293cat >>conftest.$ac_ext <<_ACEOF
16294/* end confdefs.h. */
98418dba 16295#include <inq_stats/cpustats.h>
503d2be0 16296_ACEOF
c0d27fcc 16297if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16298 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16299 ac_status=$?
6bae0ccf 16300 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16301 rm -f conftest.er1
16302 cat conftest.err >&5
c0d27fcc 16303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16304 (exit $ac_status); } >/dev/null; then
16305 if test -s conftest.err; then
16306 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16307 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16308 else
16309 ac_cpp_err=
16310 fi
16311else
16312 ac_cpp_err=yes
16313fi
16314if test -z "$ac_cpp_err"; then
c0d27fcc 16315 ac_header_preproc=yes
503d2be0
AS
16316else
16317 echo "$as_me: failed program was:" >&5
19650fd6
AS
16318sed 's/^/| /' conftest.$ac_ext >&5
16319
c0d27fcc 16320 ac_header_preproc=no
ba4481b5 16321fi
503d2be0 16322rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16323echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16324echo "${ECHO_T}$ac_header_preproc" >&6
16325
16326# So? What about this header?
edfaf76d
LK
16327case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16328 yes:no: )
c0d27fcc
MR
16329 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16330echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16331 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
16332echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
16333 ac_header_preproc=yes
19650fd6 16334 ;;
edfaf76d 16335 no:yes:* )
c0d27fcc
MR
16336 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
16337echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16338 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
16339echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
16340 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
16341echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
16342 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16343echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16344 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16345echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16346 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
16347echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16348 (
16349 cat <<\_ASBOX
edfaf76d
LK
16350## ------------------------------------------ ##
16351## Report this to the AC_PACKAGE_NAME lists. ##
16352## ------------------------------------------ ##
19650fd6
AS
16353_ASBOX
16354 ) |
16355 sed "s/^/$as_me: WARNING: /" >&2
16356 ;;
c0d27fcc
MR
16357esac
16358echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
16359echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
16360if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
16361 echo $ECHO_N "(cached) $ECHO_C" >&6
16362else
16363 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 16364fi
c0d27fcc 16365echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 16366echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
16367
16368fi
98418dba
CW
16369if test $ac_cv_header_inq_stats_cpustats_h = yes; then
16370 ac_have_func=yes
ba4481b5 16371
c0d27fcc 16372cat >>confdefs.h <<\_ACEOF
98418dba 16373#define UMAX 1
c0d27fcc 16374_ACEOF
98418dba 16375
c0d27fcc
MR
16376
16377cat >>confdefs.h <<\_ACEOF
98418dba 16378#define UMAX4_3 1
c0d27fcc 16379_ACEOF
98418dba
CW
16380
16381fi
16382
c0d27fcc 16383
98418dba
CW
16384fi
16385
16386if test $ac_have_func = no; then
c0d27fcc
MR
16387 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16388 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
16389echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16390if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 16391 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16392fi
16393echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
16394echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 16395else
c0d27fcc
MR
16396 # Is the header compilable?
16397echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
16398echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
16399cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16400/* confdefs.h. */
16401_ACEOF
16402cat confdefs.h >>conftest.$ac_ext
16403cat >>conftest.$ac_ext <<_ACEOF
16404/* end confdefs.h. */
c0d27fcc
MR
16405$ac_includes_default
16406#include <sys/cpustats.h>
16407_ACEOF
16408rm -f conftest.$ac_objext
16409if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16410 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16411 ac_status=$?
edfaf76d
LK
16412 grep -v '^ *+' conftest.er1 >conftest.err
16413 rm -f conftest.er1
16414 cat conftest.err >&5
c0d27fcc
MR
16415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16416 (exit $ac_status); } &&
8ae52ca6 16417 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
16418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16419 (eval $ac_try) 2>&5
16420 ac_status=$?
16421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16422 (exit $ac_status); }; } &&
16423 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16425 (eval $ac_try) 2>&5
16426 ac_status=$?
16427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16428 (exit $ac_status); }; }; then
16429 ac_header_compiler=yes
16430else
16431 echo "$as_me: failed program was:" >&5
19650fd6
AS
16432sed 's/^/| /' conftest.$ac_ext >&5
16433
c0d27fcc
MR
16434ac_header_compiler=no
16435fi
edfaf76d 16436rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16437echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16438echo "${ECHO_T}$ac_header_compiler" >&6
16439
16440# Is the header present?
16441echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
16442echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
16443cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16444/* confdefs.h. */
16445_ACEOF
16446cat confdefs.h >>conftest.$ac_ext
16447cat >>conftest.$ac_ext <<_ACEOF
16448/* end confdefs.h. */
98418dba
CW
16449#include <sys/cpustats.h>
16450_ACEOF
c0d27fcc 16451if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
16452 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16453 ac_status=$?
6bae0ccf 16454 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16455 rm -f conftest.er1
16456 cat conftest.err >&5
c0d27fcc 16457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16458 (exit $ac_status); } >/dev/null; then
16459 if test -s conftest.err; then
16460 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16461 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16462 else
16463 ac_cpp_err=
16464 fi
16465else
16466 ac_cpp_err=yes
503d2be0 16467fi
98418dba 16468if test -z "$ac_cpp_err"; then
c0d27fcc 16469 ac_header_preproc=yes
98418dba
CW
16470else
16471 echo "$as_me: failed program was:" >&5
19650fd6
AS
16472sed 's/^/| /' conftest.$ac_ext >&5
16473
c0d27fcc 16474 ac_header_preproc=no
98418dba
CW
16475fi
16476rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16477echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16478echo "${ECHO_T}$ac_header_preproc" >&6
16479
16480# So? What about this header?
edfaf76d
LK
16481case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16482 yes:no: )
c0d27fcc
MR
16483 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16484echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16485 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
16486echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
16487 ac_header_preproc=yes
19650fd6 16488 ;;
edfaf76d 16489 no:yes:* )
c0d27fcc
MR
16490 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
16491echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16492 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
16493echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
16494 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
16495echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
16496 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16497echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16498 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16499echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16500 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
16501echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16502 (
16503 cat <<\_ASBOX
edfaf76d
LK
16504## ------------------------------------------ ##
16505## Report this to the AC_PACKAGE_NAME lists. ##
16506## ------------------------------------------ ##
19650fd6
AS
16507_ASBOX
16508 ) |
16509 sed "s/^/$as_me: WARNING: /" >&2
16510 ;;
c0d27fcc
MR
16511esac
16512echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
16513echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16514if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16515 echo $ECHO_N "(cached) $ECHO_C" >&6
16516else
16517 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 16518fi
c0d27fcc 16519echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 16520echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
16521
16522fi
98418dba 16523if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 16524 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 16525#define UMAX 1
c0d27fcc 16526_ACEOF
ba4481b5 16527
98418dba
CW
16528fi
16529
c0d27fcc 16530
98418dba
CW
16531fi
16532
16533if test $ac_have_func = no; then
16534
16535for ac_header in mach/mach.h
2c9dccc9
PJ
16536do
16537as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16538if eval "test \"\${$as_ac_Header+set}\" = set"; then
16539 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
16540echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16541if eval "test \"\${$as_ac_Header+set}\" = set"; then
16542 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16543fi
16544echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16545echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16546else
c0d27fcc
MR
16547 # Is the header compilable?
16548echo "$as_me:$LINENO: checking $ac_header usability" >&5
16549echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16550cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16551/* confdefs.h. */
16552_ACEOF
16553cat confdefs.h >>conftest.$ac_ext
16554cat >>conftest.$ac_ext <<_ACEOF
16555/* end confdefs.h. */
c0d27fcc
MR
16556$ac_includes_default
16557#include <$ac_header>
16558_ACEOF
16559rm -f conftest.$ac_objext
16560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16561 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16562 ac_status=$?
edfaf76d
LK
16563 grep -v '^ *+' conftest.er1 >conftest.err
16564 rm -f conftest.er1
16565 cat conftest.err >&5
c0d27fcc
MR
16566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16567 (exit $ac_status); } &&
8ae52ca6 16568 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
16569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16570 (eval $ac_try) 2>&5
16571 ac_status=$?
16572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16573 (exit $ac_status); }; } &&
16574 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16576 (eval $ac_try) 2>&5
16577 ac_status=$?
16578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16579 (exit $ac_status); }; }; then
16580 ac_header_compiler=yes
16581else
16582 echo "$as_me: failed program was:" >&5
19650fd6
AS
16583sed 's/^/| /' conftest.$ac_ext >&5
16584
c0d27fcc
MR
16585ac_header_compiler=no
16586fi
edfaf76d 16587rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16588echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16589echo "${ECHO_T}$ac_header_compiler" >&6
16590
16591# Is the header present?
16592echo "$as_me:$LINENO: checking $ac_header presence" >&5
16593echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16594cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16595/* confdefs.h. */
16596_ACEOF
16597cat confdefs.h >>conftest.$ac_ext
16598cat >>conftest.$ac_ext <<_ACEOF
16599/* end confdefs.h. */
2c9dccc9
PJ
16600#include <$ac_header>
16601_ACEOF
c0d27fcc 16602if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
16603 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16604 ac_status=$?
6bae0ccf 16605 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
16606 rm -f conftest.er1
16607 cat conftest.err >&5
c0d27fcc 16608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
16609 (exit $ac_status); } >/dev/null; then
16610 if test -s conftest.err; then
16611 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16612 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2c9dccc9
PJ
16613 else
16614 ac_cpp_err=
16615 fi
16616else
16617 ac_cpp_err=yes
16618fi
16619if test -z "$ac_cpp_err"; then
c0d27fcc
MR
16620 ac_header_preproc=yes
16621else
16622 echo "$as_me: failed program was:" >&5
19650fd6
AS
16623sed 's/^/| /' conftest.$ac_ext >&5
16624
c0d27fcc
MR
16625 ac_header_preproc=no
16626fi
16627rm -f conftest.err conftest.$ac_ext
16628echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16629echo "${ECHO_T}$ac_header_preproc" >&6
16630
16631# So? What about this header?
edfaf76d
LK
16632case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16633 yes:no: )
c0d27fcc
MR
16634 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16635echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16636 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16637echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16638 ac_header_preproc=yes
19650fd6 16639 ;;
edfaf76d 16640 no:yes:* )
c0d27fcc
MR
16641 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16642echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16643 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16644echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16645 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16646echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16647 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16648echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16649 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16650echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16651 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16652echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16653 (
16654 cat <<\_ASBOX
edfaf76d
LK
16655## ------------------------------------------ ##
16656## Report this to the AC_PACKAGE_NAME lists. ##
16657## ------------------------------------------ ##
19650fd6
AS
16658_ASBOX
16659 ) |
16660 sed "s/^/$as_me: WARNING: /" >&2
16661 ;;
c0d27fcc
MR
16662esac
16663echo "$as_me:$LINENO: checking for $ac_header" >&5
16664echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16665if eval "test \"\${$as_ac_Header+set}\" = set"; then
16666 echo $ECHO_N "(cached) $ECHO_C" >&6
16667else
edfaf76d 16668 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc
MR
16669fi
16670echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16671echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16672
16673fi
16674if test `eval echo '${'$as_ac_Header'}'` = yes; then
16675 cat >>confdefs.h <<_ACEOF
16676#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16677_ACEOF
16678
16679fi
16680
16681done
16682
16683fi
16684
16685
16686for ac_header in nlist.h
16687do
16688as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16689if eval "test \"\${$as_ac_Header+set}\" = set"; then
16690 echo "$as_me:$LINENO: checking for $ac_header" >&5
16691echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16692if eval "test \"\${$as_ac_Header+set}\" = set"; then
16693 echo $ECHO_N "(cached) $ECHO_C" >&6
16694fi
16695echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16696echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16697else
16698 # Is the header compilable?
16699echo "$as_me:$LINENO: checking $ac_header usability" >&5
16700echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16701cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16702/* confdefs.h. */
16703_ACEOF
16704cat confdefs.h >>conftest.$ac_ext
16705cat >>conftest.$ac_ext <<_ACEOF
16706/* end confdefs.h. */
c0d27fcc
MR
16707$ac_includes_default
16708#include <$ac_header>
16709_ACEOF
16710rm -f conftest.$ac_objext
16711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16712 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16713 ac_status=$?
edfaf76d
LK
16714 grep -v '^ *+' conftest.er1 >conftest.err
16715 rm -f conftest.er1
16716 cat conftest.err >&5
c0d27fcc
MR
16717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16718 (exit $ac_status); } &&
8ae52ca6 16719 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
16720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16721 (eval $ac_try) 2>&5
16722 ac_status=$?
16723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16724 (exit $ac_status); }; } &&
16725 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16727 (eval $ac_try) 2>&5
16728 ac_status=$?
16729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16730 (exit $ac_status); }; }; then
16731 ac_header_compiler=yes
2c9dccc9
PJ
16732else
16733 echo "$as_me: failed program was:" >&5
19650fd6
AS
16734sed 's/^/| /' conftest.$ac_ext >&5
16735
c0d27fcc 16736ac_header_compiler=no
98418dba 16737fi
edfaf76d 16738rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16739echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16740echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 16741
c0d27fcc
MR
16742# Is the header present?
16743echo "$as_me:$LINENO: checking $ac_header presence" >&5
16744echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16745cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16746/* confdefs.h. */
16747_ACEOF
16748cat confdefs.h >>conftest.$ac_ext
16749cat >>conftest.$ac_ext <<_ACEOF
16750/* end confdefs.h. */
503d2be0
AS
16751#include <$ac_header>
16752_ACEOF
c0d27fcc 16753if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16754 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16755 ac_status=$?
6bae0ccf 16756 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16757 rm -f conftest.er1
16758 cat conftest.err >&5
c0d27fcc 16759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16760 (exit $ac_status); } >/dev/null; then
16761 if test -s conftest.err; then
16762 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16763 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16764 else
16765 ac_cpp_err=
16766 fi
16767else
16768 ac_cpp_err=yes
16769fi
16770if test -z "$ac_cpp_err"; then
c0d27fcc 16771 ac_header_preproc=yes
503d2be0
AS
16772else
16773 echo "$as_me: failed program was:" >&5
19650fd6
AS
16774sed 's/^/| /' conftest.$ac_ext >&5
16775
c0d27fcc 16776 ac_header_preproc=no
b5de8dc0 16777fi
503d2be0 16778rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16779echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16780echo "${ECHO_T}$ac_header_preproc" >&6
16781
16782# So? What about this header?
edfaf76d
LK
16783case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16784 yes:no: )
c0d27fcc
MR
16785 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16786echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16787 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16788echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16789 ac_header_preproc=yes
19650fd6 16790 ;;
edfaf76d 16791 no:yes:* )
c0d27fcc
MR
16792 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16793echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16794 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16795echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16796 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16797echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16798 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16799echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16800 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16801echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16802 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16803echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16804 (
16805 cat <<\_ASBOX
edfaf76d
LK
16806## ------------------------------------------ ##
16807## Report this to the AC_PACKAGE_NAME lists. ##
16808## ------------------------------------------ ##
19650fd6
AS
16809_ASBOX
16810 ) |
16811 sed "s/^/$as_me: WARNING: /" >&2
16812 ;;
c0d27fcc
MR
16813esac
16814echo "$as_me:$LINENO: checking for $ac_header" >&5
16815echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16816if eval "test \"\${$as_ac_Header+set}\" = set"; then
16817 echo $ECHO_N "(cached) $ECHO_C" >&6
16818else
edfaf76d 16819 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 16820fi
c0d27fcc 16821echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16822echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16823
16824fi
98418dba 16825if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16826 cat >>confdefs.h <<_ACEOF
98418dba 16827#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
16828_ACEOF
16829 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
16830echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
16831if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 16832 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 16833else
503d2be0 16834 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16835/* confdefs.h. */
16836_ACEOF
16837cat confdefs.h >>conftest.$ac_ext
16838cat >>conftest.$ac_ext <<_ACEOF
16839/* end confdefs.h. */
98418dba 16840#include <nlist.h>
b5de8dc0 16841
503d2be0
AS
16842int
16843main ()
16844{
98418dba
CW
16845static struct nlist ac_aggr;
16846if (ac_aggr.n_un.n_name)
16847return 0;
503d2be0
AS
16848 ;
16849 return 0;
16850}
16851_ACEOF
98418dba 16852rm -f conftest.$ac_objext
c0d27fcc 16853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16854 (eval $ac_compile) 2>conftest.er1
503d2be0 16855 ac_status=$?
edfaf76d
LK
16856 grep -v '^ *+' conftest.er1 >conftest.err
16857 rm -f conftest.er1
16858 cat conftest.err >&5
c0d27fcc 16859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16860 (exit $ac_status); } &&
8ae52ca6 16861 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
c0d27fcc 16862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16863 (eval $ac_try) 2>&5
16864 ac_status=$?
c0d27fcc 16865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
16866 (exit $ac_status); }; } &&
16867 { ac_try='test -s conftest.$ac_objext'
16868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16869 (eval $ac_try) 2>&5
16870 ac_status=$?
16871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16872 (exit $ac_status); }; }; then
16873 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
16874else
16875 echo "$as_me: failed program was:" >&5
19650fd6
AS
16876sed 's/^/| /' conftest.$ac_ext >&5
16877
6bae0ccf 16878cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16879/* confdefs.h. */
16880_ACEOF
16881cat confdefs.h >>conftest.$ac_ext
16882cat >>conftest.$ac_ext <<_ACEOF
16883/* end confdefs.h. */
6bae0ccf
DL
16884#include <nlist.h>
16885
16886int
16887main ()
16888{
16889static struct nlist ac_aggr;
16890if (sizeof ac_aggr.n_un.n_name)
16891return 0;
16892 ;
16893 return 0;
16894}
16895_ACEOF
16896rm -f conftest.$ac_objext
16897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16898 (eval $ac_compile) 2>conftest.er1
6bae0ccf 16899 ac_status=$?
edfaf76d
LK
16900 grep -v '^ *+' conftest.er1 >conftest.err
16901 rm -f conftest.er1
16902 cat conftest.err >&5
6bae0ccf
DL
16903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16904 (exit $ac_status); } &&
8ae52ca6 16905 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
16906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16907 (eval $ac_try) 2>&5
16908 ac_status=$?
16909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16910 (exit $ac_status); }; } &&
16911 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
16912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16913 (eval $ac_try) 2>&5
16914 ac_status=$?
16915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16916 (exit $ac_status); }; }; then
16917 ac_cv_member_struct_nlist_n_un_n_name=yes
16918else
16919 echo "$as_me: failed program was:" >&5
19650fd6
AS
16920sed 's/^/| /' conftest.$ac_ext >&5
16921
98418dba 16922ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 16923fi
edfaf76d 16924rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 16925fi
edfaf76d 16926rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 16927fi
c0d27fcc 16928echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
16929echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
16930if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 16931
c0d27fcc 16932cat >>confdefs.h <<_ACEOF
98418dba 16933#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 16934_ACEOF
b5de8dc0 16935
c0d27fcc
MR
16936
16937cat >>confdefs.h <<\_ACEOF
98418dba 16938#define NLIST_NAME_UNION 1
c0d27fcc 16939_ACEOF
b5de8dc0 16940
98418dba 16941fi
b5de8dc0 16942
c0d27fcc 16943
98418dba 16944fi
c0d27fcc 16945
98418dba 16946done
b5de8dc0 16947
98418dba
CW
16948fi
16949done
b5de8dc0 16950
c0d27fcc 16951
98418dba 16952# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 16953echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
16954echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
16955if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
16956 echo $ECHO_N "(cached) $ECHO_C" >&6
16957else
16958 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16959/* confdefs.h. */
16960_ACEOF
16961cat confdefs.h >>conftest.$ac_ext
16962cat >>conftest.$ac_ext <<_ACEOF
16963/* end confdefs.h. */
6bae0ccf 16964#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
16965#ifdef LDAV_PRIVILEGED
16966Yowza Am I SETGID yet
16967#endif
16968_ACEOF
16969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 16970 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
16971 ac_cv_func_getloadavg_setgid=yes
16972else
16973 ac_cv_func_getloadavg_setgid=no
16974fi
16975rm -f conftest*
b5de8dc0 16976
98418dba 16977fi
c0d27fcc 16978echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
16979echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
16980if test $ac_cv_func_getloadavg_setgid = yes; then
16981 NEED_SETGID=true
b5de8dc0 16982
c0d27fcc 16983cat >>confdefs.h <<\_ACEOF
98418dba 16984#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 16985_ACEOF
98418dba 16986
b5de8dc0 16987else
98418dba 16988 NEED_SETGID=false
b5de8dc0 16989fi
98418dba
CW
16990
16991if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 16992 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
16993echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
16994if test "${ac_cv_group_kmem+set}" = set; then
16995 echo $ECHO_N "(cached) $ECHO_C" >&6
16996else
16997 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
16998 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
16999 # If we got an error (system does not support symlinks), try without -L.
17000 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
17001 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 17002 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
17003 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
17004 / /s/.* //;p;'`
17005
b5de8dc0 17006fi
c0d27fcc 17007echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
17008echo "${ECHO_T}$ac_cv_group_kmem" >&6
17009 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 17010fi
98418dba
CW
17011if test "x$ac_save_LIBS" = x; then
17012 GETLOADAVG_LIBS=$LIBS
17013else
17014 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 17015fi
98418dba 17016LIBS=$ac_save_LIBS
b5de8dc0 17017
c0d27fcc
MR
17018
17019
17020echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
17021echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
17022if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 17023 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17024else
b936fae4
AS
17025 while :; do
17026 ac_cv_sys_largefile_source=no
503d2be0 17027 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17028/* confdefs.h. */
17029_ACEOF
17030cat confdefs.h >>conftest.$ac_ext
17031cat >>conftest.$ac_ext <<_ACEOF
17032/* end confdefs.h. */
b936fae4 17033#include <stdio.h>
503d2be0
AS
17034int
17035main ()
17036{
b936fae4
AS
17037return !fseeko;
17038 ;
17039 return 0;
17040}
17041_ACEOF
17042rm -f conftest.$ac_objext
c0d27fcc 17043if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17044 (eval $ac_compile) 2>conftest.er1
b936fae4 17045 ac_status=$?
edfaf76d
LK
17046 grep -v '^ *+' conftest.er1 >conftest.err
17047 rm -f conftest.er1
17048 cat conftest.err >&5
c0d27fcc 17049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 17050 (exit $ac_status); } &&
8ae52ca6 17051 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
17052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17053 (eval $ac_try) 2>&5
17054 ac_status=$?
17055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17056 (exit $ac_status); }; } &&
17057 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 17058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
17059 (eval $ac_try) 2>&5
17060 ac_status=$?
c0d27fcc 17061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
17062 (exit $ac_status); }; }; then
17063 break
17064else
17065 echo "$as_me: failed program was:" >&5
19650fd6
AS
17066sed 's/^/| /' conftest.$ac_ext >&5
17067
b936fae4 17068fi
edfaf76d 17069rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4 17070 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17071/* confdefs.h. */
17072_ACEOF
17073cat confdefs.h >>conftest.$ac_ext
17074cat >>conftest.$ac_ext <<_ACEOF
17075/* end confdefs.h. */
b936fae4
AS
17076#define _LARGEFILE_SOURCE 1
17077#include <stdio.h>
b936fae4
AS
17078int
17079main ()
17080{
17081return !fseeko;
17082 ;
17083 return 0;
17084}
17085_ACEOF
17086rm -f conftest.$ac_objext
c0d27fcc 17087if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17088 (eval $ac_compile) 2>conftest.er1
b936fae4 17089 ac_status=$?
edfaf76d
LK
17090 grep -v '^ *+' conftest.er1 >conftest.err
17091 rm -f conftest.er1
17092 cat conftest.err >&5
c0d27fcc 17093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 17094 (exit $ac_status); } &&
8ae52ca6 17095 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
17096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17097 (eval $ac_try) 2>&5
17098 ac_status=$?
17099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17100 (exit $ac_status); }; } &&
17101 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 17102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
17103 (eval $ac_try) 2>&5
17104 ac_status=$?
c0d27fcc 17105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
17106 (exit $ac_status); }; }; then
17107 ac_cv_sys_largefile_source=1; break
17108else
17109 echo "$as_me: failed program was:" >&5
19650fd6
AS
17110sed 's/^/| /' conftest.$ac_ext >&5
17111
b936fae4 17112fi
edfaf76d 17113rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4
AS
17114 break
17115done
17116fi
c0d27fcc 17117echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
17118echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
17119if test "$ac_cv_sys_largefile_source" != no; then
17120
c0d27fcc 17121cat >>confdefs.h <<_ACEOF
b936fae4 17122#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 17123_ACEOF
b936fae4
AS
17124
17125fi
17126rm -f conftest*
4c343001 17127
b936fae4
AS
17128# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
17129# in glibc 2.1.3, but that breaks too many other things.
17130# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 17131echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
17132echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
17133if test "${ac_cv_func_fseeko+set}" = set; then
17134 echo $ECHO_N "(cached) $ECHO_C" >&6
17135else
17136 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17137/* confdefs.h. */
17138_ACEOF
17139cat confdefs.h >>conftest.$ac_ext
17140cat >>conftest.$ac_ext <<_ACEOF
17141/* end confdefs.h. */
b936fae4 17142#include <stdio.h>
b936fae4
AS
17143int
17144main ()
17145{
17146return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
17147 ;
17148 return 0;
17149}
17150_ACEOF
17151rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17152if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17153 (eval $ac_link) 2>conftest.er1
503d2be0 17154 ac_status=$?
edfaf76d
LK
17155 grep -v '^ *+' conftest.er1 >conftest.err
17156 rm -f conftest.er1
17157 cat conftest.err >&5
c0d27fcc 17158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17159 (exit $ac_status); } &&
8ae52ca6 17160 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
17161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17162 (eval $ac_try) 2>&5
17163 ac_status=$?
17164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17165 (exit $ac_status); }; } &&
17166 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17168 (eval $ac_try) 2>&5
17169 ac_status=$?
c0d27fcc 17170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17171 (exit $ac_status); }; }; then
b936fae4 17172 ac_cv_func_fseeko=yes
503d2be0
AS
17173else
17174 echo "$as_me: failed program was:" >&5
19650fd6
AS
17175sed 's/^/| /' conftest.$ac_ext >&5
17176
b936fae4 17177ac_cv_func_fseeko=no
503d2be0 17178fi
edfaf76d
LK
17179rm -f conftest.err conftest.$ac_objext \
17180 conftest$ac_exeext conftest.$ac_ext
503d2be0 17181fi
c0d27fcc 17182echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
17183echo "${ECHO_T}$ac_cv_func_fseeko" >&6
17184if test $ac_cv_func_fseeko = yes; then
17185
c0d27fcc 17186cat >>confdefs.h <<\_ACEOF
b936fae4 17187#define HAVE_FSEEKO 1
c0d27fcc 17188_ACEOF
b936fae4 17189
4c343001
DL
17190fi
17191
c0d27fcc 17192
52dbaac8
PE
17193# Configure getopt.
17194# getopt.m4 serial 10
17195
17196# The getopt module assume you want GNU getopt, with getopt_long etc,
17197# rather than vanilla POSIX getopt. This means your your code should
17198# always include <getopt.h> for the getopt prototypes.
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210# Prerequisites of lib/getopt*.
17211
17212
17213
10a3b1a1 17214
52dbaac8
PE
17215 GETOPT_H=
17216
17217for ac_header in getopt.h
17218do
17219as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17220if eval "test \"\${$as_ac_Header+set}\" = set"; then
17221 echo "$as_me:$LINENO: checking for $ac_header" >&5
17222echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17223if eval "test \"\${$as_ac_Header+set}\" = set"; then
17224 echo $ECHO_N "(cached) $ECHO_C" >&6
17225fi
17226echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17227echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17228else
17229 # Is the header compilable?
17230echo "$as_me:$LINENO: checking $ac_header usability" >&5
17231echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17232cat >conftest.$ac_ext <<_ACEOF
17233/* confdefs.h. */
17234_ACEOF
17235cat confdefs.h >>conftest.$ac_ext
17236cat >>conftest.$ac_ext <<_ACEOF
17237/* end confdefs.h. */
17238$ac_includes_default
17239#include <$ac_header>
17240_ACEOF
17241rm -f conftest.$ac_objext
17242if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17243 (eval $ac_compile) 2>conftest.er1
17244 ac_status=$?
17245 grep -v '^ *+' conftest.er1 >conftest.err
17246 rm -f conftest.er1
17247 cat conftest.err >&5
17248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17249 (exit $ac_status); } &&
8ae52ca6 17250 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
52dbaac8
PE
17251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17252 (eval $ac_try) 2>&5
17253 ac_status=$?
17254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17255 (exit $ac_status); }; } &&
17256 { ac_try='test -s conftest.$ac_objext'
17257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17258 (eval $ac_try) 2>&5
17259 ac_status=$?
17260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17261 (exit $ac_status); }; }; then
17262 ac_header_compiler=yes
17263else
17264 echo "$as_me: failed program was:" >&5
17265sed 's/^/| /' conftest.$ac_ext >&5
17266
17267ac_header_compiler=no
17268fi
17269rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17270echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17271echo "${ECHO_T}$ac_header_compiler" >&6
17272
17273# Is the header present?
17274echo "$as_me:$LINENO: checking $ac_header presence" >&5
17275echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17276cat >conftest.$ac_ext <<_ACEOF
17277/* confdefs.h. */
17278_ACEOF
17279cat confdefs.h >>conftest.$ac_ext
17280cat >>conftest.$ac_ext <<_ACEOF
17281/* end confdefs.h. */
17282#include <$ac_header>
17283_ACEOF
17284if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17285 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17286 ac_status=$?
17287 grep -v '^ *+' conftest.er1 >conftest.err
17288 rm -f conftest.er1
17289 cat conftest.err >&5
17290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17291 (exit $ac_status); } >/dev/null; then
17292 if test -s conftest.err; then
17293 ac_cpp_err=$ac_c_preproc_warn_flag
17294 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17295 else
17296 ac_cpp_err=
17297 fi
17298else
17299 ac_cpp_err=yes
17300fi
17301if test -z "$ac_cpp_err"; then
17302 ac_header_preproc=yes
17303else
17304 echo "$as_me: failed program was:" >&5
17305sed 's/^/| /' conftest.$ac_ext >&5
17306
17307 ac_header_preproc=no
17308fi
17309rm -f conftest.err conftest.$ac_ext
17310echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17311echo "${ECHO_T}$ac_header_preproc" >&6
17312
17313# So? What about this header?
17314case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17315 yes:no: )
17316 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17317echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17318 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17319echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17320 ac_header_preproc=yes
17321 ;;
17322 no:yes:* )
17323 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17324echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17325 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17326echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17327 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17328echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17329 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17330echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
17331 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17332echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17333 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17334echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17335 (
17336 cat <<\_ASBOX
17337## ------------------------------------------ ##
17338## Report this to the AC_PACKAGE_NAME lists. ##
17339## ------------------------------------------ ##
17340_ASBOX
17341 ) |
17342 sed "s/^/$as_me: WARNING: /" >&2
17343 ;;
17344esac
17345echo "$as_me:$LINENO: checking for $ac_header" >&5
17346echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17347if eval "test \"\${$as_ac_Header+set}\" = set"; then
17348 echo $ECHO_N "(cached) $ECHO_C" >&6
17349else
17350 eval "$as_ac_Header=\$ac_header_preproc"
17351fi
17352echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17353echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17354
17355fi
17356if test `eval echo '${'$as_ac_Header'}'` = yes; then
17357 cat >>confdefs.h <<_ACEOF
17358#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17359_ACEOF
17360
17361else
17362 GETOPT_H=getopt.h
17363fi
17364
17365done
17366
17367 if test -z "$GETOPT_H"; then
17368
17369for ac_func in getopt_long_only
17370do
17371as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17372echo "$as_me:$LINENO: checking for $ac_func" >&5
17373echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17374if eval "test \"\${$as_ac_var+set}\" = set"; then
17375 echo $ECHO_N "(cached) $ECHO_C" >&6
17376else
17377 cat >conftest.$ac_ext <<_ACEOF
17378/* confdefs.h. */
17379_ACEOF
17380cat confdefs.h >>conftest.$ac_ext
17381cat >>conftest.$ac_ext <<_ACEOF
17382/* end confdefs.h. */
17383/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17384 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17385#define $ac_func innocuous_$ac_func
17386
17387/* System header to define __stub macros and hopefully few prototypes,
17388 which can conflict with char $ac_func (); below.
17389 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17390 <limits.h> exists even on freestanding compilers. */
17391
17392#ifdef __STDC__
17393# include <limits.h>
17394#else
17395# include <assert.h>
17396#endif
17397
17398#undef $ac_func
17399
17400/* Override any gcc2 internal prototype to avoid an error. */
17401#ifdef __cplusplus
17402extern "C"
17403{
17404#endif
17405/* We use char because int might match the return type of a gcc2
17406 builtin and then its argument prototype would still apply. */
17407char $ac_func ();
17408/* The GNU C library defines this for functions which it implements
17409 to always fail with ENOSYS. Some functions are actually named
17410 something starting with __ and the normal name is an alias. */
17411#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17412choke me
17413#else
17414char (*f) () = $ac_func;
17415#endif
17416#ifdef __cplusplus
17417}
17418#endif
17419
17420int
17421main ()
17422{
17423return f != $ac_func;
17424 ;
17425 return 0;
17426}
17427_ACEOF
17428rm -f conftest.$ac_objext conftest$ac_exeext
17429if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17430 (eval $ac_link) 2>conftest.er1
17431 ac_status=$?
17432 grep -v '^ *+' conftest.er1 >conftest.err
17433 rm -f conftest.er1
17434 cat conftest.err >&5
17435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17436 (exit $ac_status); } &&
8ae52ca6 17437 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
52dbaac8
PE
17438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17439 (eval $ac_try) 2>&5
17440 ac_status=$?
17441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17442 (exit $ac_status); }; } &&
17443 { ac_try='test -s conftest$ac_exeext'
17444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17445 (eval $ac_try) 2>&5
17446 ac_status=$?
17447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17448 (exit $ac_status); }; }; then
17449 eval "$as_ac_var=yes"
17450else
17451 echo "$as_me: failed program was:" >&5
17452sed 's/^/| /' conftest.$ac_ext >&5
17453
17454eval "$as_ac_var=no"
17455fi
17456rm -f conftest.err conftest.$ac_objext \
17457 conftest$ac_exeext conftest.$ac_ext
17458fi
17459echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17460echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17461if test `eval echo '${'$as_ac_var'}'` = yes; then
17462 cat >>confdefs.h <<_ACEOF
17463#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17464_ACEOF
17465
17466else
17467 GETOPT_H=getopt.h
17468fi
17469done
17470
17471 fi
17472
17473 if test -z "$GETOPT_H"; then
17474 echo "$as_me:$LINENO: checking whether optreset is declared" >&5
17475echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6
17476if test "${ac_cv_have_decl_optreset+set}" = set; then
17477 echo $ECHO_N "(cached) $ECHO_C" >&6
17478else
17479 cat >conftest.$ac_ext <<_ACEOF
17480/* confdefs.h. */
17481_ACEOF
17482cat confdefs.h >>conftest.$ac_ext
17483cat >>conftest.$ac_ext <<_ACEOF
17484/* end confdefs.h. */
17485#include <getopt.h>
17486
17487int
17488main ()
17489{
17490#ifndef optreset
17491 char *p = (char *) optreset;
17492#endif
17493
17494 ;
17495 return 0;
17496}
17497_ACEOF
17498rm -f conftest.$ac_objext
17499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17500 (eval $ac_compile) 2>conftest.er1
17501 ac_status=$?
17502 grep -v '^ *+' conftest.er1 >conftest.err
17503 rm -f conftest.er1
17504 cat conftest.err >&5
17505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17506 (exit $ac_status); } &&
8ae52ca6 17507 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
52dbaac8
PE
17508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17509 (eval $ac_try) 2>&5
17510 ac_status=$?
17511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17512 (exit $ac_status); }; } &&
17513 { ac_try='test -s conftest.$ac_objext'
17514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17515 (eval $ac_try) 2>&5
17516 ac_status=$?
17517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17518 (exit $ac_status); }; }; then
17519 ac_cv_have_decl_optreset=yes
17520else
17521 echo "$as_me: failed program was:" >&5
17522sed 's/^/| /' conftest.$ac_ext >&5
17523
17524ac_cv_have_decl_optreset=no
17525fi
17526rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17527fi
17528echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
17529echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6
17530if test $ac_cv_have_decl_optreset = yes; then
17531 GETOPT_H=getopt.h
17532fi
17533
17534 fi
17535
17536 if test -z "$GETOPT_H"; then
17537 echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
17538echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6
17539if test "${gl_cv_func_gnu_getopt+set}" = set; then
17540 echo $ECHO_N "(cached) $ECHO_C" >&6
17541else
17542 if test "$cross_compiling" = yes; then
17543 echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
17544echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6
17545if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
17546 echo $ECHO_N "(cached) $ECHO_C" >&6
17547else
17548 cat >conftest.$ac_ext <<_ACEOF
17549/* confdefs.h. */
17550_ACEOF
17551cat confdefs.h >>conftest.$ac_ext
17552cat >>conftest.$ac_ext <<_ACEOF
17553/* end confdefs.h. */
17554#include <getopt.h>
17555
17556int
17557main ()
17558{
17559#ifndef getopt_clip
17560 char *p = (char *) getopt_clip;
17561#endif
17562
17563 ;
17564 return 0;
17565}
17566_ACEOF
17567rm -f conftest.$ac_objext
17568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17569 (eval $ac_compile) 2>conftest.er1
17570 ac_status=$?
17571 grep -v '^ *+' conftest.er1 >conftest.err
17572 rm -f conftest.er1
17573 cat conftest.err >&5
17574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17575 (exit $ac_status); } &&
8ae52ca6 17576 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
52dbaac8
PE
17577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17578 (eval $ac_try) 2>&5
17579 ac_status=$?
17580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17581 (exit $ac_status); }; } &&
17582 { ac_try='test -s conftest.$ac_objext'
17583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17584 (eval $ac_try) 2>&5
17585 ac_status=$?
17586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17587 (exit $ac_status); }; }; then
17588 ac_cv_have_decl_getopt_clip=yes
17589else
17590 echo "$as_me: failed program was:" >&5
17591sed 's/^/| /' conftest.$ac_ext >&5
17592
17593ac_cv_have_decl_getopt_clip=no
17594fi
17595rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17596fi
17597echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
17598echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6
17599if test $ac_cv_have_decl_getopt_clip = yes; then
17600 gl_cv_func_gnu_getopt=no
17601else
17602 gl_cv_func_gnu_getopt=yes
17603fi
17604
17605else
17606 cat >conftest.$ac_ext <<_ACEOF
17607/* confdefs.h. */
17608_ACEOF
17609cat confdefs.h >>conftest.$ac_ext
17610cat >>conftest.$ac_ext <<_ACEOF
17611/* end confdefs.h. */
17612#include <getopt.h>
17613int
17614main ()
17615{
17616
17617 char *myargv[3];
17618 myargv[0] = "conftest";
17619 myargv[1] = "-+";
17620 myargv[2] = 0;
17621 return getopt (2, myargv, "+a") != '?';
17622
17623 ;
17624 return 0;
17625}
17626_ACEOF
17627rm -f conftest$ac_exeext
17628if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17629 (eval $ac_link) 2>&5
17630 ac_status=$?
17631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17632 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17634 (eval $ac_try) 2>&5
17635 ac_status=$?
17636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17637 (exit $ac_status); }; }; then
17638 gl_cv_func_gnu_getopt=yes
17639else
17640 echo "$as_me: program exited with status $ac_status" >&5
17641echo "$as_me: failed program was:" >&5
17642sed 's/^/| /' conftest.$ac_ext >&5
17643
17644( exit $ac_status )
17645gl_cv_func_gnu_getopt=no
17646fi
17647rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17648fi
17649fi
17650echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
17651echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6
17652 if test "$gl_cv_func_gnu_getopt" = "no"; then
17653 GETOPT_H=getopt.h
17654 fi
17655 fi
17656
17657
17658
17659 if test -n "$GETOPT_H"; then
17660
17661
17662 GETOPT_H=getopt.h
17663
17664cat >>confdefs.h <<\_ACEOF
17665#define __GETOPT_PREFIX rpl_
17666_ACEOF
17667
17668
17669
17670 :
17671 GETOPTOBJS='getopt.o getopt1.o'
17672
17673fi
17674
17675
17676
17677
cd958eb3
MB
17678echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
17679echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
17680if test "${ac_cv_func_getpgrp_void+set}" = set; then
17681 echo $ECHO_N "(cached) $ECHO_C" >&6
17682else
17683 # Use it with a single arg.
17684cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17685/* confdefs.h. */
17686_ACEOF
17687cat confdefs.h >>conftest.$ac_ext
17688cat >>conftest.$ac_ext <<_ACEOF
17689/* end confdefs.h. */
cd958eb3
MB
17690$ac_includes_default
17691int
17692main ()
17693{
17694getpgrp (0);
17695 ;
17696 return 0;
17697}
17698_ACEOF
17699rm -f conftest.$ac_objext
17700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17701 (eval $ac_compile) 2>conftest.er1
cd958eb3 17702 ac_status=$?
edfaf76d
LK
17703 grep -v '^ *+' conftest.er1 >conftest.err
17704 rm -f conftest.er1
17705 cat conftest.err >&5
cd958eb3
MB
17706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17707 (exit $ac_status); } &&
8ae52ca6 17708 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
17709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17710 (eval $ac_try) 2>&5
17711 ac_status=$?
17712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17713 (exit $ac_status); }; } &&
17714 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
17715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17716 (eval $ac_try) 2>&5
17717 ac_status=$?
17718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17719 (exit $ac_status); }; }; then
17720 ac_cv_func_getpgrp_void=no
17721else
17722 echo "$as_me: failed program was:" >&5
19650fd6
AS
17723sed 's/^/| /' conftest.$ac_ext >&5
17724
cd958eb3
MB
17725ac_cv_func_getpgrp_void=yes
17726fi
edfaf76d 17727rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
17728
17729fi
17730echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
17731echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
17732if test $ac_cv_func_getpgrp_void = yes; then
17733
17734cat >>confdefs.h <<\_ACEOF
17735#define GETPGRP_VOID 1
17736_ACEOF
17737
17738fi
17739
17740
973a76b1
DL
17741
17742for ac_func in strftime
17743do
17744as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17745echo "$as_me:$LINENO: checking for $ac_func" >&5
17746echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17747if eval "test \"\${$as_ac_var+set}\" = set"; then
17748 echo $ECHO_N "(cached) $ECHO_C" >&6
17749else
17750 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17751/* confdefs.h. */
17752_ACEOF
17753cat confdefs.h >>conftest.$ac_ext
17754cat >>conftest.$ac_ext <<_ACEOF
17755/* end confdefs.h. */
edfaf76d
LK
17756/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17757 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17758#define $ac_func innocuous_$ac_func
17759
973a76b1 17760/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17761 which can conflict with char $ac_func (); below.
17762 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17763 <limits.h> exists even on freestanding compilers. */
edfaf76d 17764
19650fd6
AS
17765#ifdef __STDC__
17766# include <limits.h>
17767#else
17768# include <assert.h>
17769#endif
edfaf76d
LK
17770
17771#undef $ac_func
17772
973a76b1
DL
17773/* Override any gcc2 internal prototype to avoid an error. */
17774#ifdef __cplusplus
17775extern "C"
19650fd6 17776{
973a76b1
DL
17777#endif
17778/* We use char because int might match the return type of a gcc2
17779 builtin and then its argument prototype would still apply. */
17780char $ac_func ();
17781/* The GNU C library defines this for functions which it implements
17782 to always fail with ENOSYS. Some functions are actually named
17783 something starting with __ and the normal name is an alias. */
17784#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17785choke me
17786#else
19650fd6
AS
17787char (*f) () = $ac_func;
17788#endif
17789#ifdef __cplusplus
17790}
973a76b1
DL
17791#endif
17792
19650fd6
AS
17793int
17794main ()
17795{
17796return f != $ac_func;
973a76b1
DL
17797 ;
17798 return 0;
17799}
17800_ACEOF
17801rm -f conftest.$ac_objext conftest$ac_exeext
17802if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17803 (eval $ac_link) 2>conftest.er1
973a76b1 17804 ac_status=$?
edfaf76d
LK
17805 grep -v '^ *+' conftest.er1 >conftest.err
17806 rm -f conftest.er1
17807 cat conftest.err >&5
973a76b1
DL
17808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17809 (exit $ac_status); } &&
8ae52ca6 17810 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
17811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17812 (eval $ac_try) 2>&5
17813 ac_status=$?
17814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17815 (exit $ac_status); }; } &&
17816 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
17817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17818 (eval $ac_try) 2>&5
17819 ac_status=$?
17820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17821 (exit $ac_status); }; }; then
17822 eval "$as_ac_var=yes"
17823else
17824 echo "$as_me: failed program was:" >&5
19650fd6
AS
17825sed 's/^/| /' conftest.$ac_ext >&5
17826
973a76b1
DL
17827eval "$as_ac_var=no"
17828fi
edfaf76d
LK
17829rm -f conftest.err conftest.$ac_objext \
17830 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
17831fi
17832echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17833echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17834if test `eval echo '${'$as_ac_var'}'` = yes; then
17835 cat >>confdefs.h <<_ACEOF
17836#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17837_ACEOF
17838
17839else
17840 # strftime is in -lintl on SCO UNIX.
17841echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
17842echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
17843if test "${ac_cv_lib_intl_strftime+set}" = set; then
17844 echo $ECHO_N "(cached) $ECHO_C" >&6
17845else
17846 ac_check_lib_save_LIBS=$LIBS
17847LIBS="-lintl $LIBS"
17848cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17849/* confdefs.h. */
17850_ACEOF
17851cat confdefs.h >>conftest.$ac_ext
17852cat >>conftest.$ac_ext <<_ACEOF
17853/* end confdefs.h. */
973a76b1
DL
17854
17855/* Override any gcc2 internal prototype to avoid an error. */
17856#ifdef __cplusplus
17857extern "C"
17858#endif
17859/* We use char because int might match the return type of a gcc2
17860 builtin and then its argument prototype would still apply. */
17861char strftime ();
17862int
17863main ()
17864{
17865strftime ();
17866 ;
17867 return 0;
17868}
17869_ACEOF
17870rm -f conftest.$ac_objext conftest$ac_exeext
17871if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17872 (eval $ac_link) 2>conftest.er1
973a76b1 17873 ac_status=$?
edfaf76d
LK
17874 grep -v '^ *+' conftest.er1 >conftest.err
17875 rm -f conftest.er1
17876 cat conftest.err >&5
973a76b1
DL
17877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17878 (exit $ac_status); } &&
8ae52ca6 17879 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
17880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17881 (eval $ac_try) 2>&5
17882 ac_status=$?
17883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17884 (exit $ac_status); }; } &&
17885 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
17886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17887 (eval $ac_try) 2>&5
17888 ac_status=$?
17889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17890 (exit $ac_status); }; }; then
17891 ac_cv_lib_intl_strftime=yes
17892else
17893 echo "$as_me: failed program was:" >&5
19650fd6
AS
17894sed 's/^/| /' conftest.$ac_ext >&5
17895
973a76b1
DL
17896ac_cv_lib_intl_strftime=no
17897fi
edfaf76d
LK
17898rm -f conftest.err conftest.$ac_objext \
17899 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
17900LIBS=$ac_check_lib_save_LIBS
17901fi
17902echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
17903echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
17904if test $ac_cv_lib_intl_strftime = yes; then
17905 cat >>confdefs.h <<\_ACEOF
17906#define HAVE_STRFTIME 1
17907_ACEOF
17908
17909LIBS="-lintl $LIBS"
17910fi
17911
17912fi
17913done
17914
17915
b936fae4
AS
17916# UNIX98 PTYs.
17917
17918for ac_func in grantpt
503d2be0
AS
17919do
17920as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 17921echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
17922echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17923if eval "test \"\${$as_ac_var+set}\" = set"; then
17924 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17925else
503d2be0 17926 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17927/* confdefs.h. */
17928_ACEOF
17929cat confdefs.h >>conftest.$ac_ext
17930cat >>conftest.$ac_ext <<_ACEOF
17931/* end confdefs.h. */
edfaf76d
LK
17932/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17933 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17934#define $ac_func innocuous_$ac_func
17935
503d2be0 17936/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17937 which can conflict with char $ac_func (); below.
17938 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17939 <limits.h> exists even on freestanding compilers. */
edfaf76d 17940
19650fd6
AS
17941#ifdef __STDC__
17942# include <limits.h>
17943#else
17944# include <assert.h>
17945#endif
edfaf76d
LK
17946
17947#undef $ac_func
17948
4c343001 17949/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17950#ifdef __cplusplus
17951extern "C"
19650fd6 17952{
503d2be0 17953#endif
4c343001 17954/* We use char because int might match the return type of a gcc2
503d2be0
AS
17955 builtin and then its argument prototype would still apply. */
17956char $ac_func ();
503d2be0
AS
17957/* The GNU C library defines this for functions which it implements
17958 to always fail with ENOSYS. Some functions are actually named
17959 something starting with __ and the normal name is an alias. */
17960#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17961choke me
17962#else
19650fd6
AS
17963char (*f) () = $ac_func;
17964#endif
17965#ifdef __cplusplus
17966}
503d2be0 17967#endif
4c343001 17968
19650fd6
AS
17969int
17970main ()
17971{
17972return f != $ac_func;
503d2be0
AS
17973 ;
17974 return 0;
17975}
17976_ACEOF
17977rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17978if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17979 (eval $ac_link) 2>conftest.er1
503d2be0 17980 ac_status=$?
edfaf76d
LK
17981 grep -v '^ *+' conftest.er1 >conftest.err
17982 rm -f conftest.er1
17983 cat conftest.err >&5
c0d27fcc 17984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17985 (exit $ac_status); } &&
8ae52ca6 17986 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
17987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17988 (eval $ac_try) 2>&5
17989 ac_status=$?
17990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17991 (exit $ac_status); }; } &&
17992 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17994 (eval $ac_try) 2>&5
17995 ac_status=$?
c0d27fcc 17996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17997 (exit $ac_status); }; }; then
17998 eval "$as_ac_var=yes"
17999else
18000 echo "$as_me: failed program was:" >&5
19650fd6
AS
18001sed 's/^/| /' conftest.$ac_ext >&5
18002
503d2be0
AS
18003eval "$as_ac_var=no"
18004fi
edfaf76d
LK
18005rm -f conftest.err conftest.$ac_objext \
18006 conftest$ac_exeext conftest.$ac_ext
503d2be0 18007fi
c0d27fcc 18008echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
18009echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18010if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18011 cat >>confdefs.h <<_ACEOF
503d2be0 18012#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18013_ACEOF
4c343001
DL
18014
18015fi
503d2be0
AS
18016done
18017
c0d27fcc 18018
b936fae4 18019# PTY-related GNU extensions.
4c343001 18020
b936fae4
AS
18021for ac_func in getpt
18022do
18023as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 18024echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
18025echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18026if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 18027 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18028else
b936fae4 18029 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18030/* confdefs.h. */
18031_ACEOF
18032cat confdefs.h >>conftest.$ac_ext
18033cat >>conftest.$ac_ext <<_ACEOF
18034/* end confdefs.h. */
edfaf76d
LK
18035/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18036 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18037#define $ac_func innocuous_$ac_func
18038
087121cc 18039/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18040 which can conflict with char $ac_func (); below.
18041 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18042 <limits.h> exists even on freestanding compilers. */
edfaf76d 18043
19650fd6
AS
18044#ifdef __STDC__
18045# include <limits.h>
18046#else
18047# include <assert.h>
18048#endif
edfaf76d
LK
18049
18050#undef $ac_func
18051
087121cc 18052/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18053#ifdef __cplusplus
18054extern "C"
19650fd6 18055{
503d2be0 18056#endif
087121cc 18057/* We use char because int might match the return type of a gcc2
503d2be0
AS
18058 builtin and then its argument prototype would still apply. */
18059char $ac_func ();
087121cc
GM
18060/* The GNU C library defines this for functions which it implements
18061 to always fail with ENOSYS. Some functions are actually named
18062 something starting with __ and the normal name is an alias. */
18063#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18064choke me
18065#else
19650fd6
AS
18066char (*f) () = $ac_func;
18067#endif
18068#ifdef __cplusplus
18069}
087121cc
GM
18070#endif
18071
19650fd6
AS
18072int
18073main ()
18074{
18075return f != $ac_func;
503d2be0
AS
18076 ;
18077 return 0;
18078}
18079_ACEOF
18080rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18081if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18082 (eval $ac_link) 2>conftest.er1
503d2be0 18083 ac_status=$?
edfaf76d
LK
18084 grep -v '^ *+' conftest.er1 >conftest.err
18085 rm -f conftest.er1
18086 cat conftest.err >&5
c0d27fcc 18087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18088 (exit $ac_status); } &&
8ae52ca6 18089 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
18090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18091 (eval $ac_try) 2>&5
18092 ac_status=$?
18093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18094 (exit $ac_status); }; } &&
18095 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18097 (eval $ac_try) 2>&5
18098 ac_status=$?
c0d27fcc 18099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18100 (exit $ac_status); }; }; then
18101 eval "$as_ac_var=yes"
18102else
18103 echo "$as_me: failed program was:" >&5
19650fd6
AS
18104sed 's/^/| /' conftest.$ac_ext >&5
18105
503d2be0
AS
18106eval "$as_ac_var=no"
18107fi
edfaf76d
LK
18108rm -f conftest.err conftest.$ac_objext \
18109 conftest$ac_exeext conftest.$ac_ext
503d2be0 18110fi
c0d27fcc 18111echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
18112echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18113if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18114 cat >>confdefs.h <<_ACEOF
503d2be0 18115#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18116_ACEOF
087121cc 18117
087121cc
GM
18118fi
18119done
18120
c0d27fcc 18121
ba4481b5
DL
18122# Check this now, so that we will NOT find the above functions in ncurses.
18123# That is because we have not set up to link ncurses in lib-src.
18124# It's better to believe a function is not available
18125# than to expect to find it in ncurses.
503d2be0 18126
c0d27fcc 18127echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
18128echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
18129if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
18130 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18131else
503d2be0 18132 ac_check_lib_save_LIBS=$LIBS
ba4481b5 18133LIBS="-lncurses $LIBS"
503d2be0 18134cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18135/* confdefs.h. */
18136_ACEOF
18137cat confdefs.h >>conftest.$ac_ext
18138cat >>conftest.$ac_ext <<_ACEOF
18139/* end confdefs.h. */
503d2be0 18140
ba4481b5 18141/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18142#ifdef __cplusplus
18143extern "C"
18144#endif
ba4481b5 18145/* We use char because int might match the return type of a gcc2
503d2be0
AS
18146 builtin and then its argument prototype would still apply. */
18147char tparm ();
18148int
18149main ()
18150{
18151tparm ();
18152 ;
18153 return 0;
18154}
18155_ACEOF
18156rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18157if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18158 (eval $ac_link) 2>conftest.er1
503d2be0 18159 ac_status=$?
edfaf76d
LK
18160 grep -v '^ *+' conftest.er1 >conftest.err
18161 rm -f conftest.er1
18162 cat conftest.err >&5
c0d27fcc 18163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18164 (exit $ac_status); } &&
8ae52ca6 18165 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
18166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18167 (eval $ac_try) 2>&5
18168 ac_status=$?
18169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18170 (exit $ac_status); }; } &&
18171 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18173 (eval $ac_try) 2>&5
18174 ac_status=$?
c0d27fcc 18175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18176 (exit $ac_status); }; }; then
18177 ac_cv_lib_ncurses_tparm=yes
18178else
18179 echo "$as_me: failed program was:" >&5
19650fd6
AS
18180sed 's/^/| /' conftest.$ac_ext >&5
18181
503d2be0
AS
18182ac_cv_lib_ncurses_tparm=no
18183fi
edfaf76d
LK
18184rm -f conftest.err conftest.$ac_objext \
18185 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18186LIBS=$ac_check_lib_save_LIBS
18187fi
c0d27fcc 18188echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
18189echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
18190if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 18191 cat >>confdefs.h <<_ACEOF
503d2be0 18192#define HAVE_LIBNCURSES 1
c0d27fcc 18193_ACEOF
ba4481b5
DL
18194
18195 LIBS="-lncurses $LIBS"
18196
ba4481b5
DL
18197fi
18198
c0d27fcc 18199
84e70f78
KR
18200# Do we need the Hesiod library to provide the support routines?
18201if test "$with_hesiod" = yes ; then
18202 # Don't set $LIBS here -- see comments above.
18203 resolv=no
c0d27fcc 18204 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
18205echo $ECHO_N "checking for res_send... $ECHO_C" >&6
18206if test "${ac_cv_func_res_send+set}" = set; then
18207 echo $ECHO_N "(cached) $ECHO_C" >&6
18208else
18209 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18210/* confdefs.h. */
18211_ACEOF
18212cat confdefs.h >>conftest.$ac_ext
18213cat >>conftest.$ac_ext <<_ACEOF
18214/* end confdefs.h. */
edfaf76d
LK
18215/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
18216 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18217#define res_send innocuous_res_send
18218
84e70f78 18219/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18220 which can conflict with char res_send (); below.
18221 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18222 <limits.h> exists even on freestanding compilers. */
edfaf76d 18223
19650fd6
AS
18224#ifdef __STDC__
18225# include <limits.h>
18226#else
18227# include <assert.h>
18228#endif
edfaf76d
LK
18229
18230#undef res_send
18231
84e70f78
KR
18232/* Override any gcc2 internal prototype to avoid an error. */
18233#ifdef __cplusplus
18234extern "C"
19650fd6 18235{
84e70f78
KR
18236#endif
18237/* We use char because int might match the return type of a gcc2
18238 builtin and then its argument prototype would still apply. */
18239char res_send ();
84e70f78
KR
18240/* The GNU C library defines this for functions which it implements
18241 to always fail with ENOSYS. Some functions are actually named
18242 something starting with __ and the normal name is an alias. */
18243#if defined (__stub_res_send) || defined (__stub___res_send)
18244choke me
18245#else
19650fd6
AS
18246char (*f) () = res_send;
18247#endif
18248#ifdef __cplusplus
18249}
cd958eb3
MB
18250#endif
18251
19650fd6
AS
18252int
18253main ()
18254{
18255return f != res_send;
84e70f78
KR
18256 ;
18257 return 0;
18258}
18259_ACEOF
18260rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18262 (eval $ac_link) 2>conftest.er1
84e70f78 18263 ac_status=$?
edfaf76d
LK
18264 grep -v '^ *+' conftest.er1 >conftest.err
18265 rm -f conftest.er1
18266 cat conftest.err >&5
c0d27fcc 18267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18268 (exit $ac_status); } &&
8ae52ca6 18269 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
18270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18271 (eval $ac_try) 2>&5
18272 ac_status=$?
18273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18274 (exit $ac_status); }; } &&
18275 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18277 (eval $ac_try) 2>&5
18278 ac_status=$?
c0d27fcc 18279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18280 (exit $ac_status); }; }; then
18281 ac_cv_func_res_send=yes
18282else
18283 echo "$as_me: failed program was:" >&5
19650fd6
AS
18284sed 's/^/| /' conftest.$ac_ext >&5
18285
84e70f78
KR
18286ac_cv_func_res_send=no
18287fi
edfaf76d
LK
18288rm -f conftest.err conftest.$ac_objext \
18289 conftest$ac_exeext conftest.$ac_ext
84e70f78 18290fi
c0d27fcc 18291echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
18292echo "${ECHO_T}$ac_cv_func_res_send" >&6
18293if test $ac_cv_func_res_send = yes; then
18294 :
18295else
c0d27fcc 18296 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
18297echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
18298if test "${ac_cv_func___res_send+set}" = set; then
18299 echo $ECHO_N "(cached) $ECHO_C" >&6
18300else
18301 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18302/* confdefs.h. */
18303_ACEOF
18304cat confdefs.h >>conftest.$ac_ext
18305cat >>conftest.$ac_ext <<_ACEOF
18306/* end confdefs.h. */
edfaf76d
LK
18307/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
18308 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18309#define __res_send innocuous___res_send
18310
84e70f78 18311/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18312 which can conflict with char __res_send (); below.
18313 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18314 <limits.h> exists even on freestanding compilers. */
edfaf76d 18315
19650fd6
AS
18316#ifdef __STDC__
18317# include <limits.h>
18318#else
18319# include <assert.h>
18320#endif
edfaf76d
LK
18321
18322#undef __res_send
18323
84e70f78
KR
18324/* Override any gcc2 internal prototype to avoid an error. */
18325#ifdef __cplusplus
18326extern "C"
19650fd6 18327{
84e70f78
KR
18328#endif
18329/* We use char because int might match the return type of a gcc2
18330 builtin and then its argument prototype would still apply. */
18331char __res_send ();
84e70f78
KR
18332/* The GNU C library defines this for functions which it implements
18333 to always fail with ENOSYS. Some functions are actually named
18334 something starting with __ and the normal name is an alias. */
18335#if defined (__stub___res_send) || defined (__stub_____res_send)
18336choke me
18337#else
19650fd6
AS
18338char (*f) () = __res_send;
18339#endif
18340#ifdef __cplusplus
18341}
84e70f78
KR
18342#endif
18343
19650fd6
AS
18344int
18345main ()
18346{
18347return f != __res_send;
84e70f78
KR
18348 ;
18349 return 0;
18350}
18351_ACEOF
18352rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18353if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18354 (eval $ac_link) 2>conftest.er1
84e70f78 18355 ac_status=$?
edfaf76d
LK
18356 grep -v '^ *+' conftest.er1 >conftest.err
18357 rm -f conftest.er1
18358 cat conftest.err >&5
c0d27fcc 18359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18360 (exit $ac_status); } &&
8ae52ca6 18361 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
18362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18363 (eval $ac_try) 2>&5
18364 ac_status=$?
18365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18366 (exit $ac_status); }; } &&
18367 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18369 (eval $ac_try) 2>&5
18370 ac_status=$?
c0d27fcc 18371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18372 (exit $ac_status); }; }; then
18373 ac_cv_func___res_send=yes
18374else
18375 echo "$as_me: failed program was:" >&5
19650fd6
AS
18376sed 's/^/| /' conftest.$ac_ext >&5
18377
84e70f78
KR
18378ac_cv_func___res_send=no
18379fi
edfaf76d
LK
18380rm -f conftest.err conftest.$ac_objext \
18381 conftest$ac_exeext conftest.$ac_ext
84e70f78 18382fi
c0d27fcc 18383echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
18384echo "${ECHO_T}$ac_cv_func___res_send" >&6
18385if test $ac_cv_func___res_send = yes; then
18386 :
18387else
c0d27fcc 18388 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
18389echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
18390if test "${ac_cv_lib_resolv_res_send+set}" = set; then
18391 echo $ECHO_N "(cached) $ECHO_C" >&6
18392else
18393 ac_check_lib_save_LIBS=$LIBS
18394LIBS="-lresolv $LIBS"
18395cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18396/* confdefs.h. */
18397_ACEOF
18398cat confdefs.h >>conftest.$ac_ext
18399cat >>conftest.$ac_ext <<_ACEOF
18400/* end confdefs.h. */
84e70f78
KR
18401
18402/* Override any gcc2 internal prototype to avoid an error. */
18403#ifdef __cplusplus
18404extern "C"
18405#endif
18406/* We use char because int might match the return type of a gcc2
18407 builtin and then its argument prototype would still apply. */
18408char res_send ();
18409int
18410main ()
18411{
18412res_send ();
18413 ;
18414 return 0;
18415}
18416_ACEOF
18417rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18418if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18419 (eval $ac_link) 2>conftest.er1
84e70f78 18420 ac_status=$?
edfaf76d
LK
18421 grep -v '^ *+' conftest.er1 >conftest.err
18422 rm -f conftest.er1
18423 cat conftest.err >&5
c0d27fcc 18424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18425 (exit $ac_status); } &&
8ae52ca6 18426 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
18427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18428 (eval $ac_try) 2>&5
18429 ac_status=$?
18430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18431 (exit $ac_status); }; } &&
18432 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18434 (eval $ac_try) 2>&5
18435 ac_status=$?
c0d27fcc 18436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18437 (exit $ac_status); }; }; then
18438 ac_cv_lib_resolv_res_send=yes
18439else
18440 echo "$as_me: failed program was:" >&5
19650fd6
AS
18441sed 's/^/| /' conftest.$ac_ext >&5
18442
84e70f78
KR
18443ac_cv_lib_resolv_res_send=no
18444fi
edfaf76d
LK
18445rm -f conftest.err conftest.$ac_objext \
18446 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18447LIBS=$ac_check_lib_save_LIBS
18448fi
c0d27fcc 18449echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
18450echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
18451if test $ac_cv_lib_resolv_res_send = yes; then
18452 resolv=yes
18453else
c0d27fcc 18454 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
18455echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
18456if test "${ac_cv_lib_resolv___res_send+set}" = set; then
18457 echo $ECHO_N "(cached) $ECHO_C" >&6
18458else
18459 ac_check_lib_save_LIBS=$LIBS
18460LIBS="-lresolv $LIBS"
18461cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18462/* confdefs.h. */
18463_ACEOF
18464cat confdefs.h >>conftest.$ac_ext
18465cat >>conftest.$ac_ext <<_ACEOF
18466/* end confdefs.h. */
84e70f78
KR
18467
18468/* Override any gcc2 internal prototype to avoid an error. */
18469#ifdef __cplusplus
18470extern "C"
18471#endif
18472/* We use char because int might match the return type of a gcc2
18473 builtin and then its argument prototype would still apply. */
18474char __res_send ();
18475int
18476main ()
18477{
18478__res_send ();
18479 ;
18480 return 0;
18481}
18482_ACEOF
18483rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18484if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18485 (eval $ac_link) 2>conftest.er1
84e70f78 18486 ac_status=$?
edfaf76d
LK
18487 grep -v '^ *+' conftest.er1 >conftest.err
18488 rm -f conftest.er1
18489 cat conftest.err >&5
c0d27fcc 18490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18491 (exit $ac_status); } &&
8ae52ca6 18492 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
18493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18494 (eval $ac_try) 2>&5
18495 ac_status=$?
18496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18497 (exit $ac_status); }; } &&
18498 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18500 (eval $ac_try) 2>&5
18501 ac_status=$?
c0d27fcc 18502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18503 (exit $ac_status); }; }; then
18504 ac_cv_lib_resolv___res_send=yes
18505else
18506 echo "$as_me: failed program was:" >&5
19650fd6
AS
18507sed 's/^/| /' conftest.$ac_ext >&5
18508
84e70f78
KR
18509ac_cv_lib_resolv___res_send=no
18510fi
edfaf76d
LK
18511rm -f conftest.err conftest.$ac_objext \
18512 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18513LIBS=$ac_check_lib_save_LIBS
18514fi
c0d27fcc 18515echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
18516echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
18517if test $ac_cv_lib_resolv___res_send = yes; then
18518 resolv=yes
18519fi
18520
18521fi
18522
18523fi
18524
18525fi
18526
18527 if test "$resolv" = yes ; then
18528 RESOLVLIB=-lresolv
b936fae4 18529
c0d27fcc 18530cat >>confdefs.h <<\_ACEOF
84e70f78 18531#define HAVE_LIBRESOLV 1
c0d27fcc 18532_ACEOF
84e70f78
KR
18533
18534 else
18535 RESOLVLIB=
18536 fi
c0d27fcc 18537 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
18538echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
18539if test "${ac_cv_func_hes_getmailhost+set}" = set; then
18540 echo $ECHO_N "(cached) $ECHO_C" >&6
18541else
18542 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18543/* confdefs.h. */
18544_ACEOF
18545cat confdefs.h >>conftest.$ac_ext
18546cat >>conftest.$ac_ext <<_ACEOF
18547/* end confdefs.h. */
edfaf76d
LK
18548/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
18549 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18550#define hes_getmailhost innocuous_hes_getmailhost
18551
84e70f78 18552/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18553 which can conflict with char hes_getmailhost (); below.
18554 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18555 <limits.h> exists even on freestanding compilers. */
edfaf76d 18556
19650fd6
AS
18557#ifdef __STDC__
18558# include <limits.h>
18559#else
18560# include <assert.h>
18561#endif
edfaf76d
LK
18562
18563#undef hes_getmailhost
18564
84e70f78
KR
18565/* Override any gcc2 internal prototype to avoid an error. */
18566#ifdef __cplusplus
18567extern "C"
19650fd6 18568{
84e70f78
KR
18569#endif
18570/* We use char because int might match the return type of a gcc2
18571 builtin and then its argument prototype would still apply. */
18572char hes_getmailhost ();
84e70f78
KR
18573/* The GNU C library defines this for functions which it implements
18574 to always fail with ENOSYS. Some functions are actually named
18575 something starting with __ and the normal name is an alias. */
18576#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
18577choke me
18578#else
19650fd6
AS
18579char (*f) () = hes_getmailhost;
18580#endif
18581#ifdef __cplusplus
18582}
cd958eb3
MB
18583#endif
18584
19650fd6
AS
18585int
18586main ()
18587{
18588return f != hes_getmailhost;
84e70f78
KR
18589 ;
18590 return 0;
18591}
18592_ACEOF
18593rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18594if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18595 (eval $ac_link) 2>conftest.er1
84e70f78 18596 ac_status=$?
edfaf76d
LK
18597 grep -v '^ *+' conftest.er1 >conftest.err
18598 rm -f conftest.er1
18599 cat conftest.err >&5
c0d27fcc 18600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18601 (exit $ac_status); } &&
8ae52ca6 18602 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
18603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18604 (eval $ac_try) 2>&5
18605 ac_status=$?
18606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18607 (exit $ac_status); }; } &&
18608 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18610 (eval $ac_try) 2>&5
18611 ac_status=$?
c0d27fcc 18612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18613 (exit $ac_status); }; }; then
18614 ac_cv_func_hes_getmailhost=yes
18615else
18616 echo "$as_me: failed program was:" >&5
19650fd6
AS
18617sed 's/^/| /' conftest.$ac_ext >&5
18618
84e70f78
KR
18619ac_cv_func_hes_getmailhost=no
18620fi
edfaf76d
LK
18621rm -f conftest.err conftest.$ac_objext \
18622 conftest$ac_exeext conftest.$ac_ext
84e70f78 18623fi
c0d27fcc 18624echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
18625echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
18626if test $ac_cv_func_hes_getmailhost = yes; then
18627 :
18628else
c0d27fcc 18629 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
18630echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
18631if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
18632 echo $ECHO_N "(cached) $ECHO_C" >&6
18633else
18634 ac_check_lib_save_LIBS=$LIBS
18635LIBS="-lhesiod $RESOLVLIB $LIBS"
18636cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18637/* confdefs.h. */
18638_ACEOF
18639cat confdefs.h >>conftest.$ac_ext
18640cat >>conftest.$ac_ext <<_ACEOF
18641/* end confdefs.h. */
84e70f78
KR
18642
18643/* Override any gcc2 internal prototype to avoid an error. */
18644#ifdef __cplusplus
18645extern "C"
18646#endif
18647/* We use char because int might match the return type of a gcc2
18648 builtin and then its argument prototype would still apply. */
18649char hes_getmailhost ();
18650int
18651main ()
18652{
18653hes_getmailhost ();
18654 ;
18655 return 0;
18656}
18657_ACEOF
18658rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18659if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18660 (eval $ac_link) 2>conftest.er1
84e70f78 18661 ac_status=$?
edfaf76d
LK
18662 grep -v '^ *+' conftest.er1 >conftest.err
18663 rm -f conftest.er1
18664 cat conftest.err >&5
c0d27fcc 18665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18666 (exit $ac_status); } &&
8ae52ca6 18667 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
18668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18669 (eval $ac_try) 2>&5
18670 ac_status=$?
18671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18672 (exit $ac_status); }; } &&
18673 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18675 (eval $ac_try) 2>&5
18676 ac_status=$?
c0d27fcc 18677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18678 (exit $ac_status); }; }; then
18679 ac_cv_lib_hesiod_hes_getmailhost=yes
18680else
18681 echo "$as_me: failed program was:" >&5
19650fd6
AS
18682sed 's/^/| /' conftest.$ac_ext >&5
18683
84e70f78
KR
18684ac_cv_lib_hesiod_hes_getmailhost=no
18685fi
edfaf76d
LK
18686rm -f conftest.err conftest.$ac_objext \
18687 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18688LIBS=$ac_check_lib_save_LIBS
18689fi
c0d27fcc 18690echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
18691echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
18692if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 18693
c0d27fcc 18694cat >>confdefs.h <<\_ACEOF
84e70f78 18695#define HAVE_LIBHESIOD 1
c0d27fcc 18696_ACEOF
84e70f78
KR
18697
18698else
18699 :
18700fi
18701
18702fi
18703
18704fi
18705
a21616bd
KR
18706# These tell us which Kerberos-related libraries to use.
18707if test "${with_kerberos+set}" = set; then
503d2be0 18708
c0d27fcc 18709echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
18710echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
18711if test "${ac_cv_lib_com_err_com_err+set}" = set; then
18712 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18713else
503d2be0 18714 ac_check_lib_save_LIBS=$LIBS
a21616bd 18715LIBS="-lcom_err $LIBS"
503d2be0 18716cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18717/* confdefs.h. */
18718_ACEOF
18719cat confdefs.h >>conftest.$ac_ext
18720cat >>conftest.$ac_ext <<_ACEOF
18721/* end confdefs.h. */
503d2be0 18722
a21616bd 18723/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18724#ifdef __cplusplus
18725extern "C"
18726#endif
a21616bd 18727/* We use char because int might match the return type of a gcc2
503d2be0
AS
18728 builtin and then its argument prototype would still apply. */
18729char com_err ();
18730int
18731main ()
18732{
18733com_err ();
18734 ;
18735 return 0;
18736}
18737_ACEOF
18738rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18739if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18740 (eval $ac_link) 2>conftest.er1
503d2be0 18741 ac_status=$?
edfaf76d
LK
18742 grep -v '^ *+' conftest.er1 >conftest.err
18743 rm -f conftest.er1
18744 cat conftest.err >&5
c0d27fcc 18745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18746 (exit $ac_status); } &&
8ae52ca6 18747 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
18748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18749 (eval $ac_try) 2>&5
18750 ac_status=$?
18751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18752 (exit $ac_status); }; } &&
18753 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18755 (eval $ac_try) 2>&5
18756 ac_status=$?
c0d27fcc 18757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18758 (exit $ac_status); }; }; then
18759 ac_cv_lib_com_err_com_err=yes
18760else
18761 echo "$as_me: failed program was:" >&5
19650fd6
AS
18762sed 's/^/| /' conftest.$ac_ext >&5
18763
503d2be0
AS
18764ac_cv_lib_com_err_com_err=no
18765fi
edfaf76d
LK
18766rm -f conftest.err conftest.$ac_objext \
18767 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18768LIBS=$ac_check_lib_save_LIBS
18769fi
c0d27fcc 18770echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
18771echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
18772if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 18773 cat >>confdefs.h <<_ACEOF
503d2be0 18774#define HAVE_LIBCOM_ERR 1
c0d27fcc 18775_ACEOF
a21616bd
KR
18776
18777 LIBS="-lcom_err $LIBS"
18778
a21616bd
KR
18779fi
18780
c0d27fcc
MR
18781
18782echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
18783echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
18784if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
18785 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18786else
503d2be0 18787 ac_check_lib_save_LIBS=$LIBS
a21616bd 18788LIBS="-lk5crypto $LIBS"
503d2be0 18789cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18790/* confdefs.h. */
18791_ACEOF
18792cat confdefs.h >>conftest.$ac_ext
18793cat >>conftest.$ac_ext <<_ACEOF
18794/* end confdefs.h. */
503d2be0 18795
a21616bd 18796/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18797#ifdef __cplusplus
18798extern "C"
18799#endif
a21616bd 18800/* We use char because int might match the return type of a gcc2
503d2be0
AS
18801 builtin and then its argument prototype would still apply. */
18802char mit_des_cbc_encrypt ();
18803int
18804main ()
18805{
18806mit_des_cbc_encrypt ();
18807 ;
18808 return 0;
18809}
18810_ACEOF
18811rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18812if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18813 (eval $ac_link) 2>conftest.er1
503d2be0 18814 ac_status=$?
edfaf76d
LK
18815 grep -v '^ *+' conftest.er1 >conftest.err
18816 rm -f conftest.er1
18817 cat conftest.err >&5
c0d27fcc 18818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18819 (exit $ac_status); } &&
8ae52ca6 18820 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
18821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18822 (eval $ac_try) 2>&5
18823 ac_status=$?
18824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18825 (exit $ac_status); }; } &&
18826 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18828 (eval $ac_try) 2>&5
18829 ac_status=$?
c0d27fcc 18830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18831 (exit $ac_status); }; }; then
18832 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
18833else
18834 echo "$as_me: failed program was:" >&5
19650fd6
AS
18835sed 's/^/| /' conftest.$ac_ext >&5
18836
503d2be0
AS
18837ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
18838fi
edfaf76d
LK
18839rm -f conftest.err conftest.$ac_objext \
18840 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18841LIBS=$ac_check_lib_save_LIBS
18842fi
c0d27fcc 18843echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
18844echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
18845if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 18846 cat >>confdefs.h <<_ACEOF
503d2be0 18847#define HAVE_LIBK5CRYPTO 1
c0d27fcc 18848_ACEOF
a21616bd
KR
18849
18850 LIBS="-lk5crypto $LIBS"
18851
a21616bd
KR
18852fi
18853
c0d27fcc
MR
18854
18855echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
18856echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
18857if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
18858 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18859else
503d2be0 18860 ac_check_lib_save_LIBS=$LIBS
a21616bd 18861LIBS="-lcrypto $LIBS"
503d2be0 18862cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18863/* confdefs.h. */
18864_ACEOF
18865cat confdefs.h >>conftest.$ac_ext
18866cat >>conftest.$ac_ext <<_ACEOF
18867/* end confdefs.h. */
503d2be0 18868
a21616bd 18869/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18870#ifdef __cplusplus
18871extern "C"
18872#endif
a21616bd 18873/* We use char because int might match the return type of a gcc2
503d2be0
AS
18874 builtin and then its argument prototype would still apply. */
18875char mit_des_cbc_encrypt ();
18876int
18877main ()
18878{
18879mit_des_cbc_encrypt ();
18880 ;
18881 return 0;
18882}
18883_ACEOF
18884rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18885if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18886 (eval $ac_link) 2>conftest.er1
503d2be0 18887 ac_status=$?
edfaf76d
LK
18888 grep -v '^ *+' conftest.er1 >conftest.err
18889 rm -f conftest.er1
18890 cat conftest.err >&5
c0d27fcc 18891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18892 (exit $ac_status); } &&
8ae52ca6 18893 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
18894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18895 (eval $ac_try) 2>&5
18896 ac_status=$?
18897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18898 (exit $ac_status); }; } &&
18899 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18901 (eval $ac_try) 2>&5
18902 ac_status=$?
c0d27fcc 18903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18904 (exit $ac_status); }; }; then
18905 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
18906else
18907 echo "$as_me: failed program was:" >&5
19650fd6
AS
18908sed 's/^/| /' conftest.$ac_ext >&5
18909
503d2be0
AS
18910ac_cv_lib_crypto_mit_des_cbc_encrypt=no
18911fi
edfaf76d
LK
18912rm -f conftest.err conftest.$ac_objext \
18913 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18914LIBS=$ac_check_lib_save_LIBS
18915fi
c0d27fcc 18916echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
18917echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
18918if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 18919 cat >>confdefs.h <<_ACEOF
503d2be0 18920#define HAVE_LIBCRYPTO 1
c0d27fcc 18921_ACEOF
a21616bd
KR
18922
18923 LIBS="-lcrypto $LIBS"
18924
a21616bd
KR
18925fi
18926
c0d27fcc
MR
18927
18928echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
18929echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
18930if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
18931 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18932else
503d2be0 18933 ac_check_lib_save_LIBS=$LIBS
a21616bd 18934LIBS="-lkrb5 $LIBS"
503d2be0 18935cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18936/* confdefs.h. */
18937_ACEOF
18938cat confdefs.h >>conftest.$ac_ext
18939cat >>conftest.$ac_ext <<_ACEOF
18940/* end confdefs.h. */
a21616bd 18941
503d2be0
AS
18942/* Override any gcc2 internal prototype to avoid an error. */
18943#ifdef __cplusplus
18944extern "C"
18945#endif
18946/* We use char because int might match the return type of a gcc2
18947 builtin and then its argument prototype would still apply. */
18948char krb5_init_context ();
18949int
18950main ()
18951{
18952krb5_init_context ();
18953 ;
18954 return 0;
18955}
18956_ACEOF
18957rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18958if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18959 (eval $ac_link) 2>conftest.er1
503d2be0 18960 ac_status=$?
edfaf76d
LK
18961 grep -v '^ *+' conftest.er1 >conftest.err
18962 rm -f conftest.er1
18963 cat conftest.err >&5
c0d27fcc 18964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18965 (exit $ac_status); } &&
8ae52ca6 18966 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
18967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18968 (eval $ac_try) 2>&5
18969 ac_status=$?
18970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18971 (exit $ac_status); }; } &&
18972 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18974 (eval $ac_try) 2>&5
18975 ac_status=$?
c0d27fcc 18976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18977 (exit $ac_status); }; }; then
18978 ac_cv_lib_krb5_krb5_init_context=yes
18979else
18980 echo "$as_me: failed program was:" >&5
19650fd6
AS
18981sed 's/^/| /' conftest.$ac_ext >&5
18982
503d2be0
AS
18983ac_cv_lib_krb5_krb5_init_context=no
18984fi
edfaf76d
LK
18985rm -f conftest.err conftest.$ac_objext \
18986 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18987LIBS=$ac_check_lib_save_LIBS
18988fi
c0d27fcc 18989echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
18990echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
18991if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 18992 cat >>confdefs.h <<_ACEOF
503d2be0 18993#define HAVE_LIBKRB5 1
c0d27fcc 18994_ACEOF
a21616bd
KR
18995
18996 LIBS="-lkrb5 $LIBS"
18997
a21616bd
KR
18998fi
18999
19000 if test "${with_kerberos5+set}" != set; then
503d2be0 19001
c0d27fcc 19002echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
19003echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
19004if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
19005 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19006else
503d2be0 19007 ac_check_lib_save_LIBS=$LIBS
a21616bd 19008LIBS="-ldes425 $LIBS"
503d2be0 19009cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19010/* confdefs.h. */
19011_ACEOF
19012cat confdefs.h >>conftest.$ac_ext
19013cat >>conftest.$ac_ext <<_ACEOF
19014/* end confdefs.h. */
503d2be0 19015
a21616bd 19016/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19017#ifdef __cplusplus
19018extern "C"
19019#endif
a21616bd 19020/* We use char because int might match the return type of a gcc2
503d2be0
AS
19021 builtin and then its argument prototype would still apply. */
19022char des_cbc_encrypt ();
19023int
19024main ()
19025{
19026des_cbc_encrypt ();
19027 ;
19028 return 0;
19029}
19030_ACEOF
19031rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19032if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19033 (eval $ac_link) 2>conftest.er1
503d2be0 19034 ac_status=$?
edfaf76d
LK
19035 grep -v '^ *+' conftest.er1 >conftest.err
19036 rm -f conftest.er1
19037 cat conftest.err >&5
c0d27fcc 19038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19039 (exit $ac_status); } &&
8ae52ca6 19040 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
19041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19042 (eval $ac_try) 2>&5
19043 ac_status=$?
19044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19045 (exit $ac_status); }; } &&
19046 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19048 (eval $ac_try) 2>&5
19049 ac_status=$?
c0d27fcc 19050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19051 (exit $ac_status); }; }; then
19052 ac_cv_lib_des425_des_cbc_encrypt=yes
19053else
19054 echo "$as_me: failed program was:" >&5
19650fd6
AS
19055sed 's/^/| /' conftest.$ac_ext >&5
19056
503d2be0
AS
19057ac_cv_lib_des425_des_cbc_encrypt=no
19058fi
edfaf76d
LK
19059rm -f conftest.err conftest.$ac_objext \
19060 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19061LIBS=$ac_check_lib_save_LIBS
19062fi
c0d27fcc 19063echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
19064echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
19065if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 19066 cat >>confdefs.h <<_ACEOF
503d2be0 19067#define HAVE_LIBDES425 1
c0d27fcc 19068_ACEOF
a21616bd
KR
19069
19070 LIBS="-ldes425 $LIBS"
19071
19072else
503d2be0 19073
c0d27fcc 19074echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
19075echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
19076if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
19077 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19078else
503d2be0 19079 ac_check_lib_save_LIBS=$LIBS
a21616bd 19080LIBS="-ldes $LIBS"
503d2be0 19081cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19082/* confdefs.h. */
19083_ACEOF
19084cat confdefs.h >>conftest.$ac_ext
19085cat >>conftest.$ac_ext <<_ACEOF
19086/* end confdefs.h. */
503d2be0 19087
a21616bd 19088/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19089#ifdef __cplusplus
19090extern "C"
19091#endif
a21616bd 19092/* We use char because int might match the return type of a gcc2
503d2be0
AS
19093 builtin and then its argument prototype would still apply. */
19094char des_cbc_encrypt ();
19095int
19096main ()
19097{
19098des_cbc_encrypt ();
19099 ;
19100 return 0;
19101}
19102_ACEOF
19103rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19104if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19105 (eval $ac_link) 2>conftest.er1
503d2be0 19106 ac_status=$?
edfaf76d
LK
19107 grep -v '^ *+' conftest.er1 >conftest.err
19108 rm -f conftest.er1
19109 cat conftest.err >&5
c0d27fcc 19110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19111 (exit $ac_status); } &&
8ae52ca6 19112 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
19113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19114 (eval $ac_try) 2>&5
19115 ac_status=$?
19116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19117 (exit $ac_status); }; } &&
19118 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19120 (eval $ac_try) 2>&5
19121 ac_status=$?
c0d27fcc 19122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19123 (exit $ac_status); }; }; then
19124 ac_cv_lib_des_des_cbc_encrypt=yes
19125else
19126 echo "$as_me: failed program was:" >&5
19650fd6
AS
19127sed 's/^/| /' conftest.$ac_ext >&5
19128
503d2be0
AS
19129ac_cv_lib_des_des_cbc_encrypt=no
19130fi
edfaf76d
LK
19131rm -f conftest.err conftest.$ac_objext \
19132 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19133LIBS=$ac_check_lib_save_LIBS
19134fi
c0d27fcc 19135echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
19136echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
19137if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 19138 cat >>confdefs.h <<_ACEOF
503d2be0 19139#define HAVE_LIBDES 1
c0d27fcc 19140_ACEOF
a21616bd
KR
19141
19142 LIBS="-ldes $LIBS"
19143
a21616bd
KR
19144fi
19145
19146fi
19147
c0d27fcc
MR
19148
19149echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
19150echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
19151if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
19152 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19153else
503d2be0 19154 ac_check_lib_save_LIBS=$LIBS
a21616bd 19155LIBS="-lkrb4 $LIBS"
503d2be0 19156cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19157/* confdefs.h. */
19158_ACEOF
19159cat confdefs.h >>conftest.$ac_ext
19160cat >>conftest.$ac_ext <<_ACEOF
19161/* end confdefs.h. */
503d2be0 19162
a21616bd 19163/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19164#ifdef __cplusplus
19165extern "C"
19166#endif
a21616bd 19167/* We use char because int might match the return type of a gcc2
503d2be0
AS
19168 builtin and then its argument prototype would still apply. */
19169char krb_get_cred ();
19170int
19171main ()
19172{
19173krb_get_cred ();
19174 ;
19175 return 0;
19176}
19177_ACEOF
19178rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19179if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19180 (eval $ac_link) 2>conftest.er1
503d2be0 19181 ac_status=$?
edfaf76d
LK
19182 grep -v '^ *+' conftest.er1 >conftest.err
19183 rm -f conftest.er1
19184 cat conftest.err >&5
c0d27fcc 19185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19186 (exit $ac_status); } &&
8ae52ca6 19187 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
19188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19189 (eval $ac_try) 2>&5
19190 ac_status=$?
19191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19192 (exit $ac_status); }; } &&
19193 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19195 (eval $ac_try) 2>&5
19196 ac_status=$?
c0d27fcc 19197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19198 (exit $ac_status); }; }; then
19199 ac_cv_lib_krb4_krb_get_cred=yes
19200else
19201 echo "$as_me: failed program was:" >&5
19650fd6
AS
19202sed 's/^/| /' conftest.$ac_ext >&5
19203
503d2be0
AS
19204ac_cv_lib_krb4_krb_get_cred=no
19205fi
edfaf76d
LK
19206rm -f conftest.err conftest.$ac_objext \
19207 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19208LIBS=$ac_check_lib_save_LIBS
19209fi
c0d27fcc 19210echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
19211echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
19212if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 19213 cat >>confdefs.h <<_ACEOF
503d2be0 19214#define HAVE_LIBKRB4 1
c0d27fcc 19215_ACEOF
a21616bd
KR
19216
19217 LIBS="-lkrb4 $LIBS"
19218
19219else
503d2be0 19220
c0d27fcc 19221echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
19222echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
19223if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
19224 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19225else
503d2be0 19226 ac_check_lib_save_LIBS=$LIBS
a21616bd 19227LIBS="-lkrb $LIBS"
503d2be0 19228cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19229/* confdefs.h. */
19230_ACEOF
19231cat confdefs.h >>conftest.$ac_ext
19232cat >>conftest.$ac_ext <<_ACEOF
19233/* end confdefs.h. */
503d2be0 19234
a21616bd 19235/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19236#ifdef __cplusplus
19237extern "C"
19238#endif
a21616bd 19239/* We use char because int might match the return type of a gcc2
503d2be0
AS
19240 builtin and then its argument prototype would still apply. */
19241char krb_get_cred ();
19242int
19243main ()
19244{
19245krb_get_cred ();
19246 ;
19247 return 0;
19248}
19249_ACEOF
19250rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19251if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19252 (eval $ac_link) 2>conftest.er1
503d2be0 19253 ac_status=$?
edfaf76d
LK
19254 grep -v '^ *+' conftest.er1 >conftest.err
19255 rm -f conftest.er1
19256 cat conftest.err >&5
c0d27fcc 19257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19258 (exit $ac_status); } &&
8ae52ca6 19259 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
19260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19261 (eval $ac_try) 2>&5
19262 ac_status=$?
19263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19264 (exit $ac_status); }; } &&
19265 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19267 (eval $ac_try) 2>&5
19268 ac_status=$?
c0d27fcc 19269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19270 (exit $ac_status); }; }; then
19271 ac_cv_lib_krb_krb_get_cred=yes
19272else
19273 echo "$as_me: failed program was:" >&5
19650fd6
AS
19274sed 's/^/| /' conftest.$ac_ext >&5
19275
503d2be0
AS
19276ac_cv_lib_krb_krb_get_cred=no
19277fi
edfaf76d
LK
19278rm -f conftest.err conftest.$ac_objext \
19279 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19280LIBS=$ac_check_lib_save_LIBS
19281fi
c0d27fcc 19282echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
19283echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
19284if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 19285 cat >>confdefs.h <<_ACEOF
503d2be0 19286#define HAVE_LIBKRB 1
c0d27fcc 19287_ACEOF
a21616bd
KR
19288
19289 LIBS="-lkrb $LIBS"
19290
a21616bd
KR
19291fi
19292
19293fi
19294
19295 fi
19296
19297 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
19298
19299for ac_header in krb5.h
a21616bd 19300do
503d2be0 19301as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19302if eval "test \"\${$as_ac_Header+set}\" = set"; then
19303 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19304echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19305if eval "test \"\${$as_ac_Header+set}\" = set"; then
19306 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19307fi
19308echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19309echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19310else
c0d27fcc
MR
19311 # Is the header compilable?
19312echo "$as_me:$LINENO: checking $ac_header usability" >&5
19313echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19314cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19315/* confdefs.h. */
19316_ACEOF
19317cat confdefs.h >>conftest.$ac_ext
19318cat >>conftest.$ac_ext <<_ACEOF
19319/* end confdefs.h. */
c0d27fcc
MR
19320$ac_includes_default
19321#include <$ac_header>
19322_ACEOF
19323rm -f conftest.$ac_objext
19324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19325 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19326 ac_status=$?
edfaf76d
LK
19327 grep -v '^ *+' conftest.er1 >conftest.err
19328 rm -f conftest.er1
19329 cat conftest.err >&5
c0d27fcc
MR
19330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19331 (exit $ac_status); } &&
8ae52ca6 19332 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
19333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19334 (eval $ac_try) 2>&5
19335 ac_status=$?
19336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19337 (exit $ac_status); }; } &&
19338 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19340 (eval $ac_try) 2>&5
19341 ac_status=$?
19342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19343 (exit $ac_status); }; }; then
19344 ac_header_compiler=yes
19345else
19346 echo "$as_me: failed program was:" >&5
19650fd6
AS
19347sed 's/^/| /' conftest.$ac_ext >&5
19348
c0d27fcc
MR
19349ac_header_compiler=no
19350fi
edfaf76d 19351rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19352echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19353echo "${ECHO_T}$ac_header_compiler" >&6
19354
19355# Is the header present?
19356echo "$as_me:$LINENO: checking $ac_header presence" >&5
19357echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19358cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19359/* confdefs.h. */
19360_ACEOF
19361cat confdefs.h >>conftest.$ac_ext
19362cat >>conftest.$ac_ext <<_ACEOF
19363/* end confdefs.h. */
503d2be0
AS
19364#include <$ac_header>
19365_ACEOF
c0d27fcc 19366if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19367 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19368 ac_status=$?
6bae0ccf 19369 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19370 rm -f conftest.er1
19371 cat conftest.err >&5
c0d27fcc 19372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19373 (exit $ac_status); } >/dev/null; then
19374 if test -s conftest.err; then
19375 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19376 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19377 else
19378 ac_cpp_err=
19379 fi
19380else
19381 ac_cpp_err=yes
19382fi
19383if test -z "$ac_cpp_err"; then
c0d27fcc 19384 ac_header_preproc=yes
503d2be0
AS
19385else
19386 echo "$as_me: failed program was:" >&5
19650fd6
AS
19387sed 's/^/| /' conftest.$ac_ext >&5
19388
c0d27fcc 19389 ac_header_preproc=no
a21616bd 19390fi
503d2be0 19391rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19392echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19393echo "${ECHO_T}$ac_header_preproc" >&6
19394
19395# So? What about this header?
edfaf76d
LK
19396case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19397 yes:no: )
c0d27fcc
MR
19398 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19399echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19400 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19401echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19402 ac_header_preproc=yes
19650fd6 19403 ;;
edfaf76d 19404 no:yes:* )
c0d27fcc
MR
19405 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19406echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19407 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19408echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19409 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19410echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19411 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19412echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19413 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19414echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19415 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19416echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19417 (
19418 cat <<\_ASBOX
edfaf76d
LK
19419## ------------------------------------------ ##
19420## Report this to the AC_PACKAGE_NAME lists. ##
19421## ------------------------------------------ ##
19650fd6
AS
19422_ASBOX
19423 ) |
19424 sed "s/^/$as_me: WARNING: /" >&2
19425 ;;
c0d27fcc
MR
19426esac
19427echo "$as_me:$LINENO: checking for $ac_header" >&5
19428echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19429if eval "test \"\${$as_ac_Header+set}\" = set"; then
19430 echo $ECHO_N "(cached) $ECHO_C" >&6
19431else
edfaf76d 19432 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19433fi
c0d27fcc 19434echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19435echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19436
19437fi
503d2be0 19438if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19439 cat >>confdefs.h <<_ACEOF
503d2be0 19440#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19441_ACEOF
503d2be0 19442
a21616bd 19443fi
c0d27fcc 19444
a21616bd
KR
19445done
19446
19447 else
503d2be0
AS
19448
19449for ac_header in des.h
a21616bd 19450do
503d2be0 19451as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19452if eval "test \"\${$as_ac_Header+set}\" = set"; then
19453 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19454echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19455if eval "test \"\${$as_ac_Header+set}\" = set"; then
19456 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19457fi
19458echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19459echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19460else
c0d27fcc
MR
19461 # Is the header compilable?
19462echo "$as_me:$LINENO: checking $ac_header usability" >&5
19463echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19464cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19465/* confdefs.h. */
19466_ACEOF
19467cat confdefs.h >>conftest.$ac_ext
19468cat >>conftest.$ac_ext <<_ACEOF
19469/* end confdefs.h. */
c0d27fcc
MR
19470$ac_includes_default
19471#include <$ac_header>
19472_ACEOF
19473rm -f conftest.$ac_objext
19474if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19475 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19476 ac_status=$?
edfaf76d
LK
19477 grep -v '^ *+' conftest.er1 >conftest.err
19478 rm -f conftest.er1
19479 cat conftest.err >&5
c0d27fcc
MR
19480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19481 (exit $ac_status); } &&
8ae52ca6 19482 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
19483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19484 (eval $ac_try) 2>&5
19485 ac_status=$?
19486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19487 (exit $ac_status); }; } &&
19488 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19490 (eval $ac_try) 2>&5
19491 ac_status=$?
19492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19493 (exit $ac_status); }; }; then
19494 ac_header_compiler=yes
19495else
19496 echo "$as_me: failed program was:" >&5
19650fd6
AS
19497sed 's/^/| /' conftest.$ac_ext >&5
19498
c0d27fcc
MR
19499ac_header_compiler=no
19500fi
edfaf76d 19501rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19502echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19503echo "${ECHO_T}$ac_header_compiler" >&6
19504
19505# Is the header present?
19506echo "$as_me:$LINENO: checking $ac_header presence" >&5
19507echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19508cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19509/* confdefs.h. */
19510_ACEOF
19511cat confdefs.h >>conftest.$ac_ext
19512cat >>conftest.$ac_ext <<_ACEOF
19513/* end confdefs.h. */
503d2be0
AS
19514#include <$ac_header>
19515_ACEOF
c0d27fcc 19516if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19517 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19518 ac_status=$?
6bae0ccf 19519 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19520 rm -f conftest.er1
19521 cat conftest.err >&5
c0d27fcc 19522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19523 (exit $ac_status); } >/dev/null; then
19524 if test -s conftest.err; then
19525 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19526 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19527 else
19528 ac_cpp_err=
19529 fi
19530else
19531 ac_cpp_err=yes
19532fi
19533if test -z "$ac_cpp_err"; then
c0d27fcc 19534 ac_header_preproc=yes
503d2be0
AS
19535else
19536 echo "$as_me: failed program was:" >&5
19650fd6
AS
19537sed 's/^/| /' conftest.$ac_ext >&5
19538
c0d27fcc 19539 ac_header_preproc=no
a21616bd 19540fi
503d2be0 19541rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19542echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19543echo "${ECHO_T}$ac_header_preproc" >&6
19544
19545# So? What about this header?
edfaf76d
LK
19546case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19547 yes:no: )
c0d27fcc
MR
19548 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19549echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19550 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19551echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19552 ac_header_preproc=yes
19650fd6 19553 ;;
edfaf76d 19554 no:yes:* )
c0d27fcc
MR
19555 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19556echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19557 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19558echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19559 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19560echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19561 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19562echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19563 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19564echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19565 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19566echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19567 (
19568 cat <<\_ASBOX
edfaf76d
LK
19569## ------------------------------------------ ##
19570## Report this to the AC_PACKAGE_NAME lists. ##
19571## ------------------------------------------ ##
19650fd6
AS
19572_ASBOX
19573 ) |
19574 sed "s/^/$as_me: WARNING: /" >&2
19575 ;;
c0d27fcc
MR
19576esac
19577echo "$as_me:$LINENO: checking for $ac_header" >&5
19578echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19579if eval "test \"\${$as_ac_Header+set}\" = set"; then
19580 echo $ECHO_N "(cached) $ECHO_C" >&6
19581else
edfaf76d 19582 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19583fi
c0d27fcc 19584echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19585echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19586
19587fi
503d2be0 19588if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19589 cat >>confdefs.h <<_ACEOF
503d2be0 19590#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19591_ACEOF
503d2be0 19592
a21616bd 19593else
503d2be0
AS
19594
19595for ac_header in kerberosIV/des.h
a21616bd 19596do
503d2be0 19597as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19598if eval "test \"\${$as_ac_Header+set}\" = set"; then
19599 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19600echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19601if eval "test \"\${$as_ac_Header+set}\" = set"; then
19602 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19603fi
19604echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19605echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19606else
c0d27fcc
MR
19607 # Is the header compilable?
19608echo "$as_me:$LINENO: checking $ac_header usability" >&5
19609echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19610cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19611/* confdefs.h. */
19612_ACEOF
19613cat confdefs.h >>conftest.$ac_ext
19614cat >>conftest.$ac_ext <<_ACEOF
19615/* end confdefs.h. */
c0d27fcc
MR
19616$ac_includes_default
19617#include <$ac_header>
19618_ACEOF
19619rm -f conftest.$ac_objext
19620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19621 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19622 ac_status=$?
edfaf76d
LK
19623 grep -v '^ *+' conftest.er1 >conftest.err
19624 rm -f conftest.er1
19625 cat conftest.err >&5
c0d27fcc
MR
19626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19627 (exit $ac_status); } &&
8ae52ca6 19628 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
19629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19630 (eval $ac_try) 2>&5
19631 ac_status=$?
19632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19633 (exit $ac_status); }; } &&
19634 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19636 (eval $ac_try) 2>&5
19637 ac_status=$?
19638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19639 (exit $ac_status); }; }; then
19640 ac_header_compiler=yes
19641else
19642 echo "$as_me: failed program was:" >&5
19650fd6
AS
19643sed 's/^/| /' conftest.$ac_ext >&5
19644
c0d27fcc
MR
19645ac_header_compiler=no
19646fi
edfaf76d 19647rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19648echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19649echo "${ECHO_T}$ac_header_compiler" >&6
19650
19651# Is the header present?
19652echo "$as_me:$LINENO: checking $ac_header presence" >&5
19653echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19654cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19655/* confdefs.h. */
19656_ACEOF
19657cat confdefs.h >>conftest.$ac_ext
19658cat >>conftest.$ac_ext <<_ACEOF
19659/* end confdefs.h. */
503d2be0
AS
19660#include <$ac_header>
19661_ACEOF
c0d27fcc 19662if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19663 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19664 ac_status=$?
6bae0ccf 19665 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19666 rm -f conftest.er1
19667 cat conftest.err >&5
c0d27fcc 19668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19669 (exit $ac_status); } >/dev/null; then
19670 if test -s conftest.err; then
19671 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19672 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19673 else
19674 ac_cpp_err=
19675 fi
19676else
19677 ac_cpp_err=yes
19678fi
19679if test -z "$ac_cpp_err"; then
c0d27fcc 19680 ac_header_preproc=yes
503d2be0
AS
19681else
19682 echo "$as_me: failed program was:" >&5
19650fd6
AS
19683sed 's/^/| /' conftest.$ac_ext >&5
19684
c0d27fcc 19685 ac_header_preproc=no
a21616bd 19686fi
503d2be0 19687rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19688echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19689echo "${ECHO_T}$ac_header_preproc" >&6
19690
19691# So? What about this header?
edfaf76d
LK
19692case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19693 yes:no: )
c0d27fcc
MR
19694 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19695echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19696 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19697echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19698 ac_header_preproc=yes
19650fd6 19699 ;;
edfaf76d 19700 no:yes:* )
c0d27fcc
MR
19701 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19702echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19703 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19704echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19705 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19706echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19707 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19708echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19709 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19710echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19711 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19712echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19713 (
19714 cat <<\_ASBOX
edfaf76d
LK
19715## ------------------------------------------ ##
19716## Report this to the AC_PACKAGE_NAME lists. ##
19717## ------------------------------------------ ##
19650fd6
AS
19718_ASBOX
19719 ) |
19720 sed "s/^/$as_me: WARNING: /" >&2
19721 ;;
c0d27fcc
MR
19722esac
19723echo "$as_me:$LINENO: checking for $ac_header" >&5
19724echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19725if eval "test \"\${$as_ac_Header+set}\" = set"; then
19726 echo $ECHO_N "(cached) $ECHO_C" >&6
19727else
edfaf76d 19728 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19729fi
c0d27fcc 19730echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19731echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19732
19733fi
503d2be0 19734if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19735 cat >>confdefs.h <<_ACEOF
503d2be0 19736#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19737_ACEOF
503d2be0 19738
a21616bd 19739else
503d2be0
AS
19740
19741for ac_header in kerberos/des.h
a21616bd 19742do
503d2be0 19743as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19744if eval "test \"\${$as_ac_Header+set}\" = set"; then
19745 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19746echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19747if eval "test \"\${$as_ac_Header+set}\" = set"; then
19748 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19749fi
19750echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19751echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19752else
c0d27fcc
MR
19753 # Is the header compilable?
19754echo "$as_me:$LINENO: checking $ac_header usability" >&5
19755echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19756cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19757/* confdefs.h. */
19758_ACEOF
19759cat confdefs.h >>conftest.$ac_ext
19760cat >>conftest.$ac_ext <<_ACEOF
19761/* end confdefs.h. */
c0d27fcc
MR
19762$ac_includes_default
19763#include <$ac_header>
19764_ACEOF
19765rm -f conftest.$ac_objext
19766if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19767 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19768 ac_status=$?
edfaf76d
LK
19769 grep -v '^ *+' conftest.er1 >conftest.err
19770 rm -f conftest.er1
19771 cat conftest.err >&5
c0d27fcc
MR
19772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19773 (exit $ac_status); } &&
8ae52ca6 19774 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
19775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19776 (eval $ac_try) 2>&5
19777 ac_status=$?
19778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19779 (exit $ac_status); }; } &&
19780 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19782 (eval $ac_try) 2>&5
19783 ac_status=$?
19784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19785 (exit $ac_status); }; }; then
19786 ac_header_compiler=yes
19787else
19788 echo "$as_me: failed program was:" >&5
19650fd6
AS
19789sed 's/^/| /' conftest.$ac_ext >&5
19790
c0d27fcc
MR
19791ac_header_compiler=no
19792fi
edfaf76d 19793rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19794echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19795echo "${ECHO_T}$ac_header_compiler" >&6
19796
19797# Is the header present?
19798echo "$as_me:$LINENO: checking $ac_header presence" >&5
19799echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19800cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19801/* confdefs.h. */
19802_ACEOF
19803cat confdefs.h >>conftest.$ac_ext
19804cat >>conftest.$ac_ext <<_ACEOF
19805/* end confdefs.h. */
503d2be0
AS
19806#include <$ac_header>
19807_ACEOF
c0d27fcc 19808if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19809 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19810 ac_status=$?
6bae0ccf 19811 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19812 rm -f conftest.er1
19813 cat conftest.err >&5
c0d27fcc 19814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19815 (exit $ac_status); } >/dev/null; then
19816 if test -s conftest.err; then
19817 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19818 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19819 else
19820 ac_cpp_err=
19821 fi
19822else
19823 ac_cpp_err=yes
19824fi
19825if test -z "$ac_cpp_err"; then
c0d27fcc 19826 ac_header_preproc=yes
503d2be0
AS
19827else
19828 echo "$as_me: failed program was:" >&5
19650fd6
AS
19829sed 's/^/| /' conftest.$ac_ext >&5
19830
c0d27fcc 19831 ac_header_preproc=no
a21616bd 19832fi
503d2be0 19833rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19834echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19835echo "${ECHO_T}$ac_header_preproc" >&6
19836
19837# So? What about this header?
edfaf76d
LK
19838case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19839 yes:no: )
c0d27fcc
MR
19840 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19841echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19842 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19843echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19844 ac_header_preproc=yes
19650fd6 19845 ;;
edfaf76d 19846 no:yes:* )
c0d27fcc
MR
19847 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19848echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19849 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19850echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19851 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19852echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19853 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19854echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19855 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19856echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19857 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19858echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19859 (
19860 cat <<\_ASBOX
edfaf76d
LK
19861## ------------------------------------------ ##
19862## Report this to the AC_PACKAGE_NAME lists. ##
19863## ------------------------------------------ ##
19650fd6
AS
19864_ASBOX
19865 ) |
19866 sed "s/^/$as_me: WARNING: /" >&2
19867 ;;
c0d27fcc
MR
19868esac
19869echo "$as_me:$LINENO: checking for $ac_header" >&5
19870echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19871if eval "test \"\${$as_ac_Header+set}\" = set"; then
19872 echo $ECHO_N "(cached) $ECHO_C" >&6
19873else
edfaf76d 19874 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19875fi
c0d27fcc 19876echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19877echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19878
19879fi
503d2be0 19880if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19881 cat >>confdefs.h <<_ACEOF
503d2be0 19882#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19883_ACEOF
a21616bd
KR
19884
19885fi
c0d27fcc 19886
a21616bd
KR
19887done
19888
98418dba 19889fi
c0d27fcc 19890
925c2f3f
EZ
19891done
19892
98418dba 19893fi
c0d27fcc 19894
925c2f3f 19895done
98418dba 19896
c0d27fcc 19897
925c2f3f
EZ
19898for ac_header in krb.h
19899do
19900as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19901if eval "test \"\${$as_ac_Header+set}\" = set"; then
19902 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
19903echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19904if eval "test \"\${$as_ac_Header+set}\" = set"; then
19905 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19906fi
19907echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19908echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19909else
19910 # Is the header compilable?
19911echo "$as_me:$LINENO: checking $ac_header usability" >&5
19912echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19913cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19914/* confdefs.h. */
19915_ACEOF
19916cat confdefs.h >>conftest.$ac_ext
19917cat >>conftest.$ac_ext <<_ACEOF
19918/* end confdefs.h. */
c0d27fcc
MR
19919$ac_includes_default
19920#include <$ac_header>
19921_ACEOF
19922rm -f conftest.$ac_objext
19923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19924 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19925 ac_status=$?
edfaf76d
LK
19926 grep -v '^ *+' conftest.er1 >conftest.err
19927 rm -f conftest.er1
19928 cat conftest.err >&5
c0d27fcc
MR
19929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19930 (exit $ac_status); } &&
8ae52ca6 19931 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
19932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19933 (eval $ac_try) 2>&5
19934 ac_status=$?
19935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19936 (exit $ac_status); }; } &&
19937 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19939 (eval $ac_try) 2>&5
19940 ac_status=$?
19941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19942 (exit $ac_status); }; }; then
19943 ac_header_compiler=yes
925c2f3f 19944else
c0d27fcc 19945 echo "$as_me: failed program was:" >&5
19650fd6
AS
19946sed 's/^/| /' conftest.$ac_ext >&5
19947
c0d27fcc
MR
19948ac_header_compiler=no
19949fi
edfaf76d 19950rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19951echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19952echo "${ECHO_T}$ac_header_compiler" >&6
19953
19954# Is the header present?
19955echo "$as_me:$LINENO: checking $ac_header presence" >&5
19956echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19957cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19958/* confdefs.h. */
19959_ACEOF
19960cat confdefs.h >>conftest.$ac_ext
19961cat >>conftest.$ac_ext <<_ACEOF
19962/* end confdefs.h. */
503d2be0
AS
19963#include <$ac_header>
19964_ACEOF
c0d27fcc 19965if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19966 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19967 ac_status=$?
6bae0ccf 19968 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19969 rm -f conftest.er1
19970 cat conftest.err >&5
c0d27fcc 19971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19972 (exit $ac_status); } >/dev/null; then
19973 if test -s conftest.err; then
19974 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19975 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19976 else
19977 ac_cpp_err=
19978 fi
19979else
19980 ac_cpp_err=yes
19981fi
19982if test -z "$ac_cpp_err"; then
c0d27fcc 19983 ac_header_preproc=yes
503d2be0
AS
19984else
19985 echo "$as_me: failed program was:" >&5
19650fd6
AS
19986sed 's/^/| /' conftest.$ac_ext >&5
19987
c0d27fcc 19988 ac_header_preproc=no
a21616bd 19989fi
503d2be0 19990rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19991echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19992echo "${ECHO_T}$ac_header_preproc" >&6
19993
19994# So? What about this header?
edfaf76d
LK
19995case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19996 yes:no: )
c0d27fcc
MR
19997 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19998echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19999 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20000echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20001 ac_header_preproc=yes
19650fd6 20002 ;;
edfaf76d 20003 no:yes:* )
c0d27fcc
MR
20004 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20005echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20006 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20007echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20008 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20009echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20010 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20011echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20012 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20013echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20014 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20015echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20016 (
20017 cat <<\_ASBOX
edfaf76d
LK
20018## ------------------------------------------ ##
20019## Report this to the AC_PACKAGE_NAME lists. ##
20020## ------------------------------------------ ##
19650fd6
AS
20021_ASBOX
20022 ) |
20023 sed "s/^/$as_me: WARNING: /" >&2
20024 ;;
c0d27fcc
MR
20025esac
20026echo "$as_me:$LINENO: checking for $ac_header" >&5
20027echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20028if eval "test \"\${$as_ac_Header+set}\" = set"; then
20029 echo $ECHO_N "(cached) $ECHO_C" >&6
20030else
edfaf76d 20031 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20032fi
c0d27fcc 20033echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20034echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20035
20036fi
503d2be0 20037if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20038 cat >>confdefs.h <<_ACEOF
503d2be0 20039#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20040_ACEOF
503d2be0 20041
a21616bd 20042else
503d2be0
AS
20043
20044for ac_header in kerberosIV/krb.h
a21616bd 20045do
503d2be0 20046as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20047if eval "test \"\${$as_ac_Header+set}\" = set"; then
20048 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20049echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20050if eval "test \"\${$as_ac_Header+set}\" = set"; then
20051 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20052fi
20053echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20054echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20055else
c0d27fcc
MR
20056 # Is the header compilable?
20057echo "$as_me:$LINENO: checking $ac_header usability" >&5
20058echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20059cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20060/* confdefs.h. */
20061_ACEOF
20062cat confdefs.h >>conftest.$ac_ext
20063cat >>conftest.$ac_ext <<_ACEOF
20064/* end confdefs.h. */
c0d27fcc
MR
20065$ac_includes_default
20066#include <$ac_header>
20067_ACEOF
20068rm -f conftest.$ac_objext
20069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20070 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20071 ac_status=$?
edfaf76d
LK
20072 grep -v '^ *+' conftest.er1 >conftest.err
20073 rm -f conftest.er1
20074 cat conftest.err >&5
c0d27fcc
MR
20075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20076 (exit $ac_status); } &&
8ae52ca6 20077 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
20078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20079 (eval $ac_try) 2>&5
20080 ac_status=$?
20081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20082 (exit $ac_status); }; } &&
20083 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20085 (eval $ac_try) 2>&5
20086 ac_status=$?
20087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20088 (exit $ac_status); }; }; then
20089 ac_header_compiler=yes
20090else
20091 echo "$as_me: failed program was:" >&5
19650fd6
AS
20092sed 's/^/| /' conftest.$ac_ext >&5
20093
c0d27fcc
MR
20094ac_header_compiler=no
20095fi
edfaf76d 20096rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20097echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20098echo "${ECHO_T}$ac_header_compiler" >&6
20099
20100# Is the header present?
20101echo "$as_me:$LINENO: checking $ac_header presence" >&5
20102echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20103cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20104/* confdefs.h. */
20105_ACEOF
20106cat confdefs.h >>conftest.$ac_ext
20107cat >>conftest.$ac_ext <<_ACEOF
20108/* end confdefs.h. */
503d2be0
AS
20109#include <$ac_header>
20110_ACEOF
c0d27fcc 20111if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20112 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20113 ac_status=$?
6bae0ccf 20114 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20115 rm -f conftest.er1
20116 cat conftest.err >&5
c0d27fcc 20117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20118 (exit $ac_status); } >/dev/null; then
20119 if test -s conftest.err; then
20120 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20121 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20122 else
20123 ac_cpp_err=
20124 fi
20125else
20126 ac_cpp_err=yes
20127fi
20128if test -z "$ac_cpp_err"; then
c0d27fcc 20129 ac_header_preproc=yes
503d2be0
AS
20130else
20131 echo "$as_me: failed program was:" >&5
19650fd6
AS
20132sed 's/^/| /' conftest.$ac_ext >&5
20133
c0d27fcc 20134 ac_header_preproc=no
a21616bd 20135fi
503d2be0 20136rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20137echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20138echo "${ECHO_T}$ac_header_preproc" >&6
20139
20140# So? What about this header?
edfaf76d
LK
20141case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20142 yes:no: )
c0d27fcc
MR
20143 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20144echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20145 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20146echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20147 ac_header_preproc=yes
19650fd6 20148 ;;
edfaf76d 20149 no:yes:* )
c0d27fcc
MR
20150 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20151echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20152 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20153echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20154 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20155echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20156 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20157echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20158 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20159echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20160 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20161echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20162 (
20163 cat <<\_ASBOX
edfaf76d
LK
20164## ------------------------------------------ ##
20165## Report this to the AC_PACKAGE_NAME lists. ##
20166## ------------------------------------------ ##
19650fd6
AS
20167_ASBOX
20168 ) |
20169 sed "s/^/$as_me: WARNING: /" >&2
20170 ;;
c0d27fcc
MR
20171esac
20172echo "$as_me:$LINENO: checking for $ac_header" >&5
20173echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20174if eval "test \"\${$as_ac_Header+set}\" = set"; then
20175 echo $ECHO_N "(cached) $ECHO_C" >&6
20176else
edfaf76d 20177 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20178fi
c0d27fcc 20179echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20180echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20181
20182fi
503d2be0 20183if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20184 cat >>confdefs.h <<_ACEOF
503d2be0 20185#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20186_ACEOF
503d2be0 20187
a21616bd 20188else
503d2be0
AS
20189
20190for ac_header in kerberos/krb.h
a21616bd 20191do
503d2be0 20192as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20193if eval "test \"\${$as_ac_Header+set}\" = set"; then
20194 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20195echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20196if eval "test \"\${$as_ac_Header+set}\" = set"; then
20197 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20198fi
20199echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20200echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20201else
c0d27fcc
MR
20202 # Is the header compilable?
20203echo "$as_me:$LINENO: checking $ac_header usability" >&5
20204echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20205cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20206/* confdefs.h. */
20207_ACEOF
20208cat confdefs.h >>conftest.$ac_ext
20209cat >>conftest.$ac_ext <<_ACEOF
20210/* end confdefs.h. */
c0d27fcc
MR
20211$ac_includes_default
20212#include <$ac_header>
20213_ACEOF
20214rm -f conftest.$ac_objext
20215if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20216 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20217 ac_status=$?
edfaf76d
LK
20218 grep -v '^ *+' conftest.er1 >conftest.err
20219 rm -f conftest.er1
20220 cat conftest.err >&5
c0d27fcc
MR
20221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20222 (exit $ac_status); } &&
8ae52ca6 20223 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
20224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20225 (eval $ac_try) 2>&5
20226 ac_status=$?
20227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20228 (exit $ac_status); }; } &&
20229 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20231 (eval $ac_try) 2>&5
20232 ac_status=$?
20233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20234 (exit $ac_status); }; }; then
20235 ac_header_compiler=yes
20236else
20237 echo "$as_me: failed program was:" >&5
19650fd6
AS
20238sed 's/^/| /' conftest.$ac_ext >&5
20239
c0d27fcc
MR
20240ac_header_compiler=no
20241fi
edfaf76d 20242rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20243echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20244echo "${ECHO_T}$ac_header_compiler" >&6
20245
20246# Is the header present?
20247echo "$as_me:$LINENO: checking $ac_header presence" >&5
20248echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20249cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20250/* confdefs.h. */
20251_ACEOF
20252cat confdefs.h >>conftest.$ac_ext
20253cat >>conftest.$ac_ext <<_ACEOF
20254/* end confdefs.h. */
503d2be0
AS
20255#include <$ac_header>
20256_ACEOF
c0d27fcc 20257if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20258 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20259 ac_status=$?
6bae0ccf 20260 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20261 rm -f conftest.er1
20262 cat conftest.err >&5
c0d27fcc 20263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20264 (exit $ac_status); } >/dev/null; then
20265 if test -s conftest.err; then
20266 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20267 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20268 else
20269 ac_cpp_err=
20270 fi
20271else
20272 ac_cpp_err=yes
20273fi
20274if test -z "$ac_cpp_err"; then
c0d27fcc 20275 ac_header_preproc=yes
503d2be0
AS
20276else
20277 echo "$as_me: failed program was:" >&5
19650fd6
AS
20278sed 's/^/| /' conftest.$ac_ext >&5
20279
c0d27fcc 20280 ac_header_preproc=no
a21616bd 20281fi
503d2be0 20282rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20283echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20284echo "${ECHO_T}$ac_header_preproc" >&6
35996d22
AS
20285
20286# So? What about this header?
edfaf76d
LK
20287case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20288 yes:no: )
35996d22
AS
20289 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20290echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20291 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20292echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20293 ac_header_preproc=yes
19650fd6 20294 ;;
edfaf76d 20295 no:yes:* )
c0d27fcc
MR
20296 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20297echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20298 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20299echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20300 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20301echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20302 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20303echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20304 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20305echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20306 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20307echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20308 (
20309 cat <<\_ASBOX
edfaf76d
LK
20310## ------------------------------------------ ##
20311## Report this to the AC_PACKAGE_NAME lists. ##
20312## ------------------------------------------ ##
19650fd6
AS
20313_ASBOX
20314 ) |
20315 sed "s/^/$as_me: WARNING: /" >&2
20316 ;;
c0d27fcc
MR
20317esac
20318echo "$as_me:$LINENO: checking for $ac_header" >&5
20319echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20320if eval "test \"\${$as_ac_Header+set}\" = set"; then
20321 echo $ECHO_N "(cached) $ECHO_C" >&6
20322else
edfaf76d 20323 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20324fi
c0d27fcc 20325echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20326echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20327
20328fi
503d2be0 20329if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20330 cat >>confdefs.h <<_ACEOF
503d2be0 20331#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20332_ACEOF
503d2be0 20333
a21616bd 20334fi
c0d27fcc 20335
a21616bd
KR
20336done
20337
20338fi
c0d27fcc 20339
a21616bd
KR
20340done
20341
20342fi
c0d27fcc 20343
a21616bd
KR
20344done
20345
20346 fi
503d2be0
AS
20347
20348for ac_header in com_err.h
a21616bd 20349do
503d2be0 20350as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20351if eval "test \"\${$as_ac_Header+set}\" = set"; then
20352 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20353echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20354if eval "test \"\${$as_ac_Header+set}\" = set"; then
20355 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20356fi
20357echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20358echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20359else
c0d27fcc
MR
20360 # Is the header compilable?
20361echo "$as_me:$LINENO: checking $ac_header usability" >&5
20362echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20363cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20364/* confdefs.h. */
20365_ACEOF
20366cat confdefs.h >>conftest.$ac_ext
20367cat >>conftest.$ac_ext <<_ACEOF
20368/* end confdefs.h. */
c0d27fcc
MR
20369$ac_includes_default
20370#include <$ac_header>
20371_ACEOF
20372rm -f conftest.$ac_objext
20373if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d
LK
20374 (eval $ac_compile) 2>conftest.er1
20375 ac_status=$?
20376 grep -v '^ *+' conftest.er1 >conftest.err
20377 rm -f conftest.er1
20378 cat conftest.err >&5
20379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20380 (exit $ac_status); } &&
8ae52ca6 20381 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
20382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20383 (eval $ac_try) 2>&5
35996d22
AS
20384 ac_status=$?
20385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
20386 (exit $ac_status); }; } &&
20387 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20389 (eval $ac_try) 2>&5
20390 ac_status=$?
20391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20392 (exit $ac_status); }; }; then
20393 ac_header_compiler=yes
20394else
20395 echo "$as_me: failed program was:" >&5
19650fd6
AS
20396sed 's/^/| /' conftest.$ac_ext >&5
20397
c0d27fcc
MR
20398ac_header_compiler=no
20399fi
edfaf76d 20400rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20401echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20402echo "${ECHO_T}$ac_header_compiler" >&6
20403
20404# Is the header present?
20405echo "$as_me:$LINENO: checking $ac_header presence" >&5
20406echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20407cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20408/* confdefs.h. */
20409_ACEOF
20410cat confdefs.h >>conftest.$ac_ext
20411cat >>conftest.$ac_ext <<_ACEOF
20412/* end confdefs.h. */
503d2be0
AS
20413#include <$ac_header>
20414_ACEOF
c0d27fcc 20415if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20416 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20417 ac_status=$?
6bae0ccf 20418 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20419 rm -f conftest.er1
20420 cat conftest.err >&5
c0d27fcc 20421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20422 (exit $ac_status); } >/dev/null; then
20423 if test -s conftest.err; then
20424 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20425 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20426 else
20427 ac_cpp_err=
20428 fi
20429else
20430 ac_cpp_err=yes
20431fi
20432if test -z "$ac_cpp_err"; then
c0d27fcc 20433 ac_header_preproc=yes
503d2be0
AS
20434else
20435 echo "$as_me: failed program was:" >&5
19650fd6
AS
20436sed 's/^/| /' conftest.$ac_ext >&5
20437
c0d27fcc 20438 ac_header_preproc=no
a21616bd 20439fi
503d2be0 20440rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20441echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20442echo "${ECHO_T}$ac_header_preproc" >&6
20443
20444# So? What about this header?
edfaf76d
LK
20445case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20446 yes:no: )
c0d27fcc
MR
20447 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20448echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20449 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20450echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20451 ac_header_preproc=yes
19650fd6 20452 ;;
edfaf76d 20453 no:yes:* )
c0d27fcc
MR
20454 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20455echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20456 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20457echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20458 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20459echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20460 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20461echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20462 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20463echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20464 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20465echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20466 (
20467 cat <<\_ASBOX
edfaf76d
LK
20468## ------------------------------------------ ##
20469## Report this to the AC_PACKAGE_NAME lists. ##
20470## ------------------------------------------ ##
19650fd6
AS
20471_ASBOX
20472 ) |
20473 sed "s/^/$as_me: WARNING: /" >&2
20474 ;;
c0d27fcc
MR
20475esac
20476echo "$as_me:$LINENO: checking for $ac_header" >&5
20477echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20478if eval "test \"\${$as_ac_Header+set}\" = set"; then
20479 echo $ECHO_N "(cached) $ECHO_C" >&6
20480else
edfaf76d 20481 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20482fi
c0d27fcc 20483echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20484echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20485
20486fi
503d2be0 20487if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20488 cat >>confdefs.h <<_ACEOF
503d2be0 20489#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20490_ACEOF
503d2be0 20491
a21616bd 20492fi
c0d27fcc 20493
a21616bd
KR
20494done
20495
20496fi
20497
ba4481b5
DL
20498# Solaris requires -lintl if you want strerror (which calls dgettext)
20499# to return localized messages.
503d2be0 20500
c0d27fcc 20501echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
20502echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
20503if test "${ac_cv_lib_intl_dgettext+set}" = set; then
20504 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20505else
503d2be0 20506 ac_check_lib_save_LIBS=$LIBS
ba4481b5 20507LIBS="-lintl $LIBS"
503d2be0 20508cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20509/* confdefs.h. */
20510_ACEOF
20511cat confdefs.h >>conftest.$ac_ext
20512cat >>conftest.$ac_ext <<_ACEOF
20513/* end confdefs.h. */
503d2be0 20514
ba4481b5 20515/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20516#ifdef __cplusplus
20517extern "C"
20518#endif
ba4481b5 20519/* We use char because int might match the return type of a gcc2
503d2be0
AS
20520 builtin and then its argument prototype would still apply. */
20521char dgettext ();
20522int
20523main ()
20524{
20525dgettext ();
20526 ;
20527 return 0;
20528}
20529_ACEOF
20530rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20531if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 20532 (eval $ac_link) 2>conftest.er1
503d2be0 20533 ac_status=$?
edfaf76d
LK
20534 grep -v '^ *+' conftest.er1 >conftest.err
20535 rm -f conftest.er1
20536 cat conftest.err >&5
c0d27fcc 20537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20538 (exit $ac_status); } &&
8ae52ca6 20539 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
20540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20541 (eval $ac_try) 2>&5
20542 ac_status=$?
20543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20544 (exit $ac_status); }; } &&
20545 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20547 (eval $ac_try) 2>&5
20548 ac_status=$?
c0d27fcc 20549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20550 (exit $ac_status); }; }; then
20551 ac_cv_lib_intl_dgettext=yes
20552else
20553 echo "$as_me: failed program was:" >&5
19650fd6
AS
20554sed 's/^/| /' conftest.$ac_ext >&5
20555
503d2be0
AS
20556ac_cv_lib_intl_dgettext=no
20557fi
edfaf76d
LK
20558rm -f conftest.err conftest.$ac_objext \
20559 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20560LIBS=$ac_check_lib_save_LIBS
20561fi
c0d27fcc 20562echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
20563echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
20564if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 20565 cat >>confdefs.h <<_ACEOF
503d2be0 20566#define HAVE_LIBINTL 1
c0d27fcc 20567_ACEOF
ba4481b5
DL
20568
20569 LIBS="-lintl $LIBS"
20570
ba4481b5
DL
20571fi
20572
c0d27fcc
MR
20573
20574echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
20575echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
20576if test "${emacs_cv_localtime_cache+set}" = set; then
20577 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
20578else
20579 if test x$ac_cv_func_tzset = xyes; then
20580if test "$cross_compiling" = yes; then
20581 # If we have tzset, assume the worst when cross-compiling.
20582emacs_cv_localtime_cache=yes
20583else
503d2be0 20584 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20585/* confdefs.h. */
20586_ACEOF
20587cat confdefs.h >>conftest.$ac_ext
20588cat >>conftest.$ac_ext <<_ACEOF
20589/* end confdefs.h. */
ba4481b5 20590#include <time.h>
ba4481b5
DL
20591extern char **environ;
20592unset_TZ ()
20593{
20594 char **from, **to;
20595 for (to = from = environ; (*to = *from); from++)
20596 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
20597 to++;
20598}
20599char TZ_GMT0[] = "TZ=GMT0";
20600char TZ_PST8[] = "TZ=PST8";
20601main()
20602{
20603 time_t now = time ((time_t *) 0);
20604 int hour_GMT0, hour_unset;
20605 if (putenv (TZ_GMT0) != 0)
20606 exit (1);
20607 hour_GMT0 = localtime (&now)->tm_hour;
20608 unset_TZ ();
20609 hour_unset = localtime (&now)->tm_hour;
20610 if (putenv (TZ_PST8) != 0)
20611 exit (1);
20612 if (localtime (&now)->tm_hour == hour_GMT0)
20613 exit (1);
20614 unset_TZ ();
20615 if (localtime (&now)->tm_hour != hour_unset)
20616 exit (1);
20617 exit (0);
20618}
503d2be0
AS
20619_ACEOF
20620rm -f conftest$ac_exeext
c0d27fcc 20621if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
20622 (eval $ac_link) 2>&5
20623 ac_status=$?
c0d27fcc 20624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20625 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 20626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20627 (eval $ac_try) 2>&5
20628 ac_status=$?
c0d27fcc 20629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20630 (exit $ac_status); }; }; then
ba4481b5
DL
20631 emacs_cv_localtime_cache=no
20632else
503d2be0
AS
20633 echo "$as_me: program exited with status $ac_status" >&5
20634echo "$as_me: failed program was:" >&5
19650fd6
AS
20635sed 's/^/| /' conftest.$ac_ext >&5
20636
c0d27fcc 20637( exit $ac_status )
503d2be0 20638emacs_cv_localtime_cache=yes
ba4481b5 20639fi
edfaf76d 20640rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 20641fi
ba4481b5
DL
20642else
20643 # If we lack tzset, report that localtime does not cache TZ,
20644 # since we can't invalidate the cache if we don't have tzset.
20645 emacs_cv_localtime_cache=no
20646fi
20647fi
c0d27fcc 20648echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 20649echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 20650if test $emacs_cv_localtime_cache = yes; then
b936fae4 20651
c0d27fcc 20652cat >>confdefs.h <<\_ACEOF
ba4481b5 20653#define LOCALTIME_CACHE 1
c0d27fcc 20654_ACEOF
ba4481b5
DL
20655
20656fi
20657
20658if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
20659
20660for ac_func in gettimeofday
48d4b120 20661do
503d2be0 20662as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 20663echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
20664echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20665if eval "test \"\${$as_ac_var+set}\" = set"; then
20666 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 20667else
503d2be0 20668 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20669/* confdefs.h. */
20670_ACEOF
20671cat confdefs.h >>conftest.$ac_ext
20672cat >>conftest.$ac_ext <<_ACEOF
20673/* end confdefs.h. */
edfaf76d
LK
20674/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20675 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20676#define $ac_func innocuous_$ac_func
20677
48d4b120 20678/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20679 which can conflict with char $ac_func (); below.
20680 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20681 <limits.h> exists even on freestanding compilers. */
edfaf76d 20682
19650fd6
AS
20683#ifdef __STDC__
20684# include <limits.h>
20685#else
20686# include <assert.h>
20687#endif
edfaf76d
LK
20688
20689#undef $ac_func
20690
48d4b120 20691/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20692#ifdef __cplusplus
20693extern "C"
19650fd6 20694{
503d2be0 20695#endif
48d4b120 20696/* We use char because int might match the return type of a gcc2
503d2be0
AS
20697 builtin and then its argument prototype would still apply. */
20698char $ac_func ();
48d4b120
DL
20699/* The GNU C library defines this for functions which it implements
20700 to always fail with ENOSYS. Some functions are actually named
20701 something starting with __ and the normal name is an alias. */
20702#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20703choke me
20704#else
19650fd6
AS
20705char (*f) () = $ac_func;
20706#endif
20707#ifdef __cplusplus
20708}
cd958eb3
MB
20709#endif
20710
19650fd6
AS
20711int
20712main ()
20713{
20714return f != $ac_func;
503d2be0
AS
20715 ;
20716 return 0;
20717}
20718_ACEOF
20719rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20720if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 20721 (eval $ac_link) 2>conftest.er1
503d2be0 20722 ac_status=$?
edfaf76d
LK
20723 grep -v '^ *+' conftest.er1 >conftest.err
20724 rm -f conftest.er1
20725 cat conftest.err >&5
c0d27fcc 20726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20727 (exit $ac_status); } &&
8ae52ca6 20728 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
20729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20730 (eval $ac_try) 2>&5
20731 ac_status=$?
20732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20733 (exit $ac_status); }; } &&
20734 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20736 (eval $ac_try) 2>&5
20737 ac_status=$?
c0d27fcc 20738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20739 (exit $ac_status); }; }; then
20740 eval "$as_ac_var=yes"
20741else
20742 echo "$as_me: failed program was:" >&5
19650fd6
AS
20743sed 's/^/| /' conftest.$ac_ext >&5
20744
503d2be0
AS
20745eval "$as_ac_var=no"
20746fi
edfaf76d
LK
20747rm -f conftest.err conftest.$ac_objext \
20748 conftest$ac_exeext conftest.$ac_ext
503d2be0 20749fi
c0d27fcc 20750echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
20751echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20752if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 20753 cat >>confdefs.h <<_ACEOF
503d2be0 20754#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 20755_ACEOF
48d4b120 20756
48d4b120
DL
20757fi
20758done
20759
b936fae4 20760 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 20761 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
20762echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
20763if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
20764 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20765else
503d2be0 20766 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20767/* confdefs.h. */
20768_ACEOF
20769cat confdefs.h >>conftest.$ac_ext
20770cat >>conftest.$ac_ext <<_ACEOF
20771/* end confdefs.h. */
ba4481b5 20772
a3f08d9e
DL
20773#ifdef TIME_WITH_SYS_TIME
20774#include <sys/time.h>
20775#include <time.h>
20776#else
20777#ifdef HAVE_SYS_TIME_H
20778#include <sys/time.h>
20779#else
20780#include <time.h>
20781#endif
20782#endif
503d2be0
AS
20783int
20784main ()
20785{
a3f08d9e 20786struct timeval time;
b936fae4 20787 gettimeofday (&time, 0);
503d2be0
AS
20788 ;
20789 return 0;
20790}
20791_ACEOF
20792rm -f conftest.$ac_objext
c0d27fcc 20793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20794 (eval $ac_compile) 2>conftest.er1
503d2be0 20795 ac_status=$?
edfaf76d
LK
20796 grep -v '^ *+' conftest.er1 >conftest.err
20797 rm -f conftest.er1
20798 cat conftest.err >&5
c0d27fcc 20799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20800 (exit $ac_status); } &&
8ae52ca6 20801 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
20802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20803 (eval $ac_try) 2>&5
20804 ac_status=$?
20805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20806 (exit $ac_status); }; } &&
20807 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20809 (eval $ac_try) 2>&5
20810 ac_status=$?
c0d27fcc 20811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20812 (exit $ac_status); }; }; then
ba4481b5
DL
20813 emacs_cv_gettimeofday_two_arguments=yes
20814else
503d2be0 20815 echo "$as_me: failed program was:" >&5
19650fd6
AS
20816sed 's/^/| /' conftest.$ac_ext >&5
20817
503d2be0 20818emacs_cv_gettimeofday_two_arguments=no
ba4481b5 20819fi
edfaf76d 20820rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 20821fi
c0d27fcc 20822echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 20823echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
20824 if test $emacs_cv_gettimeofday_two_arguments = no; then
20825
c0d27fcc 20826cat >>confdefs.h <<\_ACEOF
ba4481b5 20827#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 20828_ACEOF
ba4481b5 20829
b936fae4 20830 fi
ba4481b5
DL
20831 fi
20832fi
20833
973a76b1
DL
20834# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
20835echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20836echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
20837if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
20838 echo $ECHO_N "(cached) $ECHO_C" >&6
20839else
20840 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20841/* confdefs.h. */
20842_ACEOF
20843cat confdefs.h >>conftest.$ac_ext
20844cat >>conftest.$ac_ext <<_ACEOF
20845/* end confdefs.h. */
973a76b1
DL
20846#include <sys/types.h>
20847#include <$ac_cv_struct_tm>
20848
20849
20850int
20851main ()
20852{
20853static struct tm ac_aggr;
20854if (ac_aggr.tm_zone)
20855return 0;
20856 ;
20857 return 0;
20858}
20859_ACEOF
20860rm -f conftest.$ac_objext
20861if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20862 (eval $ac_compile) 2>conftest.er1
973a76b1 20863 ac_status=$?
edfaf76d
LK
20864 grep -v '^ *+' conftest.er1 >conftest.err
20865 rm -f conftest.er1
20866 cat conftest.err >&5
973a76b1
DL
20867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20868 (exit $ac_status); } &&
8ae52ca6 20869 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
20870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20871 (eval $ac_try) 2>&5
20872 ac_status=$?
20873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20874 (exit $ac_status); }; } &&
20875 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
20876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20877 (eval $ac_try) 2>&5
20878 ac_status=$?
20879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20880 (exit $ac_status); }; }; then
20881 ac_cv_member_struct_tm_tm_zone=yes
20882else
20883 echo "$as_me: failed program was:" >&5
19650fd6
AS
20884sed 's/^/| /' conftest.$ac_ext >&5
20885
973a76b1 20886cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20887/* confdefs.h. */
20888_ACEOF
20889cat confdefs.h >>conftest.$ac_ext
20890cat >>conftest.$ac_ext <<_ACEOF
20891/* end confdefs.h. */
973a76b1
DL
20892#include <sys/types.h>
20893#include <$ac_cv_struct_tm>
20894
20895
20896int
20897main ()
20898{
20899static struct tm ac_aggr;
20900if (sizeof ac_aggr.tm_zone)
20901return 0;
20902 ;
20903 return 0;
20904}
20905_ACEOF
20906rm -f conftest.$ac_objext
20907if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20908 (eval $ac_compile) 2>conftest.er1
973a76b1 20909 ac_status=$?
edfaf76d
LK
20910 grep -v '^ *+' conftest.er1 >conftest.err
20911 rm -f conftest.er1
20912 cat conftest.err >&5
973a76b1
DL
20913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20914 (exit $ac_status); } &&
8ae52ca6 20915 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
20916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20917 (eval $ac_try) 2>&5
20918 ac_status=$?
20919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20920 (exit $ac_status); }; } &&
20921 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
20922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20923 (eval $ac_try) 2>&5
20924 ac_status=$?
20925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20926 (exit $ac_status); }; }; then
20927 ac_cv_member_struct_tm_tm_zone=yes
20928else
20929 echo "$as_me: failed program was:" >&5
19650fd6
AS
20930sed 's/^/| /' conftest.$ac_ext >&5
20931
973a76b1
DL
20932ac_cv_member_struct_tm_tm_zone=no
20933fi
edfaf76d 20934rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 20935fi
edfaf76d 20936rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
20937fi
20938echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20939echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
20940if test $ac_cv_member_struct_tm_tm_zone = yes; then
20941
20942cat >>confdefs.h <<_ACEOF
20943#define HAVE_STRUCT_TM_TM_ZONE 1
20944_ACEOF
20945
20946
20947fi
20948
20949if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20950
20951cat >>confdefs.h <<\_ACEOF
20952#define HAVE_TM_ZONE 1
20953_ACEOF
20954
20955else
20956 echo "$as_me:$LINENO: checking for tzname" >&5
20957echo $ECHO_N "checking for tzname... $ECHO_C" >&6
20958if test "${ac_cv_var_tzname+set}" = set; then
20959 echo $ECHO_N "(cached) $ECHO_C" >&6
20960else
20961 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20962/* confdefs.h. */
20963_ACEOF
20964cat confdefs.h >>conftest.$ac_ext
20965cat >>conftest.$ac_ext <<_ACEOF
20966/* end confdefs.h. */
973a76b1
DL
20967#include <time.h>
20968#ifndef tzname /* For SGI. */
20969extern char *tzname[]; /* RS6000 and others reject char **tzname. */
20970#endif
20971
20972int
20973main ()
20974{
20975atoi(*tzname);
20976 ;
20977 return 0;
20978}
20979_ACEOF
20980rm -f conftest.$ac_objext conftest$ac_exeext
20981if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 20982 (eval $ac_link) 2>conftest.er1
973a76b1 20983 ac_status=$?
edfaf76d
LK
20984 grep -v '^ *+' conftest.er1 >conftest.err
20985 rm -f conftest.er1
20986 cat conftest.err >&5
973a76b1
DL
20987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20988 (exit $ac_status); } &&
8ae52ca6 20989 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
20990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20991 (eval $ac_try) 2>&5
20992 ac_status=$?
20993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20994 (exit $ac_status); }; } &&
20995 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
20996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20997 (eval $ac_try) 2>&5
20998 ac_status=$?
20999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21000 (exit $ac_status); }; }; then
21001 ac_cv_var_tzname=yes
21002else
21003 echo "$as_me: failed program was:" >&5
19650fd6
AS
21004sed 's/^/| /' conftest.$ac_ext >&5
21005
973a76b1
DL
21006ac_cv_var_tzname=no
21007fi
edfaf76d
LK
21008rm -f conftest.err conftest.$ac_objext \
21009 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
21010fi
21011echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21012echo "${ECHO_T}$ac_cv_var_tzname" >&6
21013 if test $ac_cv_var_tzname = yes; then
21014
21015cat >>confdefs.h <<\_ACEOF
21016#define HAVE_TZNAME 1
21017_ACEOF
21018
21019 fi
21020fi
21021
21022
48d4b120 21023if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 21024 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
21025echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
21026if test "${emacs_cv_struct_timezone+set}" = set; then
21027 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 21028else
503d2be0 21029 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21030/* confdefs.h. */
21031_ACEOF
21032cat confdefs.h >>conftest.$ac_ext
21033cat >>conftest.$ac_ext <<_ACEOF
21034/* end confdefs.h. */
48d4b120 21035#include <sys/time.h>
503d2be0
AS
21036int
21037main ()
21038{
48d4b120 21039struct timezone tz;
503d2be0
AS
21040 ;
21041 return 0;
21042}
21043_ACEOF
21044rm -f conftest.$ac_objext
c0d27fcc 21045if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21046 (eval $ac_compile) 2>conftest.er1
503d2be0 21047 ac_status=$?
edfaf76d
LK
21048 grep -v '^ *+' conftest.er1 >conftest.err
21049 rm -f conftest.er1
21050 cat conftest.err >&5
c0d27fcc 21051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21052 (exit $ac_status); } &&
8ae52ca6 21053 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
21054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21055 (eval $ac_try) 2>&5
21056 ac_status=$?
21057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21058 (exit $ac_status); }; } &&
21059 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21061 (eval $ac_try) 2>&5
21062 ac_status=$?
c0d27fcc 21063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21064 (exit $ac_status); }; }; then
48d4b120
DL
21065 if test "$cross_compiling" = yes; then
21066 emacs_cv_struct_timezone=yes
21067else
503d2be0 21068 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21069/* confdefs.h. */
21070_ACEOF
21071cat confdefs.h >>conftest.$ac_ext
21072cat >>conftest.$ac_ext <<_ACEOF
21073/* end confdefs.h. */
48d4b120
DL
21074
21075#ifdef TIME_WITH_SYS_TIME
21076#include <sys/time.h>
21077#include <time.h>
21078#else
21079#ifdef HAVE_SYS_TIME_H
21080#include <sys/time.h>
21081#else
21082#include <time.h>
21083#endif
21084#endif
21085main () {
21086 struct timeval time;
21087 struct timezone dummy;
21088 exit (gettimeofday (&time, &dummy));
21089}
503d2be0
AS
21090_ACEOF
21091rm -f conftest$ac_exeext
c0d27fcc 21092if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21093 (eval $ac_link) 2>&5
21094 ac_status=$?
c0d27fcc 21095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21096 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21098 (eval $ac_try) 2>&5
21099 ac_status=$?
c0d27fcc 21100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21101 (exit $ac_status); }; }; then
48d4b120
DL
21102 emacs_cv_struct_timezone=yes
21103else
503d2be0
AS
21104 echo "$as_me: program exited with status $ac_status" >&5
21105echo "$as_me: failed program was:" >&5
19650fd6
AS
21106sed 's/^/| /' conftest.$ac_ext >&5
21107
c0d27fcc 21108( exit $ac_status )
503d2be0 21109emacs_cv_struct_timezone=no
48d4b120 21110fi
edfaf76d 21111rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 21112fi
48d4b120 21113else
503d2be0 21114 echo "$as_me: failed program was:" >&5
19650fd6
AS
21115sed 's/^/| /' conftest.$ac_ext >&5
21116
503d2be0 21117emacs_cv_struct_timezone=no
48d4b120 21118fi
edfaf76d 21119rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
48d4b120 21120fi
c0d27fcc 21121echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 21122echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
21123fi
21124
ba4481b5 21125ok_so_far=yes
c0d27fcc 21126echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
21127echo $ECHO_N "checking for socket... $ECHO_C" >&6
21128if test "${ac_cv_func_socket+set}" = set; then
21129 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21130else
503d2be0 21131 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21132/* confdefs.h. */
21133_ACEOF
21134cat confdefs.h >>conftest.$ac_ext
21135cat >>conftest.$ac_ext <<_ACEOF
21136/* end confdefs.h. */
edfaf76d
LK
21137/* Define socket to an innocuous variant, in case <limits.h> declares socket.
21138 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21139#define socket innocuous_socket
21140
ba4481b5 21141/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21142 which can conflict with char socket (); below.
21143 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21144 <limits.h> exists even on freestanding compilers. */
edfaf76d 21145
19650fd6
AS
21146#ifdef __STDC__
21147# include <limits.h>
21148#else
21149# include <assert.h>
21150#endif
edfaf76d
LK
21151
21152#undef socket
21153
ba4481b5 21154/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
21155#ifdef __cplusplus
21156extern "C"
19650fd6 21157{
503d2be0 21158#endif
ba4481b5 21159/* We use char because int might match the return type of a gcc2
503d2be0
AS
21160 builtin and then its argument prototype would still apply. */
21161char socket ();
ba4481b5
DL
21162/* The GNU C library defines this for functions which it implements
21163 to always fail with ENOSYS. Some functions are actually named
21164 something starting with __ and the normal name is an alias. */
21165#if defined (__stub_socket) || defined (__stub___socket)
21166choke me
21167#else
19650fd6
AS
21168char (*f) () = socket;
21169#endif
21170#ifdef __cplusplus
21171}
cd958eb3
MB
21172#endif
21173
19650fd6
AS
21174int
21175main ()
21176{
21177return f != socket;
503d2be0
AS
21178 ;
21179 return 0;
21180}
21181_ACEOF
21182rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 21183if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 21184 (eval $ac_link) 2>conftest.er1
503d2be0 21185 ac_status=$?
edfaf76d
LK
21186 grep -v '^ *+' conftest.er1 >conftest.err
21187 rm -f conftest.er1
21188 cat conftest.err >&5
c0d27fcc 21189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21190 (exit $ac_status); } &&
8ae52ca6 21191 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
21192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21193 (eval $ac_try) 2>&5
21194 ac_status=$?
21195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21196 (exit $ac_status); }; } &&
21197 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 21198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21199 (eval $ac_try) 2>&5
21200 ac_status=$?
c0d27fcc 21201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21202 (exit $ac_status); }; }; then
21203 ac_cv_func_socket=yes
21204else
21205 echo "$as_me: failed program was:" >&5
19650fd6
AS
21206sed 's/^/| /' conftest.$ac_ext >&5
21207
503d2be0
AS
21208ac_cv_func_socket=no
21209fi
edfaf76d
LK
21210rm -f conftest.err conftest.$ac_objext \
21211 conftest$ac_exeext conftest.$ac_ext
503d2be0 21212fi
c0d27fcc 21213echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
21214echo "${ECHO_T}$ac_cv_func_socket" >&6
21215if test $ac_cv_func_socket = yes; then
ba4481b5
DL
21216 :
21217else
503d2be0 21218 ok_so_far=no
ba4481b5
DL
21219fi
21220
21221if test $ok_so_far = yes; then
c0d27fcc
MR
21222 if test "${ac_cv_header_netinet_in_h+set}" = set; then
21223 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
21224echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
21225if test "${ac_cv_header_netinet_in_h+set}" = set; then
21226 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
21227fi
21228echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
21229echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 21230else
c0d27fcc
MR
21231 # Is the header compilable?
21232echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
21233echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
21234cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21235/* confdefs.h. */
21236_ACEOF
21237cat confdefs.h >>conftest.$ac_ext
21238cat >>conftest.$ac_ext <<_ACEOF
21239/* end confdefs.h. */
c0d27fcc
MR
21240$ac_includes_default
21241#include <netinet/in.h>
21242_ACEOF
21243rm -f conftest.$ac_objext
21244if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21245 (eval $ac_compile) 2>conftest.er1
c0d27fcc 21246 ac_status=$?
edfaf76d
LK
21247 grep -v '^ *+' conftest.er1 >conftest.err
21248 rm -f conftest.er1
21249 cat conftest.err >&5
c0d27fcc
MR
21250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21251 (exit $ac_status); } &&
8ae52ca6 21252 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
21253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21254 (eval $ac_try) 2>&5
21255 ac_status=$?
21256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21257 (exit $ac_status); }; } &&
21258 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
21259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21260 (eval $ac_try) 2>&5
21261 ac_status=$?
21262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21263 (exit $ac_status); }; }; then
21264 ac_header_compiler=yes
21265else
21266 echo "$as_me: failed program was:" >&5
19650fd6
AS
21267sed 's/^/| /' conftest.$ac_ext >&5
21268
c0d27fcc
MR
21269ac_header_compiler=no
21270fi
edfaf76d 21271rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
21272echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21273echo "${ECHO_T}$ac_header_compiler" >&6
21274
21275# Is the header present?
21276echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
21277echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
21278cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21279/* confdefs.h. */
21280_ACEOF
21281cat confdefs.h >>conftest.$ac_ext
21282cat >>conftest.$ac_ext <<_ACEOF
21283/* end confdefs.h. */
ba4481b5 21284#include <netinet/in.h>
503d2be0 21285_ACEOF
c0d27fcc 21286if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21287 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21288 ac_status=$?
6bae0ccf 21289 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21290 rm -f conftest.er1
21291 cat conftest.err >&5
c0d27fcc 21292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21293 (exit $ac_status); } >/dev/null; then
21294 if test -s conftest.err; then
21295 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21296 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21297 else
21298 ac_cpp_err=
21299 fi
21300else
21301 ac_cpp_err=yes
21302fi
21303if test -z "$ac_cpp_err"; then
c0d27fcc 21304 ac_header_preproc=yes
ba4481b5 21305else
503d2be0 21306 echo "$as_me: failed program was:" >&5
19650fd6
AS
21307sed 's/^/| /' conftest.$ac_ext >&5
21308
c0d27fcc 21309 ac_header_preproc=no
ba4481b5 21310fi
503d2be0 21311rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
21312echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21313echo "${ECHO_T}$ac_header_preproc" >&6
21314
21315# So? What about this header?
edfaf76d
LK
21316case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21317 yes:no: )
c0d27fcc
MR
21318 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
21319echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21320 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
21321echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
21322 ac_header_preproc=yes
19650fd6 21323 ;;
edfaf76d 21324 no:yes:* )
c0d27fcc
MR
21325 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
21326echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21327 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
21328echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
21329 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
21330echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
21331 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
21332echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21333 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 21334echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21335 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
21336echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
21337 (
21338 cat <<\_ASBOX
edfaf76d
LK
21339## ------------------------------------------ ##
21340## Report this to the AC_PACKAGE_NAME lists. ##
21341## ------------------------------------------ ##
19650fd6
AS
21342_ASBOX
21343 ) |
21344 sed "s/^/$as_me: WARNING: /" >&2
21345 ;;
c0d27fcc
MR
21346esac
21347echo "$as_me:$LINENO: checking for netinet/in.h" >&5
21348echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
21349if test "${ac_cv_header_netinet_in_h+set}" = set; then
21350 echo $ECHO_N "(cached) $ECHO_C" >&6
21351else
21352 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 21353fi
c0d27fcc 21354echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 21355echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
21356
21357fi
503d2be0 21358if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
21359 :
21360else
503d2be0 21361 ok_so_far=no
ba4481b5
DL
21362fi
21363
c0d27fcc 21364
ba4481b5
DL
21365fi
21366if test $ok_so_far = yes; then
c0d27fcc
MR
21367 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21368 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
21369echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
21370if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21371 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
21372fi
21373echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
21374echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 21375else
c0d27fcc
MR
21376 # Is the header compilable?
21377echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
21378echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
21379cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21380/* confdefs.h. */
21381_ACEOF
21382cat confdefs.h >>conftest.$ac_ext
21383cat >>conftest.$ac_ext <<_ACEOF
21384/* end confdefs.h. */
c0d27fcc
MR
21385$ac_includes_default
21386#include <arpa/inet.h>
21387_ACEOF
21388rm -f conftest.$ac_objext
21389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21390 (eval $ac_compile) 2>conftest.er1
c0d27fcc 21391 ac_status=$?
edfaf76d
LK
21392 grep -v '^ *+' conftest.er1 >conftest.err
21393 rm -f conftest.er1
21394 cat conftest.err >&5
c0d27fcc
MR
21395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21396 (exit $ac_status); } &&
8ae52ca6 21397 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
21398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21399 (eval $ac_try) 2>&5
21400 ac_status=$?
21401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21402 (exit $ac_status); }; } &&
21403 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
21404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21405 (eval $ac_try) 2>&5
21406 ac_status=$?
21407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21408 (exit $ac_status); }; }; then
21409 ac_header_compiler=yes
21410else
21411 echo "$as_me: failed program was:" >&5
19650fd6
AS
21412sed 's/^/| /' conftest.$ac_ext >&5
21413
c0d27fcc
MR
21414ac_header_compiler=no
21415fi
edfaf76d 21416rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
21417echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21418echo "${ECHO_T}$ac_header_compiler" >&6
21419
21420# Is the header present?
21421echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
21422echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
21423cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21424/* confdefs.h. */
21425_ACEOF
21426cat confdefs.h >>conftest.$ac_ext
21427cat >>conftest.$ac_ext <<_ACEOF
21428/* end confdefs.h. */
ba4481b5 21429#include <arpa/inet.h>
503d2be0 21430_ACEOF
c0d27fcc 21431if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21432 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21433 ac_status=$?
6bae0ccf 21434 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21435 rm -f conftest.er1
21436 cat conftest.err >&5
c0d27fcc 21437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21438 (exit $ac_status); } >/dev/null; then
21439 if test -s conftest.err; then
21440 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21441 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21442 else
21443 ac_cpp_err=
21444 fi
21445else
21446 ac_cpp_err=yes
21447fi
21448if test -z "$ac_cpp_err"; then
c0d27fcc 21449 ac_header_preproc=yes
ba4481b5 21450else
503d2be0 21451 echo "$as_me: failed program was:" >&5
19650fd6
AS
21452sed 's/^/| /' conftest.$ac_ext >&5
21453
c0d27fcc 21454 ac_header_preproc=no
ba4481b5 21455fi
503d2be0 21456rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
21457echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21458echo "${ECHO_T}$ac_header_preproc" >&6
21459
21460# So? What about this header?
edfaf76d
LK
21461case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21462 yes:no: )
c0d27fcc
MR
21463 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
21464echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21465 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
21466echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
21467 ac_header_preproc=yes
19650fd6 21468 ;;
edfaf76d 21469 no:yes:* )
c0d27fcc
MR
21470 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
21471echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21472 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
21473echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
21474 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
21475echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
21476 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
21477echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21478 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 21479echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21480 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
21481echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
21482 (
21483 cat <<\_ASBOX
edfaf76d
LK
21484## ------------------------------------------ ##
21485## Report this to the AC_PACKAGE_NAME lists. ##
21486## ------------------------------------------ ##
19650fd6
AS
21487_ASBOX
21488 ) |
21489 sed "s/^/$as_me: WARNING: /" >&2
21490 ;;
c0d27fcc
MR
21491esac
21492echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
21493echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
21494if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21495 echo $ECHO_N "(cached) $ECHO_C" >&6
21496else
21497 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 21498fi
c0d27fcc 21499echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 21500echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
21501
21502fi
503d2be0 21503if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
21504 :
21505else
503d2be0 21506 ok_so_far=no
ba4481b5
DL
21507fi
21508
c0d27fcc 21509
ba4481b5
DL
21510fi
21511if test $ok_so_far = yes; then
b936fae4 21512
c0d27fcc 21513cat >>confdefs.h <<\_ACEOF
ba4481b5 21514#define HAVE_INET_SOCKETS 1
c0d27fcc 21515_ACEOF
ba4481b5
DL
21516
21517fi
21518
2d2b6695 21519
7862d3a8 21520for ac_header in sys/ioctl.h
2d2b6695
KS
21521do
21522as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21523if eval "test \"\${$as_ac_Header+set}\" = set"; then
21524 echo "$as_me:$LINENO: checking for $ac_header" >&5
21525echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21526if eval "test \"\${$as_ac_Header+set}\" = set"; then
21527 echo $ECHO_N "(cached) $ECHO_C" >&6
21528fi
21529echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21530echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21531else
21532 # Is the header compilable?
21533echo "$as_me:$LINENO: checking $ac_header usability" >&5
21534echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
21535cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21536/* confdefs.h. */
21537_ACEOF
21538cat confdefs.h >>conftest.$ac_ext
21539cat >>conftest.$ac_ext <<_ACEOF
21540/* end confdefs.h. */
21541$ac_includes_default
21542#include <$ac_header>
21543_ACEOF
21544rm -f conftest.$ac_objext
21545if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21546 (eval $ac_compile) 2>conftest.er1
2d2b6695 21547 ac_status=$?
edfaf76d
LK
21548 grep -v '^ *+' conftest.er1 >conftest.err
21549 rm -f conftest.er1
21550 cat conftest.err >&5
2d2b6695
KS
21551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21552 (exit $ac_status); } &&
8ae52ca6 21553 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
21554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21555 (eval $ac_try) 2>&5
21556 ac_status=$?
21557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21558 (exit $ac_status); }; } &&
21559 { ac_try='test -s conftest.$ac_objext'
2d2b6695
KS
21560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21561 (eval $ac_try) 2>&5
21562 ac_status=$?
21563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21564 (exit $ac_status); }; }; then
21565 ac_header_compiler=yes
21566else
21567 echo "$as_me: failed program was:" >&5
21568sed 's/^/| /' conftest.$ac_ext >&5
21569
21570ac_header_compiler=no
21571fi
edfaf76d 21572rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2d2b6695
KS
21573echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21574echo "${ECHO_T}$ac_header_compiler" >&6
21575
21576# Is the header present?
21577echo "$as_me:$LINENO: checking $ac_header presence" >&5
21578echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21579cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21580/* confdefs.h. */
21581_ACEOF
21582cat confdefs.h >>conftest.$ac_ext
21583cat >>conftest.$ac_ext <<_ACEOF
21584/* end confdefs.h. */
21585#include <$ac_header>
21586_ACEOF
21587if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21588 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21589 ac_status=$?
21590 grep -v '^ *+' conftest.er1 >conftest.err
21591 rm -f conftest.er1
21592 cat conftest.err >&5
21593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21594 (exit $ac_status); } >/dev/null; then
21595 if test -s conftest.err; then
21596 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21597 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2d2b6695
KS
21598 else
21599 ac_cpp_err=
21600 fi
21601else
21602 ac_cpp_err=yes
21603fi
21604if test -z "$ac_cpp_err"; then
21605 ac_header_preproc=yes
21606else
21607 echo "$as_me: failed program was:" >&5
21608sed 's/^/| /' conftest.$ac_ext >&5
21609
21610 ac_header_preproc=no
21611fi
21612rm -f conftest.err conftest.$ac_ext
21613echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21614echo "${ECHO_T}$ac_header_preproc" >&6
21615
21616# So? What about this header?
edfaf76d
LK
21617case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21618 yes:no: )
2d2b6695
KS
21619 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21620echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21621 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21622echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21623 ac_header_preproc=yes
2d2b6695 21624 ;;
edfaf76d 21625 no:yes:* )
2d2b6695
KS
21626 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21627echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21628 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21629echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21630 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21631echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21632 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21633echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
21634 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21635echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21636 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21637echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
2d2b6695
KS
21638 (
21639 cat <<\_ASBOX
edfaf76d
LK
21640## ------------------------------------------ ##
21641## Report this to the AC_PACKAGE_NAME lists. ##
21642## ------------------------------------------ ##
2d2b6695
KS
21643_ASBOX
21644 ) |
21645 sed "s/^/$as_me: WARNING: /" >&2
21646 ;;
21647esac
21648echo "$as_me:$LINENO: checking for $ac_header" >&5
21649echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21650if eval "test \"\${$as_ac_Header+set}\" = set"; then
21651 echo $ECHO_N "(cached) $ECHO_C" >&6
21652else
edfaf76d 21653 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695
KS
21654fi
21655echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21656echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21657
21658fi
21659if test `eval echo '${'$as_ac_Header'}'` = yes; then
21660 cat >>confdefs.h <<_ACEOF
21661#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21662_ACEOF
21663
21664fi
21665
21666done
21667
21668
ba4481b5 21669if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 21670
c0d27fcc 21671cat >>confdefs.h <<\_ACEOF
ba4481b5 21672#define HAVE_AIX_SMT_EXP 1
c0d27fcc 21673_ACEOF
ba4481b5
DL
21674
21675fi
21676
c0d27fcc 21677echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 21678echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 21679if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 21680 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 21681echo "${ECHO_T}yes" >&6
b936fae4 21682
c0d27fcc 21683cat >>confdefs.h <<\_ACEOF
3d9fec71 21684#define HAVE_DEV_PTMX 1
c0d27fcc 21685_ACEOF
3d9fec71
DL
21686
21687else
c0d27fcc 21688 echo "$as_me:$LINENO: result: no" >&5
503d2be0 21689echo "${ECHO_T}no" >&6
3d9fec71
DL
21690fi
21691
c0d27fcc 21692echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
21693echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21694if test "${ac_cv_type_pid_t+set}" = set; then
21695 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 21696else
503d2be0 21697 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21698/* confdefs.h. */
21699_ACEOF
21700cat confdefs.h >>conftest.$ac_ext
21701cat >>conftest.$ac_ext <<_ACEOF
21702/* end confdefs.h. */
503d2be0
AS
21703$ac_includes_default
21704int
21705main ()
21706{
21707if ((pid_t *) 0)
21708 return 0;
21709if (sizeof (pid_t))
21710 return 0;
21711 ;
21712 return 0;
21713}
21714_ACEOF
21715rm -f conftest.$ac_objext
c0d27fcc 21716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21717 (eval $ac_compile) 2>conftest.er1
503d2be0 21718 ac_status=$?
edfaf76d
LK
21719 grep -v '^ *+' conftest.er1 >conftest.err
21720 rm -f conftest.er1
21721 cat conftest.err >&5
c0d27fcc 21722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21723 (exit $ac_status); } &&
8ae52ca6 21724 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
21725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21726 (eval $ac_try) 2>&5
21727 ac_status=$?
21728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21729 (exit $ac_status); }; } &&
21730 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21732 (eval $ac_try) 2>&5
21733 ac_status=$?
c0d27fcc 21734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21735 (exit $ac_status); }; }; then
647847ea
DL
21736 ac_cv_type_pid_t=yes
21737else
503d2be0 21738 echo "$as_me: failed program was:" >&5
19650fd6
AS
21739sed 's/^/| /' conftest.$ac_ext >&5
21740
503d2be0 21741ac_cv_type_pid_t=no
647847ea 21742fi
edfaf76d 21743rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 21744fi
c0d27fcc 21745echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
21746echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21747if test $ac_cv_type_pid_t = yes; then
21748 :
21749else
21750
c0d27fcc 21751cat >>confdefs.h <<_ACEOF
647847ea 21752#define pid_t int
c0d27fcc 21753_ACEOF
647847ea
DL
21754
21755fi
21756
c0d27fcc
MR
21757
21758
503d2be0
AS
21759for ac_header in unistd.h vfork.h
21760do
21761as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
21762if eval "test \"\${$as_ac_Header+set}\" = set"; then
21763 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
21764echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21765if eval "test \"\${$as_ac_Header+set}\" = set"; then
21766 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
21767fi
21768echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21769echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 21770else
c0d27fcc
MR
21771 # Is the header compilable?
21772echo "$as_me:$LINENO: checking $ac_header usability" >&5
21773echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
21774cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21775/* confdefs.h. */
21776_ACEOF
21777cat confdefs.h >>conftest.$ac_ext
21778cat >>conftest.$ac_ext <<_ACEOF
21779/* end confdefs.h. */
c0d27fcc
MR
21780$ac_includes_default
21781#include <$ac_header>
21782_ACEOF
21783rm -f conftest.$ac_objext
21784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21785 (eval $ac_compile) 2>conftest.er1
c0d27fcc 21786 ac_status=$?
edfaf76d
LK
21787 grep -v '^ *+' conftest.er1 >conftest.err
21788 rm -f conftest.er1
21789 cat conftest.err >&5
c0d27fcc
MR
21790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21791 (exit $ac_status); } &&
8ae52ca6 21792 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
21793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21794 (eval $ac_try) 2>&5
21795 ac_status=$?
21796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21797 (exit $ac_status); }; } &&
21798 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
21799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21800 (eval $ac_try) 2>&5
21801 ac_status=$?
21802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21803 (exit $ac_status); }; }; then
21804 ac_header_compiler=yes
21805else
21806 echo "$as_me: failed program was:" >&5
19650fd6
AS
21807sed 's/^/| /' conftest.$ac_ext >&5
21808
c0d27fcc
MR
21809ac_header_compiler=no
21810fi
edfaf76d 21811rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
21812echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21813echo "${ECHO_T}$ac_header_compiler" >&6
21814
21815# Is the header present?
21816echo "$as_me:$LINENO: checking $ac_header presence" >&5
21817echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21818cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21819/* confdefs.h. */
21820_ACEOF
21821cat confdefs.h >>conftest.$ac_ext
21822cat >>conftest.$ac_ext <<_ACEOF
21823/* end confdefs.h. */
503d2be0
AS
21824#include <$ac_header>
21825_ACEOF
c0d27fcc 21826if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21827 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21828 ac_status=$?
6bae0ccf 21829 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21830 rm -f conftest.er1
21831 cat conftest.err >&5
c0d27fcc 21832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21833 (exit $ac_status); } >/dev/null; then
21834 if test -s conftest.err; then
21835 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21836 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21837 else
21838 ac_cpp_err=
21839 fi
647847ea 21840else
503d2be0
AS
21841 ac_cpp_err=yes
21842fi
21843if test -z "$ac_cpp_err"; then
c0d27fcc 21844 ac_header_preproc=yes
647847ea 21845else
503d2be0 21846 echo "$as_me: failed program was:" >&5
19650fd6
AS
21847sed 's/^/| /' conftest.$ac_ext >&5
21848
c0d27fcc 21849 ac_header_preproc=no
647847ea 21850fi
503d2be0 21851rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
21852echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21853echo "${ECHO_T}$ac_header_preproc" >&6
21854
21855# So? What about this header?
edfaf76d
LK
21856case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21857 yes:no: )
c0d27fcc
MR
21858 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21859echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21860 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21861echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21862 ac_header_preproc=yes
19650fd6 21863 ;;
edfaf76d 21864 no:yes:* )
c0d27fcc
MR
21865 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21866echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21867 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21868echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21869 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21870echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21871 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21872echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21873 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21874echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21875 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21876echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
21877 (
21878 cat <<\_ASBOX
edfaf76d
LK
21879## ------------------------------------------ ##
21880## Report this to the AC_PACKAGE_NAME lists. ##
21881## ------------------------------------------ ##
19650fd6
AS
21882_ASBOX
21883 ) |
21884 sed "s/^/$as_me: WARNING: /" >&2
21885 ;;
c0d27fcc
MR
21886esac
21887echo "$as_me:$LINENO: checking for $ac_header" >&5
21888echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21889if eval "test \"\${$as_ac_Header+set}\" = set"; then
21890 echo $ECHO_N "(cached) $ECHO_C" >&6
21891else
edfaf76d 21892 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 21893fi
c0d27fcc 21894echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 21895echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
21896
21897fi
503d2be0 21898if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21899 cat >>confdefs.h <<_ACEOF
503d2be0 21900#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21901_ACEOF
647847ea 21902
73b77ee5 21903fi
c0d27fcc 21904
503d2be0 21905done
73b77ee5 21906
c0d27fcc
MR
21907
21908
503d2be0
AS
21909for ac_func in fork vfork
21910do
21911as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 21912echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
21913echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21914if eval "test \"\${$as_ac_var+set}\" = set"; then
21915 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 21916else
503d2be0 21917 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21918/* confdefs.h. */
21919_ACEOF
21920cat confdefs.h >>conftest.$ac_ext
21921cat >>conftest.$ac_ext <<_ACEOF
21922/* end confdefs.h. */
edfaf76d
LK
21923/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21924 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21925#define $ac_func innocuous_$ac_func
21926
fa0b693c 21927/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21928 which can conflict with char $ac_func (); below.
21929 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21930 <limits.h> exists even on freestanding compilers. */
edfaf76d 21931
19650fd6
AS
21932#ifdef __STDC__
21933# include <limits.h>
21934#else
21935# include <assert.h>
21936#endif
edfaf76d
LK
21937
21938#undef $ac_func
21939
fa0b693c 21940/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
21941#ifdef __cplusplus
21942extern "C"
19650fd6 21943{
503d2be0 21944#endif
fa0b693c 21945/* We use char because int might match the return type of a gcc2
503d2be0
AS
21946 builtin and then its argument prototype would still apply. */
21947char $ac_func ();
fa0b693c
GM
21948/* The GNU C library defines this for functions which it implements
21949 to always fail with ENOSYS. Some functions are actually named
21950 something starting with __ and the normal name is an alias. */
503d2be0 21951#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
21952choke me
21953#else
19650fd6
AS
21954char (*f) () = $ac_func;
21955#endif
21956#ifdef __cplusplus
21957}
fa0b693c
GM
21958#endif
21959
19650fd6
AS
21960int
21961main ()
21962{
21963return f != $ac_func;
503d2be0
AS
21964 ;
21965 return 0;
21966}
21967_ACEOF
21968rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 21969if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 21970 (eval $ac_link) 2>conftest.er1
503d2be0 21971 ac_status=$?
edfaf76d
LK
21972 grep -v '^ *+' conftest.er1 >conftest.err
21973 rm -f conftest.er1
21974 cat conftest.err >&5
c0d27fcc 21975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21976 (exit $ac_status); } &&
8ae52ca6 21977 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
21978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21979 (eval $ac_try) 2>&5
21980 ac_status=$?
21981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21982 (exit $ac_status); }; } &&
21983 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 21984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21985 (eval $ac_try) 2>&5
21986 ac_status=$?
c0d27fcc 21987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21988 (exit $ac_status); }; }; then
21989 eval "$as_ac_var=yes"
21990else
21991 echo "$as_me: failed program was:" >&5
19650fd6
AS
21992sed 's/^/| /' conftest.$ac_ext >&5
21993
503d2be0
AS
21994eval "$as_ac_var=no"
21995fi
edfaf76d
LK
21996rm -f conftest.err conftest.$ac_objext \
21997 conftest$ac_exeext conftest.$ac_ext
503d2be0 21998fi
c0d27fcc 21999echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
22000echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22001if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22002 cat >>confdefs.h <<_ACEOF
503d2be0 22003#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22004_ACEOF
503d2be0 22005
fa0b693c 22006fi
503d2be0 22007done
fa0b693c 22008
503d2be0 22009if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 22010 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
22011echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22012if test "${ac_cv_func_fork_works+set}" = set; then
22013 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22014else
503d2be0
AS
22015 if test "$cross_compiling" = yes; then
22016 ac_cv_func_fork_works=cross
22017else
22018 cat >conftest.$ac_ext <<_ACEOF
c3a63088
KL
22019/* confdefs.h. */
22020_ACEOF
22021cat confdefs.h >>conftest.$ac_ext
22022cat >>conftest.$ac_ext <<_ACEOF
22023/* end confdefs.h. */
22024$ac_includes_default
22025int
22026main ()
22027{
22028
22029 /* By Ruediger Kuhlmann. */
22030 if (fork() < 0)
22031 exit (1);
22032 exit (0);
22033
22034 ;
22035 return 0;
22036}
503d2be0
AS
22037_ACEOF
22038rm -f conftest$ac_exeext
c0d27fcc 22039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
22040 (eval $ac_link) 2>&5
22041 ac_status=$?
c0d27fcc 22042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 22044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22045 (eval $ac_try) 2>&5
22046 ac_status=$?
c0d27fcc 22047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22048 (exit $ac_status); }; }; then
22049 ac_cv_func_fork_works=yes
22050else
22051 echo "$as_me: program exited with status $ac_status" >&5
22052echo "$as_me: failed program was:" >&5
19650fd6
AS
22053sed 's/^/| /' conftest.$ac_ext >&5
22054
c0d27fcc 22055( exit $ac_status )
503d2be0
AS
22056ac_cv_func_fork_works=no
22057fi
edfaf76d 22058rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
22059fi
22060fi
c0d27fcc 22061echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
22062echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22063
6bae0ccf
DL
22064else
22065 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
22066fi
22067if test "x$ac_cv_func_fork_works" = xcross; then
22068 case $host in
22069 *-*-amigaos* | *-*-msdosdjgpp*)
22070 # Override, as these systems have only a dummy fork() stub
22071 ac_cv_func_fork_works=no
22072 ;;
22073 *)
22074 ac_cv_func_fork_works=yes
22075 ;;
22076 esac
c0d27fcc
MR
22077 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
22078echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 22079fi
73b77ee5 22080ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 22081if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 22082 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
22083echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22084if test "${ac_cv_func_vfork_works+set}" = set; then
22085 echo $ECHO_N "(cached) $ECHO_C" >&6
22086else
22087 if test "$cross_compiling" = yes; then
22088 ac_cv_func_vfork_works=cross
fa0b693c 22089else
503d2be0 22090 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22091/* confdefs.h. */
22092_ACEOF
22093cat confdefs.h >>conftest.$ac_ext
22094cat >>conftest.$ac_ext <<_ACEOF
22095/* end confdefs.h. */
73b77ee5
GM
22096/* Thanks to Paul Eggert for this test. */
22097#include <stdio.h>
19650fd6 22098#include <stdlib.h>
fa0b693c 22099#include <sys/types.h>
73b77ee5 22100#include <sys/stat.h>
19650fd6 22101#include <sys/wait.h>
503d2be0
AS
22102#if HAVE_UNISTD_H
22103# include <unistd.h>
73b77ee5 22104#endif
503d2be0
AS
22105#if HAVE_VFORK_H
22106# include <vfork.h>
73b77ee5
GM
22107#endif
22108/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
22109 argument registers are propagated back to the parent. The compiler
22110 is told about this with #include <vfork.h>, but some compilers
22111 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
22112 static variable whose address is put into a register that is
22113 clobbered by the vfork. */
19650fd6 22114static void
fa0b693c 22115#ifdef __cplusplus
73b77ee5 22116sparc_address_test (int arg)
503d2be0 22117# else
73b77ee5 22118sparc_address_test (arg) int arg;
fa0b693c 22119#endif
fa0b693c 22120{
73b77ee5
GM
22121 static pid_t child;
22122 if (!child) {
22123 child = vfork ();
22124 if (child < 0) {
22125 perror ("vfork");
22126 _exit(2);
22127 }
22128 if (!child) {
22129 arg = getpid();
22130 write(-1, "", 0);
22131 _exit (arg);
22132 }
22133 }
22134}
503d2be0
AS
22135
22136int
22137main ()
22138{
73b77ee5
GM
22139 pid_t parent = getpid ();
22140 pid_t child;
fa0b693c 22141
19650fd6 22142 sparc_address_test (0);
fa0b693c 22143
73b77ee5 22144 child = vfork ();
fa0b693c 22145
73b77ee5 22146 if (child == 0) {
503d2be0
AS
22147 /* Here is another test for sparc vfork register problems. This
22148 test uses lots of local variables, at least as many local
22149 variables as main has allocated so far including compiler
22150 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
22151 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
22152 reuse the register of parent for one of the local variables,
22153 since it will think that parent can't possibly be used any more
22154 in this routine. Assigning to the local variable will thus
22155 munge parent in the parent process. */
73b77ee5
GM
22156 pid_t
22157 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22158 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22159 /* Convince the compiler that p..p7 are live; otherwise, it might
22160 use the same hardware register for all 8 local variables. */
22161 if (p != p1 || p != p2 || p != p3 || p != p4
22162 || p != p5 || p != p6 || p != p7)
22163 _exit(1);
fa0b693c 22164
503d2be0
AS
22165 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22166 from child file descriptors. If the child closes a descriptor
22167 before it execs or exits, this munges the parent's descriptor
22168 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
22169 _exit(close(fileno(stdout)) != 0);
22170 } else {
22171 int status;
22172 struct stat st;
22173
22174 while (wait(&status) != child)
22175 ;
22176 exit(
22177 /* Was there some problem with vforking? */
22178 child < 0
22179
22180 /* Did the child fail? (This shouldn't happen.) */
22181 || status
22182
22183 /* Did the vfork/compiler bug occur? */
22184 || parent != getpid()
fa0b693c 22185
73b77ee5
GM
22186 /* Did the file descriptor bug occur? */
22187 || fstat(fileno(stdout), &st) != 0
22188 );
22189 }
22190}
503d2be0
AS
22191_ACEOF
22192rm -f conftest$ac_exeext
c0d27fcc 22193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
22194 (eval $ac_link) 2>&5
22195 ac_status=$?
c0d27fcc 22196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22197 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 22198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22199 (eval $ac_try) 2>&5
22200 ac_status=$?
c0d27fcc 22201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22202 (exit $ac_status); }; }; then
73b77ee5 22203 ac_cv_func_vfork_works=yes
fa0b693c 22204else
503d2be0
AS
22205 echo "$as_me: program exited with status $ac_status" >&5
22206echo "$as_me: failed program was:" >&5
19650fd6
AS
22207sed 's/^/| /' conftest.$ac_ext >&5
22208
c0d27fcc 22209( exit $ac_status )
503d2be0
AS
22210ac_cv_func_vfork_works=no
22211fi
edfaf76d 22212rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 22213fi
fa0b693c 22214fi
c0d27fcc 22215echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 22216echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 22217
503d2be0
AS
22218fi;
22219if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 22220 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
22221 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
22222echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
22223fi
22224
503d2be0
AS
22225if test "x$ac_cv_func_vfork_works" = xyes; then
22226
c0d27fcc 22227cat >>confdefs.h <<\_ACEOF
503d2be0 22228#define HAVE_WORKING_VFORK 1
c0d27fcc 22229_ACEOF
503d2be0
AS
22230
22231else
22232
c0d27fcc 22233cat >>confdefs.h <<\_ACEOF
73b77ee5 22234#define vfork fork
c0d27fcc 22235_ACEOF
fa0b693c
GM
22236
22237fi
503d2be0
AS
22238if test "x$ac_cv_func_fork_works" = xyes; then
22239
c0d27fcc 22240cat >>confdefs.h <<\_ACEOF
503d2be0 22241#define HAVE_WORKING_FORK 1
c0d27fcc 22242_ACEOF
fa0b693c 22243
503d2be0 22244fi
647847ea 22245
c0d27fcc 22246
6a3a24fa
JD
22247echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
22248echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
22249if test "${emacs_cv_langinfo_codeset+set}" = set; then
22250 echo $ECHO_N "(cached) $ECHO_C" >&6
22251else
22252 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22253/* confdefs.h. */
22254_ACEOF
22255cat confdefs.h >>conftest.$ac_ext
22256cat >>conftest.$ac_ext <<_ACEOF
22257/* end confdefs.h. */
6a3a24fa
JD
22258#include <langinfo.h>
22259int
22260main ()
22261{
22262char* cs = nl_langinfo(CODESET);
22263 ;
22264 return 0;
22265}
22266_ACEOF
22267rm -f conftest.$ac_objext conftest$ac_exeext
22268if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 22269 (eval $ac_link) 2>conftest.er1
6a3a24fa 22270 ac_status=$?
edfaf76d
LK
22271 grep -v '^ *+' conftest.er1 >conftest.err
22272 rm -f conftest.er1
22273 cat conftest.err >&5
6a3a24fa
JD
22274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22275 (exit $ac_status); } &&
8ae52ca6 22276 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
22277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22278 (eval $ac_try) 2>&5
22279 ac_status=$?
22280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22281 (exit $ac_status); }; } &&
22282 { ac_try='test -s conftest$ac_exeext'
6a3a24fa
JD
22283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22284 (eval $ac_try) 2>&5
22285 ac_status=$?
22286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22287 (exit $ac_status); }; }; then
22288 emacs_cv_langinfo_codeset=yes
22289else
22290 echo "$as_me: failed program was:" >&5
19650fd6
AS
22291sed 's/^/| /' conftest.$ac_ext >&5
22292
6a3a24fa
JD
22293emacs_cv_langinfo_codeset=no
22294fi
edfaf76d
LK
22295rm -f conftest.err conftest.$ac_objext \
22296 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
22297
22298fi
22299echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
22300echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
22301if test $emacs_cv_langinfo_codeset = yes; then
22302
22303cat >>confdefs.h <<\_ACEOF
22304#define HAVE_LANGINFO_CODESET 1
22305_ACEOF
22306
22307fi
22308
c0d27fcc 22309echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
22310echo $ECHO_N "checking for size_t... $ECHO_C" >&6
22311if test "${ac_cv_type_size_t+set}" = set; then
22312 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 22313else
503d2be0 22314 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22315/* confdefs.h. */
22316_ACEOF
22317cat confdefs.h >>conftest.$ac_ext
22318cat >>conftest.$ac_ext <<_ACEOF
22319/* end confdefs.h. */
503d2be0
AS
22320$ac_includes_default
22321int
22322main ()
22323{
22324if ((size_t *) 0)
22325 return 0;
22326if (sizeof (size_t))
22327 return 0;
22328 ;
22329 return 0;
22330}
22331_ACEOF
22332rm -f conftest.$ac_objext
c0d27fcc 22333if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22334 (eval $ac_compile) 2>conftest.er1
503d2be0 22335 ac_status=$?
edfaf76d
LK
22336 grep -v '^ *+' conftest.er1 >conftest.err
22337 rm -f conftest.er1
22338 cat conftest.err >&5
c0d27fcc 22339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22340 (exit $ac_status); } &&
8ae52ca6 22341 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
22342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22343 (eval $ac_try) 2>&5
22344 ac_status=$?
22345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22346 (exit $ac_status); }; } &&
22347 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 22348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22349 (eval $ac_try) 2>&5
22350 ac_status=$?
c0d27fcc 22351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22352 (exit $ac_status); }; }; then
8730a8da
DL
22353 ac_cv_type_size_t=yes
22354else
503d2be0 22355 echo "$as_me: failed program was:" >&5
19650fd6
AS
22356sed 's/^/| /' conftest.$ac_ext >&5
22357
503d2be0 22358ac_cv_type_size_t=no
8730a8da 22359fi
edfaf76d 22360rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 22361fi
c0d27fcc 22362echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
22363echo "${ECHO_T}$ac_cv_type_size_t" >&6
22364if test $ac_cv_type_size_t = yes; then
503d2be0 22365
c0d27fcc
MR
22366cat >>confdefs.h <<_ACEOF
22367#define HAVE_SIZE_T 1
22368_ACEOF
22369
8730a8da
DL
22370
22371fi
22372
c0d27fcc 22373
973a76b1
DL
22374echo "$as_me:$LINENO: checking for mbstate_t" >&5
22375echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
22376if test "${ac_cv_type_mbstate_t+set}" = set; then
22377 echo $ECHO_N "(cached) $ECHO_C" >&6
22378else
22379 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22380/* confdefs.h. */
22381_ACEOF
22382cat confdefs.h >>conftest.$ac_ext
22383cat >>conftest.$ac_ext <<_ACEOF
22384/* end confdefs.h. */
973a76b1
DL
22385$ac_includes_default
22386# include <wchar.h>
22387int
22388main ()
22389{
22390mbstate_t x; return sizeof x;
22391 ;
22392 return 0;
22393}
22394_ACEOF
22395rm -f conftest.$ac_objext
22396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22397 (eval $ac_compile) 2>conftest.er1
973a76b1 22398 ac_status=$?
edfaf76d
LK
22399 grep -v '^ *+' conftest.er1 >conftest.err
22400 rm -f conftest.er1
22401 cat conftest.err >&5
973a76b1
DL
22402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22403 (exit $ac_status); } &&
8ae52ca6 22404 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
22405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22406 (eval $ac_try) 2>&5
22407 ac_status=$?
22408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22409 (exit $ac_status); }; } &&
22410 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
22411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22412 (eval $ac_try) 2>&5
22413 ac_status=$?
22414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22415 (exit $ac_status); }; }; then
22416 ac_cv_type_mbstate_t=yes
22417else
22418 echo "$as_me: failed program was:" >&5
19650fd6
AS
22419sed 's/^/| /' conftest.$ac_ext >&5
22420
973a76b1
DL
22421ac_cv_type_mbstate_t=no
22422fi
edfaf76d 22423rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
22424fi
22425echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
22426echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
22427 if test $ac_cv_type_mbstate_t = yes; then
22428
22429cat >>confdefs.h <<\_ACEOF
22430#define HAVE_MBSTATE_T 1
22431_ACEOF
22432
22433 else
22434
22435cat >>confdefs.h <<\_ACEOF
22436#define mbstate_t int
22437_ACEOF
22438
22439 fi
22440
22044edf
DL
22441echo "$as_me:$LINENO: checking for C restrict keyword" >&5
22442echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
22443if test "${emacs_cv_c_restrict+set}" = set; then
22444 echo $ECHO_N "(cached) $ECHO_C" >&6
22445else
22446 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22447/* confdefs.h. */
22448_ACEOF
22449cat confdefs.h >>conftest.$ac_ext
22450cat >>conftest.$ac_ext <<_ACEOF
22451/* end confdefs.h. */
22044edf
DL
22452void fred (int *restrict x);
22453int
22454main ()
22455{
b936fae4 22456
22044edf
DL
22457 ;
22458 return 0;
22459}
c0d27fcc 22460_ACEOF
22044edf
DL
22461rm -f conftest.$ac_objext
22462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22463 (eval $ac_compile) 2>conftest.er1
22044edf 22464 ac_status=$?
edfaf76d
LK
22465 grep -v '^ *+' conftest.er1 >conftest.err
22466 rm -f conftest.er1
22467 cat conftest.err >&5
22044edf
DL
22468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22469 (exit $ac_status); } &&
8ae52ca6 22470 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
22471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22472 (eval $ac_try) 2>&5
22473 ac_status=$?
22474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22475 (exit $ac_status); }; } &&
22476 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
22477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22478 (eval $ac_try) 2>&5
22479 ac_status=$?
22480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22481 (exit $ac_status); }; }; then
22482 emacs_cv_c_restrict=yes
22483else
22484 echo "$as_me: failed program was:" >&5
19650fd6
AS
22485sed 's/^/| /' conftest.$ac_ext >&5
22486
22044edf 22487cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22488/* confdefs.h. */
22489_ACEOF
22490cat confdefs.h >>conftest.$ac_ext
22491cat >>conftest.$ac_ext <<_ACEOF
22492/* end confdefs.h. */
22044edf
DL
22493void fred (int *__restrict x);
22494int
22495main ()
22496{
c0d27fcc 22497
22044edf
DL
22498 ;
22499 return 0;
22500}
c0d27fcc 22501_ACEOF
22044edf
DL
22502rm -f conftest.$ac_objext
22503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22504 (eval $ac_compile) 2>conftest.er1
22044edf 22505 ac_status=$?
edfaf76d
LK
22506 grep -v '^ *+' conftest.er1 >conftest.err
22507 rm -f conftest.er1
22508 cat conftest.err >&5
22044edf
DL
22509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22510 (exit $ac_status); } &&
8ae52ca6 22511 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
22512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22513 (eval $ac_try) 2>&5
22514 ac_status=$?
22515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22516 (exit $ac_status); }; } &&
22517 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
22518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22519 (eval $ac_try) 2>&5
22520 ac_status=$?
22521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22522 (exit $ac_status); }; }; then
22523 emacs_cv_c_restrict=__restrict
22524else
22525 echo "$as_me: failed program was:" >&5
19650fd6
AS
22526sed 's/^/| /' conftest.$ac_ext >&5
22527
22044edf 22528emacs_cv_c_restrict=no
ba4481b5 22529fi
edfaf76d 22530rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22531fi
edfaf76d 22532rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22533fi
22044edf
DL
22534echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
22535echo "${ECHO_T}$emacs_cv_c_restrict" >&6
22536case "$emacs_cv_c_restrict" in
22537 yes) emacs_restrict=restrict;;
22538 no) emacs_restrict="";;
22539 *) emacs_restrict="$emacs_cv_c_restrict";;
22540esac
22541if test "$emacs_restrict" != __restrict; then
b936fae4 22542
22044edf
DL
22543cat >>confdefs.h <<_ACEOF
22544#define __restrict $emacs_restrict
c0d27fcc 22545_ACEOF
ba4481b5
DL
22546
22547fi
ba4481b5 22548
22044edf
DL
22549echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
22550echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
22551if test "${emacs_cv_c_restrict_arr+set}" = set; then
22552 echo $ECHO_N "(cached) $ECHO_C" >&6
22553else
22554 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22555/* confdefs.h. */
22556_ACEOF
22557cat confdefs.h >>conftest.$ac_ext
22558cat >>conftest.$ac_ext <<_ACEOF
22559/* end confdefs.h. */
22044edf
DL
22560void fred (int x[__restrict]);
22561int
22562main ()
22563{
b936fae4 22564
22044edf
DL
22565 ;
22566 return 0;
22567}
c0d27fcc 22568_ACEOF
22044edf
DL
22569rm -f conftest.$ac_objext
22570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22571 (eval $ac_compile) 2>conftest.er1
22044edf 22572 ac_status=$?
edfaf76d
LK
22573 grep -v '^ *+' conftest.er1 >conftest.err
22574 rm -f conftest.er1
22575 cat conftest.err >&5
22044edf
DL
22576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22577 (exit $ac_status); } &&
8ae52ca6 22578 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
edfaf76d
LK
22579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22580 (eval $ac_try) 2>&5
22581 ac_status=$?
22582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22583 (exit $ac_status); }; } &&
22584 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
22585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22586 (eval $ac_try) 2>&5
22587 ac_status=$?
22588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22589 (exit $ac_status); }; }; then
22590 emacs_cv_c_restrict_arr=yes
22591else
22592 echo "$as_me: failed program was:" >&5
19650fd6
AS
22593sed 's/^/| /' conftest.$ac_ext >&5
22594
22044edf 22595emacs_cv_c_restrict_arr=no
ba4481b5 22596fi
edfaf76d 22597rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf
DL
22598fi
22599echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
22600echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
22601if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 22602
c0d27fcc 22603cat >>confdefs.h <<\_ACEOF
22044edf 22604#define __restrict_arr __restrict
c0d27fcc 22605_ACEOF
ba4481b5 22606
ba4481b5
DL
22607fi
22608
c0d27fcc 22609
c0d27fcc 22610
22044edf
DL
22611# Set up the CFLAGS for real compilation, so we can substitute it.
22612CFLAGS="$REAL_CFLAGS"
22613CPPFLAGS="$REAL_CPPFLAGS"
22614
22615#### Find out which version of Emacs this is.
22616version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
22617 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
22618if test x"${version}" = x; then
22619 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
22620echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
22621 { (exit 1); exit 1; }; }
22622fi
22623
22624### Specify what sort of things we'll be editing into Makefile and config.h.
22625### Use configuration here uncanonicalized to avoid exceeding size limits.
22626
22627
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
22638
22639
22640
22641
22642
22643
22644
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
6a3a24fa 22658
22044edf
DL
22659
22660
22661cat >>confdefs.h <<_ACEOF
22662#define EMACS_CONFIGURATION "${canonical}"
22663_ACEOF
22664
22665
22666cat >>confdefs.h <<_ACEOF
22667#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
22668_ACEOF
22669
22670
22671cat >>confdefs.h <<_ACEOF
22672#define config_machfile "${machfile}"
22673_ACEOF
22674
22675
22676cat >>confdefs.h <<_ACEOF
22677#define config_opsysfile "${opsysfile}"
22678_ACEOF
22679
22680
22681cat >>confdefs.h <<_ACEOF
22682#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
22683_ACEOF
22684
22685
22686cat >>confdefs.h <<_ACEOF
22687#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
22688_ACEOF
22689
22690
22691cat >>confdefs.h <<_ACEOF
22692#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
22693_ACEOF
22694
22695
22696cat >>confdefs.h <<_ACEOF
22697#define UNEXEC_SRC ${UNEXEC_SRC}
22698_ACEOF
22699
22700
22701if test "${HAVE_X_WINDOWS}" = "yes" ; then
22702
22703cat >>confdefs.h <<\_ACEOF
22704#define HAVE_X_WINDOWS 1
22705_ACEOF
22706
22707fi
22708if test "${USE_X_TOOLKIT}" != "none" ; then
22709
22710cat >>confdefs.h <<\_ACEOF
22711#define USE_X_TOOLKIT 1
22712_ACEOF
22713
22714fi
22715if test "${HAVE_X11}" = "yes" ; then
22716
22717cat >>confdefs.h <<\_ACEOF
22718#define HAVE_X11 1
22719_ACEOF
22720
22721fi
22722if test "${HAVE_XFREE386}" = "yes" ; then
22723
22724cat >>confdefs.h <<\_ACEOF
22725#define HAVE_XFREE386 1
22726_ACEOF
22727
22728fi
22729if test "${HAVE_MENUS}" = "yes" ; then
22730
22731cat >>confdefs.h <<\_ACEOF
22732#define HAVE_MENUS 1
22733_ACEOF
22734
22735fi
22736if test "${GNU_MALLOC}" = "yes" ; then
22737
22738cat >>confdefs.h <<\_ACEOF
22739#define GNU_MALLOC 1
22740_ACEOF
22741
22742fi
22743if test "${REL_ALLOC}" = "yes" ; then
22744
22745cat >>confdefs.h <<\_ACEOF
22746#define REL_ALLOC 1
22747_ACEOF
22748
22749fi
22750
22751
22752
c0d27fcc
MR
22753
22754
ba4481b5 22755#### Report on what we decided to do.
488dd4c4
JD
22756#### Report GTK as a toolkit, even if it doesn't use Xt.
22757#### It makes printing result more understandable as using GTK sets
22758#### toolkit_scroll_bars to yes by default.
22759if test "${HAVE_GTK}" = "yes"; then
22760 USE_X_TOOLKIT=GTK
22761fi
22762
ba4481b5
DL
22763echo "
22764Configured for \`${canonical}'.
22765
22766 Where should the build process find the source code? ${srcdir}
22767 What operating system and machine description files should Emacs use?
22768 \`${opsysfile}' and \`${machfile}'
22769 What compiler should emacs be built with? ${CC} ${CFLAGS}
22770 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 22771 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 22772 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 22773 What window system should Emacs use? ${window_system}
8e967cf7 22774 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
22775
22776if test -n "${x_includes}"; then
22777echo " Where do we find X Windows header files? ${x_includes}"
22778else
22779echo " Where do we find X Windows header files? Standard dirs"
22780fi
22781if test -n "${x_libraries}"; then
22782echo " Where do we find X Windows libraries? ${x_libraries}"
22783else
22784echo " Where do we find X Windows libraries? Standard dirs"
22785fi
22786
22787echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
22788echo " Does Emacs use -lXpm? ${HAVE_XPM}"
22789echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
22790echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
22791echo " Does Emacs use -lungif? ${HAVE_GIF}"
22792echo " Does Emacs use -lpng? ${HAVE_PNG}"
22793echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
22794echo
22795
d0098f13
JD
22796if test $USE_XASSERTS = yes; then
22797 echo " Compiling with asserts turned on."
d0098f13
JD
22798 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
22799 echo
22800fi
05cf15c6 22801
05cf15c6 22802
05cf15c6 22803
ba4481b5
DL
22804# Remove any trailing slashes in these variables.
22805test "${prefix}" != NONE &&
22806 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
22807test "${exec_prefix}" != NONE &&
22808 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
22809
d0e9bfd2
GM
22810## Check if the C preprocessor will convert `..' to `. .'. If so, set
22811## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
22812## from Makefile.c can correctly provide the arg `-traditional' to the
22813## C preprocessor.
22814
503d2be0 22815cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22816/* confdefs.h. */
22817_ACEOF
22818cat confdefs.h >>conftest.$ac_ext
22819cat >>conftest.$ac_ext <<_ACEOF
22820/* end confdefs.h. */
d0e9bfd2 22821yes..yes
503d2be0 22822_ACEOF
d0e9bfd2 22823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 22824 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
22825 CPP_NEED_TRADITIONAL=no
22826else
d0e9bfd2
GM
22827 CPP_NEED_TRADITIONAL=yes
22828fi
22829rm -f conftest*
22830
c0d27fcc 22831
6bae0ccf
DL
22832 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"
22833 ac_config_commands="$ac_config_commands default"
503d2be0 22834cat >confcache <<\_ACEOF
ba4481b5
DL
22835# This file is a shell script that caches the results of configure
22836# tests run on this system so they can be shared between configure
503d2be0
AS
22837# scripts and configure runs, see configure's option --config-cache.
22838# It is not useful on other systems. If it contains results you don't
22839# want to keep, you may remove or edit it.
ba4481b5 22840#
503d2be0
AS
22841# config.status only pays attention to the cache file if you give it
22842# the --recheck option to rerun configure.
ba4481b5 22843#
6bae0ccf 22844# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
22845# loading this file, other *unset* `ac_cv_foo' will be assigned the
22846# following values.
22847
22848_ACEOF
22849
ba4481b5
DL
22850# The following way of writing the cache mishandles newlines in values,
22851# but we know of no workaround that is simple, portable, and efficient.
22852# So, don't put newlines in cache variables' values.
22853# Ultrix sh set writes to stderr and can't be redirected directly,
22854# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
22855{
22856 (set) 2>&1 |
22857 case `(ac_space=' '; set | grep ac_space) 2>&1` in
22858 *ac_space=\ *)
22859 # `set' does not quote correctly, so add quotes (double-quote
22860 # substitution turns \\\\ into \\, and sed turns \\ into \).
22861 sed -n \
edfaf76d
LK
22862 "s/'/'\\\\''/g;
22863 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
503d2be0
AS
22864 ;;
22865 *)
22866 # `set' quotes correctly as required by POSIX, so do not add quotes.
22867 sed -n \
edfaf76d 22868 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
22869 ;;
22870 esac;
22871} |
22872 sed '
22873 t clear
22874 : clear
22875 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22876 t end
22877 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22878 : end' >>confcache
19650fd6 22879if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 22880 if test -w $cache_file; then
503d2be0
AS
22881 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22882 cat confcache >$cache_file
ba4481b5
DL
22883 else
22884 echo "not updating unwritable cache $cache_file"
22885 fi
22886fi
22887rm -f confcache
22888
ba4481b5
DL
22889test "x$prefix" = xNONE && prefix=$ac_default_prefix
22890# Let make expand exec_prefix.
22891test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22892
503d2be0
AS
22893# VPATH may cause trouble with some makes, so we remove $(srcdir),
22894# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22895# trailing colons and then remove the whole line if VPATH becomes empty
22896# (actually we leave an empty line to preserve line numbers).
ba4481b5 22897if test "x$srcdir" = x.; then
edfaf76d 22898 ac_vpsub='/^[ ]*VPATH[ ]*=/{
503d2be0
AS
22899s/:*\$(srcdir):*/:/;
22900s/:*\${srcdir}:*/:/;
22901s/:*@srcdir@:*/:/;
edfaf76d 22902s/^\([^=]*=[ ]*\):*/\1/;
503d2be0 22903s/:*$//;
edfaf76d 22904s/^[^=]*=[ ]*$//;
503d2be0 22905}'
ba4481b5
DL
22906fi
22907
ba4481b5
DL
22908DEFS=-DHAVE_CONFIG_H
22909
6bae0ccf
DL
22910ac_libobjs=
22911ac_ltlibobjs=
22912for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22913 # 1. Remove the extension, and $U if already installed.
22914 ac_i=`echo "$ac_i" |
edfaf76d 22915 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6bae0ccf
DL
22916 # 2. Add them.
22917 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22918 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
22919done
22920LIBOBJS=$ac_libobjs
22921
22922LTLIBOBJS=$ac_ltlibobjs
22923
22924
c0d27fcc 22925
ba4481b5 22926: ${CONFIG_STATUS=./config.status}
503d2be0
AS
22927ac_clean_files_save=$ac_clean_files
22928ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 22929{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
22930echo "$as_me: creating $CONFIG_STATUS" >&6;}
22931cat >$CONFIG_STATUS <<_ACEOF
22932#! $SHELL
c0d27fcc 22933# Generated by $as_me.
ba4481b5 22934# Run this file to recreate the current configuration.
ba4481b5 22935# Compiler output produced by configure, useful for debugging
503d2be0 22936# configure, is in config.log if it exists.
ba4481b5 22937
503d2be0 22938debug=false
19650fd6
AS
22939ac_cs_recheck=false
22940ac_cs_silent=false
503d2be0 22941SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
22942_ACEOF
22943
22944cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
22945## --------------------- ##
22946## M4sh Initialization. ##
22947## --------------------- ##
22948
503d2be0
AS
22949# Be Bourne compatible
22950if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22951 emulate sh
22952 NULLCMD=:
6bae0ccf
DL
22953 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22954 # is contrary to our usage. Disable this feature.
22955 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
22956elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22957 set -o posix
22958fi
edfaf76d 22959DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 22960
c0d27fcc 22961# Support unset when possible.
edfaf76d 22962if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
22963 as_unset=unset
22964else
22965 as_unset=false
22966fi
22967
6bae0ccf
DL
22968
22969# Work around bugs in pre-3.0 UWIN ksh.
22970$as_unset ENV MAIL MAILPATH
22971PS1='$ '
22972PS2='> '
22973PS4='+ '
22974
22975# NLS nuisances.
19650fd6
AS
22976for as_var in \
22977 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22978 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22979 LC_TELEPHONE LC_TIME
6bae0ccf 22980do
edfaf76d 22981 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
22982 eval $as_var=C; export $as_var
22983 else
22984 $as_unset $as_var
22985 fi
22986done
22987
22988# Required to use basename.
22989if expr a : '\(a\)' >/dev/null 2>&1; then
22990 as_expr=expr
22991else
22992 as_expr=false
22993fi
22994
22995if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22996 as_basename=basename
22997else
22998 as_basename=false
22999fi
c0d27fcc
MR
23000
23001
503d2be0 23002# Name of the executable.
6bae0ccf 23003as_me=`$as_basename "$0" ||
c0d27fcc
MR
23004$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23005 X"$0" : 'X\(//\)$' \| \
23006 X"$0" : 'X\(/\)$' \| \
23007 . : '\(.\)' 2>/dev/null ||
23008echo X/"$0" |
23009 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
23010 /^X\/\(\/\/\)$/{ s//\1/; q; }
23011 /^X\/\(\/\).*/{ s//\1/; q; }
23012 s/.*/./; q'`
23013
6bae0ccf 23014
c0d27fcc
MR
23015# PATH needs CR, and LINENO needs CR and PATH.
23016# Avoid depending upon Character Ranges.
23017as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23018as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23019as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23020as_cr_digits='0123456789'
23021as_cr_alnum=$as_cr_Letters$as_cr_digits
23022
23023# The user is always right.
23024if test "${PATH_SEPARATOR+set}" != set; then
19650fd6
AS
23025 echo "#! /bin/sh" >conf$$.sh
23026 echo "exit 0" >>conf$$.sh
23027 chmod +x conf$$.sh
23028 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
23029 PATH_SEPARATOR=';'
23030 else
23031 PATH_SEPARATOR=:
23032 fi
19650fd6 23033 rm -f conf$$.sh
c0d27fcc
MR
23034fi
23035
23036
23037 as_lineno_1=$LINENO
23038 as_lineno_2=$LINENO
23039 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23040 test "x$as_lineno_1" != "x$as_lineno_2" &&
23041 test "x$as_lineno_3" = "x$as_lineno_2" || {
23042 # Find who we are. Look in the path if we contain no path at all
23043 # relative or not.
23044 case $0 in
23045 *[\\/]* ) as_myself=$0 ;;
23046 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23047for as_dir in $PATH
23048do
23049 IFS=$as_save_IFS
23050 test -z "$as_dir" && as_dir=.
23051 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23052done
23053
23054 ;;
23055 esac
23056 # We did not find ourselves, most probably we were run as `sh COMMAND'
23057 # in which case we are not to be found in the path.
23058 if test "x$as_myself" = x; then
23059 as_myself=$0
23060 fi
23061 if test ! -f "$as_myself"; then
23062 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
23063echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
23064 { (exit 1); exit 1; }; }
23065 fi
23066 case $CONFIG_SHELL in
23067 '')
23068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23069for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
23070do
23071 IFS=$as_save_IFS
23072 test -z "$as_dir" && as_dir=.
23073 for as_base in sh bash ksh sh5; do
23074 case $as_dir in
23075 /*)
23076 if ("$as_dir/$as_base" -c '
23077 as_lineno_1=$LINENO
23078 as_lineno_2=$LINENO
23079 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23080 test "x$as_lineno_1" != "x$as_lineno_2" &&
23081 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
23082 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
23083 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
23084 CONFIG_SHELL=$as_dir/$as_base
23085 export CONFIG_SHELL
23086 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
23087 fi;;
23088 esac
23089 done
23090done
23091;;
23092 esac
23093
23094 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23095 # uniformly replaced by the line number. The first 'sed' inserts a
23096 # line-number line before each line; the second 'sed' does the real
23097 # work. The second script uses 'N' to pair each line-number line
23098 # with the numbered line, and appends trailing '-' during
23099 # substitution so that $LINENO is not a special case at line end.
23100 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
23101 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
23102 sed '=' <$as_myself |
23103 sed '
23104 N
23105 s,$,-,
23106 : loop
23107 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
23108 t loop
23109 s,-$,,
23110 s,^['$as_cr_digits']*\n,,
23111 ' >$as_me.lineno &&
23112 chmod +x $as_me.lineno ||
23113 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23114echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
23115 { (exit 1); exit 1; }; }
23116
23117 # Don't try to exec as it changes $[0], causing all sort of problems
23118 # (the dirname of $[0] is not the place where we might find the
23119 # original and so on. Autoconf is especially sensible to this).
23120 . ./$as_me.lineno
23121 # Exit status is that of the last command.
23122 exit
23123}
23124
23125
23126case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23127 *c*,-n*) ECHO_N= ECHO_C='
23128' ECHO_T=' ' ;;
23129 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23130 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
23131esac
503d2be0
AS
23132
23133if expr a : '\(a\)' >/dev/null 2>&1; then
23134 as_expr=expr
23135else
23136 as_expr=false
23137fi
23138
23139rm -f conf$$ conf$$.exe conf$$.file
23140echo >conf$$.file
23141if ln -s conf$$.file conf$$ 2>/dev/null; then
23142 # We could just check for DJGPP; but this test a) works b) is more generic
23143 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23144 if test -f conf$$.exe; then
23145 # Don't use ln at all; we don't have any links
23146 as_ln_s='cp -p'
23147 else
23148 as_ln_s='ln -s'
23149 fi
23150elif ln conf$$.file conf$$ 2>/dev/null; then
23151 as_ln_s=ln
23152else
23153 as_ln_s='cp -p'
23154fi
23155rm -f conf$$ conf$$.exe conf$$.file
23156
6bae0ccf
DL
23157if mkdir -p . 2>/dev/null; then
23158 as_mkdir_p=:
23159else
edfaf76d 23160 test -d ./-p && rmdir ./-p
6bae0ccf
DL
23161 as_mkdir_p=false
23162fi
23163
503d2be0
AS
23164as_executable_p="test -f"
23165
c0d27fcc 23166# Sed expression to map a string onto a valid CPP name.
edfaf76d 23167as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
23168
23169# Sed expression to map a string onto a valid variable name.
edfaf76d 23170as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 23171
503d2be0
AS
23172
23173# IFS
23174# We need space, tab and new line, in precisely that order.
23175as_nl='
23176'
23177IFS=" $as_nl"
23178
23179# CDPATH.
6bae0ccf 23180$as_unset CDPATH
503d2be0
AS
23181
23182exec 6>&1
23183
c0d27fcc
MR
23184# Open the log real soon, to keep \$[0] and so on meaningful, and to
23185# report actual input values of CONFIG_FILES etc. instead of their
23186# values after options handling. Logging --version etc. is OK.
23187exec 5>>config.log
23188{
23189 echo
23190 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23191## Running $as_me. ##
23192_ASBOX
23193} >&5
23194cat >&5 <<_CSEOF
23195
23196This file was extended by $as_me, which was
edfaf76d 23197generated by GNU Autoconf 2.59. Invocation command line was
c0d27fcc
MR
23198
23199 CONFIG_FILES = $CONFIG_FILES
23200 CONFIG_HEADERS = $CONFIG_HEADERS
23201 CONFIG_LINKS = $CONFIG_LINKS
23202 CONFIG_COMMANDS = $CONFIG_COMMANDS
23203 $ $0 $@
23204
23205_CSEOF
23206echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23207echo >&5
503d2be0
AS
23208_ACEOF
23209
23210# Files that config.status was made for.
23211if test -n "$ac_config_files"; then
23212 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23213fi
23214
23215if test -n "$ac_config_headers"; then
23216 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23217fi
23218
23219if test -n "$ac_config_links"; then
23220 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23221fi
23222
23223if test -n "$ac_config_commands"; then
23224 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23225fi
23226
c0d27fcc 23227cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23228
23229ac_cs_usage="\
23230\`$as_me' instantiates files from templates according to the
23231current configuration.
23232
23233Usage: $0 [OPTIONS] [FILE]...
23234
23235 -h, --help print this help, then exit
23236 -V, --version print version number, then exit
19650fd6 23237 -q, --quiet do not print progress messages
503d2be0
AS
23238 -d, --debug don't remove temporary files
23239 --recheck update $as_me by reconfiguring in the same conditions
23240 --file=FILE[:TEMPLATE]
edfaf76d 23241 instantiate the configuration file FILE
503d2be0 23242 --header=FILE[:TEMPLATE]
edfaf76d 23243 instantiate the configuration header FILE
503d2be0
AS
23244
23245Configuration files:
23246$config_files
23247
23248Configuration headers:
23249$config_headers
23250
23251Configuration commands:
23252$config_commands
23253
23254Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 23255_ACEOF
503d2be0 23256
c0d27fcc 23257cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23258ac_cs_version="\\
23259config.status
edfaf76d 23260configured by $0, generated by GNU Autoconf 2.59,
503d2be0
AS
23261 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23262
edfaf76d 23263Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
23264This config.status script is free software; the Free Software Foundation
23265gives unlimited permission to copy, distribute and modify it."
23266srcdir=$srcdir
23267INSTALL="$INSTALL"
c0d27fcc 23268_ACEOF
503d2be0 23269
c0d27fcc 23270cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23271# If no file are specified by the user, then we need to provide default
23272# value. By we need to know if files were specified by the user.
23273ac_need_defaults=:
23274while test $# != 0
ba4481b5 23275do
503d2be0
AS
23276 case $1 in
23277 --*=*)
23278 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23279 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
23280 ac_shift=:
23281 ;;
23282 -*)
23283 ac_option=$1
23284 ac_optarg=$2
23285 ac_shift=shift
503d2be0 23286 ;;
503d2be0
AS
23287 *) # This is not an option, so the user has probably given explicit
23288 # arguments.
6bae0ccf 23289 ac_option=$1
503d2be0
AS
23290 ac_need_defaults=false;;
23291 esac
23292
6bae0ccf 23293 case $ac_option in
503d2be0 23294 # Handling of the options.
c0d27fcc 23295_ACEOF
f57bd967 23296cat >>$CONFIG_STATUS <<\_ACEOF
19650fd6
AS
23297 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23298 ac_cs_recheck=: ;;
503d2be0
AS
23299 --version | --vers* | -V )
23300 echo "$ac_cs_version"; exit 0 ;;
23301 --he | --h)
23302 # Conflict between --help and --header
c0d27fcc 23303 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
23304Try \`$0 --help' for more information." >&5
23305echo "$as_me: error: ambiguous option: $1
23306Try \`$0 --help' for more information." >&2;}
23307 { (exit 1); exit 1; }; };;
23308 --help | --hel | -h )
23309 echo "$ac_cs_usage"; exit 0 ;;
23310 --debug | --d* | -d )
23311 debug=: ;;
23312 --file | --fil | --fi | --f )
6bae0ccf
DL
23313 $ac_shift
23314 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
23315 ac_need_defaults=false;;
23316 --header | --heade | --head | --hea )
6bae0ccf
DL
23317 $ac_shift
23318 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 23319 ac_need_defaults=false;;
19650fd6
AS
23320 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23321 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23322 ac_cs_silent=: ;;
503d2be0
AS
23323
23324 # This is an error.
c0d27fcc 23325 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
23326Try \`$0 --help' for more information." >&5
23327echo "$as_me: error: unrecognized option: $1
23328Try \`$0 --help' for more information." >&2;}
23329 { (exit 1); exit 1; }; } ;;
23330
23331 *) ac_config_targets="$ac_config_targets $1" ;;
23332
ba4481b5 23333 esac
503d2be0 23334 shift
ba4481b5
DL
23335done
23336
19650fd6
AS
23337ac_configure_extra_args=
23338
23339if $ac_cs_silent; then
23340 exec 6>/dev/null
23341 ac_configure_extra_args="$ac_configure_extra_args --silent"
23342fi
23343
23344_ACEOF
23345cat >>$CONFIG_STATUS <<_ACEOF
23346if \$ac_cs_recheck; then
23347 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23348 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23349fi
23350
503d2be0 23351_ACEOF
ba4481b5 23352
c0d27fcc 23353cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23354#
23355# INIT-COMMANDS section.
23356#
ba4481b5 23357
503d2be0
AS
23358GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
23359
c0d27fcc
MR
23360_ACEOF
23361
503d2be0 23362
c0d27fcc
MR
23363
23364cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23365for ac_config_target in $ac_config_targets
23366do
23367 case "$ac_config_target" in
23368 # Handling of arguments.
23369 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23370 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
23371 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
23372 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
23373 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
23374 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
23375 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 23376 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 23377 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
23378 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
23379 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23380 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 23381 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
23382echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23383 { (exit 1); exit 1; }; };;
23384 esac
ba4481b5 23385done
503d2be0
AS
23386
23387# If the user did not use the arguments to specify the items to instantiate,
23388# then the envvar interface is used. Set only those that are not.
23389# We use the long form for the default assignment because of an extremely
23390# bizarre bug on SunOS 4.1.3.
23391if $ac_need_defaults; then
23392 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23393 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23394 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 23395fi
503d2be0 23396
19650fd6
AS
23397# Have a temporary directory for convenience. Make it in the build tree
23398# simply because there is no reason to put it here, and in addition,
23399# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
23400# Create a temporary directory, and hook for its removal unless debugging.
23401$debug ||
23402{
23403 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23404 trap '{ (exit 1); exit 1; }' 1 2 13 15
23405}
23406
23407# Create a (secure) tmp directory for tmp files.
19650fd6 23408
503d2be0 23409{
19650fd6 23410 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
23411 test -n "$tmp" && test -d "$tmp"
23412} ||
23413{
19650fd6 23414 tmp=./confstat$$-$RANDOM
503d2be0
AS
23415 (umask 077 && mkdir $tmp)
23416} ||
23417{
19650fd6 23418 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
23419 { (exit 1); exit 1; }
23420}
23421
c0d27fcc 23422_ACEOF
503d2be0 23423
c0d27fcc 23424cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23425
23426#
23427# CONFIG_FILES section.
23428#
23429
23430# No need to generate the scripts if there are no CONFIG_FILES.
23431# This happens for instance when ./config.status config.h
23432if test -n "\$CONFIG_FILES"; then
23433 # Protect against being on the right side of a sed subst in config.status.
23434 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23435 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23436s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
23437s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23438s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23439s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23440s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23441s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23442s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
23443s,@exec_prefix@,$exec_prefix,;t t
23444s,@prefix@,$prefix,;t t
23445s,@program_transform_name@,$program_transform_name,;t t
23446s,@bindir@,$bindir,;t t
23447s,@sbindir@,$sbindir,;t t
23448s,@libexecdir@,$libexecdir,;t t
23449s,@datadir@,$datadir,;t t
23450s,@sysconfdir@,$sysconfdir,;t t
23451s,@sharedstatedir@,$sharedstatedir,;t t
23452s,@localstatedir@,$localstatedir,;t t
23453s,@libdir@,$libdir,;t t
23454s,@includedir@,$includedir,;t t
23455s,@oldincludedir@,$oldincludedir,;t t
23456s,@infodir@,$infodir,;t t
23457s,@mandir@,$mandir,;t t
503d2be0
AS
23458s,@build_alias@,$build_alias,;t t
23459s,@host_alias@,$host_alias,;t t
23460s,@target_alias@,$target_alias,;t t
c0d27fcc 23461s,@DEFS@,$DEFS,;t t
503d2be0
AS
23462s,@ECHO_C@,$ECHO_C,;t t
23463s,@ECHO_N@,$ECHO_N,;t t
23464s,@ECHO_T@,$ECHO_T,;t t
503d2be0 23465s,@LIBS@,$LIBS,;t t
19650fd6 23466s,@MAINT@,$MAINT,;t t
503d2be0
AS
23467s,@build@,$build,;t t
23468s,@build_cpu@,$build_cpu,;t t
23469s,@build_vendor@,$build_vendor,;t t
23470s,@build_os@,$build_os,;t t
23471s,@host@,$host,;t t
23472s,@host_cpu@,$host_cpu,;t t
23473s,@host_vendor@,$host_vendor,;t t
23474s,@host_os@,$host_os,;t t
23475s,@CC@,$CC,;t t
23476s,@CFLAGS@,$CFLAGS,;t t
23477s,@LDFLAGS@,$LDFLAGS,;t t
23478s,@CPPFLAGS@,$CPPFLAGS,;t t
23479s,@ac_ct_CC@,$ac_ct_CC,;t t
23480s,@EXEEXT@,$EXEEXT,;t t
23481s,@OBJEXT@,$OBJEXT,;t t
503d2be0 23482s,@CPP@,$CPP,;t t
e143ad11
AS
23483s,@EGREP@,$EGREP,;t t
23484s,@LN_S@,$LN_S,;t t
503d2be0
AS
23485s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23486s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23487s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
23488s,@RANLIB@,$RANLIB,;t t
23489s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 23490s,@INSTALL_INFO@,$INSTALL_INFO,;t t
46e35e9f 23491s,@GZIP_PROG@,$GZIP_PROG,;t t
503d2be0 23492s,@LIBSOUND@,$LIBSOUND,;t t
488dd4c4 23493s,@PKG_CONFIG@,$PKG_CONFIG,;t t
439f58ee
JD
23494s,@ALSA_CFLAGS@,$ALSA_CFLAGS,;t t
23495s,@ALSA_LIBS@,$ALSA_LIBS,;t t
23496s,@CFLAGS_SOUND@,$CFLAGS_SOUND,;t t
23497s,@SET_MAKE@,$SET_MAKE,;t t
488dd4c4
JD
23498s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
23499s,@GTK_LIBS@,$GTK_LIBS,;t t
503d2be0
AS
23500s,@ALLOCA@,$ALLOCA,;t t
23501s,@liblockfile@,$liblockfile,;t t
23502s,@LIBOBJS@,$LIBOBJS,;t t
23503s,@NEED_SETGID@,$NEED_SETGID,;t t
23504s,@KMEM_GROUP@,$KMEM_GROUP,;t t
23505s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
52dbaac8
PE
23506s,@GETOPT_H@,$GETOPT_H,;t t
23507s,@GETOPTOBJS@,$GETOPTOBJS,;t t
503d2be0
AS
23508s,@version@,$version,;t t
23509s,@configuration@,$configuration,;t t
23510s,@canonical@,$canonical,;t t
23511s,@srcdir@,$srcdir,;t t
23512s,@lispdir@,$lispdir,;t t
23513s,@locallisppath@,$locallisppath,;t t
23514s,@lisppath@,$lisppath,;t t
23515s,@x_default_search_path@,$x_default_search_path,;t t
23516s,@etcdir@,$etcdir,;t t
23517s,@archlibdir@,$archlibdir,;t t
23518s,@docdir@,$docdir,;t t
23519s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
23520s,@gamedir@,$gamedir,;t t
23521s,@gameuser@,$gameuser,;t t
503d2be0
AS
23522s,@c_switch_system@,$c_switch_system,;t t
23523s,@c_switch_machine@,$c_switch_machine,;t t
23524s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
23525s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
23526s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
23527s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
23528s,@machfile@,$machfile,;t t
23529s,@opsysfile@,$opsysfile,;t t
6a3a24fa 23530s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 23531s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
23532CEOF
23533
c0d27fcc 23534_ACEOF
ba4481b5 23535
c0d27fcc 23536 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23537 # Split the substitutions into bite-sized pieces for seds with
23538 # small command number limits, like on Digital OSF/1 and HP-UX.
23539 ac_max_sed_lines=48
23540 ac_sed_frag=1 # Number of current file.
23541 ac_beg=1 # First line for current file.
23542 ac_end=$ac_max_sed_lines # Line after last line for current file.
23543 ac_more_lines=:
23544 ac_sed_cmds=
23545 while $ac_more_lines; do
23546 if test $ac_beg -gt 1; then
23547 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23548 else
23549 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23550 fi
23551 if test ! -s $tmp/subs.frag; then
23552 ac_more_lines=false
23553 else
23554 # The purpose of the label and of the branching condition is to
23555 # speed up the sed processing (if there are no `@' at all, there
23556 # is no need to browse any of the substitutions).
23557 # These are the two extra sed commands mentioned above.
23558 (echo ':t
23559 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23560 if test -z "$ac_sed_cmds"; then
edfaf76d 23561 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0 23562 else
edfaf76d 23563 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0
AS
23564 fi
23565 ac_sed_frag=`expr $ac_sed_frag + 1`
23566 ac_beg=$ac_end
23567 ac_end=`expr $ac_end + $ac_max_sed_lines`
23568 fi
23569 done
23570 if test -z "$ac_sed_cmds"; then
23571 ac_sed_cmds=cat
23572 fi
23573fi # test -n "$CONFIG_FILES"
ba4481b5 23574
c0d27fcc
MR
23575_ACEOF
23576cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 23577for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 23578 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
23579 case $ac_file in
23580 - | *:- | *:-:* ) # input from stdin
edfaf76d
LK
23581 cat >$tmp/stdin
23582 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23583 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23584 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
edfaf76d 23585 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23586 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
23587 esac
23588
503d2be0 23589 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
23590 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23591$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23592 X"$ac_file" : 'X\(//\)[^/]' \| \
23593 X"$ac_file" : 'X\(//\)$' \| \
23594 X"$ac_file" : 'X\(/\)' \| \
23595 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
23596echo X"$ac_file" |
23597 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23598 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23599 /^X\(\/\/\)$/{ s//\1/; q; }
23600 /^X\(\/\).*/{ s//\1/; q; }
23601 s/.*/./; q'`
6bae0ccf
DL
23602 { if $as_mkdir_p; then
23603 mkdir -p "$ac_dir"
23604 else
23605 as_dir="$ac_dir"
23606 as_dirs=
23607 while test ! -d "$as_dir"; do
23608 as_dirs="$as_dir $as_dirs"
23609 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23610$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23611 X"$as_dir" : 'X\(//\)[^/]' \| \
23612 X"$as_dir" : 'X\(//\)$' \| \
23613 X"$as_dir" : 'X\(/\)' \| \
23614 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
23615echo X"$as_dir" |
23616 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23617 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23618 /^X\(\/\/\)$/{ s//\1/; q; }
23619 /^X\(\/\).*/{ s//\1/; q; }
23620 s/.*/./; q'`
23621 done
23622 test ! -n "$as_dirs" || mkdir $as_dirs
23623 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23624echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23625 { (exit 1); exit 1; }; }; }
503d2be0 23626
c0d27fcc 23627 ac_builddir=.
98418dba 23628
c0d27fcc
MR
23629if test "$ac_dir" != .; then
23630 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23631 # A "../" for each directory in $ac_dir_suffix.
23632 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23633else
23634 ac_dir_suffix= ac_top_builddir=
23635fi
23636
23637case $srcdir in
23638 .) # No --srcdir option. We are building in place.
23639 ac_srcdir=.
23640 if test -z "$ac_top_builddir"; then
23641 ac_top_srcdir=.
23642 else
23643 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23644 fi ;;
23645 [\\/]* | ?:[\\/]* ) # Absolute path.
23646 ac_srcdir=$srcdir$ac_dir_suffix;
23647 ac_top_srcdir=$srcdir ;;
ba4481b5 23648 *) # Relative path.
c0d27fcc
MR
23649 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23650 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23651esac
edfaf76d
LK
23652
23653# Do not use `cd foo && pwd` to compute absolute paths, because
23654# the directories may not exist.
23655case `pwd` in
23656.) ac_abs_builddir="$ac_dir";;
23657*)
23658 case "$ac_dir" in
23659 .) ac_abs_builddir=`pwd`;;
23660 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23661 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23662 esac;;
23663esac
23664case $ac_abs_builddir in
23665.) ac_abs_top_builddir=${ac_top_builddir}.;;
23666*)
23667 case ${ac_top_builddir}. in
23668 .) ac_abs_top_builddir=$ac_abs_builddir;;
23669 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23670 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23671 esac;;
23672esac
23673case $ac_abs_builddir in
23674.) ac_abs_srcdir=$ac_srcdir;;
23675*)
23676 case $ac_srcdir in
23677 .) ac_abs_srcdir=$ac_abs_builddir;;
23678 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23679 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23680 esac;;
23681esac
23682case $ac_abs_builddir in
23683.) ac_abs_top_srcdir=$ac_top_srcdir;;
23684*)
23685 case $ac_top_srcdir in
23686 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23687 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23688 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23689 esac;;
23690esac
c0d27fcc 23691
ba4481b5 23692
503d2be0
AS
23693 case $INSTALL in
23694 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 23695 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
23696 esac
23697
503d2be0
AS
23698 # Let's still pretend it is `configure' which instantiates (i.e., don't
23699 # use $as_me), people would be surprised to read:
c0d27fcc
MR
23700 # /* config.h. Generated by config.status. */
23701 if test x"$ac_file" = x-; then
23702 configure_input=
23703 else
23704 configure_input="$ac_file. "
23705 fi
23706 configure_input=$configure_input"Generated from `echo $ac_file_in |
edfaf76d 23707 sed 's,.*/,,'` by configure."
503d2be0
AS
23708
23709 # First look for the input files in the build tree, otherwise in the
23710 # src tree.
23711 ac_file_inputs=`IFS=:
23712 for f in $ac_file_in; do
23713 case $f in
23714 -) echo $tmp/stdin ;;
23715 [\\/$]*)
edfaf76d
LK
23716 # Absolute (can't be DOS-style, as IFS=:)
23717 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23718echo "$as_me: error: cannot find input file: $f" >&2;}
23719 { (exit 1); exit 1; }; }
edfaf76d 23720 echo "$f";;
503d2be0 23721 *) # Relative
edfaf76d
LK
23722 if test -f "$f"; then
23723 # Build tree
23724 echo "$f"
23725 elif test -f "$srcdir/$f"; then
23726 # Source tree
23727 echo "$srcdir/$f"
23728 else
23729 # /dev/null tree
23730 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23731echo "$as_me: error: cannot find input file: $f" >&2;}
23732 { (exit 1); exit 1; }; }
edfaf76d 23733 fi;;
503d2be0
AS
23734 esac
23735 done` || { (exit 1); exit 1; }
8ae52ca6
RF
23736
23737 if test x"$ac_file" != x-; then
23738 { echo "$as_me:$LINENO: creating $ac_file" >&5
23739echo "$as_me: creating $ac_file" >&6;}
23740 rm -f "$ac_file"
23741 fi
c0d27fcc
MR
23742_ACEOF
23743cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23744 sed "$ac_vpsub
23745$extrasub
c0d27fcc
MR
23746_ACEOF
23747cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23748:t
23749/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23750s,@configure_input@,$configure_input,;t t
23751s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 23752s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 23753s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
23754s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23755s,@builddir@,$ac_builddir,;t t
23756s,@abs_builddir@,$ac_abs_builddir,;t t
23757s,@top_builddir@,$ac_top_builddir,;t t
23758s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
23759s,@INSTALL@,$ac_INSTALL,;t t
23760" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23761 rm -f $tmp/stdin
23762 if test x"$ac_file" != x-; then
23763 mv $tmp/out $ac_file
23764 else
23765 cat $tmp/out
23766 rm -f $tmp/out
23767 fi
23768
23769done
c0d27fcc
MR
23770_ACEOF
23771cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 23772
503d2be0
AS
23773#
23774# CONFIG_HEADER section.
23775#
ba4481b5
DL
23776
23777# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23778# NAME is the cpp macro being defined and VALUE is the value it is being given.
23779#
23780# ac_d sets the value in "#define NAME VALUE" lines.
edfaf76d
LK
23781ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23782ac_dB='[ ].*$,\1#\2'
503d2be0
AS
23783ac_dC=' '
23784ac_dD=',;t'
23785# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
edfaf76d 23786ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
503d2be0 23787ac_uB='$,\1#\2define\3'
ba4481b5 23788ac_uC=' '
503d2be0 23789ac_uD=',;t'
ba4481b5 23790
503d2be0 23791for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 23792 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
23793 case $ac_file in
23794 - | *:- | *:-:* ) # input from stdin
edfaf76d
LK
23795 cat >$tmp/stdin
23796 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23797 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23798 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
edfaf76d 23799 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23800 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
23801 esac
23802
c0d27fcc 23803 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
23804echo "$as_me: creating $ac_file" >&6;}
23805
23806 # First look for the input files in the build tree, otherwise in the
23807 # src tree.
23808 ac_file_inputs=`IFS=:
23809 for f in $ac_file_in; do
23810 case $f in
23811 -) echo $tmp/stdin ;;
23812 [\\/$]*)
edfaf76d
LK
23813 # Absolute (can't be DOS-style, as IFS=:)
23814 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23815echo "$as_me: error: cannot find input file: $f" >&2;}
23816 { (exit 1); exit 1; }; }
edfaf76d
LK
23817 # Do quote $f, to prevent DOS paths from being IFS'd.
23818 echo "$f";;
503d2be0 23819 *) # Relative
edfaf76d
LK
23820 if test -f "$f"; then
23821 # Build tree
23822 echo "$f"
23823 elif test -f "$srcdir/$f"; then
23824 # Source tree
23825 echo "$srcdir/$f"
23826 else
23827 # /dev/null tree
23828 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23829echo "$as_me: error: cannot find input file: $f" >&2;}
23830 { (exit 1); exit 1; }; }
edfaf76d 23831 fi;;
503d2be0
AS
23832 esac
23833 done` || { (exit 1); exit 1; }
23834 # Remove the trailing spaces.
edfaf76d 23835 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
503d2be0 23836
c0d27fcc 23837_ACEOF
503d2be0
AS
23838
23839# Transform confdefs.h into two sed scripts, `conftest.defines' and
23840# `conftest.undefs', that substitutes the proper values into
23841# config.h.in to produce config.h. The first handles `#define'
23842# templates, and the second `#undef' templates.
23843# And first: Protect against being on the right side of a sed subst in
23844# config.status. Protect against being in an unquoted here document
23845# in config.status.
23846rm -f conftest.defines conftest.undefs
23847# Using a here document instead of a string reduces the quoting nightmare.
23848# Putting comments in sed scripts is not portable.
23849#
23850# `end' is used to avoid that the second main sed command (meant for
23851# 0-ary CPP macros) applies to n-ary macro definitions.
23852# See the Autoconf documentation for `clear'.
c0d27fcc 23853cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
23854s/[\\&,]/\\&/g
23855s,[\\$`],\\&,g
23856t clear
23857: clear
edfaf76d 23858s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0 23859t end
edfaf76d 23860s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
503d2be0 23861: end
c0d27fcc 23862_ACEOF
503d2be0
AS
23863# If some macros were called several times there might be several times
23864# the same #defines, which is useless. Nevertheless, we may not want to
23865# sort them, since we want the *last* AC-DEFINE to be honored.
23866uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23867sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23868rm -f confdef2sed.sed
ba4481b5
DL
23869
23870# This sed command replaces #undef with comments. This is necessary, for
23871# example, in the case of _POSIX_SOURCE, which is predefined and required
23872# on some systems where configure will not decide to define it.
c0d27fcc 23873cat >>conftest.undefs <<\_ACEOF
edfaf76d 23874s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 23875_ACEOF
ba4481b5 23876
503d2be0
AS
23877# Break up conftest.defines because some shells have a limit on the size
23878# of here documents, and old seds have small limits too (100 cmds).
23879echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
edfaf76d 23880echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
23881echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23882echo ' :' >>$CONFIG_STATUS
23883rm -f conftest.tail
23884while grep . conftest.defines >/dev/null
23885do
23886 # Write a limited-size here document to $tmp/defines.sed.
23887 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23888 # Speed up: don't consider the non `#define' lines.
edfaf76d 23889 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
503d2be0
AS
23890 # Work around the forget-to-reset-the-flag bug.
23891 echo 't clr' >>$CONFIG_STATUS
23892 echo ': clr' >>$CONFIG_STATUS
23893 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
23894 echo 'CEOF
23895 sed -f $tmp/defines.sed $tmp/in >$tmp/out
23896 rm -f $tmp/in
23897 mv $tmp/out $tmp/in
23898' >>$CONFIG_STATUS
23899 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
23900 rm -f conftest.defines
23901 mv conftest.tail conftest.defines
23902done
23903rm -f conftest.defines
6bae0ccf 23904echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 23905echo >>$CONFIG_STATUS
ba4481b5 23906
503d2be0
AS
23907# Break up conftest.undefs because some shells have a limit on the size
23908# of here documents, and old seds have small limits too (100 cmds).
23909echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 23910rm -f conftest.tail
503d2be0 23911while grep . conftest.undefs >/dev/null
ba4481b5 23912do
503d2be0
AS
23913 # Write a limited-size here document to $tmp/undefs.sed.
23914 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23915 # Speed up: don't consider the non `#undef'
edfaf76d 23916 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
503d2be0
AS
23917 # Work around the forget-to-reset-the-flag bug.
23918 echo 't clr' >>$CONFIG_STATUS
23919 echo ': clr' >>$CONFIG_STATUS
23920 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 23921 echo 'CEOF
503d2be0
AS
23922 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23923 rm -f $tmp/in
23924 mv $tmp/out $tmp/in
23925' >>$CONFIG_STATUS
23926 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23927 rm -f conftest.undefs
23928 mv conftest.tail conftest.undefs
ba4481b5 23929done
503d2be0
AS
23930rm -f conftest.undefs
23931
c0d27fcc 23932cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23933 # Let's still pretend it is `configure' which instantiates (i.e., don't
23934 # use $as_me), people would be surprised to read:
c0d27fcc 23935 # /* config.h. Generated by config.status. */
503d2be0 23936 if test x"$ac_file" = x-; then
c0d27fcc 23937 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 23938 else
c0d27fcc 23939 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
23940 fi
23941 cat $tmp/in >>$tmp/config.h
23942 rm -f $tmp/in
23943 if test x"$ac_file" != x-; then
19650fd6 23944 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 23945 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
23946echo "$as_me: $ac_file is unchanged" >&6;}
23947 else
c0d27fcc
MR
23948 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23949$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23950 X"$ac_file" : 'X\(//\)[^/]' \| \
23951 X"$ac_file" : 'X\(//\)$' \| \
23952 X"$ac_file" : 'X\(/\)' \| \
23953 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
23954echo X"$ac_file" |
23955 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23956 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23957 /^X\(\/\/\)$/{ s//\1/; q; }
23958 /^X\(\/\).*/{ s//\1/; q; }
23959 s/.*/./; q'`
6bae0ccf
DL
23960 { if $as_mkdir_p; then
23961 mkdir -p "$ac_dir"
23962 else
23963 as_dir="$ac_dir"
23964 as_dirs=
23965 while test ! -d "$as_dir"; do
23966 as_dirs="$as_dir $as_dirs"
23967 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23968$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23969 X"$as_dir" : 'X\(//\)[^/]' \| \
23970 X"$as_dir" : 'X\(//\)$' \| \
23971 X"$as_dir" : 'X\(/\)' \| \
23972 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
23973echo X"$as_dir" |
23974 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23975 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23976 /^X\(\/\/\)$/{ s//\1/; q; }
23977 /^X\(\/\).*/{ s//\1/; q; }
23978 s/.*/./; q'`
23979 done
23980 test ! -n "$as_dirs" || mkdir $as_dirs
23981 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23982echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23983 { (exit 1); exit 1; }; }; }
503d2be0 23984
503d2be0
AS
23985 rm -f $ac_file
23986 mv $tmp/config.h $ac_file
ba4481b5 23987 fi
503d2be0
AS
23988 else
23989 cat $tmp/config.h
23990 rm -f $tmp/config.h
ba4481b5 23991 fi
503d2be0 23992done
c0d27fcc
MR
23993_ACEOF
23994cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23995
23996#
23997# CONFIG_COMMANDS section.
23998#
23999for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24000 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24001 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
24002 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
24003$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24004 X"$ac_dest" : 'X\(//\)[^/]' \| \
24005 X"$ac_dest" : 'X\(//\)$' \| \
24006 X"$ac_dest" : 'X\(/\)' \| \
24007 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
24008echo X"$ac_dest" |
24009 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24010 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24011 /^X\(\/\/\)$/{ s//\1/; q; }
24012 /^X\(\/\).*/{ s//\1/; q; }
24013 s/.*/./; q'`
edfaf76d
LK
24014 { if $as_mkdir_p; then
24015 mkdir -p "$ac_dir"
24016 else
24017 as_dir="$ac_dir"
24018 as_dirs=
24019 while test ! -d "$as_dir"; do
24020 as_dirs="$as_dir $as_dirs"
24021 as_dir=`(dirname "$as_dir") 2>/dev/null ||
24022$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24023 X"$as_dir" : 'X\(//\)[^/]' \| \
24024 X"$as_dir" : 'X\(//\)$' \| \
24025 X"$as_dir" : 'X\(/\)' \| \
24026 . : '\(.\)' 2>/dev/null ||
24027echo X"$as_dir" |
24028 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24029 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24030 /^X\(\/\/\)$/{ s//\1/; q; }
24031 /^X\(\/\).*/{ s//\1/; q; }
24032 s/.*/./; q'`
24033 done
24034 test ! -n "$as_dirs" || mkdir $as_dirs
24035 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24036echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24037 { (exit 1); exit 1; }; }; }
24038
c0d27fcc
MR
24039 ac_builddir=.
24040
24041if test "$ac_dir" != .; then
24042 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24043 # A "../" for each directory in $ac_dir_suffix.
24044 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24045else
24046 ac_dir_suffix= ac_top_builddir=
24047fi
24048
24049case $srcdir in
24050 .) # No --srcdir option. We are building in place.
24051 ac_srcdir=.
24052 if test -z "$ac_top_builddir"; then
24053 ac_top_srcdir=.
24054 else
24055 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24056 fi ;;
24057 [\\/]* | ?:[\\/]* ) # Absolute path.
24058 ac_srcdir=$srcdir$ac_dir_suffix;
24059 ac_top_srcdir=$srcdir ;;
24060 *) # Relative path.
24061 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24062 ac_top_srcdir=$ac_top_builddir$srcdir ;;
24063esac
edfaf76d
LK
24064
24065# Do not use `cd foo && pwd` to compute absolute paths, because
24066# the directories may not exist.
24067case `pwd` in
24068.) ac_abs_builddir="$ac_dir";;
24069*)
24070 case "$ac_dir" in
24071 .) ac_abs_builddir=`pwd`;;
24072 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24073 *) ac_abs_builddir=`pwd`/"$ac_dir";;
24074 esac;;
24075esac
24076case $ac_abs_builddir in
24077.) ac_abs_top_builddir=${ac_top_builddir}.;;
24078*)
24079 case ${ac_top_builddir}. in
24080 .) ac_abs_top_builddir=$ac_abs_builddir;;
24081 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24082 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24083 esac;;
24084esac
24085case $ac_abs_builddir in
24086.) ac_abs_srcdir=$ac_srcdir;;
24087*)
24088 case $ac_srcdir in
24089 .) ac_abs_srcdir=$ac_abs_builddir;;
24090 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24091 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24092 esac;;
24093esac
24094case $ac_abs_builddir in
24095.) ac_abs_top_srcdir=$ac_top_srcdir;;
24096*)
24097 case $ac_top_srcdir in
24098 .) ac_abs_top_srcdir=$ac_abs_builddir;;
24099 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24100 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24101 esac;;
24102esac
ba4481b5 24103
c0d27fcc
MR
24104
24105 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24106echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
24107 case $ac_dest in
24108 default )
ba4481b5
DL
24109
24110### Make the necessary directories, if they don't exist.
24111for dir in etc lisp ; do
24112 test -d ${dir} || mkdir ${dir}
24113done
24114
24115# Build src/Makefile from ${srcdir}/src/Makefile.c
24116# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
24117# This must be done after src/config.h is built, since we rely on that file.
24118
24119# Now get this: Some word that is part of the ${srcdir} directory name
24120# or the ${configuration} value might, just might, happen to be an
24121# identifier like `sun4' or `i386' or something, and be predefined by
24122# the C preprocessor to some helpful value like 1, or maybe the empty
24123# string. Needless to say consequent macro substitutions are less
24124# than conducive to the makefile finding the correct directory.
24125undefs="`echo $top_srcdir $configuration $canonical |
24126sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24127 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
24128`"
24129
24130echo creating src/epaths.h
4aa6b955 24131${MAKE-make} epaths-force
ba4481b5 24132
1c203d4c
DL
24133# As of 2000-11-19, newest development versions of GNU cpp preprocess
24134# `..' to `. .' unless invoked with -traditional
24135
d0e9bfd2 24136if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
24137 CPPFLAGS="$CPPFLAGS -traditional"
24138fi
24139
ba4481b5
DL
24140echo creating lib-src/Makefile
24141( cd lib-src
24142 rm -f junk.c junk1.c junk2.c
24143 sed -e '/start of cpp stuff/q' \
24144 < Makefile.c > junk1.c
24145 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24146 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24147 < Makefile.c > junk.c
503d2be0 24148 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24149 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24150 cat junk1.c junk2.c > Makefile.new
24151 rm -f junk.c junk1.c junk2.c
24152 chmod 444 Makefile.new
24153 mv -f Makefile.new Makefile
24154)
24155
24156echo creating src/Makefile
24157( cd src
24158 rm -f junk.c junk1.c junk2.c
24159 sed -e '/start of cpp stuff/q' \
24160 < Makefile.c > junk1.c
24161 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24162 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24163 < Makefile.c > junk.c
503d2be0 24164 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24165 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24166 cat junk1.c junk2.c > Makefile.new
24167 rm -f junk.c junk1.c junk2.c
24168 chmod 444 Makefile.new
24169 mv -f Makefile.new Makefile
24170)
24171
503d2be0 24172if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 24173 echo creating src/.gdbinit
503d2be0 24174 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
24175fi
24176
24177# This is how we know whether to re-run configure in certain cases.
24178touch src/config.stamp
24179
503d2be0
AS
24180 ;;
24181 esac
24182done
c0d27fcc 24183_ACEOF
503d2be0 24184
c0d27fcc 24185cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 24186
503d2be0 24187{ (exit 0); exit 0; }
c0d27fcc 24188_ACEOF
ba4481b5 24189chmod +x $CONFIG_STATUS
503d2be0
AS
24190ac_clean_files=$ac_clean_files_save
24191
c0d27fcc 24192
503d2be0
AS
24193# configure is writing to config.log, and then calls config.status.
24194# config.status does its own redirection, appending to config.log.
24195# Unfortunately, on DOS this fails, as config.log is still kept open
24196# by configure, so config.status won't be able to write to it; its
24197# output is simply discarded. So we exec the FD to /dev/null,
24198# effectively closing config.log, so it can be properly (re)opened and
24199# appended to by config.status. When coming back to configure, we
24200# need to make the FD available again.
24201if test "$no_create" != yes; then
24202 ac_cs_success=:
19650fd6
AS
24203 ac_config_status_args=
24204 test "$silent" = yes &&
24205 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 24206 exec 5>/dev/null
19650fd6 24207 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
24208 exec 5>>config.log
24209 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24210 # would make configure fail if this is the last instruction.
24211 $ac_cs_success || { (exit 1); exit 1; }
24212fi
f5f47add 24213
c0d27fcc 24214