*** empty log message ***
[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#
edfaf76d 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
e143ad11 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 SET_MAKE PKG_CONFIG 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
e143ad11 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
2096 ;;
ba4481b5 2097
409d9577
GM
2098 hppa*-*-linux-gnu* )
2099 machine=hp800 opsys=gnu-linux
2100 ;;
2101
ba4481b5
DL
2102 ## HP 9000 series 700 and 800, running HP/UX
2103 hppa*-hp-hpux* )
2104 ## Cross-compilation? Nah!
2105 case "`uname -r`" in
2106 ## Someone's system reports A.B8.05 for this.
2107 ## I wonder what other possibilities there are.
2108 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2109 *.08.* ) machine=hp800 opsys=hpux8 ;;
2110 *.09.* ) machine=hp800 opsys=hpux9 ;;
2111 *) machine=hp800 opsys=hpux10 ;;
2112 esac
2113 ;;
2114 hppa*-*-nextstep* )
2115 machine=hp800 opsys=nextstep
2116 ;;
2117
2118 ## Orion machines
2119 orion-orion-bsd* )
2120 machine=orion opsys=bsd4-2
2121 ;;
2122 clipper-orion-bsd* )
2123 machine=orion105 opsys=bsd4-2
2124 ;;
2125
2126 ## IBM machines
2127 i[3456]86-ibm-aix1.1* )
2128 machine=ibmps2-aix opsys=usg5-2-2
2129 ;;
2130 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2131 machine=ibmps2-aix opsys=usg5-3
2132 ;;
2133 i370-ibm-aix*)
2134 machine=ibm370aix opsys=usg5-3
2135 ;;
55597d70 2136 s390-*-linux-gnu* )
138f0859
GM
2137 machine=ibms390 opsys=gnu-linux
2138 ;;
ba4481b5
DL
2139 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2140 machine=ibmrs6000 opsys=aix3-1
2141 ;;
2142 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2143 machine=ibmrs6000 opsys=aix3-2-5
2144 ;;
2145 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2146 machine=ibmrs6000 opsys=aix4-1
2147 ;;
2148 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2149 machine=ibmrs6000 opsys=aix4-2
2150 ;;
55597d70 2151 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2152 machine=ibmrs6000 opsys=aix4-2
2153 ;;
ba4481b5
DL
2154 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2155 machine=ibmrs6000 opsys=aix4
2156 ;;
2157 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2158 machine=ibmrs6000 opsys=aix4-1
2159 ;;
2160 rs6000-ibm-aix* | powerpc-ibm-aix* )
2161 machine=ibmrs6000 opsys=aix3-2
2162 ;;
2163 romp-ibm-bsd4.3* )
2164 machine=ibmrt opsys=bsd4-3
2165 ;;
2166 romp-ibm-bsd4.2* )
2167 machine=ibmrt opsys=bsd4-2
2168 ;;
2169 romp-ibm-aos4.3* )
2170 machine=ibmrt opsys=bsd4-3
2171 ;;
2172 romp-ibm-aos4.2* )
2173 machine=ibmrt opsys=bsd4-2
2174 ;;
2175 romp-ibm-aos* )
2176 machine=ibmrt opsys=bsd4-3
2177 ;;
2178 romp-ibm-bsd* )
2179 machine=ibmrt opsys=bsd4-3
2180 ;;
2181 romp-ibm-aix* )
2182 machine=ibmrt-aix opsys=usg5-2-2
2183 ;;
2184
2185 ## Integrated Solutions `Optimum V'
2186 m68*-isi-bsd4.2* )
2187 machine=isi-ov opsys=bsd4-2
2188 ;;
2189 m68*-isi-bsd4.3* )
2190 machine=isi-ov opsys=bsd4-3
2191 ;;
2192
2193 ## Intel 386 machines where we do care about the manufacturer
2194 i[3456]86-intsys-sysv* )
2195 machine=is386 opsys=usg5-2-2
2196 ;;
2197
2198 ## Prime EXL
2199 i[3456]86-prime-sysv* )
2200 machine=i386 opsys=usg5-3
2201 ;;
2202
2203 ## Sequent Symmetry running Dynix
2204 i[3456]86-sequent-bsd* )
2205 machine=symmetry opsys=bsd4-3
2206 ;;
2207
2208 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2209 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2210 machine=sequent-ptx opsys=ptx4
2211 NON_GNU_CPP=/lib/cpp
2212 ;;
2213
2214 ## Sequent Symmetry running DYNIX/ptx
2215 ## Use the old cpp rather than the newer ANSI one.
2216 i[3456]86-sequent-ptx* )
2217 machine=sequent-ptx opsys=ptx
2218 NON_GNU_CPP="/lib/cpp"
2219 ;;
2220
2221 ## ncr machine running svr4.3.
2222 i[3456]86-ncr-sysv4.3 )
2223 machine=ncr386 opsys=usg5-4-3
2224 ;;
2225
2226 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2227 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2228 i[3456]86-ncr-sysv* )
2229 machine=ncr386 opsys=usg5-4-2
2230 ;;
2231
2232 ## Intel Paragon OSF/1
2233 i860-intel-osf1* )
2234 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2235 ;;
2236
2237 ## Intel 860
2238 i860-*-sysv4* )
2239 machine=i860 opsys=usg5-4
2240 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2241 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2242 ;;
2243
c76e04a8
GM
2244 ## Macintosh PowerPC
2245 powerpc*-*-linux-gnu* )
2246 machine=macppc opsys=gnu-linux
2247 ;;
2248
ba4481b5
DL
2249 ## Masscomp machines
2250 m68*-masscomp-rtu* )
2251 machine=masscomp opsys=rtu
2252 ;;
2253
2254 ## Megatest machines
2255 m68*-megatest-bsd* )
2256 machine=mega68 opsys=bsd4-2
2257 ;;
2258
2259 ## Workstations sold by MIPS
2260 ## This is not necessarily all workstations using the MIPS processor -
2261 ## Irises are produced by SGI, and DECstations by DEC.
2262
2263 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2264 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2265 ## it gives for choosing between the alternatives seems to be "Use
2266 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2267 ## the BSD world." I'll assume that these are instructions for
2268 ## handling two odd situations, and that every other situation
2269 ## should use mips.h and usg5-2-2, they being listed first.
2270 mips-mips-usg* )
2271 machine=mips4
2272 ## Fall through to the general code at the bottom to decide on the OS.
2273 ;;
2274 mips-mips-riscos4* )
2275 machine=mips4 opsys=bsd4-3
2276 NON_GNU_CC="cc -systype bsd43"
2277 NON_GNU_CPP="cc -systype bsd43 -E"
2278 ;;
2279 mips-mips-riscos5* )
2280 machine=mips4 opsys=riscos5
2281 NON_GNU_CC="cc -systype bsd43"
2282 NON_GNU_CPP="cc -systype bsd43 -E"
2283 ;;
2284 mips-mips-bsd* )
2285 machine=mips opsys=bsd4-3
2286 ;;
2287 mips-mips-* )
2288 machine=mips opsys=usg5-2-2
2289 ;;
2290
2291 ## NeXT
2292 m68*-next-* | m68k-*-nextstep* )
2293 machine=m68k opsys=nextstep
2294 ;;
2295
2296 ## The complete machine from National Semiconductor
2297 ns32k-ns-genix* )
2298 machine=ns32000 opsys=usg5-2
2299 ;;
2300
2301 ## NCR machines
2302 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2303 machine=tower32 opsys=usg5-2-2
2304 ;;
2305 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2306 machine=tower32v3 opsys=usg5-3
2307 ;;
2308
2309 ## NEC EWS4800
2310 mips-nec-sysv4*)
2311 machine=ews4800 opsys=ux4800
2312 ;;
2313
2314 ## Nixdorf Targon 31
2315 m68*-nixdorf-sysv* )
2316 machine=targon31 opsys=usg5-2-2
2317 ;;
2318
2319 ## Nu (TI or LMI)
2320 m68*-nu-sysv* )
2321 machine=nu opsys=usg5-2
2322 ;;
2323
2324 ## Plexus
2325 m68*-plexus-sysv* )
2326 machine=plexus opsys=usg5-2
2327 ;;
2328
ba4481b5
DL
2329 ## Pyramid machines
2330 ## I don't really have any idea what sort of processor the Pyramid has,
2331 ## so I'm assuming it is its own architecture.
2332 pyramid-pyramid-bsd* )
2333 machine=pyramid opsys=bsd4-2
2334 ;;
2335
2336 ## Sequent Balance
2337 ns32k-sequent-bsd4.2* )
2338 machine=sequent opsys=bsd4-2
2339 ;;
2340 ns32k-sequent-bsd4.3* )
2341 machine=sequent opsys=bsd4-3
2342 ;;
2343
2344 ## Siemens Nixdorf
2345 mips-siemens-sysv* | mips-sni-sysv*)
2346 machine=mips-siemens opsys=usg5-4
2347 NON_GNU_CC=/usr/ccs/bin/cc
2348 NON_GNU_CPP=/usr/ccs/lib/cpp
2349 ;;
2350
2351 ## Silicon Graphics machines
2352 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2353 m68*-sgi-iris3.5* )
2354 machine=irist opsys=iris3-5
2355 ;;
2356 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2357 machine=irist opsys=iris3-6
2358 ;;
2359 ## Iris 4D
2360 mips-sgi-irix3* )
2361 machine=iris4d opsys=irix3-3
2362 ;;
2363 mips-sgi-irix4* )
2364 machine=iris4d opsys=irix4-0
2365 ;;
2366 mips-sgi-irix6.5 )
2367 machine=iris4d opsys=irix6-5
946173ad
DL
2368 # Without defining _LANGUAGE_C, things get masked out in the headers
2369 # so that, for instance, grepping for `free' in stdlib.h fails and
2370 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2371 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2372 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2373 ;;
2374 mips-sgi-irix6* )
2375 machine=iris4d opsys=irix6-0
c4bb2108 2376 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2377 # but presumably it does no harm.
2378 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2379 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2380 NON_GCC_TEST_OPTIONS=-32
2381 ;;
2382 mips-sgi-irix5.[01]* )
2383 machine=iris4d opsys=irix5-0
2384 ;;
2385 mips-sgi-irix5* | mips-sgi-irix* )
2386 machine=iris4d opsys=irix5-2
2387 ;;
2388
2389 ## SONY machines
2390 m68*-sony-bsd4.2* )
2391 machine=news opsys=bsd4-2
2392 ;;
2393 m68*-sony-bsd4.3* )
2394 machine=news opsys=bsd4-3
2395 ;;
2396 m68*-sony-newsos3* | m68*-sony-news3*)
2397 machine=news opsys=bsd4-3
2398 ;;
2399 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2400 machine=news-risc opsys=bsd4-3
2401 ;;
2402 mips-sony-newsos6* )
2403 machine=news-r6 opsys=newsos6
2404 ;;
2405 mips-sony-news* )
2406 machine=news-risc opsys=newsos5
2407 ;;
2408
2409 ## Stride
2410 m68*-stride-sysv* )
2411 machine=stride opsys=usg5-2
2412 ;;
2413
2414 ## Suns
2415 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2416 machine=sparc opsys=gnu-linux
2417 ;;
2418
d054101f 2419 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2420 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2421 | rs6000-*-solaris2*)
2422 case "${canonical}" in
2423 m68*-sunos1* ) machine=sun1 ;;
2424 m68*-sunos2* ) machine=sun2 ;;
2425 m68* ) machine=sun3 ;;
2426 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2427 i[3456]86-*-* ) machine=intel386 ;;
2428 powerpcle* ) machine=powerpcle ;;
2429 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2430 sparc* ) machine=sparc ;;
2431 * ) unported=yes ;;
2432 esac
2433 case "${canonical}" in
2434 ## The Sun386 didn't get past 4.0.
2435 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2436 *-sunos4.0* ) opsys=sunos4-0 ;;
2437 *-sunos4.1.[3-9]*noshare )
2438 ## This name is sunos413 instead of sunos4-1-3
2439 ## to avoid a file name conflict on MSDOS.
2440 opsys=sunos413
2441 NON_GNU_CPP=/usr/lib/cpp
2442 NON_GCC_TEST_OPTIONS=-Bstatic
2443 GCC_TEST_OPTIONS=-static
2444 ;;
2445 *-sunos4.1.[3-9]* | *-sunos4shr*)
2446 opsys=sunos4shr
2447 NON_GNU_CPP=/usr/lib/cpp
2448 ;;
2449 *-sunos4* | *-sunos )
2450 opsys=sunos4-1
2451 NON_GCC_TEST_OPTIONS=-Bstatic
2452 GCC_TEST_OPTIONS=-static
2453 ;;
2454 *-sunos5.3* | *-solaris2.3* )
2455 opsys=sol2-3
2456 NON_GNU_CPP=/usr/ccs/lib/cpp
2457 ;;
2458 *-sunos5.4* | *-solaris2.4* )
2459 opsys=sol2-4
2460 NON_GNU_CPP=/usr/ccs/lib/cpp
2461 RANLIB="ar -ts"
2462 ;;
2463 *-sunos5.5* | *-solaris2.5* )
2464 opsys=sol2-5
2465 NON_GNU_CPP=/usr/ccs/lib/cpp
2466 RANLIB="ar -ts"
2467 ;;
8e967cf7
MR
2468 *-sunos5.6* | *-solaris2.6* )
2469 opsys=sol2-6
2470 NON_GNU_CPP=/usr/ccs/lib/cpp
2471 RANLIB="ar -ts"
2472 ;;
ba4481b5 2473 *-sunos5* | *-solaris* )
9e71690e 2474 opsys=sol2-6
ba4481b5
DL
2475 NON_GNU_CPP=/usr/ccs/lib/cpp
2476 ;;
2477 * ) opsys=bsd4-2 ;;
2478 esac
2479 ## Watch out for a compiler that we know will not work.
2480 case "${canonical}" in
2481 *-solaris* | *-sunos5* )
2482 if [ "x$CC" = x/usr/ucb/cc ]; then
2483 ## /usr/ucb/cc doesn't work;
2484 ## we should find some other compiler that does work.
2485 unset CC
2486 fi
2487 ;;
2488 *) ;;
2489 esac
2490 ;;
2491 sparc-*-nextstep* )
2492 machine=sparc opsys=nextstep
2493 ;;
2494
2495 ## Tadpole 68k
2496 m68*-tadpole-sysv* )
2497 machine=tad68k opsys=usg5-3
2498 ;;
2499
2500 ## Tahoe machines
2501 tahoe-tahoe-bsd4.2* )
2502 machine=tahoe opsys=bsd4-2
2503 ;;
2504 tahoe-tahoe-bsd4.3* )
2505 machine=tahoe opsys=bsd4-3
2506 ;;
2507
2508 ## Tandem Integrity S2
2509 mips-tandem-sysv* )
2510 machine=tandem-s2 opsys=usg5-3
2511 ;;
2512
2513 ## Tektronix XD88
2514 m88k-tektronix-sysv3* )
2515 machine=tekxd88 opsys=usg5-3
2516 ;;
2517
2518 ## Tektronix 16000 box (6130?)
2519 ns16k-tektronix-bsd* )
2520 machine=ns16000 opsys=bsd4-2
2521 ;;
2522 ## Tektronix 4300
2523 ## src/m/tek4300.h hints that this is a m68k machine.
2524 m68*-tektronix-bsd* )
2525 machine=tek4300 opsys=bsd4-3
2526 ;;
2527
2528 ## Titan P2 or P3
2529 ## We seem to have lost the machine-description file titan.h!
2530 titan-titan-sysv* )
2531 machine=titan opsys=usg5-3
2532 ;;
2533
2534 ## Ustation E30 (SS5E)
2535 m68*-unisys-uniplus* )
2536 machine=ustation opsystem=unipl5-2
2537 ;;
2538
2539 ## Vaxen.
2540 vax-dec-* )
2541 machine=vax
2542 case "${canonical}" in
2543 *-bsd4.1* ) opsys=bsd4-1 ;;
2544 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2545 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2546 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2547 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2548 *-vms* ) opsys=vms ;;
2549 * ) unported=yes
2550 esac
2551 ;;
2552
2553 ## Whitechapel MG1
2554 ns16k-whitechapel-* )
2555 machine=mg1
2556 ## We don't know what sort of OS runs on these; we'll let the
2557 ## operating system guessing code below try.
2558 ;;
2559
2560 ## Wicat
2561 m68*-wicat-sysv* )
2562 machine=wicat opsys=usg5-2
2563 ;;
2564
f4988be7
GM
2565 ## IA-64
2566 ia64*-*-linux* )
2567 machine=ia64 opsys=gnu-linux
2568 ;;
2569
ba4481b5
DL
2570 ## Intel 386 machines where we don't care about the manufacturer
2571 i[3456]86-*-* )
2572 machine=intel386
2573 case "${canonical}" in
c60ee5e7 2574 *-cygwin ) opsys=cygwin ;;
eae54018 2575 *-darwin* ) opsys=darwin
23fd4483
ST
2576 CPP="${CC-cc} -E -no-cpp-precomp"
2577 ;;
ba4481b5
DL
2578 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2579 *-isc2.2* ) opsys=isc2-2 ;;
2580 *-isc4.0* ) opsys=isc4-0 ;;
2581 *-isc4.* ) opsys=isc4-1
2582 GCC_TEST_OPTIONS=-posix
2583 NON_GCC_TEST_OPTIONS=-Xp
2584 ;;
2585 *-isc* ) opsys=isc3-0 ;;
2586 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2587 *-esix* ) opsys=esix ;;
2588 *-xenix* ) opsys=xenix ;;
2589 *-linux-gnu* ) opsys=gnu-linux ;;
2590 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2591 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2592 NON_GNU_CPP=/lib/cpp
2593 # Prevent -belf from being passed to $CPP.
2594 # /lib/cpp does not accept it.
2595 OVERRIDE_CPPFLAGS=" "
2596 ;;
2597 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2598 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2599 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2600 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2601 *-nextstep* ) opsys=nextstep ;;
2602 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2603 esac
2604 ;;
2605
2606 ## m68k Linux-based GNU system
2607 m68k-*-linux-gnu* )
2608 machine=m68k opsys=gnu-linux
2609 ;;
2610
2611 ## Mips Linux-based GNU system
cd958eb3 2612 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2613 machine=mips opsys=gnu-linux
2614 ;;
2615
2616 ## UXP/DS
2617 sparc-fujitsu-sysv4* )
2618 machine=sparc opsys=uxpds
2619 NON_GNU_CPP=/usr/ccs/lib/cpp
2620 RANLIB="ar -ts"
2621 ;;
2622
2623 ## UXP/V
2624 f301-fujitsu-uxpv4.1)
2625 machine=f301 opsys=uxpv
2626 ;;
2627
e0f712ba
AC
2628 ## Darwin / Mac OS X
2629 powerpc-apple-darwin* )
2630 machine=powermac opsys=darwin
2631 # Define CPP as follows to make autoconf work correctly.
2a75d75d 2632 CPP="${CC-cc} -E -no-cpp-precomp"
8ae52ca6
RF
2633 # Use fink packages if available.
2634 if test -d /sw/include && test -d /sw/lib; then
2635 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2636 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2637 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2638 fi
e0f712ba
AC
2639 ;;
2640
598a2813
AS
2641 ## AMD x86-64 Linux-based GNU system
2642 x86_64-*-linux-gnu* )
24b01ec4 2643 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2644 ;;
2645
ba4481b5
DL
2646 * )
2647 unported=yes
2648 ;;
2649esac
2650
2651### If the code above didn't choose an operating system, just choose
2652### an operating system based on the configuration name. You really
2653### only want to use this when you have no idea what the right
2654### operating system is; if you know what operating systems a machine
2655### runs, it's cleaner to make it explicit in the case statement
2656### above.
2657if test x"${opsys}" = x; then
2658 case "${canonical}" in
2659 *-gnu* ) opsys=gnu ;;
2660 *-bsd4.[01] ) opsys=bsd4-1 ;;
2661 *-bsd4.2 ) opsys=bsd4-2 ;;
2662 *-bsd4.3 ) opsys=bsd4-3 ;;
2663 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2664 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2665 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2666 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2667 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2668 *-sysv5uw* ) opsys=unixware ;;
2669 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2670 *-sysv4.1* | *-sysvr4.1* )
2671 NON_GNU_CPP=/usr/lib/cpp
2672 opsys=usg5-4 ;;
2673 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2674 if [ x$NON_GNU_CPP = x ]; then
2675 if [ -f /usr/ccs/lib/cpp ]; then
2676 NON_GNU_CPP=/usr/ccs/lib/cpp
2677 else
2678 NON_GNU_CPP=/lib/cpp
2679 fi
2680 fi
2681 opsys=usg5-4-2 ;;
2682 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2683 * )
2684 unported=yes
2685 ;;
2686 esac
2687fi
2688
c0d27fcc 2689
22044edf 2690
ba4481b5 2691if test $unported = yes; then
c0d27fcc 2692 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2693Check \`etc/MACHINES' for recognized configuration names." >&5
2694echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2695Check \`etc/MACHINES' for recognized configuration names." >&2;}
2696 { (exit 1); exit 1; }; }
ba4481b5
DL
2697fi
2698
2699machfile="m/${machine}.h"
2700opsysfile="s/${opsys}.h"
2701
c0d27fcc 2702
ba4481b5
DL
2703#### Choose a compiler.
2704test -n "$CC" && cc_specified=yes
2705
2706# Save the value of CFLAGS that the user specified.
2707SPECIFIED_CFLAGS="$CFLAGS"
2708
2709case ${with_gcc} in
2710 "yes" ) CC="gcc" GCC=yes ;;
2711 "no" ) : ${CC=cc} ;;
503d2be0
AS
2712 * )
2713esac
2714ac_ext=c
2715ac_cpp='$CPP $CPPFLAGS'
2716ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2717ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2718ac_compiler_gnu=$ac_cv_c_compiler_gnu
2719if test -n "$ac_tool_prefix"; then
2720 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2721set dummy ${ac_tool_prefix}gcc; ac_word=$2
c0d27fcc 2722echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2723echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2724if test "${ac_cv_prog_CC+set}" = set; then
2725 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2726else
2727 if test -n "$CC"; then
2728 ac_cv_prog_CC="$CC" # Let the user override the test.
2729else
c0d27fcc
MR
2730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2731for as_dir in $PATH
2732do
2733 IFS=$as_save_IFS
2734 test -z "$as_dir" && as_dir=.
2735 for ac_exec_ext in '' $ac_executable_extensions; do
2736 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2737 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2738 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2739 break 2
2740 fi
2741done
503d2be0
AS
2742done
2743
ba4481b5
DL
2744fi
2745fi
503d2be0 2746CC=$ac_cv_prog_CC
ba4481b5 2747if test -n "$CC"; then
c0d27fcc 2748 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2749echo "${ECHO_T}$CC" >&6
2750else
c0d27fcc 2751 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2752echo "${ECHO_T}no" >&6
2753fi
2754
2755fi
2756if test -z "$ac_cv_prog_CC"; then
2757 ac_ct_CC=$CC
2758 # Extract the first word of "gcc", so it can be a program name with args.
2759set dummy gcc; ac_word=$2
c0d27fcc 2760echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2761echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2762if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2763 echo $ECHO_N "(cached) $ECHO_C" >&6
2764else
2765 if test -n "$ac_ct_CC"; then
2766 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2767else
c0d27fcc
MR
2768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2769for as_dir in $PATH
2770do
2771 IFS=$as_save_IFS
2772 test -z "$as_dir" && as_dir=.
2773 for ac_exec_ext in '' $ac_executable_extensions; do
2774 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2775 ac_cv_prog_ac_ct_CC="gcc"
2776 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2777 break 2
2778 fi
2779done
503d2be0
AS
2780done
2781
2782fi
2783fi
2784ac_ct_CC=$ac_cv_prog_ac_ct_CC
2785if test -n "$ac_ct_CC"; then
c0d27fcc 2786 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0 2787echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2788else
c0d27fcc 2789 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2790echo "${ECHO_T}no" >&6
2791fi
2792
2793 CC=$ac_ct_CC
2794else
2795 CC="$ac_cv_prog_CC"
ba4481b5
DL
2796fi
2797
2798if test -z "$CC"; then
503d2be0
AS
2799 if test -n "$ac_tool_prefix"; then
2800 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2801set dummy ${ac_tool_prefix}cc; ac_word=$2
c0d27fcc 2802echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2803echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2804if test "${ac_cv_prog_CC+set}" = set; then
2805 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2806else
2807 if test -n "$CC"; then
2808 ac_cv_prog_CC="$CC" # Let the user override the test.
2809else
c0d27fcc
MR
2810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2811for as_dir in $PATH
2812do
2813 IFS=$as_save_IFS
2814 test -z "$as_dir" && as_dir=.
2815 for ac_exec_ext in '' $ac_executable_extensions; do
2816 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2817 ac_cv_prog_CC="${ac_tool_prefix}cc"
2818 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2819 break 2
2820 fi
2821done
503d2be0
AS
2822done
2823
2824fi
2825fi
2826CC=$ac_cv_prog_CC
2827if test -n "$CC"; then
c0d27fcc 2828 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2829echo "${ECHO_T}$CC" >&6
2830else
c0d27fcc 2831 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2832echo "${ECHO_T}no" >&6
2833fi
2834
2835fi
2836if test -z "$ac_cv_prog_CC"; then
2837 ac_ct_CC=$CC
2838 # Extract the first word of "cc", so it can be a program name with args.
2839set dummy cc; ac_word=$2
c0d27fcc 2840echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2841echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2842if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2843 echo $ECHO_N "(cached) $ECHO_C" >&6
2844else
2845 if test -n "$ac_ct_CC"; then
2846 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2847else
c0d27fcc
MR
2848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2849for as_dir in $PATH
2850do
2851 IFS=$as_save_IFS
2852 test -z "$as_dir" && as_dir=.
2853 for ac_exec_ext in '' $ac_executable_extensions; do
2854 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2855 ac_cv_prog_ac_ct_CC="cc"
2856 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2857 break 2
2858 fi
2859done
503d2be0
AS
2860done
2861
2862fi
2863fi
2864ac_ct_CC=$ac_cv_prog_ac_ct_CC
2865if test -n "$ac_ct_CC"; then
c0d27fcc 2866 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2867echo "${ECHO_T}$ac_ct_CC" >&6
2868else
c0d27fcc 2869 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2870echo "${ECHO_T}no" >&6
2871fi
2872
2873 CC=$ac_ct_CC
2874else
2875 CC="$ac_cv_prog_CC"
2876fi
2877
2878fi
2879if test -z "$CC"; then
2880 # Extract the first word of "cc", so it can be a program name with args.
2881set dummy cc; ac_word=$2
c0d27fcc 2882echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2883echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2884if test "${ac_cv_prog_CC+set}" = set; then
2885 echo $ECHO_N "(cached) $ECHO_C" >&6
2886else
2887 if test -n "$CC"; then
2888 ac_cv_prog_CC="$CC" # Let the user override the test.
2889else
2890 ac_prog_rejected=no
c0d27fcc
MR
2891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2892for as_dir in $PATH
2893do
2894 IFS=$as_save_IFS
2895 test -z "$as_dir" && as_dir=.
2896 for ac_exec_ext in '' $ac_executable_extensions; do
2897 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2898 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2899 ac_prog_rejected=yes
2900 continue
2901 fi
2902 ac_cv_prog_CC="cc"
2903 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2904 break 2
2905 fi
2906done
503d2be0
AS
2907done
2908
ba4481b5
DL
2909if test $ac_prog_rejected = yes; then
2910 # We found a bogon in the path, so make sure we never use it.
2911 set dummy $ac_cv_prog_CC
2912 shift
503d2be0 2913 if test $# != 0; then
ba4481b5
DL
2914 # We chose a different compiler from the bogus one.
2915 # However, it has the same basename, so the bogon will be chosen
2916 # first if we set CC to just the basename; use the full file name.
2917 shift
6bae0ccf 2918 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2919 fi
2920fi
2921fi
2922fi
503d2be0 2923CC=$ac_cv_prog_CC
ba4481b5 2924if test -n "$CC"; then
c0d27fcc 2925 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2926echo "${ECHO_T}$CC" >&6
ba4481b5 2927else
c0d27fcc 2928 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2929echo "${ECHO_T}no" >&6
ba4481b5
DL
2930fi
2931
503d2be0
AS
2932fi
2933if test -z "$CC"; then
2934 if test -n "$ac_tool_prefix"; then
2935 for ac_prog in cl
2936 do
2937 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2938set dummy $ac_tool_prefix$ac_prog; ac_word=$2
c0d27fcc 2939echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2940echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2941if test "${ac_cv_prog_CC+set}" = set; then
2942 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2943else
2944 if test -n "$CC"; then
2945 ac_cv_prog_CC="$CC" # Let the user override the test.
2946else
c0d27fcc
MR
2947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2948for as_dir in $PATH
2949do
2950 IFS=$as_save_IFS
2951 test -z "$as_dir" && as_dir=.
2952 for ac_exec_ext in '' $ac_executable_extensions; do
2953 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2954 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2955 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2956 break 2
2957 fi
2958done
503d2be0
AS
2959done
2960
c4bb2108
DL
2961fi
2962fi
503d2be0 2963CC=$ac_cv_prog_CC
c4bb2108 2964if test -n "$CC"; then
c0d27fcc 2965 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2966echo "${ECHO_T}$CC" >&6
c4bb2108 2967else
c0d27fcc 2968 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2969echo "${ECHO_T}no" >&6
2970fi
2971
2972 test -n "$CC" && break
2973 done
2974fi
2975if test -z "$CC"; then
2976 ac_ct_CC=$CC
2977 for ac_prog in cl
2978do
2979 # Extract the first word of "$ac_prog", so it can be a program name with args.
2980set dummy $ac_prog; ac_word=$2
c0d27fcc 2981echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2982echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2983if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2984 echo $ECHO_N "(cached) $ECHO_C" >&6
2985else
2986 if test -n "$ac_ct_CC"; then
2987 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2988else
c0d27fcc
MR
2989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2990for as_dir in $PATH
2991do
2992 IFS=$as_save_IFS
2993 test -z "$as_dir" && as_dir=.
2994 for ac_exec_ext in '' $ac_executable_extensions; do
2995 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2996 ac_cv_prog_ac_ct_CC="$ac_prog"
2997 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2998 break 2
2999 fi
3000done
503d2be0
AS
3001done
3002
c4bb2108 3003fi
503d2be0
AS
3004fi
3005ac_ct_CC=$ac_cv_prog_ac_ct_CC
3006if test -n "$ac_ct_CC"; then
c0d27fcc 3007 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
3008echo "${ECHO_T}$ac_ct_CC" >&6
3009else
c0d27fcc 3010 echo "$as_me:$LINENO: result: no" >&5
503d2be0 3011echo "${ECHO_T}no" >&6
ba4481b5
DL
3012fi
3013
503d2be0
AS
3014 test -n "$ac_ct_CC" && break
3015done
ba4481b5 3016
503d2be0
AS
3017 CC=$ac_ct_CC
3018fi
3019
3020fi
ba4481b5 3021
c0d27fcc 3022
19650fd6
AS
3023test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3024See \`config.log' for more details." >&5
3025echo "$as_me: error: no acceptable C compiler found in \$PATH
3026See \`config.log' for more details." >&2;}
503d2be0 3027 { (exit 1); exit 1; }; }
c4bb2108 3028
503d2be0 3029# Provide some information about the compiler.
c0d27fcc 3030echo "$as_me:$LINENO:" \
503d2be0
AS
3031 "checking for C compiler version" >&5
3032ac_compiler=`set X $ac_compile; echo $2`
c0d27fcc 3033{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
3034 (eval $ac_compiler --version </dev/null >&5) 2>&5
3035 ac_status=$?
c0d27fcc 3036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3037 (exit $ac_status); }
c0d27fcc 3038{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
3039 (eval $ac_compiler -v </dev/null >&5) 2>&5
3040 ac_status=$?
c0d27fcc 3041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3042 (exit $ac_status); }
c0d27fcc 3043{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
3044 (eval $ac_compiler -V </dev/null >&5) 2>&5
3045 ac_status=$?
c0d27fcc 3046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3047 (exit $ac_status); }
3048
3049cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3050/* confdefs.h. */
3051_ACEOF
3052cat confdefs.h >>conftest.$ac_ext
3053cat >>conftest.$ac_ext <<_ACEOF
3054/* end confdefs.h. */
c4bb2108 3055
503d2be0
AS
3056int
3057main ()
3058{
3059
3060 ;
3061 return 0;
3062}
3063_ACEOF
3064ac_clean_files_save=$ac_clean_files
19650fd6 3065ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3066# Try to create an executable without -o first, disregard a.out.
3067# It will help us diagnose broken compilers, and finding out an intuition
3068# of exeext.
edfaf76d
LK
3069echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3070echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
503d2be0 3071ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
c0d27fcc 3072if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
503d2be0
AS
3073 (eval $ac_link_default) 2>&5
3074 ac_status=$?
c0d27fcc 3075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3076 (exit $ac_status); }; then
3077 # Find the output, starting from the most likely. This scheme is
3078# not robust to junk in `.', hence go to wildcards (a.*) only as a last
3079# resort.
c0d27fcc
MR
3080
3081# Be careful to initialize this variable, since it used to be cached.
3082# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
3083ac_cv_exeext=
19650fd6
AS
3084# b.out is created by i960 compilers.
3085for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
3086do
6bae0ccf 3087 test -f "$ac_file" || continue
503d2be0 3088 case $ac_file in
19650fd6 3089 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
edfaf76d 3090 ;;
19650fd6 3091 conftest.$ac_ext )
edfaf76d
LK
3092 # This is the source file.
3093 ;;
19650fd6 3094 [ab].out )
edfaf76d
LK
3095 # We found the default executable, but exeext='' is most
3096 # certainly right.
3097 break;;
19650fd6 3098 *.* )
edfaf76d
LK
3099 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3100 # FIXME: I believe we export ac_cv_exeext for Libtool,
3101 # but it would be cool to find out if it's true. Does anybody
3102 # maintain Libtool? --akim.
3103 export ac_cv_exeext
3104 break;;
19650fd6 3105 * )
edfaf76d 3106 break;;
503d2be0
AS
3107 esac
3108done
3109else
3110 echo "$as_me: failed program was:" >&5
19650fd6
AS
3111sed 's/^/| /' conftest.$ac_ext >&5
3112
6bae0ccf 3113{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3114See \`config.log' for more details." >&5
6bae0ccf 3115echo "$as_me: error: C compiler cannot create executables
19650fd6 3116See \`config.log' for more details." >&2;}
503d2be0
AS
3117 { (exit 77); exit 77; }; }
3118fi
3119
3120ac_exeext=$ac_cv_exeext
c0d27fcc 3121echo "$as_me:$LINENO: result: $ac_file" >&5
503d2be0
AS
3122echo "${ECHO_T}$ac_file" >&6
3123
3124# Check the compiler produces executables we can run. If not, either
3125# the compiler is broken, or we cross compile.
c0d27fcc 3126echo "$as_me:$LINENO: checking whether the C compiler works" >&5
503d2be0
AS
3127echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
3128# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3129# If not cross compiling, check that we can run a simple program.
3130if test "$cross_compiling" != yes; then
3131 if { ac_try='./$ac_file'
c0d27fcc 3132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3133 (eval $ac_try) 2>&5
3134 ac_status=$?
c0d27fcc 3135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3136 (exit $ac_status); }; }; then
3137 cross_compiling=no
ba4481b5 3138 else
503d2be0
AS
3139 if test "$cross_compiling" = maybe; then
3140 cross_compiling=yes
3141 else
c0d27fcc 3142 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3143If you meant to cross compile, use \`--host'.
3144See \`config.log' for more details." >&5
503d2be0 3145echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3146If you meant to cross compile, use \`--host'.
3147See \`config.log' for more details." >&2;}
503d2be0
AS
3148 { (exit 1); exit 1; }; }
3149 fi
ba4481b5 3150 fi
503d2be0 3151fi
c0d27fcc 3152echo "$as_me:$LINENO: result: yes" >&5
503d2be0
AS
3153echo "${ECHO_T}yes" >&6
3154
19650fd6 3155rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0
AS
3156ac_clean_files=$ac_clean_files_save
3157# Check the compiler produces executables we can run. If not, either
3158# the compiler is broken, or we cross compile.
c0d27fcc 3159echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
503d2be0 3160echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
c0d27fcc 3161echo "$as_me:$LINENO: result: $cross_compiling" >&5
503d2be0
AS
3162echo "${ECHO_T}$cross_compiling" >&6
3163
c0d27fcc
MR
3164echo "$as_me:$LINENO: checking for suffix of executables" >&5
3165echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3166if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
3167 (eval $ac_link) 2>&5
3168 ac_status=$?
c0d27fcc 3169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3170 (exit $ac_status); }; then
3171 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3172# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3173# work properly (i.e., refer to `conftest.exe'), while it won't with
3174# `rm'.
6bae0ccf
DL
3175for ac_file in conftest.exe conftest conftest.*; do
3176 test -f "$ac_file" || continue
503d2be0 3177 case $ac_file in
6bae0ccf 3178 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
503d2be0 3179 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d
LK
3180 export ac_cv_exeext
3181 break;;
503d2be0
AS
3182 * ) break;;
3183 esac
3184done
ba4481b5 3185else
19650fd6
AS
3186 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3187See \`config.log' for more details." >&5
3188echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3189See \`config.log' for more details." >&2;}
503d2be0 3190 { (exit 1); exit 1; }; }
ba4481b5 3191fi
ba4481b5 3192
503d2be0 3193rm -f conftest$ac_cv_exeext
c0d27fcc 3194echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
503d2be0 3195echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 3196
503d2be0
AS
3197rm -f conftest.$ac_ext
3198EXEEXT=$ac_cv_exeext
3199ac_exeext=$EXEEXT
c0d27fcc
MR
3200echo "$as_me:$LINENO: checking for suffix of object files" >&5
3201echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
503d2be0
AS
3202if test "${ac_cv_objext+set}" = set; then
3203 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3204else
503d2be0 3205 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3206/* confdefs.h. */
3207_ACEOF
3208cat confdefs.h >>conftest.$ac_ext
3209cat >>conftest.$ac_ext <<_ACEOF
3210/* end confdefs.h. */
ba4481b5 3211
503d2be0
AS
3212int
3213main ()
3214{
ba4481b5 3215
503d2be0
AS
3216 ;
3217 return 0;
3218}
3219_ACEOF
3220rm -f conftest.o conftest.obj
c0d27fcc 3221if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3222 (eval $ac_compile) 2>&5
3223 ac_status=$?
c0d27fcc 3224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3225 (exit $ac_status); }; then
3226 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3227 case $ac_file in
6bae0ccf 3228 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
503d2be0
AS
3229 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3230 break;;
3231 esac
3232done
c4bb2108 3233else
503d2be0 3234 echo "$as_me: failed program was:" >&5
19650fd6
AS
3235sed 's/^/| /' conftest.$ac_ext >&5
3236
3237{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3238See \`config.log' for more details." >&5
3239echo "$as_me: error: cannot compute suffix of object files: cannot compile
3240See \`config.log' for more details." >&2;}
503d2be0 3241 { (exit 1); exit 1; }; }
c4bb2108
DL
3242fi
3243
503d2be0
AS
3244rm -f conftest.$ac_cv_objext conftest.$ac_ext
3245fi
c0d27fcc 3246echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
503d2be0
AS
3247echo "${ECHO_T}$ac_cv_objext" >&6
3248OBJEXT=$ac_cv_objext
3249ac_objext=$OBJEXT
c0d27fcc 3250echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
3251echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3252if test "${ac_cv_c_compiler_gnu+set}" = set; then
3253 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3254else
503d2be0 3255 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3256/* confdefs.h. */
3257_ACEOF
3258cat confdefs.h >>conftest.$ac_ext
3259cat >>conftest.$ac_ext <<_ACEOF
3260/* end confdefs.h. */
503d2be0
AS
3261
3262int
3263main ()
3264{
3265#ifndef __GNUC__
3266 choke me
3267#endif
3268
3269 ;
3270 return 0;
3271}
3272_ACEOF
3273rm -f conftest.$ac_objext
c0d27fcc 3274if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3275 (eval $ac_compile) 2>conftest.er1
503d2be0 3276 ac_status=$?
edfaf76d
LK
3277 grep -v '^ *+' conftest.er1 >conftest.err
3278 rm -f conftest.er1
3279 cat conftest.err >&5
c0d27fcc 3280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3281 (exit $ac_status); } &&
e143ad11
AS
3282 { ac_try='test -z "$ac_c_werror_flag"
3283 || test ! -s conftest.err'
edfaf76d
LK
3284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3285 (eval $ac_try) 2>&5
3286 ac_status=$?
3287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3288 (exit $ac_status); }; } &&
3289 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3291 (eval $ac_try) 2>&5
3292 ac_status=$?
c0d27fcc 3293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3294 (exit $ac_status); }; }; then
3295 ac_compiler_gnu=yes
3296else
3297 echo "$as_me: failed program was:" >&5
19650fd6
AS
3298sed 's/^/| /' conftest.$ac_ext >&5
3299
503d2be0
AS
3300ac_compiler_gnu=no
3301fi
edfaf76d 3302rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3303ac_cv_c_compiler_gnu=$ac_compiler_gnu
3304
3305fi
c0d27fcc 3306echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
3307echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3308GCC=`test $ac_compiler_gnu = yes && echo yes`
3309ac_test_CFLAGS=${CFLAGS+set}
3310ac_save_CFLAGS=$CFLAGS
3311CFLAGS="-g"
c0d27fcc 3312echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
503d2be0
AS
3313echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3314if test "${ac_cv_prog_cc_g+set}" = set; then
3315 echo $ECHO_N "(cached) $ECHO_C" >&6
3316else
3317 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3318/* confdefs.h. */
3319_ACEOF
3320cat confdefs.h >>conftest.$ac_ext
3321cat >>conftest.$ac_ext <<_ACEOF
3322/* end confdefs.h. */
503d2be0
AS
3323
3324int
3325main ()
3326{
3327
3328 ;
3329 return 0;
3330}
3331_ACEOF
3332rm -f conftest.$ac_objext
c0d27fcc 3333if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3334 (eval $ac_compile) 2>conftest.er1
503d2be0 3335 ac_status=$?
edfaf76d
LK
3336 grep -v '^ *+' conftest.er1 >conftest.err
3337 rm -f conftest.er1
3338 cat conftest.err >&5
c0d27fcc 3339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3340 (exit $ac_status); } &&
e143ad11
AS
3341 { ac_try='test -z "$ac_c_werror_flag"
3342 || test ! -s conftest.err'
edfaf76d
LK
3343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3344 (eval $ac_try) 2>&5
3345 ac_status=$?
3346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3347 (exit $ac_status); }; } &&
3348 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3350 (eval $ac_try) 2>&5
3351 ac_status=$?
c0d27fcc 3352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3353 (exit $ac_status); }; }; then
ba4481b5
DL
3354 ac_cv_prog_cc_g=yes
3355else
503d2be0 3356 echo "$as_me: failed program was:" >&5
19650fd6
AS
3357sed 's/^/| /' conftest.$ac_ext >&5
3358
503d2be0 3359ac_cv_prog_cc_g=no
ba4481b5 3360fi
edfaf76d 3361rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 3362fi
c0d27fcc 3363echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
503d2be0 3364echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 3365if test "$ac_test_CFLAGS" = set; then
503d2be0 3366 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3367elif test $ac_cv_prog_cc_g = yes; then
3368 if test "$GCC" = yes; then
ba4481b5
DL
3369 CFLAGS="-g -O2"
3370 else
c4bb2108 3371 CFLAGS="-g"
ba4481b5 3372 fi
22afa6e8 3373else
c4bb2108
DL
3374 if test "$GCC" = yes; then
3375 CFLAGS="-O2"
3376 else
3377 CFLAGS=
3378 fi
ba4481b5 3379fi
6bae0ccf
DL
3380echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3381echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3382if test "${ac_cv_prog_cc_stdc+set}" = set; then
3383 echo $ECHO_N "(cached) $ECHO_C" >&6
3384else
3385 ac_cv_prog_cc_stdc=no
3386ac_save_CC=$CC
3387cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3388/* confdefs.h. */
3389_ACEOF
3390cat confdefs.h >>conftest.$ac_ext
3391cat >>conftest.$ac_ext <<_ACEOF
3392/* end confdefs.h. */
6bae0ccf
DL
3393#include <stdarg.h>
3394#include <stdio.h>
3395#include <sys/types.h>
3396#include <sys/stat.h>
3397/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3398struct buf { int x; };
3399FILE * (*rcsopen) (struct buf *, struct stat *, int);
3400static char *e (p, i)
3401 char **p;
3402 int i;
3403{
3404 return p[i];
3405}
3406static char *f (char * (*g) (char **, int), char **p, ...)
3407{
3408 char *s;
3409 va_list v;
3410 va_start (v,p);
3411 s = g (p, va_arg (v,int));
3412 va_end (v);
3413 return s;
3414}
edfaf76d
LK
3415
3416/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3417 function prototypes and stuff, but not '\xHH' hex character constants.
3418 These don't provoke an error unfortunately, instead are silently treated
3419 as 'x'. The following induces an error, until -std1 is added to get
3420 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3421 array size at least. It's necessary to write '\x00'==0 to get something
3422 that's true only with -std1. */
3423int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3424
6bae0ccf
DL
3425int test (int i, double x);
3426struct s1 {int (*f) (int a);};
3427struct s2 {int (*f) (double a);};
3428int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3429int argc;
3430char **argv;
3431int
3432main ()
3433{
3434return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3435 ;
3436 return 0;
3437}
3438_ACEOF
3439# Don't try gcc -ansi; that turns off useful extensions and
3440# breaks some systems' header files.
3441# AIX -qlanglvl=ansi
3442# Ultrix and OSF/1 -std1
3443# HP-UX 10.20 and later -Ae
3444# HP-UX older versions -Aa -D_HPUX_SOURCE
3445# SVR4 -Xc -D__EXTENSIONS__
3446for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3447do
3448 CC="$ac_save_CC $ac_arg"
3449 rm -f conftest.$ac_objext
3450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3451 (eval $ac_compile) 2>conftest.er1
6bae0ccf 3452 ac_status=$?
edfaf76d
LK
3453 grep -v '^ *+' conftest.er1 >conftest.err
3454 rm -f conftest.er1
3455 cat conftest.err >&5
6bae0ccf
DL
3456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3457 (exit $ac_status); } &&
e143ad11
AS
3458 { ac_try='test -z "$ac_c_werror_flag"
3459 || test ! -s conftest.err'
edfaf76d
LK
3460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3461 (eval $ac_try) 2>&5
3462 ac_status=$?
3463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3464 (exit $ac_status); }; } &&
3465 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
3466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3467 (eval $ac_try) 2>&5
3468 ac_status=$?
3469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3470 (exit $ac_status); }; }; then
3471 ac_cv_prog_cc_stdc=$ac_arg
3472break
3473else
3474 echo "$as_me: failed program was:" >&5
19650fd6
AS
3475sed 's/^/| /' conftest.$ac_ext >&5
3476
6bae0ccf 3477fi
edfaf76d 3478rm -f conftest.err conftest.$ac_objext
6bae0ccf
DL
3479done
3480rm -f conftest.$ac_ext conftest.$ac_objext
3481CC=$ac_save_CC
3482
3483fi
3484
3485case "x$ac_cv_prog_cc_stdc" in
3486 x|xno)
3487 echo "$as_me:$LINENO: result: none needed" >&5
3488echo "${ECHO_T}none needed" >&6 ;;
3489 *)
3490 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3491echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3492 CC="$CC $ac_cv_prog_cc_stdc" ;;
3493esac
3494
503d2be0
AS
3495# Some people use a C++ compiler to compile C. Since we use `exit',
3496# in C++ we need to declare it. In case someone uses the same compiler
3497# for both compiling C and C++ we need to have the C++ compiler decide
3498# the declaration of exit, since it's the most demanding environment.
3499cat >conftest.$ac_ext <<_ACEOF
3500#ifndef __cplusplus
3501 choke me
3502#endif
3503_ACEOF
3504rm -f conftest.$ac_objext
c0d27fcc 3505if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3506 (eval $ac_compile) 2>conftest.er1
503d2be0 3507 ac_status=$?
edfaf76d
LK
3508 grep -v '^ *+' conftest.er1 >conftest.err
3509 rm -f conftest.er1
3510 cat conftest.err >&5
c0d27fcc 3511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3512 (exit $ac_status); } &&
e143ad11
AS
3513 { ac_try='test -z "$ac_c_werror_flag"
3514 || 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); } &&
e143ad11
AS
3559 { ac_try='test -z "$ac_c_werror_flag"
3560 || test ! -s conftest.err'
edfaf76d
LK
3561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3562 (eval $ac_try) 2>&5
3563 ac_status=$?
3564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3565 (exit $ac_status); }; } &&
3566 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3568 (eval $ac_try) 2>&5
3569 ac_status=$?
c0d27fcc 3570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3571 (exit $ac_status); }; }; then
3572 :
3573else
3574 echo "$as_me: failed program was:" >&5
19650fd6
AS
3575sed 's/^/| /' conftest.$ac_ext >&5
3576
503d2be0
AS
3577continue
3578fi
edfaf76d 3579rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 3580 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3581/* confdefs.h. */
3582_ACEOF
3583cat confdefs.h >>conftest.$ac_ext
3584cat >>conftest.$ac_ext <<_ACEOF
3585/* end confdefs.h. */
503d2be0
AS
3586$ac_declaration
3587int
3588main ()
3589{
3590exit (42);
3591 ;
3592 return 0;
3593}
3594_ACEOF
3595rm -f conftest.$ac_objext
c0d27fcc 3596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3597 (eval $ac_compile) 2>conftest.er1
503d2be0 3598 ac_status=$?
edfaf76d
LK
3599 grep -v '^ *+' conftest.er1 >conftest.err
3600 rm -f conftest.er1
3601 cat conftest.err >&5
c0d27fcc 3602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3603 (exit $ac_status); } &&
e143ad11
AS
3604 { ac_try='test -z "$ac_c_werror_flag"
3605 || test ! -s conftest.err'
edfaf76d
LK
3606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3607 (eval $ac_try) 2>&5
3608 ac_status=$?
3609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3610 (exit $ac_status); }; } &&
3611 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3613 (eval $ac_try) 2>&5
3614 ac_status=$?
c0d27fcc 3615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3616 (exit $ac_status); }; }; then
3617 break
3618else
3619 echo "$as_me: failed program was:" >&5
19650fd6
AS
3620sed 's/^/| /' conftest.$ac_ext >&5
3621
503d2be0 3622fi
edfaf76d 3623rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3624done
3625rm -f conftest*
3626if test -n "$ac_declaration"; then
3627 echo '#ifdef __cplusplus' >>confdefs.h
3628 echo $ac_declaration >>confdefs.h
3629 echo '#endif' >>confdefs.h
3630fi
ba4481b5 3631
503d2be0
AS
3632else
3633 echo "$as_me: failed program was:" >&5
19650fd6
AS
3634sed 's/^/| /' conftest.$ac_ext >&5
3635
503d2be0 3636fi
edfaf76d 3637rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3638ac_ext=c
3639ac_cpp='$CPP $CPPFLAGS'
3640ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3641ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3642ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3643
c0d27fcc 3644
ba4481b5
DL
3645# On Suns, sometimes $CPP names a directory.
3646if test -n "$CPP" && test -d "$CPP"; then
3647 CPP=
3648fi
3649
3650#### Some systems specify a CPP to use unless we are using GCC.
3651#### Now that we know whether we are using GCC, we can decide whether
3652#### to use that one.
3653if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3654then
3655 CPP="$NON_GNU_CPP"
3656fi
3657
3658#### Some systems specify a CC to use unless we are using GCC.
3659#### Now that we know whether we are using GCC, we can decide whether
3660#### to use that one.
3661if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3662 test x$cc_specified != xyes
3663then
3664 CC="$NON_GNU_CC"
3665fi
3666
3667if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3668then
3669 CC="$CC $GCC_TEST_OPTIONS"
3670fi
3671
3672if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3673then
3674 CC="$CC $NON_GCC_TEST_OPTIONS"
3675fi
3676
e143ad11
AS
3677
3678ac_ext=c
3679ac_cpp='$CPP $CPPFLAGS'
3680ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3681ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3682ac_compiler_gnu=$ac_cv_c_compiler_gnu
3683echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3684echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3685# On Suns, sometimes $CPP names a directory.
3686if test -n "$CPP" && test -d "$CPP"; then
3687 CPP=
3688fi
3689if test -z "$CPP"; then
3690 if test "${ac_cv_prog_CPP+set}" = set; then
3691 echo $ECHO_N "(cached) $ECHO_C" >&6
3692else
3693 # Double quotes because CPP needs to be expanded
3694 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3695 do
3696 ac_preproc_ok=false
3697for ac_c_preproc_warn_flag in '' yes
3698do
3699 # Use a header file that comes with gcc, so configuring glibc
3700 # with a fresh cross-compiler works.
3701 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3702 # <limits.h> exists even on freestanding compilers.
3703 # On the NeXT, cc -E runs the code through the compiler's parser,
3704 # not just through cpp. "Syntax error" is here to catch this case.
3705 cat >conftest.$ac_ext <<_ACEOF
3706/* confdefs.h. */
3707_ACEOF
3708cat confdefs.h >>conftest.$ac_ext
3709cat >>conftest.$ac_ext <<_ACEOF
3710/* end confdefs.h. */
3711#ifdef __STDC__
3712# include <limits.h>
3713#else
3714# include <assert.h>
3715#endif
3716 Syntax error
3717_ACEOF
3718if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3719 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3720 ac_status=$?
3721 grep -v '^ *+' conftest.er1 >conftest.err
3722 rm -f conftest.er1
3723 cat conftest.err >&5
3724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3725 (exit $ac_status); } >/dev/null; then
3726 if test -s conftest.err; then
3727 ac_cpp_err=$ac_c_preproc_warn_flag
3728 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3729 else
3730 ac_cpp_err=
3731 fi
3732else
3733 ac_cpp_err=yes
3734fi
3735if test -z "$ac_cpp_err"; then
3736 :
3737else
3738 echo "$as_me: failed program was:" >&5
3739sed 's/^/| /' conftest.$ac_ext >&5
3740
3741 # Broken: fails on valid input.
3742continue
3743fi
3744rm -f conftest.err conftest.$ac_ext
3745
3746 # OK, works on sane cases. Now check whether non-existent headers
3747 # can be detected and how.
3748 cat >conftest.$ac_ext <<_ACEOF
3749/* confdefs.h. */
3750_ACEOF
3751cat confdefs.h >>conftest.$ac_ext
3752cat >>conftest.$ac_ext <<_ACEOF
3753/* end confdefs.h. */
3754#include <ac_nonexistent.h>
3755_ACEOF
3756if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3757 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3758 ac_status=$?
3759 grep -v '^ *+' conftest.er1 >conftest.err
3760 rm -f conftest.er1
3761 cat conftest.err >&5
3762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3763 (exit $ac_status); } >/dev/null; then
3764 if test -s conftest.err; then
3765 ac_cpp_err=$ac_c_preproc_warn_flag
3766 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3767 else
3768 ac_cpp_err=
3769 fi
3770else
3771 ac_cpp_err=yes
3772fi
3773if test -z "$ac_cpp_err"; then
3774 # Broken: success on invalid input.
3775continue
3776else
3777 echo "$as_me: failed program was:" >&5
3778sed 's/^/| /' conftest.$ac_ext >&5
3779
3780 # Passes both tests.
3781ac_preproc_ok=:
3782break
3783fi
3784rm -f conftest.err conftest.$ac_ext
3785
3786done
3787# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3788rm -f conftest.err conftest.$ac_ext
3789if $ac_preproc_ok; then
3790 break
3791fi
3792
3793 done
3794 ac_cv_prog_CPP=$CPP
3795
3796fi
3797 CPP=$ac_cv_prog_CPP
3798else
3799 ac_cv_prog_CPP=$CPP
3800fi
3801echo "$as_me:$LINENO: result: $CPP" >&5
3802echo "${ECHO_T}$CPP" >&6
3803ac_preproc_ok=false
3804for ac_c_preproc_warn_flag in '' yes
3805do
3806 # Use a header file that comes with gcc, so configuring glibc
3807 # with a fresh cross-compiler works.
3808 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3809 # <limits.h> exists even on freestanding compilers.
3810 # On the NeXT, cc -E runs the code through the compiler's parser,
3811 # not just through cpp. "Syntax error" is here to catch this case.
3812 cat >conftest.$ac_ext <<_ACEOF
3813/* confdefs.h. */
3814_ACEOF
3815cat confdefs.h >>conftest.$ac_ext
3816cat >>conftest.$ac_ext <<_ACEOF
3817/* end confdefs.h. */
3818#ifdef __STDC__
3819# include <limits.h>
3820#else
3821# include <assert.h>
3822#endif
3823 Syntax error
3824_ACEOF
3825if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3826 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3827 ac_status=$?
3828 grep -v '^ *+' conftest.er1 >conftest.err
3829 rm -f conftest.er1
3830 cat conftest.err >&5
3831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3832 (exit $ac_status); } >/dev/null; then
3833 if test -s conftest.err; then
3834 ac_cpp_err=$ac_c_preproc_warn_flag
3835 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3836 else
3837 ac_cpp_err=
3838 fi
3839else
3840 ac_cpp_err=yes
3841fi
3842if test -z "$ac_cpp_err"; then
3843 :
3844else
3845 echo "$as_me: failed program was:" >&5
3846sed 's/^/| /' conftest.$ac_ext >&5
3847
3848 # Broken: fails on valid input.
3849continue
3850fi
3851rm -f conftest.err conftest.$ac_ext
3852
3853 # OK, works on sane cases. Now check whether non-existent headers
3854 # can be detected and how.
3855 cat >conftest.$ac_ext <<_ACEOF
3856/* confdefs.h. */
3857_ACEOF
3858cat confdefs.h >>conftest.$ac_ext
3859cat >>conftest.$ac_ext <<_ACEOF
3860/* end confdefs.h. */
3861#include <ac_nonexistent.h>
3862_ACEOF
3863if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3864 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3865 ac_status=$?
3866 grep -v '^ *+' conftest.er1 >conftest.err
3867 rm -f conftest.er1
3868 cat conftest.err >&5
3869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3870 (exit $ac_status); } >/dev/null; then
3871 if test -s conftest.err; then
3872 ac_cpp_err=$ac_c_preproc_warn_flag
3873 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3874 else
3875 ac_cpp_err=
3876 fi
3877else
3878 ac_cpp_err=yes
3879fi
3880if test -z "$ac_cpp_err"; then
3881 # Broken: success on invalid input.
3882continue
3883else
3884 echo "$as_me: failed program was:" >&5
3885sed 's/^/| /' conftest.$ac_ext >&5
3886
3887 # Passes both tests.
3888ac_preproc_ok=:
3889break
3890fi
3891rm -f conftest.err conftest.$ac_ext
3892
3893done
3894# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3895rm -f conftest.err conftest.$ac_ext
3896if $ac_preproc_ok; then
3897 :
3898else
3899 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3900See \`config.log' for more details." >&5
3901echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3902See \`config.log' for more details." >&2;}
3903 { (exit 1); exit 1; }; }
3904fi
3905
3906ac_ext=c
3907ac_cpp='$CPP $CPPFLAGS'
3908ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3909ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3910ac_compiler_gnu=$ac_cv_c_compiler_gnu
3911
3912
3913echo "$as_me:$LINENO: checking for egrep" >&5
3914echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3915if test "${ac_cv_prog_egrep+set}" = set; then
3916 echo $ECHO_N "(cached) $ECHO_C" >&6
3917else
3918 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3919 then ac_cv_prog_egrep='grep -E'
3920 else ac_cv_prog_egrep='egrep'
3921 fi
3922fi
3923echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3924echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3925 EGREP=$ac_cv_prog_egrep
3926
3927
3928
3929echo "$as_me:$LINENO: checking for AIX" >&5
3930echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3931cat >conftest.$ac_ext <<_ACEOF
3932/* confdefs.h. */
3933_ACEOF
3934cat confdefs.h >>conftest.$ac_ext
3935cat >>conftest.$ac_ext <<_ACEOF
3936/* end confdefs.h. */
3937#ifdef _AIX
3938 yes
3939#endif
3940
3941_ACEOF
3942if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3943 $EGREP "yes" >/dev/null 2>&1; then
3944 echo "$as_me:$LINENO: result: yes" >&5
3945echo "${ECHO_T}yes" >&6
3946cat >>confdefs.h <<\_ACEOF
3947#define _ALL_SOURCE 1
3948_ACEOF
3949
3950else
3951 echo "$as_me:$LINENO: result: no" >&5
3952echo "${ECHO_T}no" >&6
3953fi
3954rm -f conftest*
3955
3956
3957
3958cat >>confdefs.h <<\_ACEOF
3959#define _GNU_SOURCE 1
3960_ACEOF
3961
3962
3963
01abe918
CY
3964### Use -Wno-pointer-sign if the compiler supports it
3965echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
3966echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6
3967SAVE_CFLAGS="$CFLAGS"
3968CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
3969cat >conftest.$ac_ext <<_ACEOF
3970/* confdefs.h. */
3971_ACEOF
3972cat confdefs.h >>conftest.$ac_ext
3973cat >>conftest.$ac_ext <<_ACEOF
3974/* end confdefs.h. */
3975
3976int
3977main ()
3978{
3979
3980 ;
3981 return 0;
3982}
3983_ACEOF
3984rm -f conftest.$ac_objext
3985if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3986 (eval $ac_compile) 2>conftest.er1
3987 ac_status=$?
3988 grep -v '^ *+' conftest.er1 >conftest.err
3989 rm -f conftest.er1
3990 cat conftest.err >&5
3991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3992 (exit $ac_status); } &&
e143ad11
AS
3993 { ac_try='test -z "$ac_c_werror_flag"
3994 || test ! -s conftest.err'
01abe918
CY
3995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3996 (eval $ac_try) 2>&5
3997 ac_status=$?
3998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3999 (exit $ac_status); }; } &&
4000 { ac_try='test -s conftest.$ac_objext'
4001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4002 (eval $ac_try) 2>&5
4003 ac_status=$?
4004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4005 (exit $ac_status); }; }; then
4006 has_option=yes
4007else
4008 echo "$as_me: failed program was:" >&5
4009sed 's/^/| /' conftest.$ac_ext >&5
4010
4011has_option=no
4012fi
4013rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4014if test $has_option = yes; then
4015 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4016fi
4017echo "$as_me:$LINENO: result: $has_option" >&5
4018echo "${ECHO_T}$has_option" >&6
4019CFLAGS="$SAVE_CFLAGS"
4020unset has_option
4021unset SAVE_CFLAGS
4022
6a3a24fa 4023#### Some other nice autoconf tests.
ba4481b5 4024
c0d27fcc 4025echo "$as_me:$LINENO: checking whether ln -s works" >&5
503d2be0
AS
4026echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4027LN_S=$as_ln_s
4028if test "$LN_S" = "ln -s"; then
c0d27fcc 4029 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 4030echo "${ECHO_T}yes" >&6
ba4481b5 4031else
c0d27fcc 4032 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
503d2be0 4033echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
4034fi
4035
503d2be0
AS
4036ac_ext=c
4037ac_cpp='$CPP $CPPFLAGS'
4038ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4039ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4040ac_compiler_gnu=$ac_cv_c_compiler_gnu
c0d27fcc 4041echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
503d2be0 4042echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
4043# On Suns, sometimes $CPP names a directory.
4044if test -n "$CPP" && test -d "$CPP"; then
4045 CPP=
4046fi
4047if test -z "$CPP"; then
503d2be0
AS
4048 if test "${ac_cv_prog_CPP+set}" = set; then
4049 echo $ECHO_N "(cached) $ECHO_C" >&6
4050else
4051 # Double quotes because CPP needs to be expanded
4052 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4053 do
4054 ac_preproc_ok=false
4055for ac_c_preproc_warn_flag in '' yes
4056do
4057 # Use a header file that comes with gcc, so configuring glibc
4058 # with a fresh cross-compiler works.
19650fd6
AS
4059 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4060 # <limits.h> exists even on freestanding compilers.
ba4481b5 4061 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4062 # not just through cpp. "Syntax error" is here to catch this case.
4063 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4064/* confdefs.h. */
4065_ACEOF
4066cat confdefs.h >>conftest.$ac_ext
4067cat >>conftest.$ac_ext <<_ACEOF
4068/* end confdefs.h. */
4069#ifdef __STDC__
4070# include <limits.h>
4071#else
4072# include <assert.h>
4073#endif
edfaf76d 4074 Syntax error
503d2be0 4075_ACEOF
c0d27fcc 4076if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4077 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4078 ac_status=$?
6bae0ccf 4079 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4080 rm -f conftest.er1
4081 cat conftest.err >&5
c0d27fcc 4082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4083 (exit $ac_status); } >/dev/null; then
4084 if test -s conftest.err; then
4085 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4086 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4087 else
4088 ac_cpp_err=
4089 fi
4090else
4091 ac_cpp_err=yes
4092fi
4093if test -z "$ac_cpp_err"; then
ba4481b5
DL
4094 :
4095else
503d2be0 4096 echo "$as_me: failed program was:" >&5
19650fd6
AS
4097sed 's/^/| /' conftest.$ac_ext >&5
4098
503d2be0
AS
4099 # Broken: fails on valid input.
4100continue
4101fi
4102rm -f conftest.err conftest.$ac_ext
4103
4104 # OK, works on sane cases. Now check whether non-existent headers
4105 # can be detected and how.
4106 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4107/* confdefs.h. */
4108_ACEOF
4109cat confdefs.h >>conftest.$ac_ext
4110cat >>conftest.$ac_ext <<_ACEOF
4111/* end confdefs.h. */
503d2be0
AS
4112#include <ac_nonexistent.h>
4113_ACEOF
c0d27fcc 4114if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4115 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4116 ac_status=$?
6bae0ccf 4117 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4118 rm -f conftest.er1
4119 cat conftest.err >&5
c0d27fcc 4120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4121 (exit $ac_status); } >/dev/null; then
4122 if test -s conftest.err; then
4123 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4124 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4125 else
4126 ac_cpp_err=
4127 fi
4128else
4129 ac_cpp_err=yes
4130fi
4131if test -z "$ac_cpp_err"; then
4132 # Broken: success on invalid input.
4133continue
c4bb2108 4134else
503d2be0 4135 echo "$as_me: failed program was:" >&5
19650fd6
AS
4136sed 's/^/| /' conftest.$ac_ext >&5
4137
503d2be0
AS
4138 # Passes both tests.
4139ac_preproc_ok=:
4140break
4141fi
4142rm -f conftest.err conftest.$ac_ext
4143
4144done
4145# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4146rm -f conftest.err conftest.$ac_ext
4147if $ac_preproc_ok; then
4148 break
4149fi
4150
4151 done
4152 ac_cv_prog_CPP=$CPP
4153
4154fi
4155 CPP=$ac_cv_prog_CPP
4156else
4157 ac_cv_prog_CPP=$CPP
4158fi
c0d27fcc 4159echo "$as_me:$LINENO: result: $CPP" >&5
503d2be0
AS
4160echo "${ECHO_T}$CPP" >&6
4161ac_preproc_ok=false
4162for ac_c_preproc_warn_flag in '' yes
4163do
4164 # Use a header file that comes with gcc, so configuring glibc
4165 # with a fresh cross-compiler works.
19650fd6
AS
4166 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4167 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4168 # On the NeXT, cc -E runs the code through the compiler's parser,
4169 # not just through cpp. "Syntax error" is here to catch this case.
4170 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4171/* confdefs.h. */
4172_ACEOF
4173cat confdefs.h >>conftest.$ac_ext
4174cat >>conftest.$ac_ext <<_ACEOF
4175/* end confdefs.h. */
4176#ifdef __STDC__
4177# include <limits.h>
4178#else
4179# include <assert.h>
4180#endif
edfaf76d 4181 Syntax error
503d2be0 4182_ACEOF
c0d27fcc 4183if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4184 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4185 ac_status=$?
6bae0ccf 4186 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4187 rm -f conftest.er1
4188 cat conftest.err >&5
c0d27fcc 4189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4190 (exit $ac_status); } >/dev/null; then
4191 if test -s conftest.err; then
4192 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4193 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4194 else
4195 ac_cpp_err=
4196 fi
4197else
4198 ac_cpp_err=yes
4199fi
4200if test -z "$ac_cpp_err"; then
ba4481b5
DL
4201 :
4202else
503d2be0 4203 echo "$as_me: failed program was:" >&5
19650fd6
AS
4204sed 's/^/| /' conftest.$ac_ext >&5
4205
503d2be0
AS
4206 # Broken: fails on valid input.
4207continue
4208fi
4209rm -f conftest.err conftest.$ac_ext
4210
4211 # OK, works on sane cases. Now check whether non-existent headers
4212 # can be detected and how.
4213 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4214/* confdefs.h. */
4215_ACEOF
4216cat confdefs.h >>conftest.$ac_ext
4217cat >>conftest.$ac_ext <<_ACEOF
4218/* end confdefs.h. */
503d2be0
AS
4219#include <ac_nonexistent.h>
4220_ACEOF
c0d27fcc 4221if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4222 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4223 ac_status=$?
6bae0ccf 4224 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4225 rm -f conftest.er1
4226 cat conftest.err >&5
c0d27fcc 4227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4228 (exit $ac_status); } >/dev/null; then
4229 if test -s conftest.err; then
4230 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4231 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4232 else
4233 ac_cpp_err=
4234 fi
4235else
4236 ac_cpp_err=yes
c4bb2108 4237fi
503d2be0
AS
4238if test -z "$ac_cpp_err"; then
4239 # Broken: success on invalid input.
4240continue
4241else
4242 echo "$as_me: failed program was:" >&5
19650fd6
AS
4243sed 's/^/| /' conftest.$ac_ext >&5
4244
503d2be0
AS
4245 # Passes both tests.
4246ac_preproc_ok=:
4247break
ba4481b5 4248fi
503d2be0
AS
4249rm -f conftest.err conftest.$ac_ext
4250
4251done
4252# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4253rm -f conftest.err conftest.$ac_ext
4254if $ac_preproc_ok; then
4255 :
ba4481b5 4256else
19650fd6
AS
4257 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4258See \`config.log' for more details." >&5
4259echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4260See \`config.log' for more details." >&2;}
503d2be0 4261 { (exit 1); exit 1; }; }
ba4481b5 4262fi
503d2be0
AS
4263
4264ac_ext=c
4265ac_cpp='$CPP $CPPFLAGS'
4266ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4267ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4268ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4269
4270# Find a good install program. We prefer a C program (faster),
4271# so one script is as good as another. But avoid the broken or
4272# incompatible versions:
4273# SysV /etc/install, /usr/sbin/install
4274# SunOS /usr/etc/install
4275# IRIX /sbin/install
4276# AIX /bin/install
503d2be0 4277# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4278# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4279# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4280# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4281# OS/2's system install, which has a completely different semantic
ba4481b5 4282# ./install, which can be erroneously created by make from ./install.sh.
c0d27fcc
MR
4283echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4284echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
ba4481b5 4285if test -z "$INSTALL"; then
503d2be0
AS
4286if test "${ac_cv_path_install+set}" = set; then
4287 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4288else
c0d27fcc
MR
4289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4290for as_dir in $PATH
4291do
4292 IFS=$as_save_IFS
4293 test -z "$as_dir" && as_dir=.
4294 # Account for people who put trailing slashes in PATH elements.
4295case $as_dir/ in
4296 ./ | .// | /cC/* | \
4297 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4298 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4299 /usr/ucb/* ) ;;
4300 *)
4301 # OSF1 and SCO ODT 3.0 have their own names for install.
4302 # Don't use installbsd from OSF since it installs stuff as root
4303 # by default.
4304 for ac_prog in ginstall scoinst install; do
4305 for ac_exec_ext in '' $ac_executable_extensions; do
edfaf76d
LK
4306 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4307 if test $ac_prog = install &&
4308 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4309 # AIX install. It has an incompatible calling convention.
4310 :
4311 elif test $ac_prog = install &&
4312 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4313 # program-specific install script used by HP pwplus--don't use.
4314 :
4315 else
4316 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4317 break 3
4318 fi
4319 fi
ba4481b5 4320 done
c0d27fcc
MR
4321 done
4322 ;;
4323esac
4324done
4325
ba4481b5
DL
4326
4327fi
4328 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4329 INSTALL=$ac_cv_path_install
ba4481b5
DL
4330 else
4331 # As a last resort, use the slow shell script. We don't cache a
4332 # path for INSTALL within a source directory, because that will
4333 # break other packages using the cache if that directory is
4334 # removed, or if the path is relative.
503d2be0 4335 INSTALL=$ac_install_sh
ba4481b5
DL
4336 fi
4337fi
c0d27fcc 4338echo "$as_me:$LINENO: result: $INSTALL" >&5
503d2be0 4339echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
4340
4341# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4342# It thinks the first close brace ends the variable substitution.
4343test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4344
503d2be0 4345test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 4346
ba4481b5
DL
4347test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4348
c0d27fcc
MR
4349if test "x$RANLIB" = x; then
4350 if test -n "$ac_tool_prefix"; then
4351 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4352set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4353echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0 4354echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c0d27fcc 4355if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 4356 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
4357else
4358 if test -n "$RANLIB"; then
4359 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4360else
c0d27fcc
MR
4361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4362for as_dir in $PATH
4363do
4364 IFS=$as_save_IFS
4365 test -z "$as_dir" && as_dir=.
4366 for ac_exec_ext in '' $ac_executable_extensions; do
4367 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4368 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4369 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4370 break 2
4371 fi
4372done
503d2be0
AS
4373done
4374
7397acc4
DL
4375fi
4376fi
503d2be0 4377RANLIB=$ac_cv_prog_RANLIB
7397acc4 4378if test -n "$RANLIB"; then
c0d27fcc 4379 echo "$as_me:$LINENO: result: $RANLIB" >&5
503d2be0
AS
4380echo "${ECHO_T}$RANLIB" >&6
4381else
c0d27fcc 4382 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4383echo "${ECHO_T}no" >&6
4384fi
4385
4386fi
4387if test -z "$ac_cv_prog_RANLIB"; then
4388 ac_ct_RANLIB=$RANLIB
4389 # Extract the first word of "ranlib", so it can be a program name with args.
4390set dummy ranlib; ac_word=$2
c0d27fcc 4391echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
4392echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4393if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4394 echo $ECHO_N "(cached) $ECHO_C" >&6
4395else
4396 if test -n "$ac_ct_RANLIB"; then
4397 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4398else
c0d27fcc
MR
4399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4400for as_dir in $PATH
4401do
4402 IFS=$as_save_IFS
4403 test -z "$as_dir" && as_dir=.
4404 for ac_exec_ext in '' $ac_executable_extensions; do
4405 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4406 ac_cv_prog_ac_ct_RANLIB="ranlib"
4407 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4408 break 2
4409 fi
4410done
503d2be0
AS
4411done
4412
4413 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4414fi
4415fi
4416ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4417if test -n "$ac_ct_RANLIB"; then
c0d27fcc 4418 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
503d2be0
AS
4419echo "${ECHO_T}$ac_ct_RANLIB" >&6
4420else
c0d27fcc 4421 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4422echo "${ECHO_T}no" >&6
4423fi
4424
4425 RANLIB=$ac_ct_RANLIB
7397acc4 4426else
503d2be0 4427 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
4428fi
4429
4430fi
9e71690e
DK
4431# Extract the first word of "install-info", so it can be a program name with args.
4432set dummy install-info; ac_word=$2
4433echo "$as_me:$LINENO: checking for $ac_word" >&5
4434echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4435if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4436 echo $ECHO_N "(cached) $ECHO_C" >&6
4437else
4438 case $INSTALL_INFO in
4439 [\\/]* | ?:[\\/]*)
4440 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4441 ;;
4442 *)
4443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4444for as_dir in $PATH
4445do
4446 IFS=$as_save_IFS
4447 test -z "$as_dir" && as_dir=.
4448 for ac_exec_ext in '' $ac_executable_extensions; do
4449 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4450 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4451 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4452 break 2
4453 fi
4454done
4455done
4456
4457 ;;
4458esac
4459fi
4460INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4461
4462if test -n "$INSTALL_INFO"; then
4463 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4464echo "${ECHO_T}$INSTALL_INFO" >&6
4465else
4466 echo "$as_me:$LINENO: result: no" >&5
4467echo "${ECHO_T}no" >&6
4468fi
4469
4470# Extract the first word of "install-info", so it can be a program name with args.
4471set dummy install-info; ac_word=$2
4472echo "$as_me:$LINENO: checking for $ac_word" >&5
4473echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4474if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4475 echo $ECHO_N "(cached) $ECHO_C" >&6
4476else
4477 case $INSTALL_INFO in
4478 [\\/]* | ?:[\\/]*)
4479 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4480 ;;
4481 *)
4482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4483for as_dir in /usr/sbin
4484do
4485 IFS=$as_save_IFS
4486 test -z "$as_dir" && as_dir=.
4487 for ac_exec_ext in '' $ac_executable_extensions; do
4488 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4489 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4490 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4491 break 2
4492 fi
4493done
4494done
4495
4496 ;;
4497esac
4498fi
4499INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4500
4501if test -n "$INSTALL_INFO"; then
4502 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4503echo "${ECHO_T}$INSTALL_INFO" >&6
4504else
4505 echo "$as_me:$LINENO: result: no" >&5
4506echo "${ECHO_T}no" >&6
4507fi
4508
4509# Extract the first word of "install-info", so it can be a program name with args.
4510set dummy install-info; ac_word=$2
4511echo "$as_me:$LINENO: checking for $ac_word" >&5
4512echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4513if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4514 echo $ECHO_N "(cached) $ECHO_C" >&6
4515else
4516 case $INSTALL_INFO in
4517 [\\/]* | ?:[\\/]*)
4518 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4519 ;;
4520 *)
4521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4522for as_dir in /sbin
4523do
4524 IFS=$as_save_IFS
4525 test -z "$as_dir" && as_dir=.
4526 for ac_exec_ext in '' $ac_executable_extensions; do
4527 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4528 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4529 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4530 break 2
4531 fi
4532done
4533done
4534
4535 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4536 ;;
4537esac
4538fi
4539INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4540
4541if test -n "$INSTALL_INFO"; then
4542 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4543echo "${ECHO_T}$INSTALL_INFO" >&6
4544else
4545 echo "$as_me:$LINENO: result: no" >&5
4546echo "${ECHO_T}no" >&6
4547fi
4548
8ae52ca6
RF
4549# Extract the first word of "gzip", so it can be a program name with args.
4550set dummy gzip; ac_word=$2
4551echo "$as_me:$LINENO: checking for $ac_word" >&5
4552echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
46e35e9f 4553if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
4554 echo $ECHO_N "(cached) $ECHO_C" >&6
4555else
46e35e9f 4556 case $GZIP_PROG in
8ae52ca6 4557 [\\/]* | ?:[\\/]*)
46e35e9f 4558 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
4559 ;;
4560 *)
4561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4562for as_dir in $PATH
4563do
4564 IFS=$as_save_IFS
4565 test -z "$as_dir" && as_dir=.
4566 for ac_exec_ext in '' $ac_executable_extensions; do
4567 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46e35e9f 4568 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
4569 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4570 break 2
4571 fi
4572done
4573done
4574
4575 ;;
4576esac
4577fi
46e35e9f 4578GZIP_PROG=$ac_cv_path_GZIP_PROG
8ae52ca6 4579
46e35e9f
AS
4580if test -n "$GZIP_PROG"; then
4581 echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
4582echo "${ECHO_T}$GZIP_PROG" >&6
8ae52ca6
RF
4583else
4584 echo "$as_me:$LINENO: result: no" >&5
4585echo "${ECHO_T}no" >&6
4586fi
4587
ba4481b5 4588
c0d27fcc 4589
8e967cf7
MR
4590if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4591then
4592 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4593fi
4594
4595if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4596then
4597 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4598fi
4599
c0d27fcc 4600
fe239f0f 4601late_LDFLAGS=$LDFLAGS
4af002d6 4602if test "$GCC" = yes; then
fe239f0f
AS
4603 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
4604else
4605 LDFLAGS="$LDFLAGS -znocombreloc"
4606fi
4607
edfaf76d
LK
4608echo "$as_me:$LINENO: checking for -znocombreloc" >&5
4609echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6
fe239f0f
AS
4610cat >conftest.$ac_ext <<_ACEOF
4611main(){return 0;}
4612_ACEOF
4613rm -f conftest.$ac_objext conftest$ac_exeext
4614if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 4615 (eval $ac_link) 2>conftest.er1
fe239f0f 4616 ac_status=$?
edfaf76d
LK
4617 grep -v '^ *+' conftest.er1 >conftest.err
4618 rm -f conftest.er1
4619 cat conftest.err >&5
fe239f0f
AS
4620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4621 (exit $ac_status); } &&
e143ad11
AS
4622 { ac_try='test -z "$ac_c_werror_flag"
4623 || test ! -s conftest.err'
edfaf76d
LK
4624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4625 (eval $ac_try) 2>&5
4626 ac_status=$?
4627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4628 (exit $ac_status); }; } &&
4629 { ac_try='test -s conftest$ac_exeext'
fe239f0f
AS
4630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4631 (eval $ac_try) 2>&5
4632 ac_status=$?
4633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4634 (exit $ac_status); }; }; then
4635 echo "$as_me:$LINENO: result: yes" >&5
4636echo "${ECHO_T}yes" >&6
4637else
4638 echo "$as_me: failed program was:" >&5
4639sed 's/^/| /' conftest.$ac_ext >&5
4640
4641LDFLAGS=$late_LDFLAGS
4642 echo "$as_me:$LINENO: result: no" >&5
4643echo "${ECHO_T}no" >&6
4644fi
edfaf76d
LK
4645rm -f conftest.err conftest.$ac_objext \
4646 conftest$ac_exeext conftest.$ac_ext
fe239f0f 4647
3b33a005
DL
4648#### Extract some information from the operating system and machine files.
4649
c0d27fcc 4650{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 4651 - which libraries the lib-src programs will want, and
503d2be0
AS
4652 - whether the GNU malloc routines are usable..." >&5
4653echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 4654 - which libraries the lib-src programs will want, and
503d2be0 4655 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
4656
4657### First figure out CFLAGS (which we use for running the compiler here)
4658### and REAL_CFLAGS (which we use for real compilation).
4659### The two are the same except on a few systems, where they are made
4660### different to work around various lossages. For example,
4661### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
4662### as implying static linking.
4663
4664### If the CFLAGS env var is specified, we use that value
4665### instead of the default.
4666
4667### It's not important that this name contain the PID; you can't run
4668### two configures in the same directory and have anything work
4669### anyway.
4670tempcname="conftest.c"
4671
4672echo '
4673#include "'${srcdir}'/src/'${opsysfile}'"
4674#include "'${srcdir}'/src/'${machfile}'"
4675#ifndef LIBS_MACHINE
4676#define LIBS_MACHINE
4677#endif
4678#ifndef LIBS_SYSTEM
4679#define LIBS_SYSTEM
4680#endif
4681#ifndef C_SWITCH_SYSTEM
4682#define C_SWITCH_SYSTEM
4683#endif
4684#ifndef C_SWITCH_MACHINE
4685#define C_SWITCH_MACHINE
4686#endif
4687configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
4688configure___ c_switch_system=C_SWITCH_SYSTEM
4689configure___ c_switch_machine=C_SWITCH_MACHINE
4690
4691#ifndef LIB_X11_LIB
4692#define LIB_X11_LIB -lX11
4693#endif
4694
4695#ifndef LIBX11_MACHINE
4696#define LIBX11_MACHINE
4697#endif
4698
4699#ifndef LIBX11_SYSTEM
4700#define LIBX11_SYSTEM
4701#endif
4702configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
4703
4704#ifdef UNEXEC
4705configure___ unexec=UNEXEC
4706#else
4707configure___ unexec=unexec.o
4708#endif
4709
4710#ifdef SYSTEM_MALLOC
4711configure___ system_malloc=yes
4712#else
4713configure___ system_malloc=no
4714#endif
4715
ef9e4345
GM
4716#ifdef USE_MMAP_FOR_BUFFERS
4717configure___ use_mmap_for_buffers=yes
73b77ee5 4718#else
ef9e4345 4719configure___ use_mmap_for_buffers=no
73b77ee5
GM
4720#endif
4721
3b33a005
DL
4722#ifndef C_DEBUG_SWITCH
4723#define C_DEBUG_SWITCH -g
4724#endif
4725
4726#ifndef C_OPTIMIZE_SWITCH
4727#ifdef __GNUC__
4728#define C_OPTIMIZE_SWITCH -O2
4729#else
4730#define C_OPTIMIZE_SWITCH -O
4731#endif
4732#endif
4733
01abe918
CY
4734#ifndef C_WARNINGS_SWITCH
4735#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
4736#endif
4737
3b33a005
DL
4738#ifndef LD_SWITCH_MACHINE
4739#define LD_SWITCH_MACHINE
4740#endif
4741
4742#ifndef LD_SWITCH_SYSTEM
4743#define LD_SWITCH_SYSTEM
4744#endif
4745
4746#ifndef LD_SWITCH_X_SITE_AUX
4747#define LD_SWITCH_X_SITE_AUX
503d2be0 4748#endif
3b33a005
DL
4749
4750configure___ ld_switch_system=LD_SWITCH_SYSTEM
4751configure___ ld_switch_machine=LD_SWITCH_MACHINE
4752
4753#ifdef THIS_IS_CONFIGURE
4754
4755/* Get the CFLAGS for tests in configure. */
4756#ifdef __GNUC__
4757configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4758#else
4759configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4760#endif
4761
4762#else /* not THIS_IS_CONFIGURE */
4763
4764/* Get the CFLAGS for real compilation. */
4765#ifdef __GNUC__
01abe918 4766configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
4767#else
4768configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4769#endif
4770
4771#endif /* not THIS_IS_CONFIGURE */
4772' > ${tempcname}
4773
4774# The value of CPP is a quoted variable reference, so we need to do this
4775# to get its actual value...
4776CPP=`eval "echo $CPP"`
4777eval `${CPP} -Isrc ${tempcname} \
4778 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4779if test "x$SPECIFIED_CFLAGS" = x; then
4780 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
4781 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4782else
4783 REAL_CFLAGS="$CFLAGS"
4784fi
4785rm ${tempcname}
4786
4787ac_link="$ac_link $ld_switch_machine $ld_switch_system"
4788
4789### Make sure subsequent tests use flags consistent with the build flags.
4790
4791if test x"${OVERRIDE_CPPFLAGS}" != x; then
4792 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
4793else
4794 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
4795fi
4796
6bae0ccf
DL
4797
4798
503d2be0 4799# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
4800if test "${enable_largefile+set}" = set; then
4801 enableval="$enable_largefile"
f4988be7 4802
503d2be0
AS
4803fi;
4804if test "$enable_largefile" != no; then
f4988be7 4805
c0d27fcc 4806 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
503d2be0
AS
4807echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4808if test "${ac_cv_sys_largefile_CC+set}" = set; then
4809 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4810else
f4988be7 4811 ac_cv_sys_largefile_CC=no
503d2be0
AS
4812 if test "$GCC" != yes; then
4813 ac_save_CC=$CC
4814 while :; do
4815 # IRIX 6.2 and later do not support large files by default,
4816 # so use the C compiler's -n32 option if that helps.
edfaf76d 4817 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4818/* confdefs.h. */
4819_ACEOF
4820cat confdefs.h >>conftest.$ac_ext
4821cat >>conftest.$ac_ext <<_ACEOF
4822/* end confdefs.h. */
f4988be7 4823#include <sys/types.h>
503d2be0
AS
4824 /* Check that off_t can represent 2**63 - 1 correctly.
4825 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4826 since some C++ compilers masquerading as C compilers
4827 incorrectly reject 9223372036854775807. */
4828#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4829 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4830 && LARGE_OFF_T % 2147483647 == 1)
4831 ? 1 : -1];
4832int
4833main ()
4834{
f4988be7 4835
503d2be0
AS
4836 ;
4837 return 0;
4838}
4839_ACEOF
4840 rm -f conftest.$ac_objext
c0d27fcc 4841if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4842 (eval $ac_compile) 2>conftest.er1
503d2be0 4843 ac_status=$?
edfaf76d
LK
4844 grep -v '^ *+' conftest.er1 >conftest.err
4845 rm -f conftest.er1
4846 cat conftest.err >&5
c0d27fcc 4847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4848 (exit $ac_status); } &&
e143ad11
AS
4849 { ac_try='test -z "$ac_c_werror_flag"
4850 || test ! -s conftest.err'
edfaf76d
LK
4851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4852 (eval $ac_try) 2>&5
4853 ac_status=$?
4854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4855 (exit $ac_status); }; } &&
4856 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4858 (eval $ac_try) 2>&5
4859 ac_status=$?
c0d27fcc 4860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4861 (exit $ac_status); }; }; then
4862 break
b192d653 4863else
503d2be0 4864 echo "$as_me: failed program was:" >&5
19650fd6
AS
4865sed 's/^/| /' conftest.$ac_ext >&5
4866
503d2be0 4867fi
edfaf76d 4868rm -f conftest.err conftest.$ac_objext
503d2be0
AS
4869 CC="$CC -n32"
4870 rm -f conftest.$ac_objext
c0d27fcc 4871if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4872 (eval $ac_compile) 2>conftest.er1
503d2be0 4873 ac_status=$?
edfaf76d
LK
4874 grep -v '^ *+' conftest.er1 >conftest.err
4875 rm -f conftest.er1
4876 cat conftest.err >&5
c0d27fcc 4877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4878 (exit $ac_status); } &&
e143ad11
AS
4879 { ac_try='test -z "$ac_c_werror_flag"
4880 || test ! -s conftest.err'
edfaf76d
LK
4881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4882 (eval $ac_try) 2>&5
4883 ac_status=$?
4884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4885 (exit $ac_status); }; } &&
4886 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4888 (eval $ac_try) 2>&5
4889 ac_status=$?
c0d27fcc 4890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4891 (exit $ac_status); }; }; then
4892 ac_cv_sys_largefile_CC=' -n32'; break
4893else
4894 echo "$as_me: failed program was:" >&5
19650fd6
AS
4895sed 's/^/| /' conftest.$ac_ext >&5
4896
503d2be0 4897fi
edfaf76d
LK
4898rm -f conftest.err conftest.$ac_objext
4899 break
503d2be0
AS
4900 done
4901 CC=$ac_save_CC
4902 rm -f conftest.$ac_ext
4903 fi
b192d653 4904fi
c0d27fcc 4905echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
4906echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4907 if test "$ac_cv_sys_largefile_CC" != no; then
4908 CC=$CC$ac_cv_sys_largefile_CC
4909 fi
b192d653 4910
c0d27fcc 4911 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
4912echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4913if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4914 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4915else
503d2be0 4916 while :; do
f4988be7 4917 ac_cv_sys_file_offset_bits=no
503d2be0 4918 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4919/* confdefs.h. */
4920_ACEOF
4921cat confdefs.h >>conftest.$ac_ext
4922cat >>conftest.$ac_ext <<_ACEOF
4923/* end confdefs.h. */
f4988be7 4924#include <sys/types.h>
503d2be0
AS
4925 /* Check that off_t can represent 2**63 - 1 correctly.
4926 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4927 since some C++ compilers masquerading as C compilers
4928 incorrectly reject 9223372036854775807. */
4929#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4930 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4931 && LARGE_OFF_T % 2147483647 == 1)
4932 ? 1 : -1];
4933int
4934main ()
4935{
f4988be7 4936
503d2be0
AS
4937 ;
4938 return 0;
4939}
4940_ACEOF
4941rm -f conftest.$ac_objext
c0d27fcc 4942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4943 (eval $ac_compile) 2>conftest.er1
503d2be0 4944 ac_status=$?
edfaf76d
LK
4945 grep -v '^ *+' conftest.er1 >conftest.err
4946 rm -f conftest.er1
4947 cat conftest.err >&5
c0d27fcc 4948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4949 (exit $ac_status); } &&
e143ad11
AS
4950 { ac_try='test -z "$ac_c_werror_flag"
4951 || test ! -s conftest.err'
edfaf76d
LK
4952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4953 (eval $ac_try) 2>&5
4954 ac_status=$?
4955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4956 (exit $ac_status); }; } &&
4957 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4959 (eval $ac_try) 2>&5
4960 ac_status=$?
c0d27fcc 4961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4962 (exit $ac_status); }; }; then
4963 break
f4988be7 4964else
503d2be0 4965 echo "$as_me: failed program was:" >&5
19650fd6
AS
4966sed 's/^/| /' conftest.$ac_ext >&5
4967
503d2be0 4968fi
edfaf76d 4969rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4970 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4971/* confdefs.h. */
4972_ACEOF
4973cat confdefs.h >>conftest.$ac_ext
4974cat >>conftest.$ac_ext <<_ACEOF
4975/* end confdefs.h. */
f4988be7
GM
4976#define _FILE_OFFSET_BITS 64
4977#include <sys/types.h>
503d2be0
AS
4978 /* Check that off_t can represent 2**63 - 1 correctly.
4979 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4980 since some C++ compilers masquerading as C compilers
4981 incorrectly reject 9223372036854775807. */
4982#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4983 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4984 && LARGE_OFF_T % 2147483647 == 1)
4985 ? 1 : -1];
4986int
4987main ()
4988{
4989
4990 ;
4991 return 0;
4992}
4993_ACEOF
4994rm -f conftest.$ac_objext
c0d27fcc 4995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4996 (eval $ac_compile) 2>conftest.er1
503d2be0 4997 ac_status=$?
edfaf76d
LK
4998 grep -v '^ *+' conftest.er1 >conftest.err
4999 rm -f conftest.er1
5000 cat conftest.err >&5
c0d27fcc 5001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5002 (exit $ac_status); } &&
e143ad11
AS
5003 { ac_try='test -z "$ac_c_werror_flag"
5004 || test ! -s conftest.err'
edfaf76d
LK
5005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5006 (eval $ac_try) 2>&5
5007 ac_status=$?
5008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5009 (exit $ac_status); }; } &&
5010 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5012 (eval $ac_try) 2>&5
5013 ac_status=$?
c0d27fcc 5014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5015 (exit $ac_status); }; }; then
5016 ac_cv_sys_file_offset_bits=64; break
5017else
5018 echo "$as_me: failed program was:" >&5
19650fd6
AS
5019sed 's/^/| /' conftest.$ac_ext >&5
5020
503d2be0 5021fi
edfaf76d 5022rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
5023 break
5024done
ba4481b5 5025fi
c0d27fcc 5026echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
5027echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
5028if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 5029
c0d27fcc 5030cat >>confdefs.h <<_ACEOF
f4988be7 5031#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5032_ACEOF
f4988be7 5033
503d2be0
AS
5034fi
5035rm -f conftest*
c0d27fcc 5036 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
5037echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
5038if test "${ac_cv_sys_large_files+set}" = set; then
5039 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5040else
503d2be0 5041 while :; do
f4988be7 5042 ac_cv_sys_large_files=no
503d2be0 5043 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5044/* confdefs.h. */
5045_ACEOF
5046cat confdefs.h >>conftest.$ac_ext
5047cat >>conftest.$ac_ext <<_ACEOF
5048/* end confdefs.h. */
503d2be0
AS
5049#include <sys/types.h>
5050 /* Check that off_t can represent 2**63 - 1 correctly.
5051 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5052 since some C++ compilers masquerading as C compilers
5053 incorrectly reject 9223372036854775807. */
5054#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5055 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5056 && LARGE_OFF_T % 2147483647 == 1)
5057 ? 1 : -1];
5058int
5059main ()
5060{
ba4481b5 5061
503d2be0
AS
5062 ;
5063 return 0;
5064}
5065_ACEOF
5066rm -f conftest.$ac_objext
c0d27fcc 5067if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5068 (eval $ac_compile) 2>conftest.er1
503d2be0 5069 ac_status=$?
edfaf76d
LK
5070 grep -v '^ *+' conftest.er1 >conftest.err
5071 rm -f conftest.er1
5072 cat conftest.err >&5
c0d27fcc 5073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5074 (exit $ac_status); } &&
e143ad11
AS
5075 { ac_try='test -z "$ac_c_werror_flag"
5076 || test ! -s conftest.err'
edfaf76d
LK
5077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5078 (eval $ac_try) 2>&5
5079 ac_status=$?
5080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5081 (exit $ac_status); }; } &&
5082 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5084 (eval $ac_try) 2>&5
5085 ac_status=$?
c0d27fcc 5086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5087 (exit $ac_status); }; }; then
5088 break
ba4481b5 5089else
503d2be0 5090 echo "$as_me: failed program was:" >&5
19650fd6
AS
5091sed 's/^/| /' conftest.$ac_ext >&5
5092
503d2be0 5093fi
edfaf76d 5094rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5095 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5096/* confdefs.h. */
5097_ACEOF
5098cat confdefs.h >>conftest.$ac_ext
5099cat >>conftest.$ac_ext <<_ACEOF
5100/* end confdefs.h. */
f4988be7 5101#define _LARGE_FILES 1
503d2be0
AS
5102#include <sys/types.h>
5103 /* Check that off_t can represent 2**63 - 1 correctly.
5104 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5105 since some C++ compilers masquerading as C compilers
5106 incorrectly reject 9223372036854775807. */
5107#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5108 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5109 && LARGE_OFF_T % 2147483647 == 1)
5110 ? 1 : -1];
5111int
5112main ()
5113{
f4988be7 5114
503d2be0
AS
5115 ;
5116 return 0;
5117}
5118_ACEOF
5119rm -f conftest.$ac_objext
c0d27fcc 5120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5121 (eval $ac_compile) 2>conftest.er1
503d2be0 5122 ac_status=$?
edfaf76d
LK
5123 grep -v '^ *+' conftest.er1 >conftest.err
5124 rm -f conftest.er1
5125 cat conftest.err >&5
c0d27fcc 5126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5127 (exit $ac_status); } &&
e143ad11
AS
5128 { ac_try='test -z "$ac_c_werror_flag"
5129 || test ! -s conftest.err'
edfaf76d
LK
5130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5131 (eval $ac_try) 2>&5
5132 ac_status=$?
5133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5134 (exit $ac_status); }; } &&
5135 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5137 (eval $ac_try) 2>&5
5138 ac_status=$?
c0d27fcc 5139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5140 (exit $ac_status); }; }; then
5141 ac_cv_sys_large_files=1; break
5142else
5143 echo "$as_me: failed program was:" >&5
19650fd6
AS
5144sed 's/^/| /' conftest.$ac_ext >&5
5145
503d2be0 5146fi
edfaf76d 5147rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
5148 break
5149done
ba4481b5 5150fi
c0d27fcc 5151echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
5152echo "${ECHO_T}$ac_cv_sys_large_files" >&6
5153if test "$ac_cv_sys_large_files" != no; then
ba4481b5 5154
c0d27fcc 5155cat >>confdefs.h <<_ACEOF
f4988be7 5156#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5157_ACEOF
ba4481b5 5158
503d2be0
AS
5159fi
5160rm -f conftest*
5161fi
ba4481b5 5162
c0d27fcc 5163
2c9dccc9
PJ
5164if test "${with_sound}" != "no"; then
5165 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
5166 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5167echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5168if test "${ac_cv_header_stdc+set}" = set; then
5169 echo $ECHO_N "(cached) $ECHO_C" >&6
5170else
5171 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5172/* confdefs.h. */
5173_ACEOF
5174cat confdefs.h >>conftest.$ac_ext
5175cat >>conftest.$ac_ext <<_ACEOF
5176/* end confdefs.h. */
c0d27fcc
MR
5177#include <stdlib.h>
5178#include <stdarg.h>
5179#include <string.h>
5180#include <float.h>
98418dba 5181
19650fd6
AS
5182int
5183main ()
5184{
5185
5186 ;
5187 return 0;
5188}
c0d27fcc 5189_ACEOF
19650fd6
AS
5190rm -f conftest.$ac_objext
5191if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5192 (eval $ac_compile) 2>conftest.er1
cd958eb3 5193 ac_status=$?
edfaf76d
LK
5194 grep -v '^ *+' conftest.er1 >conftest.err
5195 rm -f conftest.er1
5196 cat conftest.err >&5
cd958eb3 5197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 5198 (exit $ac_status); } &&
e143ad11
AS
5199 { ac_try='test -z "$ac_c_werror_flag"
5200 || test ! -s conftest.err'
edfaf76d
LK
5201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5202 (eval $ac_try) 2>&5
5203 ac_status=$?
5204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5205 (exit $ac_status); }; } &&
5206 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
5207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5208 (eval $ac_try) 2>&5
5209 ac_status=$?
5210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5211 (exit $ac_status); }; }; then
c0d27fcc
MR
5212 ac_cv_header_stdc=yes
5213else
5214 echo "$as_me: failed program was:" >&5
19650fd6
AS
5215sed 's/^/| /' conftest.$ac_ext >&5
5216
5217ac_cv_header_stdc=no
c0d27fcc 5218fi
edfaf76d 5219rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5220
5221if test $ac_cv_header_stdc = yes; then
5222 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5223 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5224/* confdefs.h. */
5225_ACEOF
5226cat confdefs.h >>conftest.$ac_ext
5227cat >>conftest.$ac_ext <<_ACEOF
5228/* end confdefs.h. */
c0d27fcc
MR
5229#include <string.h>
5230
5231_ACEOF
5232if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5233 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
5234 :
5235else
5236 ac_cv_header_stdc=no
5237fi
5238rm -f conftest*
5239
5240fi
5241
5242if test $ac_cv_header_stdc = yes; then
5243 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5244 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5245/* confdefs.h. */
5246_ACEOF
5247cat confdefs.h >>conftest.$ac_ext
5248cat >>conftest.$ac_ext <<_ACEOF
5249/* end confdefs.h. */
c0d27fcc
MR
5250#include <stdlib.h>
5251
5252_ACEOF
5253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5254 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
5255 :
5256else
5257 ac_cv_header_stdc=no
5258fi
5259rm -f conftest*
5260
5261fi
5262
5263if test $ac_cv_header_stdc = yes; then
5264 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5265 if test "$cross_compiling" = yes; then
5266 :
5267else
5268 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5269/* confdefs.h. */
5270_ACEOF
5271cat confdefs.h >>conftest.$ac_ext
5272cat >>conftest.$ac_ext <<_ACEOF
5273/* end confdefs.h. */
c0d27fcc
MR
5274#include <ctype.h>
5275#if ((' ' & 0x0FF) == 0x020)
5276# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5277# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5278#else
19650fd6 5279# define ISLOWER(c) \
edfaf76d
LK
5280 (('a' <= (c) && (c) <= 'i') \
5281 || ('j' <= (c) && (c) <= 'r') \
5282 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
5283# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5284#endif
5285
5286#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5287int
5288main ()
5289{
5290 int i;
5291 for (i = 0; i < 256; i++)
5292 if (XOR (islower (i), ISLOWER (i))
edfaf76d 5293 || toupper (i) != TOUPPER (i))
c0d27fcc
MR
5294 exit(2);
5295 exit (0);
5296}
5297_ACEOF
5298rm -f conftest$ac_exeext
5299if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5300 (eval $ac_link) 2>&5
5301 ac_status=$?
5302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5303 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5305 (eval $ac_try) 2>&5
5306 ac_status=$?
5307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5308 (exit $ac_status); }; }; then
5309 :
5310else
5311 echo "$as_me: program exited with status $ac_status" >&5
5312echo "$as_me: failed program was:" >&5
19650fd6
AS
5313sed 's/^/| /' conftest.$ac_ext >&5
5314
c0d27fcc
MR
5315( exit $ac_status )
5316ac_cv_header_stdc=no
5317fi
edfaf76d 5318rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5319fi
5320fi
5321fi
5322echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5323echo "${ECHO_T}$ac_cv_header_stdc" >&6
5324if test $ac_cv_header_stdc = yes; then
5325
5326cat >>confdefs.h <<\_ACEOF
5327#define STDC_HEADERS 1
5328_ACEOF
5329
5330fi
5331
5332# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 5343 inttypes.h stdint.h unistd.h
98418dba
CW
5344do
5345as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc 5346echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5347echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5348if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5349 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5350else
925c2f3f 5351 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5352/* confdefs.h. */
5353_ACEOF
5354cat confdefs.h >>conftest.$ac_ext
5355cat >>conftest.$ac_ext <<_ACEOF
5356/* end confdefs.h. */
c0d27fcc
MR
5357$ac_includes_default
5358
5359#include <$ac_header>
5360_ACEOF
5361rm -f conftest.$ac_objext
5362if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5363 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5364 ac_status=$?
edfaf76d
LK
5365 grep -v '^ *+' conftest.er1 >conftest.err
5366 rm -f conftest.er1
5367 cat conftest.err >&5
c0d27fcc
MR
5368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5369 (exit $ac_status); } &&
e143ad11
AS
5370 { ac_try='test -z "$ac_c_werror_flag"
5371 || test ! -s conftest.err'
edfaf76d
LK
5372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5373 (eval $ac_try) 2>&5
5374 ac_status=$?
5375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5376 (exit $ac_status); }; } &&
5377 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5379 (eval $ac_try) 2>&5
5380 ac_status=$?
5381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5382 (exit $ac_status); }; }; then
5383 eval "$as_ac_Header=yes"
5384else
5385 echo "$as_me: failed program was:" >&5
19650fd6
AS
5386sed 's/^/| /' conftest.$ac_ext >&5
5387
c0d27fcc
MR
5388eval "$as_ac_Header=no"
5389fi
edfaf76d 5390rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5391fi
5392echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5393echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5394if test `eval echo '${'$as_ac_Header'}'` = yes; then
5395 cat >>confdefs.h <<_ACEOF
5396#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5397_ACEOF
5398
5399fi
5400
5401done
5402
5403
5404
5405
5406
5407for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5408do
5409as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5410if eval "test \"\${$as_ac_Header+set}\" = set"; then
5411 echo "$as_me:$LINENO: checking for $ac_header" >&5
5412echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5413if eval "test \"\${$as_ac_Header+set}\" = set"; then
5414 echo $ECHO_N "(cached) $ECHO_C" >&6
5415fi
5416echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5417echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5418else
5419 # Is the header compilable?
5420echo "$as_me:$LINENO: checking $ac_header usability" >&5
5421echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5422cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5423/* confdefs.h. */
5424_ACEOF
5425cat confdefs.h >>conftest.$ac_ext
5426cat >>conftest.$ac_ext <<_ACEOF
5427/* end confdefs.h. */
c0d27fcc 5428$ac_includes_default
98418dba 5429#include <$ac_header>
503d2be0 5430_ACEOF
c0d27fcc
MR
5431rm -f conftest.$ac_objext
5432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5433 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5434 ac_status=$?
edfaf76d
LK
5435 grep -v '^ *+' conftest.er1 >conftest.err
5436 rm -f conftest.er1
5437 cat conftest.err >&5
c0d27fcc
MR
5438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5439 (exit $ac_status); } &&
e143ad11
AS
5440 { ac_try='test -z "$ac_c_werror_flag"
5441 || test ! -s conftest.err'
edfaf76d
LK
5442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5443 (eval $ac_try) 2>&5
5444 ac_status=$?
5445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5446 (exit $ac_status); }; } &&
5447 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5449 (eval $ac_try) 2>&5
5450 ac_status=$?
5451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5452 (exit $ac_status); }; }; then
5453 ac_header_compiler=yes
5454else
5455 echo "$as_me: failed program was:" >&5
19650fd6
AS
5456sed 's/^/| /' conftest.$ac_ext >&5
5457
c0d27fcc
MR
5458ac_header_compiler=no
5459fi
edfaf76d 5460rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5461echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5462echo "${ECHO_T}$ac_header_compiler" >&6
5463
5464# Is the header present?
5465echo "$as_me:$LINENO: checking $ac_header presence" >&5
5466echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5467cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5468/* confdefs.h. */
5469_ACEOF
5470cat confdefs.h >>conftest.$ac_ext
5471cat >>conftest.$ac_ext <<_ACEOF
5472/* end confdefs.h. */
c0d27fcc
MR
5473#include <$ac_header>
5474_ACEOF
5475if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5476 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5477 ac_status=$?
6bae0ccf 5478 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5479 rm -f conftest.er1
5480 cat conftest.err >&5
c0d27fcc 5481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5482 (exit $ac_status); } >/dev/null; then
5483 if test -s conftest.err; then
5484 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5485 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5486 else
5487 ac_cpp_err=
5488 fi
5489else
5490 ac_cpp_err=yes
5491fi
5492if test -z "$ac_cpp_err"; then
c0d27fcc 5493 ac_header_preproc=yes
f4988be7 5494else
503d2be0 5495 echo "$as_me: failed program was:" >&5
19650fd6
AS
5496sed 's/^/| /' conftest.$ac_ext >&5
5497
c0d27fcc 5498 ac_header_preproc=no
f4988be7 5499fi
98418dba 5500rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5501echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5502echo "${ECHO_T}$ac_header_preproc" >&6
5503
5504# So? What about this header?
edfaf76d
LK
5505case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5506 yes:no: )
c0d27fcc
MR
5507 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5508echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
5509 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5510echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5511 ac_header_preproc=yes
19650fd6 5512 ;;
edfaf76d 5513 no:yes:* )
c0d27fcc
MR
5514 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5515echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
5516 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5517echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5518 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5519echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5520 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5521echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5522 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5523echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
5524 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5525echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5526 (
5527 cat <<\_ASBOX
edfaf76d
LK
5528## ------------------------------------------ ##
5529## Report this to the AC_PACKAGE_NAME lists. ##
5530## ------------------------------------------ ##
19650fd6
AS
5531_ASBOX
5532 ) |
5533 sed "s/^/$as_me: WARNING: /" >&2
5534 ;;
c0d27fcc
MR
5535esac
5536echo "$as_me:$LINENO: checking for $ac_header" >&5
5537echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5538if eval "test \"\${$as_ac_Header+set}\" = set"; then
5539 echo $ECHO_N "(cached) $ECHO_C" >&6
5540else
edfaf76d 5541 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 5542fi
c0d27fcc 5543echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5544echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5545
5546fi
98418dba 5547if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5548 cat >>confdefs.h <<_ACEOF
98418dba 5549#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5550_ACEOF
f4988be7
GM
5551
5552fi
c0d27fcc 5553
98418dba
CW
5554done
5555
5556 # Emulation library used on NetBSD.
c0d27fcc 5557 echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
5558echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
5559if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 5560 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5561else
98418dba
CW
5562 ac_check_lib_save_LIBS=$LIBS
5563LIBS="-lossaudio $LIBS"
5564cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5565/* confdefs.h. */
5566_ACEOF
5567cat confdefs.h >>conftest.$ac_ext
5568cat >>conftest.$ac_ext <<_ACEOF
5569/* end confdefs.h. */
98418dba
CW
5570
5571/* Override any gcc2 internal prototype to avoid an error. */
5572#ifdef __cplusplus
5573extern "C"
f4988be7 5574#endif
98418dba
CW
5575/* We use char because int might match the return type of a gcc2
5576 builtin and then its argument prototype would still apply. */
5577char _oss_ioctl ();
503d2be0
AS
5578int
5579main ()
5580{
98418dba 5581_oss_ioctl ();
503d2be0
AS
5582 ;
5583 return 0;
5584}
5585_ACEOF
98418dba 5586rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 5587if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 5588 (eval $ac_link) 2>conftest.er1
503d2be0 5589 ac_status=$?
edfaf76d
LK
5590 grep -v '^ *+' conftest.er1 >conftest.err
5591 rm -f conftest.er1
5592 cat conftest.err >&5
c0d27fcc 5593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5594 (exit $ac_status); } &&
e143ad11
AS
5595 { ac_try='test -z "$ac_c_werror_flag"
5596 || test ! -s conftest.err'
edfaf76d
LK
5597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5598 (eval $ac_try) 2>&5
5599 ac_status=$?
5600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5601 (exit $ac_status); }; } &&
5602 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 5603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5604 (eval $ac_try) 2>&5
5605 ac_status=$?
c0d27fcc 5606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5607 (exit $ac_status); }; }; then
98418dba 5608 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 5609else
503d2be0 5610 echo "$as_me: failed program was:" >&5
19650fd6
AS
5611sed 's/^/| /' conftest.$ac_ext >&5
5612
98418dba 5613ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 5614fi
edfaf76d
LK
5615rm -f conftest.err conftest.$ac_objext \
5616 conftest$ac_exeext conftest.$ac_ext
98418dba 5617LIBS=$ac_check_lib_save_LIBS
f4988be7 5618fi
c0d27fcc 5619echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
5620echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
5621if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
5622 LIBSOUND=-lossaudio
5623else
5624 LIBSOUND=
5625fi
5626
c0d27fcc 5627
f4988be7 5628fi
c0d27fcc
MR
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
22044edf
DL
5647
5648
973a76b1 5649
cffcede7 5650
551ffc27 5651
226e2359 5652
c0d27fcc 5653
f4988be7 5654
98418dba
CW
5655for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5656 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5657 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 5658 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 5659 sys/utsname.h pwd.h
98418dba
CW
5660do
5661as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5662if eval "test \"\${$as_ac_Header+set}\" = set"; then
5663 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5664echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5665if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5666 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5667fi
5668echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5669echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5670else
c0d27fcc
MR
5671 # Is the header compilable?
5672echo "$as_me:$LINENO: checking $ac_header usability" >&5
5673echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5674cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5675/* confdefs.h. */
5676_ACEOF
5677cat confdefs.h >>conftest.$ac_ext
5678cat >>conftest.$ac_ext <<_ACEOF
5679/* end confdefs.h. */
c0d27fcc
MR
5680$ac_includes_default
5681#include <$ac_header>
5682_ACEOF
5683rm -f conftest.$ac_objext
5684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5685 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5686 ac_status=$?
edfaf76d
LK
5687 grep -v '^ *+' conftest.er1 >conftest.err
5688 rm -f conftest.er1
5689 cat conftest.err >&5
c0d27fcc
MR
5690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5691 (exit $ac_status); } &&
e143ad11
AS
5692 { ac_try='test -z "$ac_c_werror_flag"
5693 || test ! -s conftest.err'
edfaf76d
LK
5694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5695 (eval $ac_try) 2>&5
5696 ac_status=$?
5697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5698 (exit $ac_status); }; } &&
5699 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5701 (eval $ac_try) 2>&5
5702 ac_status=$?
5703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5704 (exit $ac_status); }; }; then
5705 ac_header_compiler=yes
5706else
5707 echo "$as_me: failed program was:" >&5
19650fd6
AS
5708sed 's/^/| /' conftest.$ac_ext >&5
5709
c0d27fcc
MR
5710ac_header_compiler=no
5711fi
edfaf76d 5712rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5713echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5714echo "${ECHO_T}$ac_header_compiler" >&6
5715
5716# Is the header present?
5717echo "$as_me:$LINENO: checking $ac_header presence" >&5
5718echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5719cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5720/* confdefs.h. */
5721_ACEOF
5722cat confdefs.h >>conftest.$ac_ext
5723cat >>conftest.$ac_ext <<_ACEOF
5724/* end confdefs.h. */
98418dba 5725#include <$ac_header>
503d2be0 5726_ACEOF
c0d27fcc 5727if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5728 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5729 ac_status=$?
6bae0ccf 5730 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5731 rm -f conftest.er1
5732 cat conftest.err >&5
c0d27fcc 5733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5734 (exit $ac_status); } >/dev/null; then
5735 if test -s conftest.err; then
5736 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5737 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5738 else
5739 ac_cpp_err=
5740 fi
5741else
5742 ac_cpp_err=yes
5743fi
5744if test -z "$ac_cpp_err"; then
c0d27fcc 5745 ac_header_preproc=yes
34ec9ebe 5746else
503d2be0 5747 echo "$as_me: failed program was:" >&5
19650fd6
AS
5748sed 's/^/| /' conftest.$ac_ext >&5
5749
c0d27fcc 5750 ac_header_preproc=no
34ec9ebe 5751fi
98418dba 5752rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5753echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5754echo "${ECHO_T}$ac_header_preproc" >&6
5755
5756# So? What about this header?
edfaf76d
LK
5757case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5758 yes:no: )
c0d27fcc
MR
5759 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5760echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
5761 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5762echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5763 ac_header_preproc=yes
19650fd6 5764 ;;
edfaf76d 5765 no:yes:* )
c0d27fcc
MR
5766 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5767echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
5768 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5769echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5770 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5771echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5772 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5773echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5774 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5775echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
5776 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5777echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5778 (
5779 cat <<\_ASBOX
edfaf76d
LK
5780## ------------------------------------------ ##
5781## Report this to the AC_PACKAGE_NAME lists. ##
5782## ------------------------------------------ ##
19650fd6
AS
5783_ASBOX
5784 ) |
5785 sed "s/^/$as_me: WARNING: /" >&2
5786 ;;
c0d27fcc
MR
5787esac
5788echo "$as_me:$LINENO: checking for $ac_header" >&5
5789echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5790if eval "test \"\${$as_ac_Header+set}\" = set"; then
5791 echo $ECHO_N "(cached) $ECHO_C" >&6
5792else
edfaf76d 5793 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 5794fi
c0d27fcc 5795echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5796echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5797
5798fi
98418dba 5799if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5800 cat >>confdefs.h <<_ACEOF
98418dba 5801#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5802_ACEOF
34ec9ebe 5803
98418dba 5804fi
c0d27fcc 5805
98418dba
CW
5806done
5807
22044edf 5808
f17e308a
JD
5809echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
5810echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6
5811cat >conftest.$ac_ext <<_ACEOF
5812/* confdefs.h. */
5813_ACEOF
5814cat confdefs.h >>conftest.$ac_ext
5815cat >>conftest.$ac_ext <<_ACEOF
5816/* end confdefs.h. */
5817#include <sys/personality.h>
5818int
5819main ()
5820{
5821personality (PER_LINUX32)
5822 ;
5823 return 0;
5824}
5825_ACEOF
5826rm -f conftest.$ac_objext
5827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5828 (eval $ac_compile) 2>conftest.er1
f17e308a 5829 ac_status=$?
edfaf76d
LK
5830 grep -v '^ *+' conftest.er1 >conftest.err
5831 rm -f conftest.er1
5832 cat conftest.err >&5
f17e308a
JD
5833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5834 (exit $ac_status); } &&
e143ad11
AS
5835 { ac_try='test -z "$ac_c_werror_flag"
5836 || test ! -s conftest.err'
edfaf76d
LK
5837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5838 (eval $ac_try) 2>&5
5839 ac_status=$?
5840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5841 (exit $ac_status); }; } &&
5842 { ac_try='test -s conftest.$ac_objext'
f17e308a
JD
5843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5844 (eval $ac_try) 2>&5
5845 ac_status=$?
5846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5847 (exit $ac_status); }; }; then
5848 emacs_cv_personality_linux32=yes
5849else
5850 echo "$as_me: failed program was:" >&5
5851sed 's/^/| /' conftest.$ac_ext >&5
5852
5853emacs_cv_personality_linux32=no
5854fi
edfaf76d 5855rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f17e308a
JD
5856echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
5857echo "${ECHO_T}$emacs_cv_personality_linux32" >&6
5858
5859if test $emacs_cv_personality_linux32 = yes; then
5860
5861cat >>confdefs.h <<\_ACEOF
5862#define HAVE_PERSONALITY_LINUX32 1
5863_ACEOF
5864
5865fi
5866
5867
22044edf
DL
5868for ac_header in term.h
5869do
5870as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5871echo "$as_me:$LINENO: checking for $ac_header" >&5
5872echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5873if eval "test \"\${$as_ac_Header+set}\" = set"; then
5874 echo $ECHO_N "(cached) $ECHO_C" >&6
5875else
5876 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5877/* confdefs.h. */
5878_ACEOF
5879cat confdefs.h >>conftest.$ac_ext
5880cat >>conftest.$ac_ext <<_ACEOF
5881/* end confdefs.h. */
22044edf
DL
5882#include <$ac_header>
5883_ACEOF
5884if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5885 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5886 ac_status=$?
5887 grep -v '^ *+' conftest.er1 >conftest.err
5888 rm -f conftest.er1
5889 cat conftest.err >&5
5890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5891 (exit $ac_status); } >/dev/null; then
5892 if test -s conftest.err; then
5893 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5894 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22044edf
DL
5895 else
5896 ac_cpp_err=
5897 fi
5898else
5899 ac_cpp_err=yes
5900fi
5901if test -z "$ac_cpp_err"; then
5902 eval "$as_ac_Header=yes"
5903else
5904 echo "$as_me: failed program was:" >&5
19650fd6
AS
5905sed 's/^/| /' conftest.$ac_ext >&5
5906
22044edf
DL
5907 eval "$as_ac_Header=no"
5908fi
5909rm -f conftest.err conftest.$ac_ext
5910fi
5911echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5912echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5913if test `eval echo '${'$as_ac_Header'}'` = yes; then
5914 cat >>confdefs.h <<_ACEOF
5915#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5916_ACEOF
5917
5918fi
5919
5920done
5921
c0d27fcc 5922echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
5923echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5924if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 5925 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5926else
503d2be0 5927 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5928/* confdefs.h. */
5929_ACEOF
5930cat confdefs.h >>conftest.$ac_ext
5931cat >>conftest.$ac_ext <<_ACEOF
5932/* end confdefs.h. */
98418dba
CW
5933#include <stdlib.h>
5934#include <stdarg.h>
5935#include <string.h>
5936#include <float.h>
5937
19650fd6
AS
5938int
5939main ()
5940{
5941
5942 ;
5943 return 0;
5944}
98418dba 5945_ACEOF
19650fd6
AS
5946rm -f conftest.$ac_objext
5947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5948 (eval $ac_compile) 2>conftest.er1
cd958eb3 5949 ac_status=$?
edfaf76d
LK
5950 grep -v '^ *+' conftest.er1 >conftest.err
5951 rm -f conftest.er1
5952 cat conftest.err >&5
cd958eb3 5953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 5954 (exit $ac_status); } &&
e143ad11
AS
5955 { ac_try='test -z "$ac_c_werror_flag"
5956 || test ! -s conftest.err'
edfaf76d
LK
5957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5958 (eval $ac_try) 2>&5
5959 ac_status=$?
5960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5961 (exit $ac_status); }; } &&
5962 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
5963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5964 (eval $ac_try) 2>&5
5965 ac_status=$?
5966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5967 (exit $ac_status); }; }; then
98418dba 5968 ac_cv_header_stdc=yes
ba4481b5 5969else
503d2be0 5970 echo "$as_me: failed program was:" >&5
19650fd6
AS
5971sed 's/^/| /' conftest.$ac_ext >&5
5972
5973ac_cv_header_stdc=no
ba4481b5 5974fi
edfaf76d 5975rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
5976
5977if test $ac_cv_header_stdc = yes; then
5978 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5979 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5980/* confdefs.h. */
5981_ACEOF
5982cat confdefs.h >>conftest.$ac_ext
5983cat >>conftest.$ac_ext <<_ACEOF
5984/* end confdefs.h. */
98418dba
CW
5985#include <string.h>
5986
5987_ACEOF
5988if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5989 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
5990 :
5991else
5992 ac_cv_header_stdc=no
ba4481b5 5993fi
98418dba 5994rm -f conftest*
ba4481b5
DL
5995
5996fi
5997
98418dba
CW
5998if test $ac_cv_header_stdc = yes; then
5999 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6000 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6001/* confdefs.h. */
6002_ACEOF
6003cat confdefs.h >>conftest.$ac_ext
6004cat >>conftest.$ac_ext <<_ACEOF
6005/* end confdefs.h. */
98418dba
CW
6006#include <stdlib.h>
6007
6008_ACEOF
6009if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6010 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6011 :
6012else
6013 ac_cv_header_stdc=no
6014fi
6015rm -f conftest*
6016
6017fi
6018
6019if test $ac_cv_header_stdc = yes; then
6020 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6021 if test "$cross_compiling" = yes; then
6022 :
d42122a3 6023else
503d2be0 6024 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6025/* confdefs.h. */
6026_ACEOF
6027cat confdefs.h >>conftest.$ac_ext
6028cat >>conftest.$ac_ext <<_ACEOF
6029/* end confdefs.h. */
98418dba
CW
6030#include <ctype.h>
6031#if ((' ' & 0x0FF) == 0x020)
6032# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6033# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6034#else
19650fd6 6035# define ISLOWER(c) \
edfaf76d
LK
6036 (('a' <= (c) && (c) <= 'i') \
6037 || ('j' <= (c) && (c) <= 'r') \
6038 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6039# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6040#endif
6041
6042#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6043int
6044main ()
6045{
98418dba
CW
6046 int i;
6047 for (i = 0; i < 256; i++)
6048 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6049 || toupper (i) != TOUPPER (i))
98418dba
CW
6050 exit(2);
6051 exit (0);
503d2be0
AS
6052}
6053_ACEOF
98418dba 6054rm -f conftest$ac_exeext
c0d27fcc 6055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 6056 (eval $ac_link) 2>&5
503d2be0 6057 ac_status=$?
c0d27fcc 6058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6059 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 6060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6061 (eval $ac_try) 2>&5
6062 ac_status=$?
c0d27fcc 6063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6064 (exit $ac_status); }; }; then
98418dba 6065 :
d42122a3 6066else
98418dba
CW
6067 echo "$as_me: program exited with status $ac_status" >&5
6068echo "$as_me: failed program was:" >&5
19650fd6
AS
6069sed 's/^/| /' conftest.$ac_ext >&5
6070
c0d27fcc 6071( exit $ac_status )
98418dba 6072ac_cv_header_stdc=no
d42122a3 6073fi
edfaf76d 6074rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6075fi
98418dba
CW
6076fi
6077fi
c0d27fcc 6078echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
98418dba
CW
6079echo "${ECHO_T}$ac_cv_header_stdc" >&6
6080if test $ac_cv_header_stdc = yes; then
6081
c0d27fcc 6082cat >>confdefs.h <<\_ACEOF
98418dba 6083#define STDC_HEADERS 1
c0d27fcc 6084_ACEOF
d42122a3
DL
6085
6086fi
6087
c0d27fcc 6088echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
6089echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
6090if test "${ac_cv_header_time+set}" = set; then
503d2be0 6091 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6092else
503d2be0 6093 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6094/* confdefs.h. */
6095_ACEOF
6096cat confdefs.h >>conftest.$ac_ext
6097cat >>conftest.$ac_ext <<_ACEOF
6098/* end confdefs.h. */
ba4481b5 6099#include <sys/types.h>
98418dba 6100#include <sys/time.h>
ba4481b5 6101#include <time.h>
503d2be0
AS
6102
6103int
6104main ()
6105{
98418dba
CW
6106if ((struct tm *) 0)
6107return 0;
503d2be0
AS
6108 ;
6109 return 0;
6110}
6111_ACEOF
6112rm -f conftest.$ac_objext
c0d27fcc 6113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6114 (eval $ac_compile) 2>conftest.er1
503d2be0 6115 ac_status=$?
edfaf76d
LK
6116 grep -v '^ *+' conftest.er1 >conftest.err
6117 rm -f conftest.er1
6118 cat conftest.err >&5
c0d27fcc 6119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6120 (exit $ac_status); } &&
e143ad11
AS
6121 { ac_try='test -z "$ac_c_werror_flag"
6122 || test ! -s conftest.err'
edfaf76d
LK
6123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6124 (eval $ac_try) 2>&5
6125 ac_status=$?
6126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6127 (exit $ac_status); }; } &&
6128 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6130 (eval $ac_try) 2>&5
6131 ac_status=$?
c0d27fcc 6132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6133 (exit $ac_status); }; }; then
98418dba 6134 ac_cv_header_time=yes
ba4481b5 6135else
503d2be0 6136 echo "$as_me: failed program was:" >&5
19650fd6
AS
6137sed 's/^/| /' conftest.$ac_ext >&5
6138
98418dba 6139ac_cv_header_time=no
ba4481b5 6140fi
edfaf76d 6141rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6142fi
c0d27fcc 6143echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
6144echo "${ECHO_T}$ac_cv_header_time" >&6
6145if test $ac_cv_header_time = yes; then
503d2be0 6146
c0d27fcc 6147cat >>confdefs.h <<\_ACEOF
98418dba 6148#define TIME_WITH_SYS_TIME 1
c0d27fcc 6149_ACEOF
ba4481b5
DL
6150
6151fi
6152
cd958eb3
MB
6153echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6154echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
6155if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6156 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6157else
503d2be0 6158 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6159/* confdefs.h. */
6160_ACEOF
6161cat confdefs.h >>conftest.$ac_ext
6162cat >>conftest.$ac_ext <<_ACEOF
6163/* end confdefs.h. */
cd958eb3
MB
6164$ac_includes_default
6165int
6166main ()
6167{
6168#ifndef sys_siglist
6169 char *p = (char *) sys_siglist;
98418dba 6170#endif
503d2be0 6171
cd958eb3
MB
6172 ;
6173 return 0;
6174}
6175_ACEOF
6176rm -f conftest.$ac_objext
6177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6178 (eval $ac_compile) 2>conftest.er1
cd958eb3 6179 ac_status=$?
edfaf76d
LK
6180 grep -v '^ *+' conftest.er1 >conftest.err
6181 rm -f conftest.er1
6182 cat conftest.err >&5
cd958eb3
MB
6183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6184 (exit $ac_status); } &&
e143ad11
AS
6185 { ac_try='test -z "$ac_c_werror_flag"
6186 || test ! -s conftest.err'
edfaf76d
LK
6187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6188 (eval $ac_try) 2>&5
6189 ac_status=$?
6190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6191 (exit $ac_status); }; } &&
6192 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
6193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6194 (eval $ac_try) 2>&5
6195 ac_status=$?
6196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6197 (exit $ac_status); }; }; then
6198 ac_cv_have_decl_sys_siglist=yes
6199else
6200 echo "$as_me: failed program was:" >&5
19650fd6
AS
6201sed 's/^/| /' conftest.$ac_ext >&5
6202
cd958eb3
MB
6203ac_cv_have_decl_sys_siglist=no
6204fi
edfaf76d 6205rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
6206fi
6207echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6208echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
6209if test $ac_cv_have_decl_sys_siglist = yes; then
6210
6211cat >>confdefs.h <<_ACEOF
6212#define HAVE_DECL_SYS_SIGLIST 1
6213_ACEOF
6214
6215
6216else
6217 cat >>confdefs.h <<_ACEOF
6218#define HAVE_DECL_SYS_SIGLIST 0
6219_ACEOF
6220
6221
6222fi
6223
6224
6225if test $ac_cv_have_decl_sys_siglist != yes; then
6226 # For Tru64, at least:
6227 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6228echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
6229if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
6230 echo $ECHO_N "(cached) $ECHO_C" >&6
6231else
6232 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6233/* confdefs.h. */
6234_ACEOF
6235cat confdefs.h >>conftest.$ac_ext
6236cat >>conftest.$ac_ext <<_ACEOF
6237/* end confdefs.h. */
cd958eb3 6238$ac_includes_default
503d2be0
AS
6239int
6240main ()
6241{
cd958eb3
MB
6242#ifndef __sys_siglist
6243 char *p = (char *) __sys_siglist;
6244#endif
6245
503d2be0
AS
6246 ;
6247 return 0;
6248}
6249_ACEOF
6250rm -f conftest.$ac_objext
c0d27fcc 6251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6252 (eval $ac_compile) 2>conftest.er1
503d2be0 6253 ac_status=$?
edfaf76d
LK
6254 grep -v '^ *+' conftest.er1 >conftest.err
6255 rm -f conftest.er1
6256 cat conftest.err >&5
c0d27fcc 6257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6258 (exit $ac_status); } &&
e143ad11
AS
6259 { ac_try='test -z "$ac_c_werror_flag"
6260 || test ! -s conftest.err'
edfaf76d
LK
6261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6262 (eval $ac_try) 2>&5
6263 ac_status=$?
6264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6265 (exit $ac_status); }; } &&
6266 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6268 (eval $ac_try) 2>&5
6269 ac_status=$?
c0d27fcc 6270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6271 (exit $ac_status); }; }; then
cd958eb3 6272 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6273else
503d2be0 6274 echo "$as_me: failed program was:" >&5
19650fd6
AS
6275sed 's/^/| /' conftest.$ac_ext >&5
6276
cd958eb3 6277ac_cv_have_decl___sys_siglist=no
ba4481b5 6278fi
edfaf76d 6279rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6280fi
cd958eb3
MB
6281echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6282echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6
6283if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6284
cd958eb3
MB
6285cat >>confdefs.h <<_ACEOF
6286#define HAVE_DECL___SYS_SIGLIST 1
6287_ACEOF
6288
6289
6290else
6291 cat >>confdefs.h <<_ACEOF
6292#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 6293_ACEOF
503d2be0 6294
cd958eb3 6295
ba4481b5
DL
6296fi
6297
cd958eb3
MB
6298
6299 if test $ac_cv_have_decl___sys_siglist = yes; then
6300
6301cat >>confdefs.h <<\_ACEOF
6302#define sys_siglist __sys_siglist
6303_ACEOF
6304
6305 fi
6306fi
c0d27fcc 6307echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
6308echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
6309if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 6310 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6311else
503d2be0 6312 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6313/* confdefs.h. */
6314_ACEOF
6315cat confdefs.h >>conftest.$ac_ext
6316cat >>conftest.$ac_ext <<_ACEOF
6317/* end confdefs.h. */
98418dba
CW
6318#include <sys/types.h>
6319#include <sys/wait.h>
6320#ifndef WEXITSTATUS
6321# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6322#endif
6323#ifndef WIFEXITED
6324# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 6325#endif
503d2be0
AS
6326
6327int
6328main ()
6329{
98418dba
CW
6330 int s;
6331 wait (&s);
6332 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
6333 ;
6334 return 0;
6335}
6336_ACEOF
98418dba 6337rm -f conftest.$ac_objext
c0d27fcc 6338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6339 (eval $ac_compile) 2>conftest.er1
503d2be0 6340 ac_status=$?
edfaf76d
LK
6341 grep -v '^ *+' conftest.er1 >conftest.err
6342 rm -f conftest.er1
6343 cat conftest.err >&5
c0d27fcc 6344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6345 (exit $ac_status); } &&
e143ad11
AS
6346 { ac_try='test -z "$ac_c_werror_flag"
6347 || test ! -s conftest.err'
edfaf76d
LK
6348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6349 (eval $ac_try) 2>&5
6350 ac_status=$?
6351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6352 (exit $ac_status); }; } &&
6353 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6355 (eval $ac_try) 2>&5
6356 ac_status=$?
c0d27fcc 6357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6358 (exit $ac_status); }; }; then
98418dba 6359 ac_cv_header_sys_wait_h=yes
ba4481b5 6360else
503d2be0 6361 echo "$as_me: failed program was:" >&5
19650fd6
AS
6362sed 's/^/| /' conftest.$ac_ext >&5
6363
98418dba 6364ac_cv_header_sys_wait_h=no
ba4481b5 6365fi
edfaf76d 6366rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6367fi
c0d27fcc 6368echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
6369echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
6370if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 6371
c0d27fcc 6372cat >>confdefs.h <<\_ACEOF
98418dba 6373#define HAVE_SYS_WAIT_H 1
c0d27fcc 6374_ACEOF
ba4481b5 6375
ba4481b5
DL
6376fi
6377
c0d27fcc
MR
6378
6379echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
6380echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
6381if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 6382 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 6383else
503d2be0 6384 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6385/* confdefs.h. */
6386_ACEOF
6387cat confdefs.h >>conftest.$ac_ext
6388cat >>conftest.$ac_ext <<_ACEOF
6389/* end confdefs.h. */
98418dba
CW
6390#ifdef TIME_WITH_SYS_TIME
6391#include <sys/time.h>
6392#include <time.h>
6393#else
6394#ifdef HAVE_SYS_TIME_H
6395#include <sys/time.h>
6396#else
1113b624 6397#include <time.h>
98418dba
CW
6398#endif
6399#endif
6400#ifdef HAVE_UTIME_H
6401#include <utime.h>
6402#endif
503d2be0
AS
6403int
6404main ()
6405{
98418dba 6406static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
6407 ;
6408 return 0;
6409}
6410_ACEOF
98418dba 6411rm -f conftest.$ac_objext
c0d27fcc 6412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6413 (eval $ac_compile) 2>conftest.er1
503d2be0 6414 ac_status=$?
edfaf76d
LK
6415 grep -v '^ *+' conftest.er1 >conftest.err
6416 rm -f conftest.er1
6417 cat conftest.err >&5
c0d27fcc 6418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6419 (exit $ac_status); } &&
e143ad11
AS
6420 { ac_try='test -z "$ac_c_werror_flag"
6421 || test ! -s conftest.err'
edfaf76d
LK
6422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6423 (eval $ac_try) 2>&5
6424 ac_status=$?
6425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6426 (exit $ac_status); }; } &&
6427 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6429 (eval $ac_try) 2>&5
6430 ac_status=$?
c0d27fcc 6431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6432 (exit $ac_status); }; }; then
98418dba 6433 emacs_cv_struct_utimbuf=yes
1113b624 6434else
503d2be0 6435 echo "$as_me: failed program was:" >&5
19650fd6
AS
6436sed 's/^/| /' conftest.$ac_ext >&5
6437
98418dba 6438emacs_cv_struct_utimbuf=no
1113b624 6439fi
edfaf76d 6440rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 6441fi
c0d27fcc 6442echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
6443echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
6444if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 6445
c0d27fcc 6446cat >>confdefs.h <<\_ACEOF
98418dba 6447#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 6448_ACEOF
1113b624
PE
6449
6450fi
ba4481b5 6451
c0d27fcc 6452echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
6453echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6454if test "${ac_cv_type_signal+set}" = set; then
503d2be0 6455 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6456else
98418dba 6457 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6458/* confdefs.h. */
6459_ACEOF
6460cat confdefs.h >>conftest.$ac_ext
6461cat >>conftest.$ac_ext <<_ACEOF
6462/* end confdefs.h. */
7397acc4 6463#include <sys/types.h>
98418dba
CW
6464#include <signal.h>
6465#ifdef signal
6466# undef signal
6467#endif
6468#ifdef __cplusplus
6469extern "C" void (*signal (int, void (*)(int)))(int);
6470#else
6471void (*signal ()) ();
6472#endif
6473
503d2be0
AS
6474int
6475main ()
6476{
98418dba 6477int i;
503d2be0
AS
6478 ;
6479 return 0;
6480}
6481_ACEOF
98418dba 6482rm -f conftest.$ac_objext
c0d27fcc 6483if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6484 (eval $ac_compile) 2>conftest.er1
503d2be0 6485 ac_status=$?
edfaf76d
LK
6486 grep -v '^ *+' conftest.er1 >conftest.err
6487 rm -f conftest.er1
6488 cat conftest.err >&5
c0d27fcc 6489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6490 (exit $ac_status); } &&
e143ad11
AS
6491 { ac_try='test -z "$ac_c_werror_flag"
6492 || test ! -s conftest.err'
edfaf76d
LK
6493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6494 (eval $ac_try) 2>&5
6495 ac_status=$?
6496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6497 (exit $ac_status); }; } &&
6498 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6500 (eval $ac_try) 2>&5
6501 ac_status=$?
c0d27fcc 6502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6503 (exit $ac_status); }; }; then
98418dba 6504 ac_cv_type_signal=void
503d2be0
AS
6505else
6506 echo "$as_me: failed program was:" >&5
19650fd6
AS
6507sed 's/^/| /' conftest.$ac_ext >&5
6508
98418dba 6509ac_cv_type_signal=int
503d2be0 6510fi
edfaf76d 6511rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6512fi
c0d27fcc 6513echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 6514echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 6515
c0d27fcc 6516cat >>confdefs.h <<_ACEOF
98418dba 6517#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
6518_ACEOF
6519
503d2be0 6520
c0d27fcc
MR
6521
6522echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
6523echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
6524if test "${emacs_cv_speed_t+set}" = set; then
6525 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6526else
98418dba 6527 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6528/* confdefs.h. */
6529_ACEOF
6530cat confdefs.h >>conftest.$ac_ext
6531cat >>conftest.$ac_ext <<_ACEOF
6532/* end confdefs.h. */
98418dba 6533#include <termios.h>
98418dba
CW
6534int
6535main ()
6536{
6537speed_t x = 1;
6538 ;
6539 return 0;
6540}
6541_ACEOF
6542rm -f conftest.$ac_objext
c0d27fcc 6543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6544 (eval $ac_compile) 2>conftest.er1
98418dba 6545 ac_status=$?
edfaf76d
LK
6546 grep -v '^ *+' conftest.er1 >conftest.err
6547 rm -f conftest.er1
6548 cat conftest.err >&5
c0d27fcc 6549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6550 (exit $ac_status); } &&
e143ad11
AS
6551 { ac_try='test -z "$ac_c_werror_flag"
6552 || test ! -s conftest.err'
edfaf76d
LK
6553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6554 (eval $ac_try) 2>&5
6555 ac_status=$?
6556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6557 (exit $ac_status); }; } &&
6558 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6560 (eval $ac_try) 2>&5
6561 ac_status=$?
c0d27fcc 6562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6563 (exit $ac_status); }; }; then
6564 emacs_cv_speed_t=yes
6565else
6566 echo "$as_me: failed program was:" >&5
19650fd6
AS
6567sed 's/^/| /' conftest.$ac_ext >&5
6568
98418dba
CW
6569emacs_cv_speed_t=no
6570fi
edfaf76d 6571rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 6572fi
c0d27fcc 6573echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
6574echo "${ECHO_T}$emacs_cv_speed_t" >&6
6575if test $emacs_cv_speed_t = yes; then
b936fae4 6576
c0d27fcc 6577cat >>confdefs.h <<\_ACEOF
98418dba 6578#define HAVE_SPEED_T 1
c0d27fcc 6579_ACEOF
98418dba 6580
7397acc4
DL
6581fi
6582
c0d27fcc 6583echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
6584echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
6585if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 6586 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6587else
503d2be0 6588 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6589/* confdefs.h. */
6590_ACEOF
6591cat confdefs.h >>conftest.$ac_ext
6592cat >>conftest.$ac_ext <<_ACEOF
6593/* end confdefs.h. */
98418dba
CW
6594#ifdef TIME_WITH_SYS_TIME
6595#include <sys/time.h>
6596#include <time.h>
6597#else
6598#ifdef HAVE_SYS_TIME_H
6599#include <sys/time.h>
6600#else
6601#include <time.h>
6602#endif
6603#endif
503d2be0
AS
6604int
6605main ()
6606{
98418dba 6607static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
6608 ;
6609 return 0;
6610}
6611_ACEOF
6612rm -f conftest.$ac_objext
c0d27fcc 6613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6614 (eval $ac_compile) 2>conftest.er1
503d2be0 6615 ac_status=$?
edfaf76d
LK
6616 grep -v '^ *+' conftest.er1 >conftest.err
6617 rm -f conftest.er1
6618 cat conftest.err >&5
c0d27fcc 6619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6620 (exit $ac_status); } &&
e143ad11
AS
6621 { ac_try='test -z "$ac_c_werror_flag"
6622 || test ! -s conftest.err'
c0d27fcc 6623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6624 (eval $ac_try) 2>&5
6625 ac_status=$?
c0d27fcc 6626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
6627 (exit $ac_status); }; } &&
6628 { ac_try='test -s conftest.$ac_objext'
6629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6630 (eval $ac_try) 2>&5
6631 ac_status=$?
6632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6633 (exit $ac_status); }; }; then
6634 emacs_cv_struct_timeval=yes
6635else
503d2be0 6636 echo "$as_me: failed program was:" >&5
19650fd6
AS
6637sed 's/^/| /' conftest.$ac_ext >&5
6638
98418dba 6639emacs_cv_struct_timeval=no
7397acc4 6640fi
edfaf76d 6641rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6642fi
c0d27fcc 6643echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
6644echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
6645HAVE_TIMEVAL=$emacs_cv_struct_timeval
6646if test $emacs_cv_struct_timeval = yes; then
b936fae4 6647
c0d27fcc 6648cat >>confdefs.h <<\_ACEOF
98418dba 6649#define HAVE_TIMEVAL 1
c0d27fcc 6650_ACEOF
7397acc4
DL
6651
6652fi
6653
c0d27fcc 6654echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
6655echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
6656if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 6657 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6658else
503d2be0 6659 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6660/* confdefs.h. */
6661_ACEOF
6662cat confdefs.h >>conftest.$ac_ext
6663cat >>conftest.$ac_ext <<_ACEOF
6664/* end confdefs.h. */
98418dba 6665#include <math.h>
503d2be0
AS
6666int
6667main ()
6668{
98418dba 6669static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
6670 ;
6671 return 0;
ba4481b5 6672}
503d2be0
AS
6673_ACEOF
6674rm -f conftest.$ac_objext
c0d27fcc 6675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6676 (eval $ac_compile) 2>conftest.er1
503d2be0 6677 ac_status=$?
edfaf76d
LK
6678 grep -v '^ *+' conftest.er1 >conftest.err
6679 rm -f conftest.er1
6680 cat conftest.err >&5
c0d27fcc 6681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6682 (exit $ac_status); } &&
e143ad11
AS
6683 { ac_try='test -z "$ac_c_werror_flag"
6684 || test ! -s conftest.err'
edfaf76d
LK
6685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6686 (eval $ac_try) 2>&5
6687 ac_status=$?
6688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6689 (exit $ac_status); }; } &&
6690 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6692 (eval $ac_try) 2>&5
6693 ac_status=$?
c0d27fcc 6694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6695 (exit $ac_status); }; }; then
98418dba 6696 emacs_cv_struct_exception=yes
ba4481b5 6697else
503d2be0 6698 echo "$as_me: failed program was:" >&5
19650fd6
AS
6699sed 's/^/| /' conftest.$ac_ext >&5
6700
98418dba 6701emacs_cv_struct_exception=no
ba4481b5 6702fi
edfaf76d 6703rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6704fi
c0d27fcc 6705echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
6706echo "${ECHO_T}$emacs_cv_struct_exception" >&6
6707HAVE_EXCEPTION=$emacs_cv_struct_exception
6708if test $emacs_cv_struct_exception != yes; then
b936fae4 6709
c0d27fcc 6710cat >>confdefs.h <<\_ACEOF
98418dba 6711#define NO_MATHERR 1
c0d27fcc 6712_ACEOF
ba4481b5
DL
6713
6714fi
6715
7862d3a8
AS
6716
6717for ac_header in sys/socket.h
6718do
6719as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6720if eval "test \"\${$as_ac_Header+set}\" = set"; then
6721 echo "$as_me:$LINENO: checking for $ac_header" >&5
6722echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6723if eval "test \"\${$as_ac_Header+set}\" = set"; then
6724 echo $ECHO_N "(cached) $ECHO_C" >&6
6725fi
6726echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6727echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6728else
6729 # Is the header compilable?
6730echo "$as_me:$LINENO: checking $ac_header usability" >&5
6731echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6732cat >conftest.$ac_ext <<_ACEOF
6733/* confdefs.h. */
6734_ACEOF
6735cat confdefs.h >>conftest.$ac_ext
6736cat >>conftest.$ac_ext <<_ACEOF
6737/* end confdefs.h. */
6738$ac_includes_default
6739#include <$ac_header>
6740_ACEOF
6741rm -f conftest.$ac_objext
6742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6743 (eval $ac_compile) 2>conftest.er1
7862d3a8 6744 ac_status=$?
edfaf76d
LK
6745 grep -v '^ *+' conftest.er1 >conftest.err
6746 rm -f conftest.er1
6747 cat conftest.err >&5
7862d3a8
AS
6748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6749 (exit $ac_status); } &&
e143ad11
AS
6750 { ac_try='test -z "$ac_c_werror_flag"
6751 || test ! -s conftest.err'
edfaf76d
LK
6752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6753 (eval $ac_try) 2>&5
6754 ac_status=$?
6755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6756 (exit $ac_status); }; } &&
6757 { ac_try='test -s conftest.$ac_objext'
7862d3a8
AS
6758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6759 (eval $ac_try) 2>&5
6760 ac_status=$?
6761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6762 (exit $ac_status); }; }; then
6763 ac_header_compiler=yes
6764else
6765 echo "$as_me: failed program was:" >&5
6766sed 's/^/| /' conftest.$ac_ext >&5
6767
6768ac_header_compiler=no
6769fi
edfaf76d 6770rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8
AS
6771echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6772echo "${ECHO_T}$ac_header_compiler" >&6
6773
6774# Is the header present?
6775echo "$as_me:$LINENO: checking $ac_header presence" >&5
6776echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6777cat >conftest.$ac_ext <<_ACEOF
6778/* confdefs.h. */
6779_ACEOF
6780cat confdefs.h >>conftest.$ac_ext
6781cat >>conftest.$ac_ext <<_ACEOF
6782/* end confdefs.h. */
6783#include <$ac_header>
6784_ACEOF
6785if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6786 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6787 ac_status=$?
6788 grep -v '^ *+' conftest.er1 >conftest.err
6789 rm -f conftest.er1
6790 cat conftest.err >&5
6791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6792 (exit $ac_status); } >/dev/null; then
6793 if test -s conftest.err; then
6794 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 6795 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7862d3a8
AS
6796 else
6797 ac_cpp_err=
6798 fi
6799else
6800 ac_cpp_err=yes
6801fi
6802if test -z "$ac_cpp_err"; then
6803 ac_header_preproc=yes
6804else
6805 echo "$as_me: failed program was:" >&5
6806sed 's/^/| /' conftest.$ac_ext >&5
6807
6808 ac_header_preproc=no
6809fi
6810rm -f conftest.err conftest.$ac_ext
6811echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6812echo "${ECHO_T}$ac_header_preproc" >&6
6813
6814# So? What about this header?
edfaf76d
LK
6815case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6816 yes:no: )
7862d3a8
AS
6817 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6818echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6819 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6820echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6821 ac_header_preproc=yes
7862d3a8 6822 ;;
edfaf76d 6823 no:yes:* )
7862d3a8
AS
6824 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6825echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6826 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6827echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6828 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6829echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6830 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6831echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
6832 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6833echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6834 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6835echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7862d3a8
AS
6836 (
6837 cat <<\_ASBOX
edfaf76d
LK
6838## ------------------------------------------ ##
6839## Report this to the AC_PACKAGE_NAME lists. ##
6840## ------------------------------------------ ##
7862d3a8
AS
6841_ASBOX
6842 ) |
6843 sed "s/^/$as_me: WARNING: /" >&2
6844 ;;
6845esac
6846echo "$as_me:$LINENO: checking for $ac_header" >&5
6847echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6848if eval "test \"\${$as_ac_Header+set}\" = set"; then
6849 echo $ECHO_N "(cached) $ECHO_C" >&6
6850else
edfaf76d 6851 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8
AS
6852fi
6853echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6854echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6855
6856fi
6857if test `eval echo '${'$as_ac_Header'}'` = yes; then
6858 cat >>confdefs.h <<_ACEOF
6859#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6860_ACEOF
6861
6862fi
6863
6864done
6865
6866
6867for ac_header in net/if.h
6868do
6869as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6870echo "$as_me:$LINENO: checking for $ac_header" >&5
6871echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6872if eval "test \"\${$as_ac_Header+set}\" = set"; then
6873 echo $ECHO_N "(cached) $ECHO_C" >&6
6874else
6875 cat >conftest.$ac_ext <<_ACEOF
6876/* confdefs.h. */
6877_ACEOF
6878cat confdefs.h >>conftest.$ac_ext
6879cat >>conftest.$ac_ext <<_ACEOF
6880/* end confdefs.h. */
6881$ac_includes_default
6882#if HAVE_SYS_SOCKET_H
6883#include <sys/socket.h>
6884#endif
6885
6886#include <$ac_header>
6887_ACEOF
6888rm -f conftest.$ac_objext
6889if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6890 (eval $ac_compile) 2>conftest.er1
7862d3a8 6891 ac_status=$?
edfaf76d
LK
6892 grep -v '^ *+' conftest.er1 >conftest.err
6893 rm -f conftest.er1
6894 cat conftest.err >&5
7862d3a8
AS
6895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6896 (exit $ac_status); } &&
e143ad11
AS
6897 { ac_try='test -z "$ac_c_werror_flag"
6898 || test ! -s conftest.err'
edfaf76d
LK
6899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6900 (eval $ac_try) 2>&5
6901 ac_status=$?
6902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6903 (exit $ac_status); }; } &&
6904 { ac_try='test -s conftest.$ac_objext'
7862d3a8
AS
6905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6906 (eval $ac_try) 2>&5
6907 ac_status=$?
6908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6909 (exit $ac_status); }; }; then
6910 eval "$as_ac_Header=yes"
6911else
6912 echo "$as_me: failed program was:" >&5
6913sed 's/^/| /' conftest.$ac_ext >&5
6914
6915eval "$as_ac_Header=no"
6916fi
edfaf76d 6917rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8
AS
6918fi
6919echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6920echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6921if test `eval echo '${'$as_ac_Header'}'` = yes; then
6922 cat >>confdefs.h <<_ACEOF
6923#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6924_ACEOF
6925
6926fi
6927
6928done
6929
6930
c0d27fcc 6931echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
6932echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
6933if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 6934 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6935else
503d2be0 6936 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6937/* confdefs.h. */
6938_ACEOF
6939cat confdefs.h >>conftest.$ac_ext
6940cat >>conftest.$ac_ext <<_ACEOF
6941/* end confdefs.h. */
98418dba
CW
6942#include <sys/types.h>
6943#include <time.h>
7397acc4 6944
503d2be0
AS
6945int
6946main ()
6947{
98418dba 6948struct tm *tp; tp->tm_sec;
503d2be0
AS
6949 ;
6950 return 0;
6951}
6952_ACEOF
6953rm -f conftest.$ac_objext
c0d27fcc 6954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6955 (eval $ac_compile) 2>conftest.er1
503d2be0 6956 ac_status=$?
edfaf76d
LK
6957 grep -v '^ *+' conftest.er1 >conftest.err
6958 rm -f conftest.er1
6959 cat conftest.err >&5
c0d27fcc 6960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6961 (exit $ac_status); } &&
e143ad11
AS
6962 { ac_try='test -z "$ac_c_werror_flag"
6963 || test ! -s conftest.err'
edfaf76d
LK
6964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6965 (eval $ac_try) 2>&5
6966 ac_status=$?
6967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6968 (exit $ac_status); }; } &&
6969 { ac_try='test -s conftest.$ac_objext'
35996d22
AS
6970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6971 (eval $ac_try) 2>&5
6972 ac_status=$?
6973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6974 (exit $ac_status); }; }; then
6975 ac_cv_struct_tm=time.h
6976else
503d2be0 6977 echo "$as_me: failed program was:" >&5
19650fd6
AS
6978sed 's/^/| /' conftest.$ac_ext >&5
6979
98418dba 6980ac_cv_struct_tm=sys/time.h
7397acc4 6981fi
edfaf76d 6982rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6983fi
c0d27fcc 6984echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
6985echo "${ECHO_T}$ac_cv_struct_tm" >&6
6986if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 6987
c0d27fcc 6988cat >>confdefs.h <<\_ACEOF
98418dba 6989#define TM_IN_SYS_TIME 1
c0d27fcc 6990_ACEOF
7397acc4
DL
6991
6992fi
ba4481b5 6993
c0d27fcc 6994echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
6995echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
6996if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 6997 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6998else
98418dba 6999 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7000/* confdefs.h. */
7001_ACEOF
7002cat confdefs.h >>conftest.$ac_ext
7003cat >>conftest.$ac_ext <<_ACEOF
7004/* end confdefs.h. */
98418dba
CW
7005#include <sys/types.h>
7006#include <$ac_cv_struct_tm>
ba4481b5 7007
c0d27fcc 7008
98418dba
CW
7009int
7010main ()
7011{
7012static struct tm ac_aggr;
7013if (ac_aggr.tm_zone)
7014return 0;
7015 ;
7016 return 0;
7017}
7018_ACEOF
7019rm -f conftest.$ac_objext
c0d27fcc 7020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7021 (eval $ac_compile) 2>conftest.er1
98418dba 7022 ac_status=$?
edfaf76d
LK
7023 grep -v '^ *+' conftest.er1 >conftest.err
7024 rm -f conftest.er1
7025 cat conftest.err >&5
c0d27fcc 7026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7027 (exit $ac_status); } &&
e143ad11
AS
7028 { ac_try='test -z "$ac_c_werror_flag"
7029 || test ! -s conftest.err'
edfaf76d
LK
7030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7031 (eval $ac_try) 2>&5
7032 ac_status=$?
7033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7034 (exit $ac_status); }; } &&
7035 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7037 (eval $ac_try) 2>&5
7038 ac_status=$?
c0d27fcc 7039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7040 (exit $ac_status); }; }; then
7041 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7042else
98418dba 7043 echo "$as_me: failed program was:" >&5
19650fd6
AS
7044sed 's/^/| /' conftest.$ac_ext >&5
7045
6bae0ccf 7046cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7047/* confdefs.h. */
7048_ACEOF
7049cat confdefs.h >>conftest.$ac_ext
7050cat >>conftest.$ac_ext <<_ACEOF
7051/* end confdefs.h. */
6bae0ccf
DL
7052#include <sys/types.h>
7053#include <$ac_cv_struct_tm>
7054
7055
7056int
7057main ()
7058{
7059static struct tm ac_aggr;
7060if (sizeof ac_aggr.tm_zone)
7061return 0;
7062 ;
7063 return 0;
7064}
7065_ACEOF
7066rm -f conftest.$ac_objext
7067if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7068 (eval $ac_compile) 2>conftest.er1
6bae0ccf 7069 ac_status=$?
edfaf76d
LK
7070 grep -v '^ *+' conftest.er1 >conftest.err
7071 rm -f conftest.er1
7072 cat conftest.err >&5
6bae0ccf
DL
7073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7074 (exit $ac_status); } &&
e143ad11
AS
7075 { ac_try='test -z "$ac_c_werror_flag"
7076 || test ! -s conftest.err'
edfaf76d
LK
7077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7078 (eval $ac_try) 2>&5
7079 ac_status=$?
7080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7081 (exit $ac_status); }; } &&
7082 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
7083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7084 (eval $ac_try) 2>&5
7085 ac_status=$?
7086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7087 (exit $ac_status); }; }; then
7088 ac_cv_member_struct_tm_tm_zone=yes
7089else
7090 echo "$as_me: failed program was:" >&5
19650fd6
AS
7091sed 's/^/| /' conftest.$ac_ext >&5
7092
98418dba 7093ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7094fi
edfaf76d 7095rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7096fi
edfaf76d 7097rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7098fi
c0d27fcc 7099echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
7100echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
7101if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7102
c0d27fcc 7103cat >>confdefs.h <<_ACEOF
98418dba 7104#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7105_ACEOF
7106
ba4481b5 7107
98418dba 7108fi
ba4481b5 7109
98418dba 7110if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7111
c0d27fcc 7112cat >>confdefs.h <<\_ACEOF
98418dba 7113#define HAVE_TM_ZONE 1
c0d27fcc 7114_ACEOF
ba4481b5 7115
ba4481b5 7116else
c0d27fcc 7117 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
7118echo $ECHO_N "checking for tzname... $ECHO_C" >&6
7119if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 7120 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7121else
98418dba 7122 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7123/* confdefs.h. */
7124_ACEOF
7125cat confdefs.h >>conftest.$ac_ext
7126cat >>conftest.$ac_ext <<_ACEOF
7127/* end confdefs.h. */
98418dba
CW
7128#include <time.h>
7129#ifndef tzname /* For SGI. */
7130extern char *tzname[]; /* RS6000 and others reject char **tzname. */
7131#endif
7132
98418dba
CW
7133int
7134main ()
7135{
7136atoi(*tzname);
7137 ;
7138 return 0;
7139}
7140_ACEOF
7141rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7142if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 7143 (eval $ac_link) 2>conftest.er1
98418dba 7144 ac_status=$?
edfaf76d
LK
7145 grep -v '^ *+' conftest.er1 >conftest.err
7146 rm -f conftest.er1
7147 cat conftest.err >&5
c0d27fcc 7148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7149 (exit $ac_status); } &&
e143ad11
AS
7150 { ac_try='test -z "$ac_c_werror_flag"
7151 || test ! -s conftest.err'
edfaf76d
LK
7152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7153 (eval $ac_try) 2>&5
7154 ac_status=$?
7155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7156 (exit $ac_status); }; } &&
7157 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7159 (eval $ac_try) 2>&5
7160 ac_status=$?
c0d27fcc 7161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7162 (exit $ac_status); }; }; then
7163 ac_cv_var_tzname=yes
7164else
7165 echo "$as_me: failed program was:" >&5
19650fd6
AS
7166sed 's/^/| /' conftest.$ac_ext >&5
7167
98418dba 7168ac_cv_var_tzname=no
ba4481b5 7169fi
edfaf76d
LK
7170rm -f conftest.err conftest.$ac_objext \
7171 conftest$ac_exeext conftest.$ac_ext
98418dba 7172fi
c0d27fcc 7173echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
7174echo "${ECHO_T}$ac_cv_var_tzname" >&6
7175 if test $ac_cv_var_tzname = yes; then
ba4481b5 7176
c0d27fcc 7177cat >>confdefs.h <<\_ACEOF
98418dba 7178#define HAVE_TZNAME 1
c0d27fcc 7179_ACEOF
503d2be0 7180
98418dba
CW
7181 fi
7182fi
503d2be0 7183
c0d27fcc 7184echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
7185echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
7186if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
7187 echo $ECHO_N "(cached) $ECHO_C" >&6
7188else
7189 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7190/* confdefs.h. */
7191_ACEOF
7192cat confdefs.h >>conftest.$ac_ext
7193cat >>conftest.$ac_ext <<_ACEOF
7194/* end confdefs.h. */
98418dba 7195#include <time.h>
b936fae4 7196
98418dba
CW
7197int
7198main ()
7199{
b936fae4
AS
7200static struct tm ac_aggr;
7201if (ac_aggr.tm_gmtoff)
7202return 0;
98418dba
CW
7203 ;
7204 return 0;
7205}
7206_ACEOF
b936fae4 7207rm -f conftest.$ac_objext
c0d27fcc 7208if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7209 (eval $ac_compile) 2>conftest.er1
98418dba 7210 ac_status=$?
edfaf76d
LK
7211 grep -v '^ *+' conftest.er1 >conftest.err
7212 rm -f conftest.er1
7213 cat conftest.err >&5
c0d27fcc 7214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7215 (exit $ac_status); } &&
e143ad11
AS
7216 { ac_try='test -z "$ac_c_werror_flag"
7217 || test ! -s conftest.err'
edfaf76d
LK
7218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7219 (eval $ac_try) 2>&5
7220 ac_status=$?
7221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7222 (exit $ac_status); }; } &&
7223 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7225 (eval $ac_try) 2>&5
7226 ac_status=$?
c0d27fcc 7227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7228 (exit $ac_status); }; }; then
b936fae4 7229 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
7230else
7231 echo "$as_me: failed program was:" >&5
19650fd6
AS
7232sed 's/^/| /' conftest.$ac_ext >&5
7233
8799b3e4 7234cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7235/* confdefs.h. */
7236_ACEOF
7237cat confdefs.h >>conftest.$ac_ext
7238cat >>conftest.$ac_ext <<_ACEOF
7239/* end confdefs.h. */
6bae0ccf
DL
7240#include <time.h>
7241
8799b3e4
CW
7242int
7243main ()
7244{
6bae0ccf
DL
7245static struct tm ac_aggr;
7246if (sizeof ac_aggr.tm_gmtoff)
7247return 0;
8799b3e4
CW
7248 ;
7249 return 0;
7250}
7251_ACEOF
6bae0ccf 7252rm -f conftest.$ac_objext
c0d27fcc 7253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7254 (eval $ac_compile) 2>conftest.er1
8799b3e4 7255 ac_status=$?
edfaf76d
LK
7256 grep -v '^ *+' conftest.er1 >conftest.err
7257 rm -f conftest.er1
7258 cat conftest.err >&5
c0d27fcc 7259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 7260 (exit $ac_status); } &&
e143ad11
AS
7261 { ac_try='test -z "$ac_c_werror_flag"
7262 || test ! -s conftest.err'
edfaf76d
LK
7263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7264 (eval $ac_try) 2>&5
7265 ac_status=$?
7266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7267 (exit $ac_status); }; } &&
7268 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
7270 (eval $ac_try) 2>&5
7271 ac_status=$?
c0d27fcc 7272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 7273 (exit $ac_status); }; }; then
6bae0ccf 7274 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
7275else
7276 echo "$as_me: failed program was:" >&5
19650fd6
AS
7277sed 's/^/| /' conftest.$ac_ext >&5
7278
6bae0ccf 7279ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7280fi
edfaf76d 7281rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7282fi
edfaf76d 7283rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7284fi
6bae0ccf
DL
7285echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7286echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
7287if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
7288
7289cat >>confdefs.h <<\_ACEOF
7290#define HAVE_TM_GMTOFF 1
7291_ACEOF
7292
7293fi
7294
96f3a036
DL
7295echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
7296echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6
7297if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
7298 echo $ECHO_N "(cached) $ECHO_C" >&6
7299else
7300 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7301/* confdefs.h. */
7302_ACEOF
7303cat confdefs.h >>conftest.$ac_ext
7304cat >>conftest.$ac_ext <<_ACEOF
7305/* end confdefs.h. */
7862d3a8
AS
7306$ac_includes_default
7307#if HAVE_SYS_SOCKET_H
7308#include <sys/socket.h>
7309#endif
7310#if HAVE_NET_IF_H
96f3a036 7311#include <net/if.h>
7862d3a8 7312#endif
96f3a036
DL
7313
7314int
7315main ()
7316{
7317static struct ifreq ac_aggr;
7318if (ac_aggr.ifr_flags)
7319return 0;
7320 ;
7321 return 0;
7322}
7323_ACEOF
7324rm -f conftest.$ac_objext
7325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7326 (eval $ac_compile) 2>conftest.er1
96f3a036 7327 ac_status=$?
edfaf76d
LK
7328 grep -v '^ *+' conftest.er1 >conftest.err
7329 rm -f conftest.er1
7330 cat conftest.err >&5
96f3a036
DL
7331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7332 (exit $ac_status); } &&
e143ad11
AS
7333 { ac_try='test -z "$ac_c_werror_flag"
7334 || test ! -s conftest.err'
edfaf76d
LK
7335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7336 (eval $ac_try) 2>&5
7337 ac_status=$?
7338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7339 (exit $ac_status); }; } &&
7340 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7342 (eval $ac_try) 2>&5
7343 ac_status=$?
7344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7345 (exit $ac_status); }; }; then
7346 ac_cv_member_struct_ifreq_ifr_flags=yes
7347else
7348 echo "$as_me: failed program was:" >&5
7349sed 's/^/| /' conftest.$ac_ext >&5
7350
7351cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7352/* confdefs.h. */
7353_ACEOF
7354cat confdefs.h >>conftest.$ac_ext
7355cat >>conftest.$ac_ext <<_ACEOF
7356/* end confdefs.h. */
7862d3a8
AS
7357$ac_includes_default
7358#if HAVE_SYS_SOCKET_H
7359#include <sys/socket.h>
7360#endif
7361#if HAVE_NET_IF_H
96f3a036 7362#include <net/if.h>
7862d3a8 7363#endif
96f3a036
DL
7364
7365int
7366main ()
7367{
7368static struct ifreq ac_aggr;
7369if (sizeof ac_aggr.ifr_flags)
7370return 0;
7371 ;
7372 return 0;
7373}
7374_ACEOF
7375rm -f conftest.$ac_objext
7376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7377 (eval $ac_compile) 2>conftest.er1
96f3a036 7378 ac_status=$?
edfaf76d
LK
7379 grep -v '^ *+' conftest.er1 >conftest.err
7380 rm -f conftest.er1
7381 cat conftest.err >&5
96f3a036
DL
7382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7383 (exit $ac_status); } &&
e143ad11
AS
7384 { ac_try='test -z "$ac_c_werror_flag"
7385 || test ! -s conftest.err'
edfaf76d
LK
7386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7387 (eval $ac_try) 2>&5
7388 ac_status=$?
7389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7390 (exit $ac_status); }; } &&
7391 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7393 (eval $ac_try) 2>&5
7394 ac_status=$?
7395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7396 (exit $ac_status); }; }; then
7397 ac_cv_member_struct_ifreq_ifr_flags=yes
7398else
7399 echo "$as_me: failed program was:" >&5
7400sed 's/^/| /' conftest.$ac_ext >&5
7401
7402ac_cv_member_struct_ifreq_ifr_flags=no
7403fi
edfaf76d 7404rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7405fi
edfaf76d 7406rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7407fi
7408echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
7409echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6
7410if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
7411
7412cat >>confdefs.h <<_ACEOF
7413#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
7414_ACEOF
7415
7416
7417fi
7418echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
7419echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6
7420if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
7421 echo $ECHO_N "(cached) $ECHO_C" >&6
7422else
7423 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7424/* confdefs.h. */
7425_ACEOF
7426cat confdefs.h >>conftest.$ac_ext
7427cat >>conftest.$ac_ext <<_ACEOF
7428/* end confdefs.h. */
7862d3a8
AS
7429$ac_includes_default
7430#if HAVE_SYS_SOCKET_H
7431#include <sys/socket.h>
7432#endif
7433#if HAVE_NET_IF_H
96f3a036 7434#include <net/if.h>
7862d3a8 7435#endif
96f3a036
DL
7436
7437int
7438main ()
7439{
7440static struct ifreq ac_aggr;
7441if (ac_aggr.ifr_hwaddr)
7442return 0;
7443 ;
7444 return 0;
7445}
7446_ACEOF
7447rm -f conftest.$ac_objext
7448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7449 (eval $ac_compile) 2>conftest.er1
96f3a036 7450 ac_status=$?
edfaf76d
LK
7451 grep -v '^ *+' conftest.er1 >conftest.err
7452 rm -f conftest.er1
7453 cat conftest.err >&5
96f3a036
DL
7454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7455 (exit $ac_status); } &&
e143ad11
AS
7456 { ac_try='test -z "$ac_c_werror_flag"
7457 || test ! -s conftest.err'
edfaf76d
LK
7458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7459 (eval $ac_try) 2>&5
7460 ac_status=$?
7461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7462 (exit $ac_status); }; } &&
7463 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7465 (eval $ac_try) 2>&5
7466 ac_status=$?
7467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7468 (exit $ac_status); }; }; then
7469 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7470else
7471 echo "$as_me: failed program was:" >&5
7472sed 's/^/| /' conftest.$ac_ext >&5
7473
7474cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7475/* confdefs.h. */
7476_ACEOF
7477cat confdefs.h >>conftest.$ac_ext
7478cat >>conftest.$ac_ext <<_ACEOF
7479/* end confdefs.h. */
7862d3a8
AS
7480$ac_includes_default
7481#if HAVE_SYS_SOCKET_H
7482#include <sys/socket.h>
7483#endif
7484#if HAVE_NET_IF_H
96f3a036 7485#include <net/if.h>
7862d3a8 7486#endif
96f3a036
DL
7487
7488int
7489main ()
7490{
7491static struct ifreq ac_aggr;
7492if (sizeof ac_aggr.ifr_hwaddr)
7493return 0;
7494 ;
7495 return 0;
7496}
7497_ACEOF
7498rm -f conftest.$ac_objext
7499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7500 (eval $ac_compile) 2>conftest.er1
96f3a036 7501 ac_status=$?
edfaf76d
LK
7502 grep -v '^ *+' conftest.er1 >conftest.err
7503 rm -f conftest.er1
7504 cat conftest.err >&5
96f3a036
DL
7505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7506 (exit $ac_status); } &&
e143ad11
AS
7507 { ac_try='test -z "$ac_c_werror_flag"
7508 || test ! -s conftest.err'
edfaf76d
LK
7509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7510 (eval $ac_try) 2>&5
7511 ac_status=$?
7512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7513 (exit $ac_status); }; } &&
7514 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7516 (eval $ac_try) 2>&5
7517 ac_status=$?
7518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7519 (exit $ac_status); }; }; then
7520 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7521else
7522 echo "$as_me: failed program was:" >&5
7523sed 's/^/| /' conftest.$ac_ext >&5
7524
7525ac_cv_member_struct_ifreq_ifr_hwaddr=no
7526fi
edfaf76d 7527rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7528fi
edfaf76d 7529rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7530fi
7531echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
7532echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6
7533if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
7534
7535cat >>confdefs.h <<_ACEOF
7536#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
7537_ACEOF
7538
7539
7540fi
7541echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
7542echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6
7543if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
7544 echo $ECHO_N "(cached) $ECHO_C" >&6
7545else
7546 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7547/* confdefs.h. */
7548_ACEOF
7549cat confdefs.h >>conftest.$ac_ext
7550cat >>conftest.$ac_ext <<_ACEOF
7551/* end confdefs.h. */
7862d3a8
AS
7552$ac_includes_default
7553#if HAVE_SYS_SOCKET_H
7554#include <sys/socket.h>
7555#endif
7556#if HAVE_NET_IF_H
96f3a036 7557#include <net/if.h>
7862d3a8 7558#endif
96f3a036
DL
7559
7560int
7561main ()
7562{
7563static struct ifreq ac_aggr;
7564if (ac_aggr.ifr_netmask)
7565return 0;
7566 ;
7567 return 0;
7568}
7569_ACEOF
7570rm -f conftest.$ac_objext
7571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7572 (eval $ac_compile) 2>conftest.er1
96f3a036 7573 ac_status=$?
edfaf76d
LK
7574 grep -v '^ *+' conftest.er1 >conftest.err
7575 rm -f conftest.er1
7576 cat conftest.err >&5
96f3a036
DL
7577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7578 (exit $ac_status); } &&
e143ad11
AS
7579 { ac_try='test -z "$ac_c_werror_flag"
7580 || test ! -s conftest.err'
edfaf76d
LK
7581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7582 (eval $ac_try) 2>&5
7583 ac_status=$?
7584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7585 (exit $ac_status); }; } &&
7586 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7588 (eval $ac_try) 2>&5
7589 ac_status=$?
7590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7591 (exit $ac_status); }; }; then
7592 ac_cv_member_struct_ifreq_ifr_netmask=yes
7593else
7594 echo "$as_me: failed program was:" >&5
7595sed 's/^/| /' conftest.$ac_ext >&5
7596
7597cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7598/* confdefs.h. */
7599_ACEOF
7600cat confdefs.h >>conftest.$ac_ext
7601cat >>conftest.$ac_ext <<_ACEOF
7602/* end confdefs.h. */
7862d3a8
AS
7603$ac_includes_default
7604#if HAVE_SYS_SOCKET_H
7605#include <sys/socket.h>
7606#endif
7607#if HAVE_NET_IF_H
96f3a036 7608#include <net/if.h>
7862d3a8 7609#endif
96f3a036
DL
7610
7611int
7612main ()
7613{
7614static struct ifreq ac_aggr;
7615if (sizeof ac_aggr.ifr_netmask)
7616return 0;
7617 ;
7618 return 0;
7619}
7620_ACEOF
7621rm -f conftest.$ac_objext
7622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7623 (eval $ac_compile) 2>conftest.er1
96f3a036 7624 ac_status=$?
edfaf76d
LK
7625 grep -v '^ *+' conftest.er1 >conftest.err
7626 rm -f conftest.er1
7627 cat conftest.err >&5
96f3a036
DL
7628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7629 (exit $ac_status); } &&
e143ad11
AS
7630 { ac_try='test -z "$ac_c_werror_flag"
7631 || test ! -s conftest.err'
edfaf76d
LK
7632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7633 (eval $ac_try) 2>&5
7634 ac_status=$?
7635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7636 (exit $ac_status); }; } &&
7637 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7639 (eval $ac_try) 2>&5
7640 ac_status=$?
7641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7642 (exit $ac_status); }; }; then
7643 ac_cv_member_struct_ifreq_ifr_netmask=yes
7644else
7645 echo "$as_me: failed program was:" >&5
7646sed 's/^/| /' conftest.$ac_ext >&5
7647
7648ac_cv_member_struct_ifreq_ifr_netmask=no
7649fi
edfaf76d 7650rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7651fi
edfaf76d 7652rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7653fi
7654echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
7655echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6
7656if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
7657
7658cat >>confdefs.h <<_ACEOF
7659#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
7660_ACEOF
7661
7662
7663fi
7664echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
7665echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6
7666if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
7667 echo $ECHO_N "(cached) $ECHO_C" >&6
7668else
7669 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7670/* confdefs.h. */
7671_ACEOF
7672cat confdefs.h >>conftest.$ac_ext
7673cat >>conftest.$ac_ext <<_ACEOF
7674/* end confdefs.h. */
7862d3a8
AS
7675$ac_includes_default
7676#if HAVE_SYS_SOCKET_H
7677#include <sys/socket.h>
7678#endif
7679#if HAVE_NET_IF_H
96f3a036 7680#include <net/if.h>
7862d3a8 7681#endif
96f3a036
DL
7682
7683int
7684main ()
7685{
7686static struct ifreq ac_aggr;
7687if (ac_aggr.ifr_broadaddr)
7688return 0;
7689 ;
7690 return 0;
7691}
7692_ACEOF
7693rm -f conftest.$ac_objext
7694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7695 (eval $ac_compile) 2>conftest.er1
96f3a036 7696 ac_status=$?
edfaf76d
LK
7697 grep -v '^ *+' conftest.er1 >conftest.err
7698 rm -f conftest.er1
7699 cat conftest.err >&5
96f3a036
DL
7700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7701 (exit $ac_status); } &&
e143ad11
AS
7702 { ac_try='test -z "$ac_c_werror_flag"
7703 || test ! -s conftest.err'
edfaf76d
LK
7704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7705 (eval $ac_try) 2>&5
7706 ac_status=$?
7707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7708 (exit $ac_status); }; } &&
7709 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7711 (eval $ac_try) 2>&5
7712 ac_status=$?
7713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7714 (exit $ac_status); }; }; then
7715 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7716else
7717 echo "$as_me: failed program was:" >&5
7718sed 's/^/| /' conftest.$ac_ext >&5
7719
7720cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7721/* confdefs.h. */
7722_ACEOF
7723cat confdefs.h >>conftest.$ac_ext
7724cat >>conftest.$ac_ext <<_ACEOF
7725/* end confdefs.h. */
7862d3a8
AS
7726$ac_includes_default
7727#if HAVE_SYS_SOCKET_H
7728#include <sys/socket.h>
7729#endif
7730#if HAVE_NET_IF_H
96f3a036 7731#include <net/if.h>
7862d3a8 7732#endif
96f3a036
DL
7733
7734int
7735main ()
7736{
7737static struct ifreq ac_aggr;
7738if (sizeof ac_aggr.ifr_broadaddr)
7739return 0;
7740 ;
7741 return 0;
7742}
7743_ACEOF
7744rm -f conftest.$ac_objext
7745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7746 (eval $ac_compile) 2>conftest.er1
96f3a036 7747 ac_status=$?
edfaf76d
LK
7748 grep -v '^ *+' conftest.er1 >conftest.err
7749 rm -f conftest.er1
7750 cat conftest.err >&5
96f3a036
DL
7751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7752 (exit $ac_status); } &&
e143ad11
AS
7753 { ac_try='test -z "$ac_c_werror_flag"
7754 || test ! -s conftest.err'
edfaf76d
LK
7755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7756 (eval $ac_try) 2>&5
7757 ac_status=$?
7758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7759 (exit $ac_status); }; } &&
7760 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7762 (eval $ac_try) 2>&5
7763 ac_status=$?
7764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7765 (exit $ac_status); }; }; then
7766 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7767else
7768 echo "$as_me: failed program was:" >&5
7769sed 's/^/| /' conftest.$ac_ext >&5
7770
7771ac_cv_member_struct_ifreq_ifr_broadaddr=no
7772fi
edfaf76d 7773rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7774fi
edfaf76d 7775rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7776fi
7777echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
7778echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6
7779if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
7780
7781cat >>confdefs.h <<_ACEOF
7782#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
7783_ACEOF
7784
7785
7786fi
7787echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
7788echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6
7789if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
7790 echo $ECHO_N "(cached) $ECHO_C" >&6
7791else
7792 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7793/* confdefs.h. */
7794_ACEOF
7795cat confdefs.h >>conftest.$ac_ext
7796cat >>conftest.$ac_ext <<_ACEOF
7797/* end confdefs.h. */
7862d3a8
AS
7798$ac_includes_default
7799#if HAVE_SYS_SOCKET_H
7800#include <sys/socket.h>
7801#endif
7802#if HAVE_NET_IF_H
96f3a036 7803#include <net/if.h>
7862d3a8 7804#endif
96f3a036
DL
7805
7806int
7807main ()
7808{
7809static struct ifreq ac_aggr;
7810if (ac_aggr.ifr_addr)
7811return 0;
7812 ;
7813 return 0;
7814}
7815_ACEOF
7816rm -f conftest.$ac_objext
7817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7818 (eval $ac_compile) 2>conftest.er1
96f3a036 7819 ac_status=$?
edfaf76d
LK
7820 grep -v '^ *+' conftest.er1 >conftest.err
7821 rm -f conftest.er1
7822 cat conftest.err >&5
96f3a036
DL
7823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7824 (exit $ac_status); } &&
e143ad11
AS
7825 { ac_try='test -z "$ac_c_werror_flag"
7826 || test ! -s conftest.err'
edfaf76d
LK
7827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7828 (eval $ac_try) 2>&5
7829 ac_status=$?
7830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7831 (exit $ac_status); }; } &&
7832 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7834 (eval $ac_try) 2>&5
7835 ac_status=$?
7836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7837 (exit $ac_status); }; }; then
7838 ac_cv_member_struct_ifreq_ifr_addr=yes
7839else
7840 echo "$as_me: failed program was:" >&5
7841sed 's/^/| /' conftest.$ac_ext >&5
7842
7843cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7844/* confdefs.h. */
7845_ACEOF
7846cat confdefs.h >>conftest.$ac_ext
7847cat >>conftest.$ac_ext <<_ACEOF
7848/* end confdefs.h. */
7862d3a8
AS
7849$ac_includes_default
7850#if HAVE_SYS_SOCKET_H
7851#include <sys/socket.h>
7852#endif
7853#if HAVE_NET_IF_H
96f3a036 7854#include <net/if.h>
7862d3a8 7855#endif
96f3a036
DL
7856
7857int
7858main ()
7859{
7860static struct ifreq ac_aggr;
7861if (sizeof ac_aggr.ifr_addr)
7862return 0;
7863 ;
7864 return 0;
7865}
7866_ACEOF
7867rm -f conftest.$ac_objext
7868if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7869 (eval $ac_compile) 2>conftest.er1
96f3a036 7870 ac_status=$?
edfaf76d
LK
7871 grep -v '^ *+' conftest.er1 >conftest.err
7872 rm -f conftest.er1
7873 cat conftest.err >&5
96f3a036
DL
7874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7875 (exit $ac_status); } &&
e143ad11
AS
7876 { ac_try='test -z "$ac_c_werror_flag"
7877 || test ! -s conftest.err'
edfaf76d
LK
7878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7879 (eval $ac_try) 2>&5
7880 ac_status=$?
7881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7882 (exit $ac_status); }; } &&
7883 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7885 (eval $ac_try) 2>&5
7886 ac_status=$?
7887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7888 (exit $ac_status); }; }; then
7889 ac_cv_member_struct_ifreq_ifr_addr=yes
7890else
7891 echo "$as_me: failed program was:" >&5
7892sed 's/^/| /' conftest.$ac_ext >&5
7893
7894ac_cv_member_struct_ifreq_ifr_addr=no
7895fi
edfaf76d 7896rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7897fi
edfaf76d 7898rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7899fi
7900echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
7901echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6
7902if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
7903
7904cat >>confdefs.h <<_ACEOF
7905#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
7906_ACEOF
7907
7908
7909fi
7910
8799b3e4 7911
8799b3e4 7912
c0d27fcc 7913echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
7914echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
7915if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 7916 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7917echo "${ECHO_T}yes" >&6
7918
c0d27fcc 7919cat >>confdefs.h <<\_ACEOF
98418dba 7920#define PROTOTYPES 1
c0d27fcc
MR
7921_ACEOF
7922
7923
7924cat >>confdefs.h <<\_ACEOF
7925#define __PROTOTYPES 1
7926_ACEOF
98418dba
CW
7927
7928else
c0d27fcc 7929 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7930echo "${ECHO_T}no" >&6
7931fi
7932
c0d27fcc 7933echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
7934echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
7935if test "${ac_cv_c_volatile+set}" = set; then
7936 echo $ECHO_N "(cached) $ECHO_C" >&6
7937else
7938 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7939/* confdefs.h. */
7940_ACEOF
7941cat confdefs.h >>conftest.$ac_ext
7942cat >>conftest.$ac_ext <<_ACEOF
7943/* end confdefs.h. */
98418dba 7944
98418dba
CW
7945int
7946main ()
7947{
7948
7949volatile int x;
7950int * volatile y;
7951 ;
7952 return 0;
7953}
7954_ACEOF
7955rm -f conftest.$ac_objext
c0d27fcc 7956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7957 (eval $ac_compile) 2>conftest.er1
98418dba 7958 ac_status=$?
edfaf76d
LK
7959 grep -v '^ *+' conftest.er1 >conftest.err
7960 rm -f conftest.er1
7961 cat conftest.err >&5
c0d27fcc 7962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7963 (exit $ac_status); } &&
e143ad11
AS
7964 { ac_try='test -z "$ac_c_werror_flag"
7965 || test ! -s conftest.err'
edfaf76d
LK
7966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7967 (eval $ac_try) 2>&5
7968 ac_status=$?
7969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7970 (exit $ac_status); }; } &&
7971 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7973 (eval $ac_try) 2>&5
7974 ac_status=$?
c0d27fcc 7975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7976 (exit $ac_status); }; }; then
7977 ac_cv_c_volatile=yes
7978else
7979 echo "$as_me: failed program was:" >&5
19650fd6
AS
7980sed 's/^/| /' conftest.$ac_ext >&5
7981
98418dba
CW
7982ac_cv_c_volatile=no
7983fi
edfaf76d 7984rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7985fi
c0d27fcc 7986echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
7987echo "${ECHO_T}$ac_cv_c_volatile" >&6
7988if test $ac_cv_c_volatile = no; then
7989
c0d27fcc 7990cat >>confdefs.h <<\_ACEOF
98418dba 7991#define volatile
c0d27fcc 7992_ACEOF
98418dba
CW
7993
7994fi
7995
c0d27fcc 7996echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
7997echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
7998if test "${ac_cv_c_const+set}" = set; then
7999 echo $ECHO_N "(cached) $ECHO_C" >&6
8000else
8001 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8002/* confdefs.h. */
8003_ACEOF
8004cat confdefs.h >>conftest.$ac_ext
8005cat >>conftest.$ac_ext <<_ACEOF
8006/* end confdefs.h. */
98418dba 8007
98418dba
CW
8008int
8009main ()
8010{
8011/* FIXME: Include the comments suggested by Paul. */
8012#ifndef __cplusplus
8013 /* Ultrix mips cc rejects this. */
8014 typedef int charset[2];
8015 const charset x;
8016 /* SunOS 4.1.1 cc rejects this. */
8017 char const *const *ccp;
8018 char **p;
8019 /* NEC SVR4.0.2 mips cc rejects this. */
8020 struct point {int x, y;};
8021 static struct point const zero = {0,0};
8022 /* AIX XL C 1.02.0.0 rejects this.
8023 It does not let you subtract one const X* pointer from another in
8024 an arm of an if-expression whose if-part is not a constant
8025 expression */
8026 const char *g = "string";
8027 ccp = &g + (g ? g-g : 0);
8028 /* HPUX 7.0 cc rejects these. */
8029 ++ccp;
8030 p = (char**) ccp;
8031 ccp = (char const *const *) p;
8032 { /* SCO 3.2v4 cc rejects this. */
8033 char *t;
8034 char const *s = 0 ? (char *) 0 : (char const *) 0;
8035
8036 *t++ = 0;
8037 }
8038 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8039 int x[] = {25, 17};
8040 const int *foo = &x[0];
8041 ++foo;
8042 }
8043 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8044 typedef const int *iptr;
8045 iptr p = 0;
8046 ++p;
8047 }
8048 { /* AIX XL C 1.02.0.0 rejects this saying
8049 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8050 struct s { int j; const int *ap[3]; };
8051 struct s *b; b->j = 5;
8052 }
8053 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8054 const int foo = 10;
8055 }
8056#endif
8057
8058 ;
8059 return 0;
8060}
8061_ACEOF
8062rm -f conftest.$ac_objext
c0d27fcc 8063if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8064 (eval $ac_compile) 2>conftest.er1
98418dba 8065 ac_status=$?
edfaf76d
LK
8066 grep -v '^ *+' conftest.er1 >conftest.err
8067 rm -f conftest.er1
8068 cat conftest.err >&5
c0d27fcc 8069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8070 (exit $ac_status); } &&
e143ad11
AS
8071 { ac_try='test -z "$ac_c_werror_flag"
8072 || test ! -s conftest.err'
edfaf76d
LK
8073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8074 (eval $ac_try) 2>&5
8075 ac_status=$?
8076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8077 (exit $ac_status); }; } &&
8078 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8080 (eval $ac_try) 2>&5
8081 ac_status=$?
c0d27fcc 8082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8083 (exit $ac_status); }; }; then
8084 ac_cv_c_const=yes
8085else
8086 echo "$as_me: failed program was:" >&5
19650fd6
AS
8087sed 's/^/| /' conftest.$ac_ext >&5
8088
98418dba
CW
8089ac_cv_c_const=no
8090fi
edfaf76d 8091rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8092fi
c0d27fcc 8093echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
8094echo "${ECHO_T}$ac_cv_c_const" >&6
8095if test $ac_cv_c_const = no; then
8096
c0d27fcc 8097cat >>confdefs.h <<\_ACEOF
98418dba 8098#define const
c0d27fcc 8099_ACEOF
98418dba
CW
8100
8101fi
8102
c0d27fcc 8103echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
8104echo $ECHO_N "checking for void * support... $ECHO_C" >&6
8105if test "${emacs_cv_void_star+set}" = set; then
8106 echo $ECHO_N "(cached) $ECHO_C" >&6
8107else
8108 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8109/* confdefs.h. */
8110_ACEOF
8111cat confdefs.h >>conftest.$ac_ext
8112cat >>conftest.$ac_ext <<_ACEOF
8113/* end confdefs.h. */
98418dba 8114
98418dba
CW
8115int
8116main ()
8117{
8118void * foo;
8119 ;
8120 return 0;
8121}
8122_ACEOF
8123rm -f conftest.$ac_objext
c0d27fcc 8124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8125 (eval $ac_compile) 2>conftest.er1
98418dba 8126 ac_status=$?
edfaf76d
LK
8127 grep -v '^ *+' conftest.er1 >conftest.err
8128 rm -f conftest.er1
8129 cat conftest.err >&5
c0d27fcc 8130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8131 (exit $ac_status); } &&
e143ad11
AS
8132 { ac_try='test -z "$ac_c_werror_flag"
8133 || test ! -s conftest.err'
edfaf76d
LK
8134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8135 (eval $ac_try) 2>&5
8136 ac_status=$?
8137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8138 (exit $ac_status); }; } &&
8139 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8141 (eval $ac_try) 2>&5
8142 ac_status=$?
c0d27fcc 8143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8144 (exit $ac_status); }; }; then
8145 emacs_cv_void_star=yes
8146else
8147 echo "$as_me: failed program was:" >&5
19650fd6
AS
8148sed 's/^/| /' conftest.$ac_ext >&5
8149
98418dba
CW
8150emacs_cv_void_star=no
8151fi
edfaf76d 8152rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8153fi
c0d27fcc 8154echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
8155echo "${ECHO_T}$emacs_cv_void_star" >&6
8156if test $emacs_cv_void_star = yes; then
c0d27fcc 8157 cat >>confdefs.h <<\_ACEOF
98418dba 8158#define POINTER_TYPE void
c0d27fcc 8159_ACEOF
98418dba
CW
8160
8161else
c0d27fcc 8162 cat >>confdefs.h <<\_ACEOF
98418dba 8163#define POINTER_TYPE char
c0d27fcc 8164_ACEOF
98418dba
CW
8165
8166fi
8167
c0d27fcc 8168
4494a266
JD
8169
8170
cd958eb3 8171
19650fd6
AS
8172echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8173echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
edfaf76d 8174set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
98418dba
CW
8175if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
8176 echo $ECHO_N "(cached) $ECHO_C" >&6
8177else
c0d27fcc 8178 cat >conftest.make <<\_ACEOF
98418dba 8179all:
19650fd6 8180 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 8181_ACEOF
98418dba
CW
8182# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8183eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
8184if test -n "$ac_maketemp"; then
8185 eval ac_cv_prog_make_${ac_make}_set=yes
8186else
8187 eval ac_cv_prog_make_${ac_make}_set=no
8188fi
8189rm -f conftest.make
8190fi
8191if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 8192 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
8193echo "${ECHO_T}yes" >&6
8194 SET_MAKE=
8195else
c0d27fcc 8196 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
8197echo "${ECHO_T}no" >&6
8198 SET_MAKE="MAKE=${MAKE-make}"
8199fi
8200
c0d27fcc
MR
8201
8202echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
8203echo $ECHO_N "checking for long file names... $ECHO_C" >&6
8204if test "${ac_cv_sys_long_file_names+set}" = set; then
8205 echo $ECHO_N "(cached) $ECHO_C" >&6
8206else
8207 ac_cv_sys_long_file_names=yes
8208# Test for long file names in all the places we know might matter:
8209# . the current directory, where building will happen
8210# $prefix/lib where we will be installing things
8211# $exec_prefix/lib likewise
8212# eval it to expand exec_prefix.
8213# $TMPDIR if set, where it might want to write temporary files
8214# if $TMPDIR is not set:
8215# /tmp where it might want to write temporary files
8216# /var/tmp likewise
8217# /usr/tmp likewise
8218if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
8219 ac_tmpdirs=$TMPDIR
8220else
8221 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
8222fi
8223for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
8224 test -d $ac_dir || continue
8225 test -w $ac_dir || continue # It is less confusing to not echo anything here.
8226 ac_xdir=$ac_dir/cf$$
8227 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
8228 ac_tf1=$ac_xdir/conftest9012345
8229 ac_tf2=$ac_xdir/conftest9012346
8230 (echo 1 >$ac_tf1) 2>/dev/null
8231 (echo 2 >$ac_tf2) 2>/dev/null
8232 ac_val=`cat $ac_tf1 2>/dev/null`
8233 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
8234 ac_cv_sys_long_file_names=no
8235 rm -rf $ac_xdir 2>/dev/null
8236 break
8237 fi
8238 rm -rf $ac_xdir 2>/dev/null
8239done
8240fi
c0d27fcc 8241echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
8242echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
8243if test $ac_cv_sys_long_file_names = yes; then
8244
c0d27fcc 8245cat >>confdefs.h <<\_ACEOF
98418dba 8246#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8247_ACEOF
98418dba
CW
8248
8249fi
8250
c0d27fcc 8251
98418dba
CW
8252#### Choose a window system.
8253
c0d27fcc 8254echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
8255echo $ECHO_N "checking for X... $ECHO_C" >&6
8256
c0d27fcc 8257
98418dba
CW
8258# Check whether --with-x or --without-x was given.
8259if test "${with_x+set}" = set; then
8260 withval="$with_x"
8261
8262fi;
8263# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8264if test "x$with_x" = xno; then
8265 # The user explicitly disabled X.
8266 have_x=disabled
8267else
8268 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8269 # Both variables are already set.
8270 have_x=yes
8271 else
8272 if test "${ac_cv_have_x+set}" = set; then
8273 echo $ECHO_N "(cached) $ECHO_C" >&6
8274else
8275 # One or both of the vars are not set, and there is no cached value.
8276ac_x_includes=no ac_x_libraries=no
8277rm -fr conftest.dir
8278if mkdir conftest.dir; then
8279 cd conftest.dir
8280 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 8281 cat >Imakefile <<'_ACEOF'
98418dba
CW
8282acfindx:
8283 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 8284_ACEOF
98418dba
CW
8285 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8286 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8287 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8288 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8289 for ac_extension in a so sl; do
8290 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
edfaf76d
LK
8291 test -f $ac_im_libdir/libX11.$ac_extension; then
8292 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8293 fi
8294 done
8295 # Screen out bogus values from the imake configuration. They are
8296 # bogus both because they are the default anyway, and because
8297 # using them would break gcc on systems where it needs fixed includes.
8298 case $ac_im_incroot in
8299 /usr/include) ;;
8300 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8301 esac
8302 case $ac_im_usrlibdir in
8303 /usr/lib | /lib) ;;
8304 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8305 esac
8306 fi
8307 cd ..
8308 rm -fr conftest.dir
8309fi
8310
8311# Standard set of common directories for X headers.
8312# Check X11 before X11Rn because it is often a symlink to the current release.
8313ac_x_header_dirs='
8314/usr/X11/include
8315/usr/X11R6/include
8316/usr/X11R5/include
8317/usr/X11R4/include
8318
8319/usr/include/X11
8320/usr/include/X11R6
8321/usr/include/X11R5
8322/usr/include/X11R4
8323
8324/usr/local/X11/include
8325/usr/local/X11R6/include
8326/usr/local/X11R5/include
8327/usr/local/X11R4/include
8328
8329/usr/local/include/X11
8330/usr/local/include/X11R6
8331/usr/local/include/X11R5
8332/usr/local/include/X11R4
8333
8334/usr/X386/include
8335/usr/x386/include
8336/usr/XFree86/include/X11
8337
8338/usr/include
8339/usr/local/include
8340/usr/unsupported/include
8341/usr/athena/include
8342/usr/local/x11r5/include
8343/usr/lpp/Xamples/include
8344
8345/usr/openwin/include
8346/usr/openwin/share/include'
8347
8348if test "$ac_x_includes" = no; then
e143ad11 8349 # Guess where to find include files, by looking for Intrinsic.h.
98418dba
CW
8350 # First, try using that file with no special directory specified.
8351 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8352/* confdefs.h. */
8353_ACEOF
8354cat confdefs.h >>conftest.$ac_ext
8355cat >>conftest.$ac_ext <<_ACEOF
8356/* end confdefs.h. */
01abe918 8357#include <X11/Intrinsic.h>
98418dba 8358_ACEOF
c0d27fcc 8359if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8360 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8361 ac_status=$?
6bae0ccf 8362 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8363 rm -f conftest.er1
8364 cat conftest.err >&5
c0d27fcc 8365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8366 (exit $ac_status); } >/dev/null; then
8367 if test -s conftest.err; then
8368 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 8369 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8370 else
8371 ac_cpp_err=
8372 fi
8373else
8374 ac_cpp_err=yes
8375fi
8376if test -z "$ac_cpp_err"; then
8377 # We can compile using X headers with no special include directory.
8378ac_x_includes=
8379else
8380 echo "$as_me: failed program was:" >&5
19650fd6
AS
8381sed 's/^/| /' conftest.$ac_ext >&5
8382
98418dba 8383 for ac_dir in $ac_x_header_dirs; do
01abe918 8384 if test -r "$ac_dir/X11/Intrinsic.h"; then
98418dba
CW
8385 ac_x_includes=$ac_dir
8386 break
8387 fi
8388done
8389fi
8390rm -f conftest.err conftest.$ac_ext
8391fi # $ac_x_includes = no
8392
8393if test "$ac_x_libraries" = no; then
8394 # Check for the libraries.
8395 # See if we find them without any special options.
8396 # Don't add to $LIBS permanently.
8397 ac_save_LIBS=$LIBS
01abe918 8398 LIBS="-lXt $LIBS"
98418dba 8399 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8400/* confdefs.h. */
8401_ACEOF
8402cat confdefs.h >>conftest.$ac_ext
8403cat >>conftest.$ac_ext <<_ACEOF
8404/* end confdefs.h. */
01abe918 8405#include <X11/Intrinsic.h>
98418dba
CW
8406int
8407main ()
8408{
01abe918 8409XtMalloc (0)
98418dba
CW
8410 ;
8411 return 0;
8412}
8413_ACEOF
8414rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8416 (eval $ac_link) 2>conftest.er1
98418dba 8417 ac_status=$?
edfaf76d
LK
8418 grep -v '^ *+' conftest.er1 >conftest.err
8419 rm -f conftest.er1
8420 cat conftest.err >&5
c0d27fcc 8421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8422 (exit $ac_status); } &&
e143ad11
AS
8423 { ac_try='test -z "$ac_c_werror_flag"
8424 || test ! -s conftest.err'
edfaf76d
LK
8425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8426 (eval $ac_try) 2>&5
8427 ac_status=$?
8428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8429 (exit $ac_status); }; } &&
8430 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8432 (eval $ac_try) 2>&5
8433 ac_status=$?
c0d27fcc 8434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8435 (exit $ac_status); }; }; then
8436 LIBS=$ac_save_LIBS
8437# We can link X programs with no special library path.
8438ac_x_libraries=
8439else
8440 echo "$as_me: failed program was:" >&5
19650fd6
AS
8441sed 's/^/| /' conftest.$ac_ext >&5
8442
98418dba
CW
8443LIBS=$ac_save_LIBS
8444for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8445do
8446 # Don't even attempt the hair of trying to link an X program!
8447 for ac_extension in a so sl; do
01abe918 8448 if test -r $ac_dir/libXt.$ac_extension; then
98418dba
CW
8449 ac_x_libraries=$ac_dir
8450 break 2
8451 fi
8452 done
8453done
8454fi
edfaf76d
LK
8455rm -f conftest.err conftest.$ac_objext \
8456 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8457fi # $ac_x_libraries = no
8458
8459if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8460 # Didn't find X anywhere. Cache the known absence of X.
8461 ac_cv_have_x="have_x=no"
8462else
8463 # Record where we found X for the cache.
8464 ac_cv_have_x="have_x=yes \
edfaf76d 8465 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
98418dba
CW
8466fi
8467fi
8468
8469 fi
8470 eval "$ac_cv_have_x"
8471fi # $with_x != no
8472
8473if test "$have_x" != yes; then
c0d27fcc 8474 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
8475echo "${ECHO_T}$have_x" >&6
8476 no_x=yes
8477else
8478 # If each of the values was on the command line, it overrides each guess.
8479 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8480 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8481 # Update the cache value to reflect the command line values.
8482 ac_cv_have_x="have_x=yes \
8483 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
e143ad11
AS
8484 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
8485echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
98418dba
CW
8486fi
8487
8488if test "$no_x" = yes; then
8489 window_system=none
8490else
8491 window_system=x11
8492fi
8493
8494if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8495 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
8496 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
8497 x_default_search_path=""
8498 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
8499 x_search_path="\
8500${x_library}/X11/%L/%T/%N%C%S:\
8501${x_library}/X11/%l/%T/%N%C%S:\
8502${x_library}/X11/%T/%N%C%S:\
8503${x_library}/X11/%L/%T/%N%S:\
8504${x_library}/X11/%l/%T/%N%S:\
8505${x_library}/X11/%T/%N%S"
8506 if test x"${x_default_search_path}" = x; then
8507 x_default_search_path=${x_search_path}
8508 else
8509 x_default_search_path="${x_search_path}:${x_default_search_path}"
8510 fi
8511 done
8512fi
8513if test "${x_includes}" != NONE && test -n "${x_includes}"; then
8514 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
8515fi
8516
8517if test x"${x_includes}" = x; then
8518 bitmapdir=/usr/include/X11/bitmaps
8519else
8520 # accumulate include directories that have X11 bitmap subdirectories
8521 bmd_acc="dummyval"
8522 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
8523 if test -d "${bmd}/X11/bitmaps"; then
8524 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
8525 fi
8526 if test -d "${bmd}/bitmaps"; then
8527 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
8528 fi
8529 done
8530 if test ${bmd_acc} != "dummyval"; then
8531 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
8532 fi
8533fi
8534
5d6da11e 8535HAVE_CARBON=no
1d4d5604
YM
8536if test "${with_carbon}" != no; then
8537 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
5d6da11e
YM
8538 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
8539echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
8540if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8541 echo $ECHO_N "(cached) $ECHO_C" >&6
8542fi
8543echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
8544echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
8545else
8546 # Is the header compilable?
8547echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
8548echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
8549cat >conftest.$ac_ext <<_ACEOF
8550/* confdefs.h. */
8551_ACEOF
8552cat confdefs.h >>conftest.$ac_ext
8553cat >>conftest.$ac_ext <<_ACEOF
8554/* end confdefs.h. */
8555$ac_includes_default
8556#include <Carbon/Carbon.h>
8557_ACEOF
8558rm -f conftest.$ac_objext
8559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8560 (eval $ac_compile) 2>conftest.er1
5d6da11e 8561 ac_status=$?
edfaf76d
LK
8562 grep -v '^ *+' conftest.er1 >conftest.err
8563 rm -f conftest.er1
8564 cat conftest.err >&5
5d6da11e
YM
8565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8566 (exit $ac_status); } &&
e143ad11
AS
8567 { ac_try='test -z "$ac_c_werror_flag"
8568 || test ! -s conftest.err'
edfaf76d
LK
8569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8570 (eval $ac_try) 2>&5
8571 ac_status=$?
8572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8573 (exit $ac_status); }; } &&
8574 { ac_try='test -s conftest.$ac_objext'
5d6da11e
YM
8575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8576 (eval $ac_try) 2>&5
8577 ac_status=$?
8578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8579 (exit $ac_status); }; }; then
8580 ac_header_compiler=yes
8581else
8582 echo "$as_me: failed program was:" >&5
8583sed 's/^/| /' conftest.$ac_ext >&5
8584
8585ac_header_compiler=no
8586fi
edfaf76d 8587rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5d6da11e
YM
8588echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8589echo "${ECHO_T}$ac_header_compiler" >&6
8590
8591# Is the header present?
8592echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
8593echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
8594cat >conftest.$ac_ext <<_ACEOF
8595/* confdefs.h. */
8596_ACEOF
8597cat confdefs.h >>conftest.$ac_ext
8598cat >>conftest.$ac_ext <<_ACEOF
8599/* end confdefs.h. */
8600#include <Carbon/Carbon.h>
8601_ACEOF
8602if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8603 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8604 ac_status=$?
8605 grep -v '^ *+' conftest.er1 >conftest.err
8606 rm -f conftest.er1
8607 cat conftest.err >&5
8608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8609 (exit $ac_status); } >/dev/null; then
8610 if test -s conftest.err; then
8611 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 8612 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5d6da11e
YM
8613 else
8614 ac_cpp_err=
8615 fi
8616else
8617 ac_cpp_err=yes
8618fi
8619if test -z "$ac_cpp_err"; then
8620 ac_header_preproc=yes
8621else
8622 echo "$as_me: failed program was:" >&5
8623sed 's/^/| /' conftest.$ac_ext >&5
8624
8625 ac_header_preproc=no
8626fi
8627rm -f conftest.err conftest.$ac_ext
8628echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8629echo "${ECHO_T}$ac_header_preproc" >&6
8630
8631# So? What about this header?
edfaf76d
LK
8632case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8633 yes:no: )
5d6da11e
YM
8634 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
8635echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
8636 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
8637echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
8638 ac_header_preproc=yes
5d6da11e 8639 ;;
edfaf76d 8640 no:yes:* )
5d6da11e
YM
8641 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
8642echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
8643 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
8644echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
8645 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
8646echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
8647 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
8648echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
8649 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
8650echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
8651 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
8652echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
5d6da11e
YM
8653 (
8654 cat <<\_ASBOX
edfaf76d
LK
8655## ------------------------------------------ ##
8656## Report this to the AC_PACKAGE_NAME lists. ##
8657## ------------------------------------------ ##
5d6da11e
YM
8658_ASBOX
8659 ) |
8660 sed "s/^/$as_me: WARNING: /" >&2
8661 ;;
8662esac
8663echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
8664echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
8665if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8666 echo $ECHO_N "(cached) $ECHO_C" >&6
8667else
8668 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
8669fi
8670echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
8671echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
8672
8673fi
8674if test $ac_cv_header_Carbon_Carbon_h = yes; then
8675 HAVE_CARBON=yes
8676fi
8677
8678
1d4d5604
YM
8679fi
8680if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
8681 if test "${with_carbon+set}" != set \
8682 && test "${carbon_appdir_x+set}" != set; then
8683 HAVE_CARBON=no
5d6da11e
YM
8684 fi
8685fi
1d4d5604
YM
8686if test "${HAVE_CARBON}" = yes; then
8687 window_system=mac
8688fi
8689
8690case "${window_system}" in
8691 x11 )
8692 HAVE_X_WINDOWS=yes
8693 HAVE_X11=yes
8694 case "${with_x_toolkit}" in
8695 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
8696 motif ) USE_X_TOOLKIT=MOTIF ;;
8697 gtk ) with_gtk=yes
8698 USE_X_TOOLKIT=none ;;
8699 no ) USE_X_TOOLKIT=none ;;
8700 * ) USE_X_TOOLKIT=maybe ;;
8701 esac
8702 ;;
8703 mac | none )
8704 HAVE_X_WINDOWS=no
8705 HAVE_X11=no
8706 USE_X_TOOLKIT=none
8707 ;;
8708esac
8709
8710### If we're using X11, we should use the X menu package.
8711HAVE_MENUS=no
8712case ${HAVE_X11} in
8713 yes ) HAVE_MENUS=yes ;;
8714esac
8715
8716if test "${opsys}" = "hpux9"; then
8717 case "${x_libraries}" in
8718 *X11R4* )
8719 opsysfile="s/hpux9-x11r4.h"
8720 ;;
8721 esac
8722fi
8723
8724if test "${opsys}" = "hpux9shr"; then
8725 case "${x_libraries}" in
8726 *X11R4* )
8727 opsysfile="s/hpux9shxr4.h"
8728 ;;
8729 esac
8730fi
5d6da11e 8731
98418dba
CW
8732### Compute the unexec source name from the object name.
8733UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
8734
8735# Do the opsystem or machine files prohibit the use of the GNU malloc?
8736# Assume not, until told otherwise.
8737GNU_MALLOC=yes
8738doug_lea_malloc=yes
c0d27fcc 8739echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
8740echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
8741if test "${ac_cv_func_malloc_get_state+set}" = set; then
8742 echo $ECHO_N "(cached) $ECHO_C" >&6
8743else
8744 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8745/* confdefs.h. */
8746_ACEOF
8747cat confdefs.h >>conftest.$ac_ext
8748cat >>conftest.$ac_ext <<_ACEOF
8749/* end confdefs.h. */
edfaf76d
LK
8750/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
8751 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8752#define malloc_get_state innocuous_malloc_get_state
8753
98418dba 8754/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8755 which can conflict with char malloc_get_state (); below.
8756 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8757 <limits.h> exists even on freestanding compilers. */
edfaf76d 8758
19650fd6
AS
8759#ifdef __STDC__
8760# include <limits.h>
8761#else
8762# include <assert.h>
8763#endif
edfaf76d
LK
8764
8765#undef malloc_get_state
8766
98418dba
CW
8767/* Override any gcc2 internal prototype to avoid an error. */
8768#ifdef __cplusplus
8769extern "C"
19650fd6 8770{
98418dba
CW
8771#endif
8772/* We use char because int might match the return type of a gcc2
8773 builtin and then its argument prototype would still apply. */
8774char malloc_get_state ();
98418dba
CW
8775/* The GNU C library defines this for functions which it implements
8776 to always fail with ENOSYS. Some functions are actually named
8777 something starting with __ and the normal name is an alias. */
8778#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
8779choke me
8780#else
19650fd6
AS
8781char (*f) () = malloc_get_state;
8782#endif
8783#ifdef __cplusplus
8784}
98418dba
CW
8785#endif
8786
19650fd6
AS
8787int
8788main ()
8789{
8790return f != malloc_get_state;
98418dba
CW
8791 ;
8792 return 0;
8793}
8794_ACEOF
8795rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8796if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8797 (eval $ac_link) 2>conftest.er1
98418dba 8798 ac_status=$?
edfaf76d
LK
8799 grep -v '^ *+' conftest.er1 >conftest.err
8800 rm -f conftest.er1
8801 cat conftest.err >&5
c0d27fcc 8802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8803 (exit $ac_status); } &&
e143ad11
AS
8804 { ac_try='test -z "$ac_c_werror_flag"
8805 || test ! -s conftest.err'
edfaf76d
LK
8806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8807 (eval $ac_try) 2>&5
8808 ac_status=$?
8809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8810 (exit $ac_status); }; } &&
8811 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8813 (eval $ac_try) 2>&5
8814 ac_status=$?
c0d27fcc 8815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8816 (exit $ac_status); }; }; then
8817 ac_cv_func_malloc_get_state=yes
8818else
8819 echo "$as_me: failed program was:" >&5
19650fd6
AS
8820sed 's/^/| /' conftest.$ac_ext >&5
8821
98418dba
CW
8822ac_cv_func_malloc_get_state=no
8823fi
edfaf76d
LK
8824rm -f conftest.err conftest.$ac_objext \
8825 conftest$ac_exeext conftest.$ac_ext
98418dba 8826fi
c0d27fcc 8827echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
8828echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
8829if test $ac_cv_func_malloc_get_state = yes; then
8830 :
8831else
8832 doug_lea_malloc=no
8833fi
8834
c0d27fcc 8835echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
8836echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
8837if test "${ac_cv_func_malloc_set_state+set}" = set; then
8838 echo $ECHO_N "(cached) $ECHO_C" >&6
8839else
8840 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8841/* confdefs.h. */
8842_ACEOF
8843cat confdefs.h >>conftest.$ac_ext
8844cat >>conftest.$ac_ext <<_ACEOF
8845/* end confdefs.h. */
edfaf76d
LK
8846/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
8847 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8848#define malloc_set_state innocuous_malloc_set_state
8849
98418dba 8850/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8851 which can conflict with char malloc_set_state (); below.
8852 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8853 <limits.h> exists even on freestanding compilers. */
edfaf76d 8854
19650fd6
AS
8855#ifdef __STDC__
8856# include <limits.h>
8857#else
8858# include <assert.h>
8859#endif
edfaf76d
LK
8860
8861#undef malloc_set_state
8862
98418dba
CW
8863/* Override any gcc2 internal prototype to avoid an error. */
8864#ifdef __cplusplus
8865extern "C"
19650fd6 8866{
98418dba
CW
8867#endif
8868/* We use char because int might match the return type of a gcc2
8869 builtin and then its argument prototype would still apply. */
8870char malloc_set_state ();
98418dba
CW
8871/* The GNU C library defines this for functions which it implements
8872 to always fail with ENOSYS. Some functions are actually named
8873 something starting with __ and the normal name is an alias. */
8874#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
8875choke me
8876#else
19650fd6
AS
8877char (*f) () = malloc_set_state;
8878#endif
8879#ifdef __cplusplus
8880}
98418dba
CW
8881#endif
8882
19650fd6
AS
8883int
8884main ()
8885{
8886return f != malloc_set_state;
98418dba
CW
8887 ;
8888 return 0;
8889}
8890_ACEOF
8891rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8892if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8893 (eval $ac_link) 2>conftest.er1
98418dba 8894 ac_status=$?
edfaf76d
LK
8895 grep -v '^ *+' conftest.er1 >conftest.err
8896 rm -f conftest.er1
8897 cat conftest.err >&5
c0d27fcc 8898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8899 (exit $ac_status); } &&
e143ad11
AS
8900 { ac_try='test -z "$ac_c_werror_flag"
8901 || test ! -s conftest.err'
edfaf76d
LK
8902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8903 (eval $ac_try) 2>&5
8904 ac_status=$?
8905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8906 (exit $ac_status); }; } &&
8907 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8909 (eval $ac_try) 2>&5
8910 ac_status=$?
c0d27fcc 8911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8912 (exit $ac_status); }; }; then
8913 ac_cv_func_malloc_set_state=yes
8914else
8915 echo "$as_me: failed program was:" >&5
19650fd6
AS
8916sed 's/^/| /' conftest.$ac_ext >&5
8917
98418dba
CW
8918ac_cv_func_malloc_set_state=no
8919fi
edfaf76d
LK
8920rm -f conftest.err conftest.$ac_objext \
8921 conftest$ac_exeext conftest.$ac_ext
98418dba 8922fi
c0d27fcc 8923echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
8924echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
8925if test $ac_cv_func_malloc_set_state = yes; then
8926 :
8927else
8928 doug_lea_malloc=no
8929fi
8930
c0d27fcc 8931echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
8932echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
8933if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
8934 echo $ECHO_N "(cached) $ECHO_C" >&6
8935else
8936 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8937/* confdefs.h. */
8938_ACEOF
8939cat confdefs.h >>conftest.$ac_ext
8940cat >>conftest.$ac_ext <<_ACEOF
8941/* end confdefs.h. */
98418dba 8942extern void (* __after_morecore_hook)();
98418dba
CW
8943int
8944main ()
8945{
8946__after_morecore_hook = 0
8947 ;
8948 return 0;
8949}
8950_ACEOF
8951rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8952if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8953 (eval $ac_link) 2>conftest.er1
98418dba 8954 ac_status=$?
edfaf76d
LK
8955 grep -v '^ *+' conftest.er1 >conftest.err
8956 rm -f conftest.er1
8957 cat conftest.err >&5
c0d27fcc 8958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8959 (exit $ac_status); } &&
e143ad11
AS
8960 { ac_try='test -z "$ac_c_werror_flag"
8961 || test ! -s conftest.err'
edfaf76d
LK
8962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8963 (eval $ac_try) 2>&5
8964 ac_status=$?
8965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8966 (exit $ac_status); }; } &&
8967 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8969 (eval $ac_try) 2>&5
8970 ac_status=$?
c0d27fcc 8971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8972 (exit $ac_status); }; }; then
8973 emacs_cv_var___after_morecore_hook=yes
8974else
8975 echo "$as_me: failed program was:" >&5
19650fd6
AS
8976sed 's/^/| /' conftest.$ac_ext >&5
8977
98418dba
CW
8978emacs_cv_var___after_morecore_hook=no
8979fi
edfaf76d
LK
8980rm -f conftest.err conftest.$ac_objext \
8981 conftest$ac_exeext conftest.$ac_ext
98418dba 8982fi
c0d27fcc 8983echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
8984echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
8985if test $emacs_cv_var___after_morecore_hook = no; then
8986 doug_lea_malloc=no
8987fi
8988if test "${system_malloc}" = "yes"; then
8989 GNU_MALLOC=no
8990 GNU_MALLOC_reason="
8991 (The GNU allocators don't work with this system configuration.)"
8992fi
8993if test "$doug_lea_malloc" = "yes" ; then
8994 if test "$GNU_MALLOC" = yes ; then
8995 GNU_MALLOC_reason="
8996 (Using Doug Lea's new malloc from the GNU C Library.)"
8997 fi
b936fae4 8998
c0d27fcc 8999cat >>confdefs.h <<\_ACEOF
98418dba 9000#define DOUG_LEA_MALLOC 1
c0d27fcc 9001_ACEOF
98418dba
CW
9002
9003fi
9004
9005if test x"${REL_ALLOC}" = x; then
9006 REL_ALLOC=${GNU_MALLOC}
9007fi
9008
9009
c0d27fcc
MR
9010
9011
9012for ac_header in stdlib.h unistd.h
98418dba
CW
9013do
9014as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
9015if eval "test \"\${$as_ac_Header+set}\" = set"; then
9016 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
9017echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9018if eval "test \"\${$as_ac_Header+set}\" = set"; then
9019 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9020fi
9021echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9022echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 9023else
c0d27fcc
MR
9024 # Is the header compilable?
9025echo "$as_me:$LINENO: checking $ac_header usability" >&5
9026echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9027cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9028/* confdefs.h. */
9029_ACEOF
9030cat confdefs.h >>conftest.$ac_ext
9031cat >>conftest.$ac_ext <<_ACEOF
9032/* end confdefs.h. */
98418dba
CW
9033$ac_includes_default
9034#include <$ac_header>
9035_ACEOF
9036rm -f conftest.$ac_objext
c0d27fcc 9037if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 9038 (eval $ac_compile) 2>conftest.er1
98418dba 9039 ac_status=$?
edfaf76d
LK
9040 grep -v '^ *+' conftest.er1 >conftest.err
9041 rm -f conftest.er1
9042 cat conftest.err >&5
c0d27fcc 9043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9044 (exit $ac_status); } &&
e143ad11
AS
9045 { ac_try='test -z "$ac_c_werror_flag"
9046 || test ! -s conftest.err'
edfaf76d
LK
9047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9048 (eval $ac_try) 2>&5
9049 ac_status=$?
9050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9051 (exit $ac_status); }; } &&
9052 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 9053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9054 (eval $ac_try) 2>&5
9055 ac_status=$?
c0d27fcc 9056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9057 (exit $ac_status); }; }; then
c0d27fcc 9058 ac_header_compiler=yes
98418dba
CW
9059else
9060 echo "$as_me: failed program was:" >&5
19650fd6
AS
9061sed 's/^/| /' conftest.$ac_ext >&5
9062
c0d27fcc 9063ac_header_compiler=no
98418dba 9064fi
edfaf76d 9065rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
9066echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9067echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 9068
c0d27fcc
MR
9069# Is the header present?
9070echo "$as_me:$LINENO: checking $ac_header presence" >&5
9071echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9072cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9073/* confdefs.h. */
9074_ACEOF
9075cat confdefs.h >>conftest.$ac_ext
9076cat >>conftest.$ac_ext <<_ACEOF
9077/* end confdefs.h. */
98418dba
CW
9078#include <$ac_header>
9079_ACEOF
c0d27fcc 9080if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9081 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9082 ac_status=$?
6bae0ccf 9083 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9084 rm -f conftest.er1
9085 cat conftest.err >&5
c0d27fcc 9086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9087 (exit $ac_status); } >/dev/null; then
9088 if test -s conftest.err; then
9089 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 9090 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
9091 else
9092 ac_cpp_err=
9093 fi
9094else
9095 ac_cpp_err=yes
9096fi
9097if test -z "$ac_cpp_err"; then
c0d27fcc 9098 ac_header_preproc=yes
98418dba
CW
9099else
9100 echo "$as_me: failed program was:" >&5
19650fd6
AS
9101sed 's/^/| /' conftest.$ac_ext >&5
9102
c0d27fcc 9103 ac_header_preproc=no
98418dba
CW
9104fi
9105rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9106echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9107echo "${ECHO_T}$ac_header_preproc" >&6
9108
9109# So? What about this header?
edfaf76d
LK
9110case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9111 yes:no: )
c0d27fcc
MR
9112 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9113echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9114 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9115echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9116 ac_header_preproc=yes
9117 ;;
9118 no:yes:* )
9119 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9120echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9121 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9122echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9123 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9124echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9125 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9126echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9127 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9128echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9129 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9130echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7c9e5167
JD
9131 (
9132 cat <<\_ASBOX
edfaf76d
LK
9133## ------------------------------------------ ##
9134## Report this to the AC_PACKAGE_NAME lists. ##
9135## ------------------------------------------ ##
19650fd6
AS
9136_ASBOX
9137 ) |
9138 sed "s/^/$as_me: WARNING: /" >&2
9139 ;;
c0d27fcc
MR
9140esac
9141echo "$as_me:$LINENO: checking for $ac_header" >&5
9142echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9143if eval "test \"\${$as_ac_Header+set}\" = set"; then
9144 echo $ECHO_N "(cached) $ECHO_C" >&6
9145else
edfaf76d 9146 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9147fi
c0d27fcc 9148echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 9149echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
9150
9151fi
98418dba 9152if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9153 cat >>confdefs.h <<_ACEOF
98418dba 9154#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9155_ACEOF
98418dba
CW
9156
9157fi
c0d27fcc 9158
98418dba
CW
9159done
9160
c0d27fcc 9161
98418dba
CW
9162for ac_func in getpagesize
9163do
9164as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 9165echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
9166echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9167if eval "test \"\${$as_ac_var+set}\" = set"; then
9168 echo $ECHO_N "(cached) $ECHO_C" >&6
9169else
9170 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9171/* confdefs.h. */
9172_ACEOF
9173cat confdefs.h >>conftest.$ac_ext
9174cat >>conftest.$ac_ext <<_ACEOF
9175/* end confdefs.h. */
edfaf76d
LK
9176/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9177 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9178#define $ac_func innocuous_$ac_func
9179
98418dba 9180/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9181 which can conflict with char $ac_func (); below.
9182 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9183 <limits.h> exists even on freestanding compilers. */
edfaf76d 9184
19650fd6
AS
9185#ifdef __STDC__
9186# include <limits.h>
9187#else
9188# include <assert.h>
9189#endif
edfaf76d
LK
9190
9191#undef $ac_func
9192
98418dba
CW
9193/* Override any gcc2 internal prototype to avoid an error. */
9194#ifdef __cplusplus
9195extern "C"
19650fd6 9196{
98418dba
CW
9197#endif
9198/* We use char because int might match the return type of a gcc2
9199 builtin and then its argument prototype would still apply. */
9200char $ac_func ();
98418dba
CW
9201/* The GNU C library defines this for functions which it implements
9202 to always fail with ENOSYS. Some functions are actually named
9203 something starting with __ and the normal name is an alias. */
9204#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9205choke me
9206#else
19650fd6
AS
9207char (*f) () = $ac_func;
9208#endif
9209#ifdef __cplusplus
9210}
98418dba
CW
9211#endif
9212
19650fd6
AS
9213int
9214main ()
9215{
9216return f != $ac_func;
98418dba
CW
9217 ;
9218 return 0;
9219}
9220_ACEOF
9221rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9222if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9223 (eval $ac_link) 2>conftest.er1
98418dba 9224 ac_status=$?
edfaf76d
LK
9225 grep -v '^ *+' conftest.er1 >conftest.err
9226 rm -f conftest.er1
9227 cat conftest.err >&5
c0d27fcc 9228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9229 (exit $ac_status); } &&
e143ad11
AS
9230 { ac_try='test -z "$ac_c_werror_flag"
9231 || test ! -s conftest.err'
edfaf76d
LK
9232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9233 (eval $ac_try) 2>&5
9234 ac_status=$?
9235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9236 (exit $ac_status); }; } &&
9237 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9239 (eval $ac_try) 2>&5
9240 ac_status=$?
c0d27fcc 9241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9242 (exit $ac_status); }; }; then
9243 eval "$as_ac_var=yes"
9244else
9245 echo "$as_me: failed program was:" >&5
19650fd6
AS
9246sed 's/^/| /' conftest.$ac_ext >&5
9247
98418dba
CW
9248eval "$as_ac_var=no"
9249fi
edfaf76d
LK
9250rm -f conftest.err conftest.$ac_objext \
9251 conftest$ac_exeext conftest.$ac_ext
98418dba 9252fi
c0d27fcc 9253echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
9254echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9255if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9256 cat >>confdefs.h <<_ACEOF
98418dba 9257#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9258_ACEOF
98418dba
CW
9259
9260fi
9261done
9262
c0d27fcc 9263echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
9264echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
9265if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9266 echo $ECHO_N "(cached) $ECHO_C" >&6
9267else
9268 if test "$cross_compiling" = yes; then
9269 ac_cv_func_mmap_fixed_mapped=no
9270else
9271 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9272/* confdefs.h. */
9273_ACEOF
9274cat confdefs.h >>conftest.$ac_ext
9275cat >>conftest.$ac_ext <<_ACEOF
9276/* end confdefs.h. */
98418dba 9277$ac_includes_default
c0d27fcc
MR
9278/* malloc might have been renamed as rpl_malloc. */
9279#undef malloc
9280
98418dba
CW
9281/* Thanks to Mike Haertel and Jim Avera for this test.
9282 Here is a matrix of mmap possibilities:
9283 mmap private not fixed
9284 mmap private fixed at somewhere currently unmapped
9285 mmap private fixed at somewhere already mapped
9286 mmap shared not fixed
9287 mmap shared fixed at somewhere currently unmapped
9288 mmap shared fixed at somewhere already mapped
9289 For private mappings, we should verify that changes cannot be read()
9290 back from the file, nor mmap's back from the file at a different
9291 address. (There have been systems where private was not correctly
9292 implemented like the infamous i386 svr4.0, and systems where the
9293 VM page cache was not coherent with the file system buffer cache
9294 like early versions of FreeBSD and possibly contemporary NetBSD.)
9295 For shared mappings, we should conversely verify that changes get
c0d27fcc 9296 propagated back to all the places they're supposed to be.
98418dba
CW
9297
9298 Grep wants private fixed already mapped.
9299 The main things grep needs to know about mmap are:
9300 * does it exist and is it safe to write into the mmap'd area
9301 * how to use it (BSD variants) */
9302
9303#include <fcntl.h>
9304#include <sys/mman.h>
9305
9306#if !STDC_HEADERS && !HAVE_STDLIB_H
9307char *malloc ();
9308#endif
9309
9310/* This mess was copied from the GNU getpagesize.h. */
9311#if !HAVE_GETPAGESIZE
9312/* Assume that all systems that can run configure have sys/param.h. */
9313# if !HAVE_SYS_PARAM_H
9314# define HAVE_SYS_PARAM_H 1
9315# endif
9316
9317# ifdef _SC_PAGESIZE
9318# define getpagesize() sysconf(_SC_PAGESIZE)
9319# else /* no _SC_PAGESIZE */
9320# if HAVE_SYS_PARAM_H
9321# include <sys/param.h>
9322# ifdef EXEC_PAGESIZE
9323# define getpagesize() EXEC_PAGESIZE
9324# else /* no EXEC_PAGESIZE */
9325# ifdef NBPG
9326# define getpagesize() NBPG * CLSIZE
9327# ifndef CLSIZE
9328# define CLSIZE 1
9329# endif /* no CLSIZE */
9330# else /* no NBPG */
9331# ifdef NBPC
9332# define getpagesize() NBPC
9333# else /* no NBPC */
9334# ifdef PAGESIZE
9335# define getpagesize() PAGESIZE
9336# endif /* PAGESIZE */
9337# endif /* no NBPC */
9338# endif /* no NBPG */
9339# endif /* no EXEC_PAGESIZE */
9340# else /* no HAVE_SYS_PARAM_H */
9341# define getpagesize() 8192 /* punt totally */
9342# endif /* no HAVE_SYS_PARAM_H */
9343# endif /* no _SC_PAGESIZE */
9344
9345#endif /* no HAVE_GETPAGESIZE */
9346
9347int
9348main ()
9349{
9350 char *data, *data2, *data3;
9351 int i, pagesize;
9352 int fd;
9353
9354 pagesize = getpagesize ();
9355
9356 /* First, make a file with some known garbage in it. */
9357 data = (char *) malloc (pagesize);
9358 if (!data)
9359 exit (1);
9360 for (i = 0; i < pagesize; ++i)
9361 *(data + i) = rand ();
9362 umask (0);
9363 fd = creat ("conftest.mmap", 0600);
9364 if (fd < 0)
9365 exit (1);
9366 if (write (fd, data, pagesize) != pagesize)
9367 exit (1);
9368 close (fd);
9369
9370 /* Next, try to mmap the file at a fixed address which already has
9371 something else allocated at it. If we can, also make sure that
9372 we see the same garbage. */
9373 fd = open ("conftest.mmap", O_RDWR);
9374 if (fd < 0)
9375 exit (1);
9376 data2 = (char *) malloc (2 * pagesize);
9377 if (!data2)
9378 exit (1);
edfaf76d 9379 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 9380 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 9381 MAP_PRIVATE | MAP_FIXED, fd, 0L))
98418dba
CW
9382 exit (1);
9383 for (i = 0; i < pagesize; ++i)
9384 if (*(data + i) != *(data2 + i))
9385 exit (1);
9386
9387 /* Finally, make sure that changes to the mapped area do not
9388 percolate back to the file as seen by read(). (This is a bug on
9389 some variants of i386 svr4.0.) */
9390 for (i = 0; i < pagesize; ++i)
9391 *(data2 + i) = *(data2 + i) + 1;
9392 data3 = (char *) malloc (pagesize);
9393 if (!data3)
9394 exit (1);
9395 if (read (fd, data3, pagesize) != pagesize)
9396 exit (1);
9397 for (i = 0; i < pagesize; ++i)
9398 if (*(data + i) != *(data3 + i))
9399 exit (1);
9400 close (fd);
9401 exit (0);
9402}
9403_ACEOF
9404rm -f conftest$ac_exeext
c0d27fcc 9405if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
9406 (eval $ac_link) 2>&5
9407 ac_status=$?
c0d27fcc 9408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9409 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 9410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9411 (eval $ac_try) 2>&5
9412 ac_status=$?
c0d27fcc 9413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9414 (exit $ac_status); }; }; then
9415 ac_cv_func_mmap_fixed_mapped=yes
9416else
9417 echo "$as_me: program exited with status $ac_status" >&5
9418echo "$as_me: failed program was:" >&5
19650fd6
AS
9419sed 's/^/| /' conftest.$ac_ext >&5
9420
c0d27fcc 9421( exit $ac_status )
98418dba
CW
9422ac_cv_func_mmap_fixed_mapped=no
9423fi
edfaf76d 9424rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
9425fi
9426fi
c0d27fcc 9427echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
9428echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
9429if test $ac_cv_func_mmap_fixed_mapped = yes; then
9430
c0d27fcc 9431cat >>confdefs.h <<\_ACEOF
98418dba 9432#define HAVE_MMAP 1
c0d27fcc 9433_ACEOF
98418dba
CW
9434
9435fi
9436rm -f conftest.mmap
9437
9438if test $use_mmap_for_buffers = yes; then
9439 REL_ALLOC=no
9440fi
9441
9442LIBS="$libsrc_libs $LIBS"
9443
c0d27fcc
MR
9444
9445echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
9446echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9447if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9448 echo $ECHO_N "(cached) $ECHO_C" >&6
9449else
9450 ac_check_lib_save_LIBS=$LIBS
9451LIBS="-ldnet $LIBS"
9452cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9453/* confdefs.h. */
9454_ACEOF
9455cat confdefs.h >>conftest.$ac_ext
9456cat >>conftest.$ac_ext <<_ACEOF
9457/* end confdefs.h. */
98418dba
CW
9458
9459/* Override any gcc2 internal prototype to avoid an error. */
9460#ifdef __cplusplus
9461extern "C"
9462#endif
9463/* We use char because int might match the return type of a gcc2
9464 builtin and then its argument prototype would still apply. */
9465char dnet_ntoa ();
98418dba
CW
9466int
9467main ()
9468{
9469dnet_ntoa ();
9470 ;
9471 return 0;
9472}
9473_ACEOF
9474rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9475if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9476 (eval $ac_link) 2>conftest.er1
98418dba 9477 ac_status=$?
edfaf76d
LK
9478 grep -v '^ *+' conftest.er1 >conftest.err
9479 rm -f conftest.er1
9480 cat conftest.err >&5
c0d27fcc 9481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9482 (exit $ac_status); } &&
e143ad11
AS
9483 { ac_try='test -z "$ac_c_werror_flag"
9484 || test ! -s conftest.err'
edfaf76d
LK
9485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9486 (eval $ac_try) 2>&5
9487 ac_status=$?
9488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9489 (exit $ac_status); }; } &&
9490 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9492 (eval $ac_try) 2>&5
9493 ac_status=$?
c0d27fcc 9494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9495 (exit $ac_status); }; }; then
9496 ac_cv_lib_dnet_dnet_ntoa=yes
9497else
9498 echo "$as_me: failed program was:" >&5
19650fd6
AS
9499sed 's/^/| /' conftest.$ac_ext >&5
9500
98418dba
CW
9501ac_cv_lib_dnet_dnet_ntoa=no
9502fi
edfaf76d
LK
9503rm -f conftest.err conftest.$ac_objext \
9504 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9505LIBS=$ac_check_lib_save_LIBS
9506fi
c0d27fcc 9507echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
9508echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9509if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 9510 cat >>confdefs.h <<_ACEOF
98418dba 9511#define HAVE_LIBDNET 1
c0d27fcc 9512_ACEOF
98418dba
CW
9513
9514 LIBS="-ldnet $LIBS"
9515
9516fi
9517
c0d27fcc
MR
9518
9519echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
9520echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
9521if test "${ac_cv_lib_Xbsd_main+set}" = set; then
9522 echo $ECHO_N "(cached) $ECHO_C" >&6
9523else
9524 ac_check_lib_save_LIBS=$LIBS
9525LIBS="-lXbsd $LIBS"
9526cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9527/* confdefs.h. */
9528_ACEOF
9529cat confdefs.h >>conftest.$ac_ext
9530cat >>conftest.$ac_ext <<_ACEOF
9531/* end confdefs.h. */
98418dba 9532
c0d27fcc 9533
98418dba
CW
9534int
9535main ()
9536{
9537main ();
9538 ;
9539 return 0;
9540}
9541_ACEOF
9542rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9543if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9544 (eval $ac_link) 2>conftest.er1
98418dba 9545 ac_status=$?
edfaf76d
LK
9546 grep -v '^ *+' conftest.er1 >conftest.err
9547 rm -f conftest.er1
9548 cat conftest.err >&5
c0d27fcc 9549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9550 (exit $ac_status); } &&
e143ad11
AS
9551 { ac_try='test -z "$ac_c_werror_flag"
9552 || test ! -s conftest.err'
edfaf76d
LK
9553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9554 (eval $ac_try) 2>&5
9555 ac_status=$?
9556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9557 (exit $ac_status); }; } &&
9558 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9560 (eval $ac_try) 2>&5
9561 ac_status=$?
c0d27fcc 9562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9563 (exit $ac_status); }; }; then
9564 ac_cv_lib_Xbsd_main=yes
9565else
9566 echo "$as_me: failed program was:" >&5
19650fd6
AS
9567sed 's/^/| /' conftest.$ac_ext >&5
9568
98418dba
CW
9569ac_cv_lib_Xbsd_main=no
9570fi
edfaf76d
LK
9571rm -f conftest.err conftest.$ac_objext \
9572 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9573LIBS=$ac_check_lib_save_LIBS
9574fi
c0d27fcc 9575echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
9576echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
9577if test $ac_cv_lib_Xbsd_main = yes; then
9578 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
9579fi
9580
c0d27fcc
MR
9581
9582
9583echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
9584echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
9585if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
9586 echo $ECHO_N "(cached) $ECHO_C" >&6
9587else
9588 ac_check_lib_save_LIBS=$LIBS
9589LIBS="-lpthreads $LIBS"
9590cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9591/* confdefs.h. */
9592_ACEOF
9593cat confdefs.h >>conftest.$ac_ext
9594cat >>conftest.$ac_ext <<_ACEOF
9595/* end confdefs.h. */
98418dba
CW
9596
9597/* Override any gcc2 internal prototype to avoid an error. */
9598#ifdef __cplusplus
9599extern "C"
9600#endif
9601/* We use char because int might match the return type of a gcc2
9602 builtin and then its argument prototype would still apply. */
9603char cma_open ();
98418dba
CW
9604int
9605main ()
9606{
9607cma_open ();
9608 ;
9609 return 0;
9610}
9611_ACEOF
9612rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9613if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9614 (eval $ac_link) 2>conftest.er1
98418dba 9615 ac_status=$?
edfaf76d
LK
9616 grep -v '^ *+' conftest.er1 >conftest.err
9617 rm -f conftest.er1
9618 cat conftest.err >&5
c0d27fcc 9619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9620 (exit $ac_status); } &&
e143ad11
AS
9621 { ac_try='test -z "$ac_c_werror_flag"
9622 || test ! -s conftest.err'
edfaf76d
LK
9623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9624 (eval $ac_try) 2>&5
9625 ac_status=$?
9626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9627 (exit $ac_status); }; } &&
9628 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9630 (eval $ac_try) 2>&5
9631 ac_status=$?
c0d27fcc 9632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9633 (exit $ac_status); }; }; then
9634 ac_cv_lib_pthreads_cma_open=yes
9635else
9636 echo "$as_me: failed program was:" >&5
19650fd6
AS
9637sed 's/^/| /' conftest.$ac_ext >&5
9638
98418dba
CW
9639ac_cv_lib_pthreads_cma_open=no
9640fi
edfaf76d
LK
9641rm -f conftest.err conftest.$ac_objext \
9642 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9643LIBS=$ac_check_lib_save_LIBS
9644fi
c0d27fcc 9645echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
9646echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
9647if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 9648 cat >>confdefs.h <<_ACEOF
98418dba 9649#define HAVE_LIBPTHREADS 1
c0d27fcc 9650_ACEOF
98418dba
CW
9651
9652 LIBS="-lpthreads $LIBS"
9653
9654fi
9655
c0d27fcc
MR
9656
9657echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
9658echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
9659if test -d /usr/X386/include; then
9660 HAVE_XFREE386=yes
9661 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
9662else
9663 HAVE_XFREE386=no
9664fi
c0d27fcc 9665echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
9666echo "${ECHO_T}$HAVE_XFREE386" >&6
9667
55597d70
DL
9668
9669case ${host_os} in
9670aix*)
9671 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
9672echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
9673if test "${gdb_cv_bigtoc+set}" = set; then
9674 echo $ECHO_N "(cached) $ECHO_C" >&6
9675else
9676
9677 case $GCC in
9678 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9679 *) gdb_cv_bigtoc=-bbigtoc ;;
9680 esac
9681
9682 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9683 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9684/* confdefs.h. */
9685_ACEOF
9686cat confdefs.h >>conftest.$ac_ext
9687cat >>conftest.$ac_ext <<_ACEOF
9688/* end confdefs.h. */
55597d70
DL
9689
9690int
9691main ()
9692{
9693int i;
9694 ;
9695 return 0;
9696}
9697_ACEOF
9698rm -f conftest.$ac_objext conftest$ac_exeext
9699if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9700 (eval $ac_link) 2>conftest.er1
55597d70 9701 ac_status=$?
edfaf76d
LK
9702 grep -v '^ *+' conftest.er1 >conftest.err
9703 rm -f conftest.er1
9704 cat conftest.err >&5
55597d70
DL
9705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9706 (exit $ac_status); } &&
e143ad11
AS
9707 { ac_try='test -z "$ac_c_werror_flag"
9708 || test ! -s conftest.err'
edfaf76d
LK
9709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9710 (eval $ac_try) 2>&5
9711 ac_status=$?
9712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9713 (exit $ac_status); }; } &&
9714 { ac_try='test -s conftest$ac_exeext'
55597d70
DL
9715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9716 (eval $ac_try) 2>&5
9717 ac_status=$?
9718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9719 (exit $ac_status); }; }; then
9720 :
9721else
9722 echo "$as_me: failed program was:" >&5
19650fd6
AS
9723sed 's/^/| /' conftest.$ac_ext >&5
9724
55597d70
DL
9725gdb_cv_bigtoc=
9726fi
edfaf76d
LK
9727rm -f conftest.err conftest.$ac_objext \
9728 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
9729
9730fi
9731echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
9732echo "${ECHO_T}$gdb_cv_bigtoc" >&6
9733 ;;
9734esac
9735
ae1a998c
RS
9736# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
9737# used for the tests that follow. We set them back to REAL_CFLAGS and
9738# REAL_CPPFLAGS later on.
98418dba
CW
9739
9740REAL_CPPFLAGS="$CPPFLAGS"
9741
9742if test "${HAVE_X11}" = "yes"; then
9743 DEFS="$C_SWITCH_X_SITE $DEFS"
9744 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
9745 LIBS="$LIBX $LIBS"
9746 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
9747 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
9748
9749 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
9750 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
9751 # but it's more convenient here to set LD_RUN_PATH
9752 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
9753 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
9754 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
9755 export LD_RUN_PATH
9756 fi
9757
9758 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 9759 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
9760echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
9761 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9762/* confdefs.h. */
9763_ACEOF
9764cat confdefs.h >>conftest.$ac_ext
9765cat >>conftest.$ac_ext <<_ACEOF
9766/* end confdefs.h. */
98418dba 9767
98418dba
CW
9768int
9769main ()
9770{
9771XOpenDisplay ("foo");
9772 ;
9773 return 0;
9774}
9775_ACEOF
9776rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9778 (eval $ac_link) 2>conftest.er1
98418dba 9779 ac_status=$?
edfaf76d
LK
9780 grep -v '^ *+' conftest.er1 >conftest.err
9781 rm -f conftest.er1
9782 cat conftest.err >&5
c0d27fcc 9783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9784 (exit $ac_status); } &&
e143ad11
AS
9785 { ac_try='test -z "$ac_c_werror_flag"
9786 || test ! -s conftest.err'
edfaf76d
LK
9787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9788 (eval $ac_try) 2>&5
9789 ac_status=$?
9790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9791 (exit $ac_status); }; } &&
9792 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
9793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9794 (eval $ac_try) 2>&5
9795 ac_status=$?
9796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9797 (exit $ac_status); }; }; then
9798 xlinux_first_failure=no
98418dba
CW
9799else
9800 echo "$as_me: failed program was:" >&5
19650fd6
AS
9801sed 's/^/| /' conftest.$ac_ext >&5
9802
98418dba
CW
9803xlinux_first_failure=yes
9804fi
edfaf76d
LK
9805rm -f conftest.err conftest.$ac_objext \
9806 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9807 if test "${xlinux_first_failure}" = "yes"; then
9808 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
9809 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
9810 OLD_CPPFLAGS="$CPPFLAGS"
9811 OLD_LIBS="$LIBS"
9812 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
9813 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
9814 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
9815 LIBS="$LIBS -b i486-linuxaout"
9816 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9817/* confdefs.h. */
9818_ACEOF
9819cat confdefs.h >>conftest.$ac_ext
9820cat >>conftest.$ac_ext <<_ACEOF
9821/* end confdefs.h. */
98418dba 9822
98418dba
CW
9823int
9824main ()
9825{
9826XOpenDisplay ("foo");
9827 ;
9828 return 0;
9829}
9830_ACEOF
9831rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9832if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9833 (eval $ac_link) 2>conftest.er1
98418dba 9834 ac_status=$?
edfaf76d
LK
9835 grep -v '^ *+' conftest.er1 >conftest.err
9836 rm -f conftest.er1
9837 cat conftest.err >&5
c0d27fcc 9838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9839 (exit $ac_status); } &&
e143ad11
AS
9840 { ac_try='test -z "$ac_c_werror_flag"
9841 || test ! -s conftest.err'
edfaf76d
LK
9842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9843 (eval $ac_try) 2>&5
9844 ac_status=$?
9845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846 (exit $ac_status); }; } &&
9847 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9849 (eval $ac_try) 2>&5
9850 ac_status=$?
c0d27fcc 9851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9852 (exit $ac_status); }; }; then
9853 xlinux_second_failure=no
9854else
9855 echo "$as_me: failed program was:" >&5
19650fd6
AS
9856sed 's/^/| /' conftest.$ac_ext >&5
9857
98418dba
CW
9858xlinux_second_failure=yes
9859fi
edfaf76d
LK
9860rm -f conftest.err conftest.$ac_objext \
9861 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9862 if test "${xlinux_second_failure}" = "yes"; then
9863 # If we get the same failure with -b, there is no use adding -b.
9864 # So take it out. This plays safe.
9865 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
9866 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
9867 CPPFLAGS="$OLD_CPPFLAGS"
9868 LIBS="$OLD_LIBS"
c0d27fcc 9869 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9870echo "${ECHO_T}no" >&6
9871 else
c0d27fcc 9872 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
9873echo "${ECHO_T}yes" >&6
9874 fi
9875 else
c0d27fcc 9876 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9877echo "${ECHO_T}no" >&6
9878 fi
9879 fi
9880
9881 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
9882 # header files included from there.
c0d27fcc 9883 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
9884echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
9885 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9886/* confdefs.h. */
9887_ACEOF
9888cat confdefs.h >>conftest.$ac_ext
9889cat >>conftest.$ac_ext <<_ACEOF
9890/* end confdefs.h. */
98418dba
CW
9891#include <X11/Xlib.h>
9892#include <X11/XKBlib.h>
98418dba
CW
9893int
9894main ()
9895{
9896XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
9897 ;
9898 return 0;
9899}
9900_ACEOF
9901rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9902if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9903 (eval $ac_link) 2>conftest.er1
98418dba 9904 ac_status=$?
edfaf76d
LK
9905 grep -v '^ *+' conftest.er1 >conftest.err
9906 rm -f conftest.er1
9907 cat conftest.err >&5
c0d27fcc 9908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9909 (exit $ac_status); } &&
e143ad11
AS
9910 { ac_try='test -z "$ac_c_werror_flag"
9911 || test ! -s conftest.err'
edfaf76d
LK
9912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9913 (eval $ac_try) 2>&5
9914 ac_status=$?
9915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9916 (exit $ac_status); }; } &&
9917 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9919 (eval $ac_try) 2>&5
9920 ac_status=$?
c0d27fcc 9921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9922 (exit $ac_status); }; }; then
9923 emacs_xkb=yes
9924else
9925 echo "$as_me: failed program was:" >&5
19650fd6
AS
9926sed 's/^/| /' conftest.$ac_ext >&5
9927
98418dba
CW
9928emacs_xkb=no
9929fi
edfaf76d
LK
9930rm -f conftest.err conftest.$ac_objext \
9931 conftest$ac_exeext conftest.$ac_ext
c0d27fcc 9932 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
9933echo "${ECHO_T}$emacs_xkb" >&6
9934 if test $emacs_xkb = yes; then
b936fae4 9935
c0d27fcc 9936cat >>confdefs.h <<\_ACEOF
98418dba 9937#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 9938_ACEOF
98418dba
CW
9939
9940 fi
9941
c0d27fcc
MR
9942
9943
9944
9945
98418dba
CW
9946for ac_func in XrmSetDatabase XScreenResourceString \
9947XScreenNumberOfScreen XSetWMProtocols
9948do
9949as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 9950echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
9951echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9952if eval "test \"\${$as_ac_var+set}\" = set"; then
9953 echo $ECHO_N "(cached) $ECHO_C" >&6
9954else
9955 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9956/* confdefs.h. */
9957_ACEOF
9958cat confdefs.h >>conftest.$ac_ext
9959cat >>conftest.$ac_ext <<_ACEOF
9960/* end confdefs.h. */
edfaf76d
LK
9961/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9962 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9963#define $ac_func innocuous_$ac_func
9964
98418dba 9965/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9966 which can conflict with char $ac_func (); below.
9967 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9968 <limits.h> exists even on freestanding compilers. */
edfaf76d 9969
19650fd6
AS
9970#ifdef __STDC__
9971# include <limits.h>
9972#else
9973# include <assert.h>
9974#endif
edfaf76d
LK
9975
9976#undef $ac_func
9977
98418dba
CW
9978/* Override any gcc2 internal prototype to avoid an error. */
9979#ifdef __cplusplus
9980extern "C"
19650fd6 9981{
98418dba
CW
9982#endif
9983/* We use char because int might match the return type of a gcc2
9984 builtin and then its argument prototype would still apply. */
9985char $ac_func ();
98418dba
CW
9986/* The GNU C library defines this for functions which it implements
9987 to always fail with ENOSYS. Some functions are actually named
9988 something starting with __ and the normal name is an alias. */
9989#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9990choke me
9991#else
19650fd6
AS
9992char (*f) () = $ac_func;
9993#endif
9994#ifdef __cplusplus
9995}
98418dba
CW
9996#endif
9997
19650fd6
AS
9998int
9999main ()
10000{
10001return f != $ac_func;
98418dba
CW
10002 ;
10003 return 0;
10004}
10005_ACEOF
10006rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10007if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10008 (eval $ac_link) 2>conftest.er1
98418dba 10009 ac_status=$?
edfaf76d
LK
10010 grep -v '^ *+' conftest.er1 >conftest.err
10011 rm -f conftest.er1
10012 cat conftest.err >&5
c0d27fcc 10013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10014 (exit $ac_status); } &&
e143ad11
AS
10015 { ac_try='test -z "$ac_c_werror_flag"
10016 || test ! -s conftest.err'
edfaf76d
LK
10017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10018 (eval $ac_try) 2>&5
10019 ac_status=$?
10020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10021 (exit $ac_status); }; } &&
10022 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10024 (eval $ac_try) 2>&5
10025 ac_status=$?
c0d27fcc 10026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10027 (exit $ac_status); }; }; then
10028 eval "$as_ac_var=yes"
10029else
10030 echo "$as_me: failed program was:" >&5
19650fd6
AS
10031sed 's/^/| /' conftest.$ac_ext >&5
10032
98418dba
CW
10033eval "$as_ac_var=no"
10034fi
edfaf76d
LK
10035rm -f conftest.err conftest.$ac_objext \
10036 conftest$ac_exeext conftest.$ac_ext
98418dba 10037fi
c0d27fcc 10038echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
10039echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10040if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10041 cat >>confdefs.h <<_ACEOF
98418dba 10042#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10043_ACEOF
98418dba
CW
10044
10045fi
10046done
10047
10048fi
10049
10050if test "${window_system}" = "x11"; then
c0d27fcc 10051 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
10052echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
10053 if test "${emacs_cv_x11_version_6+set}" = set; then
10054 echo $ECHO_N "(cached) $ECHO_C" >&6
10055else
10056 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10057/* confdefs.h. */
10058_ACEOF
10059cat confdefs.h >>conftest.$ac_ext
10060cat >>conftest.$ac_ext <<_ACEOF
10061/* end confdefs.h. */
98418dba 10062#include <X11/Xlib.h>
98418dba
CW
10063int
10064main ()
10065{
10066#if XlibSpecificationRelease < 6
10067fail;
10068#endif
10069
10070 ;
10071 return 0;
10072}
10073_ACEOF
10074rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10075if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10076 (eval $ac_link) 2>conftest.er1
98418dba 10077 ac_status=$?
edfaf76d
LK
10078 grep -v '^ *+' conftest.er1 >conftest.err
10079 rm -f conftest.er1
10080 cat conftest.err >&5
c0d27fcc 10081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10082 (exit $ac_status); } &&
e143ad11
AS
10083 { ac_try='test -z "$ac_c_werror_flag"
10084 || test ! -s conftest.err'
edfaf76d
LK
10085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10086 (eval $ac_try) 2>&5
10087 ac_status=$?
10088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10089 (exit $ac_status); }; } &&
10090 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10092 (eval $ac_try) 2>&5
10093 ac_status=$?
c0d27fcc 10094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10095 (exit $ac_status); }; }; then
10096 emacs_cv_x11_version_6=yes
10097else
10098 echo "$as_me: failed program was:" >&5
19650fd6
AS
10099sed 's/^/| /' conftest.$ac_ext >&5
10100
98418dba
CW
10101emacs_cv_x11_version_6=no
10102fi
edfaf76d
LK
10103rm -f conftest.err conftest.$ac_objext \
10104 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10105fi
10106
10107 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 10108 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 10109echo "${ECHO_T}6 or newer" >&6
b936fae4 10110
c0d27fcc 10111cat >>confdefs.h <<\_ACEOF
98418dba 10112#define HAVE_X11R6 1
c0d27fcc 10113_ACEOF
98418dba
CW
10114
10115 else
c0d27fcc 10116 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
10117echo "${ECHO_T}before 6" >&6
10118 fi
10119fi
10120
10121if test "${window_system}" = "x11"; then
c0d27fcc 10122 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
10123echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
10124 if test "${emacs_cv_x11_version_5+set}" = set; then
10125 echo $ECHO_N "(cached) $ECHO_C" >&6
10126else
10127 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10128/* confdefs.h. */
10129_ACEOF
10130cat confdefs.h >>conftest.$ac_ext
10131cat >>conftest.$ac_ext <<_ACEOF
10132/* end confdefs.h. */
98418dba 10133#include <X11/Xlib.h>
98418dba
CW
10134int
10135main ()
10136{
10137#if XlibSpecificationRelease < 5
10138fail;
10139#endif
10140
10141 ;
10142 return 0;
10143}
10144_ACEOF
10145rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10147 (eval $ac_link) 2>conftest.er1
98418dba 10148 ac_status=$?
edfaf76d
LK
10149 grep -v '^ *+' conftest.er1 >conftest.err
10150 rm -f conftest.er1
10151 cat conftest.err >&5
c0d27fcc 10152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10153 (exit $ac_status); } &&
e143ad11
AS
10154 { ac_try='test -z "$ac_c_werror_flag"
10155 || test ! -s conftest.err'
edfaf76d
LK
10156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10157 (eval $ac_try) 2>&5
10158 ac_status=$?
10159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10160 (exit $ac_status); }; } &&
10161 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10163 (eval $ac_try) 2>&5
10164 ac_status=$?
c0d27fcc 10165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10166 (exit $ac_status); }; }; then
10167 emacs_cv_x11_version_5=yes
10168else
10169 echo "$as_me: failed program was:" >&5
19650fd6
AS
10170sed 's/^/| /' conftest.$ac_ext >&5
10171
98418dba
CW
10172emacs_cv_x11_version_5=no
10173fi
edfaf76d
LK
10174rm -f conftest.err conftest.$ac_objext \
10175 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10176fi
10177
10178 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 10179 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
10180echo "${ECHO_T}5 or newer" >&6
10181 HAVE_X11R5=yes
b936fae4 10182
c0d27fcc 10183cat >>confdefs.h <<\_ACEOF
98418dba 10184#define HAVE_X11R5 1
c0d27fcc 10185_ACEOF
98418dba
CW
10186
10187 else
10188 HAVE_X11R5=no
c0d27fcc 10189 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
10190echo "${ECHO_T}before 5" >&6
10191 fi
10192fi
10193
488dd4c4
JD
10194
10195
10196HAVE_GTK=no
10197if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 10198 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
10199 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
10200echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
10201 { (exit 1); exit 1; }; };
10202 fi
448541bc
JD
10203 GLIB_REQUIRED=2.4
10204 GTK_REQUIRED=2.4
488dd4c4
JD
10205 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10206
10207 if test "X${with_pkg_config_prog}" != X; then
10208 PKG_CONFIG="${with_pkg_config_prog}"
10209 fi
10210
10211 succeeded=no
10212
10213 if test -z "$PKG_CONFIG"; then
10214 # Extract the first word of "pkg-config", so it can be a program name with args.
10215set dummy pkg-config; ac_word=$2
10216echo "$as_me:$LINENO: checking for $ac_word" >&5
10217echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10218if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10219 echo $ECHO_N "(cached) $ECHO_C" >&6
10220else
10221 case $PKG_CONFIG in
10222 [\\/]* | ?:[\\/]*)
10223 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10224 ;;
10225 *)
10226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10227for as_dir in $PATH
10228do
10229 IFS=$as_save_IFS
10230 test -z "$as_dir" && as_dir=.
10231 for ac_exec_ext in '' $ac_executable_extensions; do
10232 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10233 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10234 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10235 break 2
10236 fi
10237done
10238done
10239
10240 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10241 ;;
10242esac
10243fi
10244PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10245
10246if test -n "$PKG_CONFIG"; then
10247 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10248echo "${ECHO_T}$PKG_CONFIG" >&6
10249else
10250 echo "$as_me:$LINENO: result: no" >&5
10251echo "${ECHO_T}no" >&6
10252fi
10253
10254 fi
10255
10256 if test "$PKG_CONFIG" = "no" ; then
10257 echo "*** The pkg-config script could not be found. Make sure it is"
10258 echo "*** in your path, or give the full path to pkg-config with"
10259 echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog."
10260 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
10261 else
10262 PKG_CONFIG_MIN_VERSION=0.9.0
10263 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10264 echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
10265echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6
10266
10267 if $PKG_CONFIG --exists "$GTK_MODULES" ; then
10268 echo "$as_me:$LINENO: result: yes" >&5
10269echo "${ECHO_T}yes" >&6
10270 succeeded=yes
10271
10272 echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
10273echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
10274 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
10275 echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
10276echo "${ECHO_T}$GTK_CFLAGS" >&6
10277
10278 echo "$as_me:$LINENO: checking GTK_LIBS" >&5
10279echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
10280 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
10281 echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
10282echo "${ECHO_T}$GTK_LIBS" >&6
10283 else
10284 GTK_CFLAGS=""
10285 GTK_LIBS=""
10286 ## If we have a custom action on failure, don't print errors, but
10287 ## do set a variable so people can do so.
10288 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
10289 echo $GTK_PKG_ERRORS
10290 fi
10291
10292
10293
10294 else
10295 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10296 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10297 fi
10298 fi
10299
10300 if test $succeeded = yes; then
10301 :
10302 else
10303 { { 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
10304echo "$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;}
10305 { (exit 1); exit 1; }; }
10306 fi
10307
10308
10309
10310 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
10311 CFLAGS="$CFLAGS $GTK_CFLAGS"
10312 LIBS="$GTK_LIBS $LIBS"
488dd4c4
JD
10313 HAVE_GTK=yes
10314
10315cat >>confdefs.h <<\_ACEOF
10316#define HAVE_GTK 1
10317_ACEOF
10318
10319 USE_X_TOOLKIT=none
10320
d0a80c21
JD
10321 if test "$with_toolkit_scroll_bars" != no; then
10322 with_toolkit_scroll_bars=yes
10323 fi
57669b57
JD
10324
10325 HAVE_GTK_MULTIDISPLAY=no
10326
10327for ac_func in gdk_display_open
10328do
10329as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10330echo "$as_me:$LINENO: checking for $ac_func" >&5
10331echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10332if eval "test \"\${$as_ac_var+set}\" = set"; then
10333 echo $ECHO_N "(cached) $ECHO_C" >&6
10334else
10335 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
10336/* confdefs.h. */
10337_ACEOF
10338cat confdefs.h >>conftest.$ac_ext
10339cat >>conftest.$ac_ext <<_ACEOF
10340/* end confdefs.h. */
edfaf76d
LK
10341/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10342 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10343#define $ac_func innocuous_$ac_func
10344
57669b57
JD
10345/* System header to define __stub macros and hopefully few prototypes,
10346 which can conflict with char $ac_func (); below.
10347 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10348 <limits.h> exists even on freestanding compilers. */
edfaf76d 10349
57669b57
JD
10350#ifdef __STDC__
10351# include <limits.h>
10352#else
10353# include <assert.h>
10354#endif
edfaf76d
LK
10355
10356#undef $ac_func
10357
57669b57
JD
10358/* Override any gcc2 internal prototype to avoid an error. */
10359#ifdef __cplusplus
10360extern "C"
10361{
10362#endif
10363/* We use char because int might match the return type of a gcc2
10364 builtin and then its argument prototype would still apply. */
10365char $ac_func ();
10366/* The GNU C library defines this for functions which it implements
10367 to always fail with ENOSYS. Some functions are actually named
10368 something starting with __ and the normal name is an alias. */
10369#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10370choke me
10371#else
10372char (*f) () = $ac_func;
10373#endif
10374#ifdef __cplusplus
10375}
10376#endif
10377
10378int
10379main ()
10380{
10381return f != $ac_func;
10382 ;
10383 return 0;
10384}
10385_ACEOF
10386rm -f conftest.$ac_objext conftest$ac_exeext
10387if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10388 (eval $ac_link) 2>conftest.er1
57669b57 10389 ac_status=$?
edfaf76d
LK
10390 grep -v '^ *+' conftest.er1 >conftest.err
10391 rm -f conftest.er1
10392 cat conftest.err >&5
57669b57
JD
10393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10394 (exit $ac_status); } &&
e143ad11
AS
10395 { ac_try='test -z "$ac_c_werror_flag"
10396 || test ! -s conftest.err'
edfaf76d
LK
10397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10398 (eval $ac_try) 2>&5
10399 ac_status=$?
10400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10401 (exit $ac_status); }; } &&
10402 { ac_try='test -s conftest$ac_exeext'
57669b57
JD
10403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10404 (eval $ac_try) 2>&5
10405 ac_status=$?
10406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10407 (exit $ac_status); }; }; then
10408 eval "$as_ac_var=yes"
10409else
10410 echo "$as_me: failed program was:" >&5
10411sed 's/^/| /' conftest.$ac_ext >&5
10412
10413eval "$as_ac_var=no"
10414fi
edfaf76d
LK
10415rm -f conftest.err conftest.$ac_objext \
10416 conftest$ac_exeext conftest.$ac_ext
57669b57
JD
10417fi
10418echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10419echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10420if test `eval echo '${'$as_ac_var'}'` = yes; then
10421 cat >>confdefs.h <<_ACEOF
10422#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10423_ACEOF
10424 HAVE_GTK_MULTIDISPLAY=yes
10425fi
10426done
10427
10428 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
10429
10430cat >>confdefs.h <<\_ACEOF
10431#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
10432_ACEOF
10433
10434 fi
10435 HAVE_GTK_FILE_SELECTION=no
10436
10437for ac_func in gtk_file_selection_new
10438do
10439as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10440echo "$as_me:$LINENO: checking for $ac_func" >&5
10441echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10442if eval "test \"\${$as_ac_var+set}\" = set"; then
10443 echo $ECHO_N "(cached) $ECHO_C" >&6
10444else
10445 cat >conftest.$ac_ext <<_ACEOF
10446/* confdefs.h. */
10447_ACEOF
10448cat confdefs.h >>conftest.$ac_ext
10449cat >>conftest.$ac_ext <<_ACEOF
10450/* end confdefs.h. */
edfaf76d
LK
10451/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10452 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10453#define $ac_func innocuous_$ac_func
10454
572a3cc2
JD
10455/* System header to define __stub macros and hopefully few prototypes,
10456 which can conflict with char $ac_func (); below.
10457 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10458 <limits.h> exists even on freestanding compilers. */
edfaf76d 10459
572a3cc2
JD
10460#ifdef __STDC__
10461# include <limits.h>
10462#else
10463# include <assert.h>
10464#endif
edfaf76d
LK
10465
10466#undef $ac_func
10467
572a3cc2
JD
10468/* Override any gcc2 internal prototype to avoid an error. */
10469#ifdef __cplusplus
10470extern "C"
10471{
10472#endif
10473/* We use char because int might match the return type of a gcc2
10474 builtin and then its argument prototype would still apply. */
10475char $ac_func ();
10476/* The GNU C library defines this for functions which it implements
10477 to always fail with ENOSYS. Some functions are actually named
10478 something starting with __ and the normal name is an alias. */
10479#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10480choke me
10481#else
10482char (*f) () = $ac_func;
10483#endif
10484#ifdef __cplusplus
10485}
10486#endif
10487
10488int
10489main ()
10490{
10491return f != $ac_func;
10492 ;
10493 return 0;
10494}
10495_ACEOF
10496rm -f conftest.$ac_objext conftest$ac_exeext
10497if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10498 (eval $ac_link) 2>conftest.er1
572a3cc2 10499 ac_status=$?
edfaf76d
LK
10500 grep -v '^ *+' conftest.er1 >conftest.err
10501 rm -f conftest.er1
10502 cat conftest.err >&5
572a3cc2
JD
10503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10504 (exit $ac_status); } &&
e143ad11
AS
10505 { ac_try='test -z "$ac_c_werror_flag"
10506 || test ! -s conftest.err'
edfaf76d
LK
10507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10508 (eval $ac_try) 2>&5
10509 ac_status=$?
10510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10511 (exit $ac_status); }; } &&
10512 { ac_try='test -s conftest$ac_exeext'
572a3cc2
JD
10513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10514 (eval $ac_try) 2>&5
10515 ac_status=$?
10516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10517 (exit $ac_status); }; }; then
10518 eval "$as_ac_var=yes"
10519else
10520 echo "$as_me: failed program was:" >&5
10521sed 's/^/| /' conftest.$ac_ext >&5
10522
10523eval "$as_ac_var=no"
10524fi
edfaf76d
LK
10525rm -f conftest.err conftest.$ac_objext \
10526 conftest$ac_exeext conftest.$ac_ext
572a3cc2
JD
10527fi
10528echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10529echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10530if test `eval echo '${'$as_ac_var'}'` = yes; then
10531 cat >>confdefs.h <<_ACEOF
10532#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10533_ACEOF
10534 HAVE_GTK_FILE_SELECTION=yes
10535fi
10536done
10537
10538
10539 HAVE_GTK_FILE_CHOOSER=no
10540
10541for ac_func in gtk_file_chooser_dialog_new
10542do
10543as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10544echo "$as_me:$LINENO: checking for $ac_func" >&5
10545echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10546if eval "test \"\${$as_ac_var+set}\" = set"; then
10547 echo $ECHO_N "(cached) $ECHO_C" >&6
10548else
10549 cat >conftest.$ac_ext <<_ACEOF
10550/* confdefs.h. */
10551_ACEOF
10552cat confdefs.h >>conftest.$ac_ext
10553cat >>conftest.$ac_ext <<_ACEOF
10554/* end confdefs.h. */
edfaf76d
LK
10555/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10556 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10557#define $ac_func innocuous_$ac_func
10558
572a3cc2
JD
10559/* System header to define __stub macros and hopefully few prototypes,
10560 which can conflict with char $ac_func (); below.
10561 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10562 <limits.h> exists even on freestanding compilers. */
edfaf76d 10563
572a3cc2
JD
10564#ifdef __STDC__
10565# include <limits.h>
10566#else
10567# include <assert.h>
10568#endif
edfaf76d
LK
10569
10570#undef $ac_func
10571
572a3cc2
JD
10572/* Override any gcc2 internal prototype to avoid an error. */
10573#ifdef __cplusplus
10574extern "C"
10575{
10576#endif
10577/* We use char because int might match the return type of a gcc2
10578 builtin and then its argument prototype would still apply. */
10579char $ac_func ();
10580/* The GNU C library defines this for functions which it implements
10581 to always fail with ENOSYS. Some functions are actually named
10582 something starting with __ and the normal name is an alias. */
10583#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10584choke me
10585#else
10586char (*f) () = $ac_func;
10587#endif
10588#ifdef __cplusplus
10589}
10590#endif
10591
10592int
10593main ()
10594{
10595return f != $ac_func;
10596 ;
10597 return 0;
10598}
10599_ACEOF
10600rm -f conftest.$ac_objext conftest$ac_exeext
10601if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10602 (eval $ac_link) 2>conftest.er1
572a3cc2 10603 ac_status=$?
edfaf76d
LK
10604 grep -v '^ *+' conftest.er1 >conftest.err
10605 rm -f conftest.er1
10606 cat conftest.err >&5
572a3cc2
JD
10607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10608 (exit $ac_status); } &&
e143ad11
AS
10609 { ac_try='test -z "$ac_c_werror_flag"
10610 || test ! -s conftest.err'
edfaf76d
LK
10611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10612 (eval $ac_try) 2>&5
10613 ac_status=$?
10614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10615 (exit $ac_status); }; } &&
10616 { ac_try='test -s conftest$ac_exeext'
572a3cc2
JD
10617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10618 (eval $ac_try) 2>&5
10619 ac_status=$?
10620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10621 (exit $ac_status); }; }; then
10622 eval "$as_ac_var=yes"
10623else
10624 echo "$as_me: failed program was:" >&5
10625sed 's/^/| /' conftest.$ac_ext >&5
10626
10627eval "$as_ac_var=no"
10628fi
edfaf76d
LK
10629rm -f conftest.err conftest.$ac_objext \
10630 conftest$ac_exeext conftest.$ac_ext
572a3cc2
JD
10631fi
10632echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10633echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10634if test `eval echo '${'$as_ac_var'}'` = yes; then
10635 cat >>confdefs.h <<_ACEOF
10636#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10637_ACEOF
10638 HAVE_GTK_FILE_CHOOSER=yes
10639fi
10640done
10641
10642
10643 if test "$HAVE_GTK_FILE_SELECTION" = yes \
10644 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10645
10646cat >>confdefs.h <<\_ACEOF
10647#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
10648_ACEOF
10649
b8bdffbe
JD
10650 fi
10651
10652 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10653 HAVE_GTK_AND_PTHREAD=no
10654
10655for ac_header in pthread.h
10656do
10657as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10658if eval "test \"\${$as_ac_Header+set}\" = set"; then
10659 echo "$as_me:$LINENO: checking for $ac_header" >&5
10660echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10661if eval "test \"\${$as_ac_Header+set}\" = set"; then
10662 echo $ECHO_N "(cached) $ECHO_C" >&6
10663fi
10664echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10665echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10666else
10667 # Is the header compilable?
10668echo "$as_me:$LINENO: checking $ac_header usability" >&5
10669echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10670cat >conftest.$ac_ext <<_ACEOF
10671/* confdefs.h. */
10672_ACEOF
10673cat confdefs.h >>conftest.$ac_ext
10674cat >>conftest.$ac_ext <<_ACEOF
10675/* end confdefs.h. */
10676$ac_includes_default
10677#include <$ac_header>
10678_ACEOF
10679rm -f conftest.$ac_objext
10680if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 10681 (eval $ac_compile) 2>conftest.er1
b8bdffbe 10682 ac_status=$?
edfaf76d
LK
10683 grep -v '^ *+' conftest.er1 >conftest.err
10684 rm -f conftest.er1
10685 cat conftest.err >&5
b8bdffbe
JD
10686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10687 (exit $ac_status); } &&
e143ad11
AS
10688 { ac_try='test -z "$ac_c_werror_flag"
10689 || test ! -s conftest.err'
edfaf76d
LK
10690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10691 (eval $ac_try) 2>&5
10692 ac_status=$?
10693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10694 (exit $ac_status); }; } &&
10695 { ac_try='test -s conftest.$ac_objext'
b8bdffbe
JD
10696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10697 (eval $ac_try) 2>&5
10698 ac_status=$?
10699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10700 (exit $ac_status); }; }; then
10701 ac_header_compiler=yes
10702else
10703 echo "$as_me: failed program was:" >&5
10704sed 's/^/| /' conftest.$ac_ext >&5
10705
10706ac_header_compiler=no
10707fi
edfaf76d 10708rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b8bdffbe
JD
10709echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10710echo "${ECHO_T}$ac_header_compiler" >&6
10711
10712# Is the header present?
10713echo "$as_me:$LINENO: checking $ac_header presence" >&5
10714echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10715cat >conftest.$ac_ext <<_ACEOF
10716/* confdefs.h. */
10717_ACEOF
10718cat confdefs.h >>conftest.$ac_ext
10719cat >>conftest.$ac_ext <<_ACEOF
10720/* end confdefs.h. */
10721#include <$ac_header>
10722_ACEOF
10723if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10724 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10725 ac_status=$?
10726 grep -v '^ *+' conftest.er1 >conftest.err
10727 rm -f conftest.er1
10728 cat conftest.err >&5
10729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10730 (exit $ac_status); } >/dev/null; then
10731 if test -s conftest.err; then
10732 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 10733 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
b8bdffbe
JD
10734 else
10735 ac_cpp_err=
10736 fi
10737else
10738 ac_cpp_err=yes
10739fi
10740if test -z "$ac_cpp_err"; then
10741 ac_header_preproc=yes
10742else
10743 echo "$as_me: failed program was:" >&5
10744sed 's/^/| /' conftest.$ac_ext >&5
10745
10746 ac_header_preproc=no
10747fi
10748rm -f conftest.err conftest.$ac_ext
10749echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10750echo "${ECHO_T}$ac_header_preproc" >&6
10751
10752# So? What about this header?
edfaf76d
LK
10753case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10754 yes:no: )
b8bdffbe
JD
10755 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10756echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
10757 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10758echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10759 ac_header_preproc=yes
b8bdffbe 10760 ;;
edfaf76d 10761 no:yes:* )
b8bdffbe
JD
10762 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10763echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
10764 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10765echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10766 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10767echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10768 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10769echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
10770 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10771echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
10772 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10773echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b8bdffbe
JD
10774 (
10775 cat <<\_ASBOX
edfaf76d
LK
10776## ------------------------------------------ ##
10777## Report this to the AC_PACKAGE_NAME lists. ##
10778## ------------------------------------------ ##
b8bdffbe
JD
10779_ASBOX
10780 ) |
10781 sed "s/^/$as_me: WARNING: /" >&2
10782 ;;
10783esac
10784echo "$as_me:$LINENO: checking for $ac_header" >&5
10785echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10786if eval "test \"\${$as_ac_Header+set}\" = set"; then
10787 echo $ECHO_N "(cached) $ECHO_C" >&6
10788else
edfaf76d 10789 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe
JD
10790fi
10791echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10792echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10793
10794fi
10795if test `eval echo '${'$as_ac_Header'}'` = yes; then
10796 cat >>confdefs.h <<_ACEOF
10797#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10798_ACEOF
10799
10800fi
10801
10802done
10803
10804 if test "$ac_cv_header_pthread_h"; then
10805 echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
10806echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6
10807if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
10808 echo $ECHO_N "(cached) $ECHO_C" >&6
10809else
10810 ac_check_lib_save_LIBS=$LIBS
10811LIBS="-lpthread $LIBS"
10812cat >conftest.$ac_ext <<_ACEOF
10813/* confdefs.h. */
10814_ACEOF
10815cat confdefs.h >>conftest.$ac_ext
10816cat >>conftest.$ac_ext <<_ACEOF
10817/* end confdefs.h. */
10818
10819/* Override any gcc2 internal prototype to avoid an error. */
10820#ifdef __cplusplus
10821extern "C"
10822#endif
10823/* We use char because int might match the return type of a gcc2
10824 builtin and then its argument prototype would still apply. */
10825char pthread_self ();
10826int
10827main ()
10828{
10829pthread_self ();
10830 ;
10831 return 0;
10832}
10833_ACEOF
10834rm -f conftest.$ac_objext conftest$ac_exeext
10835if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10836 (eval $ac_link) 2>conftest.er1
b8bdffbe 10837 ac_status=$?
edfaf76d
LK
10838 grep -v '^ *+' conftest.er1 >conftest.err
10839 rm -f conftest.er1
10840 cat conftest.err >&5
b8bdffbe
JD
10841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10842 (exit $ac_status); } &&
e143ad11
AS
10843 { ac_try='test -z "$ac_c_werror_flag"
10844 || test ! -s conftest.err'
edfaf76d
LK
10845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10846 (eval $ac_try) 2>&5
10847 ac_status=$?
10848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10849 (exit $ac_status); }; } &&
10850 { ac_try='test -s conftest$ac_exeext'
b8bdffbe
JD
10851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10852 (eval $ac_try) 2>&5
10853 ac_status=$?
10854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10855 (exit $ac_status); }; }; then
10856 ac_cv_lib_pthread_pthread_self=yes
10857else
10858 echo "$as_me: failed program was:" >&5
10859sed 's/^/| /' conftest.$ac_ext >&5
10860
10861ac_cv_lib_pthread_pthread_self=no
10862fi
edfaf76d
LK
10863rm -f conftest.err conftest.$ac_objext \
10864 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
10865LIBS=$ac_check_lib_save_LIBS
10866fi
10867echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
10868echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6
10869if test $ac_cv_lib_pthread_pthread_self = yes; then
10870 HAVE_GTK_AND_PTHREAD=yes
10871fi
10872
10873 fi
10874 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
10875 GTK_LIBS="$GTK_LIBS -lpthread"
10876
10877cat >>confdefs.h <<\_ACEOF
10878#define HAVE_GTK_AND_PTHREAD 1
10879_ACEOF
10880
10881 fi
57669b57 10882 fi
488dd4c4
JD
10883fi
10884
98418dba
CW
10885if test x"${USE_X_TOOLKIT}" = xmaybe; then
10886 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 10887 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
10888echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
10889 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
10890 echo $ECHO_N "(cached) $ECHO_C" >&6
10891else
10892 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10893/* confdefs.h. */
10894_ACEOF
10895cat confdefs.h >>conftest.$ac_ext
10896cat >>conftest.$ac_ext <<_ACEOF
10897/* end confdefs.h. */
98418dba
CW
10898
10899#include <X11/Intrinsic.h>
10900#include <X11/Xaw/Simple.h>
98418dba
CW
10901int
10902main ()
10903{
10904
10905 ;
10906 return 0;
10907}
10908_ACEOF
10909rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10910if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10911 (eval $ac_link) 2>conftest.er1
98418dba 10912 ac_status=$?
edfaf76d
LK
10913 grep -v '^ *+' conftest.er1 >conftest.err
10914 rm -f conftest.er1
10915 cat conftest.err >&5
c0d27fcc 10916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10917 (exit $ac_status); } &&
e143ad11
AS
10918 { ac_try='test -z "$ac_c_werror_flag"
10919 || test ! -s conftest.err'
edfaf76d
LK
10920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10921 (eval $ac_try) 2>&5
10922 ac_status=$?
10923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10924 (exit $ac_status); }; } &&
10925 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10927 (eval $ac_try) 2>&5
10928 ac_status=$?
c0d27fcc 10929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10930 (exit $ac_status); }; }; then
10931 emacs_cv_x11_version_5_with_xaw=yes
10932else
10933 echo "$as_me: failed program was:" >&5
19650fd6
AS
10934sed 's/^/| /' conftest.$ac_ext >&5
10935
98418dba
CW
10936emacs_cv_x11_version_5_with_xaw=no
10937fi
edfaf76d
LK
10938rm -f conftest.err conftest.$ac_objext \
10939 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10940fi
10941
10942 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 10943 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
10944echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
10945 USE_X_TOOLKIT=LUCID
10946 else
c0d27fcc 10947 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
10948echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
10949 USE_X_TOOLKIT=none
10950 fi
10951 else
10952 USE_X_TOOLKIT=none
10953 fi
10954fi
10955
10956X_TOOLKIT_TYPE=$USE_X_TOOLKIT
10957
10958if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 10959 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
10960echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
10961 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
10962 echo $ECHO_N "(cached) $ECHO_C" >&6
10963else
10964 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10965/* confdefs.h. */
10966_ACEOF
10967cat confdefs.h >>conftest.$ac_ext
10968cat >>conftest.$ac_ext <<_ACEOF
10969/* end confdefs.h. */
98418dba 10970#include <X11/Intrinsic.h>
98418dba
CW
10971int
10972main ()
10973{
10974#if XtSpecificationRelease < 6
10975fail;
10976#endif
10977
10978 ;
10979 return 0;
10980}
10981_ACEOF
10982rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10983if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10984 (eval $ac_link) 2>conftest.er1
98418dba 10985 ac_status=$?
edfaf76d
LK
10986 grep -v '^ *+' conftest.er1 >conftest.err
10987 rm -f conftest.er1
10988 cat conftest.err >&5
c0d27fcc 10989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10990 (exit $ac_status); } &&
e143ad11
AS
10991 { ac_try='test -z "$ac_c_werror_flag"
10992 || test ! -s conftest.err'
edfaf76d
LK
10993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10994 (eval $ac_try) 2>&5
10995 ac_status=$?
10996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10997 (exit $ac_status); }; } &&
10998 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11000 (eval $ac_try) 2>&5
11001 ac_status=$?
c0d27fcc 11002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11003 (exit $ac_status); }; }; then
11004 emacs_cv_x11_toolkit_version_6=yes
11005else
11006 echo "$as_me: failed program was:" >&5
19650fd6
AS
11007sed 's/^/| /' conftest.$ac_ext >&5
11008
98418dba
CW
11009emacs_cv_x11_toolkit_version_6=no
11010fi
edfaf76d
LK
11011rm -f conftest.err conftest.$ac_objext \
11012 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11013fi
11014
11015 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11016 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 11017 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 11018echo "${ECHO_T}6 or newer" >&6
b936fae4 11019
c0d27fcc 11020cat >>confdefs.h <<\_ACEOF
98418dba 11021#define HAVE_X11XTR6 1
c0d27fcc 11022_ACEOF
98418dba
CW
11023
11024 else
c0d27fcc 11025 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
11026echo "${ECHO_T}before 6" >&6
11027 fi
11028
11029 OLDLIBS="$LIBS"
11030 if test x$HAVE_X11XTR6 = xyes; then
11031 LIBS="-lXt -lSM -lICE $LIBS"
11032 else
11033 LIBS="-lXt $LIBS"
11034 fi
11035
c0d27fcc 11036echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
11037echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
11038if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
11039 echo $ECHO_N "(cached) $ECHO_C" >&6
11040else
11041 ac_check_lib_save_LIBS=$LIBS
11042LIBS="-lXmu $LIBS"
11043cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11044/* confdefs.h. */
11045_ACEOF
11046cat confdefs.h >>conftest.$ac_ext
11047cat >>conftest.$ac_ext <<_ACEOF
11048/* end confdefs.h. */
98418dba
CW
11049
11050/* Override any gcc2 internal prototype to avoid an error. */
11051#ifdef __cplusplus
11052extern "C"
11053#endif
11054/* We use char because int might match the return type of a gcc2
11055 builtin and then its argument prototype would still apply. */
11056char XmuConvertStandardSelection ();
98418dba
CW
11057int
11058main ()
11059{
11060XmuConvertStandardSelection ();
11061 ;
11062 return 0;
11063}
11064_ACEOF
11065rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11066if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11067 (eval $ac_link) 2>conftest.er1
98418dba 11068 ac_status=$?
edfaf76d
LK
11069 grep -v '^ *+' conftest.er1 >conftest.err
11070 rm -f conftest.er1
11071 cat conftest.err >&5
c0d27fcc 11072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11073 (exit $ac_status); } &&
e143ad11
AS
11074 { ac_try='test -z "$ac_c_werror_flag"
11075 || test ! -s conftest.err'
edfaf76d
LK
11076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11077 (eval $ac_try) 2>&5
11078 ac_status=$?
11079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11080 (exit $ac_status); }; } &&
11081 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11083 (eval $ac_try) 2>&5
11084 ac_status=$?
c0d27fcc 11085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11086 (exit $ac_status); }; }; then
11087 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11088else
11089 echo "$as_me: failed program was:" >&5
19650fd6
AS
11090sed 's/^/| /' conftest.$ac_ext >&5
11091
98418dba
CW
11092ac_cv_lib_Xmu_XmuConvertStandardSelection=no
11093fi
edfaf76d
LK
11094rm -f conftest.err conftest.$ac_objext \
11095 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11096LIBS=$ac_check_lib_save_LIBS
11097fi
c0d27fcc 11098echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
11099echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
11100if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 11101 cat >>confdefs.h <<_ACEOF
98418dba 11102#define HAVE_LIBXMU 1
c0d27fcc 11103_ACEOF
98418dba
CW
11104
11105 LIBS="-lXmu $LIBS"
11106
11107fi
11108
11109 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11110fi
11111
11112# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11113if test "${HAVE_X11}" = "yes"; then
11114 if test "${USE_X_TOOLKIT}" != "none"; then
11115
c0d27fcc 11116echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
11117echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
11118if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
11119 echo $ECHO_N "(cached) $ECHO_C" >&6
11120else
11121 ac_check_lib_save_LIBS=$LIBS
11122LIBS="-lXext $LIBS"
11123cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11124/* confdefs.h. */
11125_ACEOF
11126cat confdefs.h >>conftest.$ac_ext
11127cat >>conftest.$ac_ext <<_ACEOF
11128/* end confdefs.h. */
98418dba
CW
11129
11130/* Override any gcc2 internal prototype to avoid an error. */
11131#ifdef __cplusplus
11132extern "C"
11133#endif
11134/* We use char because int might match the return type of a gcc2
11135 builtin and then its argument prototype would still apply. */
11136char XShapeQueryExtension ();
98418dba
CW
11137int
11138main ()
11139{
11140XShapeQueryExtension ();
11141 ;
11142 return 0;
11143}
11144_ACEOF
11145rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11147 (eval $ac_link) 2>conftest.er1
98418dba 11148 ac_status=$?
edfaf76d
LK
11149 grep -v '^ *+' conftest.er1 >conftest.err
11150 rm -f conftest.er1
11151 cat conftest.err >&5
c0d27fcc 11152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11153 (exit $ac_status); } &&
e143ad11
AS
11154 { ac_try='test -z "$ac_c_werror_flag"
11155 || test ! -s conftest.err'
edfaf76d
LK
11156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11157 (eval $ac_try) 2>&5
11158 ac_status=$?
11159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11160 (exit $ac_status); }; } &&
11161 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11163 (eval $ac_try) 2>&5
11164 ac_status=$?
c0d27fcc 11165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11166 (exit $ac_status); }; }; then
11167 ac_cv_lib_Xext_XShapeQueryExtension=yes
11168else
11169 echo "$as_me: failed program was:" >&5
19650fd6
AS
11170sed 's/^/| /' conftest.$ac_ext >&5
11171
98418dba
CW
11172ac_cv_lib_Xext_XShapeQueryExtension=no
11173fi
edfaf76d
LK
11174rm -f conftest.err conftest.$ac_objext \
11175 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11176LIBS=$ac_check_lib_save_LIBS
11177fi
c0d27fcc 11178echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
11179echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
11180if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 11181 cat >>confdefs.h <<_ACEOF
98418dba 11182#define HAVE_LIBXEXT 1
c0d27fcc 11183_ACEOF
98418dba
CW
11184
11185 LIBS="-lXext $LIBS"
11186
11187fi
11188
11189 fi
11190fi
11191
11192if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 11193 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
11194echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
11195if test "${emacs_cv_motif_version_2_1+set}" = set; then
11196 echo $ECHO_N "(cached) $ECHO_C" >&6
11197else
11198 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11199/* confdefs.h. */
11200_ACEOF
11201cat confdefs.h >>conftest.$ac_ext
11202cat >>conftest.$ac_ext <<_ACEOF
11203/* end confdefs.h. */
98418dba 11204#include <Xm/Xm.h>
98418dba
CW
11205int
11206main ()
11207{
11208#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
11209int x = 5;
11210#else
11211Motif version prior to 2.1.
11212#endif
11213 ;
11214 return 0;
11215}
11216_ACEOF
11217rm -f conftest.$ac_objext
c0d27fcc 11218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11219 (eval $ac_compile) 2>conftest.er1
98418dba 11220 ac_status=$?
edfaf76d
LK
11221 grep -v '^ *+' conftest.er1 >conftest.err
11222 rm -f conftest.er1
11223 cat conftest.err >&5
c0d27fcc 11224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11225 (exit $ac_status); } &&
e143ad11
AS
11226 { ac_try='test -z "$ac_c_werror_flag"
11227 || test ! -s conftest.err'
edfaf76d
LK
11228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11229 (eval $ac_try) 2>&5
11230 ac_status=$?
11231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11232 (exit $ac_status); }; } &&
11233 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 11234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11235 (eval $ac_try) 2>&5
11236 ac_status=$?
c0d27fcc 11237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11238 (exit $ac_status); }; }; then
11239 emacs_cv_motif_version_2_1=yes
11240else
11241 echo "$as_me: failed program was:" >&5
19650fd6
AS
11242sed 's/^/| /' conftest.$ac_ext >&5
11243
98418dba
CW
11244emacs_cv_motif_version_2_1=no
11245fi
edfaf76d 11246rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 11247fi
c0d27fcc 11248echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
11249echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
11250 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
11251 if test $emacs_cv_motif_version_2_1 = yes; then
11252 HAVE_LIBXP=no
b936fae4 11253
c0d27fcc 11254cat >>confdefs.h <<\_ACEOF
98418dba 11255#define HAVE_MOTIF_2_1 1
c0d27fcc 11256_ACEOF
98418dba 11257
c0d27fcc 11258 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
11259echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
11260if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
11261 echo $ECHO_N "(cached) $ECHO_C" >&6
11262else
11263 ac_check_lib_save_LIBS=$LIBS
11264LIBS="-lXp $LIBS"
11265cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11266/* confdefs.h. */
11267_ACEOF
11268cat confdefs.h >>conftest.$ac_ext
11269cat >>conftest.$ac_ext <<_ACEOF
11270/* end confdefs.h. */
98418dba
CW
11271
11272/* Override any gcc2 internal prototype to avoid an error. */
11273#ifdef __cplusplus
11274extern "C"
11275#endif
11276/* We use char because int might match the return type of a gcc2
11277 builtin and then its argument prototype would still apply. */
11278char XpCreateContext ();
98418dba
CW
11279int
11280main ()
11281{
11282XpCreateContext ();
11283 ;
11284 return 0;
11285}
11286_ACEOF
11287rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11288if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11289 (eval $ac_link) 2>conftest.er1
98418dba 11290 ac_status=$?
edfaf76d
LK
11291 grep -v '^ *+' conftest.er1 >conftest.err
11292 rm -f conftest.er1
11293 cat conftest.err >&5
c0d27fcc 11294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11295 (exit $ac_status); } &&
e143ad11
AS
11296 { ac_try='test -z "$ac_c_werror_flag"
11297 || test ! -s conftest.err'
edfaf76d
LK
11298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11299 (eval $ac_try) 2>&5
11300 ac_status=$?
11301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11302 (exit $ac_status); }; } &&
11303 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11305 (eval $ac_try) 2>&5
11306 ac_status=$?
c0d27fcc 11307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11308 (exit $ac_status); }; }; then
11309 ac_cv_lib_Xp_XpCreateContext=yes
11310else
11311 echo "$as_me: failed program was:" >&5
19650fd6
AS
11312sed 's/^/| /' conftest.$ac_ext >&5
11313
98418dba
CW
11314ac_cv_lib_Xp_XpCreateContext=no
11315fi
edfaf76d
LK
11316rm -f conftest.err conftest.$ac_objext \
11317 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11318LIBS=$ac_check_lib_save_LIBS
11319fi
c0d27fcc 11320echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
11321echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
11322if test $ac_cv_lib_Xp_XpCreateContext = yes; then
11323 HAVE_LIBXP=yes
11324fi
503d2be0 11325
98418dba 11326 if test ${HAVE_LIBXP} = yes; then
b936fae4 11327
c0d27fcc 11328cat >>confdefs.h <<\_ACEOF
98418dba 11329#define HAVE_LIBXP 1
c0d27fcc 11330_ACEOF
503d2be0 11331
98418dba 11332 fi
4693dbc9
SM
11333 else
11334 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
11335echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
11336if test "${emacs_cv_lesstif+set}" = set; then
11337 echo $ECHO_N "(cached) $ECHO_C" >&6
11338else
11339 # We put this in CFLAGS temporarily to precede other -I options
11340 # that might be in CFLAGS temporarily.
11341 # We put this in CPPFLAGS where it precedes the other -I options.
11342 OLD_CPPFLAGS=$CPPFLAGS
11343 OLD_CFLAGS=$CFLAGS
11344 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
11345 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
11346 cat >conftest.$ac_ext <<_ACEOF
11347/* confdefs.h. */
11348_ACEOF
11349cat confdefs.h >>conftest.$ac_ext
11350cat >>conftest.$ac_ext <<_ACEOF
11351/* end confdefs.h. */
11352#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
11353int
11354main ()
11355{
11356int x = 5;
11357 ;
11358 return 0;
11359}
11360_ACEOF
11361rm -f conftest.$ac_objext
11362if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11363 (eval $ac_compile) 2>conftest.er1
4693dbc9 11364 ac_status=$?
edfaf76d
LK
11365 grep -v '^ *+' conftest.er1 >conftest.err
11366 rm -f conftest.er1
11367 cat conftest.err >&5
4693dbc9
SM
11368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11369 (exit $ac_status); } &&
e143ad11
AS
11370 { ac_try='test -z "$ac_c_werror_flag"
11371 || test ! -s conftest.err'
edfaf76d
LK
11372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11373 (eval $ac_try) 2>&5
11374 ac_status=$?
11375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11376 (exit $ac_status); }; } &&
11377 { ac_try='test -s conftest.$ac_objext'
4693dbc9
SM
11378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11379 (eval $ac_try) 2>&5
11380 ac_status=$?
11381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11382 (exit $ac_status); }; }; then
11383 emacs_cv_lesstif=yes
11384else
11385 echo "$as_me: failed program was:" >&5
11386sed 's/^/| /' conftest.$ac_ext >&5
11387
11388emacs_cv_lesstif=no
11389fi
edfaf76d 11390rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9
SM
11391fi
11392echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
11393echo "${ECHO_T}$emacs_cv_lesstif" >&6
11394 if test $emacs_cv_lesstif = yes; then
11395 # Make sure this -I option remains in CPPFLAGS after it is set
11396 # back to REAL_CPPFLAGS.
11397 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
11398 # have those other -I options anyway. Ultimately, having this
11399 # directory ultimately in CPPFLAGS will be enough.
11400 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
11401 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
11402 else
11403 CFLAGS=$OLD_CFLAGS
11404 CPPFLAGS=$OLD_CPPFLAGS
11405 fi
98418dba
CW
11406 fi
11407fi
11408
11409### Is -lXaw3d available?
11410HAVE_XAW3D=no
11411if test "${HAVE_X11}" = "yes"; then
11412 if test "${USE_X_TOOLKIT}" != "none"; then
22044edf 11413 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
11414echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
11415if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
11416 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11417else
22044edf 11418 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11419/* confdefs.h. */
11420_ACEOF
11421cat confdefs.h >>conftest.$ac_ext
11422cat >>conftest.$ac_ext <<_ACEOF
11423/* end confdefs.h. */
98418dba 11424#include <X11/Xaw3d/Scrollbar.h>
503d2be0 11425_ACEOF
c0d27fcc 11426if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11427 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11428 ac_status=$?
6bae0ccf 11429 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11430 rm -f conftest.er1
11431 cat conftest.err >&5
c0d27fcc 11432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11433 (exit $ac_status); } >/dev/null; then
11434 if test -s conftest.err; then
11435 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 11436 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
11437 else
11438 ac_cpp_err=
11439 fi
11440else
11441 ac_cpp_err=yes
11442fi
11443if test -z "$ac_cpp_err"; then
22044edf 11444 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 11445else
503d2be0 11446 echo "$as_me: failed program was:" >&5
19650fd6
AS
11447sed 's/^/| /' conftest.$ac_ext >&5
11448
22044edf 11449 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 11450fi
503d2be0 11451rm -f conftest.err conftest.$ac_ext
98418dba 11452fi
c0d27fcc 11453echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 11454echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 11455if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 11456 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
11457echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
11458if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
11459 echo $ECHO_N "(cached) $ECHO_C" >&6
11460else
11461 ac_check_lib_save_LIBS=$LIBS
11462LIBS="-lXaw3d $LIBS"
11463cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11464/* confdefs.h. */
11465_ACEOF
11466cat confdefs.h >>conftest.$ac_ext
11467cat >>conftest.$ac_ext <<_ACEOF
11468/* end confdefs.h. */
98418dba
CW
11469
11470/* Override any gcc2 internal prototype to avoid an error. */
11471#ifdef __cplusplus
11472extern "C"
11473#endif
11474/* We use char because int might match the return type of a gcc2
11475 builtin and then its argument prototype would still apply. */
11476char XawScrollbarSetThumb ();
503d2be0
AS
11477int
11478main ()
11479{
98418dba 11480XawScrollbarSetThumb ();
503d2be0
AS
11481 ;
11482 return 0;
11483}
11484_ACEOF
11485rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11487 (eval $ac_link) 2>conftest.er1
503d2be0 11488 ac_status=$?
edfaf76d
LK
11489 grep -v '^ *+' conftest.er1 >conftest.err
11490 rm -f conftest.er1
11491 cat conftest.err >&5
c0d27fcc 11492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11493 (exit $ac_status); } &&
e143ad11
AS
11494 { ac_try='test -z "$ac_c_werror_flag"
11495 || test ! -s conftest.err'
edfaf76d
LK
11496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11497 (eval $ac_try) 2>&5
11498 ac_status=$?
11499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11500 (exit $ac_status); }; } &&
11501 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11503 (eval $ac_try) 2>&5
11504 ac_status=$?
c0d27fcc 11505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11506 (exit $ac_status); }; }; then
98418dba 11507 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 11508else
503d2be0 11509 echo "$as_me: failed program was:" >&5
19650fd6
AS
11510sed 's/^/| /' conftest.$ac_ext >&5
11511
98418dba 11512ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 11513fi
edfaf76d
LK
11514rm -f conftest.err conftest.$ac_objext \
11515 conftest$ac_exeext conftest.$ac_ext
98418dba 11516LIBS=$ac_check_lib_save_LIBS
ba4481b5 11517fi
c0d27fcc 11518echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
11519echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
11520if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
11521 HAVE_XAW3D=yes
ba4481b5 11522fi
503d2be0 11523
ba4481b5
DL
11524fi
11525
c0d27fcc 11526
98418dba 11527 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 11528
c0d27fcc 11529cat >>confdefs.h <<\_ACEOF
98418dba 11530#define HAVE_XAW3D 1
c0d27fcc 11531_ACEOF
98418dba 11532
ba4481b5 11533 fi
98418dba 11534 fi
ba4481b5
DL
11535fi
11536
c0d27fcc
MR
11537
11538
98418dba
CW
11539USE_TOOLKIT_SCROLL_BARS=no
11540if test "${with_toolkit_scroll_bars}" != "no"; then
11541 if test "${USE_X_TOOLKIT}" != "none"; then
11542 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 11543 cat >>confdefs.h <<\_ACEOF
98418dba 11544#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11545_ACEOF
98418dba
CW
11546
11547 HAVE_XAW3D=no
11548 USE_TOOLKIT_SCROLL_BARS=yes
11549 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 11550 cat >>confdefs.h <<\_ACEOF
98418dba 11551#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11552_ACEOF
98418dba
CW
11553
11554 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 11555 fi
488dd4c4
JD
11556 elif test "${HAVE_GTK}" = "yes"; then
11557 cat >>confdefs.h <<\_ACEOF
11558#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
11559_ACEOF
11560
11561 USE_TOOLKIT_SCROLL_BARS=yes
11562 elif test "${HAVE_CARBON}" = "yes"; then
11563 cat >>confdefs.h <<\_ACEOF
11564#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
11565_ACEOF
11566
11567 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
11568 fi
11569fi
11570
abd39b57 11571cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
11572/* confdefs.h. */
11573_ACEOF
11574cat confdefs.h >>conftest.$ac_ext
11575cat >>conftest.$ac_ext <<_ACEOF
11576/* end confdefs.h. */
11577
11578 #include <X11/Xlib.h>
11579 #include <X11/Xresource.h>
11580int
11581main ()
11582{
11583XIMProc callback;
11584 ;
11585 return 0;
11586}
11587_ACEOF
11588rm -f conftest.$ac_objext
11589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11590 (eval $ac_compile) 2>conftest.er1
abd39b57 11591 ac_status=$?
edfaf76d
LK
11592 grep -v '^ *+' conftest.er1 >conftest.err
11593 rm -f conftest.er1
11594 cat conftest.err >&5
abd39b57
AC
11595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11596 (exit $ac_status); } &&
e143ad11
AS
11597 { ac_try='test -z "$ac_c_werror_flag"
11598 || test ! -s conftest.err'
edfaf76d
LK
11599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11600 (eval $ac_try) 2>&5
11601 ac_status=$?
11602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11603 (exit $ac_status); }; } &&
11604 { ac_try='test -s conftest.$ac_objext'
abd39b57
AC
11605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11606 (eval $ac_try) 2>&5
11607 ac_status=$?
11608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11609 (exit $ac_status); }; }; then
11610 HAVE_XIM=yes
11611
11612cat >>confdefs.h <<\_ACEOF
11613#define HAVE_XIM 1
11614_ACEOF
11615
11616else
11617 echo "$as_me: failed program was:" >&5
11618sed 's/^/| /' conftest.$ac_ext >&5
11619
11620HAVE_XIM=no
11621fi
edfaf76d 11622rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 11623
c0d27fcc 11624
98418dba 11625if test "${with_xim}" != "no"; then
b936fae4 11626
c0d27fcc 11627cat >>confdefs.h <<\_ACEOF
98418dba 11628#define USE_XIM 1
c0d27fcc 11629_ACEOF
98418dba 11630
793fa0d7 11631fi
abd39b57
AC
11632
11633
11634if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
11635 late_CFLAGS=$CFLAGS
11636 if test "$GCC" = yes; then
11637 CFLAGS="$CFLAGS --pedantic-errors"
11638 fi
cffcede7 11639 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11640/* confdefs.h. */
11641_ACEOF
11642cat confdefs.h >>conftest.$ac_ext
11643cat >>conftest.$ac_ext <<_ACEOF
11644/* end confdefs.h. */
cffcede7
JD
11645
11646#include <X11/Xlib.h>
11647#include <X11/Xresource.h>
11648int
11649main ()
11650{
11651Display *display;
11652XrmDatabase db;
11653char *res_name;
11654char *res_class;
11655XIMProc callback;
11656XPointer *client_data;
849d80cf
DL
11657#ifndef __GNUC__
11658/* If we're not using GCC, it's probably not XFree86, and this is
11659 probably right, but we can't use something like --pedantic-errors. */
11660extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11661 char*, XIMProc, XPointer*);
11662#endif
cffcede7
JD
11663(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11664 client_data);
11665 ;
11666 return 0;
11667}
11668_ACEOF
11669rm -f conftest.$ac_objext
11670if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11671 (eval $ac_compile) 2>conftest.er1
cffcede7 11672 ac_status=$?
edfaf76d
LK
11673 grep -v '^ *+' conftest.er1 >conftest.err
11674 rm -f conftest.er1
11675 cat conftest.err >&5
cffcede7
JD
11676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11677 (exit $ac_status); } &&
e143ad11
AS
11678 { ac_try='test -z "$ac_c_werror_flag"
11679 || test ! -s conftest.err'
edfaf76d
LK
11680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11681 (eval $ac_try) 2>&5
11682 ac_status=$?
11683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11684 (exit $ac_status); }; } &&
11685 { ac_try='test -s conftest.$ac_objext'
cffcede7
JD
11686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11687 (eval $ac_try) 2>&5
11688 ac_status=$?
11689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11690 (exit $ac_status); }; }; then
11691 emacs_cv_arg6_star=yes
11692else
11693 echo "$as_me: failed program was:" >&5
19650fd6
AS
11694sed 's/^/| /' conftest.$ac_ext >&5
11695
cffcede7 11696fi
edfaf76d 11697rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
11698
11699 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 11700 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11701#define XRegisterIMInstantiateCallback_arg6 XPointer*
11702_ACEOF
11703
11704 else
f57bd967 11705 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11706#define XRegisterIMInstantiateCallback_arg6 XPointer
11707_ACEOF
11708
11709 fi
849d80cf 11710 CFLAGS=$late_CFLAGS
98418dba
CW
11711fi
11712
11713### Use -lXpm if available, unless `--with-xpm=no'.
11714HAVE_XPM=no
11715if test "${HAVE_X11}" = "yes"; then
11716 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
11717 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11718 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
11719echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11720if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11721 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11722fi
11723echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
11724echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 11725else
c0d27fcc
MR
11726 # Is the header compilable?
11727echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
11728echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
11729cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11730/* confdefs.h. */
11731_ACEOF
11732cat confdefs.h >>conftest.$ac_ext
11733cat >>conftest.$ac_ext <<_ACEOF
11734/* end confdefs.h. */
c0d27fcc
MR
11735$ac_includes_default
11736#include <X11/xpm.h>
11737_ACEOF
11738rm -f conftest.$ac_objext
11739if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11740 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11741 ac_status=$?
edfaf76d
LK
11742 grep -v '^ *+' conftest.er1 >conftest.err
11743 rm -f conftest.er1
11744 cat conftest.err >&5
c0d27fcc
MR
11745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11746 (exit $ac_status); } &&
e143ad11
AS
11747 { ac_try='test -z "$ac_c_werror_flag"
11748 || test ! -s conftest.err'
edfaf76d
LK
11749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11750 (eval $ac_try) 2>&5
11751 ac_status=$?
11752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11753 (exit $ac_status); }; } &&
11754 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11756 (eval $ac_try) 2>&5
11757 ac_status=$?
11758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11759 (exit $ac_status); }; }; then
11760 ac_header_compiler=yes
11761else
11762 echo "$as_me: failed program was:" >&5
19650fd6
AS
11763sed 's/^/| /' conftest.$ac_ext >&5
11764
c0d27fcc
MR
11765ac_header_compiler=no
11766fi
edfaf76d 11767rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11768echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11769echo "${ECHO_T}$ac_header_compiler" >&6
11770
11771# Is the header present?
11772echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
11773echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
11774cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11775/* confdefs.h. */
11776_ACEOF
11777cat confdefs.h >>conftest.$ac_ext
11778cat >>conftest.$ac_ext <<_ACEOF
11779/* end confdefs.h. */
98418dba
CW
11780#include <X11/xpm.h>
11781_ACEOF
c0d27fcc 11782if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11783 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11784 ac_status=$?
6bae0ccf 11785 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11786 rm -f conftest.er1
11787 cat conftest.err >&5
c0d27fcc 11788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11789 (exit $ac_status); } >/dev/null; then
11790 if test -s conftest.err; then
11791 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 11792 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11793 else
11794 ac_cpp_err=
11795 fi
11796else
11797 ac_cpp_err=yes
11798fi
11799if test -z "$ac_cpp_err"; then
c0d27fcc 11800 ac_header_preproc=yes
98418dba
CW
11801else
11802 echo "$as_me: failed program was:" >&5
19650fd6
AS
11803sed 's/^/| /' conftest.$ac_ext >&5
11804
c0d27fcc 11805 ac_header_preproc=no
98418dba
CW
11806fi
11807rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11808echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11809echo "${ECHO_T}$ac_header_preproc" >&6
11810
11811# So? What about this header?
edfaf76d
LK
11812case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11813 yes:no: )
c0d27fcc
MR
11814 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
11815echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11816 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
11817echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
11818 ac_header_preproc=yes
11819 ;;
11820 no:yes:* )
11821 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
11822echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
11823 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
11824echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
11825 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
11826echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
11827 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
11828echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
11829 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
11830echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11831 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
11832echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
7c9e5167
JD
11833 (
11834 cat <<\_ASBOX
edfaf76d
LK
11835## ------------------------------------------ ##
11836## Report this to the AC_PACKAGE_NAME lists. ##
11837## ------------------------------------------ ##
19650fd6
AS
11838_ASBOX
11839 ) |
11840 sed "s/^/$as_me: WARNING: /" >&2
11841 ;;
c0d27fcc
MR
11842esac
11843echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
11844echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11845if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11846 echo $ECHO_N "(cached) $ECHO_C" >&6
11847else
11848 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 11849fi
c0d27fcc 11850echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 11851echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
11852
11853fi
98418dba 11854if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 11855 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
11856echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
11857if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 11858 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11859else
98418dba
CW
11860 ac_check_lib_save_LIBS=$LIBS
11861LIBS="-lXpm -lX11 $LIBS"
11862cat >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 11868
ba4481b5 11869/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11870#ifdef __cplusplus
11871extern "C"
11872#endif
ba4481b5 11873/* We use char because int might match the return type of a gcc2
503d2be0 11874 builtin and then its argument prototype would still apply. */
98418dba 11875char XpmReadFileToPixmap ();
503d2be0
AS
11876int
11877main ()
11878{
98418dba 11879XpmReadFileToPixmap ();
503d2be0
AS
11880 ;
11881 return 0;
11882}
11883_ACEOF
11884rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11885if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11886 (eval $ac_link) 2>conftest.er1
503d2be0 11887 ac_status=$?
edfaf76d
LK
11888 grep -v '^ *+' conftest.er1 >conftest.err
11889 rm -f conftest.er1
11890 cat conftest.err >&5
c0d27fcc 11891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11892 (exit $ac_status); } &&
e143ad11
AS
11893 { ac_try='test -z "$ac_c_werror_flag"
11894 || test ! -s conftest.err'
edfaf76d
LK
11895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11896 (eval $ac_try) 2>&5
11897 ac_status=$?
11898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11899 (exit $ac_status); }; } &&
11900 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11902 (eval $ac_try) 2>&5
11903 ac_status=$?
c0d27fcc 11904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11905 (exit $ac_status); }; }; then
98418dba 11906 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
11907else
11908 echo "$as_me: failed program was:" >&5
19650fd6
AS
11909sed 's/^/| /' conftest.$ac_ext >&5
11910
98418dba 11911ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 11912fi
edfaf76d
LK
11913rm -f conftest.err conftest.$ac_objext \
11914 conftest$ac_exeext conftest.$ac_ext
98418dba 11915LIBS=$ac_check_lib_save_LIBS
503d2be0 11916fi
c0d27fcc 11917echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
11918echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
11919if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
11920 HAVE_XPM=yes
ba4481b5
DL
11921fi
11922
98418dba
CW
11923fi
11924
c0d27fcc 11925
98418dba 11926 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11927 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
11928echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
11929 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11930/* confdefs.h. */
11931_ACEOF
11932cat confdefs.h >>conftest.$ac_ext
11933cat >>conftest.$ac_ext <<_ACEOF
11934/* end confdefs.h. */
98418dba
CW
11935#include "X11/xpm.h"
11936#ifndef XpmReturnAllocPixels
11937no_return_alloc_pixels
503d2be0 11938#endif
ba4481b5 11939
98418dba
CW
11940_ACEOF
11941if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11942 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
11943 HAVE_XPM=no
11944else
11945 HAVE_XPM=yes
11946fi
11947rm -f conftest*
ba4481b5 11948
c0d27fcc 11949
98418dba 11950 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11951 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
11952echo "${ECHO_T}yes" >&6
11953 else
c0d27fcc 11954 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
11955echo "${ECHO_T}no" >&6
11956 fi
11957 fi
11958 fi
11959
11960 if test "${HAVE_XPM}" = "yes"; then
b936fae4 11961
c0d27fcc 11962cat >>confdefs.h <<\_ACEOF
98418dba 11963#define HAVE_XPM 1
c0d27fcc 11964_ACEOF
98418dba
CW
11965
11966 fi
11967fi
11968
11969### Use -ljpeg if available, unless `--with-jpeg=no'.
11970HAVE_JPEG=no
11971if test "${HAVE_X11}" = "yes"; then
11972 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
11973 if test "${ac_cv_header_jerror_h+set}" = set; then
11974 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
11975echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11976if test "${ac_cv_header_jerror_h+set}" = set; then
11977 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11978fi
11979echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
11980echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 11981else
c0d27fcc
MR
11982 # Is the header compilable?
11983echo "$as_me:$LINENO: checking jerror.h usability" >&5
11984echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
11985cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11986/* confdefs.h. */
11987_ACEOF
11988cat confdefs.h >>conftest.$ac_ext
11989cat >>conftest.$ac_ext <<_ACEOF
11990/* end confdefs.h. */
c0d27fcc
MR
11991$ac_includes_default
11992#include <jerror.h>
11993_ACEOF
11994rm -f conftest.$ac_objext
11995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11996 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11997 ac_status=$?
edfaf76d
LK
11998 grep -v '^ *+' conftest.er1 >conftest.err
11999 rm -f conftest.er1
12000 cat conftest.err >&5
c0d27fcc
MR
12001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12002 (exit $ac_status); } &&
e143ad11
AS
12003 { ac_try='test -z "$ac_c_werror_flag"
12004 || test ! -s conftest.err'
edfaf76d
LK
12005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12006 (eval $ac_try) 2>&5
12007 ac_status=$?
12008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12009 (exit $ac_status); }; } &&
12010 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12012 (eval $ac_try) 2>&5
12013 ac_status=$?
12014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12015 (exit $ac_status); }; }; then
12016 ac_header_compiler=yes
12017else
12018 echo "$as_me: failed program was:" >&5
19650fd6
AS
12019sed 's/^/| /' conftest.$ac_ext >&5
12020
c0d27fcc
MR
12021ac_header_compiler=no
12022fi
edfaf76d 12023rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12024echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12025echo "${ECHO_T}$ac_header_compiler" >&6
12026
12027# Is the header present?
12028echo "$as_me:$LINENO: checking jerror.h presence" >&5
12029echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
12030cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12031/* confdefs.h. */
12032_ACEOF
12033cat confdefs.h >>conftest.$ac_ext
12034cat >>conftest.$ac_ext <<_ACEOF
12035/* end confdefs.h. */
98418dba
CW
12036#include <jerror.h>
12037_ACEOF
c0d27fcc 12038if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12039 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12040 ac_status=$?
6bae0ccf 12041 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12042 rm -f conftest.er1
12043 cat conftest.err >&5
c0d27fcc 12044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12045 (exit $ac_status); } >/dev/null; then
12046 if test -s conftest.err; then
12047 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12048 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12049 else
12050 ac_cpp_err=
12051 fi
12052else
12053 ac_cpp_err=yes
503d2be0 12054fi
98418dba 12055if test -z "$ac_cpp_err"; then
c0d27fcc 12056 ac_header_preproc=yes
ba4481b5 12057else
98418dba 12058 echo "$as_me: failed program was:" >&5
19650fd6
AS
12059sed 's/^/| /' conftest.$ac_ext >&5
12060
c0d27fcc 12061 ac_header_preproc=no
98418dba
CW
12062fi
12063rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12064echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12065echo "${ECHO_T}$ac_header_preproc" >&6
12066
12067# So? What about this header?
edfaf76d
LK
12068case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12069 yes:no: )
c0d27fcc
MR
12070 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
12071echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12072 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
12073echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
12074 ac_header_preproc=yes
19650fd6 12075 ;;
edfaf76d 12076 no:yes:* )
c0d27fcc
MR
12077 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
12078echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12079 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
12080echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
12081 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
12082echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
12083 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
12084echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12085 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 12086echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12087 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
12088echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12089 (
12090 cat <<\_ASBOX
edfaf76d
LK
12091## ------------------------------------------ ##
12092## Report this to the AC_PACKAGE_NAME lists. ##
12093## ------------------------------------------ ##
19650fd6
AS
12094_ASBOX
12095 ) |
12096 sed "s/^/$as_me: WARNING: /" >&2
12097 ;;
c0d27fcc
MR
12098esac
12099echo "$as_me:$LINENO: checking for jerror.h" >&5
12100echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
12101if test "${ac_cv_header_jerror_h+set}" = set; then
12102 echo $ECHO_N "(cached) $ECHO_C" >&6
12103else
12104 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 12105fi
c0d27fcc 12106echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 12107echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
12108
12109fi
98418dba 12110if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 12111 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
12112echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
12113if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 12114 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12115else
98418dba
CW
12116 ac_check_lib_save_LIBS=$LIBS
12117LIBS="-ljpeg $LIBS"
12118cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12119/* confdefs.h. */
12120_ACEOF
12121cat confdefs.h >>conftest.$ac_ext
12122cat >>conftest.$ac_ext <<_ACEOF
12123/* end confdefs.h. */
98418dba
CW
12124
12125/* Override any gcc2 internal prototype to avoid an error. */
12126#ifdef __cplusplus
12127extern "C"
12128#endif
12129/* We use char because int might match the return type of a gcc2
12130 builtin and then its argument prototype would still apply. */
12131char jpeg_destroy_compress ();
503d2be0
AS
12132int
12133main ()
12134{
98418dba 12135jpeg_destroy_compress ();
503d2be0
AS
12136 ;
12137 return 0;
12138}
12139_ACEOF
12140rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12141if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12142 (eval $ac_link) 2>conftest.er1
503d2be0 12143 ac_status=$?
edfaf76d
LK
12144 grep -v '^ *+' conftest.er1 >conftest.err
12145 rm -f conftest.er1
12146 cat conftest.err >&5
c0d27fcc 12147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12148 (exit $ac_status); } &&
e143ad11
AS
12149 { ac_try='test -z "$ac_c_werror_flag"
12150 || test ! -s conftest.err'
edfaf76d
LK
12151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12152 (eval $ac_try) 2>&5
12153 ac_status=$?
12154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12155 (exit $ac_status); }; } &&
12156 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12158 (eval $ac_try) 2>&5
12159 ac_status=$?
c0d27fcc 12160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12161 (exit $ac_status); }; }; then
98418dba 12162 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 12163else
503d2be0 12164 echo "$as_me: failed program was:" >&5
19650fd6
AS
12165sed 's/^/| /' conftest.$ac_ext >&5
12166
98418dba 12167ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 12168fi
edfaf76d
LK
12169rm -f conftest.err conftest.$ac_objext \
12170 conftest$ac_exeext conftest.$ac_ext
98418dba 12171LIBS=$ac_check_lib_save_LIBS
ba4481b5 12172fi
c0d27fcc 12173echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
12174echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
12175if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
12176 HAVE_JPEG=yes
ba4481b5 12177fi
98418dba 12178
ba4481b5 12179fi
98418dba 12180
c0d27fcc 12181
ba4481b5 12182 fi
ba4481b5 12183
c0d27fcc 12184
98418dba 12185 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 12186 cat >>confdefs.h <<\_ACEOF
98418dba 12187#define HAVE_JPEG 1
c0d27fcc 12188_ACEOF
98418dba
CW
12189
12190 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12191/* confdefs.h. */
12192_ACEOF
12193cat confdefs.h >>conftest.$ac_ext
12194cat >>conftest.$ac_ext <<_ACEOF
12195/* end confdefs.h. */
22044edf 12196#include <jpeglib.h>
98418dba
CW
12197 version=JPEG_LIB_VERSION
12198
12199_ACEOF
12200if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 12201 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 12202 cat >>confdefs.h <<\_ACEOF
98418dba 12203#define HAVE_JPEG 1
c0d27fcc 12204_ACEOF
ba4481b5 12205
98418dba 12206else
c0d27fcc 12207 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
12208echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12209 HAVE_JPEG=no
ba4481b5 12210fi
98418dba 12211rm -f conftest*
ba4481b5 12212
98418dba
CW
12213 fi
12214fi
503d2be0 12215
98418dba
CW
12216### Use -lpng if available, unless `--with-png=no'.
12217HAVE_PNG=no
12218if test "${HAVE_X11}" = "yes"; then
12219 if test "${with_png}" != "no"; then
f57bd967
DL
12220 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12221 # in /usr/include/libpng.
12222
12223
12224for ac_header in png.h libpng/png.h
12225do
12226as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12227if eval "test \"\${$as_ac_Header+set}\" = set"; then
12228 echo "$as_me:$LINENO: checking for $ac_header" >&5
12229echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12230if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 12231 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 12232fi
f57bd967
DL
12233echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12234echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
503d2be0 12235else
c0d27fcc 12236 # Is the header compilable?
f57bd967
DL
12237echo "$as_me:$LINENO: checking $ac_header usability" >&5
12238echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
c0d27fcc 12239cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12240/* confdefs.h. */
12241_ACEOF
12242cat confdefs.h >>conftest.$ac_ext
12243cat >>conftest.$ac_ext <<_ACEOF
12244/* end confdefs.h. */
c0d27fcc 12245$ac_includes_default
f57bd967 12246#include <$ac_header>
c0d27fcc
MR
12247_ACEOF
12248rm -f conftest.$ac_objext
12249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12250 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12251 ac_status=$?
edfaf76d
LK
12252 grep -v '^ *+' conftest.er1 >conftest.err
12253 rm -f conftest.er1
12254 cat conftest.err >&5
c0d27fcc
MR
12255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12256 (exit $ac_status); } &&
e143ad11
AS
12257 { ac_try='test -z "$ac_c_werror_flag"
12258 || test ! -s conftest.err'
edfaf76d
LK
12259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12260 (eval $ac_try) 2>&5
12261 ac_status=$?
12262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12263 (exit $ac_status); }; } &&
12264 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12266 (eval $ac_try) 2>&5
12267 ac_status=$?
12268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12269 (exit $ac_status); }; }; then
12270 ac_header_compiler=yes
12271else
12272 echo "$as_me: failed program was:" >&5
19650fd6
AS
12273sed 's/^/| /' conftest.$ac_ext >&5
12274
c0d27fcc
MR
12275ac_header_compiler=no
12276fi
edfaf76d 12277rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12278echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12279echo "${ECHO_T}$ac_header_compiler" >&6
12280
12281# Is the header present?
f57bd967
DL
12282echo "$as_me:$LINENO: checking $ac_header presence" >&5
12283echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
c0d27fcc 12284cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12285/* confdefs.h. */
12286_ACEOF
12287cat confdefs.h >>conftest.$ac_ext
12288cat >>conftest.$ac_ext <<_ACEOF
12289/* end confdefs.h. */
f57bd967 12290#include <$ac_header>
503d2be0 12291_ACEOF
c0d27fcc 12292if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
12293 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12294 ac_status=$?
6bae0ccf 12295 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
12296 rm -f conftest.er1
12297 cat conftest.err >&5
c0d27fcc 12298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12299 (exit $ac_status); } >/dev/null; then
12300 if test -s conftest.err; then
12301 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12302 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
12303 else
12304 ac_cpp_err=
12305 fi
12306else
12307 ac_cpp_err=yes
12308fi
12309if test -z "$ac_cpp_err"; then
c0d27fcc 12310 ac_header_preproc=yes
503d2be0
AS
12311else
12312 echo "$as_me: failed program was:" >&5
19650fd6
AS
12313sed 's/^/| /' conftest.$ac_ext >&5
12314
c0d27fcc 12315 ac_header_preproc=no
ba4481b5 12316fi
503d2be0 12317rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12318echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12319echo "${ECHO_T}$ac_header_preproc" >&6
12320
12321# So? What about this header?
edfaf76d
LK
12322case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12323 yes:no: )
f57bd967
DL
12324 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12325echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12326 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12327echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12328 ac_header_preproc=yes
19650fd6 12329 ;;
edfaf76d 12330 no:yes:* )
f57bd967
DL
12331 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12332echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
12333 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12334echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12335 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12336echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12337 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12338echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 12339 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 12340echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12341 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12342echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12343 (
12344 cat <<\_ASBOX
edfaf76d
LK
12345## ------------------------------------------ ##
12346## Report this to the AC_PACKAGE_NAME lists. ##
12347## ------------------------------------------ ##
19650fd6
AS
12348_ASBOX
12349 ) |
12350 sed "s/^/$as_me: WARNING: /" >&2
12351 ;;
c0d27fcc 12352esac
f57bd967
DL
12353echo "$as_me:$LINENO: checking for $ac_header" >&5
12354echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12355if eval "test \"\${$as_ac_Header+set}\" = set"; then
c0d27fcc
MR
12356 echo $ECHO_N "(cached) $ECHO_C" >&6
12357else
edfaf76d 12358 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967
DL
12359fi
12360echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12361echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12362
ba4481b5 12363fi
f57bd967
DL
12364if test `eval echo '${'$as_ac_Header'}'` = yes; then
12365 cat >>confdefs.h <<_ACEOF
12366#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12367_ACEOF
c0d27fcc
MR
12368
12369fi
f57bd967
DL
12370
12371done
12372
12373 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12374 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
12375echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
12376if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 12377 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12378else
98418dba
CW
12379 ac_check_lib_save_LIBS=$LIBS
12380LIBS="-lpng -lz -lm $LIBS"
12381cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12382/* confdefs.h. */
12383_ACEOF
12384cat confdefs.h >>conftest.$ac_ext
12385cat >>conftest.$ac_ext <<_ACEOF
12386/* end confdefs.h. */
98418dba 12387
ba4481b5 12388/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12389#ifdef __cplusplus
12390extern "C"
12391#endif
ba4481b5 12392/* We use char because int might match the return type of a gcc2
503d2be0 12393 builtin and then its argument prototype would still apply. */
98418dba 12394char png_get_channels ();
503d2be0
AS
12395int
12396main ()
12397{
98418dba 12398png_get_channels ();
503d2be0
AS
12399 ;
12400 return 0;
12401}
12402_ACEOF
12403rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12404if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12405 (eval $ac_link) 2>conftest.er1
503d2be0 12406 ac_status=$?
edfaf76d
LK
12407 grep -v '^ *+' conftest.er1 >conftest.err
12408 rm -f conftest.er1
12409 cat conftest.err >&5
c0d27fcc 12410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12411 (exit $ac_status); } &&
e143ad11
AS
12412 { ac_try='test -z "$ac_c_werror_flag"
12413 || test ! -s conftest.err'
edfaf76d
LK
12414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12415 (eval $ac_try) 2>&5
12416 ac_status=$?
12417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12418 (exit $ac_status); }; } &&
12419 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12421 (eval $ac_try) 2>&5
12422 ac_status=$?
c0d27fcc 12423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12424 (exit $ac_status); }; }; then
98418dba 12425 ac_cv_lib_png_png_get_channels=yes
73b77ee5 12426else
98418dba 12427 echo "$as_me: failed program was:" >&5
19650fd6
AS
12428sed 's/^/| /' conftest.$ac_ext >&5
12429
98418dba 12430ac_cv_lib_png_png_get_channels=no
73b77ee5 12431fi
edfaf76d
LK
12432rm -f conftest.err conftest.$ac_objext \
12433 conftest$ac_exeext conftest.$ac_ext
98418dba 12434LIBS=$ac_check_lib_save_LIBS
73b77ee5 12435fi
c0d27fcc 12436echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
12437echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
12438if test $ac_cv_lib_png_png_get_channels = yes; then
12439 HAVE_PNG=yes
73b77ee5 12440fi
503d2be0 12441
f57bd967 12442 fi
98418dba
CW
12443 fi
12444
12445 if test "${HAVE_PNG}" = "yes"; then
b936fae4 12446
c0d27fcc 12447cat >>confdefs.h <<\_ACEOF
98418dba 12448#define HAVE_PNG 1
c0d27fcc 12449_ACEOF
73b77ee5 12450
98418dba 12451 fi
73b77ee5
GM
12452fi
12453
98418dba
CW
12454### Use -ltiff if available, unless `--with-tiff=no'.
12455HAVE_TIFF=no
12456if test "${HAVE_X11}" = "yes"; then
12457 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
12458 if test "${ac_cv_header_tiffio_h+set}" = set; then
12459 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
12460echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12461if test "${ac_cv_header_tiffio_h+set}" = set; then
12462 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12463fi
12464echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
12465echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 12466else
c0d27fcc
MR
12467 # Is the header compilable?
12468echo "$as_me:$LINENO: checking tiffio.h usability" >&5
12469echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
12470cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12471/* confdefs.h. */
12472_ACEOF
12473cat confdefs.h >>conftest.$ac_ext
12474cat >>conftest.$ac_ext <<_ACEOF
12475/* end confdefs.h. */
c0d27fcc
MR
12476$ac_includes_default
12477#include <tiffio.h>
12478_ACEOF
12479rm -f conftest.$ac_objext
12480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12481 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12482 ac_status=$?
edfaf76d
LK
12483 grep -v '^ *+' conftest.er1 >conftest.err
12484 rm -f conftest.er1
12485 cat conftest.err >&5
c0d27fcc
MR
12486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12487 (exit $ac_status); } &&
e143ad11
AS
12488 { ac_try='test -z "$ac_c_werror_flag"
12489 || test ! -s conftest.err'
edfaf76d
LK
12490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12491 (eval $ac_try) 2>&5
12492 ac_status=$?
12493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12494 (exit $ac_status); }; } &&
12495 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12497 (eval $ac_try) 2>&5
12498 ac_status=$?
12499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12500 (exit $ac_status); }; }; then
12501 ac_header_compiler=yes
12502else
12503 echo "$as_me: failed program was:" >&5
19650fd6
AS
12504sed 's/^/| /' conftest.$ac_ext >&5
12505
c0d27fcc
MR
12506ac_header_compiler=no
12507fi
edfaf76d 12508rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12509echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12510echo "${ECHO_T}$ac_header_compiler" >&6
12511
12512# Is the header present?
12513echo "$as_me:$LINENO: checking tiffio.h presence" >&5
12514echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
12515cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12516/* confdefs.h. */
12517_ACEOF
12518cat confdefs.h >>conftest.$ac_ext
12519cat >>conftest.$ac_ext <<_ACEOF
12520/* end confdefs.h. */
98418dba
CW
12521#include <tiffio.h>
12522_ACEOF
c0d27fcc 12523if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12524 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12525 ac_status=$?
6bae0ccf 12526 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12527 rm -f conftest.er1
12528 cat conftest.err >&5
c0d27fcc 12529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12530 (exit $ac_status); } >/dev/null; then
12531 if test -s conftest.err; then
12532 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12533 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12534 else
12535 ac_cpp_err=
12536 fi
12537else
12538 ac_cpp_err=yes
12539fi
12540if test -z "$ac_cpp_err"; then
c0d27fcc 12541 ac_header_preproc=yes
98418dba
CW
12542else
12543 echo "$as_me: failed program was:" >&5
19650fd6
AS
12544sed 's/^/| /' conftest.$ac_ext >&5
12545
c0d27fcc 12546 ac_header_preproc=no
98418dba
CW
12547fi
12548rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12549echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12550echo "${ECHO_T}$ac_header_preproc" >&6
12551
12552# So? What about this header?
edfaf76d
LK
12553case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12554 yes:no: )
c0d27fcc
MR
12555 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
12556echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12557 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
12558echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
12559 ac_header_preproc=yes
19650fd6 12560 ;;
edfaf76d 12561 no:yes:* )
c0d27fcc
MR
12562 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
12563echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12564 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
12565echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
12566 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
12567echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
12568 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
12569echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12570 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 12571echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12572 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
12573echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12574 (
12575 cat <<\_ASBOX
edfaf76d
LK
12576## ------------------------------------------ ##
12577## Report this to the AC_PACKAGE_NAME lists. ##
12578## ------------------------------------------ ##
19650fd6
AS
12579_ASBOX
12580 ) |
12581 sed "s/^/$as_me: WARNING: /" >&2
12582 ;;
c0d27fcc
MR
12583esac
12584echo "$as_me:$LINENO: checking for tiffio.h" >&5
12585echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12586if test "${ac_cv_header_tiffio_h+set}" = set; then
12587 echo $ECHO_N "(cached) $ECHO_C" >&6
12588else
12589 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 12590fi
c0d27fcc 12591echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 12592echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
12593
12594fi
98418dba
CW
12595if test $ac_cv_header_tiffio_h = yes; then
12596 tifflibs="-lz -lm"
12597 # At least one tiff package requires the jpeg library.
12598 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 12599 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
12600echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
12601if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 12602 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12603else
503d2be0 12604 ac_check_lib_save_LIBS=$LIBS
98418dba 12605LIBS="-ltiff $tifflibs $LIBS"
503d2be0 12606cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12607/* confdefs.h. */
12608_ACEOF
12609cat confdefs.h >>conftest.$ac_ext
12610cat >>conftest.$ac_ext <<_ACEOF
12611/* end confdefs.h. */
503d2be0 12612
73b77ee5 12613/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12614#ifdef __cplusplus
12615extern "C"
12616#endif
73b77ee5 12617/* We use char because int might match the return type of a gcc2
503d2be0 12618 builtin and then its argument prototype would still apply. */
98418dba 12619char TIFFGetVersion ();
503d2be0
AS
12620int
12621main ()
12622{
98418dba 12623TIFFGetVersion ();
503d2be0
AS
12624 ;
12625 return 0;
12626}
12627_ACEOF
12628rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12629if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12630 (eval $ac_link) 2>conftest.er1
503d2be0 12631 ac_status=$?
edfaf76d
LK
12632 grep -v '^ *+' conftest.er1 >conftest.err
12633 rm -f conftest.er1
12634 cat conftest.err >&5
c0d27fcc 12635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12636 (exit $ac_status); } &&
e143ad11
AS
12637 { ac_try='test -z "$ac_c_werror_flag"
12638 || test ! -s conftest.err'
edfaf76d
LK
12639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12640 (eval $ac_try) 2>&5
12641 ac_status=$?
12642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12643 (exit $ac_status); }; } &&
12644 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12646 (eval $ac_try) 2>&5
12647 ac_status=$?
c0d27fcc 12648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12649 (exit $ac_status); }; }; then
98418dba 12650 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
12651else
12652 echo "$as_me: failed program was:" >&5
19650fd6
AS
12653sed 's/^/| /' conftest.$ac_ext >&5
12654
98418dba 12655ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 12656fi
edfaf76d
LK
12657rm -f conftest.err conftest.$ac_objext \
12658 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12659LIBS=$ac_check_lib_save_LIBS
12660fi
c0d27fcc 12661echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
12662echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
12663if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
12664 HAVE_TIFF=yes
12665fi
12666
12667fi
73b77ee5 12668
c0d27fcc 12669
98418dba
CW
12670 fi
12671
12672 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 12673
c0d27fcc 12674cat >>confdefs.h <<\_ACEOF
98418dba 12675#define HAVE_TIFF 1
c0d27fcc 12676_ACEOF
98418dba
CW
12677
12678 fi
73b77ee5
GM
12679fi
12680
98418dba
CW
12681### Use -lgif if available, unless `--with-gif=no'.
12682HAVE_GIF=no
12683if test "${HAVE_X11}" = "yes"; then
12684 if test "${with_gif}" != "no"; then
c0d27fcc
MR
12685 if test "${ac_cv_header_gif_lib_h+set}" = set; then
12686 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
12687echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12688if test "${ac_cv_header_gif_lib_h+set}" = set; then
12689 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12690fi
12691echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
12692echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 12693else
c0d27fcc
MR
12694 # Is the header compilable?
12695echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
12696echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
12697cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12698/* confdefs.h. */
12699_ACEOF
12700cat confdefs.h >>conftest.$ac_ext
12701cat >>conftest.$ac_ext <<_ACEOF
12702/* end confdefs.h. */
c0d27fcc
MR
12703$ac_includes_default
12704#include <gif_lib.h>
12705_ACEOF
12706rm -f conftest.$ac_objext
12707if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12708 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12709 ac_status=$?
edfaf76d
LK
12710 grep -v '^ *+' conftest.er1 >conftest.err
12711 rm -f conftest.er1
12712 cat conftest.err >&5
c0d27fcc
MR
12713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12714 (exit $ac_status); } &&
e143ad11
AS
12715 { ac_try='test -z "$ac_c_werror_flag"
12716 || test ! -s conftest.err'
edfaf76d
LK
12717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12718 (eval $ac_try) 2>&5
12719 ac_status=$?
12720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12721 (exit $ac_status); }; } &&
12722 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12724 (eval $ac_try) 2>&5
12725 ac_status=$?
12726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12727 (exit $ac_status); }; }; then
12728 ac_header_compiler=yes
12729else
12730 echo "$as_me: failed program was:" >&5
19650fd6
AS
12731sed 's/^/| /' conftest.$ac_ext >&5
12732
c0d27fcc
MR
12733ac_header_compiler=no
12734fi
edfaf76d 12735rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12736echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12737echo "${ECHO_T}$ac_header_compiler" >&6
12738
12739# Is the header present?
12740echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
12741echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
12742cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12743/* confdefs.h. */
12744_ACEOF
12745cat confdefs.h >>conftest.$ac_ext
12746cat >>conftest.$ac_ext <<_ACEOF
12747/* end confdefs.h. */
98418dba
CW
12748#include <gif_lib.h>
12749_ACEOF
c0d27fcc 12750if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12751 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12752 ac_status=$?
6bae0ccf 12753 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12754 rm -f conftest.er1
12755 cat conftest.err >&5
c0d27fcc 12756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12757 (exit $ac_status); } >/dev/null; then
12758 if test -s conftest.err; then
12759 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12760 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12761 else
12762 ac_cpp_err=
12763 fi
12764else
12765 ac_cpp_err=yes
12766fi
12767if test -z "$ac_cpp_err"; then
c0d27fcc 12768 ac_header_preproc=yes
98418dba
CW
12769else
12770 echo "$as_me: failed program was:" >&5
19650fd6
AS
12771sed 's/^/| /' conftest.$ac_ext >&5
12772
c0d27fcc 12773 ac_header_preproc=no
98418dba
CW
12774fi
12775rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12776echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12777echo "${ECHO_T}$ac_header_preproc" >&6
12778
12779# So? What about this header?
edfaf76d
LK
12780case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12781 yes:no: )
c0d27fcc
MR
12782 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12783echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12784 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
12785echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
12786 ac_header_preproc=yes
19650fd6 12787 ;;
edfaf76d 12788 no:yes:* )
c0d27fcc
MR
12789 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
12790echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12791 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
12792echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
12793 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
12794echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
12795 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
12796echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12797 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 12798echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12799 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
12800echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12801 (
12802 cat <<\_ASBOX
edfaf76d
LK
12803## ------------------------------------------ ##
12804## Report this to the AC_PACKAGE_NAME lists. ##
12805## ------------------------------------------ ##
19650fd6
AS
12806_ASBOX
12807 ) |
12808 sed "s/^/$as_me: WARNING: /" >&2
12809 ;;
c0d27fcc
MR
12810esac
12811echo "$as_me:$LINENO: checking for gif_lib.h" >&5
12812echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12813if test "${ac_cv_header_gif_lib_h+set}" = set; then
12814 echo $ECHO_N "(cached) $ECHO_C" >&6
12815else
12816 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 12817fi
c0d27fcc 12818echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 12819echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
12820
12821fi
98418dba
CW
12822if test $ac_cv_header_gif_lib_h = yes; then
12823 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12824# Earlier versions can crash Emacs.
c0d27fcc 12825 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
12826echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
12827if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 12828 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12829else
503d2be0 12830 ac_check_lib_save_LIBS=$LIBS
98418dba 12831LIBS="-lungif $LIBS"
503d2be0 12832cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12833/* confdefs.h. */
12834_ACEOF
12835cat confdefs.h >>conftest.$ac_ext
12836cat >>conftest.$ac_ext <<_ACEOF
12837/* end confdefs.h. */
73b77ee5 12838
98418dba
CW
12839/* Override any gcc2 internal prototype to avoid an error. */
12840#ifdef __cplusplus
12841extern "C"
12842#endif
12843/* We use char because int might match the return type of a gcc2
12844 builtin and then its argument prototype would still apply. */
12845char EGifPutExtensionLast ();
503d2be0
AS
12846int
12847main ()
12848{
98418dba 12849EGifPutExtensionLast ();
503d2be0
AS
12850 ;
12851 return 0;
12852}
12853_ACEOF
12854rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12855if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12856 (eval $ac_link) 2>conftest.er1
503d2be0 12857 ac_status=$?
edfaf76d
LK
12858 grep -v '^ *+' conftest.er1 >conftest.err
12859 rm -f conftest.er1
12860 cat conftest.err >&5
c0d27fcc 12861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12862 (exit $ac_status); } &&
e143ad11
AS
12863 { ac_try='test -z "$ac_c_werror_flag"
12864 || test ! -s conftest.err'
edfaf76d
LK
12865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12866 (eval $ac_try) 2>&5
12867 ac_status=$?
12868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12869 (exit $ac_status); }; } &&
12870 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
12871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12872 (eval $ac_try) 2>&5
12873 ac_status=$?
12874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12875 (exit $ac_status); }; }; then
12876 ac_cv_lib_ungif_EGifPutExtensionLast=yes
12877else
98418dba 12878 echo "$as_me: failed program was:" >&5
19650fd6
AS
12879sed 's/^/| /' conftest.$ac_ext >&5
12880
98418dba
CW
12881ac_cv_lib_ungif_EGifPutExtensionLast=no
12882fi
edfaf76d
LK
12883rm -f conftest.err conftest.$ac_objext \
12884 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12885LIBS=$ac_check_lib_save_LIBS
12886fi
c0d27fcc 12887echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
12888echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
12889if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
12890 HAVE_GIF=yes
12891fi
12892
12893fi
12894
c0d27fcc 12895
98418dba
CW
12896 fi
12897
12898 if test "${HAVE_GIF}" = "yes"; then
b936fae4 12899
c0d27fcc 12900cat >>confdefs.h <<\_ACEOF
98418dba 12901#define HAVE_GIF 1
c0d27fcc 12902_ACEOF
98418dba
CW
12903
12904 fi
12905fi
12906
cef11da2
ST
12907if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12908 echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12909echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12910if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12911 echo $ECHO_N "(cached) $ECHO_C" >&6
12912fi
12913echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12914echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12915else
12916 # Is the header compilable?
12917echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
12918echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6
12919cat >conftest.$ac_ext <<_ACEOF
12920/* confdefs.h. */
12921_ACEOF
12922cat confdefs.h >>conftest.$ac_ext
12923cat >>conftest.$ac_ext <<_ACEOF
12924/* end confdefs.h. */
12925$ac_includes_default
12926#include <malloc/malloc.h>
12927_ACEOF
12928rm -f conftest.$ac_objext
12929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12930 (eval $ac_compile) 2>conftest.er1
cef11da2 12931 ac_status=$?
edfaf76d
LK
12932 grep -v '^ *+' conftest.er1 >conftest.err
12933 rm -f conftest.er1
12934 cat conftest.err >&5
cef11da2
ST
12935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12936 (exit $ac_status); } &&
e143ad11
AS
12937 { ac_try='test -z "$ac_c_werror_flag"
12938 || test ! -s conftest.err'
edfaf76d
LK
12939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12940 (eval $ac_try) 2>&5
12941 ac_status=$?
12942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12943 (exit $ac_status); }; } &&
12944 { ac_try='test -s conftest.$ac_objext'
cef11da2
ST
12945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12946 (eval $ac_try) 2>&5
12947 ac_status=$?
12948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12949 (exit $ac_status); }; }; then
12950 ac_header_compiler=yes
12951else
12952 echo "$as_me: failed program was:" >&5
12953sed 's/^/| /' conftest.$ac_ext >&5
12954
12955ac_header_compiler=no
12956fi
edfaf76d 12957rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cef11da2
ST
12958echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12959echo "${ECHO_T}$ac_header_compiler" >&6
12960
12961# Is the header present?
12962echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
12963echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6
12964cat >conftest.$ac_ext <<_ACEOF
12965/* confdefs.h. */
12966_ACEOF
12967cat confdefs.h >>conftest.$ac_ext
12968cat >>conftest.$ac_ext <<_ACEOF
12969/* end confdefs.h. */
12970#include <malloc/malloc.h>
12971_ACEOF
12972if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12973 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12974 ac_status=$?
12975 grep -v '^ *+' conftest.er1 >conftest.err
12976 rm -f conftest.er1
12977 cat conftest.err >&5
12978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12979 (exit $ac_status); } >/dev/null; then
12980 if test -s conftest.err; then
12981 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12982 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
cef11da2
ST
12983 else
12984 ac_cpp_err=
12985 fi
12986else
12987 ac_cpp_err=yes
12988fi
12989if test -z "$ac_cpp_err"; then
12990 ac_header_preproc=yes
12991else
12992 echo "$as_me: failed program was:" >&5
12993sed 's/^/| /' conftest.$ac_ext >&5
12994
12995 ac_header_preproc=no
12996fi
12997rm -f conftest.err conftest.$ac_ext
12998echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12999echo "${ECHO_T}$ac_header_preproc" >&6
13000
13001# So? What about this header?
edfaf76d
LK
13002case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13003 yes:no: )
cef11da2
ST
13004 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
13005echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13006 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
13007echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
13008 ac_header_preproc=yes
cef11da2 13009 ;;
edfaf76d 13010 no:yes:* )
cef11da2
ST
13011 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
13012echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13013 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
13014echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
13015 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
13016echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
13017 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
13018echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
13019 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
13020echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13021 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
13022echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
cef11da2
ST
13023 (
13024 cat <<\_ASBOX
edfaf76d
LK
13025## ------------------------------------------ ##
13026## Report this to the AC_PACKAGE_NAME lists. ##
13027## ------------------------------------------ ##
cef11da2
ST
13028_ASBOX
13029 ) |
13030 sed "s/^/$as_me: WARNING: /" >&2
13031 ;;
13032esac
13033echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
13034echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
13035if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
13036 echo $ECHO_N "(cached) $ECHO_C" >&6
13037else
13038 ac_cv_header_malloc_malloc_h=$ac_header_preproc
13039fi
13040echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
13041echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
13042
13043fi
13044if test $ac_cv_header_malloc_malloc_h = yes; then
13045
13046cat >>confdefs.h <<\_ACEOF
13047#define HAVE_MALLOC_MALLOC_H 1
13048_ACEOF
13049
13050fi
13051
13052
13053
5d6da11e 13054### Use Mac OS X Carbon API to implement GUI.
e0f712ba 13055if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 13056
c0d27fcc 13057cat >>confdefs.h <<\_ACEOF
e0f712ba 13058#define HAVE_CARBON 1
c0d27fcc 13059_ACEOF
e0f712ba 13060
6a3a24fa
JD
13061 ## Specify the install directory
13062 carbon_appdir=
13063 if test "${carbon_appdir_x}" != ""; then
13064 case ${carbon_appdir_x} in
13065 y | ye | yes) carbon_appdir=/Applications ;;
13066 * ) carbon_appdir=${carbon_appdir_x} ;;
13067 esac
13068 fi
8f417b3b
AS
13069 # We also have mouse menus.
13070 HAVE_MENUS=yes
7c9e5167
JD
13071
13072 tmp_CFLAGS="$CFLAGS"
13073 CFLAGS="$CFLAGS -framework Carbon"
13074 echo "$as_me:$LINENO: checking for CancelMenuTracking" >&5
13075echo $ECHO_N "checking for CancelMenuTracking... $ECHO_C" >&6
13076if test "${ac_cv_func_CancelMenuTracking+set}" = set; then
13077 echo $ECHO_N "(cached) $ECHO_C" >&6
13078else
13079 cat >conftest.$ac_ext <<_ACEOF
7c9e5167
JD
13080/* confdefs.h. */
13081_ACEOF
13082cat confdefs.h >>conftest.$ac_ext
13083cat >>conftest.$ac_ext <<_ACEOF
13084/* end confdefs.h. */
edfaf76d
LK
13085/* Define CancelMenuTracking to an innocuous variant, in case <limits.h> declares CancelMenuTracking.
13086 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13087#define CancelMenuTracking innocuous_CancelMenuTracking
13088
7c9e5167
JD
13089/* System header to define __stub macros and hopefully few prototypes,
13090 which can conflict with char CancelMenuTracking (); below.
13091 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13092 <limits.h> exists even on freestanding compilers. */
edfaf76d 13093
7c9e5167
JD
13094#ifdef __STDC__
13095# include <limits.h>
13096#else
13097# include <assert.h>
13098#endif
edfaf76d
LK
13099
13100#undef CancelMenuTracking
13101
7c9e5167
JD
13102/* Override any gcc2 internal prototype to avoid an error. */
13103#ifdef __cplusplus
13104extern "C"
13105{
13106#endif
13107/* We use char because int might match the return type of a gcc2
13108 builtin and then its argument prototype would still apply. */
13109char CancelMenuTracking ();
13110/* The GNU C library defines this for functions which it implements
13111 to always fail with ENOSYS. Some functions are actually named
13112 something starting with __ and the normal name is an alias. */
13113#if defined (__stub_CancelMenuTracking) || defined (__stub___CancelMenuTracking)
13114choke me
13115#else
13116char (*f) () = CancelMenuTracking;
13117#endif
13118#ifdef __cplusplus
13119}
13120#endif
13121
13122int
13123main ()
13124{
13125return f != CancelMenuTracking;
13126 ;
13127 return 0;
13128}
13129_ACEOF
13130rm -f conftest.$ac_objext conftest$ac_exeext
13131if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13132 (eval $ac_link) 2>conftest.er1
7c9e5167 13133 ac_status=$?
edfaf76d
LK
13134 grep -v '^ *+' conftest.er1 >conftest.err
13135 rm -f conftest.er1
13136 cat conftest.err >&5
7c9e5167
JD
13137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13138 (exit $ac_status); } &&
e143ad11
AS
13139 { ac_try='test -z "$ac_c_werror_flag"
13140 || test ! -s conftest.err'
edfaf76d
LK
13141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13142 (eval $ac_try) 2>&5
13143 ac_status=$?
13144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13145 (exit $ac_status); }; } &&
13146 { ac_try='test -s conftest$ac_exeext'
7c9e5167
JD
13147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13148 (eval $ac_try) 2>&5
13149 ac_status=$?
13150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13151 (exit $ac_status); }; }; then
13152 ac_cv_func_CancelMenuTracking=yes
13153else
13154 echo "$as_me: failed program was:" >&5
13155sed 's/^/| /' conftest.$ac_ext >&5
13156
13157ac_cv_func_CancelMenuTracking=no
13158fi
edfaf76d
LK
13159rm -f conftest.err conftest.$ac_objext \
13160 conftest$ac_exeext conftest.$ac_ext
7c9e5167
JD
13161fi
13162echo "$as_me:$LINENO: result: $ac_cv_func_CancelMenuTracking" >&5
13163echo "${ECHO_T}$ac_cv_func_CancelMenuTracking" >&6
13164if test $ac_cv_func_CancelMenuTracking = yes; then
13165 have_cmt=yes
13166else
13167 have_cmt=no
13168fi
13169
13170 if test "$have_cmt" = yes; then
13171
13172cat >>confdefs.h <<\_ACEOF
13173#define HAVE_CANCELMENUTRACKING 1
13174_ACEOF
13175
13176 fi
13177 CFLAGS="$tmp_CFLAGS"
e0f712ba
AC
13178fi
13179
98418dba
CW
13180### Use session management (-lSM -lICE) if available
13181HAVE_X_SM=no
13182if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
13183 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13184 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
13185echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
13186if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13187 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13188fi
13189echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
13190echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 13191else
c0d27fcc
MR
13192 # Is the header compilable?
13193echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
13194echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
13195cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13196/* confdefs.h. */
13197_ACEOF
13198cat confdefs.h >>conftest.$ac_ext
13199cat >>conftest.$ac_ext <<_ACEOF
13200/* end confdefs.h. */
c0d27fcc
MR
13201$ac_includes_default
13202#include <X11/SM/SMlib.h>
13203_ACEOF
13204rm -f conftest.$ac_objext
13205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 13206 (eval $ac_compile) 2>conftest.er1
c0d27fcc 13207 ac_status=$?
edfaf76d
LK
13208 grep -v '^ *+' conftest.er1 >conftest.err
13209 rm -f conftest.er1
13210 cat conftest.err >&5
c0d27fcc
MR
13211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13212 (exit $ac_status); } &&
e143ad11
AS
13213 { ac_try='test -z "$ac_c_werror_flag"
13214 || test ! -s conftest.err'
edfaf76d
LK
13215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13216 (eval $ac_try) 2>&5
13217 ac_status=$?
13218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13219 (exit $ac_status); }; } &&
13220 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13222 (eval $ac_try) 2>&5
13223 ac_status=$?
13224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13225 (exit $ac_status); }; }; then
13226 ac_header_compiler=yes
13227else
13228 echo "$as_me: failed program was:" >&5
19650fd6
AS
13229sed 's/^/| /' conftest.$ac_ext >&5
13230
c0d27fcc
MR
13231ac_header_compiler=no
13232fi
edfaf76d 13233rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
13234echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13235echo "${ECHO_T}$ac_header_compiler" >&6
13236
13237# Is the header present?
13238echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
13239echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
13240cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13241/* confdefs.h. */
13242_ACEOF
13243cat confdefs.h >>conftest.$ac_ext
13244cat >>conftest.$ac_ext <<_ACEOF
13245/* end confdefs.h. */
98418dba
CW
13246#include <X11/SM/SMlib.h>
13247_ACEOF
c0d27fcc 13248if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
13249 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13250 ac_status=$?
6bae0ccf 13251 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13252 rm -f conftest.er1
13253 cat conftest.err >&5
c0d27fcc 13254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13255 (exit $ac_status); } >/dev/null; then
13256 if test -s conftest.err; then
13257 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 13258 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
13259 else
13260 ac_cpp_err=
13261 fi
13262else
13263 ac_cpp_err=yes
503d2be0 13264fi
98418dba 13265if test -z "$ac_cpp_err"; then
c0d27fcc 13266 ac_header_preproc=yes
98418dba
CW
13267else
13268 echo "$as_me: failed program was:" >&5
19650fd6
AS
13269sed 's/^/| /' conftest.$ac_ext >&5
13270
c0d27fcc 13271 ac_header_preproc=no
98418dba
CW
13272fi
13273rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13274echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13275echo "${ECHO_T}$ac_header_preproc" >&6
13276
13277# So? What about this header?
edfaf76d
LK
13278case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13279 yes:no: )
c0d27fcc
MR
13280 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
13281echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13282 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
13283echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
13284 ac_header_preproc=yes
19650fd6 13285 ;;
edfaf76d 13286 no:yes:* )
c0d27fcc
MR
13287 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
13288echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13289 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
13290echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
13291 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
13292echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
13293 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
13294echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13295 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 13296echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13297 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
13298echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
13299 (
13300 cat <<\_ASBOX
edfaf76d
LK
13301## ------------------------------------------ ##
13302## Report this to the AC_PACKAGE_NAME lists. ##
13303## ------------------------------------------ ##
19650fd6
AS
13304_ASBOX
13305 ) |
13306 sed "s/^/$as_me: WARNING: /" >&2
13307 ;;
c0d27fcc
MR
13308esac
13309echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
13310echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
13311if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13312 echo $ECHO_N "(cached) $ECHO_C" >&6
13313else
13314 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 13315fi
c0d27fcc 13316echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 13317echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
13318
13319fi
98418dba 13320if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 13321 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
13322echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
13323if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 13324 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13325else
503d2be0 13326 ac_check_lib_save_LIBS=$LIBS
1660500f 13327LIBS="-lSM -lICE $LIBS"
503d2be0 13328cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13329/* confdefs.h. */
13330_ACEOF
13331cat confdefs.h >>conftest.$ac_ext
13332cat >>conftest.$ac_ext <<_ACEOF
13333/* end confdefs.h. */
503d2be0 13334
73b77ee5 13335/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13336#ifdef __cplusplus
13337extern "C"
13338#endif
73b77ee5 13339/* We use char because int might match the return type of a gcc2
503d2be0 13340 builtin and then its argument prototype would still apply. */
98418dba 13341char SmcOpenConnection ();
503d2be0
AS
13342int
13343main ()
13344{
98418dba 13345SmcOpenConnection ();
503d2be0
AS
13346 ;
13347 return 0;
13348}
13349_ACEOF
13350rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13351if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13352 (eval $ac_link) 2>conftest.er1
503d2be0 13353 ac_status=$?
edfaf76d
LK
13354 grep -v '^ *+' conftest.er1 >conftest.err
13355 rm -f conftest.er1
13356 cat conftest.err >&5
c0d27fcc 13357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13358 (exit $ac_status); } &&
e143ad11
AS
13359 { ac_try='test -z "$ac_c_werror_flag"
13360 || test ! -s conftest.err'
edfaf76d
LK
13361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13362 (eval $ac_try) 2>&5
13363 ac_status=$?
13364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13365 (exit $ac_status); }; } &&
13366 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13368 (eval $ac_try) 2>&5
13369 ac_status=$?
c0d27fcc 13370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13371 (exit $ac_status); }; }; then
98418dba 13372 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
13373else
13374 echo "$as_me: failed program was:" >&5
19650fd6
AS
13375sed 's/^/| /' conftest.$ac_ext >&5
13376
98418dba 13377ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 13378fi
edfaf76d
LK
13379rm -f conftest.err conftest.$ac_objext \
13380 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
13381LIBS=$ac_check_lib_save_LIBS
13382fi
c0d27fcc 13383echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
13384echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
13385if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
13386 HAVE_X_SM=yes
73b77ee5
GM
13387fi
13388
73b77ee5 13389fi
73b77ee5 13390
c0d27fcc
MR
13391
13392
98418dba 13393 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 13394
c0d27fcc 13395cat >>confdefs.h <<\_ACEOF
98418dba 13396#define HAVE_X_SM 1
c0d27fcc 13397_ACEOF
73b77ee5 13398
98418dba
CW
13399 case "$LIBS" in
13400 *-lSM*) ;;
13401 *) LIBS="-lSM -lICE $LIBS" ;;
13402 esac
73b77ee5 13403 fi
98418dba 13404fi
73b77ee5 13405
98418dba 13406# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 13407echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
13408echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
13409if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
13410 echo $ECHO_N "(cached) $ECHO_C" >&6
13411else
13412 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13413/* confdefs.h. */
13414_ACEOF
13415cat confdefs.h >>conftest.$ac_ext
13416cat >>conftest.$ac_ext <<_ACEOF
13417/* end confdefs.h. */
98418dba 13418#include <netdb.h>
503d2be0
AS
13419int
13420main ()
13421{
98418dba 13422return h_errno;
503d2be0
AS
13423 ;
13424 return 0;
13425}
13426_ACEOF
13427rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13428if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13429 (eval $ac_link) 2>conftest.er1
503d2be0 13430 ac_status=$?
edfaf76d
LK
13431 grep -v '^ *+' conftest.er1 >conftest.err
13432 rm -f conftest.er1
13433 cat conftest.err >&5
c0d27fcc 13434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13435 (exit $ac_status); } &&
e143ad11
AS
13436 { ac_try='test -z "$ac_c_werror_flag"
13437 || test ! -s conftest.err'
edfaf76d
LK
13438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13439 (eval $ac_try) 2>&5
13440 ac_status=$?
13441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13442 (exit $ac_status); }; } &&
13443 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13445 (eval $ac_try) 2>&5
13446 ac_status=$?
c0d27fcc 13447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13448 (exit $ac_status); }; }; then
98418dba 13449 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 13450else
503d2be0 13451 echo "$as_me: failed program was:" >&5
19650fd6
AS
13452sed 's/^/| /' conftest.$ac_ext >&5
13453
98418dba 13454emacs_cv_netdb_declares_h_errno=no
73b77ee5 13455fi
edfaf76d
LK
13456rm -f conftest.err conftest.$ac_objext \
13457 conftest$ac_exeext conftest.$ac_ext
98418dba 13458fi
c0d27fcc 13459echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
13460echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
13461if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 13462
c0d27fcc 13463cat >>confdefs.h <<\_ACEOF
98418dba 13464#define HAVE_H_ERRNO 1
c0d27fcc 13465_ACEOF
73b77ee5 13466
98418dba
CW
13467fi
13468
13469# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13470# for constant arguments. Useless!
c0d27fcc 13471echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
13472echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
13473if test "${ac_cv_working_alloca_h+set}" = set; then
13474 echo $ECHO_N "(cached) $ECHO_C" >&6
13475else
13476 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13477/* confdefs.h. */
13478_ACEOF
13479cat confdefs.h >>conftest.$ac_ext
13480cat >>conftest.$ac_ext <<_ACEOF
13481/* end confdefs.h. */
98418dba 13482#include <alloca.h>
503d2be0
AS
13483int
13484main ()
13485{
98418dba 13486char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
13487 ;
13488 return 0;
13489}
13490_ACEOF
13491rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13492if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13493 (eval $ac_link) 2>conftest.er1
503d2be0 13494 ac_status=$?
edfaf76d
LK
13495 grep -v '^ *+' conftest.er1 >conftest.err
13496 rm -f conftest.er1
13497 cat conftest.err >&5
c0d27fcc 13498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13499 (exit $ac_status); } &&
e143ad11
AS
13500 { ac_try='test -z "$ac_c_werror_flag"
13501 || 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_working_alloca_h=yes
73b77ee5 13514else
503d2be0 13515 echo "$as_me: failed program was:" >&5
19650fd6
AS
13516sed 's/^/| /' conftest.$ac_ext >&5
13517
98418dba 13518ac_cv_working_alloca_h=no
73b77ee5 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_working_alloca_h" >&5
98418dba
CW
13524echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
13525if test $ac_cv_working_alloca_h = yes; then
73b77ee5 13526
c0d27fcc 13527cat >>confdefs.h <<\_ACEOF
98418dba 13528#define HAVE_ALLOCA_H 1
c0d27fcc 13529_ACEOF
98418dba
CW
13530
13531fi
13532
c0d27fcc 13533echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
13534echo $ECHO_N "checking for alloca... $ECHO_C" >&6
13535if test "${ac_cv_func_alloca_works+set}" = set; then
13536 echo $ECHO_N "(cached) $ECHO_C" >&6
13537else
503d2be0 13538 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13539/* confdefs.h. */
13540_ACEOF
13541cat confdefs.h >>conftest.$ac_ext
13542cat >>conftest.$ac_ext <<_ACEOF
13543/* end confdefs.h. */
98418dba
CW
13544#ifdef __GNUC__
13545# define alloca __builtin_alloca
13546#else
13547# ifdef _MSC_VER
13548# include <malloc.h>
13549# define alloca _alloca
13550# else
13551# if HAVE_ALLOCA_H
13552# include <alloca.h>
13553# else
13554# ifdef _AIX
13555 #pragma alloca
13556# else
13557# ifndef alloca /* predefined by HP cc +Olibcalls */
13558char *alloca ();
13559# endif
13560# endif
13561# endif
13562# endif
13563#endif
13564
503d2be0
AS
13565int
13566main ()
13567{
98418dba 13568char *p = (char *) alloca (1);
503d2be0
AS
13569 ;
13570 return 0;
13571}
13572_ACEOF
13573rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13574if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13575 (eval $ac_link) 2>conftest.er1
503d2be0 13576 ac_status=$?
edfaf76d
LK
13577 grep -v '^ *+' conftest.er1 >conftest.err
13578 rm -f conftest.er1
13579 cat conftest.err >&5
c0d27fcc 13580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13581 (exit $ac_status); } &&
e143ad11
AS
13582 { ac_try='test -z "$ac_c_werror_flag"
13583 || test ! -s conftest.err'
edfaf76d
LK
13584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13585 (eval $ac_try) 2>&5
13586 ac_status=$?
13587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13588 (exit $ac_status); }; } &&
13589 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13591 (eval $ac_try) 2>&5
13592 ac_status=$?
c0d27fcc 13593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13594 (exit $ac_status); }; }; then
98418dba 13595 ac_cv_func_alloca_works=yes
ac95a621 13596else
503d2be0 13597 echo "$as_me: failed program was:" >&5
19650fd6
AS
13598sed 's/^/| /' conftest.$ac_ext >&5
13599
98418dba 13600ac_cv_func_alloca_works=no
ac95a621 13601fi
edfaf76d
LK
13602rm -f conftest.err conftest.$ac_objext \
13603 conftest$ac_exeext conftest.$ac_ext
98418dba 13604fi
c0d27fcc 13605echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 13606echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 13607
98418dba
CW
13608if test $ac_cv_func_alloca_works = yes; then
13609
c0d27fcc 13610cat >>confdefs.h <<\_ACEOF
98418dba 13611#define HAVE_ALLOCA 1
c0d27fcc 13612_ACEOF
98418dba
CW
13613
13614else
13615 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13616# that cause trouble. Some versions do not even contain alloca or
13617# contain a buggy version. If you still want to use their alloca,
13618# use ar to extract alloca.o from them instead of compiling alloca.c.
13619
13620ALLOCA=alloca.$ac_objext
13621
c0d27fcc 13622cat >>confdefs.h <<\_ACEOF
98418dba 13623#define C_ALLOCA 1
c0d27fcc 13624_ACEOF
98418dba 13625
c0d27fcc
MR
13626
13627echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
13628echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
13629if test "${ac_cv_os_cray+set}" = set; then
13630 echo $ECHO_N "(cached) $ECHO_C" >&6
13631else
13632 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13633/* confdefs.h. */
13634_ACEOF
13635cat confdefs.h >>conftest.$ac_ext
13636cat >>conftest.$ac_ext <<_ACEOF
13637/* end confdefs.h. */
98418dba
CW
13638#if defined(CRAY) && ! defined(CRAY2)
13639webecray
13640#else
13641wenotbecray
13642#endif
13643
13644_ACEOF
13645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13646 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
13647 ac_cv_os_cray=yes
13648else
13649 ac_cv_os_cray=no
13650fi
13651rm -f conftest*
ac95a621 13652
98418dba 13653fi
c0d27fcc 13654echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
13655echo "${ECHO_T}$ac_cv_os_cray" >&6
13656if test $ac_cv_os_cray = yes; then
13657 for ac_func in _getb67 GETB67 getb67; do
13658 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13659echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
13660echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13661if eval "test \"\${$as_ac_var+set}\" = set"; then
13662 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13663else
503d2be0 13664 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13665/* confdefs.h. */
13666_ACEOF
13667cat confdefs.h >>conftest.$ac_ext
13668cat >>conftest.$ac_ext <<_ACEOF
13669/* end confdefs.h. */
edfaf76d
LK
13670/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13671 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13672#define $ac_func innocuous_$ac_func
13673
73b77ee5 13674/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13675 which can conflict with char $ac_func (); below.
13676 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13677 <limits.h> exists even on freestanding compilers. */
edfaf76d 13678
19650fd6
AS
13679#ifdef __STDC__
13680# include <limits.h>
13681#else
13682# include <assert.h>
13683#endif
edfaf76d
LK
13684
13685#undef $ac_func
13686
73b77ee5 13687/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13688#ifdef __cplusplus
13689extern "C"
19650fd6 13690{
503d2be0 13691#endif
73b77ee5 13692/* We use char because int might match the return type of a gcc2
503d2be0
AS
13693 builtin and then its argument prototype would still apply. */
13694char $ac_func ();
73b77ee5
GM
13695/* The GNU C library defines this for functions which it implements
13696 to always fail with ENOSYS. Some functions are actually named
13697 something starting with __ and the normal name is an alias. */
13698#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13699choke me
13700#else
19650fd6
AS
13701char (*f) () = $ac_func;
13702#endif
13703#ifdef __cplusplus
13704}
73b77ee5
GM
13705#endif
13706
19650fd6
AS
13707int
13708main ()
13709{
13710return f != $ac_func;
503d2be0
AS
13711 ;
13712 return 0;
13713}
13714_ACEOF
13715rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13716if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13717 (eval $ac_link) 2>conftest.er1
503d2be0 13718 ac_status=$?
edfaf76d
LK
13719 grep -v '^ *+' conftest.er1 >conftest.err
13720 rm -f conftest.er1
13721 cat conftest.err >&5
c0d27fcc 13722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13723 (exit $ac_status); } &&
e143ad11
AS
13724 { ac_try='test -z "$ac_c_werror_flag"
13725 || test ! -s conftest.err'
edfaf76d
LK
13726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13727 (eval $ac_try) 2>&5
13728 ac_status=$?
13729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13730 (exit $ac_status); }; } &&
13731 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13733 (eval $ac_try) 2>&5
13734 ac_status=$?
c0d27fcc 13735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13736 (exit $ac_status); }; }; then
13737 eval "$as_ac_var=yes"
13738else
13739 echo "$as_me: failed program was:" >&5
19650fd6
AS
13740sed 's/^/| /' conftest.$ac_ext >&5
13741
503d2be0
AS
13742eval "$as_ac_var=no"
13743fi
edfaf76d
LK
13744rm -f conftest.err conftest.$ac_objext \
13745 conftest$ac_exeext conftest.$ac_ext
503d2be0 13746fi
c0d27fcc 13747echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13748echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13749if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 13750
c0d27fcc 13751cat >>confdefs.h <<_ACEOF
98418dba 13752#define CRAY_STACKSEG_END $ac_func
c0d27fcc 13753_ACEOF
98418dba
CW
13754
13755 break
73b77ee5 13756fi
73b77ee5 13757
98418dba 13758 done
73b77ee5
GM
13759fi
13760
c0d27fcc 13761echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
13762echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
13763if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 13764 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
13765else
13766 if test "$cross_compiling" = yes; then
13767 ac_cv_c_stack_direction=0
73b77ee5 13768else
503d2be0 13769 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13770/* confdefs.h. */
13771_ACEOF
13772cat confdefs.h >>conftest.$ac_ext
13773cat >>conftest.$ac_ext <<_ACEOF
13774/* end confdefs.h. */
503d2be0 13775int
98418dba 13776find_stack_direction ()
503d2be0 13777{
98418dba
CW
13778 static char *addr = 0;
13779 auto char dummy;
13780 if (addr == 0)
13781 {
13782 addr = &dummy;
13783 return find_stack_direction ();
13784 }
73b77ee5 13785 else
98418dba
CW
13786 return (&dummy > addr) ? 1 : -1;
13787}
ba4481b5 13788
503d2be0
AS
13789int
13790main ()
13791{
98418dba 13792 exit (find_stack_direction () < 0);
503d2be0
AS
13793}
13794_ACEOF
98418dba 13795rm -f conftest$ac_exeext
c0d27fcc 13796if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13797 (eval $ac_link) 2>&5
13798 ac_status=$?
c0d27fcc 13799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 13801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13802 (eval $ac_try) 2>&5
13803 ac_status=$?
c0d27fcc 13804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13805 (exit $ac_status); }; }; then
98418dba 13806 ac_cv_c_stack_direction=1
ba4481b5 13807else
98418dba
CW
13808 echo "$as_me: program exited with status $ac_status" >&5
13809echo "$as_me: failed program was:" >&5
19650fd6
AS
13810sed 's/^/| /' conftest.$ac_ext >&5
13811
c0d27fcc 13812( exit $ac_status )
98418dba 13813ac_cv_c_stack_direction=-1
ba4481b5 13814fi
edfaf76d 13815rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 13816fi
98418dba 13817fi
c0d27fcc 13818echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
13819echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
13820
c0d27fcc 13821cat >>confdefs.h <<_ACEOF
98418dba 13822#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
13823_ACEOF
13824
ba4481b5 13825
ba4481b5
DL
13826fi
13827
c0d27fcc 13828
98418dba
CW
13829# fmod, logb, and frexp are found in -lm on most systems.
13830# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
13831
c0d27fcc 13832echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
13833echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
13834if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 13835 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13836else
98418dba
CW
13837 ac_check_lib_save_LIBS=$LIBS
13838LIBS="-lm $LIBS"
13839cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13840/* confdefs.h. */
13841_ACEOF
13842cat confdefs.h >>conftest.$ac_ext
13843cat >>conftest.$ac_ext <<_ACEOF
13844/* end confdefs.h. */
ba4481b5 13845
98418dba
CW
13846/* Override any gcc2 internal prototype to avoid an error. */
13847#ifdef __cplusplus
13848extern "C"
13849#endif
13850/* We use char because int might match the return type of a gcc2
13851 builtin and then its argument prototype would still apply. */
13852char sqrt ();
503d2be0
AS
13853int
13854main ()
13855{
98418dba 13856sqrt ();
503d2be0
AS
13857 ;
13858 return 0;
13859}
13860_ACEOF
13861rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13863 (eval $ac_link) 2>conftest.er1
503d2be0 13864 ac_status=$?
edfaf76d
LK
13865 grep -v '^ *+' conftest.er1 >conftest.err
13866 rm -f conftest.er1
13867 cat conftest.err >&5
c0d27fcc 13868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13869 (exit $ac_status); } &&
e143ad11
AS
13870 { ac_try='test -z "$ac_c_werror_flag"
13871 || test ! -s conftest.err'
edfaf76d
LK
13872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13873 (eval $ac_try) 2>&5
13874 ac_status=$?
13875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13876 (exit $ac_status); }; } &&
13877 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13879 (eval $ac_try) 2>&5
13880 ac_status=$?
c0d27fcc 13881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13882 (exit $ac_status); }; }; then
98418dba 13883 ac_cv_lib_m_sqrt=yes
ba4481b5 13884else
503d2be0 13885 echo "$as_me: failed program was:" >&5
19650fd6
AS
13886sed 's/^/| /' conftest.$ac_ext >&5
13887
98418dba 13888ac_cv_lib_m_sqrt=no
ba4481b5 13889fi
edfaf76d
LK
13890rm -f conftest.err conftest.$ac_objext \
13891 conftest$ac_exeext conftest.$ac_ext
98418dba 13892LIBS=$ac_check_lib_save_LIBS
ba4481b5 13893fi
c0d27fcc 13894echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
13895echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
13896if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 13897 cat >>confdefs.h <<_ACEOF
98418dba 13898#define HAVE_LIBM 1
c0d27fcc 13899_ACEOF
98418dba
CW
13900
13901 LIBS="-lm $LIBS"
ba4481b5 13902
ba4481b5
DL
13903fi
13904
c0d27fcc 13905
55597d70
DL
13906# Check for mail-locking functions in a "mail" library. Probably this should
13907# have the same check as for liblockfile below.
98418dba 13908
c0d27fcc 13909echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
13910echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
13911if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 13912 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13913else
98418dba
CW
13914 ac_check_lib_save_LIBS=$LIBS
13915LIBS="-lmail $LIBS"
13916cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13917/* confdefs.h. */
13918_ACEOF
13919cat confdefs.h >>conftest.$ac_ext
13920cat >>conftest.$ac_ext <<_ACEOF
13921/* end confdefs.h. */
98418dba
CW
13922
13923/* Override any gcc2 internal prototype to avoid an error. */
13924#ifdef __cplusplus
13925extern "C"
13926#endif
13927/* We use char because int might match the return type of a gcc2
13928 builtin and then its argument prototype would still apply. */
13929char maillock ();
503d2be0
AS
13930int
13931main ()
13932{
98418dba 13933maillock ();
503d2be0
AS
13934 ;
13935 return 0;
13936}
13937_ACEOF
13938rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13939if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13940 (eval $ac_link) 2>conftest.er1
503d2be0 13941 ac_status=$?
edfaf76d
LK
13942 grep -v '^ *+' conftest.er1 >conftest.err
13943 rm -f conftest.er1
13944 cat conftest.err >&5
c0d27fcc 13945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13946 (exit $ac_status); } &&
e143ad11
AS
13947 { ac_try='test -z "$ac_c_werror_flag"
13948 || test ! -s conftest.err'
edfaf76d
LK
13949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13950 (eval $ac_try) 2>&5
13951 ac_status=$?
13952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13953 (exit $ac_status); }; } &&
13954 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13956 (eval $ac_try) 2>&5
13957 ac_status=$?
c0d27fcc 13958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13959 (exit $ac_status); }; }; then
98418dba 13960 ac_cv_lib_mail_maillock=yes
ba4481b5 13961else
503d2be0 13962 echo "$as_me: failed program was:" >&5
19650fd6
AS
13963sed 's/^/| /' conftest.$ac_ext >&5
13964
98418dba 13965ac_cv_lib_mail_maillock=no
ba4481b5 13966fi
edfaf76d
LK
13967rm -f conftest.err conftest.$ac_objext \
13968 conftest$ac_exeext conftest.$ac_ext
98418dba 13969LIBS=$ac_check_lib_save_LIBS
ba4481b5 13970fi
c0d27fcc 13971echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
13972echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
13973if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 13974 cat >>confdefs.h <<_ACEOF
98418dba 13975#define HAVE_LIBMAIL 1
c0d27fcc 13976_ACEOF
ba4481b5 13977
98418dba 13978 LIBS="-lmail $LIBS"
ba4481b5 13979
98418dba 13980fi
ba4481b5 13981
c0d27fcc
MR
13982
13983echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
13984echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
13985if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 13986 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13987else
503d2be0 13988 ac_check_lib_save_LIBS=$LIBS
98418dba 13989LIBS="-llockfile $LIBS"
503d2be0 13990cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13991/* confdefs.h. */
13992_ACEOF
13993cat confdefs.h >>conftest.$ac_ext
13994cat >>conftest.$ac_ext <<_ACEOF
13995/* end confdefs.h. */
503d2be0 13996
ba4481b5 13997/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13998#ifdef __cplusplus
13999extern "C"
14000#endif
ba4481b5 14001/* We use char because int might match the return type of a gcc2
503d2be0 14002 builtin and then its argument prototype would still apply. */
98418dba 14003char maillock ();
503d2be0
AS
14004int
14005main ()
14006{
98418dba 14007maillock ();
503d2be0
AS
14008 ;
14009 return 0;
14010}
14011_ACEOF
14012rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14014 (eval $ac_link) 2>conftest.er1
503d2be0 14015 ac_status=$?
edfaf76d
LK
14016 grep -v '^ *+' conftest.er1 >conftest.err
14017 rm -f conftest.er1
14018 cat conftest.err >&5
c0d27fcc 14019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14020 (exit $ac_status); } &&
e143ad11
AS
14021 { ac_try='test -z "$ac_c_werror_flag"
14022 || test ! -s conftest.err'
edfaf76d
LK
14023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14024 (eval $ac_try) 2>&5
14025 ac_status=$?
14026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14027 (exit $ac_status); }; } &&
14028 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14030 (eval $ac_try) 2>&5
14031 ac_status=$?
c0d27fcc 14032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14033 (exit $ac_status); }; }; then
98418dba 14034 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
14035else
14036 echo "$as_me: failed program was:" >&5
19650fd6
AS
14037sed 's/^/| /' conftest.$ac_ext >&5
14038
98418dba
CW
14039ac_cv_lib_lockfile_maillock=no
14040fi
edfaf76d
LK
14041rm -f conftest.err conftest.$ac_objext \
14042 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14043LIBS=$ac_check_lib_save_LIBS
14044fi
c0d27fcc 14045echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
14046echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
14047if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 14048 cat >>confdefs.h <<_ACEOF
98418dba 14049#define HAVE_LIBLOCKFILE 1
c0d27fcc 14050_ACEOF
98418dba
CW
14051
14052 LIBS="-llockfile $LIBS"
14053
14054fi
14055
14056# If we have the shared liblockfile, assume we must use it for mail
14057# locking (e.g. Debian). If we couldn't link against liblockfile
14058# (no liblockfile.a installed), ensure that we don't need to.
14059if test "$ac_cv_lib_lockfile_maillock" = no; then
14060 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14061set dummy liblockfile.so; ac_word=$2
c0d27fcc 14062echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
14063echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14064if test "${ac_cv_prog_liblockfile+set}" = set; then
14065 echo $ECHO_N "(cached) $ECHO_C" >&6
14066else
14067 if test -n "$liblockfile"; then
14068 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14069else
c0d27fcc 14070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
14071as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14072for as_dir in $as_dummy
c0d27fcc
MR
14073do
14074 IFS=$as_save_IFS
14075 test -z "$as_dir" && as_dir=.
14076 for ac_exec_ext in '' $ac_executable_extensions; do
14077 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14078 ac_cv_prog_liblockfile="yes"
14079 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14080 break 2
14081 fi
14082done
98418dba
CW
14083done
14084
14085 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 14086fi
503d2be0 14087fi
98418dba
CW
14088liblockfile=$ac_cv_prog_liblockfile
14089if test -n "$liblockfile"; then
c0d27fcc 14090 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
14091echo "${ECHO_T}$liblockfile" >&6
14092else
c0d27fcc 14093 echo "$as_me:$LINENO: result: no" >&5
98418dba 14094echo "${ECHO_T}no" >&6
ba4481b5
DL
14095fi
14096
98418dba 14097 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 14098 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
14099This probably means that movemail could lose mail.
14100There may be a \`development' package to install containing liblockfile." >&5
14101echo "$as_me: error: Shared liblockfile found but can't link against it.
14102This probably means that movemail could lose mail.
14103There may be a \`development' package to install containing liblockfile." >&2;}
14104 { (exit 1); exit 1; }; }
98418dba 14105 else :
55597d70 14106 fi
98418dba 14107fi
503d2be0 14108
98418dba
CW
14109for ac_func in touchlock
14110do
14111as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14112echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14113echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14114if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14115 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 14116else
98418dba 14117 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14118/* confdefs.h. */
14119_ACEOF
14120cat confdefs.h >>conftest.$ac_ext
14121cat >>conftest.$ac_ext <<_ACEOF
14122/* end confdefs.h. */
edfaf76d
LK
14123/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14124 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14125#define $ac_func innocuous_$ac_func
14126
98418dba 14127/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14128 which can conflict with char $ac_func (); below.
14129 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14130 <limits.h> exists even on freestanding compilers. */
edfaf76d 14131
19650fd6
AS
14132#ifdef __STDC__
14133# include <limits.h>
14134#else
14135# include <assert.h>
14136#endif
edfaf76d
LK
14137
14138#undef $ac_func
14139
457b792c 14140/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14141#ifdef __cplusplus
14142extern "C"
19650fd6 14143{
503d2be0 14144#endif
457b792c 14145/* We use char because int might match the return type of a gcc2
503d2be0 14146 builtin and then its argument prototype would still apply. */
98418dba 14147char $ac_func ();
98418dba
CW
14148/* The GNU C library defines this for functions which it implements
14149 to always fail with ENOSYS. Some functions are actually named
14150 something starting with __ and the normal name is an alias. */
14151#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14152choke me
14153#else
19650fd6
AS
14154char (*f) () = $ac_func;
14155#endif
14156#ifdef __cplusplus
14157}
cd958eb3
MB
14158#endif
14159
19650fd6
AS
14160int
14161main ()
14162{
14163return f != $ac_func;
503d2be0
AS
14164 ;
14165 return 0;
14166}
14167_ACEOF
14168rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14169if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14170 (eval $ac_link) 2>conftest.er1
503d2be0 14171 ac_status=$?
edfaf76d
LK
14172 grep -v '^ *+' conftest.er1 >conftest.err
14173 rm -f conftest.er1
14174 cat conftest.err >&5
c0d27fcc 14175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14176 (exit $ac_status); } &&
e143ad11
AS
14177 { ac_try='test -z "$ac_c_werror_flag"
14178 || test ! -s conftest.err'
edfaf76d
LK
14179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14180 (eval $ac_try) 2>&5
14181 ac_status=$?
14182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14183 (exit $ac_status); }; } &&
14184 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14186 (eval $ac_try) 2>&5
14187 ac_status=$?
c0d27fcc 14188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14189 (exit $ac_status); }; }; then
98418dba 14190 eval "$as_ac_var=yes"
503d2be0
AS
14191else
14192 echo "$as_me: failed program was:" >&5
19650fd6
AS
14193sed 's/^/| /' conftest.$ac_ext >&5
14194
98418dba 14195eval "$as_ac_var=no"
503d2be0 14196fi
edfaf76d
LK
14197rm -f conftest.err conftest.$ac_objext \
14198 conftest$ac_exeext conftest.$ac_ext
503d2be0 14199fi
c0d27fcc 14200echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14201echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14202if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14203 cat >>confdefs.h <<_ACEOF
98418dba 14204#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14205_ACEOF
457b792c 14206
457b792c 14207fi
98418dba 14208done
457b792c 14209
c0d27fcc 14210
98418dba
CW
14211for ac_header in maillock.h
14212do
14213as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14214if eval "test \"\${$as_ac_Header+set}\" = set"; then
14215 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
14216echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14217if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 14218 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14219fi
14220echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14221echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 14222else
c0d27fcc
MR
14223 # Is the header compilable?
14224echo "$as_me:$LINENO: checking $ac_header usability" >&5
14225echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14226cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14227/* confdefs.h. */
14228_ACEOF
14229cat confdefs.h >>conftest.$ac_ext
14230cat >>conftest.$ac_ext <<_ACEOF
14231/* end confdefs.h. */
c0d27fcc
MR
14232$ac_includes_default
14233#include <$ac_header>
14234_ACEOF
14235rm -f conftest.$ac_objext
14236if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14237 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14238 ac_status=$?
edfaf76d
LK
14239 grep -v '^ *+' conftest.er1 >conftest.err
14240 rm -f conftest.er1
14241 cat conftest.err >&5
c0d27fcc
MR
14242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14243 (exit $ac_status); } &&
e143ad11
AS
14244 { ac_try='test -z "$ac_c_werror_flag"
14245 || test ! -s conftest.err'
edfaf76d
LK
14246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14247 (eval $ac_try) 2>&5
14248 ac_status=$?
14249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14250 (exit $ac_status); }; } &&
14251 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14253 (eval $ac_try) 2>&5
14254 ac_status=$?
14255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14256 (exit $ac_status); }; }; then
14257 ac_header_compiler=yes
14258else
14259 echo "$as_me: failed program was:" >&5
19650fd6
AS
14260sed 's/^/| /' conftest.$ac_ext >&5
14261
c0d27fcc
MR
14262ac_header_compiler=no
14263fi
edfaf76d 14264rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14265echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14266echo "${ECHO_T}$ac_header_compiler" >&6
14267
14268# Is the header present?
14269echo "$as_me:$LINENO: checking $ac_header presence" >&5
14270echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14271cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14272/* confdefs.h. */
14273_ACEOF
14274cat confdefs.h >>conftest.$ac_ext
14275cat >>conftest.$ac_ext <<_ACEOF
14276/* end confdefs.h. */
98418dba 14277#include <$ac_header>
503d2be0 14278_ACEOF
c0d27fcc 14279if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 14280 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 14281 ac_status=$?
6bae0ccf 14282 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14283 rm -f conftest.er1
14284 cat conftest.err >&5
c0d27fcc 14285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
14286 (exit $ac_status); } >/dev/null; then
14287 if test -s conftest.err; then
14288 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14289 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
14290 else
14291 ac_cpp_err=
14292 fi
503d2be0 14293else
98418dba 14294 ac_cpp_err=yes
503d2be0 14295fi
98418dba 14296if test -z "$ac_cpp_err"; then
c0d27fcc 14297 ac_header_preproc=yes
98418dba
CW
14298else
14299 echo "$as_me: failed program was:" >&5
19650fd6
AS
14300sed 's/^/| /' conftest.$ac_ext >&5
14301
c0d27fcc 14302 ac_header_preproc=no
503d2be0 14303fi
98418dba 14304rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14305echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14306echo "${ECHO_T}$ac_header_preproc" >&6
14307
14308# So? What about this header?
edfaf76d
LK
14309case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14310 yes:no: )
c0d27fcc
MR
14311 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14312echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14313 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14314echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14315 ac_header_preproc=yes
19650fd6 14316 ;;
edfaf76d 14317 no:yes:* )
c0d27fcc
MR
14318 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14319echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14320 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14321echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14322 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14323echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14324 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14325echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14326 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14327echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14328 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14329echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14330 (
14331 cat <<\_ASBOX
edfaf76d
LK
14332## ------------------------------------------ ##
14333## Report this to the AC_PACKAGE_NAME lists. ##
14334## ------------------------------------------ ##
19650fd6
AS
14335_ASBOX
14336 ) |
14337 sed "s/^/$as_me: WARNING: /" >&2
14338 ;;
c0d27fcc
MR
14339esac
14340echo "$as_me:$LINENO: checking for $ac_header" >&5
14341echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14342if eval "test \"\${$as_ac_Header+set}\" = set"; then
14343 echo $ECHO_N "(cached) $ECHO_C" >&6
14344else
edfaf76d 14345 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14346fi
c0d27fcc 14347echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14348echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14349
14350fi
98418dba 14351if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14352 cat >>confdefs.h <<_ACEOF
98418dba 14353#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14354_ACEOF
48d4b120 14355
ba4481b5 14356fi
c0d27fcc 14357
98418dba
CW
14358done
14359
c0d27fcc
MR
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
22044edf
DL
14415
14416
c0d27fcc 14417
b0e44248
RB
14418
14419
973a76b1
DL
14420
14421
14422
cd958eb3 14423
25ca0bca 14424
ea92fc9f 14425
e2fcf543 14426
c0d27fcc
MR
14427
14428
98418dba 14429for ac_func in gethostname getdomainname dup2 \
e2fcf543 14430rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
98418dba
CW
14431random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
14432strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 14433utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
14434__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
14435sendto recvfrom getsockopt setsockopt getsockname getpeername \
b0e44248 14436gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
4489ece2 14437memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
14438do
14439as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14440echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14441echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14442if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14443 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14444else
503d2be0 14445 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14446/* confdefs.h. */
14447_ACEOF
14448cat confdefs.h >>conftest.$ac_ext
14449cat >>conftest.$ac_ext <<_ACEOF
14450/* end confdefs.h. */
edfaf76d
LK
14451/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14452 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14453#define $ac_func innocuous_$ac_func
14454
98418dba 14455/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14456 which can conflict with char $ac_func (); below.
14457 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14458 <limits.h> exists even on freestanding compilers. */
edfaf76d 14459
19650fd6
AS
14460#ifdef __STDC__
14461# include <limits.h>
14462#else
14463# include <assert.h>
14464#endif
edfaf76d
LK
14465
14466#undef $ac_func
14467
ba4481b5 14468/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14469#ifdef __cplusplus
14470extern "C"
19650fd6 14471{
503d2be0 14472#endif
ba4481b5 14473/* We use char because int might match the return type of a gcc2
503d2be0 14474 builtin and then its argument prototype would still apply. */
98418dba 14475char $ac_func ();
98418dba
CW
14476/* The GNU C library defines this for functions which it implements
14477 to always fail with ENOSYS. Some functions are actually named
14478 something starting with __ and the normal name is an alias. */
14479#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14480choke me
14481#else
19650fd6
AS
14482char (*f) () = $ac_func;
14483#endif
14484#ifdef __cplusplus
14485}
98418dba
CW
14486#endif
14487
19650fd6
AS
14488int
14489main ()
14490{
14491return f != $ac_func;
503d2be0
AS
14492 ;
14493 return 0;
14494}
14495_ACEOF
14496rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14497if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14498 (eval $ac_link) 2>conftest.er1
503d2be0 14499 ac_status=$?
edfaf76d
LK
14500 grep -v '^ *+' conftest.er1 >conftest.err
14501 rm -f conftest.er1
14502 cat conftest.err >&5
c0d27fcc 14503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14504 (exit $ac_status); } &&
e143ad11
AS
14505 { ac_try='test -z "$ac_c_werror_flag"
14506 || test ! -s conftest.err'
c0d27fcc 14507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14508 (eval $ac_try) 2>&5
14509 ac_status=$?
c0d27fcc 14510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
14511 (exit $ac_status); }; } &&
14512 { ac_try='test -s conftest$ac_exeext'
14513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14514 (eval $ac_try) 2>&5
14515 ac_status=$?
14516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14517 (exit $ac_status); }; }; then
98418dba 14518 eval "$as_ac_var=yes"
503d2be0
AS
14519else
14520 echo "$as_me: failed program was:" >&5
19650fd6
AS
14521sed 's/^/| /' conftest.$ac_ext >&5
14522
98418dba 14523eval "$as_ac_var=no"
503d2be0 14524fi
edfaf76d
LK
14525rm -f conftest.err conftest.$ac_objext \
14526 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14527fi
c0d27fcc 14528echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14529echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14530if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14531 cat >>confdefs.h <<_ACEOF
98418dba 14532#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14533_ACEOF
ba4481b5 14534
ba4481b5 14535fi
98418dba 14536done
ba4481b5 14537
c0d27fcc
MR
14538
14539
98418dba
CW
14540for ac_header in sys/un.h
14541do
14542as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14543if eval "test \"\${$as_ac_Header+set}\" = set"; then
14544 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
14545echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14546if eval "test \"\${$as_ac_Header+set}\" = set"; then
14547 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14548fi
14549echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14550echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 14551else
c0d27fcc
MR
14552 # Is the header compilable?
14553echo "$as_me:$LINENO: checking $ac_header usability" >&5
14554echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14555cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14556/* confdefs.h. */
14557_ACEOF
14558cat confdefs.h >>conftest.$ac_ext
14559cat >>conftest.$ac_ext <<_ACEOF
14560/* end confdefs.h. */
c0d27fcc
MR
14561$ac_includes_default
14562#include <$ac_header>
14563_ACEOF
14564rm -f conftest.$ac_objext
14565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14566 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14567 ac_status=$?
edfaf76d
LK
14568 grep -v '^ *+' conftest.er1 >conftest.err
14569 rm -f conftest.er1
14570 cat conftest.err >&5
c0d27fcc
MR
14571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14572 (exit $ac_status); } &&
e143ad11
AS
14573 { ac_try='test -z "$ac_c_werror_flag"
14574 || test ! -s conftest.err'
edfaf76d
LK
14575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14576 (eval $ac_try) 2>&5
14577 ac_status=$?
14578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14579 (exit $ac_status); }; } &&
14580 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14582 (eval $ac_try) 2>&5
14583 ac_status=$?
14584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14585 (exit $ac_status); }; }; then
14586 ac_header_compiler=yes
14587else
14588 echo "$as_me: failed program was:" >&5
19650fd6
AS
14589sed 's/^/| /' conftest.$ac_ext >&5
14590
c0d27fcc
MR
14591ac_header_compiler=no
14592fi
edfaf76d 14593rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14594echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14595echo "${ECHO_T}$ac_header_compiler" >&6
14596
14597# Is the header present?
14598echo "$as_me:$LINENO: checking $ac_header presence" >&5
14599echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14600cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14601/* confdefs.h. */
14602_ACEOF
14603cat confdefs.h >>conftest.$ac_ext
14604cat >>conftest.$ac_ext <<_ACEOF
14605/* end confdefs.h. */
98418dba 14606#include <$ac_header>
503d2be0 14607_ACEOF
c0d27fcc 14608if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14609 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14610 ac_status=$?
6bae0ccf 14611 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14612 rm -f conftest.er1
14613 cat conftest.err >&5
c0d27fcc 14614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14615 (exit $ac_status); } >/dev/null; then
14616 if test -s conftest.err; then
14617 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14618 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14619 else
14620 ac_cpp_err=
14621 fi
14622else
14623 ac_cpp_err=yes
14624fi
14625if test -z "$ac_cpp_err"; then
c0d27fcc 14626 ac_header_preproc=yes
ba4481b5 14627else
503d2be0 14628 echo "$as_me: failed program was:" >&5
19650fd6
AS
14629sed 's/^/| /' conftest.$ac_ext >&5
14630
c0d27fcc 14631 ac_header_preproc=no
ba4481b5 14632fi
503d2be0 14633rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14634echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14635echo "${ECHO_T}$ac_header_preproc" >&6
14636
14637# So? What about this header?
edfaf76d
LK
14638case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14639 yes:no: )
c0d27fcc
MR
14640 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14641echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14642 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14643echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14644 ac_header_preproc=yes
19650fd6 14645 ;;
edfaf76d 14646 no:yes:* )
c0d27fcc
MR
14647 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14648echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14649 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14650echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14651 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14652echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14653 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14654echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14655 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14656echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14657 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14658echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14659 (
14660 cat <<\_ASBOX
edfaf76d
LK
14661## ------------------------------------------ ##
14662## Report this to the AC_PACKAGE_NAME lists. ##
14663## ------------------------------------------ ##
19650fd6
AS
14664_ASBOX
14665 ) |
14666 sed "s/^/$as_me: WARNING: /" >&2
14667 ;;
c0d27fcc
MR
14668esac
14669echo "$as_me:$LINENO: checking for $ac_header" >&5
14670echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14671if eval "test \"\${$as_ac_Header+set}\" = set"; then
14672 echo $ECHO_N "(cached) $ECHO_C" >&6
14673else
edfaf76d 14674 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14675fi
c0d27fcc 14676echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 14677echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14678
14679fi
925c2f3f 14680if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14681 cat >>confdefs.h <<_ACEOF
925c2f3f 14682#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14683_ACEOF
503d2be0 14684
925c2f3f 14685fi
c0d27fcc 14686
925c2f3f
EZ
14687done
14688
c0d27fcc
MR
14689
14690
14691
edfaf76d
LK
14692
14693for ac_header in stdlib.h sys/time.h unistd.h
925c2f3f
EZ
14694do
14695as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14696if eval "test \"\${$as_ac_Header+set}\" = set"; then
14697 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
14698echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14699if eval "test \"\${$as_ac_Header+set}\" = set"; then
14700 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14701fi
14702echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14703echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 14704else
c0d27fcc
MR
14705 # Is the header compilable?
14706echo "$as_me:$LINENO: checking $ac_header usability" >&5
14707echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14708cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14709/* confdefs.h. */
14710_ACEOF
14711cat confdefs.h >>conftest.$ac_ext
14712cat >>conftest.$ac_ext <<_ACEOF
14713/* end confdefs.h. */
c0d27fcc
MR
14714$ac_includes_default
14715#include <$ac_header>
14716_ACEOF
14717rm -f conftest.$ac_objext
14718if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14719 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14720 ac_status=$?
edfaf76d
LK
14721 grep -v '^ *+' conftest.er1 >conftest.err
14722 rm -f conftest.er1
14723 cat conftest.err >&5
c0d27fcc
MR
14724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14725 (exit $ac_status); } &&
e143ad11
AS
14726 { ac_try='test -z "$ac_c_werror_flag"
14727 || test ! -s conftest.err'
edfaf76d
LK
14728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14729 (eval $ac_try) 2>&5
14730 ac_status=$?
14731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14732 (exit $ac_status); }; } &&
14733 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14735 (eval $ac_try) 2>&5
14736 ac_status=$?
14737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14738 (exit $ac_status); }; }; then
14739 ac_header_compiler=yes
14740else
14741 echo "$as_me: failed program was:" >&5
19650fd6
AS
14742sed 's/^/| /' conftest.$ac_ext >&5
14743
c0d27fcc
MR
14744ac_header_compiler=no
14745fi
edfaf76d 14746rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14747echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14748echo "${ECHO_T}$ac_header_compiler" >&6
14749
14750# Is the header present?
14751echo "$as_me:$LINENO: checking $ac_header presence" >&5
14752echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14753cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14754/* confdefs.h. */
14755_ACEOF
14756cat confdefs.h >>conftest.$ac_ext
14757cat >>conftest.$ac_ext <<_ACEOF
14758/* end confdefs.h. */
98418dba 14759#include <$ac_header>
503d2be0 14760_ACEOF
c0d27fcc 14761if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14762 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14763 ac_status=$?
6bae0ccf 14764 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14765 rm -f conftest.er1
14766 cat conftest.err >&5
c0d27fcc 14767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14768 (exit $ac_status); } >/dev/null; then
14769 if test -s conftest.err; then
14770 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14771 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14772 else
14773 ac_cpp_err=
14774 fi
14775else
14776 ac_cpp_err=yes
14777fi
14778if test -z "$ac_cpp_err"; then
c0d27fcc 14779 ac_header_preproc=yes
98418dba
CW
14780else
14781 echo "$as_me: failed program was:" >&5
19650fd6
AS
14782sed 's/^/| /' conftest.$ac_ext >&5
14783
c0d27fcc 14784 ac_header_preproc=no
98418dba
CW
14785fi
14786rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14787echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14788echo "${ECHO_T}$ac_header_preproc" >&6
14789
14790# So? What about this header?
edfaf76d
LK
14791case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14792 yes:no: )
c0d27fcc
MR
14793 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14794echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14795 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14796echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14797 ac_header_preproc=yes
19650fd6 14798 ;;
edfaf76d 14799 no:yes:* )
c0d27fcc
MR
14800 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14801echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14802 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14803echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14804 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14805echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14806 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14807echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14808 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14809echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14810 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14811echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14812 (
14813 cat <<\_ASBOX
edfaf76d
LK
14814## ------------------------------------------ ##
14815## Report this to the AC_PACKAGE_NAME lists. ##
14816## ------------------------------------------ ##
19650fd6
AS
14817_ASBOX
14818 ) |
14819 sed "s/^/$as_me: WARNING: /" >&2
14820 ;;
c0d27fcc
MR
14821esac
14822echo "$as_me:$LINENO: checking for $ac_header" >&5
14823echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14824if eval "test \"\${$as_ac_Header+set}\" = set"; then
14825 echo $ECHO_N "(cached) $ECHO_C" >&6
14826else
edfaf76d 14827 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 14828fi
c0d27fcc 14829echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14830echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14831
14832fi
98418dba 14833if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14834 cat >>confdefs.h <<_ACEOF
98418dba 14835#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14836_ACEOF
98418dba
CW
14837
14838fi
c0d27fcc 14839
98418dba
CW
14840done
14841
c0d27fcc 14842
98418dba
CW
14843for ac_func in alarm
14844do
14845as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14846echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14847echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14848if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14849 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14850else
98418dba 14851 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14852/* confdefs.h. */
14853_ACEOF
14854cat confdefs.h >>conftest.$ac_ext
14855cat >>conftest.$ac_ext <<_ACEOF
14856/* end confdefs.h. */
edfaf76d
LK
14857/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14858 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14859#define $ac_func innocuous_$ac_func
14860
98418dba 14861/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14862 which can conflict with char $ac_func (); below.
14863 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14864 <limits.h> exists even on freestanding compilers. */
edfaf76d 14865
19650fd6
AS
14866#ifdef __STDC__
14867# include <limits.h>
14868#else
14869# include <assert.h>
14870#endif
edfaf76d
LK
14871
14872#undef $ac_func
14873
ba4481b5 14874/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14875#ifdef __cplusplus
14876extern "C"
19650fd6 14877{
503d2be0 14878#endif
ba4481b5 14879/* We use char because int might match the return type of a gcc2
503d2be0 14880 builtin and then its argument prototype would still apply. */
98418dba 14881char $ac_func ();
98418dba
CW
14882/* The GNU C library defines this for functions which it implements
14883 to always fail with ENOSYS. Some functions are actually named
14884 something starting with __ and the normal name is an alias. */
14885#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14886choke me
14887#else
19650fd6
AS
14888char (*f) () = $ac_func;
14889#endif
14890#ifdef __cplusplus
14891}
98418dba
CW
14892#endif
14893
19650fd6
AS
14894int
14895main ()
14896{
14897return f != $ac_func;
503d2be0
AS
14898 ;
14899 return 0;
14900}
14901_ACEOF
14902rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14903if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14904 (eval $ac_link) 2>conftest.er1
503d2be0 14905 ac_status=$?
edfaf76d
LK
14906 grep -v '^ *+' conftest.er1 >conftest.err
14907 rm -f conftest.er1
14908 cat conftest.err >&5
c0d27fcc 14909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14910 (exit $ac_status); } &&
e143ad11
AS
14911 { ac_try='test -z "$ac_c_werror_flag"
14912 || test ! -s conftest.err'
edfaf76d
LK
14913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14914 (eval $ac_try) 2>&5
14915 ac_status=$?
14916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14917 (exit $ac_status); }; } &&
14918 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14920 (eval $ac_try) 2>&5
14921 ac_status=$?
c0d27fcc 14922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14923 (exit $ac_status); }; }; then
98418dba 14924 eval "$as_ac_var=yes"
503d2be0
AS
14925else
14926 echo "$as_me: failed program was:" >&5
19650fd6
AS
14927sed 's/^/| /' conftest.$ac_ext >&5
14928
98418dba 14929eval "$as_ac_var=no"
503d2be0 14930fi
edfaf76d
LK
14931rm -f conftest.err conftest.$ac_objext \
14932 conftest$ac_exeext conftest.$ac_ext
ffe36136 14933fi
c0d27fcc 14934echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14935echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14936if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14937 cat >>confdefs.h <<_ACEOF
98418dba 14938#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14939_ACEOF
ffe36136 14940
ba4481b5 14941fi
98418dba 14942done
ba4481b5 14943
c0d27fcc 14944echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
14945echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
14946if test "${ac_cv_func_working_mktime+set}" = set; then
14947 echo $ECHO_N "(cached) $ECHO_C" >&6
14948else
14949 if test "$cross_compiling" = yes; then
14950 ac_cv_func_working_mktime=no
14951else
14952 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14953/* confdefs.h. */
14954_ACEOF
14955cat confdefs.h >>conftest.$ac_ext
14956cat >>conftest.$ac_ext <<_ACEOF
14957/* end confdefs.h. */
98418dba
CW
14958/* Test program from Paul Eggert and Tony Leneis. */
14959#if TIME_WITH_SYS_TIME
14960# include <sys/time.h>
14961# include <time.h>
14962#else
14963# if HAVE_SYS_TIME_H
14964# include <sys/time.h>
14965# else
14966# include <time.h>
14967# endif
14968#endif
ba4481b5 14969
edfaf76d
LK
14970#if HAVE_STDLIB_H
14971# include <stdlib.h>
14972#endif
14973
98418dba
CW
14974#if HAVE_UNISTD_H
14975# include <unistd.h>
14976#endif
ba4481b5 14977
98418dba
CW
14978#if !HAVE_ALARM
14979# define alarm(X) /* empty */
14980#endif
df645f7c 14981
98418dba
CW
14982/* Work around redefinition to rpl_putenv by other config tests. */
14983#undef putenv
df645f7c 14984
98418dba 14985static time_t time_t_max;
edfaf76d 14986static time_t time_t_min;
df645f7c 14987
98418dba 14988/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
14989static char *tz_strings[] = {
14990 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
14991 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
14992};
14993#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 14994
98418dba
CW
14995/* Fail if mktime fails to convert a date in the spring-forward gap.
14996 Based on a problem report from Andreas Jaeger. */
14997static void
14998spring_forward_gap ()
14999{
15000 /* glibc (up to about 1998-10-07) failed this test. */
15001 struct tm tm;
15002
15003 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15004 instead of "TZ=America/Vancouver" in order to detect the bug even
15005 on systems that don't support the Olson extension, or don't have the
15006 full zoneinfo tables installed. */
15007 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
15008
15009 tm.tm_year = 98;
15010 tm.tm_mon = 3;
15011 tm.tm_mday = 5;
15012 tm.tm_hour = 2;
15013 tm.tm_min = 0;
15014 tm.tm_sec = 0;
15015 tm.tm_isdst = -1;
15016 if (mktime (&tm) == (time_t)-1)
15017 exit (1);
15018}
15019
15020static void
edfaf76d 15021mktime_test1 (now)
98418dba
CW
15022 time_t now;
15023{
15024 struct tm *lt;
15025 if ((lt = localtime (&now)) && mktime (lt) != now)
15026 exit (1);
edfaf76d
LK
15027}
15028
15029static void
15030mktime_test (now)
15031 time_t now;
15032{
15033 mktime_test1 (now);
15034 mktime_test1 ((time_t) (time_t_max - now));
15035 mktime_test1 ((time_t) (time_t_min + now));
98418dba
CW
15036}
15037
15038static void
15039irix_6_4_bug ()
15040{
15041 /* Based on code from Ariel Faigon. */
15042 struct tm tm;
15043 tm.tm_year = 96;
15044 tm.tm_mon = 3;
15045 tm.tm_mday = 0;
15046 tm.tm_hour = 0;
15047 tm.tm_min = 0;
15048 tm.tm_sec = 0;
15049 tm.tm_isdst = -1;
15050 mktime (&tm);
15051 if (tm.tm_mon != 2 || tm.tm_mday != 31)
15052 exit (1);
15053}
15054
15055static void
15056bigtime_test (j)
15057 int j;
15058{
15059 struct tm tm;
15060 time_t now;
15061 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
15062 now = mktime (&tm);
15063 if (now != (time_t) -1)
15064 {
15065 struct tm *lt = localtime (&now);
15066 if (! (lt
15067 && lt->tm_year == tm.tm_year
15068 && lt->tm_mon == tm.tm_mon
15069 && lt->tm_mday == tm.tm_mday
15070 && lt->tm_hour == tm.tm_hour
15071 && lt->tm_min == tm.tm_min
15072 && lt->tm_sec == tm.tm_sec
15073 && lt->tm_yday == tm.tm_yday
15074 && lt->tm_wday == tm.tm_wday
15075 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
15076 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
15077 exit (1);
15078 }
15079}
15080
15081int
15082main ()
15083{
15084 time_t t, delta;
15085 int i, j;
15086
15087 /* This test makes some buggy mktime implementations loop.
15088 Give up after 60 seconds; a mktime slower than that
15089 isn't worth using anyway. */
15090 alarm (60);
15091
15092 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
15093 continue;
15094 time_t_max--;
edfaf76d
LK
15095 if ((time_t) -1 < 0)
15096 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
15097 continue;
98418dba
CW
15098 delta = time_t_max / 997; /* a suitable prime number */
15099 for (i = 0; i < N_STRINGS; i++)
15100 {
15101 if (tz_strings[i])
15102 putenv (tz_strings[i]);
503d2be0 15103
98418dba
CW
15104 for (t = 0; t <= time_t_max - delta; t += delta)
15105 mktime_test (t);
edfaf76d
LK
15106 mktime_test ((time_t) 1);
15107 mktime_test ((time_t) (60 * 60));
15108 mktime_test ((time_t) (60 * 60 * 24));
98418dba
CW
15109
15110 for (j = 1; 0 < j; j *= 2)
edfaf76d 15111 bigtime_test (j);
98418dba
CW
15112 bigtime_test (j - 1);
15113 }
15114 irix_6_4_bug ();
15115 spring_forward_gap ();
15116 exit (0);
503d2be0
AS
15117}
15118_ACEOF
98418dba 15119rm -f conftest$ac_exeext
c0d27fcc 15120if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15121 (eval $ac_link) 2>&5
15122 ac_status=$?
c0d27fcc 15123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15124 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 15125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15126 (eval $ac_try) 2>&5
15127 ac_status=$?
c0d27fcc 15128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15129 (exit $ac_status); }; }; then
98418dba 15130 ac_cv_func_working_mktime=yes
503d2be0 15131else
98418dba
CW
15132 echo "$as_me: program exited with status $ac_status" >&5
15133echo "$as_me: failed program was:" >&5
19650fd6
AS
15134sed 's/^/| /' conftest.$ac_ext >&5
15135
c0d27fcc 15136( exit $ac_status )
98418dba 15137ac_cv_func_working_mktime=no
503d2be0 15138fi
edfaf76d 15139rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 15140fi
ba4481b5 15141fi
c0d27fcc 15142echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
15143echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
15144if test $ac_cv_func_working_mktime = no; then
edfaf76d
LK
15145 case $LIBOBJS in
15146 "mktime.$ac_objext" | \
15147 *" mktime.$ac_objext" | \
15148 "mktime.$ac_objext "* | \
15149 *" mktime.$ac_objext "* ) ;;
15150 *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;;
15151esac
15152
ba4481b5
DL
15153fi
15154
98418dba 15155if test "$ac_cv_func_working_mktime" = no; then
b936fae4 15156
c0d27fcc 15157cat >>confdefs.h <<\_ACEOF
98418dba 15158#define BROKEN_MKTIME 1
c0d27fcc 15159_ACEOF
ba4481b5 15160
ba4481b5 15161fi
503d2be0 15162
98418dba
CW
15163ac_have_func=no # yes means we've found a way to get the load average.
15164
6bae0ccf
DL
15165# Make sure getloadavg.c is where it belongs, at configure-time.
15166test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
15167 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
15168echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
15169 { (exit 1); exit 1; }; }
15170
98418dba
CW
15171ac_save_LIBS=$LIBS
15172
15173# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 15174(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
15175echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
15176if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 15177 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15178else
503d2be0 15179 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15180/* confdefs.h. */
15181_ACEOF
15182cat confdefs.h >>conftest.$ac_ext
15183cat >>conftest.$ac_ext <<_ACEOF
15184/* end confdefs.h. */
edfaf76d
LK
15185/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
15186 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15187#define getloadavg innocuous_getloadavg
15188
98418dba 15189/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15190 which can conflict with char getloadavg (); below.
15191 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15192 <limits.h> exists even on freestanding compilers. */
edfaf76d 15193
19650fd6
AS
15194#ifdef __STDC__
15195# include <limits.h>
15196#else
15197# include <assert.h>
15198#endif
edfaf76d
LK
15199
15200#undef getloadavg
15201
ba4481b5 15202/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15203#ifdef __cplusplus
15204extern "C"
19650fd6 15205{
503d2be0 15206#endif
ba4481b5 15207/* We use char because int might match the return type of a gcc2
503d2be0 15208 builtin and then its argument prototype would still apply. */
98418dba 15209char getloadavg ();
98418dba
CW
15210/* The GNU C library defines this for functions which it implements
15211 to always fail with ENOSYS. Some functions are actually named
15212 something starting with __ and the normal name is an alias. */
15213#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
15214choke me
15215#else
19650fd6
AS
15216char (*f) () = getloadavg;
15217#endif
15218#ifdef __cplusplus
15219}
cd958eb3
MB
15220#endif
15221
19650fd6
AS
15222int
15223main ()
15224{
15225return f != getloadavg;
503d2be0
AS
15226 ;
15227 return 0;
15228}
15229_ACEOF
15230rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15231if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15232 (eval $ac_link) 2>conftest.er1
503d2be0 15233 ac_status=$?
edfaf76d
LK
15234 grep -v '^ *+' conftest.er1 >conftest.err
15235 rm -f conftest.er1
15236 cat conftest.err >&5
c0d27fcc 15237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15238 (exit $ac_status); } &&
e143ad11
AS
15239 { ac_try='test -z "$ac_c_werror_flag"
15240 || test ! -s conftest.err'
edfaf76d
LK
15241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15242 (eval $ac_try) 2>&5
15243 ac_status=$?
15244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15245 (exit $ac_status); }; } &&
15246 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15248 (eval $ac_try) 2>&5
15249 ac_status=$?
c0d27fcc 15250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15251 (exit $ac_status); }; }; then
98418dba 15252 ac_cv_func_getloadavg=yes
503d2be0
AS
15253else
15254 echo "$as_me: failed program was:" >&5
19650fd6
AS
15255sed 's/^/| /' conftest.$ac_ext >&5
15256
98418dba 15257ac_cv_func_getloadavg=no
503d2be0 15258fi
edfaf76d
LK
15259rm -f conftest.err conftest.$ac_objext \
15260 conftest$ac_exeext conftest.$ac_ext
ba4481b5 15261fi
c0d27fcc 15262echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
15263echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
15264if test $ac_cv_func_getloadavg = yes; then
15265 exit 0
15266else
15267 exit 1
ba4481b5 15268fi
98418dba 15269) && ac_have_func=yes
ba4481b5 15270
98418dba 15271# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 15272
98418dba
CW
15273for ac_func in pstat_getdynamic
15274do
15275as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15276echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
15277echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15278if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 15279 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15280else
503d2be0 15281 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15282/* confdefs.h. */
15283_ACEOF
15284cat confdefs.h >>conftest.$ac_ext
15285cat >>conftest.$ac_ext <<_ACEOF
15286/* end confdefs.h. */
edfaf76d
LK
15287/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15288 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15289#define $ac_func innocuous_$ac_func
15290
98418dba 15291/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15292 which can conflict with char $ac_func (); below.
15293 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15294 <limits.h> exists even on freestanding compilers. */
edfaf76d 15295
19650fd6
AS
15296#ifdef __STDC__
15297# include <limits.h>
15298#else
15299# include <assert.h>
15300#endif
edfaf76d
LK
15301
15302#undef $ac_func
15303
ba4481b5 15304/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15305#ifdef __cplusplus
15306extern "C"
19650fd6 15307{
503d2be0 15308#endif
ba4481b5 15309/* We use char because int might match the return type of a gcc2
503d2be0 15310 builtin and then its argument prototype would still apply. */
98418dba 15311char $ac_func ();
98418dba
CW
15312/* The GNU C library defines this for functions which it implements
15313 to always fail with ENOSYS. Some functions are actually named
15314 something starting with __ and the normal name is an alias. */
15315#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15316choke me
15317#else
19650fd6
AS
15318char (*f) () = $ac_func;
15319#endif
15320#ifdef __cplusplus
15321}
98418dba
CW
15322#endif
15323
19650fd6
AS
15324int
15325main ()
15326{
15327return f != $ac_func;
98418dba
CW
15328 ;
15329 return 0;
15330}
f21fadcc 15331_ACEOF
98418dba 15332rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15334 (eval $ac_link) 2>conftest.er1
f21fadcc 15335 ac_status=$?
edfaf76d
LK
15336 grep -v '^ *+' conftest.er1 >conftest.err
15337 rm -f conftest.er1
15338 cat conftest.err >&5
c0d27fcc 15339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15340 (exit $ac_status); } &&
e143ad11
AS
15341 { ac_try='test -z "$ac_c_werror_flag"
15342 || test ! -s conftest.err'
edfaf76d
LK
15343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15344 (eval $ac_try) 2>&5
15345 ac_status=$?
15346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15347 (exit $ac_status); }; } &&
15348 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15350 (eval $ac_try) 2>&5
15351 ac_status=$?
c0d27fcc 15352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15353 (exit $ac_status); }; }; then
15354 eval "$as_ac_var=yes"
f21fadcc
JD
15355else
15356 echo "$as_me: failed program was:" >&5
19650fd6
AS
15357sed 's/^/| /' conftest.$ac_ext >&5
15358
98418dba 15359eval "$as_ac_var=no"
f21fadcc 15360fi
edfaf76d
LK
15361rm -f conftest.err conftest.$ac_objext \
15362 conftest$ac_exeext conftest.$ac_ext
f21fadcc 15363fi
c0d27fcc 15364echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
15365echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15366if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15367 cat >>confdefs.h <<_ACEOF
98418dba 15368#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15369_ACEOF
98418dba
CW
15370
15371fi
15372done
15373
c0d27fcc 15374
98418dba
CW
15375# Solaris has libkstat which does not require root.
15376
c0d27fcc 15377echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
15378echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
15379if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
15380 echo $ECHO_N "(cached) $ECHO_C" >&6
15381else
15382 ac_check_lib_save_LIBS=$LIBS
98418dba 15383LIBS="-lkstat $LIBS"
f21fadcc 15384cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15385/* confdefs.h. */
15386_ACEOF
15387cat confdefs.h >>conftest.$ac_ext
15388cat >>conftest.$ac_ext <<_ACEOF
15389/* end confdefs.h. */
f21fadcc
JD
15390
15391/* Override any gcc2 internal prototype to avoid an error. */
15392#ifdef __cplusplus
15393extern "C"
15394#endif
15395/* We use char because int might match the return type of a gcc2
15396 builtin and then its argument prototype would still apply. */
98418dba 15397char kstat_open ();
f21fadcc
JD
15398int
15399main ()
15400{
98418dba 15401kstat_open ();
f21fadcc
JD
15402 ;
15403 return 0;
15404}
15405_ACEOF
15406rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15407if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15408 (eval $ac_link) 2>conftest.er1
f21fadcc 15409 ac_status=$?
edfaf76d
LK
15410 grep -v '^ *+' conftest.er1 >conftest.err
15411 rm -f conftest.er1
15412 cat conftest.err >&5
c0d27fcc 15413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 15414 (exit $ac_status); } &&
e143ad11
AS
15415 { ac_try='test -z "$ac_c_werror_flag"
15416 || test ! -s conftest.err'
edfaf76d
LK
15417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15418 (eval $ac_try) 2>&5
15419 ac_status=$?
15420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15421 (exit $ac_status); }; } &&
15422 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
15424 (eval $ac_try) 2>&5
15425 ac_status=$?
c0d27fcc 15426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 15427 (exit $ac_status); }; }; then
98418dba 15428 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
15429else
15430 echo "$as_me: failed program was:" >&5
19650fd6
AS
15431sed 's/^/| /' conftest.$ac_ext >&5
15432
98418dba 15433ac_cv_lib_kstat_kstat_open=no
f21fadcc 15434fi
edfaf76d
LK
15435rm -f conftest.err conftest.$ac_objext \
15436 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
15437LIBS=$ac_check_lib_save_LIBS
15438fi
c0d27fcc 15439echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
15440echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
15441if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 15442 cat >>confdefs.h <<_ACEOF
98418dba 15443#define HAVE_LIBKSTAT 1
c0d27fcc 15444_ACEOF
f21fadcc 15445
98418dba 15446 LIBS="-lkstat $LIBS"
f21fadcc 15447
f21fadcc
JD
15448fi
15449
98418dba
CW
15450test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
15451
15452# Some systems with -lutil have (and need) -lkvm as well, some do not.
15453# On Solaris, -lkvm requires nlist from -lelf, so check that first
15454# to get the right answer into the cache.
15455# For kstat on solaris, we need libelf to force the definition of SVR4 below.
15456if test $ac_have_func = no; then
c0d27fcc 15457 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
15458echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
15459if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 15460 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15461else
98418dba
CW
15462 ac_check_lib_save_LIBS=$LIBS
15463LIBS="-lelf $LIBS"
15464cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15465/* confdefs.h. */
15466_ACEOF
15467cat confdefs.h >>conftest.$ac_ext
15468cat >>conftest.$ac_ext <<_ACEOF
15469/* end confdefs.h. */
98418dba
CW
15470
15471/* Override any gcc2 internal prototype to avoid an error. */
15472#ifdef __cplusplus
15473extern "C"
15474#endif
15475/* We use char because int might match the return type of a gcc2
15476 builtin and then its argument prototype would still apply. */
15477char elf_begin ();
503d2be0
AS
15478int
15479main ()
15480{
98418dba 15481elf_begin ();
503d2be0
AS
15482 ;
15483 return 0;
15484}
15485_ACEOF
15486rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15487if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15488 (eval $ac_link) 2>conftest.er1
503d2be0 15489 ac_status=$?
edfaf76d
LK
15490 grep -v '^ *+' conftest.er1 >conftest.err
15491 rm -f conftest.er1
15492 cat conftest.err >&5
c0d27fcc 15493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15494 (exit $ac_status); } &&
e143ad11
AS
15495 { ac_try='test -z "$ac_c_werror_flag"
15496 || test ! -s conftest.err'
edfaf76d
LK
15497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15498 (eval $ac_try) 2>&5
15499 ac_status=$?
15500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15501 (exit $ac_status); }; } &&
15502 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15504 (eval $ac_try) 2>&5
15505 ac_status=$?
c0d27fcc 15506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15507 (exit $ac_status); }; }; then
98418dba 15508 ac_cv_lib_elf_elf_begin=yes
ba4481b5 15509else
503d2be0 15510 echo "$as_me: failed program was:" >&5
19650fd6
AS
15511sed 's/^/| /' conftest.$ac_ext >&5
15512
98418dba 15513ac_cv_lib_elf_elf_begin=no
ba4481b5 15514fi
edfaf76d
LK
15515rm -f conftest.err conftest.$ac_objext \
15516 conftest$ac_exeext conftest.$ac_ext
98418dba 15517LIBS=$ac_check_lib_save_LIBS
ba4481b5 15518fi
c0d27fcc 15519echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
15520echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
15521if test $ac_cv_lib_elf_elf_begin = yes; then
15522 LIBS="-lelf $LIBS"
ba4481b5
DL
15523fi
15524
98418dba
CW
15525fi
15526if test $ac_have_func = no; then
c0d27fcc 15527 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
15528echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
15529if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 15530 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15531else
98418dba
CW
15532 ac_check_lib_save_LIBS=$LIBS
15533LIBS="-lkvm $LIBS"
15534cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15535/* confdefs.h. */
15536_ACEOF
15537cat confdefs.h >>conftest.$ac_ext
15538cat >>conftest.$ac_ext <<_ACEOF
15539/* end confdefs.h. */
98418dba
CW
15540
15541/* Override any gcc2 internal prototype to avoid an error. */
15542#ifdef __cplusplus
15543extern "C"
15544#endif
15545/* We use char because int might match the return type of a gcc2
15546 builtin and then its argument prototype would still apply. */
15547char kvm_open ();
503d2be0
AS
15548int
15549main ()
15550{
98418dba 15551kvm_open ();
503d2be0
AS
15552 ;
15553 return 0;
15554}
15555_ACEOF
15556rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15557if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15558 (eval $ac_link) 2>conftest.er1
503d2be0 15559 ac_status=$?
edfaf76d
LK
15560 grep -v '^ *+' conftest.er1 >conftest.err
15561 rm -f conftest.er1
15562 cat conftest.err >&5
c0d27fcc 15563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15564 (exit $ac_status); } &&
e143ad11
AS
15565 { ac_try='test -z "$ac_c_werror_flag"
15566 || test ! -s conftest.err'
edfaf76d
LK
15567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15568 (eval $ac_try) 2>&5
15569 ac_status=$?
15570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15571 (exit $ac_status); }; } &&
15572 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15574 (eval $ac_try) 2>&5
15575 ac_status=$?
c0d27fcc 15576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15577 (exit $ac_status); }; }; then
98418dba 15578 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
15579else
15580 echo "$as_me: failed program was:" >&5
19650fd6
AS
15581sed 's/^/| /' conftest.$ac_ext >&5
15582
98418dba 15583ac_cv_lib_kvm_kvm_open=no
503d2be0 15584fi
edfaf76d
LK
15585rm -f conftest.err conftest.$ac_objext \
15586 conftest$ac_exeext conftest.$ac_ext
98418dba 15587LIBS=$ac_check_lib_save_LIBS
503d2be0 15588fi
c0d27fcc 15589echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
15590echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
15591if test $ac_cv_lib_kvm_kvm_open = yes; then
15592 LIBS="-lkvm $LIBS"
ba4481b5
DL
15593fi
15594
98418dba 15595 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 15596 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
15597echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
15598if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 15599 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15600else
98418dba
CW
15601 ac_check_lib_save_LIBS=$LIBS
15602LIBS="-lutil $LIBS"
15603cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15604/* confdefs.h. */
15605_ACEOF
15606cat confdefs.h >>conftest.$ac_ext
15607cat >>conftest.$ac_ext <<_ACEOF
15608/* end confdefs.h. */
98418dba
CW
15609
15610/* Override any gcc2 internal prototype to avoid an error. */
15611#ifdef __cplusplus
15612extern "C"
15613#endif
15614/* We use char because int might match the return type of a gcc2
15615 builtin and then its argument prototype would still apply. */
15616char getloadavg ();
503d2be0
AS
15617int
15618main ()
15619{
98418dba 15620getloadavg ();
503d2be0
AS
15621 ;
15622 return 0;
15623}
15624_ACEOF
15625rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15626if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15627 (eval $ac_link) 2>conftest.er1
503d2be0 15628 ac_status=$?
edfaf76d
LK
15629 grep -v '^ *+' conftest.er1 >conftest.err
15630 rm -f conftest.er1
15631 cat conftest.err >&5
c0d27fcc 15632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15633 (exit $ac_status); } &&
e143ad11
AS
15634 { ac_try='test -z "$ac_c_werror_flag"
15635 || test ! -s conftest.err'
edfaf76d
LK
15636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15637 (eval $ac_try) 2>&5
15638 ac_status=$?
15639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15640 (exit $ac_status); }; } &&
15641 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
15642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15643 (eval $ac_try) 2>&5
15644 ac_status=$?
15645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15646 (exit $ac_status); }; }; then
15647 ac_cv_lib_util_getloadavg=yes
15648else
503d2be0 15649 echo "$as_me: failed program was:" >&5
19650fd6
AS
15650sed 's/^/| /' conftest.$ac_ext >&5
15651
98418dba 15652ac_cv_lib_util_getloadavg=no
ba4481b5 15653fi
edfaf76d
LK
15654rm -f conftest.err conftest.$ac_objext \
15655 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15656LIBS=$ac_check_lib_save_LIBS
15657fi
c0d27fcc 15658echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
15659echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
15660if test $ac_cv_lib_util_getloadavg = yes; then
15661 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 15662fi
503d2be0 15663
98418dba 15664fi
ba4481b5 15665
98418dba
CW
15666if test $ac_have_func = no; then
15667 # There is a commonly available library for RS/6000 AIX.
15668 # Since it is not a standard part of AIX, it might be installed locally.
15669 ac_getloadavg_LIBS=$LIBS
15670 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 15671 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
15672echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
15673if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 15674 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15675else
98418dba
CW
15676 ac_check_lib_save_LIBS=$LIBS
15677LIBS="-lgetloadavg $LIBS"
15678cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15679/* confdefs.h. */
15680_ACEOF
15681cat confdefs.h >>conftest.$ac_ext
15682cat >>conftest.$ac_ext <<_ACEOF
15683/* end confdefs.h. */
ba4481b5 15684
98418dba
CW
15685/* Override any gcc2 internal prototype to avoid an error. */
15686#ifdef __cplusplus
15687extern "C"
15688#endif
15689/* We use char because int might match the return type of a gcc2
15690 builtin and then its argument prototype would still apply. */
15691char getloadavg ();
98418dba
CW
15692int
15693main ()
15694{
15695getloadavg ();
15696 ;
15697 return 0;
15698}
503d2be0 15699_ACEOF
98418dba 15700rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15701if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15702 (eval $ac_link) 2>conftest.er1
98418dba 15703 ac_status=$?
edfaf76d
LK
15704 grep -v '^ *+' conftest.er1 >conftest.err
15705 rm -f conftest.er1
15706 cat conftest.err >&5
c0d27fcc 15707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15708 (exit $ac_status); } &&
e143ad11
AS
15709 { ac_try='test -z "$ac_c_werror_flag"
15710 || test ! -s conftest.err'
edfaf76d
LK
15711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15712 (eval $ac_try) 2>&5
15713 ac_status=$?
15714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15715 (exit $ac_status); }; } &&
15716 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15718 (eval $ac_try) 2>&5
15719 ac_status=$?
c0d27fcc 15720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15721 (exit $ac_status); }; }; then
15722 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 15723else
98418dba 15724 echo "$as_me: failed program was:" >&5
19650fd6
AS
15725sed 's/^/| /' conftest.$ac_ext >&5
15726
98418dba
CW
15727ac_cv_lib_getloadavg_getloadavg=no
15728fi
edfaf76d
LK
15729rm -f conftest.err conftest.$ac_objext \
15730 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15731LIBS=$ac_check_lib_save_LIBS
15732fi
c0d27fcc 15733echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
15734echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
15735if test $ac_cv_lib_getloadavg_getloadavg = yes; then
15736 LIBS="-lgetloadavg $LIBS"
15737else
15738 LIBS=$ac_getloadavg_LIBS
ba4481b5 15739fi
ba4481b5
DL
15740
15741fi
98418dba
CW
15742
15743# Make sure it is really in the library, if we think we found it,
15744# otherwise set up the replacement function.
15745
15746for ac_func in getloadavg
15747do
15748as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15749echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15750echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15751if eval "test \"\${$as_ac_var+set}\" = set"; then
15752 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15753else
503d2be0 15754 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15755/* confdefs.h. */
15756_ACEOF
15757cat confdefs.h >>conftest.$ac_ext
15758cat >>conftest.$ac_ext <<_ACEOF
15759/* end confdefs.h. */
edfaf76d
LK
15760/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15761 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15762#define $ac_func innocuous_$ac_func
15763
ba4481b5 15764/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15765 which can conflict with char $ac_func (); below.
15766 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15767 <limits.h> exists even on freestanding compilers. */
edfaf76d 15768
19650fd6
AS
15769#ifdef __STDC__
15770# include <limits.h>
15771#else
15772# include <assert.h>
15773#endif
edfaf76d
LK
15774
15775#undef $ac_func
15776
ba4481b5 15777/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15778#ifdef __cplusplus
15779extern "C"
19650fd6 15780{
503d2be0 15781#endif
ba4481b5 15782/* We use char because int might match the return type of a gcc2
503d2be0
AS
15783 builtin and then its argument prototype would still apply. */
15784char $ac_func ();
ba4481b5
DL
15785/* The GNU C library defines this for functions which it implements
15786 to always fail with ENOSYS. Some functions are actually named
15787 something starting with __ and the normal name is an alias. */
15788#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15789choke me
15790#else
19650fd6
AS
15791char (*f) () = $ac_func;
15792#endif
15793#ifdef __cplusplus
15794}
cd958eb3
MB
15795#endif
15796
19650fd6
AS
15797int
15798main ()
15799{
15800return f != $ac_func;
503d2be0
AS
15801 ;
15802 return 0;
15803}
15804_ACEOF
15805rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15807 (eval $ac_link) 2>conftest.er1
503d2be0 15808 ac_status=$?
edfaf76d
LK
15809 grep -v '^ *+' conftest.er1 >conftest.err
15810 rm -f conftest.er1
15811 cat conftest.err >&5
c0d27fcc 15812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15813 (exit $ac_status); } &&
e143ad11
AS
15814 { ac_try='test -z "$ac_c_werror_flag"
15815 || test ! -s conftest.err'
edfaf76d
LK
15816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15817 (eval $ac_try) 2>&5
15818 ac_status=$?
15819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15820 (exit $ac_status); }; } &&
15821 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15823 (eval $ac_try) 2>&5
15824 ac_status=$?
c0d27fcc 15825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15826 (exit $ac_status); }; }; then
15827 eval "$as_ac_var=yes"
15828else
15829 echo "$as_me: failed program was:" >&5
19650fd6
AS
15830sed 's/^/| /' conftest.$ac_ext >&5
15831
503d2be0
AS
15832eval "$as_ac_var=no"
15833fi
edfaf76d
LK
15834rm -f conftest.err conftest.$ac_objext \
15835 conftest$ac_exeext conftest.$ac_ext
503d2be0 15836fi
c0d27fcc 15837echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15838echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15839if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15840 cat >>confdefs.h <<_ACEOF
98418dba 15841#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15842_ACEOF
503d2be0 15843
98418dba 15844else
edfaf76d
LK
15845 case $LIBOBJS in
15846 "getloadavg.$ac_objext" | \
15847 *" getloadavg.$ac_objext" | \
15848 "getloadavg.$ac_objext "* | \
15849 *" getloadavg.$ac_objext "* ) ;;
15850 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" ;;
15851esac
15852
ba4481b5 15853
c0d27fcc 15854cat >>confdefs.h <<\_ACEOF
98418dba 15855#define C_GETLOADAVG 1
c0d27fcc 15856_ACEOF
ba4481b5 15857
98418dba
CW
15858# Figure out what our getloadavg.c needs.
15859ac_have_func=no
c0d27fcc
MR
15860if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15861 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
15862echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15863if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 15864 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15865fi
15866echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
15867echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 15868else
c0d27fcc
MR
15869 # Is the header compilable?
15870echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
15871echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
15872cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15873/* confdefs.h. */
15874_ACEOF
15875cat confdefs.h >>conftest.$ac_ext
15876cat >>conftest.$ac_ext <<_ACEOF
15877/* end confdefs.h. */
c0d27fcc
MR
15878$ac_includes_default
15879#include <sys/dg_sys_info.h>
15880_ACEOF
15881rm -f conftest.$ac_objext
15882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 15883 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15884 ac_status=$?
edfaf76d
LK
15885 grep -v '^ *+' conftest.er1 >conftest.err
15886 rm -f conftest.er1
15887 cat conftest.err >&5
c0d27fcc
MR
15888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15889 (exit $ac_status); } &&
e143ad11
AS
15890 { ac_try='test -z "$ac_c_werror_flag"
15891 || test ! -s conftest.err'
edfaf76d
LK
15892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15893 (eval $ac_try) 2>&5
15894 ac_status=$?
15895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15896 (exit $ac_status); }; } &&
15897 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15899 (eval $ac_try) 2>&5
15900 ac_status=$?
15901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15902 (exit $ac_status); }; }; then
15903 ac_header_compiler=yes
15904else
15905 echo "$as_me: failed program was:" >&5
19650fd6
AS
15906sed 's/^/| /' conftest.$ac_ext >&5
15907
c0d27fcc
MR
15908ac_header_compiler=no
15909fi
edfaf76d 15910rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15911echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15912echo "${ECHO_T}$ac_header_compiler" >&6
15913
15914# Is the header present?
15915echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
15916echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
15917cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15918/* confdefs.h. */
15919_ACEOF
15920cat confdefs.h >>conftest.$ac_ext
15921cat >>conftest.$ac_ext <<_ACEOF
15922/* end confdefs.h. */
98418dba
CW
15923#include <sys/dg_sys_info.h>
15924_ACEOF
c0d27fcc 15925if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
15926 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15927 ac_status=$?
6bae0ccf 15928 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15929 rm -f conftest.er1
15930 cat conftest.err >&5
c0d27fcc 15931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15932 (exit $ac_status); } >/dev/null; then
15933 if test -s conftest.err; then
15934 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 15935 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15936 else
15937 ac_cpp_err=
15938 fi
15939else
15940 ac_cpp_err=yes
ba4481b5 15941fi
98418dba 15942if test -z "$ac_cpp_err"; then
c0d27fcc 15943 ac_header_preproc=yes
98418dba
CW
15944else
15945 echo "$as_me: failed program was:" >&5
19650fd6
AS
15946sed 's/^/| /' conftest.$ac_ext >&5
15947
c0d27fcc 15948 ac_header_preproc=no
ba4481b5 15949fi
98418dba 15950rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15951echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15952echo "${ECHO_T}$ac_header_preproc" >&6
15953
15954# So? What about this header?
edfaf76d
LK
15955case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15956 yes:no: )
c0d27fcc
MR
15957 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
15958echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15959 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
15960echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
15961 ac_header_preproc=yes
19650fd6 15962 ;;
edfaf76d 15963 no:yes:* )
c0d27fcc
MR
15964 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
15965echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15966 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
15967echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
15968 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
15969echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
15970 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
15971echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15972 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 15973echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15974 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
15975echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15976 (
15977 cat <<\_ASBOX
edfaf76d
LK
15978## ------------------------------------------ ##
15979## Report this to the AC_PACKAGE_NAME lists. ##
15980## ------------------------------------------ ##
19650fd6
AS
15981_ASBOX
15982 ) |
15983 sed "s/^/$as_me: WARNING: /" >&2
15984 ;;
c0d27fcc
MR
15985esac
15986echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
15987echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15988if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15989 echo $ECHO_N "(cached) $ECHO_C" >&6
15990else
15991 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 15992fi
c0d27fcc 15993echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 15994echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
15995
15996fi
98418dba
CW
15997if test $ac_cv_header_sys_dg_sys_info_h = yes; then
15998 ac_have_func=yes
ba4481b5 15999
c0d27fcc 16000cat >>confdefs.h <<\_ACEOF
98418dba 16001#define DGUX 1
c0d27fcc
MR
16002_ACEOF
16003
503d2be0 16004
c0d27fcc 16005echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
16006echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
16007if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 16008 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16009else
503d2be0 16010 ac_check_lib_save_LIBS=$LIBS
98418dba 16011LIBS="-ldgc $LIBS"
503d2be0 16012cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16013/* confdefs.h. */
16014_ACEOF
16015cat confdefs.h >>conftest.$ac_ext
16016cat >>conftest.$ac_ext <<_ACEOF
16017/* end confdefs.h. */
503d2be0 16018
ba4481b5 16019/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16020#ifdef __cplusplus
16021extern "C"
16022#endif
ba4481b5 16023/* We use char because int might match the return type of a gcc2
503d2be0 16024 builtin and then its argument prototype would still apply. */
98418dba 16025char dg_sys_info ();
503d2be0
AS
16026int
16027main ()
16028{
98418dba 16029dg_sys_info ();
503d2be0
AS
16030 ;
16031 return 0;
16032}
16033_ACEOF
16034rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16035if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 16036 (eval $ac_link) 2>conftest.er1
503d2be0 16037 ac_status=$?
edfaf76d
LK
16038 grep -v '^ *+' conftest.er1 >conftest.err
16039 rm -f conftest.er1
16040 cat conftest.err >&5
c0d27fcc 16041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16042 (exit $ac_status); } &&
e143ad11
AS
16043 { ac_try='test -z "$ac_c_werror_flag"
16044 || test ! -s conftest.err'
edfaf76d
LK
16045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16046 (eval $ac_try) 2>&5
16047 ac_status=$?
16048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16049 (exit $ac_status); }; } &&
16050 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16052 (eval $ac_try) 2>&5
16053 ac_status=$?
c0d27fcc 16054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16055 (exit $ac_status); }; }; then
98418dba 16056 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
16057else
16058 echo "$as_me: failed program was:" >&5
19650fd6
AS
16059sed 's/^/| /' conftest.$ac_ext >&5
16060
98418dba 16061ac_cv_lib_dgc_dg_sys_info=no
503d2be0 16062fi
edfaf76d
LK
16063rm -f conftest.err conftest.$ac_objext \
16064 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
16065LIBS=$ac_check_lib_save_LIBS
16066fi
c0d27fcc 16067echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
16068echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
16069if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 16070 cat >>confdefs.h <<_ACEOF
98418dba 16071#define HAVE_LIBDGC 1
c0d27fcc 16072_ACEOF
ba4481b5 16073
98418dba 16074 LIBS="-ldgc $LIBS"
ba4481b5 16075
ba4481b5
DL
16076fi
16077
98418dba 16078fi
503d2be0 16079
c0d27fcc
MR
16080
16081
16082if test "${ac_cv_header_locale_h+set}" = set; then
16083 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
16084echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
16085if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 16086 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16087fi
16088echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
16089echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 16090else
c0d27fcc
MR
16091 # Is the header compilable?
16092echo "$as_me:$LINENO: checking locale.h usability" >&5
16093echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
16094cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16095/* confdefs.h. */
16096_ACEOF
16097cat confdefs.h >>conftest.$ac_ext
16098cat >>conftest.$ac_ext <<_ACEOF
16099/* end confdefs.h. */
c0d27fcc
MR
16100$ac_includes_default
16101#include <locale.h>
16102_ACEOF
16103rm -f conftest.$ac_objext
16104if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16105 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16106 ac_status=$?
edfaf76d
LK
16107 grep -v '^ *+' conftest.er1 >conftest.err
16108 rm -f conftest.er1
16109 cat conftest.err >&5
c0d27fcc
MR
16110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16111 (exit $ac_status); } &&
e143ad11
AS
16112 { ac_try='test -z "$ac_c_werror_flag"
16113 || test ! -s conftest.err'
edfaf76d
LK
16114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16115 (eval $ac_try) 2>&5
16116 ac_status=$?
16117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16118 (exit $ac_status); }; } &&
16119 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16121 (eval $ac_try) 2>&5
16122 ac_status=$?
16123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16124 (exit $ac_status); }; }; then
16125 ac_header_compiler=yes
16126else
16127 echo "$as_me: failed program was:" >&5
19650fd6
AS
16128sed 's/^/| /' conftest.$ac_ext >&5
16129
c0d27fcc
MR
16130ac_header_compiler=no
16131fi
edfaf76d 16132rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16133echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16134echo "${ECHO_T}$ac_header_compiler" >&6
16135
16136# Is the header present?
16137echo "$as_me:$LINENO: checking locale.h presence" >&5
16138echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
16139cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16140/* confdefs.h. */
16141_ACEOF
16142cat confdefs.h >>conftest.$ac_ext
16143cat >>conftest.$ac_ext <<_ACEOF
16144/* end confdefs.h. */
98418dba 16145#include <locale.h>
503d2be0 16146_ACEOF
c0d27fcc 16147if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 16148 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 16149 ac_status=$?
6bae0ccf 16150 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16151 rm -f conftest.er1
16152 cat conftest.err >&5
c0d27fcc 16153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16154 (exit $ac_status); } >/dev/null; then
16155 if test -s conftest.err; then
16156 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16157 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16158 else
16159 ac_cpp_err=
16160 fi
503d2be0 16161else
98418dba 16162 ac_cpp_err=yes
503d2be0 16163fi
98418dba 16164if test -z "$ac_cpp_err"; then
c0d27fcc 16165 ac_header_preproc=yes
98418dba
CW
16166else
16167 echo "$as_me: failed program was:" >&5
19650fd6
AS
16168sed 's/^/| /' conftest.$ac_ext >&5
16169
c0d27fcc 16170 ac_header_preproc=no
ba4481b5 16171fi
98418dba 16172rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16173echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16174echo "${ECHO_T}$ac_header_preproc" >&6
16175
16176# So? What about this header?
edfaf76d
LK
16177case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16178 yes:no: )
c0d27fcc
MR
16179 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
16180echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16181 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
16182echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
16183 ac_header_preproc=yes
19650fd6 16184 ;;
edfaf76d 16185 no:yes:* )
c0d27fcc
MR
16186 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
16187echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16188 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
16189echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
16190 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
16191echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
16192 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
16193echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16194 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 16195echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16196 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
16197echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16198 (
16199 cat <<\_ASBOX
edfaf76d
LK
16200## ------------------------------------------ ##
16201## Report this to the AC_PACKAGE_NAME lists. ##
16202## ------------------------------------------ ##
19650fd6
AS
16203_ASBOX
16204 ) |
16205 sed "s/^/$as_me: WARNING: /" >&2
16206 ;;
c0d27fcc
MR
16207esac
16208echo "$as_me:$LINENO: checking for locale.h" >&5
16209echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
16210if test "${ac_cv_header_locale_h+set}" = set; then
16211 echo $ECHO_N "(cached) $ECHO_C" >&6
16212else
16213 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 16214fi
c0d27fcc 16215echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
16216echo "${ECHO_T}$ac_cv_header_locale_h" >&6
16217
c0d27fcc
MR
16218fi
16219
16220
16221
98418dba 16222for ac_func in setlocale
ba4481b5 16223do
503d2be0 16224as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 16225echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
16226echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16227if eval "test \"\${$as_ac_var+set}\" = set"; then
16228 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16229else
503d2be0 16230 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16231/* confdefs.h. */
16232_ACEOF
16233cat confdefs.h >>conftest.$ac_ext
16234cat >>conftest.$ac_ext <<_ACEOF
16235/* end confdefs.h. */
edfaf76d
LK
16236/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16237 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16238#define $ac_func innocuous_$ac_func
16239
ba4481b5 16240/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16241 which can conflict with char $ac_func (); below.
16242 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16243 <limits.h> exists even on freestanding compilers. */
edfaf76d 16244
19650fd6
AS
16245#ifdef __STDC__
16246# include <limits.h>
16247#else
16248# include <assert.h>
16249#endif
edfaf76d
LK
16250
16251#undef $ac_func
16252
ba4481b5 16253/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16254#ifdef __cplusplus
16255extern "C"
19650fd6 16256{
503d2be0 16257#endif
ba4481b5 16258/* We use char because int might match the return type of a gcc2
503d2be0
AS
16259 builtin and then its argument prototype would still apply. */
16260char $ac_func ();
ba4481b5
DL
16261/* The GNU C library defines this for functions which it implements
16262 to always fail with ENOSYS. Some functions are actually named
16263 something starting with __ and the normal name is an alias. */
16264#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16265choke me
16266#else
19650fd6
AS
16267char (*f) () = $ac_func;
16268#endif
16269#ifdef __cplusplus
16270}
ba4481b5
DL
16271#endif
16272
19650fd6
AS
16273int
16274main ()
16275{
16276return f != $ac_func;
503d2be0
AS
16277 ;
16278 return 0;
16279}
16280_ACEOF
16281rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16282if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 16283 (eval $ac_link) 2>conftest.er1
503d2be0 16284 ac_status=$?
edfaf76d
LK
16285 grep -v '^ *+' conftest.er1 >conftest.err
16286 rm -f conftest.er1
16287 cat conftest.err >&5
c0d27fcc 16288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16289 (exit $ac_status); } &&
e143ad11
AS
16290 { ac_try='test -z "$ac_c_werror_flag"
16291 || test ! -s conftest.err'
edfaf76d
LK
16292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16293 (eval $ac_try) 2>&5
16294 ac_status=$?
16295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16296 (exit $ac_status); }; } &&
16297 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16299 (eval $ac_try) 2>&5
16300 ac_status=$?
c0d27fcc 16301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16302 (exit $ac_status); }; }; then
16303 eval "$as_ac_var=yes"
16304else
16305 echo "$as_me: failed program was:" >&5
19650fd6
AS
16306sed 's/^/| /' conftest.$ac_ext >&5
16307
503d2be0
AS
16308eval "$as_ac_var=no"
16309fi
edfaf76d
LK
16310rm -f conftest.err conftest.$ac_objext \
16311 conftest$ac_exeext conftest.$ac_ext
503d2be0 16312fi
c0d27fcc 16313echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
16314echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16315if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16316 cat >>confdefs.h <<_ACEOF
503d2be0 16317#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16318_ACEOF
ba4481b5 16319
ba4481b5
DL
16320fi
16321done
16322
c0d27fcc 16323
98418dba
CW
16324# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
16325# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
16326# Irix 4.0.5F has the header but not the library.
16327if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
16328 ac_have_func=yes
16329
c0d27fcc 16330cat >>confdefs.h <<\_ACEOF
98418dba 16331#define SVR4 1
c0d27fcc 16332_ACEOF
98418dba
CW
16333
16334fi
16335
16336if test $ac_have_func = no; then
c0d27fcc
MR
16337 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
16338 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
16339echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
16340if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 16341 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16342fi
16343echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
16344echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 16345else
c0d27fcc
MR
16346 # Is the header compilable?
16347echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
16348echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
16349cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16350/* confdefs.h. */
16351_ACEOF
16352cat confdefs.h >>conftest.$ac_ext
16353cat >>conftest.$ac_ext <<_ACEOF
16354/* end confdefs.h. */
c0d27fcc
MR
16355$ac_includes_default
16356#include <inq_stats/cpustats.h>
16357_ACEOF
16358rm -f conftest.$ac_objext
16359if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16360 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16361 ac_status=$?
edfaf76d
LK
16362 grep -v '^ *+' conftest.er1 >conftest.err
16363 rm -f conftest.er1
16364 cat conftest.err >&5
c0d27fcc
MR
16365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16366 (exit $ac_status); } &&
e143ad11
AS
16367 { ac_try='test -z "$ac_c_werror_flag"
16368 || test ! -s conftest.err'
edfaf76d
LK
16369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16370 (eval $ac_try) 2>&5
16371 ac_status=$?
16372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16373 (exit $ac_status); }; } &&
16374 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16376 (eval $ac_try) 2>&5
16377 ac_status=$?
16378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16379 (exit $ac_status); }; }; then
16380 ac_header_compiler=yes
16381else
16382 echo "$as_me: failed program was:" >&5
19650fd6
AS
16383sed 's/^/| /' conftest.$ac_ext >&5
16384
c0d27fcc
MR
16385ac_header_compiler=no
16386fi
edfaf76d 16387rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16388echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16389echo "${ECHO_T}$ac_header_compiler" >&6
16390
16391# Is the header present?
16392echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
16393echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
16394cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16395/* confdefs.h. */
16396_ACEOF
16397cat confdefs.h >>conftest.$ac_ext
16398cat >>conftest.$ac_ext <<_ACEOF
16399/* end confdefs.h. */
98418dba 16400#include <inq_stats/cpustats.h>
503d2be0 16401_ACEOF
c0d27fcc 16402if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16403 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16404 ac_status=$?
6bae0ccf 16405 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16406 rm -f conftest.er1
16407 cat conftest.err >&5
c0d27fcc 16408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16409 (exit $ac_status); } >/dev/null; then
16410 if test -s conftest.err; then
16411 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16412 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16413 else
16414 ac_cpp_err=
16415 fi
16416else
16417 ac_cpp_err=yes
16418fi
16419if test -z "$ac_cpp_err"; then
c0d27fcc 16420 ac_header_preproc=yes
503d2be0
AS
16421else
16422 echo "$as_me: failed program was:" >&5
19650fd6
AS
16423sed 's/^/| /' conftest.$ac_ext >&5
16424
c0d27fcc 16425 ac_header_preproc=no
ba4481b5 16426fi
503d2be0 16427rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16428echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16429echo "${ECHO_T}$ac_header_preproc" >&6
16430
16431# So? What about this header?
edfaf76d
LK
16432case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16433 yes:no: )
c0d27fcc
MR
16434 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16435echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16436 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
16437echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
16438 ac_header_preproc=yes
19650fd6 16439 ;;
edfaf76d 16440 no:yes:* )
c0d27fcc
MR
16441 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
16442echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16443 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
16444echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
16445 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
16446echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
16447 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16448echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16449 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16450echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16451 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
16452echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16453 (
16454 cat <<\_ASBOX
edfaf76d
LK
16455## ------------------------------------------ ##
16456## Report this to the AC_PACKAGE_NAME lists. ##
16457## ------------------------------------------ ##
19650fd6
AS
16458_ASBOX
16459 ) |
16460 sed "s/^/$as_me: WARNING: /" >&2
16461 ;;
c0d27fcc
MR
16462esac
16463echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
16464echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
16465if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
16466 echo $ECHO_N "(cached) $ECHO_C" >&6
16467else
16468 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 16469fi
c0d27fcc 16470echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 16471echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
16472
16473fi
98418dba
CW
16474if test $ac_cv_header_inq_stats_cpustats_h = yes; then
16475 ac_have_func=yes
ba4481b5 16476
c0d27fcc 16477cat >>confdefs.h <<\_ACEOF
98418dba 16478#define UMAX 1
c0d27fcc 16479_ACEOF
98418dba 16480
c0d27fcc
MR
16481
16482cat >>confdefs.h <<\_ACEOF
98418dba 16483#define UMAX4_3 1
c0d27fcc 16484_ACEOF
98418dba
CW
16485
16486fi
16487
c0d27fcc 16488
98418dba
CW
16489fi
16490
16491if test $ac_have_func = no; then
c0d27fcc
MR
16492 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16493 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
16494echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16495if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 16496 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16497fi
16498echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
16499echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 16500else
c0d27fcc
MR
16501 # Is the header compilable?
16502echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
16503echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
16504cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16505/* confdefs.h. */
16506_ACEOF
16507cat confdefs.h >>conftest.$ac_ext
16508cat >>conftest.$ac_ext <<_ACEOF
16509/* end confdefs.h. */
c0d27fcc
MR
16510$ac_includes_default
16511#include <sys/cpustats.h>
16512_ACEOF
16513rm -f conftest.$ac_objext
16514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16515 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16516 ac_status=$?
edfaf76d
LK
16517 grep -v '^ *+' conftest.er1 >conftest.err
16518 rm -f conftest.er1
16519 cat conftest.err >&5
c0d27fcc
MR
16520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16521 (exit $ac_status); } &&
e143ad11
AS
16522 { ac_try='test -z "$ac_c_werror_flag"
16523 || test ! -s conftest.err'
edfaf76d
LK
16524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16525 (eval $ac_try) 2>&5
16526 ac_status=$?
16527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16528 (exit $ac_status); }; } &&
16529 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16531 (eval $ac_try) 2>&5
16532 ac_status=$?
16533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16534 (exit $ac_status); }; }; then
16535 ac_header_compiler=yes
16536else
16537 echo "$as_me: failed program was:" >&5
19650fd6
AS
16538sed 's/^/| /' conftest.$ac_ext >&5
16539
c0d27fcc
MR
16540ac_header_compiler=no
16541fi
edfaf76d 16542rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16543echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16544echo "${ECHO_T}$ac_header_compiler" >&6
16545
16546# Is the header present?
16547echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
16548echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
16549cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16550/* confdefs.h. */
16551_ACEOF
16552cat confdefs.h >>conftest.$ac_ext
16553cat >>conftest.$ac_ext <<_ACEOF
16554/* end confdefs.h. */
98418dba
CW
16555#include <sys/cpustats.h>
16556_ACEOF
c0d27fcc 16557if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
16558 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16559 ac_status=$?
6bae0ccf 16560 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16561 rm -f conftest.er1
16562 cat conftest.err >&5
c0d27fcc 16563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16564 (exit $ac_status); } >/dev/null; then
16565 if test -s conftest.err; then
16566 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16567 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16568 else
16569 ac_cpp_err=
16570 fi
16571else
16572 ac_cpp_err=yes
503d2be0 16573fi
98418dba 16574if test -z "$ac_cpp_err"; then
c0d27fcc 16575 ac_header_preproc=yes
98418dba
CW
16576else
16577 echo "$as_me: failed program was:" >&5
19650fd6
AS
16578sed 's/^/| /' conftest.$ac_ext >&5
16579
c0d27fcc 16580 ac_header_preproc=no
98418dba
CW
16581fi
16582rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16583echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16584echo "${ECHO_T}$ac_header_preproc" >&6
16585
16586# So? What about this header?
edfaf76d
LK
16587case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16588 yes:no: )
c0d27fcc
MR
16589 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16590echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16591 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
16592echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
16593 ac_header_preproc=yes
19650fd6 16594 ;;
edfaf76d 16595 no:yes:* )
c0d27fcc
MR
16596 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
16597echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16598 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
16599echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
16600 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
16601echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
16602 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16603echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16604 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16605echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16606 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
16607echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16608 (
16609 cat <<\_ASBOX
edfaf76d
LK
16610## ------------------------------------------ ##
16611## Report this to the AC_PACKAGE_NAME lists. ##
16612## ------------------------------------------ ##
19650fd6
AS
16613_ASBOX
16614 ) |
16615 sed "s/^/$as_me: WARNING: /" >&2
16616 ;;
c0d27fcc
MR
16617esac
16618echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
16619echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16620if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16621 echo $ECHO_N "(cached) $ECHO_C" >&6
16622else
16623 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 16624fi
c0d27fcc 16625echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 16626echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
16627
16628fi
98418dba 16629if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 16630 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 16631#define UMAX 1
c0d27fcc 16632_ACEOF
ba4481b5 16633
98418dba
CW
16634fi
16635
c0d27fcc 16636
98418dba
CW
16637fi
16638
16639if test $ac_have_func = no; then
16640
16641for ac_header in mach/mach.h
2c9dccc9
PJ
16642do
16643as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16644if eval "test \"\${$as_ac_Header+set}\" = set"; then
16645 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
16646echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16647if eval "test \"\${$as_ac_Header+set}\" = set"; then
16648 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16649fi
16650echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16651echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16652else
c0d27fcc
MR
16653 # Is the header compilable?
16654echo "$as_me:$LINENO: checking $ac_header usability" >&5
16655echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16656cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16657/* confdefs.h. */
16658_ACEOF
16659cat confdefs.h >>conftest.$ac_ext
16660cat >>conftest.$ac_ext <<_ACEOF
16661/* end confdefs.h. */
c0d27fcc
MR
16662$ac_includes_default
16663#include <$ac_header>
16664_ACEOF
16665rm -f conftest.$ac_objext
16666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16667 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16668 ac_status=$?
edfaf76d
LK
16669 grep -v '^ *+' conftest.er1 >conftest.err
16670 rm -f conftest.er1
16671 cat conftest.err >&5
c0d27fcc
MR
16672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16673 (exit $ac_status); } &&
e143ad11
AS
16674 { ac_try='test -z "$ac_c_werror_flag"
16675 || test ! -s conftest.err'
edfaf76d
LK
16676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16677 (eval $ac_try) 2>&5
16678 ac_status=$?
16679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16680 (exit $ac_status); }; } &&
16681 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16683 (eval $ac_try) 2>&5
16684 ac_status=$?
16685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16686 (exit $ac_status); }; }; then
16687 ac_header_compiler=yes
16688else
16689 echo "$as_me: failed program was:" >&5
19650fd6
AS
16690sed 's/^/| /' conftest.$ac_ext >&5
16691
c0d27fcc
MR
16692ac_header_compiler=no
16693fi
edfaf76d 16694rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16695echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16696echo "${ECHO_T}$ac_header_compiler" >&6
16697
16698# Is the header present?
16699echo "$as_me:$LINENO: checking $ac_header presence" >&5
16700echo $ECHO_N "checking $ac_header presence... $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. */
2c9dccc9
PJ
16707#include <$ac_header>
16708_ACEOF
c0d27fcc 16709if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
16710 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16711 ac_status=$?
6bae0ccf 16712 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
16713 rm -f conftest.er1
16714 cat conftest.err >&5
c0d27fcc 16715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
16716 (exit $ac_status); } >/dev/null; then
16717 if test -s conftest.err; then
16718 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16719 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2c9dccc9
PJ
16720 else
16721 ac_cpp_err=
16722 fi
16723else
16724 ac_cpp_err=yes
16725fi
16726if test -z "$ac_cpp_err"; then
c0d27fcc
MR
16727 ac_header_preproc=yes
16728else
16729 echo "$as_me: failed program was:" >&5
19650fd6
AS
16730sed 's/^/| /' conftest.$ac_ext >&5
16731
c0d27fcc
MR
16732 ac_header_preproc=no
16733fi
16734rm -f conftest.err conftest.$ac_ext
16735echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16736echo "${ECHO_T}$ac_header_preproc" >&6
16737
16738# So? What about this header?
edfaf76d
LK
16739case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16740 yes:no: )
c0d27fcc
MR
16741 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16742echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16743 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16744echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16745 ac_header_preproc=yes
19650fd6 16746 ;;
edfaf76d 16747 no:yes:* )
c0d27fcc
MR
16748 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16749echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16750 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16751echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16752 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16753echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16754 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16755echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16756 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16757echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16758 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16759echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16760 (
16761 cat <<\_ASBOX
edfaf76d
LK
16762## ------------------------------------------ ##
16763## Report this to the AC_PACKAGE_NAME lists. ##
16764## ------------------------------------------ ##
19650fd6
AS
16765_ASBOX
16766 ) |
16767 sed "s/^/$as_me: WARNING: /" >&2
16768 ;;
c0d27fcc
MR
16769esac
16770echo "$as_me:$LINENO: checking for $ac_header" >&5
16771echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16772if eval "test \"\${$as_ac_Header+set}\" = set"; then
16773 echo $ECHO_N "(cached) $ECHO_C" >&6
16774else
edfaf76d 16775 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc
MR
16776fi
16777echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16778echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16779
16780fi
16781if test `eval echo '${'$as_ac_Header'}'` = yes; then
16782 cat >>confdefs.h <<_ACEOF
16783#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16784_ACEOF
16785
16786fi
16787
16788done
16789
16790fi
16791
16792
16793for ac_header in nlist.h
16794do
16795as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16796if eval "test \"\${$as_ac_Header+set}\" = set"; then
16797 echo "$as_me:$LINENO: checking for $ac_header" >&5
16798echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16799if eval "test \"\${$as_ac_Header+set}\" = set"; then
16800 echo $ECHO_N "(cached) $ECHO_C" >&6
16801fi
16802echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16803echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16804else
16805 # Is the header compilable?
16806echo "$as_me:$LINENO: checking $ac_header usability" >&5
16807echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16808cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16809/* confdefs.h. */
16810_ACEOF
16811cat confdefs.h >>conftest.$ac_ext
16812cat >>conftest.$ac_ext <<_ACEOF
16813/* end confdefs.h. */
c0d27fcc
MR
16814$ac_includes_default
16815#include <$ac_header>
16816_ACEOF
16817rm -f conftest.$ac_objext
16818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16819 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16820 ac_status=$?
edfaf76d
LK
16821 grep -v '^ *+' conftest.er1 >conftest.err
16822 rm -f conftest.er1
16823 cat conftest.err >&5
c0d27fcc
MR
16824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16825 (exit $ac_status); } &&
e143ad11
AS
16826 { ac_try='test -z "$ac_c_werror_flag"
16827 || test ! -s conftest.err'
edfaf76d
LK
16828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16829 (eval $ac_try) 2>&5
16830 ac_status=$?
16831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16832 (exit $ac_status); }; } &&
16833 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16835 (eval $ac_try) 2>&5
16836 ac_status=$?
16837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16838 (exit $ac_status); }; }; then
16839 ac_header_compiler=yes
2c9dccc9
PJ
16840else
16841 echo "$as_me: failed program was:" >&5
19650fd6
AS
16842sed 's/^/| /' conftest.$ac_ext >&5
16843
c0d27fcc 16844ac_header_compiler=no
98418dba 16845fi
edfaf76d 16846rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16847echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16848echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 16849
c0d27fcc
MR
16850# Is the header present?
16851echo "$as_me:$LINENO: checking $ac_header presence" >&5
16852echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16853cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16854/* confdefs.h. */
16855_ACEOF
16856cat confdefs.h >>conftest.$ac_ext
16857cat >>conftest.$ac_ext <<_ACEOF
16858/* end confdefs.h. */
503d2be0
AS
16859#include <$ac_header>
16860_ACEOF
c0d27fcc 16861if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16862 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16863 ac_status=$?
6bae0ccf 16864 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16865 rm -f conftest.er1
16866 cat conftest.err >&5
c0d27fcc 16867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16868 (exit $ac_status); } >/dev/null; then
16869 if test -s conftest.err; then
16870 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16871 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16872 else
16873 ac_cpp_err=
16874 fi
16875else
16876 ac_cpp_err=yes
16877fi
16878if test -z "$ac_cpp_err"; then
c0d27fcc 16879 ac_header_preproc=yes
503d2be0
AS
16880else
16881 echo "$as_me: failed program was:" >&5
19650fd6
AS
16882sed 's/^/| /' conftest.$ac_ext >&5
16883
c0d27fcc 16884 ac_header_preproc=no
b5de8dc0 16885fi
503d2be0 16886rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16887echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16888echo "${ECHO_T}$ac_header_preproc" >&6
16889
16890# So? What about this header?
edfaf76d
LK
16891case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16892 yes:no: )
c0d27fcc
MR
16893 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16894echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16895 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16896echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16897 ac_header_preproc=yes
19650fd6 16898 ;;
edfaf76d 16899 no:yes:* )
c0d27fcc
MR
16900 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16901echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16902 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16903echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16904 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16905echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16906 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16907echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16908 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16909echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16910 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16911echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16912 (
16913 cat <<\_ASBOX
edfaf76d
LK
16914## ------------------------------------------ ##
16915## Report this to the AC_PACKAGE_NAME lists. ##
16916## ------------------------------------------ ##
19650fd6
AS
16917_ASBOX
16918 ) |
16919 sed "s/^/$as_me: WARNING: /" >&2
16920 ;;
c0d27fcc
MR
16921esac
16922echo "$as_me:$LINENO: checking for $ac_header" >&5
16923echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16924if eval "test \"\${$as_ac_Header+set}\" = set"; then
16925 echo $ECHO_N "(cached) $ECHO_C" >&6
16926else
edfaf76d 16927 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 16928fi
c0d27fcc 16929echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16930echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16931
16932fi
98418dba 16933if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16934 cat >>confdefs.h <<_ACEOF
98418dba 16935#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
16936_ACEOF
16937 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
16938echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
16939if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 16940 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 16941else
503d2be0 16942 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16943/* confdefs.h. */
16944_ACEOF
16945cat confdefs.h >>conftest.$ac_ext
16946cat >>conftest.$ac_ext <<_ACEOF
16947/* end confdefs.h. */
98418dba 16948#include <nlist.h>
b5de8dc0 16949
503d2be0
AS
16950int
16951main ()
16952{
98418dba
CW
16953static struct nlist ac_aggr;
16954if (ac_aggr.n_un.n_name)
16955return 0;
503d2be0
AS
16956 ;
16957 return 0;
16958}
16959_ACEOF
98418dba 16960rm -f conftest.$ac_objext
c0d27fcc 16961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16962 (eval $ac_compile) 2>conftest.er1
503d2be0 16963 ac_status=$?
edfaf76d
LK
16964 grep -v '^ *+' conftest.er1 >conftest.err
16965 rm -f conftest.er1
16966 cat conftest.err >&5
c0d27fcc 16967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16968 (exit $ac_status); } &&
e143ad11
AS
16969 { ac_try='test -z "$ac_c_werror_flag"
16970 || test ! -s conftest.err'
c0d27fcc 16971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16972 (eval $ac_try) 2>&5
16973 ac_status=$?
c0d27fcc 16974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
16975 (exit $ac_status); }; } &&
16976 { ac_try='test -s conftest.$ac_objext'
16977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16978 (eval $ac_try) 2>&5
16979 ac_status=$?
16980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16981 (exit $ac_status); }; }; then
16982 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
16983else
16984 echo "$as_me: failed program was:" >&5
19650fd6
AS
16985sed 's/^/| /' conftest.$ac_ext >&5
16986
6bae0ccf 16987cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16988/* confdefs.h. */
16989_ACEOF
16990cat confdefs.h >>conftest.$ac_ext
16991cat >>conftest.$ac_ext <<_ACEOF
16992/* end confdefs.h. */
6bae0ccf
DL
16993#include <nlist.h>
16994
16995int
16996main ()
16997{
16998static struct nlist ac_aggr;
16999if (sizeof ac_aggr.n_un.n_name)
17000return 0;
17001 ;
17002 return 0;
17003}
17004_ACEOF
17005rm -f conftest.$ac_objext
17006if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17007 (eval $ac_compile) 2>conftest.er1
6bae0ccf 17008 ac_status=$?
edfaf76d
LK
17009 grep -v '^ *+' conftest.er1 >conftest.err
17010 rm -f conftest.er1
17011 cat conftest.err >&5
6bae0ccf
DL
17012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17013 (exit $ac_status); } &&
e143ad11
AS
17014 { ac_try='test -z "$ac_c_werror_flag"
17015 || test ! -s conftest.err'
edfaf76d
LK
17016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17017 (eval $ac_try) 2>&5
17018 ac_status=$?
17019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17020 (exit $ac_status); }; } &&
17021 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
17022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17023 (eval $ac_try) 2>&5
17024 ac_status=$?
17025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17026 (exit $ac_status); }; }; then
17027 ac_cv_member_struct_nlist_n_un_n_name=yes
17028else
17029 echo "$as_me: failed program was:" >&5
19650fd6
AS
17030sed 's/^/| /' conftest.$ac_ext >&5
17031
98418dba 17032ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 17033fi
edfaf76d 17034rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 17035fi
edfaf76d 17036rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 17037fi
c0d27fcc 17038echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
17039echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
17040if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 17041
c0d27fcc 17042cat >>confdefs.h <<_ACEOF
98418dba 17043#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 17044_ACEOF
b5de8dc0 17045
c0d27fcc
MR
17046
17047cat >>confdefs.h <<\_ACEOF
98418dba 17048#define NLIST_NAME_UNION 1
c0d27fcc 17049_ACEOF
b5de8dc0 17050
98418dba 17051fi
b5de8dc0 17052
c0d27fcc 17053
98418dba 17054fi
c0d27fcc 17055
98418dba 17056done
b5de8dc0 17057
98418dba
CW
17058fi
17059done
b5de8dc0 17060
c0d27fcc 17061
98418dba 17062# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 17063echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
17064echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
17065if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
17066 echo $ECHO_N "(cached) $ECHO_C" >&6
17067else
17068 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17069/* confdefs.h. */
17070_ACEOF
17071cat confdefs.h >>conftest.$ac_ext
17072cat >>conftest.$ac_ext <<_ACEOF
17073/* end confdefs.h. */
6bae0ccf 17074#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
17075#ifdef LDAV_PRIVILEGED
17076Yowza Am I SETGID yet
17077#endif
17078_ACEOF
17079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 17080 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
17081 ac_cv_func_getloadavg_setgid=yes
17082else
17083 ac_cv_func_getloadavg_setgid=no
17084fi
17085rm -f conftest*
b5de8dc0 17086
98418dba 17087fi
c0d27fcc 17088echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
17089echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
17090if test $ac_cv_func_getloadavg_setgid = yes; then
17091 NEED_SETGID=true
b5de8dc0 17092
c0d27fcc 17093cat >>confdefs.h <<\_ACEOF
98418dba 17094#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 17095_ACEOF
98418dba 17096
b5de8dc0 17097else
98418dba 17098 NEED_SETGID=false
b5de8dc0 17099fi
98418dba
CW
17100
17101if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 17102 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
17103echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
17104if test "${ac_cv_group_kmem+set}" = set; then
17105 echo $ECHO_N "(cached) $ECHO_C" >&6
17106else
17107 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
17108 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
17109 # If we got an error (system does not support symlinks), try without -L.
17110 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
17111 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 17112 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
17113 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
17114 / /s/.* //;p;'`
17115
b5de8dc0 17116fi
c0d27fcc 17117echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
17118echo "${ECHO_T}$ac_cv_group_kmem" >&6
17119 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 17120fi
98418dba
CW
17121if test "x$ac_save_LIBS" = x; then
17122 GETLOADAVG_LIBS=$LIBS
17123else
17124 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 17125fi
98418dba 17126LIBS=$ac_save_LIBS
b5de8dc0 17127
c0d27fcc
MR
17128
17129
17130echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
17131echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
17132if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 17133 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17134else
b936fae4
AS
17135 while :; do
17136 ac_cv_sys_largefile_source=no
503d2be0 17137 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17138/* confdefs.h. */
17139_ACEOF
17140cat confdefs.h >>conftest.$ac_ext
17141cat >>conftest.$ac_ext <<_ACEOF
17142/* end confdefs.h. */
b936fae4 17143#include <stdio.h>
503d2be0
AS
17144int
17145main ()
17146{
b936fae4
AS
17147return !fseeko;
17148 ;
17149 return 0;
17150}
17151_ACEOF
17152rm -f conftest.$ac_objext
c0d27fcc 17153if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17154 (eval $ac_compile) 2>conftest.er1
b936fae4 17155 ac_status=$?
edfaf76d
LK
17156 grep -v '^ *+' conftest.er1 >conftest.err
17157 rm -f conftest.er1
17158 cat conftest.err >&5
c0d27fcc 17159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 17160 (exit $ac_status); } &&
e143ad11
AS
17161 { ac_try='test -z "$ac_c_werror_flag"
17162 || test ! -s conftest.err'
edfaf76d
LK
17163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17164 (eval $ac_try) 2>&5
17165 ac_status=$?
17166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17167 (exit $ac_status); }; } &&
17168 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 17169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
17170 (eval $ac_try) 2>&5
17171 ac_status=$?
c0d27fcc 17172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
17173 (exit $ac_status); }; }; then
17174 break
17175else
17176 echo "$as_me: failed program was:" >&5
19650fd6
AS
17177sed 's/^/| /' conftest.$ac_ext >&5
17178
b936fae4 17179fi
edfaf76d 17180rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4 17181 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17182/* confdefs.h. */
17183_ACEOF
17184cat confdefs.h >>conftest.$ac_ext
17185cat >>conftest.$ac_ext <<_ACEOF
17186/* end confdefs.h. */
b936fae4
AS
17187#define _LARGEFILE_SOURCE 1
17188#include <stdio.h>
b936fae4
AS
17189int
17190main ()
17191{
17192return !fseeko;
17193 ;
17194 return 0;
17195}
17196_ACEOF
17197rm -f conftest.$ac_objext
c0d27fcc 17198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17199 (eval $ac_compile) 2>conftest.er1
b936fae4 17200 ac_status=$?
edfaf76d
LK
17201 grep -v '^ *+' conftest.er1 >conftest.err
17202 rm -f conftest.er1
17203 cat conftest.err >&5
c0d27fcc 17204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 17205 (exit $ac_status); } &&
e143ad11
AS
17206 { ac_try='test -z "$ac_c_werror_flag"
17207 || test ! -s conftest.err'
edfaf76d
LK
17208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17209 (eval $ac_try) 2>&5
17210 ac_status=$?
17211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17212 (exit $ac_status); }; } &&
17213 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 17214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
17215 (eval $ac_try) 2>&5
17216 ac_status=$?
c0d27fcc 17217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
17218 (exit $ac_status); }; }; then
17219 ac_cv_sys_largefile_source=1; break
17220else
17221 echo "$as_me: failed program was:" >&5
19650fd6
AS
17222sed 's/^/| /' conftest.$ac_ext >&5
17223
b936fae4 17224fi
edfaf76d 17225rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4
AS
17226 break
17227done
17228fi
c0d27fcc 17229echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
17230echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
17231if test "$ac_cv_sys_largefile_source" != no; then
17232
c0d27fcc 17233cat >>confdefs.h <<_ACEOF
b936fae4 17234#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 17235_ACEOF
b936fae4
AS
17236
17237fi
17238rm -f conftest*
4c343001 17239
b936fae4
AS
17240# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
17241# in glibc 2.1.3, but that breaks too many other things.
17242# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 17243echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
17244echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
17245if test "${ac_cv_func_fseeko+set}" = set; then
17246 echo $ECHO_N "(cached) $ECHO_C" >&6
17247else
17248 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17249/* confdefs.h. */
17250_ACEOF
17251cat confdefs.h >>conftest.$ac_ext
17252cat >>conftest.$ac_ext <<_ACEOF
17253/* end confdefs.h. */
b936fae4 17254#include <stdio.h>
b936fae4
AS
17255int
17256main ()
17257{
17258return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
17259 ;
17260 return 0;
17261}
17262_ACEOF
17263rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17264if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17265 (eval $ac_link) 2>conftest.er1
503d2be0 17266 ac_status=$?
edfaf76d
LK
17267 grep -v '^ *+' conftest.er1 >conftest.err
17268 rm -f conftest.er1
17269 cat conftest.err >&5
c0d27fcc 17270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17271 (exit $ac_status); } &&
e143ad11
AS
17272 { ac_try='test -z "$ac_c_werror_flag"
17273 || test ! -s conftest.err'
edfaf76d
LK
17274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17275 (eval $ac_try) 2>&5
17276 ac_status=$?
17277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17278 (exit $ac_status); }; } &&
17279 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17281 (eval $ac_try) 2>&5
17282 ac_status=$?
c0d27fcc 17283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17284 (exit $ac_status); }; }; then
b936fae4 17285 ac_cv_func_fseeko=yes
503d2be0
AS
17286else
17287 echo "$as_me: failed program was:" >&5
19650fd6
AS
17288sed 's/^/| /' conftest.$ac_ext >&5
17289
b936fae4 17290ac_cv_func_fseeko=no
503d2be0 17291fi
edfaf76d
LK
17292rm -f conftest.err conftest.$ac_objext \
17293 conftest$ac_exeext conftest.$ac_ext
503d2be0 17294fi
c0d27fcc 17295echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
17296echo "${ECHO_T}$ac_cv_func_fseeko" >&6
17297if test $ac_cv_func_fseeko = yes; then
17298
c0d27fcc 17299cat >>confdefs.h <<\_ACEOF
b936fae4 17300#define HAVE_FSEEKO 1
c0d27fcc 17301_ACEOF
b936fae4 17302
4c343001
DL
17303fi
17304
c0d27fcc 17305
52dbaac8
PE
17306# Configure getopt.
17307# getopt.m4 serial 10
17308
17309# The getopt module assume you want GNU getopt, with getopt_long etc,
17310# rather than vanilla POSIX getopt. This means your your code should
17311# always include <getopt.h> for the getopt prototypes.
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323# Prerequisites of lib/getopt*.
17324
17325
17326
10a3b1a1 17327
52dbaac8
PE
17328 GETOPT_H=
17329
17330for ac_header in getopt.h
17331do
17332as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17333if eval "test \"\${$as_ac_Header+set}\" = set"; then
17334 echo "$as_me:$LINENO: checking for $ac_header" >&5
17335echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17336if eval "test \"\${$as_ac_Header+set}\" = set"; then
17337 echo $ECHO_N "(cached) $ECHO_C" >&6
17338fi
17339echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17340echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17341else
17342 # Is the header compilable?
17343echo "$as_me:$LINENO: checking $ac_header usability" >&5
17344echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17345cat >conftest.$ac_ext <<_ACEOF
17346/* confdefs.h. */
17347_ACEOF
17348cat confdefs.h >>conftest.$ac_ext
17349cat >>conftest.$ac_ext <<_ACEOF
17350/* end confdefs.h. */
17351$ac_includes_default
17352#include <$ac_header>
17353_ACEOF
17354rm -f conftest.$ac_objext
17355if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17356 (eval $ac_compile) 2>conftest.er1
17357 ac_status=$?
17358 grep -v '^ *+' conftest.er1 >conftest.err
17359 rm -f conftest.er1
17360 cat conftest.err >&5
17361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17362 (exit $ac_status); } &&
e143ad11
AS
17363 { ac_try='test -z "$ac_c_werror_flag"
17364 || test ! -s conftest.err'
52dbaac8
PE
17365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17366 (eval $ac_try) 2>&5
17367 ac_status=$?
17368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17369 (exit $ac_status); }; } &&
17370 { ac_try='test -s conftest.$ac_objext'
17371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17372 (eval $ac_try) 2>&5
17373 ac_status=$?
17374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17375 (exit $ac_status); }; }; then
17376 ac_header_compiler=yes
17377else
17378 echo "$as_me: failed program was:" >&5
17379sed 's/^/| /' conftest.$ac_ext >&5
17380
17381ac_header_compiler=no
17382fi
17383rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17384echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17385echo "${ECHO_T}$ac_header_compiler" >&6
17386
17387# Is the header present?
17388echo "$as_me:$LINENO: checking $ac_header presence" >&5
17389echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17390cat >conftest.$ac_ext <<_ACEOF
17391/* confdefs.h. */
17392_ACEOF
17393cat confdefs.h >>conftest.$ac_ext
17394cat >>conftest.$ac_ext <<_ACEOF
17395/* end confdefs.h. */
17396#include <$ac_header>
17397_ACEOF
17398if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17399 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17400 ac_status=$?
17401 grep -v '^ *+' conftest.er1 >conftest.err
17402 rm -f conftest.er1
17403 cat conftest.err >&5
17404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17405 (exit $ac_status); } >/dev/null; then
17406 if test -s conftest.err; then
17407 ac_cpp_err=$ac_c_preproc_warn_flag
17408 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17409 else
17410 ac_cpp_err=
17411 fi
17412else
17413 ac_cpp_err=yes
17414fi
17415if test -z "$ac_cpp_err"; then
17416 ac_header_preproc=yes
17417else
17418 echo "$as_me: failed program was:" >&5
17419sed 's/^/| /' conftest.$ac_ext >&5
17420
17421 ac_header_preproc=no
17422fi
17423rm -f conftest.err conftest.$ac_ext
17424echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17425echo "${ECHO_T}$ac_header_preproc" >&6
17426
17427# So? What about this header?
17428case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17429 yes:no: )
17430 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17431echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17432 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17433echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17434 ac_header_preproc=yes
17435 ;;
17436 no:yes:* )
17437 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17438echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17439 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17440echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17441 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17442echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17443 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17444echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
17445 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17446echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17447 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17448echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17449 (
17450 cat <<\_ASBOX
17451## ------------------------------------------ ##
17452## Report this to the AC_PACKAGE_NAME lists. ##
17453## ------------------------------------------ ##
17454_ASBOX
17455 ) |
17456 sed "s/^/$as_me: WARNING: /" >&2
17457 ;;
17458esac
17459echo "$as_me:$LINENO: checking for $ac_header" >&5
17460echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17461if eval "test \"\${$as_ac_Header+set}\" = set"; then
17462 echo $ECHO_N "(cached) $ECHO_C" >&6
17463else
17464 eval "$as_ac_Header=\$ac_header_preproc"
17465fi
17466echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17467echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17468
17469fi
17470if test `eval echo '${'$as_ac_Header'}'` = yes; then
17471 cat >>confdefs.h <<_ACEOF
17472#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17473_ACEOF
17474
17475else
17476 GETOPT_H=getopt.h
17477fi
17478
17479done
17480
17481 if test -z "$GETOPT_H"; then
17482
17483for ac_func in getopt_long_only
17484do
17485as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17486echo "$as_me:$LINENO: checking for $ac_func" >&5
17487echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17488if eval "test \"\${$as_ac_var+set}\" = set"; then
17489 echo $ECHO_N "(cached) $ECHO_C" >&6
17490else
17491 cat >conftest.$ac_ext <<_ACEOF
17492/* confdefs.h. */
17493_ACEOF
17494cat confdefs.h >>conftest.$ac_ext
17495cat >>conftest.$ac_ext <<_ACEOF
17496/* end confdefs.h. */
17497/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17498 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17499#define $ac_func innocuous_$ac_func
17500
17501/* System header to define __stub macros and hopefully few prototypes,
17502 which can conflict with char $ac_func (); below.
17503 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17504 <limits.h> exists even on freestanding compilers. */
17505
17506#ifdef __STDC__
17507# include <limits.h>
17508#else
17509# include <assert.h>
17510#endif
17511
17512#undef $ac_func
17513
17514/* Override any gcc2 internal prototype to avoid an error. */
17515#ifdef __cplusplus
17516extern "C"
17517{
17518#endif
17519/* We use char because int might match the return type of a gcc2
17520 builtin and then its argument prototype would still apply. */
17521char $ac_func ();
17522/* The GNU C library defines this for functions which it implements
17523 to always fail with ENOSYS. Some functions are actually named
17524 something starting with __ and the normal name is an alias. */
17525#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17526choke me
17527#else
17528char (*f) () = $ac_func;
17529#endif
17530#ifdef __cplusplus
17531}
17532#endif
17533
17534int
17535main ()
17536{
17537return f != $ac_func;
17538 ;
17539 return 0;
17540}
17541_ACEOF
17542rm -f conftest.$ac_objext conftest$ac_exeext
17543if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17544 (eval $ac_link) 2>conftest.er1
17545 ac_status=$?
17546 grep -v '^ *+' conftest.er1 >conftest.err
17547 rm -f conftest.er1
17548 cat conftest.err >&5
17549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17550 (exit $ac_status); } &&
e143ad11
AS
17551 { ac_try='test -z "$ac_c_werror_flag"
17552 || test ! -s conftest.err'
52dbaac8
PE
17553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17554 (eval $ac_try) 2>&5
17555 ac_status=$?
17556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17557 (exit $ac_status); }; } &&
17558 { ac_try='test -s conftest$ac_exeext'
17559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17560 (eval $ac_try) 2>&5
17561 ac_status=$?
17562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17563 (exit $ac_status); }; }; then
17564 eval "$as_ac_var=yes"
17565else
17566 echo "$as_me: failed program was:" >&5
17567sed 's/^/| /' conftest.$ac_ext >&5
17568
17569eval "$as_ac_var=no"
17570fi
17571rm -f conftest.err conftest.$ac_objext \
17572 conftest$ac_exeext conftest.$ac_ext
17573fi
17574echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17575echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17576if test `eval echo '${'$as_ac_var'}'` = yes; then
17577 cat >>confdefs.h <<_ACEOF
17578#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17579_ACEOF
17580
17581else
17582 GETOPT_H=getopt.h
17583fi
17584done
17585
17586 fi
17587
17588 if test -z "$GETOPT_H"; then
17589 echo "$as_me:$LINENO: checking whether optreset is declared" >&5
17590echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6
17591if test "${ac_cv_have_decl_optreset+set}" = set; then
17592 echo $ECHO_N "(cached) $ECHO_C" >&6
17593else
17594 cat >conftest.$ac_ext <<_ACEOF
17595/* confdefs.h. */
17596_ACEOF
17597cat confdefs.h >>conftest.$ac_ext
17598cat >>conftest.$ac_ext <<_ACEOF
17599/* end confdefs.h. */
17600#include <getopt.h>
17601
17602int
17603main ()
17604{
17605#ifndef optreset
17606 char *p = (char *) optreset;
17607#endif
17608
17609 ;
17610 return 0;
17611}
17612_ACEOF
17613rm -f conftest.$ac_objext
17614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17615 (eval $ac_compile) 2>conftest.er1
17616 ac_status=$?
17617 grep -v '^ *+' conftest.er1 >conftest.err
17618 rm -f conftest.er1
17619 cat conftest.err >&5
17620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17621 (exit $ac_status); } &&
e143ad11
AS
17622 { ac_try='test -z "$ac_c_werror_flag"
17623 || test ! -s conftest.err'
52dbaac8
PE
17624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17625 (eval $ac_try) 2>&5
17626 ac_status=$?
17627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17628 (exit $ac_status); }; } &&
17629 { ac_try='test -s conftest.$ac_objext'
17630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17631 (eval $ac_try) 2>&5
17632 ac_status=$?
17633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17634 (exit $ac_status); }; }; then
17635 ac_cv_have_decl_optreset=yes
17636else
17637 echo "$as_me: failed program was:" >&5
17638sed 's/^/| /' conftest.$ac_ext >&5
17639
17640ac_cv_have_decl_optreset=no
17641fi
17642rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17643fi
17644echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
17645echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6
17646if test $ac_cv_have_decl_optreset = yes; then
17647 GETOPT_H=getopt.h
17648fi
17649
17650 fi
17651
17652 if test -z "$GETOPT_H"; then
17653 echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
17654echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6
17655if test "${gl_cv_func_gnu_getopt+set}" = set; then
17656 echo $ECHO_N "(cached) $ECHO_C" >&6
17657else
17658 if test "$cross_compiling" = yes; then
17659 echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
17660echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6
17661if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
17662 echo $ECHO_N "(cached) $ECHO_C" >&6
17663else
17664 cat >conftest.$ac_ext <<_ACEOF
17665/* confdefs.h. */
17666_ACEOF
17667cat confdefs.h >>conftest.$ac_ext
17668cat >>conftest.$ac_ext <<_ACEOF
17669/* end confdefs.h. */
17670#include <getopt.h>
17671
17672int
17673main ()
17674{
17675#ifndef getopt_clip
17676 char *p = (char *) getopt_clip;
17677#endif
17678
17679 ;
17680 return 0;
17681}
17682_ACEOF
17683rm -f conftest.$ac_objext
17684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17685 (eval $ac_compile) 2>conftest.er1
17686 ac_status=$?
17687 grep -v '^ *+' conftest.er1 >conftest.err
17688 rm -f conftest.er1
17689 cat conftest.err >&5
17690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17691 (exit $ac_status); } &&
e143ad11
AS
17692 { ac_try='test -z "$ac_c_werror_flag"
17693 || test ! -s conftest.err'
52dbaac8
PE
17694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17695 (eval $ac_try) 2>&5
17696 ac_status=$?
17697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17698 (exit $ac_status); }; } &&
17699 { ac_try='test -s conftest.$ac_objext'
17700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17701 (eval $ac_try) 2>&5
17702 ac_status=$?
17703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17704 (exit $ac_status); }; }; then
17705 ac_cv_have_decl_getopt_clip=yes
17706else
17707 echo "$as_me: failed program was:" >&5
17708sed 's/^/| /' conftest.$ac_ext >&5
17709
17710ac_cv_have_decl_getopt_clip=no
17711fi
17712rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17713fi
17714echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
17715echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6
17716if test $ac_cv_have_decl_getopt_clip = yes; then
17717 gl_cv_func_gnu_getopt=no
17718else
17719 gl_cv_func_gnu_getopt=yes
17720fi
17721
17722else
17723 cat >conftest.$ac_ext <<_ACEOF
17724/* confdefs.h. */
17725_ACEOF
17726cat confdefs.h >>conftest.$ac_ext
17727cat >>conftest.$ac_ext <<_ACEOF
17728/* end confdefs.h. */
17729#include <getopt.h>
17730int
17731main ()
17732{
17733
17734 char *myargv[3];
17735 myargv[0] = "conftest";
17736 myargv[1] = "-+";
17737 myargv[2] = 0;
17738 return getopt (2, myargv, "+a") != '?';
17739
17740 ;
17741 return 0;
17742}
17743_ACEOF
17744rm -f conftest$ac_exeext
17745if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17746 (eval $ac_link) 2>&5
17747 ac_status=$?
17748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17751 (eval $ac_try) 2>&5
17752 ac_status=$?
17753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17754 (exit $ac_status); }; }; then
17755 gl_cv_func_gnu_getopt=yes
17756else
17757 echo "$as_me: program exited with status $ac_status" >&5
17758echo "$as_me: failed program was:" >&5
17759sed 's/^/| /' conftest.$ac_ext >&5
17760
17761( exit $ac_status )
17762gl_cv_func_gnu_getopt=no
17763fi
17764rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17765fi
17766fi
17767echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
17768echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6
17769 if test "$gl_cv_func_gnu_getopt" = "no"; then
17770 GETOPT_H=getopt.h
17771 fi
17772 fi
17773
17774
17775
17776 if test -n "$GETOPT_H"; then
17777
17778
17779 GETOPT_H=getopt.h
17780
17781cat >>confdefs.h <<\_ACEOF
17782#define __GETOPT_PREFIX rpl_
17783_ACEOF
17784
17785
17786
17787 :
17788 GETOPTOBJS='getopt.o getopt1.o'
17789
17790fi
17791
17792
17793
17794
cd958eb3
MB
17795echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
17796echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
17797if test "${ac_cv_func_getpgrp_void+set}" = set; then
17798 echo $ECHO_N "(cached) $ECHO_C" >&6
17799else
17800 # Use it with a single arg.
17801cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17802/* confdefs.h. */
17803_ACEOF
17804cat confdefs.h >>conftest.$ac_ext
17805cat >>conftest.$ac_ext <<_ACEOF
17806/* end confdefs.h. */
cd958eb3
MB
17807$ac_includes_default
17808int
17809main ()
17810{
17811getpgrp (0);
17812 ;
17813 return 0;
17814}
17815_ACEOF
17816rm -f conftest.$ac_objext
17817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17818 (eval $ac_compile) 2>conftest.er1
cd958eb3 17819 ac_status=$?
edfaf76d
LK
17820 grep -v '^ *+' conftest.er1 >conftest.err
17821 rm -f conftest.er1
17822 cat conftest.err >&5
cd958eb3
MB
17823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17824 (exit $ac_status); } &&
e143ad11
AS
17825 { ac_try='test -z "$ac_c_werror_flag"
17826 || test ! -s conftest.err'
edfaf76d
LK
17827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17828 (eval $ac_try) 2>&5
17829 ac_status=$?
17830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17831 (exit $ac_status); }; } &&
17832 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
17833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17834 (eval $ac_try) 2>&5
17835 ac_status=$?
17836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17837 (exit $ac_status); }; }; then
17838 ac_cv_func_getpgrp_void=no
17839else
17840 echo "$as_me: failed program was:" >&5
19650fd6
AS
17841sed 's/^/| /' conftest.$ac_ext >&5
17842
cd958eb3
MB
17843ac_cv_func_getpgrp_void=yes
17844fi
edfaf76d 17845rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
17846
17847fi
17848echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
17849echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
17850if test $ac_cv_func_getpgrp_void = yes; then
17851
17852cat >>confdefs.h <<\_ACEOF
17853#define GETPGRP_VOID 1
17854_ACEOF
17855
17856fi
17857
17858
973a76b1
DL
17859
17860for ac_func in strftime
17861do
17862as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17863echo "$as_me:$LINENO: checking for $ac_func" >&5
17864echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17865if eval "test \"\${$as_ac_var+set}\" = set"; then
17866 echo $ECHO_N "(cached) $ECHO_C" >&6
17867else
17868 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17869/* confdefs.h. */
17870_ACEOF
17871cat confdefs.h >>conftest.$ac_ext
17872cat >>conftest.$ac_ext <<_ACEOF
17873/* end confdefs.h. */
edfaf76d
LK
17874/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17875 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17876#define $ac_func innocuous_$ac_func
17877
973a76b1 17878/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17879 which can conflict with char $ac_func (); below.
17880 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17881 <limits.h> exists even on freestanding compilers. */
edfaf76d 17882
19650fd6
AS
17883#ifdef __STDC__
17884# include <limits.h>
17885#else
17886# include <assert.h>
17887#endif
edfaf76d
LK
17888
17889#undef $ac_func
17890
973a76b1
DL
17891/* Override any gcc2 internal prototype to avoid an error. */
17892#ifdef __cplusplus
17893extern "C"
19650fd6 17894{
973a76b1
DL
17895#endif
17896/* We use char because int might match the return type of a gcc2
17897 builtin and then its argument prototype would still apply. */
17898char $ac_func ();
17899/* The GNU C library defines this for functions which it implements
17900 to always fail with ENOSYS. Some functions are actually named
17901 something starting with __ and the normal name is an alias. */
17902#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17903choke me
17904#else
19650fd6
AS
17905char (*f) () = $ac_func;
17906#endif
17907#ifdef __cplusplus
17908}
973a76b1
DL
17909#endif
17910
19650fd6
AS
17911int
17912main ()
17913{
17914return f != $ac_func;
973a76b1
DL
17915 ;
17916 return 0;
17917}
17918_ACEOF
17919rm -f conftest.$ac_objext conftest$ac_exeext
17920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17921 (eval $ac_link) 2>conftest.er1
973a76b1 17922 ac_status=$?
edfaf76d
LK
17923 grep -v '^ *+' conftest.er1 >conftest.err
17924 rm -f conftest.er1
17925 cat conftest.err >&5
973a76b1
DL
17926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17927 (exit $ac_status); } &&
e143ad11
AS
17928 { ac_try='test -z "$ac_c_werror_flag"
17929 || test ! -s conftest.err'
edfaf76d
LK
17930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17931 (eval $ac_try) 2>&5
17932 ac_status=$?
17933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17934 (exit $ac_status); }; } &&
17935 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
17936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17937 (eval $ac_try) 2>&5
17938 ac_status=$?
17939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17940 (exit $ac_status); }; }; then
17941 eval "$as_ac_var=yes"
17942else
17943 echo "$as_me: failed program was:" >&5
19650fd6
AS
17944sed 's/^/| /' conftest.$ac_ext >&5
17945
973a76b1
DL
17946eval "$as_ac_var=no"
17947fi
edfaf76d
LK
17948rm -f conftest.err conftest.$ac_objext \
17949 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
17950fi
17951echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17952echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17953if test `eval echo '${'$as_ac_var'}'` = yes; then
17954 cat >>confdefs.h <<_ACEOF
17955#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17956_ACEOF
17957
17958else
17959 # strftime is in -lintl on SCO UNIX.
17960echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
17961echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
17962if test "${ac_cv_lib_intl_strftime+set}" = set; then
17963 echo $ECHO_N "(cached) $ECHO_C" >&6
17964else
17965 ac_check_lib_save_LIBS=$LIBS
17966LIBS="-lintl $LIBS"
17967cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17968/* confdefs.h. */
17969_ACEOF
17970cat confdefs.h >>conftest.$ac_ext
17971cat >>conftest.$ac_ext <<_ACEOF
17972/* end confdefs.h. */
973a76b1
DL
17973
17974/* Override any gcc2 internal prototype to avoid an error. */
17975#ifdef __cplusplus
17976extern "C"
17977#endif
17978/* We use char because int might match the return type of a gcc2
17979 builtin and then its argument prototype would still apply. */
17980char strftime ();
17981int
17982main ()
17983{
17984strftime ();
17985 ;
17986 return 0;
17987}
17988_ACEOF
17989rm -f conftest.$ac_objext conftest$ac_exeext
17990if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17991 (eval $ac_link) 2>conftest.er1
973a76b1 17992 ac_status=$?
edfaf76d
LK
17993 grep -v '^ *+' conftest.er1 >conftest.err
17994 rm -f conftest.er1
17995 cat conftest.err >&5
973a76b1
DL
17996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17997 (exit $ac_status); } &&
e143ad11
AS
17998 { ac_try='test -z "$ac_c_werror_flag"
17999 || test ! -s conftest.err'
edfaf76d
LK
18000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18001 (eval $ac_try) 2>&5
18002 ac_status=$?
18003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18004 (exit $ac_status); }; } &&
18005 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
18006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18007 (eval $ac_try) 2>&5
18008 ac_status=$?
18009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18010 (exit $ac_status); }; }; then
18011 ac_cv_lib_intl_strftime=yes
18012else
18013 echo "$as_me: failed program was:" >&5
19650fd6
AS
18014sed 's/^/| /' conftest.$ac_ext >&5
18015
973a76b1
DL
18016ac_cv_lib_intl_strftime=no
18017fi
edfaf76d
LK
18018rm -f conftest.err conftest.$ac_objext \
18019 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
18020LIBS=$ac_check_lib_save_LIBS
18021fi
18022echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
18023echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
18024if test $ac_cv_lib_intl_strftime = yes; then
18025 cat >>confdefs.h <<\_ACEOF
18026#define HAVE_STRFTIME 1
18027_ACEOF
18028
18029LIBS="-lintl $LIBS"
18030fi
18031
18032fi
18033done
18034
18035
b936fae4
AS
18036# UNIX98 PTYs.
18037
18038for ac_func in grantpt
503d2be0
AS
18039do
18040as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 18041echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
18042echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18043if eval "test \"\${$as_ac_var+set}\" = set"; then
18044 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18045else
503d2be0 18046 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18047/* confdefs.h. */
18048_ACEOF
18049cat confdefs.h >>conftest.$ac_ext
18050cat >>conftest.$ac_ext <<_ACEOF
18051/* end confdefs.h. */
edfaf76d
LK
18052/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18053 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18054#define $ac_func innocuous_$ac_func
18055
503d2be0 18056/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18057 which can conflict with char $ac_func (); below.
18058 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18059 <limits.h> exists even on freestanding compilers. */
edfaf76d 18060
19650fd6
AS
18061#ifdef __STDC__
18062# include <limits.h>
18063#else
18064# include <assert.h>
18065#endif
edfaf76d
LK
18066
18067#undef $ac_func
18068
4c343001 18069/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18070#ifdef __cplusplus
18071extern "C"
19650fd6 18072{
503d2be0 18073#endif
4c343001 18074/* We use char because int might match the return type of a gcc2
503d2be0
AS
18075 builtin and then its argument prototype would still apply. */
18076char $ac_func ();
503d2be0
AS
18077/* The GNU C library defines this for functions which it implements
18078 to always fail with ENOSYS. Some functions are actually named
18079 something starting with __ and the normal name is an alias. */
18080#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18081choke me
18082#else
19650fd6
AS
18083char (*f) () = $ac_func;
18084#endif
18085#ifdef __cplusplus
18086}
503d2be0 18087#endif
4c343001 18088
19650fd6
AS
18089int
18090main ()
18091{
18092return f != $ac_func;
503d2be0
AS
18093 ;
18094 return 0;
18095}
18096_ACEOF
18097rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18098if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18099 (eval $ac_link) 2>conftest.er1
503d2be0 18100 ac_status=$?
edfaf76d
LK
18101 grep -v '^ *+' conftest.er1 >conftest.err
18102 rm -f conftest.er1
18103 cat conftest.err >&5
c0d27fcc 18104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18105 (exit $ac_status); } &&
e143ad11
AS
18106 { ac_try='test -z "$ac_c_werror_flag"
18107 || test ! -s conftest.err'
edfaf76d
LK
18108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18109 (eval $ac_try) 2>&5
18110 ac_status=$?
18111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18112 (exit $ac_status); }; } &&
18113 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18115 (eval $ac_try) 2>&5
18116 ac_status=$?
c0d27fcc 18117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18118 (exit $ac_status); }; }; then
18119 eval "$as_ac_var=yes"
18120else
18121 echo "$as_me: failed program was:" >&5
19650fd6
AS
18122sed 's/^/| /' conftest.$ac_ext >&5
18123
503d2be0
AS
18124eval "$as_ac_var=no"
18125fi
edfaf76d
LK
18126rm -f conftest.err conftest.$ac_objext \
18127 conftest$ac_exeext conftest.$ac_ext
503d2be0 18128fi
c0d27fcc 18129echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
18130echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18131if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18132 cat >>confdefs.h <<_ACEOF
503d2be0 18133#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18134_ACEOF
4c343001
DL
18135
18136fi
503d2be0
AS
18137done
18138
c0d27fcc 18139
b936fae4 18140# PTY-related GNU extensions.
4c343001 18141
b936fae4
AS
18142for ac_func in getpt
18143do
18144as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 18145echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
18146echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18147if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 18148 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18149else
b936fae4 18150 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18151/* confdefs.h. */
18152_ACEOF
18153cat confdefs.h >>conftest.$ac_ext
18154cat >>conftest.$ac_ext <<_ACEOF
18155/* end confdefs.h. */
edfaf76d
LK
18156/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18157 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18158#define $ac_func innocuous_$ac_func
18159
087121cc 18160/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18161 which can conflict with char $ac_func (); below.
18162 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18163 <limits.h> exists even on freestanding compilers. */
edfaf76d 18164
19650fd6
AS
18165#ifdef __STDC__
18166# include <limits.h>
18167#else
18168# include <assert.h>
18169#endif
edfaf76d
LK
18170
18171#undef $ac_func
18172
087121cc 18173/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18174#ifdef __cplusplus
18175extern "C"
19650fd6 18176{
503d2be0 18177#endif
087121cc 18178/* We use char because int might match the return type of a gcc2
503d2be0
AS
18179 builtin and then its argument prototype would still apply. */
18180char $ac_func ();
087121cc
GM
18181/* The GNU C library defines this for functions which it implements
18182 to always fail with ENOSYS. Some functions are actually named
18183 something starting with __ and the normal name is an alias. */
18184#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18185choke me
18186#else
19650fd6
AS
18187char (*f) () = $ac_func;
18188#endif
18189#ifdef __cplusplus
18190}
087121cc
GM
18191#endif
18192
19650fd6
AS
18193int
18194main ()
18195{
18196return f != $ac_func;
503d2be0
AS
18197 ;
18198 return 0;
18199}
18200_ACEOF
18201rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18202if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18203 (eval $ac_link) 2>conftest.er1
503d2be0 18204 ac_status=$?
edfaf76d
LK
18205 grep -v '^ *+' conftest.er1 >conftest.err
18206 rm -f conftest.er1
18207 cat conftest.err >&5
c0d27fcc 18208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18209 (exit $ac_status); } &&
e143ad11
AS
18210 { ac_try='test -z "$ac_c_werror_flag"
18211 || test ! -s conftest.err'
edfaf76d
LK
18212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18213 (eval $ac_try) 2>&5
18214 ac_status=$?
18215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18216 (exit $ac_status); }; } &&
18217 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18219 (eval $ac_try) 2>&5
18220 ac_status=$?
c0d27fcc 18221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18222 (exit $ac_status); }; }; then
18223 eval "$as_ac_var=yes"
18224else
18225 echo "$as_me: failed program was:" >&5
19650fd6
AS
18226sed 's/^/| /' conftest.$ac_ext >&5
18227
503d2be0
AS
18228eval "$as_ac_var=no"
18229fi
edfaf76d
LK
18230rm -f conftest.err conftest.$ac_objext \
18231 conftest$ac_exeext conftest.$ac_ext
503d2be0 18232fi
c0d27fcc 18233echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
18234echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18235if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18236 cat >>confdefs.h <<_ACEOF
503d2be0 18237#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18238_ACEOF
087121cc 18239
087121cc
GM
18240fi
18241done
18242
c0d27fcc 18243
ba4481b5
DL
18244# Check this now, so that we will NOT find the above functions in ncurses.
18245# That is because we have not set up to link ncurses in lib-src.
18246# It's better to believe a function is not available
18247# than to expect to find it in ncurses.
503d2be0 18248
c0d27fcc 18249echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
18250echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
18251if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
18252 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18253else
503d2be0 18254 ac_check_lib_save_LIBS=$LIBS
ba4481b5 18255LIBS="-lncurses $LIBS"
503d2be0 18256cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18257/* confdefs.h. */
18258_ACEOF
18259cat confdefs.h >>conftest.$ac_ext
18260cat >>conftest.$ac_ext <<_ACEOF
18261/* end confdefs.h. */
503d2be0 18262
ba4481b5 18263/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18264#ifdef __cplusplus
18265extern "C"
18266#endif
ba4481b5 18267/* We use char because int might match the return type of a gcc2
503d2be0
AS
18268 builtin and then its argument prototype would still apply. */
18269char tparm ();
18270int
18271main ()
18272{
18273tparm ();
18274 ;
18275 return 0;
18276}
18277_ACEOF
18278rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18279if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18280 (eval $ac_link) 2>conftest.er1
503d2be0 18281 ac_status=$?
edfaf76d
LK
18282 grep -v '^ *+' conftest.er1 >conftest.err
18283 rm -f conftest.er1
18284 cat conftest.err >&5
c0d27fcc 18285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18286 (exit $ac_status); } &&
e143ad11
AS
18287 { ac_try='test -z "$ac_c_werror_flag"
18288 || test ! -s conftest.err'
edfaf76d
LK
18289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18290 (eval $ac_try) 2>&5
18291 ac_status=$?
18292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18293 (exit $ac_status); }; } &&
18294 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18296 (eval $ac_try) 2>&5
18297 ac_status=$?
c0d27fcc 18298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18299 (exit $ac_status); }; }; then
18300 ac_cv_lib_ncurses_tparm=yes
18301else
18302 echo "$as_me: failed program was:" >&5
19650fd6
AS
18303sed 's/^/| /' conftest.$ac_ext >&5
18304
503d2be0
AS
18305ac_cv_lib_ncurses_tparm=no
18306fi
edfaf76d
LK
18307rm -f conftest.err conftest.$ac_objext \
18308 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18309LIBS=$ac_check_lib_save_LIBS
18310fi
c0d27fcc 18311echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
18312echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
18313if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 18314 cat >>confdefs.h <<_ACEOF
503d2be0 18315#define HAVE_LIBNCURSES 1
c0d27fcc 18316_ACEOF
ba4481b5
DL
18317
18318 LIBS="-lncurses $LIBS"
18319
ba4481b5
DL
18320fi
18321
c0d27fcc 18322
84e70f78
KR
18323# Do we need the Hesiod library to provide the support routines?
18324if test "$with_hesiod" = yes ; then
18325 # Don't set $LIBS here -- see comments above.
18326 resolv=no
c0d27fcc 18327 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
18328echo $ECHO_N "checking for res_send... $ECHO_C" >&6
18329if test "${ac_cv_func_res_send+set}" = set; then
18330 echo $ECHO_N "(cached) $ECHO_C" >&6
18331else
18332 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18333/* confdefs.h. */
18334_ACEOF
18335cat confdefs.h >>conftest.$ac_ext
18336cat >>conftest.$ac_ext <<_ACEOF
18337/* end confdefs.h. */
edfaf76d
LK
18338/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
18339 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18340#define res_send innocuous_res_send
18341
84e70f78 18342/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18343 which can conflict with char res_send (); below.
18344 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18345 <limits.h> exists even on freestanding compilers. */
edfaf76d 18346
19650fd6
AS
18347#ifdef __STDC__
18348# include <limits.h>
18349#else
18350# include <assert.h>
18351#endif
edfaf76d
LK
18352
18353#undef res_send
18354
84e70f78
KR
18355/* Override any gcc2 internal prototype to avoid an error. */
18356#ifdef __cplusplus
18357extern "C"
19650fd6 18358{
84e70f78
KR
18359#endif
18360/* We use char because int might match the return type of a gcc2
18361 builtin and then its argument prototype would still apply. */
18362char res_send ();
84e70f78
KR
18363/* The GNU C library defines this for functions which it implements
18364 to always fail with ENOSYS. Some functions are actually named
18365 something starting with __ and the normal name is an alias. */
18366#if defined (__stub_res_send) || defined (__stub___res_send)
18367choke me
18368#else
19650fd6
AS
18369char (*f) () = res_send;
18370#endif
18371#ifdef __cplusplus
18372}
cd958eb3
MB
18373#endif
18374
19650fd6
AS
18375int
18376main ()
18377{
18378return f != res_send;
84e70f78
KR
18379 ;
18380 return 0;
18381}
18382_ACEOF
18383rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18385 (eval $ac_link) 2>conftest.er1
84e70f78 18386 ac_status=$?
edfaf76d
LK
18387 grep -v '^ *+' conftest.er1 >conftest.err
18388 rm -f conftest.er1
18389 cat conftest.err >&5
c0d27fcc 18390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18391 (exit $ac_status); } &&
e143ad11
AS
18392 { ac_try='test -z "$ac_c_werror_flag"
18393 || test ! -s conftest.err'
edfaf76d
LK
18394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18395 (eval $ac_try) 2>&5
18396 ac_status=$?
18397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18398 (exit $ac_status); }; } &&
18399 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18401 (eval $ac_try) 2>&5
18402 ac_status=$?
c0d27fcc 18403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18404 (exit $ac_status); }; }; then
18405 ac_cv_func_res_send=yes
18406else
18407 echo "$as_me: failed program was:" >&5
19650fd6
AS
18408sed 's/^/| /' conftest.$ac_ext >&5
18409
84e70f78
KR
18410ac_cv_func_res_send=no
18411fi
edfaf76d
LK
18412rm -f conftest.err conftest.$ac_objext \
18413 conftest$ac_exeext conftest.$ac_ext
84e70f78 18414fi
c0d27fcc 18415echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
18416echo "${ECHO_T}$ac_cv_func_res_send" >&6
18417if test $ac_cv_func_res_send = yes; then
18418 :
18419else
c0d27fcc 18420 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
18421echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
18422if test "${ac_cv_func___res_send+set}" = set; then
18423 echo $ECHO_N "(cached) $ECHO_C" >&6
18424else
18425 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18426/* confdefs.h. */
18427_ACEOF
18428cat confdefs.h >>conftest.$ac_ext
18429cat >>conftest.$ac_ext <<_ACEOF
18430/* end confdefs.h. */
edfaf76d
LK
18431/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
18432 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18433#define __res_send innocuous___res_send
18434
84e70f78 18435/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18436 which can conflict with char __res_send (); below.
18437 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18438 <limits.h> exists even on freestanding compilers. */
edfaf76d 18439
19650fd6
AS
18440#ifdef __STDC__
18441# include <limits.h>
18442#else
18443# include <assert.h>
18444#endif
edfaf76d
LK
18445
18446#undef __res_send
18447
84e70f78
KR
18448/* Override any gcc2 internal prototype to avoid an error. */
18449#ifdef __cplusplus
18450extern "C"
19650fd6 18451{
84e70f78
KR
18452#endif
18453/* We use char because int might match the return type of a gcc2
18454 builtin and then its argument prototype would still apply. */
18455char __res_send ();
84e70f78
KR
18456/* The GNU C library defines this for functions which it implements
18457 to always fail with ENOSYS. Some functions are actually named
18458 something starting with __ and the normal name is an alias. */
18459#if defined (__stub___res_send) || defined (__stub_____res_send)
18460choke me
18461#else
19650fd6
AS
18462char (*f) () = __res_send;
18463#endif
18464#ifdef __cplusplus
18465}
84e70f78
KR
18466#endif
18467
19650fd6
AS
18468int
18469main ()
18470{
18471return f != __res_send;
84e70f78
KR
18472 ;
18473 return 0;
18474}
18475_ACEOF
18476rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18477if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18478 (eval $ac_link) 2>conftest.er1
84e70f78 18479 ac_status=$?
edfaf76d
LK
18480 grep -v '^ *+' conftest.er1 >conftest.err
18481 rm -f conftest.er1
18482 cat conftest.err >&5
c0d27fcc 18483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18484 (exit $ac_status); } &&
e143ad11
AS
18485 { ac_try='test -z "$ac_c_werror_flag"
18486 || test ! -s conftest.err'
edfaf76d
LK
18487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18488 (eval $ac_try) 2>&5
18489 ac_status=$?
18490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18491 (exit $ac_status); }; } &&
18492 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18494 (eval $ac_try) 2>&5
18495 ac_status=$?
c0d27fcc 18496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18497 (exit $ac_status); }; }; then
18498 ac_cv_func___res_send=yes
18499else
18500 echo "$as_me: failed program was:" >&5
19650fd6
AS
18501sed 's/^/| /' conftest.$ac_ext >&5
18502
84e70f78
KR
18503ac_cv_func___res_send=no
18504fi
edfaf76d
LK
18505rm -f conftest.err conftest.$ac_objext \
18506 conftest$ac_exeext conftest.$ac_ext
84e70f78 18507fi
c0d27fcc 18508echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
18509echo "${ECHO_T}$ac_cv_func___res_send" >&6
18510if test $ac_cv_func___res_send = yes; then
18511 :
18512else
c0d27fcc 18513 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
18514echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
18515if test "${ac_cv_lib_resolv_res_send+set}" = set; then
18516 echo $ECHO_N "(cached) $ECHO_C" >&6
18517else
18518 ac_check_lib_save_LIBS=$LIBS
18519LIBS="-lresolv $LIBS"
18520cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18521/* confdefs.h. */
18522_ACEOF
18523cat confdefs.h >>conftest.$ac_ext
18524cat >>conftest.$ac_ext <<_ACEOF
18525/* end confdefs.h. */
84e70f78
KR
18526
18527/* Override any gcc2 internal prototype to avoid an error. */
18528#ifdef __cplusplus
18529extern "C"
18530#endif
18531/* We use char because int might match the return type of a gcc2
18532 builtin and then its argument prototype would still apply. */
18533char res_send ();
18534int
18535main ()
18536{
18537res_send ();
18538 ;
18539 return 0;
18540}
18541_ACEOF
18542rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18543if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18544 (eval $ac_link) 2>conftest.er1
84e70f78 18545 ac_status=$?
edfaf76d
LK
18546 grep -v '^ *+' conftest.er1 >conftest.err
18547 rm -f conftest.er1
18548 cat conftest.err >&5
c0d27fcc 18549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18550 (exit $ac_status); } &&
e143ad11
AS
18551 { ac_try='test -z "$ac_c_werror_flag"
18552 || test ! -s conftest.err'
edfaf76d
LK
18553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18554 (eval $ac_try) 2>&5
18555 ac_status=$?
18556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18557 (exit $ac_status); }; } &&
18558 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18560 (eval $ac_try) 2>&5
18561 ac_status=$?
c0d27fcc 18562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18563 (exit $ac_status); }; }; then
18564 ac_cv_lib_resolv_res_send=yes
18565else
18566 echo "$as_me: failed program was:" >&5
19650fd6
AS
18567sed 's/^/| /' conftest.$ac_ext >&5
18568
84e70f78
KR
18569ac_cv_lib_resolv_res_send=no
18570fi
edfaf76d
LK
18571rm -f conftest.err conftest.$ac_objext \
18572 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18573LIBS=$ac_check_lib_save_LIBS
18574fi
c0d27fcc 18575echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
18576echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
18577if test $ac_cv_lib_resolv_res_send = yes; then
18578 resolv=yes
18579else
c0d27fcc 18580 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
18581echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
18582if test "${ac_cv_lib_resolv___res_send+set}" = set; then
18583 echo $ECHO_N "(cached) $ECHO_C" >&6
18584else
18585 ac_check_lib_save_LIBS=$LIBS
18586LIBS="-lresolv $LIBS"
18587cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18588/* confdefs.h. */
18589_ACEOF
18590cat confdefs.h >>conftest.$ac_ext
18591cat >>conftest.$ac_ext <<_ACEOF
18592/* end confdefs.h. */
84e70f78
KR
18593
18594/* Override any gcc2 internal prototype to avoid an error. */
18595#ifdef __cplusplus
18596extern "C"
18597#endif
18598/* We use char because int might match the return type of a gcc2
18599 builtin and then its argument prototype would still apply. */
18600char __res_send ();
18601int
18602main ()
18603{
18604__res_send ();
18605 ;
18606 return 0;
18607}
18608_ACEOF
18609rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18610if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18611 (eval $ac_link) 2>conftest.er1
84e70f78 18612 ac_status=$?
edfaf76d
LK
18613 grep -v '^ *+' conftest.er1 >conftest.err
18614 rm -f conftest.er1
18615 cat conftest.err >&5
c0d27fcc 18616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18617 (exit $ac_status); } &&
e143ad11
AS
18618 { ac_try='test -z "$ac_c_werror_flag"
18619 || test ! -s conftest.err'
edfaf76d
LK
18620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18621 (eval $ac_try) 2>&5
18622 ac_status=$?
18623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18624 (exit $ac_status); }; } &&
18625 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18627 (eval $ac_try) 2>&5
18628 ac_status=$?
c0d27fcc 18629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18630 (exit $ac_status); }; }; then
18631 ac_cv_lib_resolv___res_send=yes
18632else
18633 echo "$as_me: failed program was:" >&5
19650fd6
AS
18634sed 's/^/| /' conftest.$ac_ext >&5
18635
84e70f78
KR
18636ac_cv_lib_resolv___res_send=no
18637fi
edfaf76d
LK
18638rm -f conftest.err conftest.$ac_objext \
18639 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18640LIBS=$ac_check_lib_save_LIBS
18641fi
c0d27fcc 18642echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
18643echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
18644if test $ac_cv_lib_resolv___res_send = yes; then
18645 resolv=yes
18646fi
18647
18648fi
18649
18650fi
18651
18652fi
18653
18654 if test "$resolv" = yes ; then
18655 RESOLVLIB=-lresolv
b936fae4 18656
c0d27fcc 18657cat >>confdefs.h <<\_ACEOF
84e70f78 18658#define HAVE_LIBRESOLV 1
c0d27fcc 18659_ACEOF
84e70f78
KR
18660
18661 else
18662 RESOLVLIB=
18663 fi
c0d27fcc 18664 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
18665echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
18666if test "${ac_cv_func_hes_getmailhost+set}" = set; then
18667 echo $ECHO_N "(cached) $ECHO_C" >&6
18668else
18669 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18670/* confdefs.h. */
18671_ACEOF
18672cat confdefs.h >>conftest.$ac_ext
18673cat >>conftest.$ac_ext <<_ACEOF
18674/* end confdefs.h. */
edfaf76d
LK
18675/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
18676 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18677#define hes_getmailhost innocuous_hes_getmailhost
18678
84e70f78 18679/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18680 which can conflict with char hes_getmailhost (); below.
18681 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18682 <limits.h> exists even on freestanding compilers. */
edfaf76d 18683
19650fd6
AS
18684#ifdef __STDC__
18685# include <limits.h>
18686#else
18687# include <assert.h>
18688#endif
edfaf76d
LK
18689
18690#undef hes_getmailhost
18691
84e70f78
KR
18692/* Override any gcc2 internal prototype to avoid an error. */
18693#ifdef __cplusplus
18694extern "C"
19650fd6 18695{
84e70f78
KR
18696#endif
18697/* We use char because int might match the return type of a gcc2
18698 builtin and then its argument prototype would still apply. */
18699char hes_getmailhost ();
84e70f78
KR
18700/* The GNU C library defines this for functions which it implements
18701 to always fail with ENOSYS. Some functions are actually named
18702 something starting with __ and the normal name is an alias. */
18703#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
18704choke me
18705#else
19650fd6
AS
18706char (*f) () = hes_getmailhost;
18707#endif
18708#ifdef __cplusplus
18709}
cd958eb3
MB
18710#endif
18711
19650fd6
AS
18712int
18713main ()
18714{
18715return f != hes_getmailhost;
84e70f78
KR
18716 ;
18717 return 0;
18718}
18719_ACEOF
18720rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18721if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18722 (eval $ac_link) 2>conftest.er1
84e70f78 18723 ac_status=$?
edfaf76d
LK
18724 grep -v '^ *+' conftest.er1 >conftest.err
18725 rm -f conftest.er1
18726 cat conftest.err >&5
c0d27fcc 18727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18728 (exit $ac_status); } &&
e143ad11
AS
18729 { ac_try='test -z "$ac_c_werror_flag"
18730 || test ! -s conftest.err'
edfaf76d
LK
18731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18732 (eval $ac_try) 2>&5
18733 ac_status=$?
18734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18735 (exit $ac_status); }; } &&
18736 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18738 (eval $ac_try) 2>&5
18739 ac_status=$?
c0d27fcc 18740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18741 (exit $ac_status); }; }; then
18742 ac_cv_func_hes_getmailhost=yes
18743else
18744 echo "$as_me: failed program was:" >&5
19650fd6
AS
18745sed 's/^/| /' conftest.$ac_ext >&5
18746
84e70f78
KR
18747ac_cv_func_hes_getmailhost=no
18748fi
edfaf76d
LK
18749rm -f conftest.err conftest.$ac_objext \
18750 conftest$ac_exeext conftest.$ac_ext
84e70f78 18751fi
c0d27fcc 18752echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
18753echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
18754if test $ac_cv_func_hes_getmailhost = yes; then
18755 :
18756else
c0d27fcc 18757 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
18758echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
18759if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
18760 echo $ECHO_N "(cached) $ECHO_C" >&6
18761else
18762 ac_check_lib_save_LIBS=$LIBS
18763LIBS="-lhesiod $RESOLVLIB $LIBS"
18764cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18765/* confdefs.h. */
18766_ACEOF
18767cat confdefs.h >>conftest.$ac_ext
18768cat >>conftest.$ac_ext <<_ACEOF
18769/* end confdefs.h. */
84e70f78
KR
18770
18771/* Override any gcc2 internal prototype to avoid an error. */
18772#ifdef __cplusplus
18773extern "C"
18774#endif
18775/* We use char because int might match the return type of a gcc2
18776 builtin and then its argument prototype would still apply. */
18777char hes_getmailhost ();
18778int
18779main ()
18780{
18781hes_getmailhost ();
18782 ;
18783 return 0;
18784}
18785_ACEOF
18786rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18787if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18788 (eval $ac_link) 2>conftest.er1
84e70f78 18789 ac_status=$?
edfaf76d
LK
18790 grep -v '^ *+' conftest.er1 >conftest.err
18791 rm -f conftest.er1
18792 cat conftest.err >&5
c0d27fcc 18793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18794 (exit $ac_status); } &&
e143ad11
AS
18795 { ac_try='test -z "$ac_c_werror_flag"
18796 || test ! -s conftest.err'
edfaf76d
LK
18797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18798 (eval $ac_try) 2>&5
18799 ac_status=$?
18800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18801 (exit $ac_status); }; } &&
18802 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18804 (eval $ac_try) 2>&5
18805 ac_status=$?
c0d27fcc 18806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18807 (exit $ac_status); }; }; then
18808 ac_cv_lib_hesiod_hes_getmailhost=yes
18809else
18810 echo "$as_me: failed program was:" >&5
19650fd6
AS
18811sed 's/^/| /' conftest.$ac_ext >&5
18812
84e70f78
KR
18813ac_cv_lib_hesiod_hes_getmailhost=no
18814fi
edfaf76d
LK
18815rm -f conftest.err conftest.$ac_objext \
18816 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18817LIBS=$ac_check_lib_save_LIBS
18818fi
c0d27fcc 18819echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
18820echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
18821if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 18822
c0d27fcc 18823cat >>confdefs.h <<\_ACEOF
84e70f78 18824#define HAVE_LIBHESIOD 1
c0d27fcc 18825_ACEOF
84e70f78
KR
18826
18827else
18828 :
18829fi
18830
18831fi
18832
18833fi
18834
a21616bd
KR
18835# These tell us which Kerberos-related libraries to use.
18836if test "${with_kerberos+set}" = set; then
503d2be0 18837
c0d27fcc 18838echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
18839echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
18840if test "${ac_cv_lib_com_err_com_err+set}" = set; then
18841 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18842else
503d2be0 18843 ac_check_lib_save_LIBS=$LIBS
a21616bd 18844LIBS="-lcom_err $LIBS"
503d2be0 18845cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18846/* confdefs.h. */
18847_ACEOF
18848cat confdefs.h >>conftest.$ac_ext
18849cat >>conftest.$ac_ext <<_ACEOF
18850/* end confdefs.h. */
503d2be0 18851
a21616bd 18852/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18853#ifdef __cplusplus
18854extern "C"
18855#endif
a21616bd 18856/* We use char because int might match the return type of a gcc2
503d2be0
AS
18857 builtin and then its argument prototype would still apply. */
18858char com_err ();
18859int
18860main ()
18861{
18862com_err ();
18863 ;
18864 return 0;
18865}
18866_ACEOF
18867rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18868if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18869 (eval $ac_link) 2>conftest.er1
503d2be0 18870 ac_status=$?
edfaf76d
LK
18871 grep -v '^ *+' conftest.er1 >conftest.err
18872 rm -f conftest.er1
18873 cat conftest.err >&5
c0d27fcc 18874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18875 (exit $ac_status); } &&
e143ad11
AS
18876 { ac_try='test -z "$ac_c_werror_flag"
18877 || test ! -s conftest.err'
edfaf76d
LK
18878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18879 (eval $ac_try) 2>&5
18880 ac_status=$?
18881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18882 (exit $ac_status); }; } &&
18883 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18885 (eval $ac_try) 2>&5
18886 ac_status=$?
c0d27fcc 18887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18888 (exit $ac_status); }; }; then
18889 ac_cv_lib_com_err_com_err=yes
18890else
18891 echo "$as_me: failed program was:" >&5
19650fd6
AS
18892sed 's/^/| /' conftest.$ac_ext >&5
18893
503d2be0
AS
18894ac_cv_lib_com_err_com_err=no
18895fi
edfaf76d
LK
18896rm -f conftest.err conftest.$ac_objext \
18897 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18898LIBS=$ac_check_lib_save_LIBS
18899fi
c0d27fcc 18900echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
18901echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
18902if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 18903 cat >>confdefs.h <<_ACEOF
503d2be0 18904#define HAVE_LIBCOM_ERR 1
c0d27fcc 18905_ACEOF
a21616bd
KR
18906
18907 LIBS="-lcom_err $LIBS"
18908
a21616bd
KR
18909fi
18910
c0d27fcc
MR
18911
18912echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
18913echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
18914if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
18915 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18916else
503d2be0 18917 ac_check_lib_save_LIBS=$LIBS
a21616bd 18918LIBS="-lk5crypto $LIBS"
503d2be0 18919cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18920/* confdefs.h. */
18921_ACEOF
18922cat confdefs.h >>conftest.$ac_ext
18923cat >>conftest.$ac_ext <<_ACEOF
18924/* end confdefs.h. */
503d2be0 18925
a21616bd 18926/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18927#ifdef __cplusplus
18928extern "C"
18929#endif
a21616bd 18930/* We use char because int might match the return type of a gcc2
503d2be0
AS
18931 builtin and then its argument prototype would still apply. */
18932char mit_des_cbc_encrypt ();
18933int
18934main ()
18935{
18936mit_des_cbc_encrypt ();
18937 ;
18938 return 0;
18939}
18940_ACEOF
18941rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18943 (eval $ac_link) 2>conftest.er1
503d2be0 18944 ac_status=$?
edfaf76d
LK
18945 grep -v '^ *+' conftest.er1 >conftest.err
18946 rm -f conftest.er1
18947 cat conftest.err >&5
c0d27fcc 18948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18949 (exit $ac_status); } &&
e143ad11
AS
18950 { ac_try='test -z "$ac_c_werror_flag"
18951 || test ! -s conftest.err'
edfaf76d
LK
18952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18953 (eval $ac_try) 2>&5
18954 ac_status=$?
18955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18956 (exit $ac_status); }; } &&
18957 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18959 (eval $ac_try) 2>&5
18960 ac_status=$?
c0d27fcc 18961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18962 (exit $ac_status); }; }; then
18963 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
18964else
18965 echo "$as_me: failed program was:" >&5
19650fd6
AS
18966sed 's/^/| /' conftest.$ac_ext >&5
18967
503d2be0
AS
18968ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
18969fi
edfaf76d
LK
18970rm -f conftest.err conftest.$ac_objext \
18971 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18972LIBS=$ac_check_lib_save_LIBS
18973fi
c0d27fcc 18974echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
18975echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
18976if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 18977 cat >>confdefs.h <<_ACEOF
503d2be0 18978#define HAVE_LIBK5CRYPTO 1
c0d27fcc 18979_ACEOF
a21616bd
KR
18980
18981 LIBS="-lk5crypto $LIBS"
18982
a21616bd
KR
18983fi
18984
c0d27fcc
MR
18985
18986echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
18987echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
18988if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
18989 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18990else
503d2be0 18991 ac_check_lib_save_LIBS=$LIBS
a21616bd 18992LIBS="-lcrypto $LIBS"
503d2be0 18993cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18994/* confdefs.h. */
18995_ACEOF
18996cat confdefs.h >>conftest.$ac_ext
18997cat >>conftest.$ac_ext <<_ACEOF
18998/* end confdefs.h. */
503d2be0 18999
a21616bd 19000/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19001#ifdef __cplusplus
19002extern "C"
19003#endif
a21616bd 19004/* We use char because int might match the return type of a gcc2
503d2be0
AS
19005 builtin and then its argument prototype would still apply. */
19006char mit_des_cbc_encrypt ();
19007int
19008main ()
19009{
19010mit_des_cbc_encrypt ();
19011 ;
19012 return 0;
19013}
19014_ACEOF
19015rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19016if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19017 (eval $ac_link) 2>conftest.er1
503d2be0 19018 ac_status=$?
edfaf76d
LK
19019 grep -v '^ *+' conftest.er1 >conftest.err
19020 rm -f conftest.er1
19021 cat conftest.err >&5
c0d27fcc 19022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19023 (exit $ac_status); } &&
e143ad11
AS
19024 { ac_try='test -z "$ac_c_werror_flag"
19025 || test ! -s conftest.err'
edfaf76d
LK
19026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19027 (eval $ac_try) 2>&5
19028 ac_status=$?
19029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19030 (exit $ac_status); }; } &&
19031 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19033 (eval $ac_try) 2>&5
19034 ac_status=$?
c0d27fcc 19035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19036 (exit $ac_status); }; }; then
19037 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
19038else
19039 echo "$as_me: failed program was:" >&5
19650fd6
AS
19040sed 's/^/| /' conftest.$ac_ext >&5
19041
503d2be0
AS
19042ac_cv_lib_crypto_mit_des_cbc_encrypt=no
19043fi
edfaf76d
LK
19044rm -f conftest.err conftest.$ac_objext \
19045 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19046LIBS=$ac_check_lib_save_LIBS
19047fi
c0d27fcc 19048echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
19049echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
19050if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19051 cat >>confdefs.h <<_ACEOF
503d2be0 19052#define HAVE_LIBCRYPTO 1
c0d27fcc 19053_ACEOF
a21616bd
KR
19054
19055 LIBS="-lcrypto $LIBS"
19056
a21616bd
KR
19057fi
19058
c0d27fcc
MR
19059
19060echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
19061echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
19062if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
19063 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19064else
503d2be0 19065 ac_check_lib_save_LIBS=$LIBS
a21616bd 19066LIBS="-lkrb5 $LIBS"
503d2be0 19067cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19068/* confdefs.h. */
19069_ACEOF
19070cat confdefs.h >>conftest.$ac_ext
19071cat >>conftest.$ac_ext <<_ACEOF
19072/* end confdefs.h. */
a21616bd 19073
503d2be0
AS
19074/* Override any gcc2 internal prototype to avoid an error. */
19075#ifdef __cplusplus
19076extern "C"
19077#endif
19078/* We use char because int might match the return type of a gcc2
19079 builtin and then its argument prototype would still apply. */
19080char krb5_init_context ();
19081int
19082main ()
19083{
19084krb5_init_context ();
19085 ;
19086 return 0;
19087}
19088_ACEOF
19089rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19090if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19091 (eval $ac_link) 2>conftest.er1
503d2be0 19092 ac_status=$?
edfaf76d
LK
19093 grep -v '^ *+' conftest.er1 >conftest.err
19094 rm -f conftest.er1
19095 cat conftest.err >&5
c0d27fcc 19096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19097 (exit $ac_status); } &&
e143ad11
AS
19098 { ac_try='test -z "$ac_c_werror_flag"
19099 || test ! -s conftest.err'
edfaf76d
LK
19100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19101 (eval $ac_try) 2>&5
19102 ac_status=$?
19103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19104 (exit $ac_status); }; } &&
19105 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19107 (eval $ac_try) 2>&5
19108 ac_status=$?
c0d27fcc 19109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19110 (exit $ac_status); }; }; then
19111 ac_cv_lib_krb5_krb5_init_context=yes
19112else
19113 echo "$as_me: failed program was:" >&5
19650fd6
AS
19114sed 's/^/| /' conftest.$ac_ext >&5
19115
503d2be0
AS
19116ac_cv_lib_krb5_krb5_init_context=no
19117fi
edfaf76d
LK
19118rm -f conftest.err conftest.$ac_objext \
19119 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19120LIBS=$ac_check_lib_save_LIBS
19121fi
c0d27fcc 19122echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
19123echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
19124if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 19125 cat >>confdefs.h <<_ACEOF
503d2be0 19126#define HAVE_LIBKRB5 1
c0d27fcc 19127_ACEOF
a21616bd
KR
19128
19129 LIBS="-lkrb5 $LIBS"
19130
a21616bd
KR
19131fi
19132
19133 if test "${with_kerberos5+set}" != set; then
503d2be0 19134
c0d27fcc 19135echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
19136echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
19137if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
19138 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19139else
503d2be0 19140 ac_check_lib_save_LIBS=$LIBS
a21616bd 19141LIBS="-ldes425 $LIBS"
503d2be0 19142cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19143/* confdefs.h. */
19144_ACEOF
19145cat confdefs.h >>conftest.$ac_ext
19146cat >>conftest.$ac_ext <<_ACEOF
19147/* end confdefs.h. */
503d2be0 19148
a21616bd 19149/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19150#ifdef __cplusplus
19151extern "C"
19152#endif
a21616bd 19153/* We use char because int might match the return type of a gcc2
503d2be0
AS
19154 builtin and then its argument prototype would still apply. */
19155char des_cbc_encrypt ();
19156int
19157main ()
19158{
19159des_cbc_encrypt ();
19160 ;
19161 return 0;
19162}
19163_ACEOF
19164rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19166 (eval $ac_link) 2>conftest.er1
503d2be0 19167 ac_status=$?
edfaf76d
LK
19168 grep -v '^ *+' conftest.er1 >conftest.err
19169 rm -f conftest.er1
19170 cat conftest.err >&5
c0d27fcc 19171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19172 (exit $ac_status); } &&
e143ad11
AS
19173 { ac_try='test -z "$ac_c_werror_flag"
19174 || test ! -s conftest.err'
edfaf76d
LK
19175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19176 (eval $ac_try) 2>&5
19177 ac_status=$?
19178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19179 (exit $ac_status); }; } &&
19180 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19182 (eval $ac_try) 2>&5
19183 ac_status=$?
c0d27fcc 19184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19185 (exit $ac_status); }; }; then
19186 ac_cv_lib_des425_des_cbc_encrypt=yes
19187else
19188 echo "$as_me: failed program was:" >&5
19650fd6
AS
19189sed 's/^/| /' conftest.$ac_ext >&5
19190
503d2be0
AS
19191ac_cv_lib_des425_des_cbc_encrypt=no
19192fi
edfaf76d
LK
19193rm -f conftest.err conftest.$ac_objext \
19194 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19195LIBS=$ac_check_lib_save_LIBS
19196fi
c0d27fcc 19197echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
19198echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
19199if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 19200 cat >>confdefs.h <<_ACEOF
503d2be0 19201#define HAVE_LIBDES425 1
c0d27fcc 19202_ACEOF
a21616bd
KR
19203
19204 LIBS="-ldes425 $LIBS"
19205
19206else
503d2be0 19207
c0d27fcc 19208echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
19209echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
19210if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
19211 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19212else
503d2be0 19213 ac_check_lib_save_LIBS=$LIBS
a21616bd 19214LIBS="-ldes $LIBS"
503d2be0 19215cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19216/* confdefs.h. */
19217_ACEOF
19218cat confdefs.h >>conftest.$ac_ext
19219cat >>conftest.$ac_ext <<_ACEOF
19220/* end confdefs.h. */
503d2be0 19221
a21616bd 19222/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19223#ifdef __cplusplus
19224extern "C"
19225#endif
a21616bd 19226/* We use char because int might match the return type of a gcc2
503d2be0
AS
19227 builtin and then its argument prototype would still apply. */
19228char des_cbc_encrypt ();
19229int
19230main ()
19231{
19232des_cbc_encrypt ();
19233 ;
19234 return 0;
19235}
19236_ACEOF
19237rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19238if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19239 (eval $ac_link) 2>conftest.er1
503d2be0 19240 ac_status=$?
edfaf76d
LK
19241 grep -v '^ *+' conftest.er1 >conftest.err
19242 rm -f conftest.er1
19243 cat conftest.err >&5
c0d27fcc 19244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19245 (exit $ac_status); } &&
e143ad11
AS
19246 { ac_try='test -z "$ac_c_werror_flag"
19247 || test ! -s conftest.err'
edfaf76d
LK
19248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19249 (eval $ac_try) 2>&5
19250 ac_status=$?
19251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19252 (exit $ac_status); }; } &&
19253 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19255 (eval $ac_try) 2>&5
19256 ac_status=$?
c0d27fcc 19257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19258 (exit $ac_status); }; }; then
19259 ac_cv_lib_des_des_cbc_encrypt=yes
19260else
19261 echo "$as_me: failed program was:" >&5
19650fd6
AS
19262sed 's/^/| /' conftest.$ac_ext >&5
19263
503d2be0
AS
19264ac_cv_lib_des_des_cbc_encrypt=no
19265fi
edfaf76d
LK
19266rm -f conftest.err conftest.$ac_objext \
19267 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19268LIBS=$ac_check_lib_save_LIBS
19269fi
c0d27fcc 19270echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
19271echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
19272if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 19273 cat >>confdefs.h <<_ACEOF
503d2be0 19274#define HAVE_LIBDES 1
c0d27fcc 19275_ACEOF
a21616bd
KR
19276
19277 LIBS="-ldes $LIBS"
19278
a21616bd
KR
19279fi
19280
19281fi
19282
c0d27fcc
MR
19283
19284echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
19285echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
19286if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
19287 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19288else
503d2be0 19289 ac_check_lib_save_LIBS=$LIBS
a21616bd 19290LIBS="-lkrb4 $LIBS"
503d2be0 19291cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19292/* confdefs.h. */
19293_ACEOF
19294cat confdefs.h >>conftest.$ac_ext
19295cat >>conftest.$ac_ext <<_ACEOF
19296/* end confdefs.h. */
503d2be0 19297
a21616bd 19298/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19299#ifdef __cplusplus
19300extern "C"
19301#endif
a21616bd 19302/* We use char because int might match the return type of a gcc2
503d2be0
AS
19303 builtin and then its argument prototype would still apply. */
19304char krb_get_cred ();
19305int
19306main ()
19307{
19308krb_get_cred ();
19309 ;
19310 return 0;
19311}
19312_ACEOF
19313rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19314if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19315 (eval $ac_link) 2>conftest.er1
503d2be0 19316 ac_status=$?
edfaf76d
LK
19317 grep -v '^ *+' conftest.er1 >conftest.err
19318 rm -f conftest.er1
19319 cat conftest.err >&5
c0d27fcc 19320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19321 (exit $ac_status); } &&
e143ad11
AS
19322 { ac_try='test -z "$ac_c_werror_flag"
19323 || test ! -s conftest.err'
edfaf76d
LK
19324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19325 (eval $ac_try) 2>&5
19326 ac_status=$?
19327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19328 (exit $ac_status); }; } &&
19329 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19331 (eval $ac_try) 2>&5
19332 ac_status=$?
c0d27fcc 19333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19334 (exit $ac_status); }; }; then
19335 ac_cv_lib_krb4_krb_get_cred=yes
19336else
19337 echo "$as_me: failed program was:" >&5
19650fd6
AS
19338sed 's/^/| /' conftest.$ac_ext >&5
19339
503d2be0
AS
19340ac_cv_lib_krb4_krb_get_cred=no
19341fi
edfaf76d
LK
19342rm -f conftest.err conftest.$ac_objext \
19343 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19344LIBS=$ac_check_lib_save_LIBS
19345fi
c0d27fcc 19346echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
19347echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
19348if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 19349 cat >>confdefs.h <<_ACEOF
503d2be0 19350#define HAVE_LIBKRB4 1
c0d27fcc 19351_ACEOF
a21616bd
KR
19352
19353 LIBS="-lkrb4 $LIBS"
19354
19355else
503d2be0 19356
c0d27fcc 19357echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
19358echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
19359if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
19360 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19361else
503d2be0 19362 ac_check_lib_save_LIBS=$LIBS
a21616bd 19363LIBS="-lkrb $LIBS"
503d2be0 19364cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19365/* confdefs.h. */
19366_ACEOF
19367cat confdefs.h >>conftest.$ac_ext
19368cat >>conftest.$ac_ext <<_ACEOF
19369/* end confdefs.h. */
503d2be0 19370
a21616bd 19371/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19372#ifdef __cplusplus
19373extern "C"
19374#endif
a21616bd 19375/* We use char because int might match the return type of a gcc2
503d2be0
AS
19376 builtin and then its argument prototype would still apply. */
19377char krb_get_cred ();
19378int
19379main ()
19380{
19381krb_get_cred ();
19382 ;
19383 return 0;
19384}
19385_ACEOF
19386rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19387if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19388 (eval $ac_link) 2>conftest.er1
503d2be0 19389 ac_status=$?
edfaf76d
LK
19390 grep -v '^ *+' conftest.er1 >conftest.err
19391 rm -f conftest.er1
19392 cat conftest.err >&5
c0d27fcc 19393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19394 (exit $ac_status); } &&
e143ad11
AS
19395 { ac_try='test -z "$ac_c_werror_flag"
19396 || test ! -s conftest.err'
edfaf76d
LK
19397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19398 (eval $ac_try) 2>&5
19399 ac_status=$?
19400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19401 (exit $ac_status); }; } &&
19402 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19404 (eval $ac_try) 2>&5
19405 ac_status=$?
c0d27fcc 19406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19407 (exit $ac_status); }; }; then
19408 ac_cv_lib_krb_krb_get_cred=yes
19409else
19410 echo "$as_me: failed program was:" >&5
19650fd6
AS
19411sed 's/^/| /' conftest.$ac_ext >&5
19412
503d2be0
AS
19413ac_cv_lib_krb_krb_get_cred=no
19414fi
edfaf76d
LK
19415rm -f conftest.err conftest.$ac_objext \
19416 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19417LIBS=$ac_check_lib_save_LIBS
19418fi
c0d27fcc 19419echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
19420echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
19421if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 19422 cat >>confdefs.h <<_ACEOF
503d2be0 19423#define HAVE_LIBKRB 1
c0d27fcc 19424_ACEOF
a21616bd
KR
19425
19426 LIBS="-lkrb $LIBS"
19427
a21616bd
KR
19428fi
19429
19430fi
19431
19432 fi
19433
19434 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
19435
19436for ac_header in krb5.h
a21616bd 19437do
503d2be0 19438as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19439if eval "test \"\${$as_ac_Header+set}\" = set"; then
19440 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19441echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19442if eval "test \"\${$as_ac_Header+set}\" = set"; then
19443 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19444fi
19445echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19446echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19447else
c0d27fcc
MR
19448 # Is the header compilable?
19449echo "$as_me:$LINENO: checking $ac_header usability" >&5
19450echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19451cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19452/* confdefs.h. */
19453_ACEOF
19454cat confdefs.h >>conftest.$ac_ext
19455cat >>conftest.$ac_ext <<_ACEOF
19456/* end confdefs.h. */
c0d27fcc
MR
19457$ac_includes_default
19458#include <$ac_header>
19459_ACEOF
19460rm -f conftest.$ac_objext
19461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19462 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19463 ac_status=$?
edfaf76d
LK
19464 grep -v '^ *+' conftest.er1 >conftest.err
19465 rm -f conftest.er1
19466 cat conftest.err >&5
c0d27fcc
MR
19467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19468 (exit $ac_status); } &&
e143ad11
AS
19469 { ac_try='test -z "$ac_c_werror_flag"
19470 || test ! -s conftest.err'
edfaf76d
LK
19471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19472 (eval $ac_try) 2>&5
19473 ac_status=$?
19474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19475 (exit $ac_status); }; } &&
19476 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19478 (eval $ac_try) 2>&5
19479 ac_status=$?
19480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19481 (exit $ac_status); }; }; then
19482 ac_header_compiler=yes
19483else
19484 echo "$as_me: failed program was:" >&5
19650fd6
AS
19485sed 's/^/| /' conftest.$ac_ext >&5
19486
c0d27fcc
MR
19487ac_header_compiler=no
19488fi
edfaf76d 19489rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19490echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19491echo "${ECHO_T}$ac_header_compiler" >&6
19492
19493# Is the header present?
19494echo "$as_me:$LINENO: checking $ac_header presence" >&5
19495echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19496cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19497/* confdefs.h. */
19498_ACEOF
19499cat confdefs.h >>conftest.$ac_ext
19500cat >>conftest.$ac_ext <<_ACEOF
19501/* end confdefs.h. */
503d2be0
AS
19502#include <$ac_header>
19503_ACEOF
c0d27fcc 19504if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19505 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19506 ac_status=$?
6bae0ccf 19507 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19508 rm -f conftest.er1
19509 cat conftest.err >&5
c0d27fcc 19510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19511 (exit $ac_status); } >/dev/null; then
19512 if test -s conftest.err; then
19513 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19514 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19515 else
19516 ac_cpp_err=
19517 fi
19518else
19519 ac_cpp_err=yes
19520fi
19521if test -z "$ac_cpp_err"; then
c0d27fcc 19522 ac_header_preproc=yes
503d2be0
AS
19523else
19524 echo "$as_me: failed program was:" >&5
19650fd6
AS
19525sed 's/^/| /' conftest.$ac_ext >&5
19526
c0d27fcc 19527 ac_header_preproc=no
a21616bd 19528fi
503d2be0 19529rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19530echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19531echo "${ECHO_T}$ac_header_preproc" >&6
19532
19533# So? What about this header?
edfaf76d
LK
19534case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19535 yes:no: )
c0d27fcc
MR
19536 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19537echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19538 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19539echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19540 ac_header_preproc=yes
19650fd6 19541 ;;
edfaf76d 19542 no:yes:* )
c0d27fcc
MR
19543 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19544echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19545 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19546echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19547 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19548echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19549 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19550echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19551 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19552echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19553 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19554echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19555 (
19556 cat <<\_ASBOX
edfaf76d
LK
19557## ------------------------------------------ ##
19558## Report this to the AC_PACKAGE_NAME lists. ##
19559## ------------------------------------------ ##
19650fd6
AS
19560_ASBOX
19561 ) |
19562 sed "s/^/$as_me: WARNING: /" >&2
19563 ;;
c0d27fcc
MR
19564esac
19565echo "$as_me:$LINENO: checking for $ac_header" >&5
19566echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19567if eval "test \"\${$as_ac_Header+set}\" = set"; then
19568 echo $ECHO_N "(cached) $ECHO_C" >&6
19569else
edfaf76d 19570 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19571fi
c0d27fcc 19572echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19573echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19574
19575fi
503d2be0 19576if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19577 cat >>confdefs.h <<_ACEOF
503d2be0 19578#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19579_ACEOF
503d2be0 19580
a21616bd 19581fi
c0d27fcc 19582
a21616bd
KR
19583done
19584
19585 else
503d2be0
AS
19586
19587for ac_header in des.h
a21616bd 19588do
503d2be0 19589as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19590if eval "test \"\${$as_ac_Header+set}\" = set"; then
19591 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19592echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19593if eval "test \"\${$as_ac_Header+set}\" = set"; then
19594 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19595fi
19596echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19597echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19598else
c0d27fcc
MR
19599 # Is the header compilable?
19600echo "$as_me:$LINENO: checking $ac_header usability" >&5
19601echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19602cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19603/* confdefs.h. */
19604_ACEOF
19605cat confdefs.h >>conftest.$ac_ext
19606cat >>conftest.$ac_ext <<_ACEOF
19607/* end confdefs.h. */
c0d27fcc
MR
19608$ac_includes_default
19609#include <$ac_header>
19610_ACEOF
19611rm -f conftest.$ac_objext
19612if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19613 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19614 ac_status=$?
edfaf76d
LK
19615 grep -v '^ *+' conftest.er1 >conftest.err
19616 rm -f conftest.er1
19617 cat conftest.err >&5
c0d27fcc
MR
19618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19619 (exit $ac_status); } &&
e143ad11
AS
19620 { ac_try='test -z "$ac_c_werror_flag"
19621 || test ! -s conftest.err'
edfaf76d
LK
19622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19623 (eval $ac_try) 2>&5
19624 ac_status=$?
19625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19626 (exit $ac_status); }; } &&
19627 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19629 (eval $ac_try) 2>&5
19630 ac_status=$?
19631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19632 (exit $ac_status); }; }; then
19633 ac_header_compiler=yes
19634else
19635 echo "$as_me: failed program was:" >&5
19650fd6
AS
19636sed 's/^/| /' conftest.$ac_ext >&5
19637
c0d27fcc
MR
19638ac_header_compiler=no
19639fi
edfaf76d 19640rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19641echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19642echo "${ECHO_T}$ac_header_compiler" >&6
19643
19644# Is the header present?
19645echo "$as_me:$LINENO: checking $ac_header presence" >&5
19646echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19647cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19648/* confdefs.h. */
19649_ACEOF
19650cat confdefs.h >>conftest.$ac_ext
19651cat >>conftest.$ac_ext <<_ACEOF
19652/* end confdefs.h. */
503d2be0
AS
19653#include <$ac_header>
19654_ACEOF
c0d27fcc 19655if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19656 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19657 ac_status=$?
6bae0ccf 19658 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19659 rm -f conftest.er1
19660 cat conftest.err >&5
c0d27fcc 19661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19662 (exit $ac_status); } >/dev/null; then
19663 if test -s conftest.err; then
19664 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19665 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19666 else
19667 ac_cpp_err=
19668 fi
19669else
19670 ac_cpp_err=yes
19671fi
19672if test -z "$ac_cpp_err"; then
c0d27fcc 19673 ac_header_preproc=yes
503d2be0
AS
19674else
19675 echo "$as_me: failed program was:" >&5
19650fd6
AS
19676sed 's/^/| /' conftest.$ac_ext >&5
19677
c0d27fcc 19678 ac_header_preproc=no
a21616bd 19679fi
503d2be0 19680rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19681echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19682echo "${ECHO_T}$ac_header_preproc" >&6
19683
19684# So? What about this header?
edfaf76d
LK
19685case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19686 yes:no: )
c0d27fcc
MR
19687 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19688echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19689 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19690echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19691 ac_header_preproc=yes
19650fd6 19692 ;;
edfaf76d 19693 no:yes:* )
c0d27fcc
MR
19694 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19695echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19696 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19697echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19698 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19699echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19700 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19701echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19702 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19703echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19704 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19705echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19706 (
19707 cat <<\_ASBOX
edfaf76d
LK
19708## ------------------------------------------ ##
19709## Report this to the AC_PACKAGE_NAME lists. ##
19710## ------------------------------------------ ##
19650fd6
AS
19711_ASBOX
19712 ) |
19713 sed "s/^/$as_me: WARNING: /" >&2
19714 ;;
c0d27fcc
MR
19715esac
19716echo "$as_me:$LINENO: checking for $ac_header" >&5
19717echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19718if eval "test \"\${$as_ac_Header+set}\" = set"; then
19719 echo $ECHO_N "(cached) $ECHO_C" >&6
19720else
edfaf76d 19721 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19722fi
c0d27fcc 19723echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19724echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19725
19726fi
503d2be0 19727if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19728 cat >>confdefs.h <<_ACEOF
503d2be0 19729#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19730_ACEOF
503d2be0 19731
a21616bd 19732else
503d2be0
AS
19733
19734for ac_header in kerberosIV/des.h
a21616bd 19735do
503d2be0 19736as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19737if eval "test \"\${$as_ac_Header+set}\" = set"; then
19738 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19739echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19740if eval "test \"\${$as_ac_Header+set}\" = set"; then
19741 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19742fi
19743echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19744echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19745else
c0d27fcc
MR
19746 # Is the header compilable?
19747echo "$as_me:$LINENO: checking $ac_header usability" >&5
19748echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19749cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19750/* confdefs.h. */
19751_ACEOF
19752cat confdefs.h >>conftest.$ac_ext
19753cat >>conftest.$ac_ext <<_ACEOF
19754/* end confdefs.h. */
c0d27fcc
MR
19755$ac_includes_default
19756#include <$ac_header>
19757_ACEOF
19758rm -f conftest.$ac_objext
19759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19760 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19761 ac_status=$?
edfaf76d
LK
19762 grep -v '^ *+' conftest.er1 >conftest.err
19763 rm -f conftest.er1
19764 cat conftest.err >&5
c0d27fcc
MR
19765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19766 (exit $ac_status); } &&
e143ad11
AS
19767 { ac_try='test -z "$ac_c_werror_flag"
19768 || test ! -s conftest.err'
edfaf76d
LK
19769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19770 (eval $ac_try) 2>&5
19771 ac_status=$?
19772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19773 (exit $ac_status); }; } &&
19774 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
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); }; }; then
19780 ac_header_compiler=yes
19781else
19782 echo "$as_me: failed program was:" >&5
19650fd6
AS
19783sed 's/^/| /' conftest.$ac_ext >&5
19784
c0d27fcc
MR
19785ac_header_compiler=no
19786fi
edfaf76d 19787rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19788echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19789echo "${ECHO_T}$ac_header_compiler" >&6
19790
19791# Is the header present?
19792echo "$as_me:$LINENO: checking $ac_header presence" >&5
19793echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19794cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19795/* confdefs.h. */
19796_ACEOF
19797cat confdefs.h >>conftest.$ac_ext
19798cat >>conftest.$ac_ext <<_ACEOF
19799/* end confdefs.h. */
503d2be0
AS
19800#include <$ac_header>
19801_ACEOF
c0d27fcc 19802if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19803 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19804 ac_status=$?
6bae0ccf 19805 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19806 rm -f conftest.er1
19807 cat conftest.err >&5
c0d27fcc 19808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19809 (exit $ac_status); } >/dev/null; then
19810 if test -s conftest.err; then
19811 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19812 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19813 else
19814 ac_cpp_err=
19815 fi
19816else
19817 ac_cpp_err=yes
19818fi
19819if test -z "$ac_cpp_err"; then
c0d27fcc 19820 ac_header_preproc=yes
503d2be0
AS
19821else
19822 echo "$as_me: failed program was:" >&5
19650fd6
AS
19823sed 's/^/| /' conftest.$ac_ext >&5
19824
c0d27fcc 19825 ac_header_preproc=no
a21616bd 19826fi
503d2be0 19827rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19828echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19829echo "${ECHO_T}$ac_header_preproc" >&6
19830
19831# So? What about this header?
edfaf76d
LK
19832case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19833 yes:no: )
c0d27fcc
MR
19834 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19835echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19836 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19837echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19838 ac_header_preproc=yes
19650fd6 19839 ;;
edfaf76d 19840 no:yes:* )
c0d27fcc
MR
19841 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19842echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19843 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19844echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19845 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19846echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19847 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19848echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19849 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19850echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19851 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19852echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19853 (
19854 cat <<\_ASBOX
edfaf76d
LK
19855## ------------------------------------------ ##
19856## Report this to the AC_PACKAGE_NAME lists. ##
19857## ------------------------------------------ ##
19650fd6
AS
19858_ASBOX
19859 ) |
19860 sed "s/^/$as_me: WARNING: /" >&2
19861 ;;
c0d27fcc
MR
19862esac
19863echo "$as_me:$LINENO: checking for $ac_header" >&5
19864echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19865if eval "test \"\${$as_ac_Header+set}\" = set"; then
19866 echo $ECHO_N "(cached) $ECHO_C" >&6
19867else
edfaf76d 19868 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19869fi
c0d27fcc 19870echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19871echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19872
19873fi
503d2be0 19874if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19875 cat >>confdefs.h <<_ACEOF
503d2be0 19876#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19877_ACEOF
503d2be0 19878
a21616bd 19879else
503d2be0
AS
19880
19881for ac_header in kerberos/des.h
a21616bd 19882do
503d2be0 19883as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19884if eval "test \"\${$as_ac_Header+set}\" = set"; then
19885 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19886echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19887if eval "test \"\${$as_ac_Header+set}\" = set"; then
19888 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19889fi
19890echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19891echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19892else
c0d27fcc
MR
19893 # Is the header compilable?
19894echo "$as_me:$LINENO: checking $ac_header usability" >&5
19895echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19896cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19897/* confdefs.h. */
19898_ACEOF
19899cat confdefs.h >>conftest.$ac_ext
19900cat >>conftest.$ac_ext <<_ACEOF
19901/* end confdefs.h. */
c0d27fcc
MR
19902$ac_includes_default
19903#include <$ac_header>
19904_ACEOF
19905rm -f conftest.$ac_objext
19906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19907 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19908 ac_status=$?
edfaf76d
LK
19909 grep -v '^ *+' conftest.er1 >conftest.err
19910 rm -f conftest.er1
19911 cat conftest.err >&5
c0d27fcc
MR
19912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19913 (exit $ac_status); } &&
e143ad11
AS
19914 { ac_try='test -z "$ac_c_werror_flag"
19915 || test ! -s conftest.err'
edfaf76d
LK
19916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19917 (eval $ac_try) 2>&5
19918 ac_status=$?
19919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19920 (exit $ac_status); }; } &&
19921 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19923 (eval $ac_try) 2>&5
19924 ac_status=$?
19925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19926 (exit $ac_status); }; }; then
19927 ac_header_compiler=yes
19928else
19929 echo "$as_me: failed program was:" >&5
19650fd6
AS
19930sed 's/^/| /' conftest.$ac_ext >&5
19931
c0d27fcc
MR
19932ac_header_compiler=no
19933fi
edfaf76d 19934rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19935echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19936echo "${ECHO_T}$ac_header_compiler" >&6
19937
19938# Is the header present?
19939echo "$as_me:$LINENO: checking $ac_header presence" >&5
19940echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19941cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19942/* confdefs.h. */
19943_ACEOF
19944cat confdefs.h >>conftest.$ac_ext
19945cat >>conftest.$ac_ext <<_ACEOF
19946/* end confdefs.h. */
503d2be0
AS
19947#include <$ac_header>
19948_ACEOF
c0d27fcc 19949if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19950 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19951 ac_status=$?
6bae0ccf 19952 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19953 rm -f conftest.er1
19954 cat conftest.err >&5
c0d27fcc 19955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19956 (exit $ac_status); } >/dev/null; then
19957 if test -s conftest.err; then
19958 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19959 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19960 else
19961 ac_cpp_err=
19962 fi
19963else
19964 ac_cpp_err=yes
19965fi
19966if test -z "$ac_cpp_err"; then
c0d27fcc 19967 ac_header_preproc=yes
503d2be0
AS
19968else
19969 echo "$as_me: failed program was:" >&5
19650fd6
AS
19970sed 's/^/| /' conftest.$ac_ext >&5
19971
c0d27fcc 19972 ac_header_preproc=no
a21616bd 19973fi
503d2be0 19974rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19975echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19976echo "${ECHO_T}$ac_header_preproc" >&6
19977
19978# So? What about this header?
edfaf76d
LK
19979case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19980 yes:no: )
c0d27fcc
MR
19981 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19982echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19983 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19984echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19985 ac_header_preproc=yes
19650fd6 19986 ;;
edfaf76d 19987 no:yes:* )
c0d27fcc
MR
19988 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19989echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19990 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19991echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19992 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19993echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19994 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19995echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19996 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19997echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19998 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19999echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20000 (
20001 cat <<\_ASBOX
edfaf76d
LK
20002## ------------------------------------------ ##
20003## Report this to the AC_PACKAGE_NAME lists. ##
20004## ------------------------------------------ ##
19650fd6
AS
20005_ASBOX
20006 ) |
20007 sed "s/^/$as_me: WARNING: /" >&2
20008 ;;
c0d27fcc
MR
20009esac
20010echo "$as_me:$LINENO: checking for $ac_header" >&5
20011echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20012if eval "test \"\${$as_ac_Header+set}\" = set"; then
20013 echo $ECHO_N "(cached) $ECHO_C" >&6
20014else
edfaf76d 20015 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20016fi
c0d27fcc 20017echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20018echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20019
20020fi
503d2be0 20021if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20022 cat >>confdefs.h <<_ACEOF
503d2be0 20023#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20024_ACEOF
a21616bd
KR
20025
20026fi
c0d27fcc 20027
a21616bd
KR
20028done
20029
98418dba 20030fi
c0d27fcc 20031
925c2f3f
EZ
20032done
20033
98418dba 20034fi
c0d27fcc 20035
925c2f3f 20036done
98418dba 20037
c0d27fcc 20038
925c2f3f
EZ
20039for ac_header in krb.h
20040do
20041as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20042if eval "test \"\${$as_ac_Header+set}\" = set"; then
20043 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
20044echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20045if eval "test \"\${$as_ac_Header+set}\" = set"; then
20046 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20047fi
20048echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20049echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20050else
20051 # Is the header compilable?
20052echo "$as_me:$LINENO: checking $ac_header usability" >&5
20053echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20054cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20055/* confdefs.h. */
20056_ACEOF
20057cat confdefs.h >>conftest.$ac_ext
20058cat >>conftest.$ac_ext <<_ACEOF
20059/* end confdefs.h. */
c0d27fcc
MR
20060$ac_includes_default
20061#include <$ac_header>
20062_ACEOF
20063rm -f conftest.$ac_objext
20064if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20065 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20066 ac_status=$?
edfaf76d
LK
20067 grep -v '^ *+' conftest.er1 >conftest.err
20068 rm -f conftest.er1
20069 cat conftest.err >&5
c0d27fcc
MR
20070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20071 (exit $ac_status); } &&
e143ad11
AS
20072 { ac_try='test -z "$ac_c_werror_flag"
20073 || test ! -s conftest.err'
edfaf76d
LK
20074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20075 (eval $ac_try) 2>&5
20076 ac_status=$?
20077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20078 (exit $ac_status); }; } &&
20079 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20081 (eval $ac_try) 2>&5
20082 ac_status=$?
20083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20084 (exit $ac_status); }; }; then
20085 ac_header_compiler=yes
925c2f3f 20086else
c0d27fcc 20087 echo "$as_me: failed program was:" >&5
19650fd6
AS
20088sed 's/^/| /' conftest.$ac_ext >&5
20089
c0d27fcc
MR
20090ac_header_compiler=no
20091fi
edfaf76d 20092rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20093echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20094echo "${ECHO_T}$ac_header_compiler" >&6
20095
20096# Is the header present?
20097echo "$as_me:$LINENO: checking $ac_header presence" >&5
20098echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20099cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20100/* confdefs.h. */
20101_ACEOF
20102cat confdefs.h >>conftest.$ac_ext
20103cat >>conftest.$ac_ext <<_ACEOF
20104/* end confdefs.h. */
503d2be0
AS
20105#include <$ac_header>
20106_ACEOF
c0d27fcc 20107if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20108 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20109 ac_status=$?
6bae0ccf 20110 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20111 rm -f conftest.er1
20112 cat conftest.err >&5
c0d27fcc 20113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20114 (exit $ac_status); } >/dev/null; then
20115 if test -s conftest.err; then
20116 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20117 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20118 else
20119 ac_cpp_err=
20120 fi
20121else
20122 ac_cpp_err=yes
20123fi
20124if test -z "$ac_cpp_err"; then
c0d27fcc 20125 ac_header_preproc=yes
503d2be0
AS
20126else
20127 echo "$as_me: failed program was:" >&5
19650fd6
AS
20128sed 's/^/| /' conftest.$ac_ext >&5
20129
c0d27fcc 20130 ac_header_preproc=no
a21616bd 20131fi
503d2be0 20132rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20133echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20134echo "${ECHO_T}$ac_header_preproc" >&6
20135
20136# So? What about this header?
edfaf76d
LK
20137case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20138 yes:no: )
c0d27fcc
MR
20139 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20140echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20141 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20142echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20143 ac_header_preproc=yes
19650fd6 20144 ;;
edfaf76d 20145 no:yes:* )
c0d27fcc
MR
20146 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20147echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20148 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20149echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20150 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20151echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20152 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20153echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20154 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20155echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20156 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20157echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20158 (
20159 cat <<\_ASBOX
edfaf76d
LK
20160## ------------------------------------------ ##
20161## Report this to the AC_PACKAGE_NAME lists. ##
20162## ------------------------------------------ ##
19650fd6
AS
20163_ASBOX
20164 ) |
20165 sed "s/^/$as_me: WARNING: /" >&2
20166 ;;
c0d27fcc
MR
20167esac
20168echo "$as_me:$LINENO: checking for $ac_header" >&5
20169echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20170if eval "test \"\${$as_ac_Header+set}\" = set"; then
20171 echo $ECHO_N "(cached) $ECHO_C" >&6
20172else
edfaf76d 20173 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20174fi
c0d27fcc 20175echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20176echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20177
20178fi
503d2be0 20179if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20180 cat >>confdefs.h <<_ACEOF
503d2be0 20181#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20182_ACEOF
503d2be0 20183
a21616bd 20184else
503d2be0
AS
20185
20186for ac_header in kerberosIV/krb.h
a21616bd 20187do
503d2be0 20188as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20189if eval "test \"\${$as_ac_Header+set}\" = set"; then
20190 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20191echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20192if eval "test \"\${$as_ac_Header+set}\" = set"; then
20193 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20194fi
20195echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20196echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20197else
c0d27fcc
MR
20198 # Is the header compilable?
20199echo "$as_me:$LINENO: checking $ac_header usability" >&5
20200echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20201cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20202/* confdefs.h. */
20203_ACEOF
20204cat confdefs.h >>conftest.$ac_ext
20205cat >>conftest.$ac_ext <<_ACEOF
20206/* end confdefs.h. */
c0d27fcc
MR
20207$ac_includes_default
20208#include <$ac_header>
20209_ACEOF
20210rm -f conftest.$ac_objext
20211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20212 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20213 ac_status=$?
edfaf76d
LK
20214 grep -v '^ *+' conftest.er1 >conftest.err
20215 rm -f conftest.er1
20216 cat conftest.err >&5
c0d27fcc
MR
20217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20218 (exit $ac_status); } &&
e143ad11
AS
20219 { ac_try='test -z "$ac_c_werror_flag"
20220 || test ! -s conftest.err'
edfaf76d
LK
20221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20222 (eval $ac_try) 2>&5
20223 ac_status=$?
20224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20225 (exit $ac_status); }; } &&
20226 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20228 (eval $ac_try) 2>&5
20229 ac_status=$?
20230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20231 (exit $ac_status); }; }; then
20232 ac_header_compiler=yes
20233else
20234 echo "$as_me: failed program was:" >&5
19650fd6
AS
20235sed 's/^/| /' conftest.$ac_ext >&5
20236
c0d27fcc
MR
20237ac_header_compiler=no
20238fi
edfaf76d 20239rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20240echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20241echo "${ECHO_T}$ac_header_compiler" >&6
20242
20243# Is the header present?
20244echo "$as_me:$LINENO: checking $ac_header presence" >&5
20245echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20246cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20247/* confdefs.h. */
20248_ACEOF
20249cat confdefs.h >>conftest.$ac_ext
20250cat >>conftest.$ac_ext <<_ACEOF
20251/* end confdefs.h. */
503d2be0
AS
20252#include <$ac_header>
20253_ACEOF
c0d27fcc 20254if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20255 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20256 ac_status=$?
6bae0ccf 20257 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20258 rm -f conftest.er1
20259 cat conftest.err >&5
c0d27fcc 20260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20261 (exit $ac_status); } >/dev/null; then
20262 if test -s conftest.err; then
20263 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20264 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20265 else
20266 ac_cpp_err=
20267 fi
20268else
20269 ac_cpp_err=yes
20270fi
20271if test -z "$ac_cpp_err"; then
c0d27fcc 20272 ac_header_preproc=yes
503d2be0
AS
20273else
20274 echo "$as_me: failed program was:" >&5
19650fd6
AS
20275sed 's/^/| /' conftest.$ac_ext >&5
20276
c0d27fcc 20277 ac_header_preproc=no
a21616bd 20278fi
503d2be0 20279rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20280echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20281echo "${ECHO_T}$ac_header_preproc" >&6
20282
20283# So? What about this header?
edfaf76d
LK
20284case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20285 yes:no: )
c0d27fcc
MR
20286 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20287echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20288 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20289echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20290 ac_header_preproc=yes
19650fd6 20291 ;;
edfaf76d 20292 no:yes:* )
c0d27fcc
MR
20293 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20294echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20295 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20296echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20297 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20298echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20299 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20300echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20301 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20302echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20303 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20304echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20305 (
20306 cat <<\_ASBOX
edfaf76d
LK
20307## ------------------------------------------ ##
20308## Report this to the AC_PACKAGE_NAME lists. ##
20309## ------------------------------------------ ##
19650fd6
AS
20310_ASBOX
20311 ) |
20312 sed "s/^/$as_me: WARNING: /" >&2
20313 ;;
c0d27fcc
MR
20314esac
20315echo "$as_me:$LINENO: checking for $ac_header" >&5
20316echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20317if eval "test \"\${$as_ac_Header+set}\" = set"; then
20318 echo $ECHO_N "(cached) $ECHO_C" >&6
20319else
edfaf76d 20320 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20321fi
c0d27fcc 20322echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20323echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20324
20325fi
503d2be0 20326if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20327 cat >>confdefs.h <<_ACEOF
503d2be0 20328#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20329_ACEOF
503d2be0 20330
a21616bd 20331else
503d2be0
AS
20332
20333for ac_header in kerberos/krb.h
a21616bd 20334do
503d2be0 20335as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20336if eval "test \"\${$as_ac_Header+set}\" = set"; then
20337 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20338echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20339if eval "test \"\${$as_ac_Header+set}\" = set"; then
20340 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20341fi
20342echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20343echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20344else
c0d27fcc
MR
20345 # Is the header compilable?
20346echo "$as_me:$LINENO: checking $ac_header usability" >&5
20347echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20348cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20349/* confdefs.h. */
20350_ACEOF
20351cat confdefs.h >>conftest.$ac_ext
20352cat >>conftest.$ac_ext <<_ACEOF
20353/* end confdefs.h. */
c0d27fcc
MR
20354$ac_includes_default
20355#include <$ac_header>
20356_ACEOF
20357rm -f conftest.$ac_objext
20358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20359 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20360 ac_status=$?
edfaf76d
LK
20361 grep -v '^ *+' conftest.er1 >conftest.err
20362 rm -f conftest.er1
20363 cat conftest.err >&5
c0d27fcc
MR
20364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20365 (exit $ac_status); } &&
e143ad11
AS
20366 { ac_try='test -z "$ac_c_werror_flag"
20367 || test ! -s conftest.err'
edfaf76d
LK
20368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20369 (eval $ac_try) 2>&5
20370 ac_status=$?
20371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20372 (exit $ac_status); }; } &&
20373 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20375 (eval $ac_try) 2>&5
20376 ac_status=$?
20377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20378 (exit $ac_status); }; }; then
20379 ac_header_compiler=yes
20380else
20381 echo "$as_me: failed program was:" >&5
19650fd6
AS
20382sed 's/^/| /' conftest.$ac_ext >&5
20383
c0d27fcc
MR
20384ac_header_compiler=no
20385fi
edfaf76d 20386rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20387echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20388echo "${ECHO_T}$ac_header_compiler" >&6
20389
20390# Is the header present?
20391echo "$as_me:$LINENO: checking $ac_header presence" >&5
20392echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20393cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20394/* confdefs.h. */
20395_ACEOF
20396cat confdefs.h >>conftest.$ac_ext
20397cat >>conftest.$ac_ext <<_ACEOF
20398/* end confdefs.h. */
503d2be0
AS
20399#include <$ac_header>
20400_ACEOF
c0d27fcc 20401if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20402 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20403 ac_status=$?
6bae0ccf 20404 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20405 rm -f conftest.er1
20406 cat conftest.err >&5
c0d27fcc 20407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20408 (exit $ac_status); } >/dev/null; then
20409 if test -s conftest.err; then
20410 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20411 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20412 else
20413 ac_cpp_err=
20414 fi
20415else
20416 ac_cpp_err=yes
20417fi
20418if test -z "$ac_cpp_err"; then
c0d27fcc 20419 ac_header_preproc=yes
503d2be0
AS
20420else
20421 echo "$as_me: failed program was:" >&5
19650fd6
AS
20422sed 's/^/| /' conftest.$ac_ext >&5
20423
c0d27fcc 20424 ac_header_preproc=no
a21616bd 20425fi
503d2be0 20426rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20427echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20428echo "${ECHO_T}$ac_header_preproc" >&6
35996d22
AS
20429
20430# So? What about this header?
edfaf76d
LK
20431case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20432 yes:no: )
35996d22
AS
20433 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20434echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20435 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20436echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20437 ac_header_preproc=yes
19650fd6 20438 ;;
edfaf76d 20439 no:yes:* )
c0d27fcc
MR
20440 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20441echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20442 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20443echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20444 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20445echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20446 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20447echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20448 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20449echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20450 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20451echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20452 (
20453 cat <<\_ASBOX
edfaf76d
LK
20454## ------------------------------------------ ##
20455## Report this to the AC_PACKAGE_NAME lists. ##
20456## ------------------------------------------ ##
19650fd6
AS
20457_ASBOX
20458 ) |
20459 sed "s/^/$as_me: WARNING: /" >&2
20460 ;;
c0d27fcc
MR
20461esac
20462echo "$as_me:$LINENO: checking for $ac_header" >&5
20463echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20464if eval "test \"\${$as_ac_Header+set}\" = set"; then
20465 echo $ECHO_N "(cached) $ECHO_C" >&6
20466else
edfaf76d 20467 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20468fi
c0d27fcc 20469echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20470echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20471
20472fi
503d2be0 20473if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20474 cat >>confdefs.h <<_ACEOF
503d2be0 20475#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20476_ACEOF
503d2be0 20477
a21616bd 20478fi
c0d27fcc 20479
a21616bd
KR
20480done
20481
20482fi
c0d27fcc 20483
a21616bd
KR
20484done
20485
20486fi
c0d27fcc 20487
a21616bd
KR
20488done
20489
20490 fi
503d2be0
AS
20491
20492for ac_header in com_err.h
a21616bd 20493do
503d2be0 20494as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20495if eval "test \"\${$as_ac_Header+set}\" = set"; then
20496 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20497echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20498if eval "test \"\${$as_ac_Header+set}\" = set"; then
20499 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20500fi
20501echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20502echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20503else
c0d27fcc
MR
20504 # Is the header compilable?
20505echo "$as_me:$LINENO: checking $ac_header usability" >&5
20506echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20507cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20508/* confdefs.h. */
20509_ACEOF
20510cat confdefs.h >>conftest.$ac_ext
20511cat >>conftest.$ac_ext <<_ACEOF
20512/* end confdefs.h. */
c0d27fcc
MR
20513$ac_includes_default
20514#include <$ac_header>
20515_ACEOF
20516rm -f conftest.$ac_objext
20517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d
LK
20518 (eval $ac_compile) 2>conftest.er1
20519 ac_status=$?
20520 grep -v '^ *+' conftest.er1 >conftest.err
20521 rm -f conftest.er1
20522 cat conftest.err >&5
20523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20524 (exit $ac_status); } &&
e143ad11
AS
20525 { ac_try='test -z "$ac_c_werror_flag"
20526 || test ! -s conftest.err'
edfaf76d
LK
20527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20528 (eval $ac_try) 2>&5
35996d22
AS
20529 ac_status=$?
20530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
20531 (exit $ac_status); }; } &&
20532 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20534 (eval $ac_try) 2>&5
20535 ac_status=$?
20536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20537 (exit $ac_status); }; }; then
20538 ac_header_compiler=yes
20539else
20540 echo "$as_me: failed program was:" >&5
19650fd6
AS
20541sed 's/^/| /' conftest.$ac_ext >&5
20542
c0d27fcc
MR
20543ac_header_compiler=no
20544fi
edfaf76d 20545rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20546echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20547echo "${ECHO_T}$ac_header_compiler" >&6
20548
20549# Is the header present?
20550echo "$as_me:$LINENO: checking $ac_header presence" >&5
20551echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20552cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20553/* confdefs.h. */
20554_ACEOF
20555cat confdefs.h >>conftest.$ac_ext
20556cat >>conftest.$ac_ext <<_ACEOF
20557/* end confdefs.h. */
503d2be0
AS
20558#include <$ac_header>
20559_ACEOF
c0d27fcc 20560if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20561 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20562 ac_status=$?
6bae0ccf 20563 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20564 rm -f conftest.er1
20565 cat conftest.err >&5
c0d27fcc 20566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20567 (exit $ac_status); } >/dev/null; then
20568 if test -s conftest.err; then
20569 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20570 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20571 else
20572 ac_cpp_err=
20573 fi
20574else
20575 ac_cpp_err=yes
20576fi
20577if test -z "$ac_cpp_err"; then
c0d27fcc 20578 ac_header_preproc=yes
503d2be0
AS
20579else
20580 echo "$as_me: failed program was:" >&5
19650fd6
AS
20581sed 's/^/| /' conftest.$ac_ext >&5
20582
c0d27fcc 20583 ac_header_preproc=no
a21616bd 20584fi
503d2be0 20585rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20586echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20587echo "${ECHO_T}$ac_header_preproc" >&6
20588
20589# So? What about this header?
edfaf76d
LK
20590case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20591 yes:no: )
c0d27fcc
MR
20592 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20593echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20594 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20595echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20596 ac_header_preproc=yes
19650fd6 20597 ;;
edfaf76d 20598 no:yes:* )
c0d27fcc
MR
20599 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20600echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20601 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20602echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20603 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20604echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20605 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20606echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20607 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20608echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20609 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20610echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20611 (
20612 cat <<\_ASBOX
edfaf76d
LK
20613## ------------------------------------------ ##
20614## Report this to the AC_PACKAGE_NAME lists. ##
20615## ------------------------------------------ ##
19650fd6
AS
20616_ASBOX
20617 ) |
20618 sed "s/^/$as_me: WARNING: /" >&2
20619 ;;
c0d27fcc
MR
20620esac
20621echo "$as_me:$LINENO: checking for $ac_header" >&5
20622echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20623if eval "test \"\${$as_ac_Header+set}\" = set"; then
20624 echo $ECHO_N "(cached) $ECHO_C" >&6
20625else
edfaf76d 20626 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20627fi
c0d27fcc 20628echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20629echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20630
20631fi
503d2be0 20632if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20633 cat >>confdefs.h <<_ACEOF
503d2be0 20634#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20635_ACEOF
503d2be0 20636
a21616bd 20637fi
c0d27fcc 20638
a21616bd
KR
20639done
20640
20641fi
20642
ba4481b5
DL
20643# Solaris requires -lintl if you want strerror (which calls dgettext)
20644# to return localized messages.
503d2be0 20645
c0d27fcc 20646echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
20647echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
20648if test "${ac_cv_lib_intl_dgettext+set}" = set; then
20649 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20650else
503d2be0 20651 ac_check_lib_save_LIBS=$LIBS
ba4481b5 20652LIBS="-lintl $LIBS"
503d2be0 20653cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20654/* confdefs.h. */
20655_ACEOF
20656cat confdefs.h >>conftest.$ac_ext
20657cat >>conftest.$ac_ext <<_ACEOF
20658/* end confdefs.h. */
503d2be0 20659
ba4481b5 20660/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20661#ifdef __cplusplus
20662extern "C"
20663#endif
ba4481b5 20664/* We use char because int might match the return type of a gcc2
503d2be0
AS
20665 builtin and then its argument prototype would still apply. */
20666char dgettext ();
20667int
20668main ()
20669{
20670dgettext ();
20671 ;
20672 return 0;
20673}
20674_ACEOF
20675rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20676if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 20677 (eval $ac_link) 2>conftest.er1
503d2be0 20678 ac_status=$?
edfaf76d
LK
20679 grep -v '^ *+' conftest.er1 >conftest.err
20680 rm -f conftest.er1
20681 cat conftest.err >&5
c0d27fcc 20682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20683 (exit $ac_status); } &&
e143ad11
AS
20684 { ac_try='test -z "$ac_c_werror_flag"
20685 || test ! -s conftest.err'
edfaf76d
LK
20686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20687 (eval $ac_try) 2>&5
20688 ac_status=$?
20689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20690 (exit $ac_status); }; } &&
20691 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20693 (eval $ac_try) 2>&5
20694 ac_status=$?
c0d27fcc 20695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20696 (exit $ac_status); }; }; then
20697 ac_cv_lib_intl_dgettext=yes
20698else
20699 echo "$as_me: failed program was:" >&5
19650fd6
AS
20700sed 's/^/| /' conftest.$ac_ext >&5
20701
503d2be0
AS
20702ac_cv_lib_intl_dgettext=no
20703fi
edfaf76d
LK
20704rm -f conftest.err conftest.$ac_objext \
20705 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20706LIBS=$ac_check_lib_save_LIBS
20707fi
c0d27fcc 20708echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
20709echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
20710if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 20711 cat >>confdefs.h <<_ACEOF
503d2be0 20712#define HAVE_LIBINTL 1
c0d27fcc 20713_ACEOF
ba4481b5
DL
20714
20715 LIBS="-lintl $LIBS"
20716
ba4481b5
DL
20717fi
20718
c0d27fcc
MR
20719
20720echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
20721echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
20722if test "${emacs_cv_localtime_cache+set}" = set; then
20723 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
20724else
20725 if test x$ac_cv_func_tzset = xyes; then
20726if test "$cross_compiling" = yes; then
20727 # If we have tzset, assume the worst when cross-compiling.
20728emacs_cv_localtime_cache=yes
20729else
503d2be0 20730 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20731/* confdefs.h. */
20732_ACEOF
20733cat confdefs.h >>conftest.$ac_ext
20734cat >>conftest.$ac_ext <<_ACEOF
20735/* end confdefs.h. */
ba4481b5 20736#include <time.h>
ba4481b5
DL
20737extern char **environ;
20738unset_TZ ()
20739{
20740 char **from, **to;
20741 for (to = from = environ; (*to = *from); from++)
20742 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
20743 to++;
20744}
20745char TZ_GMT0[] = "TZ=GMT0";
20746char TZ_PST8[] = "TZ=PST8";
20747main()
20748{
20749 time_t now = time ((time_t *) 0);
20750 int hour_GMT0, hour_unset;
20751 if (putenv (TZ_GMT0) != 0)
20752 exit (1);
20753 hour_GMT0 = localtime (&now)->tm_hour;
20754 unset_TZ ();
20755 hour_unset = localtime (&now)->tm_hour;
20756 if (putenv (TZ_PST8) != 0)
20757 exit (1);
20758 if (localtime (&now)->tm_hour == hour_GMT0)
20759 exit (1);
20760 unset_TZ ();
20761 if (localtime (&now)->tm_hour != hour_unset)
20762 exit (1);
20763 exit (0);
20764}
503d2be0
AS
20765_ACEOF
20766rm -f conftest$ac_exeext
c0d27fcc 20767if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
20768 (eval $ac_link) 2>&5
20769 ac_status=$?
c0d27fcc 20770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20771 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 20772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20773 (eval $ac_try) 2>&5
20774 ac_status=$?
c0d27fcc 20775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20776 (exit $ac_status); }; }; then
ba4481b5
DL
20777 emacs_cv_localtime_cache=no
20778else
503d2be0
AS
20779 echo "$as_me: program exited with status $ac_status" >&5
20780echo "$as_me: failed program was:" >&5
19650fd6
AS
20781sed 's/^/| /' conftest.$ac_ext >&5
20782
c0d27fcc 20783( exit $ac_status )
503d2be0 20784emacs_cv_localtime_cache=yes
ba4481b5 20785fi
edfaf76d 20786rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 20787fi
ba4481b5
DL
20788else
20789 # If we lack tzset, report that localtime does not cache TZ,
20790 # since we can't invalidate the cache if we don't have tzset.
20791 emacs_cv_localtime_cache=no
20792fi
20793fi
c0d27fcc 20794echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 20795echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 20796if test $emacs_cv_localtime_cache = yes; then
b936fae4 20797
c0d27fcc 20798cat >>confdefs.h <<\_ACEOF
ba4481b5 20799#define LOCALTIME_CACHE 1
c0d27fcc 20800_ACEOF
ba4481b5
DL
20801
20802fi
20803
20804if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
20805
20806for ac_func in gettimeofday
48d4b120 20807do
503d2be0 20808as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 20809echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
20810echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20811if eval "test \"\${$as_ac_var+set}\" = set"; then
20812 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 20813else
503d2be0 20814 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20815/* confdefs.h. */
20816_ACEOF
20817cat confdefs.h >>conftest.$ac_ext
20818cat >>conftest.$ac_ext <<_ACEOF
20819/* end confdefs.h. */
edfaf76d
LK
20820/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20821 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20822#define $ac_func innocuous_$ac_func
20823
48d4b120 20824/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20825 which can conflict with char $ac_func (); below.
20826 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20827 <limits.h> exists even on freestanding compilers. */
edfaf76d 20828
19650fd6
AS
20829#ifdef __STDC__
20830# include <limits.h>
20831#else
20832# include <assert.h>
20833#endif
edfaf76d
LK
20834
20835#undef $ac_func
20836
48d4b120 20837/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20838#ifdef __cplusplus
20839extern "C"
19650fd6 20840{
503d2be0 20841#endif
48d4b120 20842/* We use char because int might match the return type of a gcc2
503d2be0
AS
20843 builtin and then its argument prototype would still apply. */
20844char $ac_func ();
48d4b120
DL
20845/* The GNU C library defines this for functions which it implements
20846 to always fail with ENOSYS. Some functions are actually named
20847 something starting with __ and the normal name is an alias. */
20848#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20849choke me
20850#else
19650fd6
AS
20851char (*f) () = $ac_func;
20852#endif
20853#ifdef __cplusplus
20854}
cd958eb3
MB
20855#endif
20856
19650fd6
AS
20857int
20858main ()
20859{
20860return f != $ac_func;
503d2be0
AS
20861 ;
20862 return 0;
20863}
20864_ACEOF
20865rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20866if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 20867 (eval $ac_link) 2>conftest.er1
503d2be0 20868 ac_status=$?
edfaf76d
LK
20869 grep -v '^ *+' conftest.er1 >conftest.err
20870 rm -f conftest.er1
20871 cat conftest.err >&5
c0d27fcc 20872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20873 (exit $ac_status); } &&
e143ad11
AS
20874 { ac_try='test -z "$ac_c_werror_flag"
20875 || test ! -s conftest.err'
edfaf76d
LK
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); }; } &&
20881 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20883 (eval $ac_try) 2>&5
20884 ac_status=$?
c0d27fcc 20885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20886 (exit $ac_status); }; }; then
20887 eval "$as_ac_var=yes"
20888else
20889 echo "$as_me: failed program was:" >&5
19650fd6
AS
20890sed 's/^/| /' conftest.$ac_ext >&5
20891
503d2be0
AS
20892eval "$as_ac_var=no"
20893fi
edfaf76d
LK
20894rm -f conftest.err conftest.$ac_objext \
20895 conftest$ac_exeext conftest.$ac_ext
503d2be0 20896fi
c0d27fcc 20897echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
20898echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20899if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 20900 cat >>confdefs.h <<_ACEOF
503d2be0 20901#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 20902_ACEOF
48d4b120 20903
48d4b120
DL
20904fi
20905done
20906
b936fae4 20907 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 20908 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
20909echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
20910if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
20911 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20912else
503d2be0 20913 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20914/* confdefs.h. */
20915_ACEOF
20916cat confdefs.h >>conftest.$ac_ext
20917cat >>conftest.$ac_ext <<_ACEOF
20918/* end confdefs.h. */
ba4481b5 20919
a3f08d9e
DL
20920#ifdef TIME_WITH_SYS_TIME
20921#include <sys/time.h>
20922#include <time.h>
20923#else
20924#ifdef HAVE_SYS_TIME_H
20925#include <sys/time.h>
20926#else
20927#include <time.h>
20928#endif
20929#endif
503d2be0
AS
20930int
20931main ()
20932{
a3f08d9e 20933struct timeval time;
b936fae4 20934 gettimeofday (&time, 0);
503d2be0
AS
20935 ;
20936 return 0;
20937}
20938_ACEOF
20939rm -f conftest.$ac_objext
c0d27fcc 20940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20941 (eval $ac_compile) 2>conftest.er1
503d2be0 20942 ac_status=$?
edfaf76d
LK
20943 grep -v '^ *+' conftest.er1 >conftest.err
20944 rm -f conftest.er1
20945 cat conftest.err >&5
c0d27fcc 20946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20947 (exit $ac_status); } &&
e143ad11
AS
20948 { ac_try='test -z "$ac_c_werror_flag"
20949 || test ! -s conftest.err'
edfaf76d
LK
20950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20951 (eval $ac_try) 2>&5
20952 ac_status=$?
20953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20954 (exit $ac_status); }; } &&
20955 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20957 (eval $ac_try) 2>&5
20958 ac_status=$?
c0d27fcc 20959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20960 (exit $ac_status); }; }; then
ba4481b5
DL
20961 emacs_cv_gettimeofday_two_arguments=yes
20962else
503d2be0 20963 echo "$as_me: failed program was:" >&5
19650fd6
AS
20964sed 's/^/| /' conftest.$ac_ext >&5
20965
503d2be0 20966emacs_cv_gettimeofday_two_arguments=no
ba4481b5 20967fi
edfaf76d 20968rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 20969fi
c0d27fcc 20970echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 20971echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
20972 if test $emacs_cv_gettimeofday_two_arguments = no; then
20973
c0d27fcc 20974cat >>confdefs.h <<\_ACEOF
ba4481b5 20975#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 20976_ACEOF
ba4481b5 20977
b936fae4 20978 fi
ba4481b5
DL
20979 fi
20980fi
20981
973a76b1
DL
20982# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
20983echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20984echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
20985if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
20986 echo $ECHO_N "(cached) $ECHO_C" >&6
20987else
20988 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20989/* confdefs.h. */
20990_ACEOF
20991cat confdefs.h >>conftest.$ac_ext
20992cat >>conftest.$ac_ext <<_ACEOF
20993/* end confdefs.h. */
973a76b1
DL
20994#include <sys/types.h>
20995#include <$ac_cv_struct_tm>
20996
20997
20998int
20999main ()
21000{
21001static struct tm ac_aggr;
21002if (ac_aggr.tm_zone)
21003return 0;
21004 ;
21005 return 0;
21006}
21007_ACEOF
21008rm -f conftest.$ac_objext
21009if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21010 (eval $ac_compile) 2>conftest.er1
973a76b1 21011 ac_status=$?
edfaf76d
LK
21012 grep -v '^ *+' conftest.er1 >conftest.err
21013 rm -f conftest.er1
21014 cat conftest.err >&5
973a76b1
DL
21015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21016 (exit $ac_status); } &&
e143ad11
AS
21017 { ac_try='test -z "$ac_c_werror_flag"
21018 || test ! -s conftest.err'
edfaf76d
LK
21019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21020 (eval $ac_try) 2>&5
21021 ac_status=$?
21022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21023 (exit $ac_status); }; } &&
21024 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
21025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21026 (eval $ac_try) 2>&5
21027 ac_status=$?
21028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21029 (exit $ac_status); }; }; then
21030 ac_cv_member_struct_tm_tm_zone=yes
21031else
21032 echo "$as_me: failed program was:" >&5
19650fd6
AS
21033sed 's/^/| /' conftest.$ac_ext >&5
21034
973a76b1 21035cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21036/* confdefs.h. */
21037_ACEOF
21038cat confdefs.h >>conftest.$ac_ext
21039cat >>conftest.$ac_ext <<_ACEOF
21040/* end confdefs.h. */
973a76b1
DL
21041#include <sys/types.h>
21042#include <$ac_cv_struct_tm>
21043
21044
21045int
21046main ()
21047{
21048static struct tm ac_aggr;
21049if (sizeof ac_aggr.tm_zone)
21050return 0;
21051 ;
21052 return 0;
21053}
21054_ACEOF
21055rm -f conftest.$ac_objext
21056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21057 (eval $ac_compile) 2>conftest.er1
973a76b1 21058 ac_status=$?
edfaf76d
LK
21059 grep -v '^ *+' conftest.er1 >conftest.err
21060 rm -f conftest.er1
21061 cat conftest.err >&5
973a76b1
DL
21062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21063 (exit $ac_status); } &&
e143ad11
AS
21064 { ac_try='test -z "$ac_c_werror_flag"
21065 || test ! -s conftest.err'
edfaf76d
LK
21066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21067 (eval $ac_try) 2>&5
21068 ac_status=$?
21069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21070 (exit $ac_status); }; } &&
21071 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
21072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21073 (eval $ac_try) 2>&5
21074 ac_status=$?
21075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21076 (exit $ac_status); }; }; then
21077 ac_cv_member_struct_tm_tm_zone=yes
21078else
21079 echo "$as_me: failed program was:" >&5
19650fd6
AS
21080sed 's/^/| /' conftest.$ac_ext >&5
21081
973a76b1
DL
21082ac_cv_member_struct_tm_tm_zone=no
21083fi
edfaf76d 21084rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 21085fi
edfaf76d 21086rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
21087fi
21088echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21089echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
21090if test $ac_cv_member_struct_tm_tm_zone = yes; then
21091
21092cat >>confdefs.h <<_ACEOF
21093#define HAVE_STRUCT_TM_TM_ZONE 1
21094_ACEOF
21095
21096
21097fi
21098
21099if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21100
21101cat >>confdefs.h <<\_ACEOF
21102#define HAVE_TM_ZONE 1
21103_ACEOF
21104
21105else
21106 echo "$as_me:$LINENO: checking for tzname" >&5
21107echo $ECHO_N "checking for tzname... $ECHO_C" >&6
21108if test "${ac_cv_var_tzname+set}" = set; then
21109 echo $ECHO_N "(cached) $ECHO_C" >&6
21110else
21111 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21112/* confdefs.h. */
21113_ACEOF
21114cat confdefs.h >>conftest.$ac_ext
21115cat >>conftest.$ac_ext <<_ACEOF
21116/* end confdefs.h. */
973a76b1
DL
21117#include <time.h>
21118#ifndef tzname /* For SGI. */
21119extern char *tzname[]; /* RS6000 and others reject char **tzname. */
21120#endif
21121
21122int
21123main ()
21124{
21125atoi(*tzname);
21126 ;
21127 return 0;
21128}
21129_ACEOF
21130rm -f conftest.$ac_objext conftest$ac_exeext
21131if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 21132 (eval $ac_link) 2>conftest.er1
973a76b1 21133 ac_status=$?
edfaf76d
LK
21134 grep -v '^ *+' conftest.er1 >conftest.err
21135 rm -f conftest.er1
21136 cat conftest.err >&5
973a76b1
DL
21137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21138 (exit $ac_status); } &&
e143ad11
AS
21139 { ac_try='test -z "$ac_c_werror_flag"
21140 || test ! -s conftest.err'
edfaf76d
LK
21141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21142 (eval $ac_try) 2>&5
21143 ac_status=$?
21144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21145 (exit $ac_status); }; } &&
21146 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
21147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21148 (eval $ac_try) 2>&5
21149 ac_status=$?
21150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21151 (exit $ac_status); }; }; then
21152 ac_cv_var_tzname=yes
21153else
21154 echo "$as_me: failed program was:" >&5
19650fd6
AS
21155sed 's/^/| /' conftest.$ac_ext >&5
21156
973a76b1
DL
21157ac_cv_var_tzname=no
21158fi
edfaf76d
LK
21159rm -f conftest.err conftest.$ac_objext \
21160 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
21161fi
21162echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21163echo "${ECHO_T}$ac_cv_var_tzname" >&6
21164 if test $ac_cv_var_tzname = yes; then
21165
21166cat >>confdefs.h <<\_ACEOF
21167#define HAVE_TZNAME 1
21168_ACEOF
21169
21170 fi
21171fi
21172
21173
48d4b120 21174if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 21175 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
21176echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
21177if test "${emacs_cv_struct_timezone+set}" = set; then
21178 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 21179else
503d2be0 21180 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21181/* confdefs.h. */
21182_ACEOF
21183cat confdefs.h >>conftest.$ac_ext
21184cat >>conftest.$ac_ext <<_ACEOF
21185/* end confdefs.h. */
48d4b120 21186#include <sys/time.h>
503d2be0
AS
21187int
21188main ()
21189{
48d4b120 21190struct timezone tz;
503d2be0
AS
21191 ;
21192 return 0;
21193}
21194_ACEOF
21195rm -f conftest.$ac_objext
c0d27fcc 21196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21197 (eval $ac_compile) 2>conftest.er1
503d2be0 21198 ac_status=$?
edfaf76d
LK
21199 grep -v '^ *+' conftest.er1 >conftest.err
21200 rm -f conftest.er1
21201 cat conftest.err >&5
c0d27fcc 21202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21203 (exit $ac_status); } &&
e143ad11
AS
21204 { ac_try='test -z "$ac_c_werror_flag"
21205 || test ! -s conftest.err'
edfaf76d
LK
21206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21207 (eval $ac_try) 2>&5
21208 ac_status=$?
21209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21210 (exit $ac_status); }; } &&
21211 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21213 (eval $ac_try) 2>&5
21214 ac_status=$?
c0d27fcc 21215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21216 (exit $ac_status); }; }; then
48d4b120
DL
21217 if test "$cross_compiling" = yes; then
21218 emacs_cv_struct_timezone=yes
21219else
503d2be0 21220 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21221/* confdefs.h. */
21222_ACEOF
21223cat confdefs.h >>conftest.$ac_ext
21224cat >>conftest.$ac_ext <<_ACEOF
21225/* end confdefs.h. */
48d4b120
DL
21226
21227#ifdef TIME_WITH_SYS_TIME
21228#include <sys/time.h>
21229#include <time.h>
21230#else
21231#ifdef HAVE_SYS_TIME_H
21232#include <sys/time.h>
21233#else
21234#include <time.h>
21235#endif
21236#endif
21237main () {
21238 struct timeval time;
21239 struct timezone dummy;
21240 exit (gettimeofday (&time, &dummy));
21241}
503d2be0
AS
21242_ACEOF
21243rm -f conftest$ac_exeext
c0d27fcc 21244if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21245 (eval $ac_link) 2>&5
21246 ac_status=$?
c0d27fcc 21247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21248 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21250 (eval $ac_try) 2>&5
21251 ac_status=$?
c0d27fcc 21252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21253 (exit $ac_status); }; }; then
48d4b120
DL
21254 emacs_cv_struct_timezone=yes
21255else
503d2be0
AS
21256 echo "$as_me: program exited with status $ac_status" >&5
21257echo "$as_me: failed program was:" >&5
19650fd6
AS
21258sed 's/^/| /' conftest.$ac_ext >&5
21259
c0d27fcc 21260( exit $ac_status )
503d2be0 21261emacs_cv_struct_timezone=no
48d4b120 21262fi
edfaf76d 21263rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 21264fi
48d4b120 21265else
503d2be0 21266 echo "$as_me: failed program was:" >&5
19650fd6
AS
21267sed 's/^/| /' conftest.$ac_ext >&5
21268
503d2be0 21269emacs_cv_struct_timezone=no
48d4b120 21270fi
edfaf76d 21271rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
48d4b120 21272fi
c0d27fcc 21273echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 21274echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
21275fi
21276
ba4481b5 21277ok_so_far=yes
c0d27fcc 21278echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
21279echo $ECHO_N "checking for socket... $ECHO_C" >&6
21280if test "${ac_cv_func_socket+set}" = set; then
21281 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21282else
503d2be0 21283 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21284/* confdefs.h. */
21285_ACEOF
21286cat confdefs.h >>conftest.$ac_ext
21287cat >>conftest.$ac_ext <<_ACEOF
21288/* end confdefs.h. */
edfaf76d
LK
21289/* Define socket to an innocuous variant, in case <limits.h> declares socket.
21290 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21291#define socket innocuous_socket
21292
ba4481b5 21293/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21294 which can conflict with char socket (); below.
21295 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21296 <limits.h> exists even on freestanding compilers. */
edfaf76d 21297
19650fd6
AS
21298#ifdef __STDC__
21299# include <limits.h>
21300#else
21301# include <assert.h>
21302#endif
edfaf76d
LK
21303
21304#undef socket
21305
ba4481b5 21306/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
21307#ifdef __cplusplus
21308extern "C"
19650fd6 21309{
503d2be0 21310#endif
ba4481b5 21311/* We use char because int might match the return type of a gcc2
503d2be0
AS
21312 builtin and then its argument prototype would still apply. */
21313char socket ();
ba4481b5
DL
21314/* The GNU C library defines this for functions which it implements
21315 to always fail with ENOSYS. Some functions are actually named
21316 something starting with __ and the normal name is an alias. */
21317#if defined (__stub_socket) || defined (__stub___socket)
21318choke me
21319#else
19650fd6
AS
21320char (*f) () = socket;
21321#endif
21322#ifdef __cplusplus
21323}
cd958eb3
MB
21324#endif
21325
19650fd6
AS
21326int
21327main ()
21328{
21329return f != socket;
503d2be0
AS
21330 ;
21331 return 0;
21332}
21333_ACEOF
21334rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 21335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 21336 (eval $ac_link) 2>conftest.er1
503d2be0 21337 ac_status=$?
edfaf76d
LK
21338 grep -v '^ *+' conftest.er1 >conftest.err
21339 rm -f conftest.er1
21340 cat conftest.err >&5
c0d27fcc 21341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21342 (exit $ac_status); } &&
e143ad11
AS
21343 { ac_try='test -z "$ac_c_werror_flag"
21344 || test ! -s conftest.err'
edfaf76d
LK
21345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21346 (eval $ac_try) 2>&5
21347 ac_status=$?
21348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21349 (exit $ac_status); }; } &&
21350 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 21351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21352 (eval $ac_try) 2>&5
21353 ac_status=$?
c0d27fcc 21354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21355 (exit $ac_status); }; }; then
21356 ac_cv_func_socket=yes
21357else
21358 echo "$as_me: failed program was:" >&5
19650fd6
AS
21359sed 's/^/| /' conftest.$ac_ext >&5
21360
503d2be0
AS
21361ac_cv_func_socket=no
21362fi
edfaf76d
LK
21363rm -f conftest.err conftest.$ac_objext \
21364 conftest$ac_exeext conftest.$ac_ext
503d2be0 21365fi
c0d27fcc 21366echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
21367echo "${ECHO_T}$ac_cv_func_socket" >&6
21368if test $ac_cv_func_socket = yes; then
ba4481b5
DL
21369 :
21370else
503d2be0 21371 ok_so_far=no
ba4481b5
DL
21372fi
21373
21374if test $ok_so_far = yes; then
c0d27fcc
MR
21375 if test "${ac_cv_header_netinet_in_h+set}" = set; then
21376 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
21377echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
21378if test "${ac_cv_header_netinet_in_h+set}" = set; then
21379 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
21380fi
21381echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
21382echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 21383else
c0d27fcc
MR
21384 # Is the header compilable?
21385echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
21386echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
21387cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21388/* confdefs.h. */
21389_ACEOF
21390cat confdefs.h >>conftest.$ac_ext
21391cat >>conftest.$ac_ext <<_ACEOF
21392/* end confdefs.h. */
c0d27fcc
MR
21393$ac_includes_default
21394#include <netinet/in.h>
21395_ACEOF
21396rm -f conftest.$ac_objext
21397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21398 (eval $ac_compile) 2>conftest.er1
c0d27fcc 21399 ac_status=$?
edfaf76d
LK
21400 grep -v '^ *+' conftest.er1 >conftest.err
21401 rm -f conftest.er1
21402 cat conftest.err >&5
c0d27fcc
MR
21403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21404 (exit $ac_status); } &&
e143ad11
AS
21405 { ac_try='test -z "$ac_c_werror_flag"
21406 || test ! -s conftest.err'
edfaf76d
LK
21407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21408 (eval $ac_try) 2>&5
21409 ac_status=$?
21410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21411 (exit $ac_status); }; } &&
21412 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
21413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21414 (eval $ac_try) 2>&5
21415 ac_status=$?
21416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21417 (exit $ac_status); }; }; then
21418 ac_header_compiler=yes
21419else
21420 echo "$as_me: failed program was:" >&5
19650fd6
AS
21421sed 's/^/| /' conftest.$ac_ext >&5
21422
c0d27fcc
MR
21423ac_header_compiler=no
21424fi
edfaf76d 21425rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
21426echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21427echo "${ECHO_T}$ac_header_compiler" >&6
21428
21429# Is the header present?
21430echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
21431echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
21432cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21433/* confdefs.h. */
21434_ACEOF
21435cat confdefs.h >>conftest.$ac_ext
21436cat >>conftest.$ac_ext <<_ACEOF
21437/* end confdefs.h. */
ba4481b5 21438#include <netinet/in.h>
503d2be0 21439_ACEOF
c0d27fcc 21440if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21441 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21442 ac_status=$?
6bae0ccf 21443 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21444 rm -f conftest.er1
21445 cat conftest.err >&5
c0d27fcc 21446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21447 (exit $ac_status); } >/dev/null; then
21448 if test -s conftest.err; then
21449 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21450 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21451 else
21452 ac_cpp_err=
21453 fi
21454else
21455 ac_cpp_err=yes
21456fi
21457if test -z "$ac_cpp_err"; then
c0d27fcc 21458 ac_header_preproc=yes
ba4481b5 21459else
503d2be0 21460 echo "$as_me: failed program was:" >&5
19650fd6
AS
21461sed 's/^/| /' conftest.$ac_ext >&5
21462
c0d27fcc 21463 ac_header_preproc=no
ba4481b5 21464fi
503d2be0 21465rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
21466echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21467echo "${ECHO_T}$ac_header_preproc" >&6
21468
21469# So? What about this header?
edfaf76d
LK
21470case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21471 yes:no: )
c0d27fcc
MR
21472 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
21473echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21474 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
21475echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
21476 ac_header_preproc=yes
19650fd6 21477 ;;
edfaf76d 21478 no:yes:* )
c0d27fcc
MR
21479 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
21480echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21481 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
21482echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
21483 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
21484echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
21485 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
21486echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21487 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 21488echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21489 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
21490echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
21491 (
21492 cat <<\_ASBOX
edfaf76d
LK
21493## ------------------------------------------ ##
21494## Report this to the AC_PACKAGE_NAME lists. ##
21495## ------------------------------------------ ##
19650fd6
AS
21496_ASBOX
21497 ) |
21498 sed "s/^/$as_me: WARNING: /" >&2
21499 ;;
c0d27fcc
MR
21500esac
21501echo "$as_me:$LINENO: checking for netinet/in.h" >&5
21502echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
21503if test "${ac_cv_header_netinet_in_h+set}" = set; then
21504 echo $ECHO_N "(cached) $ECHO_C" >&6
21505else
21506 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 21507fi
c0d27fcc 21508echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 21509echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
21510
21511fi
503d2be0 21512if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
21513 :
21514else
503d2be0 21515 ok_so_far=no
ba4481b5
DL
21516fi
21517
c0d27fcc 21518
ba4481b5
DL
21519fi
21520if test $ok_so_far = yes; then
c0d27fcc
MR
21521 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21522 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
21523echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
21524if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21525 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
21526fi
21527echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
21528echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 21529else
c0d27fcc
MR
21530 # Is the header compilable?
21531echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
21532echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
21533cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21534/* confdefs.h. */
21535_ACEOF
21536cat confdefs.h >>conftest.$ac_ext
21537cat >>conftest.$ac_ext <<_ACEOF
21538/* end confdefs.h. */
c0d27fcc
MR
21539$ac_includes_default
21540#include <arpa/inet.h>
21541_ACEOF
21542rm -f conftest.$ac_objext
21543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21544 (eval $ac_compile) 2>conftest.er1
c0d27fcc 21545 ac_status=$?
edfaf76d
LK
21546 grep -v '^ *+' conftest.er1 >conftest.err
21547 rm -f conftest.er1
21548 cat conftest.err >&5
c0d27fcc
MR
21549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21550 (exit $ac_status); } &&
e143ad11
AS
21551 { ac_try='test -z "$ac_c_werror_flag"
21552 || test ! -s conftest.err'
edfaf76d
LK
21553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21554 (eval $ac_try) 2>&5
21555 ac_status=$?
21556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21557 (exit $ac_status); }; } &&
21558 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
21559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21560 (eval $ac_try) 2>&5
21561 ac_status=$?
21562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21563 (exit $ac_status); }; }; then
21564 ac_header_compiler=yes
21565else
21566 echo "$as_me: failed program was:" >&5
19650fd6
AS
21567sed 's/^/| /' conftest.$ac_ext >&5
21568
c0d27fcc
MR
21569ac_header_compiler=no
21570fi
edfaf76d 21571rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
21572echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21573echo "${ECHO_T}$ac_header_compiler" >&6
21574
21575# Is the header present?
21576echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
21577echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
21578cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21579/* confdefs.h. */
21580_ACEOF
21581cat confdefs.h >>conftest.$ac_ext
21582cat >>conftest.$ac_ext <<_ACEOF
21583/* end confdefs.h. */
ba4481b5 21584#include <arpa/inet.h>
503d2be0 21585_ACEOF
c0d27fcc 21586if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21587 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21588 ac_status=$?
6bae0ccf 21589 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21590 rm -f conftest.er1
21591 cat conftest.err >&5
c0d27fcc 21592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21593 (exit $ac_status); } >/dev/null; then
21594 if test -s conftest.err; then
21595 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21596 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21597 else
21598 ac_cpp_err=
21599 fi
21600else
21601 ac_cpp_err=yes
21602fi
21603if test -z "$ac_cpp_err"; then
c0d27fcc 21604 ac_header_preproc=yes
ba4481b5 21605else
503d2be0 21606 echo "$as_me: failed program was:" >&5
19650fd6
AS
21607sed 's/^/| /' conftest.$ac_ext >&5
21608
c0d27fcc 21609 ac_header_preproc=no
ba4481b5 21610fi
503d2be0 21611rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
21612echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21613echo "${ECHO_T}$ac_header_preproc" >&6
21614
21615# So? What about this header?
edfaf76d
LK
21616case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21617 yes:no: )
c0d27fcc
MR
21618 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
21619echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21620 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
21621echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
21622 ac_header_preproc=yes
19650fd6 21623 ;;
edfaf76d 21624 no:yes:* )
c0d27fcc
MR
21625 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
21626echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21627 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
21628echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
21629 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
21630echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
21631 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
21632echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21633 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 21634echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21635 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
21636echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
21637 (
21638 cat <<\_ASBOX
edfaf76d
LK
21639## ------------------------------------------ ##
21640## Report this to the AC_PACKAGE_NAME lists. ##
21641## ------------------------------------------ ##
19650fd6
AS
21642_ASBOX
21643 ) |
21644 sed "s/^/$as_me: WARNING: /" >&2
21645 ;;
c0d27fcc
MR
21646esac
21647echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
21648echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
21649if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21650 echo $ECHO_N "(cached) $ECHO_C" >&6
21651else
21652 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 21653fi
c0d27fcc 21654echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 21655echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
21656
21657fi
503d2be0 21658if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
21659 :
21660else
503d2be0 21661 ok_so_far=no
ba4481b5
DL
21662fi
21663
c0d27fcc 21664
ba4481b5
DL
21665fi
21666if test $ok_so_far = yes; then
b936fae4 21667
c0d27fcc 21668cat >>confdefs.h <<\_ACEOF
ba4481b5 21669#define HAVE_INET_SOCKETS 1
c0d27fcc 21670_ACEOF
ba4481b5
DL
21671
21672fi
21673
2d2b6695 21674
7862d3a8 21675for ac_header in sys/ioctl.h
2d2b6695
KS
21676do
21677as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21678if eval "test \"\${$as_ac_Header+set}\" = set"; then
21679 echo "$as_me:$LINENO: checking for $ac_header" >&5
21680echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21681if eval "test \"\${$as_ac_Header+set}\" = set"; then
21682 echo $ECHO_N "(cached) $ECHO_C" >&6
21683fi
21684echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21685echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21686else
21687 # Is the header compilable?
21688echo "$as_me:$LINENO: checking $ac_header usability" >&5
21689echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
21690cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21691/* confdefs.h. */
21692_ACEOF
21693cat confdefs.h >>conftest.$ac_ext
21694cat >>conftest.$ac_ext <<_ACEOF
21695/* end confdefs.h. */
21696$ac_includes_default
21697#include <$ac_header>
21698_ACEOF
21699rm -f conftest.$ac_objext
21700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21701 (eval $ac_compile) 2>conftest.er1
2d2b6695 21702 ac_status=$?
edfaf76d
LK
21703 grep -v '^ *+' conftest.er1 >conftest.err
21704 rm -f conftest.er1
21705 cat conftest.err >&5
2d2b6695
KS
21706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21707 (exit $ac_status); } &&
e143ad11
AS
21708 { ac_try='test -z "$ac_c_werror_flag"
21709 || test ! -s conftest.err'
edfaf76d
LK
21710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21711 (eval $ac_try) 2>&5
21712 ac_status=$?
21713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21714 (exit $ac_status); }; } &&
21715 { ac_try='test -s conftest.$ac_objext'
2d2b6695
KS
21716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21717 (eval $ac_try) 2>&5
21718 ac_status=$?
21719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21720 (exit $ac_status); }; }; then
21721 ac_header_compiler=yes
21722else
21723 echo "$as_me: failed program was:" >&5
21724sed 's/^/| /' conftest.$ac_ext >&5
21725
21726ac_header_compiler=no
21727fi
edfaf76d 21728rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2d2b6695
KS
21729echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21730echo "${ECHO_T}$ac_header_compiler" >&6
21731
21732# Is the header present?
21733echo "$as_me:$LINENO: checking $ac_header presence" >&5
21734echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21735cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21736/* confdefs.h. */
21737_ACEOF
21738cat confdefs.h >>conftest.$ac_ext
21739cat >>conftest.$ac_ext <<_ACEOF
21740/* end confdefs.h. */
21741#include <$ac_header>
21742_ACEOF
21743if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21744 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21745 ac_status=$?
21746 grep -v '^ *+' conftest.er1 >conftest.err
21747 rm -f conftest.er1
21748 cat conftest.err >&5
21749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21750 (exit $ac_status); } >/dev/null; then
21751 if test -s conftest.err; then
21752 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21753 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2d2b6695
KS
21754 else
21755 ac_cpp_err=
21756 fi
21757else
21758 ac_cpp_err=yes
21759fi
21760if test -z "$ac_cpp_err"; then
21761 ac_header_preproc=yes
21762else
21763 echo "$as_me: failed program was:" >&5
21764sed 's/^/| /' conftest.$ac_ext >&5
21765
21766 ac_header_preproc=no
21767fi
21768rm -f conftest.err conftest.$ac_ext
21769echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21770echo "${ECHO_T}$ac_header_preproc" >&6
21771
21772# So? What about this header?
edfaf76d
LK
21773case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21774 yes:no: )
2d2b6695
KS
21775 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21776echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21777 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21778echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21779 ac_header_preproc=yes
2d2b6695 21780 ;;
edfaf76d 21781 no:yes:* )
2d2b6695
KS
21782 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21783echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21784 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21785echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21786 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21787echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21788 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21789echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
21790 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21791echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21792 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21793echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
2d2b6695
KS
21794 (
21795 cat <<\_ASBOX
edfaf76d
LK
21796## ------------------------------------------ ##
21797## Report this to the AC_PACKAGE_NAME lists. ##
21798## ------------------------------------------ ##
2d2b6695
KS
21799_ASBOX
21800 ) |
21801 sed "s/^/$as_me: WARNING: /" >&2
21802 ;;
21803esac
21804echo "$as_me:$LINENO: checking for $ac_header" >&5
21805echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21806if eval "test \"\${$as_ac_Header+set}\" = set"; then
21807 echo $ECHO_N "(cached) $ECHO_C" >&6
21808else
edfaf76d 21809 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695
KS
21810fi
21811echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21812echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21813
21814fi
21815if test `eval echo '${'$as_ac_Header'}'` = yes; then
21816 cat >>confdefs.h <<_ACEOF
21817#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21818_ACEOF
21819
21820fi
21821
21822done
21823
21824
ba4481b5 21825if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 21826
c0d27fcc 21827cat >>confdefs.h <<\_ACEOF
ba4481b5 21828#define HAVE_AIX_SMT_EXP 1
c0d27fcc 21829_ACEOF
ba4481b5
DL
21830
21831fi
21832
c0d27fcc 21833echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 21834echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 21835if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 21836 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 21837echo "${ECHO_T}yes" >&6
b936fae4 21838
c0d27fcc 21839cat >>confdefs.h <<\_ACEOF
3d9fec71 21840#define HAVE_DEV_PTMX 1
c0d27fcc 21841_ACEOF
3d9fec71
DL
21842
21843else
c0d27fcc 21844 echo "$as_me:$LINENO: result: no" >&5
503d2be0 21845echo "${ECHO_T}no" >&6
3d9fec71
DL
21846fi
21847
c0d27fcc 21848echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
21849echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21850if test "${ac_cv_type_pid_t+set}" = set; then
21851 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 21852else
503d2be0 21853 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21854/* confdefs.h. */
21855_ACEOF
21856cat confdefs.h >>conftest.$ac_ext
21857cat >>conftest.$ac_ext <<_ACEOF
21858/* end confdefs.h. */
503d2be0
AS
21859$ac_includes_default
21860int
21861main ()
21862{
21863if ((pid_t *) 0)
21864 return 0;
21865if (sizeof (pid_t))
21866 return 0;
21867 ;
21868 return 0;
21869}
21870_ACEOF
21871rm -f conftest.$ac_objext
c0d27fcc 21872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21873 (eval $ac_compile) 2>conftest.er1
503d2be0 21874 ac_status=$?
edfaf76d
LK
21875 grep -v '^ *+' conftest.er1 >conftest.err
21876 rm -f conftest.er1
21877 cat conftest.err >&5
c0d27fcc 21878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21879 (exit $ac_status); } &&
e143ad11
AS
21880 { ac_try='test -z "$ac_c_werror_flag"
21881 || test ! -s conftest.err'
edfaf76d
LK
21882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21883 (eval $ac_try) 2>&5
21884 ac_status=$?
21885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21886 (exit $ac_status); }; } &&
21887 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21889 (eval $ac_try) 2>&5
21890 ac_status=$?
c0d27fcc 21891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21892 (exit $ac_status); }; }; then
647847ea
DL
21893 ac_cv_type_pid_t=yes
21894else
503d2be0 21895 echo "$as_me: failed program was:" >&5
19650fd6
AS
21896sed 's/^/| /' conftest.$ac_ext >&5
21897
503d2be0 21898ac_cv_type_pid_t=no
647847ea 21899fi
edfaf76d 21900rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 21901fi
c0d27fcc 21902echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
21903echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21904if test $ac_cv_type_pid_t = yes; then
21905 :
21906else
21907
c0d27fcc 21908cat >>confdefs.h <<_ACEOF
647847ea 21909#define pid_t int
c0d27fcc 21910_ACEOF
647847ea
DL
21911
21912fi
21913
c0d27fcc
MR
21914
21915
503d2be0
AS
21916for ac_header in unistd.h vfork.h
21917do
21918as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
21919if eval "test \"\${$as_ac_Header+set}\" = set"; then
21920 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
21921echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21922if eval "test \"\${$as_ac_Header+set}\" = set"; then
21923 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
21924fi
21925echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21926echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 21927else
c0d27fcc
MR
21928 # Is the header compilable?
21929echo "$as_me:$LINENO: checking $ac_header usability" >&5
21930echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
21931cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21932/* confdefs.h. */
21933_ACEOF
21934cat confdefs.h >>conftest.$ac_ext
21935cat >>conftest.$ac_ext <<_ACEOF
21936/* end confdefs.h. */
c0d27fcc
MR
21937$ac_includes_default
21938#include <$ac_header>
21939_ACEOF
21940rm -f conftest.$ac_objext
21941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21942 (eval $ac_compile) 2>conftest.er1
c0d27fcc 21943 ac_status=$?
edfaf76d
LK
21944 grep -v '^ *+' conftest.er1 >conftest.err
21945 rm -f conftest.er1
21946 cat conftest.err >&5
c0d27fcc
MR
21947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21948 (exit $ac_status); } &&
e143ad11
AS
21949 { ac_try='test -z "$ac_c_werror_flag"
21950 || test ! -s conftest.err'
edfaf76d
LK
21951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21952 (eval $ac_try) 2>&5
21953 ac_status=$?
21954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21955 (exit $ac_status); }; } &&
21956 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
21957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21958 (eval $ac_try) 2>&5
21959 ac_status=$?
21960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21961 (exit $ac_status); }; }; then
21962 ac_header_compiler=yes
21963else
21964 echo "$as_me: failed program was:" >&5
19650fd6
AS
21965sed 's/^/| /' conftest.$ac_ext >&5
21966
c0d27fcc
MR
21967ac_header_compiler=no
21968fi
edfaf76d 21969rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
21970echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21971echo "${ECHO_T}$ac_header_compiler" >&6
21972
21973# Is the header present?
21974echo "$as_me:$LINENO: checking $ac_header presence" >&5
21975echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21976cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21977/* confdefs.h. */
21978_ACEOF
21979cat confdefs.h >>conftest.$ac_ext
21980cat >>conftest.$ac_ext <<_ACEOF
21981/* end confdefs.h. */
503d2be0
AS
21982#include <$ac_header>
21983_ACEOF
c0d27fcc 21984if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21985 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21986 ac_status=$?
6bae0ccf 21987 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21988 rm -f conftest.er1
21989 cat conftest.err >&5
c0d27fcc 21990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21991 (exit $ac_status); } >/dev/null; then
21992 if test -s conftest.err; then
21993 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21994 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21995 else
21996 ac_cpp_err=
21997 fi
647847ea 21998else
503d2be0
AS
21999 ac_cpp_err=yes
22000fi
22001if test -z "$ac_cpp_err"; then
c0d27fcc 22002 ac_header_preproc=yes
647847ea 22003else
503d2be0 22004 echo "$as_me: failed program was:" >&5
19650fd6
AS
22005sed 's/^/| /' conftest.$ac_ext >&5
22006
c0d27fcc 22007 ac_header_preproc=no
647847ea 22008fi
503d2be0 22009rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
22010echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22011echo "${ECHO_T}$ac_header_preproc" >&6
22012
22013# So? What about this header?
edfaf76d
LK
22014case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22015 yes:no: )
c0d27fcc
MR
22016 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22017echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22018 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22019echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22020 ac_header_preproc=yes
19650fd6 22021 ;;
edfaf76d 22022 no:yes:* )
c0d27fcc
MR
22023 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22024echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22025 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22026echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22027 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22028echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22029 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22030echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22031 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22032echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22033 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22034echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
22035 (
22036 cat <<\_ASBOX
edfaf76d
LK
22037## ------------------------------------------ ##
22038## Report this to the AC_PACKAGE_NAME lists. ##
22039## ------------------------------------------ ##
19650fd6
AS
22040_ASBOX
22041 ) |
22042 sed "s/^/$as_me: WARNING: /" >&2
22043 ;;
c0d27fcc
MR
22044esac
22045echo "$as_me:$LINENO: checking for $ac_header" >&5
22046echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22047if eval "test \"\${$as_ac_Header+set}\" = set"; then
22048 echo $ECHO_N "(cached) $ECHO_C" >&6
22049else
edfaf76d 22050 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 22051fi
c0d27fcc 22052echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 22053echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
22054
22055fi
503d2be0 22056if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22057 cat >>confdefs.h <<_ACEOF
503d2be0 22058#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22059_ACEOF
647847ea 22060
73b77ee5 22061fi
c0d27fcc 22062
503d2be0 22063done
73b77ee5 22064
c0d27fcc
MR
22065
22066
503d2be0
AS
22067for ac_func in fork vfork
22068do
22069as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 22070echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
22071echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22072if eval "test \"\${$as_ac_var+set}\" = set"; then
22073 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22074else
503d2be0 22075 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22076/* confdefs.h. */
22077_ACEOF
22078cat confdefs.h >>conftest.$ac_ext
22079cat >>conftest.$ac_ext <<_ACEOF
22080/* end confdefs.h. */
edfaf76d
LK
22081/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22082 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22083#define $ac_func innocuous_$ac_func
22084
fa0b693c 22085/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22086 which can conflict with char $ac_func (); below.
22087 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22088 <limits.h> exists even on freestanding compilers. */
edfaf76d 22089
19650fd6
AS
22090#ifdef __STDC__
22091# include <limits.h>
22092#else
22093# include <assert.h>
22094#endif
edfaf76d
LK
22095
22096#undef $ac_func
22097
fa0b693c 22098/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
22099#ifdef __cplusplus
22100extern "C"
19650fd6 22101{
503d2be0 22102#endif
fa0b693c 22103/* We use char because int might match the return type of a gcc2
503d2be0
AS
22104 builtin and then its argument prototype would still apply. */
22105char $ac_func ();
fa0b693c
GM
22106/* The GNU C library defines this for functions which it implements
22107 to always fail with ENOSYS. Some functions are actually named
22108 something starting with __ and the normal name is an alias. */
503d2be0 22109#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
22110choke me
22111#else
19650fd6
AS
22112char (*f) () = $ac_func;
22113#endif
22114#ifdef __cplusplus
22115}
fa0b693c
GM
22116#endif
22117
19650fd6
AS
22118int
22119main ()
22120{
22121return f != $ac_func;
503d2be0
AS
22122 ;
22123 return 0;
22124}
22125_ACEOF
22126rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 22127if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 22128 (eval $ac_link) 2>conftest.er1
503d2be0 22129 ac_status=$?
edfaf76d
LK
22130 grep -v '^ *+' conftest.er1 >conftest.err
22131 rm -f conftest.er1
22132 cat conftest.err >&5
c0d27fcc 22133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22134 (exit $ac_status); } &&
e143ad11
AS
22135 { ac_try='test -z "$ac_c_werror_flag"
22136 || test ! -s conftest.err'
edfaf76d
LK
22137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22138 (eval $ac_try) 2>&5
22139 ac_status=$?
22140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22141 (exit $ac_status); }; } &&
22142 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 22143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22144 (eval $ac_try) 2>&5
22145 ac_status=$?
c0d27fcc 22146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22147 (exit $ac_status); }; }; then
22148 eval "$as_ac_var=yes"
22149else
22150 echo "$as_me: failed program was:" >&5
19650fd6
AS
22151sed 's/^/| /' conftest.$ac_ext >&5
22152
503d2be0
AS
22153eval "$as_ac_var=no"
22154fi
edfaf76d
LK
22155rm -f conftest.err conftest.$ac_objext \
22156 conftest$ac_exeext conftest.$ac_ext
503d2be0 22157fi
c0d27fcc 22158echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
22159echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22160if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22161 cat >>confdefs.h <<_ACEOF
503d2be0 22162#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22163_ACEOF
503d2be0 22164
fa0b693c 22165fi
503d2be0 22166done
fa0b693c 22167
503d2be0 22168if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 22169 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
22170echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22171if test "${ac_cv_func_fork_works+set}" = set; then
22172 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22173else
503d2be0
AS
22174 if test "$cross_compiling" = yes; then
22175 ac_cv_func_fork_works=cross
22176else
22177 cat >conftest.$ac_ext <<_ACEOF
01abe918
CY
22178/* By Ruediger Kuhlmann. */
22179 #include <sys/types.h>
22180 #if HAVE_UNISTD_H
22181 # include <unistd.h>
22182 #endif
22183 /* Some systems only have a dummy stub for fork() */
22184 int main ()
22185 {
22186 if (fork() < 0)
22187 exit (1);
22188 exit (0);
22189 }
503d2be0
AS
22190_ACEOF
22191rm -f conftest$ac_exeext
c0d27fcc 22192if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
22193 (eval $ac_link) 2>&5
22194 ac_status=$?
c0d27fcc 22195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22196 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 22197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22198 (eval $ac_try) 2>&5
22199 ac_status=$?
c0d27fcc 22200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22201 (exit $ac_status); }; }; then
22202 ac_cv_func_fork_works=yes
22203else
22204 echo "$as_me: program exited with status $ac_status" >&5
22205echo "$as_me: failed program was:" >&5
19650fd6
AS
22206sed 's/^/| /' conftest.$ac_ext >&5
22207
c0d27fcc 22208( exit $ac_status )
503d2be0
AS
22209ac_cv_func_fork_works=no
22210fi
edfaf76d 22211rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
22212fi
22213fi
c0d27fcc 22214echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
22215echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22216
6bae0ccf
DL
22217else
22218 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
22219fi
22220if test "x$ac_cv_func_fork_works" = xcross; then
22221 case $host in
22222 *-*-amigaos* | *-*-msdosdjgpp*)
22223 # Override, as these systems have only a dummy fork() stub
22224 ac_cv_func_fork_works=no
22225 ;;
22226 *)
22227 ac_cv_func_fork_works=yes
22228 ;;
22229 esac
c0d27fcc
MR
22230 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
22231echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 22232fi
73b77ee5 22233ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 22234if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 22235 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
22236echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22237if test "${ac_cv_func_vfork_works+set}" = set; then
22238 echo $ECHO_N "(cached) $ECHO_C" >&6
22239else
22240 if test "$cross_compiling" = yes; then
22241 ac_cv_func_vfork_works=cross
fa0b693c 22242else
503d2be0 22243 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22244/* confdefs.h. */
22245_ACEOF
22246cat confdefs.h >>conftest.$ac_ext
22247cat >>conftest.$ac_ext <<_ACEOF
22248/* end confdefs.h. */
73b77ee5
GM
22249/* Thanks to Paul Eggert for this test. */
22250#include <stdio.h>
19650fd6 22251#include <stdlib.h>
fa0b693c 22252#include <sys/types.h>
73b77ee5 22253#include <sys/stat.h>
19650fd6 22254#include <sys/wait.h>
503d2be0
AS
22255#if HAVE_UNISTD_H
22256# include <unistd.h>
73b77ee5 22257#endif
503d2be0
AS
22258#if HAVE_VFORK_H
22259# include <vfork.h>
73b77ee5
GM
22260#endif
22261/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
22262 argument registers are propagated back to the parent. The compiler
22263 is told about this with #include <vfork.h>, but some compilers
22264 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
22265 static variable whose address is put into a register that is
22266 clobbered by the vfork. */
19650fd6 22267static void
fa0b693c 22268#ifdef __cplusplus
73b77ee5 22269sparc_address_test (int arg)
503d2be0 22270# else
73b77ee5 22271sparc_address_test (arg) int arg;
fa0b693c 22272#endif
fa0b693c 22273{
73b77ee5
GM
22274 static pid_t child;
22275 if (!child) {
22276 child = vfork ();
22277 if (child < 0) {
22278 perror ("vfork");
22279 _exit(2);
22280 }
22281 if (!child) {
22282 arg = getpid();
22283 write(-1, "", 0);
22284 _exit (arg);
22285 }
22286 }
22287}
503d2be0
AS
22288
22289int
22290main ()
22291{
73b77ee5
GM
22292 pid_t parent = getpid ();
22293 pid_t child;
fa0b693c 22294
19650fd6 22295 sparc_address_test (0);
fa0b693c 22296
73b77ee5 22297 child = vfork ();
fa0b693c 22298
73b77ee5 22299 if (child == 0) {
503d2be0
AS
22300 /* Here is another test for sparc vfork register problems. This
22301 test uses lots of local variables, at least as many local
22302 variables as main has allocated so far including compiler
22303 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
22304 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
22305 reuse the register of parent for one of the local variables,
22306 since it will think that parent can't possibly be used any more
22307 in this routine. Assigning to the local variable will thus
22308 munge parent in the parent process. */
73b77ee5
GM
22309 pid_t
22310 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22311 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22312 /* Convince the compiler that p..p7 are live; otherwise, it might
22313 use the same hardware register for all 8 local variables. */
22314 if (p != p1 || p != p2 || p != p3 || p != p4
22315 || p != p5 || p != p6 || p != p7)
22316 _exit(1);
fa0b693c 22317
503d2be0
AS
22318 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22319 from child file descriptors. If the child closes a descriptor
22320 before it execs or exits, this munges the parent's descriptor
22321 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
22322 _exit(close(fileno(stdout)) != 0);
22323 } else {
22324 int status;
22325 struct stat st;
22326
22327 while (wait(&status) != child)
22328 ;
22329 exit(
22330 /* Was there some problem with vforking? */
22331 child < 0
22332
22333 /* Did the child fail? (This shouldn't happen.) */
22334 || status
22335
22336 /* Did the vfork/compiler bug occur? */
22337 || parent != getpid()
fa0b693c 22338
73b77ee5
GM
22339 /* Did the file descriptor bug occur? */
22340 || fstat(fileno(stdout), &st) != 0
22341 );
22342 }
22343}
503d2be0
AS
22344_ACEOF
22345rm -f conftest$ac_exeext
c0d27fcc 22346if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
22347 (eval $ac_link) 2>&5
22348 ac_status=$?
c0d27fcc 22349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22350 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 22351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22352 (eval $ac_try) 2>&5
22353 ac_status=$?
c0d27fcc 22354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22355 (exit $ac_status); }; }; then
73b77ee5 22356 ac_cv_func_vfork_works=yes
fa0b693c 22357else
503d2be0
AS
22358 echo "$as_me: program exited with status $ac_status" >&5
22359echo "$as_me: failed program was:" >&5
19650fd6
AS
22360sed 's/^/| /' conftest.$ac_ext >&5
22361
c0d27fcc 22362( exit $ac_status )
503d2be0
AS
22363ac_cv_func_vfork_works=no
22364fi
edfaf76d 22365rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 22366fi
fa0b693c 22367fi
c0d27fcc 22368echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 22369echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 22370
503d2be0
AS
22371fi;
22372if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 22373 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
22374 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
22375echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
22376fi
22377
503d2be0
AS
22378if test "x$ac_cv_func_vfork_works" = xyes; then
22379
c0d27fcc 22380cat >>confdefs.h <<\_ACEOF
503d2be0 22381#define HAVE_WORKING_VFORK 1
c0d27fcc 22382_ACEOF
503d2be0
AS
22383
22384else
22385
c0d27fcc 22386cat >>confdefs.h <<\_ACEOF
73b77ee5 22387#define vfork fork
c0d27fcc 22388_ACEOF
fa0b693c
GM
22389
22390fi
503d2be0
AS
22391if test "x$ac_cv_func_fork_works" = xyes; then
22392
c0d27fcc 22393cat >>confdefs.h <<\_ACEOF
503d2be0 22394#define HAVE_WORKING_FORK 1
c0d27fcc 22395_ACEOF
fa0b693c 22396
503d2be0 22397fi
647847ea 22398
c0d27fcc 22399
6a3a24fa
JD
22400echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
22401echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
22402if test "${emacs_cv_langinfo_codeset+set}" = set; then
22403 echo $ECHO_N "(cached) $ECHO_C" >&6
22404else
22405 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22406/* confdefs.h. */
22407_ACEOF
22408cat confdefs.h >>conftest.$ac_ext
22409cat >>conftest.$ac_ext <<_ACEOF
22410/* end confdefs.h. */
6a3a24fa
JD
22411#include <langinfo.h>
22412int
22413main ()
22414{
22415char* cs = nl_langinfo(CODESET);
22416 ;
22417 return 0;
22418}
22419_ACEOF
22420rm -f conftest.$ac_objext conftest$ac_exeext
22421if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 22422 (eval $ac_link) 2>conftest.er1
6a3a24fa 22423 ac_status=$?
edfaf76d
LK
22424 grep -v '^ *+' conftest.er1 >conftest.err
22425 rm -f conftest.er1
22426 cat conftest.err >&5
6a3a24fa
JD
22427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22428 (exit $ac_status); } &&
e143ad11
AS
22429 { ac_try='test -z "$ac_c_werror_flag"
22430 || test ! -s conftest.err'
edfaf76d
LK
22431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22432 (eval $ac_try) 2>&5
22433 ac_status=$?
22434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22435 (exit $ac_status); }; } &&
22436 { ac_try='test -s conftest$ac_exeext'
6a3a24fa
JD
22437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22438 (eval $ac_try) 2>&5
22439 ac_status=$?
22440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22441 (exit $ac_status); }; }; then
22442 emacs_cv_langinfo_codeset=yes
22443else
22444 echo "$as_me: failed program was:" >&5
19650fd6
AS
22445sed 's/^/| /' conftest.$ac_ext >&5
22446
6a3a24fa
JD
22447emacs_cv_langinfo_codeset=no
22448fi
edfaf76d
LK
22449rm -f conftest.err conftest.$ac_objext \
22450 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
22451
22452fi
22453echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
22454echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
22455if test $emacs_cv_langinfo_codeset = yes; then
22456
22457cat >>confdefs.h <<\_ACEOF
22458#define HAVE_LANGINFO_CODESET 1
22459_ACEOF
22460
22461fi
22462
c0d27fcc 22463echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
22464echo $ECHO_N "checking for size_t... $ECHO_C" >&6
22465if test "${ac_cv_type_size_t+set}" = set; then
22466 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 22467else
503d2be0 22468 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22469/* confdefs.h. */
22470_ACEOF
22471cat confdefs.h >>conftest.$ac_ext
22472cat >>conftest.$ac_ext <<_ACEOF
22473/* end confdefs.h. */
503d2be0
AS
22474$ac_includes_default
22475int
22476main ()
22477{
22478if ((size_t *) 0)
22479 return 0;
22480if (sizeof (size_t))
22481 return 0;
22482 ;
22483 return 0;
22484}
22485_ACEOF
22486rm -f conftest.$ac_objext
c0d27fcc 22487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22488 (eval $ac_compile) 2>conftest.er1
503d2be0 22489 ac_status=$?
edfaf76d
LK
22490 grep -v '^ *+' conftest.er1 >conftest.err
22491 rm -f conftest.er1
22492 cat conftest.err >&5
c0d27fcc 22493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22494 (exit $ac_status); } &&
e143ad11
AS
22495 { ac_try='test -z "$ac_c_werror_flag"
22496 || test ! -s conftest.err'
edfaf76d
LK
22497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22498 (eval $ac_try) 2>&5
22499 ac_status=$?
22500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22501 (exit $ac_status); }; } &&
22502 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 22503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22504 (eval $ac_try) 2>&5
22505 ac_status=$?
c0d27fcc 22506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22507 (exit $ac_status); }; }; then
8730a8da
DL
22508 ac_cv_type_size_t=yes
22509else
503d2be0 22510 echo "$as_me: failed program was:" >&5
19650fd6
AS
22511sed 's/^/| /' conftest.$ac_ext >&5
22512
503d2be0 22513ac_cv_type_size_t=no
8730a8da 22514fi
edfaf76d 22515rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 22516fi
c0d27fcc 22517echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
22518echo "${ECHO_T}$ac_cv_type_size_t" >&6
22519if test $ac_cv_type_size_t = yes; then
503d2be0 22520
c0d27fcc
MR
22521cat >>confdefs.h <<_ACEOF
22522#define HAVE_SIZE_T 1
22523_ACEOF
22524
8730a8da
DL
22525
22526fi
22527
c0d27fcc 22528
973a76b1
DL
22529echo "$as_me:$LINENO: checking for mbstate_t" >&5
22530echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
22531if test "${ac_cv_type_mbstate_t+set}" = set; then
22532 echo $ECHO_N "(cached) $ECHO_C" >&6
22533else
22534 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22535/* confdefs.h. */
22536_ACEOF
22537cat confdefs.h >>conftest.$ac_ext
22538cat >>conftest.$ac_ext <<_ACEOF
22539/* end confdefs.h. */
973a76b1
DL
22540$ac_includes_default
22541# include <wchar.h>
22542int
22543main ()
22544{
22545mbstate_t x; return sizeof x;
22546 ;
22547 return 0;
22548}
22549_ACEOF
22550rm -f conftest.$ac_objext
22551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22552 (eval $ac_compile) 2>conftest.er1
973a76b1 22553 ac_status=$?
edfaf76d
LK
22554 grep -v '^ *+' conftest.er1 >conftest.err
22555 rm -f conftest.er1
22556 cat conftest.err >&5
973a76b1
DL
22557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22558 (exit $ac_status); } &&
e143ad11
AS
22559 { ac_try='test -z "$ac_c_werror_flag"
22560 || test ! -s conftest.err'
edfaf76d
LK
22561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22562 (eval $ac_try) 2>&5
22563 ac_status=$?
22564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22565 (exit $ac_status); }; } &&
22566 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
22567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22568 (eval $ac_try) 2>&5
22569 ac_status=$?
22570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22571 (exit $ac_status); }; }; then
22572 ac_cv_type_mbstate_t=yes
22573else
22574 echo "$as_me: failed program was:" >&5
19650fd6
AS
22575sed 's/^/| /' conftest.$ac_ext >&5
22576
973a76b1
DL
22577ac_cv_type_mbstate_t=no
22578fi
edfaf76d 22579rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
22580fi
22581echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
22582echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
22583 if test $ac_cv_type_mbstate_t = yes; then
22584
22585cat >>confdefs.h <<\_ACEOF
22586#define HAVE_MBSTATE_T 1
22587_ACEOF
22588
22589 else
22590
22591cat >>confdefs.h <<\_ACEOF
22592#define mbstate_t int
22593_ACEOF
22594
22595 fi
22596
22044edf
DL
22597echo "$as_me:$LINENO: checking for C restrict keyword" >&5
22598echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
22599if test "${emacs_cv_c_restrict+set}" = set; then
22600 echo $ECHO_N "(cached) $ECHO_C" >&6
22601else
22602 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22603/* confdefs.h. */
22604_ACEOF
22605cat confdefs.h >>conftest.$ac_ext
22606cat >>conftest.$ac_ext <<_ACEOF
22607/* end confdefs.h. */
22044edf
DL
22608void fred (int *restrict x);
22609int
22610main ()
22611{
b936fae4 22612
22044edf
DL
22613 ;
22614 return 0;
22615}
c0d27fcc 22616_ACEOF
22044edf
DL
22617rm -f conftest.$ac_objext
22618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22619 (eval $ac_compile) 2>conftest.er1
22044edf 22620 ac_status=$?
edfaf76d
LK
22621 grep -v '^ *+' conftest.er1 >conftest.err
22622 rm -f conftest.er1
22623 cat conftest.err >&5
22044edf
DL
22624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22625 (exit $ac_status); } &&
e143ad11
AS
22626 { ac_try='test -z "$ac_c_werror_flag"
22627 || test ! -s conftest.err'
edfaf76d
LK
22628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22629 (eval $ac_try) 2>&5
22630 ac_status=$?
22631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22632 (exit $ac_status); }; } &&
22633 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
22634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22635 (eval $ac_try) 2>&5
22636 ac_status=$?
22637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22638 (exit $ac_status); }; }; then
22639 emacs_cv_c_restrict=yes
22640else
22641 echo "$as_me: failed program was:" >&5
19650fd6
AS
22642sed 's/^/| /' conftest.$ac_ext >&5
22643
22044edf 22644cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22645/* confdefs.h. */
22646_ACEOF
22647cat confdefs.h >>conftest.$ac_ext
22648cat >>conftest.$ac_ext <<_ACEOF
22649/* end confdefs.h. */
22044edf
DL
22650void fred (int *__restrict x);
22651int
22652main ()
22653{
c0d27fcc 22654
22044edf
DL
22655 ;
22656 return 0;
22657}
c0d27fcc 22658_ACEOF
22044edf
DL
22659rm -f conftest.$ac_objext
22660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22661 (eval $ac_compile) 2>conftest.er1
22044edf 22662 ac_status=$?
edfaf76d
LK
22663 grep -v '^ *+' conftest.er1 >conftest.err
22664 rm -f conftest.er1
22665 cat conftest.err >&5
22044edf
DL
22666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22667 (exit $ac_status); } &&
e143ad11
AS
22668 { ac_try='test -z "$ac_c_werror_flag"
22669 || test ! -s conftest.err'
edfaf76d
LK
22670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22671 (eval $ac_try) 2>&5
22672 ac_status=$?
22673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22674 (exit $ac_status); }; } &&
22675 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
22676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22677 (eval $ac_try) 2>&5
22678 ac_status=$?
22679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22680 (exit $ac_status); }; }; then
22681 emacs_cv_c_restrict=__restrict
22682else
22683 echo "$as_me: failed program was:" >&5
19650fd6
AS
22684sed 's/^/| /' conftest.$ac_ext >&5
22685
22044edf 22686emacs_cv_c_restrict=no
ba4481b5 22687fi
edfaf76d 22688rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22689fi
edfaf76d 22690rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22691fi
22044edf
DL
22692echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
22693echo "${ECHO_T}$emacs_cv_c_restrict" >&6
22694case "$emacs_cv_c_restrict" in
22695 yes) emacs_restrict=restrict;;
22696 no) emacs_restrict="";;
22697 *) emacs_restrict="$emacs_cv_c_restrict";;
22698esac
22699if test "$emacs_restrict" != __restrict; then
b936fae4 22700
22044edf
DL
22701cat >>confdefs.h <<_ACEOF
22702#define __restrict $emacs_restrict
c0d27fcc 22703_ACEOF
ba4481b5
DL
22704
22705fi
ba4481b5 22706
22044edf
DL
22707echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
22708echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
22709if test "${emacs_cv_c_restrict_arr+set}" = set; then
22710 echo $ECHO_N "(cached) $ECHO_C" >&6
22711else
22712 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22713/* confdefs.h. */
22714_ACEOF
22715cat confdefs.h >>conftest.$ac_ext
22716cat >>conftest.$ac_ext <<_ACEOF
22717/* end confdefs.h. */
22044edf
DL
22718void fred (int x[__restrict]);
22719int
22720main ()
22721{
b936fae4 22722
22044edf
DL
22723 ;
22724 return 0;
22725}
c0d27fcc 22726_ACEOF
22044edf
DL
22727rm -f conftest.$ac_objext
22728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22729 (eval $ac_compile) 2>conftest.er1
22044edf 22730 ac_status=$?
edfaf76d
LK
22731 grep -v '^ *+' conftest.er1 >conftest.err
22732 rm -f conftest.er1
22733 cat conftest.err >&5
22044edf
DL
22734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22735 (exit $ac_status); } &&
e143ad11
AS
22736 { ac_try='test -z "$ac_c_werror_flag"
22737 || test ! -s conftest.err'
edfaf76d
LK
22738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22739 (eval $ac_try) 2>&5
22740 ac_status=$?
22741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22742 (exit $ac_status); }; } &&
22743 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
22744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22745 (eval $ac_try) 2>&5
22746 ac_status=$?
22747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22748 (exit $ac_status); }; }; then
22749 emacs_cv_c_restrict_arr=yes
22750else
22751 echo "$as_me: failed program was:" >&5
19650fd6
AS
22752sed 's/^/| /' conftest.$ac_ext >&5
22753
22044edf 22754emacs_cv_c_restrict_arr=no
ba4481b5 22755fi
edfaf76d 22756rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf
DL
22757fi
22758echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
22759echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
22760if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 22761
c0d27fcc 22762cat >>confdefs.h <<\_ACEOF
22044edf 22763#define __restrict_arr __restrict
c0d27fcc 22764_ACEOF
ba4481b5 22765
ba4481b5
DL
22766fi
22767
c0d27fcc 22768
c0d27fcc 22769
22044edf
DL
22770# Set up the CFLAGS for real compilation, so we can substitute it.
22771CFLAGS="$REAL_CFLAGS"
22772CPPFLAGS="$REAL_CPPFLAGS"
22773
22774#### Find out which version of Emacs this is.
22775version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
22776 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
22777if test x"${version}" = x; then
22778 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
22779echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
22780 { (exit 1); exit 1; }; }
22781fi
22782
22783### Specify what sort of things we'll be editing into Makefile and config.h.
22784### Use configuration here uncanonicalized to avoid exceeding size limits.
22785
22786
22787
22788
22789
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
6a3a24fa 22817
22044edf
DL
22818
22819
22820cat >>confdefs.h <<_ACEOF
22821#define EMACS_CONFIGURATION "${canonical}"
22822_ACEOF
22823
22824
22825cat >>confdefs.h <<_ACEOF
22826#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
22827_ACEOF
22828
22829
22830cat >>confdefs.h <<_ACEOF
22831#define config_machfile "${machfile}"
22832_ACEOF
22833
22834
22835cat >>confdefs.h <<_ACEOF
22836#define config_opsysfile "${opsysfile}"
22837_ACEOF
22838
22839
22840cat >>confdefs.h <<_ACEOF
22841#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
22842_ACEOF
22843
22844
22845cat >>confdefs.h <<_ACEOF
22846#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
22847_ACEOF
22848
22849
22850cat >>confdefs.h <<_ACEOF
22851#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
22852_ACEOF
22853
22854
22855cat >>confdefs.h <<_ACEOF
22856#define UNEXEC_SRC ${UNEXEC_SRC}
22857_ACEOF
22858
22859
22860if test "${HAVE_X_WINDOWS}" = "yes" ; then
22861
22862cat >>confdefs.h <<\_ACEOF
22863#define HAVE_X_WINDOWS 1
22864_ACEOF
22865
22866fi
22867if test "${USE_X_TOOLKIT}" != "none" ; then
22868
22869cat >>confdefs.h <<\_ACEOF
22870#define USE_X_TOOLKIT 1
22871_ACEOF
22872
22873fi
22874if test "${HAVE_X11}" = "yes" ; then
22875
22876cat >>confdefs.h <<\_ACEOF
22877#define HAVE_X11 1
22878_ACEOF
22879
22880fi
22881if test "${HAVE_XFREE386}" = "yes" ; then
22882
22883cat >>confdefs.h <<\_ACEOF
22884#define HAVE_XFREE386 1
22885_ACEOF
22886
22887fi
22888if test "${HAVE_MENUS}" = "yes" ; then
22889
22890cat >>confdefs.h <<\_ACEOF
22891#define HAVE_MENUS 1
22892_ACEOF
22893
22894fi
22895if test "${GNU_MALLOC}" = "yes" ; then
22896
22897cat >>confdefs.h <<\_ACEOF
22898#define GNU_MALLOC 1
22899_ACEOF
22900
22901fi
22902if test "${REL_ALLOC}" = "yes" ; then
22903
22904cat >>confdefs.h <<\_ACEOF
22905#define REL_ALLOC 1
22906_ACEOF
22907
22908fi
22909
22910
22911
c0d27fcc
MR
22912
22913
ba4481b5 22914#### Report on what we decided to do.
488dd4c4
JD
22915#### Report GTK as a toolkit, even if it doesn't use Xt.
22916#### It makes printing result more understandable as using GTK sets
22917#### toolkit_scroll_bars to yes by default.
22918if test "${HAVE_GTK}" = "yes"; then
22919 USE_X_TOOLKIT=GTK
22920fi
22921
ba4481b5
DL
22922echo "
22923Configured for \`${canonical}'.
22924
22925 Where should the build process find the source code? ${srcdir}
22926 What operating system and machine description files should Emacs use?
22927 \`${opsysfile}' and \`${machfile}'
22928 What compiler should emacs be built with? ${CC} ${CFLAGS}
22929 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 22930 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 22931 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 22932 What window system should Emacs use? ${window_system}
8e967cf7 22933 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
22934
22935if test -n "${x_includes}"; then
22936echo " Where do we find X Windows header files? ${x_includes}"
22937else
22938echo " Where do we find X Windows header files? Standard dirs"
22939fi
22940if test -n "${x_libraries}"; then
22941echo " Where do we find X Windows libraries? ${x_libraries}"
22942else
22943echo " Where do we find X Windows libraries? Standard dirs"
22944fi
22945
22946echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
22947echo " Does Emacs use -lXpm? ${HAVE_XPM}"
22948echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
22949echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
22950echo " Does Emacs use -lungif? ${HAVE_GIF}"
22951echo " Does Emacs use -lpng? ${HAVE_PNG}"
22952echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
22953echo
22954
d0098f13
JD
22955if test $USE_XASSERTS = yes; then
22956 echo " Compiling with asserts turned on."
d0098f13
JD
22957 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
22958 echo
22959fi
05cf15c6 22960
05cf15c6 22961
05cf15c6 22962
ba4481b5
DL
22963# Remove any trailing slashes in these variables.
22964test "${prefix}" != NONE &&
22965 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
22966test "${exec_prefix}" != NONE &&
22967 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
22968
d0e9bfd2
GM
22969## Check if the C preprocessor will convert `..' to `. .'. If so, set
22970## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
22971## from Makefile.c can correctly provide the arg `-traditional' to the
22972## C preprocessor.
22973
503d2be0 22974cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22975/* confdefs.h. */
22976_ACEOF
22977cat confdefs.h >>conftest.$ac_ext
22978cat >>conftest.$ac_ext <<_ACEOF
22979/* end confdefs.h. */
d0e9bfd2 22980yes..yes
503d2be0 22981_ACEOF
d0e9bfd2 22982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 22983 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
22984 CPP_NEED_TRADITIONAL=no
22985else
d0e9bfd2
GM
22986 CPP_NEED_TRADITIONAL=yes
22987fi
22988rm -f conftest*
22989
c0d27fcc 22990
6bae0ccf
DL
22991 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"
22992 ac_config_commands="$ac_config_commands default"
503d2be0 22993cat >confcache <<\_ACEOF
ba4481b5
DL
22994# This file is a shell script that caches the results of configure
22995# tests run on this system so they can be shared between configure
503d2be0
AS
22996# scripts and configure runs, see configure's option --config-cache.
22997# It is not useful on other systems. If it contains results you don't
22998# want to keep, you may remove or edit it.
ba4481b5 22999#
503d2be0
AS
23000# config.status only pays attention to the cache file if you give it
23001# the --recheck option to rerun configure.
ba4481b5 23002#
6bae0ccf 23003# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
23004# loading this file, other *unset* `ac_cv_foo' will be assigned the
23005# following values.
23006
23007_ACEOF
23008
ba4481b5
DL
23009# The following way of writing the cache mishandles newlines in values,
23010# but we know of no workaround that is simple, portable, and efficient.
23011# So, don't put newlines in cache variables' values.
23012# Ultrix sh set writes to stderr and can't be redirected directly,
23013# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
23014{
23015 (set) 2>&1 |
23016 case `(ac_space=' '; set | grep ac_space) 2>&1` in
23017 *ac_space=\ *)
23018 # `set' does not quote correctly, so add quotes (double-quote
23019 # substitution turns \\\\ into \\, and sed turns \\ into \).
23020 sed -n \
edfaf76d
LK
23021 "s/'/'\\\\''/g;
23022 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
503d2be0
AS
23023 ;;
23024 *)
23025 # `set' quotes correctly as required by POSIX, so do not add quotes.
23026 sed -n \
edfaf76d 23027 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
23028 ;;
23029 esac;
23030} |
23031 sed '
23032 t clear
23033 : clear
23034 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23035 t end
23036 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23037 : end' >>confcache
19650fd6 23038if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 23039 if test -w $cache_file; then
503d2be0
AS
23040 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23041 cat confcache >$cache_file
ba4481b5
DL
23042 else
23043 echo "not updating unwritable cache $cache_file"
23044 fi
23045fi
23046rm -f confcache
23047
ba4481b5
DL
23048test "x$prefix" = xNONE && prefix=$ac_default_prefix
23049# Let make expand exec_prefix.
23050test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23051
503d2be0
AS
23052# VPATH may cause trouble with some makes, so we remove $(srcdir),
23053# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23054# trailing colons and then remove the whole line if VPATH becomes empty
23055# (actually we leave an empty line to preserve line numbers).
ba4481b5 23056if test "x$srcdir" = x.; then
edfaf76d 23057 ac_vpsub='/^[ ]*VPATH[ ]*=/{
503d2be0
AS
23058s/:*\$(srcdir):*/:/;
23059s/:*\${srcdir}:*/:/;
23060s/:*@srcdir@:*/:/;
edfaf76d 23061s/^\([^=]*=[ ]*\):*/\1/;
503d2be0 23062s/:*$//;
edfaf76d 23063s/^[^=]*=[ ]*$//;
503d2be0 23064}'
ba4481b5
DL
23065fi
23066
ba4481b5
DL
23067DEFS=-DHAVE_CONFIG_H
23068
6bae0ccf
DL
23069ac_libobjs=
23070ac_ltlibobjs=
23071for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23072 # 1. Remove the extension, and $U if already installed.
23073 ac_i=`echo "$ac_i" |
edfaf76d 23074 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6bae0ccf
DL
23075 # 2. Add them.
23076 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
23077 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
23078done
23079LIBOBJS=$ac_libobjs
23080
23081LTLIBOBJS=$ac_ltlibobjs
23082
23083
c0d27fcc 23084
ba4481b5 23085: ${CONFIG_STATUS=./config.status}
503d2be0
AS
23086ac_clean_files_save=$ac_clean_files
23087ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 23088{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
23089echo "$as_me: creating $CONFIG_STATUS" >&6;}
23090cat >$CONFIG_STATUS <<_ACEOF
23091#! $SHELL
c0d27fcc 23092# Generated by $as_me.
ba4481b5 23093# Run this file to recreate the current configuration.
ba4481b5 23094# Compiler output produced by configure, useful for debugging
503d2be0 23095# configure, is in config.log if it exists.
ba4481b5 23096
503d2be0 23097debug=false
19650fd6
AS
23098ac_cs_recheck=false
23099ac_cs_silent=false
503d2be0 23100SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
23101_ACEOF
23102
23103cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
23104## --------------------- ##
23105## M4sh Initialization. ##
23106## --------------------- ##
23107
503d2be0
AS
23108# Be Bourne compatible
23109if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23110 emulate sh
23111 NULLCMD=:
6bae0ccf
DL
23112 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23113 # is contrary to our usage. Disable this feature.
23114 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
23115elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23116 set -o posix
23117fi
edfaf76d 23118DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 23119
c0d27fcc 23120# Support unset when possible.
edfaf76d 23121if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
23122 as_unset=unset
23123else
23124 as_unset=false
23125fi
23126
6bae0ccf
DL
23127
23128# Work around bugs in pre-3.0 UWIN ksh.
23129$as_unset ENV MAIL MAILPATH
23130PS1='$ '
23131PS2='> '
23132PS4='+ '
23133
23134# NLS nuisances.
19650fd6
AS
23135for as_var in \
23136 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23137 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23138 LC_TELEPHONE LC_TIME
6bae0ccf 23139do
edfaf76d 23140 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
23141 eval $as_var=C; export $as_var
23142 else
23143 $as_unset $as_var
23144 fi
23145done
23146
23147# Required to use basename.
23148if expr a : '\(a\)' >/dev/null 2>&1; then
23149 as_expr=expr
23150else
23151 as_expr=false
23152fi
23153
23154if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
23155 as_basename=basename
23156else
23157 as_basename=false
23158fi
c0d27fcc
MR
23159
23160
503d2be0 23161# Name of the executable.
6bae0ccf 23162as_me=`$as_basename "$0" ||
c0d27fcc
MR
23163$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23164 X"$0" : 'X\(//\)$' \| \
23165 X"$0" : 'X\(/\)$' \| \
23166 . : '\(.\)' 2>/dev/null ||
23167echo X/"$0" |
23168 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
23169 /^X\/\(\/\/\)$/{ s//\1/; q; }
23170 /^X\/\(\/\).*/{ s//\1/; q; }
23171 s/.*/./; q'`
23172
6bae0ccf 23173
c0d27fcc
MR
23174# PATH needs CR, and LINENO needs CR and PATH.
23175# Avoid depending upon Character Ranges.
23176as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23177as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23178as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23179as_cr_digits='0123456789'
23180as_cr_alnum=$as_cr_Letters$as_cr_digits
23181
23182# The user is always right.
23183if test "${PATH_SEPARATOR+set}" != set; then
19650fd6
AS
23184 echo "#! /bin/sh" >conf$$.sh
23185 echo "exit 0" >>conf$$.sh
23186 chmod +x conf$$.sh
23187 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
23188 PATH_SEPARATOR=';'
23189 else
23190 PATH_SEPARATOR=:
23191 fi
19650fd6 23192 rm -f conf$$.sh
c0d27fcc
MR
23193fi
23194
23195
23196 as_lineno_1=$LINENO
23197 as_lineno_2=$LINENO
23198 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23199 test "x$as_lineno_1" != "x$as_lineno_2" &&
23200 test "x$as_lineno_3" = "x$as_lineno_2" || {
23201 # Find who we are. Look in the path if we contain no path at all
23202 # relative or not.
23203 case $0 in
23204 *[\\/]* ) as_myself=$0 ;;
23205 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23206for as_dir in $PATH
23207do
23208 IFS=$as_save_IFS
23209 test -z "$as_dir" && as_dir=.
23210 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23211done
23212
23213 ;;
23214 esac
23215 # We did not find ourselves, most probably we were run as `sh COMMAND'
23216 # in which case we are not to be found in the path.
23217 if test "x$as_myself" = x; then
23218 as_myself=$0
23219 fi
23220 if test ! -f "$as_myself"; then
23221 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
23222echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
23223 { (exit 1); exit 1; }; }
23224 fi
23225 case $CONFIG_SHELL in
23226 '')
23227 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23228for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
23229do
23230 IFS=$as_save_IFS
23231 test -z "$as_dir" && as_dir=.
23232 for as_base in sh bash ksh sh5; do
23233 case $as_dir in
23234 /*)
23235 if ("$as_dir/$as_base" -c '
23236 as_lineno_1=$LINENO
23237 as_lineno_2=$LINENO
23238 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23239 test "x$as_lineno_1" != "x$as_lineno_2" &&
23240 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
23241 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
23242 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
23243 CONFIG_SHELL=$as_dir/$as_base
23244 export CONFIG_SHELL
23245 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
23246 fi;;
23247 esac
23248 done
23249done
23250;;
23251 esac
23252
23253 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23254 # uniformly replaced by the line number. The first 'sed' inserts a
23255 # line-number line before each line; the second 'sed' does the real
23256 # work. The second script uses 'N' to pair each line-number line
23257 # with the numbered line, and appends trailing '-' during
23258 # substitution so that $LINENO is not a special case at line end.
23259 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
23260 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
23261 sed '=' <$as_myself |
23262 sed '
23263 N
23264 s,$,-,
23265 : loop
23266 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
23267 t loop
23268 s,-$,,
23269 s,^['$as_cr_digits']*\n,,
23270 ' >$as_me.lineno &&
23271 chmod +x $as_me.lineno ||
23272 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23273echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
23274 { (exit 1); exit 1; }; }
23275
23276 # Don't try to exec as it changes $[0], causing all sort of problems
23277 # (the dirname of $[0] is not the place where we might find the
23278 # original and so on. Autoconf is especially sensible to this).
23279 . ./$as_me.lineno
23280 # Exit status is that of the last command.
23281 exit
23282}
23283
23284
23285case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23286 *c*,-n*) ECHO_N= ECHO_C='
23287' ECHO_T=' ' ;;
23288 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23289 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
23290esac
503d2be0
AS
23291
23292if expr a : '\(a\)' >/dev/null 2>&1; then
23293 as_expr=expr
23294else
23295 as_expr=false
23296fi
23297
23298rm -f conf$$ conf$$.exe conf$$.file
23299echo >conf$$.file
23300if ln -s conf$$.file conf$$ 2>/dev/null; then
23301 # We could just check for DJGPP; but this test a) works b) is more generic
23302 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23303 if test -f conf$$.exe; then
23304 # Don't use ln at all; we don't have any links
23305 as_ln_s='cp -p'
23306 else
23307 as_ln_s='ln -s'
23308 fi
23309elif ln conf$$.file conf$$ 2>/dev/null; then
23310 as_ln_s=ln
23311else
23312 as_ln_s='cp -p'
23313fi
23314rm -f conf$$ conf$$.exe conf$$.file
23315
6bae0ccf
DL
23316if mkdir -p . 2>/dev/null; then
23317 as_mkdir_p=:
23318else
edfaf76d 23319 test -d ./-p && rmdir ./-p
6bae0ccf
DL
23320 as_mkdir_p=false
23321fi
23322
503d2be0
AS
23323as_executable_p="test -f"
23324
c0d27fcc 23325# Sed expression to map a string onto a valid CPP name.
edfaf76d 23326as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
23327
23328# Sed expression to map a string onto a valid variable name.
edfaf76d 23329as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 23330
503d2be0
AS
23331
23332# IFS
23333# We need space, tab and new line, in precisely that order.
23334as_nl='
23335'
23336IFS=" $as_nl"
23337
23338# CDPATH.
6bae0ccf 23339$as_unset CDPATH
503d2be0
AS
23340
23341exec 6>&1
23342
c0d27fcc
MR
23343# Open the log real soon, to keep \$[0] and so on meaningful, and to
23344# report actual input values of CONFIG_FILES etc. instead of their
23345# values after options handling. Logging --version etc. is OK.
23346exec 5>>config.log
23347{
23348 echo
23349 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23350## Running $as_me. ##
23351_ASBOX
23352} >&5
23353cat >&5 <<_CSEOF
23354
23355This file was extended by $as_me, which was
edfaf76d 23356generated by GNU Autoconf 2.59. Invocation command line was
c0d27fcc
MR
23357
23358 CONFIG_FILES = $CONFIG_FILES
23359 CONFIG_HEADERS = $CONFIG_HEADERS
23360 CONFIG_LINKS = $CONFIG_LINKS
23361 CONFIG_COMMANDS = $CONFIG_COMMANDS
23362 $ $0 $@
23363
23364_CSEOF
23365echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23366echo >&5
503d2be0
AS
23367_ACEOF
23368
23369# Files that config.status was made for.
23370if test -n "$ac_config_files"; then
23371 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23372fi
23373
23374if test -n "$ac_config_headers"; then
23375 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23376fi
23377
23378if test -n "$ac_config_links"; then
23379 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23380fi
23381
23382if test -n "$ac_config_commands"; then
23383 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23384fi
23385
c0d27fcc 23386cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23387
23388ac_cs_usage="\
23389\`$as_me' instantiates files from templates according to the
23390current configuration.
23391
23392Usage: $0 [OPTIONS] [FILE]...
23393
23394 -h, --help print this help, then exit
23395 -V, --version print version number, then exit
19650fd6 23396 -q, --quiet do not print progress messages
503d2be0
AS
23397 -d, --debug don't remove temporary files
23398 --recheck update $as_me by reconfiguring in the same conditions
23399 --file=FILE[:TEMPLATE]
edfaf76d 23400 instantiate the configuration file FILE
503d2be0 23401 --header=FILE[:TEMPLATE]
edfaf76d 23402 instantiate the configuration header FILE
503d2be0
AS
23403
23404Configuration files:
23405$config_files
23406
23407Configuration headers:
23408$config_headers
23409
23410Configuration commands:
23411$config_commands
23412
23413Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 23414_ACEOF
503d2be0 23415
c0d27fcc 23416cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23417ac_cs_version="\\
23418config.status
edfaf76d 23419configured by $0, generated by GNU Autoconf 2.59,
503d2be0
AS
23420 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23421
edfaf76d 23422Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
23423This config.status script is free software; the Free Software Foundation
23424gives unlimited permission to copy, distribute and modify it."
23425srcdir=$srcdir
23426INSTALL="$INSTALL"
c0d27fcc 23427_ACEOF
503d2be0 23428
c0d27fcc 23429cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23430# If no file are specified by the user, then we need to provide default
23431# value. By we need to know if files were specified by the user.
23432ac_need_defaults=:
23433while test $# != 0
ba4481b5 23434do
503d2be0
AS
23435 case $1 in
23436 --*=*)
23437 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23438 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
23439 ac_shift=:
23440 ;;
23441 -*)
23442 ac_option=$1
23443 ac_optarg=$2
23444 ac_shift=shift
503d2be0 23445 ;;
503d2be0
AS
23446 *) # This is not an option, so the user has probably given explicit
23447 # arguments.
6bae0ccf 23448 ac_option=$1
503d2be0
AS
23449 ac_need_defaults=false;;
23450 esac
23451
6bae0ccf 23452 case $ac_option in
503d2be0 23453 # Handling of the options.
c0d27fcc 23454_ACEOF
f57bd967 23455cat >>$CONFIG_STATUS <<\_ACEOF
19650fd6
AS
23456 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23457 ac_cs_recheck=: ;;
503d2be0
AS
23458 --version | --vers* | -V )
23459 echo "$ac_cs_version"; exit 0 ;;
23460 --he | --h)
23461 # Conflict between --help and --header
c0d27fcc 23462 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
23463Try \`$0 --help' for more information." >&5
23464echo "$as_me: error: ambiguous option: $1
23465Try \`$0 --help' for more information." >&2;}
23466 { (exit 1); exit 1; }; };;
23467 --help | --hel | -h )
23468 echo "$ac_cs_usage"; exit 0 ;;
23469 --debug | --d* | -d )
23470 debug=: ;;
23471 --file | --fil | --fi | --f )
6bae0ccf
DL
23472 $ac_shift
23473 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
23474 ac_need_defaults=false;;
23475 --header | --heade | --head | --hea )
6bae0ccf
DL
23476 $ac_shift
23477 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 23478 ac_need_defaults=false;;
19650fd6
AS
23479 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23480 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23481 ac_cs_silent=: ;;
503d2be0
AS
23482
23483 # This is an error.
c0d27fcc 23484 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
23485Try \`$0 --help' for more information." >&5
23486echo "$as_me: error: unrecognized option: $1
23487Try \`$0 --help' for more information." >&2;}
23488 { (exit 1); exit 1; }; } ;;
23489
23490 *) ac_config_targets="$ac_config_targets $1" ;;
23491
ba4481b5 23492 esac
503d2be0 23493 shift
ba4481b5
DL
23494done
23495
19650fd6
AS
23496ac_configure_extra_args=
23497
23498if $ac_cs_silent; then
23499 exec 6>/dev/null
23500 ac_configure_extra_args="$ac_configure_extra_args --silent"
23501fi
23502
23503_ACEOF
23504cat >>$CONFIG_STATUS <<_ACEOF
23505if \$ac_cs_recheck; then
23506 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23507 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23508fi
23509
503d2be0 23510_ACEOF
ba4481b5 23511
c0d27fcc 23512cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23513#
23514# INIT-COMMANDS section.
23515#
ba4481b5 23516
503d2be0
AS
23517GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
23518
c0d27fcc
MR
23519_ACEOF
23520
503d2be0 23521
c0d27fcc
MR
23522
23523cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23524for ac_config_target in $ac_config_targets
23525do
23526 case "$ac_config_target" in
23527 # Handling of arguments.
23528 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23529 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
23530 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
23531 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
23532 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
23533 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
23534 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 23535 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 23536 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
23537 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
23538 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23539 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 23540 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
23541echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23542 { (exit 1); exit 1; }; };;
23543 esac
ba4481b5 23544done
503d2be0
AS
23545
23546# If the user did not use the arguments to specify the items to instantiate,
23547# then the envvar interface is used. Set only those that are not.
23548# We use the long form for the default assignment because of an extremely
23549# bizarre bug on SunOS 4.1.3.
23550if $ac_need_defaults; then
23551 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23552 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23553 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 23554fi
503d2be0 23555
19650fd6
AS
23556# Have a temporary directory for convenience. Make it in the build tree
23557# simply because there is no reason to put it here, and in addition,
23558# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
23559# Create a temporary directory, and hook for its removal unless debugging.
23560$debug ||
23561{
23562 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23563 trap '{ (exit 1); exit 1; }' 1 2 13 15
23564}
23565
23566# Create a (secure) tmp directory for tmp files.
19650fd6 23567
503d2be0 23568{
19650fd6 23569 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
23570 test -n "$tmp" && test -d "$tmp"
23571} ||
23572{
19650fd6 23573 tmp=./confstat$$-$RANDOM
503d2be0
AS
23574 (umask 077 && mkdir $tmp)
23575} ||
23576{
19650fd6 23577 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
23578 { (exit 1); exit 1; }
23579}
23580
c0d27fcc 23581_ACEOF
503d2be0 23582
c0d27fcc 23583cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23584
23585#
23586# CONFIG_FILES section.
23587#
23588
23589# No need to generate the scripts if there are no CONFIG_FILES.
23590# This happens for instance when ./config.status config.h
23591if test -n "\$CONFIG_FILES"; then
23592 # Protect against being on the right side of a sed subst in config.status.
23593 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23594 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23595s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
23596s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23597s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23598s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23599s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23600s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23601s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
23602s,@exec_prefix@,$exec_prefix,;t t
23603s,@prefix@,$prefix,;t t
23604s,@program_transform_name@,$program_transform_name,;t t
23605s,@bindir@,$bindir,;t t
23606s,@sbindir@,$sbindir,;t t
23607s,@libexecdir@,$libexecdir,;t t
23608s,@datadir@,$datadir,;t t
23609s,@sysconfdir@,$sysconfdir,;t t
23610s,@sharedstatedir@,$sharedstatedir,;t t
23611s,@localstatedir@,$localstatedir,;t t
23612s,@libdir@,$libdir,;t t
23613s,@includedir@,$includedir,;t t
23614s,@oldincludedir@,$oldincludedir,;t t
23615s,@infodir@,$infodir,;t t
23616s,@mandir@,$mandir,;t t
503d2be0
AS
23617s,@build_alias@,$build_alias,;t t
23618s,@host_alias@,$host_alias,;t t
23619s,@target_alias@,$target_alias,;t t
c0d27fcc 23620s,@DEFS@,$DEFS,;t t
503d2be0
AS
23621s,@ECHO_C@,$ECHO_C,;t t
23622s,@ECHO_N@,$ECHO_N,;t t
23623s,@ECHO_T@,$ECHO_T,;t t
503d2be0 23624s,@LIBS@,$LIBS,;t t
19650fd6 23625s,@MAINT@,$MAINT,;t t
503d2be0
AS
23626s,@build@,$build,;t t
23627s,@build_cpu@,$build_cpu,;t t
23628s,@build_vendor@,$build_vendor,;t t
23629s,@build_os@,$build_os,;t t
23630s,@host@,$host,;t t
23631s,@host_cpu@,$host_cpu,;t t
23632s,@host_vendor@,$host_vendor,;t t
23633s,@host_os@,$host_os,;t t
23634s,@CC@,$CC,;t t
23635s,@CFLAGS@,$CFLAGS,;t t
23636s,@LDFLAGS@,$LDFLAGS,;t t
23637s,@CPPFLAGS@,$CPPFLAGS,;t t
23638s,@ac_ct_CC@,$ac_ct_CC,;t t
23639s,@EXEEXT@,$EXEEXT,;t t
23640s,@OBJEXT@,$OBJEXT,;t t
503d2be0 23641s,@CPP@,$CPP,;t t
e143ad11
AS
23642s,@EGREP@,$EGREP,;t t
23643s,@LN_S@,$LN_S,;t t
503d2be0
AS
23644s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23645s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23646s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
23647s,@RANLIB@,$RANLIB,;t t
23648s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 23649s,@INSTALL_INFO@,$INSTALL_INFO,;t t
46e35e9f 23650s,@GZIP_PROG@,$GZIP_PROG,;t t
503d2be0
AS
23651s,@LIBSOUND@,$LIBSOUND,;t t
23652s,@SET_MAKE@,$SET_MAKE,;t t
488dd4c4
JD
23653s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23654s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
23655s,@GTK_LIBS@,$GTK_LIBS,;t t
503d2be0
AS
23656s,@ALLOCA@,$ALLOCA,;t t
23657s,@liblockfile@,$liblockfile,;t t
23658s,@LIBOBJS@,$LIBOBJS,;t t
23659s,@NEED_SETGID@,$NEED_SETGID,;t t
23660s,@KMEM_GROUP@,$KMEM_GROUP,;t t
23661s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
52dbaac8
PE
23662s,@GETOPT_H@,$GETOPT_H,;t t
23663s,@GETOPTOBJS@,$GETOPTOBJS,;t t
503d2be0
AS
23664s,@version@,$version,;t t
23665s,@configuration@,$configuration,;t t
23666s,@canonical@,$canonical,;t t
23667s,@srcdir@,$srcdir,;t t
23668s,@lispdir@,$lispdir,;t t
23669s,@locallisppath@,$locallisppath,;t t
23670s,@lisppath@,$lisppath,;t t
23671s,@x_default_search_path@,$x_default_search_path,;t t
23672s,@etcdir@,$etcdir,;t t
23673s,@archlibdir@,$archlibdir,;t t
23674s,@docdir@,$docdir,;t t
23675s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
23676s,@gamedir@,$gamedir,;t t
23677s,@gameuser@,$gameuser,;t t
503d2be0
AS
23678s,@c_switch_system@,$c_switch_system,;t t
23679s,@c_switch_machine@,$c_switch_machine,;t t
23680s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
23681s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
23682s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
23683s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
23684s,@machfile@,$machfile,;t t
23685s,@opsysfile@,$opsysfile,;t t
6a3a24fa 23686s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 23687s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
23688CEOF
23689
c0d27fcc 23690_ACEOF
ba4481b5 23691
c0d27fcc 23692 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23693 # Split the substitutions into bite-sized pieces for seds with
23694 # small command number limits, like on Digital OSF/1 and HP-UX.
23695 ac_max_sed_lines=48
23696 ac_sed_frag=1 # Number of current file.
23697 ac_beg=1 # First line for current file.
23698 ac_end=$ac_max_sed_lines # Line after last line for current file.
23699 ac_more_lines=:
23700 ac_sed_cmds=
23701 while $ac_more_lines; do
23702 if test $ac_beg -gt 1; then
23703 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23704 else
23705 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23706 fi
23707 if test ! -s $tmp/subs.frag; then
23708 ac_more_lines=false
23709 else
23710 # The purpose of the label and of the branching condition is to
23711 # speed up the sed processing (if there are no `@' at all, there
23712 # is no need to browse any of the substitutions).
23713 # These are the two extra sed commands mentioned above.
23714 (echo ':t
23715 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23716 if test -z "$ac_sed_cmds"; then
edfaf76d 23717 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0 23718 else
edfaf76d 23719 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0
AS
23720 fi
23721 ac_sed_frag=`expr $ac_sed_frag + 1`
23722 ac_beg=$ac_end
23723 ac_end=`expr $ac_end + $ac_max_sed_lines`
23724 fi
23725 done
23726 if test -z "$ac_sed_cmds"; then
23727 ac_sed_cmds=cat
23728 fi
23729fi # test -n "$CONFIG_FILES"
ba4481b5 23730
c0d27fcc
MR
23731_ACEOF
23732cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 23733for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 23734 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
23735 case $ac_file in
23736 - | *:- | *:-:* ) # input from stdin
edfaf76d
LK
23737 cat >$tmp/stdin
23738 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23739 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23740 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
edfaf76d 23741 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23742 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
23743 esac
23744
503d2be0 23745 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
23746 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23747$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23748 X"$ac_file" : 'X\(//\)[^/]' \| \
23749 X"$ac_file" : 'X\(//\)$' \| \
23750 X"$ac_file" : 'X\(/\)' \| \
23751 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
23752echo X"$ac_file" |
23753 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23754 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23755 /^X\(\/\/\)$/{ s//\1/; q; }
23756 /^X\(\/\).*/{ s//\1/; q; }
23757 s/.*/./; q'`
6bae0ccf
DL
23758 { if $as_mkdir_p; then
23759 mkdir -p "$ac_dir"
23760 else
23761 as_dir="$ac_dir"
23762 as_dirs=
23763 while test ! -d "$as_dir"; do
23764 as_dirs="$as_dir $as_dirs"
23765 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23766$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23767 X"$as_dir" : 'X\(//\)[^/]' \| \
23768 X"$as_dir" : 'X\(//\)$' \| \
23769 X"$as_dir" : 'X\(/\)' \| \
23770 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
23771echo X"$as_dir" |
23772 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23773 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23774 /^X\(\/\/\)$/{ s//\1/; q; }
23775 /^X\(\/\).*/{ s//\1/; q; }
23776 s/.*/./; q'`
23777 done
23778 test ! -n "$as_dirs" || mkdir $as_dirs
23779 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23780echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23781 { (exit 1); exit 1; }; }; }
503d2be0 23782
c0d27fcc 23783 ac_builddir=.
98418dba 23784
c0d27fcc
MR
23785if test "$ac_dir" != .; then
23786 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23787 # A "../" for each directory in $ac_dir_suffix.
23788 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23789else
23790 ac_dir_suffix= ac_top_builddir=
23791fi
23792
23793case $srcdir in
23794 .) # No --srcdir option. We are building in place.
23795 ac_srcdir=.
23796 if test -z "$ac_top_builddir"; then
23797 ac_top_srcdir=.
23798 else
23799 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23800 fi ;;
23801 [\\/]* | ?:[\\/]* ) # Absolute path.
23802 ac_srcdir=$srcdir$ac_dir_suffix;
23803 ac_top_srcdir=$srcdir ;;
ba4481b5 23804 *) # Relative path.
c0d27fcc
MR
23805 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23806 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23807esac
edfaf76d
LK
23808
23809# Do not use `cd foo && pwd` to compute absolute paths, because
23810# the directories may not exist.
23811case `pwd` in
23812.) ac_abs_builddir="$ac_dir";;
23813*)
23814 case "$ac_dir" in
23815 .) ac_abs_builddir=`pwd`;;
23816 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23817 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23818 esac;;
23819esac
23820case $ac_abs_builddir in
23821.) ac_abs_top_builddir=${ac_top_builddir}.;;
23822*)
23823 case ${ac_top_builddir}. in
23824 .) ac_abs_top_builddir=$ac_abs_builddir;;
23825 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23826 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23827 esac;;
23828esac
23829case $ac_abs_builddir in
23830.) ac_abs_srcdir=$ac_srcdir;;
23831*)
23832 case $ac_srcdir in
23833 .) ac_abs_srcdir=$ac_abs_builddir;;
23834 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23835 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23836 esac;;
23837esac
23838case $ac_abs_builddir in
23839.) ac_abs_top_srcdir=$ac_top_srcdir;;
23840*)
23841 case $ac_top_srcdir in
23842 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23843 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23844 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23845 esac;;
23846esac
c0d27fcc 23847
ba4481b5 23848
503d2be0
AS
23849 case $INSTALL in
23850 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 23851 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
23852 esac
23853
e143ad11
AS
23854 if test x"$ac_file" != x-; then
23855 { echo "$as_me:$LINENO: creating $ac_file" >&5
23856echo "$as_me: creating $ac_file" >&6;}
23857 rm -f "$ac_file"
23858 fi
503d2be0
AS
23859 # Let's still pretend it is `configure' which instantiates (i.e., don't
23860 # use $as_me), people would be surprised to read:
c0d27fcc
MR
23861 # /* config.h. Generated by config.status. */
23862 if test x"$ac_file" = x-; then
23863 configure_input=
23864 else
23865 configure_input="$ac_file. "
23866 fi
23867 configure_input=$configure_input"Generated from `echo $ac_file_in |
edfaf76d 23868 sed 's,.*/,,'` by configure."
503d2be0
AS
23869
23870 # First look for the input files in the build tree, otherwise in the
23871 # src tree.
23872 ac_file_inputs=`IFS=:
23873 for f in $ac_file_in; do
23874 case $f in
23875 -) echo $tmp/stdin ;;
23876 [\\/$]*)
edfaf76d
LK
23877 # Absolute (can't be DOS-style, as IFS=:)
23878 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23879echo "$as_me: error: cannot find input file: $f" >&2;}
23880 { (exit 1); exit 1; }; }
edfaf76d 23881 echo "$f";;
503d2be0 23882 *) # Relative
edfaf76d
LK
23883 if test -f "$f"; then
23884 # Build tree
23885 echo "$f"
23886 elif test -f "$srcdir/$f"; then
23887 # Source tree
23888 echo "$srcdir/$f"
23889 else
23890 # /dev/null tree
23891 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23892echo "$as_me: error: cannot find input file: $f" >&2;}
23893 { (exit 1); exit 1; }; }
edfaf76d 23894 fi;;
503d2be0
AS
23895 esac
23896 done` || { (exit 1); exit 1; }
c0d27fcc
MR
23897_ACEOF
23898cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23899 sed "$ac_vpsub
23900$extrasub
c0d27fcc
MR
23901_ACEOF
23902cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23903:t
23904/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23905s,@configure_input@,$configure_input,;t t
23906s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 23907s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 23908s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
23909s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23910s,@builddir@,$ac_builddir,;t t
23911s,@abs_builddir@,$ac_abs_builddir,;t t
23912s,@top_builddir@,$ac_top_builddir,;t t
23913s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
23914s,@INSTALL@,$ac_INSTALL,;t t
23915" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23916 rm -f $tmp/stdin
23917 if test x"$ac_file" != x-; then
23918 mv $tmp/out $ac_file
23919 else
23920 cat $tmp/out
23921 rm -f $tmp/out
23922 fi
23923
23924done
c0d27fcc
MR
23925_ACEOF
23926cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 23927
503d2be0
AS
23928#
23929# CONFIG_HEADER section.
23930#
ba4481b5
DL
23931
23932# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23933# NAME is the cpp macro being defined and VALUE is the value it is being given.
23934#
23935# ac_d sets the value in "#define NAME VALUE" lines.
edfaf76d
LK
23936ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23937ac_dB='[ ].*$,\1#\2'
503d2be0
AS
23938ac_dC=' '
23939ac_dD=',;t'
23940# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
edfaf76d 23941ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
503d2be0 23942ac_uB='$,\1#\2define\3'
ba4481b5 23943ac_uC=' '
503d2be0 23944ac_uD=',;t'
ba4481b5 23945
503d2be0 23946for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 23947 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
23948 case $ac_file in
23949 - | *:- | *:-:* ) # input from stdin
edfaf76d
LK
23950 cat >$tmp/stdin
23951 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23952 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23953 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
edfaf76d 23954 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23955 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
23956 esac
23957
c0d27fcc 23958 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
23959echo "$as_me: creating $ac_file" >&6;}
23960
23961 # First look for the input files in the build tree, otherwise in the
23962 # src tree.
23963 ac_file_inputs=`IFS=:
23964 for f in $ac_file_in; do
23965 case $f in
23966 -) echo $tmp/stdin ;;
23967 [\\/$]*)
edfaf76d
LK
23968 # Absolute (can't be DOS-style, as IFS=:)
23969 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23970echo "$as_me: error: cannot find input file: $f" >&2;}
23971 { (exit 1); exit 1; }; }
edfaf76d
LK
23972 # Do quote $f, to prevent DOS paths from being IFS'd.
23973 echo "$f";;
503d2be0 23974 *) # Relative
edfaf76d
LK
23975 if test -f "$f"; then
23976 # Build tree
23977 echo "$f"
23978 elif test -f "$srcdir/$f"; then
23979 # Source tree
23980 echo "$srcdir/$f"
23981 else
23982 # /dev/null tree
23983 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23984echo "$as_me: error: cannot find input file: $f" >&2;}
23985 { (exit 1); exit 1; }; }
edfaf76d 23986 fi;;
503d2be0
AS
23987 esac
23988 done` || { (exit 1); exit 1; }
23989 # Remove the trailing spaces.
edfaf76d 23990 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
503d2be0 23991
c0d27fcc 23992_ACEOF
503d2be0
AS
23993
23994# Transform confdefs.h into two sed scripts, `conftest.defines' and
23995# `conftest.undefs', that substitutes the proper values into
23996# config.h.in to produce config.h. The first handles `#define'
23997# templates, and the second `#undef' templates.
23998# And first: Protect against being on the right side of a sed subst in
23999# config.status. Protect against being in an unquoted here document
24000# in config.status.
24001rm -f conftest.defines conftest.undefs
24002# Using a here document instead of a string reduces the quoting nightmare.
24003# Putting comments in sed scripts is not portable.
24004#
24005# `end' is used to avoid that the second main sed command (meant for
24006# 0-ary CPP macros) applies to n-ary macro definitions.
24007# See the Autoconf documentation for `clear'.
c0d27fcc 24008cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
24009s/[\\&,]/\\&/g
24010s,[\\$`],\\&,g
24011t clear
24012: clear
edfaf76d 24013s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0 24014t end
edfaf76d 24015s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
503d2be0 24016: end
c0d27fcc 24017_ACEOF
503d2be0
AS
24018# If some macros were called several times there might be several times
24019# the same #defines, which is useless. Nevertheless, we may not want to
24020# sort them, since we want the *last* AC-DEFINE to be honored.
24021uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
24022sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
24023rm -f confdef2sed.sed
ba4481b5
DL
24024
24025# This sed command replaces #undef with comments. This is necessary, for
24026# example, in the case of _POSIX_SOURCE, which is predefined and required
24027# on some systems where configure will not decide to define it.
c0d27fcc 24028cat >>conftest.undefs <<\_ACEOF
edfaf76d 24029s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 24030_ACEOF
ba4481b5 24031
503d2be0
AS
24032# Break up conftest.defines because some shells have a limit on the size
24033# of here documents, and old seds have small limits too (100 cmds).
24034echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
edfaf76d 24035echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
24036echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
24037echo ' :' >>$CONFIG_STATUS
24038rm -f conftest.tail
24039while grep . conftest.defines >/dev/null
24040do
24041 # Write a limited-size here document to $tmp/defines.sed.
24042 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
24043 # Speed up: don't consider the non `#define' lines.
edfaf76d 24044 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
503d2be0
AS
24045 # Work around the forget-to-reset-the-flag bug.
24046 echo 't clr' >>$CONFIG_STATUS
24047 echo ': clr' >>$CONFIG_STATUS
24048 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
24049 echo 'CEOF
24050 sed -f $tmp/defines.sed $tmp/in >$tmp/out
24051 rm -f $tmp/in
24052 mv $tmp/out $tmp/in
24053' >>$CONFIG_STATUS
24054 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
24055 rm -f conftest.defines
24056 mv conftest.tail conftest.defines
24057done
24058rm -f conftest.defines
6bae0ccf 24059echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 24060echo >>$CONFIG_STATUS
ba4481b5 24061
503d2be0
AS
24062# Break up conftest.undefs because some shells have a limit on the size
24063# of here documents, and old seds have small limits too (100 cmds).
24064echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 24065rm -f conftest.tail
503d2be0 24066while grep . conftest.undefs >/dev/null
ba4481b5 24067do
503d2be0
AS
24068 # Write a limited-size here document to $tmp/undefs.sed.
24069 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
24070 # Speed up: don't consider the non `#undef'
edfaf76d 24071 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
503d2be0
AS
24072 # Work around the forget-to-reset-the-flag bug.
24073 echo 't clr' >>$CONFIG_STATUS
24074 echo ': clr' >>$CONFIG_STATUS
24075 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 24076 echo 'CEOF
503d2be0
AS
24077 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
24078 rm -f $tmp/in
24079 mv $tmp/out $tmp/in
24080' >>$CONFIG_STATUS
24081 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
24082 rm -f conftest.undefs
24083 mv conftest.tail conftest.undefs
ba4481b5 24084done
503d2be0
AS
24085rm -f conftest.undefs
24086
c0d27fcc 24087cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24088 # Let's still pretend it is `configure' which instantiates (i.e., don't
24089 # use $as_me), people would be surprised to read:
c0d27fcc 24090 # /* config.h. Generated by config.status. */
503d2be0 24091 if test x"$ac_file" = x-; then
c0d27fcc 24092 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 24093 else
c0d27fcc 24094 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
24095 fi
24096 cat $tmp/in >>$tmp/config.h
24097 rm -f $tmp/in
24098 if test x"$ac_file" != x-; then
19650fd6 24099 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 24100 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
24101echo "$as_me: $ac_file is unchanged" >&6;}
24102 else
c0d27fcc
MR
24103 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
24104$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24105 X"$ac_file" : 'X\(//\)[^/]' \| \
24106 X"$ac_file" : 'X\(//\)$' \| \
24107 X"$ac_file" : 'X\(/\)' \| \
24108 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
24109echo X"$ac_file" |
24110 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24111 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24112 /^X\(\/\/\)$/{ s//\1/; q; }
24113 /^X\(\/\).*/{ s//\1/; q; }
24114 s/.*/./; q'`
6bae0ccf
DL
24115 { if $as_mkdir_p; then
24116 mkdir -p "$ac_dir"
24117 else
24118 as_dir="$ac_dir"
24119 as_dirs=
24120 while test ! -d "$as_dir"; do
24121 as_dirs="$as_dir $as_dirs"
24122 as_dir=`(dirname "$as_dir") 2>/dev/null ||
24123$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24124 X"$as_dir" : 'X\(//\)[^/]' \| \
24125 X"$as_dir" : 'X\(//\)$' \| \
24126 X"$as_dir" : 'X\(/\)' \| \
24127 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
24128echo X"$as_dir" |
24129 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24130 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24131 /^X\(\/\/\)$/{ s//\1/; q; }
24132 /^X\(\/\).*/{ s//\1/; q; }
24133 s/.*/./; q'`
24134 done
24135 test ! -n "$as_dirs" || mkdir $as_dirs
24136 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24137echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24138 { (exit 1); exit 1; }; }; }
503d2be0 24139
503d2be0
AS
24140 rm -f $ac_file
24141 mv $tmp/config.h $ac_file
ba4481b5 24142 fi
503d2be0
AS
24143 else
24144 cat $tmp/config.h
24145 rm -f $tmp/config.h
ba4481b5 24146 fi
503d2be0 24147done
c0d27fcc
MR
24148_ACEOF
24149cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24150
24151#
24152# CONFIG_COMMANDS section.
24153#
24154for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24155 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24156 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
24157 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
24158$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24159 X"$ac_dest" : 'X\(//\)[^/]' \| \
24160 X"$ac_dest" : 'X\(//\)$' \| \
24161 X"$ac_dest" : 'X\(/\)' \| \
24162 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
24163echo X"$ac_dest" |
24164 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24165 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24166 /^X\(\/\/\)$/{ s//\1/; q; }
24167 /^X\(\/\).*/{ s//\1/; q; }
24168 s/.*/./; q'`
edfaf76d
LK
24169 { if $as_mkdir_p; then
24170 mkdir -p "$ac_dir"
24171 else
24172 as_dir="$ac_dir"
24173 as_dirs=
24174 while test ! -d "$as_dir"; do
24175 as_dirs="$as_dir $as_dirs"
24176 as_dir=`(dirname "$as_dir") 2>/dev/null ||
24177$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24178 X"$as_dir" : 'X\(//\)[^/]' \| \
24179 X"$as_dir" : 'X\(//\)$' \| \
24180 X"$as_dir" : 'X\(/\)' \| \
24181 . : '\(.\)' 2>/dev/null ||
24182echo X"$as_dir" |
24183 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24184 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24185 /^X\(\/\/\)$/{ s//\1/; q; }
24186 /^X\(\/\).*/{ s//\1/; q; }
24187 s/.*/./; q'`
24188 done
24189 test ! -n "$as_dirs" || mkdir $as_dirs
24190 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24191echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24192 { (exit 1); exit 1; }; }; }
24193
c0d27fcc
MR
24194 ac_builddir=.
24195
24196if test "$ac_dir" != .; then
24197 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24198 # A "../" for each directory in $ac_dir_suffix.
24199 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24200else
24201 ac_dir_suffix= ac_top_builddir=
24202fi
24203
24204case $srcdir in
24205 .) # No --srcdir option. We are building in place.
24206 ac_srcdir=.
24207 if test -z "$ac_top_builddir"; then
24208 ac_top_srcdir=.
24209 else
24210 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24211 fi ;;
24212 [\\/]* | ?:[\\/]* ) # Absolute path.
24213 ac_srcdir=$srcdir$ac_dir_suffix;
24214 ac_top_srcdir=$srcdir ;;
24215 *) # Relative path.
24216 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24217 ac_top_srcdir=$ac_top_builddir$srcdir ;;
24218esac
edfaf76d
LK
24219
24220# Do not use `cd foo && pwd` to compute absolute paths, because
24221# the directories may not exist.
24222case `pwd` in
24223.) ac_abs_builddir="$ac_dir";;
24224*)
24225 case "$ac_dir" in
24226 .) ac_abs_builddir=`pwd`;;
24227 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24228 *) ac_abs_builddir=`pwd`/"$ac_dir";;
24229 esac;;
24230esac
24231case $ac_abs_builddir in
24232.) ac_abs_top_builddir=${ac_top_builddir}.;;
24233*)
24234 case ${ac_top_builddir}. in
24235 .) ac_abs_top_builddir=$ac_abs_builddir;;
24236 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24237 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24238 esac;;
24239esac
24240case $ac_abs_builddir in
24241.) ac_abs_srcdir=$ac_srcdir;;
24242*)
24243 case $ac_srcdir in
24244 .) ac_abs_srcdir=$ac_abs_builddir;;
24245 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24246 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24247 esac;;
24248esac
24249case $ac_abs_builddir in
24250.) ac_abs_top_srcdir=$ac_top_srcdir;;
24251*)
24252 case $ac_top_srcdir in
24253 .) ac_abs_top_srcdir=$ac_abs_builddir;;
24254 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24255 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24256 esac;;
24257esac
ba4481b5 24258
c0d27fcc
MR
24259
24260 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24261echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
24262 case $ac_dest in
24263 default )
ba4481b5
DL
24264
24265### Make the necessary directories, if they don't exist.
24266for dir in etc lisp ; do
24267 test -d ${dir} || mkdir ${dir}
24268done
24269
24270# Build src/Makefile from ${srcdir}/src/Makefile.c
24271# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
24272# This must be done after src/config.h is built, since we rely on that file.
24273
24274# Now get this: Some word that is part of the ${srcdir} directory name
24275# or the ${configuration} value might, just might, happen to be an
24276# identifier like `sun4' or `i386' or something, and be predefined by
24277# the C preprocessor to some helpful value like 1, or maybe the empty
24278# string. Needless to say consequent macro substitutions are less
24279# than conducive to the makefile finding the correct directory.
24280undefs="`echo $top_srcdir $configuration $canonical |
24281sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24282 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
24283`"
24284
24285echo creating src/epaths.h
4aa6b955 24286${MAKE-make} epaths-force
ba4481b5 24287
1c203d4c
DL
24288# As of 2000-11-19, newest development versions of GNU cpp preprocess
24289# `..' to `. .' unless invoked with -traditional
24290
d0e9bfd2 24291if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
24292 CPPFLAGS="$CPPFLAGS -traditional"
24293fi
24294
ba4481b5
DL
24295echo creating lib-src/Makefile
24296( cd lib-src
24297 rm -f junk.c junk1.c junk2.c
24298 sed -e '/start of cpp stuff/q' \
24299 < Makefile.c > junk1.c
24300 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24301 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24302 < Makefile.c > junk.c
503d2be0 24303 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24304 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24305 cat junk1.c junk2.c > Makefile.new
24306 rm -f junk.c junk1.c junk2.c
24307 chmod 444 Makefile.new
24308 mv -f Makefile.new Makefile
24309)
24310
24311echo creating src/Makefile
24312( cd src
24313 rm -f junk.c junk1.c junk2.c
24314 sed -e '/start of cpp stuff/q' \
24315 < Makefile.c > junk1.c
24316 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24317 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24318 < Makefile.c > junk.c
503d2be0 24319 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24320 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24321 cat junk1.c junk2.c > Makefile.new
24322 rm -f junk.c junk1.c junk2.c
24323 chmod 444 Makefile.new
24324 mv -f Makefile.new Makefile
24325)
24326
503d2be0 24327if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 24328 echo creating src/.gdbinit
503d2be0 24329 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
24330fi
24331
24332# This is how we know whether to re-run configure in certain cases.
24333touch src/config.stamp
24334
503d2be0
AS
24335 ;;
24336 esac
24337done
c0d27fcc 24338_ACEOF
503d2be0 24339
c0d27fcc 24340cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 24341
503d2be0 24342{ (exit 0); exit 0; }
c0d27fcc 24343_ACEOF
ba4481b5 24344chmod +x $CONFIG_STATUS
503d2be0
AS
24345ac_clean_files=$ac_clean_files_save
24346
c0d27fcc 24347
503d2be0
AS
24348# configure is writing to config.log, and then calls config.status.
24349# config.status does its own redirection, appending to config.log.
24350# Unfortunately, on DOS this fails, as config.log is still kept open
24351# by configure, so config.status won't be able to write to it; its
24352# output is simply discarded. So we exec the FD to /dev/null,
24353# effectively closing config.log, so it can be properly (re)opened and
24354# appended to by config.status. When coming back to configure, we
24355# need to make the FD available again.
24356if test "$no_create" != yes; then
24357 ac_cs_success=:
19650fd6
AS
24358 ac_config_status_args=
24359 test "$silent" = yes &&
24360 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 24361 exec 5>/dev/null
19650fd6 24362 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
24363 exec 5>>config.log
24364 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24365 # would make configure fail if this is the last instruction.
24366 $ac_cs_success || { (exit 1); exit 1; }
24367fi
f5f47add 24368
c0d27fcc 24369