*** 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 ;;
bcdb1378
EZ
2139 s390x-*-linux-gnu* )
2140 machine=ibms390x opsys=gnu-linux
2141 ;;
ba4481b5
DL
2142 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2143 machine=ibmrs6000 opsys=aix3-1
2144 ;;
2145 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2146 machine=ibmrs6000 opsys=aix3-2-5
2147 ;;
2148 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2149 machine=ibmrs6000 opsys=aix4-1
2150 ;;
2151 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2152 machine=ibmrs6000 opsys=aix4-2
2153 ;;
55597d70 2154 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2155 machine=ibmrs6000 opsys=aix4-2
2156 ;;
ba4481b5
DL
2157 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2158 machine=ibmrs6000 opsys=aix4
2159 ;;
2160 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2161 machine=ibmrs6000 opsys=aix4-1
2162 ;;
2163 rs6000-ibm-aix* | powerpc-ibm-aix* )
2164 machine=ibmrs6000 opsys=aix3-2
2165 ;;
2166 romp-ibm-bsd4.3* )
2167 machine=ibmrt opsys=bsd4-3
2168 ;;
2169 romp-ibm-bsd4.2* )
2170 machine=ibmrt opsys=bsd4-2
2171 ;;
2172 romp-ibm-aos4.3* )
2173 machine=ibmrt opsys=bsd4-3
2174 ;;
2175 romp-ibm-aos4.2* )
2176 machine=ibmrt opsys=bsd4-2
2177 ;;
2178 romp-ibm-aos* )
2179 machine=ibmrt opsys=bsd4-3
2180 ;;
2181 romp-ibm-bsd* )
2182 machine=ibmrt opsys=bsd4-3
2183 ;;
2184 romp-ibm-aix* )
2185 machine=ibmrt-aix opsys=usg5-2-2
2186 ;;
2187
2188 ## Integrated Solutions `Optimum V'
2189 m68*-isi-bsd4.2* )
2190 machine=isi-ov opsys=bsd4-2
2191 ;;
2192 m68*-isi-bsd4.3* )
2193 machine=isi-ov opsys=bsd4-3
2194 ;;
2195
2196 ## Intel 386 machines where we do care about the manufacturer
2197 i[3456]86-intsys-sysv* )
2198 machine=is386 opsys=usg5-2-2
2199 ;;
2200
2201 ## Prime EXL
2202 i[3456]86-prime-sysv* )
2203 machine=i386 opsys=usg5-3
2204 ;;
2205
2206 ## Sequent Symmetry running Dynix
2207 i[3456]86-sequent-bsd* )
2208 machine=symmetry opsys=bsd4-3
2209 ;;
2210
2211 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2212 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2213 machine=sequent-ptx opsys=ptx4
2214 NON_GNU_CPP=/lib/cpp
2215 ;;
2216
2217 ## Sequent Symmetry running DYNIX/ptx
2218 ## Use the old cpp rather than the newer ANSI one.
2219 i[3456]86-sequent-ptx* )
2220 machine=sequent-ptx opsys=ptx
2221 NON_GNU_CPP="/lib/cpp"
2222 ;;
2223
2224 ## ncr machine running svr4.3.
2225 i[3456]86-ncr-sysv4.3 )
2226 machine=ncr386 opsys=usg5-4-3
2227 ;;
2228
2229 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2230 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2231 i[3456]86-ncr-sysv* )
2232 machine=ncr386 opsys=usg5-4-2
2233 ;;
2234
2235 ## Intel Paragon OSF/1
2236 i860-intel-osf1* )
2237 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2238 ;;
2239
2240 ## Intel 860
2241 i860-*-sysv4* )
2242 machine=i860 opsys=usg5-4
2243 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2244 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2245 ;;
2246
c76e04a8
GM
2247 ## Macintosh PowerPC
2248 powerpc*-*-linux-gnu* )
2249 machine=macppc opsys=gnu-linux
2250 ;;
2251
ba4481b5
DL
2252 ## Masscomp machines
2253 m68*-masscomp-rtu* )
2254 machine=masscomp opsys=rtu
2255 ;;
2256
2257 ## Megatest machines
2258 m68*-megatest-bsd* )
2259 machine=mega68 opsys=bsd4-2
2260 ;;
2261
2262 ## Workstations sold by MIPS
2263 ## This is not necessarily all workstations using the MIPS processor -
2264 ## Irises are produced by SGI, and DECstations by DEC.
2265
2266 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2267 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2268 ## it gives for choosing between the alternatives seems to be "Use
2269 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2270 ## the BSD world." I'll assume that these are instructions for
2271 ## handling two odd situations, and that every other situation
2272 ## should use mips.h and usg5-2-2, they being listed first.
2273 mips-mips-usg* )
2274 machine=mips4
2275 ## Fall through to the general code at the bottom to decide on the OS.
2276 ;;
2277 mips-mips-riscos4* )
2278 machine=mips4 opsys=bsd4-3
2279 NON_GNU_CC="cc -systype bsd43"
2280 NON_GNU_CPP="cc -systype bsd43 -E"
2281 ;;
2282 mips-mips-riscos5* )
2283 machine=mips4 opsys=riscos5
2284 NON_GNU_CC="cc -systype bsd43"
2285 NON_GNU_CPP="cc -systype bsd43 -E"
2286 ;;
2287 mips-mips-bsd* )
2288 machine=mips opsys=bsd4-3
2289 ;;
2290 mips-mips-* )
2291 machine=mips opsys=usg5-2-2
2292 ;;
2293
2294 ## NeXT
2295 m68*-next-* | m68k-*-nextstep* )
2296 machine=m68k opsys=nextstep
2297 ;;
2298
2299 ## The complete machine from National Semiconductor
2300 ns32k-ns-genix* )
2301 machine=ns32000 opsys=usg5-2
2302 ;;
2303
2304 ## NCR machines
2305 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2306 machine=tower32 opsys=usg5-2-2
2307 ;;
2308 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2309 machine=tower32v3 opsys=usg5-3
2310 ;;
2311
2312 ## NEC EWS4800
2313 mips-nec-sysv4*)
2314 machine=ews4800 opsys=ux4800
2315 ;;
2316
2317 ## Nixdorf Targon 31
2318 m68*-nixdorf-sysv* )
2319 machine=targon31 opsys=usg5-2-2
2320 ;;
2321
2322 ## Nu (TI or LMI)
2323 m68*-nu-sysv* )
2324 machine=nu opsys=usg5-2
2325 ;;
2326
2327 ## Plexus
2328 m68*-plexus-sysv* )
2329 machine=plexus opsys=usg5-2
2330 ;;
2331
ba4481b5
DL
2332 ## Pyramid machines
2333 ## I don't really have any idea what sort of processor the Pyramid has,
2334 ## so I'm assuming it is its own architecture.
2335 pyramid-pyramid-bsd* )
2336 machine=pyramid opsys=bsd4-2
2337 ;;
2338
2339 ## Sequent Balance
2340 ns32k-sequent-bsd4.2* )
2341 machine=sequent opsys=bsd4-2
2342 ;;
2343 ns32k-sequent-bsd4.3* )
2344 machine=sequent opsys=bsd4-3
2345 ;;
2346
2347 ## Siemens Nixdorf
2348 mips-siemens-sysv* | mips-sni-sysv*)
2349 machine=mips-siemens opsys=usg5-4
2350 NON_GNU_CC=/usr/ccs/bin/cc
2351 NON_GNU_CPP=/usr/ccs/lib/cpp
2352 ;;
2353
2354 ## Silicon Graphics machines
2355 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2356 m68*-sgi-iris3.5* )
2357 machine=irist opsys=iris3-5
2358 ;;
2359 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2360 machine=irist opsys=iris3-6
2361 ;;
2362 ## Iris 4D
2363 mips-sgi-irix3* )
2364 machine=iris4d opsys=irix3-3
2365 ;;
2366 mips-sgi-irix4* )
2367 machine=iris4d opsys=irix4-0
2368 ;;
2369 mips-sgi-irix6.5 )
2370 machine=iris4d opsys=irix6-5
946173ad
DL
2371 # Without defining _LANGUAGE_C, things get masked out in the headers
2372 # so that, for instance, grepping for `free' in stdlib.h fails and
2373 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2374 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2375 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2376 ;;
2377 mips-sgi-irix6* )
2378 machine=iris4d opsys=irix6-0
c4bb2108 2379 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2380 # but presumably it does no harm.
2381 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2382 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2383 NON_GCC_TEST_OPTIONS=-32
2384 ;;
2385 mips-sgi-irix5.[01]* )
2386 machine=iris4d opsys=irix5-0
2387 ;;
2388 mips-sgi-irix5* | mips-sgi-irix* )
2389 machine=iris4d opsys=irix5-2
2390 ;;
2391
2392 ## SONY machines
2393 m68*-sony-bsd4.2* )
2394 machine=news opsys=bsd4-2
2395 ;;
2396 m68*-sony-bsd4.3* )
2397 machine=news opsys=bsd4-3
2398 ;;
2399 m68*-sony-newsos3* | m68*-sony-news3*)
2400 machine=news opsys=bsd4-3
2401 ;;
2402 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2403 machine=news-risc opsys=bsd4-3
2404 ;;
2405 mips-sony-newsos6* )
2406 machine=news-r6 opsys=newsos6
2407 ;;
2408 mips-sony-news* )
2409 machine=news-risc opsys=newsos5
2410 ;;
2411
2412 ## Stride
2413 m68*-stride-sysv* )
2414 machine=stride opsys=usg5-2
2415 ;;
2416
2417 ## Suns
2418 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2419 machine=sparc opsys=gnu-linux
2420 ;;
2421
d054101f 2422 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2423 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2424 | rs6000-*-solaris2*)
2425 case "${canonical}" in
2426 m68*-sunos1* ) machine=sun1 ;;
2427 m68*-sunos2* ) machine=sun2 ;;
2428 m68* ) machine=sun3 ;;
2429 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2430 i[3456]86-*-* ) machine=intel386 ;;
2431 powerpcle* ) machine=powerpcle ;;
2432 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2433 sparc* ) machine=sparc ;;
2434 * ) unported=yes ;;
2435 esac
2436 case "${canonical}" in
2437 ## The Sun386 didn't get past 4.0.
2438 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2439 *-sunos4.0* ) opsys=sunos4-0 ;;
2440 *-sunos4.1.[3-9]*noshare )
2441 ## This name is sunos413 instead of sunos4-1-3
2442 ## to avoid a file name conflict on MSDOS.
2443 opsys=sunos413
2444 NON_GNU_CPP=/usr/lib/cpp
2445 NON_GCC_TEST_OPTIONS=-Bstatic
2446 GCC_TEST_OPTIONS=-static
2447 ;;
2448 *-sunos4.1.[3-9]* | *-sunos4shr*)
2449 opsys=sunos4shr
2450 NON_GNU_CPP=/usr/lib/cpp
2451 ;;
2452 *-sunos4* | *-sunos )
2453 opsys=sunos4-1
2454 NON_GCC_TEST_OPTIONS=-Bstatic
2455 GCC_TEST_OPTIONS=-static
2456 ;;
2457 *-sunos5.3* | *-solaris2.3* )
2458 opsys=sol2-3
2459 NON_GNU_CPP=/usr/ccs/lib/cpp
2460 ;;
2461 *-sunos5.4* | *-solaris2.4* )
2462 opsys=sol2-4
2463 NON_GNU_CPP=/usr/ccs/lib/cpp
2464 RANLIB="ar -ts"
2465 ;;
2466 *-sunos5.5* | *-solaris2.5* )
2467 opsys=sol2-5
2468 NON_GNU_CPP=/usr/ccs/lib/cpp
2469 RANLIB="ar -ts"
2470 ;;
8e967cf7
MR
2471 *-sunos5.6* | *-solaris2.6* )
2472 opsys=sol2-6
2473 NON_GNU_CPP=/usr/ccs/lib/cpp
2474 RANLIB="ar -ts"
2475 ;;
ba4481b5 2476 *-sunos5* | *-solaris* )
9e71690e 2477 opsys=sol2-6
ba4481b5
DL
2478 NON_GNU_CPP=/usr/ccs/lib/cpp
2479 ;;
2480 * ) opsys=bsd4-2 ;;
2481 esac
2482 ## Watch out for a compiler that we know will not work.
2483 case "${canonical}" in
2484 *-solaris* | *-sunos5* )
2485 if [ "x$CC" = x/usr/ucb/cc ]; then
2486 ## /usr/ucb/cc doesn't work;
2487 ## we should find some other compiler that does work.
2488 unset CC
2489 fi
2490 ;;
2491 *) ;;
2492 esac
2493 ;;
2494 sparc-*-nextstep* )
2495 machine=sparc opsys=nextstep
2496 ;;
2497
2498 ## Tadpole 68k
2499 m68*-tadpole-sysv* )
2500 machine=tad68k opsys=usg5-3
2501 ;;
2502
2503 ## Tahoe machines
2504 tahoe-tahoe-bsd4.2* )
2505 machine=tahoe opsys=bsd4-2
2506 ;;
2507 tahoe-tahoe-bsd4.3* )
2508 machine=tahoe opsys=bsd4-3
2509 ;;
2510
2511 ## Tandem Integrity S2
2512 mips-tandem-sysv* )
2513 machine=tandem-s2 opsys=usg5-3
2514 ;;
2515
2516 ## Tektronix XD88
2517 m88k-tektronix-sysv3* )
2518 machine=tekxd88 opsys=usg5-3
2519 ;;
2520
2521 ## Tektronix 16000 box (6130?)
2522 ns16k-tektronix-bsd* )
2523 machine=ns16000 opsys=bsd4-2
2524 ;;
2525 ## Tektronix 4300
2526 ## src/m/tek4300.h hints that this is a m68k machine.
2527 m68*-tektronix-bsd* )
2528 machine=tek4300 opsys=bsd4-3
2529 ;;
2530
2531 ## Titan P2 or P3
2532 ## We seem to have lost the machine-description file titan.h!
2533 titan-titan-sysv* )
2534 machine=titan opsys=usg5-3
2535 ;;
2536
2537 ## Ustation E30 (SS5E)
2538 m68*-unisys-uniplus* )
2539 machine=ustation opsystem=unipl5-2
2540 ;;
2541
2542 ## Vaxen.
2543 vax-dec-* )
2544 machine=vax
2545 case "${canonical}" in
2546 *-bsd4.1* ) opsys=bsd4-1 ;;
2547 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2548 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2549 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2550 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2551 *-vms* ) opsys=vms ;;
2552 * ) unported=yes
2553 esac
2554 ;;
2555
2556 ## Whitechapel MG1
2557 ns16k-whitechapel-* )
2558 machine=mg1
2559 ## We don't know what sort of OS runs on these; we'll let the
2560 ## operating system guessing code below try.
2561 ;;
2562
2563 ## Wicat
2564 m68*-wicat-sysv* )
2565 machine=wicat opsys=usg5-2
2566 ;;
2567
f4988be7
GM
2568 ## IA-64
2569 ia64*-*-linux* )
2570 machine=ia64 opsys=gnu-linux
2571 ;;
2572
ba4481b5
DL
2573 ## Intel 386 machines where we don't care about the manufacturer
2574 i[3456]86-*-* )
2575 machine=intel386
2576 case "${canonical}" in
c60ee5e7 2577 *-cygwin ) opsys=cygwin ;;
eae54018 2578 *-darwin* ) opsys=darwin
23fd4483
ST
2579 CPP="${CC-cc} -E -no-cpp-precomp"
2580 ;;
ba4481b5
DL
2581 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2582 *-isc2.2* ) opsys=isc2-2 ;;
2583 *-isc4.0* ) opsys=isc4-0 ;;
2584 *-isc4.* ) opsys=isc4-1
2585 GCC_TEST_OPTIONS=-posix
2586 NON_GCC_TEST_OPTIONS=-Xp
2587 ;;
2588 *-isc* ) opsys=isc3-0 ;;
2589 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2590 *-esix* ) opsys=esix ;;
2591 *-xenix* ) opsys=xenix ;;
2592 *-linux-gnu* ) opsys=gnu-linux ;;
2593 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2594 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2595 NON_GNU_CPP=/lib/cpp
2596 # Prevent -belf from being passed to $CPP.
2597 # /lib/cpp does not accept it.
2598 OVERRIDE_CPPFLAGS=" "
2599 ;;
2600 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2601 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2602 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2603 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2604 *-nextstep* ) opsys=nextstep ;;
2605 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2606 esac
2607 ;;
2608
2609 ## m68k Linux-based GNU system
2610 m68k-*-linux-gnu* )
2611 machine=m68k opsys=gnu-linux
2612 ;;
2613
2614 ## Mips Linux-based GNU system
cd958eb3 2615 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2616 machine=mips opsys=gnu-linux
2617 ;;
2618
2619 ## UXP/DS
2620 sparc-fujitsu-sysv4* )
2621 machine=sparc opsys=uxpds
2622 NON_GNU_CPP=/usr/ccs/lib/cpp
2623 RANLIB="ar -ts"
2624 ;;
2625
2626 ## UXP/V
2627 f301-fujitsu-uxpv4.1)
2628 machine=f301 opsys=uxpv
2629 ;;
2630
e0f712ba
AC
2631 ## Darwin / Mac OS X
2632 powerpc-apple-darwin* )
2633 machine=powermac opsys=darwin
2634 # Define CPP as follows to make autoconf work correctly.
2a75d75d 2635 CPP="${CC-cc} -E -no-cpp-precomp"
8ae52ca6
RF
2636 # Use fink packages if available.
2637 if test -d /sw/include && test -d /sw/lib; then
2638 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2639 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2640 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2641 fi
e0f712ba
AC
2642 ;;
2643
598a2813
AS
2644 ## AMD x86-64 Linux-based GNU system
2645 x86_64-*-linux-gnu* )
24b01ec4 2646 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2647 ;;
2648
ba4481b5
DL
2649 * )
2650 unported=yes
2651 ;;
2652esac
2653
2654### If the code above didn't choose an operating system, just choose
2655### an operating system based on the configuration name. You really
2656### only want to use this when you have no idea what the right
2657### operating system is; if you know what operating systems a machine
2658### runs, it's cleaner to make it explicit in the case statement
2659### above.
2660if test x"${opsys}" = x; then
2661 case "${canonical}" in
2662 *-gnu* ) opsys=gnu ;;
2663 *-bsd4.[01] ) opsys=bsd4-1 ;;
2664 *-bsd4.2 ) opsys=bsd4-2 ;;
2665 *-bsd4.3 ) opsys=bsd4-3 ;;
2666 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2667 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2668 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2669 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2670 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2671 *-sysv5uw* ) opsys=unixware ;;
2672 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2673 *-sysv4.1* | *-sysvr4.1* )
2674 NON_GNU_CPP=/usr/lib/cpp
2675 opsys=usg5-4 ;;
2676 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2677 if [ x$NON_GNU_CPP = x ]; then
2678 if [ -f /usr/ccs/lib/cpp ]; then
2679 NON_GNU_CPP=/usr/ccs/lib/cpp
2680 else
2681 NON_GNU_CPP=/lib/cpp
2682 fi
2683 fi
2684 opsys=usg5-4-2 ;;
2685 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2686 * )
2687 unported=yes
2688 ;;
2689 esac
2690fi
2691
c0d27fcc 2692
22044edf 2693
ba4481b5 2694if test $unported = yes; then
c0d27fcc 2695 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2696Check \`etc/MACHINES' for recognized configuration names." >&5
2697echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2698Check \`etc/MACHINES' for recognized configuration names." >&2;}
2699 { (exit 1); exit 1; }; }
ba4481b5
DL
2700fi
2701
2702machfile="m/${machine}.h"
2703opsysfile="s/${opsys}.h"
2704
c0d27fcc 2705
ba4481b5
DL
2706#### Choose a compiler.
2707test -n "$CC" && cc_specified=yes
2708
2709# Save the value of CFLAGS that the user specified.
2710SPECIFIED_CFLAGS="$CFLAGS"
2711
2712case ${with_gcc} in
2713 "yes" ) CC="gcc" GCC=yes ;;
2714 "no" ) : ${CC=cc} ;;
503d2be0
AS
2715 * )
2716esac
2717ac_ext=c
2718ac_cpp='$CPP $CPPFLAGS'
2719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2721ac_compiler_gnu=$ac_cv_c_compiler_gnu
2722if test -n "$ac_tool_prefix"; then
2723 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2724set dummy ${ac_tool_prefix}gcc; ac_word=$2
c0d27fcc 2725echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2726echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2727if test "${ac_cv_prog_CC+set}" = set; then
2728 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2729else
2730 if test -n "$CC"; then
2731 ac_cv_prog_CC="$CC" # Let the user override the test.
2732else
c0d27fcc
MR
2733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2734for as_dir in $PATH
2735do
2736 IFS=$as_save_IFS
2737 test -z "$as_dir" && as_dir=.
2738 for ac_exec_ext in '' $ac_executable_extensions; do
2739 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2740 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2741 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2742 break 2
2743 fi
2744done
503d2be0
AS
2745done
2746
ba4481b5
DL
2747fi
2748fi
503d2be0 2749CC=$ac_cv_prog_CC
ba4481b5 2750if test -n "$CC"; then
c0d27fcc 2751 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2752echo "${ECHO_T}$CC" >&6
2753else
c0d27fcc 2754 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2755echo "${ECHO_T}no" >&6
2756fi
2757
2758fi
2759if test -z "$ac_cv_prog_CC"; then
2760 ac_ct_CC=$CC
2761 # Extract the first word of "gcc", so it can be a program name with args.
2762set dummy gcc; ac_word=$2
c0d27fcc 2763echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2764echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2765if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2766 echo $ECHO_N "(cached) $ECHO_C" >&6
2767else
2768 if test -n "$ac_ct_CC"; then
2769 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2770else
c0d27fcc
MR
2771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2772for as_dir in $PATH
2773do
2774 IFS=$as_save_IFS
2775 test -z "$as_dir" && as_dir=.
2776 for ac_exec_ext in '' $ac_executable_extensions; do
2777 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2778 ac_cv_prog_ac_ct_CC="gcc"
2779 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2780 break 2
2781 fi
2782done
503d2be0
AS
2783done
2784
2785fi
2786fi
2787ac_ct_CC=$ac_cv_prog_ac_ct_CC
2788if test -n "$ac_ct_CC"; then
c0d27fcc 2789 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0 2790echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2791else
c0d27fcc 2792 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2793echo "${ECHO_T}no" >&6
2794fi
2795
2796 CC=$ac_ct_CC
2797else
2798 CC="$ac_cv_prog_CC"
ba4481b5
DL
2799fi
2800
2801if test -z "$CC"; then
503d2be0
AS
2802 if test -n "$ac_tool_prefix"; then
2803 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2804set dummy ${ac_tool_prefix}cc; ac_word=$2
c0d27fcc 2805echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2806echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2807if test "${ac_cv_prog_CC+set}" = set; then
2808 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2809else
2810 if test -n "$CC"; then
2811 ac_cv_prog_CC="$CC" # Let the user override the test.
2812else
c0d27fcc
MR
2813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2814for as_dir in $PATH
2815do
2816 IFS=$as_save_IFS
2817 test -z "$as_dir" && as_dir=.
2818 for ac_exec_ext in '' $ac_executable_extensions; do
2819 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2820 ac_cv_prog_CC="${ac_tool_prefix}cc"
2821 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2822 break 2
2823 fi
2824done
503d2be0
AS
2825done
2826
2827fi
2828fi
2829CC=$ac_cv_prog_CC
2830if test -n "$CC"; then
c0d27fcc 2831 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2832echo "${ECHO_T}$CC" >&6
2833else
c0d27fcc 2834 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2835echo "${ECHO_T}no" >&6
2836fi
2837
2838fi
2839if test -z "$ac_cv_prog_CC"; then
2840 ac_ct_CC=$CC
2841 # Extract the first word of "cc", so it can be a program name with args.
2842set dummy cc; ac_word=$2
c0d27fcc 2843echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2844echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2845if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2846 echo $ECHO_N "(cached) $ECHO_C" >&6
2847else
2848 if test -n "$ac_ct_CC"; then
2849 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2850else
c0d27fcc
MR
2851as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2852for as_dir in $PATH
2853do
2854 IFS=$as_save_IFS
2855 test -z "$as_dir" && as_dir=.
2856 for ac_exec_ext in '' $ac_executable_extensions; do
2857 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2858 ac_cv_prog_ac_ct_CC="cc"
2859 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2860 break 2
2861 fi
2862done
503d2be0
AS
2863done
2864
2865fi
2866fi
2867ac_ct_CC=$ac_cv_prog_ac_ct_CC
2868if test -n "$ac_ct_CC"; then
c0d27fcc 2869 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2870echo "${ECHO_T}$ac_ct_CC" >&6
2871else
c0d27fcc 2872 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2873echo "${ECHO_T}no" >&6
2874fi
2875
2876 CC=$ac_ct_CC
2877else
2878 CC="$ac_cv_prog_CC"
2879fi
2880
2881fi
2882if test -z "$CC"; then
2883 # Extract the first word of "cc", so it can be a program name with args.
2884set dummy cc; ac_word=$2
c0d27fcc 2885echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2886echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2887if test "${ac_cv_prog_CC+set}" = set; then
2888 echo $ECHO_N "(cached) $ECHO_C" >&6
2889else
2890 if test -n "$CC"; then
2891 ac_cv_prog_CC="$CC" # Let the user override the test.
2892else
2893 ac_prog_rejected=no
c0d27fcc
MR
2894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2895for as_dir in $PATH
2896do
2897 IFS=$as_save_IFS
2898 test -z "$as_dir" && as_dir=.
2899 for ac_exec_ext in '' $ac_executable_extensions; do
2900 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2901 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2902 ac_prog_rejected=yes
2903 continue
2904 fi
2905 ac_cv_prog_CC="cc"
2906 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2907 break 2
2908 fi
2909done
503d2be0
AS
2910done
2911
ba4481b5
DL
2912if test $ac_prog_rejected = yes; then
2913 # We found a bogon in the path, so make sure we never use it.
2914 set dummy $ac_cv_prog_CC
2915 shift
503d2be0 2916 if test $# != 0; then
ba4481b5
DL
2917 # We chose a different compiler from the bogus one.
2918 # However, it has the same basename, so the bogon will be chosen
2919 # first if we set CC to just the basename; use the full file name.
2920 shift
6bae0ccf 2921 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2922 fi
2923fi
2924fi
2925fi
503d2be0 2926CC=$ac_cv_prog_CC
ba4481b5 2927if test -n "$CC"; then
c0d27fcc 2928 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2929echo "${ECHO_T}$CC" >&6
ba4481b5 2930else
c0d27fcc 2931 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2932echo "${ECHO_T}no" >&6
ba4481b5
DL
2933fi
2934
503d2be0
AS
2935fi
2936if test -z "$CC"; then
2937 if test -n "$ac_tool_prefix"; then
2938 for ac_prog in cl
2939 do
2940 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2941set dummy $ac_tool_prefix$ac_prog; ac_word=$2
c0d27fcc 2942echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2943echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2944if test "${ac_cv_prog_CC+set}" = set; then
2945 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2946else
2947 if test -n "$CC"; then
2948 ac_cv_prog_CC="$CC" # Let the user override the test.
2949else
c0d27fcc
MR
2950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2951for as_dir in $PATH
2952do
2953 IFS=$as_save_IFS
2954 test -z "$as_dir" && as_dir=.
2955 for ac_exec_ext in '' $ac_executable_extensions; do
2956 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2957 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2958 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2959 break 2
2960 fi
2961done
503d2be0
AS
2962done
2963
c4bb2108
DL
2964fi
2965fi
503d2be0 2966CC=$ac_cv_prog_CC
c4bb2108 2967if test -n "$CC"; then
c0d27fcc 2968 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2969echo "${ECHO_T}$CC" >&6
c4bb2108 2970else
c0d27fcc 2971 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2972echo "${ECHO_T}no" >&6
2973fi
2974
2975 test -n "$CC" && break
2976 done
2977fi
2978if test -z "$CC"; then
2979 ac_ct_CC=$CC
2980 for ac_prog in cl
2981do
2982 # Extract the first word of "$ac_prog", so it can be a program name with args.
2983set dummy $ac_prog; ac_word=$2
c0d27fcc 2984echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2985echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2986if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2987 echo $ECHO_N "(cached) $ECHO_C" >&6
2988else
2989 if test -n "$ac_ct_CC"; then
2990 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2991else
c0d27fcc
MR
2992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2993for as_dir in $PATH
2994do
2995 IFS=$as_save_IFS
2996 test -z "$as_dir" && as_dir=.
2997 for ac_exec_ext in '' $ac_executable_extensions; do
2998 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2999 ac_cv_prog_ac_ct_CC="$ac_prog"
3000 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3001 break 2
3002 fi
3003done
503d2be0
AS
3004done
3005
c4bb2108 3006fi
503d2be0
AS
3007fi
3008ac_ct_CC=$ac_cv_prog_ac_ct_CC
3009if test -n "$ac_ct_CC"; then
c0d27fcc 3010 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
3011echo "${ECHO_T}$ac_ct_CC" >&6
3012else
c0d27fcc 3013 echo "$as_me:$LINENO: result: no" >&5
503d2be0 3014echo "${ECHO_T}no" >&6
ba4481b5
DL
3015fi
3016
503d2be0
AS
3017 test -n "$ac_ct_CC" && break
3018done
ba4481b5 3019
503d2be0
AS
3020 CC=$ac_ct_CC
3021fi
3022
3023fi
ba4481b5 3024
c0d27fcc 3025
19650fd6
AS
3026test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3027See \`config.log' for more details." >&5
3028echo "$as_me: error: no acceptable C compiler found in \$PATH
3029See \`config.log' for more details." >&2;}
503d2be0 3030 { (exit 1); exit 1; }; }
c4bb2108 3031
503d2be0 3032# Provide some information about the compiler.
c0d27fcc 3033echo "$as_me:$LINENO:" \
503d2be0
AS
3034 "checking for C compiler version" >&5
3035ac_compiler=`set X $ac_compile; echo $2`
c0d27fcc 3036{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
3037 (eval $ac_compiler --version </dev/null >&5) 2>&5
3038 ac_status=$?
c0d27fcc 3039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3040 (exit $ac_status); }
c0d27fcc 3041{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
3042 (eval $ac_compiler -v </dev/null >&5) 2>&5
3043 ac_status=$?
c0d27fcc 3044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3045 (exit $ac_status); }
c0d27fcc 3046{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
3047 (eval $ac_compiler -V </dev/null >&5) 2>&5
3048 ac_status=$?
c0d27fcc 3049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3050 (exit $ac_status); }
3051
3052cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3053/* confdefs.h. */
3054_ACEOF
3055cat confdefs.h >>conftest.$ac_ext
3056cat >>conftest.$ac_ext <<_ACEOF
3057/* end confdefs.h. */
c4bb2108 3058
503d2be0
AS
3059int
3060main ()
3061{
3062
3063 ;
3064 return 0;
3065}
3066_ACEOF
3067ac_clean_files_save=$ac_clean_files
19650fd6 3068ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3069# Try to create an executable without -o first, disregard a.out.
3070# It will help us diagnose broken compilers, and finding out an intuition
3071# of exeext.
edfaf76d
LK
3072echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3073echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
503d2be0 3074ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
c0d27fcc 3075if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
503d2be0
AS
3076 (eval $ac_link_default) 2>&5
3077 ac_status=$?
c0d27fcc 3078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3079 (exit $ac_status); }; then
3080 # Find the output, starting from the most likely. This scheme is
3081# not robust to junk in `.', hence go to wildcards (a.*) only as a last
3082# resort.
c0d27fcc
MR
3083
3084# Be careful to initialize this variable, since it used to be cached.
3085# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
3086ac_cv_exeext=
19650fd6
AS
3087# b.out is created by i960 compilers.
3088for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
3089do
6bae0ccf 3090 test -f "$ac_file" || continue
503d2be0 3091 case $ac_file in
19650fd6 3092 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
edfaf76d 3093 ;;
19650fd6 3094 conftest.$ac_ext )
edfaf76d
LK
3095 # This is the source file.
3096 ;;
19650fd6 3097 [ab].out )
edfaf76d
LK
3098 # We found the default executable, but exeext='' is most
3099 # certainly right.
3100 break;;
19650fd6 3101 *.* )
edfaf76d
LK
3102 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3103 # FIXME: I believe we export ac_cv_exeext for Libtool,
3104 # but it would be cool to find out if it's true. Does anybody
3105 # maintain Libtool? --akim.
3106 export ac_cv_exeext
3107 break;;
19650fd6 3108 * )
edfaf76d 3109 break;;
503d2be0
AS
3110 esac
3111done
3112else
3113 echo "$as_me: failed program was:" >&5
19650fd6
AS
3114sed 's/^/| /' conftest.$ac_ext >&5
3115
6bae0ccf 3116{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3117See \`config.log' for more details." >&5
6bae0ccf 3118echo "$as_me: error: C compiler cannot create executables
19650fd6 3119See \`config.log' for more details." >&2;}
503d2be0
AS
3120 { (exit 77); exit 77; }; }
3121fi
3122
3123ac_exeext=$ac_cv_exeext
c0d27fcc 3124echo "$as_me:$LINENO: result: $ac_file" >&5
503d2be0
AS
3125echo "${ECHO_T}$ac_file" >&6
3126
3127# Check the compiler produces executables we can run. If not, either
3128# the compiler is broken, or we cross compile.
c0d27fcc 3129echo "$as_me:$LINENO: checking whether the C compiler works" >&5
503d2be0
AS
3130echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
3131# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3132# If not cross compiling, check that we can run a simple program.
3133if test "$cross_compiling" != yes; then
3134 if { ac_try='./$ac_file'
c0d27fcc 3135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3136 (eval $ac_try) 2>&5
3137 ac_status=$?
c0d27fcc 3138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3139 (exit $ac_status); }; }; then
3140 cross_compiling=no
ba4481b5 3141 else
503d2be0
AS
3142 if test "$cross_compiling" = maybe; then
3143 cross_compiling=yes
3144 else
c0d27fcc 3145 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3146If you meant to cross compile, use \`--host'.
3147See \`config.log' for more details." >&5
503d2be0 3148echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3149If you meant to cross compile, use \`--host'.
3150See \`config.log' for more details." >&2;}
503d2be0
AS
3151 { (exit 1); exit 1; }; }
3152 fi
ba4481b5 3153 fi
503d2be0 3154fi
c0d27fcc 3155echo "$as_me:$LINENO: result: yes" >&5
503d2be0
AS
3156echo "${ECHO_T}yes" >&6
3157
19650fd6 3158rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0
AS
3159ac_clean_files=$ac_clean_files_save
3160# Check the compiler produces executables we can run. If not, either
3161# the compiler is broken, or we cross compile.
c0d27fcc 3162echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
503d2be0 3163echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
c0d27fcc 3164echo "$as_me:$LINENO: result: $cross_compiling" >&5
503d2be0
AS
3165echo "${ECHO_T}$cross_compiling" >&6
3166
c0d27fcc
MR
3167echo "$as_me:$LINENO: checking for suffix of executables" >&5
3168echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3169if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
3170 (eval $ac_link) 2>&5
3171 ac_status=$?
c0d27fcc 3172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3173 (exit $ac_status); }; then
3174 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3175# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3176# work properly (i.e., refer to `conftest.exe'), while it won't with
3177# `rm'.
6bae0ccf
DL
3178for ac_file in conftest.exe conftest conftest.*; do
3179 test -f "$ac_file" || continue
503d2be0 3180 case $ac_file in
6bae0ccf 3181 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
503d2be0 3182 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d
LK
3183 export ac_cv_exeext
3184 break;;
503d2be0
AS
3185 * ) break;;
3186 esac
3187done
ba4481b5 3188else
19650fd6
AS
3189 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3190See \`config.log' for more details." >&5
3191echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3192See \`config.log' for more details." >&2;}
503d2be0 3193 { (exit 1); exit 1; }; }
ba4481b5 3194fi
ba4481b5 3195
503d2be0 3196rm -f conftest$ac_cv_exeext
c0d27fcc 3197echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
503d2be0 3198echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 3199
503d2be0
AS
3200rm -f conftest.$ac_ext
3201EXEEXT=$ac_cv_exeext
3202ac_exeext=$EXEEXT
c0d27fcc
MR
3203echo "$as_me:$LINENO: checking for suffix of object files" >&5
3204echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
503d2be0
AS
3205if test "${ac_cv_objext+set}" = set; then
3206 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3207else
503d2be0 3208 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3209/* confdefs.h. */
3210_ACEOF
3211cat confdefs.h >>conftest.$ac_ext
3212cat >>conftest.$ac_ext <<_ACEOF
3213/* end confdefs.h. */
ba4481b5 3214
503d2be0
AS
3215int
3216main ()
3217{
ba4481b5 3218
503d2be0
AS
3219 ;
3220 return 0;
3221}
3222_ACEOF
3223rm -f conftest.o conftest.obj
c0d27fcc 3224if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3225 (eval $ac_compile) 2>&5
3226 ac_status=$?
c0d27fcc 3227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3228 (exit $ac_status); }; then
3229 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3230 case $ac_file in
6bae0ccf 3231 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
503d2be0
AS
3232 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3233 break;;
3234 esac
3235done
c4bb2108 3236else
503d2be0 3237 echo "$as_me: failed program was:" >&5
19650fd6
AS
3238sed 's/^/| /' conftest.$ac_ext >&5
3239
3240{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3241See \`config.log' for more details." >&5
3242echo "$as_me: error: cannot compute suffix of object files: cannot compile
3243See \`config.log' for more details." >&2;}
503d2be0 3244 { (exit 1); exit 1; }; }
c4bb2108
DL
3245fi
3246
503d2be0
AS
3247rm -f conftest.$ac_cv_objext conftest.$ac_ext
3248fi
c0d27fcc 3249echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
503d2be0
AS
3250echo "${ECHO_T}$ac_cv_objext" >&6
3251OBJEXT=$ac_cv_objext
3252ac_objext=$OBJEXT
c0d27fcc 3253echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
3254echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3255if test "${ac_cv_c_compiler_gnu+set}" = set; then
3256 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3257else
503d2be0 3258 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3259/* confdefs.h. */
3260_ACEOF
3261cat confdefs.h >>conftest.$ac_ext
3262cat >>conftest.$ac_ext <<_ACEOF
3263/* end confdefs.h. */
503d2be0
AS
3264
3265int
3266main ()
3267{
3268#ifndef __GNUC__
3269 choke me
3270#endif
3271
3272 ;
3273 return 0;
3274}
3275_ACEOF
3276rm -f conftest.$ac_objext
c0d27fcc 3277if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3278 (eval $ac_compile) 2>conftest.er1
503d2be0 3279 ac_status=$?
edfaf76d
LK
3280 grep -v '^ *+' conftest.er1 >conftest.err
3281 rm -f conftest.er1
3282 cat conftest.err >&5
c0d27fcc 3283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3284 (exit $ac_status); } &&
e143ad11
AS
3285 { ac_try='test -z "$ac_c_werror_flag"
3286 || test ! -s conftest.err'
edfaf76d
LK
3287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3288 (eval $ac_try) 2>&5
3289 ac_status=$?
3290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3291 (exit $ac_status); }; } &&
3292 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3294 (eval $ac_try) 2>&5
3295 ac_status=$?
c0d27fcc 3296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3297 (exit $ac_status); }; }; then
3298 ac_compiler_gnu=yes
3299else
3300 echo "$as_me: failed program was:" >&5
19650fd6
AS
3301sed 's/^/| /' conftest.$ac_ext >&5
3302
503d2be0
AS
3303ac_compiler_gnu=no
3304fi
edfaf76d 3305rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3306ac_cv_c_compiler_gnu=$ac_compiler_gnu
3307
3308fi
c0d27fcc 3309echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
3310echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3311GCC=`test $ac_compiler_gnu = yes && echo yes`
3312ac_test_CFLAGS=${CFLAGS+set}
3313ac_save_CFLAGS=$CFLAGS
3314CFLAGS="-g"
c0d27fcc 3315echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
503d2be0
AS
3316echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3317if test "${ac_cv_prog_cc_g+set}" = set; then
3318 echo $ECHO_N "(cached) $ECHO_C" >&6
3319else
3320 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3321/* confdefs.h. */
3322_ACEOF
3323cat confdefs.h >>conftest.$ac_ext
3324cat >>conftest.$ac_ext <<_ACEOF
3325/* end confdefs.h. */
503d2be0
AS
3326
3327int
3328main ()
3329{
3330
3331 ;
3332 return 0;
3333}
3334_ACEOF
3335rm -f conftest.$ac_objext
c0d27fcc 3336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3337 (eval $ac_compile) 2>conftest.er1
503d2be0 3338 ac_status=$?
edfaf76d
LK
3339 grep -v '^ *+' conftest.er1 >conftest.err
3340 rm -f conftest.er1
3341 cat conftest.err >&5
c0d27fcc 3342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3343 (exit $ac_status); } &&
e143ad11
AS
3344 { ac_try='test -z "$ac_c_werror_flag"
3345 || test ! -s conftest.err'
edfaf76d
LK
3346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3347 (eval $ac_try) 2>&5
3348 ac_status=$?
3349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3350 (exit $ac_status); }; } &&
3351 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3353 (eval $ac_try) 2>&5
3354 ac_status=$?
c0d27fcc 3355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3356 (exit $ac_status); }; }; then
ba4481b5
DL
3357 ac_cv_prog_cc_g=yes
3358else
503d2be0 3359 echo "$as_me: failed program was:" >&5
19650fd6
AS
3360sed 's/^/| /' conftest.$ac_ext >&5
3361
503d2be0 3362ac_cv_prog_cc_g=no
ba4481b5 3363fi
edfaf76d 3364rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 3365fi
c0d27fcc 3366echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
503d2be0 3367echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 3368if test "$ac_test_CFLAGS" = set; then
503d2be0 3369 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3370elif test $ac_cv_prog_cc_g = yes; then
3371 if test "$GCC" = yes; then
ba4481b5
DL
3372 CFLAGS="-g -O2"
3373 else
c4bb2108 3374 CFLAGS="-g"
ba4481b5 3375 fi
22afa6e8 3376else
c4bb2108
DL
3377 if test "$GCC" = yes; then
3378 CFLAGS="-O2"
3379 else
3380 CFLAGS=
3381 fi
ba4481b5 3382fi
6bae0ccf
DL
3383echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3384echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3385if test "${ac_cv_prog_cc_stdc+set}" = set; then
3386 echo $ECHO_N "(cached) $ECHO_C" >&6
3387else
3388 ac_cv_prog_cc_stdc=no
3389ac_save_CC=$CC
3390cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3391/* confdefs.h. */
3392_ACEOF
3393cat confdefs.h >>conftest.$ac_ext
3394cat >>conftest.$ac_ext <<_ACEOF
3395/* end confdefs.h. */
6bae0ccf
DL
3396#include <stdarg.h>
3397#include <stdio.h>
3398#include <sys/types.h>
3399#include <sys/stat.h>
3400/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3401struct buf { int x; };
3402FILE * (*rcsopen) (struct buf *, struct stat *, int);
3403static char *e (p, i)
3404 char **p;
3405 int i;
3406{
3407 return p[i];
3408}
3409static char *f (char * (*g) (char **, int), char **p, ...)
3410{
3411 char *s;
3412 va_list v;
3413 va_start (v,p);
3414 s = g (p, va_arg (v,int));
3415 va_end (v);
3416 return s;
3417}
edfaf76d
LK
3418
3419/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3420 function prototypes and stuff, but not '\xHH' hex character constants.
3421 These don't provoke an error unfortunately, instead are silently treated
3422 as 'x'. The following induces an error, until -std1 is added to get
3423 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3424 array size at least. It's necessary to write '\x00'==0 to get something
3425 that's true only with -std1. */
3426int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3427
6bae0ccf
DL
3428int test (int i, double x);
3429struct s1 {int (*f) (int a);};
3430struct s2 {int (*f) (double a);};
3431int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3432int argc;
3433char **argv;
3434int
3435main ()
3436{
3437return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3438 ;
3439 return 0;
3440}
3441_ACEOF
3442# Don't try gcc -ansi; that turns off useful extensions and
3443# breaks some systems' header files.
3444# AIX -qlanglvl=ansi
3445# Ultrix and OSF/1 -std1
3446# HP-UX 10.20 and later -Ae
3447# HP-UX older versions -Aa -D_HPUX_SOURCE
3448# SVR4 -Xc -D__EXTENSIONS__
3449for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3450do
3451 CC="$ac_save_CC $ac_arg"
3452 rm -f conftest.$ac_objext
3453if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3454 (eval $ac_compile) 2>conftest.er1
6bae0ccf 3455 ac_status=$?
edfaf76d
LK
3456 grep -v '^ *+' conftest.er1 >conftest.err
3457 rm -f conftest.er1
3458 cat conftest.err >&5
6bae0ccf
DL
3459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3460 (exit $ac_status); } &&
e143ad11
AS
3461 { ac_try='test -z "$ac_c_werror_flag"
3462 || test ! -s conftest.err'
edfaf76d
LK
3463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3464 (eval $ac_try) 2>&5
3465 ac_status=$?
3466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3467 (exit $ac_status); }; } &&
3468 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
3469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3470 (eval $ac_try) 2>&5
3471 ac_status=$?
3472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3473 (exit $ac_status); }; }; then
3474 ac_cv_prog_cc_stdc=$ac_arg
3475break
3476else
3477 echo "$as_me: failed program was:" >&5
19650fd6
AS
3478sed 's/^/| /' conftest.$ac_ext >&5
3479
6bae0ccf 3480fi
edfaf76d 3481rm -f conftest.err conftest.$ac_objext
6bae0ccf
DL
3482done
3483rm -f conftest.$ac_ext conftest.$ac_objext
3484CC=$ac_save_CC
3485
3486fi
3487
3488case "x$ac_cv_prog_cc_stdc" in
3489 x|xno)
3490 echo "$as_me:$LINENO: result: none needed" >&5
3491echo "${ECHO_T}none needed" >&6 ;;
3492 *)
3493 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3494echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3495 CC="$CC $ac_cv_prog_cc_stdc" ;;
3496esac
3497
503d2be0
AS
3498# Some people use a C++ compiler to compile C. Since we use `exit',
3499# in C++ we need to declare it. In case someone uses the same compiler
3500# for both compiling C and C++ we need to have the C++ compiler decide
3501# the declaration of exit, since it's the most demanding environment.
3502cat >conftest.$ac_ext <<_ACEOF
3503#ifndef __cplusplus
3504 choke me
3505#endif
3506_ACEOF
3507rm -f conftest.$ac_objext
c0d27fcc 3508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3509 (eval $ac_compile) 2>conftest.er1
503d2be0 3510 ac_status=$?
edfaf76d
LK
3511 grep -v '^ *+' conftest.er1 >conftest.err
3512 rm -f conftest.er1
3513 cat conftest.err >&5
c0d27fcc 3514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3515 (exit $ac_status); } &&
e143ad11
AS
3516 { ac_try='test -z "$ac_c_werror_flag"
3517 || test ! -s conftest.err'
edfaf76d
LK
3518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3519 (eval $ac_try) 2>&5
3520 ac_status=$?
3521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3522 (exit $ac_status); }; } &&
3523 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3525 (eval $ac_try) 2>&5
3526 ac_status=$?
c0d27fcc 3527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3528 (exit $ac_status); }; }; then
3529 for ac_declaration in \
edfaf76d 3530 '' \
503d2be0
AS
3531 'extern "C" void std::exit (int) throw (); using std::exit;' \
3532 'extern "C" void std::exit (int); using std::exit;' \
3533 'extern "C" void exit (int) throw ();' \
3534 'extern "C" void exit (int);' \
cffcede7 3535 'void exit (int);'
503d2be0
AS
3536do
3537 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3538/* confdefs.h. */
3539_ACEOF
3540cat confdefs.h >>conftest.$ac_ext
3541cat >>conftest.$ac_ext <<_ACEOF
3542/* end confdefs.h. */
7c9e5167 3543$ac_declaration
edfaf76d 3544#include <stdlib.h>
503d2be0
AS
3545int
3546main ()
3547{
3548exit (42);
3549 ;
3550 return 0;
3551}
3552_ACEOF
3553rm -f conftest.$ac_objext
c0d27fcc 3554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3555 (eval $ac_compile) 2>conftest.er1
503d2be0 3556 ac_status=$?
edfaf76d
LK
3557 grep -v '^ *+' conftest.er1 >conftest.err
3558 rm -f conftest.er1
3559 cat conftest.err >&5
c0d27fcc 3560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3561 (exit $ac_status); } &&
e143ad11
AS
3562 { ac_try='test -z "$ac_c_werror_flag"
3563 || test ! -s conftest.err'
edfaf76d
LK
3564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3565 (eval $ac_try) 2>&5
3566 ac_status=$?
3567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3568 (exit $ac_status); }; } &&
3569 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3571 (eval $ac_try) 2>&5
3572 ac_status=$?
c0d27fcc 3573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3574 (exit $ac_status); }; }; then
3575 :
3576else
3577 echo "$as_me: failed program was:" >&5
19650fd6
AS
3578sed 's/^/| /' conftest.$ac_ext >&5
3579
503d2be0
AS
3580continue
3581fi
edfaf76d 3582rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 3583 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3584/* confdefs.h. */
3585_ACEOF
3586cat confdefs.h >>conftest.$ac_ext
3587cat >>conftest.$ac_ext <<_ACEOF
3588/* end confdefs.h. */
503d2be0
AS
3589$ac_declaration
3590int
3591main ()
3592{
3593exit (42);
3594 ;
3595 return 0;
3596}
3597_ACEOF
3598rm -f conftest.$ac_objext
c0d27fcc 3599if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3600 (eval $ac_compile) 2>conftest.er1
503d2be0 3601 ac_status=$?
edfaf76d
LK
3602 grep -v '^ *+' conftest.er1 >conftest.err
3603 rm -f conftest.er1
3604 cat conftest.err >&5
c0d27fcc 3605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3606 (exit $ac_status); } &&
e143ad11
AS
3607 { ac_try='test -z "$ac_c_werror_flag"
3608 || test ! -s conftest.err'
edfaf76d
LK
3609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3610 (eval $ac_try) 2>&5
3611 ac_status=$?
3612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3613 (exit $ac_status); }; } &&
3614 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3616 (eval $ac_try) 2>&5
3617 ac_status=$?
c0d27fcc 3618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3619 (exit $ac_status); }; }; then
3620 break
3621else
3622 echo "$as_me: failed program was:" >&5
19650fd6
AS
3623sed 's/^/| /' conftest.$ac_ext >&5
3624
503d2be0 3625fi
edfaf76d 3626rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3627done
3628rm -f conftest*
3629if test -n "$ac_declaration"; then
3630 echo '#ifdef __cplusplus' >>confdefs.h
3631 echo $ac_declaration >>confdefs.h
3632 echo '#endif' >>confdefs.h
3633fi
ba4481b5 3634
503d2be0
AS
3635else
3636 echo "$as_me: failed program was:" >&5
19650fd6
AS
3637sed 's/^/| /' conftest.$ac_ext >&5
3638
503d2be0 3639fi
edfaf76d 3640rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3641ac_ext=c
3642ac_cpp='$CPP $CPPFLAGS'
3643ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3644ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3645ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3646
c0d27fcc 3647
ba4481b5
DL
3648# On Suns, sometimes $CPP names a directory.
3649if test -n "$CPP" && test -d "$CPP"; then
3650 CPP=
3651fi
3652
3653#### Some systems specify a CPP to use unless we are using GCC.
3654#### Now that we know whether we are using GCC, we can decide whether
3655#### to use that one.
3656if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3657then
3658 CPP="$NON_GNU_CPP"
3659fi
3660
3661#### Some systems specify a CC to use unless we are using GCC.
3662#### Now that we know whether we are using GCC, we can decide whether
3663#### to use that one.
3664if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3665 test x$cc_specified != xyes
3666then
3667 CC="$NON_GNU_CC"
3668fi
3669
3670if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3671then
3672 CC="$CC $GCC_TEST_OPTIONS"
3673fi
3674
3675if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3676then
3677 CC="$CC $NON_GCC_TEST_OPTIONS"
3678fi
3679
e143ad11
AS
3680
3681ac_ext=c
3682ac_cpp='$CPP $CPPFLAGS'
3683ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3684ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3685ac_compiler_gnu=$ac_cv_c_compiler_gnu
3686echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3687echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3688# On Suns, sometimes $CPP names a directory.
3689if test -n "$CPP" && test -d "$CPP"; then
3690 CPP=
3691fi
3692if test -z "$CPP"; then
3693 if test "${ac_cv_prog_CPP+set}" = set; then
3694 echo $ECHO_N "(cached) $ECHO_C" >&6
3695else
3696 # Double quotes because CPP needs to be expanded
3697 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3698 do
3699 ac_preproc_ok=false
3700for ac_c_preproc_warn_flag in '' yes
3701do
3702 # Use a header file that comes with gcc, so configuring glibc
3703 # with a fresh cross-compiler works.
3704 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3705 # <limits.h> exists even on freestanding compilers.
3706 # On the NeXT, cc -E runs the code through the compiler's parser,
3707 # not just through cpp. "Syntax error" is here to catch this case.
3708 cat >conftest.$ac_ext <<_ACEOF
3709/* confdefs.h. */
3710_ACEOF
3711cat confdefs.h >>conftest.$ac_ext
3712cat >>conftest.$ac_ext <<_ACEOF
3713/* end confdefs.h. */
3714#ifdef __STDC__
3715# include <limits.h>
3716#else
3717# include <assert.h>
3718#endif
3719 Syntax error
3720_ACEOF
3721if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3722 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3723 ac_status=$?
3724 grep -v '^ *+' conftest.er1 >conftest.err
3725 rm -f conftest.er1
3726 cat conftest.err >&5
3727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3728 (exit $ac_status); } >/dev/null; then
3729 if test -s conftest.err; then
3730 ac_cpp_err=$ac_c_preproc_warn_flag
3731 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3732 else
3733 ac_cpp_err=
3734 fi
3735else
3736 ac_cpp_err=yes
3737fi
3738if test -z "$ac_cpp_err"; then
3739 :
3740else
3741 echo "$as_me: failed program was:" >&5
3742sed 's/^/| /' conftest.$ac_ext >&5
3743
3744 # Broken: fails on valid input.
3745continue
3746fi
3747rm -f conftest.err conftest.$ac_ext
3748
3749 # OK, works on sane cases. Now check whether non-existent headers
3750 # can be detected and how.
3751 cat >conftest.$ac_ext <<_ACEOF
3752/* confdefs.h. */
3753_ACEOF
3754cat confdefs.h >>conftest.$ac_ext
3755cat >>conftest.$ac_ext <<_ACEOF
3756/* end confdefs.h. */
3757#include <ac_nonexistent.h>
3758_ACEOF
3759if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3760 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3761 ac_status=$?
3762 grep -v '^ *+' conftest.er1 >conftest.err
3763 rm -f conftest.er1
3764 cat conftest.err >&5
3765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3766 (exit $ac_status); } >/dev/null; then
3767 if test -s conftest.err; then
3768 ac_cpp_err=$ac_c_preproc_warn_flag
3769 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3770 else
3771 ac_cpp_err=
3772 fi
3773else
3774 ac_cpp_err=yes
3775fi
3776if test -z "$ac_cpp_err"; then
3777 # Broken: success on invalid input.
3778continue
3779else
3780 echo "$as_me: failed program was:" >&5
3781sed 's/^/| /' conftest.$ac_ext >&5
3782
3783 # Passes both tests.
3784ac_preproc_ok=:
3785break
3786fi
3787rm -f conftest.err conftest.$ac_ext
3788
3789done
3790# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3791rm -f conftest.err conftest.$ac_ext
3792if $ac_preproc_ok; then
3793 break
3794fi
3795
3796 done
3797 ac_cv_prog_CPP=$CPP
3798
3799fi
3800 CPP=$ac_cv_prog_CPP
3801else
3802 ac_cv_prog_CPP=$CPP
3803fi
3804echo "$as_me:$LINENO: result: $CPP" >&5
3805echo "${ECHO_T}$CPP" >&6
3806ac_preproc_ok=false
3807for ac_c_preproc_warn_flag in '' yes
3808do
3809 # Use a header file that comes with gcc, so configuring glibc
3810 # with a fresh cross-compiler works.
3811 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3812 # <limits.h> exists even on freestanding compilers.
3813 # On the NeXT, cc -E runs the code through the compiler's parser,
3814 # not just through cpp. "Syntax error" is here to catch this case.
3815 cat >conftest.$ac_ext <<_ACEOF
3816/* confdefs.h. */
3817_ACEOF
3818cat confdefs.h >>conftest.$ac_ext
3819cat >>conftest.$ac_ext <<_ACEOF
3820/* end confdefs.h. */
3821#ifdef __STDC__
3822# include <limits.h>
3823#else
3824# include <assert.h>
3825#endif
3826 Syntax error
3827_ACEOF
3828if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3829 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3830 ac_status=$?
3831 grep -v '^ *+' conftest.er1 >conftest.err
3832 rm -f conftest.er1
3833 cat conftest.err >&5
3834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3835 (exit $ac_status); } >/dev/null; then
3836 if test -s conftest.err; then
3837 ac_cpp_err=$ac_c_preproc_warn_flag
3838 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3839 else
3840 ac_cpp_err=
3841 fi
3842else
3843 ac_cpp_err=yes
3844fi
3845if test -z "$ac_cpp_err"; then
3846 :
3847else
3848 echo "$as_me: failed program was:" >&5
3849sed 's/^/| /' conftest.$ac_ext >&5
3850
3851 # Broken: fails on valid input.
3852continue
3853fi
3854rm -f conftest.err conftest.$ac_ext
3855
3856 # OK, works on sane cases. Now check whether non-existent headers
3857 # can be detected and how.
3858 cat >conftest.$ac_ext <<_ACEOF
3859/* confdefs.h. */
3860_ACEOF
3861cat confdefs.h >>conftest.$ac_ext
3862cat >>conftest.$ac_ext <<_ACEOF
3863/* end confdefs.h. */
3864#include <ac_nonexistent.h>
3865_ACEOF
3866if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3867 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3868 ac_status=$?
3869 grep -v '^ *+' conftest.er1 >conftest.err
3870 rm -f conftest.er1
3871 cat conftest.err >&5
3872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3873 (exit $ac_status); } >/dev/null; then
3874 if test -s conftest.err; then
3875 ac_cpp_err=$ac_c_preproc_warn_flag
3876 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3877 else
3878 ac_cpp_err=
3879 fi
3880else
3881 ac_cpp_err=yes
3882fi
3883if test -z "$ac_cpp_err"; then
3884 # Broken: success on invalid input.
3885continue
3886else
3887 echo "$as_me: failed program was:" >&5
3888sed 's/^/| /' conftest.$ac_ext >&5
3889
3890 # Passes both tests.
3891ac_preproc_ok=:
3892break
3893fi
3894rm -f conftest.err conftest.$ac_ext
3895
3896done
3897# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3898rm -f conftest.err conftest.$ac_ext
3899if $ac_preproc_ok; then
3900 :
3901else
3902 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3903See \`config.log' for more details." >&5
3904echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3905See \`config.log' for more details." >&2;}
3906 { (exit 1); exit 1; }; }
3907fi
3908
3909ac_ext=c
3910ac_cpp='$CPP $CPPFLAGS'
3911ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3912ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3913ac_compiler_gnu=$ac_cv_c_compiler_gnu
3914
3915
3916echo "$as_me:$LINENO: checking for egrep" >&5
3917echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3918if test "${ac_cv_prog_egrep+set}" = set; then
3919 echo $ECHO_N "(cached) $ECHO_C" >&6
3920else
3921 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3922 then ac_cv_prog_egrep='grep -E'
3923 else ac_cv_prog_egrep='egrep'
3924 fi
3925fi
3926echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3927echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3928 EGREP=$ac_cv_prog_egrep
3929
3930
3931
3932echo "$as_me:$LINENO: checking for AIX" >&5
3933echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3934cat >conftest.$ac_ext <<_ACEOF
3935/* confdefs.h. */
3936_ACEOF
3937cat confdefs.h >>conftest.$ac_ext
3938cat >>conftest.$ac_ext <<_ACEOF
3939/* end confdefs.h. */
3940#ifdef _AIX
3941 yes
3942#endif
3943
3944_ACEOF
3945if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3946 $EGREP "yes" >/dev/null 2>&1; then
3947 echo "$as_me:$LINENO: result: yes" >&5
3948echo "${ECHO_T}yes" >&6
3949cat >>confdefs.h <<\_ACEOF
3950#define _ALL_SOURCE 1
3951_ACEOF
3952
3953else
3954 echo "$as_me:$LINENO: result: no" >&5
3955echo "${ECHO_T}no" >&6
3956fi
3957rm -f conftest*
3958
3959
3960
3961cat >>confdefs.h <<\_ACEOF
3962#define _GNU_SOURCE 1
3963_ACEOF
3964
3965
3966
01abe918
CY
3967### Use -Wno-pointer-sign if the compiler supports it
3968echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
3969echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6
3970SAVE_CFLAGS="$CFLAGS"
3971CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
3972cat >conftest.$ac_ext <<_ACEOF
3973/* confdefs.h. */
3974_ACEOF
3975cat confdefs.h >>conftest.$ac_ext
3976cat >>conftest.$ac_ext <<_ACEOF
3977/* end confdefs.h. */
3978
3979int
3980main ()
3981{
3982
3983 ;
3984 return 0;
3985}
3986_ACEOF
3987rm -f conftest.$ac_objext
3988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3989 (eval $ac_compile) 2>conftest.er1
3990 ac_status=$?
3991 grep -v '^ *+' conftest.er1 >conftest.err
3992 rm -f conftest.er1
3993 cat conftest.err >&5
3994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3995 (exit $ac_status); } &&
e143ad11
AS
3996 { ac_try='test -z "$ac_c_werror_flag"
3997 || test ! -s conftest.err'
01abe918
CY
3998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3999 (eval $ac_try) 2>&5
4000 ac_status=$?
4001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4002 (exit $ac_status); }; } &&
4003 { ac_try='test -s conftest.$ac_objext'
4004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4005 (eval $ac_try) 2>&5
4006 ac_status=$?
4007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4008 (exit $ac_status); }; }; then
4009 has_option=yes
4010else
4011 echo "$as_me: failed program was:" >&5
4012sed 's/^/| /' conftest.$ac_ext >&5
4013
4014has_option=no
4015fi
4016rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4017if test $has_option = yes; then
4018 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4019fi
4020echo "$as_me:$LINENO: result: $has_option" >&5
4021echo "${ECHO_T}$has_option" >&6
4022CFLAGS="$SAVE_CFLAGS"
4023unset has_option
4024unset SAVE_CFLAGS
4025
6a3a24fa 4026#### Some other nice autoconf tests.
ba4481b5 4027
c0d27fcc 4028echo "$as_me:$LINENO: checking whether ln -s works" >&5
503d2be0
AS
4029echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4030LN_S=$as_ln_s
4031if test "$LN_S" = "ln -s"; then
c0d27fcc 4032 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 4033echo "${ECHO_T}yes" >&6
ba4481b5 4034else
c0d27fcc 4035 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
503d2be0 4036echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
4037fi
4038
503d2be0
AS
4039ac_ext=c
4040ac_cpp='$CPP $CPPFLAGS'
4041ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4042ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4043ac_compiler_gnu=$ac_cv_c_compiler_gnu
c0d27fcc 4044echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
503d2be0 4045echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
4046# On Suns, sometimes $CPP names a directory.
4047if test -n "$CPP" && test -d "$CPP"; then
4048 CPP=
4049fi
4050if test -z "$CPP"; then
503d2be0
AS
4051 if test "${ac_cv_prog_CPP+set}" = set; then
4052 echo $ECHO_N "(cached) $ECHO_C" >&6
4053else
4054 # Double quotes because CPP needs to be expanded
4055 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4056 do
4057 ac_preproc_ok=false
4058for ac_c_preproc_warn_flag in '' yes
4059do
4060 # Use a header file that comes with gcc, so configuring glibc
4061 # with a fresh cross-compiler works.
19650fd6
AS
4062 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4063 # <limits.h> exists even on freestanding compilers.
ba4481b5 4064 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4065 # not just through cpp. "Syntax error" is here to catch this case.
4066 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4067/* confdefs.h. */
4068_ACEOF
4069cat confdefs.h >>conftest.$ac_ext
4070cat >>conftest.$ac_ext <<_ACEOF
4071/* end confdefs.h. */
4072#ifdef __STDC__
4073# include <limits.h>
4074#else
4075# include <assert.h>
4076#endif
edfaf76d 4077 Syntax error
503d2be0 4078_ACEOF
c0d27fcc 4079if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4080 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4081 ac_status=$?
6bae0ccf 4082 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4083 rm -f conftest.er1
4084 cat conftest.err >&5
c0d27fcc 4085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4086 (exit $ac_status); } >/dev/null; then
4087 if test -s conftest.err; then
4088 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4089 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4090 else
4091 ac_cpp_err=
4092 fi
4093else
4094 ac_cpp_err=yes
4095fi
4096if test -z "$ac_cpp_err"; then
ba4481b5
DL
4097 :
4098else
503d2be0 4099 echo "$as_me: failed program was:" >&5
19650fd6
AS
4100sed 's/^/| /' conftest.$ac_ext >&5
4101
503d2be0
AS
4102 # Broken: fails on valid input.
4103continue
4104fi
4105rm -f conftest.err conftest.$ac_ext
4106
4107 # OK, works on sane cases. Now check whether non-existent headers
4108 # can be detected and how.
4109 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4110/* confdefs.h. */
4111_ACEOF
4112cat confdefs.h >>conftest.$ac_ext
4113cat >>conftest.$ac_ext <<_ACEOF
4114/* end confdefs.h. */
503d2be0
AS
4115#include <ac_nonexistent.h>
4116_ACEOF
c0d27fcc 4117if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4118 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4119 ac_status=$?
6bae0ccf 4120 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4121 rm -f conftest.er1
4122 cat conftest.err >&5
c0d27fcc 4123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4124 (exit $ac_status); } >/dev/null; then
4125 if test -s conftest.err; then
4126 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4127 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4128 else
4129 ac_cpp_err=
4130 fi
4131else
4132 ac_cpp_err=yes
4133fi
4134if test -z "$ac_cpp_err"; then
4135 # Broken: success on invalid input.
4136continue
c4bb2108 4137else
503d2be0 4138 echo "$as_me: failed program was:" >&5
19650fd6
AS
4139sed 's/^/| /' conftest.$ac_ext >&5
4140
503d2be0
AS
4141 # Passes both tests.
4142ac_preproc_ok=:
4143break
4144fi
4145rm -f conftest.err conftest.$ac_ext
4146
4147done
4148# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4149rm -f conftest.err conftest.$ac_ext
4150if $ac_preproc_ok; then
4151 break
4152fi
4153
4154 done
4155 ac_cv_prog_CPP=$CPP
4156
4157fi
4158 CPP=$ac_cv_prog_CPP
4159else
4160 ac_cv_prog_CPP=$CPP
4161fi
c0d27fcc 4162echo "$as_me:$LINENO: result: $CPP" >&5
503d2be0
AS
4163echo "${ECHO_T}$CPP" >&6
4164ac_preproc_ok=false
4165for ac_c_preproc_warn_flag in '' yes
4166do
4167 # Use a header file that comes with gcc, so configuring glibc
4168 # with a fresh cross-compiler works.
19650fd6
AS
4169 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4170 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4171 # On the NeXT, cc -E runs the code through the compiler's parser,
4172 # not just through cpp. "Syntax error" is here to catch this case.
4173 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4174/* confdefs.h. */
4175_ACEOF
4176cat confdefs.h >>conftest.$ac_ext
4177cat >>conftest.$ac_ext <<_ACEOF
4178/* end confdefs.h. */
4179#ifdef __STDC__
4180# include <limits.h>
4181#else
4182# include <assert.h>
4183#endif
edfaf76d 4184 Syntax error
503d2be0 4185_ACEOF
c0d27fcc 4186if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4187 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4188 ac_status=$?
6bae0ccf 4189 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4190 rm -f conftest.er1
4191 cat conftest.err >&5
c0d27fcc 4192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4193 (exit $ac_status); } >/dev/null; then
4194 if test -s conftest.err; then
4195 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4196 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4197 else
4198 ac_cpp_err=
4199 fi
4200else
4201 ac_cpp_err=yes
4202fi
4203if test -z "$ac_cpp_err"; then
ba4481b5
DL
4204 :
4205else
503d2be0 4206 echo "$as_me: failed program was:" >&5
19650fd6
AS
4207sed 's/^/| /' conftest.$ac_ext >&5
4208
503d2be0
AS
4209 # Broken: fails on valid input.
4210continue
4211fi
4212rm -f conftest.err conftest.$ac_ext
4213
4214 # OK, works on sane cases. Now check whether non-existent headers
4215 # can be detected and how.
4216 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4217/* confdefs.h. */
4218_ACEOF
4219cat confdefs.h >>conftest.$ac_ext
4220cat >>conftest.$ac_ext <<_ACEOF
4221/* end confdefs.h. */
503d2be0
AS
4222#include <ac_nonexistent.h>
4223_ACEOF
c0d27fcc 4224if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4225 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4226 ac_status=$?
6bae0ccf 4227 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4228 rm -f conftest.er1
4229 cat conftest.err >&5
c0d27fcc 4230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4231 (exit $ac_status); } >/dev/null; then
4232 if test -s conftest.err; then
4233 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4234 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4235 else
4236 ac_cpp_err=
4237 fi
4238else
4239 ac_cpp_err=yes
c4bb2108 4240fi
503d2be0
AS
4241if test -z "$ac_cpp_err"; then
4242 # Broken: success on invalid input.
4243continue
4244else
4245 echo "$as_me: failed program was:" >&5
19650fd6
AS
4246sed 's/^/| /' conftest.$ac_ext >&5
4247
503d2be0
AS
4248 # Passes both tests.
4249ac_preproc_ok=:
4250break
ba4481b5 4251fi
503d2be0
AS
4252rm -f conftest.err conftest.$ac_ext
4253
4254done
4255# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4256rm -f conftest.err conftest.$ac_ext
4257if $ac_preproc_ok; then
4258 :
ba4481b5 4259else
19650fd6
AS
4260 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4261See \`config.log' for more details." >&5
4262echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4263See \`config.log' for more details." >&2;}
503d2be0 4264 { (exit 1); exit 1; }; }
ba4481b5 4265fi
503d2be0
AS
4266
4267ac_ext=c
4268ac_cpp='$CPP $CPPFLAGS'
4269ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4270ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4271ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4272
4273# Find a good install program. We prefer a C program (faster),
4274# so one script is as good as another. But avoid the broken or
4275# incompatible versions:
4276# SysV /etc/install, /usr/sbin/install
4277# SunOS /usr/etc/install
4278# IRIX /sbin/install
4279# AIX /bin/install
503d2be0 4280# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4281# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4282# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4283# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4284# OS/2's system install, which has a completely different semantic
ba4481b5 4285# ./install, which can be erroneously created by make from ./install.sh.
c0d27fcc
MR
4286echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4287echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
ba4481b5 4288if test -z "$INSTALL"; then
503d2be0
AS
4289if test "${ac_cv_path_install+set}" = set; then
4290 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4291else
c0d27fcc
MR
4292 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4293for as_dir in $PATH
4294do
4295 IFS=$as_save_IFS
4296 test -z "$as_dir" && as_dir=.
4297 # Account for people who put trailing slashes in PATH elements.
4298case $as_dir/ in
4299 ./ | .// | /cC/* | \
4300 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4301 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4302 /usr/ucb/* ) ;;
4303 *)
4304 # OSF1 and SCO ODT 3.0 have their own names for install.
4305 # Don't use installbsd from OSF since it installs stuff as root
4306 # by default.
4307 for ac_prog in ginstall scoinst install; do
4308 for ac_exec_ext in '' $ac_executable_extensions; do
edfaf76d
LK
4309 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4310 if test $ac_prog = install &&
4311 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4312 # AIX install. It has an incompatible calling convention.
4313 :
4314 elif test $ac_prog = install &&
4315 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4316 # program-specific install script used by HP pwplus--don't use.
4317 :
4318 else
4319 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4320 break 3
4321 fi
4322 fi
ba4481b5 4323 done
c0d27fcc
MR
4324 done
4325 ;;
4326esac
4327done
4328
ba4481b5
DL
4329
4330fi
4331 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4332 INSTALL=$ac_cv_path_install
ba4481b5
DL
4333 else
4334 # As a last resort, use the slow shell script. We don't cache a
4335 # path for INSTALL within a source directory, because that will
4336 # break other packages using the cache if that directory is
4337 # removed, or if the path is relative.
503d2be0 4338 INSTALL=$ac_install_sh
ba4481b5
DL
4339 fi
4340fi
c0d27fcc 4341echo "$as_me:$LINENO: result: $INSTALL" >&5
503d2be0 4342echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
4343
4344# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4345# It thinks the first close brace ends the variable substitution.
4346test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4347
503d2be0 4348test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 4349
ba4481b5
DL
4350test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4351
c0d27fcc
MR
4352if test "x$RANLIB" = x; then
4353 if test -n "$ac_tool_prefix"; then
4354 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4355set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4356echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0 4357echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c0d27fcc 4358if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 4359 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
4360else
4361 if test -n "$RANLIB"; then
4362 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4363else
c0d27fcc
MR
4364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4365for as_dir in $PATH
4366do
4367 IFS=$as_save_IFS
4368 test -z "$as_dir" && as_dir=.
4369 for ac_exec_ext in '' $ac_executable_extensions; do
4370 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4371 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4372 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4373 break 2
4374 fi
4375done
503d2be0
AS
4376done
4377
7397acc4
DL
4378fi
4379fi
503d2be0 4380RANLIB=$ac_cv_prog_RANLIB
7397acc4 4381if test -n "$RANLIB"; then
c0d27fcc 4382 echo "$as_me:$LINENO: result: $RANLIB" >&5
503d2be0
AS
4383echo "${ECHO_T}$RANLIB" >&6
4384else
c0d27fcc 4385 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4386echo "${ECHO_T}no" >&6
4387fi
4388
4389fi
4390if test -z "$ac_cv_prog_RANLIB"; then
4391 ac_ct_RANLIB=$RANLIB
4392 # Extract the first word of "ranlib", so it can be a program name with args.
4393set dummy ranlib; ac_word=$2
c0d27fcc 4394echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
4395echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4396if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4397 echo $ECHO_N "(cached) $ECHO_C" >&6
4398else
4399 if test -n "$ac_ct_RANLIB"; then
4400 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4401else
c0d27fcc
MR
4402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4403for as_dir in $PATH
4404do
4405 IFS=$as_save_IFS
4406 test -z "$as_dir" && as_dir=.
4407 for ac_exec_ext in '' $ac_executable_extensions; do
4408 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4409 ac_cv_prog_ac_ct_RANLIB="ranlib"
4410 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4411 break 2
4412 fi
4413done
503d2be0
AS
4414done
4415
4416 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4417fi
4418fi
4419ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4420if test -n "$ac_ct_RANLIB"; then
c0d27fcc 4421 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
503d2be0
AS
4422echo "${ECHO_T}$ac_ct_RANLIB" >&6
4423else
c0d27fcc 4424 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4425echo "${ECHO_T}no" >&6
4426fi
4427
4428 RANLIB=$ac_ct_RANLIB
7397acc4 4429else
503d2be0 4430 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
4431fi
4432
4433fi
9e71690e
DK
4434# Extract the first word of "install-info", so it can be a program name with args.
4435set dummy install-info; ac_word=$2
4436echo "$as_me:$LINENO: checking for $ac_word" >&5
4437echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4438if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4439 echo $ECHO_N "(cached) $ECHO_C" >&6
4440else
4441 case $INSTALL_INFO in
4442 [\\/]* | ?:[\\/]*)
4443 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4444 ;;
4445 *)
4446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4447for as_dir in $PATH
4448do
4449 IFS=$as_save_IFS
4450 test -z "$as_dir" && as_dir=.
4451 for ac_exec_ext in '' $ac_executable_extensions; do
4452 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4453 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4454 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4455 break 2
4456 fi
4457done
4458done
4459
4460 ;;
4461esac
4462fi
4463INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4464
4465if test -n "$INSTALL_INFO"; then
4466 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4467echo "${ECHO_T}$INSTALL_INFO" >&6
4468else
4469 echo "$as_me:$LINENO: result: no" >&5
4470echo "${ECHO_T}no" >&6
4471fi
4472
4473# Extract the first word of "install-info", so it can be a program name with args.
4474set dummy install-info; ac_word=$2
4475echo "$as_me:$LINENO: checking for $ac_word" >&5
4476echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4477if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4478 echo $ECHO_N "(cached) $ECHO_C" >&6
4479else
4480 case $INSTALL_INFO in
4481 [\\/]* | ?:[\\/]*)
4482 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4483 ;;
4484 *)
4485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4486for as_dir in /usr/sbin
4487do
4488 IFS=$as_save_IFS
4489 test -z "$as_dir" && as_dir=.
4490 for ac_exec_ext in '' $ac_executable_extensions; do
4491 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4492 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4493 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4494 break 2
4495 fi
4496done
4497done
4498
4499 ;;
4500esac
4501fi
4502INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4503
4504if test -n "$INSTALL_INFO"; then
4505 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4506echo "${ECHO_T}$INSTALL_INFO" >&6
4507else
4508 echo "$as_me:$LINENO: result: no" >&5
4509echo "${ECHO_T}no" >&6
4510fi
4511
4512# Extract the first word of "install-info", so it can be a program name with args.
4513set dummy install-info; ac_word=$2
4514echo "$as_me:$LINENO: checking for $ac_word" >&5
4515echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4516if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4517 echo $ECHO_N "(cached) $ECHO_C" >&6
4518else
4519 case $INSTALL_INFO in
4520 [\\/]* | ?:[\\/]*)
4521 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4522 ;;
4523 *)
4524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4525for as_dir in /sbin
4526do
4527 IFS=$as_save_IFS
4528 test -z "$as_dir" && as_dir=.
4529 for ac_exec_ext in '' $ac_executable_extensions; do
4530 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4531 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4532 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4533 break 2
4534 fi
4535done
4536done
4537
4538 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4539 ;;
4540esac
4541fi
4542INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4543
4544if test -n "$INSTALL_INFO"; then
4545 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4546echo "${ECHO_T}$INSTALL_INFO" >&6
4547else
4548 echo "$as_me:$LINENO: result: no" >&5
4549echo "${ECHO_T}no" >&6
4550fi
4551
8ae52ca6
RF
4552# Extract the first word of "gzip", so it can be a program name with args.
4553set dummy gzip; ac_word=$2
4554echo "$as_me:$LINENO: checking for $ac_word" >&5
4555echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
46e35e9f 4556if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
4557 echo $ECHO_N "(cached) $ECHO_C" >&6
4558else
46e35e9f 4559 case $GZIP_PROG in
8ae52ca6 4560 [\\/]* | ?:[\\/]*)
46e35e9f 4561 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
4562 ;;
4563 *)
4564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4565for as_dir in $PATH
4566do
4567 IFS=$as_save_IFS
4568 test -z "$as_dir" && as_dir=.
4569 for ac_exec_ext in '' $ac_executable_extensions; do
4570 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46e35e9f 4571 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
4572 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4573 break 2
4574 fi
4575done
4576done
4577
4578 ;;
4579esac
4580fi
46e35e9f 4581GZIP_PROG=$ac_cv_path_GZIP_PROG
8ae52ca6 4582
46e35e9f
AS
4583if test -n "$GZIP_PROG"; then
4584 echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
4585echo "${ECHO_T}$GZIP_PROG" >&6
8ae52ca6
RF
4586else
4587 echo "$as_me:$LINENO: result: no" >&5
4588echo "${ECHO_T}no" >&6
4589fi
4590
ba4481b5 4591
c0d27fcc 4592
8e967cf7
MR
4593if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4594then
4595 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4596fi
4597
4598if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4599then
4600 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4601fi
4602
c0d27fcc 4603
fe239f0f 4604late_LDFLAGS=$LDFLAGS
4af002d6 4605if test "$GCC" = yes; then
fe239f0f
AS
4606 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
4607else
4608 LDFLAGS="$LDFLAGS -znocombreloc"
4609fi
4610
edfaf76d
LK
4611echo "$as_me:$LINENO: checking for -znocombreloc" >&5
4612echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6
fe239f0f
AS
4613cat >conftest.$ac_ext <<_ACEOF
4614main(){return 0;}
4615_ACEOF
4616rm -f conftest.$ac_objext conftest$ac_exeext
4617if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 4618 (eval $ac_link) 2>conftest.er1
fe239f0f 4619 ac_status=$?
edfaf76d
LK
4620 grep -v '^ *+' conftest.er1 >conftest.err
4621 rm -f conftest.er1
4622 cat conftest.err >&5
fe239f0f
AS
4623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4624 (exit $ac_status); } &&
e143ad11
AS
4625 { ac_try='test -z "$ac_c_werror_flag"
4626 || test ! -s conftest.err'
edfaf76d
LK
4627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4628 (eval $ac_try) 2>&5
4629 ac_status=$?
4630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4631 (exit $ac_status); }; } &&
4632 { ac_try='test -s conftest$ac_exeext'
fe239f0f
AS
4633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4634 (eval $ac_try) 2>&5
4635 ac_status=$?
4636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4637 (exit $ac_status); }; }; then
4638 echo "$as_me:$LINENO: result: yes" >&5
4639echo "${ECHO_T}yes" >&6
4640else
4641 echo "$as_me: failed program was:" >&5
4642sed 's/^/| /' conftest.$ac_ext >&5
4643
4644LDFLAGS=$late_LDFLAGS
4645 echo "$as_me:$LINENO: result: no" >&5
4646echo "${ECHO_T}no" >&6
4647fi
edfaf76d
LK
4648rm -f conftest.err conftest.$ac_objext \
4649 conftest$ac_exeext conftest.$ac_ext
fe239f0f 4650
3b33a005
DL
4651#### Extract some information from the operating system and machine files.
4652
c0d27fcc 4653{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 4654 - which libraries the lib-src programs will want, and
503d2be0
AS
4655 - whether the GNU malloc routines are usable..." >&5
4656echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 4657 - which libraries the lib-src programs will want, and
503d2be0 4658 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
4659
4660### First figure out CFLAGS (which we use for running the compiler here)
4661### and REAL_CFLAGS (which we use for real compilation).
4662### The two are the same except on a few systems, where they are made
4663### different to work around various lossages. For example,
4664### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
4665### as implying static linking.
4666
4667### If the CFLAGS env var is specified, we use that value
4668### instead of the default.
4669
4670### It's not important that this name contain the PID; you can't run
4671### two configures in the same directory and have anything work
4672### anyway.
4673tempcname="conftest.c"
4674
4675echo '
4676#include "'${srcdir}'/src/'${opsysfile}'"
4677#include "'${srcdir}'/src/'${machfile}'"
4678#ifndef LIBS_MACHINE
4679#define LIBS_MACHINE
4680#endif
4681#ifndef LIBS_SYSTEM
4682#define LIBS_SYSTEM
4683#endif
4684#ifndef C_SWITCH_SYSTEM
4685#define C_SWITCH_SYSTEM
4686#endif
4687#ifndef C_SWITCH_MACHINE
4688#define C_SWITCH_MACHINE
4689#endif
4690configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
4691configure___ c_switch_system=C_SWITCH_SYSTEM
4692configure___ c_switch_machine=C_SWITCH_MACHINE
4693
4694#ifndef LIB_X11_LIB
4695#define LIB_X11_LIB -lX11
4696#endif
4697
4698#ifndef LIBX11_MACHINE
4699#define LIBX11_MACHINE
4700#endif
4701
4702#ifndef LIBX11_SYSTEM
4703#define LIBX11_SYSTEM
4704#endif
4705configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
4706
4707#ifdef UNEXEC
4708configure___ unexec=UNEXEC
4709#else
4710configure___ unexec=unexec.o
4711#endif
4712
4713#ifdef SYSTEM_MALLOC
4714configure___ system_malloc=yes
4715#else
4716configure___ system_malloc=no
4717#endif
4718
ef9e4345
GM
4719#ifdef USE_MMAP_FOR_BUFFERS
4720configure___ use_mmap_for_buffers=yes
73b77ee5 4721#else
ef9e4345 4722configure___ use_mmap_for_buffers=no
73b77ee5
GM
4723#endif
4724
3b33a005
DL
4725#ifndef C_DEBUG_SWITCH
4726#define C_DEBUG_SWITCH -g
4727#endif
4728
4729#ifndef C_OPTIMIZE_SWITCH
4730#ifdef __GNUC__
4731#define C_OPTIMIZE_SWITCH -O2
4732#else
4733#define C_OPTIMIZE_SWITCH -O
4734#endif
4735#endif
4736
01abe918
CY
4737#ifndef C_WARNINGS_SWITCH
4738#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
4739#endif
4740
3b33a005
DL
4741#ifndef LD_SWITCH_MACHINE
4742#define LD_SWITCH_MACHINE
4743#endif
4744
4745#ifndef LD_SWITCH_SYSTEM
4746#define LD_SWITCH_SYSTEM
4747#endif
4748
4749#ifndef LD_SWITCH_X_SITE_AUX
4750#define LD_SWITCH_X_SITE_AUX
503d2be0 4751#endif
3b33a005
DL
4752
4753configure___ ld_switch_system=LD_SWITCH_SYSTEM
4754configure___ ld_switch_machine=LD_SWITCH_MACHINE
4755
4756#ifdef THIS_IS_CONFIGURE
4757
4758/* Get the CFLAGS for tests in configure. */
4759#ifdef __GNUC__
4760configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4761#else
4762configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4763#endif
4764
4765#else /* not THIS_IS_CONFIGURE */
4766
4767/* Get the CFLAGS for real compilation. */
4768#ifdef __GNUC__
01abe918 4769configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
4770#else
4771configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4772#endif
4773
4774#endif /* not THIS_IS_CONFIGURE */
4775' > ${tempcname}
4776
4777# The value of CPP is a quoted variable reference, so we need to do this
4778# to get its actual value...
4779CPP=`eval "echo $CPP"`
4780eval `${CPP} -Isrc ${tempcname} \
4781 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4782if test "x$SPECIFIED_CFLAGS" = x; then
4783 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
4784 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4785else
4786 REAL_CFLAGS="$CFLAGS"
4787fi
4788rm ${tempcname}
4789
4790ac_link="$ac_link $ld_switch_machine $ld_switch_system"
4791
4792### Make sure subsequent tests use flags consistent with the build flags.
4793
4794if test x"${OVERRIDE_CPPFLAGS}" != x; then
4795 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
4796else
4797 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
4798fi
4799
6bae0ccf
DL
4800
4801
503d2be0 4802# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
4803if test "${enable_largefile+set}" = set; then
4804 enableval="$enable_largefile"
f4988be7 4805
503d2be0
AS
4806fi;
4807if test "$enable_largefile" != no; then
f4988be7 4808
c0d27fcc 4809 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
503d2be0
AS
4810echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4811if test "${ac_cv_sys_largefile_CC+set}" = set; then
4812 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4813else
f4988be7 4814 ac_cv_sys_largefile_CC=no
503d2be0
AS
4815 if test "$GCC" != yes; then
4816 ac_save_CC=$CC
4817 while :; do
4818 # IRIX 6.2 and later do not support large files by default,
4819 # so use the C compiler's -n32 option if that helps.
edfaf76d 4820 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4821/* confdefs.h. */
4822_ACEOF
4823cat confdefs.h >>conftest.$ac_ext
4824cat >>conftest.$ac_ext <<_ACEOF
4825/* end confdefs.h. */
f4988be7 4826#include <sys/types.h>
503d2be0
AS
4827 /* Check that off_t can represent 2**63 - 1 correctly.
4828 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4829 since some C++ compilers masquerading as C compilers
4830 incorrectly reject 9223372036854775807. */
4831#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4832 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4833 && LARGE_OFF_T % 2147483647 == 1)
4834 ? 1 : -1];
4835int
4836main ()
4837{
f4988be7 4838
503d2be0
AS
4839 ;
4840 return 0;
4841}
4842_ACEOF
4843 rm -f conftest.$ac_objext
c0d27fcc 4844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4845 (eval $ac_compile) 2>conftest.er1
503d2be0 4846 ac_status=$?
edfaf76d
LK
4847 grep -v '^ *+' conftest.er1 >conftest.err
4848 rm -f conftest.er1
4849 cat conftest.err >&5
c0d27fcc 4850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4851 (exit $ac_status); } &&
e143ad11
AS
4852 { ac_try='test -z "$ac_c_werror_flag"
4853 || test ! -s conftest.err'
edfaf76d
LK
4854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4855 (eval $ac_try) 2>&5
4856 ac_status=$?
4857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4858 (exit $ac_status); }; } &&
4859 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4861 (eval $ac_try) 2>&5
4862 ac_status=$?
c0d27fcc 4863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4864 (exit $ac_status); }; }; then
4865 break
b192d653 4866else
503d2be0 4867 echo "$as_me: failed program was:" >&5
19650fd6
AS
4868sed 's/^/| /' conftest.$ac_ext >&5
4869
503d2be0 4870fi
edfaf76d 4871rm -f conftest.err conftest.$ac_objext
503d2be0
AS
4872 CC="$CC -n32"
4873 rm -f conftest.$ac_objext
c0d27fcc 4874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4875 (eval $ac_compile) 2>conftest.er1
503d2be0 4876 ac_status=$?
edfaf76d
LK
4877 grep -v '^ *+' conftest.er1 >conftest.err
4878 rm -f conftest.er1
4879 cat conftest.err >&5
c0d27fcc 4880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4881 (exit $ac_status); } &&
e143ad11
AS
4882 { ac_try='test -z "$ac_c_werror_flag"
4883 || test ! -s conftest.err'
edfaf76d
LK
4884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4885 (eval $ac_try) 2>&5
4886 ac_status=$?
4887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4888 (exit $ac_status); }; } &&
4889 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4891 (eval $ac_try) 2>&5
4892 ac_status=$?
c0d27fcc 4893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4894 (exit $ac_status); }; }; then
4895 ac_cv_sys_largefile_CC=' -n32'; break
4896else
4897 echo "$as_me: failed program was:" >&5
19650fd6
AS
4898sed 's/^/| /' conftest.$ac_ext >&5
4899
503d2be0 4900fi
edfaf76d
LK
4901rm -f conftest.err conftest.$ac_objext
4902 break
503d2be0
AS
4903 done
4904 CC=$ac_save_CC
4905 rm -f conftest.$ac_ext
4906 fi
b192d653 4907fi
c0d27fcc 4908echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
4909echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4910 if test "$ac_cv_sys_largefile_CC" != no; then
4911 CC=$CC$ac_cv_sys_largefile_CC
4912 fi
b192d653 4913
c0d27fcc 4914 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
4915echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4916if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4917 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4918else
503d2be0 4919 while :; do
f4988be7 4920 ac_cv_sys_file_offset_bits=no
503d2be0 4921 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4922/* confdefs.h. */
4923_ACEOF
4924cat confdefs.h >>conftest.$ac_ext
4925cat >>conftest.$ac_ext <<_ACEOF
4926/* end confdefs.h. */
f4988be7 4927#include <sys/types.h>
503d2be0
AS
4928 /* Check that off_t can represent 2**63 - 1 correctly.
4929 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4930 since some C++ compilers masquerading as C compilers
4931 incorrectly reject 9223372036854775807. */
4932#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4933 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4934 && LARGE_OFF_T % 2147483647 == 1)
4935 ? 1 : -1];
4936int
4937main ()
4938{
f4988be7 4939
503d2be0
AS
4940 ;
4941 return 0;
4942}
4943_ACEOF
4944rm -f conftest.$ac_objext
c0d27fcc 4945if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4946 (eval $ac_compile) 2>conftest.er1
503d2be0 4947 ac_status=$?
edfaf76d
LK
4948 grep -v '^ *+' conftest.er1 >conftest.err
4949 rm -f conftest.er1
4950 cat conftest.err >&5
c0d27fcc 4951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4952 (exit $ac_status); } &&
e143ad11
AS
4953 { ac_try='test -z "$ac_c_werror_flag"
4954 || test ! -s conftest.err'
edfaf76d
LK
4955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4956 (eval $ac_try) 2>&5
4957 ac_status=$?
4958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4959 (exit $ac_status); }; } &&
4960 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4962 (eval $ac_try) 2>&5
4963 ac_status=$?
c0d27fcc 4964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4965 (exit $ac_status); }; }; then
4966 break
f4988be7 4967else
503d2be0 4968 echo "$as_me: failed program was:" >&5
19650fd6
AS
4969sed 's/^/| /' conftest.$ac_ext >&5
4970
503d2be0 4971fi
edfaf76d 4972rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4973 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4974/* confdefs.h. */
4975_ACEOF
4976cat confdefs.h >>conftest.$ac_ext
4977cat >>conftest.$ac_ext <<_ACEOF
4978/* end confdefs.h. */
f4988be7
GM
4979#define _FILE_OFFSET_BITS 64
4980#include <sys/types.h>
503d2be0
AS
4981 /* Check that off_t can represent 2**63 - 1 correctly.
4982 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4983 since some C++ compilers masquerading as C compilers
4984 incorrectly reject 9223372036854775807. */
4985#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4986 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4987 && LARGE_OFF_T % 2147483647 == 1)
4988 ? 1 : -1];
4989int
4990main ()
4991{
4992
4993 ;
4994 return 0;
4995}
4996_ACEOF
4997rm -f conftest.$ac_objext
c0d27fcc 4998if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4999 (eval $ac_compile) 2>conftest.er1
503d2be0 5000 ac_status=$?
edfaf76d
LK
5001 grep -v '^ *+' conftest.er1 >conftest.err
5002 rm -f conftest.er1
5003 cat conftest.err >&5
c0d27fcc 5004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5005 (exit $ac_status); } &&
e143ad11
AS
5006 { ac_try='test -z "$ac_c_werror_flag"
5007 || test ! -s conftest.err'
edfaf76d
LK
5008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5009 (eval $ac_try) 2>&5
5010 ac_status=$?
5011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5012 (exit $ac_status); }; } &&
5013 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5015 (eval $ac_try) 2>&5
5016 ac_status=$?
c0d27fcc 5017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5018 (exit $ac_status); }; }; then
5019 ac_cv_sys_file_offset_bits=64; break
5020else
5021 echo "$as_me: failed program was:" >&5
19650fd6
AS
5022sed 's/^/| /' conftest.$ac_ext >&5
5023
503d2be0 5024fi
edfaf76d 5025rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
5026 break
5027done
ba4481b5 5028fi
c0d27fcc 5029echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
5030echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
5031if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 5032
c0d27fcc 5033cat >>confdefs.h <<_ACEOF
f4988be7 5034#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5035_ACEOF
f4988be7 5036
503d2be0
AS
5037fi
5038rm -f conftest*
c0d27fcc 5039 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
5040echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
5041if test "${ac_cv_sys_large_files+set}" = set; then
5042 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5043else
503d2be0 5044 while :; do
f4988be7 5045 ac_cv_sys_large_files=no
503d2be0 5046 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5047/* confdefs.h. */
5048_ACEOF
5049cat confdefs.h >>conftest.$ac_ext
5050cat >>conftest.$ac_ext <<_ACEOF
5051/* end confdefs.h. */
503d2be0
AS
5052#include <sys/types.h>
5053 /* Check that off_t can represent 2**63 - 1 correctly.
5054 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5055 since some C++ compilers masquerading as C compilers
5056 incorrectly reject 9223372036854775807. */
5057#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5058 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5059 && LARGE_OFF_T % 2147483647 == 1)
5060 ? 1 : -1];
5061int
5062main ()
5063{
ba4481b5 5064
503d2be0
AS
5065 ;
5066 return 0;
5067}
5068_ACEOF
5069rm -f conftest.$ac_objext
c0d27fcc 5070if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5071 (eval $ac_compile) 2>conftest.er1
503d2be0 5072 ac_status=$?
edfaf76d
LK
5073 grep -v '^ *+' conftest.er1 >conftest.err
5074 rm -f conftest.er1
5075 cat conftest.err >&5
c0d27fcc 5076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5077 (exit $ac_status); } &&
e143ad11
AS
5078 { ac_try='test -z "$ac_c_werror_flag"
5079 || test ! -s conftest.err'
edfaf76d
LK
5080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5081 (eval $ac_try) 2>&5
5082 ac_status=$?
5083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5084 (exit $ac_status); }; } &&
5085 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5087 (eval $ac_try) 2>&5
5088 ac_status=$?
c0d27fcc 5089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5090 (exit $ac_status); }; }; then
5091 break
ba4481b5 5092else
503d2be0 5093 echo "$as_me: failed program was:" >&5
19650fd6
AS
5094sed 's/^/| /' conftest.$ac_ext >&5
5095
503d2be0 5096fi
edfaf76d 5097rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5098 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5099/* confdefs.h. */
5100_ACEOF
5101cat confdefs.h >>conftest.$ac_ext
5102cat >>conftest.$ac_ext <<_ACEOF
5103/* end confdefs.h. */
f4988be7 5104#define _LARGE_FILES 1
503d2be0
AS
5105#include <sys/types.h>
5106 /* Check that off_t can represent 2**63 - 1 correctly.
5107 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5108 since some C++ compilers masquerading as C compilers
5109 incorrectly reject 9223372036854775807. */
5110#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5111 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5112 && LARGE_OFF_T % 2147483647 == 1)
5113 ? 1 : -1];
5114int
5115main ()
5116{
f4988be7 5117
503d2be0
AS
5118 ;
5119 return 0;
5120}
5121_ACEOF
5122rm -f conftest.$ac_objext
c0d27fcc 5123if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5124 (eval $ac_compile) 2>conftest.er1
503d2be0 5125 ac_status=$?
edfaf76d
LK
5126 grep -v '^ *+' conftest.er1 >conftest.err
5127 rm -f conftest.er1
5128 cat conftest.err >&5
c0d27fcc 5129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5130 (exit $ac_status); } &&
e143ad11
AS
5131 { ac_try='test -z "$ac_c_werror_flag"
5132 || test ! -s conftest.err'
edfaf76d
LK
5133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5134 (eval $ac_try) 2>&5
5135 ac_status=$?
5136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5137 (exit $ac_status); }; } &&
5138 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5140 (eval $ac_try) 2>&5
5141 ac_status=$?
c0d27fcc 5142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5143 (exit $ac_status); }; }; then
5144 ac_cv_sys_large_files=1; break
5145else
5146 echo "$as_me: failed program was:" >&5
19650fd6
AS
5147sed 's/^/| /' conftest.$ac_ext >&5
5148
503d2be0 5149fi
edfaf76d 5150rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
5151 break
5152done
ba4481b5 5153fi
c0d27fcc 5154echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
5155echo "${ECHO_T}$ac_cv_sys_large_files" >&6
5156if test "$ac_cv_sys_large_files" != no; then
ba4481b5 5157
c0d27fcc 5158cat >>confdefs.h <<_ACEOF
f4988be7 5159#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5160_ACEOF
ba4481b5 5161
503d2be0
AS
5162fi
5163rm -f conftest*
5164fi
ba4481b5 5165
c0d27fcc 5166
2c9dccc9
PJ
5167if test "${with_sound}" != "no"; then
5168 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
5169 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5170echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5171if test "${ac_cv_header_stdc+set}" = set; then
5172 echo $ECHO_N "(cached) $ECHO_C" >&6
5173else
5174 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5175/* confdefs.h. */
5176_ACEOF
5177cat confdefs.h >>conftest.$ac_ext
5178cat >>conftest.$ac_ext <<_ACEOF
5179/* end confdefs.h. */
c0d27fcc
MR
5180#include <stdlib.h>
5181#include <stdarg.h>
5182#include <string.h>
5183#include <float.h>
98418dba 5184
19650fd6
AS
5185int
5186main ()
5187{
5188
5189 ;
5190 return 0;
5191}
c0d27fcc 5192_ACEOF
19650fd6
AS
5193rm -f conftest.$ac_objext
5194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5195 (eval $ac_compile) 2>conftest.er1
cd958eb3 5196 ac_status=$?
edfaf76d
LK
5197 grep -v '^ *+' conftest.er1 >conftest.err
5198 rm -f conftest.er1
5199 cat conftest.err >&5
cd958eb3 5200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 5201 (exit $ac_status); } &&
e143ad11
AS
5202 { ac_try='test -z "$ac_c_werror_flag"
5203 || test ! -s conftest.err'
edfaf76d
LK
5204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5205 (eval $ac_try) 2>&5
5206 ac_status=$?
5207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5208 (exit $ac_status); }; } &&
5209 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
5210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5211 (eval $ac_try) 2>&5
5212 ac_status=$?
5213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5214 (exit $ac_status); }; }; then
c0d27fcc
MR
5215 ac_cv_header_stdc=yes
5216else
5217 echo "$as_me: failed program was:" >&5
19650fd6
AS
5218sed 's/^/| /' conftest.$ac_ext >&5
5219
5220ac_cv_header_stdc=no
c0d27fcc 5221fi
edfaf76d 5222rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5223
5224if test $ac_cv_header_stdc = yes; then
5225 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5226 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5227/* confdefs.h. */
5228_ACEOF
5229cat confdefs.h >>conftest.$ac_ext
5230cat >>conftest.$ac_ext <<_ACEOF
5231/* end confdefs.h. */
c0d27fcc
MR
5232#include <string.h>
5233
5234_ACEOF
5235if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5236 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
5237 :
5238else
5239 ac_cv_header_stdc=no
5240fi
5241rm -f conftest*
5242
5243fi
5244
5245if test $ac_cv_header_stdc = yes; then
5246 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5247 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5248/* confdefs.h. */
5249_ACEOF
5250cat confdefs.h >>conftest.$ac_ext
5251cat >>conftest.$ac_ext <<_ACEOF
5252/* end confdefs.h. */
c0d27fcc
MR
5253#include <stdlib.h>
5254
5255_ACEOF
5256if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5257 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
5258 :
5259else
5260 ac_cv_header_stdc=no
5261fi
5262rm -f conftest*
5263
5264fi
5265
5266if test $ac_cv_header_stdc = yes; then
5267 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5268 if test "$cross_compiling" = yes; then
5269 :
5270else
5271 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5272/* confdefs.h. */
5273_ACEOF
5274cat confdefs.h >>conftest.$ac_ext
5275cat >>conftest.$ac_ext <<_ACEOF
5276/* end confdefs.h. */
c0d27fcc
MR
5277#include <ctype.h>
5278#if ((' ' & 0x0FF) == 0x020)
5279# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5280# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5281#else
19650fd6 5282# define ISLOWER(c) \
edfaf76d
LK
5283 (('a' <= (c) && (c) <= 'i') \
5284 || ('j' <= (c) && (c) <= 'r') \
5285 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
5286# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5287#endif
5288
5289#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5290int
5291main ()
5292{
5293 int i;
5294 for (i = 0; i < 256; i++)
5295 if (XOR (islower (i), ISLOWER (i))
edfaf76d 5296 || toupper (i) != TOUPPER (i))
c0d27fcc
MR
5297 exit(2);
5298 exit (0);
5299}
5300_ACEOF
5301rm -f conftest$ac_exeext
5302if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5303 (eval $ac_link) 2>&5
5304 ac_status=$?
5305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5306 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5308 (eval $ac_try) 2>&5
5309 ac_status=$?
5310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5311 (exit $ac_status); }; }; then
5312 :
5313else
5314 echo "$as_me: program exited with status $ac_status" >&5
5315echo "$as_me: failed program was:" >&5
19650fd6
AS
5316sed 's/^/| /' conftest.$ac_ext >&5
5317
c0d27fcc
MR
5318( exit $ac_status )
5319ac_cv_header_stdc=no
5320fi
edfaf76d 5321rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5322fi
5323fi
5324fi
5325echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5326echo "${ECHO_T}$ac_cv_header_stdc" >&6
5327if test $ac_cv_header_stdc = yes; then
5328
5329cat >>confdefs.h <<\_ACEOF
5330#define STDC_HEADERS 1
5331_ACEOF
5332
5333fi
5334
5335# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 5346 inttypes.h stdint.h unistd.h
98418dba
CW
5347do
5348as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc 5349echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5350echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5351if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5352 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5353else
925c2f3f 5354 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5355/* confdefs.h. */
5356_ACEOF
5357cat confdefs.h >>conftest.$ac_ext
5358cat >>conftest.$ac_ext <<_ACEOF
5359/* end confdefs.h. */
c0d27fcc
MR
5360$ac_includes_default
5361
5362#include <$ac_header>
5363_ACEOF
5364rm -f conftest.$ac_objext
5365if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5366 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5367 ac_status=$?
edfaf76d
LK
5368 grep -v '^ *+' conftest.er1 >conftest.err
5369 rm -f conftest.er1
5370 cat conftest.err >&5
c0d27fcc
MR
5371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5372 (exit $ac_status); } &&
e143ad11
AS
5373 { ac_try='test -z "$ac_c_werror_flag"
5374 || test ! -s conftest.err'
edfaf76d
LK
5375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5376 (eval $ac_try) 2>&5
5377 ac_status=$?
5378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5379 (exit $ac_status); }; } &&
5380 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5382 (eval $ac_try) 2>&5
5383 ac_status=$?
5384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5385 (exit $ac_status); }; }; then
5386 eval "$as_ac_Header=yes"
5387else
5388 echo "$as_me: failed program was:" >&5
19650fd6
AS
5389sed 's/^/| /' conftest.$ac_ext >&5
5390
c0d27fcc
MR
5391eval "$as_ac_Header=no"
5392fi
edfaf76d 5393rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5394fi
5395echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5396echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5397if test `eval echo '${'$as_ac_Header'}'` = yes; then
5398 cat >>confdefs.h <<_ACEOF
5399#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5400_ACEOF
5401
5402fi
5403
5404done
5405
5406
5407
5408
5409
5410for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5411do
5412as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5413if eval "test \"\${$as_ac_Header+set}\" = set"; then
5414 echo "$as_me:$LINENO: checking for $ac_header" >&5
5415echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5416if eval "test \"\${$as_ac_Header+set}\" = set"; then
5417 echo $ECHO_N "(cached) $ECHO_C" >&6
5418fi
5419echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5420echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5421else
5422 # Is the header compilable?
5423echo "$as_me:$LINENO: checking $ac_header usability" >&5
5424echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5425cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5426/* confdefs.h. */
5427_ACEOF
5428cat confdefs.h >>conftest.$ac_ext
5429cat >>conftest.$ac_ext <<_ACEOF
5430/* end confdefs.h. */
c0d27fcc 5431$ac_includes_default
98418dba 5432#include <$ac_header>
503d2be0 5433_ACEOF
c0d27fcc
MR
5434rm -f conftest.$ac_objext
5435if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5436 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5437 ac_status=$?
edfaf76d
LK
5438 grep -v '^ *+' conftest.er1 >conftest.err
5439 rm -f conftest.er1
5440 cat conftest.err >&5
c0d27fcc
MR
5441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5442 (exit $ac_status); } &&
e143ad11
AS
5443 { ac_try='test -z "$ac_c_werror_flag"
5444 || test ! -s conftest.err'
edfaf76d
LK
5445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5446 (eval $ac_try) 2>&5
5447 ac_status=$?
5448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5449 (exit $ac_status); }; } &&
5450 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5452 (eval $ac_try) 2>&5
5453 ac_status=$?
5454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5455 (exit $ac_status); }; }; then
5456 ac_header_compiler=yes
5457else
5458 echo "$as_me: failed program was:" >&5
19650fd6
AS
5459sed 's/^/| /' conftest.$ac_ext >&5
5460
c0d27fcc
MR
5461ac_header_compiler=no
5462fi
edfaf76d 5463rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5464echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5465echo "${ECHO_T}$ac_header_compiler" >&6
5466
5467# Is the header present?
5468echo "$as_me:$LINENO: checking $ac_header presence" >&5
5469echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5470cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5471/* confdefs.h. */
5472_ACEOF
5473cat confdefs.h >>conftest.$ac_ext
5474cat >>conftest.$ac_ext <<_ACEOF
5475/* end confdefs.h. */
c0d27fcc
MR
5476#include <$ac_header>
5477_ACEOF
5478if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5479 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5480 ac_status=$?
6bae0ccf 5481 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5482 rm -f conftest.er1
5483 cat conftest.err >&5
c0d27fcc 5484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5485 (exit $ac_status); } >/dev/null; then
5486 if test -s conftest.err; then
5487 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5488 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5489 else
5490 ac_cpp_err=
5491 fi
5492else
5493 ac_cpp_err=yes
5494fi
5495if test -z "$ac_cpp_err"; then
c0d27fcc 5496 ac_header_preproc=yes
f4988be7 5497else
503d2be0 5498 echo "$as_me: failed program was:" >&5
19650fd6
AS
5499sed 's/^/| /' conftest.$ac_ext >&5
5500
c0d27fcc 5501 ac_header_preproc=no
f4988be7 5502fi
98418dba 5503rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5504echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5505echo "${ECHO_T}$ac_header_preproc" >&6
5506
5507# So? What about this header?
edfaf76d
LK
5508case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5509 yes:no: )
c0d27fcc
MR
5510 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5511echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
5512 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5513echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5514 ac_header_preproc=yes
19650fd6 5515 ;;
edfaf76d 5516 no:yes:* )
c0d27fcc
MR
5517 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5518echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
5519 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5520echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5521 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5522echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5523 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5524echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5525 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5526echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
5527 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5528echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5529 (
5530 cat <<\_ASBOX
edfaf76d
LK
5531## ------------------------------------------ ##
5532## Report this to the AC_PACKAGE_NAME lists. ##
5533## ------------------------------------------ ##
19650fd6
AS
5534_ASBOX
5535 ) |
5536 sed "s/^/$as_me: WARNING: /" >&2
5537 ;;
c0d27fcc
MR
5538esac
5539echo "$as_me:$LINENO: checking for $ac_header" >&5
5540echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5541if eval "test \"\${$as_ac_Header+set}\" = set"; then
5542 echo $ECHO_N "(cached) $ECHO_C" >&6
5543else
edfaf76d 5544 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 5545fi
c0d27fcc 5546echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5547echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5548
5549fi
98418dba 5550if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5551 cat >>confdefs.h <<_ACEOF
98418dba 5552#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5553_ACEOF
f4988be7
GM
5554
5555fi
c0d27fcc 5556
98418dba
CW
5557done
5558
5559 # Emulation library used on NetBSD.
c0d27fcc 5560 echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
5561echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
5562if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 5563 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5564else
98418dba
CW
5565 ac_check_lib_save_LIBS=$LIBS
5566LIBS="-lossaudio $LIBS"
5567cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5568/* confdefs.h. */
5569_ACEOF
5570cat confdefs.h >>conftest.$ac_ext
5571cat >>conftest.$ac_ext <<_ACEOF
5572/* end confdefs.h. */
98418dba
CW
5573
5574/* Override any gcc2 internal prototype to avoid an error. */
5575#ifdef __cplusplus
5576extern "C"
f4988be7 5577#endif
98418dba
CW
5578/* We use char because int might match the return type of a gcc2
5579 builtin and then its argument prototype would still apply. */
5580char _oss_ioctl ();
503d2be0
AS
5581int
5582main ()
5583{
98418dba 5584_oss_ioctl ();
503d2be0
AS
5585 ;
5586 return 0;
5587}
5588_ACEOF
98418dba 5589rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 5590if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 5591 (eval $ac_link) 2>conftest.er1
503d2be0 5592 ac_status=$?
edfaf76d
LK
5593 grep -v '^ *+' conftest.er1 >conftest.err
5594 rm -f conftest.er1
5595 cat conftest.err >&5
c0d27fcc 5596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5597 (exit $ac_status); } &&
e143ad11
AS
5598 { ac_try='test -z "$ac_c_werror_flag"
5599 || test ! -s conftest.err'
edfaf76d
LK
5600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5601 (eval $ac_try) 2>&5
5602 ac_status=$?
5603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5604 (exit $ac_status); }; } &&
5605 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 5606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5607 (eval $ac_try) 2>&5
5608 ac_status=$?
c0d27fcc 5609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5610 (exit $ac_status); }; }; then
98418dba 5611 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 5612else
503d2be0 5613 echo "$as_me: failed program was:" >&5
19650fd6
AS
5614sed 's/^/| /' conftest.$ac_ext >&5
5615
98418dba 5616ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 5617fi
edfaf76d
LK
5618rm -f conftest.err conftest.$ac_objext \
5619 conftest$ac_exeext conftest.$ac_ext
98418dba 5620LIBS=$ac_check_lib_save_LIBS
f4988be7 5621fi
c0d27fcc 5622echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
5623echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
5624if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
5625 LIBSOUND=-lossaudio
5626else
5627 LIBSOUND=
5628fi
5629
c0d27fcc 5630
f4988be7 5631fi
c0d27fcc
MR
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
22044edf
DL
5650
5651
973a76b1 5652
cffcede7 5653
551ffc27 5654
226e2359 5655
c0d27fcc 5656
f4988be7 5657
98418dba
CW
5658for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5659 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5660 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 5661 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 5662 sys/utsname.h pwd.h
98418dba
CW
5663do
5664as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5665if eval "test \"\${$as_ac_Header+set}\" = set"; then
5666 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5667echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5668if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5669 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5670fi
5671echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5672echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5673else
c0d27fcc
MR
5674 # Is the header compilable?
5675echo "$as_me:$LINENO: checking $ac_header usability" >&5
5676echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5677cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5678/* confdefs.h. */
5679_ACEOF
5680cat confdefs.h >>conftest.$ac_ext
5681cat >>conftest.$ac_ext <<_ACEOF
5682/* end confdefs.h. */
c0d27fcc
MR
5683$ac_includes_default
5684#include <$ac_header>
5685_ACEOF
5686rm -f conftest.$ac_objext
5687if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5688 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5689 ac_status=$?
edfaf76d
LK
5690 grep -v '^ *+' conftest.er1 >conftest.err
5691 rm -f conftest.er1
5692 cat conftest.err >&5
c0d27fcc
MR
5693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5694 (exit $ac_status); } &&
e143ad11
AS
5695 { ac_try='test -z "$ac_c_werror_flag"
5696 || test ! -s conftest.err'
edfaf76d
LK
5697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5698 (eval $ac_try) 2>&5
5699 ac_status=$?
5700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5701 (exit $ac_status); }; } &&
5702 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5704 (eval $ac_try) 2>&5
5705 ac_status=$?
5706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5707 (exit $ac_status); }; }; then
5708 ac_header_compiler=yes
5709else
5710 echo "$as_me: failed program was:" >&5
19650fd6
AS
5711sed 's/^/| /' conftest.$ac_ext >&5
5712
c0d27fcc
MR
5713ac_header_compiler=no
5714fi
edfaf76d 5715rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5716echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5717echo "${ECHO_T}$ac_header_compiler" >&6
5718
5719# Is the header present?
5720echo "$as_me:$LINENO: checking $ac_header presence" >&5
5721echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5722cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5723/* confdefs.h. */
5724_ACEOF
5725cat confdefs.h >>conftest.$ac_ext
5726cat >>conftest.$ac_ext <<_ACEOF
5727/* end confdefs.h. */
98418dba 5728#include <$ac_header>
503d2be0 5729_ACEOF
c0d27fcc 5730if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5731 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5732 ac_status=$?
6bae0ccf 5733 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5734 rm -f conftest.er1
5735 cat conftest.err >&5
c0d27fcc 5736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5737 (exit $ac_status); } >/dev/null; then
5738 if test -s conftest.err; then
5739 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5740 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5741 else
5742 ac_cpp_err=
5743 fi
5744else
5745 ac_cpp_err=yes
5746fi
5747if test -z "$ac_cpp_err"; then
c0d27fcc 5748 ac_header_preproc=yes
34ec9ebe 5749else
503d2be0 5750 echo "$as_me: failed program was:" >&5
19650fd6
AS
5751sed 's/^/| /' conftest.$ac_ext >&5
5752
c0d27fcc 5753 ac_header_preproc=no
34ec9ebe 5754fi
98418dba 5755rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5756echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5757echo "${ECHO_T}$ac_header_preproc" >&6
5758
5759# So? What about this header?
edfaf76d
LK
5760case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5761 yes:no: )
c0d27fcc
MR
5762 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5763echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
5764 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5765echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5766 ac_header_preproc=yes
19650fd6 5767 ;;
edfaf76d 5768 no:yes:* )
c0d27fcc
MR
5769 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5770echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
5771 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5772echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5773 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5774echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5775 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5776echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5777 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5778echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
5779 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5780echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5781 (
5782 cat <<\_ASBOX
edfaf76d
LK
5783## ------------------------------------------ ##
5784## Report this to the AC_PACKAGE_NAME lists. ##
5785## ------------------------------------------ ##
19650fd6
AS
5786_ASBOX
5787 ) |
5788 sed "s/^/$as_me: WARNING: /" >&2
5789 ;;
c0d27fcc
MR
5790esac
5791echo "$as_me:$LINENO: checking for $ac_header" >&5
5792echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5793if eval "test \"\${$as_ac_Header+set}\" = set"; then
5794 echo $ECHO_N "(cached) $ECHO_C" >&6
5795else
edfaf76d 5796 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 5797fi
c0d27fcc 5798echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5799echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5800
5801fi
98418dba 5802if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5803 cat >>confdefs.h <<_ACEOF
98418dba 5804#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5805_ACEOF
34ec9ebe 5806
98418dba 5807fi
c0d27fcc 5808
98418dba
CW
5809done
5810
22044edf 5811
f17e308a
JD
5812echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
5813echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6
5814cat >conftest.$ac_ext <<_ACEOF
5815/* confdefs.h. */
5816_ACEOF
5817cat confdefs.h >>conftest.$ac_ext
5818cat >>conftest.$ac_ext <<_ACEOF
5819/* end confdefs.h. */
5820#include <sys/personality.h>
5821int
5822main ()
5823{
5824personality (PER_LINUX32)
5825 ;
5826 return 0;
5827}
5828_ACEOF
5829rm -f conftest.$ac_objext
5830if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5831 (eval $ac_compile) 2>conftest.er1
f17e308a 5832 ac_status=$?
edfaf76d
LK
5833 grep -v '^ *+' conftest.er1 >conftest.err
5834 rm -f conftest.er1
5835 cat conftest.err >&5
f17e308a
JD
5836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5837 (exit $ac_status); } &&
e143ad11
AS
5838 { ac_try='test -z "$ac_c_werror_flag"
5839 || test ! -s conftest.err'
edfaf76d
LK
5840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5841 (eval $ac_try) 2>&5
5842 ac_status=$?
5843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5844 (exit $ac_status); }; } &&
5845 { ac_try='test -s conftest.$ac_objext'
f17e308a
JD
5846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5847 (eval $ac_try) 2>&5
5848 ac_status=$?
5849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5850 (exit $ac_status); }; }; then
5851 emacs_cv_personality_linux32=yes
5852else
5853 echo "$as_me: failed program was:" >&5
5854sed 's/^/| /' conftest.$ac_ext >&5
5855
5856emacs_cv_personality_linux32=no
5857fi
edfaf76d 5858rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f17e308a
JD
5859echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
5860echo "${ECHO_T}$emacs_cv_personality_linux32" >&6
5861
5862if test $emacs_cv_personality_linux32 = yes; then
5863
5864cat >>confdefs.h <<\_ACEOF
5865#define HAVE_PERSONALITY_LINUX32 1
5866_ACEOF
5867
5868fi
5869
5870
22044edf
DL
5871for ac_header in term.h
5872do
5873as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5874echo "$as_me:$LINENO: checking for $ac_header" >&5
5875echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5876if eval "test \"\${$as_ac_Header+set}\" = set"; then
5877 echo $ECHO_N "(cached) $ECHO_C" >&6
5878else
5879 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5880/* confdefs.h. */
5881_ACEOF
5882cat confdefs.h >>conftest.$ac_ext
5883cat >>conftest.$ac_ext <<_ACEOF
5884/* end confdefs.h. */
22044edf
DL
5885#include <$ac_header>
5886_ACEOF
5887if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5888 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5889 ac_status=$?
5890 grep -v '^ *+' conftest.er1 >conftest.err
5891 rm -f conftest.er1
5892 cat conftest.err >&5
5893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5894 (exit $ac_status); } >/dev/null; then
5895 if test -s conftest.err; then
5896 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5897 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22044edf
DL
5898 else
5899 ac_cpp_err=
5900 fi
5901else
5902 ac_cpp_err=yes
5903fi
5904if test -z "$ac_cpp_err"; then
5905 eval "$as_ac_Header=yes"
5906else
5907 echo "$as_me: failed program was:" >&5
19650fd6
AS
5908sed 's/^/| /' conftest.$ac_ext >&5
5909
22044edf
DL
5910 eval "$as_ac_Header=no"
5911fi
5912rm -f conftest.err conftest.$ac_ext
5913fi
5914echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5915echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5916if test `eval echo '${'$as_ac_Header'}'` = yes; then
5917 cat >>confdefs.h <<_ACEOF
5918#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5919_ACEOF
5920
5921fi
5922
5923done
5924
c0d27fcc 5925echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
5926echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5927if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 5928 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5929else
503d2be0 5930 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5931/* confdefs.h. */
5932_ACEOF
5933cat confdefs.h >>conftest.$ac_ext
5934cat >>conftest.$ac_ext <<_ACEOF
5935/* end confdefs.h. */
98418dba
CW
5936#include <stdlib.h>
5937#include <stdarg.h>
5938#include <string.h>
5939#include <float.h>
5940
19650fd6
AS
5941int
5942main ()
5943{
5944
5945 ;
5946 return 0;
5947}
98418dba 5948_ACEOF
19650fd6
AS
5949rm -f conftest.$ac_objext
5950if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5951 (eval $ac_compile) 2>conftest.er1
cd958eb3 5952 ac_status=$?
edfaf76d
LK
5953 grep -v '^ *+' conftest.er1 >conftest.err
5954 rm -f conftest.er1
5955 cat conftest.err >&5
cd958eb3 5956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 5957 (exit $ac_status); } &&
e143ad11
AS
5958 { ac_try='test -z "$ac_c_werror_flag"
5959 || test ! -s conftest.err'
edfaf76d
LK
5960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5961 (eval $ac_try) 2>&5
5962 ac_status=$?
5963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5964 (exit $ac_status); }; } &&
5965 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
5966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5967 (eval $ac_try) 2>&5
5968 ac_status=$?
5969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5970 (exit $ac_status); }; }; then
98418dba 5971 ac_cv_header_stdc=yes
ba4481b5 5972else
503d2be0 5973 echo "$as_me: failed program was:" >&5
19650fd6
AS
5974sed 's/^/| /' conftest.$ac_ext >&5
5975
5976ac_cv_header_stdc=no
ba4481b5 5977fi
edfaf76d 5978rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
5979
5980if test $ac_cv_header_stdc = yes; then
5981 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5982 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5983/* confdefs.h. */
5984_ACEOF
5985cat confdefs.h >>conftest.$ac_ext
5986cat >>conftest.$ac_ext <<_ACEOF
5987/* end confdefs.h. */
98418dba
CW
5988#include <string.h>
5989
5990_ACEOF
5991if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5992 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
5993 :
5994else
5995 ac_cv_header_stdc=no
ba4481b5 5996fi
98418dba 5997rm -f conftest*
ba4481b5
DL
5998
5999fi
6000
98418dba
CW
6001if test $ac_cv_header_stdc = yes; then
6002 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6003 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6004/* confdefs.h. */
6005_ACEOF
6006cat confdefs.h >>conftest.$ac_ext
6007cat >>conftest.$ac_ext <<_ACEOF
6008/* end confdefs.h. */
98418dba
CW
6009#include <stdlib.h>
6010
6011_ACEOF
6012if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6013 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6014 :
6015else
6016 ac_cv_header_stdc=no
6017fi
6018rm -f conftest*
6019
6020fi
6021
6022if test $ac_cv_header_stdc = yes; then
6023 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6024 if test "$cross_compiling" = yes; then
6025 :
d42122a3 6026else
503d2be0 6027 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6028/* confdefs.h. */
6029_ACEOF
6030cat confdefs.h >>conftest.$ac_ext
6031cat >>conftest.$ac_ext <<_ACEOF
6032/* end confdefs.h. */
98418dba
CW
6033#include <ctype.h>
6034#if ((' ' & 0x0FF) == 0x020)
6035# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6036# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6037#else
19650fd6 6038# define ISLOWER(c) \
edfaf76d
LK
6039 (('a' <= (c) && (c) <= 'i') \
6040 || ('j' <= (c) && (c) <= 'r') \
6041 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6042# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6043#endif
6044
6045#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6046int
6047main ()
6048{
98418dba
CW
6049 int i;
6050 for (i = 0; i < 256; i++)
6051 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6052 || toupper (i) != TOUPPER (i))
98418dba
CW
6053 exit(2);
6054 exit (0);
503d2be0
AS
6055}
6056_ACEOF
98418dba 6057rm -f conftest$ac_exeext
c0d27fcc 6058if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 6059 (eval $ac_link) 2>&5
503d2be0 6060 ac_status=$?
c0d27fcc 6061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6062 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 6063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6064 (eval $ac_try) 2>&5
6065 ac_status=$?
c0d27fcc 6066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6067 (exit $ac_status); }; }; then
98418dba 6068 :
d42122a3 6069else
98418dba
CW
6070 echo "$as_me: program exited with status $ac_status" >&5
6071echo "$as_me: failed program was:" >&5
19650fd6
AS
6072sed 's/^/| /' conftest.$ac_ext >&5
6073
c0d27fcc 6074( exit $ac_status )
98418dba 6075ac_cv_header_stdc=no
d42122a3 6076fi
edfaf76d 6077rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6078fi
98418dba
CW
6079fi
6080fi
c0d27fcc 6081echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
98418dba
CW
6082echo "${ECHO_T}$ac_cv_header_stdc" >&6
6083if test $ac_cv_header_stdc = yes; then
6084
c0d27fcc 6085cat >>confdefs.h <<\_ACEOF
98418dba 6086#define STDC_HEADERS 1
c0d27fcc 6087_ACEOF
d42122a3
DL
6088
6089fi
6090
c0d27fcc 6091echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
6092echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
6093if test "${ac_cv_header_time+set}" = set; then
503d2be0 6094 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6095else
503d2be0 6096 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6097/* confdefs.h. */
6098_ACEOF
6099cat confdefs.h >>conftest.$ac_ext
6100cat >>conftest.$ac_ext <<_ACEOF
6101/* end confdefs.h. */
ba4481b5 6102#include <sys/types.h>
98418dba 6103#include <sys/time.h>
ba4481b5 6104#include <time.h>
503d2be0
AS
6105
6106int
6107main ()
6108{
98418dba
CW
6109if ((struct tm *) 0)
6110return 0;
503d2be0
AS
6111 ;
6112 return 0;
6113}
6114_ACEOF
6115rm -f conftest.$ac_objext
c0d27fcc 6116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6117 (eval $ac_compile) 2>conftest.er1
503d2be0 6118 ac_status=$?
edfaf76d
LK
6119 grep -v '^ *+' conftest.er1 >conftest.err
6120 rm -f conftest.er1
6121 cat conftest.err >&5
c0d27fcc 6122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6123 (exit $ac_status); } &&
e143ad11
AS
6124 { ac_try='test -z "$ac_c_werror_flag"
6125 || test ! -s conftest.err'
edfaf76d
LK
6126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6127 (eval $ac_try) 2>&5
6128 ac_status=$?
6129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6130 (exit $ac_status); }; } &&
6131 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6133 (eval $ac_try) 2>&5
6134 ac_status=$?
c0d27fcc 6135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6136 (exit $ac_status); }; }; then
98418dba 6137 ac_cv_header_time=yes
ba4481b5 6138else
503d2be0 6139 echo "$as_me: failed program was:" >&5
19650fd6
AS
6140sed 's/^/| /' conftest.$ac_ext >&5
6141
98418dba 6142ac_cv_header_time=no
ba4481b5 6143fi
edfaf76d 6144rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6145fi
c0d27fcc 6146echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
6147echo "${ECHO_T}$ac_cv_header_time" >&6
6148if test $ac_cv_header_time = yes; then
503d2be0 6149
c0d27fcc 6150cat >>confdefs.h <<\_ACEOF
98418dba 6151#define TIME_WITH_SYS_TIME 1
c0d27fcc 6152_ACEOF
ba4481b5
DL
6153
6154fi
6155
cd958eb3
MB
6156echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6157echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
6158if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6159 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6160else
503d2be0 6161 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6162/* confdefs.h. */
6163_ACEOF
6164cat confdefs.h >>conftest.$ac_ext
6165cat >>conftest.$ac_ext <<_ACEOF
6166/* end confdefs.h. */
cd958eb3
MB
6167$ac_includes_default
6168int
6169main ()
6170{
6171#ifndef sys_siglist
6172 char *p = (char *) sys_siglist;
98418dba 6173#endif
503d2be0 6174
cd958eb3
MB
6175 ;
6176 return 0;
6177}
6178_ACEOF
6179rm -f conftest.$ac_objext
6180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6181 (eval $ac_compile) 2>conftest.er1
cd958eb3 6182 ac_status=$?
edfaf76d
LK
6183 grep -v '^ *+' conftest.er1 >conftest.err
6184 rm -f conftest.er1
6185 cat conftest.err >&5
cd958eb3
MB
6186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6187 (exit $ac_status); } &&
e143ad11
AS
6188 { ac_try='test -z "$ac_c_werror_flag"
6189 || test ! -s conftest.err'
edfaf76d
LK
6190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6191 (eval $ac_try) 2>&5
6192 ac_status=$?
6193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6194 (exit $ac_status); }; } &&
6195 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
6196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6197 (eval $ac_try) 2>&5
6198 ac_status=$?
6199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6200 (exit $ac_status); }; }; then
6201 ac_cv_have_decl_sys_siglist=yes
6202else
6203 echo "$as_me: failed program was:" >&5
19650fd6
AS
6204sed 's/^/| /' conftest.$ac_ext >&5
6205
cd958eb3
MB
6206ac_cv_have_decl_sys_siglist=no
6207fi
edfaf76d 6208rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
6209fi
6210echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6211echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
6212if test $ac_cv_have_decl_sys_siglist = yes; then
6213
6214cat >>confdefs.h <<_ACEOF
6215#define HAVE_DECL_SYS_SIGLIST 1
6216_ACEOF
6217
6218
6219else
6220 cat >>confdefs.h <<_ACEOF
6221#define HAVE_DECL_SYS_SIGLIST 0
6222_ACEOF
6223
6224
6225fi
6226
6227
6228if test $ac_cv_have_decl_sys_siglist != yes; then
6229 # For Tru64, at least:
6230 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6231echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
6232if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
6233 echo $ECHO_N "(cached) $ECHO_C" >&6
6234else
6235 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6236/* confdefs.h. */
6237_ACEOF
6238cat confdefs.h >>conftest.$ac_ext
6239cat >>conftest.$ac_ext <<_ACEOF
6240/* end confdefs.h. */
cd958eb3 6241$ac_includes_default
503d2be0
AS
6242int
6243main ()
6244{
cd958eb3
MB
6245#ifndef __sys_siglist
6246 char *p = (char *) __sys_siglist;
6247#endif
6248
503d2be0
AS
6249 ;
6250 return 0;
6251}
6252_ACEOF
6253rm -f conftest.$ac_objext
c0d27fcc 6254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6255 (eval $ac_compile) 2>conftest.er1
503d2be0 6256 ac_status=$?
edfaf76d
LK
6257 grep -v '^ *+' conftest.er1 >conftest.err
6258 rm -f conftest.er1
6259 cat conftest.err >&5
c0d27fcc 6260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6261 (exit $ac_status); } &&
e143ad11
AS
6262 { ac_try='test -z "$ac_c_werror_flag"
6263 || test ! -s conftest.err'
edfaf76d
LK
6264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6265 (eval $ac_try) 2>&5
6266 ac_status=$?
6267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6268 (exit $ac_status); }; } &&
6269 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6271 (eval $ac_try) 2>&5
6272 ac_status=$?
c0d27fcc 6273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6274 (exit $ac_status); }; }; then
cd958eb3 6275 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6276else
503d2be0 6277 echo "$as_me: failed program was:" >&5
19650fd6
AS
6278sed 's/^/| /' conftest.$ac_ext >&5
6279
cd958eb3 6280ac_cv_have_decl___sys_siglist=no
ba4481b5 6281fi
edfaf76d 6282rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6283fi
cd958eb3
MB
6284echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6285echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6
6286if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6287
cd958eb3
MB
6288cat >>confdefs.h <<_ACEOF
6289#define HAVE_DECL___SYS_SIGLIST 1
6290_ACEOF
6291
6292
6293else
6294 cat >>confdefs.h <<_ACEOF
6295#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 6296_ACEOF
503d2be0 6297
cd958eb3 6298
ba4481b5
DL
6299fi
6300
cd958eb3
MB
6301
6302 if test $ac_cv_have_decl___sys_siglist = yes; then
6303
6304cat >>confdefs.h <<\_ACEOF
6305#define sys_siglist __sys_siglist
6306_ACEOF
6307
6308 fi
6309fi
c0d27fcc 6310echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
6311echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
6312if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 6313 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6314else
503d2be0 6315 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6316/* confdefs.h. */
6317_ACEOF
6318cat confdefs.h >>conftest.$ac_ext
6319cat >>conftest.$ac_ext <<_ACEOF
6320/* end confdefs.h. */
98418dba
CW
6321#include <sys/types.h>
6322#include <sys/wait.h>
6323#ifndef WEXITSTATUS
6324# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6325#endif
6326#ifndef WIFEXITED
6327# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 6328#endif
503d2be0
AS
6329
6330int
6331main ()
6332{
98418dba
CW
6333 int s;
6334 wait (&s);
6335 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
6336 ;
6337 return 0;
6338}
6339_ACEOF
98418dba 6340rm -f conftest.$ac_objext
c0d27fcc 6341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6342 (eval $ac_compile) 2>conftest.er1
503d2be0 6343 ac_status=$?
edfaf76d
LK
6344 grep -v '^ *+' conftest.er1 >conftest.err
6345 rm -f conftest.er1
6346 cat conftest.err >&5
c0d27fcc 6347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6348 (exit $ac_status); } &&
e143ad11
AS
6349 { ac_try='test -z "$ac_c_werror_flag"
6350 || test ! -s conftest.err'
edfaf76d
LK
6351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6352 (eval $ac_try) 2>&5
6353 ac_status=$?
6354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6355 (exit $ac_status); }; } &&
6356 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6358 (eval $ac_try) 2>&5
6359 ac_status=$?
c0d27fcc 6360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6361 (exit $ac_status); }; }; then
98418dba 6362 ac_cv_header_sys_wait_h=yes
ba4481b5 6363else
503d2be0 6364 echo "$as_me: failed program was:" >&5
19650fd6
AS
6365sed 's/^/| /' conftest.$ac_ext >&5
6366
98418dba 6367ac_cv_header_sys_wait_h=no
ba4481b5 6368fi
edfaf76d 6369rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6370fi
c0d27fcc 6371echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
6372echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
6373if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 6374
c0d27fcc 6375cat >>confdefs.h <<\_ACEOF
98418dba 6376#define HAVE_SYS_WAIT_H 1
c0d27fcc 6377_ACEOF
ba4481b5 6378
ba4481b5
DL
6379fi
6380
c0d27fcc
MR
6381
6382echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
6383echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
6384if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 6385 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 6386else
503d2be0 6387 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6388/* confdefs.h. */
6389_ACEOF
6390cat confdefs.h >>conftest.$ac_ext
6391cat >>conftest.$ac_ext <<_ACEOF
6392/* end confdefs.h. */
98418dba
CW
6393#ifdef TIME_WITH_SYS_TIME
6394#include <sys/time.h>
6395#include <time.h>
6396#else
6397#ifdef HAVE_SYS_TIME_H
6398#include <sys/time.h>
6399#else
1113b624 6400#include <time.h>
98418dba
CW
6401#endif
6402#endif
6403#ifdef HAVE_UTIME_H
6404#include <utime.h>
6405#endif
503d2be0
AS
6406int
6407main ()
6408{
98418dba 6409static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
6410 ;
6411 return 0;
6412}
6413_ACEOF
98418dba 6414rm -f conftest.$ac_objext
c0d27fcc 6415if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6416 (eval $ac_compile) 2>conftest.er1
503d2be0 6417 ac_status=$?
edfaf76d
LK
6418 grep -v '^ *+' conftest.er1 >conftest.err
6419 rm -f conftest.er1
6420 cat conftest.err >&5
c0d27fcc 6421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6422 (exit $ac_status); } &&
e143ad11
AS
6423 { ac_try='test -z "$ac_c_werror_flag"
6424 || test ! -s conftest.err'
edfaf76d
LK
6425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6426 (eval $ac_try) 2>&5
6427 ac_status=$?
6428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6429 (exit $ac_status); }; } &&
6430 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6432 (eval $ac_try) 2>&5
6433 ac_status=$?
c0d27fcc 6434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6435 (exit $ac_status); }; }; then
98418dba 6436 emacs_cv_struct_utimbuf=yes
1113b624 6437else
503d2be0 6438 echo "$as_me: failed program was:" >&5
19650fd6
AS
6439sed 's/^/| /' conftest.$ac_ext >&5
6440
98418dba 6441emacs_cv_struct_utimbuf=no
1113b624 6442fi
edfaf76d 6443rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 6444fi
c0d27fcc 6445echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
6446echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
6447if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 6448
c0d27fcc 6449cat >>confdefs.h <<\_ACEOF
98418dba 6450#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 6451_ACEOF
1113b624
PE
6452
6453fi
ba4481b5 6454
c0d27fcc 6455echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
6456echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6457if test "${ac_cv_type_signal+set}" = set; then
503d2be0 6458 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6459else
98418dba 6460 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6461/* confdefs.h. */
6462_ACEOF
6463cat confdefs.h >>conftest.$ac_ext
6464cat >>conftest.$ac_ext <<_ACEOF
6465/* end confdefs.h. */
7397acc4 6466#include <sys/types.h>
98418dba
CW
6467#include <signal.h>
6468#ifdef signal
6469# undef signal
6470#endif
6471#ifdef __cplusplus
6472extern "C" void (*signal (int, void (*)(int)))(int);
6473#else
6474void (*signal ()) ();
6475#endif
6476
503d2be0
AS
6477int
6478main ()
6479{
98418dba 6480int i;
503d2be0
AS
6481 ;
6482 return 0;
6483}
6484_ACEOF
98418dba 6485rm -f conftest.$ac_objext
c0d27fcc 6486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6487 (eval $ac_compile) 2>conftest.er1
503d2be0 6488 ac_status=$?
edfaf76d
LK
6489 grep -v '^ *+' conftest.er1 >conftest.err
6490 rm -f conftest.er1
6491 cat conftest.err >&5
c0d27fcc 6492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6493 (exit $ac_status); } &&
e143ad11
AS
6494 { ac_try='test -z "$ac_c_werror_flag"
6495 || test ! -s conftest.err'
edfaf76d
LK
6496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6497 (eval $ac_try) 2>&5
6498 ac_status=$?
6499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6500 (exit $ac_status); }; } &&
6501 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6503 (eval $ac_try) 2>&5
6504 ac_status=$?
c0d27fcc 6505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6506 (exit $ac_status); }; }; then
98418dba 6507 ac_cv_type_signal=void
503d2be0
AS
6508else
6509 echo "$as_me: failed program was:" >&5
19650fd6
AS
6510sed 's/^/| /' conftest.$ac_ext >&5
6511
98418dba 6512ac_cv_type_signal=int
503d2be0 6513fi
edfaf76d 6514rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6515fi
c0d27fcc 6516echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 6517echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 6518
c0d27fcc 6519cat >>confdefs.h <<_ACEOF
98418dba 6520#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
6521_ACEOF
6522
503d2be0 6523
c0d27fcc
MR
6524
6525echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
6526echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
6527if test "${emacs_cv_speed_t+set}" = set; then
6528 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6529else
98418dba 6530 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6531/* confdefs.h. */
6532_ACEOF
6533cat confdefs.h >>conftest.$ac_ext
6534cat >>conftest.$ac_ext <<_ACEOF
6535/* end confdefs.h. */
98418dba 6536#include <termios.h>
98418dba
CW
6537int
6538main ()
6539{
6540speed_t x = 1;
6541 ;
6542 return 0;
6543}
6544_ACEOF
6545rm -f conftest.$ac_objext
c0d27fcc 6546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6547 (eval $ac_compile) 2>conftest.er1
98418dba 6548 ac_status=$?
edfaf76d
LK
6549 grep -v '^ *+' conftest.er1 >conftest.err
6550 rm -f conftest.er1
6551 cat conftest.err >&5
c0d27fcc 6552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6553 (exit $ac_status); } &&
e143ad11
AS
6554 { ac_try='test -z "$ac_c_werror_flag"
6555 || test ! -s conftest.err'
edfaf76d
LK
6556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6557 (eval $ac_try) 2>&5
6558 ac_status=$?
6559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6560 (exit $ac_status); }; } &&
6561 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6563 (eval $ac_try) 2>&5
6564 ac_status=$?
c0d27fcc 6565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6566 (exit $ac_status); }; }; then
6567 emacs_cv_speed_t=yes
6568else
6569 echo "$as_me: failed program was:" >&5
19650fd6
AS
6570sed 's/^/| /' conftest.$ac_ext >&5
6571
98418dba
CW
6572emacs_cv_speed_t=no
6573fi
edfaf76d 6574rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 6575fi
c0d27fcc 6576echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
6577echo "${ECHO_T}$emacs_cv_speed_t" >&6
6578if test $emacs_cv_speed_t = yes; then
b936fae4 6579
c0d27fcc 6580cat >>confdefs.h <<\_ACEOF
98418dba 6581#define HAVE_SPEED_T 1
c0d27fcc 6582_ACEOF
98418dba 6583
7397acc4
DL
6584fi
6585
c0d27fcc 6586echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
6587echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
6588if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 6589 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6590else
503d2be0 6591 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6592/* confdefs.h. */
6593_ACEOF
6594cat confdefs.h >>conftest.$ac_ext
6595cat >>conftest.$ac_ext <<_ACEOF
6596/* end confdefs.h. */
98418dba
CW
6597#ifdef TIME_WITH_SYS_TIME
6598#include <sys/time.h>
6599#include <time.h>
6600#else
6601#ifdef HAVE_SYS_TIME_H
6602#include <sys/time.h>
6603#else
6604#include <time.h>
6605#endif
6606#endif
503d2be0
AS
6607int
6608main ()
6609{
98418dba 6610static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
6611 ;
6612 return 0;
6613}
6614_ACEOF
6615rm -f conftest.$ac_objext
c0d27fcc 6616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6617 (eval $ac_compile) 2>conftest.er1
503d2be0 6618 ac_status=$?
edfaf76d
LK
6619 grep -v '^ *+' conftest.er1 >conftest.err
6620 rm -f conftest.er1
6621 cat conftest.err >&5
c0d27fcc 6622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6623 (exit $ac_status); } &&
e143ad11
AS
6624 { ac_try='test -z "$ac_c_werror_flag"
6625 || test ! -s conftest.err'
c0d27fcc 6626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6627 (eval $ac_try) 2>&5
6628 ac_status=$?
c0d27fcc 6629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
6630 (exit $ac_status); }; } &&
6631 { ac_try='test -s conftest.$ac_objext'
6632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6633 (eval $ac_try) 2>&5
6634 ac_status=$?
6635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6636 (exit $ac_status); }; }; then
6637 emacs_cv_struct_timeval=yes
6638else
503d2be0 6639 echo "$as_me: failed program was:" >&5
19650fd6
AS
6640sed 's/^/| /' conftest.$ac_ext >&5
6641
98418dba 6642emacs_cv_struct_timeval=no
7397acc4 6643fi
edfaf76d 6644rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6645fi
c0d27fcc 6646echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
6647echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
6648HAVE_TIMEVAL=$emacs_cv_struct_timeval
6649if test $emacs_cv_struct_timeval = yes; then
b936fae4 6650
c0d27fcc 6651cat >>confdefs.h <<\_ACEOF
98418dba 6652#define HAVE_TIMEVAL 1
c0d27fcc 6653_ACEOF
7397acc4
DL
6654
6655fi
6656
c0d27fcc 6657echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
6658echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
6659if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 6660 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6661else
503d2be0 6662 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6663/* confdefs.h. */
6664_ACEOF
6665cat confdefs.h >>conftest.$ac_ext
6666cat >>conftest.$ac_ext <<_ACEOF
6667/* end confdefs.h. */
98418dba 6668#include <math.h>
503d2be0
AS
6669int
6670main ()
6671{
98418dba 6672static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
6673 ;
6674 return 0;
ba4481b5 6675}
503d2be0
AS
6676_ACEOF
6677rm -f conftest.$ac_objext
c0d27fcc 6678if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6679 (eval $ac_compile) 2>conftest.er1
503d2be0 6680 ac_status=$?
edfaf76d
LK
6681 grep -v '^ *+' conftest.er1 >conftest.err
6682 rm -f conftest.er1
6683 cat conftest.err >&5
c0d27fcc 6684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6685 (exit $ac_status); } &&
e143ad11
AS
6686 { ac_try='test -z "$ac_c_werror_flag"
6687 || test ! -s conftest.err'
edfaf76d
LK
6688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6689 (eval $ac_try) 2>&5
6690 ac_status=$?
6691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6692 (exit $ac_status); }; } &&
6693 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6695 (eval $ac_try) 2>&5
6696 ac_status=$?
c0d27fcc 6697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6698 (exit $ac_status); }; }; then
98418dba 6699 emacs_cv_struct_exception=yes
ba4481b5 6700else
503d2be0 6701 echo "$as_me: failed program was:" >&5
19650fd6
AS
6702sed 's/^/| /' conftest.$ac_ext >&5
6703
98418dba 6704emacs_cv_struct_exception=no
ba4481b5 6705fi
edfaf76d 6706rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6707fi
c0d27fcc 6708echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
6709echo "${ECHO_T}$emacs_cv_struct_exception" >&6
6710HAVE_EXCEPTION=$emacs_cv_struct_exception
6711if test $emacs_cv_struct_exception != yes; then
b936fae4 6712
c0d27fcc 6713cat >>confdefs.h <<\_ACEOF
98418dba 6714#define NO_MATHERR 1
c0d27fcc 6715_ACEOF
ba4481b5
DL
6716
6717fi
6718
7862d3a8
AS
6719
6720for ac_header in sys/socket.h
6721do
6722as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6723if eval "test \"\${$as_ac_Header+set}\" = set"; then
6724 echo "$as_me:$LINENO: checking for $ac_header" >&5
6725echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6726if eval "test \"\${$as_ac_Header+set}\" = set"; then
6727 echo $ECHO_N "(cached) $ECHO_C" >&6
6728fi
6729echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6730echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6731else
6732 # Is the header compilable?
6733echo "$as_me:$LINENO: checking $ac_header usability" >&5
6734echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6735cat >conftest.$ac_ext <<_ACEOF
6736/* confdefs.h. */
6737_ACEOF
6738cat confdefs.h >>conftest.$ac_ext
6739cat >>conftest.$ac_ext <<_ACEOF
6740/* end confdefs.h. */
6741$ac_includes_default
6742#include <$ac_header>
6743_ACEOF
6744rm -f conftest.$ac_objext
6745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6746 (eval $ac_compile) 2>conftest.er1
7862d3a8 6747 ac_status=$?
edfaf76d
LK
6748 grep -v '^ *+' conftest.er1 >conftest.err
6749 rm -f conftest.er1
6750 cat conftest.err >&5
7862d3a8
AS
6751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6752 (exit $ac_status); } &&
e143ad11
AS
6753 { ac_try='test -z "$ac_c_werror_flag"
6754 || test ! -s conftest.err'
edfaf76d
LK
6755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6756 (eval $ac_try) 2>&5
6757 ac_status=$?
6758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6759 (exit $ac_status); }; } &&
6760 { ac_try='test -s conftest.$ac_objext'
7862d3a8
AS
6761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6762 (eval $ac_try) 2>&5
6763 ac_status=$?
6764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6765 (exit $ac_status); }; }; then
6766 ac_header_compiler=yes
6767else
6768 echo "$as_me: failed program was:" >&5
6769sed 's/^/| /' conftest.$ac_ext >&5
6770
6771ac_header_compiler=no
6772fi
edfaf76d 6773rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8
AS
6774echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6775echo "${ECHO_T}$ac_header_compiler" >&6
6776
6777# Is the header present?
6778echo "$as_me:$LINENO: checking $ac_header presence" >&5
6779echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6780cat >conftest.$ac_ext <<_ACEOF
6781/* confdefs.h. */
6782_ACEOF
6783cat confdefs.h >>conftest.$ac_ext
6784cat >>conftest.$ac_ext <<_ACEOF
6785/* end confdefs.h. */
6786#include <$ac_header>
6787_ACEOF
6788if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6789 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6790 ac_status=$?
6791 grep -v '^ *+' conftest.er1 >conftest.err
6792 rm -f conftest.er1
6793 cat conftest.err >&5
6794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6795 (exit $ac_status); } >/dev/null; then
6796 if test -s conftest.err; then
6797 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 6798 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7862d3a8
AS
6799 else
6800 ac_cpp_err=
6801 fi
6802else
6803 ac_cpp_err=yes
6804fi
6805if test -z "$ac_cpp_err"; then
6806 ac_header_preproc=yes
6807else
6808 echo "$as_me: failed program was:" >&5
6809sed 's/^/| /' conftest.$ac_ext >&5
6810
6811 ac_header_preproc=no
6812fi
6813rm -f conftest.err conftest.$ac_ext
6814echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6815echo "${ECHO_T}$ac_header_preproc" >&6
6816
6817# So? What about this header?
edfaf76d
LK
6818case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6819 yes:no: )
7862d3a8
AS
6820 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6821echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6822 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6823echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6824 ac_header_preproc=yes
7862d3a8 6825 ;;
edfaf76d 6826 no:yes:* )
7862d3a8
AS
6827 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6828echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6829 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6830echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6831 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6832echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6833 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6834echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
6835 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6836echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6837 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6838echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7862d3a8
AS
6839 (
6840 cat <<\_ASBOX
edfaf76d
LK
6841## ------------------------------------------ ##
6842## Report this to the AC_PACKAGE_NAME lists. ##
6843## ------------------------------------------ ##
7862d3a8
AS
6844_ASBOX
6845 ) |
6846 sed "s/^/$as_me: WARNING: /" >&2
6847 ;;
6848esac
6849echo "$as_me:$LINENO: checking for $ac_header" >&5
6850echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6851if eval "test \"\${$as_ac_Header+set}\" = set"; then
6852 echo $ECHO_N "(cached) $ECHO_C" >&6
6853else
edfaf76d 6854 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8
AS
6855fi
6856echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6857echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6858
6859fi
6860if test `eval echo '${'$as_ac_Header'}'` = yes; then
6861 cat >>confdefs.h <<_ACEOF
6862#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6863_ACEOF
6864
6865fi
6866
6867done
6868
6869
6870for ac_header in net/if.h
6871do
6872as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6873echo "$as_me:$LINENO: checking for $ac_header" >&5
6874echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6875if eval "test \"\${$as_ac_Header+set}\" = set"; then
6876 echo $ECHO_N "(cached) $ECHO_C" >&6
6877else
6878 cat >conftest.$ac_ext <<_ACEOF
6879/* confdefs.h. */
6880_ACEOF
6881cat confdefs.h >>conftest.$ac_ext
6882cat >>conftest.$ac_ext <<_ACEOF
6883/* end confdefs.h. */
6884$ac_includes_default
6885#if HAVE_SYS_SOCKET_H
6886#include <sys/socket.h>
6887#endif
6888
6889#include <$ac_header>
6890_ACEOF
6891rm -f conftest.$ac_objext
6892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6893 (eval $ac_compile) 2>conftest.er1
7862d3a8 6894 ac_status=$?
edfaf76d
LK
6895 grep -v '^ *+' conftest.er1 >conftest.err
6896 rm -f conftest.er1
6897 cat conftest.err >&5
7862d3a8
AS
6898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6899 (exit $ac_status); } &&
e143ad11
AS
6900 { ac_try='test -z "$ac_c_werror_flag"
6901 || test ! -s conftest.err'
edfaf76d
LK
6902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6903 (eval $ac_try) 2>&5
6904 ac_status=$?
6905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6906 (exit $ac_status); }; } &&
6907 { ac_try='test -s conftest.$ac_objext'
7862d3a8
AS
6908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6909 (eval $ac_try) 2>&5
6910 ac_status=$?
6911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6912 (exit $ac_status); }; }; then
6913 eval "$as_ac_Header=yes"
6914else
6915 echo "$as_me: failed program was:" >&5
6916sed 's/^/| /' conftest.$ac_ext >&5
6917
6918eval "$as_ac_Header=no"
6919fi
edfaf76d 6920rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8
AS
6921fi
6922echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6923echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6924if test `eval echo '${'$as_ac_Header'}'` = yes; then
6925 cat >>confdefs.h <<_ACEOF
6926#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6927_ACEOF
6928
6929fi
6930
6931done
6932
6933
c0d27fcc 6934echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
6935echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
6936if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 6937 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6938else
503d2be0 6939 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6940/* confdefs.h. */
6941_ACEOF
6942cat confdefs.h >>conftest.$ac_ext
6943cat >>conftest.$ac_ext <<_ACEOF
6944/* end confdefs.h. */
98418dba
CW
6945#include <sys/types.h>
6946#include <time.h>
7397acc4 6947
503d2be0
AS
6948int
6949main ()
6950{
98418dba 6951struct tm *tp; tp->tm_sec;
503d2be0
AS
6952 ;
6953 return 0;
6954}
6955_ACEOF
6956rm -f conftest.$ac_objext
c0d27fcc 6957if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6958 (eval $ac_compile) 2>conftest.er1
503d2be0 6959 ac_status=$?
edfaf76d
LK
6960 grep -v '^ *+' conftest.er1 >conftest.err
6961 rm -f conftest.er1
6962 cat conftest.err >&5
c0d27fcc 6963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6964 (exit $ac_status); } &&
e143ad11
AS
6965 { ac_try='test -z "$ac_c_werror_flag"
6966 || test ! -s conftest.err'
edfaf76d
LK
6967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6968 (eval $ac_try) 2>&5
6969 ac_status=$?
6970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6971 (exit $ac_status); }; } &&
6972 { ac_try='test -s conftest.$ac_objext'
35996d22
AS
6973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6974 (eval $ac_try) 2>&5
6975 ac_status=$?
6976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6977 (exit $ac_status); }; }; then
6978 ac_cv_struct_tm=time.h
6979else
503d2be0 6980 echo "$as_me: failed program was:" >&5
19650fd6
AS
6981sed 's/^/| /' conftest.$ac_ext >&5
6982
98418dba 6983ac_cv_struct_tm=sys/time.h
7397acc4 6984fi
edfaf76d 6985rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6986fi
c0d27fcc 6987echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
6988echo "${ECHO_T}$ac_cv_struct_tm" >&6
6989if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 6990
c0d27fcc 6991cat >>confdefs.h <<\_ACEOF
98418dba 6992#define TM_IN_SYS_TIME 1
c0d27fcc 6993_ACEOF
7397acc4
DL
6994
6995fi
ba4481b5 6996
c0d27fcc 6997echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
6998echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
6999if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7000 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7001else
98418dba 7002 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7003/* confdefs.h. */
7004_ACEOF
7005cat confdefs.h >>conftest.$ac_ext
7006cat >>conftest.$ac_ext <<_ACEOF
7007/* end confdefs.h. */
98418dba
CW
7008#include <sys/types.h>
7009#include <$ac_cv_struct_tm>
ba4481b5 7010
c0d27fcc 7011
98418dba
CW
7012int
7013main ()
7014{
7015static struct tm ac_aggr;
7016if (ac_aggr.tm_zone)
7017return 0;
7018 ;
7019 return 0;
7020}
7021_ACEOF
7022rm -f conftest.$ac_objext
c0d27fcc 7023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7024 (eval $ac_compile) 2>conftest.er1
98418dba 7025 ac_status=$?
edfaf76d
LK
7026 grep -v '^ *+' conftest.er1 >conftest.err
7027 rm -f conftest.er1
7028 cat conftest.err >&5
c0d27fcc 7029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7030 (exit $ac_status); } &&
e143ad11
AS
7031 { ac_try='test -z "$ac_c_werror_flag"
7032 || test ! -s conftest.err'
edfaf76d
LK
7033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7034 (eval $ac_try) 2>&5
7035 ac_status=$?
7036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7037 (exit $ac_status); }; } &&
7038 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7040 (eval $ac_try) 2>&5
7041 ac_status=$?
c0d27fcc 7042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7043 (exit $ac_status); }; }; then
7044 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7045else
98418dba 7046 echo "$as_me: failed program was:" >&5
19650fd6
AS
7047sed 's/^/| /' conftest.$ac_ext >&5
7048
6bae0ccf 7049cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7050/* confdefs.h. */
7051_ACEOF
7052cat confdefs.h >>conftest.$ac_ext
7053cat >>conftest.$ac_ext <<_ACEOF
7054/* end confdefs.h. */
6bae0ccf
DL
7055#include <sys/types.h>
7056#include <$ac_cv_struct_tm>
7057
7058
7059int
7060main ()
7061{
7062static struct tm ac_aggr;
7063if (sizeof ac_aggr.tm_zone)
7064return 0;
7065 ;
7066 return 0;
7067}
7068_ACEOF
7069rm -f conftest.$ac_objext
7070if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7071 (eval $ac_compile) 2>conftest.er1
6bae0ccf 7072 ac_status=$?
edfaf76d
LK
7073 grep -v '^ *+' conftest.er1 >conftest.err
7074 rm -f conftest.er1
7075 cat conftest.err >&5
6bae0ccf
DL
7076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7077 (exit $ac_status); } &&
e143ad11
AS
7078 { ac_try='test -z "$ac_c_werror_flag"
7079 || test ! -s conftest.err'
edfaf76d
LK
7080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7081 (eval $ac_try) 2>&5
7082 ac_status=$?
7083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7084 (exit $ac_status); }; } &&
7085 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
7086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7087 (eval $ac_try) 2>&5
7088 ac_status=$?
7089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7090 (exit $ac_status); }; }; then
7091 ac_cv_member_struct_tm_tm_zone=yes
7092else
7093 echo "$as_me: failed program was:" >&5
19650fd6
AS
7094sed 's/^/| /' conftest.$ac_ext >&5
7095
98418dba 7096ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7097fi
edfaf76d 7098rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7099fi
edfaf76d 7100rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7101fi
c0d27fcc 7102echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
7103echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
7104if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7105
c0d27fcc 7106cat >>confdefs.h <<_ACEOF
98418dba 7107#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7108_ACEOF
7109
ba4481b5 7110
98418dba 7111fi
ba4481b5 7112
98418dba 7113if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7114
c0d27fcc 7115cat >>confdefs.h <<\_ACEOF
98418dba 7116#define HAVE_TM_ZONE 1
c0d27fcc 7117_ACEOF
ba4481b5 7118
ba4481b5 7119else
c0d27fcc 7120 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
7121echo $ECHO_N "checking for tzname... $ECHO_C" >&6
7122if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 7123 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7124else
98418dba 7125 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7126/* confdefs.h. */
7127_ACEOF
7128cat confdefs.h >>conftest.$ac_ext
7129cat >>conftest.$ac_ext <<_ACEOF
7130/* end confdefs.h. */
98418dba
CW
7131#include <time.h>
7132#ifndef tzname /* For SGI. */
7133extern char *tzname[]; /* RS6000 and others reject char **tzname. */
7134#endif
7135
98418dba
CW
7136int
7137main ()
7138{
7139atoi(*tzname);
7140 ;
7141 return 0;
7142}
7143_ACEOF
7144rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7145if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 7146 (eval $ac_link) 2>conftest.er1
98418dba 7147 ac_status=$?
edfaf76d
LK
7148 grep -v '^ *+' conftest.er1 >conftest.err
7149 rm -f conftest.er1
7150 cat conftest.err >&5
c0d27fcc 7151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7152 (exit $ac_status); } &&
e143ad11
AS
7153 { ac_try='test -z "$ac_c_werror_flag"
7154 || test ! -s conftest.err'
edfaf76d
LK
7155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7156 (eval $ac_try) 2>&5
7157 ac_status=$?
7158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7159 (exit $ac_status); }; } &&
7160 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7162 (eval $ac_try) 2>&5
7163 ac_status=$?
c0d27fcc 7164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7165 (exit $ac_status); }; }; then
7166 ac_cv_var_tzname=yes
7167else
7168 echo "$as_me: failed program was:" >&5
19650fd6
AS
7169sed 's/^/| /' conftest.$ac_ext >&5
7170
98418dba 7171ac_cv_var_tzname=no
ba4481b5 7172fi
edfaf76d
LK
7173rm -f conftest.err conftest.$ac_objext \
7174 conftest$ac_exeext conftest.$ac_ext
98418dba 7175fi
c0d27fcc 7176echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
7177echo "${ECHO_T}$ac_cv_var_tzname" >&6
7178 if test $ac_cv_var_tzname = yes; then
ba4481b5 7179
c0d27fcc 7180cat >>confdefs.h <<\_ACEOF
98418dba 7181#define HAVE_TZNAME 1
c0d27fcc 7182_ACEOF
503d2be0 7183
98418dba
CW
7184 fi
7185fi
503d2be0 7186
c0d27fcc 7187echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
7188echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
7189if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
7190 echo $ECHO_N "(cached) $ECHO_C" >&6
7191else
7192 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7193/* confdefs.h. */
7194_ACEOF
7195cat confdefs.h >>conftest.$ac_ext
7196cat >>conftest.$ac_ext <<_ACEOF
7197/* end confdefs.h. */
98418dba 7198#include <time.h>
b936fae4 7199
98418dba
CW
7200int
7201main ()
7202{
b936fae4
AS
7203static struct tm ac_aggr;
7204if (ac_aggr.tm_gmtoff)
7205return 0;
98418dba
CW
7206 ;
7207 return 0;
7208}
7209_ACEOF
b936fae4 7210rm -f conftest.$ac_objext
c0d27fcc 7211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7212 (eval $ac_compile) 2>conftest.er1
98418dba 7213 ac_status=$?
edfaf76d
LK
7214 grep -v '^ *+' conftest.er1 >conftest.err
7215 rm -f conftest.er1
7216 cat conftest.err >&5
c0d27fcc 7217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7218 (exit $ac_status); } &&
e143ad11
AS
7219 { ac_try='test -z "$ac_c_werror_flag"
7220 || test ! -s conftest.err'
edfaf76d
LK
7221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7222 (eval $ac_try) 2>&5
7223 ac_status=$?
7224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7225 (exit $ac_status); }; } &&
7226 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7228 (eval $ac_try) 2>&5
7229 ac_status=$?
c0d27fcc 7230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7231 (exit $ac_status); }; }; then
b936fae4 7232 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
7233else
7234 echo "$as_me: failed program was:" >&5
19650fd6
AS
7235sed 's/^/| /' conftest.$ac_ext >&5
7236
8799b3e4 7237cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7238/* confdefs.h. */
7239_ACEOF
7240cat confdefs.h >>conftest.$ac_ext
7241cat >>conftest.$ac_ext <<_ACEOF
7242/* end confdefs.h. */
6bae0ccf
DL
7243#include <time.h>
7244
8799b3e4
CW
7245int
7246main ()
7247{
6bae0ccf
DL
7248static struct tm ac_aggr;
7249if (sizeof ac_aggr.tm_gmtoff)
7250return 0;
8799b3e4
CW
7251 ;
7252 return 0;
7253}
7254_ACEOF
6bae0ccf 7255rm -f conftest.$ac_objext
c0d27fcc 7256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7257 (eval $ac_compile) 2>conftest.er1
8799b3e4 7258 ac_status=$?
edfaf76d
LK
7259 grep -v '^ *+' conftest.er1 >conftest.err
7260 rm -f conftest.er1
7261 cat conftest.err >&5
c0d27fcc 7262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 7263 (exit $ac_status); } &&
e143ad11
AS
7264 { ac_try='test -z "$ac_c_werror_flag"
7265 || test ! -s conftest.err'
edfaf76d
LK
7266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7267 (eval $ac_try) 2>&5
7268 ac_status=$?
7269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7270 (exit $ac_status); }; } &&
7271 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
7273 (eval $ac_try) 2>&5
7274 ac_status=$?
c0d27fcc 7275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 7276 (exit $ac_status); }; }; then
6bae0ccf 7277 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
7278else
7279 echo "$as_me: failed program was:" >&5
19650fd6
AS
7280sed 's/^/| /' conftest.$ac_ext >&5
7281
6bae0ccf 7282ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7283fi
edfaf76d 7284rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7285fi
edfaf76d 7286rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7287fi
6bae0ccf
DL
7288echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7289echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
7290if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
7291
7292cat >>confdefs.h <<\_ACEOF
7293#define HAVE_TM_GMTOFF 1
7294_ACEOF
7295
7296fi
7297
96f3a036
DL
7298echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
7299echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6
7300if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
7301 echo $ECHO_N "(cached) $ECHO_C" >&6
7302else
7303 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7304/* confdefs.h. */
7305_ACEOF
7306cat confdefs.h >>conftest.$ac_ext
7307cat >>conftest.$ac_ext <<_ACEOF
7308/* end confdefs.h. */
7862d3a8
AS
7309$ac_includes_default
7310#if HAVE_SYS_SOCKET_H
7311#include <sys/socket.h>
7312#endif
7313#if HAVE_NET_IF_H
96f3a036 7314#include <net/if.h>
7862d3a8 7315#endif
96f3a036
DL
7316
7317int
7318main ()
7319{
7320static struct ifreq ac_aggr;
7321if (ac_aggr.ifr_flags)
7322return 0;
7323 ;
7324 return 0;
7325}
7326_ACEOF
7327rm -f conftest.$ac_objext
7328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7329 (eval $ac_compile) 2>conftest.er1
96f3a036 7330 ac_status=$?
edfaf76d
LK
7331 grep -v '^ *+' conftest.er1 >conftest.err
7332 rm -f conftest.er1
7333 cat conftest.err >&5
96f3a036
DL
7334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7335 (exit $ac_status); } &&
e143ad11
AS
7336 { ac_try='test -z "$ac_c_werror_flag"
7337 || test ! -s conftest.err'
edfaf76d
LK
7338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7339 (eval $ac_try) 2>&5
7340 ac_status=$?
7341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7342 (exit $ac_status); }; } &&
7343 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7345 (eval $ac_try) 2>&5
7346 ac_status=$?
7347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7348 (exit $ac_status); }; }; then
7349 ac_cv_member_struct_ifreq_ifr_flags=yes
7350else
7351 echo "$as_me: failed program was:" >&5
7352sed 's/^/| /' conftest.$ac_ext >&5
7353
7354cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7355/* confdefs.h. */
7356_ACEOF
7357cat confdefs.h >>conftest.$ac_ext
7358cat >>conftest.$ac_ext <<_ACEOF
7359/* end confdefs.h. */
7862d3a8
AS
7360$ac_includes_default
7361#if HAVE_SYS_SOCKET_H
7362#include <sys/socket.h>
7363#endif
7364#if HAVE_NET_IF_H
96f3a036 7365#include <net/if.h>
7862d3a8 7366#endif
96f3a036
DL
7367
7368int
7369main ()
7370{
7371static struct ifreq ac_aggr;
7372if (sizeof ac_aggr.ifr_flags)
7373return 0;
7374 ;
7375 return 0;
7376}
7377_ACEOF
7378rm -f conftest.$ac_objext
7379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7380 (eval $ac_compile) 2>conftest.er1
96f3a036 7381 ac_status=$?
edfaf76d
LK
7382 grep -v '^ *+' conftest.er1 >conftest.err
7383 rm -f conftest.er1
7384 cat conftest.err >&5
96f3a036
DL
7385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7386 (exit $ac_status); } &&
e143ad11
AS
7387 { ac_try='test -z "$ac_c_werror_flag"
7388 || test ! -s conftest.err'
edfaf76d
LK
7389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7390 (eval $ac_try) 2>&5
7391 ac_status=$?
7392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7393 (exit $ac_status); }; } &&
7394 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7396 (eval $ac_try) 2>&5
7397 ac_status=$?
7398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7399 (exit $ac_status); }; }; then
7400 ac_cv_member_struct_ifreq_ifr_flags=yes
7401else
7402 echo "$as_me: failed program was:" >&5
7403sed 's/^/| /' conftest.$ac_ext >&5
7404
7405ac_cv_member_struct_ifreq_ifr_flags=no
7406fi
edfaf76d 7407rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7408fi
edfaf76d 7409rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7410fi
7411echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
7412echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6
7413if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
7414
7415cat >>confdefs.h <<_ACEOF
7416#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
7417_ACEOF
7418
7419
7420fi
7421echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
7422echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6
7423if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
7424 echo $ECHO_N "(cached) $ECHO_C" >&6
7425else
7426 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7427/* confdefs.h. */
7428_ACEOF
7429cat confdefs.h >>conftest.$ac_ext
7430cat >>conftest.$ac_ext <<_ACEOF
7431/* end confdefs.h. */
7862d3a8
AS
7432$ac_includes_default
7433#if HAVE_SYS_SOCKET_H
7434#include <sys/socket.h>
7435#endif
7436#if HAVE_NET_IF_H
96f3a036 7437#include <net/if.h>
7862d3a8 7438#endif
96f3a036
DL
7439
7440int
7441main ()
7442{
7443static struct ifreq ac_aggr;
7444if (ac_aggr.ifr_hwaddr)
7445return 0;
7446 ;
7447 return 0;
7448}
7449_ACEOF
7450rm -f conftest.$ac_objext
7451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7452 (eval $ac_compile) 2>conftest.er1
96f3a036 7453 ac_status=$?
edfaf76d
LK
7454 grep -v '^ *+' conftest.er1 >conftest.err
7455 rm -f conftest.er1
7456 cat conftest.err >&5
96f3a036
DL
7457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7458 (exit $ac_status); } &&
e143ad11
AS
7459 { ac_try='test -z "$ac_c_werror_flag"
7460 || test ! -s conftest.err'
edfaf76d
LK
7461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7462 (eval $ac_try) 2>&5
7463 ac_status=$?
7464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7465 (exit $ac_status); }; } &&
7466 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7468 (eval $ac_try) 2>&5
7469 ac_status=$?
7470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7471 (exit $ac_status); }; }; then
7472 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7473else
7474 echo "$as_me: failed program was:" >&5
7475sed 's/^/| /' conftest.$ac_ext >&5
7476
7477cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7478/* confdefs.h. */
7479_ACEOF
7480cat confdefs.h >>conftest.$ac_ext
7481cat >>conftest.$ac_ext <<_ACEOF
7482/* end confdefs.h. */
7862d3a8
AS
7483$ac_includes_default
7484#if HAVE_SYS_SOCKET_H
7485#include <sys/socket.h>
7486#endif
7487#if HAVE_NET_IF_H
96f3a036 7488#include <net/if.h>
7862d3a8 7489#endif
96f3a036
DL
7490
7491int
7492main ()
7493{
7494static struct ifreq ac_aggr;
7495if (sizeof ac_aggr.ifr_hwaddr)
7496return 0;
7497 ;
7498 return 0;
7499}
7500_ACEOF
7501rm -f conftest.$ac_objext
7502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7503 (eval $ac_compile) 2>conftest.er1
96f3a036 7504 ac_status=$?
edfaf76d
LK
7505 grep -v '^ *+' conftest.er1 >conftest.err
7506 rm -f conftest.er1
7507 cat conftest.err >&5
96f3a036
DL
7508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7509 (exit $ac_status); } &&
e143ad11
AS
7510 { ac_try='test -z "$ac_c_werror_flag"
7511 || test ! -s conftest.err'
edfaf76d
LK
7512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7513 (eval $ac_try) 2>&5
7514 ac_status=$?
7515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7516 (exit $ac_status); }; } &&
7517 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7519 (eval $ac_try) 2>&5
7520 ac_status=$?
7521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7522 (exit $ac_status); }; }; then
7523 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7524else
7525 echo "$as_me: failed program was:" >&5
7526sed 's/^/| /' conftest.$ac_ext >&5
7527
7528ac_cv_member_struct_ifreq_ifr_hwaddr=no
7529fi
edfaf76d 7530rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7531fi
edfaf76d 7532rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7533fi
7534echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
7535echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6
7536if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
7537
7538cat >>confdefs.h <<_ACEOF
7539#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
7540_ACEOF
7541
7542
7543fi
7544echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
7545echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6
7546if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
7547 echo $ECHO_N "(cached) $ECHO_C" >&6
7548else
7549 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7550/* confdefs.h. */
7551_ACEOF
7552cat confdefs.h >>conftest.$ac_ext
7553cat >>conftest.$ac_ext <<_ACEOF
7554/* end confdefs.h. */
7862d3a8
AS
7555$ac_includes_default
7556#if HAVE_SYS_SOCKET_H
7557#include <sys/socket.h>
7558#endif
7559#if HAVE_NET_IF_H
96f3a036 7560#include <net/if.h>
7862d3a8 7561#endif
96f3a036
DL
7562
7563int
7564main ()
7565{
7566static struct ifreq ac_aggr;
7567if (ac_aggr.ifr_netmask)
7568return 0;
7569 ;
7570 return 0;
7571}
7572_ACEOF
7573rm -f conftest.$ac_objext
7574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7575 (eval $ac_compile) 2>conftest.er1
96f3a036 7576 ac_status=$?
edfaf76d
LK
7577 grep -v '^ *+' conftest.er1 >conftest.err
7578 rm -f conftest.er1
7579 cat conftest.err >&5
96f3a036
DL
7580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7581 (exit $ac_status); } &&
e143ad11
AS
7582 { ac_try='test -z "$ac_c_werror_flag"
7583 || test ! -s conftest.err'
edfaf76d
LK
7584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7585 (eval $ac_try) 2>&5
7586 ac_status=$?
7587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7588 (exit $ac_status); }; } &&
7589 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7591 (eval $ac_try) 2>&5
7592 ac_status=$?
7593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7594 (exit $ac_status); }; }; then
7595 ac_cv_member_struct_ifreq_ifr_netmask=yes
7596else
7597 echo "$as_me: failed program was:" >&5
7598sed 's/^/| /' conftest.$ac_ext >&5
7599
7600cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7601/* confdefs.h. */
7602_ACEOF
7603cat confdefs.h >>conftest.$ac_ext
7604cat >>conftest.$ac_ext <<_ACEOF
7605/* end confdefs.h. */
7862d3a8
AS
7606$ac_includes_default
7607#if HAVE_SYS_SOCKET_H
7608#include <sys/socket.h>
7609#endif
7610#if HAVE_NET_IF_H
96f3a036 7611#include <net/if.h>
7862d3a8 7612#endif
96f3a036
DL
7613
7614int
7615main ()
7616{
7617static struct ifreq ac_aggr;
7618if (sizeof ac_aggr.ifr_netmask)
7619return 0;
7620 ;
7621 return 0;
7622}
7623_ACEOF
7624rm -f conftest.$ac_objext
7625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7626 (eval $ac_compile) 2>conftest.er1
96f3a036 7627 ac_status=$?
edfaf76d
LK
7628 grep -v '^ *+' conftest.er1 >conftest.err
7629 rm -f conftest.er1
7630 cat conftest.err >&5
96f3a036
DL
7631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7632 (exit $ac_status); } &&
e143ad11
AS
7633 { ac_try='test -z "$ac_c_werror_flag"
7634 || test ! -s conftest.err'
edfaf76d
LK
7635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7636 (eval $ac_try) 2>&5
7637 ac_status=$?
7638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7639 (exit $ac_status); }; } &&
7640 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7642 (eval $ac_try) 2>&5
7643 ac_status=$?
7644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7645 (exit $ac_status); }; }; then
7646 ac_cv_member_struct_ifreq_ifr_netmask=yes
7647else
7648 echo "$as_me: failed program was:" >&5
7649sed 's/^/| /' conftest.$ac_ext >&5
7650
7651ac_cv_member_struct_ifreq_ifr_netmask=no
7652fi
edfaf76d 7653rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7654fi
edfaf76d 7655rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7656fi
7657echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
7658echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6
7659if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
7660
7661cat >>confdefs.h <<_ACEOF
7662#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
7663_ACEOF
7664
7665
7666fi
7667echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
7668echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6
7669if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
7670 echo $ECHO_N "(cached) $ECHO_C" >&6
7671else
7672 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7673/* confdefs.h. */
7674_ACEOF
7675cat confdefs.h >>conftest.$ac_ext
7676cat >>conftest.$ac_ext <<_ACEOF
7677/* end confdefs.h. */
7862d3a8
AS
7678$ac_includes_default
7679#if HAVE_SYS_SOCKET_H
7680#include <sys/socket.h>
7681#endif
7682#if HAVE_NET_IF_H
96f3a036 7683#include <net/if.h>
7862d3a8 7684#endif
96f3a036
DL
7685
7686int
7687main ()
7688{
7689static struct ifreq ac_aggr;
7690if (ac_aggr.ifr_broadaddr)
7691return 0;
7692 ;
7693 return 0;
7694}
7695_ACEOF
7696rm -f conftest.$ac_objext
7697if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7698 (eval $ac_compile) 2>conftest.er1
96f3a036 7699 ac_status=$?
edfaf76d
LK
7700 grep -v '^ *+' conftest.er1 >conftest.err
7701 rm -f conftest.er1
7702 cat conftest.err >&5
96f3a036
DL
7703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7704 (exit $ac_status); } &&
e143ad11
AS
7705 { ac_try='test -z "$ac_c_werror_flag"
7706 || test ! -s conftest.err'
edfaf76d
LK
7707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7708 (eval $ac_try) 2>&5
7709 ac_status=$?
7710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7711 (exit $ac_status); }; } &&
7712 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7714 (eval $ac_try) 2>&5
7715 ac_status=$?
7716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7717 (exit $ac_status); }; }; then
7718 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7719else
7720 echo "$as_me: failed program was:" >&5
7721sed 's/^/| /' conftest.$ac_ext >&5
7722
7723cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7724/* confdefs.h. */
7725_ACEOF
7726cat confdefs.h >>conftest.$ac_ext
7727cat >>conftest.$ac_ext <<_ACEOF
7728/* end confdefs.h. */
7862d3a8
AS
7729$ac_includes_default
7730#if HAVE_SYS_SOCKET_H
7731#include <sys/socket.h>
7732#endif
7733#if HAVE_NET_IF_H
96f3a036 7734#include <net/if.h>
7862d3a8 7735#endif
96f3a036
DL
7736
7737int
7738main ()
7739{
7740static struct ifreq ac_aggr;
7741if (sizeof ac_aggr.ifr_broadaddr)
7742return 0;
7743 ;
7744 return 0;
7745}
7746_ACEOF
7747rm -f conftest.$ac_objext
7748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7749 (eval $ac_compile) 2>conftest.er1
96f3a036 7750 ac_status=$?
edfaf76d
LK
7751 grep -v '^ *+' conftest.er1 >conftest.err
7752 rm -f conftest.er1
7753 cat conftest.err >&5
96f3a036
DL
7754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7755 (exit $ac_status); } &&
e143ad11
AS
7756 { ac_try='test -z "$ac_c_werror_flag"
7757 || test ! -s conftest.err'
edfaf76d
LK
7758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7759 (eval $ac_try) 2>&5
7760 ac_status=$?
7761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7762 (exit $ac_status); }; } &&
7763 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7765 (eval $ac_try) 2>&5
7766 ac_status=$?
7767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7768 (exit $ac_status); }; }; then
7769 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7770else
7771 echo "$as_me: failed program was:" >&5
7772sed 's/^/| /' conftest.$ac_ext >&5
7773
7774ac_cv_member_struct_ifreq_ifr_broadaddr=no
7775fi
edfaf76d 7776rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7777fi
edfaf76d 7778rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7779fi
7780echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
7781echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6
7782if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
7783
7784cat >>confdefs.h <<_ACEOF
7785#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
7786_ACEOF
7787
7788
7789fi
7790echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
7791echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6
7792if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
7793 echo $ECHO_N "(cached) $ECHO_C" >&6
7794else
7795 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7796/* confdefs.h. */
7797_ACEOF
7798cat confdefs.h >>conftest.$ac_ext
7799cat >>conftest.$ac_ext <<_ACEOF
7800/* end confdefs.h. */
7862d3a8
AS
7801$ac_includes_default
7802#if HAVE_SYS_SOCKET_H
7803#include <sys/socket.h>
7804#endif
7805#if HAVE_NET_IF_H
96f3a036 7806#include <net/if.h>
7862d3a8 7807#endif
96f3a036
DL
7808
7809int
7810main ()
7811{
7812static struct ifreq ac_aggr;
7813if (ac_aggr.ifr_addr)
7814return 0;
7815 ;
7816 return 0;
7817}
7818_ACEOF
7819rm -f conftest.$ac_objext
7820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7821 (eval $ac_compile) 2>conftest.er1
96f3a036 7822 ac_status=$?
edfaf76d
LK
7823 grep -v '^ *+' conftest.er1 >conftest.err
7824 rm -f conftest.er1
7825 cat conftest.err >&5
96f3a036
DL
7826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7827 (exit $ac_status); } &&
e143ad11
AS
7828 { ac_try='test -z "$ac_c_werror_flag"
7829 || test ! -s conftest.err'
edfaf76d
LK
7830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7831 (eval $ac_try) 2>&5
7832 ac_status=$?
7833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7834 (exit $ac_status); }; } &&
7835 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7837 (eval $ac_try) 2>&5
7838 ac_status=$?
7839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7840 (exit $ac_status); }; }; then
7841 ac_cv_member_struct_ifreq_ifr_addr=yes
7842else
7843 echo "$as_me: failed program was:" >&5
7844sed 's/^/| /' conftest.$ac_ext >&5
7845
7846cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7847/* confdefs.h. */
7848_ACEOF
7849cat confdefs.h >>conftest.$ac_ext
7850cat >>conftest.$ac_ext <<_ACEOF
7851/* end confdefs.h. */
7862d3a8
AS
7852$ac_includes_default
7853#if HAVE_SYS_SOCKET_H
7854#include <sys/socket.h>
7855#endif
7856#if HAVE_NET_IF_H
96f3a036 7857#include <net/if.h>
7862d3a8 7858#endif
96f3a036
DL
7859
7860int
7861main ()
7862{
7863static struct ifreq ac_aggr;
7864if (sizeof ac_aggr.ifr_addr)
7865return 0;
7866 ;
7867 return 0;
7868}
7869_ACEOF
7870rm -f conftest.$ac_objext
7871if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7872 (eval $ac_compile) 2>conftest.er1
96f3a036 7873 ac_status=$?
edfaf76d
LK
7874 grep -v '^ *+' conftest.er1 >conftest.err
7875 rm -f conftest.er1
7876 cat conftest.err >&5
96f3a036
DL
7877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7878 (exit $ac_status); } &&
e143ad11
AS
7879 { ac_try='test -z "$ac_c_werror_flag"
7880 || test ! -s conftest.err'
edfaf76d
LK
7881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7882 (eval $ac_try) 2>&5
7883 ac_status=$?
7884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7885 (exit $ac_status); }; } &&
7886 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7888 (eval $ac_try) 2>&5
7889 ac_status=$?
7890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7891 (exit $ac_status); }; }; then
7892 ac_cv_member_struct_ifreq_ifr_addr=yes
7893else
7894 echo "$as_me: failed program was:" >&5
7895sed 's/^/| /' conftest.$ac_ext >&5
7896
7897ac_cv_member_struct_ifreq_ifr_addr=no
7898fi
edfaf76d 7899rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7900fi
edfaf76d 7901rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7902fi
7903echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
7904echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6
7905if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
7906
7907cat >>confdefs.h <<_ACEOF
7908#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
7909_ACEOF
7910
7911
7912fi
7913
8799b3e4 7914
8799b3e4 7915
c0d27fcc 7916echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
7917echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
7918if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 7919 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7920echo "${ECHO_T}yes" >&6
7921
c0d27fcc 7922cat >>confdefs.h <<\_ACEOF
98418dba 7923#define PROTOTYPES 1
c0d27fcc
MR
7924_ACEOF
7925
7926
7927cat >>confdefs.h <<\_ACEOF
7928#define __PROTOTYPES 1
7929_ACEOF
98418dba
CW
7930
7931else
c0d27fcc 7932 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7933echo "${ECHO_T}no" >&6
7934fi
7935
c0d27fcc 7936echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
7937echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
7938if test "${ac_cv_c_volatile+set}" = set; then
7939 echo $ECHO_N "(cached) $ECHO_C" >&6
7940else
7941 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7942/* confdefs.h. */
7943_ACEOF
7944cat confdefs.h >>conftest.$ac_ext
7945cat >>conftest.$ac_ext <<_ACEOF
7946/* end confdefs.h. */
98418dba 7947
98418dba
CW
7948int
7949main ()
7950{
7951
7952volatile int x;
7953int * volatile y;
7954 ;
7955 return 0;
7956}
7957_ACEOF
7958rm -f conftest.$ac_objext
c0d27fcc 7959if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7960 (eval $ac_compile) 2>conftest.er1
98418dba 7961 ac_status=$?
edfaf76d
LK
7962 grep -v '^ *+' conftest.er1 >conftest.err
7963 rm -f conftest.er1
7964 cat conftest.err >&5
c0d27fcc 7965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7966 (exit $ac_status); } &&
e143ad11
AS
7967 { ac_try='test -z "$ac_c_werror_flag"
7968 || test ! -s conftest.err'
edfaf76d
LK
7969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7970 (eval $ac_try) 2>&5
7971 ac_status=$?
7972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7973 (exit $ac_status); }; } &&
7974 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7976 (eval $ac_try) 2>&5
7977 ac_status=$?
c0d27fcc 7978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7979 (exit $ac_status); }; }; then
7980 ac_cv_c_volatile=yes
7981else
7982 echo "$as_me: failed program was:" >&5
19650fd6
AS
7983sed 's/^/| /' conftest.$ac_ext >&5
7984
98418dba
CW
7985ac_cv_c_volatile=no
7986fi
edfaf76d 7987rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7988fi
c0d27fcc 7989echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
7990echo "${ECHO_T}$ac_cv_c_volatile" >&6
7991if test $ac_cv_c_volatile = no; then
7992
c0d27fcc 7993cat >>confdefs.h <<\_ACEOF
98418dba 7994#define volatile
c0d27fcc 7995_ACEOF
98418dba
CW
7996
7997fi
7998
c0d27fcc 7999echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
8000echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
8001if test "${ac_cv_c_const+set}" = set; then
8002 echo $ECHO_N "(cached) $ECHO_C" >&6
8003else
8004 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8005/* confdefs.h. */
8006_ACEOF
8007cat confdefs.h >>conftest.$ac_ext
8008cat >>conftest.$ac_ext <<_ACEOF
8009/* end confdefs.h. */
98418dba 8010
98418dba
CW
8011int
8012main ()
8013{
8014/* FIXME: Include the comments suggested by Paul. */
8015#ifndef __cplusplus
8016 /* Ultrix mips cc rejects this. */
8017 typedef int charset[2];
8018 const charset x;
8019 /* SunOS 4.1.1 cc rejects this. */
8020 char const *const *ccp;
8021 char **p;
8022 /* NEC SVR4.0.2 mips cc rejects this. */
8023 struct point {int x, y;};
8024 static struct point const zero = {0,0};
8025 /* AIX XL C 1.02.0.0 rejects this.
8026 It does not let you subtract one const X* pointer from another in
8027 an arm of an if-expression whose if-part is not a constant
8028 expression */
8029 const char *g = "string";
8030 ccp = &g + (g ? g-g : 0);
8031 /* HPUX 7.0 cc rejects these. */
8032 ++ccp;
8033 p = (char**) ccp;
8034 ccp = (char const *const *) p;
8035 { /* SCO 3.2v4 cc rejects this. */
8036 char *t;
8037 char const *s = 0 ? (char *) 0 : (char const *) 0;
8038
8039 *t++ = 0;
8040 }
8041 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8042 int x[] = {25, 17};
8043 const int *foo = &x[0];
8044 ++foo;
8045 }
8046 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8047 typedef const int *iptr;
8048 iptr p = 0;
8049 ++p;
8050 }
8051 { /* AIX XL C 1.02.0.0 rejects this saying
8052 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8053 struct s { int j; const int *ap[3]; };
8054 struct s *b; b->j = 5;
8055 }
8056 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8057 const int foo = 10;
8058 }
8059#endif
8060
8061 ;
8062 return 0;
8063}
8064_ACEOF
8065rm -f conftest.$ac_objext
c0d27fcc 8066if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8067 (eval $ac_compile) 2>conftest.er1
98418dba 8068 ac_status=$?
edfaf76d
LK
8069 grep -v '^ *+' conftest.er1 >conftest.err
8070 rm -f conftest.er1
8071 cat conftest.err >&5
c0d27fcc 8072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8073 (exit $ac_status); } &&
e143ad11
AS
8074 { ac_try='test -z "$ac_c_werror_flag"
8075 || test ! -s conftest.err'
edfaf76d
LK
8076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8077 (eval $ac_try) 2>&5
8078 ac_status=$?
8079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8080 (exit $ac_status); }; } &&
8081 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8083 (eval $ac_try) 2>&5
8084 ac_status=$?
c0d27fcc 8085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8086 (exit $ac_status); }; }; then
8087 ac_cv_c_const=yes
8088else
8089 echo "$as_me: failed program was:" >&5
19650fd6
AS
8090sed 's/^/| /' conftest.$ac_ext >&5
8091
98418dba
CW
8092ac_cv_c_const=no
8093fi
edfaf76d 8094rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8095fi
c0d27fcc 8096echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
8097echo "${ECHO_T}$ac_cv_c_const" >&6
8098if test $ac_cv_c_const = no; then
8099
c0d27fcc 8100cat >>confdefs.h <<\_ACEOF
98418dba 8101#define const
c0d27fcc 8102_ACEOF
98418dba
CW
8103
8104fi
8105
c0d27fcc 8106echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
8107echo $ECHO_N "checking for void * support... $ECHO_C" >&6
8108if test "${emacs_cv_void_star+set}" = set; then
8109 echo $ECHO_N "(cached) $ECHO_C" >&6
8110else
8111 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8112/* confdefs.h. */
8113_ACEOF
8114cat confdefs.h >>conftest.$ac_ext
8115cat >>conftest.$ac_ext <<_ACEOF
8116/* end confdefs.h. */
98418dba 8117
98418dba
CW
8118int
8119main ()
8120{
8121void * foo;
8122 ;
8123 return 0;
8124}
8125_ACEOF
8126rm -f conftest.$ac_objext
c0d27fcc 8127if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8128 (eval $ac_compile) 2>conftest.er1
98418dba 8129 ac_status=$?
edfaf76d
LK
8130 grep -v '^ *+' conftest.er1 >conftest.err
8131 rm -f conftest.er1
8132 cat conftest.err >&5
c0d27fcc 8133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8134 (exit $ac_status); } &&
e143ad11
AS
8135 { ac_try='test -z "$ac_c_werror_flag"
8136 || test ! -s conftest.err'
edfaf76d
LK
8137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8138 (eval $ac_try) 2>&5
8139 ac_status=$?
8140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8141 (exit $ac_status); }; } &&
8142 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8144 (eval $ac_try) 2>&5
8145 ac_status=$?
c0d27fcc 8146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8147 (exit $ac_status); }; }; then
8148 emacs_cv_void_star=yes
8149else
8150 echo "$as_me: failed program was:" >&5
19650fd6
AS
8151sed 's/^/| /' conftest.$ac_ext >&5
8152
98418dba
CW
8153emacs_cv_void_star=no
8154fi
edfaf76d 8155rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8156fi
c0d27fcc 8157echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
8158echo "${ECHO_T}$emacs_cv_void_star" >&6
8159if test $emacs_cv_void_star = yes; then
c0d27fcc 8160 cat >>confdefs.h <<\_ACEOF
98418dba 8161#define POINTER_TYPE void
c0d27fcc 8162_ACEOF
98418dba
CW
8163
8164else
c0d27fcc 8165 cat >>confdefs.h <<\_ACEOF
98418dba 8166#define POINTER_TYPE char
c0d27fcc 8167_ACEOF
98418dba
CW
8168
8169fi
8170
c0d27fcc 8171
4494a266
JD
8172
8173
cd958eb3 8174
19650fd6
AS
8175echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8176echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
edfaf76d 8177set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
98418dba
CW
8178if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
8179 echo $ECHO_N "(cached) $ECHO_C" >&6
8180else
c0d27fcc 8181 cat >conftest.make <<\_ACEOF
98418dba 8182all:
19650fd6 8183 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 8184_ACEOF
98418dba
CW
8185# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8186eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
8187if test -n "$ac_maketemp"; then
8188 eval ac_cv_prog_make_${ac_make}_set=yes
8189else
8190 eval ac_cv_prog_make_${ac_make}_set=no
8191fi
8192rm -f conftest.make
8193fi
8194if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 8195 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
8196echo "${ECHO_T}yes" >&6
8197 SET_MAKE=
8198else
c0d27fcc 8199 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
8200echo "${ECHO_T}no" >&6
8201 SET_MAKE="MAKE=${MAKE-make}"
8202fi
8203
c0d27fcc
MR
8204
8205echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
8206echo $ECHO_N "checking for long file names... $ECHO_C" >&6
8207if test "${ac_cv_sys_long_file_names+set}" = set; then
8208 echo $ECHO_N "(cached) $ECHO_C" >&6
8209else
8210 ac_cv_sys_long_file_names=yes
8211# Test for long file names in all the places we know might matter:
8212# . the current directory, where building will happen
8213# $prefix/lib where we will be installing things
8214# $exec_prefix/lib likewise
8215# eval it to expand exec_prefix.
8216# $TMPDIR if set, where it might want to write temporary files
8217# if $TMPDIR is not set:
8218# /tmp where it might want to write temporary files
8219# /var/tmp likewise
8220# /usr/tmp likewise
8221if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
8222 ac_tmpdirs=$TMPDIR
8223else
8224 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
8225fi
8226for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
8227 test -d $ac_dir || continue
8228 test -w $ac_dir || continue # It is less confusing to not echo anything here.
8229 ac_xdir=$ac_dir/cf$$
8230 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
8231 ac_tf1=$ac_xdir/conftest9012345
8232 ac_tf2=$ac_xdir/conftest9012346
8233 (echo 1 >$ac_tf1) 2>/dev/null
8234 (echo 2 >$ac_tf2) 2>/dev/null
8235 ac_val=`cat $ac_tf1 2>/dev/null`
8236 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
8237 ac_cv_sys_long_file_names=no
8238 rm -rf $ac_xdir 2>/dev/null
8239 break
8240 fi
8241 rm -rf $ac_xdir 2>/dev/null
8242done
8243fi
c0d27fcc 8244echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
8245echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
8246if test $ac_cv_sys_long_file_names = yes; then
8247
c0d27fcc 8248cat >>confdefs.h <<\_ACEOF
98418dba 8249#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8250_ACEOF
98418dba
CW
8251
8252fi
8253
c0d27fcc 8254
98418dba
CW
8255#### Choose a window system.
8256
c0d27fcc 8257echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
8258echo $ECHO_N "checking for X... $ECHO_C" >&6
8259
c0d27fcc 8260
98418dba
CW
8261# Check whether --with-x or --without-x was given.
8262if test "${with_x+set}" = set; then
8263 withval="$with_x"
8264
8265fi;
8266# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8267if test "x$with_x" = xno; then
8268 # The user explicitly disabled X.
8269 have_x=disabled
8270else
8271 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8272 # Both variables are already set.
8273 have_x=yes
8274 else
8275 if test "${ac_cv_have_x+set}" = set; then
8276 echo $ECHO_N "(cached) $ECHO_C" >&6
8277else
8278 # One or both of the vars are not set, and there is no cached value.
8279ac_x_includes=no ac_x_libraries=no
8280rm -fr conftest.dir
8281if mkdir conftest.dir; then
8282 cd conftest.dir
8283 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 8284 cat >Imakefile <<'_ACEOF'
98418dba
CW
8285acfindx:
8286 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 8287_ACEOF
98418dba
CW
8288 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8289 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8290 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8291 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8292 for ac_extension in a so sl; do
8293 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
edfaf76d
LK
8294 test -f $ac_im_libdir/libX11.$ac_extension; then
8295 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8296 fi
8297 done
8298 # Screen out bogus values from the imake configuration. They are
8299 # bogus both because they are the default anyway, and because
8300 # using them would break gcc on systems where it needs fixed includes.
8301 case $ac_im_incroot in
8302 /usr/include) ;;
8303 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8304 esac
8305 case $ac_im_usrlibdir in
8306 /usr/lib | /lib) ;;
8307 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8308 esac
8309 fi
8310 cd ..
8311 rm -fr conftest.dir
8312fi
8313
8314# Standard set of common directories for X headers.
8315# Check X11 before X11Rn because it is often a symlink to the current release.
8316ac_x_header_dirs='
8317/usr/X11/include
8318/usr/X11R6/include
8319/usr/X11R5/include
8320/usr/X11R4/include
8321
8322/usr/include/X11
8323/usr/include/X11R6
8324/usr/include/X11R5
8325/usr/include/X11R4
8326
8327/usr/local/X11/include
8328/usr/local/X11R6/include
8329/usr/local/X11R5/include
8330/usr/local/X11R4/include
8331
8332/usr/local/include/X11
8333/usr/local/include/X11R6
8334/usr/local/include/X11R5
8335/usr/local/include/X11R4
8336
8337/usr/X386/include
8338/usr/x386/include
8339/usr/XFree86/include/X11
8340
8341/usr/include
8342/usr/local/include
8343/usr/unsupported/include
8344/usr/athena/include
8345/usr/local/x11r5/include
8346/usr/lpp/Xamples/include
8347
8348/usr/openwin/include
8349/usr/openwin/share/include'
8350
8351if test "$ac_x_includes" = no; then
e143ad11 8352 # Guess where to find include files, by looking for Intrinsic.h.
98418dba
CW
8353 # First, try using that file with no special directory specified.
8354 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8355/* confdefs.h. */
8356_ACEOF
8357cat confdefs.h >>conftest.$ac_ext
8358cat >>conftest.$ac_ext <<_ACEOF
8359/* end confdefs.h. */
01abe918 8360#include <X11/Intrinsic.h>
98418dba 8361_ACEOF
c0d27fcc 8362if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8363 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8364 ac_status=$?
6bae0ccf 8365 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8366 rm -f conftest.er1
8367 cat conftest.err >&5
c0d27fcc 8368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8369 (exit $ac_status); } >/dev/null; then
8370 if test -s conftest.err; then
8371 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 8372 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8373 else
8374 ac_cpp_err=
8375 fi
8376else
8377 ac_cpp_err=yes
8378fi
8379if test -z "$ac_cpp_err"; then
8380 # We can compile using X headers with no special include directory.
8381ac_x_includes=
8382else
8383 echo "$as_me: failed program was:" >&5
19650fd6
AS
8384sed 's/^/| /' conftest.$ac_ext >&5
8385
98418dba 8386 for ac_dir in $ac_x_header_dirs; do
01abe918 8387 if test -r "$ac_dir/X11/Intrinsic.h"; then
98418dba
CW
8388 ac_x_includes=$ac_dir
8389 break
8390 fi
8391done
8392fi
8393rm -f conftest.err conftest.$ac_ext
8394fi # $ac_x_includes = no
8395
8396if test "$ac_x_libraries" = no; then
8397 # Check for the libraries.
8398 # See if we find them without any special options.
8399 # Don't add to $LIBS permanently.
8400 ac_save_LIBS=$LIBS
01abe918 8401 LIBS="-lXt $LIBS"
98418dba 8402 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8403/* confdefs.h. */
8404_ACEOF
8405cat confdefs.h >>conftest.$ac_ext
8406cat >>conftest.$ac_ext <<_ACEOF
8407/* end confdefs.h. */
01abe918 8408#include <X11/Intrinsic.h>
98418dba
CW
8409int
8410main ()
8411{
01abe918 8412XtMalloc (0)
98418dba
CW
8413 ;
8414 return 0;
8415}
8416_ACEOF
8417rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8418if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8419 (eval $ac_link) 2>conftest.er1
98418dba 8420 ac_status=$?
edfaf76d
LK
8421 grep -v '^ *+' conftest.er1 >conftest.err
8422 rm -f conftest.er1
8423 cat conftest.err >&5
c0d27fcc 8424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8425 (exit $ac_status); } &&
e143ad11
AS
8426 { ac_try='test -z "$ac_c_werror_flag"
8427 || test ! -s conftest.err'
edfaf76d
LK
8428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8429 (eval $ac_try) 2>&5
8430 ac_status=$?
8431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8432 (exit $ac_status); }; } &&
8433 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8435 (eval $ac_try) 2>&5
8436 ac_status=$?
c0d27fcc 8437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8438 (exit $ac_status); }; }; then
8439 LIBS=$ac_save_LIBS
8440# We can link X programs with no special library path.
8441ac_x_libraries=
8442else
8443 echo "$as_me: failed program was:" >&5
19650fd6
AS
8444sed 's/^/| /' conftest.$ac_ext >&5
8445
98418dba
CW
8446LIBS=$ac_save_LIBS
8447for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8448do
8449 # Don't even attempt the hair of trying to link an X program!
8450 for ac_extension in a so sl; do
01abe918 8451 if test -r $ac_dir/libXt.$ac_extension; then
98418dba
CW
8452 ac_x_libraries=$ac_dir
8453 break 2
8454 fi
8455 done
8456done
8457fi
edfaf76d
LK
8458rm -f conftest.err conftest.$ac_objext \
8459 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8460fi # $ac_x_libraries = no
8461
8462if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8463 # Didn't find X anywhere. Cache the known absence of X.
8464 ac_cv_have_x="have_x=no"
8465else
8466 # Record where we found X for the cache.
8467 ac_cv_have_x="have_x=yes \
edfaf76d 8468 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
98418dba
CW
8469fi
8470fi
8471
8472 fi
8473 eval "$ac_cv_have_x"
8474fi # $with_x != no
8475
8476if test "$have_x" != yes; then
c0d27fcc 8477 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
8478echo "${ECHO_T}$have_x" >&6
8479 no_x=yes
8480else
8481 # If each of the values was on the command line, it overrides each guess.
8482 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8483 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8484 # Update the cache value to reflect the command line values.
8485 ac_cv_have_x="have_x=yes \
8486 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
e143ad11
AS
8487 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
8488echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
98418dba
CW
8489fi
8490
8491if test "$no_x" = yes; then
8492 window_system=none
8493else
8494 window_system=x11
8495fi
8496
8497if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8498 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
8499 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
8500 x_default_search_path=""
8501 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
8502 x_search_path="\
8503${x_library}/X11/%L/%T/%N%C%S:\
8504${x_library}/X11/%l/%T/%N%C%S:\
8505${x_library}/X11/%T/%N%C%S:\
8506${x_library}/X11/%L/%T/%N%S:\
8507${x_library}/X11/%l/%T/%N%S:\
8508${x_library}/X11/%T/%N%S"
8509 if test x"${x_default_search_path}" = x; then
8510 x_default_search_path=${x_search_path}
8511 else
8512 x_default_search_path="${x_search_path}:${x_default_search_path}"
8513 fi
8514 done
8515fi
8516if test "${x_includes}" != NONE && test -n "${x_includes}"; then
8517 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
8518fi
8519
8520if test x"${x_includes}" = x; then
8521 bitmapdir=/usr/include/X11/bitmaps
8522else
8523 # accumulate include directories that have X11 bitmap subdirectories
8524 bmd_acc="dummyval"
8525 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
8526 if test -d "${bmd}/X11/bitmaps"; then
8527 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
8528 fi
8529 if test -d "${bmd}/bitmaps"; then
8530 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
8531 fi
8532 done
8533 if test ${bmd_acc} != "dummyval"; then
8534 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
8535 fi
8536fi
8537
5d6da11e 8538HAVE_CARBON=no
1d4d5604
YM
8539if test "${with_carbon}" != no; then
8540 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
5d6da11e
YM
8541 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
8542echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
8543if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8544 echo $ECHO_N "(cached) $ECHO_C" >&6
8545fi
8546echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
8547echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
8548else
8549 # Is the header compilable?
8550echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
8551echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
8552cat >conftest.$ac_ext <<_ACEOF
8553/* confdefs.h. */
8554_ACEOF
8555cat confdefs.h >>conftest.$ac_ext
8556cat >>conftest.$ac_ext <<_ACEOF
8557/* end confdefs.h. */
8558$ac_includes_default
8559#include <Carbon/Carbon.h>
8560_ACEOF
8561rm -f conftest.$ac_objext
8562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8563 (eval $ac_compile) 2>conftest.er1
5d6da11e 8564 ac_status=$?
edfaf76d
LK
8565 grep -v '^ *+' conftest.er1 >conftest.err
8566 rm -f conftest.er1
8567 cat conftest.err >&5
5d6da11e
YM
8568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8569 (exit $ac_status); } &&
e143ad11
AS
8570 { ac_try='test -z "$ac_c_werror_flag"
8571 || test ! -s conftest.err'
edfaf76d
LK
8572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8573 (eval $ac_try) 2>&5
8574 ac_status=$?
8575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8576 (exit $ac_status); }; } &&
8577 { ac_try='test -s conftest.$ac_objext'
5d6da11e
YM
8578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8579 (eval $ac_try) 2>&5
8580 ac_status=$?
8581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8582 (exit $ac_status); }; }; then
8583 ac_header_compiler=yes
8584else
8585 echo "$as_me: failed program was:" >&5
8586sed 's/^/| /' conftest.$ac_ext >&5
8587
8588ac_header_compiler=no
8589fi
edfaf76d 8590rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5d6da11e
YM
8591echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8592echo "${ECHO_T}$ac_header_compiler" >&6
8593
8594# Is the header present?
8595echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
8596echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
8597cat >conftest.$ac_ext <<_ACEOF
8598/* confdefs.h. */
8599_ACEOF
8600cat confdefs.h >>conftest.$ac_ext
8601cat >>conftest.$ac_ext <<_ACEOF
8602/* end confdefs.h. */
8603#include <Carbon/Carbon.h>
8604_ACEOF
8605if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8606 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8607 ac_status=$?
8608 grep -v '^ *+' conftest.er1 >conftest.err
8609 rm -f conftest.er1
8610 cat conftest.err >&5
8611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8612 (exit $ac_status); } >/dev/null; then
8613 if test -s conftest.err; then
8614 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 8615 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5d6da11e
YM
8616 else
8617 ac_cpp_err=
8618 fi
8619else
8620 ac_cpp_err=yes
8621fi
8622if test -z "$ac_cpp_err"; then
8623 ac_header_preproc=yes
8624else
8625 echo "$as_me: failed program was:" >&5
8626sed 's/^/| /' conftest.$ac_ext >&5
8627
8628 ac_header_preproc=no
8629fi
8630rm -f conftest.err conftest.$ac_ext
8631echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8632echo "${ECHO_T}$ac_header_preproc" >&6
8633
8634# So? What about this header?
edfaf76d
LK
8635case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8636 yes:no: )
5d6da11e
YM
8637 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
8638echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
8639 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
8640echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
8641 ac_header_preproc=yes
5d6da11e 8642 ;;
edfaf76d 8643 no:yes:* )
5d6da11e
YM
8644 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
8645echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
8646 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
8647echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
8648 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
8649echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
8650 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
8651echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
8652 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
8653echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
8654 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
8655echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
5d6da11e
YM
8656 (
8657 cat <<\_ASBOX
edfaf76d
LK
8658## ------------------------------------------ ##
8659## Report this to the AC_PACKAGE_NAME lists. ##
8660## ------------------------------------------ ##
5d6da11e
YM
8661_ASBOX
8662 ) |
8663 sed "s/^/$as_me: WARNING: /" >&2
8664 ;;
8665esac
8666echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
8667echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
8668if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8669 echo $ECHO_N "(cached) $ECHO_C" >&6
8670else
8671 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
8672fi
8673echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
8674echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
8675
8676fi
8677if test $ac_cv_header_Carbon_Carbon_h = yes; then
8678 HAVE_CARBON=yes
8679fi
8680
8681
1d4d5604
YM
8682fi
8683if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
8684 if test "${with_carbon+set}" != set \
8685 && test "${carbon_appdir_x+set}" != set; then
8686 HAVE_CARBON=no
5d6da11e
YM
8687 fi
8688fi
1d4d5604
YM
8689if test "${HAVE_CARBON}" = yes; then
8690 window_system=mac
8691fi
8692
8693case "${window_system}" in
8694 x11 )
8695 HAVE_X_WINDOWS=yes
8696 HAVE_X11=yes
8697 case "${with_x_toolkit}" in
8698 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
8699 motif ) USE_X_TOOLKIT=MOTIF ;;
8700 gtk ) with_gtk=yes
8701 USE_X_TOOLKIT=none ;;
8702 no ) USE_X_TOOLKIT=none ;;
8703 * ) USE_X_TOOLKIT=maybe ;;
8704 esac
8705 ;;
8706 mac | none )
8707 HAVE_X_WINDOWS=no
8708 HAVE_X11=no
8709 USE_X_TOOLKIT=none
8710 ;;
8711esac
8712
8713### If we're using X11, we should use the X menu package.
8714HAVE_MENUS=no
8715case ${HAVE_X11} in
8716 yes ) HAVE_MENUS=yes ;;
8717esac
8718
8719if test "${opsys}" = "hpux9"; then
8720 case "${x_libraries}" in
8721 *X11R4* )
8722 opsysfile="s/hpux9-x11r4.h"
8723 ;;
8724 esac
8725fi
8726
8727if test "${opsys}" = "hpux9shr"; then
8728 case "${x_libraries}" in
8729 *X11R4* )
8730 opsysfile="s/hpux9shxr4.h"
8731 ;;
8732 esac
8733fi
5d6da11e 8734
98418dba
CW
8735### Compute the unexec source name from the object name.
8736UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
8737
8738# Do the opsystem or machine files prohibit the use of the GNU malloc?
8739# Assume not, until told otherwise.
8740GNU_MALLOC=yes
8741doug_lea_malloc=yes
c0d27fcc 8742echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
8743echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
8744if test "${ac_cv_func_malloc_get_state+set}" = set; then
8745 echo $ECHO_N "(cached) $ECHO_C" >&6
8746else
8747 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8748/* confdefs.h. */
8749_ACEOF
8750cat confdefs.h >>conftest.$ac_ext
8751cat >>conftest.$ac_ext <<_ACEOF
8752/* end confdefs.h. */
edfaf76d
LK
8753/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
8754 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8755#define malloc_get_state innocuous_malloc_get_state
8756
98418dba 8757/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8758 which can conflict with char malloc_get_state (); below.
8759 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8760 <limits.h> exists even on freestanding compilers. */
edfaf76d 8761
19650fd6
AS
8762#ifdef __STDC__
8763# include <limits.h>
8764#else
8765# include <assert.h>
8766#endif
edfaf76d
LK
8767
8768#undef malloc_get_state
8769
98418dba
CW
8770/* Override any gcc2 internal prototype to avoid an error. */
8771#ifdef __cplusplus
8772extern "C"
19650fd6 8773{
98418dba
CW
8774#endif
8775/* We use char because int might match the return type of a gcc2
8776 builtin and then its argument prototype would still apply. */
8777char malloc_get_state ();
98418dba
CW
8778/* The GNU C library defines this for functions which it implements
8779 to always fail with ENOSYS. Some functions are actually named
8780 something starting with __ and the normal name is an alias. */
8781#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
8782choke me
8783#else
19650fd6
AS
8784char (*f) () = malloc_get_state;
8785#endif
8786#ifdef __cplusplus
8787}
98418dba
CW
8788#endif
8789
19650fd6
AS
8790int
8791main ()
8792{
8793return f != malloc_get_state;
98418dba
CW
8794 ;
8795 return 0;
8796}
8797_ACEOF
8798rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8800 (eval $ac_link) 2>conftest.er1
98418dba 8801 ac_status=$?
edfaf76d
LK
8802 grep -v '^ *+' conftest.er1 >conftest.err
8803 rm -f conftest.er1
8804 cat conftest.err >&5
c0d27fcc 8805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8806 (exit $ac_status); } &&
e143ad11
AS
8807 { ac_try='test -z "$ac_c_werror_flag"
8808 || test ! -s conftest.err'
edfaf76d
LK
8809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8810 (eval $ac_try) 2>&5
8811 ac_status=$?
8812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8813 (exit $ac_status); }; } &&
8814 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8816 (eval $ac_try) 2>&5
8817 ac_status=$?
c0d27fcc 8818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8819 (exit $ac_status); }; }; then
8820 ac_cv_func_malloc_get_state=yes
8821else
8822 echo "$as_me: failed program was:" >&5
19650fd6
AS
8823sed 's/^/| /' conftest.$ac_ext >&5
8824
98418dba
CW
8825ac_cv_func_malloc_get_state=no
8826fi
edfaf76d
LK
8827rm -f conftest.err conftest.$ac_objext \
8828 conftest$ac_exeext conftest.$ac_ext
98418dba 8829fi
c0d27fcc 8830echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
8831echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
8832if test $ac_cv_func_malloc_get_state = yes; then
8833 :
8834else
8835 doug_lea_malloc=no
8836fi
8837
c0d27fcc 8838echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
8839echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
8840if test "${ac_cv_func_malloc_set_state+set}" = set; then
8841 echo $ECHO_N "(cached) $ECHO_C" >&6
8842else
8843 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8844/* confdefs.h. */
8845_ACEOF
8846cat confdefs.h >>conftest.$ac_ext
8847cat >>conftest.$ac_ext <<_ACEOF
8848/* end confdefs.h. */
edfaf76d
LK
8849/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
8850 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8851#define malloc_set_state innocuous_malloc_set_state
8852
98418dba 8853/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8854 which can conflict with char malloc_set_state (); below.
8855 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8856 <limits.h> exists even on freestanding compilers. */
edfaf76d 8857
19650fd6
AS
8858#ifdef __STDC__
8859# include <limits.h>
8860#else
8861# include <assert.h>
8862#endif
edfaf76d
LK
8863
8864#undef malloc_set_state
8865
98418dba
CW
8866/* Override any gcc2 internal prototype to avoid an error. */
8867#ifdef __cplusplus
8868extern "C"
19650fd6 8869{
98418dba
CW
8870#endif
8871/* We use char because int might match the return type of a gcc2
8872 builtin and then its argument prototype would still apply. */
8873char malloc_set_state ();
98418dba
CW
8874/* The GNU C library defines this for functions which it implements
8875 to always fail with ENOSYS. Some functions are actually named
8876 something starting with __ and the normal name is an alias. */
8877#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
8878choke me
8879#else
19650fd6
AS
8880char (*f) () = malloc_set_state;
8881#endif
8882#ifdef __cplusplus
8883}
98418dba
CW
8884#endif
8885
19650fd6
AS
8886int
8887main ()
8888{
8889return f != malloc_set_state;
98418dba
CW
8890 ;
8891 return 0;
8892}
8893_ACEOF
8894rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8895if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8896 (eval $ac_link) 2>conftest.er1
98418dba 8897 ac_status=$?
edfaf76d
LK
8898 grep -v '^ *+' conftest.er1 >conftest.err
8899 rm -f conftest.er1
8900 cat conftest.err >&5
c0d27fcc 8901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8902 (exit $ac_status); } &&
e143ad11
AS
8903 { ac_try='test -z "$ac_c_werror_flag"
8904 || test ! -s conftest.err'
edfaf76d
LK
8905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8906 (eval $ac_try) 2>&5
8907 ac_status=$?
8908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8909 (exit $ac_status); }; } &&
8910 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8912 (eval $ac_try) 2>&5
8913 ac_status=$?
c0d27fcc 8914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8915 (exit $ac_status); }; }; then
8916 ac_cv_func_malloc_set_state=yes
8917else
8918 echo "$as_me: failed program was:" >&5
19650fd6
AS
8919sed 's/^/| /' conftest.$ac_ext >&5
8920
98418dba
CW
8921ac_cv_func_malloc_set_state=no
8922fi
edfaf76d
LK
8923rm -f conftest.err conftest.$ac_objext \
8924 conftest$ac_exeext conftest.$ac_ext
98418dba 8925fi
c0d27fcc 8926echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
8927echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
8928if test $ac_cv_func_malloc_set_state = yes; then
8929 :
8930else
8931 doug_lea_malloc=no
8932fi
8933
c0d27fcc 8934echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
8935echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
8936if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
8937 echo $ECHO_N "(cached) $ECHO_C" >&6
8938else
8939 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8940/* confdefs.h. */
8941_ACEOF
8942cat confdefs.h >>conftest.$ac_ext
8943cat >>conftest.$ac_ext <<_ACEOF
8944/* end confdefs.h. */
98418dba 8945extern void (* __after_morecore_hook)();
98418dba
CW
8946int
8947main ()
8948{
8949__after_morecore_hook = 0
8950 ;
8951 return 0;
8952}
8953_ACEOF
8954rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8955if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8956 (eval $ac_link) 2>conftest.er1
98418dba 8957 ac_status=$?
edfaf76d
LK
8958 grep -v '^ *+' conftest.er1 >conftest.err
8959 rm -f conftest.er1
8960 cat conftest.err >&5
c0d27fcc 8961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8962 (exit $ac_status); } &&
e143ad11
AS
8963 { ac_try='test -z "$ac_c_werror_flag"
8964 || test ! -s conftest.err'
edfaf76d
LK
8965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8966 (eval $ac_try) 2>&5
8967 ac_status=$?
8968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8969 (exit $ac_status); }; } &&
8970 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8972 (eval $ac_try) 2>&5
8973 ac_status=$?
c0d27fcc 8974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8975 (exit $ac_status); }; }; then
8976 emacs_cv_var___after_morecore_hook=yes
8977else
8978 echo "$as_me: failed program was:" >&5
19650fd6
AS
8979sed 's/^/| /' conftest.$ac_ext >&5
8980
98418dba
CW
8981emacs_cv_var___after_morecore_hook=no
8982fi
edfaf76d
LK
8983rm -f conftest.err conftest.$ac_objext \
8984 conftest$ac_exeext conftest.$ac_ext
98418dba 8985fi
c0d27fcc 8986echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
8987echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
8988if test $emacs_cv_var___after_morecore_hook = no; then
8989 doug_lea_malloc=no
8990fi
8991if test "${system_malloc}" = "yes"; then
8992 GNU_MALLOC=no
8993 GNU_MALLOC_reason="
8994 (The GNU allocators don't work with this system configuration.)"
8995fi
8996if test "$doug_lea_malloc" = "yes" ; then
8997 if test "$GNU_MALLOC" = yes ; then
8998 GNU_MALLOC_reason="
8999 (Using Doug Lea's new malloc from the GNU C Library.)"
9000 fi
b936fae4 9001
c0d27fcc 9002cat >>confdefs.h <<\_ACEOF
98418dba 9003#define DOUG_LEA_MALLOC 1
c0d27fcc 9004_ACEOF
98418dba
CW
9005
9006fi
9007
9008if test x"${REL_ALLOC}" = x; then
9009 REL_ALLOC=${GNU_MALLOC}
9010fi
9011
9012
c0d27fcc
MR
9013
9014
9015for ac_header in stdlib.h unistd.h
98418dba
CW
9016do
9017as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
9018if eval "test \"\${$as_ac_Header+set}\" = set"; then
9019 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
9020echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9021if eval "test \"\${$as_ac_Header+set}\" = set"; then
9022 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9023fi
9024echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9025echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 9026else
c0d27fcc
MR
9027 # Is the header compilable?
9028echo "$as_me:$LINENO: checking $ac_header usability" >&5
9029echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9030cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9031/* confdefs.h. */
9032_ACEOF
9033cat confdefs.h >>conftest.$ac_ext
9034cat >>conftest.$ac_ext <<_ACEOF
9035/* end confdefs.h. */
98418dba
CW
9036$ac_includes_default
9037#include <$ac_header>
9038_ACEOF
9039rm -f conftest.$ac_objext
c0d27fcc 9040if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 9041 (eval $ac_compile) 2>conftest.er1
98418dba 9042 ac_status=$?
edfaf76d
LK
9043 grep -v '^ *+' conftest.er1 >conftest.err
9044 rm -f conftest.er1
9045 cat conftest.err >&5
c0d27fcc 9046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9047 (exit $ac_status); } &&
e143ad11
AS
9048 { ac_try='test -z "$ac_c_werror_flag"
9049 || test ! -s conftest.err'
edfaf76d
LK
9050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9051 (eval $ac_try) 2>&5
9052 ac_status=$?
9053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9054 (exit $ac_status); }; } &&
9055 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 9056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9057 (eval $ac_try) 2>&5
9058 ac_status=$?
c0d27fcc 9059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9060 (exit $ac_status); }; }; then
c0d27fcc 9061 ac_header_compiler=yes
98418dba
CW
9062else
9063 echo "$as_me: failed program was:" >&5
19650fd6
AS
9064sed 's/^/| /' conftest.$ac_ext >&5
9065
c0d27fcc 9066ac_header_compiler=no
98418dba 9067fi
edfaf76d 9068rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
9069echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9070echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 9071
c0d27fcc
MR
9072# Is the header present?
9073echo "$as_me:$LINENO: checking $ac_header presence" >&5
9074echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9075cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9076/* confdefs.h. */
9077_ACEOF
9078cat confdefs.h >>conftest.$ac_ext
9079cat >>conftest.$ac_ext <<_ACEOF
9080/* end confdefs.h. */
98418dba
CW
9081#include <$ac_header>
9082_ACEOF
c0d27fcc 9083if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9084 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9085 ac_status=$?
6bae0ccf 9086 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9087 rm -f conftest.er1
9088 cat conftest.err >&5
c0d27fcc 9089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9090 (exit $ac_status); } >/dev/null; then
9091 if test -s conftest.err; then
9092 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 9093 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
9094 else
9095 ac_cpp_err=
9096 fi
9097else
9098 ac_cpp_err=yes
9099fi
9100if test -z "$ac_cpp_err"; then
c0d27fcc 9101 ac_header_preproc=yes
98418dba
CW
9102else
9103 echo "$as_me: failed program was:" >&5
19650fd6
AS
9104sed 's/^/| /' conftest.$ac_ext >&5
9105
c0d27fcc 9106 ac_header_preproc=no
98418dba
CW
9107fi
9108rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9109echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9110echo "${ECHO_T}$ac_header_preproc" >&6
9111
9112# So? What about this header?
edfaf76d
LK
9113case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9114 yes:no: )
c0d27fcc
MR
9115 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9116echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9117 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9118echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9119 ac_header_preproc=yes
9120 ;;
9121 no:yes:* )
9122 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9123echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9124 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9125echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9126 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9127echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9128 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9129echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9130 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9131echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9132 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9133echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7c9e5167
JD
9134 (
9135 cat <<\_ASBOX
edfaf76d
LK
9136## ------------------------------------------ ##
9137## Report this to the AC_PACKAGE_NAME lists. ##
9138## ------------------------------------------ ##
19650fd6
AS
9139_ASBOX
9140 ) |
9141 sed "s/^/$as_me: WARNING: /" >&2
9142 ;;
c0d27fcc
MR
9143esac
9144echo "$as_me:$LINENO: checking for $ac_header" >&5
9145echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9146if eval "test \"\${$as_ac_Header+set}\" = set"; then
9147 echo $ECHO_N "(cached) $ECHO_C" >&6
9148else
edfaf76d 9149 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9150fi
c0d27fcc 9151echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 9152echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
9153
9154fi
98418dba 9155if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9156 cat >>confdefs.h <<_ACEOF
98418dba 9157#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9158_ACEOF
98418dba
CW
9159
9160fi
c0d27fcc 9161
98418dba
CW
9162done
9163
c0d27fcc 9164
98418dba
CW
9165for ac_func in getpagesize
9166do
9167as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 9168echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
9169echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9170if eval "test \"\${$as_ac_var+set}\" = set"; then
9171 echo $ECHO_N "(cached) $ECHO_C" >&6
9172else
9173 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9174/* confdefs.h. */
9175_ACEOF
9176cat confdefs.h >>conftest.$ac_ext
9177cat >>conftest.$ac_ext <<_ACEOF
9178/* end confdefs.h. */
edfaf76d
LK
9179/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9180 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9181#define $ac_func innocuous_$ac_func
9182
98418dba 9183/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9184 which can conflict with char $ac_func (); below.
9185 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9186 <limits.h> exists even on freestanding compilers. */
edfaf76d 9187
19650fd6
AS
9188#ifdef __STDC__
9189# include <limits.h>
9190#else
9191# include <assert.h>
9192#endif
edfaf76d
LK
9193
9194#undef $ac_func
9195
98418dba
CW
9196/* Override any gcc2 internal prototype to avoid an error. */
9197#ifdef __cplusplus
9198extern "C"
19650fd6 9199{
98418dba
CW
9200#endif
9201/* We use char because int might match the return type of a gcc2
9202 builtin and then its argument prototype would still apply. */
9203char $ac_func ();
98418dba
CW
9204/* The GNU C library defines this for functions which it implements
9205 to always fail with ENOSYS. Some functions are actually named
9206 something starting with __ and the normal name is an alias. */
9207#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9208choke me
9209#else
19650fd6
AS
9210char (*f) () = $ac_func;
9211#endif
9212#ifdef __cplusplus
9213}
98418dba
CW
9214#endif
9215
19650fd6
AS
9216int
9217main ()
9218{
9219return f != $ac_func;
98418dba
CW
9220 ;
9221 return 0;
9222}
9223_ACEOF
9224rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9225if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9226 (eval $ac_link) 2>conftest.er1
98418dba 9227 ac_status=$?
edfaf76d
LK
9228 grep -v '^ *+' conftest.er1 >conftest.err
9229 rm -f conftest.er1
9230 cat conftest.err >&5
c0d27fcc 9231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9232 (exit $ac_status); } &&
e143ad11
AS
9233 { ac_try='test -z "$ac_c_werror_flag"
9234 || test ! -s conftest.err'
edfaf76d
LK
9235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9236 (eval $ac_try) 2>&5
9237 ac_status=$?
9238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9239 (exit $ac_status); }; } &&
9240 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9242 (eval $ac_try) 2>&5
9243 ac_status=$?
c0d27fcc 9244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9245 (exit $ac_status); }; }; then
9246 eval "$as_ac_var=yes"
9247else
9248 echo "$as_me: failed program was:" >&5
19650fd6
AS
9249sed 's/^/| /' conftest.$ac_ext >&5
9250
98418dba
CW
9251eval "$as_ac_var=no"
9252fi
edfaf76d
LK
9253rm -f conftest.err conftest.$ac_objext \
9254 conftest$ac_exeext conftest.$ac_ext
98418dba 9255fi
c0d27fcc 9256echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
9257echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9258if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9259 cat >>confdefs.h <<_ACEOF
98418dba 9260#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9261_ACEOF
98418dba
CW
9262
9263fi
9264done
9265
c0d27fcc 9266echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
9267echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
9268if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9269 echo $ECHO_N "(cached) $ECHO_C" >&6
9270else
9271 if test "$cross_compiling" = yes; then
9272 ac_cv_func_mmap_fixed_mapped=no
9273else
9274 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9275/* confdefs.h. */
9276_ACEOF
9277cat confdefs.h >>conftest.$ac_ext
9278cat >>conftest.$ac_ext <<_ACEOF
9279/* end confdefs.h. */
98418dba 9280$ac_includes_default
c0d27fcc
MR
9281/* malloc might have been renamed as rpl_malloc. */
9282#undef malloc
9283
98418dba
CW
9284/* Thanks to Mike Haertel and Jim Avera for this test.
9285 Here is a matrix of mmap possibilities:
9286 mmap private not fixed
9287 mmap private fixed at somewhere currently unmapped
9288 mmap private fixed at somewhere already mapped
9289 mmap shared not fixed
9290 mmap shared fixed at somewhere currently unmapped
9291 mmap shared fixed at somewhere already mapped
9292 For private mappings, we should verify that changes cannot be read()
9293 back from the file, nor mmap's back from the file at a different
9294 address. (There have been systems where private was not correctly
9295 implemented like the infamous i386 svr4.0, and systems where the
9296 VM page cache was not coherent with the file system buffer cache
9297 like early versions of FreeBSD and possibly contemporary NetBSD.)
9298 For shared mappings, we should conversely verify that changes get
c0d27fcc 9299 propagated back to all the places they're supposed to be.
98418dba
CW
9300
9301 Grep wants private fixed already mapped.
9302 The main things grep needs to know about mmap are:
9303 * does it exist and is it safe to write into the mmap'd area
9304 * how to use it (BSD variants) */
9305
9306#include <fcntl.h>
9307#include <sys/mman.h>
9308
9309#if !STDC_HEADERS && !HAVE_STDLIB_H
9310char *malloc ();
9311#endif
9312
9313/* This mess was copied from the GNU getpagesize.h. */
9314#if !HAVE_GETPAGESIZE
9315/* Assume that all systems that can run configure have sys/param.h. */
9316# if !HAVE_SYS_PARAM_H
9317# define HAVE_SYS_PARAM_H 1
9318# endif
9319
9320# ifdef _SC_PAGESIZE
9321# define getpagesize() sysconf(_SC_PAGESIZE)
9322# else /* no _SC_PAGESIZE */
9323# if HAVE_SYS_PARAM_H
9324# include <sys/param.h>
9325# ifdef EXEC_PAGESIZE
9326# define getpagesize() EXEC_PAGESIZE
9327# else /* no EXEC_PAGESIZE */
9328# ifdef NBPG
9329# define getpagesize() NBPG * CLSIZE
9330# ifndef CLSIZE
9331# define CLSIZE 1
9332# endif /* no CLSIZE */
9333# else /* no NBPG */
9334# ifdef NBPC
9335# define getpagesize() NBPC
9336# else /* no NBPC */
9337# ifdef PAGESIZE
9338# define getpagesize() PAGESIZE
9339# endif /* PAGESIZE */
9340# endif /* no NBPC */
9341# endif /* no NBPG */
9342# endif /* no EXEC_PAGESIZE */
9343# else /* no HAVE_SYS_PARAM_H */
9344# define getpagesize() 8192 /* punt totally */
9345# endif /* no HAVE_SYS_PARAM_H */
9346# endif /* no _SC_PAGESIZE */
9347
9348#endif /* no HAVE_GETPAGESIZE */
9349
9350int
9351main ()
9352{
9353 char *data, *data2, *data3;
9354 int i, pagesize;
9355 int fd;
9356
9357 pagesize = getpagesize ();
9358
9359 /* First, make a file with some known garbage in it. */
9360 data = (char *) malloc (pagesize);
9361 if (!data)
9362 exit (1);
9363 for (i = 0; i < pagesize; ++i)
9364 *(data + i) = rand ();
9365 umask (0);
9366 fd = creat ("conftest.mmap", 0600);
9367 if (fd < 0)
9368 exit (1);
9369 if (write (fd, data, pagesize) != pagesize)
9370 exit (1);
9371 close (fd);
9372
9373 /* Next, try to mmap the file at a fixed address which already has
9374 something else allocated at it. If we can, also make sure that
9375 we see the same garbage. */
9376 fd = open ("conftest.mmap", O_RDWR);
9377 if (fd < 0)
9378 exit (1);
9379 data2 = (char *) malloc (2 * pagesize);
9380 if (!data2)
9381 exit (1);
edfaf76d 9382 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 9383 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 9384 MAP_PRIVATE | MAP_FIXED, fd, 0L))
98418dba
CW
9385 exit (1);
9386 for (i = 0; i < pagesize; ++i)
9387 if (*(data + i) != *(data2 + i))
9388 exit (1);
9389
9390 /* Finally, make sure that changes to the mapped area do not
9391 percolate back to the file as seen by read(). (This is a bug on
9392 some variants of i386 svr4.0.) */
9393 for (i = 0; i < pagesize; ++i)
9394 *(data2 + i) = *(data2 + i) + 1;
9395 data3 = (char *) malloc (pagesize);
9396 if (!data3)
9397 exit (1);
9398 if (read (fd, data3, pagesize) != pagesize)
9399 exit (1);
9400 for (i = 0; i < pagesize; ++i)
9401 if (*(data + i) != *(data3 + i))
9402 exit (1);
9403 close (fd);
9404 exit (0);
9405}
9406_ACEOF
9407rm -f conftest$ac_exeext
c0d27fcc 9408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
9409 (eval $ac_link) 2>&5
9410 ac_status=$?
c0d27fcc 9411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9412 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 9413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9414 (eval $ac_try) 2>&5
9415 ac_status=$?
c0d27fcc 9416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9417 (exit $ac_status); }; }; then
9418 ac_cv_func_mmap_fixed_mapped=yes
9419else
9420 echo "$as_me: program exited with status $ac_status" >&5
9421echo "$as_me: failed program was:" >&5
19650fd6
AS
9422sed 's/^/| /' conftest.$ac_ext >&5
9423
c0d27fcc 9424( exit $ac_status )
98418dba
CW
9425ac_cv_func_mmap_fixed_mapped=no
9426fi
edfaf76d 9427rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
9428fi
9429fi
c0d27fcc 9430echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
9431echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
9432if test $ac_cv_func_mmap_fixed_mapped = yes; then
9433
c0d27fcc 9434cat >>confdefs.h <<\_ACEOF
98418dba 9435#define HAVE_MMAP 1
c0d27fcc 9436_ACEOF
98418dba
CW
9437
9438fi
9439rm -f conftest.mmap
9440
9441if test $use_mmap_for_buffers = yes; then
9442 REL_ALLOC=no
9443fi
9444
9445LIBS="$libsrc_libs $LIBS"
9446
c0d27fcc
MR
9447
9448echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
9449echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9450if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9451 echo $ECHO_N "(cached) $ECHO_C" >&6
9452else
9453 ac_check_lib_save_LIBS=$LIBS
9454LIBS="-ldnet $LIBS"
9455cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9456/* confdefs.h. */
9457_ACEOF
9458cat confdefs.h >>conftest.$ac_ext
9459cat >>conftest.$ac_ext <<_ACEOF
9460/* end confdefs.h. */
98418dba
CW
9461
9462/* Override any gcc2 internal prototype to avoid an error. */
9463#ifdef __cplusplus
9464extern "C"
9465#endif
9466/* We use char because int might match the return type of a gcc2
9467 builtin and then its argument prototype would still apply. */
9468char dnet_ntoa ();
98418dba
CW
9469int
9470main ()
9471{
9472dnet_ntoa ();
9473 ;
9474 return 0;
9475}
9476_ACEOF
9477rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9478if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9479 (eval $ac_link) 2>conftest.er1
98418dba 9480 ac_status=$?
edfaf76d
LK
9481 grep -v '^ *+' conftest.er1 >conftest.err
9482 rm -f conftest.er1
9483 cat conftest.err >&5
c0d27fcc 9484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9485 (exit $ac_status); } &&
e143ad11
AS
9486 { ac_try='test -z "$ac_c_werror_flag"
9487 || test ! -s conftest.err'
edfaf76d
LK
9488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9489 (eval $ac_try) 2>&5
9490 ac_status=$?
9491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9492 (exit $ac_status); }; } &&
9493 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9495 (eval $ac_try) 2>&5
9496 ac_status=$?
c0d27fcc 9497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9498 (exit $ac_status); }; }; then
9499 ac_cv_lib_dnet_dnet_ntoa=yes
9500else
9501 echo "$as_me: failed program was:" >&5
19650fd6
AS
9502sed 's/^/| /' conftest.$ac_ext >&5
9503
98418dba
CW
9504ac_cv_lib_dnet_dnet_ntoa=no
9505fi
edfaf76d
LK
9506rm -f conftest.err conftest.$ac_objext \
9507 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9508LIBS=$ac_check_lib_save_LIBS
9509fi
c0d27fcc 9510echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
9511echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9512if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 9513 cat >>confdefs.h <<_ACEOF
98418dba 9514#define HAVE_LIBDNET 1
c0d27fcc 9515_ACEOF
98418dba
CW
9516
9517 LIBS="-ldnet $LIBS"
9518
9519fi
9520
c0d27fcc
MR
9521
9522echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
9523echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
9524if test "${ac_cv_lib_Xbsd_main+set}" = set; then
9525 echo $ECHO_N "(cached) $ECHO_C" >&6
9526else
9527 ac_check_lib_save_LIBS=$LIBS
9528LIBS="-lXbsd $LIBS"
9529cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9530/* confdefs.h. */
9531_ACEOF
9532cat confdefs.h >>conftest.$ac_ext
9533cat >>conftest.$ac_ext <<_ACEOF
9534/* end confdefs.h. */
98418dba 9535
c0d27fcc 9536
98418dba
CW
9537int
9538main ()
9539{
9540main ();
9541 ;
9542 return 0;
9543}
9544_ACEOF
9545rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9546if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9547 (eval $ac_link) 2>conftest.er1
98418dba 9548 ac_status=$?
edfaf76d
LK
9549 grep -v '^ *+' conftest.er1 >conftest.err
9550 rm -f conftest.er1
9551 cat conftest.err >&5
c0d27fcc 9552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9553 (exit $ac_status); } &&
e143ad11
AS
9554 { ac_try='test -z "$ac_c_werror_flag"
9555 || test ! -s conftest.err'
edfaf76d
LK
9556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9557 (eval $ac_try) 2>&5
9558 ac_status=$?
9559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9560 (exit $ac_status); }; } &&
9561 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9563 (eval $ac_try) 2>&5
9564 ac_status=$?
c0d27fcc 9565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9566 (exit $ac_status); }; }; then
9567 ac_cv_lib_Xbsd_main=yes
9568else
9569 echo "$as_me: failed program was:" >&5
19650fd6
AS
9570sed 's/^/| /' conftest.$ac_ext >&5
9571
98418dba
CW
9572ac_cv_lib_Xbsd_main=no
9573fi
edfaf76d
LK
9574rm -f conftest.err conftest.$ac_objext \
9575 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9576LIBS=$ac_check_lib_save_LIBS
9577fi
c0d27fcc 9578echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
9579echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
9580if test $ac_cv_lib_Xbsd_main = yes; then
9581 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
9582fi
9583
c0d27fcc
MR
9584
9585
9586echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
9587echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
9588if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
9589 echo $ECHO_N "(cached) $ECHO_C" >&6
9590else
9591 ac_check_lib_save_LIBS=$LIBS
9592LIBS="-lpthreads $LIBS"
9593cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9594/* confdefs.h. */
9595_ACEOF
9596cat confdefs.h >>conftest.$ac_ext
9597cat >>conftest.$ac_ext <<_ACEOF
9598/* end confdefs.h. */
98418dba
CW
9599
9600/* Override any gcc2 internal prototype to avoid an error. */
9601#ifdef __cplusplus
9602extern "C"
9603#endif
9604/* We use char because int might match the return type of a gcc2
9605 builtin and then its argument prototype would still apply. */
9606char cma_open ();
98418dba
CW
9607int
9608main ()
9609{
9610cma_open ();
9611 ;
9612 return 0;
9613}
9614_ACEOF
9615rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9617 (eval $ac_link) 2>conftest.er1
98418dba 9618 ac_status=$?
edfaf76d
LK
9619 grep -v '^ *+' conftest.er1 >conftest.err
9620 rm -f conftest.er1
9621 cat conftest.err >&5
c0d27fcc 9622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9623 (exit $ac_status); } &&
e143ad11
AS
9624 { ac_try='test -z "$ac_c_werror_flag"
9625 || test ! -s conftest.err'
edfaf76d
LK
9626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9627 (eval $ac_try) 2>&5
9628 ac_status=$?
9629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9630 (exit $ac_status); }; } &&
9631 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9633 (eval $ac_try) 2>&5
9634 ac_status=$?
c0d27fcc 9635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9636 (exit $ac_status); }; }; then
9637 ac_cv_lib_pthreads_cma_open=yes
9638else
9639 echo "$as_me: failed program was:" >&5
19650fd6
AS
9640sed 's/^/| /' conftest.$ac_ext >&5
9641
98418dba
CW
9642ac_cv_lib_pthreads_cma_open=no
9643fi
edfaf76d
LK
9644rm -f conftest.err conftest.$ac_objext \
9645 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9646LIBS=$ac_check_lib_save_LIBS
9647fi
c0d27fcc 9648echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
9649echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
9650if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 9651 cat >>confdefs.h <<_ACEOF
98418dba 9652#define HAVE_LIBPTHREADS 1
c0d27fcc 9653_ACEOF
98418dba
CW
9654
9655 LIBS="-lpthreads $LIBS"
9656
9657fi
9658
c0d27fcc
MR
9659
9660echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
9661echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
9662if test -d /usr/X386/include; then
9663 HAVE_XFREE386=yes
9664 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
9665else
9666 HAVE_XFREE386=no
9667fi
c0d27fcc 9668echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
9669echo "${ECHO_T}$HAVE_XFREE386" >&6
9670
55597d70
DL
9671
9672case ${host_os} in
9673aix*)
9674 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
9675echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
9676if test "${gdb_cv_bigtoc+set}" = set; then
9677 echo $ECHO_N "(cached) $ECHO_C" >&6
9678else
9679
9680 case $GCC in
9681 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9682 *) gdb_cv_bigtoc=-bbigtoc ;;
9683 esac
9684
9685 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9686 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9687/* confdefs.h. */
9688_ACEOF
9689cat confdefs.h >>conftest.$ac_ext
9690cat >>conftest.$ac_ext <<_ACEOF
9691/* end confdefs.h. */
55597d70
DL
9692
9693int
9694main ()
9695{
9696int i;
9697 ;
9698 return 0;
9699}
9700_ACEOF
9701rm -f conftest.$ac_objext conftest$ac_exeext
9702if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9703 (eval $ac_link) 2>conftest.er1
55597d70 9704 ac_status=$?
edfaf76d
LK
9705 grep -v '^ *+' conftest.er1 >conftest.err
9706 rm -f conftest.er1
9707 cat conftest.err >&5
55597d70
DL
9708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9709 (exit $ac_status); } &&
e143ad11
AS
9710 { ac_try='test -z "$ac_c_werror_flag"
9711 || test ! -s conftest.err'
edfaf76d
LK
9712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9713 (eval $ac_try) 2>&5
9714 ac_status=$?
9715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9716 (exit $ac_status); }; } &&
9717 { ac_try='test -s conftest$ac_exeext'
55597d70
DL
9718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9719 (eval $ac_try) 2>&5
9720 ac_status=$?
9721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9722 (exit $ac_status); }; }; then
9723 :
9724else
9725 echo "$as_me: failed program was:" >&5
19650fd6
AS
9726sed 's/^/| /' conftest.$ac_ext >&5
9727
55597d70
DL
9728gdb_cv_bigtoc=
9729fi
edfaf76d
LK
9730rm -f conftest.err conftest.$ac_objext \
9731 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
9732
9733fi
9734echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
9735echo "${ECHO_T}$gdb_cv_bigtoc" >&6
9736 ;;
9737esac
9738
ae1a998c
RS
9739# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
9740# used for the tests that follow. We set them back to REAL_CFLAGS and
9741# REAL_CPPFLAGS later on.
98418dba
CW
9742
9743REAL_CPPFLAGS="$CPPFLAGS"
9744
9745if test "${HAVE_X11}" = "yes"; then
9746 DEFS="$C_SWITCH_X_SITE $DEFS"
9747 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
9748 LIBS="$LIBX $LIBS"
9749 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
9750 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
9751
9752 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
9753 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
9754 # but it's more convenient here to set LD_RUN_PATH
9755 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
9756 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
9757 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
9758 export LD_RUN_PATH
9759 fi
9760
9761 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 9762 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
9763echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
9764 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9765/* confdefs.h. */
9766_ACEOF
9767cat confdefs.h >>conftest.$ac_ext
9768cat >>conftest.$ac_ext <<_ACEOF
9769/* end confdefs.h. */
98418dba 9770
98418dba
CW
9771int
9772main ()
9773{
9774XOpenDisplay ("foo");
9775 ;
9776 return 0;
9777}
9778_ACEOF
9779rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9780if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9781 (eval $ac_link) 2>conftest.er1
98418dba 9782 ac_status=$?
edfaf76d
LK
9783 grep -v '^ *+' conftest.er1 >conftest.err
9784 rm -f conftest.er1
9785 cat conftest.err >&5
c0d27fcc 9786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9787 (exit $ac_status); } &&
e143ad11
AS
9788 { ac_try='test -z "$ac_c_werror_flag"
9789 || test ! -s conftest.err'
edfaf76d
LK
9790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9791 (eval $ac_try) 2>&5
9792 ac_status=$?
9793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9794 (exit $ac_status); }; } &&
9795 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
9796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9797 (eval $ac_try) 2>&5
9798 ac_status=$?
9799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9800 (exit $ac_status); }; }; then
9801 xlinux_first_failure=no
98418dba
CW
9802else
9803 echo "$as_me: failed program was:" >&5
19650fd6
AS
9804sed 's/^/| /' conftest.$ac_ext >&5
9805
98418dba
CW
9806xlinux_first_failure=yes
9807fi
edfaf76d
LK
9808rm -f conftest.err conftest.$ac_objext \
9809 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9810 if test "${xlinux_first_failure}" = "yes"; then
9811 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
9812 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
9813 OLD_CPPFLAGS="$CPPFLAGS"
9814 OLD_LIBS="$LIBS"
9815 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
9816 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
9817 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
9818 LIBS="$LIBS -b i486-linuxaout"
9819 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9820/* confdefs.h. */
9821_ACEOF
9822cat confdefs.h >>conftest.$ac_ext
9823cat >>conftest.$ac_ext <<_ACEOF
9824/* end confdefs.h. */
98418dba 9825
98418dba
CW
9826int
9827main ()
9828{
9829XOpenDisplay ("foo");
9830 ;
9831 return 0;
9832}
9833_ACEOF
9834rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9835if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9836 (eval $ac_link) 2>conftest.er1
98418dba 9837 ac_status=$?
edfaf76d
LK
9838 grep -v '^ *+' conftest.er1 >conftest.err
9839 rm -f conftest.er1
9840 cat conftest.err >&5
c0d27fcc 9841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9842 (exit $ac_status); } &&
e143ad11
AS
9843 { ac_try='test -z "$ac_c_werror_flag"
9844 || test ! -s conftest.err'
edfaf76d
LK
9845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9846 (eval $ac_try) 2>&5
9847 ac_status=$?
9848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9849 (exit $ac_status); }; } &&
9850 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9852 (eval $ac_try) 2>&5
9853 ac_status=$?
c0d27fcc 9854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9855 (exit $ac_status); }; }; then
9856 xlinux_second_failure=no
9857else
9858 echo "$as_me: failed program was:" >&5
19650fd6
AS
9859sed 's/^/| /' conftest.$ac_ext >&5
9860
98418dba
CW
9861xlinux_second_failure=yes
9862fi
edfaf76d
LK
9863rm -f conftest.err conftest.$ac_objext \
9864 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9865 if test "${xlinux_second_failure}" = "yes"; then
9866 # If we get the same failure with -b, there is no use adding -b.
9867 # So take it out. This plays safe.
9868 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
9869 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
9870 CPPFLAGS="$OLD_CPPFLAGS"
9871 LIBS="$OLD_LIBS"
c0d27fcc 9872 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9873echo "${ECHO_T}no" >&6
9874 else
c0d27fcc 9875 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
9876echo "${ECHO_T}yes" >&6
9877 fi
9878 else
c0d27fcc 9879 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9880echo "${ECHO_T}no" >&6
9881 fi
9882 fi
9883
9884 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
9885 # header files included from there.
c0d27fcc 9886 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
9887echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
9888 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9889/* confdefs.h. */
9890_ACEOF
9891cat confdefs.h >>conftest.$ac_ext
9892cat >>conftest.$ac_ext <<_ACEOF
9893/* end confdefs.h. */
98418dba
CW
9894#include <X11/Xlib.h>
9895#include <X11/XKBlib.h>
98418dba
CW
9896int
9897main ()
9898{
9899XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
9900 ;
9901 return 0;
9902}
9903_ACEOF
9904rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9905if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9906 (eval $ac_link) 2>conftest.er1
98418dba 9907 ac_status=$?
edfaf76d
LK
9908 grep -v '^ *+' conftest.er1 >conftest.err
9909 rm -f conftest.er1
9910 cat conftest.err >&5
c0d27fcc 9911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9912 (exit $ac_status); } &&
e143ad11
AS
9913 { ac_try='test -z "$ac_c_werror_flag"
9914 || test ! -s conftest.err'
edfaf76d
LK
9915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9916 (eval $ac_try) 2>&5
9917 ac_status=$?
9918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9919 (exit $ac_status); }; } &&
9920 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9922 (eval $ac_try) 2>&5
9923 ac_status=$?
c0d27fcc 9924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9925 (exit $ac_status); }; }; then
9926 emacs_xkb=yes
9927else
9928 echo "$as_me: failed program was:" >&5
19650fd6
AS
9929sed 's/^/| /' conftest.$ac_ext >&5
9930
98418dba
CW
9931emacs_xkb=no
9932fi
edfaf76d
LK
9933rm -f conftest.err conftest.$ac_objext \
9934 conftest$ac_exeext conftest.$ac_ext
c0d27fcc 9935 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
9936echo "${ECHO_T}$emacs_xkb" >&6
9937 if test $emacs_xkb = yes; then
b936fae4 9938
c0d27fcc 9939cat >>confdefs.h <<\_ACEOF
98418dba 9940#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 9941_ACEOF
98418dba
CW
9942
9943 fi
9944
c0d27fcc
MR
9945
9946
9947
9948
98418dba
CW
9949for ac_func in XrmSetDatabase XScreenResourceString \
9950XScreenNumberOfScreen XSetWMProtocols
9951do
9952as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 9953echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
9954echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9955if eval "test \"\${$as_ac_var+set}\" = set"; then
9956 echo $ECHO_N "(cached) $ECHO_C" >&6
9957else
9958 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9959/* confdefs.h. */
9960_ACEOF
9961cat confdefs.h >>conftest.$ac_ext
9962cat >>conftest.$ac_ext <<_ACEOF
9963/* end confdefs.h. */
edfaf76d
LK
9964/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9965 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9966#define $ac_func innocuous_$ac_func
9967
98418dba 9968/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9969 which can conflict with char $ac_func (); below.
9970 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9971 <limits.h> exists even on freestanding compilers. */
edfaf76d 9972
19650fd6
AS
9973#ifdef __STDC__
9974# include <limits.h>
9975#else
9976# include <assert.h>
9977#endif
edfaf76d
LK
9978
9979#undef $ac_func
9980
98418dba
CW
9981/* Override any gcc2 internal prototype to avoid an error. */
9982#ifdef __cplusplus
9983extern "C"
19650fd6 9984{
98418dba
CW
9985#endif
9986/* We use char because int might match the return type of a gcc2
9987 builtin and then its argument prototype would still apply. */
9988char $ac_func ();
98418dba
CW
9989/* The GNU C library defines this for functions which it implements
9990 to always fail with ENOSYS. Some functions are actually named
9991 something starting with __ and the normal name is an alias. */
9992#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9993choke me
9994#else
19650fd6
AS
9995char (*f) () = $ac_func;
9996#endif
9997#ifdef __cplusplus
9998}
98418dba
CW
9999#endif
10000
19650fd6
AS
10001int
10002main ()
10003{
10004return f != $ac_func;
98418dba
CW
10005 ;
10006 return 0;
10007}
10008_ACEOF
10009rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10011 (eval $ac_link) 2>conftest.er1
98418dba 10012 ac_status=$?
edfaf76d
LK
10013 grep -v '^ *+' conftest.er1 >conftest.err
10014 rm -f conftest.er1
10015 cat conftest.err >&5
c0d27fcc 10016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10017 (exit $ac_status); } &&
e143ad11
AS
10018 { ac_try='test -z "$ac_c_werror_flag"
10019 || test ! -s conftest.err'
edfaf76d
LK
10020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10021 (eval $ac_try) 2>&5
10022 ac_status=$?
10023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10024 (exit $ac_status); }; } &&
10025 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10027 (eval $ac_try) 2>&5
10028 ac_status=$?
c0d27fcc 10029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10030 (exit $ac_status); }; }; then
10031 eval "$as_ac_var=yes"
10032else
10033 echo "$as_me: failed program was:" >&5
19650fd6
AS
10034sed 's/^/| /' conftest.$ac_ext >&5
10035
98418dba
CW
10036eval "$as_ac_var=no"
10037fi
edfaf76d
LK
10038rm -f conftest.err conftest.$ac_objext \
10039 conftest$ac_exeext conftest.$ac_ext
98418dba 10040fi
c0d27fcc 10041echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
10042echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10043if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10044 cat >>confdefs.h <<_ACEOF
98418dba 10045#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10046_ACEOF
98418dba
CW
10047
10048fi
10049done
10050
10051fi
10052
10053if test "${window_system}" = "x11"; then
c0d27fcc 10054 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
10055echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
10056 if test "${emacs_cv_x11_version_6+set}" = set; then
10057 echo $ECHO_N "(cached) $ECHO_C" >&6
10058else
10059 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10060/* confdefs.h. */
10061_ACEOF
10062cat confdefs.h >>conftest.$ac_ext
10063cat >>conftest.$ac_ext <<_ACEOF
10064/* end confdefs.h. */
98418dba 10065#include <X11/Xlib.h>
98418dba
CW
10066int
10067main ()
10068{
10069#if XlibSpecificationRelease < 6
10070fail;
10071#endif
10072
10073 ;
10074 return 0;
10075}
10076_ACEOF
10077rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10078if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10079 (eval $ac_link) 2>conftest.er1
98418dba 10080 ac_status=$?
edfaf76d
LK
10081 grep -v '^ *+' conftest.er1 >conftest.err
10082 rm -f conftest.er1
10083 cat conftest.err >&5
c0d27fcc 10084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10085 (exit $ac_status); } &&
e143ad11
AS
10086 { ac_try='test -z "$ac_c_werror_flag"
10087 || test ! -s conftest.err'
edfaf76d
LK
10088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10089 (eval $ac_try) 2>&5
10090 ac_status=$?
10091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10092 (exit $ac_status); }; } &&
10093 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10095 (eval $ac_try) 2>&5
10096 ac_status=$?
c0d27fcc 10097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10098 (exit $ac_status); }; }; then
10099 emacs_cv_x11_version_6=yes
10100else
10101 echo "$as_me: failed program was:" >&5
19650fd6
AS
10102sed 's/^/| /' conftest.$ac_ext >&5
10103
98418dba
CW
10104emacs_cv_x11_version_6=no
10105fi
edfaf76d
LK
10106rm -f conftest.err conftest.$ac_objext \
10107 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10108fi
10109
10110 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 10111 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 10112echo "${ECHO_T}6 or newer" >&6
b936fae4 10113
c0d27fcc 10114cat >>confdefs.h <<\_ACEOF
98418dba 10115#define HAVE_X11R6 1
c0d27fcc 10116_ACEOF
98418dba
CW
10117
10118 else
c0d27fcc 10119 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
10120echo "${ECHO_T}before 6" >&6
10121 fi
10122fi
10123
10124if test "${window_system}" = "x11"; then
c0d27fcc 10125 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
10126echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
10127 if test "${emacs_cv_x11_version_5+set}" = set; then
10128 echo $ECHO_N "(cached) $ECHO_C" >&6
10129else
10130 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10131/* confdefs.h. */
10132_ACEOF
10133cat confdefs.h >>conftest.$ac_ext
10134cat >>conftest.$ac_ext <<_ACEOF
10135/* end confdefs.h. */
98418dba 10136#include <X11/Xlib.h>
98418dba
CW
10137int
10138main ()
10139{
10140#if XlibSpecificationRelease < 5
10141fail;
10142#endif
10143
10144 ;
10145 return 0;
10146}
10147_ACEOF
10148rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10150 (eval $ac_link) 2>conftest.er1
98418dba 10151 ac_status=$?
edfaf76d
LK
10152 grep -v '^ *+' conftest.er1 >conftest.err
10153 rm -f conftest.er1
10154 cat conftest.err >&5
c0d27fcc 10155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10156 (exit $ac_status); } &&
e143ad11
AS
10157 { ac_try='test -z "$ac_c_werror_flag"
10158 || test ! -s conftest.err'
edfaf76d
LK
10159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10160 (eval $ac_try) 2>&5
10161 ac_status=$?
10162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10163 (exit $ac_status); }; } &&
10164 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10166 (eval $ac_try) 2>&5
10167 ac_status=$?
c0d27fcc 10168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10169 (exit $ac_status); }; }; then
10170 emacs_cv_x11_version_5=yes
10171else
10172 echo "$as_me: failed program was:" >&5
19650fd6
AS
10173sed 's/^/| /' conftest.$ac_ext >&5
10174
98418dba
CW
10175emacs_cv_x11_version_5=no
10176fi
edfaf76d
LK
10177rm -f conftest.err conftest.$ac_objext \
10178 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10179fi
10180
10181 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 10182 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
10183echo "${ECHO_T}5 or newer" >&6
10184 HAVE_X11R5=yes
b936fae4 10185
c0d27fcc 10186cat >>confdefs.h <<\_ACEOF
98418dba 10187#define HAVE_X11R5 1
c0d27fcc 10188_ACEOF
98418dba
CW
10189
10190 else
10191 HAVE_X11R5=no
c0d27fcc 10192 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
10193echo "${ECHO_T}before 5" >&6
10194 fi
10195fi
10196
488dd4c4
JD
10197
10198
10199HAVE_GTK=no
10200if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 10201 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
10202 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
10203echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
10204 { (exit 1); exit 1; }; };
10205 fi
448541bc
JD
10206 GLIB_REQUIRED=2.4
10207 GTK_REQUIRED=2.4
488dd4c4
JD
10208 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10209
10210 if test "X${with_pkg_config_prog}" != X; then
10211 PKG_CONFIG="${with_pkg_config_prog}"
10212 fi
10213
10214 succeeded=no
10215
10216 if test -z "$PKG_CONFIG"; then
10217 # Extract the first word of "pkg-config", so it can be a program name with args.
10218set dummy pkg-config; ac_word=$2
10219echo "$as_me:$LINENO: checking for $ac_word" >&5
10220echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10221if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10222 echo $ECHO_N "(cached) $ECHO_C" >&6
10223else
10224 case $PKG_CONFIG in
10225 [\\/]* | ?:[\\/]*)
10226 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10227 ;;
10228 *)
10229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10230for as_dir in $PATH
10231do
10232 IFS=$as_save_IFS
10233 test -z "$as_dir" && as_dir=.
10234 for ac_exec_ext in '' $ac_executable_extensions; do
10235 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10236 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10237 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10238 break 2
10239 fi
10240done
10241done
10242
10243 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10244 ;;
10245esac
10246fi
10247PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10248
10249if test -n "$PKG_CONFIG"; then
10250 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10251echo "${ECHO_T}$PKG_CONFIG" >&6
10252else
10253 echo "$as_me:$LINENO: result: no" >&5
10254echo "${ECHO_T}no" >&6
10255fi
10256
10257 fi
10258
10259 if test "$PKG_CONFIG" = "no" ; then
10260 echo "*** The pkg-config script could not be found. Make sure it is"
10261 echo "*** in your path, or give the full path to pkg-config with"
10262 echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog."
10263 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
10264 else
10265 PKG_CONFIG_MIN_VERSION=0.9.0
10266 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10267 echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
10268echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6
10269
10270 if $PKG_CONFIG --exists "$GTK_MODULES" ; then
10271 echo "$as_me:$LINENO: result: yes" >&5
10272echo "${ECHO_T}yes" >&6
10273 succeeded=yes
10274
10275 echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
10276echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
10277 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
10278 echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
10279echo "${ECHO_T}$GTK_CFLAGS" >&6
10280
10281 echo "$as_me:$LINENO: checking GTK_LIBS" >&5
10282echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
10283 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
10284 echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
10285echo "${ECHO_T}$GTK_LIBS" >&6
10286 else
10287 GTK_CFLAGS=""
10288 GTK_LIBS=""
10289 ## If we have a custom action on failure, don't print errors, but
10290 ## do set a variable so people can do so.
10291 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
10292 echo $GTK_PKG_ERRORS
10293 fi
10294
10295
10296
10297 else
10298 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10299 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10300 fi
10301 fi
10302
10303 if test $succeeded = yes; then
10304 :
10305 else
10306 { { 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
10307echo "$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;}
10308 { (exit 1); exit 1; }; }
10309 fi
10310
10311
10312
10313 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
10314 CFLAGS="$CFLAGS $GTK_CFLAGS"
10315 LIBS="$GTK_LIBS $LIBS"
488dd4c4
JD
10316 HAVE_GTK=yes
10317
10318cat >>confdefs.h <<\_ACEOF
10319#define HAVE_GTK 1
10320_ACEOF
10321
10322 USE_X_TOOLKIT=none
10323
d0a80c21
JD
10324 if test "$with_toolkit_scroll_bars" != no; then
10325 with_toolkit_scroll_bars=yes
10326 fi
57669b57
JD
10327
10328 HAVE_GTK_MULTIDISPLAY=no
10329
10330for ac_func in gdk_display_open
10331do
10332as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10333echo "$as_me:$LINENO: checking for $ac_func" >&5
10334echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10335if eval "test \"\${$as_ac_var+set}\" = set"; then
10336 echo $ECHO_N "(cached) $ECHO_C" >&6
10337else
10338 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
10339/* confdefs.h. */
10340_ACEOF
10341cat confdefs.h >>conftest.$ac_ext
10342cat >>conftest.$ac_ext <<_ACEOF
10343/* end confdefs.h. */
edfaf76d
LK
10344/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10345 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10346#define $ac_func innocuous_$ac_func
10347
57669b57
JD
10348/* System header to define __stub macros and hopefully few prototypes,
10349 which can conflict with char $ac_func (); below.
10350 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10351 <limits.h> exists even on freestanding compilers. */
edfaf76d 10352
57669b57
JD
10353#ifdef __STDC__
10354# include <limits.h>
10355#else
10356# include <assert.h>
10357#endif
edfaf76d
LK
10358
10359#undef $ac_func
10360
57669b57
JD
10361/* Override any gcc2 internal prototype to avoid an error. */
10362#ifdef __cplusplus
10363extern "C"
10364{
10365#endif
10366/* We use char because int might match the return type of a gcc2
10367 builtin and then its argument prototype would still apply. */
10368char $ac_func ();
10369/* The GNU C library defines this for functions which it implements
10370 to always fail with ENOSYS. Some functions are actually named
10371 something starting with __ and the normal name is an alias. */
10372#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10373choke me
10374#else
10375char (*f) () = $ac_func;
10376#endif
10377#ifdef __cplusplus
10378}
10379#endif
10380
10381int
10382main ()
10383{
10384return f != $ac_func;
10385 ;
10386 return 0;
10387}
10388_ACEOF
10389rm -f conftest.$ac_objext conftest$ac_exeext
10390if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10391 (eval $ac_link) 2>conftest.er1
57669b57 10392 ac_status=$?
edfaf76d
LK
10393 grep -v '^ *+' conftest.er1 >conftest.err
10394 rm -f conftest.er1
10395 cat conftest.err >&5
57669b57
JD
10396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10397 (exit $ac_status); } &&
e143ad11
AS
10398 { ac_try='test -z "$ac_c_werror_flag"
10399 || test ! -s conftest.err'
edfaf76d
LK
10400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10401 (eval $ac_try) 2>&5
10402 ac_status=$?
10403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10404 (exit $ac_status); }; } &&
10405 { ac_try='test -s conftest$ac_exeext'
57669b57
JD
10406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10407 (eval $ac_try) 2>&5
10408 ac_status=$?
10409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10410 (exit $ac_status); }; }; then
10411 eval "$as_ac_var=yes"
10412else
10413 echo "$as_me: failed program was:" >&5
10414sed 's/^/| /' conftest.$ac_ext >&5
10415
10416eval "$as_ac_var=no"
10417fi
edfaf76d
LK
10418rm -f conftest.err conftest.$ac_objext \
10419 conftest$ac_exeext conftest.$ac_ext
57669b57
JD
10420fi
10421echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10422echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10423if test `eval echo '${'$as_ac_var'}'` = yes; then
10424 cat >>confdefs.h <<_ACEOF
10425#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10426_ACEOF
10427 HAVE_GTK_MULTIDISPLAY=yes
10428fi
10429done
10430
10431 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
10432
10433cat >>confdefs.h <<\_ACEOF
10434#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
10435_ACEOF
10436
10437 fi
10438 HAVE_GTK_FILE_SELECTION=no
10439
10440for ac_func in gtk_file_selection_new
10441do
10442as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10443echo "$as_me:$LINENO: checking for $ac_func" >&5
10444echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10445if eval "test \"\${$as_ac_var+set}\" = set"; then
10446 echo $ECHO_N "(cached) $ECHO_C" >&6
10447else
10448 cat >conftest.$ac_ext <<_ACEOF
10449/* confdefs.h. */
10450_ACEOF
10451cat confdefs.h >>conftest.$ac_ext
10452cat >>conftest.$ac_ext <<_ACEOF
10453/* end confdefs.h. */
edfaf76d
LK
10454/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10455 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10456#define $ac_func innocuous_$ac_func
10457
572a3cc2
JD
10458/* System header to define __stub macros and hopefully few prototypes,
10459 which can conflict with char $ac_func (); below.
10460 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10461 <limits.h> exists even on freestanding compilers. */
edfaf76d 10462
572a3cc2
JD
10463#ifdef __STDC__
10464# include <limits.h>
10465#else
10466# include <assert.h>
10467#endif
edfaf76d
LK
10468
10469#undef $ac_func
10470
572a3cc2
JD
10471/* Override any gcc2 internal prototype to avoid an error. */
10472#ifdef __cplusplus
10473extern "C"
10474{
10475#endif
10476/* We use char because int might match the return type of a gcc2
10477 builtin and then its argument prototype would still apply. */
10478char $ac_func ();
10479/* The GNU C library defines this for functions which it implements
10480 to always fail with ENOSYS. Some functions are actually named
10481 something starting with __ and the normal name is an alias. */
10482#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10483choke me
10484#else
10485char (*f) () = $ac_func;
10486#endif
10487#ifdef __cplusplus
10488}
10489#endif
10490
10491int
10492main ()
10493{
10494return f != $ac_func;
10495 ;
10496 return 0;
10497}
10498_ACEOF
10499rm -f conftest.$ac_objext conftest$ac_exeext
10500if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10501 (eval $ac_link) 2>conftest.er1
572a3cc2 10502 ac_status=$?
edfaf76d
LK
10503 grep -v '^ *+' conftest.er1 >conftest.err
10504 rm -f conftest.er1
10505 cat conftest.err >&5
572a3cc2
JD
10506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10507 (exit $ac_status); } &&
e143ad11
AS
10508 { ac_try='test -z "$ac_c_werror_flag"
10509 || test ! -s conftest.err'
edfaf76d
LK
10510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10511 (eval $ac_try) 2>&5
10512 ac_status=$?
10513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10514 (exit $ac_status); }; } &&
10515 { ac_try='test -s conftest$ac_exeext'
572a3cc2
JD
10516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10517 (eval $ac_try) 2>&5
10518 ac_status=$?
10519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10520 (exit $ac_status); }; }; then
10521 eval "$as_ac_var=yes"
10522else
10523 echo "$as_me: failed program was:" >&5
10524sed 's/^/| /' conftest.$ac_ext >&5
10525
10526eval "$as_ac_var=no"
10527fi
edfaf76d
LK
10528rm -f conftest.err conftest.$ac_objext \
10529 conftest$ac_exeext conftest.$ac_ext
572a3cc2
JD
10530fi
10531echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10532echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10533if test `eval echo '${'$as_ac_var'}'` = yes; then
10534 cat >>confdefs.h <<_ACEOF
10535#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10536_ACEOF
10537 HAVE_GTK_FILE_SELECTION=yes
10538fi
10539done
10540
10541
10542 HAVE_GTK_FILE_CHOOSER=no
10543
10544for ac_func in gtk_file_chooser_dialog_new
10545do
10546as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10547echo "$as_me:$LINENO: checking for $ac_func" >&5
10548echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10549if eval "test \"\${$as_ac_var+set}\" = set"; then
10550 echo $ECHO_N "(cached) $ECHO_C" >&6
10551else
10552 cat >conftest.$ac_ext <<_ACEOF
10553/* confdefs.h. */
10554_ACEOF
10555cat confdefs.h >>conftest.$ac_ext
10556cat >>conftest.$ac_ext <<_ACEOF
10557/* end confdefs.h. */
edfaf76d
LK
10558/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10559 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10560#define $ac_func innocuous_$ac_func
10561
572a3cc2
JD
10562/* System header to define __stub macros and hopefully few prototypes,
10563 which can conflict with char $ac_func (); below.
10564 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10565 <limits.h> exists even on freestanding compilers. */
edfaf76d 10566
572a3cc2
JD
10567#ifdef __STDC__
10568# include <limits.h>
10569#else
10570# include <assert.h>
10571#endif
edfaf76d
LK
10572
10573#undef $ac_func
10574
572a3cc2
JD
10575/* Override any gcc2 internal prototype to avoid an error. */
10576#ifdef __cplusplus
10577extern "C"
10578{
10579#endif
10580/* We use char because int might match the return type of a gcc2
10581 builtin and then its argument prototype would still apply. */
10582char $ac_func ();
10583/* The GNU C library defines this for functions which it implements
10584 to always fail with ENOSYS. Some functions are actually named
10585 something starting with __ and the normal name is an alias. */
10586#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10587choke me
10588#else
10589char (*f) () = $ac_func;
10590#endif
10591#ifdef __cplusplus
10592}
10593#endif
10594
10595int
10596main ()
10597{
10598return f != $ac_func;
10599 ;
10600 return 0;
10601}
10602_ACEOF
10603rm -f conftest.$ac_objext conftest$ac_exeext
10604if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10605 (eval $ac_link) 2>conftest.er1
572a3cc2 10606 ac_status=$?
edfaf76d
LK
10607 grep -v '^ *+' conftest.er1 >conftest.err
10608 rm -f conftest.er1
10609 cat conftest.err >&5
572a3cc2
JD
10610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10611 (exit $ac_status); } &&
e143ad11
AS
10612 { ac_try='test -z "$ac_c_werror_flag"
10613 || test ! -s conftest.err'
edfaf76d
LK
10614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10615 (eval $ac_try) 2>&5
10616 ac_status=$?
10617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10618 (exit $ac_status); }; } &&
10619 { ac_try='test -s conftest$ac_exeext'
572a3cc2
JD
10620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10621 (eval $ac_try) 2>&5
10622 ac_status=$?
10623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10624 (exit $ac_status); }; }; then
10625 eval "$as_ac_var=yes"
10626else
10627 echo "$as_me: failed program was:" >&5
10628sed 's/^/| /' conftest.$ac_ext >&5
10629
10630eval "$as_ac_var=no"
10631fi
edfaf76d
LK
10632rm -f conftest.err conftest.$ac_objext \
10633 conftest$ac_exeext conftest.$ac_ext
572a3cc2
JD
10634fi
10635echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10636echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10637if test `eval echo '${'$as_ac_var'}'` = yes; then
10638 cat >>confdefs.h <<_ACEOF
10639#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10640_ACEOF
10641 HAVE_GTK_FILE_CHOOSER=yes
10642fi
10643done
10644
10645
10646 if test "$HAVE_GTK_FILE_SELECTION" = yes \
10647 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10648
10649cat >>confdefs.h <<\_ACEOF
10650#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
10651_ACEOF
10652
b8bdffbe
JD
10653 fi
10654
10655 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10656 HAVE_GTK_AND_PTHREAD=no
10657
10658for ac_header in pthread.h
10659do
10660as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10661if eval "test \"\${$as_ac_Header+set}\" = set"; then
10662 echo "$as_me:$LINENO: checking for $ac_header" >&5
10663echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10664if eval "test \"\${$as_ac_Header+set}\" = set"; then
10665 echo $ECHO_N "(cached) $ECHO_C" >&6
10666fi
10667echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10668echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10669else
10670 # Is the header compilable?
10671echo "$as_me:$LINENO: checking $ac_header usability" >&5
10672echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10673cat >conftest.$ac_ext <<_ACEOF
10674/* confdefs.h. */
10675_ACEOF
10676cat confdefs.h >>conftest.$ac_ext
10677cat >>conftest.$ac_ext <<_ACEOF
10678/* end confdefs.h. */
10679$ac_includes_default
10680#include <$ac_header>
10681_ACEOF
10682rm -f conftest.$ac_objext
10683if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 10684 (eval $ac_compile) 2>conftest.er1
b8bdffbe 10685 ac_status=$?
edfaf76d
LK
10686 grep -v '^ *+' conftest.er1 >conftest.err
10687 rm -f conftest.er1
10688 cat conftest.err >&5
b8bdffbe
JD
10689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10690 (exit $ac_status); } &&
e143ad11
AS
10691 { ac_try='test -z "$ac_c_werror_flag"
10692 || test ! -s conftest.err'
edfaf76d
LK
10693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10694 (eval $ac_try) 2>&5
10695 ac_status=$?
10696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10697 (exit $ac_status); }; } &&
10698 { ac_try='test -s conftest.$ac_objext'
b8bdffbe
JD
10699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10700 (eval $ac_try) 2>&5
10701 ac_status=$?
10702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10703 (exit $ac_status); }; }; then
10704 ac_header_compiler=yes
10705else
10706 echo "$as_me: failed program was:" >&5
10707sed 's/^/| /' conftest.$ac_ext >&5
10708
10709ac_header_compiler=no
10710fi
edfaf76d 10711rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b8bdffbe
JD
10712echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10713echo "${ECHO_T}$ac_header_compiler" >&6
10714
10715# Is the header present?
10716echo "$as_me:$LINENO: checking $ac_header presence" >&5
10717echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10718cat >conftest.$ac_ext <<_ACEOF
10719/* confdefs.h. */
10720_ACEOF
10721cat confdefs.h >>conftest.$ac_ext
10722cat >>conftest.$ac_ext <<_ACEOF
10723/* end confdefs.h. */
10724#include <$ac_header>
10725_ACEOF
10726if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10727 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10728 ac_status=$?
10729 grep -v '^ *+' conftest.er1 >conftest.err
10730 rm -f conftest.er1
10731 cat conftest.err >&5
10732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10733 (exit $ac_status); } >/dev/null; then
10734 if test -s conftest.err; then
10735 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 10736 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
b8bdffbe
JD
10737 else
10738 ac_cpp_err=
10739 fi
10740else
10741 ac_cpp_err=yes
10742fi
10743if test -z "$ac_cpp_err"; then
10744 ac_header_preproc=yes
10745else
10746 echo "$as_me: failed program was:" >&5
10747sed 's/^/| /' conftest.$ac_ext >&5
10748
10749 ac_header_preproc=no
10750fi
10751rm -f conftest.err conftest.$ac_ext
10752echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10753echo "${ECHO_T}$ac_header_preproc" >&6
10754
10755# So? What about this header?
edfaf76d
LK
10756case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10757 yes:no: )
b8bdffbe
JD
10758 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10759echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
10760 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10761echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10762 ac_header_preproc=yes
b8bdffbe 10763 ;;
edfaf76d 10764 no:yes:* )
b8bdffbe
JD
10765 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10766echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
10767 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10768echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10769 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10770echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10771 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10772echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
10773 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10774echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
10775 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10776echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b8bdffbe
JD
10777 (
10778 cat <<\_ASBOX
edfaf76d
LK
10779## ------------------------------------------ ##
10780## Report this to the AC_PACKAGE_NAME lists. ##
10781## ------------------------------------------ ##
b8bdffbe
JD
10782_ASBOX
10783 ) |
10784 sed "s/^/$as_me: WARNING: /" >&2
10785 ;;
10786esac
10787echo "$as_me:$LINENO: checking for $ac_header" >&5
10788echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10789if eval "test \"\${$as_ac_Header+set}\" = set"; then
10790 echo $ECHO_N "(cached) $ECHO_C" >&6
10791else
edfaf76d 10792 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe
JD
10793fi
10794echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10795echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10796
10797fi
10798if test `eval echo '${'$as_ac_Header'}'` = yes; then
10799 cat >>confdefs.h <<_ACEOF
10800#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10801_ACEOF
10802
10803fi
10804
10805done
10806
10807 if test "$ac_cv_header_pthread_h"; then
10808 echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
10809echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6
10810if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
10811 echo $ECHO_N "(cached) $ECHO_C" >&6
10812else
10813 ac_check_lib_save_LIBS=$LIBS
10814LIBS="-lpthread $LIBS"
10815cat >conftest.$ac_ext <<_ACEOF
10816/* confdefs.h. */
10817_ACEOF
10818cat confdefs.h >>conftest.$ac_ext
10819cat >>conftest.$ac_ext <<_ACEOF
10820/* end confdefs.h. */
10821
10822/* Override any gcc2 internal prototype to avoid an error. */
10823#ifdef __cplusplus
10824extern "C"
10825#endif
10826/* We use char because int might match the return type of a gcc2
10827 builtin and then its argument prototype would still apply. */
10828char pthread_self ();
10829int
10830main ()
10831{
10832pthread_self ();
10833 ;
10834 return 0;
10835}
10836_ACEOF
10837rm -f conftest.$ac_objext conftest$ac_exeext
10838if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10839 (eval $ac_link) 2>conftest.er1
b8bdffbe 10840 ac_status=$?
edfaf76d
LK
10841 grep -v '^ *+' conftest.er1 >conftest.err
10842 rm -f conftest.er1
10843 cat conftest.err >&5
b8bdffbe
JD
10844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10845 (exit $ac_status); } &&
e143ad11
AS
10846 { ac_try='test -z "$ac_c_werror_flag"
10847 || test ! -s conftest.err'
edfaf76d
LK
10848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10849 (eval $ac_try) 2>&5
10850 ac_status=$?
10851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10852 (exit $ac_status); }; } &&
10853 { ac_try='test -s conftest$ac_exeext'
b8bdffbe
JD
10854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10855 (eval $ac_try) 2>&5
10856 ac_status=$?
10857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10858 (exit $ac_status); }; }; then
10859 ac_cv_lib_pthread_pthread_self=yes
10860else
10861 echo "$as_me: failed program was:" >&5
10862sed 's/^/| /' conftest.$ac_ext >&5
10863
10864ac_cv_lib_pthread_pthread_self=no
10865fi
edfaf76d
LK
10866rm -f conftest.err conftest.$ac_objext \
10867 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
10868LIBS=$ac_check_lib_save_LIBS
10869fi
10870echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
10871echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6
10872if test $ac_cv_lib_pthread_pthread_self = yes; then
10873 HAVE_GTK_AND_PTHREAD=yes
10874fi
10875
10876 fi
10877 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
10878 GTK_LIBS="$GTK_LIBS -lpthread"
10879
10880cat >>confdefs.h <<\_ACEOF
10881#define HAVE_GTK_AND_PTHREAD 1
10882_ACEOF
10883
10884 fi
57669b57 10885 fi
488dd4c4
JD
10886fi
10887
98418dba
CW
10888if test x"${USE_X_TOOLKIT}" = xmaybe; then
10889 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 10890 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
10891echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
10892 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
10893 echo $ECHO_N "(cached) $ECHO_C" >&6
10894else
10895 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10896/* confdefs.h. */
10897_ACEOF
10898cat confdefs.h >>conftest.$ac_ext
10899cat >>conftest.$ac_ext <<_ACEOF
10900/* end confdefs.h. */
98418dba
CW
10901
10902#include <X11/Intrinsic.h>
10903#include <X11/Xaw/Simple.h>
98418dba
CW
10904int
10905main ()
10906{
10907
10908 ;
10909 return 0;
10910}
10911_ACEOF
10912rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10913if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10914 (eval $ac_link) 2>conftest.er1
98418dba 10915 ac_status=$?
edfaf76d
LK
10916 grep -v '^ *+' conftest.er1 >conftest.err
10917 rm -f conftest.er1
10918 cat conftest.err >&5
c0d27fcc 10919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10920 (exit $ac_status); } &&
e143ad11
AS
10921 { ac_try='test -z "$ac_c_werror_flag"
10922 || test ! -s conftest.err'
edfaf76d
LK
10923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10924 (eval $ac_try) 2>&5
10925 ac_status=$?
10926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10927 (exit $ac_status); }; } &&
10928 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10930 (eval $ac_try) 2>&5
10931 ac_status=$?
c0d27fcc 10932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10933 (exit $ac_status); }; }; then
10934 emacs_cv_x11_version_5_with_xaw=yes
10935else
10936 echo "$as_me: failed program was:" >&5
19650fd6
AS
10937sed 's/^/| /' conftest.$ac_ext >&5
10938
98418dba
CW
10939emacs_cv_x11_version_5_with_xaw=no
10940fi
edfaf76d
LK
10941rm -f conftest.err conftest.$ac_objext \
10942 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10943fi
10944
10945 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 10946 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
10947echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
10948 USE_X_TOOLKIT=LUCID
10949 else
c0d27fcc 10950 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
10951echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
10952 USE_X_TOOLKIT=none
10953 fi
10954 else
10955 USE_X_TOOLKIT=none
10956 fi
10957fi
10958
10959X_TOOLKIT_TYPE=$USE_X_TOOLKIT
10960
10961if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 10962 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
10963echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
10964 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
10965 echo $ECHO_N "(cached) $ECHO_C" >&6
10966else
10967 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10968/* confdefs.h. */
10969_ACEOF
10970cat confdefs.h >>conftest.$ac_ext
10971cat >>conftest.$ac_ext <<_ACEOF
10972/* end confdefs.h. */
98418dba 10973#include <X11/Intrinsic.h>
98418dba
CW
10974int
10975main ()
10976{
10977#if XtSpecificationRelease < 6
10978fail;
10979#endif
10980
10981 ;
10982 return 0;
10983}
10984_ACEOF
10985rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10986if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10987 (eval $ac_link) 2>conftest.er1
98418dba 10988 ac_status=$?
edfaf76d
LK
10989 grep -v '^ *+' conftest.er1 >conftest.err
10990 rm -f conftest.er1
10991 cat conftest.err >&5
c0d27fcc 10992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10993 (exit $ac_status); } &&
e143ad11
AS
10994 { ac_try='test -z "$ac_c_werror_flag"
10995 || test ! -s conftest.err'
edfaf76d
LK
10996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10997 (eval $ac_try) 2>&5
10998 ac_status=$?
10999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11000 (exit $ac_status); }; } &&
11001 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11003 (eval $ac_try) 2>&5
11004 ac_status=$?
c0d27fcc 11005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11006 (exit $ac_status); }; }; then
11007 emacs_cv_x11_toolkit_version_6=yes
11008else
11009 echo "$as_me: failed program was:" >&5
19650fd6
AS
11010sed 's/^/| /' conftest.$ac_ext >&5
11011
98418dba
CW
11012emacs_cv_x11_toolkit_version_6=no
11013fi
edfaf76d
LK
11014rm -f conftest.err conftest.$ac_objext \
11015 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11016fi
11017
11018 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11019 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 11020 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 11021echo "${ECHO_T}6 or newer" >&6
b936fae4 11022
c0d27fcc 11023cat >>confdefs.h <<\_ACEOF
98418dba 11024#define HAVE_X11XTR6 1
c0d27fcc 11025_ACEOF
98418dba
CW
11026
11027 else
c0d27fcc 11028 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
11029echo "${ECHO_T}before 6" >&6
11030 fi
11031
11032 OLDLIBS="$LIBS"
11033 if test x$HAVE_X11XTR6 = xyes; then
11034 LIBS="-lXt -lSM -lICE $LIBS"
11035 else
11036 LIBS="-lXt $LIBS"
11037 fi
11038
c0d27fcc 11039echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
11040echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
11041if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
11042 echo $ECHO_N "(cached) $ECHO_C" >&6
11043else
11044 ac_check_lib_save_LIBS=$LIBS
11045LIBS="-lXmu $LIBS"
11046cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11047/* confdefs.h. */
11048_ACEOF
11049cat confdefs.h >>conftest.$ac_ext
11050cat >>conftest.$ac_ext <<_ACEOF
11051/* end confdefs.h. */
98418dba
CW
11052
11053/* Override any gcc2 internal prototype to avoid an error. */
11054#ifdef __cplusplus
11055extern "C"
11056#endif
11057/* We use char because int might match the return type of a gcc2
11058 builtin and then its argument prototype would still apply. */
11059char XmuConvertStandardSelection ();
98418dba
CW
11060int
11061main ()
11062{
11063XmuConvertStandardSelection ();
11064 ;
11065 return 0;
11066}
11067_ACEOF
11068rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11069if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11070 (eval $ac_link) 2>conftest.er1
98418dba 11071 ac_status=$?
edfaf76d
LK
11072 grep -v '^ *+' conftest.er1 >conftest.err
11073 rm -f conftest.er1
11074 cat conftest.err >&5
c0d27fcc 11075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11076 (exit $ac_status); } &&
e143ad11
AS
11077 { ac_try='test -z "$ac_c_werror_flag"
11078 || test ! -s conftest.err'
edfaf76d
LK
11079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11080 (eval $ac_try) 2>&5
11081 ac_status=$?
11082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11083 (exit $ac_status); }; } &&
11084 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11086 (eval $ac_try) 2>&5
11087 ac_status=$?
c0d27fcc 11088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11089 (exit $ac_status); }; }; then
11090 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11091else
11092 echo "$as_me: failed program was:" >&5
19650fd6
AS
11093sed 's/^/| /' conftest.$ac_ext >&5
11094
98418dba
CW
11095ac_cv_lib_Xmu_XmuConvertStandardSelection=no
11096fi
edfaf76d
LK
11097rm -f conftest.err conftest.$ac_objext \
11098 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11099LIBS=$ac_check_lib_save_LIBS
11100fi
c0d27fcc 11101echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
11102echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
11103if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 11104 cat >>confdefs.h <<_ACEOF
98418dba 11105#define HAVE_LIBXMU 1
c0d27fcc 11106_ACEOF
98418dba
CW
11107
11108 LIBS="-lXmu $LIBS"
11109
11110fi
11111
11112 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11113fi
11114
11115# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11116if test "${HAVE_X11}" = "yes"; then
11117 if test "${USE_X_TOOLKIT}" != "none"; then
11118
c0d27fcc 11119echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
11120echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
11121if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
11122 echo $ECHO_N "(cached) $ECHO_C" >&6
11123else
11124 ac_check_lib_save_LIBS=$LIBS
11125LIBS="-lXext $LIBS"
11126cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11127/* confdefs.h. */
11128_ACEOF
11129cat confdefs.h >>conftest.$ac_ext
11130cat >>conftest.$ac_ext <<_ACEOF
11131/* end confdefs.h. */
98418dba
CW
11132
11133/* Override any gcc2 internal prototype to avoid an error. */
11134#ifdef __cplusplus
11135extern "C"
11136#endif
11137/* We use char because int might match the return type of a gcc2
11138 builtin and then its argument prototype would still apply. */
11139char XShapeQueryExtension ();
98418dba
CW
11140int
11141main ()
11142{
11143XShapeQueryExtension ();
11144 ;
11145 return 0;
11146}
11147_ACEOF
11148rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11150 (eval $ac_link) 2>conftest.er1
98418dba 11151 ac_status=$?
edfaf76d
LK
11152 grep -v '^ *+' conftest.er1 >conftest.err
11153 rm -f conftest.er1
11154 cat conftest.err >&5
c0d27fcc 11155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11156 (exit $ac_status); } &&
e143ad11
AS
11157 { ac_try='test -z "$ac_c_werror_flag"
11158 || test ! -s conftest.err'
edfaf76d
LK
11159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11160 (eval $ac_try) 2>&5
11161 ac_status=$?
11162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11163 (exit $ac_status); }; } &&
11164 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11166 (eval $ac_try) 2>&5
11167 ac_status=$?
c0d27fcc 11168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11169 (exit $ac_status); }; }; then
11170 ac_cv_lib_Xext_XShapeQueryExtension=yes
11171else
11172 echo "$as_me: failed program was:" >&5
19650fd6
AS
11173sed 's/^/| /' conftest.$ac_ext >&5
11174
98418dba
CW
11175ac_cv_lib_Xext_XShapeQueryExtension=no
11176fi
edfaf76d
LK
11177rm -f conftest.err conftest.$ac_objext \
11178 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11179LIBS=$ac_check_lib_save_LIBS
11180fi
c0d27fcc 11181echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
11182echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
11183if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 11184 cat >>confdefs.h <<_ACEOF
98418dba 11185#define HAVE_LIBXEXT 1
c0d27fcc 11186_ACEOF
98418dba
CW
11187
11188 LIBS="-lXext $LIBS"
11189
11190fi
11191
11192 fi
11193fi
11194
11195if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 11196 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
11197echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
11198if test "${emacs_cv_motif_version_2_1+set}" = set; then
11199 echo $ECHO_N "(cached) $ECHO_C" >&6
11200else
11201 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11202/* confdefs.h. */
11203_ACEOF
11204cat confdefs.h >>conftest.$ac_ext
11205cat >>conftest.$ac_ext <<_ACEOF
11206/* end confdefs.h. */
98418dba 11207#include <Xm/Xm.h>
98418dba
CW
11208int
11209main ()
11210{
11211#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
11212int x = 5;
11213#else
11214Motif version prior to 2.1.
11215#endif
11216 ;
11217 return 0;
11218}
11219_ACEOF
11220rm -f conftest.$ac_objext
c0d27fcc 11221if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11222 (eval $ac_compile) 2>conftest.er1
98418dba 11223 ac_status=$?
edfaf76d
LK
11224 grep -v '^ *+' conftest.er1 >conftest.err
11225 rm -f conftest.er1
11226 cat conftest.err >&5
c0d27fcc 11227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11228 (exit $ac_status); } &&
e143ad11
AS
11229 { ac_try='test -z "$ac_c_werror_flag"
11230 || test ! -s conftest.err'
edfaf76d
LK
11231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11232 (eval $ac_try) 2>&5
11233 ac_status=$?
11234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11235 (exit $ac_status); }; } &&
11236 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 11237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11238 (eval $ac_try) 2>&5
11239 ac_status=$?
c0d27fcc 11240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11241 (exit $ac_status); }; }; then
11242 emacs_cv_motif_version_2_1=yes
11243else
11244 echo "$as_me: failed program was:" >&5
19650fd6
AS
11245sed 's/^/| /' conftest.$ac_ext >&5
11246
98418dba
CW
11247emacs_cv_motif_version_2_1=no
11248fi
edfaf76d 11249rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 11250fi
c0d27fcc 11251echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
11252echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
11253 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
11254 if test $emacs_cv_motif_version_2_1 = yes; then
11255 HAVE_LIBXP=no
b936fae4 11256
c0d27fcc 11257cat >>confdefs.h <<\_ACEOF
98418dba 11258#define HAVE_MOTIF_2_1 1
c0d27fcc 11259_ACEOF
98418dba 11260
c0d27fcc 11261 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
11262echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
11263if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
11264 echo $ECHO_N "(cached) $ECHO_C" >&6
11265else
11266 ac_check_lib_save_LIBS=$LIBS
11267LIBS="-lXp $LIBS"
11268cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11269/* confdefs.h. */
11270_ACEOF
11271cat confdefs.h >>conftest.$ac_ext
11272cat >>conftest.$ac_ext <<_ACEOF
11273/* end confdefs.h. */
98418dba
CW
11274
11275/* Override any gcc2 internal prototype to avoid an error. */
11276#ifdef __cplusplus
11277extern "C"
11278#endif
11279/* We use char because int might match the return type of a gcc2
11280 builtin and then its argument prototype would still apply. */
11281char XpCreateContext ();
98418dba
CW
11282int
11283main ()
11284{
11285XpCreateContext ();
11286 ;
11287 return 0;
11288}
11289_ACEOF
11290rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11291if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11292 (eval $ac_link) 2>conftest.er1
98418dba 11293 ac_status=$?
edfaf76d
LK
11294 grep -v '^ *+' conftest.er1 >conftest.err
11295 rm -f conftest.er1
11296 cat conftest.err >&5
c0d27fcc 11297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11298 (exit $ac_status); } &&
e143ad11
AS
11299 { ac_try='test -z "$ac_c_werror_flag"
11300 || test ! -s conftest.err'
edfaf76d
LK
11301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11302 (eval $ac_try) 2>&5
11303 ac_status=$?
11304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11305 (exit $ac_status); }; } &&
11306 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11308 (eval $ac_try) 2>&5
11309 ac_status=$?
c0d27fcc 11310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11311 (exit $ac_status); }; }; then
11312 ac_cv_lib_Xp_XpCreateContext=yes
11313else
11314 echo "$as_me: failed program was:" >&5
19650fd6
AS
11315sed 's/^/| /' conftest.$ac_ext >&5
11316
98418dba
CW
11317ac_cv_lib_Xp_XpCreateContext=no
11318fi
edfaf76d
LK
11319rm -f conftest.err conftest.$ac_objext \
11320 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11321LIBS=$ac_check_lib_save_LIBS
11322fi
c0d27fcc 11323echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
11324echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
11325if test $ac_cv_lib_Xp_XpCreateContext = yes; then
11326 HAVE_LIBXP=yes
11327fi
503d2be0 11328
98418dba 11329 if test ${HAVE_LIBXP} = yes; then
b936fae4 11330
c0d27fcc 11331cat >>confdefs.h <<\_ACEOF
98418dba 11332#define HAVE_LIBXP 1
c0d27fcc 11333_ACEOF
503d2be0 11334
98418dba 11335 fi
4693dbc9
SM
11336 else
11337 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
11338echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
11339if test "${emacs_cv_lesstif+set}" = set; then
11340 echo $ECHO_N "(cached) $ECHO_C" >&6
11341else
11342 # We put this in CFLAGS temporarily to precede other -I options
11343 # that might be in CFLAGS temporarily.
11344 # We put this in CPPFLAGS where it precedes the other -I options.
11345 OLD_CPPFLAGS=$CPPFLAGS
11346 OLD_CFLAGS=$CFLAGS
11347 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
11348 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
11349 cat >conftest.$ac_ext <<_ACEOF
11350/* confdefs.h. */
11351_ACEOF
11352cat confdefs.h >>conftest.$ac_ext
11353cat >>conftest.$ac_ext <<_ACEOF
11354/* end confdefs.h. */
11355#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
11356int
11357main ()
11358{
11359int x = 5;
11360 ;
11361 return 0;
11362}
11363_ACEOF
11364rm -f conftest.$ac_objext
11365if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11366 (eval $ac_compile) 2>conftest.er1
4693dbc9 11367 ac_status=$?
edfaf76d
LK
11368 grep -v '^ *+' conftest.er1 >conftest.err
11369 rm -f conftest.er1
11370 cat conftest.err >&5
4693dbc9
SM
11371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11372 (exit $ac_status); } &&
e143ad11
AS
11373 { ac_try='test -z "$ac_c_werror_flag"
11374 || test ! -s conftest.err'
edfaf76d
LK
11375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11376 (eval $ac_try) 2>&5
11377 ac_status=$?
11378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11379 (exit $ac_status); }; } &&
11380 { ac_try='test -s conftest.$ac_objext'
4693dbc9
SM
11381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11382 (eval $ac_try) 2>&5
11383 ac_status=$?
11384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11385 (exit $ac_status); }; }; then
11386 emacs_cv_lesstif=yes
11387else
11388 echo "$as_me: failed program was:" >&5
11389sed 's/^/| /' conftest.$ac_ext >&5
11390
11391emacs_cv_lesstif=no
11392fi
edfaf76d 11393rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9
SM
11394fi
11395echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
11396echo "${ECHO_T}$emacs_cv_lesstif" >&6
11397 if test $emacs_cv_lesstif = yes; then
11398 # Make sure this -I option remains in CPPFLAGS after it is set
11399 # back to REAL_CPPFLAGS.
11400 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
11401 # have those other -I options anyway. Ultimately, having this
11402 # directory ultimately in CPPFLAGS will be enough.
11403 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
11404 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
11405 else
11406 CFLAGS=$OLD_CFLAGS
11407 CPPFLAGS=$OLD_CPPFLAGS
11408 fi
98418dba
CW
11409 fi
11410fi
11411
11412### Is -lXaw3d available?
11413HAVE_XAW3D=no
11414if test "${HAVE_X11}" = "yes"; then
11415 if test "${USE_X_TOOLKIT}" != "none"; then
22044edf 11416 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
11417echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
11418if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
11419 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11420else
22044edf 11421 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11422/* confdefs.h. */
11423_ACEOF
11424cat confdefs.h >>conftest.$ac_ext
11425cat >>conftest.$ac_ext <<_ACEOF
11426/* end confdefs.h. */
98418dba 11427#include <X11/Xaw3d/Scrollbar.h>
503d2be0 11428_ACEOF
c0d27fcc 11429if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11430 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11431 ac_status=$?
6bae0ccf 11432 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11433 rm -f conftest.er1
11434 cat conftest.err >&5
c0d27fcc 11435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11436 (exit $ac_status); } >/dev/null; then
11437 if test -s conftest.err; then
11438 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 11439 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
11440 else
11441 ac_cpp_err=
11442 fi
11443else
11444 ac_cpp_err=yes
11445fi
11446if test -z "$ac_cpp_err"; then
22044edf 11447 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 11448else
503d2be0 11449 echo "$as_me: failed program was:" >&5
19650fd6
AS
11450sed 's/^/| /' conftest.$ac_ext >&5
11451
22044edf 11452 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 11453fi
503d2be0 11454rm -f conftest.err conftest.$ac_ext
98418dba 11455fi
c0d27fcc 11456echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 11457echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 11458if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 11459 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
11460echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
11461if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
11462 echo $ECHO_N "(cached) $ECHO_C" >&6
11463else
11464 ac_check_lib_save_LIBS=$LIBS
11465LIBS="-lXaw3d $LIBS"
11466cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11467/* confdefs.h. */
11468_ACEOF
11469cat confdefs.h >>conftest.$ac_ext
11470cat >>conftest.$ac_ext <<_ACEOF
11471/* end confdefs.h. */
98418dba
CW
11472
11473/* Override any gcc2 internal prototype to avoid an error. */
11474#ifdef __cplusplus
11475extern "C"
11476#endif
11477/* We use char because int might match the return type of a gcc2
11478 builtin and then its argument prototype would still apply. */
11479char XawScrollbarSetThumb ();
503d2be0
AS
11480int
11481main ()
11482{
98418dba 11483XawScrollbarSetThumb ();
503d2be0
AS
11484 ;
11485 return 0;
11486}
11487_ACEOF
11488rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11489if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11490 (eval $ac_link) 2>conftest.er1
503d2be0 11491 ac_status=$?
edfaf76d
LK
11492 grep -v '^ *+' conftest.er1 >conftest.err
11493 rm -f conftest.er1
11494 cat conftest.err >&5
c0d27fcc 11495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11496 (exit $ac_status); } &&
e143ad11
AS
11497 { ac_try='test -z "$ac_c_werror_flag"
11498 || test ! -s conftest.err'
edfaf76d
LK
11499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11500 (eval $ac_try) 2>&5
11501 ac_status=$?
11502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11503 (exit $ac_status); }; } &&
11504 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11506 (eval $ac_try) 2>&5
11507 ac_status=$?
c0d27fcc 11508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11509 (exit $ac_status); }; }; then
98418dba 11510 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 11511else
503d2be0 11512 echo "$as_me: failed program was:" >&5
19650fd6
AS
11513sed 's/^/| /' conftest.$ac_ext >&5
11514
98418dba 11515ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 11516fi
edfaf76d
LK
11517rm -f conftest.err conftest.$ac_objext \
11518 conftest$ac_exeext conftest.$ac_ext
98418dba 11519LIBS=$ac_check_lib_save_LIBS
ba4481b5 11520fi
c0d27fcc 11521echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
11522echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
11523if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
11524 HAVE_XAW3D=yes
ba4481b5 11525fi
503d2be0 11526
ba4481b5
DL
11527fi
11528
c0d27fcc 11529
98418dba 11530 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 11531
c0d27fcc 11532cat >>confdefs.h <<\_ACEOF
98418dba 11533#define HAVE_XAW3D 1
c0d27fcc 11534_ACEOF
98418dba 11535
ba4481b5 11536 fi
98418dba 11537 fi
ba4481b5
DL
11538fi
11539
c0d27fcc
MR
11540
11541
98418dba
CW
11542USE_TOOLKIT_SCROLL_BARS=no
11543if test "${with_toolkit_scroll_bars}" != "no"; then
11544 if test "${USE_X_TOOLKIT}" != "none"; then
11545 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 11546 cat >>confdefs.h <<\_ACEOF
98418dba 11547#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11548_ACEOF
98418dba
CW
11549
11550 HAVE_XAW3D=no
11551 USE_TOOLKIT_SCROLL_BARS=yes
11552 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 11553 cat >>confdefs.h <<\_ACEOF
98418dba 11554#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11555_ACEOF
98418dba
CW
11556
11557 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 11558 fi
488dd4c4
JD
11559 elif test "${HAVE_GTK}" = "yes"; then
11560 cat >>confdefs.h <<\_ACEOF
11561#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
11562_ACEOF
11563
11564 USE_TOOLKIT_SCROLL_BARS=yes
11565 elif test "${HAVE_CARBON}" = "yes"; then
11566 cat >>confdefs.h <<\_ACEOF
11567#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
11568_ACEOF
11569
11570 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
11571 fi
11572fi
11573
abd39b57 11574cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
11575/* confdefs.h. */
11576_ACEOF
11577cat confdefs.h >>conftest.$ac_ext
11578cat >>conftest.$ac_ext <<_ACEOF
11579/* end confdefs.h. */
11580
11581 #include <X11/Xlib.h>
11582 #include <X11/Xresource.h>
11583int
11584main ()
11585{
11586XIMProc callback;
11587 ;
11588 return 0;
11589}
11590_ACEOF
11591rm -f conftest.$ac_objext
11592if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11593 (eval $ac_compile) 2>conftest.er1
abd39b57 11594 ac_status=$?
edfaf76d
LK
11595 grep -v '^ *+' conftest.er1 >conftest.err
11596 rm -f conftest.er1
11597 cat conftest.err >&5
abd39b57
AC
11598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11599 (exit $ac_status); } &&
e143ad11
AS
11600 { ac_try='test -z "$ac_c_werror_flag"
11601 || test ! -s conftest.err'
edfaf76d
LK
11602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11603 (eval $ac_try) 2>&5
11604 ac_status=$?
11605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11606 (exit $ac_status); }; } &&
11607 { ac_try='test -s conftest.$ac_objext'
abd39b57
AC
11608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11609 (eval $ac_try) 2>&5
11610 ac_status=$?
11611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11612 (exit $ac_status); }; }; then
11613 HAVE_XIM=yes
11614
11615cat >>confdefs.h <<\_ACEOF
11616#define HAVE_XIM 1
11617_ACEOF
11618
11619else
11620 echo "$as_me: failed program was:" >&5
11621sed 's/^/| /' conftest.$ac_ext >&5
11622
11623HAVE_XIM=no
11624fi
edfaf76d 11625rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 11626
c0d27fcc 11627
98418dba 11628if test "${with_xim}" != "no"; then
b936fae4 11629
c0d27fcc 11630cat >>confdefs.h <<\_ACEOF
98418dba 11631#define USE_XIM 1
c0d27fcc 11632_ACEOF
98418dba 11633
793fa0d7 11634fi
abd39b57
AC
11635
11636
11637if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
11638 late_CFLAGS=$CFLAGS
11639 if test "$GCC" = yes; then
11640 CFLAGS="$CFLAGS --pedantic-errors"
11641 fi
cffcede7 11642 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11643/* confdefs.h. */
11644_ACEOF
11645cat confdefs.h >>conftest.$ac_ext
11646cat >>conftest.$ac_ext <<_ACEOF
11647/* end confdefs.h. */
cffcede7
JD
11648
11649#include <X11/Xlib.h>
11650#include <X11/Xresource.h>
11651int
11652main ()
11653{
11654Display *display;
11655XrmDatabase db;
11656char *res_name;
11657char *res_class;
11658XIMProc callback;
11659XPointer *client_data;
849d80cf
DL
11660#ifndef __GNUC__
11661/* If we're not using GCC, it's probably not XFree86, and this is
11662 probably right, but we can't use something like --pedantic-errors. */
11663extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11664 char*, XIMProc, XPointer*);
11665#endif
cffcede7
JD
11666(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11667 client_data);
11668 ;
11669 return 0;
11670}
11671_ACEOF
11672rm -f conftest.$ac_objext
11673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11674 (eval $ac_compile) 2>conftest.er1
cffcede7 11675 ac_status=$?
edfaf76d
LK
11676 grep -v '^ *+' conftest.er1 >conftest.err
11677 rm -f conftest.er1
11678 cat conftest.err >&5
cffcede7
JD
11679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11680 (exit $ac_status); } &&
e143ad11
AS
11681 { ac_try='test -z "$ac_c_werror_flag"
11682 || test ! -s conftest.err'
edfaf76d
LK
11683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11684 (eval $ac_try) 2>&5
11685 ac_status=$?
11686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11687 (exit $ac_status); }; } &&
11688 { ac_try='test -s conftest.$ac_objext'
cffcede7
JD
11689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11690 (eval $ac_try) 2>&5
11691 ac_status=$?
11692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11693 (exit $ac_status); }; }; then
11694 emacs_cv_arg6_star=yes
11695else
11696 echo "$as_me: failed program was:" >&5
19650fd6
AS
11697sed 's/^/| /' conftest.$ac_ext >&5
11698
cffcede7 11699fi
edfaf76d 11700rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
11701
11702 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 11703 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11704#define XRegisterIMInstantiateCallback_arg6 XPointer*
11705_ACEOF
11706
11707 else
f57bd967 11708 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11709#define XRegisterIMInstantiateCallback_arg6 XPointer
11710_ACEOF
11711
11712 fi
849d80cf 11713 CFLAGS=$late_CFLAGS
98418dba
CW
11714fi
11715
11716### Use -lXpm if available, unless `--with-xpm=no'.
11717HAVE_XPM=no
11718if test "${HAVE_X11}" = "yes"; then
11719 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
11720 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11721 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
11722echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11723if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11724 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11725fi
11726echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
11727echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 11728else
c0d27fcc
MR
11729 # Is the header compilable?
11730echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
11731echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
11732cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11733/* confdefs.h. */
11734_ACEOF
11735cat confdefs.h >>conftest.$ac_ext
11736cat >>conftest.$ac_ext <<_ACEOF
11737/* end confdefs.h. */
c0d27fcc
MR
11738$ac_includes_default
11739#include <X11/xpm.h>
11740_ACEOF
11741rm -f conftest.$ac_objext
11742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11743 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11744 ac_status=$?
edfaf76d
LK
11745 grep -v '^ *+' conftest.er1 >conftest.err
11746 rm -f conftest.er1
11747 cat conftest.err >&5
c0d27fcc
MR
11748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11749 (exit $ac_status); } &&
e143ad11
AS
11750 { ac_try='test -z "$ac_c_werror_flag"
11751 || test ! -s conftest.err'
edfaf76d
LK
11752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11753 (eval $ac_try) 2>&5
11754 ac_status=$?
11755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11756 (exit $ac_status); }; } &&
11757 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11759 (eval $ac_try) 2>&5
11760 ac_status=$?
11761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11762 (exit $ac_status); }; }; then
11763 ac_header_compiler=yes
11764else
11765 echo "$as_me: failed program was:" >&5
19650fd6
AS
11766sed 's/^/| /' conftest.$ac_ext >&5
11767
c0d27fcc
MR
11768ac_header_compiler=no
11769fi
edfaf76d 11770rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11771echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11772echo "${ECHO_T}$ac_header_compiler" >&6
11773
11774# Is the header present?
11775echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
11776echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
11777cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11778/* confdefs.h. */
11779_ACEOF
11780cat confdefs.h >>conftest.$ac_ext
11781cat >>conftest.$ac_ext <<_ACEOF
11782/* end confdefs.h. */
98418dba
CW
11783#include <X11/xpm.h>
11784_ACEOF
c0d27fcc 11785if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11786 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11787 ac_status=$?
6bae0ccf 11788 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11789 rm -f conftest.er1
11790 cat conftest.err >&5
c0d27fcc 11791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11792 (exit $ac_status); } >/dev/null; then
11793 if test -s conftest.err; then
11794 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 11795 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11796 else
11797 ac_cpp_err=
11798 fi
11799else
11800 ac_cpp_err=yes
11801fi
11802if test -z "$ac_cpp_err"; then
c0d27fcc 11803 ac_header_preproc=yes
98418dba
CW
11804else
11805 echo "$as_me: failed program was:" >&5
19650fd6
AS
11806sed 's/^/| /' conftest.$ac_ext >&5
11807
c0d27fcc 11808 ac_header_preproc=no
98418dba
CW
11809fi
11810rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11811echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11812echo "${ECHO_T}$ac_header_preproc" >&6
11813
11814# So? What about this header?
edfaf76d
LK
11815case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11816 yes:no: )
c0d27fcc
MR
11817 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
11818echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11819 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
11820echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
11821 ac_header_preproc=yes
11822 ;;
11823 no:yes:* )
11824 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
11825echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
11826 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
11827echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
11828 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
11829echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
11830 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
11831echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
11832 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
11833echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11834 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
11835echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
7c9e5167
JD
11836 (
11837 cat <<\_ASBOX
edfaf76d
LK
11838## ------------------------------------------ ##
11839## Report this to the AC_PACKAGE_NAME lists. ##
11840## ------------------------------------------ ##
19650fd6
AS
11841_ASBOX
11842 ) |
11843 sed "s/^/$as_me: WARNING: /" >&2
11844 ;;
c0d27fcc
MR
11845esac
11846echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
11847echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11848if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11849 echo $ECHO_N "(cached) $ECHO_C" >&6
11850else
11851 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 11852fi
c0d27fcc 11853echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 11854echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
11855
11856fi
98418dba 11857if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 11858 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
11859echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
11860if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 11861 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11862else
98418dba
CW
11863 ac_check_lib_save_LIBS=$LIBS
11864LIBS="-lXpm -lX11 $LIBS"
11865cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11866/* confdefs.h. */
11867_ACEOF
11868cat confdefs.h >>conftest.$ac_ext
11869cat >>conftest.$ac_ext <<_ACEOF
11870/* end confdefs.h. */
98418dba 11871
ba4481b5 11872/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11873#ifdef __cplusplus
11874extern "C"
11875#endif
ba4481b5 11876/* We use char because int might match the return type of a gcc2
503d2be0 11877 builtin and then its argument prototype would still apply. */
98418dba 11878char XpmReadFileToPixmap ();
503d2be0
AS
11879int
11880main ()
11881{
98418dba 11882XpmReadFileToPixmap ();
503d2be0
AS
11883 ;
11884 return 0;
11885}
11886_ACEOF
11887rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11888if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11889 (eval $ac_link) 2>conftest.er1
503d2be0 11890 ac_status=$?
edfaf76d
LK
11891 grep -v '^ *+' conftest.er1 >conftest.err
11892 rm -f conftest.er1
11893 cat conftest.err >&5
c0d27fcc 11894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11895 (exit $ac_status); } &&
e143ad11
AS
11896 { ac_try='test -z "$ac_c_werror_flag"
11897 || test ! -s conftest.err'
edfaf76d
LK
11898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11899 (eval $ac_try) 2>&5
11900 ac_status=$?
11901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11902 (exit $ac_status); }; } &&
11903 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11905 (eval $ac_try) 2>&5
11906 ac_status=$?
c0d27fcc 11907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11908 (exit $ac_status); }; }; then
98418dba 11909 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
11910else
11911 echo "$as_me: failed program was:" >&5
19650fd6
AS
11912sed 's/^/| /' conftest.$ac_ext >&5
11913
98418dba 11914ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 11915fi
edfaf76d
LK
11916rm -f conftest.err conftest.$ac_objext \
11917 conftest$ac_exeext conftest.$ac_ext
98418dba 11918LIBS=$ac_check_lib_save_LIBS
503d2be0 11919fi
c0d27fcc 11920echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
11921echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
11922if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
11923 HAVE_XPM=yes
ba4481b5
DL
11924fi
11925
98418dba
CW
11926fi
11927
c0d27fcc 11928
98418dba 11929 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11930 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
11931echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
11932 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11933/* confdefs.h. */
11934_ACEOF
11935cat confdefs.h >>conftest.$ac_ext
11936cat >>conftest.$ac_ext <<_ACEOF
11937/* end confdefs.h. */
98418dba
CW
11938#include "X11/xpm.h"
11939#ifndef XpmReturnAllocPixels
11940no_return_alloc_pixels
503d2be0 11941#endif
ba4481b5 11942
98418dba
CW
11943_ACEOF
11944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11945 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
11946 HAVE_XPM=no
11947else
11948 HAVE_XPM=yes
11949fi
11950rm -f conftest*
ba4481b5 11951
c0d27fcc 11952
98418dba 11953 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11954 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
11955echo "${ECHO_T}yes" >&6
11956 else
c0d27fcc 11957 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
11958echo "${ECHO_T}no" >&6
11959 fi
11960 fi
11961 fi
11962
11963 if test "${HAVE_XPM}" = "yes"; then
b936fae4 11964
c0d27fcc 11965cat >>confdefs.h <<\_ACEOF
98418dba 11966#define HAVE_XPM 1
c0d27fcc 11967_ACEOF
98418dba
CW
11968
11969 fi
11970fi
11971
11972### Use -ljpeg if available, unless `--with-jpeg=no'.
11973HAVE_JPEG=no
11974if test "${HAVE_X11}" = "yes"; then
11975 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
11976 if test "${ac_cv_header_jerror_h+set}" = set; then
11977 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
11978echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11979if test "${ac_cv_header_jerror_h+set}" = set; then
11980 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11981fi
11982echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
11983echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 11984else
c0d27fcc
MR
11985 # Is the header compilable?
11986echo "$as_me:$LINENO: checking jerror.h usability" >&5
11987echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
11988cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11989/* confdefs.h. */
11990_ACEOF
11991cat confdefs.h >>conftest.$ac_ext
11992cat >>conftest.$ac_ext <<_ACEOF
11993/* end confdefs.h. */
c0d27fcc
MR
11994$ac_includes_default
11995#include <jerror.h>
11996_ACEOF
11997rm -f conftest.$ac_objext
11998if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11999 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12000 ac_status=$?
edfaf76d
LK
12001 grep -v '^ *+' conftest.er1 >conftest.err
12002 rm -f conftest.er1
12003 cat conftest.err >&5
c0d27fcc
MR
12004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12005 (exit $ac_status); } &&
e143ad11
AS
12006 { ac_try='test -z "$ac_c_werror_flag"
12007 || test ! -s conftest.err'
edfaf76d
LK
12008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12009 (eval $ac_try) 2>&5
12010 ac_status=$?
12011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12012 (exit $ac_status); }; } &&
12013 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12015 (eval $ac_try) 2>&5
12016 ac_status=$?
12017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12018 (exit $ac_status); }; }; then
12019 ac_header_compiler=yes
12020else
12021 echo "$as_me: failed program was:" >&5
19650fd6
AS
12022sed 's/^/| /' conftest.$ac_ext >&5
12023
c0d27fcc
MR
12024ac_header_compiler=no
12025fi
edfaf76d 12026rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12027echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12028echo "${ECHO_T}$ac_header_compiler" >&6
12029
12030# Is the header present?
12031echo "$as_me:$LINENO: checking jerror.h presence" >&5
12032echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
12033cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12034/* confdefs.h. */
12035_ACEOF
12036cat confdefs.h >>conftest.$ac_ext
12037cat >>conftest.$ac_ext <<_ACEOF
12038/* end confdefs.h. */
98418dba
CW
12039#include <jerror.h>
12040_ACEOF
c0d27fcc 12041if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12042 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12043 ac_status=$?
6bae0ccf 12044 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12045 rm -f conftest.er1
12046 cat conftest.err >&5
c0d27fcc 12047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12048 (exit $ac_status); } >/dev/null; then
12049 if test -s conftest.err; then
12050 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12051 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12052 else
12053 ac_cpp_err=
12054 fi
12055else
12056 ac_cpp_err=yes
503d2be0 12057fi
98418dba 12058if test -z "$ac_cpp_err"; then
c0d27fcc 12059 ac_header_preproc=yes
ba4481b5 12060else
98418dba 12061 echo "$as_me: failed program was:" >&5
19650fd6
AS
12062sed 's/^/| /' conftest.$ac_ext >&5
12063
c0d27fcc 12064 ac_header_preproc=no
98418dba
CW
12065fi
12066rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12067echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12068echo "${ECHO_T}$ac_header_preproc" >&6
12069
12070# So? What about this header?
edfaf76d
LK
12071case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12072 yes:no: )
c0d27fcc
MR
12073 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
12074echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12075 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
12076echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
12077 ac_header_preproc=yes
19650fd6 12078 ;;
edfaf76d 12079 no:yes:* )
c0d27fcc
MR
12080 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
12081echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12082 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
12083echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
12084 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
12085echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
12086 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
12087echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12088 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 12089echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12090 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
12091echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12092 (
12093 cat <<\_ASBOX
edfaf76d
LK
12094## ------------------------------------------ ##
12095## Report this to the AC_PACKAGE_NAME lists. ##
12096## ------------------------------------------ ##
19650fd6
AS
12097_ASBOX
12098 ) |
12099 sed "s/^/$as_me: WARNING: /" >&2
12100 ;;
c0d27fcc
MR
12101esac
12102echo "$as_me:$LINENO: checking for jerror.h" >&5
12103echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
12104if test "${ac_cv_header_jerror_h+set}" = set; then
12105 echo $ECHO_N "(cached) $ECHO_C" >&6
12106else
12107 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 12108fi
c0d27fcc 12109echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 12110echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
12111
12112fi
98418dba 12113if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 12114 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
12115echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
12116if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 12117 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12118else
98418dba
CW
12119 ac_check_lib_save_LIBS=$LIBS
12120LIBS="-ljpeg $LIBS"
12121cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12122/* confdefs.h. */
12123_ACEOF
12124cat confdefs.h >>conftest.$ac_ext
12125cat >>conftest.$ac_ext <<_ACEOF
12126/* end confdefs.h. */
98418dba
CW
12127
12128/* Override any gcc2 internal prototype to avoid an error. */
12129#ifdef __cplusplus
12130extern "C"
12131#endif
12132/* We use char because int might match the return type of a gcc2
12133 builtin and then its argument prototype would still apply. */
12134char jpeg_destroy_compress ();
503d2be0
AS
12135int
12136main ()
12137{
98418dba 12138jpeg_destroy_compress ();
503d2be0
AS
12139 ;
12140 return 0;
12141}
12142_ACEOF
12143rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12144if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12145 (eval $ac_link) 2>conftest.er1
503d2be0 12146 ac_status=$?
edfaf76d
LK
12147 grep -v '^ *+' conftest.er1 >conftest.err
12148 rm -f conftest.er1
12149 cat conftest.err >&5
c0d27fcc 12150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12151 (exit $ac_status); } &&
e143ad11
AS
12152 { ac_try='test -z "$ac_c_werror_flag"
12153 || test ! -s conftest.err'
edfaf76d
LK
12154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12155 (eval $ac_try) 2>&5
12156 ac_status=$?
12157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12158 (exit $ac_status); }; } &&
12159 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12161 (eval $ac_try) 2>&5
12162 ac_status=$?
c0d27fcc 12163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12164 (exit $ac_status); }; }; then
98418dba 12165 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 12166else
503d2be0 12167 echo "$as_me: failed program was:" >&5
19650fd6
AS
12168sed 's/^/| /' conftest.$ac_ext >&5
12169
98418dba 12170ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 12171fi
edfaf76d
LK
12172rm -f conftest.err conftest.$ac_objext \
12173 conftest$ac_exeext conftest.$ac_ext
98418dba 12174LIBS=$ac_check_lib_save_LIBS
ba4481b5 12175fi
c0d27fcc 12176echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
12177echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
12178if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
12179 HAVE_JPEG=yes
ba4481b5 12180fi
98418dba 12181
ba4481b5 12182fi
98418dba 12183
c0d27fcc 12184
ba4481b5 12185 fi
ba4481b5 12186
c0d27fcc 12187
98418dba 12188 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 12189 cat >>confdefs.h <<\_ACEOF
98418dba 12190#define HAVE_JPEG 1
c0d27fcc 12191_ACEOF
98418dba
CW
12192
12193 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12194/* confdefs.h. */
12195_ACEOF
12196cat confdefs.h >>conftest.$ac_ext
12197cat >>conftest.$ac_ext <<_ACEOF
12198/* end confdefs.h. */
22044edf 12199#include <jpeglib.h>
98418dba
CW
12200 version=JPEG_LIB_VERSION
12201
12202_ACEOF
12203if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 12204 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 12205 cat >>confdefs.h <<\_ACEOF
98418dba 12206#define HAVE_JPEG 1
c0d27fcc 12207_ACEOF
ba4481b5 12208
98418dba 12209else
c0d27fcc 12210 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
12211echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12212 HAVE_JPEG=no
ba4481b5 12213fi
98418dba 12214rm -f conftest*
ba4481b5 12215
98418dba
CW
12216 fi
12217fi
503d2be0 12218
98418dba
CW
12219### Use -lpng if available, unless `--with-png=no'.
12220HAVE_PNG=no
12221if test "${HAVE_X11}" = "yes"; then
12222 if test "${with_png}" != "no"; then
f57bd967
DL
12223 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12224 # in /usr/include/libpng.
12225
12226
12227for ac_header in png.h libpng/png.h
12228do
12229as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12230if eval "test \"\${$as_ac_Header+set}\" = set"; then
12231 echo "$as_me:$LINENO: checking for $ac_header" >&5
12232echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12233if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 12234 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 12235fi
f57bd967
DL
12236echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12237echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
503d2be0 12238else
c0d27fcc 12239 # Is the header compilable?
f57bd967
DL
12240echo "$as_me:$LINENO: checking $ac_header usability" >&5
12241echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
c0d27fcc 12242cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12243/* confdefs.h. */
12244_ACEOF
12245cat confdefs.h >>conftest.$ac_ext
12246cat >>conftest.$ac_ext <<_ACEOF
12247/* end confdefs.h. */
c0d27fcc 12248$ac_includes_default
f57bd967 12249#include <$ac_header>
c0d27fcc
MR
12250_ACEOF
12251rm -f conftest.$ac_objext
12252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12253 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12254 ac_status=$?
edfaf76d
LK
12255 grep -v '^ *+' conftest.er1 >conftest.err
12256 rm -f conftest.er1
12257 cat conftest.err >&5
c0d27fcc
MR
12258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12259 (exit $ac_status); } &&
e143ad11
AS
12260 { ac_try='test -z "$ac_c_werror_flag"
12261 || test ! -s conftest.err'
edfaf76d
LK
12262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12263 (eval $ac_try) 2>&5
12264 ac_status=$?
12265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12266 (exit $ac_status); }; } &&
12267 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12269 (eval $ac_try) 2>&5
12270 ac_status=$?
12271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12272 (exit $ac_status); }; }; then
12273 ac_header_compiler=yes
12274else
12275 echo "$as_me: failed program was:" >&5
19650fd6
AS
12276sed 's/^/| /' conftest.$ac_ext >&5
12277
c0d27fcc
MR
12278ac_header_compiler=no
12279fi
edfaf76d 12280rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12281echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12282echo "${ECHO_T}$ac_header_compiler" >&6
12283
12284# Is the header present?
f57bd967
DL
12285echo "$as_me:$LINENO: checking $ac_header presence" >&5
12286echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
c0d27fcc 12287cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12288/* confdefs.h. */
12289_ACEOF
12290cat confdefs.h >>conftest.$ac_ext
12291cat >>conftest.$ac_ext <<_ACEOF
12292/* end confdefs.h. */
f57bd967 12293#include <$ac_header>
503d2be0 12294_ACEOF
c0d27fcc 12295if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
12296 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12297 ac_status=$?
6bae0ccf 12298 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
12299 rm -f conftest.er1
12300 cat conftest.err >&5
c0d27fcc 12301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12302 (exit $ac_status); } >/dev/null; then
12303 if test -s conftest.err; then
12304 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12305 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
12306 else
12307 ac_cpp_err=
12308 fi
12309else
12310 ac_cpp_err=yes
12311fi
12312if test -z "$ac_cpp_err"; then
c0d27fcc 12313 ac_header_preproc=yes
503d2be0
AS
12314else
12315 echo "$as_me: failed program was:" >&5
19650fd6
AS
12316sed 's/^/| /' conftest.$ac_ext >&5
12317
c0d27fcc 12318 ac_header_preproc=no
ba4481b5 12319fi
503d2be0 12320rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12321echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12322echo "${ECHO_T}$ac_header_preproc" >&6
12323
12324# So? What about this header?
edfaf76d
LK
12325case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12326 yes:no: )
f57bd967
DL
12327 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12328echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12329 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12330echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12331 ac_header_preproc=yes
19650fd6 12332 ;;
edfaf76d 12333 no:yes:* )
f57bd967
DL
12334 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12335echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
12336 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12337echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12338 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12339echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12340 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12341echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 12342 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 12343echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12344 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12345echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12346 (
12347 cat <<\_ASBOX
edfaf76d
LK
12348## ------------------------------------------ ##
12349## Report this to the AC_PACKAGE_NAME lists. ##
12350## ------------------------------------------ ##
19650fd6
AS
12351_ASBOX
12352 ) |
12353 sed "s/^/$as_me: WARNING: /" >&2
12354 ;;
c0d27fcc 12355esac
f57bd967
DL
12356echo "$as_me:$LINENO: checking for $ac_header" >&5
12357echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12358if eval "test \"\${$as_ac_Header+set}\" = set"; then
c0d27fcc
MR
12359 echo $ECHO_N "(cached) $ECHO_C" >&6
12360else
edfaf76d 12361 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967
DL
12362fi
12363echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12364echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12365
ba4481b5 12366fi
f57bd967
DL
12367if test `eval echo '${'$as_ac_Header'}'` = yes; then
12368 cat >>confdefs.h <<_ACEOF
12369#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12370_ACEOF
c0d27fcc
MR
12371
12372fi
f57bd967
DL
12373
12374done
12375
12376 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12377 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
12378echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
12379if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 12380 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12381else
98418dba
CW
12382 ac_check_lib_save_LIBS=$LIBS
12383LIBS="-lpng -lz -lm $LIBS"
12384cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12385/* confdefs.h. */
12386_ACEOF
12387cat confdefs.h >>conftest.$ac_ext
12388cat >>conftest.$ac_ext <<_ACEOF
12389/* end confdefs.h. */
98418dba 12390
ba4481b5 12391/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12392#ifdef __cplusplus
12393extern "C"
12394#endif
ba4481b5 12395/* We use char because int might match the return type of a gcc2
503d2be0 12396 builtin and then its argument prototype would still apply. */
98418dba 12397char png_get_channels ();
503d2be0
AS
12398int
12399main ()
12400{
98418dba 12401png_get_channels ();
503d2be0
AS
12402 ;
12403 return 0;
12404}
12405_ACEOF
12406rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12407if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12408 (eval $ac_link) 2>conftest.er1
503d2be0 12409 ac_status=$?
edfaf76d
LK
12410 grep -v '^ *+' conftest.er1 >conftest.err
12411 rm -f conftest.er1
12412 cat conftest.err >&5
c0d27fcc 12413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12414 (exit $ac_status); } &&
e143ad11
AS
12415 { ac_try='test -z "$ac_c_werror_flag"
12416 || test ! -s conftest.err'
edfaf76d
LK
12417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12418 (eval $ac_try) 2>&5
12419 ac_status=$?
12420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12421 (exit $ac_status); }; } &&
12422 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12424 (eval $ac_try) 2>&5
12425 ac_status=$?
c0d27fcc 12426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12427 (exit $ac_status); }; }; then
98418dba 12428 ac_cv_lib_png_png_get_channels=yes
73b77ee5 12429else
98418dba 12430 echo "$as_me: failed program was:" >&5
19650fd6
AS
12431sed 's/^/| /' conftest.$ac_ext >&5
12432
98418dba 12433ac_cv_lib_png_png_get_channels=no
73b77ee5 12434fi
edfaf76d
LK
12435rm -f conftest.err conftest.$ac_objext \
12436 conftest$ac_exeext conftest.$ac_ext
98418dba 12437LIBS=$ac_check_lib_save_LIBS
73b77ee5 12438fi
c0d27fcc 12439echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
12440echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
12441if test $ac_cv_lib_png_png_get_channels = yes; then
12442 HAVE_PNG=yes
73b77ee5 12443fi
503d2be0 12444
f57bd967 12445 fi
98418dba
CW
12446 fi
12447
12448 if test "${HAVE_PNG}" = "yes"; then
b936fae4 12449
c0d27fcc 12450cat >>confdefs.h <<\_ACEOF
98418dba 12451#define HAVE_PNG 1
c0d27fcc 12452_ACEOF
73b77ee5 12453
98418dba 12454 fi
73b77ee5
GM
12455fi
12456
98418dba
CW
12457### Use -ltiff if available, unless `--with-tiff=no'.
12458HAVE_TIFF=no
12459if test "${HAVE_X11}" = "yes"; then
12460 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
12461 if test "${ac_cv_header_tiffio_h+set}" = set; then
12462 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
12463echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12464if test "${ac_cv_header_tiffio_h+set}" = set; then
12465 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12466fi
12467echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
12468echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 12469else
c0d27fcc
MR
12470 # Is the header compilable?
12471echo "$as_me:$LINENO: checking tiffio.h usability" >&5
12472echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
12473cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12474/* confdefs.h. */
12475_ACEOF
12476cat confdefs.h >>conftest.$ac_ext
12477cat >>conftest.$ac_ext <<_ACEOF
12478/* end confdefs.h. */
c0d27fcc
MR
12479$ac_includes_default
12480#include <tiffio.h>
12481_ACEOF
12482rm -f conftest.$ac_objext
12483if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12484 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12485 ac_status=$?
edfaf76d
LK
12486 grep -v '^ *+' conftest.er1 >conftest.err
12487 rm -f conftest.er1
12488 cat conftest.err >&5
c0d27fcc
MR
12489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12490 (exit $ac_status); } &&
e143ad11
AS
12491 { ac_try='test -z "$ac_c_werror_flag"
12492 || test ! -s conftest.err'
edfaf76d
LK
12493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12494 (eval $ac_try) 2>&5
12495 ac_status=$?
12496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12497 (exit $ac_status); }; } &&
12498 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12500 (eval $ac_try) 2>&5
12501 ac_status=$?
12502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12503 (exit $ac_status); }; }; then
12504 ac_header_compiler=yes
12505else
12506 echo "$as_me: failed program was:" >&5
19650fd6
AS
12507sed 's/^/| /' conftest.$ac_ext >&5
12508
c0d27fcc
MR
12509ac_header_compiler=no
12510fi
edfaf76d 12511rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12512echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12513echo "${ECHO_T}$ac_header_compiler" >&6
12514
12515# Is the header present?
12516echo "$as_me:$LINENO: checking tiffio.h presence" >&5
12517echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
12518cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12519/* confdefs.h. */
12520_ACEOF
12521cat confdefs.h >>conftest.$ac_ext
12522cat >>conftest.$ac_ext <<_ACEOF
12523/* end confdefs.h. */
98418dba
CW
12524#include <tiffio.h>
12525_ACEOF
c0d27fcc 12526if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12527 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12528 ac_status=$?
6bae0ccf 12529 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12530 rm -f conftest.er1
12531 cat conftest.err >&5
c0d27fcc 12532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12533 (exit $ac_status); } >/dev/null; then
12534 if test -s conftest.err; then
12535 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12536 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12537 else
12538 ac_cpp_err=
12539 fi
12540else
12541 ac_cpp_err=yes
12542fi
12543if test -z "$ac_cpp_err"; then
c0d27fcc 12544 ac_header_preproc=yes
98418dba
CW
12545else
12546 echo "$as_me: failed program was:" >&5
19650fd6
AS
12547sed 's/^/| /' conftest.$ac_ext >&5
12548
c0d27fcc 12549 ac_header_preproc=no
98418dba
CW
12550fi
12551rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12552echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12553echo "${ECHO_T}$ac_header_preproc" >&6
12554
12555# So? What about this header?
edfaf76d
LK
12556case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12557 yes:no: )
c0d27fcc
MR
12558 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
12559echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12560 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
12561echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
12562 ac_header_preproc=yes
19650fd6 12563 ;;
edfaf76d 12564 no:yes:* )
c0d27fcc
MR
12565 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
12566echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12567 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
12568echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
12569 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
12570echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
12571 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
12572echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12573 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 12574echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12575 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
12576echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12577 (
12578 cat <<\_ASBOX
edfaf76d
LK
12579## ------------------------------------------ ##
12580## Report this to the AC_PACKAGE_NAME lists. ##
12581## ------------------------------------------ ##
19650fd6
AS
12582_ASBOX
12583 ) |
12584 sed "s/^/$as_me: WARNING: /" >&2
12585 ;;
c0d27fcc
MR
12586esac
12587echo "$as_me:$LINENO: checking for tiffio.h" >&5
12588echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12589if test "${ac_cv_header_tiffio_h+set}" = set; then
12590 echo $ECHO_N "(cached) $ECHO_C" >&6
12591else
12592 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 12593fi
c0d27fcc 12594echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 12595echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
12596
12597fi
98418dba
CW
12598if test $ac_cv_header_tiffio_h = yes; then
12599 tifflibs="-lz -lm"
12600 # At least one tiff package requires the jpeg library.
12601 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 12602 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
12603echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
12604if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 12605 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12606else
503d2be0 12607 ac_check_lib_save_LIBS=$LIBS
98418dba 12608LIBS="-ltiff $tifflibs $LIBS"
503d2be0 12609cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12610/* confdefs.h. */
12611_ACEOF
12612cat confdefs.h >>conftest.$ac_ext
12613cat >>conftest.$ac_ext <<_ACEOF
12614/* end confdefs.h. */
503d2be0 12615
73b77ee5 12616/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12617#ifdef __cplusplus
12618extern "C"
12619#endif
73b77ee5 12620/* We use char because int might match the return type of a gcc2
503d2be0 12621 builtin and then its argument prototype would still apply. */
98418dba 12622char TIFFGetVersion ();
503d2be0
AS
12623int
12624main ()
12625{
98418dba 12626TIFFGetVersion ();
503d2be0
AS
12627 ;
12628 return 0;
12629}
12630_ACEOF
12631rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12632if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12633 (eval $ac_link) 2>conftest.er1
503d2be0 12634 ac_status=$?
edfaf76d
LK
12635 grep -v '^ *+' conftest.er1 >conftest.err
12636 rm -f conftest.er1
12637 cat conftest.err >&5
c0d27fcc 12638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12639 (exit $ac_status); } &&
e143ad11
AS
12640 { ac_try='test -z "$ac_c_werror_flag"
12641 || test ! -s conftest.err'
edfaf76d
LK
12642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12643 (eval $ac_try) 2>&5
12644 ac_status=$?
12645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12646 (exit $ac_status); }; } &&
12647 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12649 (eval $ac_try) 2>&5
12650 ac_status=$?
c0d27fcc 12651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12652 (exit $ac_status); }; }; then
98418dba 12653 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
12654else
12655 echo "$as_me: failed program was:" >&5
19650fd6
AS
12656sed 's/^/| /' conftest.$ac_ext >&5
12657
98418dba 12658ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 12659fi
edfaf76d
LK
12660rm -f conftest.err conftest.$ac_objext \
12661 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12662LIBS=$ac_check_lib_save_LIBS
12663fi
c0d27fcc 12664echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
12665echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
12666if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
12667 HAVE_TIFF=yes
12668fi
12669
12670fi
73b77ee5 12671
c0d27fcc 12672
98418dba
CW
12673 fi
12674
12675 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 12676
c0d27fcc 12677cat >>confdefs.h <<\_ACEOF
98418dba 12678#define HAVE_TIFF 1
c0d27fcc 12679_ACEOF
98418dba
CW
12680
12681 fi
73b77ee5
GM
12682fi
12683
98418dba
CW
12684### Use -lgif if available, unless `--with-gif=no'.
12685HAVE_GIF=no
12686if test "${HAVE_X11}" = "yes"; then
12687 if test "${with_gif}" != "no"; then
c0d27fcc
MR
12688 if test "${ac_cv_header_gif_lib_h+set}" = set; then
12689 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
12690echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12691if test "${ac_cv_header_gif_lib_h+set}" = set; then
12692 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12693fi
12694echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
12695echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 12696else
c0d27fcc
MR
12697 # Is the header compilable?
12698echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
12699echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
12700cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12701/* confdefs.h. */
12702_ACEOF
12703cat confdefs.h >>conftest.$ac_ext
12704cat >>conftest.$ac_ext <<_ACEOF
12705/* end confdefs.h. */
c0d27fcc
MR
12706$ac_includes_default
12707#include <gif_lib.h>
12708_ACEOF
12709rm -f conftest.$ac_objext
12710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12711 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12712 ac_status=$?
edfaf76d
LK
12713 grep -v '^ *+' conftest.er1 >conftest.err
12714 rm -f conftest.er1
12715 cat conftest.err >&5
c0d27fcc
MR
12716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12717 (exit $ac_status); } &&
e143ad11
AS
12718 { ac_try='test -z "$ac_c_werror_flag"
12719 || test ! -s conftest.err'
edfaf76d
LK
12720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12721 (eval $ac_try) 2>&5
12722 ac_status=$?
12723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12724 (exit $ac_status); }; } &&
12725 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12727 (eval $ac_try) 2>&5
12728 ac_status=$?
12729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12730 (exit $ac_status); }; }; then
12731 ac_header_compiler=yes
12732else
12733 echo "$as_me: failed program was:" >&5
19650fd6
AS
12734sed 's/^/| /' conftest.$ac_ext >&5
12735
c0d27fcc
MR
12736ac_header_compiler=no
12737fi
edfaf76d 12738rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12739echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12740echo "${ECHO_T}$ac_header_compiler" >&6
12741
12742# Is the header present?
12743echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
12744echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
12745cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12746/* confdefs.h. */
12747_ACEOF
12748cat confdefs.h >>conftest.$ac_ext
12749cat >>conftest.$ac_ext <<_ACEOF
12750/* end confdefs.h. */
98418dba
CW
12751#include <gif_lib.h>
12752_ACEOF
c0d27fcc 12753if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12754 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12755 ac_status=$?
6bae0ccf 12756 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12757 rm -f conftest.er1
12758 cat conftest.err >&5
c0d27fcc 12759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12760 (exit $ac_status); } >/dev/null; then
12761 if test -s conftest.err; then
12762 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12763 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12764 else
12765 ac_cpp_err=
12766 fi
12767else
12768 ac_cpp_err=yes
12769fi
12770if test -z "$ac_cpp_err"; then
c0d27fcc 12771 ac_header_preproc=yes
98418dba
CW
12772else
12773 echo "$as_me: failed program was:" >&5
19650fd6
AS
12774sed 's/^/| /' conftest.$ac_ext >&5
12775
c0d27fcc 12776 ac_header_preproc=no
98418dba
CW
12777fi
12778rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12779echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12780echo "${ECHO_T}$ac_header_preproc" >&6
12781
12782# So? What about this header?
edfaf76d
LK
12783case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12784 yes:no: )
c0d27fcc
MR
12785 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12786echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12787 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
12788echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
12789 ac_header_preproc=yes
19650fd6 12790 ;;
edfaf76d 12791 no:yes:* )
c0d27fcc
MR
12792 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
12793echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12794 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
12795echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
12796 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
12797echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
12798 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
12799echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12800 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 12801echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12802 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
12803echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12804 (
12805 cat <<\_ASBOX
edfaf76d
LK
12806## ------------------------------------------ ##
12807## Report this to the AC_PACKAGE_NAME lists. ##
12808## ------------------------------------------ ##
19650fd6
AS
12809_ASBOX
12810 ) |
12811 sed "s/^/$as_me: WARNING: /" >&2
12812 ;;
c0d27fcc
MR
12813esac
12814echo "$as_me:$LINENO: checking for gif_lib.h" >&5
12815echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12816if test "${ac_cv_header_gif_lib_h+set}" = set; then
12817 echo $ECHO_N "(cached) $ECHO_C" >&6
12818else
12819 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 12820fi
c0d27fcc 12821echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 12822echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
12823
12824fi
98418dba
CW
12825if test $ac_cv_header_gif_lib_h = yes; then
12826 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12827# Earlier versions can crash Emacs.
c0d27fcc 12828 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
12829echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
12830if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 12831 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12832else
503d2be0 12833 ac_check_lib_save_LIBS=$LIBS
98418dba 12834LIBS="-lungif $LIBS"
503d2be0 12835cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12836/* confdefs.h. */
12837_ACEOF
12838cat confdefs.h >>conftest.$ac_ext
12839cat >>conftest.$ac_ext <<_ACEOF
12840/* end confdefs.h. */
73b77ee5 12841
98418dba
CW
12842/* Override any gcc2 internal prototype to avoid an error. */
12843#ifdef __cplusplus
12844extern "C"
12845#endif
12846/* We use char because int might match the return type of a gcc2
12847 builtin and then its argument prototype would still apply. */
12848char EGifPutExtensionLast ();
503d2be0
AS
12849int
12850main ()
12851{
98418dba 12852EGifPutExtensionLast ();
503d2be0
AS
12853 ;
12854 return 0;
12855}
12856_ACEOF
12857rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12858if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12859 (eval $ac_link) 2>conftest.er1
503d2be0 12860 ac_status=$?
edfaf76d
LK
12861 grep -v '^ *+' conftest.er1 >conftest.err
12862 rm -f conftest.er1
12863 cat conftest.err >&5
c0d27fcc 12864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12865 (exit $ac_status); } &&
e143ad11
AS
12866 { ac_try='test -z "$ac_c_werror_flag"
12867 || test ! -s conftest.err'
edfaf76d
LK
12868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12869 (eval $ac_try) 2>&5
12870 ac_status=$?
12871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12872 (exit $ac_status); }; } &&
12873 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
12874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12875 (eval $ac_try) 2>&5
12876 ac_status=$?
12877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12878 (exit $ac_status); }; }; then
12879 ac_cv_lib_ungif_EGifPutExtensionLast=yes
12880else
98418dba 12881 echo "$as_me: failed program was:" >&5
19650fd6
AS
12882sed 's/^/| /' conftest.$ac_ext >&5
12883
98418dba
CW
12884ac_cv_lib_ungif_EGifPutExtensionLast=no
12885fi
edfaf76d
LK
12886rm -f conftest.err conftest.$ac_objext \
12887 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12888LIBS=$ac_check_lib_save_LIBS
12889fi
c0d27fcc 12890echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
12891echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
12892if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
12893 HAVE_GIF=yes
12894fi
12895
12896fi
12897
c0d27fcc 12898
98418dba
CW
12899 fi
12900
12901 if test "${HAVE_GIF}" = "yes"; then
b936fae4 12902
c0d27fcc 12903cat >>confdefs.h <<\_ACEOF
98418dba 12904#define HAVE_GIF 1
c0d27fcc 12905_ACEOF
98418dba
CW
12906
12907 fi
12908fi
12909
cef11da2
ST
12910if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12911 echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12912echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12913if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12914 echo $ECHO_N "(cached) $ECHO_C" >&6
12915fi
12916echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12917echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12918else
12919 # Is the header compilable?
12920echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
12921echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6
12922cat >conftest.$ac_ext <<_ACEOF
12923/* confdefs.h. */
12924_ACEOF
12925cat confdefs.h >>conftest.$ac_ext
12926cat >>conftest.$ac_ext <<_ACEOF
12927/* end confdefs.h. */
12928$ac_includes_default
12929#include <malloc/malloc.h>
12930_ACEOF
12931rm -f conftest.$ac_objext
12932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12933 (eval $ac_compile) 2>conftest.er1
cef11da2 12934 ac_status=$?
edfaf76d
LK
12935 grep -v '^ *+' conftest.er1 >conftest.err
12936 rm -f conftest.er1
12937 cat conftest.err >&5
cef11da2
ST
12938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12939 (exit $ac_status); } &&
e143ad11
AS
12940 { ac_try='test -z "$ac_c_werror_flag"
12941 || test ! -s conftest.err'
edfaf76d
LK
12942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12943 (eval $ac_try) 2>&5
12944 ac_status=$?
12945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12946 (exit $ac_status); }; } &&
12947 { ac_try='test -s conftest.$ac_objext'
cef11da2
ST
12948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12949 (eval $ac_try) 2>&5
12950 ac_status=$?
12951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12952 (exit $ac_status); }; }; then
12953 ac_header_compiler=yes
12954else
12955 echo "$as_me: failed program was:" >&5
12956sed 's/^/| /' conftest.$ac_ext >&5
12957
12958ac_header_compiler=no
12959fi
edfaf76d 12960rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cef11da2
ST
12961echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12962echo "${ECHO_T}$ac_header_compiler" >&6
12963
12964# Is the header present?
12965echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
12966echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6
12967cat >conftest.$ac_ext <<_ACEOF
12968/* confdefs.h. */
12969_ACEOF
12970cat confdefs.h >>conftest.$ac_ext
12971cat >>conftest.$ac_ext <<_ACEOF
12972/* end confdefs.h. */
12973#include <malloc/malloc.h>
12974_ACEOF
12975if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12976 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12977 ac_status=$?
12978 grep -v '^ *+' conftest.er1 >conftest.err
12979 rm -f conftest.er1
12980 cat conftest.err >&5
12981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12982 (exit $ac_status); } >/dev/null; then
12983 if test -s conftest.err; then
12984 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12985 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
cef11da2
ST
12986 else
12987 ac_cpp_err=
12988 fi
12989else
12990 ac_cpp_err=yes
12991fi
12992if test -z "$ac_cpp_err"; then
12993 ac_header_preproc=yes
12994else
12995 echo "$as_me: failed program was:" >&5
12996sed 's/^/| /' conftest.$ac_ext >&5
12997
12998 ac_header_preproc=no
12999fi
13000rm -f conftest.err conftest.$ac_ext
13001echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13002echo "${ECHO_T}$ac_header_preproc" >&6
13003
13004# So? What about this header?
edfaf76d
LK
13005case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13006 yes:no: )
cef11da2
ST
13007 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
13008echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13009 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
13010echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
13011 ac_header_preproc=yes
cef11da2 13012 ;;
edfaf76d 13013 no:yes:* )
cef11da2
ST
13014 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
13015echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13016 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
13017echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
13018 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
13019echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
13020 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
13021echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
13022 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
13023echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13024 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
13025echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
cef11da2
ST
13026 (
13027 cat <<\_ASBOX
edfaf76d
LK
13028## ------------------------------------------ ##
13029## Report this to the AC_PACKAGE_NAME lists. ##
13030## ------------------------------------------ ##
cef11da2
ST
13031_ASBOX
13032 ) |
13033 sed "s/^/$as_me: WARNING: /" >&2
13034 ;;
13035esac
13036echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
13037echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
13038if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
13039 echo $ECHO_N "(cached) $ECHO_C" >&6
13040else
13041 ac_cv_header_malloc_malloc_h=$ac_header_preproc
13042fi
13043echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
13044echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
13045
13046fi
13047if test $ac_cv_header_malloc_malloc_h = yes; then
13048
13049cat >>confdefs.h <<\_ACEOF
13050#define HAVE_MALLOC_MALLOC_H 1
13051_ACEOF
13052
13053fi
13054
13055
13056
5d6da11e 13057### Use Mac OS X Carbon API to implement GUI.
e0f712ba 13058if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 13059
c0d27fcc 13060cat >>confdefs.h <<\_ACEOF
e0f712ba 13061#define HAVE_CARBON 1
c0d27fcc 13062_ACEOF
e0f712ba 13063
6a3a24fa
JD
13064 ## Specify the install directory
13065 carbon_appdir=
13066 if test "${carbon_appdir_x}" != ""; then
13067 case ${carbon_appdir_x} in
13068 y | ye | yes) carbon_appdir=/Applications ;;
13069 * ) carbon_appdir=${carbon_appdir_x} ;;
13070 esac
13071 fi
8f417b3b
AS
13072 # We also have mouse menus.
13073 HAVE_MENUS=yes
7c9e5167
JD
13074
13075 tmp_CFLAGS="$CFLAGS"
13076 CFLAGS="$CFLAGS -framework Carbon"
13077 echo "$as_me:$LINENO: checking for CancelMenuTracking" >&5
13078echo $ECHO_N "checking for CancelMenuTracking... $ECHO_C" >&6
13079if test "${ac_cv_func_CancelMenuTracking+set}" = set; then
13080 echo $ECHO_N "(cached) $ECHO_C" >&6
13081else
13082 cat >conftest.$ac_ext <<_ACEOF
7c9e5167
JD
13083/* confdefs.h. */
13084_ACEOF
13085cat confdefs.h >>conftest.$ac_ext
13086cat >>conftest.$ac_ext <<_ACEOF
13087/* end confdefs.h. */
edfaf76d
LK
13088/* Define CancelMenuTracking to an innocuous variant, in case <limits.h> declares CancelMenuTracking.
13089 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13090#define CancelMenuTracking innocuous_CancelMenuTracking
13091
7c9e5167
JD
13092/* System header to define __stub macros and hopefully few prototypes,
13093 which can conflict with char CancelMenuTracking (); below.
13094 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13095 <limits.h> exists even on freestanding compilers. */
edfaf76d 13096
7c9e5167
JD
13097#ifdef __STDC__
13098# include <limits.h>
13099#else
13100# include <assert.h>
13101#endif
edfaf76d
LK
13102
13103#undef CancelMenuTracking
13104
7c9e5167
JD
13105/* Override any gcc2 internal prototype to avoid an error. */
13106#ifdef __cplusplus
13107extern "C"
13108{
13109#endif
13110/* We use char because int might match the return type of a gcc2
13111 builtin and then its argument prototype would still apply. */
13112char CancelMenuTracking ();
13113/* The GNU C library defines this for functions which it implements
13114 to always fail with ENOSYS. Some functions are actually named
13115 something starting with __ and the normal name is an alias. */
13116#if defined (__stub_CancelMenuTracking) || defined (__stub___CancelMenuTracking)
13117choke me
13118#else
13119char (*f) () = CancelMenuTracking;
13120#endif
13121#ifdef __cplusplus
13122}
13123#endif
13124
13125int
13126main ()
13127{
13128return f != CancelMenuTracking;
13129 ;
13130 return 0;
13131}
13132_ACEOF
13133rm -f conftest.$ac_objext conftest$ac_exeext
13134if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13135 (eval $ac_link) 2>conftest.er1
7c9e5167 13136 ac_status=$?
edfaf76d
LK
13137 grep -v '^ *+' conftest.er1 >conftest.err
13138 rm -f conftest.er1
13139 cat conftest.err >&5
7c9e5167
JD
13140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13141 (exit $ac_status); } &&
e143ad11
AS
13142 { ac_try='test -z "$ac_c_werror_flag"
13143 || test ! -s conftest.err'
edfaf76d
LK
13144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13145 (eval $ac_try) 2>&5
13146 ac_status=$?
13147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13148 (exit $ac_status); }; } &&
13149 { ac_try='test -s conftest$ac_exeext'
7c9e5167
JD
13150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13151 (eval $ac_try) 2>&5
13152 ac_status=$?
13153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13154 (exit $ac_status); }; }; then
13155 ac_cv_func_CancelMenuTracking=yes
13156else
13157 echo "$as_me: failed program was:" >&5
13158sed 's/^/| /' conftest.$ac_ext >&5
13159
13160ac_cv_func_CancelMenuTracking=no
13161fi
edfaf76d
LK
13162rm -f conftest.err conftest.$ac_objext \
13163 conftest$ac_exeext conftest.$ac_ext
7c9e5167
JD
13164fi
13165echo "$as_me:$LINENO: result: $ac_cv_func_CancelMenuTracking" >&5
13166echo "${ECHO_T}$ac_cv_func_CancelMenuTracking" >&6
13167if test $ac_cv_func_CancelMenuTracking = yes; then
13168 have_cmt=yes
13169else
13170 have_cmt=no
13171fi
13172
13173 if test "$have_cmt" = yes; then
13174
13175cat >>confdefs.h <<\_ACEOF
13176#define HAVE_CANCELMENUTRACKING 1
13177_ACEOF
13178
13179 fi
13180 CFLAGS="$tmp_CFLAGS"
e0f712ba
AC
13181fi
13182
98418dba
CW
13183### Use session management (-lSM -lICE) if available
13184HAVE_X_SM=no
13185if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
13186 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13187 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
13188echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
13189if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13190 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13191fi
13192echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
13193echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 13194else
c0d27fcc
MR
13195 # Is the header compilable?
13196echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
13197echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
13198cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13199/* confdefs.h. */
13200_ACEOF
13201cat confdefs.h >>conftest.$ac_ext
13202cat >>conftest.$ac_ext <<_ACEOF
13203/* end confdefs.h. */
c0d27fcc
MR
13204$ac_includes_default
13205#include <X11/SM/SMlib.h>
13206_ACEOF
13207rm -f conftest.$ac_objext
13208if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 13209 (eval $ac_compile) 2>conftest.er1
c0d27fcc 13210 ac_status=$?
edfaf76d
LK
13211 grep -v '^ *+' conftest.er1 >conftest.err
13212 rm -f conftest.er1
13213 cat conftest.err >&5
c0d27fcc
MR
13214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13215 (exit $ac_status); } &&
e143ad11
AS
13216 { ac_try='test -z "$ac_c_werror_flag"
13217 || test ! -s conftest.err'
edfaf76d
LK
13218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13219 (eval $ac_try) 2>&5
13220 ac_status=$?
13221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13222 (exit $ac_status); }; } &&
13223 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13225 (eval $ac_try) 2>&5
13226 ac_status=$?
13227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13228 (exit $ac_status); }; }; then
13229 ac_header_compiler=yes
13230else
13231 echo "$as_me: failed program was:" >&5
19650fd6
AS
13232sed 's/^/| /' conftest.$ac_ext >&5
13233
c0d27fcc
MR
13234ac_header_compiler=no
13235fi
edfaf76d 13236rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
13237echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13238echo "${ECHO_T}$ac_header_compiler" >&6
13239
13240# Is the header present?
13241echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
13242echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
13243cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13244/* confdefs.h. */
13245_ACEOF
13246cat confdefs.h >>conftest.$ac_ext
13247cat >>conftest.$ac_ext <<_ACEOF
13248/* end confdefs.h. */
98418dba
CW
13249#include <X11/SM/SMlib.h>
13250_ACEOF
c0d27fcc 13251if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
13252 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13253 ac_status=$?
6bae0ccf 13254 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13255 rm -f conftest.er1
13256 cat conftest.err >&5
c0d27fcc 13257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13258 (exit $ac_status); } >/dev/null; then
13259 if test -s conftest.err; then
13260 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 13261 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
13262 else
13263 ac_cpp_err=
13264 fi
13265else
13266 ac_cpp_err=yes
503d2be0 13267fi
98418dba 13268if test -z "$ac_cpp_err"; then
c0d27fcc 13269 ac_header_preproc=yes
98418dba
CW
13270else
13271 echo "$as_me: failed program was:" >&5
19650fd6
AS
13272sed 's/^/| /' conftest.$ac_ext >&5
13273
c0d27fcc 13274 ac_header_preproc=no
98418dba
CW
13275fi
13276rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13277echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13278echo "${ECHO_T}$ac_header_preproc" >&6
13279
13280# So? What about this header?
edfaf76d
LK
13281case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13282 yes:no: )
c0d27fcc
MR
13283 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
13284echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13285 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
13286echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
13287 ac_header_preproc=yes
19650fd6 13288 ;;
edfaf76d 13289 no:yes:* )
c0d27fcc
MR
13290 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
13291echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13292 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
13293echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
13294 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
13295echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
13296 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
13297echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13298 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 13299echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13300 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
13301echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
13302 (
13303 cat <<\_ASBOX
edfaf76d
LK
13304## ------------------------------------------ ##
13305## Report this to the AC_PACKAGE_NAME lists. ##
13306## ------------------------------------------ ##
19650fd6
AS
13307_ASBOX
13308 ) |
13309 sed "s/^/$as_me: WARNING: /" >&2
13310 ;;
c0d27fcc
MR
13311esac
13312echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
13313echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
13314if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13315 echo $ECHO_N "(cached) $ECHO_C" >&6
13316else
13317 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 13318fi
c0d27fcc 13319echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 13320echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
13321
13322fi
98418dba 13323if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 13324 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
13325echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
13326if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 13327 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13328else
503d2be0 13329 ac_check_lib_save_LIBS=$LIBS
1660500f 13330LIBS="-lSM -lICE $LIBS"
503d2be0 13331cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13332/* confdefs.h. */
13333_ACEOF
13334cat confdefs.h >>conftest.$ac_ext
13335cat >>conftest.$ac_ext <<_ACEOF
13336/* end confdefs.h. */
503d2be0 13337
73b77ee5 13338/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13339#ifdef __cplusplus
13340extern "C"
13341#endif
73b77ee5 13342/* We use char because int might match the return type of a gcc2
503d2be0 13343 builtin and then its argument prototype would still apply. */
98418dba 13344char SmcOpenConnection ();
503d2be0
AS
13345int
13346main ()
13347{
98418dba 13348SmcOpenConnection ();
503d2be0
AS
13349 ;
13350 return 0;
13351}
13352_ACEOF
13353rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13354if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13355 (eval $ac_link) 2>conftest.er1
503d2be0 13356 ac_status=$?
edfaf76d
LK
13357 grep -v '^ *+' conftest.er1 >conftest.err
13358 rm -f conftest.er1
13359 cat conftest.err >&5
c0d27fcc 13360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13361 (exit $ac_status); } &&
e143ad11
AS
13362 { ac_try='test -z "$ac_c_werror_flag"
13363 || test ! -s conftest.err'
edfaf76d
LK
13364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13365 (eval $ac_try) 2>&5
13366 ac_status=$?
13367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13368 (exit $ac_status); }; } &&
13369 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13371 (eval $ac_try) 2>&5
13372 ac_status=$?
c0d27fcc 13373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13374 (exit $ac_status); }; }; then
98418dba 13375 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
13376else
13377 echo "$as_me: failed program was:" >&5
19650fd6
AS
13378sed 's/^/| /' conftest.$ac_ext >&5
13379
98418dba 13380ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 13381fi
edfaf76d
LK
13382rm -f conftest.err conftest.$ac_objext \
13383 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
13384LIBS=$ac_check_lib_save_LIBS
13385fi
c0d27fcc 13386echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
13387echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
13388if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
13389 HAVE_X_SM=yes
73b77ee5
GM
13390fi
13391
73b77ee5 13392fi
73b77ee5 13393
c0d27fcc
MR
13394
13395
98418dba 13396 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 13397
c0d27fcc 13398cat >>confdefs.h <<\_ACEOF
98418dba 13399#define HAVE_X_SM 1
c0d27fcc 13400_ACEOF
73b77ee5 13401
98418dba
CW
13402 case "$LIBS" in
13403 *-lSM*) ;;
13404 *) LIBS="-lSM -lICE $LIBS" ;;
13405 esac
73b77ee5 13406 fi
98418dba 13407fi
73b77ee5 13408
98418dba 13409# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 13410echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
13411echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
13412if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
13413 echo $ECHO_N "(cached) $ECHO_C" >&6
13414else
13415 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13416/* confdefs.h. */
13417_ACEOF
13418cat confdefs.h >>conftest.$ac_ext
13419cat >>conftest.$ac_ext <<_ACEOF
13420/* end confdefs.h. */
98418dba 13421#include <netdb.h>
503d2be0
AS
13422int
13423main ()
13424{
98418dba 13425return h_errno;
503d2be0
AS
13426 ;
13427 return 0;
13428}
13429_ACEOF
13430rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13431if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13432 (eval $ac_link) 2>conftest.er1
503d2be0 13433 ac_status=$?
edfaf76d
LK
13434 grep -v '^ *+' conftest.er1 >conftest.err
13435 rm -f conftest.er1
13436 cat conftest.err >&5
c0d27fcc 13437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13438 (exit $ac_status); } &&
e143ad11
AS
13439 { ac_try='test -z "$ac_c_werror_flag"
13440 || test ! -s conftest.err'
edfaf76d
LK
13441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13442 (eval $ac_try) 2>&5
13443 ac_status=$?
13444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13445 (exit $ac_status); }; } &&
13446 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13448 (eval $ac_try) 2>&5
13449 ac_status=$?
c0d27fcc 13450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13451 (exit $ac_status); }; }; then
98418dba 13452 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 13453else
503d2be0 13454 echo "$as_me: failed program was:" >&5
19650fd6
AS
13455sed 's/^/| /' conftest.$ac_ext >&5
13456
98418dba 13457emacs_cv_netdb_declares_h_errno=no
73b77ee5 13458fi
edfaf76d
LK
13459rm -f conftest.err conftest.$ac_objext \
13460 conftest$ac_exeext conftest.$ac_ext
98418dba 13461fi
c0d27fcc 13462echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
13463echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
13464if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 13465
c0d27fcc 13466cat >>confdefs.h <<\_ACEOF
98418dba 13467#define HAVE_H_ERRNO 1
c0d27fcc 13468_ACEOF
73b77ee5 13469
98418dba
CW
13470fi
13471
13472# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13473# for constant arguments. Useless!
c0d27fcc 13474echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
13475echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
13476if test "${ac_cv_working_alloca_h+set}" = set; then
13477 echo $ECHO_N "(cached) $ECHO_C" >&6
13478else
13479 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13480/* confdefs.h. */
13481_ACEOF
13482cat confdefs.h >>conftest.$ac_ext
13483cat >>conftest.$ac_ext <<_ACEOF
13484/* end confdefs.h. */
98418dba 13485#include <alloca.h>
503d2be0
AS
13486int
13487main ()
13488{
98418dba 13489char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
13490 ;
13491 return 0;
13492}
13493_ACEOF
13494rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13495if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13496 (eval $ac_link) 2>conftest.er1
503d2be0 13497 ac_status=$?
edfaf76d
LK
13498 grep -v '^ *+' conftest.er1 >conftest.err
13499 rm -f conftest.er1
13500 cat conftest.err >&5
c0d27fcc 13501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13502 (exit $ac_status); } &&
e143ad11
AS
13503 { ac_try='test -z "$ac_c_werror_flag"
13504 || test ! -s conftest.err'
edfaf76d
LK
13505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13506 (eval $ac_try) 2>&5
13507 ac_status=$?
13508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13509 (exit $ac_status); }; } &&
13510 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13512 (eval $ac_try) 2>&5
13513 ac_status=$?
c0d27fcc 13514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13515 (exit $ac_status); }; }; then
98418dba 13516 ac_cv_working_alloca_h=yes
73b77ee5 13517else
503d2be0 13518 echo "$as_me: failed program was:" >&5
19650fd6
AS
13519sed 's/^/| /' conftest.$ac_ext >&5
13520
98418dba 13521ac_cv_working_alloca_h=no
73b77ee5 13522fi
edfaf76d
LK
13523rm -f conftest.err conftest.$ac_objext \
13524 conftest$ac_exeext conftest.$ac_ext
98418dba 13525fi
c0d27fcc 13526echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
13527echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
13528if test $ac_cv_working_alloca_h = yes; then
73b77ee5 13529
c0d27fcc 13530cat >>confdefs.h <<\_ACEOF
98418dba 13531#define HAVE_ALLOCA_H 1
c0d27fcc 13532_ACEOF
98418dba
CW
13533
13534fi
13535
c0d27fcc 13536echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
13537echo $ECHO_N "checking for alloca... $ECHO_C" >&6
13538if test "${ac_cv_func_alloca_works+set}" = set; then
13539 echo $ECHO_N "(cached) $ECHO_C" >&6
13540else
503d2be0 13541 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13542/* confdefs.h. */
13543_ACEOF
13544cat confdefs.h >>conftest.$ac_ext
13545cat >>conftest.$ac_ext <<_ACEOF
13546/* end confdefs.h. */
98418dba
CW
13547#ifdef __GNUC__
13548# define alloca __builtin_alloca
13549#else
13550# ifdef _MSC_VER
13551# include <malloc.h>
13552# define alloca _alloca
13553# else
13554# if HAVE_ALLOCA_H
13555# include <alloca.h>
13556# else
13557# ifdef _AIX
13558 #pragma alloca
13559# else
13560# ifndef alloca /* predefined by HP cc +Olibcalls */
13561char *alloca ();
13562# endif
13563# endif
13564# endif
13565# endif
13566#endif
13567
503d2be0
AS
13568int
13569main ()
13570{
98418dba 13571char *p = (char *) alloca (1);
503d2be0
AS
13572 ;
13573 return 0;
13574}
13575_ACEOF
13576rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13577if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13578 (eval $ac_link) 2>conftest.er1
503d2be0 13579 ac_status=$?
edfaf76d
LK
13580 grep -v '^ *+' conftest.er1 >conftest.err
13581 rm -f conftest.er1
13582 cat conftest.err >&5
c0d27fcc 13583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13584 (exit $ac_status); } &&
e143ad11
AS
13585 { ac_try='test -z "$ac_c_werror_flag"
13586 || test ! -s conftest.err'
edfaf76d
LK
13587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13588 (eval $ac_try) 2>&5
13589 ac_status=$?
13590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13591 (exit $ac_status); }; } &&
13592 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13594 (eval $ac_try) 2>&5
13595 ac_status=$?
c0d27fcc 13596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13597 (exit $ac_status); }; }; then
98418dba 13598 ac_cv_func_alloca_works=yes
ac95a621 13599else
503d2be0 13600 echo "$as_me: failed program was:" >&5
19650fd6
AS
13601sed 's/^/| /' conftest.$ac_ext >&5
13602
98418dba 13603ac_cv_func_alloca_works=no
ac95a621 13604fi
edfaf76d
LK
13605rm -f conftest.err conftest.$ac_objext \
13606 conftest$ac_exeext conftest.$ac_ext
98418dba 13607fi
c0d27fcc 13608echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 13609echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 13610
98418dba
CW
13611if test $ac_cv_func_alloca_works = yes; then
13612
c0d27fcc 13613cat >>confdefs.h <<\_ACEOF
98418dba 13614#define HAVE_ALLOCA 1
c0d27fcc 13615_ACEOF
98418dba
CW
13616
13617else
13618 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13619# that cause trouble. Some versions do not even contain alloca or
13620# contain a buggy version. If you still want to use their alloca,
13621# use ar to extract alloca.o from them instead of compiling alloca.c.
13622
13623ALLOCA=alloca.$ac_objext
13624
c0d27fcc 13625cat >>confdefs.h <<\_ACEOF
98418dba 13626#define C_ALLOCA 1
c0d27fcc 13627_ACEOF
98418dba 13628
c0d27fcc
MR
13629
13630echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
13631echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
13632if test "${ac_cv_os_cray+set}" = set; then
13633 echo $ECHO_N "(cached) $ECHO_C" >&6
13634else
13635 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13636/* confdefs.h. */
13637_ACEOF
13638cat confdefs.h >>conftest.$ac_ext
13639cat >>conftest.$ac_ext <<_ACEOF
13640/* end confdefs.h. */
98418dba
CW
13641#if defined(CRAY) && ! defined(CRAY2)
13642webecray
13643#else
13644wenotbecray
13645#endif
13646
13647_ACEOF
13648if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13649 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
13650 ac_cv_os_cray=yes
13651else
13652 ac_cv_os_cray=no
13653fi
13654rm -f conftest*
ac95a621 13655
98418dba 13656fi
c0d27fcc 13657echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
13658echo "${ECHO_T}$ac_cv_os_cray" >&6
13659if test $ac_cv_os_cray = yes; then
13660 for ac_func in _getb67 GETB67 getb67; do
13661 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13662echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
13663echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13664if eval "test \"\${$as_ac_var+set}\" = set"; then
13665 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13666else
503d2be0 13667 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13668/* confdefs.h. */
13669_ACEOF
13670cat confdefs.h >>conftest.$ac_ext
13671cat >>conftest.$ac_ext <<_ACEOF
13672/* end confdefs.h. */
edfaf76d
LK
13673/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13674 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13675#define $ac_func innocuous_$ac_func
13676
73b77ee5 13677/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13678 which can conflict with char $ac_func (); below.
13679 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13680 <limits.h> exists even on freestanding compilers. */
edfaf76d 13681
19650fd6
AS
13682#ifdef __STDC__
13683# include <limits.h>
13684#else
13685# include <assert.h>
13686#endif
edfaf76d
LK
13687
13688#undef $ac_func
13689
73b77ee5 13690/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13691#ifdef __cplusplus
13692extern "C"
19650fd6 13693{
503d2be0 13694#endif
73b77ee5 13695/* We use char because int might match the return type of a gcc2
503d2be0
AS
13696 builtin and then its argument prototype would still apply. */
13697char $ac_func ();
73b77ee5
GM
13698/* The GNU C library defines this for functions which it implements
13699 to always fail with ENOSYS. Some functions are actually named
13700 something starting with __ and the normal name is an alias. */
13701#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13702choke me
13703#else
19650fd6
AS
13704char (*f) () = $ac_func;
13705#endif
13706#ifdef __cplusplus
13707}
73b77ee5
GM
13708#endif
13709
19650fd6
AS
13710int
13711main ()
13712{
13713return f != $ac_func;
503d2be0
AS
13714 ;
13715 return 0;
13716}
13717_ACEOF
13718rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13719if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13720 (eval $ac_link) 2>conftest.er1
503d2be0 13721 ac_status=$?
edfaf76d
LK
13722 grep -v '^ *+' conftest.er1 >conftest.err
13723 rm -f conftest.er1
13724 cat conftest.err >&5
c0d27fcc 13725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13726 (exit $ac_status); } &&
e143ad11
AS
13727 { ac_try='test -z "$ac_c_werror_flag"
13728 || test ! -s conftest.err'
edfaf76d
LK
13729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13730 (eval $ac_try) 2>&5
13731 ac_status=$?
13732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13733 (exit $ac_status); }; } &&
13734 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13736 (eval $ac_try) 2>&5
13737 ac_status=$?
c0d27fcc 13738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13739 (exit $ac_status); }; }; then
13740 eval "$as_ac_var=yes"
13741else
13742 echo "$as_me: failed program was:" >&5
19650fd6
AS
13743sed 's/^/| /' conftest.$ac_ext >&5
13744
503d2be0
AS
13745eval "$as_ac_var=no"
13746fi
edfaf76d
LK
13747rm -f conftest.err conftest.$ac_objext \
13748 conftest$ac_exeext conftest.$ac_ext
503d2be0 13749fi
c0d27fcc 13750echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13751echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13752if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 13753
c0d27fcc 13754cat >>confdefs.h <<_ACEOF
98418dba 13755#define CRAY_STACKSEG_END $ac_func
c0d27fcc 13756_ACEOF
98418dba
CW
13757
13758 break
73b77ee5 13759fi
73b77ee5 13760
98418dba 13761 done
73b77ee5
GM
13762fi
13763
c0d27fcc 13764echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
13765echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
13766if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 13767 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
13768else
13769 if test "$cross_compiling" = yes; then
13770 ac_cv_c_stack_direction=0
73b77ee5 13771else
503d2be0 13772 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13773/* confdefs.h. */
13774_ACEOF
13775cat confdefs.h >>conftest.$ac_ext
13776cat >>conftest.$ac_ext <<_ACEOF
13777/* end confdefs.h. */
503d2be0 13778int
98418dba 13779find_stack_direction ()
503d2be0 13780{
98418dba
CW
13781 static char *addr = 0;
13782 auto char dummy;
13783 if (addr == 0)
13784 {
13785 addr = &dummy;
13786 return find_stack_direction ();
13787 }
73b77ee5 13788 else
98418dba
CW
13789 return (&dummy > addr) ? 1 : -1;
13790}
ba4481b5 13791
503d2be0
AS
13792int
13793main ()
13794{
98418dba 13795 exit (find_stack_direction () < 0);
503d2be0
AS
13796}
13797_ACEOF
98418dba 13798rm -f conftest$ac_exeext
c0d27fcc 13799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13800 (eval $ac_link) 2>&5
13801 ac_status=$?
c0d27fcc 13802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13803 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 13804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13805 (eval $ac_try) 2>&5
13806 ac_status=$?
c0d27fcc 13807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13808 (exit $ac_status); }; }; then
98418dba 13809 ac_cv_c_stack_direction=1
ba4481b5 13810else
98418dba
CW
13811 echo "$as_me: program exited with status $ac_status" >&5
13812echo "$as_me: failed program was:" >&5
19650fd6
AS
13813sed 's/^/| /' conftest.$ac_ext >&5
13814
c0d27fcc 13815( exit $ac_status )
98418dba 13816ac_cv_c_stack_direction=-1
ba4481b5 13817fi
edfaf76d 13818rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 13819fi
98418dba 13820fi
c0d27fcc 13821echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
13822echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
13823
c0d27fcc 13824cat >>confdefs.h <<_ACEOF
98418dba 13825#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
13826_ACEOF
13827
ba4481b5 13828
ba4481b5
DL
13829fi
13830
c0d27fcc 13831
98418dba
CW
13832# fmod, logb, and frexp are found in -lm on most systems.
13833# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
13834
c0d27fcc 13835echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
13836echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
13837if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 13838 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13839else
98418dba
CW
13840 ac_check_lib_save_LIBS=$LIBS
13841LIBS="-lm $LIBS"
13842cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13843/* confdefs.h. */
13844_ACEOF
13845cat confdefs.h >>conftest.$ac_ext
13846cat >>conftest.$ac_ext <<_ACEOF
13847/* end confdefs.h. */
ba4481b5 13848
98418dba
CW
13849/* Override any gcc2 internal prototype to avoid an error. */
13850#ifdef __cplusplus
13851extern "C"
13852#endif
13853/* We use char because int might match the return type of a gcc2
13854 builtin and then its argument prototype would still apply. */
13855char sqrt ();
503d2be0
AS
13856int
13857main ()
13858{
98418dba 13859sqrt ();
503d2be0
AS
13860 ;
13861 return 0;
13862}
13863_ACEOF
13864rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13865if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13866 (eval $ac_link) 2>conftest.er1
503d2be0 13867 ac_status=$?
edfaf76d
LK
13868 grep -v '^ *+' conftest.er1 >conftest.err
13869 rm -f conftest.er1
13870 cat conftest.err >&5
c0d27fcc 13871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13872 (exit $ac_status); } &&
e143ad11
AS
13873 { ac_try='test -z "$ac_c_werror_flag"
13874 || test ! -s conftest.err'
edfaf76d
LK
13875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13876 (eval $ac_try) 2>&5
13877 ac_status=$?
13878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13879 (exit $ac_status); }; } &&
13880 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13882 (eval $ac_try) 2>&5
13883 ac_status=$?
c0d27fcc 13884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13885 (exit $ac_status); }; }; then
98418dba 13886 ac_cv_lib_m_sqrt=yes
ba4481b5 13887else
503d2be0 13888 echo "$as_me: failed program was:" >&5
19650fd6
AS
13889sed 's/^/| /' conftest.$ac_ext >&5
13890
98418dba 13891ac_cv_lib_m_sqrt=no
ba4481b5 13892fi
edfaf76d
LK
13893rm -f conftest.err conftest.$ac_objext \
13894 conftest$ac_exeext conftest.$ac_ext
98418dba 13895LIBS=$ac_check_lib_save_LIBS
ba4481b5 13896fi
c0d27fcc 13897echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
13898echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
13899if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 13900 cat >>confdefs.h <<_ACEOF
98418dba 13901#define HAVE_LIBM 1
c0d27fcc 13902_ACEOF
98418dba
CW
13903
13904 LIBS="-lm $LIBS"
ba4481b5 13905
ba4481b5
DL
13906fi
13907
c0d27fcc 13908
55597d70
DL
13909# Check for mail-locking functions in a "mail" library. Probably this should
13910# have the same check as for liblockfile below.
98418dba 13911
c0d27fcc 13912echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
13913echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
13914if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 13915 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13916else
98418dba
CW
13917 ac_check_lib_save_LIBS=$LIBS
13918LIBS="-lmail $LIBS"
13919cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13920/* confdefs.h. */
13921_ACEOF
13922cat confdefs.h >>conftest.$ac_ext
13923cat >>conftest.$ac_ext <<_ACEOF
13924/* end confdefs.h. */
98418dba
CW
13925
13926/* Override any gcc2 internal prototype to avoid an error. */
13927#ifdef __cplusplus
13928extern "C"
13929#endif
13930/* We use char because int might match the return type of a gcc2
13931 builtin and then its argument prototype would still apply. */
13932char maillock ();
503d2be0
AS
13933int
13934main ()
13935{
98418dba 13936maillock ();
503d2be0
AS
13937 ;
13938 return 0;
13939}
13940_ACEOF
13941rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13943 (eval $ac_link) 2>conftest.er1
503d2be0 13944 ac_status=$?
edfaf76d
LK
13945 grep -v '^ *+' conftest.er1 >conftest.err
13946 rm -f conftest.er1
13947 cat conftest.err >&5
c0d27fcc 13948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13949 (exit $ac_status); } &&
e143ad11
AS
13950 { ac_try='test -z "$ac_c_werror_flag"
13951 || test ! -s conftest.err'
edfaf76d
LK
13952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13953 (eval $ac_try) 2>&5
13954 ac_status=$?
13955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13956 (exit $ac_status); }; } &&
13957 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13959 (eval $ac_try) 2>&5
13960 ac_status=$?
c0d27fcc 13961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13962 (exit $ac_status); }; }; then
98418dba 13963 ac_cv_lib_mail_maillock=yes
ba4481b5 13964else
503d2be0 13965 echo "$as_me: failed program was:" >&5
19650fd6
AS
13966sed 's/^/| /' conftest.$ac_ext >&5
13967
98418dba 13968ac_cv_lib_mail_maillock=no
ba4481b5 13969fi
edfaf76d
LK
13970rm -f conftest.err conftest.$ac_objext \
13971 conftest$ac_exeext conftest.$ac_ext
98418dba 13972LIBS=$ac_check_lib_save_LIBS
ba4481b5 13973fi
c0d27fcc 13974echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
13975echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
13976if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 13977 cat >>confdefs.h <<_ACEOF
98418dba 13978#define HAVE_LIBMAIL 1
c0d27fcc 13979_ACEOF
ba4481b5 13980
98418dba 13981 LIBS="-lmail $LIBS"
ba4481b5 13982
98418dba 13983fi
ba4481b5 13984
c0d27fcc
MR
13985
13986echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
13987echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
13988if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 13989 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13990else
503d2be0 13991 ac_check_lib_save_LIBS=$LIBS
98418dba 13992LIBS="-llockfile $LIBS"
503d2be0 13993cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13994/* confdefs.h. */
13995_ACEOF
13996cat confdefs.h >>conftest.$ac_ext
13997cat >>conftest.$ac_ext <<_ACEOF
13998/* end confdefs.h. */
503d2be0 13999
ba4481b5 14000/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14001#ifdef __cplusplus
14002extern "C"
14003#endif
ba4481b5 14004/* We use char because int might match the return type of a gcc2
503d2be0 14005 builtin and then its argument prototype would still apply. */
98418dba 14006char maillock ();
503d2be0
AS
14007int
14008main ()
14009{
98418dba 14010maillock ();
503d2be0
AS
14011 ;
14012 return 0;
14013}
14014_ACEOF
14015rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14016if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14017 (eval $ac_link) 2>conftest.er1
503d2be0 14018 ac_status=$?
edfaf76d
LK
14019 grep -v '^ *+' conftest.er1 >conftest.err
14020 rm -f conftest.er1
14021 cat conftest.err >&5
c0d27fcc 14022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14023 (exit $ac_status); } &&
e143ad11
AS
14024 { ac_try='test -z "$ac_c_werror_flag"
14025 || test ! -s conftest.err'
edfaf76d
LK
14026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14027 (eval $ac_try) 2>&5
14028 ac_status=$?
14029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14030 (exit $ac_status); }; } &&
14031 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14033 (eval $ac_try) 2>&5
14034 ac_status=$?
c0d27fcc 14035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14036 (exit $ac_status); }; }; then
98418dba 14037 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
14038else
14039 echo "$as_me: failed program was:" >&5
19650fd6
AS
14040sed 's/^/| /' conftest.$ac_ext >&5
14041
98418dba
CW
14042ac_cv_lib_lockfile_maillock=no
14043fi
edfaf76d
LK
14044rm -f conftest.err conftest.$ac_objext \
14045 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14046LIBS=$ac_check_lib_save_LIBS
14047fi
c0d27fcc 14048echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
14049echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
14050if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 14051 cat >>confdefs.h <<_ACEOF
98418dba 14052#define HAVE_LIBLOCKFILE 1
c0d27fcc 14053_ACEOF
98418dba
CW
14054
14055 LIBS="-llockfile $LIBS"
14056
14057fi
14058
14059# If we have the shared liblockfile, assume we must use it for mail
14060# locking (e.g. Debian). If we couldn't link against liblockfile
14061# (no liblockfile.a installed), ensure that we don't need to.
14062if test "$ac_cv_lib_lockfile_maillock" = no; then
14063 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14064set dummy liblockfile.so; ac_word=$2
c0d27fcc 14065echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
14066echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14067if test "${ac_cv_prog_liblockfile+set}" = set; then
14068 echo $ECHO_N "(cached) $ECHO_C" >&6
14069else
14070 if test -n "$liblockfile"; then
14071 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14072else
c0d27fcc 14073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
14074as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14075for as_dir in $as_dummy
c0d27fcc
MR
14076do
14077 IFS=$as_save_IFS
14078 test -z "$as_dir" && as_dir=.
14079 for ac_exec_ext in '' $ac_executable_extensions; do
14080 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14081 ac_cv_prog_liblockfile="yes"
14082 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14083 break 2
14084 fi
14085done
98418dba
CW
14086done
14087
14088 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 14089fi
503d2be0 14090fi
98418dba
CW
14091liblockfile=$ac_cv_prog_liblockfile
14092if test -n "$liblockfile"; then
c0d27fcc 14093 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
14094echo "${ECHO_T}$liblockfile" >&6
14095else
c0d27fcc 14096 echo "$as_me:$LINENO: result: no" >&5
98418dba 14097echo "${ECHO_T}no" >&6
ba4481b5
DL
14098fi
14099
98418dba 14100 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 14101 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
14102This probably means that movemail could lose mail.
14103There may be a \`development' package to install containing liblockfile." >&5
14104echo "$as_me: error: Shared liblockfile found but can't link against it.
14105This probably means that movemail could lose mail.
14106There may be a \`development' package to install containing liblockfile." >&2;}
14107 { (exit 1); exit 1; }; }
98418dba 14108 else :
55597d70 14109 fi
98418dba 14110fi
503d2be0 14111
98418dba
CW
14112for ac_func in touchlock
14113do
14114as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14115echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14116echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14117if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14118 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 14119else
98418dba 14120 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14121/* confdefs.h. */
14122_ACEOF
14123cat confdefs.h >>conftest.$ac_ext
14124cat >>conftest.$ac_ext <<_ACEOF
14125/* end confdefs.h. */
edfaf76d
LK
14126/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14127 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14128#define $ac_func innocuous_$ac_func
14129
98418dba 14130/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14131 which can conflict with char $ac_func (); below.
14132 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14133 <limits.h> exists even on freestanding compilers. */
edfaf76d 14134
19650fd6
AS
14135#ifdef __STDC__
14136# include <limits.h>
14137#else
14138# include <assert.h>
14139#endif
edfaf76d
LK
14140
14141#undef $ac_func
14142
457b792c 14143/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14144#ifdef __cplusplus
14145extern "C"
19650fd6 14146{
503d2be0 14147#endif
457b792c 14148/* We use char because int might match the return type of a gcc2
503d2be0 14149 builtin and then its argument prototype would still apply. */
98418dba 14150char $ac_func ();
98418dba
CW
14151/* The GNU C library defines this for functions which it implements
14152 to always fail with ENOSYS. Some functions are actually named
14153 something starting with __ and the normal name is an alias. */
14154#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14155choke me
14156#else
19650fd6
AS
14157char (*f) () = $ac_func;
14158#endif
14159#ifdef __cplusplus
14160}
cd958eb3
MB
14161#endif
14162
19650fd6
AS
14163int
14164main ()
14165{
14166return f != $ac_func;
503d2be0
AS
14167 ;
14168 return 0;
14169}
14170_ACEOF
14171rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14172if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14173 (eval $ac_link) 2>conftest.er1
503d2be0 14174 ac_status=$?
edfaf76d
LK
14175 grep -v '^ *+' conftest.er1 >conftest.err
14176 rm -f conftest.er1
14177 cat conftest.err >&5
c0d27fcc 14178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14179 (exit $ac_status); } &&
e143ad11
AS
14180 { ac_try='test -z "$ac_c_werror_flag"
14181 || test ! -s conftest.err'
edfaf76d
LK
14182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14183 (eval $ac_try) 2>&5
14184 ac_status=$?
14185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14186 (exit $ac_status); }; } &&
14187 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14189 (eval $ac_try) 2>&5
14190 ac_status=$?
c0d27fcc 14191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14192 (exit $ac_status); }; }; then
98418dba 14193 eval "$as_ac_var=yes"
503d2be0
AS
14194else
14195 echo "$as_me: failed program was:" >&5
19650fd6
AS
14196sed 's/^/| /' conftest.$ac_ext >&5
14197
98418dba 14198eval "$as_ac_var=no"
503d2be0 14199fi
edfaf76d
LK
14200rm -f conftest.err conftest.$ac_objext \
14201 conftest$ac_exeext conftest.$ac_ext
503d2be0 14202fi
c0d27fcc 14203echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14204echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14205if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14206 cat >>confdefs.h <<_ACEOF
98418dba 14207#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14208_ACEOF
457b792c 14209
457b792c 14210fi
98418dba 14211done
457b792c 14212
c0d27fcc 14213
98418dba
CW
14214for ac_header in maillock.h
14215do
14216as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14217if eval "test \"\${$as_ac_Header+set}\" = set"; then
14218 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
14219echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14220if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 14221 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14222fi
14223echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14224echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 14225else
c0d27fcc
MR
14226 # Is the header compilable?
14227echo "$as_me:$LINENO: checking $ac_header usability" >&5
14228echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14229cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14230/* confdefs.h. */
14231_ACEOF
14232cat confdefs.h >>conftest.$ac_ext
14233cat >>conftest.$ac_ext <<_ACEOF
14234/* end confdefs.h. */
c0d27fcc
MR
14235$ac_includes_default
14236#include <$ac_header>
14237_ACEOF
14238rm -f conftest.$ac_objext
14239if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14240 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14241 ac_status=$?
edfaf76d
LK
14242 grep -v '^ *+' conftest.er1 >conftest.err
14243 rm -f conftest.er1
14244 cat conftest.err >&5
c0d27fcc
MR
14245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14246 (exit $ac_status); } &&
e143ad11
AS
14247 { ac_try='test -z "$ac_c_werror_flag"
14248 || test ! -s conftest.err'
edfaf76d
LK
14249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14250 (eval $ac_try) 2>&5
14251 ac_status=$?
14252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14253 (exit $ac_status); }; } &&
14254 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14256 (eval $ac_try) 2>&5
14257 ac_status=$?
14258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14259 (exit $ac_status); }; }; then
14260 ac_header_compiler=yes
14261else
14262 echo "$as_me: failed program was:" >&5
19650fd6
AS
14263sed 's/^/| /' conftest.$ac_ext >&5
14264
c0d27fcc
MR
14265ac_header_compiler=no
14266fi
edfaf76d 14267rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14268echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14269echo "${ECHO_T}$ac_header_compiler" >&6
14270
14271# Is the header present?
14272echo "$as_me:$LINENO: checking $ac_header presence" >&5
14273echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14274cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14275/* confdefs.h. */
14276_ACEOF
14277cat confdefs.h >>conftest.$ac_ext
14278cat >>conftest.$ac_ext <<_ACEOF
14279/* end confdefs.h. */
98418dba 14280#include <$ac_header>
503d2be0 14281_ACEOF
c0d27fcc 14282if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 14283 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 14284 ac_status=$?
6bae0ccf 14285 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14286 rm -f conftest.er1
14287 cat conftest.err >&5
c0d27fcc 14288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
14289 (exit $ac_status); } >/dev/null; then
14290 if test -s conftest.err; then
14291 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14292 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
14293 else
14294 ac_cpp_err=
14295 fi
503d2be0 14296else
98418dba 14297 ac_cpp_err=yes
503d2be0 14298fi
98418dba 14299if test -z "$ac_cpp_err"; then
c0d27fcc 14300 ac_header_preproc=yes
98418dba
CW
14301else
14302 echo "$as_me: failed program was:" >&5
19650fd6
AS
14303sed 's/^/| /' conftest.$ac_ext >&5
14304
c0d27fcc 14305 ac_header_preproc=no
503d2be0 14306fi
98418dba 14307rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14308echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14309echo "${ECHO_T}$ac_header_preproc" >&6
14310
14311# So? What about this header?
edfaf76d
LK
14312case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14313 yes:no: )
c0d27fcc
MR
14314 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14315echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14316 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14317echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14318 ac_header_preproc=yes
19650fd6 14319 ;;
edfaf76d 14320 no:yes:* )
c0d27fcc
MR
14321 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14322echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14323 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14324echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14325 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14326echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14327 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14328echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14329 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14330echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14331 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14332echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14333 (
14334 cat <<\_ASBOX
edfaf76d
LK
14335## ------------------------------------------ ##
14336## Report this to the AC_PACKAGE_NAME lists. ##
14337## ------------------------------------------ ##
19650fd6
AS
14338_ASBOX
14339 ) |
14340 sed "s/^/$as_me: WARNING: /" >&2
14341 ;;
c0d27fcc
MR
14342esac
14343echo "$as_me:$LINENO: checking for $ac_header" >&5
14344echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14345if eval "test \"\${$as_ac_Header+set}\" = set"; then
14346 echo $ECHO_N "(cached) $ECHO_C" >&6
14347else
edfaf76d 14348 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14349fi
c0d27fcc 14350echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14351echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14352
14353fi
98418dba 14354if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14355 cat >>confdefs.h <<_ACEOF
98418dba 14356#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14357_ACEOF
48d4b120 14358
ba4481b5 14359fi
c0d27fcc 14360
98418dba
CW
14361done
14362
c0d27fcc
MR
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
14415
14416
14417
22044edf
DL
14418
14419
c0d27fcc 14420
b0e44248
RB
14421
14422
973a76b1
DL
14423
14424
14425
cd958eb3 14426
25ca0bca 14427
ea92fc9f 14428
e2fcf543 14429
c0d27fcc
MR
14430
14431
98418dba 14432for ac_func in gethostname getdomainname dup2 \
e2fcf543 14433rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
98418dba
CW
14434random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
14435strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 14436utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
14437__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
14438sendto recvfrom getsockopt setsockopt getsockname getpeername \
b0e44248 14439gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
4489ece2 14440memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
14441do
14442as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14443echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14444echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14445if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14446 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14447else
503d2be0 14448 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14449/* confdefs.h. */
14450_ACEOF
14451cat confdefs.h >>conftest.$ac_ext
14452cat >>conftest.$ac_ext <<_ACEOF
14453/* end confdefs.h. */
edfaf76d
LK
14454/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14455 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14456#define $ac_func innocuous_$ac_func
14457
98418dba 14458/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14459 which can conflict with char $ac_func (); below.
14460 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14461 <limits.h> exists even on freestanding compilers. */
edfaf76d 14462
19650fd6
AS
14463#ifdef __STDC__
14464# include <limits.h>
14465#else
14466# include <assert.h>
14467#endif
edfaf76d
LK
14468
14469#undef $ac_func
14470
ba4481b5 14471/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14472#ifdef __cplusplus
14473extern "C"
19650fd6 14474{
503d2be0 14475#endif
ba4481b5 14476/* We use char because int might match the return type of a gcc2
503d2be0 14477 builtin and then its argument prototype would still apply. */
98418dba 14478char $ac_func ();
98418dba
CW
14479/* The GNU C library defines this for functions which it implements
14480 to always fail with ENOSYS. Some functions are actually named
14481 something starting with __ and the normal name is an alias. */
14482#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14483choke me
14484#else
19650fd6
AS
14485char (*f) () = $ac_func;
14486#endif
14487#ifdef __cplusplus
14488}
98418dba
CW
14489#endif
14490
19650fd6
AS
14491int
14492main ()
14493{
14494return f != $ac_func;
503d2be0
AS
14495 ;
14496 return 0;
14497}
14498_ACEOF
14499rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14500if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14501 (eval $ac_link) 2>conftest.er1
503d2be0 14502 ac_status=$?
edfaf76d
LK
14503 grep -v '^ *+' conftest.er1 >conftest.err
14504 rm -f conftest.er1
14505 cat conftest.err >&5
c0d27fcc 14506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14507 (exit $ac_status); } &&
e143ad11
AS
14508 { ac_try='test -z "$ac_c_werror_flag"
14509 || test ! -s conftest.err'
c0d27fcc 14510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14511 (eval $ac_try) 2>&5
14512 ac_status=$?
c0d27fcc 14513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
14514 (exit $ac_status); }; } &&
14515 { ac_try='test -s conftest$ac_exeext'
14516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14517 (eval $ac_try) 2>&5
14518 ac_status=$?
14519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14520 (exit $ac_status); }; }; then
98418dba 14521 eval "$as_ac_var=yes"
503d2be0
AS
14522else
14523 echo "$as_me: failed program was:" >&5
19650fd6
AS
14524sed 's/^/| /' conftest.$ac_ext >&5
14525
98418dba 14526eval "$as_ac_var=no"
503d2be0 14527fi
edfaf76d
LK
14528rm -f conftest.err conftest.$ac_objext \
14529 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14530fi
c0d27fcc 14531echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14532echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14533if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14534 cat >>confdefs.h <<_ACEOF
98418dba 14535#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14536_ACEOF
ba4481b5 14537
ba4481b5 14538fi
98418dba 14539done
ba4481b5 14540
c0d27fcc
MR
14541
14542
98418dba
CW
14543for ac_header in sys/un.h
14544do
14545as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14546if eval "test \"\${$as_ac_Header+set}\" = set"; then
14547 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
14548echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14549if eval "test \"\${$as_ac_Header+set}\" = set"; then
14550 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14551fi
14552echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14553echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 14554else
c0d27fcc
MR
14555 # Is the header compilable?
14556echo "$as_me:$LINENO: checking $ac_header usability" >&5
14557echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14558cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14559/* confdefs.h. */
14560_ACEOF
14561cat confdefs.h >>conftest.$ac_ext
14562cat >>conftest.$ac_ext <<_ACEOF
14563/* end confdefs.h. */
c0d27fcc
MR
14564$ac_includes_default
14565#include <$ac_header>
14566_ACEOF
14567rm -f conftest.$ac_objext
14568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14569 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14570 ac_status=$?
edfaf76d
LK
14571 grep -v '^ *+' conftest.er1 >conftest.err
14572 rm -f conftest.er1
14573 cat conftest.err >&5
c0d27fcc
MR
14574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14575 (exit $ac_status); } &&
e143ad11
AS
14576 { ac_try='test -z "$ac_c_werror_flag"
14577 || test ! -s conftest.err'
edfaf76d
LK
14578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14579 (eval $ac_try) 2>&5
14580 ac_status=$?
14581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14582 (exit $ac_status); }; } &&
14583 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14585 (eval $ac_try) 2>&5
14586 ac_status=$?
14587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14588 (exit $ac_status); }; }; then
14589 ac_header_compiler=yes
14590else
14591 echo "$as_me: failed program was:" >&5
19650fd6
AS
14592sed 's/^/| /' conftest.$ac_ext >&5
14593
c0d27fcc
MR
14594ac_header_compiler=no
14595fi
edfaf76d 14596rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14597echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14598echo "${ECHO_T}$ac_header_compiler" >&6
14599
14600# Is the header present?
14601echo "$as_me:$LINENO: checking $ac_header presence" >&5
14602echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14603cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14604/* confdefs.h. */
14605_ACEOF
14606cat confdefs.h >>conftest.$ac_ext
14607cat >>conftest.$ac_ext <<_ACEOF
14608/* end confdefs.h. */
98418dba 14609#include <$ac_header>
503d2be0 14610_ACEOF
c0d27fcc 14611if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14612 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14613 ac_status=$?
6bae0ccf 14614 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14615 rm -f conftest.er1
14616 cat conftest.err >&5
c0d27fcc 14617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14618 (exit $ac_status); } >/dev/null; then
14619 if test -s conftest.err; then
14620 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14621 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14622 else
14623 ac_cpp_err=
14624 fi
14625else
14626 ac_cpp_err=yes
14627fi
14628if test -z "$ac_cpp_err"; then
c0d27fcc 14629 ac_header_preproc=yes
ba4481b5 14630else
503d2be0 14631 echo "$as_me: failed program was:" >&5
19650fd6
AS
14632sed 's/^/| /' conftest.$ac_ext >&5
14633
c0d27fcc 14634 ac_header_preproc=no
ba4481b5 14635fi
503d2be0 14636rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14637echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14638echo "${ECHO_T}$ac_header_preproc" >&6
14639
14640# So? What about this header?
edfaf76d
LK
14641case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14642 yes:no: )
c0d27fcc
MR
14643 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14644echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14645 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14646echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14647 ac_header_preproc=yes
19650fd6 14648 ;;
edfaf76d 14649 no:yes:* )
c0d27fcc
MR
14650 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14651echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14652 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14653echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14654 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14655echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14656 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14657echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14658 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14659echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14660 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14661echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14662 (
14663 cat <<\_ASBOX
edfaf76d
LK
14664## ------------------------------------------ ##
14665## Report this to the AC_PACKAGE_NAME lists. ##
14666## ------------------------------------------ ##
19650fd6
AS
14667_ASBOX
14668 ) |
14669 sed "s/^/$as_me: WARNING: /" >&2
14670 ;;
c0d27fcc
MR
14671esac
14672echo "$as_me:$LINENO: checking for $ac_header" >&5
14673echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14674if eval "test \"\${$as_ac_Header+set}\" = set"; then
14675 echo $ECHO_N "(cached) $ECHO_C" >&6
14676else
edfaf76d 14677 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14678fi
c0d27fcc 14679echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 14680echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14681
14682fi
925c2f3f 14683if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14684 cat >>confdefs.h <<_ACEOF
925c2f3f 14685#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14686_ACEOF
503d2be0 14687
925c2f3f 14688fi
c0d27fcc 14689
925c2f3f
EZ
14690done
14691
c0d27fcc
MR
14692
14693
14694
edfaf76d
LK
14695
14696for ac_header in stdlib.h sys/time.h unistd.h
925c2f3f
EZ
14697do
14698as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14699if eval "test \"\${$as_ac_Header+set}\" = set"; then
14700 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
14701echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14702if eval "test \"\${$as_ac_Header+set}\" = set"; then
14703 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14704fi
14705echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14706echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 14707else
c0d27fcc
MR
14708 # Is the header compilable?
14709echo "$as_me:$LINENO: checking $ac_header usability" >&5
14710echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14711cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14712/* confdefs.h. */
14713_ACEOF
14714cat confdefs.h >>conftest.$ac_ext
14715cat >>conftest.$ac_ext <<_ACEOF
14716/* end confdefs.h. */
c0d27fcc
MR
14717$ac_includes_default
14718#include <$ac_header>
14719_ACEOF
14720rm -f conftest.$ac_objext
14721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14722 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14723 ac_status=$?
edfaf76d
LK
14724 grep -v '^ *+' conftest.er1 >conftest.err
14725 rm -f conftest.er1
14726 cat conftest.err >&5
c0d27fcc
MR
14727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14728 (exit $ac_status); } &&
e143ad11
AS
14729 { ac_try='test -z "$ac_c_werror_flag"
14730 || test ! -s conftest.err'
edfaf76d
LK
14731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14732 (eval $ac_try) 2>&5
14733 ac_status=$?
14734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14735 (exit $ac_status); }; } &&
14736 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14738 (eval $ac_try) 2>&5
14739 ac_status=$?
14740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14741 (exit $ac_status); }; }; then
14742 ac_header_compiler=yes
14743else
14744 echo "$as_me: failed program was:" >&5
19650fd6
AS
14745sed 's/^/| /' conftest.$ac_ext >&5
14746
c0d27fcc
MR
14747ac_header_compiler=no
14748fi
edfaf76d 14749rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14750echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14751echo "${ECHO_T}$ac_header_compiler" >&6
14752
14753# Is the header present?
14754echo "$as_me:$LINENO: checking $ac_header presence" >&5
14755echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14756cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14757/* confdefs.h. */
14758_ACEOF
14759cat confdefs.h >>conftest.$ac_ext
14760cat >>conftest.$ac_ext <<_ACEOF
14761/* end confdefs.h. */
98418dba 14762#include <$ac_header>
503d2be0 14763_ACEOF
c0d27fcc 14764if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14765 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14766 ac_status=$?
6bae0ccf 14767 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14768 rm -f conftest.er1
14769 cat conftest.err >&5
c0d27fcc 14770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14771 (exit $ac_status); } >/dev/null; then
14772 if test -s conftest.err; then
14773 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14774 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14775 else
14776 ac_cpp_err=
14777 fi
14778else
14779 ac_cpp_err=yes
14780fi
14781if test -z "$ac_cpp_err"; then
c0d27fcc 14782 ac_header_preproc=yes
98418dba
CW
14783else
14784 echo "$as_me: failed program was:" >&5
19650fd6
AS
14785sed 's/^/| /' conftest.$ac_ext >&5
14786
c0d27fcc 14787 ac_header_preproc=no
98418dba
CW
14788fi
14789rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14790echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14791echo "${ECHO_T}$ac_header_preproc" >&6
14792
14793# So? What about this header?
edfaf76d
LK
14794case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14795 yes:no: )
c0d27fcc
MR
14796 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14797echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14798 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14799echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14800 ac_header_preproc=yes
19650fd6 14801 ;;
edfaf76d 14802 no:yes:* )
c0d27fcc
MR
14803 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14804echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14805 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14806echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14807 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14808echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14809 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14810echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14811 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14812echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14813 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14814echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14815 (
14816 cat <<\_ASBOX
edfaf76d
LK
14817## ------------------------------------------ ##
14818## Report this to the AC_PACKAGE_NAME lists. ##
14819## ------------------------------------------ ##
19650fd6
AS
14820_ASBOX
14821 ) |
14822 sed "s/^/$as_me: WARNING: /" >&2
14823 ;;
c0d27fcc
MR
14824esac
14825echo "$as_me:$LINENO: checking for $ac_header" >&5
14826echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14827if eval "test \"\${$as_ac_Header+set}\" = set"; then
14828 echo $ECHO_N "(cached) $ECHO_C" >&6
14829else
edfaf76d 14830 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 14831fi
c0d27fcc 14832echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14833echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14834
14835fi
98418dba 14836if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14837 cat >>confdefs.h <<_ACEOF
98418dba 14838#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14839_ACEOF
98418dba
CW
14840
14841fi
c0d27fcc 14842
98418dba
CW
14843done
14844
c0d27fcc 14845
98418dba
CW
14846for ac_func in alarm
14847do
14848as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14849echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14850echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14851if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14852 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14853else
98418dba 14854 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14855/* confdefs.h. */
14856_ACEOF
14857cat confdefs.h >>conftest.$ac_ext
14858cat >>conftest.$ac_ext <<_ACEOF
14859/* end confdefs.h. */
edfaf76d
LK
14860/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14861 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14862#define $ac_func innocuous_$ac_func
14863
98418dba 14864/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14865 which can conflict with char $ac_func (); below.
14866 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14867 <limits.h> exists even on freestanding compilers. */
edfaf76d 14868
19650fd6
AS
14869#ifdef __STDC__
14870# include <limits.h>
14871#else
14872# include <assert.h>
14873#endif
edfaf76d
LK
14874
14875#undef $ac_func
14876
ba4481b5 14877/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14878#ifdef __cplusplus
14879extern "C"
19650fd6 14880{
503d2be0 14881#endif
ba4481b5 14882/* We use char because int might match the return type of a gcc2
503d2be0 14883 builtin and then its argument prototype would still apply. */
98418dba 14884char $ac_func ();
98418dba
CW
14885/* The GNU C library defines this for functions which it implements
14886 to always fail with ENOSYS. Some functions are actually named
14887 something starting with __ and the normal name is an alias. */
14888#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14889choke me
14890#else
19650fd6
AS
14891char (*f) () = $ac_func;
14892#endif
14893#ifdef __cplusplus
14894}
98418dba
CW
14895#endif
14896
19650fd6
AS
14897int
14898main ()
14899{
14900return f != $ac_func;
503d2be0
AS
14901 ;
14902 return 0;
14903}
14904_ACEOF
14905rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14906if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14907 (eval $ac_link) 2>conftest.er1
503d2be0 14908 ac_status=$?
edfaf76d
LK
14909 grep -v '^ *+' conftest.er1 >conftest.err
14910 rm -f conftest.er1
14911 cat conftest.err >&5
c0d27fcc 14912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14913 (exit $ac_status); } &&
e143ad11
AS
14914 { ac_try='test -z "$ac_c_werror_flag"
14915 || test ! -s conftest.err'
edfaf76d
LK
14916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14917 (eval $ac_try) 2>&5
14918 ac_status=$?
14919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14920 (exit $ac_status); }; } &&
14921 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14923 (eval $ac_try) 2>&5
14924 ac_status=$?
c0d27fcc 14925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14926 (exit $ac_status); }; }; then
98418dba 14927 eval "$as_ac_var=yes"
503d2be0
AS
14928else
14929 echo "$as_me: failed program was:" >&5
19650fd6
AS
14930sed 's/^/| /' conftest.$ac_ext >&5
14931
98418dba 14932eval "$as_ac_var=no"
503d2be0 14933fi
edfaf76d
LK
14934rm -f conftest.err conftest.$ac_objext \
14935 conftest$ac_exeext conftest.$ac_ext
ffe36136 14936fi
c0d27fcc 14937echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14938echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14939if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14940 cat >>confdefs.h <<_ACEOF
98418dba 14941#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14942_ACEOF
ffe36136 14943
ba4481b5 14944fi
98418dba 14945done
ba4481b5 14946
c0d27fcc 14947echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
14948echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
14949if test "${ac_cv_func_working_mktime+set}" = set; then
14950 echo $ECHO_N "(cached) $ECHO_C" >&6
14951else
14952 if test "$cross_compiling" = yes; then
14953 ac_cv_func_working_mktime=no
14954else
14955 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14956/* confdefs.h. */
14957_ACEOF
14958cat confdefs.h >>conftest.$ac_ext
14959cat >>conftest.$ac_ext <<_ACEOF
14960/* end confdefs.h. */
98418dba
CW
14961/* Test program from Paul Eggert and Tony Leneis. */
14962#if TIME_WITH_SYS_TIME
14963# include <sys/time.h>
14964# include <time.h>
14965#else
14966# if HAVE_SYS_TIME_H
14967# include <sys/time.h>
14968# else
14969# include <time.h>
14970# endif
14971#endif
ba4481b5 14972
edfaf76d
LK
14973#if HAVE_STDLIB_H
14974# include <stdlib.h>
14975#endif
14976
98418dba
CW
14977#if HAVE_UNISTD_H
14978# include <unistd.h>
14979#endif
ba4481b5 14980
98418dba
CW
14981#if !HAVE_ALARM
14982# define alarm(X) /* empty */
14983#endif
df645f7c 14984
98418dba
CW
14985/* Work around redefinition to rpl_putenv by other config tests. */
14986#undef putenv
df645f7c 14987
98418dba 14988static time_t time_t_max;
edfaf76d 14989static time_t time_t_min;
df645f7c 14990
98418dba 14991/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
14992static char *tz_strings[] = {
14993 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
14994 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
14995};
14996#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 14997
98418dba
CW
14998/* Fail if mktime fails to convert a date in the spring-forward gap.
14999 Based on a problem report from Andreas Jaeger. */
15000static void
15001spring_forward_gap ()
15002{
15003 /* glibc (up to about 1998-10-07) failed this test. */
15004 struct tm tm;
15005
15006 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15007 instead of "TZ=America/Vancouver" in order to detect the bug even
15008 on systems that don't support the Olson extension, or don't have the
15009 full zoneinfo tables installed. */
15010 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
15011
15012 tm.tm_year = 98;
15013 tm.tm_mon = 3;
15014 tm.tm_mday = 5;
15015 tm.tm_hour = 2;
15016 tm.tm_min = 0;
15017 tm.tm_sec = 0;
15018 tm.tm_isdst = -1;
15019 if (mktime (&tm) == (time_t)-1)
15020 exit (1);
15021}
15022
15023static void
edfaf76d 15024mktime_test1 (now)
98418dba
CW
15025 time_t now;
15026{
15027 struct tm *lt;
15028 if ((lt = localtime (&now)) && mktime (lt) != now)
15029 exit (1);
edfaf76d
LK
15030}
15031
15032static void
15033mktime_test (now)
15034 time_t now;
15035{
15036 mktime_test1 (now);
15037 mktime_test1 ((time_t) (time_t_max - now));
15038 mktime_test1 ((time_t) (time_t_min + now));
98418dba
CW
15039}
15040
15041static void
15042irix_6_4_bug ()
15043{
15044 /* Based on code from Ariel Faigon. */
15045 struct tm tm;
15046 tm.tm_year = 96;
15047 tm.tm_mon = 3;
15048 tm.tm_mday = 0;
15049 tm.tm_hour = 0;
15050 tm.tm_min = 0;
15051 tm.tm_sec = 0;
15052 tm.tm_isdst = -1;
15053 mktime (&tm);
15054 if (tm.tm_mon != 2 || tm.tm_mday != 31)
15055 exit (1);
15056}
15057
15058static void
15059bigtime_test (j)
15060 int j;
15061{
15062 struct tm tm;
15063 time_t now;
15064 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
15065 now = mktime (&tm);
15066 if (now != (time_t) -1)
15067 {
15068 struct tm *lt = localtime (&now);
15069 if (! (lt
15070 && lt->tm_year == tm.tm_year
15071 && lt->tm_mon == tm.tm_mon
15072 && lt->tm_mday == tm.tm_mday
15073 && lt->tm_hour == tm.tm_hour
15074 && lt->tm_min == tm.tm_min
15075 && lt->tm_sec == tm.tm_sec
15076 && lt->tm_yday == tm.tm_yday
15077 && lt->tm_wday == tm.tm_wday
15078 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
15079 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
15080 exit (1);
15081 }
15082}
15083
15084int
15085main ()
15086{
15087 time_t t, delta;
15088 int i, j;
15089
15090 /* This test makes some buggy mktime implementations loop.
15091 Give up after 60 seconds; a mktime slower than that
15092 isn't worth using anyway. */
15093 alarm (60);
15094
15095 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
15096 continue;
15097 time_t_max--;
edfaf76d
LK
15098 if ((time_t) -1 < 0)
15099 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
15100 continue;
98418dba
CW
15101 delta = time_t_max / 997; /* a suitable prime number */
15102 for (i = 0; i < N_STRINGS; i++)
15103 {
15104 if (tz_strings[i])
15105 putenv (tz_strings[i]);
503d2be0 15106
98418dba
CW
15107 for (t = 0; t <= time_t_max - delta; t += delta)
15108 mktime_test (t);
edfaf76d
LK
15109 mktime_test ((time_t) 1);
15110 mktime_test ((time_t) (60 * 60));
15111 mktime_test ((time_t) (60 * 60 * 24));
98418dba
CW
15112
15113 for (j = 1; 0 < j; j *= 2)
edfaf76d 15114 bigtime_test (j);
98418dba
CW
15115 bigtime_test (j - 1);
15116 }
15117 irix_6_4_bug ();
15118 spring_forward_gap ();
15119 exit (0);
503d2be0
AS
15120}
15121_ACEOF
98418dba 15122rm -f conftest$ac_exeext
c0d27fcc 15123if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15124 (eval $ac_link) 2>&5
15125 ac_status=$?
c0d27fcc 15126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15127 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 15128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15129 (eval $ac_try) 2>&5
15130 ac_status=$?
c0d27fcc 15131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15132 (exit $ac_status); }; }; then
98418dba 15133 ac_cv_func_working_mktime=yes
503d2be0 15134else
98418dba
CW
15135 echo "$as_me: program exited with status $ac_status" >&5
15136echo "$as_me: failed program was:" >&5
19650fd6
AS
15137sed 's/^/| /' conftest.$ac_ext >&5
15138
c0d27fcc 15139( exit $ac_status )
98418dba 15140ac_cv_func_working_mktime=no
503d2be0 15141fi
edfaf76d 15142rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 15143fi
ba4481b5 15144fi
c0d27fcc 15145echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
15146echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
15147if test $ac_cv_func_working_mktime = no; then
edfaf76d
LK
15148 case $LIBOBJS in
15149 "mktime.$ac_objext" | \
15150 *" mktime.$ac_objext" | \
15151 "mktime.$ac_objext "* | \
15152 *" mktime.$ac_objext "* ) ;;
15153 *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;;
15154esac
15155
ba4481b5
DL
15156fi
15157
98418dba 15158if test "$ac_cv_func_working_mktime" = no; then
b936fae4 15159
c0d27fcc 15160cat >>confdefs.h <<\_ACEOF
98418dba 15161#define BROKEN_MKTIME 1
c0d27fcc 15162_ACEOF
ba4481b5 15163
ba4481b5 15164fi
503d2be0 15165
98418dba
CW
15166ac_have_func=no # yes means we've found a way to get the load average.
15167
6bae0ccf
DL
15168# Make sure getloadavg.c is where it belongs, at configure-time.
15169test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
15170 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
15171echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
15172 { (exit 1); exit 1; }; }
15173
98418dba
CW
15174ac_save_LIBS=$LIBS
15175
15176# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 15177(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
15178echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
15179if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 15180 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15181else
503d2be0 15182 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15183/* confdefs.h. */
15184_ACEOF
15185cat confdefs.h >>conftest.$ac_ext
15186cat >>conftest.$ac_ext <<_ACEOF
15187/* end confdefs.h. */
edfaf76d
LK
15188/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
15189 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15190#define getloadavg innocuous_getloadavg
15191
98418dba 15192/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15193 which can conflict with char getloadavg (); below.
15194 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15195 <limits.h> exists even on freestanding compilers. */
edfaf76d 15196
19650fd6
AS
15197#ifdef __STDC__
15198# include <limits.h>
15199#else
15200# include <assert.h>
15201#endif
edfaf76d
LK
15202
15203#undef getloadavg
15204
ba4481b5 15205/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15206#ifdef __cplusplus
15207extern "C"
19650fd6 15208{
503d2be0 15209#endif
ba4481b5 15210/* We use char because int might match the return type of a gcc2
503d2be0 15211 builtin and then its argument prototype would still apply. */
98418dba 15212char getloadavg ();
98418dba
CW
15213/* The GNU C library defines this for functions which it implements
15214 to always fail with ENOSYS. Some functions are actually named
15215 something starting with __ and the normal name is an alias. */
15216#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
15217choke me
15218#else
19650fd6
AS
15219char (*f) () = getloadavg;
15220#endif
15221#ifdef __cplusplus
15222}
cd958eb3
MB
15223#endif
15224
19650fd6
AS
15225int
15226main ()
15227{
15228return f != getloadavg;
503d2be0
AS
15229 ;
15230 return 0;
15231}
15232_ACEOF
15233rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15234if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15235 (eval $ac_link) 2>conftest.er1
503d2be0 15236 ac_status=$?
edfaf76d
LK
15237 grep -v '^ *+' conftest.er1 >conftest.err
15238 rm -f conftest.er1
15239 cat conftest.err >&5
c0d27fcc 15240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15241 (exit $ac_status); } &&
e143ad11
AS
15242 { ac_try='test -z "$ac_c_werror_flag"
15243 || test ! -s conftest.err'
edfaf76d
LK
15244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15245 (eval $ac_try) 2>&5
15246 ac_status=$?
15247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15248 (exit $ac_status); }; } &&
15249 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15251 (eval $ac_try) 2>&5
15252 ac_status=$?
c0d27fcc 15253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15254 (exit $ac_status); }; }; then
98418dba 15255 ac_cv_func_getloadavg=yes
503d2be0
AS
15256else
15257 echo "$as_me: failed program was:" >&5
19650fd6
AS
15258sed 's/^/| /' conftest.$ac_ext >&5
15259
98418dba 15260ac_cv_func_getloadavg=no
503d2be0 15261fi
edfaf76d
LK
15262rm -f conftest.err conftest.$ac_objext \
15263 conftest$ac_exeext conftest.$ac_ext
ba4481b5 15264fi
c0d27fcc 15265echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
15266echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
15267if test $ac_cv_func_getloadavg = yes; then
15268 exit 0
15269else
15270 exit 1
ba4481b5 15271fi
98418dba 15272) && ac_have_func=yes
ba4481b5 15273
98418dba 15274# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 15275
98418dba
CW
15276for ac_func in pstat_getdynamic
15277do
15278as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15279echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
15280echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15281if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 15282 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15283else
503d2be0 15284 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15285/* confdefs.h. */
15286_ACEOF
15287cat confdefs.h >>conftest.$ac_ext
15288cat >>conftest.$ac_ext <<_ACEOF
15289/* end confdefs.h. */
edfaf76d
LK
15290/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15291 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15292#define $ac_func innocuous_$ac_func
15293
98418dba 15294/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15295 which can conflict with char $ac_func (); below.
15296 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15297 <limits.h> exists even on freestanding compilers. */
edfaf76d 15298
19650fd6
AS
15299#ifdef __STDC__
15300# include <limits.h>
15301#else
15302# include <assert.h>
15303#endif
edfaf76d
LK
15304
15305#undef $ac_func
15306
ba4481b5 15307/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15308#ifdef __cplusplus
15309extern "C"
19650fd6 15310{
503d2be0 15311#endif
ba4481b5 15312/* We use char because int might match the return type of a gcc2
503d2be0 15313 builtin and then its argument prototype would still apply. */
98418dba 15314char $ac_func ();
98418dba
CW
15315/* The GNU C library defines this for functions which it implements
15316 to always fail with ENOSYS. Some functions are actually named
15317 something starting with __ and the normal name is an alias. */
15318#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15319choke me
15320#else
19650fd6
AS
15321char (*f) () = $ac_func;
15322#endif
15323#ifdef __cplusplus
15324}
98418dba
CW
15325#endif
15326
19650fd6
AS
15327int
15328main ()
15329{
15330return f != $ac_func;
98418dba
CW
15331 ;
15332 return 0;
15333}
f21fadcc 15334_ACEOF
98418dba 15335rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15337 (eval $ac_link) 2>conftest.er1
f21fadcc 15338 ac_status=$?
edfaf76d
LK
15339 grep -v '^ *+' conftest.er1 >conftest.err
15340 rm -f conftest.er1
15341 cat conftest.err >&5
c0d27fcc 15342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15343 (exit $ac_status); } &&
e143ad11
AS
15344 { ac_try='test -z "$ac_c_werror_flag"
15345 || test ! -s conftest.err'
edfaf76d
LK
15346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15347 (eval $ac_try) 2>&5
15348 ac_status=$?
15349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15350 (exit $ac_status); }; } &&
15351 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15353 (eval $ac_try) 2>&5
15354 ac_status=$?
c0d27fcc 15355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15356 (exit $ac_status); }; }; then
15357 eval "$as_ac_var=yes"
f21fadcc
JD
15358else
15359 echo "$as_me: failed program was:" >&5
19650fd6
AS
15360sed 's/^/| /' conftest.$ac_ext >&5
15361
98418dba 15362eval "$as_ac_var=no"
f21fadcc 15363fi
edfaf76d
LK
15364rm -f conftest.err conftest.$ac_objext \
15365 conftest$ac_exeext conftest.$ac_ext
f21fadcc 15366fi
c0d27fcc 15367echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
15368echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15369if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15370 cat >>confdefs.h <<_ACEOF
98418dba 15371#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15372_ACEOF
98418dba
CW
15373
15374fi
15375done
15376
c0d27fcc 15377
98418dba
CW
15378# Solaris has libkstat which does not require root.
15379
c0d27fcc 15380echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
15381echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
15382if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
15383 echo $ECHO_N "(cached) $ECHO_C" >&6
15384else
15385 ac_check_lib_save_LIBS=$LIBS
98418dba 15386LIBS="-lkstat $LIBS"
f21fadcc 15387cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15388/* confdefs.h. */
15389_ACEOF
15390cat confdefs.h >>conftest.$ac_ext
15391cat >>conftest.$ac_ext <<_ACEOF
15392/* end confdefs.h. */
f21fadcc
JD
15393
15394/* Override any gcc2 internal prototype to avoid an error. */
15395#ifdef __cplusplus
15396extern "C"
15397#endif
15398/* We use char because int might match the return type of a gcc2
15399 builtin and then its argument prototype would still apply. */
98418dba 15400char kstat_open ();
f21fadcc
JD
15401int
15402main ()
15403{
98418dba 15404kstat_open ();
f21fadcc
JD
15405 ;
15406 return 0;
15407}
15408_ACEOF
15409rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15410if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15411 (eval $ac_link) 2>conftest.er1
f21fadcc 15412 ac_status=$?
edfaf76d
LK
15413 grep -v '^ *+' conftest.er1 >conftest.err
15414 rm -f conftest.er1
15415 cat conftest.err >&5
c0d27fcc 15416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 15417 (exit $ac_status); } &&
e143ad11
AS
15418 { ac_try='test -z "$ac_c_werror_flag"
15419 || test ! -s conftest.err'
edfaf76d
LK
15420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15421 (eval $ac_try) 2>&5
15422 ac_status=$?
15423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15424 (exit $ac_status); }; } &&
15425 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
15427 (eval $ac_try) 2>&5
15428 ac_status=$?
c0d27fcc 15429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 15430 (exit $ac_status); }; }; then
98418dba 15431 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
15432else
15433 echo "$as_me: failed program was:" >&5
19650fd6
AS
15434sed 's/^/| /' conftest.$ac_ext >&5
15435
98418dba 15436ac_cv_lib_kstat_kstat_open=no
f21fadcc 15437fi
edfaf76d
LK
15438rm -f conftest.err conftest.$ac_objext \
15439 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
15440LIBS=$ac_check_lib_save_LIBS
15441fi
c0d27fcc 15442echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
15443echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
15444if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 15445 cat >>confdefs.h <<_ACEOF
98418dba 15446#define HAVE_LIBKSTAT 1
c0d27fcc 15447_ACEOF
f21fadcc 15448
98418dba 15449 LIBS="-lkstat $LIBS"
f21fadcc 15450
f21fadcc
JD
15451fi
15452
98418dba
CW
15453test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
15454
15455# Some systems with -lutil have (and need) -lkvm as well, some do not.
15456# On Solaris, -lkvm requires nlist from -lelf, so check that first
15457# to get the right answer into the cache.
15458# For kstat on solaris, we need libelf to force the definition of SVR4 below.
15459if test $ac_have_func = no; then
c0d27fcc 15460 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
15461echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
15462if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 15463 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15464else
98418dba
CW
15465 ac_check_lib_save_LIBS=$LIBS
15466LIBS="-lelf $LIBS"
15467cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15468/* confdefs.h. */
15469_ACEOF
15470cat confdefs.h >>conftest.$ac_ext
15471cat >>conftest.$ac_ext <<_ACEOF
15472/* end confdefs.h. */
98418dba
CW
15473
15474/* Override any gcc2 internal prototype to avoid an error. */
15475#ifdef __cplusplus
15476extern "C"
15477#endif
15478/* We use char because int might match the return type of a gcc2
15479 builtin and then its argument prototype would still apply. */
15480char elf_begin ();
503d2be0
AS
15481int
15482main ()
15483{
98418dba 15484elf_begin ();
503d2be0
AS
15485 ;
15486 return 0;
15487}
15488_ACEOF
15489rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15490if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15491 (eval $ac_link) 2>conftest.er1
503d2be0 15492 ac_status=$?
edfaf76d
LK
15493 grep -v '^ *+' conftest.er1 >conftest.err
15494 rm -f conftest.er1
15495 cat conftest.err >&5
c0d27fcc 15496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15497 (exit $ac_status); } &&
e143ad11
AS
15498 { ac_try='test -z "$ac_c_werror_flag"
15499 || test ! -s conftest.err'
edfaf76d
LK
15500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15501 (eval $ac_try) 2>&5
15502 ac_status=$?
15503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15504 (exit $ac_status); }; } &&
15505 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15507 (eval $ac_try) 2>&5
15508 ac_status=$?
c0d27fcc 15509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15510 (exit $ac_status); }; }; then
98418dba 15511 ac_cv_lib_elf_elf_begin=yes
ba4481b5 15512else
503d2be0 15513 echo "$as_me: failed program was:" >&5
19650fd6
AS
15514sed 's/^/| /' conftest.$ac_ext >&5
15515
98418dba 15516ac_cv_lib_elf_elf_begin=no
ba4481b5 15517fi
edfaf76d
LK
15518rm -f conftest.err conftest.$ac_objext \
15519 conftest$ac_exeext conftest.$ac_ext
98418dba 15520LIBS=$ac_check_lib_save_LIBS
ba4481b5 15521fi
c0d27fcc 15522echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
15523echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
15524if test $ac_cv_lib_elf_elf_begin = yes; then
15525 LIBS="-lelf $LIBS"
ba4481b5
DL
15526fi
15527
98418dba
CW
15528fi
15529if test $ac_have_func = no; then
c0d27fcc 15530 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
15531echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
15532if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 15533 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15534else
98418dba
CW
15535 ac_check_lib_save_LIBS=$LIBS
15536LIBS="-lkvm $LIBS"
15537cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15538/* confdefs.h. */
15539_ACEOF
15540cat confdefs.h >>conftest.$ac_ext
15541cat >>conftest.$ac_ext <<_ACEOF
15542/* end confdefs.h. */
98418dba
CW
15543
15544/* Override any gcc2 internal prototype to avoid an error. */
15545#ifdef __cplusplus
15546extern "C"
15547#endif
15548/* We use char because int might match the return type of a gcc2
15549 builtin and then its argument prototype would still apply. */
15550char kvm_open ();
503d2be0
AS
15551int
15552main ()
15553{
98418dba 15554kvm_open ();
503d2be0
AS
15555 ;
15556 return 0;
15557}
15558_ACEOF
15559rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15561 (eval $ac_link) 2>conftest.er1
503d2be0 15562 ac_status=$?
edfaf76d
LK
15563 grep -v '^ *+' conftest.er1 >conftest.err
15564 rm -f conftest.er1
15565 cat conftest.err >&5
c0d27fcc 15566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15567 (exit $ac_status); } &&
e143ad11
AS
15568 { ac_try='test -z "$ac_c_werror_flag"
15569 || test ! -s conftest.err'
edfaf76d
LK
15570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15571 (eval $ac_try) 2>&5
15572 ac_status=$?
15573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15574 (exit $ac_status); }; } &&
15575 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15577 (eval $ac_try) 2>&5
15578 ac_status=$?
c0d27fcc 15579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15580 (exit $ac_status); }; }; then
98418dba 15581 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
15582else
15583 echo "$as_me: failed program was:" >&5
19650fd6
AS
15584sed 's/^/| /' conftest.$ac_ext >&5
15585
98418dba 15586ac_cv_lib_kvm_kvm_open=no
503d2be0 15587fi
edfaf76d
LK
15588rm -f conftest.err conftest.$ac_objext \
15589 conftest$ac_exeext conftest.$ac_ext
98418dba 15590LIBS=$ac_check_lib_save_LIBS
503d2be0 15591fi
c0d27fcc 15592echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
15593echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
15594if test $ac_cv_lib_kvm_kvm_open = yes; then
15595 LIBS="-lkvm $LIBS"
ba4481b5
DL
15596fi
15597
98418dba 15598 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 15599 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
15600echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
15601if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 15602 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15603else
98418dba
CW
15604 ac_check_lib_save_LIBS=$LIBS
15605LIBS="-lutil $LIBS"
15606cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15607/* confdefs.h. */
15608_ACEOF
15609cat confdefs.h >>conftest.$ac_ext
15610cat >>conftest.$ac_ext <<_ACEOF
15611/* end confdefs.h. */
98418dba
CW
15612
15613/* Override any gcc2 internal prototype to avoid an error. */
15614#ifdef __cplusplus
15615extern "C"
15616#endif
15617/* We use char because int might match the return type of a gcc2
15618 builtin and then its argument prototype would still apply. */
15619char getloadavg ();
503d2be0
AS
15620int
15621main ()
15622{
98418dba 15623getloadavg ();
503d2be0
AS
15624 ;
15625 return 0;
15626}
15627_ACEOF
15628rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15629if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15630 (eval $ac_link) 2>conftest.er1
503d2be0 15631 ac_status=$?
edfaf76d
LK
15632 grep -v '^ *+' conftest.er1 >conftest.err
15633 rm -f conftest.er1
15634 cat conftest.err >&5
c0d27fcc 15635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15636 (exit $ac_status); } &&
e143ad11
AS
15637 { ac_try='test -z "$ac_c_werror_flag"
15638 || test ! -s conftest.err'
edfaf76d
LK
15639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15640 (eval $ac_try) 2>&5
15641 ac_status=$?
15642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15643 (exit $ac_status); }; } &&
15644 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
15645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15646 (eval $ac_try) 2>&5
15647 ac_status=$?
15648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15649 (exit $ac_status); }; }; then
15650 ac_cv_lib_util_getloadavg=yes
15651else
503d2be0 15652 echo "$as_me: failed program was:" >&5
19650fd6
AS
15653sed 's/^/| /' conftest.$ac_ext >&5
15654
98418dba 15655ac_cv_lib_util_getloadavg=no
ba4481b5 15656fi
edfaf76d
LK
15657rm -f conftest.err conftest.$ac_objext \
15658 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15659LIBS=$ac_check_lib_save_LIBS
15660fi
c0d27fcc 15661echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
15662echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
15663if test $ac_cv_lib_util_getloadavg = yes; then
15664 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 15665fi
503d2be0 15666
98418dba 15667fi
ba4481b5 15668
98418dba
CW
15669if test $ac_have_func = no; then
15670 # There is a commonly available library for RS/6000 AIX.
15671 # Since it is not a standard part of AIX, it might be installed locally.
15672 ac_getloadavg_LIBS=$LIBS
15673 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 15674 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
15675echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
15676if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 15677 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15678else
98418dba
CW
15679 ac_check_lib_save_LIBS=$LIBS
15680LIBS="-lgetloadavg $LIBS"
15681cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15682/* confdefs.h. */
15683_ACEOF
15684cat confdefs.h >>conftest.$ac_ext
15685cat >>conftest.$ac_ext <<_ACEOF
15686/* end confdefs.h. */
ba4481b5 15687
98418dba
CW
15688/* Override any gcc2 internal prototype to avoid an error. */
15689#ifdef __cplusplus
15690extern "C"
15691#endif
15692/* We use char because int might match the return type of a gcc2
15693 builtin and then its argument prototype would still apply. */
15694char getloadavg ();
98418dba
CW
15695int
15696main ()
15697{
15698getloadavg ();
15699 ;
15700 return 0;
15701}
503d2be0 15702_ACEOF
98418dba 15703rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15705 (eval $ac_link) 2>conftest.er1
98418dba 15706 ac_status=$?
edfaf76d
LK
15707 grep -v '^ *+' conftest.er1 >conftest.err
15708 rm -f conftest.er1
15709 cat conftest.err >&5
c0d27fcc 15710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15711 (exit $ac_status); } &&
e143ad11
AS
15712 { ac_try='test -z "$ac_c_werror_flag"
15713 || test ! -s conftest.err'
edfaf76d
LK
15714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15715 (eval $ac_try) 2>&5
15716 ac_status=$?
15717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15718 (exit $ac_status); }; } &&
15719 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15721 (eval $ac_try) 2>&5
15722 ac_status=$?
c0d27fcc 15723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15724 (exit $ac_status); }; }; then
15725 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 15726else
98418dba 15727 echo "$as_me: failed program was:" >&5
19650fd6
AS
15728sed 's/^/| /' conftest.$ac_ext >&5
15729
98418dba
CW
15730ac_cv_lib_getloadavg_getloadavg=no
15731fi
edfaf76d
LK
15732rm -f conftest.err conftest.$ac_objext \
15733 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15734LIBS=$ac_check_lib_save_LIBS
15735fi
c0d27fcc 15736echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
15737echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
15738if test $ac_cv_lib_getloadavg_getloadavg = yes; then
15739 LIBS="-lgetloadavg $LIBS"
15740else
15741 LIBS=$ac_getloadavg_LIBS
ba4481b5 15742fi
ba4481b5
DL
15743
15744fi
98418dba
CW
15745
15746# Make sure it is really in the library, if we think we found it,
15747# otherwise set up the replacement function.
15748
15749for ac_func in getloadavg
15750do
15751as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15752echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15753echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15754if eval "test \"\${$as_ac_var+set}\" = set"; then
15755 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15756else
503d2be0 15757 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15758/* confdefs.h. */
15759_ACEOF
15760cat confdefs.h >>conftest.$ac_ext
15761cat >>conftest.$ac_ext <<_ACEOF
15762/* end confdefs.h. */
edfaf76d
LK
15763/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15764 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15765#define $ac_func innocuous_$ac_func
15766
ba4481b5 15767/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15768 which can conflict with char $ac_func (); below.
15769 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15770 <limits.h> exists even on freestanding compilers. */
edfaf76d 15771
19650fd6
AS
15772#ifdef __STDC__
15773# include <limits.h>
15774#else
15775# include <assert.h>
15776#endif
edfaf76d
LK
15777
15778#undef $ac_func
15779
ba4481b5 15780/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15781#ifdef __cplusplus
15782extern "C"
19650fd6 15783{
503d2be0 15784#endif
ba4481b5 15785/* We use char because int might match the return type of a gcc2
503d2be0
AS
15786 builtin and then its argument prototype would still apply. */
15787char $ac_func ();
ba4481b5
DL
15788/* The GNU C library defines this for functions which it implements
15789 to always fail with ENOSYS. Some functions are actually named
15790 something starting with __ and the normal name is an alias. */
15791#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15792choke me
15793#else
19650fd6
AS
15794char (*f) () = $ac_func;
15795#endif
15796#ifdef __cplusplus
15797}
cd958eb3
MB
15798#endif
15799
19650fd6
AS
15800int
15801main ()
15802{
15803return f != $ac_func;
503d2be0
AS
15804 ;
15805 return 0;
15806}
15807_ACEOF
15808rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15809if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15810 (eval $ac_link) 2>conftest.er1
503d2be0 15811 ac_status=$?
edfaf76d
LK
15812 grep -v '^ *+' conftest.er1 >conftest.err
15813 rm -f conftest.er1
15814 cat conftest.err >&5
c0d27fcc 15815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15816 (exit $ac_status); } &&
e143ad11
AS
15817 { ac_try='test -z "$ac_c_werror_flag"
15818 || test ! -s conftest.err'
edfaf76d
LK
15819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15820 (eval $ac_try) 2>&5
15821 ac_status=$?
15822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15823 (exit $ac_status); }; } &&
15824 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15826 (eval $ac_try) 2>&5
15827 ac_status=$?
c0d27fcc 15828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15829 (exit $ac_status); }; }; then
15830 eval "$as_ac_var=yes"
15831else
15832 echo "$as_me: failed program was:" >&5
19650fd6
AS
15833sed 's/^/| /' conftest.$ac_ext >&5
15834
503d2be0
AS
15835eval "$as_ac_var=no"
15836fi
edfaf76d
LK
15837rm -f conftest.err conftest.$ac_objext \
15838 conftest$ac_exeext conftest.$ac_ext
503d2be0 15839fi
c0d27fcc 15840echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15841echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15842if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15843 cat >>confdefs.h <<_ACEOF
98418dba 15844#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15845_ACEOF
503d2be0 15846
98418dba 15847else
edfaf76d
LK
15848 case $LIBOBJS in
15849 "getloadavg.$ac_objext" | \
15850 *" getloadavg.$ac_objext" | \
15851 "getloadavg.$ac_objext "* | \
15852 *" getloadavg.$ac_objext "* ) ;;
15853 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" ;;
15854esac
15855
ba4481b5 15856
c0d27fcc 15857cat >>confdefs.h <<\_ACEOF
98418dba 15858#define C_GETLOADAVG 1
c0d27fcc 15859_ACEOF
ba4481b5 15860
98418dba
CW
15861# Figure out what our getloadavg.c needs.
15862ac_have_func=no
c0d27fcc
MR
15863if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15864 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
15865echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15866if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 15867 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15868fi
15869echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
15870echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 15871else
c0d27fcc
MR
15872 # Is the header compilable?
15873echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
15874echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
15875cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15876/* confdefs.h. */
15877_ACEOF
15878cat confdefs.h >>conftest.$ac_ext
15879cat >>conftest.$ac_ext <<_ACEOF
15880/* end confdefs.h. */
c0d27fcc
MR
15881$ac_includes_default
15882#include <sys/dg_sys_info.h>
15883_ACEOF
15884rm -f conftest.$ac_objext
15885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 15886 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15887 ac_status=$?
edfaf76d
LK
15888 grep -v '^ *+' conftest.er1 >conftest.err
15889 rm -f conftest.er1
15890 cat conftest.err >&5
c0d27fcc
MR
15891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15892 (exit $ac_status); } &&
e143ad11
AS
15893 { ac_try='test -z "$ac_c_werror_flag"
15894 || test ! -s conftest.err'
edfaf76d
LK
15895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15896 (eval $ac_try) 2>&5
15897 ac_status=$?
15898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15899 (exit $ac_status); }; } &&
15900 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15902 (eval $ac_try) 2>&5
15903 ac_status=$?
15904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15905 (exit $ac_status); }; }; then
15906 ac_header_compiler=yes
15907else
15908 echo "$as_me: failed program was:" >&5
19650fd6
AS
15909sed 's/^/| /' conftest.$ac_ext >&5
15910
c0d27fcc
MR
15911ac_header_compiler=no
15912fi
edfaf76d 15913rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15914echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15915echo "${ECHO_T}$ac_header_compiler" >&6
15916
15917# Is the header present?
15918echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
15919echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
15920cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15921/* confdefs.h. */
15922_ACEOF
15923cat confdefs.h >>conftest.$ac_ext
15924cat >>conftest.$ac_ext <<_ACEOF
15925/* end confdefs.h. */
98418dba
CW
15926#include <sys/dg_sys_info.h>
15927_ACEOF
c0d27fcc 15928if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
15929 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15930 ac_status=$?
6bae0ccf 15931 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15932 rm -f conftest.er1
15933 cat conftest.err >&5
c0d27fcc 15934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15935 (exit $ac_status); } >/dev/null; then
15936 if test -s conftest.err; then
15937 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 15938 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15939 else
15940 ac_cpp_err=
15941 fi
15942else
15943 ac_cpp_err=yes
ba4481b5 15944fi
98418dba 15945if test -z "$ac_cpp_err"; then
c0d27fcc 15946 ac_header_preproc=yes
98418dba
CW
15947else
15948 echo "$as_me: failed program was:" >&5
19650fd6
AS
15949sed 's/^/| /' conftest.$ac_ext >&5
15950
c0d27fcc 15951 ac_header_preproc=no
ba4481b5 15952fi
98418dba 15953rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15954echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15955echo "${ECHO_T}$ac_header_preproc" >&6
15956
15957# So? What about this header?
edfaf76d
LK
15958case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15959 yes:no: )
c0d27fcc
MR
15960 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
15961echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15962 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
15963echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
15964 ac_header_preproc=yes
19650fd6 15965 ;;
edfaf76d 15966 no:yes:* )
c0d27fcc
MR
15967 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
15968echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15969 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
15970echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
15971 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
15972echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
15973 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
15974echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15975 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 15976echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15977 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
15978echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15979 (
15980 cat <<\_ASBOX
edfaf76d
LK
15981## ------------------------------------------ ##
15982## Report this to the AC_PACKAGE_NAME lists. ##
15983## ------------------------------------------ ##
19650fd6
AS
15984_ASBOX
15985 ) |
15986 sed "s/^/$as_me: WARNING: /" >&2
15987 ;;
c0d27fcc
MR
15988esac
15989echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
15990echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15991if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15992 echo $ECHO_N "(cached) $ECHO_C" >&6
15993else
15994 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 15995fi
c0d27fcc 15996echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 15997echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
15998
15999fi
98418dba
CW
16000if test $ac_cv_header_sys_dg_sys_info_h = yes; then
16001 ac_have_func=yes
ba4481b5 16002
c0d27fcc 16003cat >>confdefs.h <<\_ACEOF
98418dba 16004#define DGUX 1
c0d27fcc
MR
16005_ACEOF
16006
503d2be0 16007
c0d27fcc 16008echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
16009echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
16010if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 16011 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16012else
503d2be0 16013 ac_check_lib_save_LIBS=$LIBS
98418dba 16014LIBS="-ldgc $LIBS"
503d2be0 16015cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16016/* confdefs.h. */
16017_ACEOF
16018cat confdefs.h >>conftest.$ac_ext
16019cat >>conftest.$ac_ext <<_ACEOF
16020/* end confdefs.h. */
503d2be0 16021
ba4481b5 16022/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16023#ifdef __cplusplus
16024extern "C"
16025#endif
ba4481b5 16026/* We use char because int might match the return type of a gcc2
503d2be0 16027 builtin and then its argument prototype would still apply. */
98418dba 16028char dg_sys_info ();
503d2be0
AS
16029int
16030main ()
16031{
98418dba 16032dg_sys_info ();
503d2be0
AS
16033 ;
16034 return 0;
16035}
16036_ACEOF
16037rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16038if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 16039 (eval $ac_link) 2>conftest.er1
503d2be0 16040 ac_status=$?
edfaf76d
LK
16041 grep -v '^ *+' conftest.er1 >conftest.err
16042 rm -f conftest.er1
16043 cat conftest.err >&5
c0d27fcc 16044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16045 (exit $ac_status); } &&
e143ad11
AS
16046 { ac_try='test -z "$ac_c_werror_flag"
16047 || test ! -s conftest.err'
edfaf76d
LK
16048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16049 (eval $ac_try) 2>&5
16050 ac_status=$?
16051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16052 (exit $ac_status); }; } &&
16053 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16055 (eval $ac_try) 2>&5
16056 ac_status=$?
c0d27fcc 16057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16058 (exit $ac_status); }; }; then
98418dba 16059 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
16060else
16061 echo "$as_me: failed program was:" >&5
19650fd6
AS
16062sed 's/^/| /' conftest.$ac_ext >&5
16063
98418dba 16064ac_cv_lib_dgc_dg_sys_info=no
503d2be0 16065fi
edfaf76d
LK
16066rm -f conftest.err conftest.$ac_objext \
16067 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
16068LIBS=$ac_check_lib_save_LIBS
16069fi
c0d27fcc 16070echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
16071echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
16072if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 16073 cat >>confdefs.h <<_ACEOF
98418dba 16074#define HAVE_LIBDGC 1
c0d27fcc 16075_ACEOF
ba4481b5 16076
98418dba 16077 LIBS="-ldgc $LIBS"
ba4481b5 16078
ba4481b5
DL
16079fi
16080
98418dba 16081fi
503d2be0 16082
c0d27fcc
MR
16083
16084
16085if test "${ac_cv_header_locale_h+set}" = set; then
16086 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
16087echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
16088if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 16089 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16090fi
16091echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
16092echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 16093else
c0d27fcc
MR
16094 # Is the header compilable?
16095echo "$as_me:$LINENO: checking locale.h usability" >&5
16096echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
16097cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16098/* confdefs.h. */
16099_ACEOF
16100cat confdefs.h >>conftest.$ac_ext
16101cat >>conftest.$ac_ext <<_ACEOF
16102/* end confdefs.h. */
c0d27fcc
MR
16103$ac_includes_default
16104#include <locale.h>
16105_ACEOF
16106rm -f conftest.$ac_objext
16107if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16108 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16109 ac_status=$?
edfaf76d
LK
16110 grep -v '^ *+' conftest.er1 >conftest.err
16111 rm -f conftest.er1
16112 cat conftest.err >&5
c0d27fcc
MR
16113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16114 (exit $ac_status); } &&
e143ad11
AS
16115 { ac_try='test -z "$ac_c_werror_flag"
16116 || test ! -s conftest.err'
edfaf76d
LK
16117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16118 (eval $ac_try) 2>&5
16119 ac_status=$?
16120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16121 (exit $ac_status); }; } &&
16122 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16124 (eval $ac_try) 2>&5
16125 ac_status=$?
16126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16127 (exit $ac_status); }; }; then
16128 ac_header_compiler=yes
16129else
16130 echo "$as_me: failed program was:" >&5
19650fd6
AS
16131sed 's/^/| /' conftest.$ac_ext >&5
16132
c0d27fcc
MR
16133ac_header_compiler=no
16134fi
edfaf76d 16135rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16136echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16137echo "${ECHO_T}$ac_header_compiler" >&6
16138
16139# Is the header present?
16140echo "$as_me:$LINENO: checking locale.h presence" >&5
16141echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
16142cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16143/* confdefs.h. */
16144_ACEOF
16145cat confdefs.h >>conftest.$ac_ext
16146cat >>conftest.$ac_ext <<_ACEOF
16147/* end confdefs.h. */
98418dba 16148#include <locale.h>
503d2be0 16149_ACEOF
c0d27fcc 16150if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 16151 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 16152 ac_status=$?
6bae0ccf 16153 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16154 rm -f conftest.er1
16155 cat conftest.err >&5
c0d27fcc 16156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16157 (exit $ac_status); } >/dev/null; then
16158 if test -s conftest.err; then
16159 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16160 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16161 else
16162 ac_cpp_err=
16163 fi
503d2be0 16164else
98418dba 16165 ac_cpp_err=yes
503d2be0 16166fi
98418dba 16167if test -z "$ac_cpp_err"; then
c0d27fcc 16168 ac_header_preproc=yes
98418dba
CW
16169else
16170 echo "$as_me: failed program was:" >&5
19650fd6
AS
16171sed 's/^/| /' conftest.$ac_ext >&5
16172
c0d27fcc 16173 ac_header_preproc=no
ba4481b5 16174fi
98418dba 16175rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16176echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16177echo "${ECHO_T}$ac_header_preproc" >&6
16178
16179# So? What about this header?
edfaf76d
LK
16180case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16181 yes:no: )
c0d27fcc
MR
16182 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
16183echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16184 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
16185echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
16186 ac_header_preproc=yes
19650fd6 16187 ;;
edfaf76d 16188 no:yes:* )
c0d27fcc
MR
16189 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
16190echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16191 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
16192echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
16193 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
16194echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
16195 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
16196echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16197 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 16198echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16199 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
16200echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16201 (
16202 cat <<\_ASBOX
edfaf76d
LK
16203## ------------------------------------------ ##
16204## Report this to the AC_PACKAGE_NAME lists. ##
16205## ------------------------------------------ ##
19650fd6
AS
16206_ASBOX
16207 ) |
16208 sed "s/^/$as_me: WARNING: /" >&2
16209 ;;
c0d27fcc
MR
16210esac
16211echo "$as_me:$LINENO: checking for locale.h" >&5
16212echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
16213if test "${ac_cv_header_locale_h+set}" = set; then
16214 echo $ECHO_N "(cached) $ECHO_C" >&6
16215else
16216 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 16217fi
c0d27fcc 16218echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
16219echo "${ECHO_T}$ac_cv_header_locale_h" >&6
16220
c0d27fcc
MR
16221fi
16222
16223
16224
98418dba 16225for ac_func in setlocale
ba4481b5 16226do
503d2be0 16227as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 16228echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
16229echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16230if eval "test \"\${$as_ac_var+set}\" = set"; then
16231 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16232else
503d2be0 16233 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16234/* confdefs.h. */
16235_ACEOF
16236cat confdefs.h >>conftest.$ac_ext
16237cat >>conftest.$ac_ext <<_ACEOF
16238/* end confdefs.h. */
edfaf76d
LK
16239/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16240 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16241#define $ac_func innocuous_$ac_func
16242
ba4481b5 16243/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16244 which can conflict with char $ac_func (); below.
16245 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16246 <limits.h> exists even on freestanding compilers. */
edfaf76d 16247
19650fd6
AS
16248#ifdef __STDC__
16249# include <limits.h>
16250#else
16251# include <assert.h>
16252#endif
edfaf76d
LK
16253
16254#undef $ac_func
16255
ba4481b5 16256/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16257#ifdef __cplusplus
16258extern "C"
19650fd6 16259{
503d2be0 16260#endif
ba4481b5 16261/* We use char because int might match the return type of a gcc2
503d2be0
AS
16262 builtin and then its argument prototype would still apply. */
16263char $ac_func ();
ba4481b5
DL
16264/* The GNU C library defines this for functions which it implements
16265 to always fail with ENOSYS. Some functions are actually named
16266 something starting with __ and the normal name is an alias. */
16267#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16268choke me
16269#else
19650fd6
AS
16270char (*f) () = $ac_func;
16271#endif
16272#ifdef __cplusplus
16273}
ba4481b5
DL
16274#endif
16275
19650fd6
AS
16276int
16277main ()
16278{
16279return f != $ac_func;
503d2be0
AS
16280 ;
16281 return 0;
16282}
16283_ACEOF
16284rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16285if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 16286 (eval $ac_link) 2>conftest.er1
503d2be0 16287 ac_status=$?
edfaf76d
LK
16288 grep -v '^ *+' conftest.er1 >conftest.err
16289 rm -f conftest.er1
16290 cat conftest.err >&5
c0d27fcc 16291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16292 (exit $ac_status); } &&
e143ad11
AS
16293 { ac_try='test -z "$ac_c_werror_flag"
16294 || test ! -s conftest.err'
edfaf76d
LK
16295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16296 (eval $ac_try) 2>&5
16297 ac_status=$?
16298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16299 (exit $ac_status); }; } &&
16300 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16302 (eval $ac_try) 2>&5
16303 ac_status=$?
c0d27fcc 16304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16305 (exit $ac_status); }; }; then
16306 eval "$as_ac_var=yes"
16307else
16308 echo "$as_me: failed program was:" >&5
19650fd6
AS
16309sed 's/^/| /' conftest.$ac_ext >&5
16310
503d2be0
AS
16311eval "$as_ac_var=no"
16312fi
edfaf76d
LK
16313rm -f conftest.err conftest.$ac_objext \
16314 conftest$ac_exeext conftest.$ac_ext
503d2be0 16315fi
c0d27fcc 16316echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
16317echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16318if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16319 cat >>confdefs.h <<_ACEOF
503d2be0 16320#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16321_ACEOF
ba4481b5 16322
ba4481b5
DL
16323fi
16324done
16325
c0d27fcc 16326
98418dba
CW
16327# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
16328# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
16329# Irix 4.0.5F has the header but not the library.
16330if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
16331 ac_have_func=yes
16332
c0d27fcc 16333cat >>confdefs.h <<\_ACEOF
98418dba 16334#define SVR4 1
c0d27fcc 16335_ACEOF
98418dba
CW
16336
16337fi
16338
16339if test $ac_have_func = no; then
c0d27fcc
MR
16340 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
16341 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
16342echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
16343if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 16344 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16345fi
16346echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
16347echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 16348else
c0d27fcc
MR
16349 # Is the header compilable?
16350echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
16351echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
16352cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16353/* confdefs.h. */
16354_ACEOF
16355cat confdefs.h >>conftest.$ac_ext
16356cat >>conftest.$ac_ext <<_ACEOF
16357/* end confdefs.h. */
c0d27fcc
MR
16358$ac_includes_default
16359#include <inq_stats/cpustats.h>
16360_ACEOF
16361rm -f conftest.$ac_objext
16362if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16363 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16364 ac_status=$?
edfaf76d
LK
16365 grep -v '^ *+' conftest.er1 >conftest.err
16366 rm -f conftest.er1
16367 cat conftest.err >&5
c0d27fcc
MR
16368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16369 (exit $ac_status); } &&
e143ad11
AS
16370 { ac_try='test -z "$ac_c_werror_flag"
16371 || test ! -s conftest.err'
edfaf76d
LK
16372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16373 (eval $ac_try) 2>&5
16374 ac_status=$?
16375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16376 (exit $ac_status); }; } &&
16377 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16379 (eval $ac_try) 2>&5
16380 ac_status=$?
16381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16382 (exit $ac_status); }; }; then
16383 ac_header_compiler=yes
16384else
16385 echo "$as_me: failed program was:" >&5
19650fd6
AS
16386sed 's/^/| /' conftest.$ac_ext >&5
16387
c0d27fcc
MR
16388ac_header_compiler=no
16389fi
edfaf76d 16390rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16391echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16392echo "${ECHO_T}$ac_header_compiler" >&6
16393
16394# Is the header present?
16395echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
16396echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
16397cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16398/* confdefs.h. */
16399_ACEOF
16400cat confdefs.h >>conftest.$ac_ext
16401cat >>conftest.$ac_ext <<_ACEOF
16402/* end confdefs.h. */
98418dba 16403#include <inq_stats/cpustats.h>
503d2be0 16404_ACEOF
c0d27fcc 16405if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16406 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16407 ac_status=$?
6bae0ccf 16408 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16409 rm -f conftest.er1
16410 cat conftest.err >&5
c0d27fcc 16411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16412 (exit $ac_status); } >/dev/null; then
16413 if test -s conftest.err; then
16414 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16415 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16416 else
16417 ac_cpp_err=
16418 fi
16419else
16420 ac_cpp_err=yes
16421fi
16422if test -z "$ac_cpp_err"; then
c0d27fcc 16423 ac_header_preproc=yes
503d2be0
AS
16424else
16425 echo "$as_me: failed program was:" >&5
19650fd6
AS
16426sed 's/^/| /' conftest.$ac_ext >&5
16427
c0d27fcc 16428 ac_header_preproc=no
ba4481b5 16429fi
503d2be0 16430rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16431echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16432echo "${ECHO_T}$ac_header_preproc" >&6
16433
16434# So? What about this header?
edfaf76d
LK
16435case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16436 yes:no: )
c0d27fcc
MR
16437 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16438echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16439 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
16440echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
16441 ac_header_preproc=yes
19650fd6 16442 ;;
edfaf76d 16443 no:yes:* )
c0d27fcc
MR
16444 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
16445echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16446 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
16447echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
16448 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
16449echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
16450 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16451echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16452 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16453echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16454 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
16455echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16456 (
16457 cat <<\_ASBOX
edfaf76d
LK
16458## ------------------------------------------ ##
16459## Report this to the AC_PACKAGE_NAME lists. ##
16460## ------------------------------------------ ##
19650fd6
AS
16461_ASBOX
16462 ) |
16463 sed "s/^/$as_me: WARNING: /" >&2
16464 ;;
c0d27fcc
MR
16465esac
16466echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
16467echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
16468if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
16469 echo $ECHO_N "(cached) $ECHO_C" >&6
16470else
16471 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 16472fi
c0d27fcc 16473echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 16474echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
16475
16476fi
98418dba
CW
16477if test $ac_cv_header_inq_stats_cpustats_h = yes; then
16478 ac_have_func=yes
ba4481b5 16479
c0d27fcc 16480cat >>confdefs.h <<\_ACEOF
98418dba 16481#define UMAX 1
c0d27fcc 16482_ACEOF
98418dba 16483
c0d27fcc
MR
16484
16485cat >>confdefs.h <<\_ACEOF
98418dba 16486#define UMAX4_3 1
c0d27fcc 16487_ACEOF
98418dba
CW
16488
16489fi
16490
c0d27fcc 16491
98418dba
CW
16492fi
16493
16494if test $ac_have_func = no; then
c0d27fcc
MR
16495 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16496 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
16497echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16498if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 16499 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16500fi
16501echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
16502echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 16503else
c0d27fcc
MR
16504 # Is the header compilable?
16505echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
16506echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
16507cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16508/* confdefs.h. */
16509_ACEOF
16510cat confdefs.h >>conftest.$ac_ext
16511cat >>conftest.$ac_ext <<_ACEOF
16512/* end confdefs.h. */
c0d27fcc
MR
16513$ac_includes_default
16514#include <sys/cpustats.h>
16515_ACEOF
16516rm -f conftest.$ac_objext
16517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16518 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16519 ac_status=$?
edfaf76d
LK
16520 grep -v '^ *+' conftest.er1 >conftest.err
16521 rm -f conftest.er1
16522 cat conftest.err >&5
c0d27fcc
MR
16523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16524 (exit $ac_status); } &&
e143ad11
AS
16525 { ac_try='test -z "$ac_c_werror_flag"
16526 || test ! -s conftest.err'
edfaf76d
LK
16527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16528 (eval $ac_try) 2>&5
16529 ac_status=$?
16530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16531 (exit $ac_status); }; } &&
16532 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16534 (eval $ac_try) 2>&5
16535 ac_status=$?
16536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16537 (exit $ac_status); }; }; then
16538 ac_header_compiler=yes
16539else
16540 echo "$as_me: failed program was:" >&5
19650fd6
AS
16541sed 's/^/| /' conftest.$ac_ext >&5
16542
c0d27fcc
MR
16543ac_header_compiler=no
16544fi
edfaf76d 16545rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16546echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16547echo "${ECHO_T}$ac_header_compiler" >&6
16548
16549# Is the header present?
16550echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
16551echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
16552cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16553/* confdefs.h. */
16554_ACEOF
16555cat confdefs.h >>conftest.$ac_ext
16556cat >>conftest.$ac_ext <<_ACEOF
16557/* end confdefs.h. */
98418dba
CW
16558#include <sys/cpustats.h>
16559_ACEOF
c0d27fcc 16560if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
16561 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16562 ac_status=$?
6bae0ccf 16563 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16564 rm -f conftest.er1
16565 cat conftest.err >&5
c0d27fcc 16566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16567 (exit $ac_status); } >/dev/null; then
16568 if test -s conftest.err; then
16569 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16570 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16571 else
16572 ac_cpp_err=
16573 fi
16574else
16575 ac_cpp_err=yes
503d2be0 16576fi
98418dba 16577if test -z "$ac_cpp_err"; then
c0d27fcc 16578 ac_header_preproc=yes
98418dba
CW
16579else
16580 echo "$as_me: failed program was:" >&5
19650fd6
AS
16581sed 's/^/| /' conftest.$ac_ext >&5
16582
c0d27fcc 16583 ac_header_preproc=no
98418dba
CW
16584fi
16585rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16586echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16587echo "${ECHO_T}$ac_header_preproc" >&6
16588
16589# So? What about this header?
edfaf76d
LK
16590case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16591 yes:no: )
c0d27fcc
MR
16592 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16593echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16594 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
16595echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
16596 ac_header_preproc=yes
19650fd6 16597 ;;
edfaf76d 16598 no:yes:* )
c0d27fcc
MR
16599 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
16600echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16601 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
16602echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
16603 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
16604echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
16605 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16606echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16607 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16608echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16609 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
16610echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16611 (
16612 cat <<\_ASBOX
edfaf76d
LK
16613## ------------------------------------------ ##
16614## Report this to the AC_PACKAGE_NAME lists. ##
16615## ------------------------------------------ ##
19650fd6
AS
16616_ASBOX
16617 ) |
16618 sed "s/^/$as_me: WARNING: /" >&2
16619 ;;
c0d27fcc
MR
16620esac
16621echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
16622echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16623if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16624 echo $ECHO_N "(cached) $ECHO_C" >&6
16625else
16626 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 16627fi
c0d27fcc 16628echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 16629echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
16630
16631fi
98418dba 16632if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 16633 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 16634#define UMAX 1
c0d27fcc 16635_ACEOF
ba4481b5 16636
98418dba
CW
16637fi
16638
c0d27fcc 16639
98418dba
CW
16640fi
16641
16642if test $ac_have_func = no; then
16643
16644for ac_header in mach/mach.h
2c9dccc9
PJ
16645do
16646as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16647if eval "test \"\${$as_ac_Header+set}\" = set"; then
16648 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
16649echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16650if eval "test \"\${$as_ac_Header+set}\" = set"; then
16651 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16652fi
16653echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16654echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16655else
c0d27fcc
MR
16656 # Is the header compilable?
16657echo "$as_me:$LINENO: checking $ac_header usability" >&5
16658echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16659cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16660/* confdefs.h. */
16661_ACEOF
16662cat confdefs.h >>conftest.$ac_ext
16663cat >>conftest.$ac_ext <<_ACEOF
16664/* end confdefs.h. */
c0d27fcc
MR
16665$ac_includes_default
16666#include <$ac_header>
16667_ACEOF
16668rm -f conftest.$ac_objext
16669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16670 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16671 ac_status=$?
edfaf76d
LK
16672 grep -v '^ *+' conftest.er1 >conftest.err
16673 rm -f conftest.er1
16674 cat conftest.err >&5
c0d27fcc
MR
16675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16676 (exit $ac_status); } &&
e143ad11
AS
16677 { ac_try='test -z "$ac_c_werror_flag"
16678 || test ! -s conftest.err'
edfaf76d
LK
16679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16680 (eval $ac_try) 2>&5
16681 ac_status=$?
16682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16683 (exit $ac_status); }; } &&
16684 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16686 (eval $ac_try) 2>&5
16687 ac_status=$?
16688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16689 (exit $ac_status); }; }; then
16690 ac_header_compiler=yes
16691else
16692 echo "$as_me: failed program was:" >&5
19650fd6
AS
16693sed 's/^/| /' conftest.$ac_ext >&5
16694
c0d27fcc
MR
16695ac_header_compiler=no
16696fi
edfaf76d 16697rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16698echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16699echo "${ECHO_T}$ac_header_compiler" >&6
16700
16701# Is the header present?
16702echo "$as_me:$LINENO: checking $ac_header presence" >&5
16703echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16704cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16705/* confdefs.h. */
16706_ACEOF
16707cat confdefs.h >>conftest.$ac_ext
16708cat >>conftest.$ac_ext <<_ACEOF
16709/* end confdefs.h. */
2c9dccc9
PJ
16710#include <$ac_header>
16711_ACEOF
c0d27fcc 16712if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
16713 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16714 ac_status=$?
6bae0ccf 16715 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
16716 rm -f conftest.er1
16717 cat conftest.err >&5
c0d27fcc 16718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
16719 (exit $ac_status); } >/dev/null; then
16720 if test -s conftest.err; then
16721 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16722 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2c9dccc9
PJ
16723 else
16724 ac_cpp_err=
16725 fi
16726else
16727 ac_cpp_err=yes
16728fi
16729if test -z "$ac_cpp_err"; then
c0d27fcc
MR
16730 ac_header_preproc=yes
16731else
16732 echo "$as_me: failed program was:" >&5
19650fd6
AS
16733sed 's/^/| /' conftest.$ac_ext >&5
16734
c0d27fcc
MR
16735 ac_header_preproc=no
16736fi
16737rm -f conftest.err conftest.$ac_ext
16738echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16739echo "${ECHO_T}$ac_header_preproc" >&6
16740
16741# So? What about this header?
edfaf76d
LK
16742case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16743 yes:no: )
c0d27fcc
MR
16744 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16745echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16746 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16747echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16748 ac_header_preproc=yes
19650fd6 16749 ;;
edfaf76d 16750 no:yes:* )
c0d27fcc
MR
16751 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16752echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16753 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16754echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16755 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16756echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16757 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16758echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16759 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16760echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16761 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16762echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16763 (
16764 cat <<\_ASBOX
edfaf76d
LK
16765## ------------------------------------------ ##
16766## Report this to the AC_PACKAGE_NAME lists. ##
16767## ------------------------------------------ ##
19650fd6
AS
16768_ASBOX
16769 ) |
16770 sed "s/^/$as_me: WARNING: /" >&2
16771 ;;
c0d27fcc
MR
16772esac
16773echo "$as_me:$LINENO: checking for $ac_header" >&5
16774echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16775if eval "test \"\${$as_ac_Header+set}\" = set"; then
16776 echo $ECHO_N "(cached) $ECHO_C" >&6
16777else
edfaf76d 16778 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc
MR
16779fi
16780echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16781echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16782
16783fi
16784if test `eval echo '${'$as_ac_Header'}'` = yes; then
16785 cat >>confdefs.h <<_ACEOF
16786#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16787_ACEOF
16788
16789fi
16790
16791done
16792
16793fi
16794
16795
16796for ac_header in nlist.h
16797do
16798as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16799if eval "test \"\${$as_ac_Header+set}\" = set"; then
16800 echo "$as_me:$LINENO: checking for $ac_header" >&5
16801echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16802if eval "test \"\${$as_ac_Header+set}\" = set"; then
16803 echo $ECHO_N "(cached) $ECHO_C" >&6
16804fi
16805echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16806echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16807else
16808 # Is the header compilable?
16809echo "$as_me:$LINENO: checking $ac_header usability" >&5
16810echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16811cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16812/* confdefs.h. */
16813_ACEOF
16814cat confdefs.h >>conftest.$ac_ext
16815cat >>conftest.$ac_ext <<_ACEOF
16816/* end confdefs.h. */
c0d27fcc
MR
16817$ac_includes_default
16818#include <$ac_header>
16819_ACEOF
16820rm -f conftest.$ac_objext
16821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16822 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16823 ac_status=$?
edfaf76d
LK
16824 grep -v '^ *+' conftest.er1 >conftest.err
16825 rm -f conftest.er1
16826 cat conftest.err >&5
c0d27fcc
MR
16827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16828 (exit $ac_status); } &&
e143ad11
AS
16829 { ac_try='test -z "$ac_c_werror_flag"
16830 || test ! -s conftest.err'
edfaf76d
LK
16831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16832 (eval $ac_try) 2>&5
16833 ac_status=$?
16834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16835 (exit $ac_status); }; } &&
16836 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16838 (eval $ac_try) 2>&5
16839 ac_status=$?
16840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16841 (exit $ac_status); }; }; then
16842 ac_header_compiler=yes
2c9dccc9
PJ
16843else
16844 echo "$as_me: failed program was:" >&5
19650fd6
AS
16845sed 's/^/| /' conftest.$ac_ext >&5
16846
c0d27fcc 16847ac_header_compiler=no
98418dba 16848fi
edfaf76d 16849rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16850echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16851echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 16852
c0d27fcc
MR
16853# Is the header present?
16854echo "$as_me:$LINENO: checking $ac_header presence" >&5
16855echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16856cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16857/* confdefs.h. */
16858_ACEOF
16859cat confdefs.h >>conftest.$ac_ext
16860cat >>conftest.$ac_ext <<_ACEOF
16861/* end confdefs.h. */
503d2be0
AS
16862#include <$ac_header>
16863_ACEOF
c0d27fcc 16864if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16865 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16866 ac_status=$?
6bae0ccf 16867 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16868 rm -f conftest.er1
16869 cat conftest.err >&5
c0d27fcc 16870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16871 (exit $ac_status); } >/dev/null; then
16872 if test -s conftest.err; then
16873 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16874 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16875 else
16876 ac_cpp_err=
16877 fi
16878else
16879 ac_cpp_err=yes
16880fi
16881if test -z "$ac_cpp_err"; then
c0d27fcc 16882 ac_header_preproc=yes
503d2be0
AS
16883else
16884 echo "$as_me: failed program was:" >&5
19650fd6
AS
16885sed 's/^/| /' conftest.$ac_ext >&5
16886
c0d27fcc 16887 ac_header_preproc=no
b5de8dc0 16888fi
503d2be0 16889rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16890echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16891echo "${ECHO_T}$ac_header_preproc" >&6
16892
16893# So? What about this header?
edfaf76d
LK
16894case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16895 yes:no: )
c0d27fcc
MR
16896 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16897echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16898 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16899echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16900 ac_header_preproc=yes
19650fd6 16901 ;;
edfaf76d 16902 no:yes:* )
c0d27fcc
MR
16903 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16904echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16905 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16906echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16907 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16908echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16909 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16910echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16911 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16912echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16913 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16914echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16915 (
16916 cat <<\_ASBOX
edfaf76d
LK
16917## ------------------------------------------ ##
16918## Report this to the AC_PACKAGE_NAME lists. ##
16919## ------------------------------------------ ##
19650fd6
AS
16920_ASBOX
16921 ) |
16922 sed "s/^/$as_me: WARNING: /" >&2
16923 ;;
c0d27fcc
MR
16924esac
16925echo "$as_me:$LINENO: checking for $ac_header" >&5
16926echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16927if eval "test \"\${$as_ac_Header+set}\" = set"; then
16928 echo $ECHO_N "(cached) $ECHO_C" >&6
16929else
edfaf76d 16930 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 16931fi
c0d27fcc 16932echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16933echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16934
16935fi
98418dba 16936if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16937 cat >>confdefs.h <<_ACEOF
98418dba 16938#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
16939_ACEOF
16940 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
16941echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
16942if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 16943 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 16944else
503d2be0 16945 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16946/* confdefs.h. */
16947_ACEOF
16948cat confdefs.h >>conftest.$ac_ext
16949cat >>conftest.$ac_ext <<_ACEOF
16950/* end confdefs.h. */
98418dba 16951#include <nlist.h>
b5de8dc0 16952
503d2be0
AS
16953int
16954main ()
16955{
98418dba
CW
16956static struct nlist ac_aggr;
16957if (ac_aggr.n_un.n_name)
16958return 0;
503d2be0
AS
16959 ;
16960 return 0;
16961}
16962_ACEOF
98418dba 16963rm -f conftest.$ac_objext
c0d27fcc 16964if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16965 (eval $ac_compile) 2>conftest.er1
503d2be0 16966 ac_status=$?
edfaf76d
LK
16967 grep -v '^ *+' conftest.er1 >conftest.err
16968 rm -f conftest.er1
16969 cat conftest.err >&5
c0d27fcc 16970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16971 (exit $ac_status); } &&
e143ad11
AS
16972 { ac_try='test -z "$ac_c_werror_flag"
16973 || test ! -s conftest.err'
c0d27fcc 16974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16975 (eval $ac_try) 2>&5
16976 ac_status=$?
c0d27fcc 16977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
16978 (exit $ac_status); }; } &&
16979 { ac_try='test -s conftest.$ac_objext'
16980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16981 (eval $ac_try) 2>&5
16982 ac_status=$?
16983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16984 (exit $ac_status); }; }; then
16985 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
16986else
16987 echo "$as_me: failed program was:" >&5
19650fd6
AS
16988sed 's/^/| /' conftest.$ac_ext >&5
16989
6bae0ccf 16990cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16991/* confdefs.h. */
16992_ACEOF
16993cat confdefs.h >>conftest.$ac_ext
16994cat >>conftest.$ac_ext <<_ACEOF
16995/* end confdefs.h. */
6bae0ccf
DL
16996#include <nlist.h>
16997
16998int
16999main ()
17000{
17001static struct nlist ac_aggr;
17002if (sizeof ac_aggr.n_un.n_name)
17003return 0;
17004 ;
17005 return 0;
17006}
17007_ACEOF
17008rm -f conftest.$ac_objext
17009if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17010 (eval $ac_compile) 2>conftest.er1
6bae0ccf 17011 ac_status=$?
edfaf76d
LK
17012 grep -v '^ *+' conftest.er1 >conftest.err
17013 rm -f conftest.er1
17014 cat conftest.err >&5
6bae0ccf
DL
17015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17016 (exit $ac_status); } &&
e143ad11
AS
17017 { ac_try='test -z "$ac_c_werror_flag"
17018 || test ! -s conftest.err'
edfaf76d
LK
17019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17020 (eval $ac_try) 2>&5
17021 ac_status=$?
17022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17023 (exit $ac_status); }; } &&
17024 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
17025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17026 (eval $ac_try) 2>&5
17027 ac_status=$?
17028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17029 (exit $ac_status); }; }; then
17030 ac_cv_member_struct_nlist_n_un_n_name=yes
17031else
17032 echo "$as_me: failed program was:" >&5
19650fd6
AS
17033sed 's/^/| /' conftest.$ac_ext >&5
17034
98418dba 17035ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 17036fi
edfaf76d 17037rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 17038fi
edfaf76d 17039rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 17040fi
c0d27fcc 17041echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
17042echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
17043if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 17044
c0d27fcc 17045cat >>confdefs.h <<_ACEOF
98418dba 17046#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 17047_ACEOF
b5de8dc0 17048
c0d27fcc
MR
17049
17050cat >>confdefs.h <<\_ACEOF
98418dba 17051#define NLIST_NAME_UNION 1
c0d27fcc 17052_ACEOF
b5de8dc0 17053
98418dba 17054fi
b5de8dc0 17055
c0d27fcc 17056
98418dba 17057fi
c0d27fcc 17058
98418dba 17059done
b5de8dc0 17060
98418dba
CW
17061fi
17062done
b5de8dc0 17063
c0d27fcc 17064
98418dba 17065# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 17066echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
17067echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
17068if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
17069 echo $ECHO_N "(cached) $ECHO_C" >&6
17070else
17071 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17072/* confdefs.h. */
17073_ACEOF
17074cat confdefs.h >>conftest.$ac_ext
17075cat >>conftest.$ac_ext <<_ACEOF
17076/* end confdefs.h. */
6bae0ccf 17077#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
17078#ifdef LDAV_PRIVILEGED
17079Yowza Am I SETGID yet
17080#endif
17081_ACEOF
17082if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 17083 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
17084 ac_cv_func_getloadavg_setgid=yes
17085else
17086 ac_cv_func_getloadavg_setgid=no
17087fi
17088rm -f conftest*
b5de8dc0 17089
98418dba 17090fi
c0d27fcc 17091echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
17092echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
17093if test $ac_cv_func_getloadavg_setgid = yes; then
17094 NEED_SETGID=true
b5de8dc0 17095
c0d27fcc 17096cat >>confdefs.h <<\_ACEOF
98418dba 17097#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 17098_ACEOF
98418dba 17099
b5de8dc0 17100else
98418dba 17101 NEED_SETGID=false
b5de8dc0 17102fi
98418dba
CW
17103
17104if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 17105 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
17106echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
17107if test "${ac_cv_group_kmem+set}" = set; then
17108 echo $ECHO_N "(cached) $ECHO_C" >&6
17109else
17110 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
17111 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
17112 # If we got an error (system does not support symlinks), try without -L.
17113 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
17114 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 17115 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
17116 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
17117 / /s/.* //;p;'`
17118
b5de8dc0 17119fi
c0d27fcc 17120echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
17121echo "${ECHO_T}$ac_cv_group_kmem" >&6
17122 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 17123fi
98418dba
CW
17124if test "x$ac_save_LIBS" = x; then
17125 GETLOADAVG_LIBS=$LIBS
17126else
17127 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 17128fi
98418dba 17129LIBS=$ac_save_LIBS
b5de8dc0 17130
c0d27fcc
MR
17131
17132
17133echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
17134echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
17135if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 17136 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17137else
b936fae4
AS
17138 while :; do
17139 ac_cv_sys_largefile_source=no
503d2be0 17140 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17141/* confdefs.h. */
17142_ACEOF
17143cat confdefs.h >>conftest.$ac_ext
17144cat >>conftest.$ac_ext <<_ACEOF
17145/* end confdefs.h. */
b936fae4 17146#include <stdio.h>
503d2be0
AS
17147int
17148main ()
17149{
b936fae4
AS
17150return !fseeko;
17151 ;
17152 return 0;
17153}
17154_ACEOF
17155rm -f conftest.$ac_objext
c0d27fcc 17156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17157 (eval $ac_compile) 2>conftest.er1
b936fae4 17158 ac_status=$?
edfaf76d
LK
17159 grep -v '^ *+' conftest.er1 >conftest.err
17160 rm -f conftest.er1
17161 cat conftest.err >&5
c0d27fcc 17162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 17163 (exit $ac_status); } &&
e143ad11
AS
17164 { ac_try='test -z "$ac_c_werror_flag"
17165 || test ! -s conftest.err'
edfaf76d
LK
17166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17167 (eval $ac_try) 2>&5
17168 ac_status=$?
17169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17170 (exit $ac_status); }; } &&
17171 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 17172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
17173 (eval $ac_try) 2>&5
17174 ac_status=$?
c0d27fcc 17175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
17176 (exit $ac_status); }; }; then
17177 break
17178else
17179 echo "$as_me: failed program was:" >&5
19650fd6
AS
17180sed 's/^/| /' conftest.$ac_ext >&5
17181
b936fae4 17182fi
edfaf76d 17183rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4 17184 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17185/* confdefs.h. */
17186_ACEOF
17187cat confdefs.h >>conftest.$ac_ext
17188cat >>conftest.$ac_ext <<_ACEOF
17189/* end confdefs.h. */
b936fae4
AS
17190#define _LARGEFILE_SOURCE 1
17191#include <stdio.h>
b936fae4
AS
17192int
17193main ()
17194{
17195return !fseeko;
17196 ;
17197 return 0;
17198}
17199_ACEOF
17200rm -f conftest.$ac_objext
c0d27fcc 17201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17202 (eval $ac_compile) 2>conftest.er1
b936fae4 17203 ac_status=$?
edfaf76d
LK
17204 grep -v '^ *+' conftest.er1 >conftest.err
17205 rm -f conftest.er1
17206 cat conftest.err >&5
c0d27fcc 17207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 17208 (exit $ac_status); } &&
e143ad11
AS
17209 { ac_try='test -z "$ac_c_werror_flag"
17210 || test ! -s conftest.err'
edfaf76d
LK
17211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17212 (eval $ac_try) 2>&5
17213 ac_status=$?
17214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17215 (exit $ac_status); }; } &&
17216 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 17217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
17218 (eval $ac_try) 2>&5
17219 ac_status=$?
c0d27fcc 17220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
17221 (exit $ac_status); }; }; then
17222 ac_cv_sys_largefile_source=1; break
17223else
17224 echo "$as_me: failed program was:" >&5
19650fd6
AS
17225sed 's/^/| /' conftest.$ac_ext >&5
17226
b936fae4 17227fi
edfaf76d 17228rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4
AS
17229 break
17230done
17231fi
c0d27fcc 17232echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
17233echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
17234if test "$ac_cv_sys_largefile_source" != no; then
17235
c0d27fcc 17236cat >>confdefs.h <<_ACEOF
b936fae4 17237#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 17238_ACEOF
b936fae4
AS
17239
17240fi
17241rm -f conftest*
4c343001 17242
b936fae4
AS
17243# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
17244# in glibc 2.1.3, but that breaks too many other things.
17245# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 17246echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
17247echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
17248if test "${ac_cv_func_fseeko+set}" = set; then
17249 echo $ECHO_N "(cached) $ECHO_C" >&6
17250else
17251 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17252/* confdefs.h. */
17253_ACEOF
17254cat confdefs.h >>conftest.$ac_ext
17255cat >>conftest.$ac_ext <<_ACEOF
17256/* end confdefs.h. */
b936fae4 17257#include <stdio.h>
b936fae4
AS
17258int
17259main ()
17260{
17261return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
17262 ;
17263 return 0;
17264}
17265_ACEOF
17266rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17267if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17268 (eval $ac_link) 2>conftest.er1
503d2be0 17269 ac_status=$?
edfaf76d
LK
17270 grep -v '^ *+' conftest.er1 >conftest.err
17271 rm -f conftest.er1
17272 cat conftest.err >&5
c0d27fcc 17273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17274 (exit $ac_status); } &&
e143ad11
AS
17275 { ac_try='test -z "$ac_c_werror_flag"
17276 || test ! -s conftest.err'
edfaf76d
LK
17277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17278 (eval $ac_try) 2>&5
17279 ac_status=$?
17280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17281 (exit $ac_status); }; } &&
17282 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17284 (eval $ac_try) 2>&5
17285 ac_status=$?
c0d27fcc 17286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17287 (exit $ac_status); }; }; then
b936fae4 17288 ac_cv_func_fseeko=yes
503d2be0
AS
17289else
17290 echo "$as_me: failed program was:" >&5
19650fd6
AS
17291sed 's/^/| /' conftest.$ac_ext >&5
17292
b936fae4 17293ac_cv_func_fseeko=no
503d2be0 17294fi
edfaf76d
LK
17295rm -f conftest.err conftest.$ac_objext \
17296 conftest$ac_exeext conftest.$ac_ext
503d2be0 17297fi
c0d27fcc 17298echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
17299echo "${ECHO_T}$ac_cv_func_fseeko" >&6
17300if test $ac_cv_func_fseeko = yes; then
17301
c0d27fcc 17302cat >>confdefs.h <<\_ACEOF
b936fae4 17303#define HAVE_FSEEKO 1
c0d27fcc 17304_ACEOF
b936fae4 17305
4c343001
DL
17306fi
17307
c0d27fcc 17308
52dbaac8
PE
17309# Configure getopt.
17310# getopt.m4 serial 10
17311
17312# The getopt module assume you want GNU getopt, with getopt_long etc,
17313# rather than vanilla POSIX getopt. This means your your code should
17314# always include <getopt.h> for the getopt prototypes.
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326# Prerequisites of lib/getopt*.
17327
17328
17329
10a3b1a1 17330
52dbaac8
PE
17331 GETOPT_H=
17332
17333for ac_header in getopt.h
17334do
17335as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17336if eval "test \"\${$as_ac_Header+set}\" = set"; then
17337 echo "$as_me:$LINENO: checking for $ac_header" >&5
17338echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17339if eval "test \"\${$as_ac_Header+set}\" = set"; then
17340 echo $ECHO_N "(cached) $ECHO_C" >&6
17341fi
17342echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17343echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17344else
17345 # Is the header compilable?
17346echo "$as_me:$LINENO: checking $ac_header usability" >&5
17347echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17348cat >conftest.$ac_ext <<_ACEOF
17349/* confdefs.h. */
17350_ACEOF
17351cat confdefs.h >>conftest.$ac_ext
17352cat >>conftest.$ac_ext <<_ACEOF
17353/* end confdefs.h. */
17354$ac_includes_default
17355#include <$ac_header>
17356_ACEOF
17357rm -f conftest.$ac_objext
17358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17359 (eval $ac_compile) 2>conftest.er1
17360 ac_status=$?
17361 grep -v '^ *+' conftest.er1 >conftest.err
17362 rm -f conftest.er1
17363 cat conftest.err >&5
17364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17365 (exit $ac_status); } &&
e143ad11
AS
17366 { ac_try='test -z "$ac_c_werror_flag"
17367 || test ! -s conftest.err'
52dbaac8
PE
17368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17369 (eval $ac_try) 2>&5
17370 ac_status=$?
17371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17372 (exit $ac_status); }; } &&
17373 { ac_try='test -s conftest.$ac_objext'
17374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17375 (eval $ac_try) 2>&5
17376 ac_status=$?
17377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17378 (exit $ac_status); }; }; then
17379 ac_header_compiler=yes
17380else
17381 echo "$as_me: failed program was:" >&5
17382sed 's/^/| /' conftest.$ac_ext >&5
17383
17384ac_header_compiler=no
17385fi
17386rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17387echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17388echo "${ECHO_T}$ac_header_compiler" >&6
17389
17390# Is the header present?
17391echo "$as_me:$LINENO: checking $ac_header presence" >&5
17392echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17393cat >conftest.$ac_ext <<_ACEOF
17394/* confdefs.h. */
17395_ACEOF
17396cat confdefs.h >>conftest.$ac_ext
17397cat >>conftest.$ac_ext <<_ACEOF
17398/* end confdefs.h. */
17399#include <$ac_header>
17400_ACEOF
17401if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17402 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17403 ac_status=$?
17404 grep -v '^ *+' conftest.er1 >conftest.err
17405 rm -f conftest.er1
17406 cat conftest.err >&5
17407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17408 (exit $ac_status); } >/dev/null; then
17409 if test -s conftest.err; then
17410 ac_cpp_err=$ac_c_preproc_warn_flag
17411 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17412 else
17413 ac_cpp_err=
17414 fi
17415else
17416 ac_cpp_err=yes
17417fi
17418if test -z "$ac_cpp_err"; then
17419 ac_header_preproc=yes
17420else
17421 echo "$as_me: failed program was:" >&5
17422sed 's/^/| /' conftest.$ac_ext >&5
17423
17424 ac_header_preproc=no
17425fi
17426rm -f conftest.err conftest.$ac_ext
17427echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17428echo "${ECHO_T}$ac_header_preproc" >&6
17429
17430# So? What about this header?
17431case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17432 yes:no: )
17433 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17434echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17435 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17436echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17437 ac_header_preproc=yes
17438 ;;
17439 no:yes:* )
17440 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17441echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17442 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17443echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17444 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17445echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17446 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17447echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
17448 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17449echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17450 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17451echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17452 (
17453 cat <<\_ASBOX
17454## ------------------------------------------ ##
17455## Report this to the AC_PACKAGE_NAME lists. ##
17456## ------------------------------------------ ##
17457_ASBOX
17458 ) |
17459 sed "s/^/$as_me: WARNING: /" >&2
17460 ;;
17461esac
17462echo "$as_me:$LINENO: checking for $ac_header" >&5
17463echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17464if eval "test \"\${$as_ac_Header+set}\" = set"; then
17465 echo $ECHO_N "(cached) $ECHO_C" >&6
17466else
17467 eval "$as_ac_Header=\$ac_header_preproc"
17468fi
17469echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17470echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17471
17472fi
17473if test `eval echo '${'$as_ac_Header'}'` = yes; then
17474 cat >>confdefs.h <<_ACEOF
17475#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17476_ACEOF
17477
17478else
17479 GETOPT_H=getopt.h
17480fi
17481
17482done
17483
17484 if test -z "$GETOPT_H"; then
17485
17486for ac_func in getopt_long_only
17487do
17488as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17489echo "$as_me:$LINENO: checking for $ac_func" >&5
17490echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17491if eval "test \"\${$as_ac_var+set}\" = set"; then
17492 echo $ECHO_N "(cached) $ECHO_C" >&6
17493else
17494 cat >conftest.$ac_ext <<_ACEOF
17495/* confdefs.h. */
17496_ACEOF
17497cat confdefs.h >>conftest.$ac_ext
17498cat >>conftest.$ac_ext <<_ACEOF
17499/* end confdefs.h. */
17500/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17501 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17502#define $ac_func innocuous_$ac_func
17503
17504/* System header to define __stub macros and hopefully few prototypes,
17505 which can conflict with char $ac_func (); below.
17506 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17507 <limits.h> exists even on freestanding compilers. */
17508
17509#ifdef __STDC__
17510# include <limits.h>
17511#else
17512# include <assert.h>
17513#endif
17514
17515#undef $ac_func
17516
17517/* Override any gcc2 internal prototype to avoid an error. */
17518#ifdef __cplusplus
17519extern "C"
17520{
17521#endif
17522/* We use char because int might match the return type of a gcc2
17523 builtin and then its argument prototype would still apply. */
17524char $ac_func ();
17525/* The GNU C library defines this for functions which it implements
17526 to always fail with ENOSYS. Some functions are actually named
17527 something starting with __ and the normal name is an alias. */
17528#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17529choke me
17530#else
17531char (*f) () = $ac_func;
17532#endif
17533#ifdef __cplusplus
17534}
17535#endif
17536
17537int
17538main ()
17539{
17540return f != $ac_func;
17541 ;
17542 return 0;
17543}
17544_ACEOF
17545rm -f conftest.$ac_objext conftest$ac_exeext
17546if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17547 (eval $ac_link) 2>conftest.er1
17548 ac_status=$?
17549 grep -v '^ *+' conftest.er1 >conftest.err
17550 rm -f conftest.er1
17551 cat conftest.err >&5
17552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17553 (exit $ac_status); } &&
e143ad11
AS
17554 { ac_try='test -z "$ac_c_werror_flag"
17555 || test ! -s conftest.err'
52dbaac8
PE
17556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17557 (eval $ac_try) 2>&5
17558 ac_status=$?
17559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17560 (exit $ac_status); }; } &&
17561 { ac_try='test -s conftest$ac_exeext'
17562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17563 (eval $ac_try) 2>&5
17564 ac_status=$?
17565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17566 (exit $ac_status); }; }; then
17567 eval "$as_ac_var=yes"
17568else
17569 echo "$as_me: failed program was:" >&5
17570sed 's/^/| /' conftest.$ac_ext >&5
17571
17572eval "$as_ac_var=no"
17573fi
17574rm -f conftest.err conftest.$ac_objext \
17575 conftest$ac_exeext conftest.$ac_ext
17576fi
17577echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17578echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17579if test `eval echo '${'$as_ac_var'}'` = yes; then
17580 cat >>confdefs.h <<_ACEOF
17581#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17582_ACEOF
17583
17584else
17585 GETOPT_H=getopt.h
17586fi
17587done
17588
17589 fi
17590
17591 if test -z "$GETOPT_H"; then
17592 echo "$as_me:$LINENO: checking whether optreset is declared" >&5
17593echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6
17594if test "${ac_cv_have_decl_optreset+set}" = set; then
17595 echo $ECHO_N "(cached) $ECHO_C" >&6
17596else
17597 cat >conftest.$ac_ext <<_ACEOF
17598/* confdefs.h. */
17599_ACEOF
17600cat confdefs.h >>conftest.$ac_ext
17601cat >>conftest.$ac_ext <<_ACEOF
17602/* end confdefs.h. */
17603#include <getopt.h>
17604
17605int
17606main ()
17607{
17608#ifndef optreset
17609 char *p = (char *) optreset;
17610#endif
17611
17612 ;
17613 return 0;
17614}
17615_ACEOF
17616rm -f conftest.$ac_objext
17617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17618 (eval $ac_compile) 2>conftest.er1
17619 ac_status=$?
17620 grep -v '^ *+' conftest.er1 >conftest.err
17621 rm -f conftest.er1
17622 cat conftest.err >&5
17623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17624 (exit $ac_status); } &&
e143ad11
AS
17625 { ac_try='test -z "$ac_c_werror_flag"
17626 || test ! -s conftest.err'
52dbaac8
PE
17627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17628 (eval $ac_try) 2>&5
17629 ac_status=$?
17630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17631 (exit $ac_status); }; } &&
17632 { ac_try='test -s conftest.$ac_objext'
17633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17634 (eval $ac_try) 2>&5
17635 ac_status=$?
17636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17637 (exit $ac_status); }; }; then
17638 ac_cv_have_decl_optreset=yes
17639else
17640 echo "$as_me: failed program was:" >&5
17641sed 's/^/| /' conftest.$ac_ext >&5
17642
17643ac_cv_have_decl_optreset=no
17644fi
17645rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17646fi
17647echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
17648echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6
17649if test $ac_cv_have_decl_optreset = yes; then
17650 GETOPT_H=getopt.h
17651fi
17652
17653 fi
17654
17655 if test -z "$GETOPT_H"; then
17656 echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
17657echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6
17658if test "${gl_cv_func_gnu_getopt+set}" = set; then
17659 echo $ECHO_N "(cached) $ECHO_C" >&6
17660else
17661 if test "$cross_compiling" = yes; then
17662 echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
17663echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6
17664if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
17665 echo $ECHO_N "(cached) $ECHO_C" >&6
17666else
17667 cat >conftest.$ac_ext <<_ACEOF
17668/* confdefs.h. */
17669_ACEOF
17670cat confdefs.h >>conftest.$ac_ext
17671cat >>conftest.$ac_ext <<_ACEOF
17672/* end confdefs.h. */
17673#include <getopt.h>
17674
17675int
17676main ()
17677{
17678#ifndef getopt_clip
17679 char *p = (char *) getopt_clip;
17680#endif
17681
17682 ;
17683 return 0;
17684}
17685_ACEOF
17686rm -f conftest.$ac_objext
17687if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17688 (eval $ac_compile) 2>conftest.er1
17689 ac_status=$?
17690 grep -v '^ *+' conftest.er1 >conftest.err
17691 rm -f conftest.er1
17692 cat conftest.err >&5
17693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17694 (exit $ac_status); } &&
e143ad11
AS
17695 { ac_try='test -z "$ac_c_werror_flag"
17696 || test ! -s conftest.err'
52dbaac8
PE
17697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17698 (eval $ac_try) 2>&5
17699 ac_status=$?
17700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17701 (exit $ac_status); }; } &&
17702 { ac_try='test -s conftest.$ac_objext'
17703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17704 (eval $ac_try) 2>&5
17705 ac_status=$?
17706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17707 (exit $ac_status); }; }; then
17708 ac_cv_have_decl_getopt_clip=yes
17709else
17710 echo "$as_me: failed program was:" >&5
17711sed 's/^/| /' conftest.$ac_ext >&5
17712
17713ac_cv_have_decl_getopt_clip=no
17714fi
17715rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17716fi
17717echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
17718echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6
17719if test $ac_cv_have_decl_getopt_clip = yes; then
17720 gl_cv_func_gnu_getopt=no
17721else
17722 gl_cv_func_gnu_getopt=yes
17723fi
17724
17725else
17726 cat >conftest.$ac_ext <<_ACEOF
17727/* confdefs.h. */
17728_ACEOF
17729cat confdefs.h >>conftest.$ac_ext
17730cat >>conftest.$ac_ext <<_ACEOF
17731/* end confdefs.h. */
17732#include <getopt.h>
17733int
17734main ()
17735{
17736
17737 char *myargv[3];
17738 myargv[0] = "conftest";
17739 myargv[1] = "-+";
17740 myargv[2] = 0;
17741 return getopt (2, myargv, "+a") != '?';
17742
17743 ;
17744 return 0;
17745}
17746_ACEOF
17747rm -f conftest$ac_exeext
17748if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17749 (eval $ac_link) 2>&5
17750 ac_status=$?
17751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17752 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17754 (eval $ac_try) 2>&5
17755 ac_status=$?
17756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17757 (exit $ac_status); }; }; then
17758 gl_cv_func_gnu_getopt=yes
17759else
17760 echo "$as_me: program exited with status $ac_status" >&5
17761echo "$as_me: failed program was:" >&5
17762sed 's/^/| /' conftest.$ac_ext >&5
17763
17764( exit $ac_status )
17765gl_cv_func_gnu_getopt=no
17766fi
17767rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17768fi
17769fi
17770echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
17771echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6
17772 if test "$gl_cv_func_gnu_getopt" = "no"; then
17773 GETOPT_H=getopt.h
17774 fi
17775 fi
17776
17777
17778
17779 if test -n "$GETOPT_H"; then
17780
17781
17782 GETOPT_H=getopt.h
17783
17784cat >>confdefs.h <<\_ACEOF
17785#define __GETOPT_PREFIX rpl_
17786_ACEOF
17787
17788
17789
17790 :
17791 GETOPTOBJS='getopt.o getopt1.o'
17792
17793fi
17794
17795
17796
17797
cd958eb3
MB
17798echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
17799echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
17800if test "${ac_cv_func_getpgrp_void+set}" = set; then
17801 echo $ECHO_N "(cached) $ECHO_C" >&6
17802else
17803 # Use it with a single arg.
17804cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17805/* confdefs.h. */
17806_ACEOF
17807cat confdefs.h >>conftest.$ac_ext
17808cat >>conftest.$ac_ext <<_ACEOF
17809/* end confdefs.h. */
cd958eb3
MB
17810$ac_includes_default
17811int
17812main ()
17813{
17814getpgrp (0);
17815 ;
17816 return 0;
17817}
17818_ACEOF
17819rm -f conftest.$ac_objext
17820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17821 (eval $ac_compile) 2>conftest.er1
cd958eb3 17822 ac_status=$?
edfaf76d
LK
17823 grep -v '^ *+' conftest.er1 >conftest.err
17824 rm -f conftest.er1
17825 cat conftest.err >&5
cd958eb3
MB
17826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17827 (exit $ac_status); } &&
e143ad11
AS
17828 { ac_try='test -z "$ac_c_werror_flag"
17829 || test ! -s conftest.err'
edfaf76d
LK
17830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17831 (eval $ac_try) 2>&5
17832 ac_status=$?
17833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17834 (exit $ac_status); }; } &&
17835 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
17836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17837 (eval $ac_try) 2>&5
17838 ac_status=$?
17839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17840 (exit $ac_status); }; }; then
17841 ac_cv_func_getpgrp_void=no
17842else
17843 echo "$as_me: failed program was:" >&5
19650fd6
AS
17844sed 's/^/| /' conftest.$ac_ext >&5
17845
cd958eb3
MB
17846ac_cv_func_getpgrp_void=yes
17847fi
edfaf76d 17848rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
17849
17850fi
17851echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
17852echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
17853if test $ac_cv_func_getpgrp_void = yes; then
17854
17855cat >>confdefs.h <<\_ACEOF
17856#define GETPGRP_VOID 1
17857_ACEOF
17858
17859fi
17860
17861
973a76b1
DL
17862
17863for ac_func in strftime
17864do
17865as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17866echo "$as_me:$LINENO: checking for $ac_func" >&5
17867echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17868if eval "test \"\${$as_ac_var+set}\" = set"; then
17869 echo $ECHO_N "(cached) $ECHO_C" >&6
17870else
17871 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17872/* confdefs.h. */
17873_ACEOF
17874cat confdefs.h >>conftest.$ac_ext
17875cat >>conftest.$ac_ext <<_ACEOF
17876/* end confdefs.h. */
edfaf76d
LK
17877/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17878 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17879#define $ac_func innocuous_$ac_func
17880
973a76b1 17881/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17882 which can conflict with char $ac_func (); below.
17883 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17884 <limits.h> exists even on freestanding compilers. */
edfaf76d 17885
19650fd6
AS
17886#ifdef __STDC__
17887# include <limits.h>
17888#else
17889# include <assert.h>
17890#endif
edfaf76d
LK
17891
17892#undef $ac_func
17893
973a76b1
DL
17894/* Override any gcc2 internal prototype to avoid an error. */
17895#ifdef __cplusplus
17896extern "C"
19650fd6 17897{
973a76b1
DL
17898#endif
17899/* We use char because int might match the return type of a gcc2
17900 builtin and then its argument prototype would still apply. */
17901char $ac_func ();
17902/* The GNU C library defines this for functions which it implements
17903 to always fail with ENOSYS. Some functions are actually named
17904 something starting with __ and the normal name is an alias. */
17905#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17906choke me
17907#else
19650fd6
AS
17908char (*f) () = $ac_func;
17909#endif
17910#ifdef __cplusplus
17911}
973a76b1
DL
17912#endif
17913
19650fd6
AS
17914int
17915main ()
17916{
17917return f != $ac_func;
973a76b1
DL
17918 ;
17919 return 0;
17920}
17921_ACEOF
17922rm -f conftest.$ac_objext conftest$ac_exeext
17923if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17924 (eval $ac_link) 2>conftest.er1
973a76b1 17925 ac_status=$?
edfaf76d
LK
17926 grep -v '^ *+' conftest.er1 >conftest.err
17927 rm -f conftest.er1
17928 cat conftest.err >&5
973a76b1
DL
17929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17930 (exit $ac_status); } &&
e143ad11
AS
17931 { ac_try='test -z "$ac_c_werror_flag"
17932 || test ! -s conftest.err'
edfaf76d
LK
17933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17934 (eval $ac_try) 2>&5
17935 ac_status=$?
17936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17937 (exit $ac_status); }; } &&
17938 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
17939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17940 (eval $ac_try) 2>&5
17941 ac_status=$?
17942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17943 (exit $ac_status); }; }; then
17944 eval "$as_ac_var=yes"
17945else
17946 echo "$as_me: failed program was:" >&5
19650fd6
AS
17947sed 's/^/| /' conftest.$ac_ext >&5
17948
973a76b1
DL
17949eval "$as_ac_var=no"
17950fi
edfaf76d
LK
17951rm -f conftest.err conftest.$ac_objext \
17952 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
17953fi
17954echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17955echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17956if test `eval echo '${'$as_ac_var'}'` = yes; then
17957 cat >>confdefs.h <<_ACEOF
17958#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17959_ACEOF
17960
17961else
17962 # strftime is in -lintl on SCO UNIX.
17963echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
17964echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
17965if test "${ac_cv_lib_intl_strftime+set}" = set; then
17966 echo $ECHO_N "(cached) $ECHO_C" >&6
17967else
17968 ac_check_lib_save_LIBS=$LIBS
17969LIBS="-lintl $LIBS"
17970cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17971/* confdefs.h. */
17972_ACEOF
17973cat confdefs.h >>conftest.$ac_ext
17974cat >>conftest.$ac_ext <<_ACEOF
17975/* end confdefs.h. */
973a76b1
DL
17976
17977/* Override any gcc2 internal prototype to avoid an error. */
17978#ifdef __cplusplus
17979extern "C"
17980#endif
17981/* We use char because int might match the return type of a gcc2
17982 builtin and then its argument prototype would still apply. */
17983char strftime ();
17984int
17985main ()
17986{
17987strftime ();
17988 ;
17989 return 0;
17990}
17991_ACEOF
17992rm -f conftest.$ac_objext conftest$ac_exeext
17993if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17994 (eval $ac_link) 2>conftest.er1
973a76b1 17995 ac_status=$?
edfaf76d
LK
17996 grep -v '^ *+' conftest.er1 >conftest.err
17997 rm -f conftest.er1
17998 cat conftest.err >&5
973a76b1
DL
17999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18000 (exit $ac_status); } &&
e143ad11
AS
18001 { ac_try='test -z "$ac_c_werror_flag"
18002 || test ! -s conftest.err'
edfaf76d
LK
18003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18004 (eval $ac_try) 2>&5
18005 ac_status=$?
18006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18007 (exit $ac_status); }; } &&
18008 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
18009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18010 (eval $ac_try) 2>&5
18011 ac_status=$?
18012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18013 (exit $ac_status); }; }; then
18014 ac_cv_lib_intl_strftime=yes
18015else
18016 echo "$as_me: failed program was:" >&5
19650fd6
AS
18017sed 's/^/| /' conftest.$ac_ext >&5
18018
973a76b1
DL
18019ac_cv_lib_intl_strftime=no
18020fi
edfaf76d
LK
18021rm -f conftest.err conftest.$ac_objext \
18022 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
18023LIBS=$ac_check_lib_save_LIBS
18024fi
18025echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
18026echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
18027if test $ac_cv_lib_intl_strftime = yes; then
18028 cat >>confdefs.h <<\_ACEOF
18029#define HAVE_STRFTIME 1
18030_ACEOF
18031
18032LIBS="-lintl $LIBS"
18033fi
18034
18035fi
18036done
18037
18038
b936fae4
AS
18039# UNIX98 PTYs.
18040
18041for ac_func in grantpt
503d2be0
AS
18042do
18043as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 18044echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
18045echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18046if eval "test \"\${$as_ac_var+set}\" = set"; then
18047 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18048else
503d2be0 18049 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18050/* confdefs.h. */
18051_ACEOF
18052cat confdefs.h >>conftest.$ac_ext
18053cat >>conftest.$ac_ext <<_ACEOF
18054/* end confdefs.h. */
edfaf76d
LK
18055/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18056 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18057#define $ac_func innocuous_$ac_func
18058
503d2be0 18059/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18060 which can conflict with char $ac_func (); below.
18061 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18062 <limits.h> exists even on freestanding compilers. */
edfaf76d 18063
19650fd6
AS
18064#ifdef __STDC__
18065# include <limits.h>
18066#else
18067# include <assert.h>
18068#endif
edfaf76d
LK
18069
18070#undef $ac_func
18071
4c343001 18072/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18073#ifdef __cplusplus
18074extern "C"
19650fd6 18075{
503d2be0 18076#endif
4c343001 18077/* We use char because int might match the return type of a gcc2
503d2be0
AS
18078 builtin and then its argument prototype would still apply. */
18079char $ac_func ();
503d2be0
AS
18080/* The GNU C library defines this for functions which it implements
18081 to always fail with ENOSYS. Some functions are actually named
18082 something starting with __ and the normal name is an alias. */
18083#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18084choke me
18085#else
19650fd6
AS
18086char (*f) () = $ac_func;
18087#endif
18088#ifdef __cplusplus
18089}
503d2be0 18090#endif
4c343001 18091
19650fd6
AS
18092int
18093main ()
18094{
18095return f != $ac_func;
503d2be0
AS
18096 ;
18097 return 0;
18098}
18099_ACEOF
18100rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18102 (eval $ac_link) 2>conftest.er1
503d2be0 18103 ac_status=$?
edfaf76d
LK
18104 grep -v '^ *+' conftest.er1 >conftest.err
18105 rm -f conftest.er1
18106 cat conftest.err >&5
c0d27fcc 18107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18108 (exit $ac_status); } &&
e143ad11
AS
18109 { ac_try='test -z "$ac_c_werror_flag"
18110 || test ! -s conftest.err'
edfaf76d
LK
18111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18112 (eval $ac_try) 2>&5
18113 ac_status=$?
18114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18115 (exit $ac_status); }; } &&
18116 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18118 (eval $ac_try) 2>&5
18119 ac_status=$?
c0d27fcc 18120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18121 (exit $ac_status); }; }; then
18122 eval "$as_ac_var=yes"
18123else
18124 echo "$as_me: failed program was:" >&5
19650fd6
AS
18125sed 's/^/| /' conftest.$ac_ext >&5
18126
503d2be0
AS
18127eval "$as_ac_var=no"
18128fi
edfaf76d
LK
18129rm -f conftest.err conftest.$ac_objext \
18130 conftest$ac_exeext conftest.$ac_ext
503d2be0 18131fi
c0d27fcc 18132echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
18133echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18134if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18135 cat >>confdefs.h <<_ACEOF
503d2be0 18136#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18137_ACEOF
4c343001
DL
18138
18139fi
503d2be0
AS
18140done
18141
c0d27fcc 18142
b936fae4 18143# PTY-related GNU extensions.
4c343001 18144
b936fae4
AS
18145for ac_func in getpt
18146do
18147as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 18148echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
18149echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18150if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 18151 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18152else
b936fae4 18153 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18154/* confdefs.h. */
18155_ACEOF
18156cat confdefs.h >>conftest.$ac_ext
18157cat >>conftest.$ac_ext <<_ACEOF
18158/* end confdefs.h. */
edfaf76d
LK
18159/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18160 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18161#define $ac_func innocuous_$ac_func
18162
087121cc 18163/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18164 which can conflict with char $ac_func (); below.
18165 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18166 <limits.h> exists even on freestanding compilers. */
edfaf76d 18167
19650fd6
AS
18168#ifdef __STDC__
18169# include <limits.h>
18170#else
18171# include <assert.h>
18172#endif
edfaf76d
LK
18173
18174#undef $ac_func
18175
087121cc 18176/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18177#ifdef __cplusplus
18178extern "C"
19650fd6 18179{
503d2be0 18180#endif
087121cc 18181/* We use char because int might match the return type of a gcc2
503d2be0
AS
18182 builtin and then its argument prototype would still apply. */
18183char $ac_func ();
087121cc
GM
18184/* The GNU C library defines this for functions which it implements
18185 to always fail with ENOSYS. Some functions are actually named
18186 something starting with __ and the normal name is an alias. */
18187#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18188choke me
18189#else
19650fd6
AS
18190char (*f) () = $ac_func;
18191#endif
18192#ifdef __cplusplus
18193}
087121cc
GM
18194#endif
18195
19650fd6
AS
18196int
18197main ()
18198{
18199return f != $ac_func;
503d2be0
AS
18200 ;
18201 return 0;
18202}
18203_ACEOF
18204rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18206 (eval $ac_link) 2>conftest.er1
503d2be0 18207 ac_status=$?
edfaf76d
LK
18208 grep -v '^ *+' conftest.er1 >conftest.err
18209 rm -f conftest.er1
18210 cat conftest.err >&5
c0d27fcc 18211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18212 (exit $ac_status); } &&
e143ad11
AS
18213 { ac_try='test -z "$ac_c_werror_flag"
18214 || test ! -s conftest.err'
edfaf76d
LK
18215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18216 (eval $ac_try) 2>&5
18217 ac_status=$?
18218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18219 (exit $ac_status); }; } &&
18220 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18222 (eval $ac_try) 2>&5
18223 ac_status=$?
c0d27fcc 18224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18225 (exit $ac_status); }; }; then
18226 eval "$as_ac_var=yes"
18227else
18228 echo "$as_me: failed program was:" >&5
19650fd6
AS
18229sed 's/^/| /' conftest.$ac_ext >&5
18230
503d2be0
AS
18231eval "$as_ac_var=no"
18232fi
edfaf76d
LK
18233rm -f conftest.err conftest.$ac_objext \
18234 conftest$ac_exeext conftest.$ac_ext
503d2be0 18235fi
c0d27fcc 18236echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
18237echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18238if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18239 cat >>confdefs.h <<_ACEOF
503d2be0 18240#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18241_ACEOF
087121cc 18242
087121cc
GM
18243fi
18244done
18245
c0d27fcc 18246
ba4481b5
DL
18247# Check this now, so that we will NOT find the above functions in ncurses.
18248# That is because we have not set up to link ncurses in lib-src.
18249# It's better to believe a function is not available
18250# than to expect to find it in ncurses.
503d2be0 18251
c0d27fcc 18252echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
18253echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
18254if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
18255 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18256else
503d2be0 18257 ac_check_lib_save_LIBS=$LIBS
ba4481b5 18258LIBS="-lncurses $LIBS"
503d2be0 18259cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18260/* confdefs.h. */
18261_ACEOF
18262cat confdefs.h >>conftest.$ac_ext
18263cat >>conftest.$ac_ext <<_ACEOF
18264/* end confdefs.h. */
503d2be0 18265
ba4481b5 18266/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18267#ifdef __cplusplus
18268extern "C"
18269#endif
ba4481b5 18270/* We use char because int might match the return type of a gcc2
503d2be0
AS
18271 builtin and then its argument prototype would still apply. */
18272char tparm ();
18273int
18274main ()
18275{
18276tparm ();
18277 ;
18278 return 0;
18279}
18280_ACEOF
18281rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18282if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18283 (eval $ac_link) 2>conftest.er1
503d2be0 18284 ac_status=$?
edfaf76d
LK
18285 grep -v '^ *+' conftest.er1 >conftest.err
18286 rm -f conftest.er1
18287 cat conftest.err >&5
c0d27fcc 18288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18289 (exit $ac_status); } &&
e143ad11
AS
18290 { ac_try='test -z "$ac_c_werror_flag"
18291 || test ! -s conftest.err'
edfaf76d
LK
18292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18293 (eval $ac_try) 2>&5
18294 ac_status=$?
18295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18296 (exit $ac_status); }; } &&
18297 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18299 (eval $ac_try) 2>&5
18300 ac_status=$?
c0d27fcc 18301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18302 (exit $ac_status); }; }; then
18303 ac_cv_lib_ncurses_tparm=yes
18304else
18305 echo "$as_me: failed program was:" >&5
19650fd6
AS
18306sed 's/^/| /' conftest.$ac_ext >&5
18307
503d2be0
AS
18308ac_cv_lib_ncurses_tparm=no
18309fi
edfaf76d
LK
18310rm -f conftest.err conftest.$ac_objext \
18311 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18312LIBS=$ac_check_lib_save_LIBS
18313fi
c0d27fcc 18314echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
18315echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
18316if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 18317 cat >>confdefs.h <<_ACEOF
503d2be0 18318#define HAVE_LIBNCURSES 1
c0d27fcc 18319_ACEOF
ba4481b5
DL
18320
18321 LIBS="-lncurses $LIBS"
18322
ba4481b5
DL
18323fi
18324
c0d27fcc 18325
84e70f78
KR
18326# Do we need the Hesiod library to provide the support routines?
18327if test "$with_hesiod" = yes ; then
18328 # Don't set $LIBS here -- see comments above.
18329 resolv=no
c0d27fcc 18330 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
18331echo $ECHO_N "checking for res_send... $ECHO_C" >&6
18332if test "${ac_cv_func_res_send+set}" = set; then
18333 echo $ECHO_N "(cached) $ECHO_C" >&6
18334else
18335 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18336/* confdefs.h. */
18337_ACEOF
18338cat confdefs.h >>conftest.$ac_ext
18339cat >>conftest.$ac_ext <<_ACEOF
18340/* end confdefs.h. */
edfaf76d
LK
18341/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
18342 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18343#define res_send innocuous_res_send
18344
84e70f78 18345/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18346 which can conflict with char res_send (); below.
18347 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18348 <limits.h> exists even on freestanding compilers. */
edfaf76d 18349
19650fd6
AS
18350#ifdef __STDC__
18351# include <limits.h>
18352#else
18353# include <assert.h>
18354#endif
edfaf76d
LK
18355
18356#undef res_send
18357
84e70f78
KR
18358/* Override any gcc2 internal prototype to avoid an error. */
18359#ifdef __cplusplus
18360extern "C"
19650fd6 18361{
84e70f78
KR
18362#endif
18363/* We use char because int might match the return type of a gcc2
18364 builtin and then its argument prototype would still apply. */
18365char res_send ();
84e70f78
KR
18366/* The GNU C library defines this for functions which it implements
18367 to always fail with ENOSYS. Some functions are actually named
18368 something starting with __ and the normal name is an alias. */
18369#if defined (__stub_res_send) || defined (__stub___res_send)
18370choke me
18371#else
19650fd6
AS
18372char (*f) () = res_send;
18373#endif
18374#ifdef __cplusplus
18375}
cd958eb3
MB
18376#endif
18377
19650fd6
AS
18378int
18379main ()
18380{
18381return f != res_send;
84e70f78
KR
18382 ;
18383 return 0;
18384}
18385_ACEOF
18386rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18387if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18388 (eval $ac_link) 2>conftest.er1
84e70f78 18389 ac_status=$?
edfaf76d
LK
18390 grep -v '^ *+' conftest.er1 >conftest.err
18391 rm -f conftest.er1
18392 cat conftest.err >&5
c0d27fcc 18393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18394 (exit $ac_status); } &&
e143ad11
AS
18395 { ac_try='test -z "$ac_c_werror_flag"
18396 || test ! -s conftest.err'
edfaf76d
LK
18397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18398 (eval $ac_try) 2>&5
18399 ac_status=$?
18400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18401 (exit $ac_status); }; } &&
18402 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18404 (eval $ac_try) 2>&5
18405 ac_status=$?
c0d27fcc 18406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18407 (exit $ac_status); }; }; then
18408 ac_cv_func_res_send=yes
18409else
18410 echo "$as_me: failed program was:" >&5
19650fd6
AS
18411sed 's/^/| /' conftest.$ac_ext >&5
18412
84e70f78
KR
18413ac_cv_func_res_send=no
18414fi
edfaf76d
LK
18415rm -f conftest.err conftest.$ac_objext \
18416 conftest$ac_exeext conftest.$ac_ext
84e70f78 18417fi
c0d27fcc 18418echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
18419echo "${ECHO_T}$ac_cv_func_res_send" >&6
18420if test $ac_cv_func_res_send = yes; then
18421 :
18422else
c0d27fcc 18423 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
18424echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
18425if test "${ac_cv_func___res_send+set}" = set; then
18426 echo $ECHO_N "(cached) $ECHO_C" >&6
18427else
18428 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18429/* confdefs.h. */
18430_ACEOF
18431cat confdefs.h >>conftest.$ac_ext
18432cat >>conftest.$ac_ext <<_ACEOF
18433/* end confdefs.h. */
edfaf76d
LK
18434/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
18435 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18436#define __res_send innocuous___res_send
18437
84e70f78 18438/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18439 which can conflict with char __res_send (); below.
18440 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18441 <limits.h> exists even on freestanding compilers. */
edfaf76d 18442
19650fd6
AS
18443#ifdef __STDC__
18444# include <limits.h>
18445#else
18446# include <assert.h>
18447#endif
edfaf76d
LK
18448
18449#undef __res_send
18450
84e70f78
KR
18451/* Override any gcc2 internal prototype to avoid an error. */
18452#ifdef __cplusplus
18453extern "C"
19650fd6 18454{
84e70f78
KR
18455#endif
18456/* We use char because int might match the return type of a gcc2
18457 builtin and then its argument prototype would still apply. */
18458char __res_send ();
84e70f78
KR
18459/* The GNU C library defines this for functions which it implements
18460 to always fail with ENOSYS. Some functions are actually named
18461 something starting with __ and the normal name is an alias. */
18462#if defined (__stub___res_send) || defined (__stub_____res_send)
18463choke me
18464#else
19650fd6
AS
18465char (*f) () = __res_send;
18466#endif
18467#ifdef __cplusplus
18468}
84e70f78
KR
18469#endif
18470
19650fd6
AS
18471int
18472main ()
18473{
18474return f != __res_send;
84e70f78
KR
18475 ;
18476 return 0;
18477}
18478_ACEOF
18479rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18480if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18481 (eval $ac_link) 2>conftest.er1
84e70f78 18482 ac_status=$?
edfaf76d
LK
18483 grep -v '^ *+' conftest.er1 >conftest.err
18484 rm -f conftest.er1
18485 cat conftest.err >&5
c0d27fcc 18486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18487 (exit $ac_status); } &&
e143ad11
AS
18488 { ac_try='test -z "$ac_c_werror_flag"
18489 || test ! -s conftest.err'
edfaf76d
LK
18490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18491 (eval $ac_try) 2>&5
18492 ac_status=$?
18493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18494 (exit $ac_status); }; } &&
18495 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18497 (eval $ac_try) 2>&5
18498 ac_status=$?
c0d27fcc 18499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18500 (exit $ac_status); }; }; then
18501 ac_cv_func___res_send=yes
18502else
18503 echo "$as_me: failed program was:" >&5
19650fd6
AS
18504sed 's/^/| /' conftest.$ac_ext >&5
18505
84e70f78
KR
18506ac_cv_func___res_send=no
18507fi
edfaf76d
LK
18508rm -f conftest.err conftest.$ac_objext \
18509 conftest$ac_exeext conftest.$ac_ext
84e70f78 18510fi
c0d27fcc 18511echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
18512echo "${ECHO_T}$ac_cv_func___res_send" >&6
18513if test $ac_cv_func___res_send = yes; then
18514 :
18515else
c0d27fcc 18516 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
18517echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
18518if test "${ac_cv_lib_resolv_res_send+set}" = set; then
18519 echo $ECHO_N "(cached) $ECHO_C" >&6
18520else
18521 ac_check_lib_save_LIBS=$LIBS
18522LIBS="-lresolv $LIBS"
18523cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18524/* confdefs.h. */
18525_ACEOF
18526cat confdefs.h >>conftest.$ac_ext
18527cat >>conftest.$ac_ext <<_ACEOF
18528/* end confdefs.h. */
84e70f78
KR
18529
18530/* Override any gcc2 internal prototype to avoid an error. */
18531#ifdef __cplusplus
18532extern "C"
18533#endif
18534/* We use char because int might match the return type of a gcc2
18535 builtin and then its argument prototype would still apply. */
18536char res_send ();
18537int
18538main ()
18539{
18540res_send ();
18541 ;
18542 return 0;
18543}
18544_ACEOF
18545rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18546if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18547 (eval $ac_link) 2>conftest.er1
84e70f78 18548 ac_status=$?
edfaf76d
LK
18549 grep -v '^ *+' conftest.er1 >conftest.err
18550 rm -f conftest.er1
18551 cat conftest.err >&5
c0d27fcc 18552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18553 (exit $ac_status); } &&
e143ad11
AS
18554 { ac_try='test -z "$ac_c_werror_flag"
18555 || test ! -s conftest.err'
edfaf76d
LK
18556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18557 (eval $ac_try) 2>&5
18558 ac_status=$?
18559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18560 (exit $ac_status); }; } &&
18561 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18563 (eval $ac_try) 2>&5
18564 ac_status=$?
c0d27fcc 18565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18566 (exit $ac_status); }; }; then
18567 ac_cv_lib_resolv_res_send=yes
18568else
18569 echo "$as_me: failed program was:" >&5
19650fd6
AS
18570sed 's/^/| /' conftest.$ac_ext >&5
18571
84e70f78
KR
18572ac_cv_lib_resolv_res_send=no
18573fi
edfaf76d
LK
18574rm -f conftest.err conftest.$ac_objext \
18575 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18576LIBS=$ac_check_lib_save_LIBS
18577fi
c0d27fcc 18578echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
18579echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
18580if test $ac_cv_lib_resolv_res_send = yes; then
18581 resolv=yes
18582else
c0d27fcc 18583 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
18584echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
18585if test "${ac_cv_lib_resolv___res_send+set}" = set; then
18586 echo $ECHO_N "(cached) $ECHO_C" >&6
18587else
18588 ac_check_lib_save_LIBS=$LIBS
18589LIBS="-lresolv $LIBS"
18590cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18591/* confdefs.h. */
18592_ACEOF
18593cat confdefs.h >>conftest.$ac_ext
18594cat >>conftest.$ac_ext <<_ACEOF
18595/* end confdefs.h. */
84e70f78
KR
18596
18597/* Override any gcc2 internal prototype to avoid an error. */
18598#ifdef __cplusplus
18599extern "C"
18600#endif
18601/* We use char because int might match the return type of a gcc2
18602 builtin and then its argument prototype would still apply. */
18603char __res_send ();
18604int
18605main ()
18606{
18607__res_send ();
18608 ;
18609 return 0;
18610}
18611_ACEOF
18612rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18613if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18614 (eval $ac_link) 2>conftest.er1
84e70f78 18615 ac_status=$?
edfaf76d
LK
18616 grep -v '^ *+' conftest.er1 >conftest.err
18617 rm -f conftest.er1
18618 cat conftest.err >&5
c0d27fcc 18619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18620 (exit $ac_status); } &&
e143ad11
AS
18621 { ac_try='test -z "$ac_c_werror_flag"
18622 || test ! -s conftest.err'
edfaf76d
LK
18623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18624 (eval $ac_try) 2>&5
18625 ac_status=$?
18626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18627 (exit $ac_status); }; } &&
18628 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18630 (eval $ac_try) 2>&5
18631 ac_status=$?
c0d27fcc 18632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18633 (exit $ac_status); }; }; then
18634 ac_cv_lib_resolv___res_send=yes
18635else
18636 echo "$as_me: failed program was:" >&5
19650fd6
AS
18637sed 's/^/| /' conftest.$ac_ext >&5
18638
84e70f78
KR
18639ac_cv_lib_resolv___res_send=no
18640fi
edfaf76d
LK
18641rm -f conftest.err conftest.$ac_objext \
18642 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18643LIBS=$ac_check_lib_save_LIBS
18644fi
c0d27fcc 18645echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
18646echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
18647if test $ac_cv_lib_resolv___res_send = yes; then
18648 resolv=yes
18649fi
18650
18651fi
18652
18653fi
18654
18655fi
18656
18657 if test "$resolv" = yes ; then
18658 RESOLVLIB=-lresolv
b936fae4 18659
c0d27fcc 18660cat >>confdefs.h <<\_ACEOF
84e70f78 18661#define HAVE_LIBRESOLV 1
c0d27fcc 18662_ACEOF
84e70f78
KR
18663
18664 else
18665 RESOLVLIB=
18666 fi
c0d27fcc 18667 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
18668echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
18669if test "${ac_cv_func_hes_getmailhost+set}" = set; then
18670 echo $ECHO_N "(cached) $ECHO_C" >&6
18671else
18672 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18673/* confdefs.h. */
18674_ACEOF
18675cat confdefs.h >>conftest.$ac_ext
18676cat >>conftest.$ac_ext <<_ACEOF
18677/* end confdefs.h. */
edfaf76d
LK
18678/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
18679 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18680#define hes_getmailhost innocuous_hes_getmailhost
18681
84e70f78 18682/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18683 which can conflict with char hes_getmailhost (); below.
18684 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18685 <limits.h> exists even on freestanding compilers. */
edfaf76d 18686
19650fd6
AS
18687#ifdef __STDC__
18688# include <limits.h>
18689#else
18690# include <assert.h>
18691#endif
edfaf76d
LK
18692
18693#undef hes_getmailhost
18694
84e70f78
KR
18695/* Override any gcc2 internal prototype to avoid an error. */
18696#ifdef __cplusplus
18697extern "C"
19650fd6 18698{
84e70f78
KR
18699#endif
18700/* We use char because int might match the return type of a gcc2
18701 builtin and then its argument prototype would still apply. */
18702char hes_getmailhost ();
84e70f78
KR
18703/* The GNU C library defines this for functions which it implements
18704 to always fail with ENOSYS. Some functions are actually named
18705 something starting with __ and the normal name is an alias. */
18706#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
18707choke me
18708#else
19650fd6
AS
18709char (*f) () = hes_getmailhost;
18710#endif
18711#ifdef __cplusplus
18712}
cd958eb3
MB
18713#endif
18714
19650fd6
AS
18715int
18716main ()
18717{
18718return f != hes_getmailhost;
84e70f78
KR
18719 ;
18720 return 0;
18721}
18722_ACEOF
18723rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18724if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18725 (eval $ac_link) 2>conftest.er1
84e70f78 18726 ac_status=$?
edfaf76d
LK
18727 grep -v '^ *+' conftest.er1 >conftest.err
18728 rm -f conftest.er1
18729 cat conftest.err >&5
c0d27fcc 18730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18731 (exit $ac_status); } &&
e143ad11
AS
18732 { ac_try='test -z "$ac_c_werror_flag"
18733 || test ! -s conftest.err'
edfaf76d
LK
18734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18735 (eval $ac_try) 2>&5
18736 ac_status=$?
18737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18738 (exit $ac_status); }; } &&
18739 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18741 (eval $ac_try) 2>&5
18742 ac_status=$?
c0d27fcc 18743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18744 (exit $ac_status); }; }; then
18745 ac_cv_func_hes_getmailhost=yes
18746else
18747 echo "$as_me: failed program was:" >&5
19650fd6
AS
18748sed 's/^/| /' conftest.$ac_ext >&5
18749
84e70f78
KR
18750ac_cv_func_hes_getmailhost=no
18751fi
edfaf76d
LK
18752rm -f conftest.err conftest.$ac_objext \
18753 conftest$ac_exeext conftest.$ac_ext
84e70f78 18754fi
c0d27fcc 18755echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
18756echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
18757if test $ac_cv_func_hes_getmailhost = yes; then
18758 :
18759else
c0d27fcc 18760 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
18761echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
18762if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
18763 echo $ECHO_N "(cached) $ECHO_C" >&6
18764else
18765 ac_check_lib_save_LIBS=$LIBS
18766LIBS="-lhesiod $RESOLVLIB $LIBS"
18767cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18768/* confdefs.h. */
18769_ACEOF
18770cat confdefs.h >>conftest.$ac_ext
18771cat >>conftest.$ac_ext <<_ACEOF
18772/* end confdefs.h. */
84e70f78
KR
18773
18774/* Override any gcc2 internal prototype to avoid an error. */
18775#ifdef __cplusplus
18776extern "C"
18777#endif
18778/* We use char because int might match the return type of a gcc2
18779 builtin and then its argument prototype would still apply. */
18780char hes_getmailhost ();
18781int
18782main ()
18783{
18784hes_getmailhost ();
18785 ;
18786 return 0;
18787}
18788_ACEOF
18789rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18790if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18791 (eval $ac_link) 2>conftest.er1
84e70f78 18792 ac_status=$?
edfaf76d
LK
18793 grep -v '^ *+' conftest.er1 >conftest.err
18794 rm -f conftest.er1
18795 cat conftest.err >&5
c0d27fcc 18796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18797 (exit $ac_status); } &&
e143ad11
AS
18798 { ac_try='test -z "$ac_c_werror_flag"
18799 || test ! -s conftest.err'
edfaf76d
LK
18800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18801 (eval $ac_try) 2>&5
18802 ac_status=$?
18803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18804 (exit $ac_status); }; } &&
18805 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18807 (eval $ac_try) 2>&5
18808 ac_status=$?
c0d27fcc 18809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18810 (exit $ac_status); }; }; then
18811 ac_cv_lib_hesiod_hes_getmailhost=yes
18812else
18813 echo "$as_me: failed program was:" >&5
19650fd6
AS
18814sed 's/^/| /' conftest.$ac_ext >&5
18815
84e70f78
KR
18816ac_cv_lib_hesiod_hes_getmailhost=no
18817fi
edfaf76d
LK
18818rm -f conftest.err conftest.$ac_objext \
18819 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18820LIBS=$ac_check_lib_save_LIBS
18821fi
c0d27fcc 18822echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
18823echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
18824if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 18825
c0d27fcc 18826cat >>confdefs.h <<\_ACEOF
84e70f78 18827#define HAVE_LIBHESIOD 1
c0d27fcc 18828_ACEOF
84e70f78
KR
18829
18830else
18831 :
18832fi
18833
18834fi
18835
18836fi
18837
a21616bd
KR
18838# These tell us which Kerberos-related libraries to use.
18839if test "${with_kerberos+set}" = set; then
503d2be0 18840
c0d27fcc 18841echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
18842echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
18843if test "${ac_cv_lib_com_err_com_err+set}" = set; then
18844 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18845else
503d2be0 18846 ac_check_lib_save_LIBS=$LIBS
a21616bd 18847LIBS="-lcom_err $LIBS"
503d2be0 18848cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18849/* confdefs.h. */
18850_ACEOF
18851cat confdefs.h >>conftest.$ac_ext
18852cat >>conftest.$ac_ext <<_ACEOF
18853/* end confdefs.h. */
503d2be0 18854
a21616bd 18855/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18856#ifdef __cplusplus
18857extern "C"
18858#endif
a21616bd 18859/* We use char because int might match the return type of a gcc2
503d2be0
AS
18860 builtin and then its argument prototype would still apply. */
18861char com_err ();
18862int
18863main ()
18864{
18865com_err ();
18866 ;
18867 return 0;
18868}
18869_ACEOF
18870rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18871if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18872 (eval $ac_link) 2>conftest.er1
503d2be0 18873 ac_status=$?
edfaf76d
LK
18874 grep -v '^ *+' conftest.er1 >conftest.err
18875 rm -f conftest.er1
18876 cat conftest.err >&5
c0d27fcc 18877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18878 (exit $ac_status); } &&
e143ad11
AS
18879 { ac_try='test -z "$ac_c_werror_flag"
18880 || test ! -s conftest.err'
edfaf76d
LK
18881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18882 (eval $ac_try) 2>&5
18883 ac_status=$?
18884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18885 (exit $ac_status); }; } &&
18886 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18888 (eval $ac_try) 2>&5
18889 ac_status=$?
c0d27fcc 18890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18891 (exit $ac_status); }; }; then
18892 ac_cv_lib_com_err_com_err=yes
18893else
18894 echo "$as_me: failed program was:" >&5
19650fd6
AS
18895sed 's/^/| /' conftest.$ac_ext >&5
18896
503d2be0
AS
18897ac_cv_lib_com_err_com_err=no
18898fi
edfaf76d
LK
18899rm -f conftest.err conftest.$ac_objext \
18900 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18901LIBS=$ac_check_lib_save_LIBS
18902fi
c0d27fcc 18903echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
18904echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
18905if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 18906 cat >>confdefs.h <<_ACEOF
503d2be0 18907#define HAVE_LIBCOM_ERR 1
c0d27fcc 18908_ACEOF
a21616bd
KR
18909
18910 LIBS="-lcom_err $LIBS"
18911
a21616bd
KR
18912fi
18913
c0d27fcc
MR
18914
18915echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
18916echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
18917if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
18918 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18919else
503d2be0 18920 ac_check_lib_save_LIBS=$LIBS
a21616bd 18921LIBS="-lk5crypto $LIBS"
503d2be0 18922cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18923/* confdefs.h. */
18924_ACEOF
18925cat confdefs.h >>conftest.$ac_ext
18926cat >>conftest.$ac_ext <<_ACEOF
18927/* end confdefs.h. */
503d2be0 18928
a21616bd 18929/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18930#ifdef __cplusplus
18931extern "C"
18932#endif
a21616bd 18933/* We use char because int might match the return type of a gcc2
503d2be0
AS
18934 builtin and then its argument prototype would still apply. */
18935char mit_des_cbc_encrypt ();
18936int
18937main ()
18938{
18939mit_des_cbc_encrypt ();
18940 ;
18941 return 0;
18942}
18943_ACEOF
18944rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18945if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18946 (eval $ac_link) 2>conftest.er1
503d2be0 18947 ac_status=$?
edfaf76d
LK
18948 grep -v '^ *+' conftest.er1 >conftest.err
18949 rm -f conftest.er1
18950 cat conftest.err >&5
c0d27fcc 18951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18952 (exit $ac_status); } &&
e143ad11
AS
18953 { ac_try='test -z "$ac_c_werror_flag"
18954 || test ! -s conftest.err'
edfaf76d
LK
18955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18956 (eval $ac_try) 2>&5
18957 ac_status=$?
18958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18959 (exit $ac_status); }; } &&
18960 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18962 (eval $ac_try) 2>&5
18963 ac_status=$?
c0d27fcc 18964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18965 (exit $ac_status); }; }; then
18966 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
18967else
18968 echo "$as_me: failed program was:" >&5
19650fd6
AS
18969sed 's/^/| /' conftest.$ac_ext >&5
18970
503d2be0
AS
18971ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
18972fi
edfaf76d
LK
18973rm -f conftest.err conftest.$ac_objext \
18974 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18975LIBS=$ac_check_lib_save_LIBS
18976fi
c0d27fcc 18977echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
18978echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
18979if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 18980 cat >>confdefs.h <<_ACEOF
503d2be0 18981#define HAVE_LIBK5CRYPTO 1
c0d27fcc 18982_ACEOF
a21616bd
KR
18983
18984 LIBS="-lk5crypto $LIBS"
18985
a21616bd
KR
18986fi
18987
c0d27fcc
MR
18988
18989echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
18990echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
18991if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
18992 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18993else
503d2be0 18994 ac_check_lib_save_LIBS=$LIBS
a21616bd 18995LIBS="-lcrypto $LIBS"
503d2be0 18996cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18997/* confdefs.h. */
18998_ACEOF
18999cat confdefs.h >>conftest.$ac_ext
19000cat >>conftest.$ac_ext <<_ACEOF
19001/* end confdefs.h. */
503d2be0 19002
a21616bd 19003/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19004#ifdef __cplusplus
19005extern "C"
19006#endif
a21616bd 19007/* We use char because int might match the return type of a gcc2
503d2be0
AS
19008 builtin and then its argument prototype would still apply. */
19009char mit_des_cbc_encrypt ();
19010int
19011main ()
19012{
19013mit_des_cbc_encrypt ();
19014 ;
19015 return 0;
19016}
19017_ACEOF
19018rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19019if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19020 (eval $ac_link) 2>conftest.er1
503d2be0 19021 ac_status=$?
edfaf76d
LK
19022 grep -v '^ *+' conftest.er1 >conftest.err
19023 rm -f conftest.er1
19024 cat conftest.err >&5
c0d27fcc 19025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19026 (exit $ac_status); } &&
e143ad11
AS
19027 { ac_try='test -z "$ac_c_werror_flag"
19028 || test ! -s conftest.err'
edfaf76d
LK
19029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19030 (eval $ac_try) 2>&5
19031 ac_status=$?
19032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19033 (exit $ac_status); }; } &&
19034 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19036 (eval $ac_try) 2>&5
19037 ac_status=$?
c0d27fcc 19038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19039 (exit $ac_status); }; }; then
19040 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
19041else
19042 echo "$as_me: failed program was:" >&5
19650fd6
AS
19043sed 's/^/| /' conftest.$ac_ext >&5
19044
503d2be0
AS
19045ac_cv_lib_crypto_mit_des_cbc_encrypt=no
19046fi
edfaf76d
LK
19047rm -f conftest.err conftest.$ac_objext \
19048 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19049LIBS=$ac_check_lib_save_LIBS
19050fi
c0d27fcc 19051echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
19052echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
19053if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19054 cat >>confdefs.h <<_ACEOF
503d2be0 19055#define HAVE_LIBCRYPTO 1
c0d27fcc 19056_ACEOF
a21616bd
KR
19057
19058 LIBS="-lcrypto $LIBS"
19059
a21616bd
KR
19060fi
19061
c0d27fcc
MR
19062
19063echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
19064echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
19065if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
19066 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19067else
503d2be0 19068 ac_check_lib_save_LIBS=$LIBS
a21616bd 19069LIBS="-lkrb5 $LIBS"
503d2be0 19070cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19071/* confdefs.h. */
19072_ACEOF
19073cat confdefs.h >>conftest.$ac_ext
19074cat >>conftest.$ac_ext <<_ACEOF
19075/* end confdefs.h. */
a21616bd 19076
503d2be0
AS
19077/* Override any gcc2 internal prototype to avoid an error. */
19078#ifdef __cplusplus
19079extern "C"
19080#endif
19081/* We use char because int might match the return type of a gcc2
19082 builtin and then its argument prototype would still apply. */
19083char krb5_init_context ();
19084int
19085main ()
19086{
19087krb5_init_context ();
19088 ;
19089 return 0;
19090}
19091_ACEOF
19092rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19093if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19094 (eval $ac_link) 2>conftest.er1
503d2be0 19095 ac_status=$?
edfaf76d
LK
19096 grep -v '^ *+' conftest.er1 >conftest.err
19097 rm -f conftest.er1
19098 cat conftest.err >&5
c0d27fcc 19099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19100 (exit $ac_status); } &&
e143ad11
AS
19101 { ac_try='test -z "$ac_c_werror_flag"
19102 || test ! -s conftest.err'
edfaf76d
LK
19103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19104 (eval $ac_try) 2>&5
19105 ac_status=$?
19106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19107 (exit $ac_status); }; } &&
19108 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19110 (eval $ac_try) 2>&5
19111 ac_status=$?
c0d27fcc 19112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19113 (exit $ac_status); }; }; then
19114 ac_cv_lib_krb5_krb5_init_context=yes
19115else
19116 echo "$as_me: failed program was:" >&5
19650fd6
AS
19117sed 's/^/| /' conftest.$ac_ext >&5
19118
503d2be0
AS
19119ac_cv_lib_krb5_krb5_init_context=no
19120fi
edfaf76d
LK
19121rm -f conftest.err conftest.$ac_objext \
19122 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19123LIBS=$ac_check_lib_save_LIBS
19124fi
c0d27fcc 19125echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
19126echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
19127if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 19128 cat >>confdefs.h <<_ACEOF
503d2be0 19129#define HAVE_LIBKRB5 1
c0d27fcc 19130_ACEOF
a21616bd
KR
19131
19132 LIBS="-lkrb5 $LIBS"
19133
a21616bd
KR
19134fi
19135
19136 if test "${with_kerberos5+set}" != set; then
503d2be0 19137
c0d27fcc 19138echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
19139echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
19140if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
19141 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19142else
503d2be0 19143 ac_check_lib_save_LIBS=$LIBS
a21616bd 19144LIBS="-ldes425 $LIBS"
503d2be0 19145cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19146/* confdefs.h. */
19147_ACEOF
19148cat confdefs.h >>conftest.$ac_ext
19149cat >>conftest.$ac_ext <<_ACEOF
19150/* end confdefs.h. */
503d2be0 19151
a21616bd 19152/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19153#ifdef __cplusplus
19154extern "C"
19155#endif
a21616bd 19156/* We use char because int might match the return type of a gcc2
503d2be0
AS
19157 builtin and then its argument prototype would still apply. */
19158char des_cbc_encrypt ();
19159int
19160main ()
19161{
19162des_cbc_encrypt ();
19163 ;
19164 return 0;
19165}
19166_ACEOF
19167rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19168if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19169 (eval $ac_link) 2>conftest.er1
503d2be0 19170 ac_status=$?
edfaf76d
LK
19171 grep -v '^ *+' conftest.er1 >conftest.err
19172 rm -f conftest.er1
19173 cat conftest.err >&5
c0d27fcc 19174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19175 (exit $ac_status); } &&
e143ad11
AS
19176 { ac_try='test -z "$ac_c_werror_flag"
19177 || test ! -s conftest.err'
edfaf76d
LK
19178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19179 (eval $ac_try) 2>&5
19180 ac_status=$?
19181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19182 (exit $ac_status); }; } &&
19183 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19185 (eval $ac_try) 2>&5
19186 ac_status=$?
c0d27fcc 19187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19188 (exit $ac_status); }; }; then
19189 ac_cv_lib_des425_des_cbc_encrypt=yes
19190else
19191 echo "$as_me: failed program was:" >&5
19650fd6
AS
19192sed 's/^/| /' conftest.$ac_ext >&5
19193
503d2be0
AS
19194ac_cv_lib_des425_des_cbc_encrypt=no
19195fi
edfaf76d
LK
19196rm -f conftest.err conftest.$ac_objext \
19197 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19198LIBS=$ac_check_lib_save_LIBS
19199fi
c0d27fcc 19200echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
19201echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
19202if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 19203 cat >>confdefs.h <<_ACEOF
503d2be0 19204#define HAVE_LIBDES425 1
c0d27fcc 19205_ACEOF
a21616bd
KR
19206
19207 LIBS="-ldes425 $LIBS"
19208
19209else
503d2be0 19210
c0d27fcc 19211echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
19212echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
19213if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
19214 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19215else
503d2be0 19216 ac_check_lib_save_LIBS=$LIBS
a21616bd 19217LIBS="-ldes $LIBS"
503d2be0 19218cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19219/* confdefs.h. */
19220_ACEOF
19221cat confdefs.h >>conftest.$ac_ext
19222cat >>conftest.$ac_ext <<_ACEOF
19223/* end confdefs.h. */
503d2be0 19224
a21616bd 19225/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19226#ifdef __cplusplus
19227extern "C"
19228#endif
a21616bd 19229/* We use char because int might match the return type of a gcc2
503d2be0
AS
19230 builtin and then its argument prototype would still apply. */
19231char des_cbc_encrypt ();
19232int
19233main ()
19234{
19235des_cbc_encrypt ();
19236 ;
19237 return 0;
19238}
19239_ACEOF
19240rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19241if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19242 (eval $ac_link) 2>conftest.er1
503d2be0 19243 ac_status=$?
edfaf76d
LK
19244 grep -v '^ *+' conftest.er1 >conftest.err
19245 rm -f conftest.er1
19246 cat conftest.err >&5
c0d27fcc 19247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19248 (exit $ac_status); } &&
e143ad11
AS
19249 { ac_try='test -z "$ac_c_werror_flag"
19250 || test ! -s conftest.err'
edfaf76d
LK
19251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19252 (eval $ac_try) 2>&5
19253 ac_status=$?
19254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19255 (exit $ac_status); }; } &&
19256 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19258 (eval $ac_try) 2>&5
19259 ac_status=$?
c0d27fcc 19260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19261 (exit $ac_status); }; }; then
19262 ac_cv_lib_des_des_cbc_encrypt=yes
19263else
19264 echo "$as_me: failed program was:" >&5
19650fd6
AS
19265sed 's/^/| /' conftest.$ac_ext >&5
19266
503d2be0
AS
19267ac_cv_lib_des_des_cbc_encrypt=no
19268fi
edfaf76d
LK
19269rm -f conftest.err conftest.$ac_objext \
19270 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19271LIBS=$ac_check_lib_save_LIBS
19272fi
c0d27fcc 19273echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
19274echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
19275if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 19276 cat >>confdefs.h <<_ACEOF
503d2be0 19277#define HAVE_LIBDES 1
c0d27fcc 19278_ACEOF
a21616bd
KR
19279
19280 LIBS="-ldes $LIBS"
19281
a21616bd
KR
19282fi
19283
19284fi
19285
c0d27fcc
MR
19286
19287echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
19288echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
19289if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
19290 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19291else
503d2be0 19292 ac_check_lib_save_LIBS=$LIBS
a21616bd 19293LIBS="-lkrb4 $LIBS"
503d2be0 19294cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19295/* confdefs.h. */
19296_ACEOF
19297cat confdefs.h >>conftest.$ac_ext
19298cat >>conftest.$ac_ext <<_ACEOF
19299/* end confdefs.h. */
503d2be0 19300
a21616bd 19301/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19302#ifdef __cplusplus
19303extern "C"
19304#endif
a21616bd 19305/* We use char because int might match the return type of a gcc2
503d2be0
AS
19306 builtin and then its argument prototype would still apply. */
19307char krb_get_cred ();
19308int
19309main ()
19310{
19311krb_get_cred ();
19312 ;
19313 return 0;
19314}
19315_ACEOF
19316rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19317if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19318 (eval $ac_link) 2>conftest.er1
503d2be0 19319 ac_status=$?
edfaf76d
LK
19320 grep -v '^ *+' conftest.er1 >conftest.err
19321 rm -f conftest.er1
19322 cat conftest.err >&5
c0d27fcc 19323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19324 (exit $ac_status); } &&
e143ad11
AS
19325 { ac_try='test -z "$ac_c_werror_flag"
19326 || test ! -s conftest.err'
edfaf76d
LK
19327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19328 (eval $ac_try) 2>&5
19329 ac_status=$?
19330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19331 (exit $ac_status); }; } &&
19332 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19334 (eval $ac_try) 2>&5
19335 ac_status=$?
c0d27fcc 19336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19337 (exit $ac_status); }; }; then
19338 ac_cv_lib_krb4_krb_get_cred=yes
19339else
19340 echo "$as_me: failed program was:" >&5
19650fd6
AS
19341sed 's/^/| /' conftest.$ac_ext >&5
19342
503d2be0
AS
19343ac_cv_lib_krb4_krb_get_cred=no
19344fi
edfaf76d
LK
19345rm -f conftest.err conftest.$ac_objext \
19346 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19347LIBS=$ac_check_lib_save_LIBS
19348fi
c0d27fcc 19349echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
19350echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
19351if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 19352 cat >>confdefs.h <<_ACEOF
503d2be0 19353#define HAVE_LIBKRB4 1
c0d27fcc 19354_ACEOF
a21616bd
KR
19355
19356 LIBS="-lkrb4 $LIBS"
19357
19358else
503d2be0 19359
c0d27fcc 19360echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
19361echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
19362if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
19363 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19364else
503d2be0 19365 ac_check_lib_save_LIBS=$LIBS
a21616bd 19366LIBS="-lkrb $LIBS"
503d2be0 19367cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19368/* confdefs.h. */
19369_ACEOF
19370cat confdefs.h >>conftest.$ac_ext
19371cat >>conftest.$ac_ext <<_ACEOF
19372/* end confdefs.h. */
503d2be0 19373
a21616bd 19374/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19375#ifdef __cplusplus
19376extern "C"
19377#endif
a21616bd 19378/* We use char because int might match the return type of a gcc2
503d2be0
AS
19379 builtin and then its argument prototype would still apply. */
19380char krb_get_cred ();
19381int
19382main ()
19383{
19384krb_get_cred ();
19385 ;
19386 return 0;
19387}
19388_ACEOF
19389rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19390if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19391 (eval $ac_link) 2>conftest.er1
503d2be0 19392 ac_status=$?
edfaf76d
LK
19393 grep -v '^ *+' conftest.er1 >conftest.err
19394 rm -f conftest.er1
19395 cat conftest.err >&5
c0d27fcc 19396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19397 (exit $ac_status); } &&
e143ad11
AS
19398 { ac_try='test -z "$ac_c_werror_flag"
19399 || test ! -s conftest.err'
edfaf76d
LK
19400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19401 (eval $ac_try) 2>&5
19402 ac_status=$?
19403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19404 (exit $ac_status); }; } &&
19405 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19407 (eval $ac_try) 2>&5
19408 ac_status=$?
c0d27fcc 19409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19410 (exit $ac_status); }; }; then
19411 ac_cv_lib_krb_krb_get_cred=yes
19412else
19413 echo "$as_me: failed program was:" >&5
19650fd6
AS
19414sed 's/^/| /' conftest.$ac_ext >&5
19415
503d2be0
AS
19416ac_cv_lib_krb_krb_get_cred=no
19417fi
edfaf76d
LK
19418rm -f conftest.err conftest.$ac_objext \
19419 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19420LIBS=$ac_check_lib_save_LIBS
19421fi
c0d27fcc 19422echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
19423echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
19424if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 19425 cat >>confdefs.h <<_ACEOF
503d2be0 19426#define HAVE_LIBKRB 1
c0d27fcc 19427_ACEOF
a21616bd
KR
19428
19429 LIBS="-lkrb $LIBS"
19430
a21616bd
KR
19431fi
19432
19433fi
19434
19435 fi
19436
19437 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
19438
19439for ac_header in krb5.h
a21616bd 19440do
503d2be0 19441as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19442if eval "test \"\${$as_ac_Header+set}\" = set"; then
19443 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19444echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19445if eval "test \"\${$as_ac_Header+set}\" = set"; then
19446 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19447fi
19448echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19449echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19450else
c0d27fcc
MR
19451 # Is the header compilable?
19452echo "$as_me:$LINENO: checking $ac_header usability" >&5
19453echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19454cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19455/* confdefs.h. */
19456_ACEOF
19457cat confdefs.h >>conftest.$ac_ext
19458cat >>conftest.$ac_ext <<_ACEOF
19459/* end confdefs.h. */
c0d27fcc
MR
19460$ac_includes_default
19461#include <$ac_header>
19462_ACEOF
19463rm -f conftest.$ac_objext
19464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19465 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19466 ac_status=$?
edfaf76d
LK
19467 grep -v '^ *+' conftest.er1 >conftest.err
19468 rm -f conftest.er1
19469 cat conftest.err >&5
c0d27fcc
MR
19470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19471 (exit $ac_status); } &&
e143ad11
AS
19472 { ac_try='test -z "$ac_c_werror_flag"
19473 || test ! -s conftest.err'
edfaf76d
LK
19474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19475 (eval $ac_try) 2>&5
19476 ac_status=$?
19477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19478 (exit $ac_status); }; } &&
19479 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19481 (eval $ac_try) 2>&5
19482 ac_status=$?
19483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19484 (exit $ac_status); }; }; then
19485 ac_header_compiler=yes
19486else
19487 echo "$as_me: failed program was:" >&5
19650fd6
AS
19488sed 's/^/| /' conftest.$ac_ext >&5
19489
c0d27fcc
MR
19490ac_header_compiler=no
19491fi
edfaf76d 19492rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19493echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19494echo "${ECHO_T}$ac_header_compiler" >&6
19495
19496# Is the header present?
19497echo "$as_me:$LINENO: checking $ac_header presence" >&5
19498echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19499cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19500/* confdefs.h. */
19501_ACEOF
19502cat confdefs.h >>conftest.$ac_ext
19503cat >>conftest.$ac_ext <<_ACEOF
19504/* end confdefs.h. */
503d2be0
AS
19505#include <$ac_header>
19506_ACEOF
c0d27fcc 19507if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19508 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19509 ac_status=$?
6bae0ccf 19510 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19511 rm -f conftest.er1
19512 cat conftest.err >&5
c0d27fcc 19513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19514 (exit $ac_status); } >/dev/null; then
19515 if test -s conftest.err; then
19516 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19517 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19518 else
19519 ac_cpp_err=
19520 fi
19521else
19522 ac_cpp_err=yes
19523fi
19524if test -z "$ac_cpp_err"; then
c0d27fcc 19525 ac_header_preproc=yes
503d2be0
AS
19526else
19527 echo "$as_me: failed program was:" >&5
19650fd6
AS
19528sed 's/^/| /' conftest.$ac_ext >&5
19529
c0d27fcc 19530 ac_header_preproc=no
a21616bd 19531fi
503d2be0 19532rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19533echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19534echo "${ECHO_T}$ac_header_preproc" >&6
19535
19536# So? What about this header?
edfaf76d
LK
19537case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19538 yes:no: )
c0d27fcc
MR
19539 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19540echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19541 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19542echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19543 ac_header_preproc=yes
19650fd6 19544 ;;
edfaf76d 19545 no:yes:* )
c0d27fcc
MR
19546 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19547echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19548 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19549echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19550 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19551echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19552 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19553echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19554 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19555echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19556 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19557echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19558 (
19559 cat <<\_ASBOX
edfaf76d
LK
19560## ------------------------------------------ ##
19561## Report this to the AC_PACKAGE_NAME lists. ##
19562## ------------------------------------------ ##
19650fd6
AS
19563_ASBOX
19564 ) |
19565 sed "s/^/$as_me: WARNING: /" >&2
19566 ;;
c0d27fcc
MR
19567esac
19568echo "$as_me:$LINENO: checking for $ac_header" >&5
19569echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19570if eval "test \"\${$as_ac_Header+set}\" = set"; then
19571 echo $ECHO_N "(cached) $ECHO_C" >&6
19572else
edfaf76d 19573 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19574fi
c0d27fcc 19575echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19576echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19577
19578fi
503d2be0 19579if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19580 cat >>confdefs.h <<_ACEOF
503d2be0 19581#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19582_ACEOF
503d2be0 19583
a21616bd 19584fi
c0d27fcc 19585
a21616bd
KR
19586done
19587
19588 else
503d2be0
AS
19589
19590for ac_header in des.h
a21616bd 19591do
503d2be0 19592as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19593if eval "test \"\${$as_ac_Header+set}\" = set"; then
19594 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19595echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19596if eval "test \"\${$as_ac_Header+set}\" = set"; then
19597 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19598fi
19599echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19600echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19601else
c0d27fcc
MR
19602 # Is the header compilable?
19603echo "$as_me:$LINENO: checking $ac_header usability" >&5
19604echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19605cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19606/* confdefs.h. */
19607_ACEOF
19608cat confdefs.h >>conftest.$ac_ext
19609cat >>conftest.$ac_ext <<_ACEOF
19610/* end confdefs.h. */
c0d27fcc
MR
19611$ac_includes_default
19612#include <$ac_header>
19613_ACEOF
19614rm -f conftest.$ac_objext
19615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19616 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19617 ac_status=$?
edfaf76d
LK
19618 grep -v '^ *+' conftest.er1 >conftest.err
19619 rm -f conftest.er1
19620 cat conftest.err >&5
c0d27fcc
MR
19621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19622 (exit $ac_status); } &&
e143ad11
AS
19623 { ac_try='test -z "$ac_c_werror_flag"
19624 || test ! -s conftest.err'
edfaf76d
LK
19625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19626 (eval $ac_try) 2>&5
19627 ac_status=$?
19628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19629 (exit $ac_status); }; } &&
19630 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19632 (eval $ac_try) 2>&5
19633 ac_status=$?
19634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19635 (exit $ac_status); }; }; then
19636 ac_header_compiler=yes
19637else
19638 echo "$as_me: failed program was:" >&5
19650fd6
AS
19639sed 's/^/| /' conftest.$ac_ext >&5
19640
c0d27fcc
MR
19641ac_header_compiler=no
19642fi
edfaf76d 19643rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19644echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19645echo "${ECHO_T}$ac_header_compiler" >&6
19646
19647# Is the header present?
19648echo "$as_me:$LINENO: checking $ac_header presence" >&5
19649echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19650cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19651/* confdefs.h. */
19652_ACEOF
19653cat confdefs.h >>conftest.$ac_ext
19654cat >>conftest.$ac_ext <<_ACEOF
19655/* end confdefs.h. */
503d2be0
AS
19656#include <$ac_header>
19657_ACEOF
c0d27fcc 19658if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19659 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19660 ac_status=$?
6bae0ccf 19661 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19662 rm -f conftest.er1
19663 cat conftest.err >&5
c0d27fcc 19664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19665 (exit $ac_status); } >/dev/null; then
19666 if test -s conftest.err; then
19667 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19668 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19669 else
19670 ac_cpp_err=
19671 fi
19672else
19673 ac_cpp_err=yes
19674fi
19675if test -z "$ac_cpp_err"; then
c0d27fcc 19676 ac_header_preproc=yes
503d2be0
AS
19677else
19678 echo "$as_me: failed program was:" >&5
19650fd6
AS
19679sed 's/^/| /' conftest.$ac_ext >&5
19680
c0d27fcc 19681 ac_header_preproc=no
a21616bd 19682fi
503d2be0 19683rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19684echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19685echo "${ECHO_T}$ac_header_preproc" >&6
19686
19687# So? What about this header?
edfaf76d
LK
19688case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19689 yes:no: )
c0d27fcc
MR
19690 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19691echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19692 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19693echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19694 ac_header_preproc=yes
19650fd6 19695 ;;
edfaf76d 19696 no:yes:* )
c0d27fcc
MR
19697 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19698echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19699 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19700echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19701 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19702echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19703 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19704echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19705 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19706echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19707 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19708echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19709 (
19710 cat <<\_ASBOX
edfaf76d
LK
19711## ------------------------------------------ ##
19712## Report this to the AC_PACKAGE_NAME lists. ##
19713## ------------------------------------------ ##
19650fd6
AS
19714_ASBOX
19715 ) |
19716 sed "s/^/$as_me: WARNING: /" >&2
19717 ;;
c0d27fcc
MR
19718esac
19719echo "$as_me:$LINENO: checking for $ac_header" >&5
19720echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19721if eval "test \"\${$as_ac_Header+set}\" = set"; then
19722 echo $ECHO_N "(cached) $ECHO_C" >&6
19723else
edfaf76d 19724 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19725fi
c0d27fcc 19726echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19727echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19728
19729fi
503d2be0 19730if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19731 cat >>confdefs.h <<_ACEOF
503d2be0 19732#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19733_ACEOF
503d2be0 19734
a21616bd 19735else
503d2be0
AS
19736
19737for ac_header in kerberosIV/des.h
a21616bd 19738do
503d2be0 19739as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19740if eval "test \"\${$as_ac_Header+set}\" = set"; then
19741 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19742echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19743if eval "test \"\${$as_ac_Header+set}\" = set"; then
19744 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19745fi
19746echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19747echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19748else
c0d27fcc
MR
19749 # Is the header compilable?
19750echo "$as_me:$LINENO: checking $ac_header usability" >&5
19751echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19752cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19753/* confdefs.h. */
19754_ACEOF
19755cat confdefs.h >>conftest.$ac_ext
19756cat >>conftest.$ac_ext <<_ACEOF
19757/* end confdefs.h. */
c0d27fcc
MR
19758$ac_includes_default
19759#include <$ac_header>
19760_ACEOF
19761rm -f conftest.$ac_objext
19762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19763 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19764 ac_status=$?
edfaf76d
LK
19765 grep -v '^ *+' conftest.er1 >conftest.err
19766 rm -f conftest.er1
19767 cat conftest.err >&5
c0d27fcc
MR
19768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19769 (exit $ac_status); } &&
e143ad11
AS
19770 { ac_try='test -z "$ac_c_werror_flag"
19771 || test ! -s conftest.err'
edfaf76d
LK
19772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19773 (eval $ac_try) 2>&5
19774 ac_status=$?
19775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19776 (exit $ac_status); }; } &&
19777 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19779 (eval $ac_try) 2>&5
19780 ac_status=$?
19781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19782 (exit $ac_status); }; }; then
19783 ac_header_compiler=yes
19784else
19785 echo "$as_me: failed program was:" >&5
19650fd6
AS
19786sed 's/^/| /' conftest.$ac_ext >&5
19787
c0d27fcc
MR
19788ac_header_compiler=no
19789fi
edfaf76d 19790rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19791echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19792echo "${ECHO_T}$ac_header_compiler" >&6
19793
19794# Is the header present?
19795echo "$as_me:$LINENO: checking $ac_header presence" >&5
19796echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19797cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19798/* confdefs.h. */
19799_ACEOF
19800cat confdefs.h >>conftest.$ac_ext
19801cat >>conftest.$ac_ext <<_ACEOF
19802/* end confdefs.h. */
503d2be0
AS
19803#include <$ac_header>
19804_ACEOF
c0d27fcc 19805if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19806 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19807 ac_status=$?
6bae0ccf 19808 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19809 rm -f conftest.er1
19810 cat conftest.err >&5
c0d27fcc 19811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19812 (exit $ac_status); } >/dev/null; then
19813 if test -s conftest.err; then
19814 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19815 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19816 else
19817 ac_cpp_err=
19818 fi
19819else
19820 ac_cpp_err=yes
19821fi
19822if test -z "$ac_cpp_err"; then
c0d27fcc 19823 ac_header_preproc=yes
503d2be0
AS
19824else
19825 echo "$as_me: failed program was:" >&5
19650fd6
AS
19826sed 's/^/| /' conftest.$ac_ext >&5
19827
c0d27fcc 19828 ac_header_preproc=no
a21616bd 19829fi
503d2be0 19830rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19831echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19832echo "${ECHO_T}$ac_header_preproc" >&6
19833
19834# So? What about this header?
edfaf76d
LK
19835case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19836 yes:no: )
c0d27fcc
MR
19837 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19838echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19839 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19840echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19841 ac_header_preproc=yes
19650fd6 19842 ;;
edfaf76d 19843 no:yes:* )
c0d27fcc
MR
19844 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19845echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19846 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19847echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19848 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19849echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19850 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19851echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19852 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19853echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19854 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19855echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19856 (
19857 cat <<\_ASBOX
edfaf76d
LK
19858## ------------------------------------------ ##
19859## Report this to the AC_PACKAGE_NAME lists. ##
19860## ------------------------------------------ ##
19650fd6
AS
19861_ASBOX
19862 ) |
19863 sed "s/^/$as_me: WARNING: /" >&2
19864 ;;
c0d27fcc
MR
19865esac
19866echo "$as_me:$LINENO: checking for $ac_header" >&5
19867echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19868if eval "test \"\${$as_ac_Header+set}\" = set"; then
19869 echo $ECHO_N "(cached) $ECHO_C" >&6
19870else
edfaf76d 19871 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19872fi
c0d27fcc 19873echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19874echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19875
19876fi
503d2be0 19877if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19878 cat >>confdefs.h <<_ACEOF
503d2be0 19879#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19880_ACEOF
503d2be0 19881
a21616bd 19882else
503d2be0
AS
19883
19884for ac_header in kerberos/des.h
a21616bd 19885do
503d2be0 19886as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19887if eval "test \"\${$as_ac_Header+set}\" = set"; then
19888 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19889echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19890if eval "test \"\${$as_ac_Header+set}\" = set"; then
19891 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19892fi
19893echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19894echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19895else
c0d27fcc
MR
19896 # Is the header compilable?
19897echo "$as_me:$LINENO: checking $ac_header usability" >&5
19898echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19899cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19900/* confdefs.h. */
19901_ACEOF
19902cat confdefs.h >>conftest.$ac_ext
19903cat >>conftest.$ac_ext <<_ACEOF
19904/* end confdefs.h. */
c0d27fcc
MR
19905$ac_includes_default
19906#include <$ac_header>
19907_ACEOF
19908rm -f conftest.$ac_objext
19909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19910 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19911 ac_status=$?
edfaf76d
LK
19912 grep -v '^ *+' conftest.er1 >conftest.err
19913 rm -f conftest.er1
19914 cat conftest.err >&5
c0d27fcc
MR
19915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19916 (exit $ac_status); } &&
e143ad11
AS
19917 { ac_try='test -z "$ac_c_werror_flag"
19918 || test ! -s conftest.err'
edfaf76d
LK
19919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19920 (eval $ac_try) 2>&5
19921 ac_status=$?
19922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19923 (exit $ac_status); }; } &&
19924 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19926 (eval $ac_try) 2>&5
19927 ac_status=$?
19928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19929 (exit $ac_status); }; }; then
19930 ac_header_compiler=yes
19931else
19932 echo "$as_me: failed program was:" >&5
19650fd6
AS
19933sed 's/^/| /' conftest.$ac_ext >&5
19934
c0d27fcc
MR
19935ac_header_compiler=no
19936fi
edfaf76d 19937rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19938echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19939echo "${ECHO_T}$ac_header_compiler" >&6
19940
19941# Is the header present?
19942echo "$as_me:$LINENO: checking $ac_header presence" >&5
19943echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19944cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19945/* confdefs.h. */
19946_ACEOF
19947cat confdefs.h >>conftest.$ac_ext
19948cat >>conftest.$ac_ext <<_ACEOF
19949/* end confdefs.h. */
503d2be0
AS
19950#include <$ac_header>
19951_ACEOF
c0d27fcc 19952if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19953 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19954 ac_status=$?
6bae0ccf 19955 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19956 rm -f conftest.er1
19957 cat conftest.err >&5
c0d27fcc 19958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19959 (exit $ac_status); } >/dev/null; then
19960 if test -s conftest.err; then
19961 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19962 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19963 else
19964 ac_cpp_err=
19965 fi
19966else
19967 ac_cpp_err=yes
19968fi
19969if test -z "$ac_cpp_err"; then
c0d27fcc 19970 ac_header_preproc=yes
503d2be0
AS
19971else
19972 echo "$as_me: failed program was:" >&5
19650fd6
AS
19973sed 's/^/| /' conftest.$ac_ext >&5
19974
c0d27fcc 19975 ac_header_preproc=no
a21616bd 19976fi
503d2be0 19977rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19978echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19979echo "${ECHO_T}$ac_header_preproc" >&6
19980
19981# So? What about this header?
edfaf76d
LK
19982case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19983 yes:no: )
c0d27fcc
MR
19984 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19985echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19986 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19987echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19988 ac_header_preproc=yes
19650fd6 19989 ;;
edfaf76d 19990 no:yes:* )
c0d27fcc
MR
19991 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19992echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19993 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19994echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19995 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19996echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19997 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19998echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19999 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20000echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20001 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20002echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20003 (
20004 cat <<\_ASBOX
edfaf76d
LK
20005## ------------------------------------------ ##
20006## Report this to the AC_PACKAGE_NAME lists. ##
20007## ------------------------------------------ ##
19650fd6
AS
20008_ASBOX
20009 ) |
20010 sed "s/^/$as_me: WARNING: /" >&2
20011 ;;
c0d27fcc
MR
20012esac
20013echo "$as_me:$LINENO: checking for $ac_header" >&5
20014echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20015if eval "test \"\${$as_ac_Header+set}\" = set"; then
20016 echo $ECHO_N "(cached) $ECHO_C" >&6
20017else
edfaf76d 20018 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20019fi
c0d27fcc 20020echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20021echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20022
20023fi
503d2be0 20024if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20025 cat >>confdefs.h <<_ACEOF
503d2be0 20026#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20027_ACEOF
a21616bd
KR
20028
20029fi
c0d27fcc 20030
a21616bd
KR
20031done
20032
98418dba 20033fi
c0d27fcc 20034
925c2f3f
EZ
20035done
20036
98418dba 20037fi
c0d27fcc 20038
925c2f3f 20039done
98418dba 20040
c0d27fcc 20041
925c2f3f
EZ
20042for ac_header in krb.h
20043do
20044as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20045if eval "test \"\${$as_ac_Header+set}\" = set"; then
20046 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
20047echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20048if eval "test \"\${$as_ac_Header+set}\" = set"; then
20049 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20050fi
20051echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20052echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20053else
20054 # Is the header compilable?
20055echo "$as_me:$LINENO: checking $ac_header usability" >&5
20056echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20057cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20058/* confdefs.h. */
20059_ACEOF
20060cat confdefs.h >>conftest.$ac_ext
20061cat >>conftest.$ac_ext <<_ACEOF
20062/* end confdefs.h. */
c0d27fcc
MR
20063$ac_includes_default
20064#include <$ac_header>
20065_ACEOF
20066rm -f conftest.$ac_objext
20067if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20068 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20069 ac_status=$?
edfaf76d
LK
20070 grep -v '^ *+' conftest.er1 >conftest.err
20071 rm -f conftest.er1
20072 cat conftest.err >&5
c0d27fcc
MR
20073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20074 (exit $ac_status); } &&
e143ad11
AS
20075 { ac_try='test -z "$ac_c_werror_flag"
20076 || test ! -s conftest.err'
edfaf76d
LK
20077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20078 (eval $ac_try) 2>&5
20079 ac_status=$?
20080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20081 (exit $ac_status); }; } &&
20082 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20084 (eval $ac_try) 2>&5
20085 ac_status=$?
20086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20087 (exit $ac_status); }; }; then
20088 ac_header_compiler=yes
925c2f3f 20089else
c0d27fcc 20090 echo "$as_me: failed program was:" >&5
19650fd6
AS
20091sed 's/^/| /' conftest.$ac_ext >&5
20092
c0d27fcc
MR
20093ac_header_compiler=no
20094fi
edfaf76d 20095rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20096echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20097echo "${ECHO_T}$ac_header_compiler" >&6
20098
20099# Is the header present?
20100echo "$as_me:$LINENO: checking $ac_header presence" >&5
20101echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20102cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20103/* confdefs.h. */
20104_ACEOF
20105cat confdefs.h >>conftest.$ac_ext
20106cat >>conftest.$ac_ext <<_ACEOF
20107/* end confdefs.h. */
503d2be0
AS
20108#include <$ac_header>
20109_ACEOF
c0d27fcc 20110if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20111 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20112 ac_status=$?
6bae0ccf 20113 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20114 rm -f conftest.er1
20115 cat conftest.err >&5
c0d27fcc 20116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20117 (exit $ac_status); } >/dev/null; then
20118 if test -s conftest.err; then
20119 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20120 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20121 else
20122 ac_cpp_err=
20123 fi
20124else
20125 ac_cpp_err=yes
20126fi
20127if test -z "$ac_cpp_err"; then
c0d27fcc 20128 ac_header_preproc=yes
503d2be0
AS
20129else
20130 echo "$as_me: failed program was:" >&5
19650fd6
AS
20131sed 's/^/| /' conftest.$ac_ext >&5
20132
c0d27fcc 20133 ac_header_preproc=no
a21616bd 20134fi
503d2be0 20135rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20136echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20137echo "${ECHO_T}$ac_header_preproc" >&6
20138
20139# So? What about this header?
edfaf76d
LK
20140case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20141 yes:no: )
c0d27fcc
MR
20142 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20143echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20144 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20145echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20146 ac_header_preproc=yes
19650fd6 20147 ;;
edfaf76d 20148 no:yes:* )
c0d27fcc
MR
20149 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20150echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20151 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20152echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20153 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20154echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20155 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20156echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20157 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20158echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20159 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20160echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20161 (
20162 cat <<\_ASBOX
edfaf76d
LK
20163## ------------------------------------------ ##
20164## Report this to the AC_PACKAGE_NAME lists. ##
20165## ------------------------------------------ ##
19650fd6
AS
20166_ASBOX
20167 ) |
20168 sed "s/^/$as_me: WARNING: /" >&2
20169 ;;
c0d27fcc
MR
20170esac
20171echo "$as_me:$LINENO: checking for $ac_header" >&5
20172echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20173if eval "test \"\${$as_ac_Header+set}\" = set"; then
20174 echo $ECHO_N "(cached) $ECHO_C" >&6
20175else
edfaf76d 20176 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20177fi
c0d27fcc 20178echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20179echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20180
20181fi
503d2be0 20182if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20183 cat >>confdefs.h <<_ACEOF
503d2be0 20184#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20185_ACEOF
503d2be0 20186
a21616bd 20187else
503d2be0
AS
20188
20189for ac_header in kerberosIV/krb.h
a21616bd 20190do
503d2be0 20191as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20192if eval "test \"\${$as_ac_Header+set}\" = set"; then
20193 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20194echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20195if eval "test \"\${$as_ac_Header+set}\" = set"; then
20196 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20197fi
20198echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20199echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20200else
c0d27fcc
MR
20201 # Is the header compilable?
20202echo "$as_me:$LINENO: checking $ac_header usability" >&5
20203echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20204cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20205/* confdefs.h. */
20206_ACEOF
20207cat confdefs.h >>conftest.$ac_ext
20208cat >>conftest.$ac_ext <<_ACEOF
20209/* end confdefs.h. */
c0d27fcc
MR
20210$ac_includes_default
20211#include <$ac_header>
20212_ACEOF
20213rm -f conftest.$ac_objext
20214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20215 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20216 ac_status=$?
edfaf76d
LK
20217 grep -v '^ *+' conftest.er1 >conftest.err
20218 rm -f conftest.er1
20219 cat conftest.err >&5
c0d27fcc
MR
20220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20221 (exit $ac_status); } &&
e143ad11
AS
20222 { ac_try='test -z "$ac_c_werror_flag"
20223 || test ! -s conftest.err'
edfaf76d
LK
20224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20225 (eval $ac_try) 2>&5
20226 ac_status=$?
20227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20228 (exit $ac_status); }; } &&
20229 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20231 (eval $ac_try) 2>&5
20232 ac_status=$?
20233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20234 (exit $ac_status); }; }; then
20235 ac_header_compiler=yes
20236else
20237 echo "$as_me: failed program was:" >&5
19650fd6
AS
20238sed 's/^/| /' conftest.$ac_ext >&5
20239
c0d27fcc
MR
20240ac_header_compiler=no
20241fi
edfaf76d 20242rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20243echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20244echo "${ECHO_T}$ac_header_compiler" >&6
20245
20246# Is the header present?
20247echo "$as_me:$LINENO: checking $ac_header presence" >&5
20248echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20249cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20250/* confdefs.h. */
20251_ACEOF
20252cat confdefs.h >>conftest.$ac_ext
20253cat >>conftest.$ac_ext <<_ACEOF
20254/* end confdefs.h. */
503d2be0
AS
20255#include <$ac_header>
20256_ACEOF
c0d27fcc 20257if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20258 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20259 ac_status=$?
6bae0ccf 20260 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20261 rm -f conftest.er1
20262 cat conftest.err >&5
c0d27fcc 20263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20264 (exit $ac_status); } >/dev/null; then
20265 if test -s conftest.err; then
20266 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20267 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20268 else
20269 ac_cpp_err=
20270 fi
20271else
20272 ac_cpp_err=yes
20273fi
20274if test -z "$ac_cpp_err"; then
c0d27fcc 20275 ac_header_preproc=yes
503d2be0
AS
20276else
20277 echo "$as_me: failed program was:" >&5
19650fd6
AS
20278sed 's/^/| /' conftest.$ac_ext >&5
20279
c0d27fcc 20280 ac_header_preproc=no
a21616bd 20281fi
503d2be0 20282rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20283echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20284echo "${ECHO_T}$ac_header_preproc" >&6
20285
20286# So? What about this header?
edfaf76d
LK
20287case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20288 yes:no: )
c0d27fcc
MR
20289 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20290echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20291 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20292echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20293 ac_header_preproc=yes
19650fd6 20294 ;;
edfaf76d 20295 no:yes:* )
c0d27fcc
MR
20296 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20297echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20298 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20299echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20300 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20301echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20302 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20303echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20304 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20305echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20306 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20307echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20308 (
20309 cat <<\_ASBOX
edfaf76d
LK
20310## ------------------------------------------ ##
20311## Report this to the AC_PACKAGE_NAME lists. ##
20312## ------------------------------------------ ##
19650fd6
AS
20313_ASBOX
20314 ) |
20315 sed "s/^/$as_me: WARNING: /" >&2
20316 ;;
c0d27fcc
MR
20317esac
20318echo "$as_me:$LINENO: checking for $ac_header" >&5
20319echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20320if eval "test \"\${$as_ac_Header+set}\" = set"; then
20321 echo $ECHO_N "(cached) $ECHO_C" >&6
20322else
edfaf76d 20323 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20324fi
c0d27fcc 20325echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20326echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20327
20328fi
503d2be0 20329if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20330 cat >>confdefs.h <<_ACEOF
503d2be0 20331#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20332_ACEOF
503d2be0 20333
a21616bd 20334else
503d2be0
AS
20335
20336for ac_header in kerberos/krb.h
a21616bd 20337do
503d2be0 20338as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20339if eval "test \"\${$as_ac_Header+set}\" = set"; then
20340 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20341echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20342if eval "test \"\${$as_ac_Header+set}\" = set"; then
20343 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20344fi
20345echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20346echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20347else
c0d27fcc
MR
20348 # Is the header compilable?
20349echo "$as_me:$LINENO: checking $ac_header usability" >&5
20350echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20351cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20352/* confdefs.h. */
20353_ACEOF
20354cat confdefs.h >>conftest.$ac_ext
20355cat >>conftest.$ac_ext <<_ACEOF
20356/* end confdefs.h. */
c0d27fcc
MR
20357$ac_includes_default
20358#include <$ac_header>
20359_ACEOF
20360rm -f conftest.$ac_objext
20361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20362 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20363 ac_status=$?
edfaf76d
LK
20364 grep -v '^ *+' conftest.er1 >conftest.err
20365 rm -f conftest.er1
20366 cat conftest.err >&5
c0d27fcc
MR
20367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20368 (exit $ac_status); } &&
e143ad11
AS
20369 { ac_try='test -z "$ac_c_werror_flag"
20370 || test ! -s conftest.err'
edfaf76d
LK
20371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20372 (eval $ac_try) 2>&5
20373 ac_status=$?
20374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20375 (exit $ac_status); }; } &&
20376 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20378 (eval $ac_try) 2>&5
20379 ac_status=$?
20380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20381 (exit $ac_status); }; }; then
20382 ac_header_compiler=yes
20383else
20384 echo "$as_me: failed program was:" >&5
19650fd6
AS
20385sed 's/^/| /' conftest.$ac_ext >&5
20386
c0d27fcc
MR
20387ac_header_compiler=no
20388fi
edfaf76d 20389rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20390echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20391echo "${ECHO_T}$ac_header_compiler" >&6
20392
20393# Is the header present?
20394echo "$as_me:$LINENO: checking $ac_header presence" >&5
20395echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20396cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20397/* confdefs.h. */
20398_ACEOF
20399cat confdefs.h >>conftest.$ac_ext
20400cat >>conftest.$ac_ext <<_ACEOF
20401/* end confdefs.h. */
503d2be0
AS
20402#include <$ac_header>
20403_ACEOF
c0d27fcc 20404if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20405 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20406 ac_status=$?
6bae0ccf 20407 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20408 rm -f conftest.er1
20409 cat conftest.err >&5
c0d27fcc 20410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20411 (exit $ac_status); } >/dev/null; then
20412 if test -s conftest.err; then
20413 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20414 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20415 else
20416 ac_cpp_err=
20417 fi
20418else
20419 ac_cpp_err=yes
20420fi
20421if test -z "$ac_cpp_err"; then
c0d27fcc 20422 ac_header_preproc=yes
503d2be0
AS
20423else
20424 echo "$as_me: failed program was:" >&5
19650fd6
AS
20425sed 's/^/| /' conftest.$ac_ext >&5
20426
c0d27fcc 20427 ac_header_preproc=no
a21616bd 20428fi
503d2be0 20429rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20430echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20431echo "${ECHO_T}$ac_header_preproc" >&6
35996d22
AS
20432
20433# So? What about this header?
edfaf76d
LK
20434case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20435 yes:no: )
35996d22
AS
20436 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20437echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20438 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20439echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20440 ac_header_preproc=yes
19650fd6 20441 ;;
edfaf76d 20442 no:yes:* )
c0d27fcc
MR
20443 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20444echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20445 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20446echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20447 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20448echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20449 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20450echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20451 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20452echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20453 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20454echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20455 (
20456 cat <<\_ASBOX
edfaf76d
LK
20457## ------------------------------------------ ##
20458## Report this to the AC_PACKAGE_NAME lists. ##
20459## ------------------------------------------ ##
19650fd6
AS
20460_ASBOX
20461 ) |
20462 sed "s/^/$as_me: WARNING: /" >&2
20463 ;;
c0d27fcc
MR
20464esac
20465echo "$as_me:$LINENO: checking for $ac_header" >&5
20466echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20467if eval "test \"\${$as_ac_Header+set}\" = set"; then
20468 echo $ECHO_N "(cached) $ECHO_C" >&6
20469else
edfaf76d 20470 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20471fi
c0d27fcc 20472echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20473echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20474
20475fi
503d2be0 20476if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20477 cat >>confdefs.h <<_ACEOF
503d2be0 20478#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20479_ACEOF
503d2be0 20480
a21616bd 20481fi
c0d27fcc 20482
a21616bd
KR
20483done
20484
20485fi
c0d27fcc 20486
a21616bd
KR
20487done
20488
20489fi
c0d27fcc 20490
a21616bd
KR
20491done
20492
20493 fi
503d2be0
AS
20494
20495for ac_header in com_err.h
a21616bd 20496do
503d2be0 20497as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20498if eval "test \"\${$as_ac_Header+set}\" = set"; then
20499 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20500echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20501if eval "test \"\${$as_ac_Header+set}\" = set"; then
20502 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20503fi
20504echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20505echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20506else
c0d27fcc
MR
20507 # Is the header compilable?
20508echo "$as_me:$LINENO: checking $ac_header usability" >&5
20509echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20510cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20511/* confdefs.h. */
20512_ACEOF
20513cat confdefs.h >>conftest.$ac_ext
20514cat >>conftest.$ac_ext <<_ACEOF
20515/* end confdefs.h. */
c0d27fcc
MR
20516$ac_includes_default
20517#include <$ac_header>
20518_ACEOF
20519rm -f conftest.$ac_objext
20520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d
LK
20521 (eval $ac_compile) 2>conftest.er1
20522 ac_status=$?
20523 grep -v '^ *+' conftest.er1 >conftest.err
20524 rm -f conftest.er1
20525 cat conftest.err >&5
20526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20527 (exit $ac_status); } &&
e143ad11
AS
20528 { ac_try='test -z "$ac_c_werror_flag"
20529 || test ! -s conftest.err'
edfaf76d
LK
20530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20531 (eval $ac_try) 2>&5
35996d22
AS
20532 ac_status=$?
20533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
20534 (exit $ac_status); }; } &&
20535 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20537 (eval $ac_try) 2>&5
20538 ac_status=$?
20539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20540 (exit $ac_status); }; }; then
20541 ac_header_compiler=yes
20542else
20543 echo "$as_me: failed program was:" >&5
19650fd6
AS
20544sed 's/^/| /' conftest.$ac_ext >&5
20545
c0d27fcc
MR
20546ac_header_compiler=no
20547fi
edfaf76d 20548rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20549echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20550echo "${ECHO_T}$ac_header_compiler" >&6
20551
20552# Is the header present?
20553echo "$as_me:$LINENO: checking $ac_header presence" >&5
20554echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20555cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20556/* confdefs.h. */
20557_ACEOF
20558cat confdefs.h >>conftest.$ac_ext
20559cat >>conftest.$ac_ext <<_ACEOF
20560/* end confdefs.h. */
503d2be0
AS
20561#include <$ac_header>
20562_ACEOF
c0d27fcc 20563if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20564 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20565 ac_status=$?
6bae0ccf 20566 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20567 rm -f conftest.er1
20568 cat conftest.err >&5
c0d27fcc 20569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20570 (exit $ac_status); } >/dev/null; then
20571 if test -s conftest.err; then
20572 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20573 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20574 else
20575 ac_cpp_err=
20576 fi
20577else
20578 ac_cpp_err=yes
20579fi
20580if test -z "$ac_cpp_err"; then
c0d27fcc 20581 ac_header_preproc=yes
503d2be0
AS
20582else
20583 echo "$as_me: failed program was:" >&5
19650fd6
AS
20584sed 's/^/| /' conftest.$ac_ext >&5
20585
c0d27fcc 20586 ac_header_preproc=no
a21616bd 20587fi
503d2be0 20588rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20589echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20590echo "${ECHO_T}$ac_header_preproc" >&6
20591
20592# So? What about this header?
edfaf76d
LK
20593case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20594 yes:no: )
c0d27fcc
MR
20595 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20596echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20597 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20598echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20599 ac_header_preproc=yes
19650fd6 20600 ;;
edfaf76d 20601 no:yes:* )
c0d27fcc
MR
20602 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20603echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20604 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20605echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20606 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20607echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20608 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20609echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20610 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20611echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20612 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20613echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20614 (
20615 cat <<\_ASBOX
edfaf76d
LK
20616## ------------------------------------------ ##
20617## Report this to the AC_PACKAGE_NAME lists. ##
20618## ------------------------------------------ ##
19650fd6
AS
20619_ASBOX
20620 ) |
20621 sed "s/^/$as_me: WARNING: /" >&2
20622 ;;
c0d27fcc
MR
20623esac
20624echo "$as_me:$LINENO: checking for $ac_header" >&5
20625echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20626if eval "test \"\${$as_ac_Header+set}\" = set"; then
20627 echo $ECHO_N "(cached) $ECHO_C" >&6
20628else
edfaf76d 20629 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20630fi
c0d27fcc 20631echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20632echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20633
20634fi
503d2be0 20635if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20636 cat >>confdefs.h <<_ACEOF
503d2be0 20637#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20638_ACEOF
503d2be0 20639
a21616bd 20640fi
c0d27fcc 20641
a21616bd
KR
20642done
20643
20644fi
20645
ba4481b5
DL
20646# Solaris requires -lintl if you want strerror (which calls dgettext)
20647# to return localized messages.
503d2be0 20648
c0d27fcc 20649echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
20650echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
20651if test "${ac_cv_lib_intl_dgettext+set}" = set; then
20652 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20653else
503d2be0 20654 ac_check_lib_save_LIBS=$LIBS
ba4481b5 20655LIBS="-lintl $LIBS"
503d2be0 20656cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20657/* confdefs.h. */
20658_ACEOF
20659cat confdefs.h >>conftest.$ac_ext
20660cat >>conftest.$ac_ext <<_ACEOF
20661/* end confdefs.h. */
503d2be0 20662
ba4481b5 20663/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20664#ifdef __cplusplus
20665extern "C"
20666#endif
ba4481b5 20667/* We use char because int might match the return type of a gcc2
503d2be0
AS
20668 builtin and then its argument prototype would still apply. */
20669char dgettext ();
20670int
20671main ()
20672{
20673dgettext ();
20674 ;
20675 return 0;
20676}
20677_ACEOF
20678rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20679if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 20680 (eval $ac_link) 2>conftest.er1
503d2be0 20681 ac_status=$?
edfaf76d
LK
20682 grep -v '^ *+' conftest.er1 >conftest.err
20683 rm -f conftest.er1
20684 cat conftest.err >&5
c0d27fcc 20685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20686 (exit $ac_status); } &&
e143ad11
AS
20687 { ac_try='test -z "$ac_c_werror_flag"
20688 || test ! -s conftest.err'
edfaf76d
LK
20689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20690 (eval $ac_try) 2>&5
20691 ac_status=$?
20692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20693 (exit $ac_status); }; } &&
20694 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20696 (eval $ac_try) 2>&5
20697 ac_status=$?
c0d27fcc 20698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20699 (exit $ac_status); }; }; then
20700 ac_cv_lib_intl_dgettext=yes
20701else
20702 echo "$as_me: failed program was:" >&5
19650fd6
AS
20703sed 's/^/| /' conftest.$ac_ext >&5
20704
503d2be0
AS
20705ac_cv_lib_intl_dgettext=no
20706fi
edfaf76d
LK
20707rm -f conftest.err conftest.$ac_objext \
20708 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20709LIBS=$ac_check_lib_save_LIBS
20710fi
c0d27fcc 20711echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
20712echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
20713if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 20714 cat >>confdefs.h <<_ACEOF
503d2be0 20715#define HAVE_LIBINTL 1
c0d27fcc 20716_ACEOF
ba4481b5
DL
20717
20718 LIBS="-lintl $LIBS"
20719
ba4481b5
DL
20720fi
20721
c0d27fcc
MR
20722
20723echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
20724echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
20725if test "${emacs_cv_localtime_cache+set}" = set; then
20726 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
20727else
20728 if test x$ac_cv_func_tzset = xyes; then
20729if test "$cross_compiling" = yes; then
20730 # If we have tzset, assume the worst when cross-compiling.
20731emacs_cv_localtime_cache=yes
20732else
503d2be0 20733 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20734/* confdefs.h. */
20735_ACEOF
20736cat confdefs.h >>conftest.$ac_ext
20737cat >>conftest.$ac_ext <<_ACEOF
20738/* end confdefs.h. */
ba4481b5 20739#include <time.h>
ba4481b5
DL
20740extern char **environ;
20741unset_TZ ()
20742{
20743 char **from, **to;
20744 for (to = from = environ; (*to = *from); from++)
20745 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
20746 to++;
20747}
20748char TZ_GMT0[] = "TZ=GMT0";
20749char TZ_PST8[] = "TZ=PST8";
20750main()
20751{
20752 time_t now = time ((time_t *) 0);
20753 int hour_GMT0, hour_unset;
20754 if (putenv (TZ_GMT0) != 0)
20755 exit (1);
20756 hour_GMT0 = localtime (&now)->tm_hour;
20757 unset_TZ ();
20758 hour_unset = localtime (&now)->tm_hour;
20759 if (putenv (TZ_PST8) != 0)
20760 exit (1);
20761 if (localtime (&now)->tm_hour == hour_GMT0)
20762 exit (1);
20763 unset_TZ ();
20764 if (localtime (&now)->tm_hour != hour_unset)
20765 exit (1);
20766 exit (0);
20767}
503d2be0
AS
20768_ACEOF
20769rm -f conftest$ac_exeext
c0d27fcc 20770if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
20771 (eval $ac_link) 2>&5
20772 ac_status=$?
c0d27fcc 20773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20774 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 20775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20776 (eval $ac_try) 2>&5
20777 ac_status=$?
c0d27fcc 20778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20779 (exit $ac_status); }; }; then
ba4481b5
DL
20780 emacs_cv_localtime_cache=no
20781else
503d2be0
AS
20782 echo "$as_me: program exited with status $ac_status" >&5
20783echo "$as_me: failed program was:" >&5
19650fd6
AS
20784sed 's/^/| /' conftest.$ac_ext >&5
20785
c0d27fcc 20786( exit $ac_status )
503d2be0 20787emacs_cv_localtime_cache=yes
ba4481b5 20788fi
edfaf76d 20789rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 20790fi
ba4481b5
DL
20791else
20792 # If we lack tzset, report that localtime does not cache TZ,
20793 # since we can't invalidate the cache if we don't have tzset.
20794 emacs_cv_localtime_cache=no
20795fi
20796fi
c0d27fcc 20797echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 20798echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 20799if test $emacs_cv_localtime_cache = yes; then
b936fae4 20800
c0d27fcc 20801cat >>confdefs.h <<\_ACEOF
ba4481b5 20802#define LOCALTIME_CACHE 1
c0d27fcc 20803_ACEOF
ba4481b5
DL
20804
20805fi
20806
20807if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
20808
20809for ac_func in gettimeofday
48d4b120 20810do
503d2be0 20811as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 20812echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
20813echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20814if eval "test \"\${$as_ac_var+set}\" = set"; then
20815 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 20816else
503d2be0 20817 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20818/* confdefs.h. */
20819_ACEOF
20820cat confdefs.h >>conftest.$ac_ext
20821cat >>conftest.$ac_ext <<_ACEOF
20822/* end confdefs.h. */
edfaf76d
LK
20823/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20824 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20825#define $ac_func innocuous_$ac_func
20826
48d4b120 20827/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20828 which can conflict with char $ac_func (); below.
20829 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20830 <limits.h> exists even on freestanding compilers. */
edfaf76d 20831
19650fd6
AS
20832#ifdef __STDC__
20833# include <limits.h>
20834#else
20835# include <assert.h>
20836#endif
edfaf76d
LK
20837
20838#undef $ac_func
20839
48d4b120 20840/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20841#ifdef __cplusplus
20842extern "C"
19650fd6 20843{
503d2be0 20844#endif
48d4b120 20845/* We use char because int might match the return type of a gcc2
503d2be0
AS
20846 builtin and then its argument prototype would still apply. */
20847char $ac_func ();
48d4b120
DL
20848/* The GNU C library defines this for functions which it implements
20849 to always fail with ENOSYS. Some functions are actually named
20850 something starting with __ and the normal name is an alias. */
20851#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20852choke me
20853#else
19650fd6
AS
20854char (*f) () = $ac_func;
20855#endif
20856#ifdef __cplusplus
20857}
cd958eb3
MB
20858#endif
20859
19650fd6
AS
20860int
20861main ()
20862{
20863return f != $ac_func;
503d2be0
AS
20864 ;
20865 return 0;
20866}
20867_ACEOF
20868rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20869if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 20870 (eval $ac_link) 2>conftest.er1
503d2be0 20871 ac_status=$?
edfaf76d
LK
20872 grep -v '^ *+' conftest.er1 >conftest.err
20873 rm -f conftest.er1
20874 cat conftest.err >&5
c0d27fcc 20875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20876 (exit $ac_status); } &&
e143ad11
AS
20877 { ac_try='test -z "$ac_c_werror_flag"
20878 || test ! -s conftest.err'
edfaf76d
LK
20879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20880 (eval $ac_try) 2>&5
20881 ac_status=$?
20882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20883 (exit $ac_status); }; } &&
20884 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20886 (eval $ac_try) 2>&5
20887 ac_status=$?
c0d27fcc 20888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20889 (exit $ac_status); }; }; then
20890 eval "$as_ac_var=yes"
20891else
20892 echo "$as_me: failed program was:" >&5
19650fd6
AS
20893sed 's/^/| /' conftest.$ac_ext >&5
20894
503d2be0
AS
20895eval "$as_ac_var=no"
20896fi
edfaf76d
LK
20897rm -f conftest.err conftest.$ac_objext \
20898 conftest$ac_exeext conftest.$ac_ext
503d2be0 20899fi
c0d27fcc 20900echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
20901echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20902if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 20903 cat >>confdefs.h <<_ACEOF
503d2be0 20904#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 20905_ACEOF
48d4b120 20906
48d4b120
DL
20907fi
20908done
20909
b936fae4 20910 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 20911 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
20912echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
20913if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
20914 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20915else
503d2be0 20916 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20917/* confdefs.h. */
20918_ACEOF
20919cat confdefs.h >>conftest.$ac_ext
20920cat >>conftest.$ac_ext <<_ACEOF
20921/* end confdefs.h. */
ba4481b5 20922
a3f08d9e
DL
20923#ifdef TIME_WITH_SYS_TIME
20924#include <sys/time.h>
20925#include <time.h>
20926#else
20927#ifdef HAVE_SYS_TIME_H
20928#include <sys/time.h>
20929#else
20930#include <time.h>
20931#endif
20932#endif
503d2be0
AS
20933int
20934main ()
20935{
a3f08d9e 20936struct timeval time;
b936fae4 20937 gettimeofday (&time, 0);
503d2be0
AS
20938 ;
20939 return 0;
20940}
20941_ACEOF
20942rm -f conftest.$ac_objext
c0d27fcc 20943if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20944 (eval $ac_compile) 2>conftest.er1
503d2be0 20945 ac_status=$?
edfaf76d
LK
20946 grep -v '^ *+' conftest.er1 >conftest.err
20947 rm -f conftest.er1
20948 cat conftest.err >&5
c0d27fcc 20949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20950 (exit $ac_status); } &&
e143ad11
AS
20951 { ac_try='test -z "$ac_c_werror_flag"
20952 || test ! -s conftest.err'
edfaf76d
LK
20953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20954 (eval $ac_try) 2>&5
20955 ac_status=$?
20956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20957 (exit $ac_status); }; } &&
20958 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20960 (eval $ac_try) 2>&5
20961 ac_status=$?
c0d27fcc 20962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20963 (exit $ac_status); }; }; then
ba4481b5
DL
20964 emacs_cv_gettimeofday_two_arguments=yes
20965else
503d2be0 20966 echo "$as_me: failed program was:" >&5
19650fd6
AS
20967sed 's/^/| /' conftest.$ac_ext >&5
20968
503d2be0 20969emacs_cv_gettimeofday_two_arguments=no
ba4481b5 20970fi
edfaf76d 20971rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 20972fi
c0d27fcc 20973echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 20974echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
20975 if test $emacs_cv_gettimeofday_two_arguments = no; then
20976
c0d27fcc 20977cat >>confdefs.h <<\_ACEOF
ba4481b5 20978#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 20979_ACEOF
ba4481b5 20980
b936fae4 20981 fi
ba4481b5
DL
20982 fi
20983fi
20984
973a76b1
DL
20985# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
20986echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20987echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
20988if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
20989 echo $ECHO_N "(cached) $ECHO_C" >&6
20990else
20991 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20992/* confdefs.h. */
20993_ACEOF
20994cat confdefs.h >>conftest.$ac_ext
20995cat >>conftest.$ac_ext <<_ACEOF
20996/* end confdefs.h. */
973a76b1
DL
20997#include <sys/types.h>
20998#include <$ac_cv_struct_tm>
20999
21000
21001int
21002main ()
21003{
21004static struct tm ac_aggr;
21005if (ac_aggr.tm_zone)
21006return 0;
21007 ;
21008 return 0;
21009}
21010_ACEOF
21011rm -f conftest.$ac_objext
21012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21013 (eval $ac_compile) 2>conftest.er1
973a76b1 21014 ac_status=$?
edfaf76d
LK
21015 grep -v '^ *+' conftest.er1 >conftest.err
21016 rm -f conftest.er1
21017 cat conftest.err >&5
973a76b1
DL
21018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21019 (exit $ac_status); } &&
e143ad11
AS
21020 { ac_try='test -z "$ac_c_werror_flag"
21021 || test ! -s conftest.err'
edfaf76d
LK
21022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21023 (eval $ac_try) 2>&5
21024 ac_status=$?
21025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21026 (exit $ac_status); }; } &&
21027 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
21028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21029 (eval $ac_try) 2>&5
21030 ac_status=$?
21031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21032 (exit $ac_status); }; }; then
21033 ac_cv_member_struct_tm_tm_zone=yes
21034else
21035 echo "$as_me: failed program was:" >&5
19650fd6
AS
21036sed 's/^/| /' conftest.$ac_ext >&5
21037
973a76b1 21038cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21039/* confdefs.h. */
21040_ACEOF
21041cat confdefs.h >>conftest.$ac_ext
21042cat >>conftest.$ac_ext <<_ACEOF
21043/* end confdefs.h. */
973a76b1
DL
21044#include <sys/types.h>
21045#include <$ac_cv_struct_tm>
21046
21047
21048int
21049main ()
21050{
21051static struct tm ac_aggr;
21052if (sizeof ac_aggr.tm_zone)
21053return 0;
21054 ;
21055 return 0;
21056}
21057_ACEOF
21058rm -f conftest.$ac_objext
21059if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21060 (eval $ac_compile) 2>conftest.er1
973a76b1 21061 ac_status=$?
edfaf76d
LK
21062 grep -v '^ *+' conftest.er1 >conftest.err
21063 rm -f conftest.er1
21064 cat conftest.err >&5
973a76b1
DL
21065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21066 (exit $ac_status); } &&
e143ad11
AS
21067 { ac_try='test -z "$ac_c_werror_flag"
21068 || test ! -s conftest.err'
edfaf76d
LK
21069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21070 (eval $ac_try) 2>&5
21071 ac_status=$?
21072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21073 (exit $ac_status); }; } &&
21074 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
21075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21076 (eval $ac_try) 2>&5
21077 ac_status=$?
21078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21079 (exit $ac_status); }; }; then
21080 ac_cv_member_struct_tm_tm_zone=yes
21081else
21082 echo "$as_me: failed program was:" >&5
19650fd6
AS
21083sed 's/^/| /' conftest.$ac_ext >&5
21084
973a76b1
DL
21085ac_cv_member_struct_tm_tm_zone=no
21086fi
edfaf76d 21087rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 21088fi
edfaf76d 21089rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
21090fi
21091echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21092echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
21093if test $ac_cv_member_struct_tm_tm_zone = yes; then
21094
21095cat >>confdefs.h <<_ACEOF
21096#define HAVE_STRUCT_TM_TM_ZONE 1
21097_ACEOF
21098
21099
21100fi
21101
21102if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21103
21104cat >>confdefs.h <<\_ACEOF
21105#define HAVE_TM_ZONE 1
21106_ACEOF
21107
21108else
21109 echo "$as_me:$LINENO: checking for tzname" >&5
21110echo $ECHO_N "checking for tzname... $ECHO_C" >&6
21111if test "${ac_cv_var_tzname+set}" = set; then
21112 echo $ECHO_N "(cached) $ECHO_C" >&6
21113else
21114 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21115/* confdefs.h. */
21116_ACEOF
21117cat confdefs.h >>conftest.$ac_ext
21118cat >>conftest.$ac_ext <<_ACEOF
21119/* end confdefs.h. */
973a76b1
DL
21120#include <time.h>
21121#ifndef tzname /* For SGI. */
21122extern char *tzname[]; /* RS6000 and others reject char **tzname. */
21123#endif
21124
21125int
21126main ()
21127{
21128atoi(*tzname);
21129 ;
21130 return 0;
21131}
21132_ACEOF
21133rm -f conftest.$ac_objext conftest$ac_exeext
21134if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 21135 (eval $ac_link) 2>conftest.er1
973a76b1 21136 ac_status=$?
edfaf76d
LK
21137 grep -v '^ *+' conftest.er1 >conftest.err
21138 rm -f conftest.er1
21139 cat conftest.err >&5
973a76b1
DL
21140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21141 (exit $ac_status); } &&
e143ad11
AS
21142 { ac_try='test -z "$ac_c_werror_flag"
21143 || test ! -s conftest.err'
edfaf76d
LK
21144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21145 (eval $ac_try) 2>&5
21146 ac_status=$?
21147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21148 (exit $ac_status); }; } &&
21149 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
21150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21151 (eval $ac_try) 2>&5
21152 ac_status=$?
21153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21154 (exit $ac_status); }; }; then
21155 ac_cv_var_tzname=yes
21156else
21157 echo "$as_me: failed program was:" >&5
19650fd6
AS
21158sed 's/^/| /' conftest.$ac_ext >&5
21159
973a76b1
DL
21160ac_cv_var_tzname=no
21161fi
edfaf76d
LK
21162rm -f conftest.err conftest.$ac_objext \
21163 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
21164fi
21165echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21166echo "${ECHO_T}$ac_cv_var_tzname" >&6
21167 if test $ac_cv_var_tzname = yes; then
21168
21169cat >>confdefs.h <<\_ACEOF
21170#define HAVE_TZNAME 1
21171_ACEOF
21172
21173 fi
21174fi
21175
21176
48d4b120 21177if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 21178 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
21179echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
21180if test "${emacs_cv_struct_timezone+set}" = set; then
21181 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 21182else
503d2be0 21183 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21184/* confdefs.h. */
21185_ACEOF
21186cat confdefs.h >>conftest.$ac_ext
21187cat >>conftest.$ac_ext <<_ACEOF
21188/* end confdefs.h. */
48d4b120 21189#include <sys/time.h>
503d2be0
AS
21190int
21191main ()
21192{
48d4b120 21193struct timezone tz;
503d2be0
AS
21194 ;
21195 return 0;
21196}
21197_ACEOF
21198rm -f conftest.$ac_objext
c0d27fcc 21199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21200 (eval $ac_compile) 2>conftest.er1
503d2be0 21201 ac_status=$?
edfaf76d
LK
21202 grep -v '^ *+' conftest.er1 >conftest.err
21203 rm -f conftest.er1
21204 cat conftest.err >&5
c0d27fcc 21205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21206 (exit $ac_status); } &&
e143ad11
AS
21207 { ac_try='test -z "$ac_c_werror_flag"
21208 || test ! -s conftest.err'
edfaf76d
LK
21209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21210 (eval $ac_try) 2>&5
21211 ac_status=$?
21212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21213 (exit $ac_status); }; } &&
21214 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21216 (eval $ac_try) 2>&5
21217 ac_status=$?
c0d27fcc 21218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21219 (exit $ac_status); }; }; then
48d4b120
DL
21220 if test "$cross_compiling" = yes; then
21221 emacs_cv_struct_timezone=yes
21222else
503d2be0 21223 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21224/* confdefs.h. */
21225_ACEOF
21226cat confdefs.h >>conftest.$ac_ext
21227cat >>conftest.$ac_ext <<_ACEOF
21228/* end confdefs.h. */
48d4b120
DL
21229
21230#ifdef TIME_WITH_SYS_TIME
21231#include <sys/time.h>
21232#include <time.h>
21233#else
21234#ifdef HAVE_SYS_TIME_H
21235#include <sys/time.h>
21236#else
21237#include <time.h>
21238#endif
21239#endif
21240main () {
21241 struct timeval time;
21242 struct timezone dummy;
21243 exit (gettimeofday (&time, &dummy));
21244}
503d2be0
AS
21245_ACEOF
21246rm -f conftest$ac_exeext
c0d27fcc 21247if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21248 (eval $ac_link) 2>&5
21249 ac_status=$?
c0d27fcc 21250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21251 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21253 (eval $ac_try) 2>&5
21254 ac_status=$?
c0d27fcc 21255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21256 (exit $ac_status); }; }; then
48d4b120
DL
21257 emacs_cv_struct_timezone=yes
21258else
503d2be0
AS
21259 echo "$as_me: program exited with status $ac_status" >&5
21260echo "$as_me: failed program was:" >&5
19650fd6
AS
21261sed 's/^/| /' conftest.$ac_ext >&5
21262
c0d27fcc 21263( exit $ac_status )
503d2be0 21264emacs_cv_struct_timezone=no
48d4b120 21265fi
edfaf76d 21266rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 21267fi
48d4b120 21268else
503d2be0 21269 echo "$as_me: failed program was:" >&5
19650fd6
AS
21270sed 's/^/| /' conftest.$ac_ext >&5
21271
503d2be0 21272emacs_cv_struct_timezone=no
48d4b120 21273fi
edfaf76d 21274rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
48d4b120 21275fi
c0d27fcc 21276echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 21277echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
21278fi
21279
ba4481b5 21280ok_so_far=yes
c0d27fcc 21281echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
21282echo $ECHO_N "checking for socket... $ECHO_C" >&6
21283if test "${ac_cv_func_socket+set}" = set; then
21284 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21285else
503d2be0 21286 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21287/* confdefs.h. */
21288_ACEOF
21289cat confdefs.h >>conftest.$ac_ext
21290cat >>conftest.$ac_ext <<_ACEOF
21291/* end confdefs.h. */
edfaf76d
LK
21292/* Define socket to an innocuous variant, in case <limits.h> declares socket.
21293 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21294#define socket innocuous_socket
21295
ba4481b5 21296/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21297 which can conflict with char socket (); below.
21298 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21299 <limits.h> exists even on freestanding compilers. */
edfaf76d 21300
19650fd6
AS
21301#ifdef __STDC__
21302# include <limits.h>
21303#else
21304# include <assert.h>
21305#endif
edfaf76d
LK
21306
21307#undef socket
21308
ba4481b5 21309/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
21310#ifdef __cplusplus
21311extern "C"
19650fd6 21312{
503d2be0 21313#endif
ba4481b5 21314/* We use char because int might match the return type of a gcc2
503d2be0
AS
21315 builtin and then its argument prototype would still apply. */
21316char socket ();
ba4481b5
DL
21317/* The GNU C library defines this for functions which it implements
21318 to always fail with ENOSYS. Some functions are actually named
21319 something starting with __ and the normal name is an alias. */
21320#if defined (__stub_socket) || defined (__stub___socket)
21321choke me
21322#else
19650fd6
AS
21323char (*f) () = socket;
21324#endif
21325#ifdef __cplusplus
21326}
cd958eb3
MB
21327#endif
21328
19650fd6
AS
21329int
21330main ()
21331{
21332return f != socket;
503d2be0
AS
21333 ;
21334 return 0;
21335}
21336_ACEOF
21337rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 21338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 21339 (eval $ac_link) 2>conftest.er1
503d2be0 21340 ac_status=$?
edfaf76d
LK
21341 grep -v '^ *+' conftest.er1 >conftest.err
21342 rm -f conftest.er1
21343 cat conftest.err >&5
c0d27fcc 21344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21345 (exit $ac_status); } &&
e143ad11
AS
21346 { ac_try='test -z "$ac_c_werror_flag"
21347 || test ! -s conftest.err'
edfaf76d
LK
21348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21349 (eval $ac_try) 2>&5
21350 ac_status=$?
21351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21352 (exit $ac_status); }; } &&
21353 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 21354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21355 (eval $ac_try) 2>&5
21356 ac_status=$?
c0d27fcc 21357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21358 (exit $ac_status); }; }; then
21359 ac_cv_func_socket=yes
21360else
21361 echo "$as_me: failed program was:" >&5
19650fd6
AS
21362sed 's/^/| /' conftest.$ac_ext >&5
21363
503d2be0
AS
21364ac_cv_func_socket=no
21365fi
edfaf76d
LK
21366rm -f conftest.err conftest.$ac_objext \
21367 conftest$ac_exeext conftest.$ac_ext
503d2be0 21368fi
c0d27fcc 21369echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
21370echo "${ECHO_T}$ac_cv_func_socket" >&6
21371if test $ac_cv_func_socket = yes; then
ba4481b5
DL
21372 :
21373else
503d2be0 21374 ok_so_far=no
ba4481b5
DL
21375fi
21376
21377if test $ok_so_far = yes; then
c0d27fcc
MR
21378 if test "${ac_cv_header_netinet_in_h+set}" = set; then
21379 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
21380echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
21381if test "${ac_cv_header_netinet_in_h+set}" = set; then
21382 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
21383fi
21384echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
21385echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 21386else
c0d27fcc
MR
21387 # Is the header compilable?
21388echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
21389echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
21390cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21391/* confdefs.h. */
21392_ACEOF
21393cat confdefs.h >>conftest.$ac_ext
21394cat >>conftest.$ac_ext <<_ACEOF
21395/* end confdefs.h. */
c0d27fcc
MR
21396$ac_includes_default
21397#include <netinet/in.h>
21398_ACEOF
21399rm -f conftest.$ac_objext
21400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21401 (eval $ac_compile) 2>conftest.er1
c0d27fcc 21402 ac_status=$?
edfaf76d
LK
21403 grep -v '^ *+' conftest.er1 >conftest.err
21404 rm -f conftest.er1
21405 cat conftest.err >&5
c0d27fcc
MR
21406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21407 (exit $ac_status); } &&
e143ad11
AS
21408 { ac_try='test -z "$ac_c_werror_flag"
21409 || test ! -s conftest.err'
edfaf76d
LK
21410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21411 (eval $ac_try) 2>&5
21412 ac_status=$?
21413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21414 (exit $ac_status); }; } &&
21415 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
21416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21417 (eval $ac_try) 2>&5
21418 ac_status=$?
21419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21420 (exit $ac_status); }; }; then
21421 ac_header_compiler=yes
21422else
21423 echo "$as_me: failed program was:" >&5
19650fd6
AS
21424sed 's/^/| /' conftest.$ac_ext >&5
21425
c0d27fcc
MR
21426ac_header_compiler=no
21427fi
edfaf76d 21428rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
21429echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21430echo "${ECHO_T}$ac_header_compiler" >&6
21431
21432# Is the header present?
21433echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
21434echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
21435cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21436/* confdefs.h. */
21437_ACEOF
21438cat confdefs.h >>conftest.$ac_ext
21439cat >>conftest.$ac_ext <<_ACEOF
21440/* end confdefs.h. */
ba4481b5 21441#include <netinet/in.h>
503d2be0 21442_ACEOF
c0d27fcc 21443if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21444 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21445 ac_status=$?
6bae0ccf 21446 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21447 rm -f conftest.er1
21448 cat conftest.err >&5
c0d27fcc 21449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21450 (exit $ac_status); } >/dev/null; then
21451 if test -s conftest.err; then
21452 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21453 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21454 else
21455 ac_cpp_err=
21456 fi
21457else
21458 ac_cpp_err=yes
21459fi
21460if test -z "$ac_cpp_err"; then
c0d27fcc 21461 ac_header_preproc=yes
ba4481b5 21462else
503d2be0 21463 echo "$as_me: failed program was:" >&5
19650fd6
AS
21464sed 's/^/| /' conftest.$ac_ext >&5
21465
c0d27fcc 21466 ac_header_preproc=no
ba4481b5 21467fi
503d2be0 21468rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
21469echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21470echo "${ECHO_T}$ac_header_preproc" >&6
21471
21472# So? What about this header?
edfaf76d
LK
21473case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21474 yes:no: )
c0d27fcc
MR
21475 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
21476echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21477 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
21478echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
21479 ac_header_preproc=yes
19650fd6 21480 ;;
edfaf76d 21481 no:yes:* )
c0d27fcc
MR
21482 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
21483echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21484 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
21485echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
21486 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
21487echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
21488 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
21489echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21490 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 21491echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21492 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
21493echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
21494 (
21495 cat <<\_ASBOX
edfaf76d
LK
21496## ------------------------------------------ ##
21497## Report this to the AC_PACKAGE_NAME lists. ##
21498## ------------------------------------------ ##
19650fd6
AS
21499_ASBOX
21500 ) |
21501 sed "s/^/$as_me: WARNING: /" >&2
21502 ;;
c0d27fcc
MR
21503esac
21504echo "$as_me:$LINENO: checking for netinet/in.h" >&5
21505echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
21506if test "${ac_cv_header_netinet_in_h+set}" = set; then
21507 echo $ECHO_N "(cached) $ECHO_C" >&6
21508else
21509 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 21510fi
c0d27fcc 21511echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 21512echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
21513
21514fi
503d2be0 21515if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
21516 :
21517else
503d2be0 21518 ok_so_far=no
ba4481b5
DL
21519fi
21520
c0d27fcc 21521
ba4481b5
DL
21522fi
21523if test $ok_so_far = yes; then
c0d27fcc
MR
21524 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21525 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
21526echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
21527if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21528 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
21529fi
21530echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
21531echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 21532else
c0d27fcc
MR
21533 # Is the header compilable?
21534echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
21535echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
21536cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21537/* confdefs.h. */
21538_ACEOF
21539cat confdefs.h >>conftest.$ac_ext
21540cat >>conftest.$ac_ext <<_ACEOF
21541/* end confdefs.h. */
c0d27fcc
MR
21542$ac_includes_default
21543#include <arpa/inet.h>
21544_ACEOF
21545rm -f conftest.$ac_objext
21546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21547 (eval $ac_compile) 2>conftest.er1
c0d27fcc 21548 ac_status=$?
edfaf76d
LK
21549 grep -v '^ *+' conftest.er1 >conftest.err
21550 rm -f conftest.er1
21551 cat conftest.err >&5
c0d27fcc
MR
21552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21553 (exit $ac_status); } &&
e143ad11
AS
21554 { ac_try='test -z "$ac_c_werror_flag"
21555 || test ! -s conftest.err'
edfaf76d
LK
21556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21557 (eval $ac_try) 2>&5
21558 ac_status=$?
21559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21560 (exit $ac_status); }; } &&
21561 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
21562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21563 (eval $ac_try) 2>&5
21564 ac_status=$?
21565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21566 (exit $ac_status); }; }; then
21567 ac_header_compiler=yes
21568else
21569 echo "$as_me: failed program was:" >&5
19650fd6
AS
21570sed 's/^/| /' conftest.$ac_ext >&5
21571
c0d27fcc
MR
21572ac_header_compiler=no
21573fi
edfaf76d 21574rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
21575echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21576echo "${ECHO_T}$ac_header_compiler" >&6
21577
21578# Is the header present?
21579echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
21580echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
21581cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21582/* confdefs.h. */
21583_ACEOF
21584cat confdefs.h >>conftest.$ac_ext
21585cat >>conftest.$ac_ext <<_ACEOF
21586/* end confdefs.h. */
ba4481b5 21587#include <arpa/inet.h>
503d2be0 21588_ACEOF
c0d27fcc 21589if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21590 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21591 ac_status=$?
6bae0ccf 21592 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21593 rm -f conftest.er1
21594 cat conftest.err >&5
c0d27fcc 21595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21596 (exit $ac_status); } >/dev/null; then
21597 if test -s conftest.err; then
21598 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21599 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21600 else
21601 ac_cpp_err=
21602 fi
21603else
21604 ac_cpp_err=yes
21605fi
21606if test -z "$ac_cpp_err"; then
c0d27fcc 21607 ac_header_preproc=yes
ba4481b5 21608else
503d2be0 21609 echo "$as_me: failed program was:" >&5
19650fd6
AS
21610sed 's/^/| /' conftest.$ac_ext >&5
21611
c0d27fcc 21612 ac_header_preproc=no
ba4481b5 21613fi
503d2be0 21614rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
21615echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21616echo "${ECHO_T}$ac_header_preproc" >&6
21617
21618# So? What about this header?
edfaf76d
LK
21619case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21620 yes:no: )
c0d27fcc
MR
21621 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
21622echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21623 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
21624echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
21625 ac_header_preproc=yes
19650fd6 21626 ;;
edfaf76d 21627 no:yes:* )
c0d27fcc
MR
21628 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
21629echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21630 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
21631echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
21632 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
21633echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
21634 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
21635echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21636 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 21637echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21638 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
21639echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
21640 (
21641 cat <<\_ASBOX
edfaf76d
LK
21642## ------------------------------------------ ##
21643## Report this to the AC_PACKAGE_NAME lists. ##
21644## ------------------------------------------ ##
19650fd6
AS
21645_ASBOX
21646 ) |
21647 sed "s/^/$as_me: WARNING: /" >&2
21648 ;;
c0d27fcc
MR
21649esac
21650echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
21651echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
21652if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21653 echo $ECHO_N "(cached) $ECHO_C" >&6
21654else
21655 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 21656fi
c0d27fcc 21657echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 21658echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
21659
21660fi
503d2be0 21661if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
21662 :
21663else
503d2be0 21664 ok_so_far=no
ba4481b5
DL
21665fi
21666
c0d27fcc 21667
ba4481b5
DL
21668fi
21669if test $ok_so_far = yes; then
b936fae4 21670
c0d27fcc 21671cat >>confdefs.h <<\_ACEOF
ba4481b5 21672#define HAVE_INET_SOCKETS 1
c0d27fcc 21673_ACEOF
ba4481b5
DL
21674
21675fi
21676
2d2b6695 21677
7862d3a8 21678for ac_header in sys/ioctl.h
2d2b6695
KS
21679do
21680as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21681if eval "test \"\${$as_ac_Header+set}\" = set"; then
21682 echo "$as_me:$LINENO: checking for $ac_header" >&5
21683echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21684if eval "test \"\${$as_ac_Header+set}\" = set"; then
21685 echo $ECHO_N "(cached) $ECHO_C" >&6
21686fi
21687echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21688echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21689else
21690 # Is the header compilable?
21691echo "$as_me:$LINENO: checking $ac_header usability" >&5
21692echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
21693cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21694/* confdefs.h. */
21695_ACEOF
21696cat confdefs.h >>conftest.$ac_ext
21697cat >>conftest.$ac_ext <<_ACEOF
21698/* end confdefs.h. */
21699$ac_includes_default
21700#include <$ac_header>
21701_ACEOF
21702rm -f conftest.$ac_objext
21703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21704 (eval $ac_compile) 2>conftest.er1
2d2b6695 21705 ac_status=$?
edfaf76d
LK
21706 grep -v '^ *+' conftest.er1 >conftest.err
21707 rm -f conftest.er1
21708 cat conftest.err >&5
2d2b6695
KS
21709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21710 (exit $ac_status); } &&
e143ad11
AS
21711 { ac_try='test -z "$ac_c_werror_flag"
21712 || test ! -s conftest.err'
edfaf76d
LK
21713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21714 (eval $ac_try) 2>&5
21715 ac_status=$?
21716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21717 (exit $ac_status); }; } &&
21718 { ac_try='test -s conftest.$ac_objext'
2d2b6695
KS
21719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21720 (eval $ac_try) 2>&5
21721 ac_status=$?
21722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21723 (exit $ac_status); }; }; then
21724 ac_header_compiler=yes
21725else
21726 echo "$as_me: failed program was:" >&5
21727sed 's/^/| /' conftest.$ac_ext >&5
21728
21729ac_header_compiler=no
21730fi
edfaf76d 21731rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2d2b6695
KS
21732echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21733echo "${ECHO_T}$ac_header_compiler" >&6
21734
21735# Is the header present?
21736echo "$as_me:$LINENO: checking $ac_header presence" >&5
21737echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21738cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21739/* confdefs.h. */
21740_ACEOF
21741cat confdefs.h >>conftest.$ac_ext
21742cat >>conftest.$ac_ext <<_ACEOF
21743/* end confdefs.h. */
21744#include <$ac_header>
21745_ACEOF
21746if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21747 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21748 ac_status=$?
21749 grep -v '^ *+' conftest.er1 >conftest.err
21750 rm -f conftest.er1
21751 cat conftest.err >&5
21752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21753 (exit $ac_status); } >/dev/null; then
21754 if test -s conftest.err; then
21755 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21756 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2d2b6695
KS
21757 else
21758 ac_cpp_err=
21759 fi
21760else
21761 ac_cpp_err=yes
21762fi
21763if test -z "$ac_cpp_err"; then
21764 ac_header_preproc=yes
21765else
21766 echo "$as_me: failed program was:" >&5
21767sed 's/^/| /' conftest.$ac_ext >&5
21768
21769 ac_header_preproc=no
21770fi
21771rm -f conftest.err conftest.$ac_ext
21772echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21773echo "${ECHO_T}$ac_header_preproc" >&6
21774
21775# So? What about this header?
edfaf76d
LK
21776case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21777 yes:no: )
2d2b6695
KS
21778 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21779echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21780 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21781echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21782 ac_header_preproc=yes
2d2b6695 21783 ;;
edfaf76d 21784 no:yes:* )
2d2b6695
KS
21785 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21786echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21787 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21788echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21789 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21790echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21791 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21792echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
21793 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21794echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21795 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21796echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
2d2b6695
KS
21797 (
21798 cat <<\_ASBOX
edfaf76d
LK
21799## ------------------------------------------ ##
21800## Report this to the AC_PACKAGE_NAME lists. ##
21801## ------------------------------------------ ##
2d2b6695
KS
21802_ASBOX
21803 ) |
21804 sed "s/^/$as_me: WARNING: /" >&2
21805 ;;
21806esac
21807echo "$as_me:$LINENO: checking for $ac_header" >&5
21808echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21809if eval "test \"\${$as_ac_Header+set}\" = set"; then
21810 echo $ECHO_N "(cached) $ECHO_C" >&6
21811else
edfaf76d 21812 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695
KS
21813fi
21814echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21815echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21816
21817fi
21818if test `eval echo '${'$as_ac_Header'}'` = yes; then
21819 cat >>confdefs.h <<_ACEOF
21820#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21821_ACEOF
21822
21823fi
21824
21825done
21826
21827
ba4481b5 21828if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 21829
c0d27fcc 21830cat >>confdefs.h <<\_ACEOF
ba4481b5 21831#define HAVE_AIX_SMT_EXP 1
c0d27fcc 21832_ACEOF
ba4481b5
DL
21833
21834fi
21835
c0d27fcc 21836echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 21837echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 21838if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 21839 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 21840echo "${ECHO_T}yes" >&6
b936fae4 21841
c0d27fcc 21842cat >>confdefs.h <<\_ACEOF
3d9fec71 21843#define HAVE_DEV_PTMX 1
c0d27fcc 21844_ACEOF
3d9fec71
DL
21845
21846else
c0d27fcc 21847 echo "$as_me:$LINENO: result: no" >&5
503d2be0 21848echo "${ECHO_T}no" >&6
3d9fec71
DL
21849fi
21850
c0d27fcc 21851echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
21852echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21853if test "${ac_cv_type_pid_t+set}" = set; then
21854 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 21855else
503d2be0 21856 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21857/* confdefs.h. */
21858_ACEOF
21859cat confdefs.h >>conftest.$ac_ext
21860cat >>conftest.$ac_ext <<_ACEOF
21861/* end confdefs.h. */
503d2be0
AS
21862$ac_includes_default
21863int
21864main ()
21865{
21866if ((pid_t *) 0)
21867 return 0;
21868if (sizeof (pid_t))
21869 return 0;
21870 ;
21871 return 0;
21872}
21873_ACEOF
21874rm -f conftest.$ac_objext
c0d27fcc 21875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21876 (eval $ac_compile) 2>conftest.er1
503d2be0 21877 ac_status=$?
edfaf76d
LK
21878 grep -v '^ *+' conftest.er1 >conftest.err
21879 rm -f conftest.er1
21880 cat conftest.err >&5
c0d27fcc 21881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21882 (exit $ac_status); } &&
e143ad11
AS
21883 { ac_try='test -z "$ac_c_werror_flag"
21884 || test ! -s conftest.err'
edfaf76d
LK
21885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21886 (eval $ac_try) 2>&5
21887 ac_status=$?
21888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21889 (exit $ac_status); }; } &&
21890 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21892 (eval $ac_try) 2>&5
21893 ac_status=$?
c0d27fcc 21894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21895 (exit $ac_status); }; }; then
647847ea
DL
21896 ac_cv_type_pid_t=yes
21897else
503d2be0 21898 echo "$as_me: failed program was:" >&5
19650fd6
AS
21899sed 's/^/| /' conftest.$ac_ext >&5
21900
503d2be0 21901ac_cv_type_pid_t=no
647847ea 21902fi
edfaf76d 21903rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 21904fi
c0d27fcc 21905echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
21906echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21907if test $ac_cv_type_pid_t = yes; then
21908 :
21909else
21910
c0d27fcc 21911cat >>confdefs.h <<_ACEOF
647847ea 21912#define pid_t int
c0d27fcc 21913_ACEOF
647847ea
DL
21914
21915fi
21916
c0d27fcc
MR
21917
21918
503d2be0
AS
21919for ac_header in unistd.h vfork.h
21920do
21921as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
21922if eval "test \"\${$as_ac_Header+set}\" = set"; then
21923 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
21924echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21925if eval "test \"\${$as_ac_Header+set}\" = set"; then
21926 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
21927fi
21928echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21929echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 21930else
c0d27fcc
MR
21931 # Is the header compilable?
21932echo "$as_me:$LINENO: checking $ac_header usability" >&5
21933echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
21934cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21935/* confdefs.h. */
21936_ACEOF
21937cat confdefs.h >>conftest.$ac_ext
21938cat >>conftest.$ac_ext <<_ACEOF
21939/* end confdefs.h. */
c0d27fcc
MR
21940$ac_includes_default
21941#include <$ac_header>
21942_ACEOF
21943rm -f conftest.$ac_objext
21944if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21945 (eval $ac_compile) 2>conftest.er1
c0d27fcc 21946 ac_status=$?
edfaf76d
LK
21947 grep -v '^ *+' conftest.er1 >conftest.err
21948 rm -f conftest.er1
21949 cat conftest.err >&5
c0d27fcc
MR
21950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21951 (exit $ac_status); } &&
e143ad11
AS
21952 { ac_try='test -z "$ac_c_werror_flag"
21953 || test ! -s conftest.err'
edfaf76d
LK
21954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21955 (eval $ac_try) 2>&5
21956 ac_status=$?
21957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21958 (exit $ac_status); }; } &&
21959 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
21960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21961 (eval $ac_try) 2>&5
21962 ac_status=$?
21963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21964 (exit $ac_status); }; }; then
21965 ac_header_compiler=yes
21966else
21967 echo "$as_me: failed program was:" >&5
19650fd6
AS
21968sed 's/^/| /' conftest.$ac_ext >&5
21969
c0d27fcc
MR
21970ac_header_compiler=no
21971fi
edfaf76d 21972rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
21973echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21974echo "${ECHO_T}$ac_header_compiler" >&6
21975
21976# Is the header present?
21977echo "$as_me:$LINENO: checking $ac_header presence" >&5
21978echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21979cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21980/* confdefs.h. */
21981_ACEOF
21982cat confdefs.h >>conftest.$ac_ext
21983cat >>conftest.$ac_ext <<_ACEOF
21984/* end confdefs.h. */
503d2be0
AS
21985#include <$ac_header>
21986_ACEOF
c0d27fcc 21987if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21988 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21989 ac_status=$?
6bae0ccf 21990 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21991 rm -f conftest.er1
21992 cat conftest.err >&5
c0d27fcc 21993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21994 (exit $ac_status); } >/dev/null; then
21995 if test -s conftest.err; then
21996 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21997 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21998 else
21999 ac_cpp_err=
22000 fi
647847ea 22001else
503d2be0
AS
22002 ac_cpp_err=yes
22003fi
22004if test -z "$ac_cpp_err"; then
c0d27fcc 22005 ac_header_preproc=yes
647847ea 22006else
503d2be0 22007 echo "$as_me: failed program was:" >&5
19650fd6
AS
22008sed 's/^/| /' conftest.$ac_ext >&5
22009
c0d27fcc 22010 ac_header_preproc=no
647847ea 22011fi
503d2be0 22012rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
22013echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22014echo "${ECHO_T}$ac_header_preproc" >&6
22015
22016# So? What about this header?
edfaf76d
LK
22017case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22018 yes:no: )
c0d27fcc
MR
22019 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22020echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22021 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22022echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22023 ac_header_preproc=yes
19650fd6 22024 ;;
edfaf76d 22025 no:yes:* )
c0d27fcc
MR
22026 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22027echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22028 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22029echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22030 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22031echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22032 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22033echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22034 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22035echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22036 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22037echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
22038 (
22039 cat <<\_ASBOX
edfaf76d
LK
22040## ------------------------------------------ ##
22041## Report this to the AC_PACKAGE_NAME lists. ##
22042## ------------------------------------------ ##
19650fd6
AS
22043_ASBOX
22044 ) |
22045 sed "s/^/$as_me: WARNING: /" >&2
22046 ;;
c0d27fcc
MR
22047esac
22048echo "$as_me:$LINENO: checking for $ac_header" >&5
22049echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22050if eval "test \"\${$as_ac_Header+set}\" = set"; then
22051 echo $ECHO_N "(cached) $ECHO_C" >&6
22052else
edfaf76d 22053 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 22054fi
c0d27fcc 22055echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 22056echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
22057
22058fi
503d2be0 22059if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22060 cat >>confdefs.h <<_ACEOF
503d2be0 22061#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22062_ACEOF
647847ea 22063
73b77ee5 22064fi
c0d27fcc 22065
503d2be0 22066done
73b77ee5 22067
c0d27fcc
MR
22068
22069
503d2be0
AS
22070for ac_func in fork vfork
22071do
22072as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 22073echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
22074echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22075if eval "test \"\${$as_ac_var+set}\" = set"; then
22076 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22077else
503d2be0 22078 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22079/* confdefs.h. */
22080_ACEOF
22081cat confdefs.h >>conftest.$ac_ext
22082cat >>conftest.$ac_ext <<_ACEOF
22083/* end confdefs.h. */
edfaf76d
LK
22084/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22085 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22086#define $ac_func innocuous_$ac_func
22087
fa0b693c 22088/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22089 which can conflict with char $ac_func (); below.
22090 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22091 <limits.h> exists even on freestanding compilers. */
edfaf76d 22092
19650fd6
AS
22093#ifdef __STDC__
22094# include <limits.h>
22095#else
22096# include <assert.h>
22097#endif
edfaf76d
LK
22098
22099#undef $ac_func
22100
fa0b693c 22101/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
22102#ifdef __cplusplus
22103extern "C"
19650fd6 22104{
503d2be0 22105#endif
fa0b693c 22106/* We use char because int might match the return type of a gcc2
503d2be0
AS
22107 builtin and then its argument prototype would still apply. */
22108char $ac_func ();
fa0b693c
GM
22109/* The GNU C library defines this for functions which it implements
22110 to always fail with ENOSYS. Some functions are actually named
22111 something starting with __ and the normal name is an alias. */
503d2be0 22112#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
22113choke me
22114#else
19650fd6
AS
22115char (*f) () = $ac_func;
22116#endif
22117#ifdef __cplusplus
22118}
fa0b693c
GM
22119#endif
22120
19650fd6
AS
22121int
22122main ()
22123{
22124return f != $ac_func;
503d2be0
AS
22125 ;
22126 return 0;
22127}
22128_ACEOF
22129rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 22130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 22131 (eval $ac_link) 2>conftest.er1
503d2be0 22132 ac_status=$?
edfaf76d
LK
22133 grep -v '^ *+' conftest.er1 >conftest.err
22134 rm -f conftest.er1
22135 cat conftest.err >&5
c0d27fcc 22136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22137 (exit $ac_status); } &&
e143ad11
AS
22138 { ac_try='test -z "$ac_c_werror_flag"
22139 || test ! -s conftest.err'
edfaf76d
LK
22140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22141 (eval $ac_try) 2>&5
22142 ac_status=$?
22143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22144 (exit $ac_status); }; } &&
22145 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 22146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22147 (eval $ac_try) 2>&5
22148 ac_status=$?
c0d27fcc 22149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22150 (exit $ac_status); }; }; then
22151 eval "$as_ac_var=yes"
22152else
22153 echo "$as_me: failed program was:" >&5
19650fd6
AS
22154sed 's/^/| /' conftest.$ac_ext >&5
22155
503d2be0
AS
22156eval "$as_ac_var=no"
22157fi
edfaf76d
LK
22158rm -f conftest.err conftest.$ac_objext \
22159 conftest$ac_exeext conftest.$ac_ext
503d2be0 22160fi
c0d27fcc 22161echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
22162echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22163if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22164 cat >>confdefs.h <<_ACEOF
503d2be0 22165#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22166_ACEOF
503d2be0 22167
fa0b693c 22168fi
503d2be0 22169done
fa0b693c 22170
503d2be0 22171if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 22172 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
22173echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22174if test "${ac_cv_func_fork_works+set}" = set; then
22175 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22176else
503d2be0
AS
22177 if test "$cross_compiling" = yes; then
22178 ac_cv_func_fork_works=cross
22179else
22180 cat >conftest.$ac_ext <<_ACEOF
01abe918
CY
22181/* By Ruediger Kuhlmann. */
22182 #include <sys/types.h>
22183 #if HAVE_UNISTD_H
22184 # include <unistd.h>
22185 #endif
22186 /* Some systems only have a dummy stub for fork() */
22187 int main ()
22188 {
22189 if (fork() < 0)
22190 exit (1);
22191 exit (0);
22192 }
503d2be0
AS
22193_ACEOF
22194rm -f conftest$ac_exeext
c0d27fcc 22195if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
22196 (eval $ac_link) 2>&5
22197 ac_status=$?
c0d27fcc 22198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22199 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 22200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22201 (eval $ac_try) 2>&5
22202 ac_status=$?
c0d27fcc 22203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22204 (exit $ac_status); }; }; then
22205 ac_cv_func_fork_works=yes
22206else
22207 echo "$as_me: program exited with status $ac_status" >&5
22208echo "$as_me: failed program was:" >&5
19650fd6
AS
22209sed 's/^/| /' conftest.$ac_ext >&5
22210
c0d27fcc 22211( exit $ac_status )
503d2be0
AS
22212ac_cv_func_fork_works=no
22213fi
edfaf76d 22214rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
22215fi
22216fi
c0d27fcc 22217echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
22218echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22219
6bae0ccf
DL
22220else
22221 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
22222fi
22223if test "x$ac_cv_func_fork_works" = xcross; then
22224 case $host in
22225 *-*-amigaos* | *-*-msdosdjgpp*)
22226 # Override, as these systems have only a dummy fork() stub
22227 ac_cv_func_fork_works=no
22228 ;;
22229 *)
22230 ac_cv_func_fork_works=yes
22231 ;;
22232 esac
c0d27fcc
MR
22233 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
22234echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 22235fi
73b77ee5 22236ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 22237if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 22238 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
22239echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22240if test "${ac_cv_func_vfork_works+set}" = set; then
22241 echo $ECHO_N "(cached) $ECHO_C" >&6
22242else
22243 if test "$cross_compiling" = yes; then
22244 ac_cv_func_vfork_works=cross
fa0b693c 22245else
503d2be0 22246 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22247/* confdefs.h. */
22248_ACEOF
22249cat confdefs.h >>conftest.$ac_ext
22250cat >>conftest.$ac_ext <<_ACEOF
22251/* end confdefs.h. */
73b77ee5
GM
22252/* Thanks to Paul Eggert for this test. */
22253#include <stdio.h>
19650fd6 22254#include <stdlib.h>
fa0b693c 22255#include <sys/types.h>
73b77ee5 22256#include <sys/stat.h>
19650fd6 22257#include <sys/wait.h>
503d2be0
AS
22258#if HAVE_UNISTD_H
22259# include <unistd.h>
73b77ee5 22260#endif
503d2be0
AS
22261#if HAVE_VFORK_H
22262# include <vfork.h>
73b77ee5
GM
22263#endif
22264/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
22265 argument registers are propagated back to the parent. The compiler
22266 is told about this with #include <vfork.h>, but some compilers
22267 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
22268 static variable whose address is put into a register that is
22269 clobbered by the vfork. */
19650fd6 22270static void
fa0b693c 22271#ifdef __cplusplus
73b77ee5 22272sparc_address_test (int arg)
503d2be0 22273# else
73b77ee5 22274sparc_address_test (arg) int arg;
fa0b693c 22275#endif
fa0b693c 22276{
73b77ee5
GM
22277 static pid_t child;
22278 if (!child) {
22279 child = vfork ();
22280 if (child < 0) {
22281 perror ("vfork");
22282 _exit(2);
22283 }
22284 if (!child) {
22285 arg = getpid();
22286 write(-1, "", 0);
22287 _exit (arg);
22288 }
22289 }
22290}
503d2be0
AS
22291
22292int
22293main ()
22294{
73b77ee5
GM
22295 pid_t parent = getpid ();
22296 pid_t child;
fa0b693c 22297
19650fd6 22298 sparc_address_test (0);
fa0b693c 22299
73b77ee5 22300 child = vfork ();
fa0b693c 22301
73b77ee5 22302 if (child == 0) {
503d2be0
AS
22303 /* Here is another test for sparc vfork register problems. This
22304 test uses lots of local variables, at least as many local
22305 variables as main has allocated so far including compiler
22306 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
22307 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
22308 reuse the register of parent for one of the local variables,
22309 since it will think that parent can't possibly be used any more
22310 in this routine. Assigning to the local variable will thus
22311 munge parent in the parent process. */
73b77ee5
GM
22312 pid_t
22313 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22314 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22315 /* Convince the compiler that p..p7 are live; otherwise, it might
22316 use the same hardware register for all 8 local variables. */
22317 if (p != p1 || p != p2 || p != p3 || p != p4
22318 || p != p5 || p != p6 || p != p7)
22319 _exit(1);
fa0b693c 22320
503d2be0
AS
22321 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22322 from child file descriptors. If the child closes a descriptor
22323 before it execs or exits, this munges the parent's descriptor
22324 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
22325 _exit(close(fileno(stdout)) != 0);
22326 } else {
22327 int status;
22328 struct stat st;
22329
22330 while (wait(&status) != child)
22331 ;
22332 exit(
22333 /* Was there some problem with vforking? */
22334 child < 0
22335
22336 /* Did the child fail? (This shouldn't happen.) */
22337 || status
22338
22339 /* Did the vfork/compiler bug occur? */
22340 || parent != getpid()
fa0b693c 22341
73b77ee5
GM
22342 /* Did the file descriptor bug occur? */
22343 || fstat(fileno(stdout), &st) != 0
22344 );
22345 }
22346}
503d2be0
AS
22347_ACEOF
22348rm -f conftest$ac_exeext
c0d27fcc 22349if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
22350 (eval $ac_link) 2>&5
22351 ac_status=$?
c0d27fcc 22352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22353 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 22354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22355 (eval $ac_try) 2>&5
22356 ac_status=$?
c0d27fcc 22357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22358 (exit $ac_status); }; }; then
73b77ee5 22359 ac_cv_func_vfork_works=yes
fa0b693c 22360else
503d2be0
AS
22361 echo "$as_me: program exited with status $ac_status" >&5
22362echo "$as_me: failed program was:" >&5
19650fd6
AS
22363sed 's/^/| /' conftest.$ac_ext >&5
22364
c0d27fcc 22365( exit $ac_status )
503d2be0
AS
22366ac_cv_func_vfork_works=no
22367fi
edfaf76d 22368rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 22369fi
fa0b693c 22370fi
c0d27fcc 22371echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 22372echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 22373
503d2be0
AS
22374fi;
22375if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 22376 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
22377 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
22378echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
22379fi
22380
503d2be0
AS
22381if test "x$ac_cv_func_vfork_works" = xyes; then
22382
c0d27fcc 22383cat >>confdefs.h <<\_ACEOF
503d2be0 22384#define HAVE_WORKING_VFORK 1
c0d27fcc 22385_ACEOF
503d2be0
AS
22386
22387else
22388
c0d27fcc 22389cat >>confdefs.h <<\_ACEOF
73b77ee5 22390#define vfork fork
c0d27fcc 22391_ACEOF
fa0b693c
GM
22392
22393fi
503d2be0
AS
22394if test "x$ac_cv_func_fork_works" = xyes; then
22395
c0d27fcc 22396cat >>confdefs.h <<\_ACEOF
503d2be0 22397#define HAVE_WORKING_FORK 1
c0d27fcc 22398_ACEOF
fa0b693c 22399
503d2be0 22400fi
647847ea 22401
c0d27fcc 22402
6a3a24fa
JD
22403echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
22404echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
22405if test "${emacs_cv_langinfo_codeset+set}" = set; then
22406 echo $ECHO_N "(cached) $ECHO_C" >&6
22407else
22408 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22409/* confdefs.h. */
22410_ACEOF
22411cat confdefs.h >>conftest.$ac_ext
22412cat >>conftest.$ac_ext <<_ACEOF
22413/* end confdefs.h. */
6a3a24fa
JD
22414#include <langinfo.h>
22415int
22416main ()
22417{
22418char* cs = nl_langinfo(CODESET);
22419 ;
22420 return 0;
22421}
22422_ACEOF
22423rm -f conftest.$ac_objext conftest$ac_exeext
22424if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 22425 (eval $ac_link) 2>conftest.er1
6a3a24fa 22426 ac_status=$?
edfaf76d
LK
22427 grep -v '^ *+' conftest.er1 >conftest.err
22428 rm -f conftest.er1
22429 cat conftest.err >&5
6a3a24fa
JD
22430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22431 (exit $ac_status); } &&
e143ad11
AS
22432 { ac_try='test -z "$ac_c_werror_flag"
22433 || test ! -s conftest.err'
edfaf76d
LK
22434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22435 (eval $ac_try) 2>&5
22436 ac_status=$?
22437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22438 (exit $ac_status); }; } &&
22439 { ac_try='test -s conftest$ac_exeext'
6a3a24fa
JD
22440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22441 (eval $ac_try) 2>&5
22442 ac_status=$?
22443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22444 (exit $ac_status); }; }; then
22445 emacs_cv_langinfo_codeset=yes
22446else
22447 echo "$as_me: failed program was:" >&5
19650fd6
AS
22448sed 's/^/| /' conftest.$ac_ext >&5
22449
6a3a24fa
JD
22450emacs_cv_langinfo_codeset=no
22451fi
edfaf76d
LK
22452rm -f conftest.err conftest.$ac_objext \
22453 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
22454
22455fi
22456echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
22457echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
22458if test $emacs_cv_langinfo_codeset = yes; then
22459
22460cat >>confdefs.h <<\_ACEOF
22461#define HAVE_LANGINFO_CODESET 1
22462_ACEOF
22463
22464fi
22465
c0d27fcc 22466echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
22467echo $ECHO_N "checking for size_t... $ECHO_C" >&6
22468if test "${ac_cv_type_size_t+set}" = set; then
22469 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 22470else
503d2be0 22471 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22472/* confdefs.h. */
22473_ACEOF
22474cat confdefs.h >>conftest.$ac_ext
22475cat >>conftest.$ac_ext <<_ACEOF
22476/* end confdefs.h. */
503d2be0
AS
22477$ac_includes_default
22478int
22479main ()
22480{
22481if ((size_t *) 0)
22482 return 0;
22483if (sizeof (size_t))
22484 return 0;
22485 ;
22486 return 0;
22487}
22488_ACEOF
22489rm -f conftest.$ac_objext
c0d27fcc 22490if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22491 (eval $ac_compile) 2>conftest.er1
503d2be0 22492 ac_status=$?
edfaf76d
LK
22493 grep -v '^ *+' conftest.er1 >conftest.err
22494 rm -f conftest.er1
22495 cat conftest.err >&5
c0d27fcc 22496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22497 (exit $ac_status); } &&
e143ad11
AS
22498 { ac_try='test -z "$ac_c_werror_flag"
22499 || test ! -s conftest.err'
edfaf76d
LK
22500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22501 (eval $ac_try) 2>&5
22502 ac_status=$?
22503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22504 (exit $ac_status); }; } &&
22505 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 22506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22507 (eval $ac_try) 2>&5
22508 ac_status=$?
c0d27fcc 22509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22510 (exit $ac_status); }; }; then
8730a8da
DL
22511 ac_cv_type_size_t=yes
22512else
503d2be0 22513 echo "$as_me: failed program was:" >&5
19650fd6
AS
22514sed 's/^/| /' conftest.$ac_ext >&5
22515
503d2be0 22516ac_cv_type_size_t=no
8730a8da 22517fi
edfaf76d 22518rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 22519fi
c0d27fcc 22520echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
22521echo "${ECHO_T}$ac_cv_type_size_t" >&6
22522if test $ac_cv_type_size_t = yes; then
503d2be0 22523
c0d27fcc
MR
22524cat >>confdefs.h <<_ACEOF
22525#define HAVE_SIZE_T 1
22526_ACEOF
22527
8730a8da
DL
22528
22529fi
22530
c0d27fcc 22531
973a76b1
DL
22532echo "$as_me:$LINENO: checking for mbstate_t" >&5
22533echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
22534if test "${ac_cv_type_mbstate_t+set}" = set; then
22535 echo $ECHO_N "(cached) $ECHO_C" >&6
22536else
22537 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22538/* confdefs.h. */
22539_ACEOF
22540cat confdefs.h >>conftest.$ac_ext
22541cat >>conftest.$ac_ext <<_ACEOF
22542/* end confdefs.h. */
973a76b1
DL
22543$ac_includes_default
22544# include <wchar.h>
22545int
22546main ()
22547{
22548mbstate_t x; return sizeof x;
22549 ;
22550 return 0;
22551}
22552_ACEOF
22553rm -f conftest.$ac_objext
22554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22555 (eval $ac_compile) 2>conftest.er1
973a76b1 22556 ac_status=$?
edfaf76d
LK
22557 grep -v '^ *+' conftest.er1 >conftest.err
22558 rm -f conftest.er1
22559 cat conftest.err >&5
973a76b1
DL
22560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22561 (exit $ac_status); } &&
e143ad11
AS
22562 { ac_try='test -z "$ac_c_werror_flag"
22563 || test ! -s conftest.err'
edfaf76d
LK
22564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22565 (eval $ac_try) 2>&5
22566 ac_status=$?
22567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22568 (exit $ac_status); }; } &&
22569 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
22570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22571 (eval $ac_try) 2>&5
22572 ac_status=$?
22573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22574 (exit $ac_status); }; }; then
22575 ac_cv_type_mbstate_t=yes
22576else
22577 echo "$as_me: failed program was:" >&5
19650fd6
AS
22578sed 's/^/| /' conftest.$ac_ext >&5
22579
973a76b1
DL
22580ac_cv_type_mbstate_t=no
22581fi
edfaf76d 22582rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
22583fi
22584echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
22585echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
22586 if test $ac_cv_type_mbstate_t = yes; then
22587
22588cat >>confdefs.h <<\_ACEOF
22589#define HAVE_MBSTATE_T 1
22590_ACEOF
22591
22592 else
22593
22594cat >>confdefs.h <<\_ACEOF
22595#define mbstate_t int
22596_ACEOF
22597
22598 fi
22599
22044edf
DL
22600echo "$as_me:$LINENO: checking for C restrict keyword" >&5
22601echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
22602if test "${emacs_cv_c_restrict+set}" = set; then
22603 echo $ECHO_N "(cached) $ECHO_C" >&6
22604else
22605 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22606/* confdefs.h. */
22607_ACEOF
22608cat confdefs.h >>conftest.$ac_ext
22609cat >>conftest.$ac_ext <<_ACEOF
22610/* end confdefs.h. */
22044edf
DL
22611void fred (int *restrict x);
22612int
22613main ()
22614{
b936fae4 22615
22044edf
DL
22616 ;
22617 return 0;
22618}
c0d27fcc 22619_ACEOF
22044edf
DL
22620rm -f conftest.$ac_objext
22621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22622 (eval $ac_compile) 2>conftest.er1
22044edf 22623 ac_status=$?
edfaf76d
LK
22624 grep -v '^ *+' conftest.er1 >conftest.err
22625 rm -f conftest.er1
22626 cat conftest.err >&5
22044edf
DL
22627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22628 (exit $ac_status); } &&
e143ad11
AS
22629 { ac_try='test -z "$ac_c_werror_flag"
22630 || test ! -s conftest.err'
edfaf76d
LK
22631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22632 (eval $ac_try) 2>&5
22633 ac_status=$?
22634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22635 (exit $ac_status); }; } &&
22636 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
22637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22638 (eval $ac_try) 2>&5
22639 ac_status=$?
22640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22641 (exit $ac_status); }; }; then
22642 emacs_cv_c_restrict=yes
22643else
22644 echo "$as_me: failed program was:" >&5
19650fd6
AS
22645sed 's/^/| /' conftest.$ac_ext >&5
22646
22044edf 22647cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22648/* confdefs.h. */
22649_ACEOF
22650cat confdefs.h >>conftest.$ac_ext
22651cat >>conftest.$ac_ext <<_ACEOF
22652/* end confdefs.h. */
22044edf
DL
22653void fred (int *__restrict x);
22654int
22655main ()
22656{
c0d27fcc 22657
22044edf
DL
22658 ;
22659 return 0;
22660}
c0d27fcc 22661_ACEOF
22044edf
DL
22662rm -f conftest.$ac_objext
22663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22664 (eval $ac_compile) 2>conftest.er1
22044edf 22665 ac_status=$?
edfaf76d
LK
22666 grep -v '^ *+' conftest.er1 >conftest.err
22667 rm -f conftest.er1
22668 cat conftest.err >&5
22044edf
DL
22669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22670 (exit $ac_status); } &&
e143ad11
AS
22671 { ac_try='test -z "$ac_c_werror_flag"
22672 || test ! -s conftest.err'
edfaf76d
LK
22673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22674 (eval $ac_try) 2>&5
22675 ac_status=$?
22676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22677 (exit $ac_status); }; } &&
22678 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
22679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22680 (eval $ac_try) 2>&5
22681 ac_status=$?
22682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22683 (exit $ac_status); }; }; then
22684 emacs_cv_c_restrict=__restrict
22685else
22686 echo "$as_me: failed program was:" >&5
19650fd6
AS
22687sed 's/^/| /' conftest.$ac_ext >&5
22688
22044edf 22689emacs_cv_c_restrict=no
ba4481b5 22690fi
edfaf76d 22691rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22692fi
edfaf76d 22693rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22694fi
22044edf
DL
22695echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
22696echo "${ECHO_T}$emacs_cv_c_restrict" >&6
22697case "$emacs_cv_c_restrict" in
22698 yes) emacs_restrict=restrict;;
22699 no) emacs_restrict="";;
22700 *) emacs_restrict="$emacs_cv_c_restrict";;
22701esac
22702if test "$emacs_restrict" != __restrict; then
b936fae4 22703
22044edf
DL
22704cat >>confdefs.h <<_ACEOF
22705#define __restrict $emacs_restrict
c0d27fcc 22706_ACEOF
ba4481b5
DL
22707
22708fi
ba4481b5 22709
22044edf
DL
22710echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
22711echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
22712if test "${emacs_cv_c_restrict_arr+set}" = set; then
22713 echo $ECHO_N "(cached) $ECHO_C" >&6
22714else
22715 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22716/* confdefs.h. */
22717_ACEOF
22718cat confdefs.h >>conftest.$ac_ext
22719cat >>conftest.$ac_ext <<_ACEOF
22720/* end confdefs.h. */
22044edf
DL
22721void fred (int x[__restrict]);
22722int
22723main ()
22724{
b936fae4 22725
22044edf
DL
22726 ;
22727 return 0;
22728}
c0d27fcc 22729_ACEOF
22044edf
DL
22730rm -f conftest.$ac_objext
22731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22732 (eval $ac_compile) 2>conftest.er1
22044edf 22733 ac_status=$?
edfaf76d
LK
22734 grep -v '^ *+' conftest.er1 >conftest.err
22735 rm -f conftest.er1
22736 cat conftest.err >&5
22044edf
DL
22737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22738 (exit $ac_status); } &&
e143ad11
AS
22739 { ac_try='test -z "$ac_c_werror_flag"
22740 || test ! -s conftest.err'
edfaf76d
LK
22741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22742 (eval $ac_try) 2>&5
22743 ac_status=$?
22744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22745 (exit $ac_status); }; } &&
22746 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
22747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22748 (eval $ac_try) 2>&5
22749 ac_status=$?
22750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22751 (exit $ac_status); }; }; then
22752 emacs_cv_c_restrict_arr=yes
22753else
22754 echo "$as_me: failed program was:" >&5
19650fd6
AS
22755sed 's/^/| /' conftest.$ac_ext >&5
22756
22044edf 22757emacs_cv_c_restrict_arr=no
ba4481b5 22758fi
edfaf76d 22759rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf
DL
22760fi
22761echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
22762echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
22763if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 22764
c0d27fcc 22765cat >>confdefs.h <<\_ACEOF
22044edf 22766#define __restrict_arr __restrict
c0d27fcc 22767_ACEOF
ba4481b5 22768
ba4481b5
DL
22769fi
22770
c0d27fcc 22771
c0d27fcc 22772
22044edf
DL
22773# Set up the CFLAGS for real compilation, so we can substitute it.
22774CFLAGS="$REAL_CFLAGS"
22775CPPFLAGS="$REAL_CPPFLAGS"
22776
22777#### Find out which version of Emacs this is.
22778version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
22779 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
22780if test x"${version}" = x; then
22781 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
22782echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
22783 { (exit 1); exit 1; }; }
22784fi
22785
22786### Specify what sort of things we'll be editing into Makefile and config.h.
22787### Use configuration here uncanonicalized to avoid exceeding size limits.
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
22817
22818
22819
6a3a24fa 22820
22044edf
DL
22821
22822
22823cat >>confdefs.h <<_ACEOF
22824#define EMACS_CONFIGURATION "${canonical}"
22825_ACEOF
22826
22827
22828cat >>confdefs.h <<_ACEOF
22829#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
22830_ACEOF
22831
22832
22833cat >>confdefs.h <<_ACEOF
22834#define config_machfile "${machfile}"
22835_ACEOF
22836
22837
22838cat >>confdefs.h <<_ACEOF
22839#define config_opsysfile "${opsysfile}"
22840_ACEOF
22841
22842
22843cat >>confdefs.h <<_ACEOF
22844#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
22845_ACEOF
22846
22847
22848cat >>confdefs.h <<_ACEOF
22849#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
22850_ACEOF
22851
22852
22853cat >>confdefs.h <<_ACEOF
22854#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
22855_ACEOF
22856
22857
22858cat >>confdefs.h <<_ACEOF
22859#define UNEXEC_SRC ${UNEXEC_SRC}
22860_ACEOF
22861
22862
22863if test "${HAVE_X_WINDOWS}" = "yes" ; then
22864
22865cat >>confdefs.h <<\_ACEOF
22866#define HAVE_X_WINDOWS 1
22867_ACEOF
22868
22869fi
22870if test "${USE_X_TOOLKIT}" != "none" ; then
22871
22872cat >>confdefs.h <<\_ACEOF
22873#define USE_X_TOOLKIT 1
22874_ACEOF
22875
22876fi
22877if test "${HAVE_X11}" = "yes" ; then
22878
22879cat >>confdefs.h <<\_ACEOF
22880#define HAVE_X11 1
22881_ACEOF
22882
22883fi
22884if test "${HAVE_XFREE386}" = "yes" ; then
22885
22886cat >>confdefs.h <<\_ACEOF
22887#define HAVE_XFREE386 1
22888_ACEOF
22889
22890fi
22891if test "${HAVE_MENUS}" = "yes" ; then
22892
22893cat >>confdefs.h <<\_ACEOF
22894#define HAVE_MENUS 1
22895_ACEOF
22896
22897fi
22898if test "${GNU_MALLOC}" = "yes" ; then
22899
22900cat >>confdefs.h <<\_ACEOF
22901#define GNU_MALLOC 1
22902_ACEOF
22903
22904fi
22905if test "${REL_ALLOC}" = "yes" ; then
22906
22907cat >>confdefs.h <<\_ACEOF
22908#define REL_ALLOC 1
22909_ACEOF
22910
22911fi
22912
22913
22914
c0d27fcc
MR
22915
22916
ba4481b5 22917#### Report on what we decided to do.
488dd4c4
JD
22918#### Report GTK as a toolkit, even if it doesn't use Xt.
22919#### It makes printing result more understandable as using GTK sets
22920#### toolkit_scroll_bars to yes by default.
22921if test "${HAVE_GTK}" = "yes"; then
22922 USE_X_TOOLKIT=GTK
22923fi
22924
ba4481b5
DL
22925echo "
22926Configured for \`${canonical}'.
22927
22928 Where should the build process find the source code? ${srcdir}
22929 What operating system and machine description files should Emacs use?
22930 \`${opsysfile}' and \`${machfile}'
22931 What compiler should emacs be built with? ${CC} ${CFLAGS}
22932 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 22933 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 22934 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 22935 What window system should Emacs use? ${window_system}
8e967cf7 22936 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
22937
22938if test -n "${x_includes}"; then
22939echo " Where do we find X Windows header files? ${x_includes}"
22940else
22941echo " Where do we find X Windows header files? Standard dirs"
22942fi
22943if test -n "${x_libraries}"; then
22944echo " Where do we find X Windows libraries? ${x_libraries}"
22945else
22946echo " Where do we find X Windows libraries? Standard dirs"
22947fi
22948
22949echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
22950echo " Does Emacs use -lXpm? ${HAVE_XPM}"
22951echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
22952echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
22953echo " Does Emacs use -lungif? ${HAVE_GIF}"
22954echo " Does Emacs use -lpng? ${HAVE_PNG}"
22955echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
22956echo
22957
d0098f13
JD
22958if test $USE_XASSERTS = yes; then
22959 echo " Compiling with asserts turned on."
d0098f13
JD
22960 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
22961 echo
22962fi
05cf15c6 22963
05cf15c6 22964
05cf15c6 22965
ba4481b5
DL
22966# Remove any trailing slashes in these variables.
22967test "${prefix}" != NONE &&
22968 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
22969test "${exec_prefix}" != NONE &&
22970 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
22971
d0e9bfd2
GM
22972## Check if the C preprocessor will convert `..' to `. .'. If so, set
22973## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
22974## from Makefile.c can correctly provide the arg `-traditional' to the
22975## C preprocessor.
22976
503d2be0 22977cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22978/* confdefs.h. */
22979_ACEOF
22980cat confdefs.h >>conftest.$ac_ext
22981cat >>conftest.$ac_ext <<_ACEOF
22982/* end confdefs.h. */
d0e9bfd2 22983yes..yes
503d2be0 22984_ACEOF
d0e9bfd2 22985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 22986 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
22987 CPP_NEED_TRADITIONAL=no
22988else
d0e9bfd2
GM
22989 CPP_NEED_TRADITIONAL=yes
22990fi
22991rm -f conftest*
22992
c0d27fcc 22993
6bae0ccf
DL
22994 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"
22995 ac_config_commands="$ac_config_commands default"
503d2be0 22996cat >confcache <<\_ACEOF
ba4481b5
DL
22997# This file is a shell script that caches the results of configure
22998# tests run on this system so they can be shared between configure
503d2be0
AS
22999# scripts and configure runs, see configure's option --config-cache.
23000# It is not useful on other systems. If it contains results you don't
23001# want to keep, you may remove or edit it.
ba4481b5 23002#
503d2be0
AS
23003# config.status only pays attention to the cache file if you give it
23004# the --recheck option to rerun configure.
ba4481b5 23005#
6bae0ccf 23006# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
23007# loading this file, other *unset* `ac_cv_foo' will be assigned the
23008# following values.
23009
23010_ACEOF
23011
ba4481b5
DL
23012# The following way of writing the cache mishandles newlines in values,
23013# but we know of no workaround that is simple, portable, and efficient.
23014# So, don't put newlines in cache variables' values.
23015# Ultrix sh set writes to stderr and can't be redirected directly,
23016# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
23017{
23018 (set) 2>&1 |
23019 case `(ac_space=' '; set | grep ac_space) 2>&1` in
23020 *ac_space=\ *)
23021 # `set' does not quote correctly, so add quotes (double-quote
23022 # substitution turns \\\\ into \\, and sed turns \\ into \).
23023 sed -n \
edfaf76d
LK
23024 "s/'/'\\\\''/g;
23025 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
503d2be0
AS
23026 ;;
23027 *)
23028 # `set' quotes correctly as required by POSIX, so do not add quotes.
23029 sed -n \
edfaf76d 23030 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
23031 ;;
23032 esac;
23033} |
23034 sed '
23035 t clear
23036 : clear
23037 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23038 t end
23039 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23040 : end' >>confcache
19650fd6 23041if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 23042 if test -w $cache_file; then
503d2be0
AS
23043 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23044 cat confcache >$cache_file
ba4481b5
DL
23045 else
23046 echo "not updating unwritable cache $cache_file"
23047 fi
23048fi
23049rm -f confcache
23050
ba4481b5
DL
23051test "x$prefix" = xNONE && prefix=$ac_default_prefix
23052# Let make expand exec_prefix.
23053test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23054
503d2be0
AS
23055# VPATH may cause trouble with some makes, so we remove $(srcdir),
23056# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23057# trailing colons and then remove the whole line if VPATH becomes empty
23058# (actually we leave an empty line to preserve line numbers).
ba4481b5 23059if test "x$srcdir" = x.; then
edfaf76d 23060 ac_vpsub='/^[ ]*VPATH[ ]*=/{
503d2be0
AS
23061s/:*\$(srcdir):*/:/;
23062s/:*\${srcdir}:*/:/;
23063s/:*@srcdir@:*/:/;
edfaf76d 23064s/^\([^=]*=[ ]*\):*/\1/;
503d2be0 23065s/:*$//;
edfaf76d 23066s/^[^=]*=[ ]*$//;
503d2be0 23067}'
ba4481b5
DL
23068fi
23069
ba4481b5
DL
23070DEFS=-DHAVE_CONFIG_H
23071
6bae0ccf
DL
23072ac_libobjs=
23073ac_ltlibobjs=
23074for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23075 # 1. Remove the extension, and $U if already installed.
23076 ac_i=`echo "$ac_i" |
edfaf76d 23077 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6bae0ccf
DL
23078 # 2. Add them.
23079 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
23080 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
23081done
23082LIBOBJS=$ac_libobjs
23083
23084LTLIBOBJS=$ac_ltlibobjs
23085
23086
c0d27fcc 23087
ba4481b5 23088: ${CONFIG_STATUS=./config.status}
503d2be0
AS
23089ac_clean_files_save=$ac_clean_files
23090ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 23091{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
23092echo "$as_me: creating $CONFIG_STATUS" >&6;}
23093cat >$CONFIG_STATUS <<_ACEOF
23094#! $SHELL
c0d27fcc 23095# Generated by $as_me.
ba4481b5 23096# Run this file to recreate the current configuration.
ba4481b5 23097# Compiler output produced by configure, useful for debugging
503d2be0 23098# configure, is in config.log if it exists.
ba4481b5 23099
503d2be0 23100debug=false
19650fd6
AS
23101ac_cs_recheck=false
23102ac_cs_silent=false
503d2be0 23103SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
23104_ACEOF
23105
23106cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
23107## --------------------- ##
23108## M4sh Initialization. ##
23109## --------------------- ##
23110
503d2be0
AS
23111# Be Bourne compatible
23112if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23113 emulate sh
23114 NULLCMD=:
6bae0ccf
DL
23115 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23116 # is contrary to our usage. Disable this feature.
23117 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
23118elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23119 set -o posix
23120fi
edfaf76d 23121DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 23122
c0d27fcc 23123# Support unset when possible.
edfaf76d 23124if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
23125 as_unset=unset
23126else
23127 as_unset=false
23128fi
23129
6bae0ccf
DL
23130
23131# Work around bugs in pre-3.0 UWIN ksh.
23132$as_unset ENV MAIL MAILPATH
23133PS1='$ '
23134PS2='> '
23135PS4='+ '
23136
23137# NLS nuisances.
19650fd6
AS
23138for as_var in \
23139 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23140 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23141 LC_TELEPHONE LC_TIME
6bae0ccf 23142do
edfaf76d 23143 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
23144 eval $as_var=C; export $as_var
23145 else
23146 $as_unset $as_var
23147 fi
23148done
23149
23150# Required to use basename.
23151if expr a : '\(a\)' >/dev/null 2>&1; then
23152 as_expr=expr
23153else
23154 as_expr=false
23155fi
23156
23157if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
23158 as_basename=basename
23159else
23160 as_basename=false
23161fi
c0d27fcc
MR
23162
23163
503d2be0 23164# Name of the executable.
6bae0ccf 23165as_me=`$as_basename "$0" ||
c0d27fcc
MR
23166$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23167 X"$0" : 'X\(//\)$' \| \
23168 X"$0" : 'X\(/\)$' \| \
23169 . : '\(.\)' 2>/dev/null ||
23170echo X/"$0" |
23171 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
23172 /^X\/\(\/\/\)$/{ s//\1/; q; }
23173 /^X\/\(\/\).*/{ s//\1/; q; }
23174 s/.*/./; q'`
23175
6bae0ccf 23176
c0d27fcc
MR
23177# PATH needs CR, and LINENO needs CR and PATH.
23178# Avoid depending upon Character Ranges.
23179as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23180as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23181as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23182as_cr_digits='0123456789'
23183as_cr_alnum=$as_cr_Letters$as_cr_digits
23184
23185# The user is always right.
23186if test "${PATH_SEPARATOR+set}" != set; then
19650fd6
AS
23187 echo "#! /bin/sh" >conf$$.sh
23188 echo "exit 0" >>conf$$.sh
23189 chmod +x conf$$.sh
23190 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
23191 PATH_SEPARATOR=';'
23192 else
23193 PATH_SEPARATOR=:
23194 fi
19650fd6 23195 rm -f conf$$.sh
c0d27fcc
MR
23196fi
23197
23198
23199 as_lineno_1=$LINENO
23200 as_lineno_2=$LINENO
23201 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23202 test "x$as_lineno_1" != "x$as_lineno_2" &&
23203 test "x$as_lineno_3" = "x$as_lineno_2" || {
23204 # Find who we are. Look in the path if we contain no path at all
23205 # relative or not.
23206 case $0 in
23207 *[\\/]* ) as_myself=$0 ;;
23208 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23209for as_dir in $PATH
23210do
23211 IFS=$as_save_IFS
23212 test -z "$as_dir" && as_dir=.
23213 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23214done
23215
23216 ;;
23217 esac
23218 # We did not find ourselves, most probably we were run as `sh COMMAND'
23219 # in which case we are not to be found in the path.
23220 if test "x$as_myself" = x; then
23221 as_myself=$0
23222 fi
23223 if test ! -f "$as_myself"; then
23224 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
23225echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
23226 { (exit 1); exit 1; }; }
23227 fi
23228 case $CONFIG_SHELL in
23229 '')
23230 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23231for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
23232do
23233 IFS=$as_save_IFS
23234 test -z "$as_dir" && as_dir=.
23235 for as_base in sh bash ksh sh5; do
23236 case $as_dir in
23237 /*)
23238 if ("$as_dir/$as_base" -c '
23239 as_lineno_1=$LINENO
23240 as_lineno_2=$LINENO
23241 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23242 test "x$as_lineno_1" != "x$as_lineno_2" &&
23243 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
23244 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
23245 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
23246 CONFIG_SHELL=$as_dir/$as_base
23247 export CONFIG_SHELL
23248 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
23249 fi;;
23250 esac
23251 done
23252done
23253;;
23254 esac
23255
23256 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23257 # uniformly replaced by the line number. The first 'sed' inserts a
23258 # line-number line before each line; the second 'sed' does the real
23259 # work. The second script uses 'N' to pair each line-number line
23260 # with the numbered line, and appends trailing '-' during
23261 # substitution so that $LINENO is not a special case at line end.
23262 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
23263 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
23264 sed '=' <$as_myself |
23265 sed '
23266 N
23267 s,$,-,
23268 : loop
23269 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
23270 t loop
23271 s,-$,,
23272 s,^['$as_cr_digits']*\n,,
23273 ' >$as_me.lineno &&
23274 chmod +x $as_me.lineno ||
23275 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23276echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
23277 { (exit 1); exit 1; }; }
23278
23279 # Don't try to exec as it changes $[0], causing all sort of problems
23280 # (the dirname of $[0] is not the place where we might find the
23281 # original and so on. Autoconf is especially sensible to this).
23282 . ./$as_me.lineno
23283 # Exit status is that of the last command.
23284 exit
23285}
23286
23287
23288case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23289 *c*,-n*) ECHO_N= ECHO_C='
23290' ECHO_T=' ' ;;
23291 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23292 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
23293esac
503d2be0
AS
23294
23295if expr a : '\(a\)' >/dev/null 2>&1; then
23296 as_expr=expr
23297else
23298 as_expr=false
23299fi
23300
23301rm -f conf$$ conf$$.exe conf$$.file
23302echo >conf$$.file
23303if ln -s conf$$.file conf$$ 2>/dev/null; then
23304 # We could just check for DJGPP; but this test a) works b) is more generic
23305 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23306 if test -f conf$$.exe; then
23307 # Don't use ln at all; we don't have any links
23308 as_ln_s='cp -p'
23309 else
23310 as_ln_s='ln -s'
23311 fi
23312elif ln conf$$.file conf$$ 2>/dev/null; then
23313 as_ln_s=ln
23314else
23315 as_ln_s='cp -p'
23316fi
23317rm -f conf$$ conf$$.exe conf$$.file
23318
6bae0ccf
DL
23319if mkdir -p . 2>/dev/null; then
23320 as_mkdir_p=:
23321else
edfaf76d 23322 test -d ./-p && rmdir ./-p
6bae0ccf
DL
23323 as_mkdir_p=false
23324fi
23325
503d2be0
AS
23326as_executable_p="test -f"
23327
c0d27fcc 23328# Sed expression to map a string onto a valid CPP name.
edfaf76d 23329as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
23330
23331# Sed expression to map a string onto a valid variable name.
edfaf76d 23332as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 23333
503d2be0
AS
23334
23335# IFS
23336# We need space, tab and new line, in precisely that order.
23337as_nl='
23338'
23339IFS=" $as_nl"
23340
23341# CDPATH.
6bae0ccf 23342$as_unset CDPATH
503d2be0
AS
23343
23344exec 6>&1
23345
c0d27fcc
MR
23346# Open the log real soon, to keep \$[0] and so on meaningful, and to
23347# report actual input values of CONFIG_FILES etc. instead of their
23348# values after options handling. Logging --version etc. is OK.
23349exec 5>>config.log
23350{
23351 echo
23352 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23353## Running $as_me. ##
23354_ASBOX
23355} >&5
23356cat >&5 <<_CSEOF
23357
23358This file was extended by $as_me, which was
edfaf76d 23359generated by GNU Autoconf 2.59. Invocation command line was
c0d27fcc
MR
23360
23361 CONFIG_FILES = $CONFIG_FILES
23362 CONFIG_HEADERS = $CONFIG_HEADERS
23363 CONFIG_LINKS = $CONFIG_LINKS
23364 CONFIG_COMMANDS = $CONFIG_COMMANDS
23365 $ $0 $@
23366
23367_CSEOF
23368echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23369echo >&5
503d2be0
AS
23370_ACEOF
23371
23372# Files that config.status was made for.
23373if test -n "$ac_config_files"; then
23374 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23375fi
23376
23377if test -n "$ac_config_headers"; then
23378 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23379fi
23380
23381if test -n "$ac_config_links"; then
23382 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23383fi
23384
23385if test -n "$ac_config_commands"; then
23386 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23387fi
23388
c0d27fcc 23389cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23390
23391ac_cs_usage="\
23392\`$as_me' instantiates files from templates according to the
23393current configuration.
23394
23395Usage: $0 [OPTIONS] [FILE]...
23396
23397 -h, --help print this help, then exit
23398 -V, --version print version number, then exit
19650fd6 23399 -q, --quiet do not print progress messages
503d2be0
AS
23400 -d, --debug don't remove temporary files
23401 --recheck update $as_me by reconfiguring in the same conditions
23402 --file=FILE[:TEMPLATE]
edfaf76d 23403 instantiate the configuration file FILE
503d2be0 23404 --header=FILE[:TEMPLATE]
edfaf76d 23405 instantiate the configuration header FILE
503d2be0
AS
23406
23407Configuration files:
23408$config_files
23409
23410Configuration headers:
23411$config_headers
23412
23413Configuration commands:
23414$config_commands
23415
23416Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 23417_ACEOF
503d2be0 23418
c0d27fcc 23419cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23420ac_cs_version="\\
23421config.status
edfaf76d 23422configured by $0, generated by GNU Autoconf 2.59,
503d2be0
AS
23423 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23424
edfaf76d 23425Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
23426This config.status script is free software; the Free Software Foundation
23427gives unlimited permission to copy, distribute and modify it."
23428srcdir=$srcdir
23429INSTALL="$INSTALL"
c0d27fcc 23430_ACEOF
503d2be0 23431
c0d27fcc 23432cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23433# If no file are specified by the user, then we need to provide default
23434# value. By we need to know if files were specified by the user.
23435ac_need_defaults=:
23436while test $# != 0
ba4481b5 23437do
503d2be0
AS
23438 case $1 in
23439 --*=*)
23440 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23441 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
23442 ac_shift=:
23443 ;;
23444 -*)
23445 ac_option=$1
23446 ac_optarg=$2
23447 ac_shift=shift
503d2be0 23448 ;;
503d2be0
AS
23449 *) # This is not an option, so the user has probably given explicit
23450 # arguments.
6bae0ccf 23451 ac_option=$1
503d2be0
AS
23452 ac_need_defaults=false;;
23453 esac
23454
6bae0ccf 23455 case $ac_option in
503d2be0 23456 # Handling of the options.
c0d27fcc 23457_ACEOF
f57bd967 23458cat >>$CONFIG_STATUS <<\_ACEOF
19650fd6
AS
23459 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23460 ac_cs_recheck=: ;;
503d2be0
AS
23461 --version | --vers* | -V )
23462 echo "$ac_cs_version"; exit 0 ;;
23463 --he | --h)
23464 # Conflict between --help and --header
c0d27fcc 23465 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
23466Try \`$0 --help' for more information." >&5
23467echo "$as_me: error: ambiguous option: $1
23468Try \`$0 --help' for more information." >&2;}
23469 { (exit 1); exit 1; }; };;
23470 --help | --hel | -h )
23471 echo "$ac_cs_usage"; exit 0 ;;
23472 --debug | --d* | -d )
23473 debug=: ;;
23474 --file | --fil | --fi | --f )
6bae0ccf
DL
23475 $ac_shift
23476 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
23477 ac_need_defaults=false;;
23478 --header | --heade | --head | --hea )
6bae0ccf
DL
23479 $ac_shift
23480 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 23481 ac_need_defaults=false;;
19650fd6
AS
23482 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23483 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23484 ac_cs_silent=: ;;
503d2be0
AS
23485
23486 # This is an error.
c0d27fcc 23487 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
23488Try \`$0 --help' for more information." >&5
23489echo "$as_me: error: unrecognized option: $1
23490Try \`$0 --help' for more information." >&2;}
23491 { (exit 1); exit 1; }; } ;;
23492
23493 *) ac_config_targets="$ac_config_targets $1" ;;
23494
ba4481b5 23495 esac
503d2be0 23496 shift
ba4481b5
DL
23497done
23498
19650fd6
AS
23499ac_configure_extra_args=
23500
23501if $ac_cs_silent; then
23502 exec 6>/dev/null
23503 ac_configure_extra_args="$ac_configure_extra_args --silent"
23504fi
23505
23506_ACEOF
23507cat >>$CONFIG_STATUS <<_ACEOF
23508if \$ac_cs_recheck; then
23509 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23510 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23511fi
23512
503d2be0 23513_ACEOF
ba4481b5 23514
c0d27fcc 23515cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23516#
23517# INIT-COMMANDS section.
23518#
ba4481b5 23519
503d2be0
AS
23520GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
23521
c0d27fcc
MR
23522_ACEOF
23523
503d2be0 23524
c0d27fcc
MR
23525
23526cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23527for ac_config_target in $ac_config_targets
23528do
23529 case "$ac_config_target" in
23530 # Handling of arguments.
23531 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23532 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
23533 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
23534 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
23535 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
23536 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
23537 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 23538 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 23539 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
23540 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
23541 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23542 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 23543 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
23544echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23545 { (exit 1); exit 1; }; };;
23546 esac
ba4481b5 23547done
503d2be0
AS
23548
23549# If the user did not use the arguments to specify the items to instantiate,
23550# then the envvar interface is used. Set only those that are not.
23551# We use the long form for the default assignment because of an extremely
23552# bizarre bug on SunOS 4.1.3.
23553if $ac_need_defaults; then
23554 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23555 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23556 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 23557fi
503d2be0 23558
19650fd6
AS
23559# Have a temporary directory for convenience. Make it in the build tree
23560# simply because there is no reason to put it here, and in addition,
23561# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
23562# Create a temporary directory, and hook for its removal unless debugging.
23563$debug ||
23564{
23565 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23566 trap '{ (exit 1); exit 1; }' 1 2 13 15
23567}
23568
23569# Create a (secure) tmp directory for tmp files.
19650fd6 23570
503d2be0 23571{
19650fd6 23572 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
23573 test -n "$tmp" && test -d "$tmp"
23574} ||
23575{
19650fd6 23576 tmp=./confstat$$-$RANDOM
503d2be0
AS
23577 (umask 077 && mkdir $tmp)
23578} ||
23579{
19650fd6 23580 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
23581 { (exit 1); exit 1; }
23582}
23583
c0d27fcc 23584_ACEOF
503d2be0 23585
c0d27fcc 23586cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23587
23588#
23589# CONFIG_FILES section.
23590#
23591
23592# No need to generate the scripts if there are no CONFIG_FILES.
23593# This happens for instance when ./config.status config.h
23594if test -n "\$CONFIG_FILES"; then
23595 # Protect against being on the right side of a sed subst in config.status.
23596 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23597 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23598s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
23599s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23600s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23601s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23602s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23603s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23604s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
23605s,@exec_prefix@,$exec_prefix,;t t
23606s,@prefix@,$prefix,;t t
23607s,@program_transform_name@,$program_transform_name,;t t
23608s,@bindir@,$bindir,;t t
23609s,@sbindir@,$sbindir,;t t
23610s,@libexecdir@,$libexecdir,;t t
23611s,@datadir@,$datadir,;t t
23612s,@sysconfdir@,$sysconfdir,;t t
23613s,@sharedstatedir@,$sharedstatedir,;t t
23614s,@localstatedir@,$localstatedir,;t t
23615s,@libdir@,$libdir,;t t
23616s,@includedir@,$includedir,;t t
23617s,@oldincludedir@,$oldincludedir,;t t
23618s,@infodir@,$infodir,;t t
23619s,@mandir@,$mandir,;t t
503d2be0
AS
23620s,@build_alias@,$build_alias,;t t
23621s,@host_alias@,$host_alias,;t t
23622s,@target_alias@,$target_alias,;t t
c0d27fcc 23623s,@DEFS@,$DEFS,;t t
503d2be0
AS
23624s,@ECHO_C@,$ECHO_C,;t t
23625s,@ECHO_N@,$ECHO_N,;t t
23626s,@ECHO_T@,$ECHO_T,;t t
503d2be0 23627s,@LIBS@,$LIBS,;t t
19650fd6 23628s,@MAINT@,$MAINT,;t t
503d2be0
AS
23629s,@build@,$build,;t t
23630s,@build_cpu@,$build_cpu,;t t
23631s,@build_vendor@,$build_vendor,;t t
23632s,@build_os@,$build_os,;t t
23633s,@host@,$host,;t t
23634s,@host_cpu@,$host_cpu,;t t
23635s,@host_vendor@,$host_vendor,;t t
23636s,@host_os@,$host_os,;t t
23637s,@CC@,$CC,;t t
23638s,@CFLAGS@,$CFLAGS,;t t
23639s,@LDFLAGS@,$LDFLAGS,;t t
23640s,@CPPFLAGS@,$CPPFLAGS,;t t
23641s,@ac_ct_CC@,$ac_ct_CC,;t t
23642s,@EXEEXT@,$EXEEXT,;t t
23643s,@OBJEXT@,$OBJEXT,;t t
503d2be0 23644s,@CPP@,$CPP,;t t
e143ad11
AS
23645s,@EGREP@,$EGREP,;t t
23646s,@LN_S@,$LN_S,;t t
503d2be0
AS
23647s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23648s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23649s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
23650s,@RANLIB@,$RANLIB,;t t
23651s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 23652s,@INSTALL_INFO@,$INSTALL_INFO,;t t
46e35e9f 23653s,@GZIP_PROG@,$GZIP_PROG,;t t
503d2be0
AS
23654s,@LIBSOUND@,$LIBSOUND,;t t
23655s,@SET_MAKE@,$SET_MAKE,;t t
488dd4c4
JD
23656s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23657s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
23658s,@GTK_LIBS@,$GTK_LIBS,;t t
503d2be0
AS
23659s,@ALLOCA@,$ALLOCA,;t t
23660s,@liblockfile@,$liblockfile,;t t
23661s,@LIBOBJS@,$LIBOBJS,;t t
23662s,@NEED_SETGID@,$NEED_SETGID,;t t
23663s,@KMEM_GROUP@,$KMEM_GROUP,;t t
23664s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
52dbaac8
PE
23665s,@GETOPT_H@,$GETOPT_H,;t t
23666s,@GETOPTOBJS@,$GETOPTOBJS,;t t
503d2be0
AS
23667s,@version@,$version,;t t
23668s,@configuration@,$configuration,;t t
23669s,@canonical@,$canonical,;t t
23670s,@srcdir@,$srcdir,;t t
23671s,@lispdir@,$lispdir,;t t
23672s,@locallisppath@,$locallisppath,;t t
23673s,@lisppath@,$lisppath,;t t
23674s,@x_default_search_path@,$x_default_search_path,;t t
23675s,@etcdir@,$etcdir,;t t
23676s,@archlibdir@,$archlibdir,;t t
23677s,@docdir@,$docdir,;t t
23678s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
23679s,@gamedir@,$gamedir,;t t
23680s,@gameuser@,$gameuser,;t t
503d2be0
AS
23681s,@c_switch_system@,$c_switch_system,;t t
23682s,@c_switch_machine@,$c_switch_machine,;t t
23683s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
23684s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
23685s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
23686s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
23687s,@machfile@,$machfile,;t t
23688s,@opsysfile@,$opsysfile,;t t
6a3a24fa 23689s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 23690s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
23691CEOF
23692
c0d27fcc 23693_ACEOF
ba4481b5 23694
c0d27fcc 23695 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23696 # Split the substitutions into bite-sized pieces for seds with
23697 # small command number limits, like on Digital OSF/1 and HP-UX.
23698 ac_max_sed_lines=48
23699 ac_sed_frag=1 # Number of current file.
23700 ac_beg=1 # First line for current file.
23701 ac_end=$ac_max_sed_lines # Line after last line for current file.
23702 ac_more_lines=:
23703 ac_sed_cmds=
23704 while $ac_more_lines; do
23705 if test $ac_beg -gt 1; then
23706 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23707 else
23708 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23709 fi
23710 if test ! -s $tmp/subs.frag; then
23711 ac_more_lines=false
23712 else
23713 # The purpose of the label and of the branching condition is to
23714 # speed up the sed processing (if there are no `@' at all, there
23715 # is no need to browse any of the substitutions).
23716 # These are the two extra sed commands mentioned above.
23717 (echo ':t
23718 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23719 if test -z "$ac_sed_cmds"; then
edfaf76d 23720 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0 23721 else
edfaf76d 23722 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0
AS
23723 fi
23724 ac_sed_frag=`expr $ac_sed_frag + 1`
23725 ac_beg=$ac_end
23726 ac_end=`expr $ac_end + $ac_max_sed_lines`
23727 fi
23728 done
23729 if test -z "$ac_sed_cmds"; then
23730 ac_sed_cmds=cat
23731 fi
23732fi # test -n "$CONFIG_FILES"
ba4481b5 23733
c0d27fcc
MR
23734_ACEOF
23735cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 23736for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 23737 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
23738 case $ac_file in
23739 - | *:- | *:-:* ) # input from stdin
edfaf76d
LK
23740 cat >$tmp/stdin
23741 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23742 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23743 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
edfaf76d 23744 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23745 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
23746 esac
23747
503d2be0 23748 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
23749 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23750$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23751 X"$ac_file" : 'X\(//\)[^/]' \| \
23752 X"$ac_file" : 'X\(//\)$' \| \
23753 X"$ac_file" : 'X\(/\)' \| \
23754 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
23755echo X"$ac_file" |
23756 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23757 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23758 /^X\(\/\/\)$/{ s//\1/; q; }
23759 /^X\(\/\).*/{ s//\1/; q; }
23760 s/.*/./; q'`
6bae0ccf
DL
23761 { if $as_mkdir_p; then
23762 mkdir -p "$ac_dir"
23763 else
23764 as_dir="$ac_dir"
23765 as_dirs=
23766 while test ! -d "$as_dir"; do
23767 as_dirs="$as_dir $as_dirs"
23768 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23769$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23770 X"$as_dir" : 'X\(//\)[^/]' \| \
23771 X"$as_dir" : 'X\(//\)$' \| \
23772 X"$as_dir" : 'X\(/\)' \| \
23773 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
23774echo X"$as_dir" |
23775 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23776 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23777 /^X\(\/\/\)$/{ s//\1/; q; }
23778 /^X\(\/\).*/{ s//\1/; q; }
23779 s/.*/./; q'`
23780 done
23781 test ! -n "$as_dirs" || mkdir $as_dirs
23782 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23783echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23784 { (exit 1); exit 1; }; }; }
503d2be0 23785
c0d27fcc 23786 ac_builddir=.
98418dba 23787
c0d27fcc
MR
23788if test "$ac_dir" != .; then
23789 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23790 # A "../" for each directory in $ac_dir_suffix.
23791 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23792else
23793 ac_dir_suffix= ac_top_builddir=
23794fi
23795
23796case $srcdir in
23797 .) # No --srcdir option. We are building in place.
23798 ac_srcdir=.
23799 if test -z "$ac_top_builddir"; then
23800 ac_top_srcdir=.
23801 else
23802 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23803 fi ;;
23804 [\\/]* | ?:[\\/]* ) # Absolute path.
23805 ac_srcdir=$srcdir$ac_dir_suffix;
23806 ac_top_srcdir=$srcdir ;;
ba4481b5 23807 *) # Relative path.
c0d27fcc
MR
23808 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23809 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23810esac
edfaf76d
LK
23811
23812# Do not use `cd foo && pwd` to compute absolute paths, because
23813# the directories may not exist.
23814case `pwd` in
23815.) ac_abs_builddir="$ac_dir";;
23816*)
23817 case "$ac_dir" in
23818 .) ac_abs_builddir=`pwd`;;
23819 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23820 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23821 esac;;
23822esac
23823case $ac_abs_builddir in
23824.) ac_abs_top_builddir=${ac_top_builddir}.;;
23825*)
23826 case ${ac_top_builddir}. in
23827 .) ac_abs_top_builddir=$ac_abs_builddir;;
23828 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23829 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23830 esac;;
23831esac
23832case $ac_abs_builddir in
23833.) ac_abs_srcdir=$ac_srcdir;;
23834*)
23835 case $ac_srcdir in
23836 .) ac_abs_srcdir=$ac_abs_builddir;;
23837 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23838 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23839 esac;;
23840esac
23841case $ac_abs_builddir in
23842.) ac_abs_top_srcdir=$ac_top_srcdir;;
23843*)
23844 case $ac_top_srcdir in
23845 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23846 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23847 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23848 esac;;
23849esac
c0d27fcc 23850
ba4481b5 23851
503d2be0
AS
23852 case $INSTALL in
23853 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 23854 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
23855 esac
23856
e143ad11
AS
23857 if test x"$ac_file" != x-; then
23858 { echo "$as_me:$LINENO: creating $ac_file" >&5
23859echo "$as_me: creating $ac_file" >&6;}
23860 rm -f "$ac_file"
23861 fi
503d2be0
AS
23862 # Let's still pretend it is `configure' which instantiates (i.e., don't
23863 # use $as_me), people would be surprised to read:
c0d27fcc
MR
23864 # /* config.h. Generated by config.status. */
23865 if test x"$ac_file" = x-; then
23866 configure_input=
23867 else
23868 configure_input="$ac_file. "
23869 fi
23870 configure_input=$configure_input"Generated from `echo $ac_file_in |
edfaf76d 23871 sed 's,.*/,,'` by configure."
503d2be0
AS
23872
23873 # First look for the input files in the build tree, otherwise in the
23874 # src tree.
23875 ac_file_inputs=`IFS=:
23876 for f in $ac_file_in; do
23877 case $f in
23878 -) echo $tmp/stdin ;;
23879 [\\/$]*)
edfaf76d
LK
23880 # Absolute (can't be DOS-style, as IFS=:)
23881 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23882echo "$as_me: error: cannot find input file: $f" >&2;}
23883 { (exit 1); exit 1; }; }
edfaf76d 23884 echo "$f";;
503d2be0 23885 *) # Relative
edfaf76d
LK
23886 if test -f "$f"; then
23887 # Build tree
23888 echo "$f"
23889 elif test -f "$srcdir/$f"; then
23890 # Source tree
23891 echo "$srcdir/$f"
23892 else
23893 # /dev/null tree
23894 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23895echo "$as_me: error: cannot find input file: $f" >&2;}
23896 { (exit 1); exit 1; }; }
edfaf76d 23897 fi;;
503d2be0
AS
23898 esac
23899 done` || { (exit 1); exit 1; }
c0d27fcc
MR
23900_ACEOF
23901cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23902 sed "$ac_vpsub
23903$extrasub
c0d27fcc
MR
23904_ACEOF
23905cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23906:t
23907/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23908s,@configure_input@,$configure_input,;t t
23909s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 23910s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 23911s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
23912s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23913s,@builddir@,$ac_builddir,;t t
23914s,@abs_builddir@,$ac_abs_builddir,;t t
23915s,@top_builddir@,$ac_top_builddir,;t t
23916s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
23917s,@INSTALL@,$ac_INSTALL,;t t
23918" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23919 rm -f $tmp/stdin
23920 if test x"$ac_file" != x-; then
23921 mv $tmp/out $ac_file
23922 else
23923 cat $tmp/out
23924 rm -f $tmp/out
23925 fi
23926
23927done
c0d27fcc
MR
23928_ACEOF
23929cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 23930
503d2be0
AS
23931#
23932# CONFIG_HEADER section.
23933#
ba4481b5
DL
23934
23935# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23936# NAME is the cpp macro being defined and VALUE is the value it is being given.
23937#
23938# ac_d sets the value in "#define NAME VALUE" lines.
edfaf76d
LK
23939ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23940ac_dB='[ ].*$,\1#\2'
503d2be0
AS
23941ac_dC=' '
23942ac_dD=',;t'
23943# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
edfaf76d 23944ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
503d2be0 23945ac_uB='$,\1#\2define\3'
ba4481b5 23946ac_uC=' '
503d2be0 23947ac_uD=',;t'
ba4481b5 23948
503d2be0 23949for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 23950 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
23951 case $ac_file in
23952 - | *:- | *:-:* ) # input from stdin
edfaf76d
LK
23953 cat >$tmp/stdin
23954 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23955 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23956 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
edfaf76d 23957 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23958 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
23959 esac
23960
c0d27fcc 23961 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
23962echo "$as_me: creating $ac_file" >&6;}
23963
23964 # First look for the input files in the build tree, otherwise in the
23965 # src tree.
23966 ac_file_inputs=`IFS=:
23967 for f in $ac_file_in; do
23968 case $f in
23969 -) echo $tmp/stdin ;;
23970 [\\/$]*)
edfaf76d
LK
23971 # Absolute (can't be DOS-style, as IFS=:)
23972 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23973echo "$as_me: error: cannot find input file: $f" >&2;}
23974 { (exit 1); exit 1; }; }
edfaf76d
LK
23975 # Do quote $f, to prevent DOS paths from being IFS'd.
23976 echo "$f";;
503d2be0 23977 *) # Relative
edfaf76d
LK
23978 if test -f "$f"; then
23979 # Build tree
23980 echo "$f"
23981 elif test -f "$srcdir/$f"; then
23982 # Source tree
23983 echo "$srcdir/$f"
23984 else
23985 # /dev/null tree
23986 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23987echo "$as_me: error: cannot find input file: $f" >&2;}
23988 { (exit 1); exit 1; }; }
edfaf76d 23989 fi;;
503d2be0
AS
23990 esac
23991 done` || { (exit 1); exit 1; }
23992 # Remove the trailing spaces.
edfaf76d 23993 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
503d2be0 23994
c0d27fcc 23995_ACEOF
503d2be0
AS
23996
23997# Transform confdefs.h into two sed scripts, `conftest.defines' and
23998# `conftest.undefs', that substitutes the proper values into
23999# config.h.in to produce config.h. The first handles `#define'
24000# templates, and the second `#undef' templates.
24001# And first: Protect against being on the right side of a sed subst in
24002# config.status. Protect against being in an unquoted here document
24003# in config.status.
24004rm -f conftest.defines conftest.undefs
24005# Using a here document instead of a string reduces the quoting nightmare.
24006# Putting comments in sed scripts is not portable.
24007#
24008# `end' is used to avoid that the second main sed command (meant for
24009# 0-ary CPP macros) applies to n-ary macro definitions.
24010# See the Autoconf documentation for `clear'.
c0d27fcc 24011cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
24012s/[\\&,]/\\&/g
24013s,[\\$`],\\&,g
24014t clear
24015: clear
edfaf76d 24016s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0 24017t end
edfaf76d 24018s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
503d2be0 24019: end
c0d27fcc 24020_ACEOF
503d2be0
AS
24021# If some macros were called several times there might be several times
24022# the same #defines, which is useless. Nevertheless, we may not want to
24023# sort them, since we want the *last* AC-DEFINE to be honored.
24024uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
24025sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
24026rm -f confdef2sed.sed
ba4481b5
DL
24027
24028# This sed command replaces #undef with comments. This is necessary, for
24029# example, in the case of _POSIX_SOURCE, which is predefined and required
24030# on some systems where configure will not decide to define it.
c0d27fcc 24031cat >>conftest.undefs <<\_ACEOF
edfaf76d 24032s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 24033_ACEOF
ba4481b5 24034
503d2be0
AS
24035# Break up conftest.defines because some shells have a limit on the size
24036# of here documents, and old seds have small limits too (100 cmds).
24037echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
edfaf76d 24038echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
24039echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
24040echo ' :' >>$CONFIG_STATUS
24041rm -f conftest.tail
24042while grep . conftest.defines >/dev/null
24043do
24044 # Write a limited-size here document to $tmp/defines.sed.
24045 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
24046 # Speed up: don't consider the non `#define' lines.
edfaf76d 24047 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
503d2be0
AS
24048 # Work around the forget-to-reset-the-flag bug.
24049 echo 't clr' >>$CONFIG_STATUS
24050 echo ': clr' >>$CONFIG_STATUS
24051 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
24052 echo 'CEOF
24053 sed -f $tmp/defines.sed $tmp/in >$tmp/out
24054 rm -f $tmp/in
24055 mv $tmp/out $tmp/in
24056' >>$CONFIG_STATUS
24057 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
24058 rm -f conftest.defines
24059 mv conftest.tail conftest.defines
24060done
24061rm -f conftest.defines
6bae0ccf 24062echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 24063echo >>$CONFIG_STATUS
ba4481b5 24064
503d2be0
AS
24065# Break up conftest.undefs because some shells have a limit on the size
24066# of here documents, and old seds have small limits too (100 cmds).
24067echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 24068rm -f conftest.tail
503d2be0 24069while grep . conftest.undefs >/dev/null
ba4481b5 24070do
503d2be0
AS
24071 # Write a limited-size here document to $tmp/undefs.sed.
24072 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
24073 # Speed up: don't consider the non `#undef'
edfaf76d 24074 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
503d2be0
AS
24075 # Work around the forget-to-reset-the-flag bug.
24076 echo 't clr' >>$CONFIG_STATUS
24077 echo ': clr' >>$CONFIG_STATUS
24078 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 24079 echo 'CEOF
503d2be0
AS
24080 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
24081 rm -f $tmp/in
24082 mv $tmp/out $tmp/in
24083' >>$CONFIG_STATUS
24084 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
24085 rm -f conftest.undefs
24086 mv conftest.tail conftest.undefs
ba4481b5 24087done
503d2be0
AS
24088rm -f conftest.undefs
24089
c0d27fcc 24090cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24091 # Let's still pretend it is `configure' which instantiates (i.e., don't
24092 # use $as_me), people would be surprised to read:
c0d27fcc 24093 # /* config.h. Generated by config.status. */
503d2be0 24094 if test x"$ac_file" = x-; then
c0d27fcc 24095 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 24096 else
c0d27fcc 24097 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
24098 fi
24099 cat $tmp/in >>$tmp/config.h
24100 rm -f $tmp/in
24101 if test x"$ac_file" != x-; then
19650fd6 24102 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 24103 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
24104echo "$as_me: $ac_file is unchanged" >&6;}
24105 else
c0d27fcc
MR
24106 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
24107$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24108 X"$ac_file" : 'X\(//\)[^/]' \| \
24109 X"$ac_file" : 'X\(//\)$' \| \
24110 X"$ac_file" : 'X\(/\)' \| \
24111 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
24112echo X"$ac_file" |
24113 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24114 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24115 /^X\(\/\/\)$/{ s//\1/; q; }
24116 /^X\(\/\).*/{ s//\1/; q; }
24117 s/.*/./; q'`
6bae0ccf
DL
24118 { if $as_mkdir_p; then
24119 mkdir -p "$ac_dir"
24120 else
24121 as_dir="$ac_dir"
24122 as_dirs=
24123 while test ! -d "$as_dir"; do
24124 as_dirs="$as_dir $as_dirs"
24125 as_dir=`(dirname "$as_dir") 2>/dev/null ||
24126$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24127 X"$as_dir" : 'X\(//\)[^/]' \| \
24128 X"$as_dir" : 'X\(//\)$' \| \
24129 X"$as_dir" : 'X\(/\)' \| \
24130 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
24131echo X"$as_dir" |
24132 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24133 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24134 /^X\(\/\/\)$/{ s//\1/; q; }
24135 /^X\(\/\).*/{ s//\1/; q; }
24136 s/.*/./; q'`
24137 done
24138 test ! -n "$as_dirs" || mkdir $as_dirs
24139 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24140echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24141 { (exit 1); exit 1; }; }; }
503d2be0 24142
503d2be0
AS
24143 rm -f $ac_file
24144 mv $tmp/config.h $ac_file
ba4481b5 24145 fi
503d2be0
AS
24146 else
24147 cat $tmp/config.h
24148 rm -f $tmp/config.h
ba4481b5 24149 fi
503d2be0 24150done
c0d27fcc
MR
24151_ACEOF
24152cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24153
24154#
24155# CONFIG_COMMANDS section.
24156#
24157for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24158 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24159 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
24160 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
24161$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24162 X"$ac_dest" : 'X\(//\)[^/]' \| \
24163 X"$ac_dest" : 'X\(//\)$' \| \
24164 X"$ac_dest" : 'X\(/\)' \| \
24165 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
24166echo X"$ac_dest" |
24167 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24168 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24169 /^X\(\/\/\)$/{ s//\1/; q; }
24170 /^X\(\/\).*/{ s//\1/; q; }
24171 s/.*/./; q'`
edfaf76d
LK
24172 { if $as_mkdir_p; then
24173 mkdir -p "$ac_dir"
24174 else
24175 as_dir="$ac_dir"
24176 as_dirs=
24177 while test ! -d "$as_dir"; do
24178 as_dirs="$as_dir $as_dirs"
24179 as_dir=`(dirname "$as_dir") 2>/dev/null ||
24180$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24181 X"$as_dir" : 'X\(//\)[^/]' \| \
24182 X"$as_dir" : 'X\(//\)$' \| \
24183 X"$as_dir" : 'X\(/\)' \| \
24184 . : '\(.\)' 2>/dev/null ||
24185echo X"$as_dir" |
24186 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24187 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24188 /^X\(\/\/\)$/{ s//\1/; q; }
24189 /^X\(\/\).*/{ s//\1/; q; }
24190 s/.*/./; q'`
24191 done
24192 test ! -n "$as_dirs" || mkdir $as_dirs
24193 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24194echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24195 { (exit 1); exit 1; }; }; }
24196
c0d27fcc
MR
24197 ac_builddir=.
24198
24199if test "$ac_dir" != .; then
24200 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24201 # A "../" for each directory in $ac_dir_suffix.
24202 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24203else
24204 ac_dir_suffix= ac_top_builddir=
24205fi
24206
24207case $srcdir in
24208 .) # No --srcdir option. We are building in place.
24209 ac_srcdir=.
24210 if test -z "$ac_top_builddir"; then
24211 ac_top_srcdir=.
24212 else
24213 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24214 fi ;;
24215 [\\/]* | ?:[\\/]* ) # Absolute path.
24216 ac_srcdir=$srcdir$ac_dir_suffix;
24217 ac_top_srcdir=$srcdir ;;
24218 *) # Relative path.
24219 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24220 ac_top_srcdir=$ac_top_builddir$srcdir ;;
24221esac
edfaf76d
LK
24222
24223# Do not use `cd foo && pwd` to compute absolute paths, because
24224# the directories may not exist.
24225case `pwd` in
24226.) ac_abs_builddir="$ac_dir";;
24227*)
24228 case "$ac_dir" in
24229 .) ac_abs_builddir=`pwd`;;
24230 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24231 *) ac_abs_builddir=`pwd`/"$ac_dir";;
24232 esac;;
24233esac
24234case $ac_abs_builddir in
24235.) ac_abs_top_builddir=${ac_top_builddir}.;;
24236*)
24237 case ${ac_top_builddir}. in
24238 .) ac_abs_top_builddir=$ac_abs_builddir;;
24239 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24240 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24241 esac;;
24242esac
24243case $ac_abs_builddir in
24244.) ac_abs_srcdir=$ac_srcdir;;
24245*)
24246 case $ac_srcdir in
24247 .) ac_abs_srcdir=$ac_abs_builddir;;
24248 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24249 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24250 esac;;
24251esac
24252case $ac_abs_builddir in
24253.) ac_abs_top_srcdir=$ac_top_srcdir;;
24254*)
24255 case $ac_top_srcdir in
24256 .) ac_abs_top_srcdir=$ac_abs_builddir;;
24257 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24258 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24259 esac;;
24260esac
ba4481b5 24261
c0d27fcc
MR
24262
24263 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24264echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
24265 case $ac_dest in
24266 default )
ba4481b5
DL
24267
24268### Make the necessary directories, if they don't exist.
24269for dir in etc lisp ; do
24270 test -d ${dir} || mkdir ${dir}
24271done
24272
24273# Build src/Makefile from ${srcdir}/src/Makefile.c
24274# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
24275# This must be done after src/config.h is built, since we rely on that file.
24276
24277# Now get this: Some word that is part of the ${srcdir} directory name
24278# or the ${configuration} value might, just might, happen to be an
24279# identifier like `sun4' or `i386' or something, and be predefined by
24280# the C preprocessor to some helpful value like 1, or maybe the empty
24281# string. Needless to say consequent macro substitutions are less
24282# than conducive to the makefile finding the correct directory.
24283undefs="`echo $top_srcdir $configuration $canonical |
24284sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24285 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
24286`"
24287
24288echo creating src/epaths.h
4aa6b955 24289${MAKE-make} epaths-force
ba4481b5 24290
1c203d4c
DL
24291# As of 2000-11-19, newest development versions of GNU cpp preprocess
24292# `..' to `. .' unless invoked with -traditional
24293
d0e9bfd2 24294if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
24295 CPPFLAGS="$CPPFLAGS -traditional"
24296fi
24297
ba4481b5
DL
24298echo creating lib-src/Makefile
24299( cd lib-src
24300 rm -f junk.c junk1.c junk2.c
24301 sed -e '/start of cpp stuff/q' \
24302 < Makefile.c > junk1.c
24303 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24304 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24305 < Makefile.c > junk.c
503d2be0 24306 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24307 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24308 cat junk1.c junk2.c > Makefile.new
24309 rm -f junk.c junk1.c junk2.c
24310 chmod 444 Makefile.new
24311 mv -f Makefile.new Makefile
24312)
24313
24314echo creating src/Makefile
24315( cd src
24316 rm -f junk.c junk1.c junk2.c
24317 sed -e '/start of cpp stuff/q' \
24318 < Makefile.c > junk1.c
24319 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24320 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24321 < Makefile.c > junk.c
503d2be0 24322 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24323 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24324 cat junk1.c junk2.c > Makefile.new
24325 rm -f junk.c junk1.c junk2.c
24326 chmod 444 Makefile.new
24327 mv -f Makefile.new Makefile
24328)
24329
503d2be0 24330if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 24331 echo creating src/.gdbinit
503d2be0 24332 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
24333fi
24334
24335# This is how we know whether to re-run configure in certain cases.
24336touch src/config.stamp
24337
503d2be0
AS
24338 ;;
24339 esac
24340done
c0d27fcc 24341_ACEOF
503d2be0 24342
c0d27fcc 24343cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 24344
503d2be0 24345{ (exit 0); exit 0; }
c0d27fcc 24346_ACEOF
ba4481b5 24347chmod +x $CONFIG_STATUS
503d2be0
AS
24348ac_clean_files=$ac_clean_files_save
24349
c0d27fcc 24350
503d2be0
AS
24351# configure is writing to config.log, and then calls config.status.
24352# config.status does its own redirection, appending to config.log.
24353# Unfortunately, on DOS this fails, as config.log is still kept open
24354# by configure, so config.status won't be able to write to it; its
24355# output is simply discarded. So we exec the FD to /dev/null,
24356# effectively closing config.log, so it can be properly (re)opened and
24357# appended to by config.status. When coming back to configure, we
24358# need to make the FD available again.
24359if test "$no_create" != yes; then
24360 ac_cs_success=:
19650fd6
AS
24361 ac_config_status_args=
24362 test "$silent" = yes &&
24363 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 24364 exec 5>/dev/null
19650fd6 24365 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
24366 exec 5>>config.log
24367 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24368 # would make configure fail if this is the last instruction.
24369 $ac_cs_success || { (exit 1); exit 1; }
24370fi
f5f47add 24371
c0d27fcc 24372