(inhibit_pre_post_conversion): Removed (unused).
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
793fa0d7 3# Generated by GNU Autoconf 2.57.
ba4481b5 4#
793fa0d7
DL
5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
6# Free Software Foundation, Inc.
ba4481b5
DL
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
c0d27fcc
MR
9## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
503d2be0
AS
12
13# Be Bourne compatible
14if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15 emulate sh
16 NULLCMD=:
6bae0ccf
DL
17 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18 # is contrary to our usage. Disable this feature.
19 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
20elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21 set -o posix
22fi
23
c0d27fcc 24# Support unset when possible.
793fa0d7 25if (FOO=FOO; unset FOO) >/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
793fa0d7 44 if (set +x; test -n "`(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
221 as_mkdir_p=false
222fi
223
503d2be0
AS
224as_executable_p="test -f"
225
c0d27fcc
MR
226# Sed expression to map a string onto a valid CPP name.
227as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
228
229# Sed expression to map a string onto a valid variable name.
230as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
503d2be0 231
503d2be0
AS
232
233# IFS
234# We need space, tab and new line, in precisely that order.
235as_nl='
236'
237IFS=" $as_nl"
238
239# CDPATH.
6bae0ccf 240$as_unset CDPATH
c0d27fcc 241
503d2be0
AS
242
243# Name of the host.
244# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
245# so uname gets run too.
246ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
247
248exec 6>&1
249
250#
251# Initializations.
252#
ba4481b5 253ac_default_prefix=/usr/local
6bae0ccf 254ac_config_libobj_dir=.
503d2be0
AS
255cross_compiling=no
256subdirs=
c0d27fcc
MR
257MFLAGS=
258MAKEFLAGS=
503d2be0
AS
259SHELL=${CONFIG_SHELL-/bin/sh}
260
261# Maximum number of lines to put in a shell here document.
262# This variable seems obsolete. It should probably be removed, and
263# only ac_max_sed_lines should be used.
264: ${ac_max_here_lines=38}
265
c0d27fcc
MR
266# Identity of this package.
267PACKAGE_NAME=
268PACKAGE_TARNAME=
269PACKAGE_VERSION=
270PACKAGE_STRING=
271PACKAGE_BUGREPORT=
272
503d2be0 273ac_unique_file="src/lisp.h"
6bae0ccf 274ac_config_libobj_dir=src
503d2be0
AS
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
ba4481b5 311
19650fd6 312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO EGREP LIBSOUND SET_MAKE PKG_CONFIG GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS'
6bae0ccf 313ac_subst_files=''
c0d27fcc 314
ba4481b5 315# Initialize some variables set by options.
503d2be0
AS
316ac_init_help=
317ac_init_version=false
ba4481b5
DL
318# The variables have the same names as the options, with
319# dashes changed to underlines.
503d2be0 320cache_file=/dev/null
ba4481b5 321exec_prefix=NONE
ba4481b5 322no_create=
ba4481b5
DL
323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
328silent=
329site=
330srcdir=
ba4481b5
DL
331verbose=
332x_includes=NONE
333x_libraries=NONE
503d2be0
AS
334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
ba4481b5
DL
340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
352
ba4481b5
DL
353ac_prev=
354for ac_option
355do
ba4481b5
DL
356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
361 fi
362
503d2be0 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
ba4481b5
DL
364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
503d2be0 367 case $ac_option in
ba4481b5
DL
368
369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 372 bindir=$ac_optarg ;;
ba4481b5
DL
373
374 -build | --build | --buil | --bui | --bu)
503d2be0 375 ac_prev=build_alias ;;
ba4481b5 376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 377 build_alias=$ac_optarg ;;
ba4481b5
DL
378
379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
ba4481b5
DL
388
389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
503d2be0 393 datadir=$ac_optarg ;;
ba4481b5
DL
394
395 -disable-* | --disable-*)
503d2be0 396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 397 # Reject names that are not valid shell variable names.
503d2be0
AS
398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
ba4481b5
DL
403
404 -enable-* | --enable-*)
503d2be0 405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 406 # Reject names that are not valid shell variable names.
503d2be0
AS
407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
413 *) ac_optarg=yes ;;
414 esac
503d2be0 415 eval "enable_$ac_feature='$ac_optarg'" ;;
ba4481b5
DL
416
417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
503d2be0 424 exec_prefix=$ac_optarg ;;
ba4481b5
DL
425
426 -gas | --gas | --ga | --g)
427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
429
503d2be0
AS
430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
ba4481b5
DL
436
437 -host | --host | --hos | --ho)
503d2be0 438 ac_prev=host_alias ;;
ba4481b5 439 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 440 host_alias=$ac_optarg ;;
ba4481b5
DL
441
442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 447 includedir=$ac_optarg ;;
ba4481b5
DL
448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 452 infodir=$ac_optarg ;;
ba4481b5
DL
453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 457 libdir=$ac_optarg ;;
ba4481b5
DL
458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
503d2be0 464 libexecdir=$ac_optarg ;;
ba4481b5
DL
465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
503d2be0 473 localstatedir=$ac_optarg ;;
ba4481b5
DL
474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 478 mandir=$ac_optarg ;;
ba4481b5
DL
479
480 -nfp | --nfp | --nf)
481 # Obsolete; use --without-fp.
482 with_fp=no ;;
483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 485 | --no-cr | --no-c | -n)
ba4481b5
DL
486 no_create=yes ;;
487
488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
491
492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 499 oldincludedir=$ac_optarg ;;
ba4481b5
DL
500
501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 504 prefix=$ac_optarg ;;
ba4481b5
DL
505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 511 program_prefix=$ac_optarg ;;
ba4481b5
DL
512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 518 program_suffix=$ac_optarg ;;
ba4481b5
DL
519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 535 program_transform_name=$ac_optarg ;;
ba4481b5
DL
536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
503d2be0 545 sbindir=$ac_optarg ;;
ba4481b5
DL
546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
503d2be0 556 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
557
558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
503d2be0 561 site=$ac_optarg ;;
ba4481b5
DL
562
563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 566 srcdir=$ac_optarg ;;
ba4481b5
DL
567
568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 573 sysconfdir=$ac_optarg ;;
ba4481b5
DL
574
575 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 576 ac_prev=target_alias ;;
ba4481b5 577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 578 target_alias=$ac_optarg ;;
ba4481b5
DL
579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
503d2be0
AS
583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
ba4481b5
DL
585
586 -with-* | --with-*)
503d2be0 587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 588 # Reject names that are not valid shell variable names.
503d2be0
AS
589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
ba4481b5 592 ac_package=`echo $ac_package| sed 's/-/_/g'`
503d2be0
AS
593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
595 *) ac_optarg=yes ;;
596 esac
503d2be0 597 eval "with_$ac_package='$ac_optarg'" ;;
ba4481b5
DL
598
599 -without-* | --without-*)
503d2be0 600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 601 # Reject names that are not valid shell variable names.
503d2be0
AS
602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
ba4481b5
DL
607
608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 617 x_includes=$ac_optarg ;;
ba4481b5
DL
618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 624 x_libraries=$ac_optarg ;;
ba4481b5 625
503d2be0
AS
626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
ba4481b5
DL
629 ;;
630
503d2be0
AS
631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
ba4481b5 641 *)
503d2be0
AS
642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
647 ;;
648
649 esac
650done
651
652if test -n "$ac_prev"; then
503d2be0
AS
653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
ba4481b5 656fi
ba4481b5 657
503d2be0
AS
658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
660do
661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
c0d27fcc 664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
503d2be0
AS
665 { (exit 1); exit 1; }; };;
666 esac
667done
ba4481b5 668
503d2be0
AS
669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
793fa0d7 671 localstatedir libdir includedir oldincludedir infodir mandir
ba4481b5 672do
503d2be0
AS
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
c0d27fcc 676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
503d2be0 677 { (exit 1); exit 1; }; };;
ba4481b5
DL
678 esac
679done
680
503d2be0
AS
681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
c0d27fcc 683# FIXME: To remove some day.
503d2be0
AS
684build=$build_alias
685host=$host_alias
686target=$target_alias
687
c0d27fcc 688# FIXME: To remove some day.
503d2be0
AS
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
ba4481b5 698
503d2be0
AS
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 701
503d2be0 702test "$silent" = yes && exec 6>/dev/null
ba4481b5 703
c0d27fcc 704
ba4481b5
DL
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
707 ac_srcdir_defaulted=yes
708 # Try the directory containing this script, then its parent.
c0d27fcc
MR
709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
793fa0d7
DL
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
ba4481b5
DL
721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
728if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
c0d27fcc 730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
503d2be0 731 { (exit 1); exit 1; }; }
ba4481b5 732 else
c0d27fcc 733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 734 { (exit 1); exit 1; }; }
ba4481b5
DL
735 fi
736fi
6bae0ccf
DL
737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
503d2be0
AS
740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
773
774#
775# Report the --help message.
776#
777if test "$ac_init_help" = "long"; then
778 # Omit some internal or obsolete options to make the list less imposing.
779 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 780 cat <<_ACEOF
503d2be0
AS
781\`configure' configures this package to adapt to many kinds of systems.
782
783Usage: $0 [OPTION]... [VAR=VALUE]...
784
785To assign environment variables (e.g., CC, CFLAGS...), specify them as
786VAR=VALUE. See below for descriptions of some of the useful variables.
787
788Defaults for the options are specified in brackets.
789
790Configuration:
791 -h, --help display this help and exit
792 --help=short display options specific to this package
793 --help=recursive display the short help of all the included packages
794 -V, --version display version information and exit
795 -q, --quiet, --silent do not print \`checking...' messages
796 --cache-file=FILE cache test results in FILE [disabled]
797 -C, --config-cache alias for \`--cache-file=config.cache'
798 -n, --no-create do not create output files
799 --srcdir=DIR find the sources in DIR [configure dir or \`..']
800
c0d27fcc 801_ACEOF
503d2be0 802
c0d27fcc 803 cat <<_ACEOF
503d2be0
AS
804Installation directories:
805 --prefix=PREFIX install architecture-independent files in PREFIX
793fa0d7 806 [$ac_default_prefix]
503d2be0 807 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
793fa0d7 808 [PREFIX]
503d2be0
AS
809
810By default, \`make install' will install all the files in
811\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
812an installation prefix other than \`$ac_default_prefix' using \`--prefix',
813for instance \`--prefix=\$HOME'.
814
815For better control, use the options below.
816
817Fine tuning of the installation directories:
818 --bindir=DIR user executables [EPREFIX/bin]
819 --sbindir=DIR system admin executables [EPREFIX/sbin]
820 --libexecdir=DIR program executables [EPREFIX/libexec]
821 --datadir=DIR read-only architecture-independent data [PREFIX/share]
822 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
823 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
824 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
825 --libdir=DIR object code libraries [EPREFIX/lib]
826 --includedir=DIR C header files [PREFIX/include]
827 --oldincludedir=DIR C header files for non-gcc [/usr/include]
828 --infodir=DIR info documentation [PREFIX/info]
829 --mandir=DIR man documentation [PREFIX/man]
c0d27fcc 830_ACEOF
503d2be0 831
c0d27fcc 832 cat <<\_ACEOF
503d2be0 833
ba5da88a
PJ
834Program names:
835 --program-prefix=PREFIX prepend PREFIX to installed program names
836 --program-suffix=SUFFIX append SUFFIX to installed program names
837 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
838
503d2be0
AS
839X features:
840 --x-includes=DIR X include files are in DIR
841 --x-libraries=DIR X library files are in DIR
842
843System types:
844 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
845 --host=HOST cross-compile to build programs to run on HOST [BUILD]
846_ACEOF
503d2be0
AS
847fi
848
849if test -n "$ac_init_help"; then
850
c0d27fcc 851 cat <<\_ACEOF
503d2be0
AS
852
853Optional Features:
854 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
855 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6a3a24fa
JD
856 --enable-carbon-app[=DIR] [DIR=/Application]
857 specify install directory for Emacs.app on Mac OS X
19650fd6
AS
858 --enable-maintainer-mode enable make rules and dependencies not useful
859 (and sometimes confusing) to the casual installer
503d2be0
AS
860 --disable-largefile omit support for large files
861
862Optional Packages:
863 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
864 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
865 --without-gcc don't use GCC to compile Emacs if GCC is found
866 --without-pop don't support POP mail retrieval with movemail
867 --with-kerberos support Kerberos-authenticated POP
868 --with-kerberos5 support Kerberos version 5 authenticated POP
869 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 870 --without-sound don't compile with sound support
488dd4c4
JD
871 --with-x-toolkit=KIT use an X toolkit
872 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
873 --with-xpm use -lXpm for displaying XPM images
874 --with-jpeg use -ljpeg for displaying JPEG images
875 --with-tiff use -ltiff for displaying TIFF images
876 --with-gif use -lungif for displaying GIF images
877 --with-png use -lpng for displaying PNG images
488dd4c4
JD
878 --with-gtk use GTK (same as --with-x-toolkit=gtk)
879 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 880 --without-toolkit-scroll-bars
cc227489
MB
881 don't use Motif or Xaw3d scroll bars
882 --without-xim don't use X11 XIM
e0f712ba 883 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
884 --with-x use the X Window System
885
886Some influential environment variables:
887 CC C compiler command
888 CFLAGS C compiler flags
889 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
890 nonstandard directory <lib dir>
891 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
892 headers in a nonstandard directory <include dir>
893 CPP C preprocessor
894
895Use these variables to override the choices made by `configure' or to help
896it to find libraries and programs with nonstandard names/locations.
897
c0d27fcc 898_ACEOF
503d2be0
AS
899fi
900
901if test "$ac_init_help" = "recursive"; then
902 # If there are subdirs, report their specific --help.
903 ac_popdir=`pwd`
c0d27fcc
MR
904 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
905 test -d $ac_dir || continue
906 ac_builddir=.
907
908if test "$ac_dir" != .; then
909 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
910 # A "../" for each directory in $ac_dir_suffix.
911 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
912else
913 ac_dir_suffix= ac_top_builddir=
914fi
503d2be0 915
c0d27fcc
MR
916case $srcdir in
917 .) # No --srcdir option. We are building in place.
918 ac_srcdir=.
919 if test -z "$ac_top_builddir"; then
920 ac_top_srcdir=.
921 else
922 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
923 fi ;;
924 [\\/]* | ?:[\\/]* ) # Absolute path.
925 ac_srcdir=$srcdir$ac_dir_suffix;
926 ac_top_srcdir=$srcdir ;;
927 *) # Relative path.
928 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
929 ac_top_srcdir=$ac_top_builddir$srcdir ;;
930esac
931# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
932# absolute.
933ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6bae0ccf 934ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
c0d27fcc
MR
935ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
936ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
937
938 cd $ac_dir
503d2be0 939 # Check for guested configure; otherwise get Cygnus style configure.
c0d27fcc 940 if test -f $ac_srcdir/configure.gnu; then
503d2be0 941 echo
c0d27fcc
MR
942 $SHELL $ac_srcdir/configure.gnu --help=recursive
943 elif test -f $ac_srcdir/configure; then
503d2be0 944 echo
c0d27fcc
MR
945 $SHELL $ac_srcdir/configure --help=recursive
946 elif test -f $ac_srcdir/configure.ac ||
793fa0d7 947 test -f $ac_srcdir/configure.in; then
503d2be0
AS
948 echo
949 $ac_configure --help
950 else
c0d27fcc 951 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
503d2be0 952 fi
851a3062 953 cd "$ac_popdir"
503d2be0
AS
954 done
955fi
956
957test -n "$ac_init_help" && exit 0
958if $ac_init_version; then
c0d27fcc 959 cat <<\_ACEOF
503d2be0 960
793fa0d7
DL
961Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
962Free Software Foundation, Inc.
503d2be0
AS
963This configure script is free software; the Free Software Foundation
964gives unlimited permission to copy, distribute and modify it.
c0d27fcc 965_ACEOF
503d2be0
AS
966 exit 0
967fi
968exec 5>config.log
c0d27fcc 969cat >&5 <<_ACEOF
503d2be0
AS
970This file contains any messages produced by compilers while
971running configure, to aid debugging if configure makes a mistake.
972
973It was created by $as_me, which was
793fa0d7 974generated by GNU Autoconf 2.57. Invocation command line was
503d2be0
AS
975
976 $ $0 $@
977
c0d27fcc 978_ACEOF
503d2be0
AS
979{
980cat <<_ASUNAME
c0d27fcc
MR
981## --------- ##
982## Platform. ##
983## --------- ##
503d2be0
AS
984
985hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
986uname -m = `(uname -m) 2>/dev/null || echo unknown`
987uname -r = `(uname -r) 2>/dev/null || echo unknown`
988uname -s = `(uname -s) 2>/dev/null || echo unknown`
989uname -v = `(uname -v) 2>/dev/null || echo unknown`
990
991/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
992/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
993
994/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
995/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
996/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
997hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
998/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
999/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1000/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1001
925c2f3f 1002_ASUNAME
c0d27fcc
MR
1003
1004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1005for as_dir in $PATH
1006do
1007 IFS=$as_save_IFS
1008 test -z "$as_dir" && as_dir=.
1009 echo "PATH: $as_dir"
1010done
1011
503d2be0
AS
1012} >&5
1013
c0d27fcc
MR
1014cat >&5 <<_ACEOF
1015
1016
1017## ----------- ##
1018## Core tests. ##
1019## ----------- ##
1020
1021_ACEOF
503d2be0 1022
503d2be0
AS
1023
1024# Keep a trace of the command line.
1025# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1026# Strip out --silent because we don't want to record it for future runs.
503d2be0 1027# Also quote any args containing shell meta-characters.
19650fd6 1028# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1029ac_configure_args=
19650fd6
AS
1030ac_configure_args0=
1031ac_configure_args1=
503d2be0 1032ac_sep=
19650fd6
AS
1033ac_must_keep_next=false
1034for ac_pass in 1 2
503d2be0 1035do
19650fd6
AS
1036 for ac_arg
1037 do
1038 case $ac_arg in
1039 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1040 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1041 | -silent | --silent | --silen | --sile | --sil)
1042 continue ;;
1043 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1044 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1045 esac
1046 case $ac_pass in
1047 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1048 2)
1049 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1050 if test $ac_must_keep_next = true; then
793fa0d7 1051 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1052 else
793fa0d7
DL
1053 case $ac_arg in
1054 *=* | --config-cache | -C | -disable-* | --disable-* \
1055 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1056 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1057 | -with-* | --with-* | -without-* | --without-* | --x)
1058 case "$ac_configure_args0 " in
1059 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1060 esac
1061 ;;
1062 -* ) ac_must_keep_next=true ;;
1063 esac
19650fd6
AS
1064 fi
1065 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1066 # Get rid of the leading space.
1067 ac_sep=" "
1068 ;;
1069 esac
1070 done
503d2be0 1071done
19650fd6
AS
1072$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1073$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1074
1075# When interrupted or exit'd, cleanup temporary files, and complete
1076# config.log. We remove comments because anyway the quotes in there
1077# would cause problems or look ugly.
c0d27fcc
MR
1078# WARNING: Be sure not to use single quotes in there, as some shells,
1079# such as our DU 5.0 friend, will then `close' the trap.
503d2be0
AS
1080trap 'exit_status=$?
1081 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1082 {
1083 echo
6bae0ccf 1084
c0d27fcc
MR
1085 cat <<\_ASBOX
1086## ---------------- ##
1087## Cache variables. ##
1088## ---------------- ##
1089_ASBOX
1090 echo
1091 # The following way of writing the cache mishandles newlines in values,
503d2be0
AS
1092{
1093 (set) 2>&1 |
1094 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1095 *ac_space=\ *)
1096 sed -n \
793fa0d7
DL
1097 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1098 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
503d2be0
AS
1099 ;;
1100 *)
1101 sed -n \
793fa0d7 1102 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
1103 ;;
1104 esac;
c0d27fcc
MR
1105}
1106 echo
6bae0ccf
DL
1107
1108 cat <<\_ASBOX
1109## ----------------- ##
1110## Output variables. ##
1111## ----------------- ##
1112_ASBOX
1113 echo
1114 for ac_var in $ac_subst_vars
1115 do
1116 eval ac_val=$`echo $ac_var`
1117 echo "$ac_var='"'"'$ac_val'"'"'"
1118 done | sort
1119 echo
1120
1121 if test -n "$ac_subst_files"; then
1122 cat <<\_ASBOX
1123## ------------- ##
1124## Output files. ##
1125## ------------- ##
1126_ASBOX
1127 echo
1128 for ac_var in $ac_subst_files
1129 do
1130 eval ac_val=$`echo $ac_var`
793fa0d7 1131 echo "$ac_var='"'"'$ac_val'"'"'"
6bae0ccf
DL
1132 done | sort
1133 echo
1134 fi
1135
c0d27fcc
MR
1136 if test -s confdefs.h; then
1137 cat <<\_ASBOX
1138## ----------- ##
1139## confdefs.h. ##
1140## ----------- ##
1141_ASBOX
1142 echo
6bae0ccf 1143 sed "/^$/d" confdefs.h | sort
c0d27fcc
MR
1144 echo
1145 fi
1146 test "$ac_signal" != 0 &&
1147 echo "$as_me: caught signal $ac_signal"
1148 echo "$as_me: exit $exit_status"
1149 } >&5
851a3062 1150 rm -f core *.core &&
c0d27fcc 1151 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0
AS
1152 exit $exit_status
1153 ' 0
1154for ac_signal in 1 2 13 15; do
1155 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1156done
1157ac_signal=0
1158
1159# confdefs.h avoids OS command line length limits that DEFS can exceed.
1160rm -rf conftest* confdefs.h
1161# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1162echo >confdefs.h
ba4481b5 1163
c0d27fcc
MR
1164# Predefined preprocessor variables.
1165
1166cat >>confdefs.h <<_ACEOF
1167#define PACKAGE_NAME "$PACKAGE_NAME"
1168_ACEOF
1169
1170
1171cat >>confdefs.h <<_ACEOF
1172#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1173_ACEOF
1174
1175
1176cat >>confdefs.h <<_ACEOF
1177#define PACKAGE_VERSION "$PACKAGE_VERSION"
1178_ACEOF
1179
1180
1181cat >>confdefs.h <<_ACEOF
1182#define PACKAGE_STRING "$PACKAGE_STRING"
1183_ACEOF
1184
1185
1186cat >>confdefs.h <<_ACEOF
1187#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1188_ACEOF
1189
1190
503d2be0 1191# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
1192# Prefer explicitly selected file to automatically selected ones.
1193if test -z "$CONFIG_SITE"; then
1194 if test "x$prefix" != xNONE; then
1195 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1196 else
1197 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1198 fi
1199fi
1200for ac_site_file in $CONFIG_SITE; do
1201 if test -r "$ac_site_file"; then
c0d27fcc 1202 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1203echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1204 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1205 . "$ac_site_file"
1206 fi
1207done
1208
1209if test -r "$cache_file"; then
503d2be0
AS
1210 # Some versions of bash will fail to source /dev/null (special
1211 # files actually), so we avoid doing that.
1212 if test -f "$cache_file"; then
c0d27fcc 1213 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1214echo "$as_me: loading cache $cache_file" >&6;}
1215 case $cache_file in
1216 [\\/]* | ?:[\\/]* ) . $cache_file;;
1217 *) . ./$cache_file;;
1218 esac
1219 fi
ba4481b5 1220else
c0d27fcc 1221 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1222echo "$as_me: creating cache $cache_file" >&6;}
1223 >$cache_file
1224fi
1225
1226# Check that the precious variables saved in the cache have kept the same
1227# value.
1228ac_cache_corrupted=false
1229for ac_var in `(set) 2>&1 |
793fa0d7 1230 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
503d2be0
AS
1231 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1232 eval ac_new_set=\$ac_env_${ac_var}_set
1233 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1234 eval ac_new_val="\$ac_env_${ac_var}_value"
1235 case $ac_old_set,$ac_new_set in
1236 set,)
c0d27fcc 1237 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1238echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1239 ac_cache_corrupted=: ;;
1240 ,set)
c0d27fcc 1241 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1242echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1243 ac_cache_corrupted=: ;;
1244 ,);;
1245 *)
1246 if test "x$ac_old_val" != "x$ac_new_val"; then
793fa0d7 1247 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1248echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
793fa0d7 1249 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1250echo "$as_me: former value: $ac_old_val" >&2;}
793fa0d7 1251 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1252echo "$as_me: current value: $ac_new_val" >&2;}
793fa0d7 1253 ac_cache_corrupted=:
503d2be0
AS
1254 fi;;
1255 esac
c0d27fcc 1256 # Pass precious variables to config.status.
503d2be0
AS
1257 if test "$ac_new_set" = set; then
1258 case $ac_new_val in
1259 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
c0d27fcc
MR
1260 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1261 *) ac_arg=$ac_var=$ac_new_val ;;
1262 esac
1263 case " $ac_configure_args " in
1264 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1265 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1266 esac
1267 fi
1268done
1269if $ac_cache_corrupted; then
c0d27fcc 1270 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1271echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1272 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1273echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1274 { (exit 1); exit 1; }; }
ba4481b5
DL
1275fi
1276
1277ac_ext=c
ba4481b5 1278ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
1279ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1280ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1281ac_compiler_gnu=$ac_cv_c_compiler_gnu
1282
c0d27fcc
MR
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
ba4481b5 1299
6bae0ccf
DL
1300
1301 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1302
c0d27fcc 1303
ba5da88a
PJ
1304test "$program_prefix" != NONE &&
1305 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1306# Use a double $ so make ignores it.
1307test "$program_suffix" != NONE &&
1308 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1309# Double any \ or $. echo might interpret backslashes.
1310# By default was `s,x,x', remove it if useless.
1311cat <<\_ACEOF >conftest.sed
1312s/[\\$]/&&/g;s/;s,x,x,$//
1313_ACEOF
1314program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1315rm conftest.sed
1316
c0d27fcc 1317
ba4481b5
DL
1318lispdir='${datadir}/emacs/${version}/lisp'
1319locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1320'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1321lisppath='${locallisppath}:${lispdir}'
1322etcdir='${datadir}/emacs/${version}/etc'
1323archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1324docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1325gamedir='${localstatedir}/games/emacs'
98418dba
CW
1326
1327gameuser=games
1328
c0d27fcc 1329
ba4481b5
DL
1330# Check whether --with-gcc or --without-gcc was given.
1331if test "${with_gcc+set}" = set; then
1332 withval="$with_gcc"
503d2be0
AS
1333
1334fi;
ba4481b5
DL
1335
1336# Check whether --with-pop or --without-pop was given.
1337if test "${with_pop+set}" = set; then
1338 withval="$with_pop"
243cf185 1339 if test "$withval" = yes; then
c0d27fcc 1340 cat >>confdefs.h <<\_ACEOF
ba4481b5 1341#define MAIL_USE_POP 1
c0d27fcc 1342_ACEOF
ba4481b5 1343
243cf185
DL
1344else :
1345fi
3d9fec71 1346else
c0d27fcc 1347 cat >>confdefs.h <<\_ACEOF
3d9fec71 1348#define MAIL_USE_POP 1
c0d27fcc 1349_ACEOF
3d9fec71 1350
503d2be0 1351fi;
ba4481b5 1352
c0d27fcc 1353
a21616bd
KR
1354# Check whether --with-kerberos or --without-kerberos was given.
1355if test "${with_kerberos+set}" = set; then
1356 withval="$with_kerberos"
c0d27fcc 1357 cat >>confdefs.h <<\_ACEOF
a21616bd 1358#define KERBEROS 1
c0d27fcc 1359_ACEOF
a21616bd 1360
503d2be0 1361fi;
a21616bd 1362
c0d27fcc 1363
a21616bd
KR
1364# Check whether --with-kerberos5 or --without-kerberos5 was given.
1365if test "${with_kerberos5+set}" = set; then
1366 withval="$with_kerberos5"
1367 if test "${with_kerberos5+set}" = set; then
1368 if test "${with_kerberos+set}" != set; then
1369 with_kerberos=yes
c0d27fcc 1370 cat >>confdefs.h <<\_ACEOF
a21616bd 1371#define KERBEROS 1
c0d27fcc 1372_ACEOF
a21616bd
KR
1373
1374 fi
1375fi
b936fae4 1376
c0d27fcc 1377cat >>confdefs.h <<\_ACEOF
a21616bd 1378#define KERBEROS5 1
c0d27fcc 1379_ACEOF
a21616bd 1380
503d2be0 1381fi;
a21616bd 1382
ba4481b5
DL
1383# Check whether --with-hesiod or --without-hesiod was given.
1384if test "${with_hesiod+set}" = set; then
1385 withval="$with_hesiod"
b936fae4 1386
c0d27fcc 1387cat >>confdefs.h <<\_ACEOF
ba4481b5 1388#define HESIOD 1
c0d27fcc 1389_ACEOF
ba4481b5 1390
503d2be0 1391fi;
ba4481b5 1392
c0d27fcc 1393
2c9dccc9
PJ
1394# Check whether --with-sound or --without-sound was given.
1395if test "${with_sound+set}" = set; then
1396 withval="$with_sound"
1397
1398fi;
1399
c0d27fcc 1400
ba4481b5
DL
1401# Check whether --with-x-toolkit or --without-x-toolkit was given.
1402if test "${with_x_toolkit+set}" = set; then
1403 withval="$with_x_toolkit"
1404 case "${withval}" in
1405 y | ye | yes ) val=athena ;;
1406 n | no ) val=no ;;
1407 l | lu | luc | luci | lucid ) val=lucid ;;
1408 a | at | ath | athe | athen | athena ) val=athena ;;
1409 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1410 g | gt | gtk ) val=gtk ;;
ba4481b5 1411 * )
c0d27fcc 1412{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1413this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1414Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1415echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1416this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1417Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1418 { (exit 1); exit 1; }; }
ba4481b5
DL
1419 ;;
1420 esac
1421 with_x_toolkit=$val
1422
503d2be0 1423fi;
ba4481b5
DL
1424
1425# Check whether --with-xpm or --without-xpm was given.
1426if test "${with_xpm+set}" = set; then
1427 withval="$with_xpm"
503d2be0
AS
1428
1429fi;
ba4481b5
DL
1430
1431# Check whether --with-jpeg or --without-jpeg was given.
1432if test "${with_jpeg+set}" = set; then
1433 withval="$with_jpeg"
503d2be0
AS
1434
1435fi;
ba4481b5
DL
1436
1437# Check whether --with-tiff or --without-tiff was given.
1438if test "${with_tiff+set}" = set; then
1439 withval="$with_tiff"
503d2be0
AS
1440
1441fi;
ba4481b5
DL
1442
1443# Check whether --with-gif or --without-gif was given.
1444if test "${with_gif+set}" = set; then
1445 withval="$with_gif"
503d2be0
AS
1446
1447fi;
ba4481b5
DL
1448
1449# Check whether --with-png or --without-png was given.
1450if test "${with_png+set}" = set; then
1451 withval="$with_png"
503d2be0
AS
1452
1453fi;
ba4481b5 1454
488dd4c4
JD
1455# Check whether --with-gtk or --without-gtk was given.
1456if test "${with_gtk+set}" = set; then
1457 withval="$with_gtk"
1458
1459fi;
1460
1461# Check whether --with-pkg-config-prog or --without-pkg-config-prog was given.
1462if test "${with_pkg_config_prog+set}" = set; then
1463 withval="$with_pkg_config_prog"
1464
1465fi;
1466
ba4481b5
DL
1467# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1468if test "${with_toolkit_scroll_bars+set}" = set; then
1469 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1470
1471fi;
ba4481b5 1472
1d36487c
GM
1473# Check whether --with-xim or --without-xim was given.
1474if test "${with_xim+set}" = set; then
1475 withval="$with_xim"
1d36487c 1476
503d2be0 1477fi;
ba4481b5 1478
e0f712ba
AC
1479# Check whether --with-carbon or --without-carbon was given.
1480if test "${with_carbon+set}" = set; then
1481 withval="$with_carbon"
1482
1483fi;
6a3a24fa
JD
1484# Check whether --enable-carbon-app or --disable-carbon-app was given.
1485if test "${enable_carbon_app+set}" = set; then
1486 enableval="$enable_carbon_app"
1487 carbon_appdir_x=${enableval}
1488fi;
e0f712ba 1489
19650fd6
AS
1490# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1491if test "${enable_maintainer_mode+set}" = set; then
1492 enableval="$enable_maintainer_mode"
1493 USE_MAINTAINER_MODE=$enableval
1494else
1495 USE_MAINTAINER_MODE=no
1496fi;
1497if test $USE_MAINTAINER_MODE = yes; then
1498 MAINT=
1499else
1500 MAINT=#
1501fi
1502
1503
ba4481b5 1504#### Make srcdir absolute, if it isn't already. It's important to
17494071 1505#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1506#### give you automounter prefixes, which can go away. We do all this
1507#### so Emacs can find its files when run uninstalled.
17494071
GM
1508## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1509unset CDPATH
ba4481b5
DL
1510case "${srcdir}" in
1511 /* ) ;;
1512 . )
1513 ## We may be able to use the $PWD environment variable to make this
1514 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
1515 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1516 ## but that tested only for a well-formed and valid PWD,
1517 ## it did not object when PWD was well-formed and valid but just wrong.
1518 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
1519 then
1520 srcdir="$PWD"
1521 else
1522 srcdir="`(cd ${srcdir}; pwd)`"
1523 fi
1524 ;;
1525 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1526esac
1527
1528#### Check if the source directory already has a configured system in it.
1529if test `pwd` != `(cd ${srcdir} && pwd)` \
1530 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 1531 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1532 as a build directory right now; it has been configured in its own
1533 right. To configure in another directory as well, you MUST
1534 use GNU make. If you do not have GNU make, then you must
1535 now do \`make distclean' in ${srcdir},
1536 and then run $0 again." >&5
1537echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1538 as a build directory right now; it has been configured in its own
1539 right. To configure in another directory as well, you MUST
1540 use GNU make. If you do not have GNU make, then you must
1541 now do \`make distclean' in ${srcdir},
503d2be0 1542 and then run $0 again." >&2;}
ba4481b5 1543
22044edf 1544extrasub='/^VPATH[ ]*=/c\
ba4481b5
DL
1545vpath %.c $(srcdir)\
1546vpath %.h $(srcdir)\
1547vpath %.y $(srcdir)\
1548vpath %.l $(srcdir)\
1549vpath %.s $(srcdir)\
1550vpath %.in $(srcdir)\
1551vpath %.texi $(srcdir)'
1552fi
1553
1554#### Given the configuration name, set machfile and opsysfile to the
1555#### names of the m/*.h and s/*.h files we should use.
1556
1557### Canonicalize the configuration name.
1558
1559ac_aux_dir=
1560for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1561 if test -f $ac_dir/install-sh; then
1562 ac_aux_dir=$ac_dir
1563 ac_install_sh="$ac_aux_dir/install-sh -c"
1564 break
1565 elif test -f $ac_dir/install.sh; then
1566 ac_aux_dir=$ac_dir
1567 ac_install_sh="$ac_aux_dir/install.sh -c"
1568 break
503d2be0
AS
1569 elif test -f $ac_dir/shtool; then
1570 ac_aux_dir=$ac_dir
1571 ac_install_sh="$ac_aux_dir/shtool install -c"
1572 break
ba4481b5
DL
1573 fi
1574done
1575if test -z "$ac_aux_dir"; then
c0d27fcc 1576 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1577echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1578 { (exit 1); exit 1; }; }
ba4481b5 1579fi
503d2be0
AS
1580ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1581ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1582ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1583
1584# Make sure we can run config.sub.
503d2be0 1585$ac_config_sub sun4 >/dev/null 2>&1 ||
c0d27fcc 1586 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1587echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1588 { (exit 1); exit 1; }; }
1589
c0d27fcc 1590echo "$as_me:$LINENO: checking build system type" >&5
503d2be0
AS
1591echo $ECHO_N "checking build system type... $ECHO_C" >&6
1592if test "${ac_cv_build+set}" = set; then
1593 echo $ECHO_N "(cached) $ECHO_C" >&6
1594else
1595 ac_cv_build_alias=$build_alias
1596test -z "$ac_cv_build_alias" &&
1597 ac_cv_build_alias=`$ac_config_guess`
1598test -z "$ac_cv_build_alias" &&
c0d27fcc 1599 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1600echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1601 { (exit 1); exit 1; }; }
1602ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
c0d27fcc
MR
1603 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1604echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
503d2be0
AS
1605 { (exit 1); exit 1; }; }
1606
1607fi
c0d27fcc 1608echo "$as_me:$LINENO: result: $ac_cv_build" >&5
503d2be0
AS
1609echo "${ECHO_T}$ac_cv_build" >&6
1610build=$ac_cv_build
1611build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1612build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1613build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1614
c0d27fcc
MR
1615
1616echo "$as_me:$LINENO: checking host system type" >&5
503d2be0
AS
1617echo $ECHO_N "checking host system type... $ECHO_C" >&6
1618if test "${ac_cv_host+set}" = set; then
1619 echo $ECHO_N "(cached) $ECHO_C" >&6
1620else
1621 ac_cv_host_alias=$host_alias
1622test -z "$ac_cv_host_alias" &&
1623 ac_cv_host_alias=$ac_cv_build_alias
1624ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
c0d27fcc 1625 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1626echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1627 { (exit 1); exit 1; }; }
1628
1629fi
c0d27fcc 1630echo "$as_me:$LINENO: result: $ac_cv_host" >&5
503d2be0
AS
1631echo "${ECHO_T}$ac_cv_host" >&6
1632host=$ac_cv_host
1633host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1634host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1635host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5 1636
c0d27fcc 1637
ba4481b5 1638canonical=$host
531a3336 1639configuration=${host_alias-$host}
ba4481b5 1640
c0d27fcc 1641
22044edf 1642
ba4481b5
DL
1643### If you add support for a new configuration, add code to this
1644### switch statement to recognize your configuration name and select
1645### the appropriate operating system and machine description files.
1646
1647### You would hope that you could choose an m/*.h file pretty much
1648### based on the machine portion of the configuration name, and an s-
1649### file based on the operating system portion. However, it turns out
1650### that each m/*.h file is pretty manufacturer-specific - for
1651### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1652### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1653### machines. So we basically have to have a special case for each
1654### configuration name.
1655###
1656### As far as handling version numbers on operating systems is
1657### concerned, make sure things will fail in a fixable way. If
1658### /etc/MACHINES doesn't say anything about version numbers, be
1659### prepared to handle anything reasonably. If version numbers
1660### matter, be sure /etc/MACHINES says something about it.
1661###
1662### Eric Raymond says we should accept strings like "sysvr4" to mean
1663### "System V Release 4"; he writes, "The old convention encouraged
1664### confusion between `system' and `release' levels'."
1665
1666machine='' opsys='' unported=no
1667case "${canonical}" in
1668
1096bcc0
GM
1669 ## FreeBSD ports
1670 *-*-freebsd* )
1671 opsys=freebsd
1672 case "${canonical}" in
1673 alpha*-*-freebsd*) machine=alpha ;;
1674 i[3456]86-*-freebsd*) machine=intel386 ;;
1675 esac
1676 ;;
1677
ba4481b5
DL
1678 ## NetBSD ports
1679 *-*-netbsd* )
1680 opsys=netbsd
dd038e26 1681 if test -f /usr/lib/crti.o; then
f57bd967
DL
1682
1683cat >>confdefs.h <<\_ACEOF
1684#define HAVE_CRTIN
dd038e26
AS
1685_ACEOF
1686
1687 fi
1688
ba4481b5
DL
1689 case "${canonical}" in
1690 alpha*-*-netbsd*) machine=alpha ;;
1691 i[3456]86-*-netbsd*) machine=intel386 ;;
1692 m68k-*-netbsd*)
1693 # This is somewhat bogus.
1694 machine=hp9000s300 ;;
1695 powerpc-apple-netbsd*) machine=macppc ;;
1696 mips-*-netbsd*) machine=pmax ;;
2df636f4 1697 mipsel-*-netbsd*) machine=pmax ;;
97836269 1698 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 1699 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1700 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1701 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1702 vax-*-netbsd*) machine=vax ;;
2df636f4 1703 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1704 esac
1705 ;;
1706
1707 ## OpenBSD ports
1708 *-*-openbsd* )
1709 opsys=openbsd
1710 case "${canonical}" in
1711 alpha*-*-openbsd*) machine=alpha ;;
1712 i386-*-openbsd*) machine=intel386 ;;
1713 m68k-*-openbsd*) machine=hp9000s300 ;;
1714 mipsel-*-openbsd*) machine=pmax ;;
1715 ns32k-*-openbsd*) machine=ns32000 ;;
1716 sparc-*-openbsd*) machine=sparc ;;
1717 vax-*-openbsd*) machine=vax ;;
1718 esac
1719 ;;
1720
1721 ## Acorn RISCiX:
1722 arm-acorn-riscix1.1* )
1723 machine=acorn opsys=riscix1-1
1724 ;;
1725 arm-acorn-riscix1.2* | arm-acorn-riscix )
1726 ## This name is riscix12 instead of riscix1.2
1727 ## to avoid a file name conflict on MSDOS.
1728 machine=acorn opsys=riscix12
1729 ;;
1730
1731 ## BSDI ports
1732 *-*-bsdi* )
1733 opsys=bsdi
1734 case "${canonical}" in
1735 i[345]86-*-bsdi*) machine=intel386 ;;
1736 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1737 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1738 esac
1739 case "${canonical}" in
1740 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1741 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1742 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1743 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1744 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1745 esac
1746 ;;
1747
1748 ## Alliant machines
1749 ## Strictly speaking, we need the version of the alliant operating
1750 ## system to choose the right machine file, but currently the
1751 ## configuration name doesn't tell us enough to choose the right
1752 ## one; we need to give alliants their own operating system name to
1753 ## do this right. When someone cares, they can help us.
1754 fx80-alliant-* )
1755 machine=alliant4 opsys=bsd4-2
1756 ;;
1757 i860-alliant-* )
1758 machine=alliant-2800 opsys=bsd4-3
1759 ;;
1760
1761 ## Alpha (DEC) machines.
1762 alpha*-dec-osf* )
1763 machine=alpha opsys=osf1
1764 # This is needed to find X11R6.1 libraries for certain tests.
1765 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1766 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1767 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1768 # due to non-traditional preprocessing with the current compiler
1769 # defaults. OSF 4 can also have that compiler version, and there
1770 # seems always to have been a usable /usr/bin/cpp.
1771 NON_GNU_CPP=/usr/bin/cpp
ca512671 1772 case "${canonical}" in
a55b799a 1773 alpha*-dec-osf[5-9]*)
bb17930d 1774 opsys=osf5-0 ;;
ca512671 1775 esac
ba4481b5
DL
1776 ;;
1777
1778 alpha*-*-linux-gnu* )
1779 machine=alpha opsys=gnu-linux
1780 ;;
1781
c4bb2108
DL
1782 arm*-*-linux-gnu* )
1783 machine=arm opsys=gnu-linux
1784 ;;
1785
1786 ppc-*-linux | \
1787 powerpc-*-linux* )
3aeecf97 1788 machine=macppc opsys=gnu-linux
c4bb2108
DL
1789 ;;
1790
ba4481b5
DL
1791 ## Altos 3068
1792 m68*-altos-sysv* )
1793 machine=altos opsys=usg5-2
1794 ;;
1795
1796 ## Amdahl UTS
1797 580-amdahl-sysv* )
1798 machine=amdahl opsys=usg5-2-2
1799 ;;
1800
1801 ## Apollo, Domain/OS
1802 m68*-apollo-* )
1803 machine=apollo opsys=bsd4-3
1804 ;;
1805
1806 ## AT&T 3b2, 3b5, 3b15, 3b20
1807 we32k-att-sysv* )
1808 machine=att3b opsys=usg5-2-2
1809 ;;
1810
1811 ## AT&T 3b1 - The Mighty Unix PC!
1812 m68*-att-sysv* )
1813 machine=7300 opsys=usg5-2-2
1814 ;;
1815
1816 ## Bull dpx20
1817 rs6000-bull-bosx* )
1818 machine=ibmrs6000 opsys=aix3-2
1819 ;;
1820
1821 ## Bull dpx2
1822 m68*-bull-sysv3* )
1823 machine=dpx2 opsys=usg5-3
1824 ;;
1825
1826 ## Bull sps7
1827 m68*-bull-sysv2* )
1828 machine=sps7 opsys=usg5-2
1829 ;;
1830
1831 ## CCI 5/32, 6/32 -- see "Tahoe".
1832
1833 ## Celerity
1834 ## I don't know what configuration name to use for this; config.sub
1835 ## doesn't seem to know anything about it. Hey, Celerity users, get
1836 ## in touch with us!
1837 celerity-celerity-bsd* )
1838 machine=celerity opsys=bsd4-2
1839 ;;
1840
1841 ## Clipper
1842 ## What operating systems does this chip run that Emacs has been
1843 ## tested on?
1844 clipper-* )
1845 machine=clipper
1846 ## We'll use the catch-all code at the bottom to guess the
1847 ## operating system.
1848 ;;
1849
df645f7c
AS
1850 ## Compaq Nonstop
1851 mips-compaq-nonstopux* )
1852 machine=nonstopux opsys=nonstopux
1853 ;;
1854
ba4481b5
DL
1855 ## Convex
1856 *-convex-bsd* | *-convex-convexos* )
1857 machine=convex opsys=bsd4-3
1858 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1859 NON_GNU_CPP="cc -E -P"
1860 ;;
1861
1862 ## Cubix QBx/386
1863 i[3456]86-cubix-sysv* )
1864 machine=intel386 opsys=usg5-3
1865 ;;
1866
1867 ## Cydra 5
1868 cydra*-cydrome-sysv* )
1869 machine=cydra5 opsys=usg5-3
1870 ;;
1871
1872 ## Data General AViiON Machines
1873 ## DG changed naming conventions with the release of 5.4.4.10, they
1874 ## dropped the initial 5.4 but left the intervening R. Because of the
1875 ## R this shouldn't conflict with older versions of the OS (which I
1876 ## think were named like dgux4.*). In addition, DG new AViiONs series
1877 ## uses either Motorola M88k or Intel Pentium CPUs.
1878 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1879 machine=aviion opsys=dgux4
1880 ;;
1881 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1882 ## This name is dgux5-4-3 instead of dgux5-4r3
1883 ## to avoid a file name conflict on MSDOS.
1884 machine=aviion opsys=dgux5-4-3
1885 ;;
1886 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1887 machine=aviion opsys=dgux5-4r2
1888 ;;
1889 m88k-dg-dgux* )
1890 machine=aviion opsys=dgux
1891 ;;
1892
1893 ## Data General AViiON Intel (x86) Machines
1894 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1895 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1896 i[345]86-dg-dguxR4* )
1897 machine=aviion-intel opsys=dgux4
1898 ;;
1899
1900 ## DECstations
1901 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1902 machine=pmax opsys=bsd4-2
1903 ;;
1904 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1905 machine=pmax opsys=bsd4-3
1906 ;;
1907 mips-dec-ultrix* )
1908 machine=pmax opsys=ultrix4-3
1909 ;;
1910 mips-dec-osf* )
1911 machine=pmax opsys=osf1
1912 ;;
1913 mips-dec-mach_bsd4.3* )
1914 machine=pmax opsys=mach-bsd4-3
1915 ;;
1916
cd890796
JD
1917 ## Motorola Delta machines
1918 m68k-motorola-sysv* | m68000-motorola-sysv* )
1919 machine=delta opsys=usg5-3
1920 if test -z "`type gnucc | grep 'not found'`"
1921 then
1922 if test -s /etc/167config
1923 then CC="gnucc -m68040"
1924 else CC="gnucc -m68881"
1925 fi
1926 else
1927 if test -z "`type gcc | grep 'not found'`"
1928 then CC=gcc
1929 else CC=cc
1930 fi
1931 fi
1932 ;;
ba4481b5
DL
1933 m88k-motorola-sysv4* )
1934 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1935 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1936 # I hope there are not other 4.0 versions for this machine
1937 # which really need usg5-4 instead.
1938 machine=delta88k opsys=usg5-4-2
1939 ;;
1940 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1941 machine=delta88k opsys=usg5-3
1942 ;;
1943
1944 ## Dual machines
1945 m68*-dual-sysv* )
1946 machine=dual opsys=usg5-2
1947 ;;
1948 m68*-dual-uniplus* )
1949 machine=dual opsys=unipl5-2
1950 ;;
1951
1952 ## Elxsi 6400
1953 elxsi-elxsi-sysv* )
1954 machine=elxsi opsys=usg5-2
1955 ;;
1956
1957 ## Encore machines
1958 ns16k-encore-bsd* )
1959 machine=ns16000 opsys=umax
1960 ;;
1961
65171e3a
DL
1962 ## The GEC 63 - apparently, this port isn't really finished yet.
1963 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
1964
1965 ## Gould Power Node and NP1
1966 pn-gould-bsd4.2* )
1967 machine=gould opsys=bsd4-2
1968 ;;
1969 pn-gould-bsd4.3* )
1970 machine=gould opsys=bsd4-3
1971 ;;
1972 np1-gould-bsd* )
1973 machine=gould-np1 opsys=bsd4-3
1974 ;;
1975
1976 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1977 ## as far as Emacs is concerned).
1978 m88k-harris-cxux* )
1979 # Build needs to be different on 7.0 and later releases
1980 case "`uname -r`" in
1981 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1982 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1983 esac
1984 NON_GNU_CPP="/lib/cpp"
1985 ;;
1986 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1987 m68k-harris-cxux* )
1988 machine=nh3000 opsys=cxux
1989 ;;
1990 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1991 powerpc-harris-powerunix )
1992 machine=nh6000 opsys=powerunix
1993 NON_GNU_CPP="cc -Xo -E -P"
1994 ;;
1995 ## SR2001/SR2201 running HI-UX/MPP
1996 hppa1.1-hitachi-hiuxmpp* )
1997 machine=sr2k opsys=hiuxmpp
1998 ;;
89a336fa
GM
1999 hppa1.1-hitachi-hiuxwe2* )
2000 machine=sr2k opsys=hiuxwe2
2001 ;;
ba4481b5
DL
2002 ## Honeywell XPS100
2003 xps*-honeywell-sysv* )
2004 machine=xps100 opsys=usg5-2
2005 ;;
2006
2007 ## HP 9000 series 200 or 300
2008 m68*-hp-bsd* )
2009 machine=hp9000s300 opsys=bsd4-3
2010 ;;
2011 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2012 m68*-hp-hpux* )
2013 case "`uname -r`" in
2014 ## Someone's system reports A.B8.05 for this.
2015 ## I wonder what other possibilities there are.
2016 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2017 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2018 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2019 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2020 *) machine=hp9000s300 opsys=hpux ;;
2021 esac
2022 ;;
2023
2024 ## HP 9000 series 700 and 800, running HP/UX
2025 hppa*-hp-hpux7* )
2026 machine=hp800 opsys=hpux
2027 ;;
2028 hppa*-hp-hpux8* )
2029 machine=hp800 opsys=hpux8
2030 ;;
2031 hppa*-hp-hpux9shr* )
2032 machine=hp800 opsys=hpux9shr
2033 ;;
2034 hppa*-hp-hpux9* )
2035 machine=hp800 opsys=hpux9
2036 ;;
b0e44248
RB
2037 hppa*-hp-hpux10.2* )
2038 machine=hp800 opsys=hpux10-20
2039 ;;
cc227489 2040 hppa*-hp-hpux10* )
ba4481b5
DL
2041 machine=hp800 opsys=hpux10
2042 ;;
cc227489
MB
2043 hppa*-hp-hpux1[1-9]* )
2044 machine=hp800 opsys=hpux11
2045 ;;
ba4481b5 2046
409d9577
GM
2047 hppa*-*-linux-gnu* )
2048 machine=hp800 opsys=gnu-linux
2049 ;;
2050
ba4481b5
DL
2051 ## HP 9000 series 700 and 800, running HP/UX
2052 hppa*-hp-hpux* )
2053 ## Cross-compilation? Nah!
2054 case "`uname -r`" in
2055 ## Someone's system reports A.B8.05 for this.
2056 ## I wonder what other possibilities there are.
2057 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2058 *.08.* ) machine=hp800 opsys=hpux8 ;;
2059 *.09.* ) machine=hp800 opsys=hpux9 ;;
2060 *) machine=hp800 opsys=hpux10 ;;
2061 esac
2062 ;;
2063 hppa*-*-nextstep* )
2064 machine=hp800 opsys=nextstep
2065 ;;
2066
2067 ## Orion machines
2068 orion-orion-bsd* )
2069 machine=orion opsys=bsd4-2
2070 ;;
2071 clipper-orion-bsd* )
2072 machine=orion105 opsys=bsd4-2
2073 ;;
2074
2075 ## IBM machines
2076 i[3456]86-ibm-aix1.1* )
2077 machine=ibmps2-aix opsys=usg5-2-2
2078 ;;
2079 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2080 machine=ibmps2-aix opsys=usg5-3
2081 ;;
2082 i370-ibm-aix*)
2083 machine=ibm370aix opsys=usg5-3
2084 ;;
55597d70 2085 s390-*-linux-gnu* )
138f0859
GM
2086 machine=ibms390 opsys=gnu-linux
2087 ;;
ba4481b5
DL
2088 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2089 machine=ibmrs6000 opsys=aix3-1
2090 ;;
2091 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2092 machine=ibmrs6000 opsys=aix3-2-5
2093 ;;
2094 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2095 machine=ibmrs6000 opsys=aix4-1
2096 ;;
2097 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2098 machine=ibmrs6000 opsys=aix4-2
2099 ;;
55597d70 2100 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2101 machine=ibmrs6000 opsys=aix4-2
2102 ;;
ba4481b5
DL
2103 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2104 machine=ibmrs6000 opsys=aix4
2105 ;;
2106 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2107 machine=ibmrs6000 opsys=aix4-1
2108 ;;
2109 rs6000-ibm-aix* | powerpc-ibm-aix* )
2110 machine=ibmrs6000 opsys=aix3-2
2111 ;;
2112 romp-ibm-bsd4.3* )
2113 machine=ibmrt opsys=bsd4-3
2114 ;;
2115 romp-ibm-bsd4.2* )
2116 machine=ibmrt opsys=bsd4-2
2117 ;;
2118 romp-ibm-aos4.3* )
2119 machine=ibmrt opsys=bsd4-3
2120 ;;
2121 romp-ibm-aos4.2* )
2122 machine=ibmrt opsys=bsd4-2
2123 ;;
2124 romp-ibm-aos* )
2125 machine=ibmrt opsys=bsd4-3
2126 ;;
2127 romp-ibm-bsd* )
2128 machine=ibmrt opsys=bsd4-3
2129 ;;
2130 romp-ibm-aix* )
2131 machine=ibmrt-aix opsys=usg5-2-2
2132 ;;
2133
2134 ## Integrated Solutions `Optimum V'
2135 m68*-isi-bsd4.2* )
2136 machine=isi-ov opsys=bsd4-2
2137 ;;
2138 m68*-isi-bsd4.3* )
2139 machine=isi-ov opsys=bsd4-3
2140 ;;
2141
2142 ## Intel 386 machines where we do care about the manufacturer
2143 i[3456]86-intsys-sysv* )
2144 machine=is386 opsys=usg5-2-2
2145 ;;
2146
2147 ## Prime EXL
2148 i[3456]86-prime-sysv* )
2149 machine=i386 opsys=usg5-3
2150 ;;
2151
2152 ## Sequent Symmetry running Dynix
2153 i[3456]86-sequent-bsd* )
2154 machine=symmetry opsys=bsd4-3
2155 ;;
2156
2157 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2158 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2159 machine=sequent-ptx opsys=ptx4
2160 NON_GNU_CPP=/lib/cpp
2161 ;;
2162
2163 ## Sequent Symmetry running DYNIX/ptx
2164 ## Use the old cpp rather than the newer ANSI one.
2165 i[3456]86-sequent-ptx* )
2166 machine=sequent-ptx opsys=ptx
2167 NON_GNU_CPP="/lib/cpp"
2168 ;;
2169
2170 ## ncr machine running svr4.3.
2171 i[3456]86-ncr-sysv4.3 )
2172 machine=ncr386 opsys=usg5-4-3
2173 ;;
2174
2175 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2176 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2177 i[3456]86-ncr-sysv* )
2178 machine=ncr386 opsys=usg5-4-2
2179 ;;
2180
2181 ## Intel Paragon OSF/1
2182 i860-intel-osf1* )
2183 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2184 ;;
2185
2186 ## Intel 860
2187 i860-*-sysv4* )
2188 machine=i860 opsys=usg5-4
2189 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2190 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2191 ;;
2192
c76e04a8
GM
2193 ## Macintosh PowerPC
2194 powerpc*-*-linux-gnu* )
2195 machine=macppc opsys=gnu-linux
2196 ;;
2197
ba4481b5
DL
2198 ## Masscomp machines
2199 m68*-masscomp-rtu* )
2200 machine=masscomp opsys=rtu
2201 ;;
2202
2203 ## Megatest machines
2204 m68*-megatest-bsd* )
2205 machine=mega68 opsys=bsd4-2
2206 ;;
2207
2208 ## Workstations sold by MIPS
2209 ## This is not necessarily all workstations using the MIPS processor -
2210 ## Irises are produced by SGI, and DECstations by DEC.
2211
2212 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2213 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2214 ## it gives for choosing between the alternatives seems to be "Use
2215 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2216 ## the BSD world." I'll assume that these are instructions for
2217 ## handling two odd situations, and that every other situation
2218 ## should use mips.h and usg5-2-2, they being listed first.
2219 mips-mips-usg* )
2220 machine=mips4
2221 ## Fall through to the general code at the bottom to decide on the OS.
2222 ;;
2223 mips-mips-riscos4* )
2224 machine=mips4 opsys=bsd4-3
2225 NON_GNU_CC="cc -systype bsd43"
2226 NON_GNU_CPP="cc -systype bsd43 -E"
2227 ;;
2228 mips-mips-riscos5* )
2229 machine=mips4 opsys=riscos5
2230 NON_GNU_CC="cc -systype bsd43"
2231 NON_GNU_CPP="cc -systype bsd43 -E"
2232 ;;
2233 mips-mips-bsd* )
2234 machine=mips opsys=bsd4-3
2235 ;;
2236 mips-mips-* )
2237 machine=mips opsys=usg5-2-2
2238 ;;
2239
2240 ## NeXT
2241 m68*-next-* | m68k-*-nextstep* )
2242 machine=m68k opsys=nextstep
2243 ;;
2244
2245 ## The complete machine from National Semiconductor
2246 ns32k-ns-genix* )
2247 machine=ns32000 opsys=usg5-2
2248 ;;
2249
2250 ## NCR machines
2251 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2252 machine=tower32 opsys=usg5-2-2
2253 ;;
2254 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2255 machine=tower32v3 opsys=usg5-3
2256 ;;
2257
2258 ## NEC EWS4800
2259 mips-nec-sysv4*)
2260 machine=ews4800 opsys=ux4800
2261 ;;
2262
2263 ## Nixdorf Targon 31
2264 m68*-nixdorf-sysv* )
2265 machine=targon31 opsys=usg5-2-2
2266 ;;
2267
2268 ## Nu (TI or LMI)
2269 m68*-nu-sysv* )
2270 machine=nu opsys=usg5-2
2271 ;;
2272
2273 ## Plexus
2274 m68*-plexus-sysv* )
2275 machine=plexus opsys=usg5-2
2276 ;;
2277
ba4481b5
DL
2278 ## Pyramid machines
2279 ## I don't really have any idea what sort of processor the Pyramid has,
2280 ## so I'm assuming it is its own architecture.
2281 pyramid-pyramid-bsd* )
2282 machine=pyramid opsys=bsd4-2
2283 ;;
2284
2285 ## Sequent Balance
2286 ns32k-sequent-bsd4.2* )
2287 machine=sequent opsys=bsd4-2
2288 ;;
2289 ns32k-sequent-bsd4.3* )
2290 machine=sequent opsys=bsd4-3
2291 ;;
2292
2293 ## Siemens Nixdorf
2294 mips-siemens-sysv* | mips-sni-sysv*)
2295 machine=mips-siemens opsys=usg5-4
2296 NON_GNU_CC=/usr/ccs/bin/cc
2297 NON_GNU_CPP=/usr/ccs/lib/cpp
2298 ;;
2299
2300 ## Silicon Graphics machines
2301 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2302 m68*-sgi-iris3.5* )
2303 machine=irist opsys=iris3-5
2304 ;;
2305 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2306 machine=irist opsys=iris3-6
2307 ;;
2308 ## Iris 4D
2309 mips-sgi-irix3* )
2310 machine=iris4d opsys=irix3-3
2311 ;;
2312 mips-sgi-irix4* )
2313 machine=iris4d opsys=irix4-0
2314 ;;
2315 mips-sgi-irix6.5 )
2316 machine=iris4d opsys=irix6-5
946173ad
DL
2317 # Without defining _LANGUAGE_C, things get masked out in the headers
2318 # so that, for instance, grepping for `free' in stdlib.h fails and
2319 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2320 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2321 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2322 ;;
2323 mips-sgi-irix6* )
2324 machine=iris4d opsys=irix6-0
c4bb2108 2325 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2326 # but presumably it does no harm.
2327 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2328 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2329 NON_GCC_TEST_OPTIONS=-32
2330 ;;
2331 mips-sgi-irix5.[01]* )
2332 machine=iris4d opsys=irix5-0
2333 ;;
2334 mips-sgi-irix5* | mips-sgi-irix* )
2335 machine=iris4d opsys=irix5-2
2336 ;;
2337
2338 ## SONY machines
2339 m68*-sony-bsd4.2* )
2340 machine=news opsys=bsd4-2
2341 ;;
2342 m68*-sony-bsd4.3* )
2343 machine=news opsys=bsd4-3
2344 ;;
2345 m68*-sony-newsos3* | m68*-sony-news3*)
2346 machine=news opsys=bsd4-3
2347 ;;
2348 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2349 machine=news-risc opsys=bsd4-3
2350 ;;
2351 mips-sony-newsos6* )
2352 machine=news-r6 opsys=newsos6
2353 ;;
2354 mips-sony-news* )
2355 machine=news-risc opsys=newsos5
2356 ;;
2357
2358 ## Stride
2359 m68*-stride-sysv* )
2360 machine=stride opsys=usg5-2
2361 ;;
2362
2363 ## Suns
2364 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2365 machine=sparc opsys=gnu-linux
2366 ;;
2367
d054101f 2368 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2369 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2370 | rs6000-*-solaris2*)
2371 case "${canonical}" in
2372 m68*-sunos1* ) machine=sun1 ;;
2373 m68*-sunos2* ) machine=sun2 ;;
2374 m68* ) machine=sun3 ;;
2375 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2376 i[3456]86-*-* ) machine=intel386 ;;
2377 powerpcle* ) machine=powerpcle ;;
2378 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2379 sparc* ) machine=sparc ;;
2380 * ) unported=yes ;;
2381 esac
2382 case "${canonical}" in
2383 ## The Sun386 didn't get past 4.0.
2384 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2385 *-sunos4.0* ) opsys=sunos4-0 ;;
2386 *-sunos4.1.[3-9]*noshare )
2387 ## This name is sunos413 instead of sunos4-1-3
2388 ## to avoid a file name conflict on MSDOS.
2389 opsys=sunos413
2390 NON_GNU_CPP=/usr/lib/cpp
2391 NON_GCC_TEST_OPTIONS=-Bstatic
2392 GCC_TEST_OPTIONS=-static
2393 ;;
2394 *-sunos4.1.[3-9]* | *-sunos4shr*)
2395 opsys=sunos4shr
2396 NON_GNU_CPP=/usr/lib/cpp
2397 ;;
2398 *-sunos4* | *-sunos )
2399 opsys=sunos4-1
2400 NON_GCC_TEST_OPTIONS=-Bstatic
2401 GCC_TEST_OPTIONS=-static
2402 ;;
2403 *-sunos5.3* | *-solaris2.3* )
2404 opsys=sol2-3
2405 NON_GNU_CPP=/usr/ccs/lib/cpp
2406 ;;
2407 *-sunos5.4* | *-solaris2.4* )
2408 opsys=sol2-4
2409 NON_GNU_CPP=/usr/ccs/lib/cpp
2410 RANLIB="ar -ts"
2411 ;;
2412 *-sunos5.5* | *-solaris2.5* )
2413 opsys=sol2-5
2414 NON_GNU_CPP=/usr/ccs/lib/cpp
2415 RANLIB="ar -ts"
2416 ;;
8e967cf7
MR
2417 *-sunos5.6* | *-solaris2.6* )
2418 opsys=sol2-6
2419 NON_GNU_CPP=/usr/ccs/lib/cpp
2420 RANLIB="ar -ts"
2421 ;;
ba4481b5 2422 *-sunos5* | *-solaris* )
9e71690e 2423 opsys=sol2-6
ba4481b5
DL
2424 NON_GNU_CPP=/usr/ccs/lib/cpp
2425 ;;
2426 * ) opsys=bsd4-2 ;;
2427 esac
2428 ## Watch out for a compiler that we know will not work.
2429 case "${canonical}" in
2430 *-solaris* | *-sunos5* )
2431 if [ "x$CC" = x/usr/ucb/cc ]; then
2432 ## /usr/ucb/cc doesn't work;
2433 ## we should find some other compiler that does work.
2434 unset CC
2435 fi
2436 ;;
2437 *) ;;
2438 esac
2439 ;;
2440 sparc-*-nextstep* )
2441 machine=sparc opsys=nextstep
2442 ;;
2443
2444 ## Tadpole 68k
2445 m68*-tadpole-sysv* )
2446 machine=tad68k opsys=usg5-3
2447 ;;
2448
2449 ## Tahoe machines
2450 tahoe-tahoe-bsd4.2* )
2451 machine=tahoe opsys=bsd4-2
2452 ;;
2453 tahoe-tahoe-bsd4.3* )
2454 machine=tahoe opsys=bsd4-3
2455 ;;
2456
2457 ## Tandem Integrity S2
2458 mips-tandem-sysv* )
2459 machine=tandem-s2 opsys=usg5-3
2460 ;;
2461
2462 ## Tektronix XD88
2463 m88k-tektronix-sysv3* )
2464 machine=tekxd88 opsys=usg5-3
2465 ;;
2466
2467 ## Tektronix 16000 box (6130?)
2468 ns16k-tektronix-bsd* )
2469 machine=ns16000 opsys=bsd4-2
2470 ;;
2471 ## Tektronix 4300
2472 ## src/m/tek4300.h hints that this is a m68k machine.
2473 m68*-tektronix-bsd* )
2474 machine=tek4300 opsys=bsd4-3
2475 ;;
2476
2477 ## Titan P2 or P3
2478 ## We seem to have lost the machine-description file titan.h!
2479 titan-titan-sysv* )
2480 machine=titan opsys=usg5-3
2481 ;;
2482
2483 ## Ustation E30 (SS5E)
2484 m68*-unisys-uniplus* )
2485 machine=ustation opsystem=unipl5-2
2486 ;;
2487
2488 ## Vaxen.
2489 vax-dec-* )
2490 machine=vax
2491 case "${canonical}" in
2492 *-bsd4.1* ) opsys=bsd4-1 ;;
2493 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2494 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2495 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2496 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2497 *-vms* ) opsys=vms ;;
2498 * ) unported=yes
2499 esac
2500 ;;
2501
2502 ## Whitechapel MG1
2503 ns16k-whitechapel-* )
2504 machine=mg1
2505 ## We don't know what sort of OS runs on these; we'll let the
2506 ## operating system guessing code below try.
2507 ;;
2508
2509 ## Wicat
2510 m68*-wicat-sysv* )
2511 machine=wicat opsys=usg5-2
2512 ;;
2513
f4988be7
GM
2514 ## IA-64
2515 ia64*-*-linux* )
2516 machine=ia64 opsys=gnu-linux
2517 ;;
2518
ba4481b5
DL
2519 ## Intel 386 machines where we don't care about the manufacturer
2520 i[3456]86-*-* )
2521 machine=intel386
2522 case "${canonical}" in
c60ee5e7 2523 *-cygwin ) opsys=cygwin ;;
9f817ea4 2524 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2525 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2526 *-isc2.2* ) opsys=isc2-2 ;;
2527 *-isc4.0* ) opsys=isc4-0 ;;
2528 *-isc4.* ) opsys=isc4-1
2529 GCC_TEST_OPTIONS=-posix
2530 NON_GCC_TEST_OPTIONS=-Xp
2531 ;;
2532 *-isc* ) opsys=isc3-0 ;;
2533 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2534 *-esix* ) opsys=esix ;;
2535 *-xenix* ) opsys=xenix ;;
2536 *-linux-gnu* ) opsys=gnu-linux ;;
2537 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2538 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2539 NON_GNU_CPP=/lib/cpp
2540 # Prevent -belf from being passed to $CPP.
2541 # /lib/cpp does not accept it.
2542 OVERRIDE_CPPFLAGS=" "
2543 ;;
2544 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2545 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2546 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2547 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2548 *-nextstep* ) opsys=nextstep ;;
2549 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2550 esac
2551 ;;
2552
2553 ## m68k Linux-based GNU system
2554 m68k-*-linux-gnu* )
2555 machine=m68k opsys=gnu-linux
2556 ;;
2557
2558 ## Mips Linux-based GNU system
cd958eb3 2559 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2560 machine=mips opsys=gnu-linux
2561 ;;
2562
2563 ## UXP/DS
2564 sparc-fujitsu-sysv4* )
2565 machine=sparc opsys=uxpds
2566 NON_GNU_CPP=/usr/ccs/lib/cpp
2567 RANLIB="ar -ts"
2568 ;;
2569
2570 ## UXP/V
2571 f301-fujitsu-uxpv4.1)
2572 machine=f301 opsys=uxpv
2573 ;;
2574
e0f712ba
AC
2575 ## Darwin / Mac OS X
2576 powerpc-apple-darwin* )
2577 machine=powermac opsys=darwin
2578 # Define CPP as follows to make autoconf work correctly.
463f5630 2579 CPP="cc -E -traditional-cpp"
e0f712ba
AC
2580 ;;
2581
598a2813
AS
2582 ## AMD x86-64 Linux-based GNU system
2583 x86_64-*-linux-gnu* )
24b01ec4 2584 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2585 ;;
2586
ba4481b5
DL
2587 * )
2588 unported=yes
2589 ;;
2590esac
2591
2592### If the code above didn't choose an operating system, just choose
2593### an operating system based on the configuration name. You really
2594### only want to use this when you have no idea what the right
2595### operating system is; if you know what operating systems a machine
2596### runs, it's cleaner to make it explicit in the case statement
2597### above.
2598if test x"${opsys}" = x; then
2599 case "${canonical}" in
2600 *-gnu* ) opsys=gnu ;;
2601 *-bsd4.[01] ) opsys=bsd4-1 ;;
2602 *-bsd4.2 ) opsys=bsd4-2 ;;
2603 *-bsd4.3 ) opsys=bsd4-3 ;;
2604 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2605 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2606 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2607 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2608 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2609 *-sysv5uw* ) opsys=unixware ;;
2610 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2611 *-sysv4.1* | *-sysvr4.1* )
2612 NON_GNU_CPP=/usr/lib/cpp
2613 opsys=usg5-4 ;;
2614 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2615 if [ x$NON_GNU_CPP = x ]; then
2616 if [ -f /usr/ccs/lib/cpp ]; then
2617 NON_GNU_CPP=/usr/ccs/lib/cpp
2618 else
2619 NON_GNU_CPP=/lib/cpp
2620 fi
2621 fi
2622 opsys=usg5-4-2 ;;
2623 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2624 * )
2625 unported=yes
2626 ;;
2627 esac
2628fi
2629
c0d27fcc 2630
22044edf 2631
ba4481b5 2632if test $unported = yes; then
c0d27fcc 2633 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2634Check \`etc/MACHINES' for recognized configuration names." >&5
2635echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2636Check \`etc/MACHINES' for recognized configuration names." >&2;}
2637 { (exit 1); exit 1; }; }
ba4481b5
DL
2638fi
2639
2640machfile="m/${machine}.h"
2641opsysfile="s/${opsys}.h"
2642
c0d27fcc 2643
ba4481b5
DL
2644#### Choose a compiler.
2645test -n "$CC" && cc_specified=yes
2646
2647# Save the value of CFLAGS that the user specified.
2648SPECIFIED_CFLAGS="$CFLAGS"
2649
2650case ${with_gcc} in
2651 "yes" ) CC="gcc" GCC=yes ;;
2652 "no" ) : ${CC=cc} ;;
503d2be0
AS
2653 * )
2654esac
2655ac_ext=c
2656ac_cpp='$CPP $CPPFLAGS'
2657ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2658ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2659ac_compiler_gnu=$ac_cv_c_compiler_gnu
2660if test -n "$ac_tool_prefix"; then
2661 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2662set dummy ${ac_tool_prefix}gcc; ac_word=$2
c0d27fcc 2663echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2664echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2665if test "${ac_cv_prog_CC+set}" = set; then
2666 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2667else
2668 if test -n "$CC"; then
2669 ac_cv_prog_CC="$CC" # Let the user override the test.
2670else
c0d27fcc
MR
2671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2672for as_dir in $PATH
2673do
2674 IFS=$as_save_IFS
2675 test -z "$as_dir" && as_dir=.
2676 for ac_exec_ext in '' $ac_executable_extensions; do
2677 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2678 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2679 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2680 break 2
2681 fi
2682done
503d2be0
AS
2683done
2684
ba4481b5
DL
2685fi
2686fi
503d2be0 2687CC=$ac_cv_prog_CC
ba4481b5 2688if test -n "$CC"; then
c0d27fcc 2689 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2690echo "${ECHO_T}$CC" >&6
2691else
c0d27fcc 2692 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2693echo "${ECHO_T}no" >&6
2694fi
2695
2696fi
2697if test -z "$ac_cv_prog_CC"; then
2698 ac_ct_CC=$CC
2699 # Extract the first word of "gcc", so it can be a program name with args.
2700set dummy gcc; ac_word=$2
c0d27fcc 2701echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2702echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2703if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2704 echo $ECHO_N "(cached) $ECHO_C" >&6
2705else
2706 if test -n "$ac_ct_CC"; then
2707 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2708else
c0d27fcc
MR
2709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2710for as_dir in $PATH
2711do
2712 IFS=$as_save_IFS
2713 test -z "$as_dir" && as_dir=.
2714 for ac_exec_ext in '' $ac_executable_extensions; do
2715 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2716 ac_cv_prog_ac_ct_CC="gcc"
2717 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2718 break 2
2719 fi
2720done
503d2be0
AS
2721done
2722
2723fi
2724fi
2725ac_ct_CC=$ac_cv_prog_ac_ct_CC
2726if test -n "$ac_ct_CC"; then
c0d27fcc 2727 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0 2728echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2729else
c0d27fcc 2730 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2731echo "${ECHO_T}no" >&6
2732fi
2733
2734 CC=$ac_ct_CC
2735else
2736 CC="$ac_cv_prog_CC"
ba4481b5
DL
2737fi
2738
2739if test -z "$CC"; then
503d2be0
AS
2740 if test -n "$ac_tool_prefix"; then
2741 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2742set dummy ${ac_tool_prefix}cc; ac_word=$2
c0d27fcc 2743echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2744echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2745if test "${ac_cv_prog_CC+set}" = set; then
2746 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2747else
2748 if test -n "$CC"; then
2749 ac_cv_prog_CC="$CC" # Let the user override the test.
2750else
c0d27fcc
MR
2751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2752for as_dir in $PATH
2753do
2754 IFS=$as_save_IFS
2755 test -z "$as_dir" && as_dir=.
2756 for ac_exec_ext in '' $ac_executable_extensions; do
2757 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2758 ac_cv_prog_CC="${ac_tool_prefix}cc"
2759 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2760 break 2
2761 fi
2762done
503d2be0
AS
2763done
2764
2765fi
2766fi
2767CC=$ac_cv_prog_CC
2768if test -n "$CC"; then
c0d27fcc 2769 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2770echo "${ECHO_T}$CC" >&6
2771else
c0d27fcc 2772 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2773echo "${ECHO_T}no" >&6
2774fi
2775
2776fi
2777if test -z "$ac_cv_prog_CC"; then
2778 ac_ct_CC=$CC
2779 # Extract the first word of "cc", so it can be a program name with args.
2780set dummy cc; ac_word=$2
c0d27fcc 2781echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2782echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2783if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2784 echo $ECHO_N "(cached) $ECHO_C" >&6
2785else
2786 if test -n "$ac_ct_CC"; then
2787 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2788else
c0d27fcc
MR
2789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2790for as_dir in $PATH
2791do
2792 IFS=$as_save_IFS
2793 test -z "$as_dir" && as_dir=.
2794 for ac_exec_ext in '' $ac_executable_extensions; do
2795 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2796 ac_cv_prog_ac_ct_CC="cc"
2797 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2798 break 2
2799 fi
2800done
503d2be0
AS
2801done
2802
2803fi
2804fi
2805ac_ct_CC=$ac_cv_prog_ac_ct_CC
2806if test -n "$ac_ct_CC"; then
c0d27fcc 2807 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2808echo "${ECHO_T}$ac_ct_CC" >&6
2809else
c0d27fcc 2810 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2811echo "${ECHO_T}no" >&6
2812fi
2813
2814 CC=$ac_ct_CC
2815else
2816 CC="$ac_cv_prog_CC"
2817fi
2818
2819fi
2820if test -z "$CC"; then
2821 # Extract the first word of "cc", so it can be a program name with args.
2822set dummy cc; ac_word=$2
c0d27fcc 2823echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2824echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2825if test "${ac_cv_prog_CC+set}" = set; then
2826 echo $ECHO_N "(cached) $ECHO_C" >&6
2827else
2828 if test -n "$CC"; then
2829 ac_cv_prog_CC="$CC" # Let the user override the test.
2830else
2831 ac_prog_rejected=no
c0d27fcc
MR
2832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2833for as_dir in $PATH
2834do
2835 IFS=$as_save_IFS
2836 test -z "$as_dir" && as_dir=.
2837 for ac_exec_ext in '' $ac_executable_extensions; do
2838 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2839 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2840 ac_prog_rejected=yes
2841 continue
2842 fi
2843 ac_cv_prog_CC="cc"
2844 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2845 break 2
2846 fi
2847done
503d2be0
AS
2848done
2849
ba4481b5
DL
2850if test $ac_prog_rejected = yes; then
2851 # We found a bogon in the path, so make sure we never use it.
2852 set dummy $ac_cv_prog_CC
2853 shift
503d2be0 2854 if test $# != 0; then
ba4481b5
DL
2855 # We chose a different compiler from the bogus one.
2856 # However, it has the same basename, so the bogon will be chosen
2857 # first if we set CC to just the basename; use the full file name.
2858 shift
6bae0ccf 2859 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2860 fi
2861fi
2862fi
2863fi
503d2be0 2864CC=$ac_cv_prog_CC
ba4481b5 2865if test -n "$CC"; then
c0d27fcc 2866 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2867echo "${ECHO_T}$CC" >&6
ba4481b5 2868else
c0d27fcc 2869 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2870echo "${ECHO_T}no" >&6
ba4481b5
DL
2871fi
2872
503d2be0
AS
2873fi
2874if test -z "$CC"; then
2875 if test -n "$ac_tool_prefix"; then
2876 for ac_prog in cl
2877 do
2878 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2879set dummy $ac_tool_prefix$ac_prog; ac_word=$2
c0d27fcc 2880echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2881echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2882if test "${ac_cv_prog_CC+set}" = set; then
2883 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2884else
2885 if test -n "$CC"; then
2886 ac_cv_prog_CC="$CC" # Let the user override the test.
2887else
c0d27fcc
MR
2888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2889for as_dir in $PATH
2890do
2891 IFS=$as_save_IFS
2892 test -z "$as_dir" && as_dir=.
2893 for ac_exec_ext in '' $ac_executable_extensions; do
2894 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2895 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2896 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2897 break 2
2898 fi
2899done
503d2be0
AS
2900done
2901
c4bb2108
DL
2902fi
2903fi
503d2be0 2904CC=$ac_cv_prog_CC
c4bb2108 2905if test -n "$CC"; then
c0d27fcc 2906 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2907echo "${ECHO_T}$CC" >&6
c4bb2108 2908else
c0d27fcc 2909 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2910echo "${ECHO_T}no" >&6
2911fi
2912
2913 test -n "$CC" && break
2914 done
2915fi
2916if test -z "$CC"; then
2917 ac_ct_CC=$CC
2918 for ac_prog in cl
2919do
2920 # Extract the first word of "$ac_prog", so it can be a program name with args.
2921set dummy $ac_prog; ac_word=$2
c0d27fcc 2922echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2923echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2924if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2925 echo $ECHO_N "(cached) $ECHO_C" >&6
2926else
2927 if test -n "$ac_ct_CC"; then
2928 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2929else
c0d27fcc
MR
2930as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2931for as_dir in $PATH
2932do
2933 IFS=$as_save_IFS
2934 test -z "$as_dir" && as_dir=.
2935 for ac_exec_ext in '' $ac_executable_extensions; do
2936 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2937 ac_cv_prog_ac_ct_CC="$ac_prog"
2938 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2939 break 2
2940 fi
2941done
503d2be0
AS
2942done
2943
c4bb2108 2944fi
503d2be0
AS
2945fi
2946ac_ct_CC=$ac_cv_prog_ac_ct_CC
2947if test -n "$ac_ct_CC"; then
c0d27fcc 2948 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2949echo "${ECHO_T}$ac_ct_CC" >&6
2950else
c0d27fcc 2951 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2952echo "${ECHO_T}no" >&6
ba4481b5
DL
2953fi
2954
503d2be0
AS
2955 test -n "$ac_ct_CC" && break
2956done
ba4481b5 2957
503d2be0
AS
2958 CC=$ac_ct_CC
2959fi
2960
2961fi
ba4481b5 2962
c0d27fcc 2963
19650fd6
AS
2964test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2965See \`config.log' for more details." >&5
2966echo "$as_me: error: no acceptable C compiler found in \$PATH
2967See \`config.log' for more details." >&2;}
503d2be0 2968 { (exit 1); exit 1; }; }
c4bb2108 2969
503d2be0 2970# Provide some information about the compiler.
c0d27fcc 2971echo "$as_me:$LINENO:" \
503d2be0
AS
2972 "checking for C compiler version" >&5
2973ac_compiler=`set X $ac_compile; echo $2`
c0d27fcc 2974{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
2975 (eval $ac_compiler --version </dev/null >&5) 2>&5
2976 ac_status=$?
c0d27fcc 2977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 2978 (exit $ac_status); }
c0d27fcc 2979{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
2980 (eval $ac_compiler -v </dev/null >&5) 2>&5
2981 ac_status=$?
c0d27fcc 2982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 2983 (exit $ac_status); }
c0d27fcc 2984{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
2985 (eval $ac_compiler -V </dev/null >&5) 2>&5
2986 ac_status=$?
c0d27fcc 2987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
2988 (exit $ac_status); }
2989
2990cat >conftest.$ac_ext <<_ACEOF
793fa0d7 2991#line $LINENO "configure"
19650fd6
AS
2992/* confdefs.h. */
2993_ACEOF
2994cat confdefs.h >>conftest.$ac_ext
2995cat >>conftest.$ac_ext <<_ACEOF
2996/* end confdefs.h. */
c4bb2108 2997
503d2be0
AS
2998int
2999main ()
3000{
3001
3002 ;
3003 return 0;
3004}
3005_ACEOF
3006ac_clean_files_save=$ac_clean_files
19650fd6 3007ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3008# Try to create an executable without -o first, disregard a.out.
3009# It will help us diagnose broken compilers, and finding out an intuition
3010# of exeext.
793fa0d7
DL
3011echo "$as_me:$LINENO: checking for C compiler default output" >&5
3012echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
503d2be0 3013ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
c0d27fcc 3014if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
503d2be0
AS
3015 (eval $ac_link_default) 2>&5
3016 ac_status=$?
c0d27fcc 3017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3018 (exit $ac_status); }; then
3019 # Find the output, starting from the most likely. This scheme is
3020# not robust to junk in `.', hence go to wildcards (a.*) only as a last
3021# resort.
c0d27fcc
MR
3022
3023# Be careful to initialize this variable, since it used to be cached.
3024# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
3025ac_cv_exeext=
19650fd6
AS
3026# b.out is created by i960 compilers.
3027for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
3028do
6bae0ccf 3029 test -f "$ac_file" || continue
503d2be0 3030 case $ac_file in
19650fd6 3031 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
793fa0d7 3032 ;;
19650fd6 3033 conftest.$ac_ext )
793fa0d7
DL
3034 # This is the source file.
3035 ;;
19650fd6 3036 [ab].out )
793fa0d7
DL
3037 # We found the default executable, but exeext='' is most
3038 # certainly right.
3039 break;;
19650fd6 3040 *.* )
793fa0d7
DL
3041 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3042 # FIXME: I believe we export ac_cv_exeext for Libtool,
3043 # but it would be cool to find out if it's true. Does anybody
3044 # maintain Libtool? --akim.
3045 export ac_cv_exeext
3046 break;;
19650fd6 3047 * )
793fa0d7 3048 break;;
503d2be0
AS
3049 esac
3050done
3051else
3052 echo "$as_me: failed program was:" >&5
19650fd6
AS
3053sed 's/^/| /' conftest.$ac_ext >&5
3054
6bae0ccf 3055{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3056See \`config.log' for more details." >&5
6bae0ccf 3057echo "$as_me: error: C compiler cannot create executables
19650fd6 3058See \`config.log' for more details." >&2;}
503d2be0
AS
3059 { (exit 77); exit 77; }; }
3060fi
3061
3062ac_exeext=$ac_cv_exeext
c0d27fcc 3063echo "$as_me:$LINENO: result: $ac_file" >&5
503d2be0
AS
3064echo "${ECHO_T}$ac_file" >&6
3065
3066# Check the compiler produces executables we can run. If not, either
3067# the compiler is broken, or we cross compile.
c0d27fcc 3068echo "$as_me:$LINENO: checking whether the C compiler works" >&5
503d2be0
AS
3069echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
3070# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3071# If not cross compiling, check that we can run a simple program.
3072if test "$cross_compiling" != yes; then
3073 if { ac_try='./$ac_file'
c0d27fcc 3074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3075 (eval $ac_try) 2>&5
3076 ac_status=$?
c0d27fcc 3077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3078 (exit $ac_status); }; }; then
3079 cross_compiling=no
ba4481b5 3080 else
503d2be0
AS
3081 if test "$cross_compiling" = maybe; then
3082 cross_compiling=yes
3083 else
c0d27fcc 3084 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3085If you meant to cross compile, use \`--host'.
3086See \`config.log' for more details." >&5
503d2be0 3087echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3088If you meant to cross compile, use \`--host'.
3089See \`config.log' for more details." >&2;}
503d2be0
AS
3090 { (exit 1); exit 1; }; }
3091 fi
ba4481b5 3092 fi
503d2be0 3093fi
c0d27fcc 3094echo "$as_me:$LINENO: result: yes" >&5
503d2be0
AS
3095echo "${ECHO_T}yes" >&6
3096
19650fd6 3097rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0
AS
3098ac_clean_files=$ac_clean_files_save
3099# Check the compiler produces executables we can run. If not, either
3100# the compiler is broken, or we cross compile.
c0d27fcc 3101echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
503d2be0 3102echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
c0d27fcc 3103echo "$as_me:$LINENO: result: $cross_compiling" >&5
503d2be0
AS
3104echo "${ECHO_T}$cross_compiling" >&6
3105
c0d27fcc
MR
3106echo "$as_me:$LINENO: checking for suffix of executables" >&5
3107echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3108if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
3109 (eval $ac_link) 2>&5
3110 ac_status=$?
c0d27fcc 3111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3112 (exit $ac_status); }; then
3113 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3114# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3115# work properly (i.e., refer to `conftest.exe'), while it won't with
3116# `rm'.
6bae0ccf
DL
3117for ac_file in conftest.exe conftest conftest.*; do
3118 test -f "$ac_file" || continue
503d2be0 3119 case $ac_file in
6bae0ccf 3120 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
503d2be0 3121 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
793fa0d7
DL
3122 export ac_cv_exeext
3123 break;;
503d2be0
AS
3124 * ) break;;
3125 esac
3126done
ba4481b5 3127else
19650fd6
AS
3128 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3129See \`config.log' for more details." >&5
3130echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3131See \`config.log' for more details." >&2;}
503d2be0 3132 { (exit 1); exit 1; }; }
ba4481b5 3133fi
ba4481b5 3134
503d2be0 3135rm -f conftest$ac_cv_exeext
c0d27fcc 3136echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
503d2be0 3137echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 3138
503d2be0
AS
3139rm -f conftest.$ac_ext
3140EXEEXT=$ac_cv_exeext
3141ac_exeext=$EXEEXT
c0d27fcc
MR
3142echo "$as_me:$LINENO: checking for suffix of object files" >&5
3143echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
503d2be0
AS
3144if test "${ac_cv_objext+set}" = set; then
3145 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3146else
503d2be0 3147 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 3148#line $LINENO "configure"
19650fd6
AS
3149/* confdefs.h. */
3150_ACEOF
3151cat confdefs.h >>conftest.$ac_ext
3152cat >>conftest.$ac_ext <<_ACEOF
3153/* end confdefs.h. */
ba4481b5 3154
503d2be0
AS
3155int
3156main ()
3157{
ba4481b5 3158
503d2be0
AS
3159 ;
3160 return 0;
3161}
3162_ACEOF
3163rm -f conftest.o conftest.obj
c0d27fcc 3164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3165 (eval $ac_compile) 2>&5
3166 ac_status=$?
c0d27fcc 3167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3168 (exit $ac_status); }; then
3169 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3170 case $ac_file in
6bae0ccf 3171 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
503d2be0
AS
3172 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3173 break;;
3174 esac
3175done
c4bb2108 3176else
503d2be0 3177 echo "$as_me: failed program was:" >&5
19650fd6
AS
3178sed 's/^/| /' conftest.$ac_ext >&5
3179
3180{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3181See \`config.log' for more details." >&5
3182echo "$as_me: error: cannot compute suffix of object files: cannot compile
3183See \`config.log' for more details." >&2;}
503d2be0 3184 { (exit 1); exit 1; }; }
c4bb2108
DL
3185fi
3186
503d2be0
AS
3187rm -f conftest.$ac_cv_objext conftest.$ac_ext
3188fi
c0d27fcc 3189echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
503d2be0
AS
3190echo "${ECHO_T}$ac_cv_objext" >&6
3191OBJEXT=$ac_cv_objext
3192ac_objext=$OBJEXT
c0d27fcc 3193echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
3194echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3195if test "${ac_cv_c_compiler_gnu+set}" = set; then
3196 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3197else
503d2be0 3198 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 3199#line $LINENO "configure"
19650fd6
AS
3200/* confdefs.h. */
3201_ACEOF
3202cat confdefs.h >>conftest.$ac_ext
3203cat >>conftest.$ac_ext <<_ACEOF
3204/* end confdefs.h. */
503d2be0
AS
3205
3206int
3207main ()
3208{
3209#ifndef __GNUC__
3210 choke me
3211#endif
3212
3213 ;
3214 return 0;
3215}
3216_ACEOF
3217rm -f conftest.$ac_objext
c0d27fcc 3218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3219 (eval $ac_compile) 2>&5
3220 ac_status=$?
c0d27fcc 3221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3222 (exit $ac_status); } &&
793fa0d7 3223 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3225 (eval $ac_try) 2>&5
3226 ac_status=$?
c0d27fcc 3227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3228 (exit $ac_status); }; }; then
3229 ac_compiler_gnu=yes
3230else
3231 echo "$as_me: failed program was:" >&5
19650fd6
AS
3232sed 's/^/| /' conftest.$ac_ext >&5
3233
503d2be0
AS
3234ac_compiler_gnu=no
3235fi
3236rm -f conftest.$ac_objext conftest.$ac_ext
3237ac_cv_c_compiler_gnu=$ac_compiler_gnu
3238
3239fi
c0d27fcc 3240echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
3241echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3242GCC=`test $ac_compiler_gnu = yes && echo yes`
3243ac_test_CFLAGS=${CFLAGS+set}
3244ac_save_CFLAGS=$CFLAGS
3245CFLAGS="-g"
c0d27fcc 3246echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
503d2be0
AS
3247echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3248if test "${ac_cv_prog_cc_g+set}" = set; then
3249 echo $ECHO_N "(cached) $ECHO_C" >&6
3250else
3251 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 3252#line $LINENO "configure"
19650fd6
AS
3253/* confdefs.h. */
3254_ACEOF
3255cat confdefs.h >>conftest.$ac_ext
3256cat >>conftest.$ac_ext <<_ACEOF
3257/* end confdefs.h. */
503d2be0
AS
3258
3259int
3260main ()
3261{
3262
3263 ;
3264 return 0;
3265}
3266_ACEOF
3267rm -f conftest.$ac_objext
c0d27fcc 3268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3269 (eval $ac_compile) 2>&5
3270 ac_status=$?
c0d27fcc 3271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3272 (exit $ac_status); } &&
793fa0d7 3273 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3275 (eval $ac_try) 2>&5
3276 ac_status=$?
c0d27fcc 3277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3278 (exit $ac_status); }; }; then
ba4481b5
DL
3279 ac_cv_prog_cc_g=yes
3280else
503d2be0 3281 echo "$as_me: failed program was:" >&5
19650fd6
AS
3282sed 's/^/| /' conftest.$ac_ext >&5
3283
503d2be0 3284ac_cv_prog_cc_g=no
ba4481b5 3285fi
503d2be0 3286rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 3287fi
c0d27fcc 3288echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
503d2be0 3289echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 3290if test "$ac_test_CFLAGS" = set; then
503d2be0 3291 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3292elif test $ac_cv_prog_cc_g = yes; then
3293 if test "$GCC" = yes; then
ba4481b5
DL
3294 CFLAGS="-g -O2"
3295 else
c4bb2108 3296 CFLAGS="-g"
ba4481b5 3297 fi
22afa6e8 3298else
c4bb2108
DL
3299 if test "$GCC" = yes; then
3300 CFLAGS="-O2"
3301 else
3302 CFLAGS=
3303 fi
ba4481b5 3304fi
6bae0ccf
DL
3305echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3306echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3307if test "${ac_cv_prog_cc_stdc+set}" = set; then
3308 echo $ECHO_N "(cached) $ECHO_C" >&6
3309else
3310 ac_cv_prog_cc_stdc=no
3311ac_save_CC=$CC
3312cat >conftest.$ac_ext <<_ACEOF
793fa0d7 3313#line $LINENO "configure"
19650fd6
AS
3314/* confdefs.h. */
3315_ACEOF
3316cat confdefs.h >>conftest.$ac_ext
3317cat >>conftest.$ac_ext <<_ACEOF
3318/* end confdefs.h. */
6bae0ccf
DL
3319#include <stdarg.h>
3320#include <stdio.h>
3321#include <sys/types.h>
3322#include <sys/stat.h>
3323/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3324struct buf { int x; };
3325FILE * (*rcsopen) (struct buf *, struct stat *, int);
3326static char *e (p, i)
3327 char **p;
3328 int i;
3329{
3330 return p[i];
3331}
3332static char *f (char * (*g) (char **, int), char **p, ...)
3333{
3334 char *s;
3335 va_list v;
3336 va_start (v,p);
3337 s = g (p, va_arg (v,int));
3338 va_end (v);
3339 return s;
3340}
3341int test (int i, double x);
3342struct s1 {int (*f) (int a);};
3343struct s2 {int (*f) (double a);};
3344int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3345int argc;
3346char **argv;
3347int
3348main ()
3349{
3350return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3351 ;
3352 return 0;
3353}
3354_ACEOF
3355# Don't try gcc -ansi; that turns off useful extensions and
3356# breaks some systems' header files.
3357# AIX -qlanglvl=ansi
3358# Ultrix and OSF/1 -std1
3359# HP-UX 10.20 and later -Ae
3360# HP-UX older versions -Aa -D_HPUX_SOURCE
3361# SVR4 -Xc -D__EXTENSIONS__
3362for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3363do
3364 CC="$ac_save_CC $ac_arg"
3365 rm -f conftest.$ac_objext
3366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3367 (eval $ac_compile) 2>&5
3368 ac_status=$?
3369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3370 (exit $ac_status); } &&
793fa0d7 3371 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
3372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3373 (eval $ac_try) 2>&5
3374 ac_status=$?
3375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3376 (exit $ac_status); }; }; then
3377 ac_cv_prog_cc_stdc=$ac_arg
3378break
3379else
3380 echo "$as_me: failed program was:" >&5
19650fd6
AS
3381sed 's/^/| /' conftest.$ac_ext >&5
3382
6bae0ccf
DL
3383fi
3384rm -f conftest.$ac_objext
3385done
3386rm -f conftest.$ac_ext conftest.$ac_objext
3387CC=$ac_save_CC
3388
3389fi
3390
3391case "x$ac_cv_prog_cc_stdc" in
3392 x|xno)
3393 echo "$as_me:$LINENO: result: none needed" >&5
3394echo "${ECHO_T}none needed" >&6 ;;
3395 *)
3396 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3397echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3398 CC="$CC $ac_cv_prog_cc_stdc" ;;
3399esac
3400
503d2be0
AS
3401# Some people use a C++ compiler to compile C. Since we use `exit',
3402# in C++ we need to declare it. In case someone uses the same compiler
3403# for both compiling C and C++ we need to have the C++ compiler decide
3404# the declaration of exit, since it's the most demanding environment.
3405cat >conftest.$ac_ext <<_ACEOF
3406#ifndef __cplusplus
3407 choke me
3408#endif
3409_ACEOF
3410rm -f conftest.$ac_objext
c0d27fcc 3411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3412 (eval $ac_compile) 2>&5
3413 ac_status=$?
c0d27fcc 3414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3415 (exit $ac_status); } &&
793fa0d7 3416 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3418 (eval $ac_try) 2>&5
3419 ac_status=$?
c0d27fcc 3420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3421 (exit $ac_status); }; }; then
3422 for ac_declaration in \
463f5630 3423 '' \
503d2be0
AS
3424 'extern "C" void std::exit (int) throw (); using std::exit;' \
3425 'extern "C" void std::exit (int); using std::exit;' \
3426 'extern "C" void exit (int) throw ();' \
3427 'extern "C" void exit (int);' \
cffcede7 3428 'void exit (int);'
503d2be0
AS
3429do
3430 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 3431#line $LINENO "configure"
19650fd6
AS
3432/* confdefs.h. */
3433_ACEOF
3434cat confdefs.h >>conftest.$ac_ext
3435cat >>conftest.$ac_ext <<_ACEOF
3436/* end confdefs.h. */
abd39b57 3437$ac_declaration
463f5630 3438#include <stdlib.h>
503d2be0
AS
3439int
3440main ()
3441{
3442exit (42);
3443 ;
3444 return 0;
3445}
3446_ACEOF
3447rm -f conftest.$ac_objext
c0d27fcc 3448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3449 (eval $ac_compile) 2>&5
3450 ac_status=$?
c0d27fcc 3451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3452 (exit $ac_status); } &&
793fa0d7 3453 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3455 (eval $ac_try) 2>&5
3456 ac_status=$?
c0d27fcc 3457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3458 (exit $ac_status); }; }; then
3459 :
3460else
3461 echo "$as_me: failed program was:" >&5
19650fd6
AS
3462sed 's/^/| /' conftest.$ac_ext >&5
3463
503d2be0
AS
3464continue
3465fi
3466rm -f conftest.$ac_objext conftest.$ac_ext
3467 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 3468#line $LINENO "configure"
19650fd6
AS
3469/* confdefs.h. */
3470_ACEOF
3471cat confdefs.h >>conftest.$ac_ext
3472cat >>conftest.$ac_ext <<_ACEOF
3473/* end confdefs.h. */
503d2be0
AS
3474$ac_declaration
3475int
3476main ()
3477{
3478exit (42);
3479 ;
3480 return 0;
3481}
3482_ACEOF
3483rm -f conftest.$ac_objext
c0d27fcc 3484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3485 (eval $ac_compile) 2>&5
3486 ac_status=$?
c0d27fcc 3487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3488 (exit $ac_status); } &&
793fa0d7 3489 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3491 (eval $ac_try) 2>&5
3492 ac_status=$?
c0d27fcc 3493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3494 (exit $ac_status); }; }; then
3495 break
3496else
3497 echo "$as_me: failed program was:" >&5
19650fd6
AS
3498sed 's/^/| /' conftest.$ac_ext >&5
3499
503d2be0
AS
3500fi
3501rm -f conftest.$ac_objext conftest.$ac_ext
3502done
3503rm -f conftest*
3504if test -n "$ac_declaration"; then
3505 echo '#ifdef __cplusplus' >>confdefs.h
3506 echo $ac_declaration >>confdefs.h
3507 echo '#endif' >>confdefs.h
3508fi
ba4481b5 3509
503d2be0
AS
3510else
3511 echo "$as_me: failed program was:" >&5
19650fd6
AS
3512sed 's/^/| /' conftest.$ac_ext >&5
3513
503d2be0
AS
3514fi
3515rm -f conftest.$ac_objext conftest.$ac_ext
3516ac_ext=c
3517ac_cpp='$CPP $CPPFLAGS'
3518ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3519ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3520ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3521
c0d27fcc 3522
ba4481b5
DL
3523# On Suns, sometimes $CPP names a directory.
3524if test -n "$CPP" && test -d "$CPP"; then
3525 CPP=
3526fi
3527
3528#### Some systems specify a CPP to use unless we are using GCC.
3529#### Now that we know whether we are using GCC, we can decide whether
3530#### to use that one.
3531if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3532then
3533 CPP="$NON_GNU_CPP"
3534fi
3535
3536#### Some systems specify a CC to use unless we are using GCC.
3537#### Now that we know whether we are using GCC, we can decide whether
3538#### to use that one.
3539if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3540 test x$cc_specified != xyes
3541then
3542 CC="$NON_GNU_CC"
3543fi
3544
3545if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3546then
3547 CC="$CC $GCC_TEST_OPTIONS"
3548fi
3549
3550if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3551then
3552 CC="$CC $NON_GCC_TEST_OPTIONS"
3553fi
3554
6a3a24fa 3555#### Some other nice autoconf tests.
ba4481b5 3556
c0d27fcc 3557echo "$as_me:$LINENO: checking whether ln -s works" >&5
503d2be0
AS
3558echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3559LN_S=$as_ln_s
3560if test "$LN_S" = "ln -s"; then
c0d27fcc 3561 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 3562echo "${ECHO_T}yes" >&6
ba4481b5 3563else
c0d27fcc 3564 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
503d2be0 3565echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
3566fi
3567
503d2be0
AS
3568ac_ext=c
3569ac_cpp='$CPP $CPPFLAGS'
3570ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3571ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3572ac_compiler_gnu=$ac_cv_c_compiler_gnu
c0d27fcc 3573echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
503d2be0 3574echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
3575# On Suns, sometimes $CPP names a directory.
3576if test -n "$CPP" && test -d "$CPP"; then
3577 CPP=
3578fi
3579if test -z "$CPP"; then
503d2be0
AS
3580 if test "${ac_cv_prog_CPP+set}" = set; then
3581 echo $ECHO_N "(cached) $ECHO_C" >&6
3582else
3583 # Double quotes because CPP needs to be expanded
3584 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3585 do
3586 ac_preproc_ok=false
3587for ac_c_preproc_warn_flag in '' yes
3588do
3589 # Use a header file that comes with gcc, so configuring glibc
3590 # with a fresh cross-compiler works.
19650fd6
AS
3591 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3592 # <limits.h> exists even on freestanding compilers.
ba4481b5 3593 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3594 # not just through cpp. "Syntax error" is here to catch this case.
3595 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 3596#line $LINENO "configure"
19650fd6
AS
3597/* confdefs.h. */
3598_ACEOF
3599cat confdefs.h >>conftest.$ac_ext
3600cat >>conftest.$ac_ext <<_ACEOF
3601/* end confdefs.h. */
3602#ifdef __STDC__
3603# include <limits.h>
3604#else
3605# include <assert.h>
3606#endif
793fa0d7 3607 Syntax error
503d2be0 3608_ACEOF
c0d27fcc 3609if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3610 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3611 ac_status=$?
6bae0ccf 3612 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3613 rm -f conftest.er1
3614 cat conftest.err >&5
c0d27fcc 3615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3616 (exit $ac_status); } >/dev/null; then
3617 if test -s conftest.err; then
3618 ac_cpp_err=$ac_c_preproc_warn_flag
3619 else
3620 ac_cpp_err=
3621 fi
3622else
3623 ac_cpp_err=yes
3624fi
3625if test -z "$ac_cpp_err"; then
ba4481b5
DL
3626 :
3627else
503d2be0 3628 echo "$as_me: failed program was:" >&5
19650fd6
AS
3629sed 's/^/| /' conftest.$ac_ext >&5
3630
503d2be0
AS
3631 # Broken: fails on valid input.
3632continue
3633fi
3634rm -f conftest.err conftest.$ac_ext
3635
3636 # OK, works on sane cases. Now check whether non-existent headers
3637 # can be detected and how.
3638 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 3639#line $LINENO "configure"
19650fd6
AS
3640/* confdefs.h. */
3641_ACEOF
3642cat confdefs.h >>conftest.$ac_ext
3643cat >>conftest.$ac_ext <<_ACEOF
3644/* end confdefs.h. */
503d2be0
AS
3645#include <ac_nonexistent.h>
3646_ACEOF
c0d27fcc 3647if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3648 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3649 ac_status=$?
6bae0ccf 3650 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3651 rm -f conftest.er1
3652 cat conftest.err >&5
c0d27fcc 3653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3654 (exit $ac_status); } >/dev/null; then
3655 if test -s conftest.err; then
3656 ac_cpp_err=$ac_c_preproc_warn_flag
3657 else
3658 ac_cpp_err=
3659 fi
3660else
3661 ac_cpp_err=yes
3662fi
3663if test -z "$ac_cpp_err"; then
3664 # Broken: success on invalid input.
3665continue
c4bb2108 3666else
503d2be0 3667 echo "$as_me: failed program was:" >&5
19650fd6
AS
3668sed 's/^/| /' conftest.$ac_ext >&5
3669
503d2be0
AS
3670 # Passes both tests.
3671ac_preproc_ok=:
3672break
3673fi
3674rm -f conftest.err conftest.$ac_ext
3675
3676done
3677# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3678rm -f conftest.err conftest.$ac_ext
3679if $ac_preproc_ok; then
3680 break
3681fi
3682
3683 done
3684 ac_cv_prog_CPP=$CPP
3685
3686fi
3687 CPP=$ac_cv_prog_CPP
3688else
3689 ac_cv_prog_CPP=$CPP
3690fi
c0d27fcc 3691echo "$as_me:$LINENO: result: $CPP" >&5
503d2be0
AS
3692echo "${ECHO_T}$CPP" >&6
3693ac_preproc_ok=false
3694for ac_c_preproc_warn_flag in '' yes
3695do
3696 # Use a header file that comes with gcc, so configuring glibc
3697 # with a fresh cross-compiler works.
19650fd6
AS
3698 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3699 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
3700 # On the NeXT, cc -E runs the code through the compiler's parser,
3701 # not just through cpp. "Syntax error" is here to catch this case.
3702 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 3703#line $LINENO "configure"
19650fd6
AS
3704/* confdefs.h. */
3705_ACEOF
3706cat confdefs.h >>conftest.$ac_ext
3707cat >>conftest.$ac_ext <<_ACEOF
3708/* end confdefs.h. */
3709#ifdef __STDC__
3710# include <limits.h>
3711#else
3712# include <assert.h>
3713#endif
793fa0d7 3714 Syntax error
503d2be0 3715_ACEOF
c0d27fcc 3716if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3717 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3718 ac_status=$?
6bae0ccf 3719 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3720 rm -f conftest.er1
3721 cat conftest.err >&5
c0d27fcc 3722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3723 (exit $ac_status); } >/dev/null; then
3724 if test -s conftest.err; then
3725 ac_cpp_err=$ac_c_preproc_warn_flag
3726 else
3727 ac_cpp_err=
3728 fi
3729else
3730 ac_cpp_err=yes
3731fi
3732if test -z "$ac_cpp_err"; then
ba4481b5
DL
3733 :
3734else
503d2be0 3735 echo "$as_me: failed program was:" >&5
19650fd6
AS
3736sed 's/^/| /' conftest.$ac_ext >&5
3737
503d2be0
AS
3738 # Broken: fails on valid input.
3739continue
3740fi
3741rm -f conftest.err conftest.$ac_ext
3742
3743 # OK, works on sane cases. Now check whether non-existent headers
3744 # can be detected and how.
3745 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 3746#line $LINENO "configure"
19650fd6
AS
3747/* confdefs.h. */
3748_ACEOF
3749cat confdefs.h >>conftest.$ac_ext
3750cat >>conftest.$ac_ext <<_ACEOF
3751/* end confdefs.h. */
503d2be0
AS
3752#include <ac_nonexistent.h>
3753_ACEOF
c0d27fcc 3754if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3755 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3756 ac_status=$?
6bae0ccf 3757 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3758 rm -f conftest.er1
3759 cat conftest.err >&5
c0d27fcc 3760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3761 (exit $ac_status); } >/dev/null; then
3762 if test -s conftest.err; then
3763 ac_cpp_err=$ac_c_preproc_warn_flag
3764 else
3765 ac_cpp_err=
3766 fi
3767else
3768 ac_cpp_err=yes
c4bb2108 3769fi
503d2be0
AS
3770if test -z "$ac_cpp_err"; then
3771 # Broken: success on invalid input.
3772continue
3773else
3774 echo "$as_me: failed program was:" >&5
19650fd6
AS
3775sed 's/^/| /' conftest.$ac_ext >&5
3776
503d2be0
AS
3777 # Passes both tests.
3778ac_preproc_ok=:
3779break
ba4481b5 3780fi
503d2be0
AS
3781rm -f conftest.err conftest.$ac_ext
3782
3783done
3784# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3785rm -f conftest.err conftest.$ac_ext
3786if $ac_preproc_ok; then
3787 :
ba4481b5 3788else
19650fd6
AS
3789 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3790See \`config.log' for more details." >&5
3791echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3792See \`config.log' for more details." >&2;}
503d2be0 3793 { (exit 1); exit 1; }; }
ba4481b5 3794fi
503d2be0
AS
3795
3796ac_ext=c
3797ac_cpp='$CPP $CPPFLAGS'
3798ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3799ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3800ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3801
3802# Find a good install program. We prefer a C program (faster),
3803# so one script is as good as another. But avoid the broken or
3804# incompatible versions:
3805# SysV /etc/install, /usr/sbin/install
3806# SunOS /usr/etc/install
3807# IRIX /sbin/install
3808# AIX /bin/install
503d2be0 3809# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3810# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3811# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3812# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3813# ./install, which can be erroneously created by make from ./install.sh.
c0d27fcc
MR
3814echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3815echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
ba4481b5 3816if test -z "$INSTALL"; then
503d2be0
AS
3817if test "${ac_cv_path_install+set}" = set; then
3818 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3819else
c0d27fcc
MR
3820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3821for as_dir in $PATH
3822do
3823 IFS=$as_save_IFS
3824 test -z "$as_dir" && as_dir=.
3825 # Account for people who put trailing slashes in PATH elements.
3826case $as_dir/ in
3827 ./ | .// | /cC/* | \
3828 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3829 /usr/ucb/* ) ;;
3830 *)
3831 # OSF1 and SCO ODT 3.0 have their own names for install.
3832 # Don't use installbsd from OSF since it installs stuff as root
3833 # by default.
3834 for ac_prog in ginstall scoinst install; do
3835 for ac_exec_ext in '' $ac_executable_extensions; do
793fa0d7
DL
3836 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3837 if test $ac_prog = install &&
3838 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3839 # AIX install. It has an incompatible calling convention.
3840 :
3841 elif test $ac_prog = install &&
3842 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3843 # program-specific install script used by HP pwplus--don't use.
3844 :
3845 else
3846 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3847 break 3
3848 fi
3849 fi
ba4481b5 3850 done
c0d27fcc
MR
3851 done
3852 ;;
3853esac
3854done
3855
ba4481b5
DL
3856
3857fi
3858 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3859 INSTALL=$ac_cv_path_install
ba4481b5
DL
3860 else
3861 # As a last resort, use the slow shell script. We don't cache a
3862 # path for INSTALL within a source directory, because that will
3863 # break other packages using the cache if that directory is
3864 # removed, or if the path is relative.
503d2be0 3865 INSTALL=$ac_install_sh
ba4481b5
DL
3866 fi
3867fi
c0d27fcc 3868echo "$as_me:$LINENO: result: $INSTALL" >&5
503d2be0 3869echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3870
3871# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3872# It thinks the first close brace ends the variable substitution.
3873test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3874
503d2be0 3875test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3876
ba4481b5
DL
3877test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3878
c0d27fcc
MR
3879if test "x$RANLIB" = x; then
3880 if test -n "$ac_tool_prefix"; then
3881 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3882set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3883echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0 3884echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c0d27fcc 3885if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 3886 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3887else
3888 if test -n "$RANLIB"; then
3889 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3890else
c0d27fcc
MR
3891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3892for as_dir in $PATH
3893do
3894 IFS=$as_save_IFS
3895 test -z "$as_dir" && as_dir=.
3896 for ac_exec_ext in '' $ac_executable_extensions; do
3897 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3898 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3899 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3900 break 2
3901 fi
3902done
503d2be0
AS
3903done
3904
7397acc4
DL
3905fi
3906fi
503d2be0 3907RANLIB=$ac_cv_prog_RANLIB
7397acc4 3908if test -n "$RANLIB"; then
c0d27fcc 3909 echo "$as_me:$LINENO: result: $RANLIB" >&5
503d2be0
AS
3910echo "${ECHO_T}$RANLIB" >&6
3911else
c0d27fcc 3912 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
3913echo "${ECHO_T}no" >&6
3914fi
3915
3916fi
3917if test -z "$ac_cv_prog_RANLIB"; then
3918 ac_ct_RANLIB=$RANLIB
3919 # Extract the first word of "ranlib", so it can be a program name with args.
3920set dummy ranlib; ac_word=$2
c0d27fcc 3921echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
3922echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3923if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3924 echo $ECHO_N "(cached) $ECHO_C" >&6
3925else
3926 if test -n "$ac_ct_RANLIB"; then
3927 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3928else
c0d27fcc
MR
3929as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3930for as_dir in $PATH
3931do
3932 IFS=$as_save_IFS
3933 test -z "$as_dir" && as_dir=.
3934 for ac_exec_ext in '' $ac_executable_extensions; do
3935 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3936 ac_cv_prog_ac_ct_RANLIB="ranlib"
3937 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3938 break 2
3939 fi
3940done
503d2be0
AS
3941done
3942
3943 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3944fi
3945fi
3946ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3947if test -n "$ac_ct_RANLIB"; then
c0d27fcc 3948 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
503d2be0
AS
3949echo "${ECHO_T}$ac_ct_RANLIB" >&6
3950else
c0d27fcc 3951 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
3952echo "${ECHO_T}no" >&6
3953fi
3954
3955 RANLIB=$ac_ct_RANLIB
7397acc4 3956else
503d2be0 3957 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
3958fi
3959
3960fi
9e71690e
DK
3961# Extract the first word of "install-info", so it can be a program name with args.
3962set dummy install-info; ac_word=$2
3963echo "$as_me:$LINENO: checking for $ac_word" >&5
3964echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3965if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
3966 echo $ECHO_N "(cached) $ECHO_C" >&6
3967else
3968 case $INSTALL_INFO in
3969 [\\/]* | ?:[\\/]*)
3970 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
3971 ;;
3972 *)
3973 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3974for as_dir in $PATH
3975do
3976 IFS=$as_save_IFS
3977 test -z "$as_dir" && as_dir=.
3978 for ac_exec_ext in '' $ac_executable_extensions; do
3979 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3980 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
3981 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3982 break 2
3983 fi
3984done
3985done
3986
3987 ;;
3988esac
3989fi
3990INSTALL_INFO=$ac_cv_path_INSTALL_INFO
3991
3992if test -n "$INSTALL_INFO"; then
3993 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
3994echo "${ECHO_T}$INSTALL_INFO" >&6
3995else
3996 echo "$as_me:$LINENO: result: no" >&5
3997echo "${ECHO_T}no" >&6
3998fi
3999
4000# Extract the first word of "install-info", so it can be a program name with args.
4001set dummy install-info; ac_word=$2
4002echo "$as_me:$LINENO: checking for $ac_word" >&5
4003echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4004if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4005 echo $ECHO_N "(cached) $ECHO_C" >&6
4006else
4007 case $INSTALL_INFO in
4008 [\\/]* | ?:[\\/]*)
4009 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4010 ;;
4011 *)
4012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4013for as_dir in /usr/sbin
4014do
4015 IFS=$as_save_IFS
4016 test -z "$as_dir" && as_dir=.
4017 for ac_exec_ext in '' $ac_executable_extensions; do
4018 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4019 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4020 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4021 break 2
4022 fi
4023done
4024done
4025
4026 ;;
4027esac
4028fi
4029INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4030
4031if test -n "$INSTALL_INFO"; then
4032 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4033echo "${ECHO_T}$INSTALL_INFO" >&6
4034else
4035 echo "$as_me:$LINENO: result: no" >&5
4036echo "${ECHO_T}no" >&6
4037fi
4038
4039# Extract the first word of "install-info", so it can be a program name with args.
4040set dummy install-info; ac_word=$2
4041echo "$as_me:$LINENO: checking for $ac_word" >&5
4042echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4043if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4044 echo $ECHO_N "(cached) $ECHO_C" >&6
4045else
4046 case $INSTALL_INFO in
4047 [\\/]* | ?:[\\/]*)
4048 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4049 ;;
4050 *)
4051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4052for as_dir in /sbin
4053do
4054 IFS=$as_save_IFS
4055 test -z "$as_dir" && as_dir=.
4056 for ac_exec_ext in '' $ac_executable_extensions; do
4057 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4058 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4059 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4060 break 2
4061 fi
4062done
4063done
4064
4065 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4066 ;;
4067esac
4068fi
4069INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4070
4071if test -n "$INSTALL_INFO"; then
4072 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4073echo "${ECHO_T}$INSTALL_INFO" >&6
4074else
4075 echo "$as_me:$LINENO: result: no" >&5
4076echo "${ECHO_T}no" >&6
4077fi
4078
ba4481b5 4079
c0d27fcc 4080
8e967cf7
MR
4081if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4082then
4083 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4084fi
4085
4086if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4087then
4088 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4089fi
4090
c0d27fcc
MR
4091
4092
6bae0ccf
DL
4093echo "$as_me:$LINENO: checking for egrep" >&5
4094echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4095if test "${ac_cv_prog_egrep+set}" = set; then
4096 echo $ECHO_N "(cached) $ECHO_C" >&6
4097else
4098 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4099 then ac_cv_prog_egrep='grep -E'
4100 else ac_cv_prog_egrep='egrep'
4101 fi
4102fi
4103echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4104echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4105 EGREP=$ac_cv_prog_egrep
4106
4107
c0d27fcc
MR
4108
4109echo "$as_me:$LINENO: checking for AIX" >&5
503d2be0
AS
4110echo $ECHO_N "checking for AIX... $ECHO_C" >&6
4111cat >conftest.$ac_ext <<_ACEOF
793fa0d7 4112#line $LINENO "configure"
19650fd6
AS
4113/* confdefs.h. */
4114_ACEOF
4115cat confdefs.h >>conftest.$ac_ext
4116cat >>conftest.$ac_ext <<_ACEOF
4117/* end confdefs.h. */
ba4481b5
DL
4118#ifdef _AIX
4119 yes
4120#endif
4121
503d2be0 4122_ACEOF
ba4481b5 4123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4124 $EGREP "yes" >/dev/null 2>&1; then
c0d27fcc 4125 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 4126echo "${ECHO_T}yes" >&6
c0d27fcc 4127cat >>confdefs.h <<\_ACEOF
ba4481b5 4128#define _ALL_SOURCE 1
c0d27fcc 4129_ACEOF
ba4481b5
DL
4130
4131else
c0d27fcc 4132 echo "$as_me:$LINENO: result: no" >&5
503d2be0 4133echo "${ECHO_T}no" >&6
ba4481b5
DL
4134fi
4135rm -f conftest*
4136
c0d27fcc
MR
4137
4138
3b33a005
DL
4139#### Extract some information from the operating system and machine files.
4140
c0d27fcc 4141{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 4142 - which libraries the lib-src programs will want, and
503d2be0
AS
4143 - whether the GNU malloc routines are usable..." >&5
4144echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 4145 - which libraries the lib-src programs will want, and
503d2be0 4146 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
4147
4148### First figure out CFLAGS (which we use for running the compiler here)
4149### and REAL_CFLAGS (which we use for real compilation).
4150### The two are the same except on a few systems, where they are made
4151### different to work around various lossages. For example,
4152### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
4153### as implying static linking.
4154
4155### If the CFLAGS env var is specified, we use that value
4156### instead of the default.
4157
4158### It's not important that this name contain the PID; you can't run
4159### two configures in the same directory and have anything work
4160### anyway.
4161tempcname="conftest.c"
4162
4163echo '
4164#include "'${srcdir}'/src/'${opsysfile}'"
4165#include "'${srcdir}'/src/'${machfile}'"
4166#ifndef LIBS_MACHINE
4167#define LIBS_MACHINE
4168#endif
4169#ifndef LIBS_SYSTEM
4170#define LIBS_SYSTEM
4171#endif
4172#ifndef C_SWITCH_SYSTEM
4173#define C_SWITCH_SYSTEM
4174#endif
4175#ifndef C_SWITCH_MACHINE
4176#define C_SWITCH_MACHINE
4177#endif
4178configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
4179configure___ c_switch_system=C_SWITCH_SYSTEM
4180configure___ c_switch_machine=C_SWITCH_MACHINE
4181
4182#ifndef LIB_X11_LIB
4183#define LIB_X11_LIB -lX11
4184#endif
4185
4186#ifndef LIBX11_MACHINE
4187#define LIBX11_MACHINE
4188#endif
4189
4190#ifndef LIBX11_SYSTEM
4191#define LIBX11_SYSTEM
4192#endif
4193configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
4194
4195#ifdef UNEXEC
4196configure___ unexec=UNEXEC
4197#else
4198configure___ unexec=unexec.o
4199#endif
4200
4201#ifdef SYSTEM_MALLOC
4202configure___ system_malloc=yes
4203#else
4204configure___ system_malloc=no
4205#endif
4206
ef9e4345
GM
4207#ifdef USE_MMAP_FOR_BUFFERS
4208configure___ use_mmap_for_buffers=yes
73b77ee5 4209#else
ef9e4345 4210configure___ use_mmap_for_buffers=no
73b77ee5
GM
4211#endif
4212
3b33a005
DL
4213#ifndef C_DEBUG_SWITCH
4214#define C_DEBUG_SWITCH -g
4215#endif
4216
4217#ifndef C_OPTIMIZE_SWITCH
4218#ifdef __GNUC__
4219#define C_OPTIMIZE_SWITCH -O2
4220#else
4221#define C_OPTIMIZE_SWITCH -O
4222#endif
4223#endif
4224
4225#ifndef LD_SWITCH_MACHINE
4226#define LD_SWITCH_MACHINE
4227#endif
4228
4229#ifndef LD_SWITCH_SYSTEM
4230#define LD_SWITCH_SYSTEM
4231#endif
4232
4233#ifndef LD_SWITCH_X_SITE_AUX
4234#define LD_SWITCH_X_SITE_AUX
503d2be0 4235#endif
3b33a005
DL
4236
4237configure___ ld_switch_system=LD_SWITCH_SYSTEM
4238configure___ ld_switch_machine=LD_SWITCH_MACHINE
4239
4240#ifdef THIS_IS_CONFIGURE
4241
4242/* Get the CFLAGS for tests in configure. */
4243#ifdef __GNUC__
4244configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4245#else
4246configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4247#endif
4248
4249#else /* not THIS_IS_CONFIGURE */
4250
4251/* Get the CFLAGS for real compilation. */
4252#ifdef __GNUC__
4253configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4254#else
4255configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4256#endif
4257
4258#endif /* not THIS_IS_CONFIGURE */
4259' > ${tempcname}
4260
4261# The value of CPP is a quoted variable reference, so we need to do this
4262# to get its actual value...
4263CPP=`eval "echo $CPP"`
4264eval `${CPP} -Isrc ${tempcname} \
4265 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4266if test "x$SPECIFIED_CFLAGS" = x; then
4267 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
4268 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4269else
4270 REAL_CFLAGS="$CFLAGS"
4271fi
4272rm ${tempcname}
4273
4274ac_link="$ac_link $ld_switch_machine $ld_switch_system"
4275
4276### Make sure subsequent tests use flags consistent with the build flags.
4277
4278if test x"${OVERRIDE_CPPFLAGS}" != x; then
4279 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
4280else
4281 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
4282fi
4283
6bae0ccf
DL
4284
4285
22044edf
DL
4286
4287cat >>confdefs.h <<\_ACEOF
4288#define _GNU_SOURCE 1
4289_ACEOF
4290
4291
4292
503d2be0 4293# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
4294if test "${enable_largefile+set}" = set; then
4295 enableval="$enable_largefile"
f4988be7 4296
503d2be0
AS
4297fi;
4298if test "$enable_largefile" != no; then
f4988be7 4299
c0d27fcc 4300 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
503d2be0
AS
4301echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4302if test "${ac_cv_sys_largefile_CC+set}" = set; then
4303 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4304else
f4988be7 4305 ac_cv_sys_largefile_CC=no
503d2be0
AS
4306 if test "$GCC" != yes; then
4307 ac_save_CC=$CC
4308 while :; do
4309 # IRIX 6.2 and later do not support large files by default,
4310 # so use the C compiler's -n32 option if that helps.
793fa0d7
DL
4311 cat >conftest.$ac_ext <<_ACEOF
4312#line $LINENO "configure"
19650fd6
AS
4313/* confdefs.h. */
4314_ACEOF
4315cat confdefs.h >>conftest.$ac_ext
4316cat >>conftest.$ac_ext <<_ACEOF
4317/* end confdefs.h. */
f4988be7 4318#include <sys/types.h>
503d2be0
AS
4319 /* Check that off_t can represent 2**63 - 1 correctly.
4320 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4321 since some C++ compilers masquerading as C compilers
4322 incorrectly reject 9223372036854775807. */
4323#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4324 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4325 && LARGE_OFF_T % 2147483647 == 1)
4326 ? 1 : -1];
4327int
4328main ()
4329{
f4988be7 4330
503d2be0
AS
4331 ;
4332 return 0;
4333}
4334_ACEOF
4335 rm -f conftest.$ac_objext
c0d27fcc 4336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4337 (eval $ac_compile) 2>&5
4338 ac_status=$?
c0d27fcc 4339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4340 (exit $ac_status); } &&
793fa0d7 4341 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4343 (eval $ac_try) 2>&5
4344 ac_status=$?
c0d27fcc 4345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4346 (exit $ac_status); }; }; then
4347 break
b192d653 4348else
503d2be0 4349 echo "$as_me: failed program was:" >&5
19650fd6
AS
4350sed 's/^/| /' conftest.$ac_ext >&5
4351
503d2be0
AS
4352fi
4353rm -f conftest.$ac_objext
4354 CC="$CC -n32"
4355 rm -f conftest.$ac_objext
c0d27fcc 4356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4357 (eval $ac_compile) 2>&5
4358 ac_status=$?
c0d27fcc 4359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4360 (exit $ac_status); } &&
793fa0d7 4361 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4363 (eval $ac_try) 2>&5
4364 ac_status=$?
c0d27fcc 4365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4366 (exit $ac_status); }; }; then
4367 ac_cv_sys_largefile_CC=' -n32'; break
4368else
4369 echo "$as_me: failed program was:" >&5
19650fd6
AS
4370sed 's/^/| /' conftest.$ac_ext >&5
4371
503d2be0
AS
4372fi
4373rm -f conftest.$ac_objext
793fa0d7 4374 break
503d2be0
AS
4375 done
4376 CC=$ac_save_CC
4377 rm -f conftest.$ac_ext
4378 fi
b192d653 4379fi
c0d27fcc 4380echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
4381echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4382 if test "$ac_cv_sys_largefile_CC" != no; then
4383 CC=$CC$ac_cv_sys_largefile_CC
4384 fi
b192d653 4385
c0d27fcc 4386 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
4387echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4388if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4389 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4390else
503d2be0 4391 while :; do
f4988be7 4392 ac_cv_sys_file_offset_bits=no
503d2be0 4393 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 4394#line $LINENO "configure"
19650fd6
AS
4395/* confdefs.h. */
4396_ACEOF
4397cat confdefs.h >>conftest.$ac_ext
4398cat >>conftest.$ac_ext <<_ACEOF
4399/* end confdefs.h. */
f4988be7 4400#include <sys/types.h>
503d2be0
AS
4401 /* Check that off_t can represent 2**63 - 1 correctly.
4402 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4403 since some C++ compilers masquerading as C compilers
4404 incorrectly reject 9223372036854775807. */
4405#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4406 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4407 && LARGE_OFF_T % 2147483647 == 1)
4408 ? 1 : -1];
4409int
4410main ()
4411{
f4988be7 4412
503d2be0
AS
4413 ;
4414 return 0;
4415}
4416_ACEOF
4417rm -f conftest.$ac_objext
c0d27fcc 4418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4419 (eval $ac_compile) 2>&5
4420 ac_status=$?
c0d27fcc 4421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4422 (exit $ac_status); } &&
793fa0d7 4423 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4425 (eval $ac_try) 2>&5
4426 ac_status=$?
c0d27fcc 4427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4428 (exit $ac_status); }; }; then
4429 break
f4988be7 4430else
503d2be0 4431 echo "$as_me: failed program was:" >&5
19650fd6
AS
4432sed 's/^/| /' conftest.$ac_ext >&5
4433
503d2be0
AS
4434fi
4435rm -f conftest.$ac_objext conftest.$ac_ext
4436 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 4437#line $LINENO "configure"
19650fd6
AS
4438/* confdefs.h. */
4439_ACEOF
4440cat confdefs.h >>conftest.$ac_ext
4441cat >>conftest.$ac_ext <<_ACEOF
4442/* end confdefs.h. */
f4988be7
GM
4443#define _FILE_OFFSET_BITS 64
4444#include <sys/types.h>
503d2be0
AS
4445 /* Check that off_t can represent 2**63 - 1 correctly.
4446 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4447 since some C++ compilers masquerading as C compilers
4448 incorrectly reject 9223372036854775807. */
4449#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4450 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4451 && LARGE_OFF_T % 2147483647 == 1)
4452 ? 1 : -1];
4453int
4454main ()
4455{
4456
4457 ;
4458 return 0;
4459}
4460_ACEOF
4461rm -f conftest.$ac_objext
c0d27fcc 4462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4463 (eval $ac_compile) 2>&5
4464 ac_status=$?
c0d27fcc 4465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4466 (exit $ac_status); } &&
793fa0d7 4467 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4469 (eval $ac_try) 2>&5
4470 ac_status=$?
c0d27fcc 4471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4472 (exit $ac_status); }; }; then
4473 ac_cv_sys_file_offset_bits=64; break
4474else
4475 echo "$as_me: failed program was:" >&5
19650fd6
AS
4476sed 's/^/| /' conftest.$ac_ext >&5
4477
503d2be0
AS
4478fi
4479rm -f conftest.$ac_objext conftest.$ac_ext
4480 break
4481done
ba4481b5 4482fi
c0d27fcc 4483echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
4484echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
4485if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 4486
c0d27fcc 4487cat >>confdefs.h <<_ACEOF
f4988be7 4488#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 4489_ACEOF
f4988be7 4490
503d2be0
AS
4491fi
4492rm -f conftest*
c0d27fcc 4493 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
4494echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
4495if test "${ac_cv_sys_large_files+set}" = set; then
4496 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4497else
503d2be0 4498 while :; do
f4988be7 4499 ac_cv_sys_large_files=no
503d2be0 4500 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 4501#line $LINENO "configure"
19650fd6
AS
4502/* confdefs.h. */
4503_ACEOF
4504cat confdefs.h >>conftest.$ac_ext
4505cat >>conftest.$ac_ext <<_ACEOF
4506/* end confdefs.h. */
503d2be0
AS
4507#include <sys/types.h>
4508 /* Check that off_t can represent 2**63 - 1 correctly.
4509 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4510 since some C++ compilers masquerading as C compilers
4511 incorrectly reject 9223372036854775807. */
4512#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4513 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4514 && LARGE_OFF_T % 2147483647 == 1)
4515 ? 1 : -1];
4516int
4517main ()
4518{
ba4481b5 4519
503d2be0
AS
4520 ;
4521 return 0;
4522}
4523_ACEOF
4524rm -f conftest.$ac_objext
c0d27fcc 4525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4526 (eval $ac_compile) 2>&5
4527 ac_status=$?
c0d27fcc 4528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4529 (exit $ac_status); } &&
793fa0d7 4530 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4532 (eval $ac_try) 2>&5
4533 ac_status=$?
c0d27fcc 4534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4535 (exit $ac_status); }; }; then
4536 break
ba4481b5 4537else
503d2be0 4538 echo "$as_me: failed program was:" >&5
19650fd6
AS
4539sed 's/^/| /' conftest.$ac_ext >&5
4540
503d2be0
AS
4541fi
4542rm -f conftest.$ac_objext conftest.$ac_ext
4543 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 4544#line $LINENO "configure"
19650fd6
AS
4545/* confdefs.h. */
4546_ACEOF
4547cat confdefs.h >>conftest.$ac_ext
4548cat >>conftest.$ac_ext <<_ACEOF
4549/* end confdefs.h. */
f4988be7 4550#define _LARGE_FILES 1
503d2be0
AS
4551#include <sys/types.h>
4552 /* Check that off_t can represent 2**63 - 1 correctly.
4553 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4554 since some C++ compilers masquerading as C compilers
4555 incorrectly reject 9223372036854775807. */
4556#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4557 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4558 && LARGE_OFF_T % 2147483647 == 1)
4559 ? 1 : -1];
4560int
4561main ()
4562{
f4988be7 4563
503d2be0
AS
4564 ;
4565 return 0;
4566}
4567_ACEOF
4568rm -f conftest.$ac_objext
c0d27fcc 4569if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4570 (eval $ac_compile) 2>&5
4571 ac_status=$?
c0d27fcc 4572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4573 (exit $ac_status); } &&
793fa0d7 4574 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4576 (eval $ac_try) 2>&5
4577 ac_status=$?
c0d27fcc 4578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4579 (exit $ac_status); }; }; then
4580 ac_cv_sys_large_files=1; break
4581else
4582 echo "$as_me: failed program was:" >&5
19650fd6
AS
4583sed 's/^/| /' conftest.$ac_ext >&5
4584
503d2be0
AS
4585fi
4586rm -f conftest.$ac_objext conftest.$ac_ext
4587 break
4588done
ba4481b5 4589fi
c0d27fcc 4590echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
4591echo "${ECHO_T}$ac_cv_sys_large_files" >&6
4592if test "$ac_cv_sys_large_files" != no; then
ba4481b5 4593
c0d27fcc 4594cat >>confdefs.h <<_ACEOF
f4988be7 4595#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 4596_ACEOF
ba4481b5 4597
503d2be0
AS
4598fi
4599rm -f conftest*
4600fi
ba4481b5 4601
c0d27fcc 4602
2c9dccc9
PJ
4603if test "${with_sound}" != "no"; then
4604 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
4605 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4606echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4607if test "${ac_cv_header_stdc+set}" = set; then
4608 echo $ECHO_N "(cached) $ECHO_C" >&6
4609else
4610 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 4611#line $LINENO "configure"
19650fd6
AS
4612/* confdefs.h. */
4613_ACEOF
4614cat confdefs.h >>conftest.$ac_ext
4615cat >>conftest.$ac_ext <<_ACEOF
4616/* end confdefs.h. */
c0d27fcc
MR
4617#include <stdlib.h>
4618#include <stdarg.h>
4619#include <string.h>
4620#include <float.h>
98418dba 4621
19650fd6
AS
4622int
4623main ()
4624{
4625
4626 ;
4627 return 0;
4628}
c0d27fcc 4629_ACEOF
19650fd6
AS
4630rm -f conftest.$ac_objext
4631if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4632 (eval $ac_compile) 2>&5
cd958eb3
MB
4633 ac_status=$?
4634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 4635 (exit $ac_status); } &&
793fa0d7 4636 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
4637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4638 (eval $ac_try) 2>&5
4639 ac_status=$?
4640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4641 (exit $ac_status); }; }; then
c0d27fcc
MR
4642 ac_cv_header_stdc=yes
4643else
4644 echo "$as_me: failed program was:" >&5
19650fd6
AS
4645sed 's/^/| /' conftest.$ac_ext >&5
4646
4647ac_cv_header_stdc=no
c0d27fcc 4648fi
19650fd6 4649rm -f conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4650
4651if test $ac_cv_header_stdc = yes; then
4652 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4653 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 4654#line $LINENO "configure"
19650fd6
AS
4655/* confdefs.h. */
4656_ACEOF
4657cat confdefs.h >>conftest.$ac_ext
4658cat >>conftest.$ac_ext <<_ACEOF
4659/* end confdefs.h. */
c0d27fcc
MR
4660#include <string.h>
4661
4662_ACEOF
4663if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4664 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
4665 :
4666else
4667 ac_cv_header_stdc=no
4668fi
4669rm -f conftest*
4670
4671fi
4672
4673if test $ac_cv_header_stdc = yes; then
4674 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4675 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 4676#line $LINENO "configure"
19650fd6
AS
4677/* confdefs.h. */
4678_ACEOF
4679cat confdefs.h >>conftest.$ac_ext
4680cat >>conftest.$ac_ext <<_ACEOF
4681/* end confdefs.h. */
c0d27fcc
MR
4682#include <stdlib.h>
4683
4684_ACEOF
4685if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4686 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
4687 :
4688else
4689 ac_cv_header_stdc=no
4690fi
4691rm -f conftest*
4692
4693fi
4694
4695if test $ac_cv_header_stdc = yes; then
4696 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4697 if test "$cross_compiling" = yes; then
4698 :
4699else
4700 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 4701#line $LINENO "configure"
19650fd6
AS
4702/* confdefs.h. */
4703_ACEOF
4704cat confdefs.h >>conftest.$ac_ext
4705cat >>conftest.$ac_ext <<_ACEOF
4706/* end confdefs.h. */
c0d27fcc
MR
4707#include <ctype.h>
4708#if ((' ' & 0x0FF) == 0x020)
4709# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4710# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4711#else
19650fd6 4712# define ISLOWER(c) \
793fa0d7
DL
4713 (('a' <= (c) && (c) <= 'i') \
4714 || ('j' <= (c) && (c) <= 'r') \
4715 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
4716# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4717#endif
4718
4719#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4720int
4721main ()
4722{
4723 int i;
4724 for (i = 0; i < 256; i++)
4725 if (XOR (islower (i), ISLOWER (i))
793fa0d7 4726 || toupper (i) != TOUPPER (i))
c0d27fcc
MR
4727 exit(2);
4728 exit (0);
4729}
4730_ACEOF
4731rm -f conftest$ac_exeext
4732if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4733 (eval $ac_link) 2>&5
4734 ac_status=$?
4735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4736 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4738 (eval $ac_try) 2>&5
4739 ac_status=$?
4740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4741 (exit $ac_status); }; }; then
4742 :
4743else
4744 echo "$as_me: program exited with status $ac_status" >&5
4745echo "$as_me: failed program was:" >&5
19650fd6
AS
4746sed 's/^/| /' conftest.$ac_ext >&5
4747
c0d27fcc
MR
4748( exit $ac_status )
4749ac_cv_header_stdc=no
4750fi
851a3062 4751rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4752fi
4753fi
4754fi
4755echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4756echo "${ECHO_T}$ac_cv_header_stdc" >&6
4757if test $ac_cv_header_stdc = yes; then
4758
4759cat >>confdefs.h <<\_ACEOF
4760#define STDC_HEADERS 1
4761_ACEOF
4762
4763fi
4764
4765# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
793fa0d7 4776 inttypes.h stdint.h unistd.h
98418dba
CW
4777do
4778as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc 4779echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
4780echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4781if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 4782 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4783else
925c2f3f 4784 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 4785#line $LINENO "configure"
19650fd6
AS
4786/* confdefs.h. */
4787_ACEOF
4788cat confdefs.h >>conftest.$ac_ext
4789cat >>conftest.$ac_ext <<_ACEOF
4790/* end confdefs.h. */
c0d27fcc
MR
4791$ac_includes_default
4792
4793#include <$ac_header>
4794_ACEOF
4795rm -f conftest.$ac_objext
4796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4797 (eval $ac_compile) 2>&5
4798 ac_status=$?
4799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4800 (exit $ac_status); } &&
793fa0d7 4801 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
4802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4803 (eval $ac_try) 2>&5
4804 ac_status=$?
4805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4806 (exit $ac_status); }; }; then
4807 eval "$as_ac_Header=yes"
4808else
4809 echo "$as_me: failed program was:" >&5
19650fd6
AS
4810sed 's/^/| /' conftest.$ac_ext >&5
4811
c0d27fcc
MR
4812eval "$as_ac_Header=no"
4813fi
4814rm -f conftest.$ac_objext conftest.$ac_ext
4815fi
4816echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4817echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4818if test `eval echo '${'$as_ac_Header'}'` = yes; then
4819 cat >>confdefs.h <<_ACEOF
4820#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4821_ACEOF
4822
4823fi
4824
4825done
4826
4827
4828
4829
4830
4831for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
4832do
4833as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4834if eval "test \"\${$as_ac_Header+set}\" = set"; then
4835 echo "$as_me:$LINENO: checking for $ac_header" >&5
4836echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4837if eval "test \"\${$as_ac_Header+set}\" = set"; then
4838 echo $ECHO_N "(cached) $ECHO_C" >&6
4839fi
4840echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4841echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4842else
4843 # Is the header compilable?
4844echo "$as_me:$LINENO: checking $ac_header usability" >&5
4845echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4846cat >conftest.$ac_ext <<_ACEOF
793fa0d7 4847#line $LINENO "configure"
19650fd6
AS
4848/* confdefs.h. */
4849_ACEOF
4850cat confdefs.h >>conftest.$ac_ext
4851cat >>conftest.$ac_ext <<_ACEOF
4852/* end confdefs.h. */
c0d27fcc 4853$ac_includes_default
98418dba 4854#include <$ac_header>
503d2be0 4855_ACEOF
c0d27fcc
MR
4856rm -f conftest.$ac_objext
4857if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4858 (eval $ac_compile) 2>&5
4859 ac_status=$?
4860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4861 (exit $ac_status); } &&
793fa0d7 4862 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
4863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4864 (eval $ac_try) 2>&5
4865 ac_status=$?
4866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4867 (exit $ac_status); }; }; then
4868 ac_header_compiler=yes
4869else
4870 echo "$as_me: failed program was:" >&5
19650fd6
AS
4871sed 's/^/| /' conftest.$ac_ext >&5
4872
c0d27fcc
MR
4873ac_header_compiler=no
4874fi
4875rm -f conftest.$ac_objext conftest.$ac_ext
4876echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4877echo "${ECHO_T}$ac_header_compiler" >&6
4878
4879# Is the header present?
4880echo "$as_me:$LINENO: checking $ac_header presence" >&5
4881echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4882cat >conftest.$ac_ext <<_ACEOF
793fa0d7 4883#line $LINENO "configure"
19650fd6
AS
4884/* confdefs.h. */
4885_ACEOF
4886cat confdefs.h >>conftest.$ac_ext
4887cat >>conftest.$ac_ext <<_ACEOF
4888/* end confdefs.h. */
c0d27fcc
MR
4889#include <$ac_header>
4890_ACEOF
4891if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 4892 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 4893 ac_status=$?
6bae0ccf 4894 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
4895 rm -f conftest.er1
4896 cat conftest.err >&5
c0d27fcc 4897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
4898 (exit $ac_status); } >/dev/null; then
4899 if test -s conftest.err; then
4900 ac_cpp_err=$ac_c_preproc_warn_flag
4901 else
4902 ac_cpp_err=
4903 fi
4904else
4905 ac_cpp_err=yes
4906fi
4907if test -z "$ac_cpp_err"; then
c0d27fcc 4908 ac_header_preproc=yes
f4988be7 4909else
503d2be0 4910 echo "$as_me: failed program was:" >&5
19650fd6
AS
4911sed 's/^/| /' conftest.$ac_ext >&5
4912
c0d27fcc 4913 ac_header_preproc=no
f4988be7 4914fi
98418dba 4915rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
4916echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4917echo "${ECHO_T}$ac_header_preproc" >&6
4918
4919# So? What about this header?
4920case $ac_header_compiler:$ac_header_preproc in
4921 yes:no )
4922 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4923echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
4924 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4925echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4926 (
4927 cat <<\_ASBOX
4928## ------------------------------------ ##
4929## Report this to bug-autoconf@gnu.org. ##
4930## ------------------------------------ ##
4931_ASBOX
4932 ) |
4933 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 4934 ;;
c0d27fcc
MR
4935 no:yes )
4936 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4937echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
4938 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4939echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 4940 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 4941echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
4942 (
4943 cat <<\_ASBOX
793fa0d7
DL
4944## ------------------------------------ ##
4945## Report this to bug-autoconf@gnu.org. ##
4946## ------------------------------------ ##
19650fd6
AS
4947_ASBOX
4948 ) |
4949 sed "s/^/$as_me: WARNING: /" >&2
4950 ;;
c0d27fcc
MR
4951esac
4952echo "$as_me:$LINENO: checking for $ac_header" >&5
4953echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4954if eval "test \"\${$as_ac_Header+set}\" = set"; then
4955 echo $ECHO_N "(cached) $ECHO_C" >&6
4956else
793fa0d7 4957 eval "$as_ac_Header=$ac_header_preproc"
f4988be7 4958fi
c0d27fcc 4959echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 4960echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
4961
4962fi
98418dba 4963if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 4964 cat >>confdefs.h <<_ACEOF
98418dba 4965#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 4966_ACEOF
f4988be7
GM
4967
4968fi
c0d27fcc 4969
98418dba
CW
4970done
4971
4972 # Emulation library used on NetBSD.
c0d27fcc 4973 echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
4974echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
4975if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 4976 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4977else
98418dba
CW
4978 ac_check_lib_save_LIBS=$LIBS
4979LIBS="-lossaudio $LIBS"
4980cat >conftest.$ac_ext <<_ACEOF
793fa0d7 4981#line $LINENO "configure"
19650fd6
AS
4982/* confdefs.h. */
4983_ACEOF
4984cat confdefs.h >>conftest.$ac_ext
4985cat >>conftest.$ac_ext <<_ACEOF
4986/* end confdefs.h. */
98418dba
CW
4987
4988/* Override any gcc2 internal prototype to avoid an error. */
4989#ifdef __cplusplus
4990extern "C"
f4988be7 4991#endif
98418dba
CW
4992/* We use char because int might match the return type of a gcc2
4993 builtin and then its argument prototype would still apply. */
4994char _oss_ioctl ();
503d2be0
AS
4995int
4996main ()
4997{
98418dba 4998_oss_ioctl ();
503d2be0
AS
4999 ;
5000 return 0;
5001}
5002_ACEOF
98418dba 5003rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 5004if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 5005 (eval $ac_link) 2>&5
503d2be0 5006 ac_status=$?
c0d27fcc 5007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5008 (exit $ac_status); } &&
793fa0d7 5009 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 5010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5011 (eval $ac_try) 2>&5
5012 ac_status=$?
c0d27fcc 5013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5014 (exit $ac_status); }; }; then
98418dba 5015 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 5016else
503d2be0 5017 echo "$as_me: failed program was:" >&5
19650fd6
AS
5018sed 's/^/| /' conftest.$ac_ext >&5
5019
98418dba 5020ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 5021fi
98418dba
CW
5022rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5023LIBS=$ac_check_lib_save_LIBS
f4988be7 5024fi
c0d27fcc 5025echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
5026echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
5027if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
5028 LIBSOUND=-lossaudio
5029else
5030 LIBSOUND=
5031fi
5032
c0d27fcc 5033
f4988be7 5034fi
c0d27fcc
MR
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
22044edf
DL
5053
5054
973a76b1 5055
cffcede7 5056
c0d27fcc 5057
f4988be7 5058
98418dba
CW
5059for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5060 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5061 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
cffcede7 5062 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h
98418dba
CW
5063do
5064as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5065if eval "test \"\${$as_ac_Header+set}\" = set"; then
5066 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5067echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5068if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5069 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5070fi
5071echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5072echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5073else
c0d27fcc
MR
5074 # Is the header compilable?
5075echo "$as_me:$LINENO: checking $ac_header usability" >&5
5076echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5077cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5078#line $LINENO "configure"
19650fd6
AS
5079/* confdefs.h. */
5080_ACEOF
5081cat confdefs.h >>conftest.$ac_ext
5082cat >>conftest.$ac_ext <<_ACEOF
5083/* end confdefs.h. */
c0d27fcc
MR
5084$ac_includes_default
5085#include <$ac_header>
5086_ACEOF
5087rm -f conftest.$ac_objext
5088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5089 (eval $ac_compile) 2>&5
5090 ac_status=$?
5091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5092 (exit $ac_status); } &&
793fa0d7 5093 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5095 (eval $ac_try) 2>&5
5096 ac_status=$?
5097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5098 (exit $ac_status); }; }; then
5099 ac_header_compiler=yes
5100else
5101 echo "$as_me: failed program was:" >&5
19650fd6
AS
5102sed 's/^/| /' conftest.$ac_ext >&5
5103
c0d27fcc
MR
5104ac_header_compiler=no
5105fi
5106rm -f conftest.$ac_objext conftest.$ac_ext
5107echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5108echo "${ECHO_T}$ac_header_compiler" >&6
5109
5110# Is the header present?
5111echo "$as_me:$LINENO: checking $ac_header presence" >&5
5112echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5113cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5114#line $LINENO "configure"
19650fd6
AS
5115/* confdefs.h. */
5116_ACEOF
5117cat confdefs.h >>conftest.$ac_ext
5118cat >>conftest.$ac_ext <<_ACEOF
5119/* end confdefs.h. */
98418dba 5120#include <$ac_header>
503d2be0 5121_ACEOF
c0d27fcc 5122if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5123 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5124 ac_status=$?
6bae0ccf 5125 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5126 rm -f conftest.er1
5127 cat conftest.err >&5
c0d27fcc 5128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5129 (exit $ac_status); } >/dev/null; then
5130 if test -s conftest.err; then
5131 ac_cpp_err=$ac_c_preproc_warn_flag
5132 else
5133 ac_cpp_err=
5134 fi
5135else
5136 ac_cpp_err=yes
5137fi
5138if test -z "$ac_cpp_err"; then
c0d27fcc 5139 ac_header_preproc=yes
34ec9ebe 5140else
503d2be0 5141 echo "$as_me: failed program was:" >&5
19650fd6
AS
5142sed 's/^/| /' conftest.$ac_ext >&5
5143
c0d27fcc 5144 ac_header_preproc=no
34ec9ebe 5145fi
98418dba 5146rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5147echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5148echo "${ECHO_T}$ac_header_preproc" >&6
5149
5150# So? What about this header?
5151case $ac_header_compiler:$ac_header_preproc in
5152 yes:no )
5153 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5154echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
5155 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5156echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5157 (
5158 cat <<\_ASBOX
5159## ------------------------------------ ##
5160## Report this to bug-autoconf@gnu.org. ##
5161## ------------------------------------ ##
5162_ASBOX
5163 ) |
5164 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 5165 ;;
c0d27fcc
MR
5166 no:yes )
5167 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5168echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
5169 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5170echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 5171 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5172echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
5173 (
5174 cat <<\_ASBOX
793fa0d7
DL
5175## ------------------------------------ ##
5176## Report this to bug-autoconf@gnu.org. ##
5177## ------------------------------------ ##
19650fd6
AS
5178_ASBOX
5179 ) |
5180 sed "s/^/$as_me: WARNING: /" >&2
5181 ;;
c0d27fcc
MR
5182esac
5183echo "$as_me:$LINENO: checking for $ac_header" >&5
5184echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5185if eval "test \"\${$as_ac_Header+set}\" = set"; then
5186 echo $ECHO_N "(cached) $ECHO_C" >&6
5187else
793fa0d7 5188 eval "$as_ac_Header=$ac_header_preproc"
34ec9ebe 5189fi
c0d27fcc 5190echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5191echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5192
5193fi
98418dba 5194if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5195 cat >>confdefs.h <<_ACEOF
98418dba 5196#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5197_ACEOF
34ec9ebe 5198
98418dba 5199fi
c0d27fcc 5200
98418dba
CW
5201done
5202
22044edf
DL
5203
5204for ac_header in term.h
5205do
5206as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5207echo "$as_me:$LINENO: checking for $ac_header" >&5
5208echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5209if eval "test \"\${$as_ac_Header+set}\" = set"; then
5210 echo $ECHO_N "(cached) $ECHO_C" >&6
5211else
5212 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5213#line $LINENO "configure"
19650fd6
AS
5214/* confdefs.h. */
5215_ACEOF
5216cat confdefs.h >>conftest.$ac_ext
5217cat >>conftest.$ac_ext <<_ACEOF
5218/* end confdefs.h. */
22044edf
DL
5219#include <$ac_header>
5220_ACEOF
5221if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5222 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5223 ac_status=$?
5224 grep -v '^ *+' conftest.er1 >conftest.err
5225 rm -f conftest.er1
5226 cat conftest.err >&5
5227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5228 (exit $ac_status); } >/dev/null; then
5229 if test -s conftest.err; then
5230 ac_cpp_err=$ac_c_preproc_warn_flag
5231 else
5232 ac_cpp_err=
5233 fi
5234else
5235 ac_cpp_err=yes
5236fi
5237if test -z "$ac_cpp_err"; then
5238 eval "$as_ac_Header=yes"
5239else
5240 echo "$as_me: failed program was:" >&5
19650fd6
AS
5241sed 's/^/| /' conftest.$ac_ext >&5
5242
22044edf
DL
5243 eval "$as_ac_Header=no"
5244fi
5245rm -f conftest.err conftest.$ac_ext
5246fi
5247echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5248echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5249if test `eval echo '${'$as_ac_Header'}'` = yes; then
5250 cat >>confdefs.h <<_ACEOF
5251#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5252_ACEOF
5253
5254fi
5255
5256done
5257
c0d27fcc 5258echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
5259echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5260if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 5261 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5262else
503d2be0 5263 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5264#line $LINENO "configure"
19650fd6
AS
5265/* confdefs.h. */
5266_ACEOF
5267cat confdefs.h >>conftest.$ac_ext
5268cat >>conftest.$ac_ext <<_ACEOF
5269/* end confdefs.h. */
98418dba
CW
5270#include <stdlib.h>
5271#include <stdarg.h>
5272#include <string.h>
5273#include <float.h>
5274
19650fd6
AS
5275int
5276main ()
5277{
5278
5279 ;
5280 return 0;
5281}
98418dba 5282_ACEOF
19650fd6
AS
5283rm -f conftest.$ac_objext
5284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5285 (eval $ac_compile) 2>&5
cd958eb3
MB
5286 ac_status=$?
5287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 5288 (exit $ac_status); } &&
793fa0d7 5289 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
5290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5291 (eval $ac_try) 2>&5
5292 ac_status=$?
5293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5294 (exit $ac_status); }; }; then
98418dba 5295 ac_cv_header_stdc=yes
ba4481b5 5296else
503d2be0 5297 echo "$as_me: failed program was:" >&5
19650fd6
AS
5298sed 's/^/| /' conftest.$ac_ext >&5
5299
5300ac_cv_header_stdc=no
ba4481b5 5301fi
19650fd6 5302rm -f conftest.$ac_objext conftest.$ac_ext
98418dba
CW
5303
5304if test $ac_cv_header_stdc = yes; then
5305 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5306 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5307#line $LINENO "configure"
19650fd6
AS
5308/* confdefs.h. */
5309_ACEOF
5310cat confdefs.h >>conftest.$ac_ext
5311cat >>conftest.$ac_ext <<_ACEOF
5312/* end confdefs.h. */
98418dba
CW
5313#include <string.h>
5314
5315_ACEOF
5316if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5317 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
5318 :
5319else
5320 ac_cv_header_stdc=no
ba4481b5 5321fi
98418dba 5322rm -f conftest*
ba4481b5
DL
5323
5324fi
5325
98418dba
CW
5326if test $ac_cv_header_stdc = yes; then
5327 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5328 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5329#line $LINENO "configure"
19650fd6
AS
5330/* confdefs.h. */
5331_ACEOF
5332cat confdefs.h >>conftest.$ac_ext
5333cat >>conftest.$ac_ext <<_ACEOF
5334/* end confdefs.h. */
98418dba
CW
5335#include <stdlib.h>
5336
5337_ACEOF
5338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5339 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
5340 :
5341else
5342 ac_cv_header_stdc=no
5343fi
5344rm -f conftest*
5345
5346fi
5347
5348if test $ac_cv_header_stdc = yes; then
5349 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5350 if test "$cross_compiling" = yes; then
5351 :
d42122a3 5352else
503d2be0 5353 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5354#line $LINENO "configure"
19650fd6
AS
5355/* confdefs.h. */
5356_ACEOF
5357cat confdefs.h >>conftest.$ac_ext
5358cat >>conftest.$ac_ext <<_ACEOF
5359/* end confdefs.h. */
98418dba
CW
5360#include <ctype.h>
5361#if ((' ' & 0x0FF) == 0x020)
5362# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5363# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5364#else
19650fd6 5365# define ISLOWER(c) \
793fa0d7
DL
5366 (('a' <= (c) && (c) <= 'i') \
5367 || ('j' <= (c) && (c) <= 'r') \
5368 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
5369# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5370#endif
5371
5372#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
5373int
5374main ()
5375{
98418dba
CW
5376 int i;
5377 for (i = 0; i < 256; i++)
5378 if (XOR (islower (i), ISLOWER (i))
793fa0d7 5379 || toupper (i) != TOUPPER (i))
98418dba
CW
5380 exit(2);
5381 exit (0);
503d2be0
AS
5382}
5383_ACEOF
98418dba 5384rm -f conftest$ac_exeext
c0d27fcc 5385if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 5386 (eval $ac_link) 2>&5
503d2be0 5387 ac_status=$?
c0d27fcc 5388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 5389 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 5390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5391 (eval $ac_try) 2>&5
5392 ac_status=$?
c0d27fcc 5393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5394 (exit $ac_status); }; }; then
98418dba 5395 :
d42122a3 5396else
98418dba
CW
5397 echo "$as_me: program exited with status $ac_status" >&5
5398echo "$as_me: failed program was:" >&5
19650fd6
AS
5399sed 's/^/| /' conftest.$ac_ext >&5
5400
c0d27fcc 5401( exit $ac_status )
98418dba 5402ac_cv_header_stdc=no
d42122a3 5403fi
851a3062 5404rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 5405fi
98418dba
CW
5406fi
5407fi
c0d27fcc 5408echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
98418dba
CW
5409echo "${ECHO_T}$ac_cv_header_stdc" >&6
5410if test $ac_cv_header_stdc = yes; then
5411
c0d27fcc 5412cat >>confdefs.h <<\_ACEOF
98418dba 5413#define STDC_HEADERS 1
c0d27fcc 5414_ACEOF
d42122a3
DL
5415
5416fi
5417
c0d27fcc 5418echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
5419echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5420if test "${ac_cv_header_time+set}" = set; then
503d2be0 5421 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5422else
503d2be0 5423 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5424#line $LINENO "configure"
19650fd6
AS
5425/* confdefs.h. */
5426_ACEOF
5427cat confdefs.h >>conftest.$ac_ext
5428cat >>conftest.$ac_ext <<_ACEOF
5429/* end confdefs.h. */
ba4481b5 5430#include <sys/types.h>
98418dba 5431#include <sys/time.h>
ba4481b5 5432#include <time.h>
503d2be0
AS
5433
5434int
5435main ()
5436{
98418dba
CW
5437if ((struct tm *) 0)
5438return 0;
503d2be0
AS
5439 ;
5440 return 0;
5441}
5442_ACEOF
5443rm -f conftest.$ac_objext
c0d27fcc 5444if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5445 (eval $ac_compile) 2>&5
5446 ac_status=$?
c0d27fcc 5447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5448 (exit $ac_status); } &&
793fa0d7 5449 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5451 (eval $ac_try) 2>&5
5452 ac_status=$?
c0d27fcc 5453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5454 (exit $ac_status); }; }; then
98418dba 5455 ac_cv_header_time=yes
ba4481b5 5456else
503d2be0 5457 echo "$as_me: failed program was:" >&5
19650fd6
AS
5458sed 's/^/| /' conftest.$ac_ext >&5
5459
98418dba 5460ac_cv_header_time=no
ba4481b5 5461fi
503d2be0 5462rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 5463fi
c0d27fcc 5464echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
5465echo "${ECHO_T}$ac_cv_header_time" >&6
5466if test $ac_cv_header_time = yes; then
503d2be0 5467
c0d27fcc 5468cat >>confdefs.h <<\_ACEOF
98418dba 5469#define TIME_WITH_SYS_TIME 1
c0d27fcc 5470_ACEOF
ba4481b5
DL
5471
5472fi
5473
cd958eb3
MB
5474echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
5475echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
5476if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 5477 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5478else
503d2be0 5479 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5480#line $LINENO "configure"
19650fd6
AS
5481/* confdefs.h. */
5482_ACEOF
5483cat confdefs.h >>conftest.$ac_ext
5484cat >>conftest.$ac_ext <<_ACEOF
5485/* end confdefs.h. */
cd958eb3
MB
5486$ac_includes_default
5487int
5488main ()
5489{
5490#ifndef sys_siglist
5491 char *p = (char *) sys_siglist;
98418dba 5492#endif
503d2be0 5493
cd958eb3
MB
5494 ;
5495 return 0;
5496}
5497_ACEOF
5498rm -f conftest.$ac_objext
5499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5500 (eval $ac_compile) 2>&5
5501 ac_status=$?
5502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5503 (exit $ac_status); } &&
793fa0d7 5504 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
5505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5506 (eval $ac_try) 2>&5
5507 ac_status=$?
5508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5509 (exit $ac_status); }; }; then
5510 ac_cv_have_decl_sys_siglist=yes
5511else
5512 echo "$as_me: failed program was:" >&5
19650fd6
AS
5513sed 's/^/| /' conftest.$ac_ext >&5
5514
cd958eb3
MB
5515ac_cv_have_decl_sys_siglist=no
5516fi
5517rm -f conftest.$ac_objext conftest.$ac_ext
5518fi
5519echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
5520echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
5521if test $ac_cv_have_decl_sys_siglist = yes; then
5522
5523cat >>confdefs.h <<_ACEOF
5524#define HAVE_DECL_SYS_SIGLIST 1
5525_ACEOF
5526
5527
5528else
5529 cat >>confdefs.h <<_ACEOF
5530#define HAVE_DECL_SYS_SIGLIST 0
5531_ACEOF
5532
5533
5534fi
5535
5536
5537if test $ac_cv_have_decl_sys_siglist != yes; then
5538 # For Tru64, at least:
5539 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
5540echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
5541if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
5542 echo $ECHO_N "(cached) $ECHO_C" >&6
5543else
5544 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5545#line $LINENO "configure"
19650fd6
AS
5546/* confdefs.h. */
5547_ACEOF
5548cat confdefs.h >>conftest.$ac_ext
5549cat >>conftest.$ac_ext <<_ACEOF
5550/* end confdefs.h. */
cd958eb3 5551$ac_includes_default
503d2be0
AS
5552int
5553main ()
5554{
cd958eb3
MB
5555#ifndef __sys_siglist
5556 char *p = (char *) __sys_siglist;
5557#endif
5558
503d2be0
AS
5559 ;
5560 return 0;
5561}
5562_ACEOF
5563rm -f conftest.$ac_objext
c0d27fcc 5564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5565 (eval $ac_compile) 2>&5
5566 ac_status=$?
c0d27fcc 5567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5568 (exit $ac_status); } &&
793fa0d7 5569 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5571 (eval $ac_try) 2>&5
5572 ac_status=$?
c0d27fcc 5573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5574 (exit $ac_status); }; }; then
cd958eb3 5575 ac_cv_have_decl___sys_siglist=yes
ba4481b5 5576else
503d2be0 5577 echo "$as_me: failed program was:" >&5
19650fd6
AS
5578sed 's/^/| /' conftest.$ac_ext >&5
5579
cd958eb3 5580ac_cv_have_decl___sys_siglist=no
ba4481b5 5581fi
503d2be0
AS
5582rm -f conftest.$ac_objext conftest.$ac_ext
5583fi
cd958eb3
MB
5584echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
5585echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6
5586if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 5587
cd958eb3
MB
5588cat >>confdefs.h <<_ACEOF
5589#define HAVE_DECL___SYS_SIGLIST 1
5590_ACEOF
5591
5592
5593else
5594 cat >>confdefs.h <<_ACEOF
5595#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 5596_ACEOF
503d2be0 5597
cd958eb3 5598
ba4481b5
DL
5599fi
5600
cd958eb3
MB
5601
5602 if test $ac_cv_have_decl___sys_siglist = yes; then
5603
5604cat >>confdefs.h <<\_ACEOF
5605#define sys_siglist __sys_siglist
5606_ACEOF
5607
5608 fi
5609fi
c0d27fcc 5610echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
5611echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
5612if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 5613 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5614else
503d2be0 5615 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5616#line $LINENO "configure"
19650fd6
AS
5617/* confdefs.h. */
5618_ACEOF
5619cat confdefs.h >>conftest.$ac_ext
5620cat >>conftest.$ac_ext <<_ACEOF
5621/* end confdefs.h. */
98418dba
CW
5622#include <sys/types.h>
5623#include <sys/wait.h>
5624#ifndef WEXITSTATUS
5625# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5626#endif
5627#ifndef WIFEXITED
5628# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 5629#endif
503d2be0
AS
5630
5631int
5632main ()
5633{
98418dba
CW
5634 int s;
5635 wait (&s);
5636 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
5637 ;
5638 return 0;
5639}
5640_ACEOF
98418dba 5641rm -f conftest.$ac_objext
c0d27fcc 5642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba 5643 (eval $ac_compile) 2>&5
503d2be0 5644 ac_status=$?
c0d27fcc 5645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5646 (exit $ac_status); } &&
793fa0d7 5647 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5649 (eval $ac_try) 2>&5
5650 ac_status=$?
c0d27fcc 5651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5652 (exit $ac_status); }; }; then
98418dba 5653 ac_cv_header_sys_wait_h=yes
ba4481b5 5654else
503d2be0 5655 echo "$as_me: failed program was:" >&5
19650fd6
AS
5656sed 's/^/| /' conftest.$ac_ext >&5
5657
98418dba 5658ac_cv_header_sys_wait_h=no
ba4481b5 5659fi
98418dba 5660rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 5661fi
c0d27fcc 5662echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
5663echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
5664if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 5665
c0d27fcc 5666cat >>confdefs.h <<\_ACEOF
98418dba 5667#define HAVE_SYS_WAIT_H 1
c0d27fcc 5668_ACEOF
ba4481b5 5669
ba4481b5
DL
5670fi
5671
c0d27fcc
MR
5672
5673echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
5674echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
5675if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 5676 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 5677else
503d2be0 5678 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5679#line $LINENO "configure"
19650fd6
AS
5680/* confdefs.h. */
5681_ACEOF
5682cat confdefs.h >>conftest.$ac_ext
5683cat >>conftest.$ac_ext <<_ACEOF
5684/* end confdefs.h. */
98418dba
CW
5685#ifdef TIME_WITH_SYS_TIME
5686#include <sys/time.h>
5687#include <time.h>
5688#else
5689#ifdef HAVE_SYS_TIME_H
5690#include <sys/time.h>
5691#else
1113b624 5692#include <time.h>
98418dba
CW
5693#endif
5694#endif
5695#ifdef HAVE_UTIME_H
5696#include <utime.h>
5697#endif
503d2be0
AS
5698int
5699main ()
5700{
98418dba 5701static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
5702 ;
5703 return 0;
5704}
5705_ACEOF
98418dba 5706rm -f conftest.$ac_objext
c0d27fcc 5707if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba 5708 (eval $ac_compile) 2>&5
503d2be0 5709 ac_status=$?
c0d27fcc 5710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5711 (exit $ac_status); } &&
793fa0d7 5712 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5714 (eval $ac_try) 2>&5
5715 ac_status=$?
c0d27fcc 5716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5717 (exit $ac_status); }; }; then
98418dba 5718 emacs_cv_struct_utimbuf=yes
1113b624 5719else
503d2be0 5720 echo "$as_me: failed program was:" >&5
19650fd6
AS
5721sed 's/^/| /' conftest.$ac_ext >&5
5722
98418dba 5723emacs_cv_struct_utimbuf=no
1113b624 5724fi
98418dba 5725rm -f conftest.$ac_objext conftest.$ac_ext
1113b624 5726fi
c0d27fcc 5727echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
5728echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
5729if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 5730
c0d27fcc 5731cat >>confdefs.h <<\_ACEOF
98418dba 5732#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 5733_ACEOF
1113b624
PE
5734
5735fi
ba4481b5 5736
c0d27fcc 5737echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
5738echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5739if test "${ac_cv_type_signal+set}" = set; then
503d2be0 5740 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5741else
98418dba 5742 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5743#line $LINENO "configure"
19650fd6
AS
5744/* confdefs.h. */
5745_ACEOF
5746cat confdefs.h >>conftest.$ac_ext
5747cat >>conftest.$ac_ext <<_ACEOF
5748/* end confdefs.h. */
7397acc4 5749#include <sys/types.h>
98418dba
CW
5750#include <signal.h>
5751#ifdef signal
5752# undef signal
5753#endif
5754#ifdef __cplusplus
5755extern "C" void (*signal (int, void (*)(int)))(int);
5756#else
5757void (*signal ()) ();
5758#endif
5759
503d2be0
AS
5760int
5761main ()
5762{
98418dba 5763int i;
503d2be0
AS
5764 ;
5765 return 0;
5766}
5767_ACEOF
98418dba 5768rm -f conftest.$ac_objext
c0d27fcc 5769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5770 (eval $ac_compile) 2>&5
5771 ac_status=$?
c0d27fcc 5772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5773 (exit $ac_status); } &&
793fa0d7 5774 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5776 (eval $ac_try) 2>&5
5777 ac_status=$?
c0d27fcc 5778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5779 (exit $ac_status); }; }; then
98418dba 5780 ac_cv_type_signal=void
503d2be0
AS
5781else
5782 echo "$as_me: failed program was:" >&5
19650fd6
AS
5783sed 's/^/| /' conftest.$ac_ext >&5
5784
98418dba 5785ac_cv_type_signal=int
503d2be0 5786fi
98418dba 5787rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5788fi
c0d27fcc 5789echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 5790echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 5791
c0d27fcc 5792cat >>confdefs.h <<_ACEOF
98418dba 5793#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
5794_ACEOF
5795
503d2be0 5796
c0d27fcc
MR
5797
5798echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
5799echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
5800if test "${emacs_cv_speed_t+set}" = set; then
5801 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5802else
98418dba 5803 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5804#line $LINENO "configure"
19650fd6
AS
5805/* confdefs.h. */
5806_ACEOF
5807cat confdefs.h >>conftest.$ac_ext
5808cat >>conftest.$ac_ext <<_ACEOF
5809/* end confdefs.h. */
98418dba 5810#include <termios.h>
98418dba
CW
5811int
5812main ()
5813{
5814speed_t x = 1;
5815 ;
5816 return 0;
5817}
5818_ACEOF
5819rm -f conftest.$ac_objext
c0d27fcc 5820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
5821 (eval $ac_compile) 2>&5
5822 ac_status=$?
c0d27fcc 5823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 5824 (exit $ac_status); } &&
793fa0d7 5825 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
5827 (eval $ac_try) 2>&5
5828 ac_status=$?
c0d27fcc 5829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5830 (exit $ac_status); }; }; then
5831 emacs_cv_speed_t=yes
5832else
5833 echo "$as_me: failed program was:" >&5
19650fd6
AS
5834sed 's/^/| /' conftest.$ac_ext >&5
5835
98418dba
CW
5836emacs_cv_speed_t=no
5837fi
5838rm -f conftest.$ac_objext conftest.$ac_ext
5839fi
c0d27fcc 5840echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
5841echo "${ECHO_T}$emacs_cv_speed_t" >&6
5842if test $emacs_cv_speed_t = yes; then
b936fae4 5843
c0d27fcc 5844cat >>confdefs.h <<\_ACEOF
98418dba 5845#define HAVE_SPEED_T 1
c0d27fcc 5846_ACEOF
98418dba 5847
7397acc4
DL
5848fi
5849
c0d27fcc 5850echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
5851echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
5852if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 5853 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5854else
503d2be0 5855 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5856#line $LINENO "configure"
19650fd6
AS
5857/* confdefs.h. */
5858_ACEOF
5859cat confdefs.h >>conftest.$ac_ext
5860cat >>conftest.$ac_ext <<_ACEOF
5861/* end confdefs.h. */
98418dba
CW
5862#ifdef TIME_WITH_SYS_TIME
5863#include <sys/time.h>
5864#include <time.h>
5865#else
5866#ifdef HAVE_SYS_TIME_H
5867#include <sys/time.h>
5868#else
5869#include <time.h>
5870#endif
5871#endif
503d2be0
AS
5872int
5873main ()
5874{
98418dba 5875static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
5876 ;
5877 return 0;
5878}
5879_ACEOF
5880rm -f conftest.$ac_objext
c0d27fcc 5881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5882 (eval $ac_compile) 2>&5
5883 ac_status=$?
c0d27fcc 5884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5885 (exit $ac_status); } &&
793fa0d7 5886 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5888 (eval $ac_try) 2>&5
5889 ac_status=$?
c0d27fcc 5890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5891 (exit $ac_status); }; }; then
98418dba 5892 emacs_cv_struct_timeval=yes
7397acc4 5893else
503d2be0 5894 echo "$as_me: failed program was:" >&5
19650fd6
AS
5895sed 's/^/| /' conftest.$ac_ext >&5
5896
98418dba 5897emacs_cv_struct_timeval=no
7397acc4 5898fi
503d2be0 5899rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5900fi
c0d27fcc 5901echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
5902echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
5903HAVE_TIMEVAL=$emacs_cv_struct_timeval
5904if test $emacs_cv_struct_timeval = yes; then
b936fae4 5905
c0d27fcc 5906cat >>confdefs.h <<\_ACEOF
98418dba 5907#define HAVE_TIMEVAL 1
c0d27fcc 5908_ACEOF
7397acc4
DL
5909
5910fi
5911
c0d27fcc 5912echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
5913echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
5914if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 5915 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5916else
503d2be0 5917 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5918#line $LINENO "configure"
19650fd6
AS
5919/* confdefs.h. */
5920_ACEOF
5921cat confdefs.h >>conftest.$ac_ext
5922cat >>conftest.$ac_ext <<_ACEOF
5923/* end confdefs.h. */
98418dba 5924#include <math.h>
503d2be0
AS
5925int
5926main ()
5927{
98418dba 5928static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
5929 ;
5930 return 0;
ba4481b5 5931}
503d2be0
AS
5932_ACEOF
5933rm -f conftest.$ac_objext
c0d27fcc 5934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5935 (eval $ac_compile) 2>&5
5936 ac_status=$?
c0d27fcc 5937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5938 (exit $ac_status); } &&
793fa0d7 5939 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5941 (eval $ac_try) 2>&5
5942 ac_status=$?
c0d27fcc 5943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5944 (exit $ac_status); }; }; then
98418dba 5945 emacs_cv_struct_exception=yes
ba4481b5 5946else
503d2be0 5947 echo "$as_me: failed program was:" >&5
19650fd6
AS
5948sed 's/^/| /' conftest.$ac_ext >&5
5949
98418dba 5950emacs_cv_struct_exception=no
ba4481b5 5951fi
503d2be0 5952rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 5953fi
c0d27fcc 5954echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
5955echo "${ECHO_T}$emacs_cv_struct_exception" >&6
5956HAVE_EXCEPTION=$emacs_cv_struct_exception
5957if test $emacs_cv_struct_exception != yes; then
b936fae4 5958
c0d27fcc 5959cat >>confdefs.h <<\_ACEOF
98418dba 5960#define NO_MATHERR 1
c0d27fcc 5961_ACEOF
ba4481b5
DL
5962
5963fi
5964
c0d27fcc 5965echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
5966echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
5967if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 5968 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5969else
503d2be0 5970 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 5971#line $LINENO "configure"
19650fd6
AS
5972/* confdefs.h. */
5973_ACEOF
5974cat confdefs.h >>conftest.$ac_ext
5975cat >>conftest.$ac_ext <<_ACEOF
5976/* end confdefs.h. */
98418dba
CW
5977#include <sys/types.h>
5978#include <time.h>
7397acc4 5979
503d2be0
AS
5980int
5981main ()
5982{
98418dba 5983struct tm *tp; tp->tm_sec;
503d2be0
AS
5984 ;
5985 return 0;
5986}
5987_ACEOF
5988rm -f conftest.$ac_objext
c0d27fcc 5989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5990 (eval $ac_compile) 2>&5
5991 ac_status=$?
c0d27fcc 5992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5993 (exit $ac_status); } &&
793fa0d7 5994 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5996 (eval $ac_try) 2>&5
5997 ac_status=$?
c0d27fcc 5998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5999 (exit $ac_status); }; }; then
98418dba 6000 ac_cv_struct_tm=time.h
7397acc4 6001else
503d2be0 6002 echo "$as_me: failed program was:" >&5
19650fd6
AS
6003sed 's/^/| /' conftest.$ac_ext >&5
6004
98418dba 6005ac_cv_struct_tm=sys/time.h
7397acc4 6006fi
503d2be0 6007rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 6008fi
c0d27fcc 6009echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
6010echo "${ECHO_T}$ac_cv_struct_tm" >&6
6011if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 6012
c0d27fcc 6013cat >>confdefs.h <<\_ACEOF
98418dba 6014#define TM_IN_SYS_TIME 1
c0d27fcc 6015_ACEOF
7397acc4
DL
6016
6017fi
ba4481b5 6018
c0d27fcc 6019echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
6020echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
6021if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 6022 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6023else
98418dba 6024 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 6025#line $LINENO "configure"
19650fd6
AS
6026/* confdefs.h. */
6027_ACEOF
6028cat confdefs.h >>conftest.$ac_ext
6029cat >>conftest.$ac_ext <<_ACEOF
6030/* end confdefs.h. */
98418dba
CW
6031#include <sys/types.h>
6032#include <$ac_cv_struct_tm>
ba4481b5 6033
c0d27fcc 6034
98418dba
CW
6035int
6036main ()
6037{
6038static struct tm ac_aggr;
6039if (ac_aggr.tm_zone)
6040return 0;
6041 ;
6042 return 0;
6043}
6044_ACEOF
6045rm -f conftest.$ac_objext
c0d27fcc 6046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
6047 (eval $ac_compile) 2>&5
6048 ac_status=$?
c0d27fcc 6049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6050 (exit $ac_status); } &&
793fa0d7 6051 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6053 (eval $ac_try) 2>&5
6054 ac_status=$?
c0d27fcc 6055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6056 (exit $ac_status); }; }; then
6057 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 6058else
98418dba 6059 echo "$as_me: failed program was:" >&5
19650fd6
AS
6060sed 's/^/| /' conftest.$ac_ext >&5
6061
6bae0ccf 6062cat >conftest.$ac_ext <<_ACEOF
793fa0d7 6063#line $LINENO "configure"
19650fd6
AS
6064/* confdefs.h. */
6065_ACEOF
6066cat confdefs.h >>conftest.$ac_ext
6067cat >>conftest.$ac_ext <<_ACEOF
6068/* end confdefs.h. */
6bae0ccf
DL
6069#include <sys/types.h>
6070#include <$ac_cv_struct_tm>
6071
6072
6073int
6074main ()
6075{
6076static struct tm ac_aggr;
6077if (sizeof ac_aggr.tm_zone)
6078return 0;
6079 ;
6080 return 0;
6081}
6082_ACEOF
6083rm -f conftest.$ac_objext
6084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6085 (eval $ac_compile) 2>&5
6086 ac_status=$?
6087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6088 (exit $ac_status); } &&
793fa0d7 6089 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
6090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6091 (eval $ac_try) 2>&5
6092 ac_status=$?
6093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094 (exit $ac_status); }; }; then
6095 ac_cv_member_struct_tm_tm_zone=yes
6096else
6097 echo "$as_me: failed program was:" >&5
19650fd6
AS
6098sed 's/^/| /' conftest.$ac_ext >&5
6099
98418dba 6100ac_cv_member_struct_tm_tm_zone=no
ba4481b5 6101fi
98418dba 6102rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 6103fi
6bae0ccf
DL
6104rm -f conftest.$ac_objext conftest.$ac_ext
6105fi
c0d27fcc 6106echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
6107echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
6108if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 6109
c0d27fcc 6110cat >>confdefs.h <<_ACEOF
98418dba 6111#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
6112_ACEOF
6113
ba4481b5 6114
98418dba 6115fi
ba4481b5 6116
98418dba 6117if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 6118
c0d27fcc 6119cat >>confdefs.h <<\_ACEOF
98418dba 6120#define HAVE_TM_ZONE 1
c0d27fcc 6121_ACEOF
ba4481b5 6122
ba4481b5 6123else
c0d27fcc 6124 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
6125echo $ECHO_N "checking for tzname... $ECHO_C" >&6
6126if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 6127 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6128else
98418dba 6129 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 6130#line $LINENO "configure"
19650fd6
AS
6131/* confdefs.h. */
6132_ACEOF
6133cat confdefs.h >>conftest.$ac_ext
6134cat >>conftest.$ac_ext <<_ACEOF
6135/* end confdefs.h. */
98418dba
CW
6136#include <time.h>
6137#ifndef tzname /* For SGI. */
6138extern char *tzname[]; /* RS6000 and others reject char **tzname. */
6139#endif
6140
98418dba
CW
6141int
6142main ()
6143{
6144atoi(*tzname);
6145 ;
6146 return 0;
6147}
6148_ACEOF
6149rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6150if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
6151 (eval $ac_link) 2>&5
6152 ac_status=$?
c0d27fcc 6153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6154 (exit $ac_status); } &&
793fa0d7 6155 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6157 (eval $ac_try) 2>&5
6158 ac_status=$?
c0d27fcc 6159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6160 (exit $ac_status); }; }; then
6161 ac_cv_var_tzname=yes
6162else
6163 echo "$as_me: failed program was:" >&5
19650fd6
AS
6164sed 's/^/| /' conftest.$ac_ext >&5
6165
98418dba 6166ac_cv_var_tzname=no
ba4481b5 6167fi
98418dba
CW
6168rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6169fi
c0d27fcc 6170echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
6171echo "${ECHO_T}$ac_cv_var_tzname" >&6
6172 if test $ac_cv_var_tzname = yes; then
ba4481b5 6173
c0d27fcc 6174cat >>confdefs.h <<\_ACEOF
98418dba 6175#define HAVE_TZNAME 1
c0d27fcc 6176_ACEOF
503d2be0 6177
98418dba
CW
6178 fi
6179fi
503d2be0 6180
c0d27fcc 6181echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
6182echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
6183if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
6184 echo $ECHO_N "(cached) $ECHO_C" >&6
6185else
6186 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 6187#line $LINENO "configure"
19650fd6
AS
6188/* confdefs.h. */
6189_ACEOF
6190cat confdefs.h >>conftest.$ac_ext
6191cat >>conftest.$ac_ext <<_ACEOF
6192/* end confdefs.h. */
98418dba 6193#include <time.h>
b936fae4 6194
98418dba
CW
6195int
6196main ()
6197{
b936fae4
AS
6198static struct tm ac_aggr;
6199if (ac_aggr.tm_gmtoff)
6200return 0;
98418dba
CW
6201 ;
6202 return 0;
6203}
6204_ACEOF
b936fae4 6205rm -f conftest.$ac_objext
c0d27fcc 6206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
b936fae4 6207 (eval $ac_compile) 2>&5
98418dba 6208 ac_status=$?
c0d27fcc 6209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6210 (exit $ac_status); } &&
793fa0d7 6211 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6213 (eval $ac_try) 2>&5
6214 ac_status=$?
c0d27fcc 6215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6216 (exit $ac_status); }; }; then
b936fae4 6217 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
6218else
6219 echo "$as_me: failed program was:" >&5
19650fd6
AS
6220sed 's/^/| /' conftest.$ac_ext >&5
6221
8799b3e4 6222cat >conftest.$ac_ext <<_ACEOF
793fa0d7 6223#line $LINENO "configure"
19650fd6
AS
6224/* confdefs.h. */
6225_ACEOF
6226cat confdefs.h >>conftest.$ac_ext
6227cat >>conftest.$ac_ext <<_ACEOF
6228/* end confdefs.h. */
6bae0ccf
DL
6229#include <time.h>
6230
8799b3e4
CW
6231int
6232main ()
6233{
6bae0ccf
DL
6234static struct tm ac_aggr;
6235if (sizeof ac_aggr.tm_gmtoff)
6236return 0;
8799b3e4
CW
6237 ;
6238 return 0;
6239}
6240_ACEOF
6bae0ccf 6241rm -f conftest.$ac_objext
c0d27fcc 6242if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8799b3e4
CW
6243 (eval $ac_compile) 2>&5
6244 ac_status=$?
c0d27fcc 6245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6246 (exit $ac_status); } &&
793fa0d7 6247 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
6249 (eval $ac_try) 2>&5
6250 ac_status=$?
c0d27fcc 6251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6252 (exit $ac_status); }; }; then
6bae0ccf 6253 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
6254else
6255 echo "$as_me: failed program was:" >&5
19650fd6
AS
6256sed 's/^/| /' conftest.$ac_ext >&5
6257
6bae0ccf 6258ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 6259fi
6bae0ccf
DL
6260rm -f conftest.$ac_objext conftest.$ac_ext
6261fi
6262rm -f conftest.$ac_objext conftest.$ac_ext
8799b3e4 6263fi
6bae0ccf
DL
6264echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
6265echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
6266if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
6267
6268cat >>confdefs.h <<\_ACEOF
6269#define HAVE_TM_GMTOFF 1
6270_ACEOF
6271
6272fi
6273
8799b3e4 6274
8799b3e4 6275
c0d27fcc 6276echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
6277echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
6278if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 6279 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
6280echo "${ECHO_T}yes" >&6
6281
c0d27fcc 6282cat >>confdefs.h <<\_ACEOF
98418dba 6283#define PROTOTYPES 1
c0d27fcc
MR
6284_ACEOF
6285
6286
6287cat >>confdefs.h <<\_ACEOF
6288#define __PROTOTYPES 1
6289_ACEOF
98418dba
CW
6290
6291else
c0d27fcc 6292 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
6293echo "${ECHO_T}no" >&6
6294fi
6295
c0d27fcc 6296echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
6297echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
6298if test "${ac_cv_c_volatile+set}" = set; then
6299 echo $ECHO_N "(cached) $ECHO_C" >&6
6300else
6301 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 6302#line $LINENO "configure"
19650fd6
AS
6303/* confdefs.h. */
6304_ACEOF
6305cat confdefs.h >>conftest.$ac_ext
6306cat >>conftest.$ac_ext <<_ACEOF
6307/* end confdefs.h. */
98418dba 6308
98418dba
CW
6309int
6310main ()
6311{
6312
6313volatile int x;
6314int * volatile y;
6315 ;
6316 return 0;
6317}
6318_ACEOF
6319rm -f conftest.$ac_objext
c0d27fcc 6320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
6321 (eval $ac_compile) 2>&5
6322 ac_status=$?
c0d27fcc 6323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6324 (exit $ac_status); } &&
793fa0d7 6325 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6327 (eval $ac_try) 2>&5
6328 ac_status=$?
c0d27fcc 6329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6330 (exit $ac_status); }; }; then
6331 ac_cv_c_volatile=yes
6332else
6333 echo "$as_me: failed program was:" >&5
19650fd6
AS
6334sed 's/^/| /' conftest.$ac_ext >&5
6335
98418dba
CW
6336ac_cv_c_volatile=no
6337fi
6338rm -f conftest.$ac_objext conftest.$ac_ext
6339fi
c0d27fcc 6340echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
6341echo "${ECHO_T}$ac_cv_c_volatile" >&6
6342if test $ac_cv_c_volatile = no; then
6343
c0d27fcc 6344cat >>confdefs.h <<\_ACEOF
98418dba 6345#define volatile
c0d27fcc 6346_ACEOF
98418dba
CW
6347
6348fi
6349
c0d27fcc 6350echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
6351echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
6352if test "${ac_cv_c_const+set}" = set; then
6353 echo $ECHO_N "(cached) $ECHO_C" >&6
6354else
6355 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 6356#line $LINENO "configure"
19650fd6
AS
6357/* confdefs.h. */
6358_ACEOF
6359cat confdefs.h >>conftest.$ac_ext
6360cat >>conftest.$ac_ext <<_ACEOF
6361/* end confdefs.h. */
98418dba 6362
98418dba
CW
6363int
6364main ()
6365{
6366/* FIXME: Include the comments suggested by Paul. */
6367#ifndef __cplusplus
6368 /* Ultrix mips cc rejects this. */
6369 typedef int charset[2];
6370 const charset x;
6371 /* SunOS 4.1.1 cc rejects this. */
6372 char const *const *ccp;
6373 char **p;
6374 /* NEC SVR4.0.2 mips cc rejects this. */
6375 struct point {int x, y;};
6376 static struct point const zero = {0,0};
6377 /* AIX XL C 1.02.0.0 rejects this.
6378 It does not let you subtract one const X* pointer from another in
6379 an arm of an if-expression whose if-part is not a constant
6380 expression */
6381 const char *g = "string";
6382 ccp = &g + (g ? g-g : 0);
6383 /* HPUX 7.0 cc rejects these. */
6384 ++ccp;
6385 p = (char**) ccp;
6386 ccp = (char const *const *) p;
6387 { /* SCO 3.2v4 cc rejects this. */
6388 char *t;
6389 char const *s = 0 ? (char *) 0 : (char const *) 0;
6390
6391 *t++ = 0;
6392 }
6393 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6394 int x[] = {25, 17};
6395 const int *foo = &x[0];
6396 ++foo;
6397 }
6398 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6399 typedef const int *iptr;
6400 iptr p = 0;
6401 ++p;
6402 }
6403 { /* AIX XL C 1.02.0.0 rejects this saying
6404 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6405 struct s { int j; const int *ap[3]; };
6406 struct s *b; b->j = 5;
6407 }
6408 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6409 const int foo = 10;
6410 }
6411#endif
6412
6413 ;
6414 return 0;
6415}
6416_ACEOF
6417rm -f conftest.$ac_objext
c0d27fcc 6418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
6419 (eval $ac_compile) 2>&5
6420 ac_status=$?
c0d27fcc 6421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6422 (exit $ac_status); } &&
793fa0d7 6423 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6425 (eval $ac_try) 2>&5
6426 ac_status=$?
c0d27fcc 6427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6428 (exit $ac_status); }; }; then
6429 ac_cv_c_const=yes
6430else
6431 echo "$as_me: failed program was:" >&5
19650fd6
AS
6432sed 's/^/| /' conftest.$ac_ext >&5
6433
98418dba
CW
6434ac_cv_c_const=no
6435fi
6436rm -f conftest.$ac_objext conftest.$ac_ext
6437fi
c0d27fcc 6438echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
6439echo "${ECHO_T}$ac_cv_c_const" >&6
6440if test $ac_cv_c_const = no; then
6441
c0d27fcc 6442cat >>confdefs.h <<\_ACEOF
98418dba 6443#define const
c0d27fcc 6444_ACEOF
98418dba
CW
6445
6446fi
6447
c0d27fcc 6448echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
6449echo $ECHO_N "checking for void * support... $ECHO_C" >&6
6450if test "${emacs_cv_void_star+set}" = set; then
6451 echo $ECHO_N "(cached) $ECHO_C" >&6
6452else
6453 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 6454#line $LINENO "configure"
19650fd6
AS
6455/* confdefs.h. */
6456_ACEOF
6457cat confdefs.h >>conftest.$ac_ext
6458cat >>conftest.$ac_ext <<_ACEOF
6459/* end confdefs.h. */
98418dba 6460
98418dba
CW
6461int
6462main ()
6463{
6464void * foo;
6465 ;
6466 return 0;
6467}
6468_ACEOF
6469rm -f conftest.$ac_objext
c0d27fcc 6470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
6471 (eval $ac_compile) 2>&5
6472 ac_status=$?
c0d27fcc 6473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6474 (exit $ac_status); } &&
793fa0d7 6475 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6477 (eval $ac_try) 2>&5
6478 ac_status=$?
c0d27fcc 6479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6480 (exit $ac_status); }; }; then
6481 emacs_cv_void_star=yes
6482else
6483 echo "$as_me: failed program was:" >&5
19650fd6
AS
6484sed 's/^/| /' conftest.$ac_ext >&5
6485
98418dba
CW
6486emacs_cv_void_star=no
6487fi
6488rm -f conftest.$ac_objext conftest.$ac_ext
6489fi
c0d27fcc 6490echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
6491echo "${ECHO_T}$emacs_cv_void_star" >&6
6492if test $emacs_cv_void_star = yes; then
c0d27fcc 6493 cat >>confdefs.h <<\_ACEOF
98418dba 6494#define POINTER_TYPE void
c0d27fcc 6495_ACEOF
98418dba
CW
6496
6497else
c0d27fcc 6498 cat >>confdefs.h <<\_ACEOF
98418dba 6499#define POINTER_TYPE char
c0d27fcc 6500_ACEOF
98418dba
CW
6501
6502fi
6503
c0d27fcc 6504
cd958eb3 6505
19650fd6
AS
6506echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6507echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
793fa0d7 6508set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
98418dba
CW
6509if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
6510 echo $ECHO_N "(cached) $ECHO_C" >&6
6511else
c0d27fcc 6512 cat >conftest.make <<\_ACEOF
98418dba 6513all:
19650fd6 6514 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 6515_ACEOF
98418dba
CW
6516# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6517eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
6518if test -n "$ac_maketemp"; then
6519 eval ac_cv_prog_make_${ac_make}_set=yes
6520else
6521 eval ac_cv_prog_make_${ac_make}_set=no
6522fi
6523rm -f conftest.make
6524fi
6525if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 6526 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
6527echo "${ECHO_T}yes" >&6
6528 SET_MAKE=
6529else
c0d27fcc 6530 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
6531echo "${ECHO_T}no" >&6
6532 SET_MAKE="MAKE=${MAKE-make}"
6533fi
6534
c0d27fcc
MR
6535
6536echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
6537echo $ECHO_N "checking for long file names... $ECHO_C" >&6
6538if test "${ac_cv_sys_long_file_names+set}" = set; then
6539 echo $ECHO_N "(cached) $ECHO_C" >&6
6540else
6541 ac_cv_sys_long_file_names=yes
6542# Test for long file names in all the places we know might matter:
6543# . the current directory, where building will happen
6544# $prefix/lib where we will be installing things
6545# $exec_prefix/lib likewise
6546# eval it to expand exec_prefix.
6547# $TMPDIR if set, where it might want to write temporary files
6548# if $TMPDIR is not set:
6549# /tmp where it might want to write temporary files
6550# /var/tmp likewise
6551# /usr/tmp likewise
6552if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
6553 ac_tmpdirs=$TMPDIR
6554else
6555 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
6556fi
6557for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
6558 test -d $ac_dir || continue
6559 test -w $ac_dir || continue # It is less confusing to not echo anything here.
6560 ac_xdir=$ac_dir/cf$$
6561 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
6562 ac_tf1=$ac_xdir/conftest9012345
6563 ac_tf2=$ac_xdir/conftest9012346
6564 (echo 1 >$ac_tf1) 2>/dev/null
6565 (echo 2 >$ac_tf2) 2>/dev/null
6566 ac_val=`cat $ac_tf1 2>/dev/null`
6567 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
6568 ac_cv_sys_long_file_names=no
6569 rm -rf $ac_xdir 2>/dev/null
6570 break
6571 fi
6572 rm -rf $ac_xdir 2>/dev/null
6573done
6574fi
c0d27fcc 6575echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
6576echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
6577if test $ac_cv_sys_long_file_names = yes; then
6578
c0d27fcc 6579cat >>confdefs.h <<\_ACEOF
98418dba 6580#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 6581_ACEOF
98418dba
CW
6582
6583fi
6584
c0d27fcc 6585
98418dba
CW
6586#### Choose a window system.
6587
c0d27fcc 6588echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
6589echo $ECHO_N "checking for X... $ECHO_C" >&6
6590
c0d27fcc 6591
98418dba
CW
6592# Check whether --with-x or --without-x was given.
6593if test "${with_x+set}" = set; then
6594 withval="$with_x"
6595
6596fi;
6597# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6598if test "x$with_x" = xno; then
6599 # The user explicitly disabled X.
6600 have_x=disabled
6601else
6602 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6603 # Both variables are already set.
6604 have_x=yes
6605 else
6606 if test "${ac_cv_have_x+set}" = set; then
6607 echo $ECHO_N "(cached) $ECHO_C" >&6
6608else
6609 # One or both of the vars are not set, and there is no cached value.
6610ac_x_includes=no ac_x_libraries=no
6611rm -fr conftest.dir
6612if mkdir conftest.dir; then
6613 cd conftest.dir
6614 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 6615 cat >Imakefile <<'_ACEOF'
98418dba
CW
6616acfindx:
6617 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 6618_ACEOF
98418dba
CW
6619 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6620 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6621 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6622 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6623 for ac_extension in a so sl; do
6624 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
793fa0d7
DL
6625 test -f $ac_im_libdir/libX11.$ac_extension; then
6626 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
6627 fi
6628 done
6629 # Screen out bogus values from the imake configuration. They are
6630 # bogus both because they are the default anyway, and because
6631 # using them would break gcc on systems where it needs fixed includes.
6632 case $ac_im_incroot in
6633 /usr/include) ;;
6634 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6635 esac
6636 case $ac_im_usrlibdir in
6637 /usr/lib | /lib) ;;
6638 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6639 esac
6640 fi
6641 cd ..
6642 rm -fr conftest.dir
6643fi
6644
6645# Standard set of common directories for X headers.
6646# Check X11 before X11Rn because it is often a symlink to the current release.
6647ac_x_header_dirs='
6648/usr/X11/include
6649/usr/X11R6/include
6650/usr/X11R5/include
6651/usr/X11R4/include
6652
6653/usr/include/X11
6654/usr/include/X11R6
6655/usr/include/X11R5
6656/usr/include/X11R4
6657
6658/usr/local/X11/include
6659/usr/local/X11R6/include
6660/usr/local/X11R5/include
6661/usr/local/X11R4/include
6662
6663/usr/local/include/X11
6664/usr/local/include/X11R6
6665/usr/local/include/X11R5
6666/usr/local/include/X11R4
6667
6668/usr/X386/include
6669/usr/x386/include
6670/usr/XFree86/include/X11
6671
6672/usr/include
6673/usr/local/include
6674/usr/unsupported/include
6675/usr/athena/include
6676/usr/local/x11r5/include
6677/usr/lpp/Xamples/include
6678
6679/usr/openwin/include
6680/usr/openwin/share/include'
6681
6682if test "$ac_x_includes" = no; then
6683 # Guess where to find include files, by looking for Intrinsic.h.
6684 # First, try using that file with no special directory specified.
6685 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 6686#line $LINENO "configure"
19650fd6
AS
6687/* confdefs.h. */
6688_ACEOF
6689cat confdefs.h >>conftest.$ac_ext
6690cat >>conftest.$ac_ext <<_ACEOF
6691/* end confdefs.h. */
98418dba
CW
6692#include <X11/Intrinsic.h>
6693_ACEOF
c0d27fcc 6694if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
6695 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6696 ac_status=$?
6bae0ccf 6697 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6698 rm -f conftest.er1
6699 cat conftest.err >&5
c0d27fcc 6700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6701 (exit $ac_status); } >/dev/null; then
6702 if test -s conftest.err; then
6703 ac_cpp_err=$ac_c_preproc_warn_flag
6704 else
6705 ac_cpp_err=
6706 fi
6707else
6708 ac_cpp_err=yes
6709fi
6710if test -z "$ac_cpp_err"; then
6711 # We can compile using X headers with no special include directory.
6712ac_x_includes=
6713else
6714 echo "$as_me: failed program was:" >&5
19650fd6
AS
6715sed 's/^/| /' conftest.$ac_ext >&5
6716
98418dba
CW
6717 for ac_dir in $ac_x_header_dirs; do
6718 if test -r "$ac_dir/X11/Intrinsic.h"; then
6719 ac_x_includes=$ac_dir
6720 break
6721 fi
6722done
6723fi
6724rm -f conftest.err conftest.$ac_ext
6725fi # $ac_x_includes = no
6726
6727if test "$ac_x_libraries" = no; then
6728 # Check for the libraries.
6729 # See if we find them without any special options.
6730 # Don't add to $LIBS permanently.
6731 ac_save_LIBS=$LIBS
6732 LIBS="-lXt $LIBS"
6733 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 6734#line $LINENO "configure"
19650fd6
AS
6735/* confdefs.h. */
6736_ACEOF
6737cat confdefs.h >>conftest.$ac_ext
6738cat >>conftest.$ac_ext <<_ACEOF
6739/* end confdefs.h. */
98418dba 6740#include <X11/Intrinsic.h>
98418dba
CW
6741int
6742main ()
6743{
6744XtMalloc (0)
6745 ;
6746 return 0;
6747}
6748_ACEOF
6749rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
6751 (eval $ac_link) 2>&5
6752 ac_status=$?
c0d27fcc 6753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6754 (exit $ac_status); } &&
793fa0d7 6755 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6757 (eval $ac_try) 2>&5
6758 ac_status=$?
c0d27fcc 6759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6760 (exit $ac_status); }; }; then
6761 LIBS=$ac_save_LIBS
6762# We can link X programs with no special library path.
6763ac_x_libraries=
6764else
6765 echo "$as_me: failed program was:" >&5
19650fd6
AS
6766sed 's/^/| /' conftest.$ac_ext >&5
6767
98418dba
CW
6768LIBS=$ac_save_LIBS
6769for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6770do
6771 # Don't even attempt the hair of trying to link an X program!
6772 for ac_extension in a so sl; do
6773 if test -r $ac_dir/libXt.$ac_extension; then
6774 ac_x_libraries=$ac_dir
6775 break 2
6776 fi
6777 done
6778done
6779fi
6780rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6781fi # $ac_x_libraries = no
6782
6783if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
6784 # Didn't find X anywhere. Cache the known absence of X.
6785 ac_cv_have_x="have_x=no"
6786else
6787 # Record where we found X for the cache.
6788 ac_cv_have_x="have_x=yes \
793fa0d7 6789 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
98418dba
CW
6790fi
6791fi
6792
6793 fi
6794 eval "$ac_cv_have_x"
6795fi # $with_x != no
6796
6797if test "$have_x" != yes; then
c0d27fcc 6798 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
6799echo "${ECHO_T}$have_x" >&6
6800 no_x=yes
6801else
6802 # If each of the values was on the command line, it overrides each guess.
6803 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6804 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6805 # Update the cache value to reflect the command line values.
6806 ac_cv_have_x="have_x=yes \
6807 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
c0d27fcc 6808 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
98418dba
CW
6809echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
6810fi
6811
6812if test "$no_x" = yes; then
6813 window_system=none
6814else
6815 window_system=x11
6816fi
6817
6818if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
6819 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
6820 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
6821 x_default_search_path=""
6822 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
6823 x_search_path="\
6824${x_library}/X11/%L/%T/%N%C%S:\
6825${x_library}/X11/%l/%T/%N%C%S:\
6826${x_library}/X11/%T/%N%C%S:\
6827${x_library}/X11/%L/%T/%N%S:\
6828${x_library}/X11/%l/%T/%N%S:\
6829${x_library}/X11/%T/%N%S"
6830 if test x"${x_default_search_path}" = x; then
6831 x_default_search_path=${x_search_path}
6832 else
6833 x_default_search_path="${x_search_path}:${x_default_search_path}"
6834 fi
6835 done
6836fi
6837if test "${x_includes}" != NONE && test -n "${x_includes}"; then
6838 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
6839fi
6840
6841if test x"${x_includes}" = x; then
6842 bitmapdir=/usr/include/X11/bitmaps
6843else
6844 # accumulate include directories that have X11 bitmap subdirectories
6845 bmd_acc="dummyval"
6846 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
6847 if test -d "${bmd}/X11/bitmaps"; then
6848 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
6849 fi
6850 if test -d "${bmd}/bitmaps"; then
6851 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
6852 fi
6853 done
6854 if test ${bmd_acc} != "dummyval"; then
6855 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
6856 fi
6857fi
6858
6859case "${window_system}" in
6860 x11 )
6861 HAVE_X_WINDOWS=yes
6862 HAVE_X11=yes
6863 case "${with_x_toolkit}" in
6864 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
6865 motif ) USE_X_TOOLKIT=MOTIF ;;
488dd4c4
JD
6866 gtk ) with_gtk=yes
6867 USE_X_TOOLKIT=none ;;
98418dba
CW
6868 no ) USE_X_TOOLKIT=none ;;
6869 * ) USE_X_TOOLKIT=maybe ;;
6870 esac
6871 ;;
6872 none )
6873 HAVE_X_WINDOWS=no
6874 HAVE_X11=no
6875 USE_X_TOOLKIT=none
6876 ;;
6877esac
6878
6879### If we're using X11, we should use the X menu package.
6880HAVE_MENUS=no
6881case ${HAVE_X11} in
6882 yes ) HAVE_MENUS=yes ;;
6883esac
6884
6885if test "${opsys}" = "hpux9"; then
6886 case "${x_libraries}" in
6887 *X11R4* )
6888 opsysfile="s/hpux9-x11r4.h"
6889 ;;
6890 esac
6891fi
6892
6893if test "${opsys}" = "hpux9shr"; then
6894 case "${x_libraries}" in
6895 *X11R4* )
6896 opsysfile="s/hpux9shxr4.h"
6897 ;;
6898 esac
6899fi
6900
6901### Compute the unexec source name from the object name.
6902UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
6903
6904# Do the opsystem or machine files prohibit the use of the GNU malloc?
6905# Assume not, until told otherwise.
6906GNU_MALLOC=yes
6907doug_lea_malloc=yes
c0d27fcc 6908echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
6909echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
6910if test "${ac_cv_func_malloc_get_state+set}" = set; then
6911 echo $ECHO_N "(cached) $ECHO_C" >&6
6912else
6913 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 6914#line $LINENO "configure"
19650fd6
AS
6915/* confdefs.h. */
6916_ACEOF
6917cat confdefs.h >>conftest.$ac_ext
6918cat >>conftest.$ac_ext <<_ACEOF
6919/* end confdefs.h. */
98418dba 6920/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
6921 which can conflict with char malloc_get_state (); below.
6922 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6923 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
6924#ifdef __STDC__
6925# include <limits.h>
6926#else
6927# include <assert.h>
6928#endif
98418dba
CW
6929/* Override any gcc2 internal prototype to avoid an error. */
6930#ifdef __cplusplus
6931extern "C"
19650fd6 6932{
98418dba
CW
6933#endif
6934/* We use char because int might match the return type of a gcc2
6935 builtin and then its argument prototype would still apply. */
6936char malloc_get_state ();
98418dba
CW
6937/* The GNU C library defines this for functions which it implements
6938 to always fail with ENOSYS. Some functions are actually named
6939 something starting with __ and the normal name is an alias. */
6940#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
6941choke me
6942#else
19650fd6
AS
6943char (*f) () = malloc_get_state;
6944#endif
6945#ifdef __cplusplus
6946}
98418dba
CW
6947#endif
6948
19650fd6
AS
6949int
6950main ()
6951{
6952return f != malloc_get_state;
98418dba
CW
6953 ;
6954 return 0;
6955}
6956_ACEOF
6957rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6958if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
6959 (eval $ac_link) 2>&5
6960 ac_status=$?
c0d27fcc 6961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6962 (exit $ac_status); } &&
793fa0d7 6963 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6965 (eval $ac_try) 2>&5
6966 ac_status=$?
c0d27fcc 6967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6968 (exit $ac_status); }; }; then
6969 ac_cv_func_malloc_get_state=yes
6970else
6971 echo "$as_me: failed program was:" >&5
19650fd6
AS
6972sed 's/^/| /' conftest.$ac_ext >&5
6973
98418dba
CW
6974ac_cv_func_malloc_get_state=no
6975fi
6976rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6977fi
c0d27fcc 6978echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
6979echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
6980if test $ac_cv_func_malloc_get_state = yes; then
6981 :
6982else
6983 doug_lea_malloc=no
6984fi
6985
c0d27fcc 6986echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
6987echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
6988if test "${ac_cv_func_malloc_set_state+set}" = set; then
6989 echo $ECHO_N "(cached) $ECHO_C" >&6
6990else
6991 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 6992#line $LINENO "configure"
19650fd6
AS
6993/* confdefs.h. */
6994_ACEOF
6995cat confdefs.h >>conftest.$ac_ext
6996cat >>conftest.$ac_ext <<_ACEOF
6997/* end confdefs.h. */
98418dba 6998/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
6999 which can conflict with char malloc_set_state (); below.
7000 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7001 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
7002#ifdef __STDC__
7003# include <limits.h>
7004#else
7005# include <assert.h>
7006#endif
98418dba
CW
7007/* Override any gcc2 internal prototype to avoid an error. */
7008#ifdef __cplusplus
7009extern "C"
19650fd6 7010{
98418dba
CW
7011#endif
7012/* We use char because int might match the return type of a gcc2
7013 builtin and then its argument prototype would still apply. */
7014char malloc_set_state ();
98418dba
CW
7015/* The GNU C library defines this for functions which it implements
7016 to always fail with ENOSYS. Some functions are actually named
7017 something starting with __ and the normal name is an alias. */
7018#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
7019choke me
7020#else
19650fd6
AS
7021char (*f) () = malloc_set_state;
7022#endif
7023#ifdef __cplusplus
7024}
98418dba
CW
7025#endif
7026
19650fd6
AS
7027int
7028main ()
7029{
7030return f != malloc_set_state;
98418dba
CW
7031 ;
7032 return 0;
7033}
7034_ACEOF
7035rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7036if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7037 (eval $ac_link) 2>&5
7038 ac_status=$?
c0d27fcc 7039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7040 (exit $ac_status); } &&
793fa0d7 7041 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7043 (eval $ac_try) 2>&5
7044 ac_status=$?
c0d27fcc 7045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7046 (exit $ac_status); }; }; then
7047 ac_cv_func_malloc_set_state=yes
7048else
7049 echo "$as_me: failed program was:" >&5
19650fd6
AS
7050sed 's/^/| /' conftest.$ac_ext >&5
7051
98418dba
CW
7052ac_cv_func_malloc_set_state=no
7053fi
7054rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7055fi
c0d27fcc 7056echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
7057echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
7058if test $ac_cv_func_malloc_set_state = yes; then
7059 :
7060else
7061 doug_lea_malloc=no
7062fi
7063
c0d27fcc 7064echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
7065echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
7066if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
7067 echo $ECHO_N "(cached) $ECHO_C" >&6
7068else
7069 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 7070#line $LINENO "configure"
19650fd6
AS
7071/* confdefs.h. */
7072_ACEOF
7073cat confdefs.h >>conftest.$ac_ext
7074cat >>conftest.$ac_ext <<_ACEOF
7075/* end confdefs.h. */
98418dba 7076extern void (* __after_morecore_hook)();
98418dba
CW
7077int
7078main ()
7079{
7080__after_morecore_hook = 0
7081 ;
7082 return 0;
7083}
7084_ACEOF
7085rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7086if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7087 (eval $ac_link) 2>&5
7088 ac_status=$?
c0d27fcc 7089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7090 (exit $ac_status); } &&
793fa0d7 7091 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7093 (eval $ac_try) 2>&5
7094 ac_status=$?
c0d27fcc 7095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7096 (exit $ac_status); }; }; then
7097 emacs_cv_var___after_morecore_hook=yes
7098else
7099 echo "$as_me: failed program was:" >&5
19650fd6
AS
7100sed 's/^/| /' conftest.$ac_ext >&5
7101
98418dba
CW
7102emacs_cv_var___after_morecore_hook=no
7103fi
7104rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7105fi
c0d27fcc 7106echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
7107echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
7108if test $emacs_cv_var___after_morecore_hook = no; then
7109 doug_lea_malloc=no
7110fi
7111if test "${system_malloc}" = "yes"; then
7112 GNU_MALLOC=no
7113 GNU_MALLOC_reason="
7114 (The GNU allocators don't work with this system configuration.)"
7115fi
7116if test "$doug_lea_malloc" = "yes" ; then
7117 if test "$GNU_MALLOC" = yes ; then
7118 GNU_MALLOC_reason="
7119 (Using Doug Lea's new malloc from the GNU C Library.)"
7120 fi
b936fae4 7121
c0d27fcc 7122cat >>confdefs.h <<\_ACEOF
98418dba 7123#define DOUG_LEA_MALLOC 1
c0d27fcc 7124_ACEOF
98418dba
CW
7125
7126fi
7127
7128if test x"${REL_ALLOC}" = x; then
7129 REL_ALLOC=${GNU_MALLOC}
7130fi
7131
7132
c0d27fcc
MR
7133
7134
7135for ac_header in stdlib.h unistd.h
98418dba
CW
7136do
7137as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
7138if eval "test \"\${$as_ac_Header+set}\" = set"; then
7139 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
7140echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7141if eval "test \"\${$as_ac_Header+set}\" = set"; then
7142 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
7143fi
7144echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7145echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 7146else
c0d27fcc
MR
7147 # Is the header compilable?
7148echo "$as_me:$LINENO: checking $ac_header usability" >&5
7149echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7150cat >conftest.$ac_ext <<_ACEOF
793fa0d7 7151#line $LINENO "configure"
19650fd6
AS
7152/* confdefs.h. */
7153_ACEOF
7154cat confdefs.h >>conftest.$ac_ext
7155cat >>conftest.$ac_ext <<_ACEOF
7156/* end confdefs.h. */
98418dba
CW
7157$ac_includes_default
7158#include <$ac_header>
7159_ACEOF
7160rm -f conftest.$ac_objext
c0d27fcc 7161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
7162 (eval $ac_compile) 2>&5
7163 ac_status=$?
c0d27fcc 7164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7165 (exit $ac_status); } &&
793fa0d7 7166 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7168 (eval $ac_try) 2>&5
7169 ac_status=$?
c0d27fcc 7170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7171 (exit $ac_status); }; }; then
c0d27fcc 7172 ac_header_compiler=yes
98418dba
CW
7173else
7174 echo "$as_me: failed program was:" >&5
19650fd6
AS
7175sed 's/^/| /' conftest.$ac_ext >&5
7176
c0d27fcc 7177ac_header_compiler=no
98418dba
CW
7178fi
7179rm -f conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
7180echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7181echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 7182
c0d27fcc
MR
7183# Is the header present?
7184echo "$as_me:$LINENO: checking $ac_header presence" >&5
7185echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7186cat >conftest.$ac_ext <<_ACEOF
793fa0d7 7187#line $LINENO "configure"
19650fd6
AS
7188/* confdefs.h. */
7189_ACEOF
7190cat confdefs.h >>conftest.$ac_ext
7191cat >>conftest.$ac_ext <<_ACEOF
7192/* end confdefs.h. */
98418dba
CW
7193#include <$ac_header>
7194_ACEOF
c0d27fcc 7195if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7196 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7197 ac_status=$?
6bae0ccf 7198 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
7199 rm -f conftest.er1
7200 cat conftest.err >&5
c0d27fcc 7201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7202 (exit $ac_status); } >/dev/null; then
7203 if test -s conftest.err; then
7204 ac_cpp_err=$ac_c_preproc_warn_flag
7205 else
7206 ac_cpp_err=
7207 fi
7208else
7209 ac_cpp_err=yes
7210fi
7211if test -z "$ac_cpp_err"; then
c0d27fcc 7212 ac_header_preproc=yes
98418dba
CW
7213else
7214 echo "$as_me: failed program was:" >&5
19650fd6
AS
7215sed 's/^/| /' conftest.$ac_ext >&5
7216
c0d27fcc 7217 ac_header_preproc=no
98418dba
CW
7218fi
7219rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
7220echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7221echo "${ECHO_T}$ac_header_preproc" >&6
7222
7223# So? What about this header?
7224case $ac_header_compiler:$ac_header_preproc in
7225 yes:no )
7226 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7227echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
7228 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7229echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7230 (
7231 cat <<\_ASBOX
7232## ------------------------------------ ##
7233## Report this to bug-autoconf@gnu.org. ##
7234## ------------------------------------ ##
7235_ASBOX
7236 ) |
7237 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 7238 ;;
c0d27fcc
MR
7239 no:yes )
7240 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7241echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
7242 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7243echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 7244 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 7245echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
7246 (
7247 cat <<\_ASBOX
793fa0d7
DL
7248## ------------------------------------ ##
7249## Report this to bug-autoconf@gnu.org. ##
7250## ------------------------------------ ##
19650fd6
AS
7251_ASBOX
7252 ) |
7253 sed "s/^/$as_me: WARNING: /" >&2
7254 ;;
c0d27fcc
MR
7255esac
7256echo "$as_me:$LINENO: checking for $ac_header" >&5
7257echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7258if eval "test \"\${$as_ac_Header+set}\" = set"; then
7259 echo $ECHO_N "(cached) $ECHO_C" >&6
7260else
793fa0d7 7261 eval "$as_ac_Header=$ac_header_preproc"
98418dba 7262fi
c0d27fcc 7263echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 7264echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
7265
7266fi
98418dba 7267if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 7268 cat >>confdefs.h <<_ACEOF
98418dba 7269#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 7270_ACEOF
98418dba
CW
7271
7272fi
c0d27fcc 7273
98418dba
CW
7274done
7275
c0d27fcc 7276
98418dba
CW
7277for ac_func in getpagesize
7278do
7279as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 7280echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
7281echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7282if eval "test \"\${$as_ac_var+set}\" = set"; then
7283 echo $ECHO_N "(cached) $ECHO_C" >&6
7284else
7285 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 7286#line $LINENO "configure"
19650fd6
AS
7287/* confdefs.h. */
7288_ACEOF
7289cat confdefs.h >>conftest.$ac_ext
7290cat >>conftest.$ac_ext <<_ACEOF
7291/* end confdefs.h. */
98418dba 7292/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
7293 which can conflict with char $ac_func (); below.
7294 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7295 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
7296#ifdef __STDC__
7297# include <limits.h>
7298#else
7299# include <assert.h>
7300#endif
98418dba
CW
7301/* Override any gcc2 internal prototype to avoid an error. */
7302#ifdef __cplusplus
7303extern "C"
19650fd6 7304{
98418dba
CW
7305#endif
7306/* We use char because int might match the return type of a gcc2
7307 builtin and then its argument prototype would still apply. */
7308char $ac_func ();
98418dba
CW
7309/* The GNU C library defines this for functions which it implements
7310 to always fail with ENOSYS. Some functions are actually named
7311 something starting with __ and the normal name is an alias. */
7312#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7313choke me
7314#else
19650fd6
AS
7315char (*f) () = $ac_func;
7316#endif
7317#ifdef __cplusplus
7318}
98418dba
CW
7319#endif
7320
19650fd6
AS
7321int
7322main ()
7323{
7324return f != $ac_func;
98418dba
CW
7325 ;
7326 return 0;
7327}
7328_ACEOF
7329rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7330if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7331 (eval $ac_link) 2>&5
7332 ac_status=$?
c0d27fcc 7333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7334 (exit $ac_status); } &&
793fa0d7 7335 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7337 (eval $ac_try) 2>&5
7338 ac_status=$?
c0d27fcc 7339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7340 (exit $ac_status); }; }; then
7341 eval "$as_ac_var=yes"
7342else
7343 echo "$as_me: failed program was:" >&5
19650fd6
AS
7344sed 's/^/| /' conftest.$ac_ext >&5
7345
98418dba
CW
7346eval "$as_ac_var=no"
7347fi
7348rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7349fi
c0d27fcc 7350echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
7351echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7352if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 7353 cat >>confdefs.h <<_ACEOF
98418dba 7354#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 7355_ACEOF
98418dba
CW
7356
7357fi
7358done
7359
c0d27fcc 7360echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
7361echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
7362if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7363 echo $ECHO_N "(cached) $ECHO_C" >&6
7364else
7365 if test "$cross_compiling" = yes; then
7366 ac_cv_func_mmap_fixed_mapped=no
7367else
7368 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 7369#line $LINENO "configure"
19650fd6
AS
7370/* confdefs.h. */
7371_ACEOF
7372cat confdefs.h >>conftest.$ac_ext
7373cat >>conftest.$ac_ext <<_ACEOF
7374/* end confdefs.h. */
98418dba 7375$ac_includes_default
c0d27fcc
MR
7376/* malloc might have been renamed as rpl_malloc. */
7377#undef malloc
7378
98418dba
CW
7379/* Thanks to Mike Haertel and Jim Avera for this test.
7380 Here is a matrix of mmap possibilities:
7381 mmap private not fixed
7382 mmap private fixed at somewhere currently unmapped
7383 mmap private fixed at somewhere already mapped
7384 mmap shared not fixed
7385 mmap shared fixed at somewhere currently unmapped
7386 mmap shared fixed at somewhere already mapped
7387 For private mappings, we should verify that changes cannot be read()
7388 back from the file, nor mmap's back from the file at a different
7389 address. (There have been systems where private was not correctly
7390 implemented like the infamous i386 svr4.0, and systems where the
7391 VM page cache was not coherent with the file system buffer cache
7392 like early versions of FreeBSD and possibly contemporary NetBSD.)
7393 For shared mappings, we should conversely verify that changes get
c0d27fcc 7394 propagated back to all the places they're supposed to be.
98418dba
CW
7395
7396 Grep wants private fixed already mapped.
7397 The main things grep needs to know about mmap are:
7398 * does it exist and is it safe to write into the mmap'd area
7399 * how to use it (BSD variants) */
7400
7401#include <fcntl.h>
7402#include <sys/mman.h>
7403
7404#if !STDC_HEADERS && !HAVE_STDLIB_H
7405char *malloc ();
7406#endif
7407
7408/* This mess was copied from the GNU getpagesize.h. */
7409#if !HAVE_GETPAGESIZE
7410/* Assume that all systems that can run configure have sys/param.h. */
7411# if !HAVE_SYS_PARAM_H
7412# define HAVE_SYS_PARAM_H 1
7413# endif
7414
7415# ifdef _SC_PAGESIZE
7416# define getpagesize() sysconf(_SC_PAGESIZE)
7417# else /* no _SC_PAGESIZE */
7418# if HAVE_SYS_PARAM_H
7419# include <sys/param.h>
7420# ifdef EXEC_PAGESIZE
7421# define getpagesize() EXEC_PAGESIZE
7422# else /* no EXEC_PAGESIZE */
7423# ifdef NBPG
7424# define getpagesize() NBPG * CLSIZE
7425# ifndef CLSIZE
7426# define CLSIZE 1
7427# endif /* no CLSIZE */
7428# else /* no NBPG */
7429# ifdef NBPC
7430# define getpagesize() NBPC
7431# else /* no NBPC */
7432# ifdef PAGESIZE
7433# define getpagesize() PAGESIZE
7434# endif /* PAGESIZE */
7435# endif /* no NBPC */
7436# endif /* no NBPG */
7437# endif /* no EXEC_PAGESIZE */
7438# else /* no HAVE_SYS_PARAM_H */
7439# define getpagesize() 8192 /* punt totally */
7440# endif /* no HAVE_SYS_PARAM_H */
7441# endif /* no _SC_PAGESIZE */
7442
7443#endif /* no HAVE_GETPAGESIZE */
7444
7445int
7446main ()
7447{
7448 char *data, *data2, *data3;
7449 int i, pagesize;
7450 int fd;
7451
7452 pagesize = getpagesize ();
7453
7454 /* First, make a file with some known garbage in it. */
7455 data = (char *) malloc (pagesize);
7456 if (!data)
7457 exit (1);
7458 for (i = 0; i < pagesize; ++i)
7459 *(data + i) = rand ();
7460 umask (0);
7461 fd = creat ("conftest.mmap", 0600);
7462 if (fd < 0)
7463 exit (1);
7464 if (write (fd, data, pagesize) != pagesize)
7465 exit (1);
7466 close (fd);
7467
7468 /* Next, try to mmap the file at a fixed address which already has
7469 something else allocated at it. If we can, also make sure that
7470 we see the same garbage. */
7471 fd = open ("conftest.mmap", O_RDWR);
7472 if (fd < 0)
7473 exit (1);
7474 data2 = (char *) malloc (2 * pagesize);
7475 if (!data2)
7476 exit (1);
7477 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7478 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
793fa0d7 7479 MAP_PRIVATE | MAP_FIXED, fd, 0L))
98418dba
CW
7480 exit (1);
7481 for (i = 0; i < pagesize; ++i)
7482 if (*(data + i) != *(data2 + i))
7483 exit (1);
7484
7485 /* Finally, make sure that changes to the mapped area do not
7486 percolate back to the file as seen by read(). (This is a bug on
7487 some variants of i386 svr4.0.) */
7488 for (i = 0; i < pagesize; ++i)
7489 *(data2 + i) = *(data2 + i) + 1;
7490 data3 = (char *) malloc (pagesize);
7491 if (!data3)
7492 exit (1);
7493 if (read (fd, data3, pagesize) != pagesize)
7494 exit (1);
7495 for (i = 0; i < pagesize; ++i)
7496 if (*(data + i) != *(data3 + i))
7497 exit (1);
7498 close (fd);
7499 exit (0);
7500}
7501_ACEOF
7502rm -f conftest$ac_exeext
c0d27fcc 7503if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7504 (eval $ac_link) 2>&5
7505 ac_status=$?
c0d27fcc 7506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7507 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 7508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7509 (eval $ac_try) 2>&5
7510 ac_status=$?
c0d27fcc 7511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7512 (exit $ac_status); }; }; then
7513 ac_cv_func_mmap_fixed_mapped=yes
7514else
7515 echo "$as_me: program exited with status $ac_status" >&5
7516echo "$as_me: failed program was:" >&5
19650fd6
AS
7517sed 's/^/| /' conftest.$ac_ext >&5
7518
c0d27fcc 7519( exit $ac_status )
98418dba
CW
7520ac_cv_func_mmap_fixed_mapped=no
7521fi
851a3062 7522rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
7523fi
7524fi
c0d27fcc 7525echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
7526echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7527if test $ac_cv_func_mmap_fixed_mapped = yes; then
7528
c0d27fcc 7529cat >>confdefs.h <<\_ACEOF
98418dba 7530#define HAVE_MMAP 1
c0d27fcc 7531_ACEOF
98418dba
CW
7532
7533fi
7534rm -f conftest.mmap
7535
7536if test $use_mmap_for_buffers = yes; then
7537 REL_ALLOC=no
7538fi
7539
7540LIBS="$libsrc_libs $LIBS"
7541
c0d27fcc
MR
7542
7543echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
7544echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
7545if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
7546 echo $ECHO_N "(cached) $ECHO_C" >&6
7547else
7548 ac_check_lib_save_LIBS=$LIBS
7549LIBS="-ldnet $LIBS"
7550cat >conftest.$ac_ext <<_ACEOF
793fa0d7 7551#line $LINENO "configure"
19650fd6
AS
7552/* confdefs.h. */
7553_ACEOF
7554cat confdefs.h >>conftest.$ac_ext
7555cat >>conftest.$ac_ext <<_ACEOF
7556/* end confdefs.h. */
98418dba
CW
7557
7558/* Override any gcc2 internal prototype to avoid an error. */
7559#ifdef __cplusplus
7560extern "C"
7561#endif
7562/* We use char because int might match the return type of a gcc2
7563 builtin and then its argument prototype would still apply. */
7564char dnet_ntoa ();
98418dba
CW
7565int
7566main ()
7567{
7568dnet_ntoa ();
7569 ;
7570 return 0;
7571}
7572_ACEOF
7573rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7574if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7575 (eval $ac_link) 2>&5
7576 ac_status=$?
c0d27fcc 7577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7578 (exit $ac_status); } &&
793fa0d7 7579 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7581 (eval $ac_try) 2>&5
7582 ac_status=$?
c0d27fcc 7583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7584 (exit $ac_status); }; }; then
7585 ac_cv_lib_dnet_dnet_ntoa=yes
7586else
7587 echo "$as_me: failed program was:" >&5
19650fd6
AS
7588sed 's/^/| /' conftest.$ac_ext >&5
7589
98418dba
CW
7590ac_cv_lib_dnet_dnet_ntoa=no
7591fi
7592rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7593LIBS=$ac_check_lib_save_LIBS
7594fi
c0d27fcc 7595echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
7596echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
7597if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 7598 cat >>confdefs.h <<_ACEOF
98418dba 7599#define HAVE_LIBDNET 1
c0d27fcc 7600_ACEOF
98418dba
CW
7601
7602 LIBS="-ldnet $LIBS"
7603
7604fi
7605
c0d27fcc
MR
7606
7607echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
7608echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
7609if test "${ac_cv_lib_Xbsd_main+set}" = set; then
7610 echo $ECHO_N "(cached) $ECHO_C" >&6
7611else
7612 ac_check_lib_save_LIBS=$LIBS
7613LIBS="-lXbsd $LIBS"
7614cat >conftest.$ac_ext <<_ACEOF
793fa0d7 7615#line $LINENO "configure"
19650fd6
AS
7616/* confdefs.h. */
7617_ACEOF
7618cat confdefs.h >>conftest.$ac_ext
7619cat >>conftest.$ac_ext <<_ACEOF
7620/* end confdefs.h. */
98418dba 7621
c0d27fcc 7622
98418dba
CW
7623int
7624main ()
7625{
7626main ();
7627 ;
7628 return 0;
7629}
7630_ACEOF
7631rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7632if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7633 (eval $ac_link) 2>&5
7634 ac_status=$?
c0d27fcc 7635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7636 (exit $ac_status); } &&
793fa0d7 7637 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7639 (eval $ac_try) 2>&5
7640 ac_status=$?
c0d27fcc 7641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7642 (exit $ac_status); }; }; then
7643 ac_cv_lib_Xbsd_main=yes
7644else
7645 echo "$as_me: failed program was:" >&5
19650fd6
AS
7646sed 's/^/| /' conftest.$ac_ext >&5
7647
98418dba
CW
7648ac_cv_lib_Xbsd_main=no
7649fi
7650rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7651LIBS=$ac_check_lib_save_LIBS
7652fi
c0d27fcc 7653echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
7654echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
7655if test $ac_cv_lib_Xbsd_main = yes; then
7656 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
7657fi
7658
c0d27fcc
MR
7659
7660
7661echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
7662echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
7663if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
7664 echo $ECHO_N "(cached) $ECHO_C" >&6
7665else
7666 ac_check_lib_save_LIBS=$LIBS
7667LIBS="-lpthreads $LIBS"
7668cat >conftest.$ac_ext <<_ACEOF
793fa0d7 7669#line $LINENO "configure"
19650fd6
AS
7670/* confdefs.h. */
7671_ACEOF
7672cat confdefs.h >>conftest.$ac_ext
7673cat >>conftest.$ac_ext <<_ACEOF
7674/* end confdefs.h. */
98418dba
CW
7675
7676/* Override any gcc2 internal prototype to avoid an error. */
7677#ifdef __cplusplus
7678extern "C"
7679#endif
7680/* We use char because int might match the return type of a gcc2
7681 builtin and then its argument prototype would still apply. */
7682char cma_open ();
98418dba
CW
7683int
7684main ()
7685{
7686cma_open ();
7687 ;
7688 return 0;
7689}
7690_ACEOF
7691rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7693 (eval $ac_link) 2>&5
7694 ac_status=$?
c0d27fcc 7695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7696 (exit $ac_status); } &&
793fa0d7 7697 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7699 (eval $ac_try) 2>&5
7700 ac_status=$?
c0d27fcc 7701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7702 (exit $ac_status); }; }; then
7703 ac_cv_lib_pthreads_cma_open=yes
7704else
7705 echo "$as_me: failed program was:" >&5
19650fd6
AS
7706sed 's/^/| /' conftest.$ac_ext >&5
7707
98418dba
CW
7708ac_cv_lib_pthreads_cma_open=no
7709fi
7710rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7711LIBS=$ac_check_lib_save_LIBS
7712fi
c0d27fcc 7713echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
7714echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
7715if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 7716 cat >>confdefs.h <<_ACEOF
98418dba 7717#define HAVE_LIBPTHREADS 1
c0d27fcc 7718_ACEOF
98418dba
CW
7719
7720 LIBS="-lpthreads $LIBS"
7721
7722fi
7723
c0d27fcc
MR
7724
7725echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
7726echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
7727if test -d /usr/X386/include; then
7728 HAVE_XFREE386=yes
7729 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
7730else
7731 HAVE_XFREE386=no
7732fi
c0d27fcc 7733echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
7734echo "${ECHO_T}$HAVE_XFREE386" >&6
7735
55597d70
DL
7736
7737case ${host_os} in
7738aix*)
7739 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
7740echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
7741if test "${gdb_cv_bigtoc+set}" = set; then
7742 echo $ECHO_N "(cached) $ECHO_C" >&6
7743else
7744
7745 case $GCC in
7746 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
7747 *) gdb_cv_bigtoc=-bbigtoc ;;
7748 esac
7749
7750 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
7751 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 7752#line $LINENO "configure"
19650fd6
AS
7753/* confdefs.h. */
7754_ACEOF
7755cat confdefs.h >>conftest.$ac_ext
7756cat >>conftest.$ac_ext <<_ACEOF
7757/* end confdefs.h. */
55597d70
DL
7758
7759int
7760main ()
7761{
7762int i;
7763 ;
7764 return 0;
7765}
7766_ACEOF
7767rm -f conftest.$ac_objext conftest$ac_exeext
7768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7769 (eval $ac_link) 2>&5
7770 ac_status=$?
7771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7772 (exit $ac_status); } &&
793fa0d7 7773 { ac_try='test -s conftest$ac_exeext'
55597d70
DL
7774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7775 (eval $ac_try) 2>&5
7776 ac_status=$?
7777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7778 (exit $ac_status); }; }; then
7779 :
7780else
7781 echo "$as_me: failed program was:" >&5
19650fd6
AS
7782sed 's/^/| /' conftest.$ac_ext >&5
7783
55597d70
DL
7784gdb_cv_bigtoc=
7785fi
7786rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7787
7788fi
7789echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
7790echo "${ECHO_T}$gdb_cv_bigtoc" >&6
7791 ;;
7792esac
7793
ae1a998c
RS
7794# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
7795# used for the tests that follow. We set them back to REAL_CFLAGS and
7796# REAL_CPPFLAGS later on.
98418dba
CW
7797
7798REAL_CPPFLAGS="$CPPFLAGS"
7799
7800if test "${HAVE_X11}" = "yes"; then
7801 DEFS="$C_SWITCH_X_SITE $DEFS"
7802 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
7803 LIBS="$LIBX $LIBS"
7804 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
7805 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
7806
7807 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
7808 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
7809 # but it's more convenient here to set LD_RUN_PATH
7810 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
7811 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
7812 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
7813 export LD_RUN_PATH
7814 fi
7815
7816 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 7817 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
7818echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
7819 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 7820#line $LINENO "configure"
19650fd6
AS
7821/* confdefs.h. */
7822_ACEOF
7823cat confdefs.h >>conftest.$ac_ext
7824cat >>conftest.$ac_ext <<_ACEOF
7825/* end confdefs.h. */
98418dba 7826
98418dba
CW
7827int
7828main ()
7829{
7830XOpenDisplay ("foo");
7831 ;
7832 return 0;
7833}
7834_ACEOF
7835rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7836if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7837 (eval $ac_link) 2>&5
7838 ac_status=$?
c0d27fcc 7839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7840 (exit $ac_status); } &&
793fa0d7 7841 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7843 (eval $ac_try) 2>&5
7844 ac_status=$?
c0d27fcc 7845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7846 (exit $ac_status); }; }; then
7847 xlinux_first_failure=no
7848else
7849 echo "$as_me: failed program was:" >&5
19650fd6
AS
7850sed 's/^/| /' conftest.$ac_ext >&5
7851
98418dba
CW
7852xlinux_first_failure=yes
7853fi
7854rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7855 if test "${xlinux_first_failure}" = "yes"; then
7856 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
7857 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
7858 OLD_CPPFLAGS="$CPPFLAGS"
7859 OLD_LIBS="$LIBS"
7860 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
7861 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
7862 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
7863 LIBS="$LIBS -b i486-linuxaout"
7864 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 7865#line $LINENO "configure"
19650fd6
AS
7866/* confdefs.h. */
7867_ACEOF
7868cat confdefs.h >>conftest.$ac_ext
7869cat >>conftest.$ac_ext <<_ACEOF
7870/* end confdefs.h. */
98418dba 7871
98418dba
CW
7872int
7873main ()
7874{
7875XOpenDisplay ("foo");
7876 ;
7877 return 0;
7878}
7879_ACEOF
7880rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7881if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7882 (eval $ac_link) 2>&5
7883 ac_status=$?
c0d27fcc 7884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7885 (exit $ac_status); } &&
793fa0d7 7886 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7888 (eval $ac_try) 2>&5
7889 ac_status=$?
c0d27fcc 7890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7891 (exit $ac_status); }; }; then
7892 xlinux_second_failure=no
7893else
7894 echo "$as_me: failed program was:" >&5
19650fd6
AS
7895sed 's/^/| /' conftest.$ac_ext >&5
7896
98418dba
CW
7897xlinux_second_failure=yes
7898fi
7899rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7900 if test "${xlinux_second_failure}" = "yes"; then
7901 # If we get the same failure with -b, there is no use adding -b.
7902 # So take it out. This plays safe.
7903 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
7904 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
7905 CPPFLAGS="$OLD_CPPFLAGS"
7906 LIBS="$OLD_LIBS"
c0d27fcc 7907 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7908echo "${ECHO_T}no" >&6
7909 else
c0d27fcc 7910 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7911echo "${ECHO_T}yes" >&6
7912 fi
7913 else
c0d27fcc 7914 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7915echo "${ECHO_T}no" >&6
7916 fi
7917 fi
7918
7919 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
7920 # header files included from there.
c0d27fcc 7921 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
7922echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
7923 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 7924#line $LINENO "configure"
19650fd6
AS
7925/* confdefs.h. */
7926_ACEOF
7927cat confdefs.h >>conftest.$ac_ext
7928cat >>conftest.$ac_ext <<_ACEOF
7929/* end confdefs.h. */
98418dba
CW
7930#include <X11/Xlib.h>
7931#include <X11/XKBlib.h>
98418dba
CW
7932int
7933main ()
7934{
7935XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
7936 ;
7937 return 0;
7938}
7939_ACEOF
7940rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7941if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7942 (eval $ac_link) 2>&5
7943 ac_status=$?
c0d27fcc 7944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7945 (exit $ac_status); } &&
793fa0d7 7946 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7948 (eval $ac_try) 2>&5
7949 ac_status=$?
c0d27fcc 7950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7951 (exit $ac_status); }; }; then
7952 emacs_xkb=yes
7953else
7954 echo "$as_me: failed program was:" >&5
19650fd6
AS
7955sed 's/^/| /' conftest.$ac_ext >&5
7956
98418dba
CW
7957emacs_xkb=no
7958fi
7959rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
c0d27fcc 7960 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
7961echo "${ECHO_T}$emacs_xkb" >&6
7962 if test $emacs_xkb = yes; then
b936fae4 7963
c0d27fcc 7964cat >>confdefs.h <<\_ACEOF
98418dba 7965#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 7966_ACEOF
98418dba
CW
7967
7968 fi
7969
c0d27fcc
MR
7970
7971
7972
7973
98418dba
CW
7974for ac_func in XrmSetDatabase XScreenResourceString \
7975XScreenNumberOfScreen XSetWMProtocols
7976do
7977as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 7978echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
7979echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7980if eval "test \"\${$as_ac_var+set}\" = set"; then
7981 echo $ECHO_N "(cached) $ECHO_C" >&6
7982else
7983 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 7984#line $LINENO "configure"
19650fd6
AS
7985/* confdefs.h. */
7986_ACEOF
7987cat confdefs.h >>conftest.$ac_ext
7988cat >>conftest.$ac_ext <<_ACEOF
7989/* end confdefs.h. */
98418dba 7990/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
7991 which can conflict with char $ac_func (); below.
7992 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7993 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
7994#ifdef __STDC__
7995# include <limits.h>
7996#else
7997# include <assert.h>
7998#endif
98418dba
CW
7999/* Override any gcc2 internal prototype to avoid an error. */
8000#ifdef __cplusplus
8001extern "C"
19650fd6 8002{
98418dba
CW
8003#endif
8004/* We use char because int might match the return type of a gcc2
8005 builtin and then its argument prototype would still apply. */
8006char $ac_func ();
98418dba
CW
8007/* The GNU C library defines this for functions which it implements
8008 to always fail with ENOSYS. Some functions are actually named
8009 something starting with __ and the normal name is an alias. */
8010#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8011choke me
8012#else
19650fd6
AS
8013char (*f) () = $ac_func;
8014#endif
8015#ifdef __cplusplus
8016}
98418dba
CW
8017#endif
8018
19650fd6
AS
8019int
8020main ()
8021{
8022return f != $ac_func;
98418dba
CW
8023 ;
8024 return 0;
8025}
8026_ACEOF
8027rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8028if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8029 (eval $ac_link) 2>&5
8030 ac_status=$?
c0d27fcc 8031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8032 (exit $ac_status); } &&
793fa0d7 8033 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8035 (eval $ac_try) 2>&5
8036 ac_status=$?
c0d27fcc 8037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8038 (exit $ac_status); }; }; then
8039 eval "$as_ac_var=yes"
8040else
8041 echo "$as_me: failed program was:" >&5
19650fd6
AS
8042sed 's/^/| /' conftest.$ac_ext >&5
8043
98418dba
CW
8044eval "$as_ac_var=no"
8045fi
8046rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8047fi
c0d27fcc 8048echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
8049echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8050if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 8051 cat >>confdefs.h <<_ACEOF
98418dba 8052#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 8053_ACEOF
98418dba
CW
8054
8055fi
8056done
8057
8058fi
8059
8060if test "${window_system}" = "x11"; then
c0d27fcc 8061 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
8062echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
8063 if test "${emacs_cv_x11_version_6+set}" = set; then
8064 echo $ECHO_N "(cached) $ECHO_C" >&6
8065else
8066 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 8067#line $LINENO "configure"
19650fd6
AS
8068/* confdefs.h. */
8069_ACEOF
8070cat confdefs.h >>conftest.$ac_ext
8071cat >>conftest.$ac_ext <<_ACEOF
8072/* end confdefs.h. */
98418dba 8073#include <X11/Xlib.h>
98418dba
CW
8074int
8075main ()
8076{
8077#if XlibSpecificationRelease < 6
8078fail;
8079#endif
8080
8081 ;
8082 return 0;
8083}
8084_ACEOF
8085rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8086if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8087 (eval $ac_link) 2>&5
8088 ac_status=$?
c0d27fcc 8089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8090 (exit $ac_status); } &&
793fa0d7 8091 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8093 (eval $ac_try) 2>&5
8094 ac_status=$?
c0d27fcc 8095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8096 (exit $ac_status); }; }; then
8097 emacs_cv_x11_version_6=yes
8098else
8099 echo "$as_me: failed program was:" >&5
19650fd6
AS
8100sed 's/^/| /' conftest.$ac_ext >&5
8101
98418dba
CW
8102emacs_cv_x11_version_6=no
8103fi
8104rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8105fi
8106
8107 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 8108 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 8109echo "${ECHO_T}6 or newer" >&6
b936fae4 8110
c0d27fcc 8111cat >>confdefs.h <<\_ACEOF
98418dba 8112#define HAVE_X11R6 1
c0d27fcc 8113_ACEOF
98418dba
CW
8114
8115 else
c0d27fcc 8116 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
8117echo "${ECHO_T}before 6" >&6
8118 fi
8119fi
8120
8121if test "${window_system}" = "x11"; then
c0d27fcc 8122 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
8123echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
8124 if test "${emacs_cv_x11_version_5+set}" = set; then
8125 echo $ECHO_N "(cached) $ECHO_C" >&6
8126else
8127 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 8128#line $LINENO "configure"
19650fd6
AS
8129/* confdefs.h. */
8130_ACEOF
8131cat confdefs.h >>conftest.$ac_ext
8132cat >>conftest.$ac_ext <<_ACEOF
8133/* end confdefs.h. */
98418dba 8134#include <X11/Xlib.h>
98418dba
CW
8135int
8136main ()
8137{
8138#if XlibSpecificationRelease < 5
8139fail;
8140#endif
8141
8142 ;
8143 return 0;
8144}
8145_ACEOF
8146rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8147if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8148 (eval $ac_link) 2>&5
8149 ac_status=$?
c0d27fcc 8150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8151 (exit $ac_status); } &&
793fa0d7 8152 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8154 (eval $ac_try) 2>&5
8155 ac_status=$?
c0d27fcc 8156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8157 (exit $ac_status); }; }; then
8158 emacs_cv_x11_version_5=yes
8159else
8160 echo "$as_me: failed program was:" >&5
19650fd6
AS
8161sed 's/^/| /' conftest.$ac_ext >&5
8162
98418dba
CW
8163emacs_cv_x11_version_5=no
8164fi
8165rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8166fi
8167
8168 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 8169 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
8170echo "${ECHO_T}5 or newer" >&6
8171 HAVE_X11R5=yes
b936fae4 8172
c0d27fcc 8173cat >>confdefs.h <<\_ACEOF
98418dba 8174#define HAVE_X11R5 1
c0d27fcc 8175_ACEOF
98418dba
CW
8176
8177 else
8178 HAVE_X11R5=no
c0d27fcc 8179 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
8180echo "${ECHO_T}before 5" >&6
8181 fi
8182fi
8183
488dd4c4
JD
8184
8185
8186HAVE_GTK=no
8187if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 8188 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
8189 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
8190echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
8191 { (exit 1); exit 1; }; };
8192 fi
8193 GLIB_REQUIRED=2.0.1
851a3062 8194 GTK_REQUIRED=2.2
488dd4c4
JD
8195 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
8196
8197 if test "X${with_pkg_config_prog}" != X; then
8198 PKG_CONFIG="${with_pkg_config_prog}"
8199 fi
8200
8201 succeeded=no
8202
8203 if test -z "$PKG_CONFIG"; then
8204 # Extract the first word of "pkg-config", so it can be a program name with args.
8205set dummy pkg-config; ac_word=$2
8206echo "$as_me:$LINENO: checking for $ac_word" >&5
8207echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8208if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
8209 echo $ECHO_N "(cached) $ECHO_C" >&6
8210else
8211 case $PKG_CONFIG in
8212 [\\/]* | ?:[\\/]*)
8213 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8214 ;;
8215 *)
8216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8217for as_dir in $PATH
8218do
8219 IFS=$as_save_IFS
8220 test -z "$as_dir" && as_dir=.
8221 for ac_exec_ext in '' $ac_executable_extensions; do
8222 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8223 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8224 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8225 break 2
8226 fi
8227done
8228done
8229
8230 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8231 ;;
8232esac
8233fi
8234PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8235
8236if test -n "$PKG_CONFIG"; then
8237 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
8238echo "${ECHO_T}$PKG_CONFIG" >&6
8239else
8240 echo "$as_me:$LINENO: result: no" >&5
8241echo "${ECHO_T}no" >&6
8242fi
8243
8244 fi
8245
8246 if test "$PKG_CONFIG" = "no" ; then
8247 echo "*** The pkg-config script could not be found. Make sure it is"
8248 echo "*** in your path, or give the full path to pkg-config with"
8249 echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog."
8250 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
8251 else
8252 PKG_CONFIG_MIN_VERSION=0.9.0
8253 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8254 echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
8255echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6
8256
8257 if $PKG_CONFIG --exists "$GTK_MODULES" ; then
8258 echo "$as_me:$LINENO: result: yes" >&5
8259echo "${ECHO_T}yes" >&6
8260 succeeded=yes
8261
8262 echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
8263echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
8264 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
8265 echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
8266echo "${ECHO_T}$GTK_CFLAGS" >&6
8267
8268 echo "$as_me:$LINENO: checking GTK_LIBS" >&5
8269echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
8270 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
8271 echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
8272echo "${ECHO_T}$GTK_LIBS" >&6
8273 else
8274 GTK_CFLAGS=""
8275 GTK_LIBS=""
8276 ## If we have a custom action on failure, don't print errors, but
8277 ## do set a variable so people can do so.
8278 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
8279 echo $GTK_PKG_ERRORS
8280 fi
8281
8282
8283
8284 else
8285 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8286 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8287 fi
8288 fi
8289
8290 if test $succeeded = yes; then
8291 :
8292 else
8293 { { 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
8294echo "$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;}
8295 { (exit 1); exit 1; }; }
8296 fi
8297
8298
8299
8300 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
8301 HAVE_GTK=yes
8302
8303cat >>confdefs.h <<\_ACEOF
8304#define HAVE_GTK 1
8305_ACEOF
8306
8307 USE_X_TOOLKIT=none
8308
8309 with_toolkit_scroll_bars=yes
8310fi
8311
98418dba
CW
8312if test x"${USE_X_TOOLKIT}" = xmaybe; then
8313 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 8314 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
8315echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
8316 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
8317 echo $ECHO_N "(cached) $ECHO_C" >&6
8318else
8319 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 8320#line $LINENO "configure"
19650fd6
AS
8321/* confdefs.h. */
8322_ACEOF
8323cat confdefs.h >>conftest.$ac_ext
8324cat >>conftest.$ac_ext <<_ACEOF
8325/* end confdefs.h. */
98418dba
CW
8326
8327#include <X11/Intrinsic.h>
8328#include <X11/Xaw/Simple.h>
98418dba
CW
8329int
8330main ()
8331{
8332
8333 ;
8334 return 0;
8335}
8336_ACEOF
8337rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8339 (eval $ac_link) 2>&5
8340 ac_status=$?
c0d27fcc 8341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8342 (exit $ac_status); } &&
793fa0d7 8343 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8345 (eval $ac_try) 2>&5
8346 ac_status=$?
c0d27fcc 8347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8348 (exit $ac_status); }; }; then
8349 emacs_cv_x11_version_5_with_xaw=yes
8350else
8351 echo "$as_me: failed program was:" >&5
19650fd6
AS
8352sed 's/^/| /' conftest.$ac_ext >&5
8353
98418dba
CW
8354emacs_cv_x11_version_5_with_xaw=no
8355fi
8356rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8357fi
8358
8359 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 8360 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
8361echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
8362 USE_X_TOOLKIT=LUCID
8363 else
c0d27fcc 8364 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
8365echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
8366 USE_X_TOOLKIT=none
8367 fi
8368 else
8369 USE_X_TOOLKIT=none
8370 fi
8371fi
8372
8373X_TOOLKIT_TYPE=$USE_X_TOOLKIT
8374
8375if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 8376 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
8377echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
8378 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
8379 echo $ECHO_N "(cached) $ECHO_C" >&6
8380else
8381 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 8382#line $LINENO "configure"
19650fd6
AS
8383/* confdefs.h. */
8384_ACEOF
8385cat confdefs.h >>conftest.$ac_ext
8386cat >>conftest.$ac_ext <<_ACEOF
8387/* end confdefs.h. */
98418dba 8388#include <X11/Intrinsic.h>
98418dba
CW
8389int
8390main ()
8391{
8392#if XtSpecificationRelease < 6
8393fail;
8394#endif
8395
8396 ;
8397 return 0;
8398}
8399_ACEOF
8400rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8401if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8402 (eval $ac_link) 2>&5
8403 ac_status=$?
c0d27fcc 8404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8405 (exit $ac_status); } &&
793fa0d7 8406 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8408 (eval $ac_try) 2>&5
8409 ac_status=$?
c0d27fcc 8410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8411 (exit $ac_status); }; }; then
8412 emacs_cv_x11_toolkit_version_6=yes
8413else
8414 echo "$as_me: failed program was:" >&5
19650fd6
AS
8415sed 's/^/| /' conftest.$ac_ext >&5
8416
98418dba
CW
8417emacs_cv_x11_toolkit_version_6=no
8418fi
8419rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8420fi
8421
8422 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
8423 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 8424 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 8425echo "${ECHO_T}6 or newer" >&6
b936fae4 8426
c0d27fcc 8427cat >>confdefs.h <<\_ACEOF
98418dba 8428#define HAVE_X11XTR6 1
c0d27fcc 8429_ACEOF
98418dba
CW
8430
8431 else
c0d27fcc 8432 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
8433echo "${ECHO_T}before 6" >&6
8434 fi
8435
8436 OLDLIBS="$LIBS"
8437 if test x$HAVE_X11XTR6 = xyes; then
8438 LIBS="-lXt -lSM -lICE $LIBS"
8439 else
8440 LIBS="-lXt $LIBS"
8441 fi
8442
c0d27fcc 8443echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
8444echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
8445if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
8446 echo $ECHO_N "(cached) $ECHO_C" >&6
8447else
8448 ac_check_lib_save_LIBS=$LIBS
8449LIBS="-lXmu $LIBS"
8450cat >conftest.$ac_ext <<_ACEOF
793fa0d7 8451#line $LINENO "configure"
19650fd6
AS
8452/* confdefs.h. */
8453_ACEOF
8454cat confdefs.h >>conftest.$ac_ext
8455cat >>conftest.$ac_ext <<_ACEOF
8456/* end confdefs.h. */
98418dba
CW
8457
8458/* Override any gcc2 internal prototype to avoid an error. */
8459#ifdef __cplusplus
8460extern "C"
8461#endif
8462/* We use char because int might match the return type of a gcc2
8463 builtin and then its argument prototype would still apply. */
8464char XmuConvertStandardSelection ();
98418dba
CW
8465int
8466main ()
8467{
8468XmuConvertStandardSelection ();
8469 ;
8470 return 0;
8471}
8472_ACEOF
8473rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8474if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8475 (eval $ac_link) 2>&5
8476 ac_status=$?
c0d27fcc 8477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8478 (exit $ac_status); } &&
793fa0d7 8479 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8481 (eval $ac_try) 2>&5
8482 ac_status=$?
c0d27fcc 8483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8484 (exit $ac_status); }; }; then
8485 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
8486else
8487 echo "$as_me: failed program was:" >&5
19650fd6
AS
8488sed 's/^/| /' conftest.$ac_ext >&5
8489
98418dba
CW
8490ac_cv_lib_Xmu_XmuConvertStandardSelection=no
8491fi
8492rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8493LIBS=$ac_check_lib_save_LIBS
8494fi
c0d27fcc 8495echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
8496echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
8497if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 8498 cat >>confdefs.h <<_ACEOF
98418dba 8499#define HAVE_LIBXMU 1
c0d27fcc 8500_ACEOF
98418dba
CW
8501
8502 LIBS="-lXmu $LIBS"
8503
8504fi
8505
8506 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
8507fi
8508
8509# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
8510if test "${HAVE_X11}" = "yes"; then
8511 if test "${USE_X_TOOLKIT}" != "none"; then
8512
c0d27fcc 8513echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
8514echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
8515if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
8516 echo $ECHO_N "(cached) $ECHO_C" >&6
8517else
8518 ac_check_lib_save_LIBS=$LIBS
8519LIBS="-lXext $LIBS"
8520cat >conftest.$ac_ext <<_ACEOF
793fa0d7 8521#line $LINENO "configure"
19650fd6
AS
8522/* confdefs.h. */
8523_ACEOF
8524cat confdefs.h >>conftest.$ac_ext
8525cat >>conftest.$ac_ext <<_ACEOF
8526/* end confdefs.h. */
98418dba
CW
8527
8528/* Override any gcc2 internal prototype to avoid an error. */
8529#ifdef __cplusplus
8530extern "C"
8531#endif
8532/* We use char because int might match the return type of a gcc2
8533 builtin and then its argument prototype would still apply. */
8534char XShapeQueryExtension ();
98418dba
CW
8535int
8536main ()
8537{
8538XShapeQueryExtension ();
8539 ;
8540 return 0;
8541}
8542_ACEOF
8543rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8544if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8545 (eval $ac_link) 2>&5
8546 ac_status=$?
c0d27fcc 8547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8548 (exit $ac_status); } &&
793fa0d7 8549 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8551 (eval $ac_try) 2>&5
8552 ac_status=$?
c0d27fcc 8553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8554 (exit $ac_status); }; }; then
8555 ac_cv_lib_Xext_XShapeQueryExtension=yes
8556else
8557 echo "$as_me: failed program was:" >&5
19650fd6
AS
8558sed 's/^/| /' conftest.$ac_ext >&5
8559
98418dba
CW
8560ac_cv_lib_Xext_XShapeQueryExtension=no
8561fi
8562rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8563LIBS=$ac_check_lib_save_LIBS
8564fi
c0d27fcc 8565echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
8566echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
8567if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 8568 cat >>confdefs.h <<_ACEOF
98418dba 8569#define HAVE_LIBXEXT 1
c0d27fcc 8570_ACEOF
98418dba
CW
8571
8572 LIBS="-lXext $LIBS"
8573
8574fi
8575
8576 fi
8577fi
8578
8579if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 8580 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
8e967cf7
MR
8581echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
8582if test "${emacs_cv_lesstif+set}" = set; then
8583 echo $ECHO_N "(cached) $ECHO_C" >&6
8584else
ae1a998c
RS
8585 # We put this in CFLAGS temporarily to precede other -I options
8586 # that might be in CFLAGS temporarily.
8587 # We put this in CPPFLAGS where it precedes the other -I options.
8588 OLD_CPPFLAGS=$CPPFLAGS
8589 OLD_CFLAGS=$CFLAGS
8590 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
8591 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
8e967cf7 8592 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 8593#line $LINENO "configure"
19650fd6
AS
8594/* confdefs.h. */
8595_ACEOF
8596cat confdefs.h >>conftest.$ac_ext
8597cat >>conftest.$ac_ext <<_ACEOF
8598/* end confdefs.h. */
8e967cf7
MR
8599#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
8600int
8601main ()
8602{
8603int x = 5;
8604 ;
8605 return 0;
8606}
8607_ACEOF
8608rm -f conftest.$ac_objext
c0d27fcc 8609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8e967cf7
MR
8610 (eval $ac_compile) 2>&5
8611 ac_status=$?
c0d27fcc 8612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7 8613 (exit $ac_status); } &&
793fa0d7 8614 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8e967cf7
MR
8616 (eval $ac_try) 2>&5
8617 ac_status=$?
c0d27fcc 8618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7
MR
8619 (exit $ac_status); }; }; then
8620 emacs_cv_lesstif=yes
8621else
8622 echo "$as_me: failed program was:" >&5
19650fd6
AS
8623sed 's/^/| /' conftest.$ac_ext >&5
8624
8e967cf7
MR
8625emacs_cv_lesstif=no
8626fi
8627rm -f conftest.$ac_objext conftest.$ac_ext
8628fi
c0d27fcc 8629echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
8e967cf7
MR
8630echo "${ECHO_T}$emacs_cv_lesstif" >&6
8631 if test $emacs_cv_lesstif = yes; then
ae1a998c
RS
8632 # Make sure this -I option remains in CPPFLAGS after it is set
8633 # back to REAL_CPPFLAGS.
8634 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
8635 # have those other -I options anyway. Ultimately, having this
8636 # directory ultimately in CPPFLAGS will be enough.
8637 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
8e967cf7 8638 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
ae1a998c
RS
8639 else
8640 CFLAGS=$OLD_CFLAGS
8641 CPPFLAGS=$OLD_CPPFLAGS
8e967cf7 8642 fi
c0d27fcc 8643 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
8644echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
8645if test "${emacs_cv_motif_version_2_1+set}" = set; then
8646 echo $ECHO_N "(cached) $ECHO_C" >&6
8647else
8648 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 8649#line $LINENO "configure"
19650fd6
AS
8650/* confdefs.h. */
8651_ACEOF
8652cat confdefs.h >>conftest.$ac_ext
8653cat >>conftest.$ac_ext <<_ACEOF
8654/* end confdefs.h. */
98418dba 8655#include <Xm/Xm.h>
98418dba
CW
8656int
8657main ()
8658{
8659#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
8660int x = 5;
8661#else
8662Motif version prior to 2.1.
8663#endif
8664 ;
8665 return 0;
8666}
8667_ACEOF
8668rm -f conftest.$ac_objext
c0d27fcc 8669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
8670 (eval $ac_compile) 2>&5
8671 ac_status=$?
c0d27fcc 8672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8673 (exit $ac_status); } &&
793fa0d7 8674 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8676 (eval $ac_try) 2>&5
8677 ac_status=$?
c0d27fcc 8678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8679 (exit $ac_status); }; }; then
8680 emacs_cv_motif_version_2_1=yes
8681else
8682 echo "$as_me: failed program was:" >&5
19650fd6
AS
8683sed 's/^/| /' conftest.$ac_ext >&5
8684
98418dba
CW
8685emacs_cv_motif_version_2_1=no
8686fi
8687rm -f conftest.$ac_objext conftest.$ac_ext
8688fi
c0d27fcc 8689echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
8690echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
8691 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
8692 if test $emacs_cv_motif_version_2_1 = yes; then
8693 HAVE_LIBXP=no
b936fae4 8694
c0d27fcc 8695cat >>confdefs.h <<\_ACEOF
98418dba 8696#define HAVE_MOTIF_2_1 1
c0d27fcc 8697_ACEOF
98418dba 8698
c0d27fcc 8699 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
8700echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
8701if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
8702 echo $ECHO_N "(cached) $ECHO_C" >&6
8703else
8704 ac_check_lib_save_LIBS=$LIBS
8705LIBS="-lXp $LIBS"
8706cat >conftest.$ac_ext <<_ACEOF
793fa0d7 8707#line $LINENO "configure"
19650fd6
AS
8708/* confdefs.h. */
8709_ACEOF
8710cat confdefs.h >>conftest.$ac_ext
8711cat >>conftest.$ac_ext <<_ACEOF
8712/* end confdefs.h. */
98418dba
CW
8713
8714/* Override any gcc2 internal prototype to avoid an error. */
8715#ifdef __cplusplus
8716extern "C"
8717#endif
8718/* We use char because int might match the return type of a gcc2
8719 builtin and then its argument prototype would still apply. */
8720char XpCreateContext ();
98418dba
CW
8721int
8722main ()
8723{
8724XpCreateContext ();
8725 ;
8726 return 0;
8727}
8728_ACEOF
8729rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8731 (eval $ac_link) 2>&5
8732 ac_status=$?
c0d27fcc 8733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8734 (exit $ac_status); } &&
793fa0d7 8735 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8737 (eval $ac_try) 2>&5
8738 ac_status=$?
c0d27fcc 8739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8740 (exit $ac_status); }; }; then
8741 ac_cv_lib_Xp_XpCreateContext=yes
8742else
8743 echo "$as_me: failed program was:" >&5
19650fd6
AS
8744sed 's/^/| /' conftest.$ac_ext >&5
8745
98418dba
CW
8746ac_cv_lib_Xp_XpCreateContext=no
8747fi
8748rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8749LIBS=$ac_check_lib_save_LIBS
8750fi
c0d27fcc 8751echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
8752echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
8753if test $ac_cv_lib_Xp_XpCreateContext = yes; then
8754 HAVE_LIBXP=yes
8755fi
503d2be0 8756
98418dba 8757 if test ${HAVE_LIBXP} = yes; then
b936fae4 8758
c0d27fcc 8759cat >>confdefs.h <<\_ACEOF
98418dba 8760#define HAVE_LIBXP 1
c0d27fcc 8761_ACEOF
503d2be0 8762
98418dba
CW
8763 fi
8764 fi
8765fi
8766
8767### Is -lXaw3d available?
8768HAVE_XAW3D=no
8769if test "${HAVE_X11}" = "yes"; then
8770 if test "${USE_X_TOOLKIT}" != "none"; then
22044edf 8771 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
8772echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
8773if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
8774 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 8775else
22044edf 8776 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 8777#line $LINENO "configure"
19650fd6
AS
8778/* confdefs.h. */
8779_ACEOF
8780cat confdefs.h >>conftest.$ac_ext
8781cat >>conftest.$ac_ext <<_ACEOF
8782/* end confdefs.h. */
98418dba 8783#include <X11/Xaw3d/Scrollbar.h>
503d2be0 8784_ACEOF
c0d27fcc 8785if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8786 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8787 ac_status=$?
6bae0ccf 8788 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
8789 rm -f conftest.er1
8790 cat conftest.err >&5
c0d27fcc 8791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
8792 (exit $ac_status); } >/dev/null; then
8793 if test -s conftest.err; then
8794 ac_cpp_err=$ac_c_preproc_warn_flag
8795 else
8796 ac_cpp_err=
8797 fi
8798else
8799 ac_cpp_err=yes
8800fi
8801if test -z "$ac_cpp_err"; then
22044edf 8802 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 8803else
503d2be0 8804 echo "$as_me: failed program was:" >&5
19650fd6
AS
8805sed 's/^/| /' conftest.$ac_ext >&5
8806
22044edf 8807 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 8808fi
503d2be0 8809rm -f conftest.err conftest.$ac_ext
98418dba 8810fi
c0d27fcc 8811echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 8812echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 8813if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 8814 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
8815echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
8816if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
8817 echo $ECHO_N "(cached) $ECHO_C" >&6
8818else
8819 ac_check_lib_save_LIBS=$LIBS
8820LIBS="-lXaw3d $LIBS"
8821cat >conftest.$ac_ext <<_ACEOF
793fa0d7 8822#line $LINENO "configure"
19650fd6
AS
8823/* confdefs.h. */
8824_ACEOF
8825cat confdefs.h >>conftest.$ac_ext
8826cat >>conftest.$ac_ext <<_ACEOF
8827/* end confdefs.h. */
98418dba
CW
8828
8829/* Override any gcc2 internal prototype to avoid an error. */
8830#ifdef __cplusplus
8831extern "C"
8832#endif
8833/* We use char because int might match the return type of a gcc2
8834 builtin and then its argument prototype would still apply. */
8835char XawScrollbarSetThumb ();
503d2be0
AS
8836int
8837main ()
8838{
98418dba 8839XawScrollbarSetThumb ();
503d2be0
AS
8840 ;
8841 return 0;
8842}
8843_ACEOF
8844rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8845if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
8846 (eval $ac_link) 2>&5
8847 ac_status=$?
c0d27fcc 8848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 8849 (exit $ac_status); } &&
793fa0d7 8850 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
8852 (eval $ac_try) 2>&5
8853 ac_status=$?
c0d27fcc 8854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 8855 (exit $ac_status); }; }; then
98418dba 8856 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 8857else
503d2be0 8858 echo "$as_me: failed program was:" >&5
19650fd6
AS
8859sed 's/^/| /' conftest.$ac_ext >&5
8860
98418dba 8861ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 8862fi
503d2be0 8863rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 8864LIBS=$ac_check_lib_save_LIBS
ba4481b5 8865fi
c0d27fcc 8866echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
8867echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
8868if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
8869 HAVE_XAW3D=yes
ba4481b5 8870fi
503d2be0 8871
ba4481b5
DL
8872fi
8873
c0d27fcc 8874
98418dba 8875 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 8876
c0d27fcc 8877cat >>confdefs.h <<\_ACEOF
98418dba 8878#define HAVE_XAW3D 1
c0d27fcc 8879_ACEOF
98418dba 8880
ba4481b5 8881 fi
98418dba 8882 fi
ba4481b5
DL
8883fi
8884
c0d27fcc
MR
8885
8886
98418dba
CW
8887USE_TOOLKIT_SCROLL_BARS=no
8888if test "${with_toolkit_scroll_bars}" != "no"; then
8889 if test "${USE_X_TOOLKIT}" != "none"; then
8890 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 8891 cat >>confdefs.h <<\_ACEOF
98418dba 8892#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 8893_ACEOF
98418dba
CW
8894
8895 HAVE_XAW3D=no
8896 USE_TOOLKIT_SCROLL_BARS=yes
8897 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 8898 cat >>confdefs.h <<\_ACEOF
98418dba 8899#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 8900_ACEOF
98418dba
CW
8901
8902 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 8903 fi
488dd4c4
JD
8904 elif test "${HAVE_GTK}" = "yes"; then
8905 cat >>confdefs.h <<\_ACEOF
8906#define USE_TOOLKIT_SCROLL_BARS 1
8907_ACEOF
8908
8909 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
8910 fi
8911fi
8912
851a3062
DL
8913cat >conftest.$ac_ext <<_ACEOF
8914#line $LINENO "configure"
8915/* confdefs.h. */
8916_ACEOF
8917cat confdefs.h >>conftest.$ac_ext
8918cat >>conftest.$ac_ext <<_ACEOF
8919/* end confdefs.h. */
8920
8921 #include <X11/Xlib.h>
8922 #include <X11/Xresource.h>
8923int
8924main ()
8925{
8926XIMProc callback;
8927 ;
8928 return 0;
8929}
8930_ACEOF
8931rm -f conftest.$ac_objext
8932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8933 (eval $ac_compile) 2>&5
8934 ac_status=$?
8935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8936 (exit $ac_status); } &&
8937 { ac_try='test -s conftest.$ac_objext'
8938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8939 (eval $ac_try) 2>&5
8940 ac_status=$?
8941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8942 (exit $ac_status); }; }; then
8943 HAVE_XIM=yes
8944
8945cat >>confdefs.h <<\_ACEOF
8946#define HAVE_XIM 1
8947_ACEOF
8948
8949else
8950 echo "$as_me: failed program was:" >&5
8951sed 's/^/| /' conftest.$ac_ext >&5
8952
8953HAVE_XIM=no
8954fi
8955rm -f conftest.$ac_objext conftest.$ac_ext
8956
c0d27fcc 8957
98418dba 8958if test "${with_xim}" != "no"; then
b936fae4 8959
c0d27fcc 8960cat >>confdefs.h <<\_ACEOF
98418dba 8961#define USE_XIM 1
c0d27fcc 8962_ACEOF
98418dba 8963
793fa0d7 8964fi
851a3062
DL
8965
8966
8967if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
8968 late_CFLAGS=$CFLAGS
8969 if test "$GCC" = yes; then
8970 CFLAGS="$CFLAGS --pedantic-errors"
8971 fi
cffcede7 8972 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 8973#line $LINENO "configure"
19650fd6
AS
8974/* confdefs.h. */
8975_ACEOF
8976cat confdefs.h >>conftest.$ac_ext
8977cat >>conftest.$ac_ext <<_ACEOF
8978/* end confdefs.h. */
cffcede7
JD
8979
8980#include <X11/Xlib.h>
8981#include <X11/Xresource.h>
8982int
8983main ()
8984{
8985Display *display;
8986XrmDatabase db;
8987char *res_name;
8988char *res_class;
8989XIMProc callback;
8990XPointer *client_data;
849d80cf
DL
8991#ifndef __GNUC__
8992/* If we're not using GCC, it's probably not XFree86, and this is
8993 probably right, but we can't use something like --pedantic-errors. */
8994extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
8995 char*, XIMProc, XPointer*);
8996#endif
cffcede7
JD
8997(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
8998 client_data);
8999 ;
9000 return 0;
9001}
9002_ACEOF
9003rm -f conftest.$ac_objext
9004if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9005 (eval $ac_compile) 2>&5
9006 ac_status=$?
9007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9008 (exit $ac_status); } &&
793fa0d7 9009 { ac_try='test -s conftest.$ac_objext'
cffcede7
JD
9010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9011 (eval $ac_try) 2>&5
9012 ac_status=$?
9013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9014 (exit $ac_status); }; }; then
9015 emacs_cv_arg6_star=yes
9016else
9017 echo "$as_me: failed program was:" >&5
19650fd6
AS
9018sed 's/^/| /' conftest.$ac_ext >&5
9019
cffcede7
JD
9020fi
9021rm -f conftest.$ac_objext conftest.$ac_ext
9022
9023 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 9024 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
9025#define XRegisterIMInstantiateCallback_arg6 XPointer*
9026_ACEOF
9027
9028 else
f57bd967 9029 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
9030#define XRegisterIMInstantiateCallback_arg6 XPointer
9031_ACEOF
9032
9033 fi
849d80cf 9034 CFLAGS=$late_CFLAGS
98418dba
CW
9035fi
9036
9037### Use -lXpm if available, unless `--with-xpm=no'.
9038HAVE_XPM=no
9039if test "${HAVE_X11}" = "yes"; then
9040 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
9041 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
9042 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
9043echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
9044if test "${ac_cv_header_X11_xpm_h+set}" = set; then
9045 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9046fi
9047echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
9048echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 9049else
c0d27fcc
MR
9050 # Is the header compilable?
9051echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
9052echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
9053cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9054#line $LINENO "configure"
19650fd6
AS
9055/* confdefs.h. */
9056_ACEOF
9057cat confdefs.h >>conftest.$ac_ext
9058cat >>conftest.$ac_ext <<_ACEOF
9059/* end confdefs.h. */
c0d27fcc
MR
9060$ac_includes_default
9061#include <X11/xpm.h>
9062_ACEOF
9063rm -f conftest.$ac_objext
9064if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9065 (eval $ac_compile) 2>&5
9066 ac_status=$?
9067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9068 (exit $ac_status); } &&
793fa0d7 9069 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
9070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9071 (eval $ac_try) 2>&5
9072 ac_status=$?
9073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9074 (exit $ac_status); }; }; then
9075 ac_header_compiler=yes
9076else
9077 echo "$as_me: failed program was:" >&5
19650fd6
AS
9078sed 's/^/| /' conftest.$ac_ext >&5
9079
c0d27fcc
MR
9080ac_header_compiler=no
9081fi
9082rm -f conftest.$ac_objext conftest.$ac_ext
9083echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9084echo "${ECHO_T}$ac_header_compiler" >&6
9085
9086# Is the header present?
9087echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
9088echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
9089cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9090#line $LINENO "configure"
19650fd6
AS
9091/* confdefs.h. */
9092_ACEOF
9093cat confdefs.h >>conftest.$ac_ext
9094cat >>conftest.$ac_ext <<_ACEOF
9095/* end confdefs.h. */
98418dba
CW
9096#include <X11/xpm.h>
9097_ACEOF
c0d27fcc 9098if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9099 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9100 ac_status=$?
6bae0ccf 9101 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9102 rm -f conftest.er1
9103 cat conftest.err >&5
c0d27fcc 9104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9105 (exit $ac_status); } >/dev/null; then
9106 if test -s conftest.err; then
9107 ac_cpp_err=$ac_c_preproc_warn_flag
9108 else
9109 ac_cpp_err=
9110 fi
9111else
9112 ac_cpp_err=yes
9113fi
9114if test -z "$ac_cpp_err"; then
c0d27fcc 9115 ac_header_preproc=yes
98418dba
CW
9116else
9117 echo "$as_me: failed program was:" >&5
19650fd6
AS
9118sed 's/^/| /' conftest.$ac_ext >&5
9119
c0d27fcc 9120 ac_header_preproc=no
98418dba
CW
9121fi
9122rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9123echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9124echo "${ECHO_T}$ac_header_preproc" >&6
9125
9126# So? What about this header?
9127case $ac_header_compiler:$ac_header_preproc in
9128 yes:no )
9129 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
9130echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
9131 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
9132echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
9133 (
9134 cat <<\_ASBOX
9135## ------------------------------------ ##
9136## Report this to bug-autoconf@gnu.org. ##
9137## ------------------------------------ ##
9138_ASBOX
9139 ) |
9140 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 9141 ;;
c0d27fcc
MR
9142 no:yes )
9143 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
9144echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
793fa0d7
DL
9145 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
9146echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
c0d27fcc 9147 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
19650fd6 9148echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
9149 (
9150 cat <<\_ASBOX
793fa0d7
DL
9151## ------------------------------------ ##
9152## Report this to bug-autoconf@gnu.org. ##
9153## ------------------------------------ ##
19650fd6
AS
9154_ASBOX
9155 ) |
9156 sed "s/^/$as_me: WARNING: /" >&2
9157 ;;
c0d27fcc
MR
9158esac
9159echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
9160echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
9161if test "${ac_cv_header_X11_xpm_h+set}" = set; then
9162 echo $ECHO_N "(cached) $ECHO_C" >&6
9163else
9164 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 9165fi
c0d27fcc 9166echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 9167echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
9168
9169fi
98418dba 9170if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 9171 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
9172echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
9173if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 9174 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9175else
98418dba
CW
9176 ac_check_lib_save_LIBS=$LIBS
9177LIBS="-lXpm -lX11 $LIBS"
9178cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9179#line $LINENO "configure"
19650fd6
AS
9180/* confdefs.h. */
9181_ACEOF
9182cat confdefs.h >>conftest.$ac_ext
9183cat >>conftest.$ac_ext <<_ACEOF
9184/* end confdefs.h. */
98418dba 9185
ba4481b5 9186/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9187#ifdef __cplusplus
9188extern "C"
9189#endif
ba4481b5 9190/* We use char because int might match the return type of a gcc2
503d2be0 9191 builtin and then its argument prototype would still apply. */
98418dba 9192char XpmReadFileToPixmap ();
503d2be0
AS
9193int
9194main ()
9195{
98418dba 9196XpmReadFileToPixmap ();
503d2be0
AS
9197 ;
9198 return 0;
9199}
9200_ACEOF
9201rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9202if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9203 (eval $ac_link) 2>&5
9204 ac_status=$?
c0d27fcc 9205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9206 (exit $ac_status); } &&
793fa0d7 9207 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
9209 (eval $ac_try) 2>&5
9210 ac_status=$?
c0d27fcc 9211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9212 (exit $ac_status); }; }; then
98418dba 9213 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
9214else
9215 echo "$as_me: failed program was:" >&5
19650fd6
AS
9216sed 's/^/| /' conftest.$ac_ext >&5
9217
98418dba 9218ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0
AS
9219fi
9220rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 9221LIBS=$ac_check_lib_save_LIBS
503d2be0 9222fi
c0d27fcc 9223echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
9224echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
9225if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
9226 HAVE_XPM=yes
ba4481b5
DL
9227fi
9228
98418dba
CW
9229fi
9230
c0d27fcc 9231
98418dba 9232 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 9233 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
9234echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
9235 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9236#line $LINENO "configure"
19650fd6
AS
9237/* confdefs.h. */
9238_ACEOF
9239cat confdefs.h >>conftest.$ac_ext
9240cat >>conftest.$ac_ext <<_ACEOF
9241/* end confdefs.h. */
98418dba
CW
9242#include "X11/xpm.h"
9243#ifndef XpmReturnAllocPixels
9244no_return_alloc_pixels
503d2be0 9245#endif
ba4481b5 9246
98418dba
CW
9247_ACEOF
9248if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 9249 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
9250 HAVE_XPM=no
9251else
9252 HAVE_XPM=yes
9253fi
9254rm -f conftest*
ba4481b5 9255
c0d27fcc 9256
98418dba 9257 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 9258 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
9259echo "${ECHO_T}yes" >&6
9260 else
c0d27fcc 9261 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9262echo "${ECHO_T}no" >&6
9263 fi
9264 fi
9265 fi
9266
9267 if test "${HAVE_XPM}" = "yes"; then
b936fae4 9268
c0d27fcc 9269cat >>confdefs.h <<\_ACEOF
98418dba 9270#define HAVE_XPM 1
c0d27fcc 9271_ACEOF
98418dba
CW
9272
9273 fi
9274fi
9275
9276### Use -ljpeg if available, unless `--with-jpeg=no'.
9277HAVE_JPEG=no
9278if test "${HAVE_X11}" = "yes"; then
9279 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
9280 if test "${ac_cv_header_jerror_h+set}" = set; then
9281 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
9282echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
9283if test "${ac_cv_header_jerror_h+set}" = set; then
9284 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9285fi
9286echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
9287echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 9288else
c0d27fcc
MR
9289 # Is the header compilable?
9290echo "$as_me:$LINENO: checking jerror.h usability" >&5
9291echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
9292cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9293#line $LINENO "configure"
19650fd6
AS
9294/* confdefs.h. */
9295_ACEOF
9296cat confdefs.h >>conftest.$ac_ext
9297cat >>conftest.$ac_ext <<_ACEOF
9298/* end confdefs.h. */
c0d27fcc
MR
9299$ac_includes_default
9300#include <jerror.h>
9301_ACEOF
9302rm -f conftest.$ac_objext
9303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9304 (eval $ac_compile) 2>&5
9305 ac_status=$?
9306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9307 (exit $ac_status); } &&
793fa0d7 9308 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
9309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9310 (eval $ac_try) 2>&5
9311 ac_status=$?
9312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9313 (exit $ac_status); }; }; then
9314 ac_header_compiler=yes
9315else
9316 echo "$as_me: failed program was:" >&5
19650fd6
AS
9317sed 's/^/| /' conftest.$ac_ext >&5
9318
c0d27fcc
MR
9319ac_header_compiler=no
9320fi
9321rm -f conftest.$ac_objext conftest.$ac_ext
9322echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9323echo "${ECHO_T}$ac_header_compiler" >&6
9324
9325# Is the header present?
9326echo "$as_me:$LINENO: checking jerror.h presence" >&5
9327echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
9328cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9329#line $LINENO "configure"
19650fd6
AS
9330/* confdefs.h. */
9331_ACEOF
9332cat confdefs.h >>conftest.$ac_ext
9333cat >>conftest.$ac_ext <<_ACEOF
9334/* end confdefs.h. */
98418dba
CW
9335#include <jerror.h>
9336_ACEOF
c0d27fcc 9337if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9338 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9339 ac_status=$?
6bae0ccf 9340 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9341 rm -f conftest.er1
9342 cat conftest.err >&5
c0d27fcc 9343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9344 (exit $ac_status); } >/dev/null; then
9345 if test -s conftest.err; then
9346 ac_cpp_err=$ac_c_preproc_warn_flag
9347 else
9348 ac_cpp_err=
9349 fi
9350else
9351 ac_cpp_err=yes
503d2be0 9352fi
98418dba 9353if test -z "$ac_cpp_err"; then
c0d27fcc 9354 ac_header_preproc=yes
ba4481b5 9355else
98418dba 9356 echo "$as_me: failed program was:" >&5
19650fd6
AS
9357sed 's/^/| /' conftest.$ac_ext >&5
9358
c0d27fcc 9359 ac_header_preproc=no
98418dba
CW
9360fi
9361rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9362echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9363echo "${ECHO_T}$ac_header_preproc" >&6
9364
9365# So? What about this header?
9366case $ac_header_compiler:$ac_header_preproc in
9367 yes:no )
9368 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
9369echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
9370 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
9371echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
9372 (
9373 cat <<\_ASBOX
9374## ------------------------------------ ##
9375## Report this to bug-autoconf@gnu.org. ##
9376## ------------------------------------ ##
9377_ASBOX
9378 ) |
9379 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 9380 ;;
c0d27fcc
MR
9381 no:yes )
9382 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
9383echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
793fa0d7
DL
9384 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
9385echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
c0d27fcc 9386 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 9387echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
9388 (
9389 cat <<\_ASBOX
793fa0d7
DL
9390## ------------------------------------ ##
9391## Report this to bug-autoconf@gnu.org. ##
9392## ------------------------------------ ##
19650fd6
AS
9393_ASBOX
9394 ) |
9395 sed "s/^/$as_me: WARNING: /" >&2
9396 ;;
c0d27fcc
MR
9397esac
9398echo "$as_me:$LINENO: checking for jerror.h" >&5
9399echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
9400if test "${ac_cv_header_jerror_h+set}" = set; then
9401 echo $ECHO_N "(cached) $ECHO_C" >&6
9402else
9403 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 9404fi
c0d27fcc 9405echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 9406echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
9407
9408fi
98418dba 9409if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 9410 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
9411echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
9412if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 9413 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9414else
98418dba
CW
9415 ac_check_lib_save_LIBS=$LIBS
9416LIBS="-ljpeg $LIBS"
9417cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9418#line $LINENO "configure"
19650fd6
AS
9419/* confdefs.h. */
9420_ACEOF
9421cat confdefs.h >>conftest.$ac_ext
9422cat >>conftest.$ac_ext <<_ACEOF
9423/* end confdefs.h. */
98418dba
CW
9424
9425/* Override any gcc2 internal prototype to avoid an error. */
9426#ifdef __cplusplus
9427extern "C"
9428#endif
9429/* We use char because int might match the return type of a gcc2
9430 builtin and then its argument prototype would still apply. */
9431char jpeg_destroy_compress ();
503d2be0
AS
9432int
9433main ()
9434{
98418dba 9435jpeg_destroy_compress ();
503d2be0
AS
9436 ;
9437 return 0;
9438}
9439_ACEOF
9440rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9441if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9442 (eval $ac_link) 2>&5
9443 ac_status=$?
c0d27fcc 9444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9445 (exit $ac_status); } &&
793fa0d7 9446 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
9448 (eval $ac_try) 2>&5
9449 ac_status=$?
c0d27fcc 9450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9451 (exit $ac_status); }; }; then
98418dba 9452 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 9453else
503d2be0 9454 echo "$as_me: failed program was:" >&5
19650fd6
AS
9455sed 's/^/| /' conftest.$ac_ext >&5
9456
98418dba 9457ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 9458fi
503d2be0 9459rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 9460LIBS=$ac_check_lib_save_LIBS
ba4481b5 9461fi
c0d27fcc 9462echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
9463echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
9464if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
9465 HAVE_JPEG=yes
ba4481b5 9466fi
98418dba 9467
ba4481b5 9468fi
98418dba 9469
c0d27fcc 9470
ba4481b5 9471 fi
ba4481b5 9472
c0d27fcc 9473
98418dba 9474 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 9475 cat >>confdefs.h <<\_ACEOF
98418dba 9476#define HAVE_JPEG 1
c0d27fcc 9477_ACEOF
98418dba
CW
9478
9479 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9480#line $LINENO "configure"
19650fd6
AS
9481/* confdefs.h. */
9482_ACEOF
9483cat confdefs.h >>conftest.$ac_ext
9484cat >>conftest.$ac_ext <<_ACEOF
9485/* end confdefs.h. */
22044edf 9486#include <jpeglib.h>
98418dba
CW
9487 version=JPEG_LIB_VERSION
9488
9489_ACEOF
9490if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 9491 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 9492 cat >>confdefs.h <<\_ACEOF
98418dba 9493#define HAVE_JPEG 1
c0d27fcc 9494_ACEOF
ba4481b5 9495
98418dba 9496else
c0d27fcc 9497 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
9498echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
9499 HAVE_JPEG=no
ba4481b5 9500fi
98418dba 9501rm -f conftest*
ba4481b5 9502
98418dba
CW
9503 fi
9504fi
503d2be0 9505
98418dba
CW
9506### Use -lpng if available, unless `--with-png=no'.
9507HAVE_PNG=no
9508if test "${HAVE_X11}" = "yes"; then
9509 if test "${with_png}" != "no"; then
f57bd967
DL
9510 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
9511 # in /usr/include/libpng.
9512
9513
9514for ac_header in png.h libpng/png.h
9515do
9516as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9517if eval "test \"\${$as_ac_Header+set}\" = set"; then
9518 echo "$as_me:$LINENO: checking for $ac_header" >&5
9519echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9520if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 9521 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9522fi
f57bd967
DL
9523echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9524echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
503d2be0 9525else
c0d27fcc 9526 # Is the header compilable?
f57bd967
DL
9527echo "$as_me:$LINENO: checking $ac_header usability" >&5
9528echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
c0d27fcc 9529cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9530#line $LINENO "configure"
19650fd6
AS
9531/* confdefs.h. */
9532_ACEOF
9533cat confdefs.h >>conftest.$ac_ext
9534cat >>conftest.$ac_ext <<_ACEOF
9535/* end confdefs.h. */
c0d27fcc 9536$ac_includes_default
f57bd967 9537#include <$ac_header>
c0d27fcc
MR
9538_ACEOF
9539rm -f conftest.$ac_objext
9540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9541 (eval $ac_compile) 2>&5
9542 ac_status=$?
9543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9544 (exit $ac_status); } &&
793fa0d7 9545 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
9546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9547 (eval $ac_try) 2>&5
9548 ac_status=$?
9549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9550 (exit $ac_status); }; }; then
9551 ac_header_compiler=yes
9552else
9553 echo "$as_me: failed program was:" >&5
19650fd6
AS
9554sed 's/^/| /' conftest.$ac_ext >&5
9555
c0d27fcc
MR
9556ac_header_compiler=no
9557fi
9558rm -f conftest.$ac_objext conftest.$ac_ext
9559echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9560echo "${ECHO_T}$ac_header_compiler" >&6
9561
9562# Is the header present?
f57bd967
DL
9563echo "$as_me:$LINENO: checking $ac_header presence" >&5
9564echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
c0d27fcc 9565cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9566#line $LINENO "configure"
19650fd6
AS
9567/* confdefs.h. */
9568_ACEOF
9569cat confdefs.h >>conftest.$ac_ext
9570cat >>conftest.$ac_ext <<_ACEOF
9571/* end confdefs.h. */
f57bd967 9572#include <$ac_header>
503d2be0 9573_ACEOF
c0d27fcc 9574if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9575 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9576 ac_status=$?
6bae0ccf 9577 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
9578 rm -f conftest.er1
9579 cat conftest.err >&5
c0d27fcc 9580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
9581 (exit $ac_status); } >/dev/null; then
9582 if test -s conftest.err; then
9583 ac_cpp_err=$ac_c_preproc_warn_flag
9584 else
9585 ac_cpp_err=
9586 fi
9587else
9588 ac_cpp_err=yes
9589fi
9590if test -z "$ac_cpp_err"; then
c0d27fcc 9591 ac_header_preproc=yes
503d2be0
AS
9592else
9593 echo "$as_me: failed program was:" >&5
19650fd6
AS
9594sed 's/^/| /' conftest.$ac_ext >&5
9595
c0d27fcc 9596 ac_header_preproc=no
ba4481b5 9597fi
503d2be0 9598rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9599echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9600echo "${ECHO_T}$ac_header_preproc" >&6
9601
9602# So? What about this header?
9603case $ac_header_compiler:$ac_header_preproc in
9604 yes:no )
f57bd967
DL
9605 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9606echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
9607 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9608echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9609 (
9610 cat <<\_ASBOX
9611## ------------------------------------ ##
9612## Report this to bug-autoconf@gnu.org. ##
9613## ------------------------------------ ##
9614_ASBOX
9615 ) |
9616 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 9617 ;;
c0d27fcc 9618 no:yes )
f57bd967
DL
9619 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9620echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
9621 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9622echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
f57bd967 9623 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 9624echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
9625 (
9626 cat <<\_ASBOX
793fa0d7
DL
9627## ------------------------------------ ##
9628## Report this to bug-autoconf@gnu.org. ##
9629## ------------------------------------ ##
19650fd6
AS
9630_ASBOX
9631 ) |
9632 sed "s/^/$as_me: WARNING: /" >&2
9633 ;;
c0d27fcc 9634esac
f57bd967
DL
9635echo "$as_me:$LINENO: checking for $ac_header" >&5
9636echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9637if eval "test \"\${$as_ac_Header+set}\" = set"; then
c0d27fcc
MR
9638 echo $ECHO_N "(cached) $ECHO_C" >&6
9639else
793fa0d7 9640 eval "$as_ac_Header=$ac_header_preproc"
f57bd967
DL
9641fi
9642echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9643echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9644
ba4481b5 9645fi
f57bd967
DL
9646if test `eval echo '${'$as_ac_Header'}'` = yes; then
9647 cat >>confdefs.h <<_ACEOF
9648#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9649_ACEOF
c0d27fcc
MR
9650
9651fi
f57bd967
DL
9652
9653done
9654
9655 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
9656 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
9657echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
9658if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 9659 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9660else
98418dba
CW
9661 ac_check_lib_save_LIBS=$LIBS
9662LIBS="-lpng -lz -lm $LIBS"
9663cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9664#line $LINENO "configure"
19650fd6
AS
9665/* confdefs.h. */
9666_ACEOF
9667cat confdefs.h >>conftest.$ac_ext
9668cat >>conftest.$ac_ext <<_ACEOF
9669/* end confdefs.h. */
98418dba 9670
ba4481b5 9671/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9672#ifdef __cplusplus
9673extern "C"
9674#endif
ba4481b5 9675/* We use char because int might match the return type of a gcc2
503d2be0 9676 builtin and then its argument prototype would still apply. */
98418dba 9677char png_get_channels ();
503d2be0
AS
9678int
9679main ()
9680{
98418dba 9681png_get_channels ();
503d2be0
AS
9682 ;
9683 return 0;
9684}
9685_ACEOF
9686rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9687if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9688 (eval $ac_link) 2>&5
9689 ac_status=$?
c0d27fcc 9690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9691 (exit $ac_status); } &&
793fa0d7 9692 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
9694 (eval $ac_try) 2>&5
9695 ac_status=$?
c0d27fcc 9696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9697 (exit $ac_status); }; }; then
98418dba 9698 ac_cv_lib_png_png_get_channels=yes
73b77ee5 9699else
98418dba 9700 echo "$as_me: failed program was:" >&5
19650fd6
AS
9701sed 's/^/| /' conftest.$ac_ext >&5
9702
98418dba 9703ac_cv_lib_png_png_get_channels=no
73b77ee5 9704fi
98418dba
CW
9705rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9706LIBS=$ac_check_lib_save_LIBS
73b77ee5 9707fi
c0d27fcc 9708echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
9709echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
9710if test $ac_cv_lib_png_png_get_channels = yes; then
9711 HAVE_PNG=yes
73b77ee5 9712fi
503d2be0 9713
f57bd967 9714 fi
98418dba
CW
9715 fi
9716
9717 if test "${HAVE_PNG}" = "yes"; then
b936fae4 9718
c0d27fcc 9719cat >>confdefs.h <<\_ACEOF
98418dba 9720#define HAVE_PNG 1
c0d27fcc 9721_ACEOF
73b77ee5 9722
98418dba 9723 fi
73b77ee5
GM
9724fi
9725
98418dba
CW
9726### Use -ltiff if available, unless `--with-tiff=no'.
9727HAVE_TIFF=no
9728if test "${HAVE_X11}" = "yes"; then
9729 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
9730 if test "${ac_cv_header_tiffio_h+set}" = set; then
9731 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
9732echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
9733if test "${ac_cv_header_tiffio_h+set}" = set; then
9734 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9735fi
9736echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
9737echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 9738else
c0d27fcc
MR
9739 # Is the header compilable?
9740echo "$as_me:$LINENO: checking tiffio.h usability" >&5
9741echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
9742cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9743#line $LINENO "configure"
19650fd6
AS
9744/* confdefs.h. */
9745_ACEOF
9746cat confdefs.h >>conftest.$ac_ext
9747cat >>conftest.$ac_ext <<_ACEOF
9748/* end confdefs.h. */
c0d27fcc
MR
9749$ac_includes_default
9750#include <tiffio.h>
9751_ACEOF
9752rm -f conftest.$ac_objext
9753if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9754 (eval $ac_compile) 2>&5
9755 ac_status=$?
9756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9757 (exit $ac_status); } &&
793fa0d7 9758 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
9759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9760 (eval $ac_try) 2>&5
9761 ac_status=$?
9762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9763 (exit $ac_status); }; }; then
9764 ac_header_compiler=yes
9765else
9766 echo "$as_me: failed program was:" >&5
19650fd6
AS
9767sed 's/^/| /' conftest.$ac_ext >&5
9768
c0d27fcc
MR
9769ac_header_compiler=no
9770fi
9771rm -f conftest.$ac_objext conftest.$ac_ext
9772echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9773echo "${ECHO_T}$ac_header_compiler" >&6
9774
9775# Is the header present?
9776echo "$as_me:$LINENO: checking tiffio.h presence" >&5
9777echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
9778cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9779#line $LINENO "configure"
19650fd6
AS
9780/* confdefs.h. */
9781_ACEOF
9782cat confdefs.h >>conftest.$ac_ext
9783cat >>conftest.$ac_ext <<_ACEOF
9784/* end confdefs.h. */
98418dba
CW
9785#include <tiffio.h>
9786_ACEOF
c0d27fcc 9787if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9788 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9789 ac_status=$?
6bae0ccf 9790 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9791 rm -f conftest.er1
9792 cat conftest.err >&5
c0d27fcc 9793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9794 (exit $ac_status); } >/dev/null; then
9795 if test -s conftest.err; then
9796 ac_cpp_err=$ac_c_preproc_warn_flag
9797 else
9798 ac_cpp_err=
9799 fi
9800else
9801 ac_cpp_err=yes
9802fi
9803if test -z "$ac_cpp_err"; then
c0d27fcc 9804 ac_header_preproc=yes
98418dba
CW
9805else
9806 echo "$as_me: failed program was:" >&5
19650fd6
AS
9807sed 's/^/| /' conftest.$ac_ext >&5
9808
c0d27fcc 9809 ac_header_preproc=no
98418dba
CW
9810fi
9811rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9812echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9813echo "${ECHO_T}$ac_header_preproc" >&6
9814
9815# So? What about this header?
9816case $ac_header_compiler:$ac_header_preproc in
9817 yes:no )
9818 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
9819echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
9820 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
9821echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
9822 (
9823 cat <<\_ASBOX
9824## ------------------------------------ ##
9825## Report this to bug-autoconf@gnu.org. ##
9826## ------------------------------------ ##
9827_ASBOX
9828 ) |
9829 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 9830 ;;
c0d27fcc
MR
9831 no:yes )
9832 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
9833echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
793fa0d7
DL
9834 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
9835echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
c0d27fcc 9836 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 9837echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
9838 (
9839 cat <<\_ASBOX
793fa0d7
DL
9840## ------------------------------------ ##
9841## Report this to bug-autoconf@gnu.org. ##
9842## ------------------------------------ ##
19650fd6
AS
9843_ASBOX
9844 ) |
9845 sed "s/^/$as_me: WARNING: /" >&2
9846 ;;
c0d27fcc
MR
9847esac
9848echo "$as_me:$LINENO: checking for tiffio.h" >&5
9849echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
9850if test "${ac_cv_header_tiffio_h+set}" = set; then
9851 echo $ECHO_N "(cached) $ECHO_C" >&6
9852else
9853 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 9854fi
c0d27fcc 9855echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 9856echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
9857
9858fi
98418dba
CW
9859if test $ac_cv_header_tiffio_h = yes; then
9860 tifflibs="-lz -lm"
9861 # At least one tiff package requires the jpeg library.
9862 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 9863 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
9864echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
9865if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 9866 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 9867else
503d2be0 9868 ac_check_lib_save_LIBS=$LIBS
98418dba 9869LIBS="-ltiff $tifflibs $LIBS"
503d2be0 9870cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9871#line $LINENO "configure"
19650fd6
AS
9872/* confdefs.h. */
9873_ACEOF
9874cat confdefs.h >>conftest.$ac_ext
9875cat >>conftest.$ac_ext <<_ACEOF
9876/* end confdefs.h. */
503d2be0 9877
73b77ee5 9878/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9879#ifdef __cplusplus
9880extern "C"
9881#endif
73b77ee5 9882/* We use char because int might match the return type of a gcc2
503d2be0 9883 builtin and then its argument prototype would still apply. */
98418dba 9884char TIFFGetVersion ();
503d2be0
AS
9885int
9886main ()
9887{
98418dba 9888TIFFGetVersion ();
503d2be0
AS
9889 ;
9890 return 0;
9891}
9892_ACEOF
9893rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9894if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9895 (eval $ac_link) 2>&5
9896 ac_status=$?
c0d27fcc 9897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9898 (exit $ac_status); } &&
793fa0d7 9899 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
9901 (eval $ac_try) 2>&5
9902 ac_status=$?
c0d27fcc 9903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9904 (exit $ac_status); }; }; then
98418dba 9905 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
9906else
9907 echo "$as_me: failed program was:" >&5
19650fd6
AS
9908sed 's/^/| /' conftest.$ac_ext >&5
9909
98418dba 9910ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0
AS
9911fi
9912rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9913LIBS=$ac_check_lib_save_LIBS
9914fi
c0d27fcc 9915echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
9916echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
9917if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
9918 HAVE_TIFF=yes
9919fi
9920
9921fi
73b77ee5 9922
c0d27fcc 9923
98418dba
CW
9924 fi
9925
9926 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 9927
c0d27fcc 9928cat >>confdefs.h <<\_ACEOF
98418dba 9929#define HAVE_TIFF 1
c0d27fcc 9930_ACEOF
98418dba
CW
9931
9932 fi
73b77ee5
GM
9933fi
9934
98418dba
CW
9935### Use -lgif if available, unless `--with-gif=no'.
9936HAVE_GIF=no
9937if test "${HAVE_X11}" = "yes"; then
9938 if test "${with_gif}" != "no"; then
c0d27fcc
MR
9939 if test "${ac_cv_header_gif_lib_h+set}" = set; then
9940 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
9941echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
9942if test "${ac_cv_header_gif_lib_h+set}" = set; then
9943 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9944fi
9945echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
9946echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 9947else
c0d27fcc
MR
9948 # Is the header compilable?
9949echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
9950echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
9951cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9952#line $LINENO "configure"
19650fd6
AS
9953/* confdefs.h. */
9954_ACEOF
9955cat confdefs.h >>conftest.$ac_ext
9956cat >>conftest.$ac_ext <<_ACEOF
9957/* end confdefs.h. */
c0d27fcc
MR
9958$ac_includes_default
9959#include <gif_lib.h>
9960_ACEOF
9961rm -f conftest.$ac_objext
9962if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9963 (eval $ac_compile) 2>&5
9964 ac_status=$?
9965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9966 (exit $ac_status); } &&
793fa0d7 9967 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
9968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9969 (eval $ac_try) 2>&5
9970 ac_status=$?
9971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9972 (exit $ac_status); }; }; then
9973 ac_header_compiler=yes
9974else
9975 echo "$as_me: failed program was:" >&5
19650fd6
AS
9976sed 's/^/| /' conftest.$ac_ext >&5
9977
c0d27fcc
MR
9978ac_header_compiler=no
9979fi
9980rm -f conftest.$ac_objext conftest.$ac_ext
9981echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9982echo "${ECHO_T}$ac_header_compiler" >&6
9983
9984# Is the header present?
9985echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
9986echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
9987cat >conftest.$ac_ext <<_ACEOF
793fa0d7 9988#line $LINENO "configure"
19650fd6
AS
9989/* confdefs.h. */
9990_ACEOF
9991cat confdefs.h >>conftest.$ac_ext
9992cat >>conftest.$ac_ext <<_ACEOF
9993/* end confdefs.h. */
98418dba
CW
9994#include <gif_lib.h>
9995_ACEOF
c0d27fcc 9996if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9997 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9998 ac_status=$?
6bae0ccf 9999 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
10000 rm -f conftest.er1
10001 cat conftest.err >&5
c0d27fcc 10002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10003 (exit $ac_status); } >/dev/null; then
10004 if test -s conftest.err; then
10005 ac_cpp_err=$ac_c_preproc_warn_flag
10006 else
10007 ac_cpp_err=
10008 fi
10009else
10010 ac_cpp_err=yes
10011fi
10012if test -z "$ac_cpp_err"; then
c0d27fcc 10013 ac_header_preproc=yes
98418dba
CW
10014else
10015 echo "$as_me: failed program was:" >&5
19650fd6
AS
10016sed 's/^/| /' conftest.$ac_ext >&5
10017
c0d27fcc 10018 ac_header_preproc=no
98418dba
CW
10019fi
10020rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
10021echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10022echo "${ECHO_T}$ac_header_preproc" >&6
10023
10024# So? What about this header?
10025case $ac_header_compiler:$ac_header_preproc in
10026 yes:no )
10027 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
10028echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
10029 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
10030echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
10031 (
10032 cat <<\_ASBOX
10033## ------------------------------------ ##
10034## Report this to bug-autoconf@gnu.org. ##
10035## ------------------------------------ ##
10036_ASBOX
10037 ) |
10038 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 10039 ;;
c0d27fcc
MR
10040 no:yes )
10041 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
10042echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
793fa0d7
DL
10043 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
10044echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
c0d27fcc 10045 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 10046echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
10047 (
10048 cat <<\_ASBOX
793fa0d7
DL
10049## ------------------------------------ ##
10050## Report this to bug-autoconf@gnu.org. ##
10051## ------------------------------------ ##
19650fd6
AS
10052_ASBOX
10053 ) |
10054 sed "s/^/$as_me: WARNING: /" >&2
10055 ;;
c0d27fcc
MR
10056esac
10057echo "$as_me:$LINENO: checking for gif_lib.h" >&5
10058echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
10059if test "${ac_cv_header_gif_lib_h+set}" = set; then
10060 echo $ECHO_N "(cached) $ECHO_C" >&6
10061else
10062 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 10063fi
c0d27fcc 10064echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 10065echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
10066
10067fi
98418dba
CW
10068if test $ac_cv_header_gif_lib_h = yes; then
10069 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
10070# Earlier versions can crash Emacs.
c0d27fcc 10071 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
10072echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
10073if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 10074 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 10075else
503d2be0 10076 ac_check_lib_save_LIBS=$LIBS
98418dba 10077LIBS="-lungif $LIBS"
503d2be0 10078cat >conftest.$ac_ext <<_ACEOF
793fa0d7 10079#line $LINENO "configure"
19650fd6
AS
10080/* confdefs.h. */
10081_ACEOF
10082cat confdefs.h >>conftest.$ac_ext
10083cat >>conftest.$ac_ext <<_ACEOF
10084/* end confdefs.h. */
73b77ee5 10085
98418dba
CW
10086/* Override any gcc2 internal prototype to avoid an error. */
10087#ifdef __cplusplus
10088extern "C"
10089#endif
10090/* We use char because int might match the return type of a gcc2
10091 builtin and then its argument prototype would still apply. */
10092char EGifPutExtensionLast ();
503d2be0
AS
10093int
10094main ()
10095{
98418dba 10096EGifPutExtensionLast ();
503d2be0
AS
10097 ;
10098 return 0;
10099}
10100_ACEOF
10101rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10102if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10103 (eval $ac_link) 2>&5
10104 ac_status=$?
c0d27fcc 10105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10106 (exit $ac_status); } &&
793fa0d7 10107 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10109 (eval $ac_try) 2>&5
10110 ac_status=$?
c0d27fcc 10111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10112 (exit $ac_status); }; }; then
10113 ac_cv_lib_ungif_EGifPutExtensionLast=yes
10114else
10115 echo "$as_me: failed program was:" >&5
19650fd6
AS
10116sed 's/^/| /' conftest.$ac_ext >&5
10117
98418dba
CW
10118ac_cv_lib_ungif_EGifPutExtensionLast=no
10119fi
10120rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10121LIBS=$ac_check_lib_save_LIBS
10122fi
c0d27fcc 10123echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
10124echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
10125if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
10126 HAVE_GIF=yes
10127fi
10128
10129fi
10130
c0d27fcc 10131
98418dba
CW
10132 fi
10133
10134 if test "${HAVE_GIF}" = "yes"; then
b936fae4 10135
c0d27fcc 10136cat >>confdefs.h <<\_ACEOF
98418dba 10137#define HAVE_GIF 1
c0d27fcc 10138_ACEOF
98418dba
CW
10139
10140 fi
10141fi
10142
c0d27fcc
MR
10143### Use Mac OS X Carbon API to implement GUI.
10144HAVE_CARBON=no
10145if test "${with_carbon}" != "no"; then
10146 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
10147 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
10148echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
10149if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
10150 echo $ECHO_N "(cached) $ECHO_C" >&6
10151fi
10152echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
10153echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
10154else
10155 # Is the header compilable?
10156echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
10157echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
10158cat >conftest.$ac_ext <<_ACEOF
793fa0d7 10159#line $LINENO "configure"
19650fd6
AS
10160/* confdefs.h. */
10161_ACEOF
10162cat confdefs.h >>conftest.$ac_ext
10163cat >>conftest.$ac_ext <<_ACEOF
10164/* end confdefs.h. */
c0d27fcc
MR
10165$ac_includes_default
10166#include <Carbon/Carbon.h>
10167_ACEOF
10168rm -f conftest.$ac_objext
10169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10170 (eval $ac_compile) 2>&5
10171 ac_status=$?
10172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10173 (exit $ac_status); } &&
793fa0d7 10174 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
10175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10176 (eval $ac_try) 2>&5
10177 ac_status=$?
10178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10179 (exit $ac_status); }; }; then
10180 ac_header_compiler=yes
10181else
10182 echo "$as_me: failed program was:" >&5
19650fd6
AS
10183sed 's/^/| /' conftest.$ac_ext >&5
10184
c0d27fcc
MR
10185ac_header_compiler=no
10186fi
10187rm -f conftest.$ac_objext conftest.$ac_ext
10188echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10189echo "${ECHO_T}$ac_header_compiler" >&6
10190
10191# Is the header present?
10192echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
10193echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
10194cat >conftest.$ac_ext <<_ACEOF
793fa0d7 10195#line $LINENO "configure"
19650fd6
AS
10196/* confdefs.h. */
10197_ACEOF
10198cat confdefs.h >>conftest.$ac_ext
10199cat >>conftest.$ac_ext <<_ACEOF
10200/* end confdefs.h. */
e0f712ba
AC
10201#include <Carbon/Carbon.h>
10202_ACEOF
c0d27fcc 10203if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
e0f712ba
AC
10204 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10205 ac_status=$?
6bae0ccf 10206 grep -v '^ *+' conftest.er1 >conftest.err
e0f712ba
AC
10207 rm -f conftest.er1
10208 cat conftest.err >&5
c0d27fcc 10209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
e0f712ba
AC
10210 (exit $ac_status); } >/dev/null; then
10211 if test -s conftest.err; then
10212 ac_cpp_err=$ac_c_preproc_warn_flag
10213 else
10214 ac_cpp_err=
10215 fi
10216else
10217 ac_cpp_err=yes
10218fi
10219if test -z "$ac_cpp_err"; then
c0d27fcc 10220 ac_header_preproc=yes
e0f712ba
AC
10221else
10222 echo "$as_me: failed program was:" >&5
19650fd6
AS
10223sed 's/^/| /' conftest.$ac_ext >&5
10224
c0d27fcc 10225 ac_header_preproc=no
e0f712ba
AC
10226fi
10227rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
10228echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10229echo "${ECHO_T}$ac_header_preproc" >&6
10230
10231# So? What about this header?
10232case $ac_header_compiler:$ac_header_preproc in
10233 yes:no )
10234 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
10235echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
10236 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
10237echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
10238 (
10239 cat <<\_ASBOX
10240## ------------------------------------ ##
10241## Report this to bug-autoconf@gnu.org. ##
10242## ------------------------------------ ##
10243_ASBOX
10244 ) |
10245 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 10246 ;;
c0d27fcc
MR
10247 no:yes )
10248 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
10249echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
793fa0d7
DL
10250 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
10251echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
c0d27fcc 10252 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
19650fd6 10253echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
10254 (
10255 cat <<\_ASBOX
793fa0d7
DL
10256## ------------------------------------ ##
10257## Report this to bug-autoconf@gnu.org. ##
10258## ------------------------------------ ##
19650fd6
AS
10259_ASBOX
10260 ) |
10261 sed "s/^/$as_me: WARNING: /" >&2
10262 ;;
c0d27fcc
MR
10263esac
10264echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
10265echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
10266if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
10267 echo $ECHO_N "(cached) $ECHO_C" >&6
10268else
10269 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
e0f712ba 10270fi
c0d27fcc 10271echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
e0f712ba 10272echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
c0d27fcc
MR
10273
10274fi
e0f712ba
AC
10275if test $ac_cv_header_Carbon_Carbon_h = yes; then
10276 HAVE_CARBON=yes
10277fi
10278
c0d27fcc 10279
e0f712ba
AC
10280fi
10281
10282if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 10283
c0d27fcc 10284cat >>confdefs.h <<\_ACEOF
e0f712ba 10285#define HAVE_CARBON 1
c0d27fcc 10286_ACEOF
e0f712ba 10287
6a3a24fa
JD
10288 window_system=mac
10289 ## Specify the install directory
10290 carbon_appdir=
10291 if test "${carbon_appdir_x}" != ""; then
10292 case ${carbon_appdir_x} in
10293 y | ye | yes) carbon_appdir=/Applications ;;
10294 * ) carbon_appdir=${carbon_appdir_x} ;;
10295 esac
10296 fi
8f417b3b
AS
10297 # We also have mouse menus.
10298 HAVE_MENUS=yes
e0f712ba
AC
10299fi
10300
98418dba
CW
10301### Use session management (-lSM -lICE) if available
10302HAVE_X_SM=no
10303if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
10304 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
10305 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
10306echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
10307if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
10308 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
10309fi
10310echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
10311echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 10312else
c0d27fcc
MR
10313 # Is the header compilable?
10314echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
10315echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
10316cat >conftest.$ac_ext <<_ACEOF
793fa0d7 10317#line $LINENO "configure"
19650fd6
AS
10318/* confdefs.h. */
10319_ACEOF
10320cat confdefs.h >>conftest.$ac_ext
10321cat >>conftest.$ac_ext <<_ACEOF
10322/* end confdefs.h. */
c0d27fcc
MR
10323$ac_includes_default
10324#include <X11/SM/SMlib.h>
10325_ACEOF
10326rm -f conftest.$ac_objext
10327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10328 (eval $ac_compile) 2>&5
10329 ac_status=$?
10330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10331 (exit $ac_status); } &&
793fa0d7 10332 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
10333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10334 (eval $ac_try) 2>&5
10335 ac_status=$?
10336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10337 (exit $ac_status); }; }; then
10338 ac_header_compiler=yes
10339else
10340 echo "$as_me: failed program was:" >&5
19650fd6
AS
10341sed 's/^/| /' conftest.$ac_ext >&5
10342
c0d27fcc
MR
10343ac_header_compiler=no
10344fi
10345rm -f conftest.$ac_objext conftest.$ac_ext
10346echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10347echo "${ECHO_T}$ac_header_compiler" >&6
10348
10349# Is the header present?
10350echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
10351echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
10352cat >conftest.$ac_ext <<_ACEOF
793fa0d7 10353#line $LINENO "configure"
19650fd6
AS
10354/* confdefs.h. */
10355_ACEOF
10356cat confdefs.h >>conftest.$ac_ext
10357cat >>conftest.$ac_ext <<_ACEOF
10358/* end confdefs.h. */
98418dba
CW
10359#include <X11/SM/SMlib.h>
10360_ACEOF
c0d27fcc 10361if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
10362 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10363 ac_status=$?
6bae0ccf 10364 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
10365 rm -f conftest.er1
10366 cat conftest.err >&5
c0d27fcc 10367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10368 (exit $ac_status); } >/dev/null; then
10369 if test -s conftest.err; then
10370 ac_cpp_err=$ac_c_preproc_warn_flag
10371 else
10372 ac_cpp_err=
10373 fi
10374else
10375 ac_cpp_err=yes
503d2be0 10376fi
98418dba 10377if test -z "$ac_cpp_err"; then
c0d27fcc 10378 ac_header_preproc=yes
98418dba
CW
10379else
10380 echo "$as_me: failed program was:" >&5
19650fd6
AS
10381sed 's/^/| /' conftest.$ac_ext >&5
10382
c0d27fcc 10383 ac_header_preproc=no
98418dba
CW
10384fi
10385rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
10386echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10387echo "${ECHO_T}$ac_header_preproc" >&6
10388
10389# So? What about this header?
10390case $ac_header_compiler:$ac_header_preproc in
10391 yes:no )
10392 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
10393echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
10394 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
10395echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
10396 (
10397 cat <<\_ASBOX
10398## ------------------------------------ ##
10399## Report this to bug-autoconf@gnu.org. ##
10400## ------------------------------------ ##
10401_ASBOX
10402 ) |
10403 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 10404 ;;
c0d27fcc
MR
10405 no:yes )
10406 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
10407echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
793fa0d7
DL
10408 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
10409echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
c0d27fcc 10410 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 10411echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
10412 (
10413 cat <<\_ASBOX
793fa0d7
DL
10414## ------------------------------------ ##
10415## Report this to bug-autoconf@gnu.org. ##
10416## ------------------------------------ ##
19650fd6
AS
10417_ASBOX
10418 ) |
10419 sed "s/^/$as_me: WARNING: /" >&2
10420 ;;
c0d27fcc
MR
10421esac
10422echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
10423echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
10424if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
10425 echo $ECHO_N "(cached) $ECHO_C" >&6
10426else
10427 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 10428fi
c0d27fcc 10429echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 10430echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
10431
10432fi
98418dba 10433if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 10434 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
10435echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
10436if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 10437 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 10438else
503d2be0 10439 ac_check_lib_save_LIBS=$LIBS
98418dba 10440LIBS="-lSM $LIBS"
503d2be0 10441cat >conftest.$ac_ext <<_ACEOF
793fa0d7 10442#line $LINENO "configure"
19650fd6
AS
10443/* confdefs.h. */
10444_ACEOF
10445cat confdefs.h >>conftest.$ac_ext
10446cat >>conftest.$ac_ext <<_ACEOF
10447/* end confdefs.h. */
503d2be0 10448
73b77ee5 10449/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10450#ifdef __cplusplus
10451extern "C"
10452#endif
73b77ee5 10453/* We use char because int might match the return type of a gcc2
503d2be0 10454 builtin and then its argument prototype would still apply. */
98418dba 10455char SmcOpenConnection ();
503d2be0
AS
10456int
10457main ()
10458{
98418dba 10459SmcOpenConnection ();
503d2be0
AS
10460 ;
10461 return 0;
10462}
10463_ACEOF
10464rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10465if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10466 (eval $ac_link) 2>&5
10467 ac_status=$?
c0d27fcc 10468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10469 (exit $ac_status); } &&
793fa0d7 10470 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10472 (eval $ac_try) 2>&5
10473 ac_status=$?
c0d27fcc 10474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10475 (exit $ac_status); }; }; then
98418dba 10476 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
10477else
10478 echo "$as_me: failed program was:" >&5
19650fd6
AS
10479sed 's/^/| /' conftest.$ac_ext >&5
10480
98418dba 10481ac_cv_lib_SM_SmcOpenConnection=no
503d2be0
AS
10482fi
10483rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10484LIBS=$ac_check_lib_save_LIBS
10485fi
c0d27fcc 10486echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
10487echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
10488if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
10489 HAVE_X_SM=yes
10490else
10491 -lICE
73b77ee5
GM
10492fi
10493
73b77ee5 10494fi
73b77ee5 10495
c0d27fcc
MR
10496
10497
98418dba 10498 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 10499
c0d27fcc 10500cat >>confdefs.h <<\_ACEOF
98418dba 10501#define HAVE_X_SM 1
c0d27fcc 10502_ACEOF
73b77ee5 10503
98418dba
CW
10504 case "$LIBS" in
10505 *-lSM*) ;;
10506 *) LIBS="-lSM -lICE $LIBS" ;;
10507 esac
73b77ee5 10508 fi
98418dba 10509fi
73b77ee5 10510
98418dba 10511# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 10512echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
10513echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
10514if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
10515 echo $ECHO_N "(cached) $ECHO_C" >&6
10516else
10517 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 10518#line $LINENO "configure"
19650fd6
AS
10519/* confdefs.h. */
10520_ACEOF
10521cat confdefs.h >>conftest.$ac_ext
10522cat >>conftest.$ac_ext <<_ACEOF
10523/* end confdefs.h. */
98418dba 10524#include <netdb.h>
503d2be0
AS
10525int
10526main ()
10527{
98418dba 10528return h_errno;
503d2be0
AS
10529 ;
10530 return 0;
10531}
10532_ACEOF
10533rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10534if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10535 (eval $ac_link) 2>&5
10536 ac_status=$?
c0d27fcc 10537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10538 (exit $ac_status); } &&
793fa0d7 10539 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10541 (eval $ac_try) 2>&5
10542 ac_status=$?
c0d27fcc 10543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10544 (exit $ac_status); }; }; then
98418dba 10545 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 10546else
503d2be0 10547 echo "$as_me: failed program was:" >&5
19650fd6
AS
10548sed 's/^/| /' conftest.$ac_ext >&5
10549
98418dba 10550emacs_cv_netdb_declares_h_errno=no
73b77ee5 10551fi
503d2be0 10552rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10553fi
c0d27fcc 10554echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
10555echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
10556if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 10557
c0d27fcc 10558cat >>confdefs.h <<\_ACEOF
98418dba 10559#define HAVE_H_ERRNO 1
c0d27fcc 10560_ACEOF
73b77ee5 10561
98418dba
CW
10562fi
10563
10564# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10565# for constant arguments. Useless!
c0d27fcc 10566echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
10567echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
10568if test "${ac_cv_working_alloca_h+set}" = set; then
10569 echo $ECHO_N "(cached) $ECHO_C" >&6
10570else
10571 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 10572#line $LINENO "configure"
19650fd6
AS
10573/* confdefs.h. */
10574_ACEOF
10575cat confdefs.h >>conftest.$ac_ext
10576cat >>conftest.$ac_ext <<_ACEOF
10577/* end confdefs.h. */
98418dba 10578#include <alloca.h>
503d2be0
AS
10579int
10580main ()
10581{
98418dba 10582char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
10583 ;
10584 return 0;
10585}
10586_ACEOF
10587rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10588if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10589 (eval $ac_link) 2>&5
10590 ac_status=$?
c0d27fcc 10591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10592 (exit $ac_status); } &&
793fa0d7 10593 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10595 (eval $ac_try) 2>&5
10596 ac_status=$?
c0d27fcc 10597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10598 (exit $ac_status); }; }; then
98418dba 10599 ac_cv_working_alloca_h=yes
73b77ee5 10600else
503d2be0 10601 echo "$as_me: failed program was:" >&5
19650fd6
AS
10602sed 's/^/| /' conftest.$ac_ext >&5
10603
98418dba 10604ac_cv_working_alloca_h=no
73b77ee5 10605fi
503d2be0 10606rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10607fi
c0d27fcc 10608echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
10609echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
10610if test $ac_cv_working_alloca_h = yes; then
73b77ee5 10611
c0d27fcc 10612cat >>confdefs.h <<\_ACEOF
98418dba 10613#define HAVE_ALLOCA_H 1
c0d27fcc 10614_ACEOF
98418dba
CW
10615
10616fi
10617
c0d27fcc 10618echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
10619echo $ECHO_N "checking for alloca... $ECHO_C" >&6
10620if test "${ac_cv_func_alloca_works+set}" = set; then
10621 echo $ECHO_N "(cached) $ECHO_C" >&6
10622else
503d2be0 10623 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 10624#line $LINENO "configure"
19650fd6
AS
10625/* confdefs.h. */
10626_ACEOF
10627cat confdefs.h >>conftest.$ac_ext
10628cat >>conftest.$ac_ext <<_ACEOF
10629/* end confdefs.h. */
98418dba
CW
10630#ifdef __GNUC__
10631# define alloca __builtin_alloca
10632#else
10633# ifdef _MSC_VER
10634# include <malloc.h>
10635# define alloca _alloca
10636# else
10637# if HAVE_ALLOCA_H
10638# include <alloca.h>
10639# else
10640# ifdef _AIX
10641 #pragma alloca
10642# else
10643# ifndef alloca /* predefined by HP cc +Olibcalls */
10644char *alloca ();
10645# endif
10646# endif
10647# endif
10648# endif
10649#endif
10650
503d2be0
AS
10651int
10652main ()
10653{
98418dba 10654char *p = (char *) alloca (1);
503d2be0
AS
10655 ;
10656 return 0;
10657}
10658_ACEOF
10659rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10660if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10661 (eval $ac_link) 2>&5
10662 ac_status=$?
c0d27fcc 10663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10664 (exit $ac_status); } &&
793fa0d7 10665 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10667 (eval $ac_try) 2>&5
10668 ac_status=$?
c0d27fcc 10669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10670 (exit $ac_status); }; }; then
98418dba 10671 ac_cv_func_alloca_works=yes
ac95a621 10672else
503d2be0 10673 echo "$as_me: failed program was:" >&5
19650fd6
AS
10674sed 's/^/| /' conftest.$ac_ext >&5
10675
98418dba 10676ac_cv_func_alloca_works=no
ac95a621 10677fi
503d2be0 10678rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10679fi
c0d27fcc 10680echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 10681echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 10682
98418dba
CW
10683if test $ac_cv_func_alloca_works = yes; then
10684
c0d27fcc 10685cat >>confdefs.h <<\_ACEOF
98418dba 10686#define HAVE_ALLOCA 1
c0d27fcc 10687_ACEOF
98418dba
CW
10688
10689else
10690 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10691# that cause trouble. Some versions do not even contain alloca or
10692# contain a buggy version. If you still want to use their alloca,
10693# use ar to extract alloca.o from them instead of compiling alloca.c.
10694
10695ALLOCA=alloca.$ac_objext
10696
c0d27fcc 10697cat >>confdefs.h <<\_ACEOF
98418dba 10698#define C_ALLOCA 1
c0d27fcc 10699_ACEOF
98418dba 10700
c0d27fcc
MR
10701
10702echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
10703echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
10704if test "${ac_cv_os_cray+set}" = set; then
10705 echo $ECHO_N "(cached) $ECHO_C" >&6
10706else
10707 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 10708#line $LINENO "configure"
19650fd6
AS
10709/* confdefs.h. */
10710_ACEOF
10711cat confdefs.h >>conftest.$ac_ext
10712cat >>conftest.$ac_ext <<_ACEOF
10713/* end confdefs.h. */
98418dba
CW
10714#if defined(CRAY) && ! defined(CRAY2)
10715webecray
10716#else
10717wenotbecray
10718#endif
10719
10720_ACEOF
10721if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 10722 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
10723 ac_cv_os_cray=yes
10724else
10725 ac_cv_os_cray=no
10726fi
10727rm -f conftest*
ac95a621 10728
98418dba 10729fi
c0d27fcc 10730echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
10731echo "${ECHO_T}$ac_cv_os_cray" >&6
10732if test $ac_cv_os_cray = yes; then
10733 for ac_func in _getb67 GETB67 getb67; do
10734 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 10735echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
10736echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10737if eval "test \"\${$as_ac_var+set}\" = set"; then
10738 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 10739else
503d2be0 10740 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 10741#line $LINENO "configure"
19650fd6
AS
10742/* confdefs.h. */
10743_ACEOF
10744cat confdefs.h >>conftest.$ac_ext
10745cat >>conftest.$ac_ext <<_ACEOF
10746/* end confdefs.h. */
73b77ee5 10747/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10748 which can conflict with char $ac_func (); below.
10749 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10750 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
10751#ifdef __STDC__
10752# include <limits.h>
10753#else
10754# include <assert.h>
10755#endif
73b77ee5 10756/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10757#ifdef __cplusplus
10758extern "C"
19650fd6 10759{
503d2be0 10760#endif
73b77ee5 10761/* We use char because int might match the return type of a gcc2
503d2be0
AS
10762 builtin and then its argument prototype would still apply. */
10763char $ac_func ();
73b77ee5
GM
10764/* The GNU C library defines this for functions which it implements
10765 to always fail with ENOSYS. Some functions are actually named
10766 something starting with __ and the normal name is an alias. */
10767#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10768choke me
10769#else
19650fd6
AS
10770char (*f) () = $ac_func;
10771#endif
10772#ifdef __cplusplus
10773}
73b77ee5
GM
10774#endif
10775
19650fd6
AS
10776int
10777main ()
10778{
10779return f != $ac_func;
503d2be0
AS
10780 ;
10781 return 0;
10782}
10783_ACEOF
10784rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10785if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10786 (eval $ac_link) 2>&5
10787 ac_status=$?
c0d27fcc 10788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10789 (exit $ac_status); } &&
793fa0d7 10790 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10792 (eval $ac_try) 2>&5
10793 ac_status=$?
c0d27fcc 10794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10795 (exit $ac_status); }; }; then
10796 eval "$as_ac_var=yes"
10797else
10798 echo "$as_me: failed program was:" >&5
19650fd6
AS
10799sed 's/^/| /' conftest.$ac_ext >&5
10800
503d2be0
AS
10801eval "$as_ac_var=no"
10802fi
10803rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10804fi
c0d27fcc 10805echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
10806echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10807if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 10808
c0d27fcc 10809cat >>confdefs.h <<_ACEOF
98418dba 10810#define CRAY_STACKSEG_END $ac_func
c0d27fcc 10811_ACEOF
98418dba
CW
10812
10813 break
73b77ee5 10814fi
73b77ee5 10815
98418dba 10816 done
73b77ee5
GM
10817fi
10818
c0d27fcc 10819echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
10820echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
10821if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 10822 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
10823else
10824 if test "$cross_compiling" = yes; then
10825 ac_cv_c_stack_direction=0
73b77ee5 10826else
503d2be0 10827 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 10828#line $LINENO "configure"
19650fd6
AS
10829/* confdefs.h. */
10830_ACEOF
10831cat confdefs.h >>conftest.$ac_ext
10832cat >>conftest.$ac_ext <<_ACEOF
10833/* end confdefs.h. */
503d2be0 10834int
98418dba 10835find_stack_direction ()
503d2be0 10836{
98418dba
CW
10837 static char *addr = 0;
10838 auto char dummy;
10839 if (addr == 0)
10840 {
10841 addr = &dummy;
10842 return find_stack_direction ();
10843 }
73b77ee5 10844 else
98418dba
CW
10845 return (&dummy > addr) ? 1 : -1;
10846}
ba4481b5 10847
503d2be0
AS
10848int
10849main ()
10850{
98418dba 10851 exit (find_stack_direction () < 0);
503d2be0
AS
10852}
10853_ACEOF
98418dba 10854rm -f conftest$ac_exeext
c0d27fcc 10855if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10856 (eval $ac_link) 2>&5
10857 ac_status=$?
c0d27fcc 10858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10859 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 10860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10861 (eval $ac_try) 2>&5
10862 ac_status=$?
c0d27fcc 10863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10864 (exit $ac_status); }; }; then
98418dba 10865 ac_cv_c_stack_direction=1
ba4481b5 10866else
98418dba
CW
10867 echo "$as_me: program exited with status $ac_status" >&5
10868echo "$as_me: failed program was:" >&5
19650fd6
AS
10869sed 's/^/| /' conftest.$ac_ext >&5
10870
c0d27fcc 10871( exit $ac_status )
98418dba 10872ac_cv_c_stack_direction=-1
ba4481b5 10873fi
851a3062 10874rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 10875fi
98418dba 10876fi
c0d27fcc 10877echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
10878echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
10879
c0d27fcc 10880cat >>confdefs.h <<_ACEOF
98418dba 10881#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
10882_ACEOF
10883
ba4481b5 10884
ba4481b5
DL
10885fi
10886
c0d27fcc 10887
98418dba
CW
10888# fmod, logb, and frexp are found in -lm on most systems.
10889# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
10890
c0d27fcc 10891echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
10892echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
10893if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 10894 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 10895else
98418dba
CW
10896 ac_check_lib_save_LIBS=$LIBS
10897LIBS="-lm $LIBS"
10898cat >conftest.$ac_ext <<_ACEOF
793fa0d7 10899#line $LINENO "configure"
19650fd6
AS
10900/* confdefs.h. */
10901_ACEOF
10902cat confdefs.h >>conftest.$ac_ext
10903cat >>conftest.$ac_ext <<_ACEOF
10904/* end confdefs.h. */
ba4481b5 10905
98418dba
CW
10906/* Override any gcc2 internal prototype to avoid an error. */
10907#ifdef __cplusplus
10908extern "C"
10909#endif
10910/* We use char because int might match the return type of a gcc2
10911 builtin and then its argument prototype would still apply. */
10912char sqrt ();
503d2be0
AS
10913int
10914main ()
10915{
98418dba 10916sqrt ();
503d2be0
AS
10917 ;
10918 return 0;
10919}
10920_ACEOF
10921rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10923 (eval $ac_link) 2>&5
10924 ac_status=$?
c0d27fcc 10925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10926 (exit $ac_status); } &&
793fa0d7 10927 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10929 (eval $ac_try) 2>&5
10930 ac_status=$?
c0d27fcc 10931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10932 (exit $ac_status); }; }; then
98418dba 10933 ac_cv_lib_m_sqrt=yes
ba4481b5 10934else
503d2be0 10935 echo "$as_me: failed program was:" >&5
19650fd6
AS
10936sed 's/^/| /' conftest.$ac_ext >&5
10937
98418dba 10938ac_cv_lib_m_sqrt=no
ba4481b5 10939fi
503d2be0 10940rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10941LIBS=$ac_check_lib_save_LIBS
ba4481b5 10942fi
c0d27fcc 10943echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
10944echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
10945if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 10946 cat >>confdefs.h <<_ACEOF
98418dba 10947#define HAVE_LIBM 1
c0d27fcc 10948_ACEOF
98418dba
CW
10949
10950 LIBS="-lm $LIBS"
ba4481b5 10951
ba4481b5
DL
10952fi
10953
c0d27fcc 10954
55597d70
DL
10955# Check for mail-locking functions in a "mail" library. Probably this should
10956# have the same check as for liblockfile below.
98418dba 10957
c0d27fcc 10958echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
10959echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
10960if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 10961 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 10962else
98418dba
CW
10963 ac_check_lib_save_LIBS=$LIBS
10964LIBS="-lmail $LIBS"
10965cat >conftest.$ac_ext <<_ACEOF
793fa0d7 10966#line $LINENO "configure"
19650fd6
AS
10967/* confdefs.h. */
10968_ACEOF
10969cat confdefs.h >>conftest.$ac_ext
10970cat >>conftest.$ac_ext <<_ACEOF
10971/* end confdefs.h. */
98418dba
CW
10972
10973/* Override any gcc2 internal prototype to avoid an error. */
10974#ifdef __cplusplus
10975extern "C"
10976#endif
10977/* We use char because int might match the return type of a gcc2
10978 builtin and then its argument prototype would still apply. */
10979char maillock ();
503d2be0
AS
10980int
10981main ()
10982{
98418dba 10983maillock ();
503d2be0
AS
10984 ;
10985 return 0;
10986}
10987_ACEOF
10988rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10989if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10990 (eval $ac_link) 2>&5
10991 ac_status=$?
c0d27fcc 10992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10993 (exit $ac_status); } &&
793fa0d7 10994 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10996 (eval $ac_try) 2>&5
10997 ac_status=$?
c0d27fcc 10998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10999 (exit $ac_status); }; }; then
98418dba 11000 ac_cv_lib_mail_maillock=yes
ba4481b5 11001else
503d2be0 11002 echo "$as_me: failed program was:" >&5
19650fd6
AS
11003sed 's/^/| /' conftest.$ac_ext >&5
11004
98418dba 11005ac_cv_lib_mail_maillock=no
ba4481b5 11006fi
503d2be0 11007rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 11008LIBS=$ac_check_lib_save_LIBS
ba4481b5 11009fi
c0d27fcc 11010echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
11011echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
11012if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 11013 cat >>confdefs.h <<_ACEOF
98418dba 11014#define HAVE_LIBMAIL 1
c0d27fcc 11015_ACEOF
ba4481b5 11016
98418dba 11017 LIBS="-lmail $LIBS"
ba4481b5 11018
98418dba 11019fi
ba4481b5 11020
c0d27fcc
MR
11021
11022echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
11023echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
11024if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 11025 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11026else
503d2be0 11027 ac_check_lib_save_LIBS=$LIBS
98418dba 11028LIBS="-llockfile $LIBS"
503d2be0 11029cat >conftest.$ac_ext <<_ACEOF
793fa0d7 11030#line $LINENO "configure"
19650fd6
AS
11031/* confdefs.h. */
11032_ACEOF
11033cat confdefs.h >>conftest.$ac_ext
11034cat >>conftest.$ac_ext <<_ACEOF
11035/* end confdefs.h. */
503d2be0 11036
ba4481b5 11037/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11038#ifdef __cplusplus
11039extern "C"
11040#endif
ba4481b5 11041/* We use char because int might match the return type of a gcc2
503d2be0 11042 builtin and then its argument prototype would still apply. */
98418dba 11043char maillock ();
503d2be0
AS
11044int
11045main ()
11046{
98418dba 11047maillock ();
503d2be0
AS
11048 ;
11049 return 0;
11050}
11051_ACEOF
11052rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11053if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11054 (eval $ac_link) 2>&5
11055 ac_status=$?
c0d27fcc 11056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11057 (exit $ac_status); } &&
793fa0d7 11058 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11060 (eval $ac_try) 2>&5
11061 ac_status=$?
c0d27fcc 11062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11063 (exit $ac_status); }; }; then
98418dba 11064 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
11065else
11066 echo "$as_me: failed program was:" >&5
19650fd6
AS
11067sed 's/^/| /' conftest.$ac_ext >&5
11068
98418dba
CW
11069ac_cv_lib_lockfile_maillock=no
11070fi
11071rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11072LIBS=$ac_check_lib_save_LIBS
11073fi
c0d27fcc 11074echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
11075echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
11076if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 11077 cat >>confdefs.h <<_ACEOF
98418dba 11078#define HAVE_LIBLOCKFILE 1
c0d27fcc 11079_ACEOF
98418dba
CW
11080
11081 LIBS="-llockfile $LIBS"
11082
11083fi
11084
11085# If we have the shared liblockfile, assume we must use it for mail
11086# locking (e.g. Debian). If we couldn't link against liblockfile
11087# (no liblockfile.a installed), ensure that we don't need to.
11088if test "$ac_cv_lib_lockfile_maillock" = no; then
11089 # Extract the first word of "liblockfile.so", so it can be a program name with args.
11090set dummy liblockfile.so; ac_word=$2
c0d27fcc 11091echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
11092echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11093if test "${ac_cv_prog_liblockfile+set}" = set; then
11094 echo $ECHO_N "(cached) $ECHO_C" >&6
11095else
11096 if test -n "$liblockfile"; then
11097 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
11098else
c0d27fcc 11099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
11100as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
11101for as_dir in $as_dummy
c0d27fcc
MR
11102do
11103 IFS=$as_save_IFS
11104 test -z "$as_dir" && as_dir=.
11105 for ac_exec_ext in '' $ac_executable_extensions; do
11106 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11107 ac_cv_prog_liblockfile="yes"
11108 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11109 break 2
11110 fi
11111done
98418dba
CW
11112done
11113
11114 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 11115fi
503d2be0 11116fi
98418dba
CW
11117liblockfile=$ac_cv_prog_liblockfile
11118if test -n "$liblockfile"; then
c0d27fcc 11119 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
11120echo "${ECHO_T}$liblockfile" >&6
11121else
c0d27fcc 11122 echo "$as_me:$LINENO: result: no" >&5
98418dba 11123echo "${ECHO_T}no" >&6
ba4481b5
DL
11124fi
11125
98418dba 11126 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 11127 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
11128This probably means that movemail could lose mail.
11129There may be a \`development' package to install containing liblockfile." >&5
11130echo "$as_me: error: Shared liblockfile found but can't link against it.
11131This probably means that movemail could lose mail.
11132There may be a \`development' package to install containing liblockfile." >&2;}
11133 { (exit 1); exit 1; }; }
98418dba 11134 else :
55597d70 11135 fi
98418dba 11136fi
503d2be0 11137
98418dba
CW
11138for ac_func in touchlock
11139do
11140as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 11141echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
11142echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11143if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 11144 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 11145else
98418dba 11146 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 11147#line $LINENO "configure"
19650fd6
AS
11148/* confdefs.h. */
11149_ACEOF
11150cat confdefs.h >>conftest.$ac_ext
11151cat >>conftest.$ac_ext <<_ACEOF
11152/* end confdefs.h. */
98418dba 11153/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
11154 which can conflict with char $ac_func (); below.
11155 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11156 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
11157#ifdef __STDC__
11158# include <limits.h>
11159#else
11160# include <assert.h>
11161#endif
457b792c 11162/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11163#ifdef __cplusplus
11164extern "C"
19650fd6 11165{
503d2be0 11166#endif
457b792c 11167/* We use char because int might match the return type of a gcc2
503d2be0 11168 builtin and then its argument prototype would still apply. */
98418dba 11169char $ac_func ();
98418dba
CW
11170/* The GNU C library defines this for functions which it implements
11171 to always fail with ENOSYS. Some functions are actually named
11172 something starting with __ and the normal name is an alias. */
11173#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11174choke me
11175#else
19650fd6
AS
11176char (*f) () = $ac_func;
11177#endif
11178#ifdef __cplusplus
11179}
cd958eb3
MB
11180#endif
11181
19650fd6
AS
11182int
11183main ()
11184{
11185return f != $ac_func;
503d2be0
AS
11186 ;
11187 return 0;
11188}
11189_ACEOF
11190rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11191if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11192 (eval $ac_link) 2>&5
11193 ac_status=$?
c0d27fcc 11194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11195 (exit $ac_status); } &&
793fa0d7 11196 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11198 (eval $ac_try) 2>&5
11199 ac_status=$?
c0d27fcc 11200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11201 (exit $ac_status); }; }; then
98418dba 11202 eval "$as_ac_var=yes"
503d2be0
AS
11203else
11204 echo "$as_me: failed program was:" >&5
19650fd6
AS
11205sed 's/^/| /' conftest.$ac_ext >&5
11206
98418dba 11207eval "$as_ac_var=no"
503d2be0
AS
11208fi
11209rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
503d2be0 11210fi
c0d27fcc 11211echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
11212echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11213if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11214 cat >>confdefs.h <<_ACEOF
98418dba 11215#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11216_ACEOF
457b792c 11217
457b792c 11218fi
98418dba 11219done
457b792c 11220
c0d27fcc 11221
98418dba
CW
11222for ac_header in maillock.h
11223do
11224as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
11225if eval "test \"\${$as_ac_Header+set}\" = set"; then
11226 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
11227echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11228if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 11229 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11230fi
11231echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11232echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 11233else
c0d27fcc
MR
11234 # Is the header compilable?
11235echo "$as_me:$LINENO: checking $ac_header usability" >&5
11236echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11237cat >conftest.$ac_ext <<_ACEOF
793fa0d7 11238#line $LINENO "configure"
19650fd6
AS
11239/* confdefs.h. */
11240_ACEOF
11241cat confdefs.h >>conftest.$ac_ext
11242cat >>conftest.$ac_ext <<_ACEOF
11243/* end confdefs.h. */
c0d27fcc
MR
11244$ac_includes_default
11245#include <$ac_header>
11246_ACEOF
11247rm -f conftest.$ac_objext
11248if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11249 (eval $ac_compile) 2>&5
11250 ac_status=$?
11251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11252 (exit $ac_status); } &&
793fa0d7 11253 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11255 (eval $ac_try) 2>&5
11256 ac_status=$?
11257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11258 (exit $ac_status); }; }; then
11259 ac_header_compiler=yes
11260else
11261 echo "$as_me: failed program was:" >&5
19650fd6
AS
11262sed 's/^/| /' conftest.$ac_ext >&5
11263
c0d27fcc
MR
11264ac_header_compiler=no
11265fi
11266rm -f conftest.$ac_objext conftest.$ac_ext
11267echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11268echo "${ECHO_T}$ac_header_compiler" >&6
11269
11270# Is the header present?
11271echo "$as_me:$LINENO: checking $ac_header presence" >&5
11272echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11273cat >conftest.$ac_ext <<_ACEOF
793fa0d7 11274#line $LINENO "configure"
19650fd6
AS
11275/* confdefs.h. */
11276_ACEOF
11277cat confdefs.h >>conftest.$ac_ext
11278cat >>conftest.$ac_ext <<_ACEOF
11279/* end confdefs.h. */
98418dba 11280#include <$ac_header>
503d2be0 11281_ACEOF
c0d27fcc 11282if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 11283 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 11284 ac_status=$?
6bae0ccf 11285 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11286 rm -f conftest.er1
11287 cat conftest.err >&5
c0d27fcc 11288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11289 (exit $ac_status); } >/dev/null; then
11290 if test -s conftest.err; then
11291 ac_cpp_err=$ac_c_preproc_warn_flag
11292 else
11293 ac_cpp_err=
11294 fi
503d2be0 11295else
98418dba 11296 ac_cpp_err=yes
503d2be0 11297fi
98418dba 11298if test -z "$ac_cpp_err"; then
c0d27fcc 11299 ac_header_preproc=yes
98418dba
CW
11300else
11301 echo "$as_me: failed program was:" >&5
19650fd6
AS
11302sed 's/^/| /' conftest.$ac_ext >&5
11303
c0d27fcc 11304 ac_header_preproc=no
503d2be0 11305fi
98418dba 11306rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11307echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11308echo "${ECHO_T}$ac_header_preproc" >&6
11309
11310# So? What about this header?
11311case $ac_header_compiler:$ac_header_preproc in
11312 yes:no )
11313 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11314echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
11315 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11316echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11317 (
11318 cat <<\_ASBOX
11319## ------------------------------------ ##
11320## Report this to bug-autoconf@gnu.org. ##
11321## ------------------------------------ ##
11322_ASBOX
11323 ) |
11324 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 11325 ;;
c0d27fcc
MR
11326 no:yes )
11327 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11328echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
11329 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11330echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 11331 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 11332echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
11333 (
11334 cat <<\_ASBOX
793fa0d7
DL
11335## ------------------------------------ ##
11336## Report this to bug-autoconf@gnu.org. ##
11337## ------------------------------------ ##
19650fd6
AS
11338_ASBOX
11339 ) |
11340 sed "s/^/$as_me: WARNING: /" >&2
11341 ;;
c0d27fcc
MR
11342esac
11343echo "$as_me:$LINENO: checking for $ac_header" >&5
11344echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11345if eval "test \"\${$as_ac_Header+set}\" = set"; then
11346 echo $ECHO_N "(cached) $ECHO_C" >&6
11347else
793fa0d7 11348 eval "$as_ac_Header=$ac_header_preproc"
ba4481b5 11349fi
c0d27fcc 11350echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 11351echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
11352
11353fi
98418dba 11354if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 11355 cat >>confdefs.h <<_ACEOF
98418dba 11356#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 11357_ACEOF
48d4b120 11358
ba4481b5 11359fi
c0d27fcc 11360
98418dba
CW
11361done
11362
c0d27fcc
MR
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
22044edf
DL
11418
11419
c0d27fcc 11420
b0e44248
RB
11421
11422
973a76b1
DL
11423
11424
11425
cd958eb3 11426
25ca0bca 11427
28127e47 11428
c0d27fcc
MR
11429
11430
98418dba
CW
11431for ac_func in gethostname getdomainname dup2 \
11432rename closedir mkdir rmdir sysinfo \
11433random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
11434strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 11435utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
11436__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
11437sendto recvfrom getsockopt setsockopt getsockname getpeername \
b0e44248 11438gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
28127e47 11439memset memcmp memmove difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
11440do
11441as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 11442echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
11443echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11444if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 11445 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11446else
503d2be0 11447 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 11448#line $LINENO "configure"
19650fd6
AS
11449/* confdefs.h. */
11450_ACEOF
11451cat confdefs.h >>conftest.$ac_ext
11452cat >>conftest.$ac_ext <<_ACEOF
11453/* end confdefs.h. */
98418dba 11454/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
11455 which can conflict with char $ac_func (); below.
11456 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11457 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
11458#ifdef __STDC__
11459# include <limits.h>
11460#else
11461# include <assert.h>
11462#endif
ba4481b5 11463/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11464#ifdef __cplusplus
11465extern "C"
19650fd6 11466{
503d2be0 11467#endif
ba4481b5 11468/* We use char because int might match the return type of a gcc2
503d2be0 11469 builtin and then its argument prototype would still apply. */
98418dba 11470char $ac_func ();
98418dba
CW
11471/* The GNU C library defines this for functions which it implements
11472 to always fail with ENOSYS. Some functions are actually named
11473 something starting with __ and the normal name is an alias. */
11474#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11475choke me
11476#else
19650fd6
AS
11477char (*f) () = $ac_func;
11478#endif
11479#ifdef __cplusplus
11480}
98418dba
CW
11481#endif
11482
19650fd6
AS
11483int
11484main ()
11485{
11486return f != $ac_func;
503d2be0
AS
11487 ;
11488 return 0;
11489}
11490_ACEOF
11491rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11492if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11493 (eval $ac_link) 2>&5
11494 ac_status=$?
c0d27fcc 11495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11496 (exit $ac_status); } &&
793fa0d7 11497 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11499 (eval $ac_try) 2>&5
11500 ac_status=$?
c0d27fcc 11501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11502 (exit $ac_status); }; }; then
98418dba 11503 eval "$as_ac_var=yes"
503d2be0
AS
11504else
11505 echo "$as_me: failed program was:" >&5
19650fd6
AS
11506sed 's/^/| /' conftest.$ac_ext >&5
11507
98418dba 11508eval "$as_ac_var=no"
503d2be0
AS
11509fi
11510rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 11511fi
c0d27fcc 11512echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
11513echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11514if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11515 cat >>confdefs.h <<_ACEOF
98418dba 11516#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11517_ACEOF
ba4481b5 11518
ba4481b5 11519fi
98418dba 11520done
ba4481b5 11521
c0d27fcc
MR
11522
11523
98418dba
CW
11524for ac_header in sys/un.h
11525do
11526as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
11527if eval "test \"\${$as_ac_Header+set}\" = set"; then
11528 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
11529echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11530if eval "test \"\${$as_ac_Header+set}\" = set"; then
11531 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11532fi
11533echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11534echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 11535else
c0d27fcc
MR
11536 # Is the header compilable?
11537echo "$as_me:$LINENO: checking $ac_header usability" >&5
11538echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11539cat >conftest.$ac_ext <<_ACEOF
793fa0d7 11540#line $LINENO "configure"
19650fd6
AS
11541/* confdefs.h. */
11542_ACEOF
11543cat confdefs.h >>conftest.$ac_ext
11544cat >>conftest.$ac_ext <<_ACEOF
11545/* end confdefs.h. */
c0d27fcc
MR
11546$ac_includes_default
11547#include <$ac_header>
11548_ACEOF
11549rm -f conftest.$ac_objext
11550if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11551 (eval $ac_compile) 2>&5
11552 ac_status=$?
11553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11554 (exit $ac_status); } &&
793fa0d7 11555 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11557 (eval $ac_try) 2>&5
11558 ac_status=$?
11559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11560 (exit $ac_status); }; }; then
11561 ac_header_compiler=yes
11562else
11563 echo "$as_me: failed program was:" >&5
19650fd6
AS
11564sed 's/^/| /' conftest.$ac_ext >&5
11565
c0d27fcc
MR
11566ac_header_compiler=no
11567fi
11568rm -f conftest.$ac_objext conftest.$ac_ext
11569echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11570echo "${ECHO_T}$ac_header_compiler" >&6
11571
11572# Is the header present?
11573echo "$as_me:$LINENO: checking $ac_header presence" >&5
11574echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11575cat >conftest.$ac_ext <<_ACEOF
793fa0d7 11576#line $LINENO "configure"
19650fd6
AS
11577/* confdefs.h. */
11578_ACEOF
11579cat confdefs.h >>conftest.$ac_ext
11580cat >>conftest.$ac_ext <<_ACEOF
11581/* end confdefs.h. */
98418dba 11582#include <$ac_header>
503d2be0 11583_ACEOF
c0d27fcc 11584if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11585 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11586 ac_status=$?
6bae0ccf 11587 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11588 rm -f conftest.er1
11589 cat conftest.err >&5
c0d27fcc 11590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11591 (exit $ac_status); } >/dev/null; then
11592 if test -s conftest.err; then
11593 ac_cpp_err=$ac_c_preproc_warn_flag
11594 else
11595 ac_cpp_err=
11596 fi
11597else
11598 ac_cpp_err=yes
11599fi
11600if test -z "$ac_cpp_err"; then
c0d27fcc 11601 ac_header_preproc=yes
ba4481b5 11602else
503d2be0 11603 echo "$as_me: failed program was:" >&5
19650fd6
AS
11604sed 's/^/| /' conftest.$ac_ext >&5
11605
c0d27fcc 11606 ac_header_preproc=no
ba4481b5 11607fi
503d2be0 11608rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11609echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11610echo "${ECHO_T}$ac_header_preproc" >&6
11611
11612# So? What about this header?
11613case $ac_header_compiler:$ac_header_preproc in
11614 yes:no )
11615 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11616echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
11617 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11618echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11619 (
11620 cat <<\_ASBOX
11621## ------------------------------------ ##
11622## Report this to bug-autoconf@gnu.org. ##
11623## ------------------------------------ ##
11624_ASBOX
11625 ) |
11626 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 11627 ;;
c0d27fcc
MR
11628 no:yes )
11629 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11630echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
11631 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11632echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 11633 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 11634echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
11635 (
11636 cat <<\_ASBOX
793fa0d7
DL
11637## ------------------------------------ ##
11638## Report this to bug-autoconf@gnu.org. ##
11639## ------------------------------------ ##
19650fd6
AS
11640_ASBOX
11641 ) |
11642 sed "s/^/$as_me: WARNING: /" >&2
11643 ;;
c0d27fcc
MR
11644esac
11645echo "$as_me:$LINENO: checking for $ac_header" >&5
11646echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11647if eval "test \"\${$as_ac_Header+set}\" = set"; then
11648 echo $ECHO_N "(cached) $ECHO_C" >&6
11649else
793fa0d7 11650 eval "$as_ac_Header=$ac_header_preproc"
ba4481b5 11651fi
c0d27fcc 11652echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 11653echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
11654
11655fi
925c2f3f 11656if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 11657 cat >>confdefs.h <<_ACEOF
925c2f3f 11658#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 11659_ACEOF
503d2be0 11660
925c2f3f 11661fi
c0d27fcc 11662
925c2f3f
EZ
11663done
11664
c0d27fcc
MR
11665
11666
11667
793fa0d7 11668for ac_header in sys/time.h unistd.h
925c2f3f
EZ
11669do
11670as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
11671if eval "test \"\${$as_ac_Header+set}\" = set"; then
11672 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
11673echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11674if eval "test \"\${$as_ac_Header+set}\" = set"; then
11675 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11676fi
11677echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11678echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 11679else
c0d27fcc
MR
11680 # Is the header compilable?
11681echo "$as_me:$LINENO: checking $ac_header usability" >&5
11682echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11683cat >conftest.$ac_ext <<_ACEOF
793fa0d7 11684#line $LINENO "configure"
19650fd6
AS
11685/* confdefs.h. */
11686_ACEOF
11687cat confdefs.h >>conftest.$ac_ext
11688cat >>conftest.$ac_ext <<_ACEOF
11689/* end confdefs.h. */
c0d27fcc
MR
11690$ac_includes_default
11691#include <$ac_header>
11692_ACEOF
11693rm -f conftest.$ac_objext
11694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11695 (eval $ac_compile) 2>&5
11696 ac_status=$?
11697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11698 (exit $ac_status); } &&
793fa0d7 11699 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11701 (eval $ac_try) 2>&5
11702 ac_status=$?
11703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11704 (exit $ac_status); }; }; then
11705 ac_header_compiler=yes
11706else
11707 echo "$as_me: failed program was:" >&5
19650fd6
AS
11708sed 's/^/| /' conftest.$ac_ext >&5
11709
c0d27fcc
MR
11710ac_header_compiler=no
11711fi
11712rm -f conftest.$ac_objext conftest.$ac_ext
11713echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11714echo "${ECHO_T}$ac_header_compiler" >&6
11715
11716# Is the header present?
11717echo "$as_me:$LINENO: checking $ac_header presence" >&5
11718echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11719cat >conftest.$ac_ext <<_ACEOF
793fa0d7 11720#line $LINENO "configure"
19650fd6
AS
11721/* confdefs.h. */
11722_ACEOF
11723cat confdefs.h >>conftest.$ac_ext
11724cat >>conftest.$ac_ext <<_ACEOF
11725/* end confdefs.h. */
98418dba 11726#include <$ac_header>
503d2be0 11727_ACEOF
c0d27fcc 11728if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11729 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11730 ac_status=$?
6bae0ccf 11731 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11732 rm -f conftest.er1
11733 cat conftest.err >&5
c0d27fcc 11734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11735 (exit $ac_status); } >/dev/null; then
11736 if test -s conftest.err; then
11737 ac_cpp_err=$ac_c_preproc_warn_flag
11738 else
11739 ac_cpp_err=
11740 fi
11741else
11742 ac_cpp_err=yes
11743fi
11744if test -z "$ac_cpp_err"; then
c0d27fcc 11745 ac_header_preproc=yes
98418dba
CW
11746else
11747 echo "$as_me: failed program was:" >&5
19650fd6
AS
11748sed 's/^/| /' conftest.$ac_ext >&5
11749
c0d27fcc 11750 ac_header_preproc=no
98418dba
CW
11751fi
11752rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11753echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11754echo "${ECHO_T}$ac_header_preproc" >&6
11755
11756# So? What about this header?
11757case $ac_header_compiler:$ac_header_preproc in
11758 yes:no )
11759 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11760echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
11761 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11762echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11763 (
11764 cat <<\_ASBOX
11765## ------------------------------------ ##
11766## Report this to bug-autoconf@gnu.org. ##
11767## ------------------------------------ ##
11768_ASBOX
11769 ) |
11770 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 11771 ;;
c0d27fcc
MR
11772 no:yes )
11773 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11774echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
11775 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11776echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 11777 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 11778echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
11779 (
11780 cat <<\_ASBOX
793fa0d7
DL
11781## ------------------------------------ ##
11782## Report this to bug-autoconf@gnu.org. ##
11783## ------------------------------------ ##
19650fd6
AS
11784_ASBOX
11785 ) |
11786 sed "s/^/$as_me: WARNING: /" >&2
11787 ;;
c0d27fcc
MR
11788esac
11789echo "$as_me:$LINENO: checking for $ac_header" >&5
11790echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11791if eval "test \"\${$as_ac_Header+set}\" = set"; then
11792 echo $ECHO_N "(cached) $ECHO_C" >&6
11793else
793fa0d7 11794 eval "$as_ac_Header=$ac_header_preproc"
ffe36136 11795fi
c0d27fcc 11796echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 11797echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
11798
11799fi
98418dba 11800if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 11801 cat >>confdefs.h <<_ACEOF
98418dba 11802#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 11803_ACEOF
98418dba
CW
11804
11805fi
c0d27fcc 11806
98418dba
CW
11807done
11808
c0d27fcc 11809
98418dba
CW
11810for ac_func in alarm
11811do
11812as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 11813echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
11814echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11815if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 11816 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11817else
98418dba 11818 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 11819#line $LINENO "configure"
19650fd6
AS
11820/* confdefs.h. */
11821_ACEOF
11822cat confdefs.h >>conftest.$ac_ext
11823cat >>conftest.$ac_ext <<_ACEOF
11824/* end confdefs.h. */
98418dba 11825/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
11826 which can conflict with char $ac_func (); below.
11827 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11828 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
11829#ifdef __STDC__
11830# include <limits.h>
11831#else
11832# include <assert.h>
11833#endif
ba4481b5 11834/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11835#ifdef __cplusplus
11836extern "C"
19650fd6 11837{
503d2be0 11838#endif
ba4481b5 11839/* We use char because int might match the return type of a gcc2
503d2be0 11840 builtin and then its argument prototype would still apply. */
98418dba 11841char $ac_func ();
98418dba
CW
11842/* The GNU C library defines this for functions which it implements
11843 to always fail with ENOSYS. Some functions are actually named
11844 something starting with __ and the normal name is an alias. */
11845#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11846choke me
11847#else
19650fd6
AS
11848char (*f) () = $ac_func;
11849#endif
11850#ifdef __cplusplus
11851}
98418dba
CW
11852#endif
11853
19650fd6
AS
11854int
11855main ()
11856{
11857return f != $ac_func;
503d2be0
AS
11858 ;
11859 return 0;
11860}
11861_ACEOF
11862rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11863if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11864 (eval $ac_link) 2>&5
11865 ac_status=$?
c0d27fcc 11866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11867 (exit $ac_status); } &&
793fa0d7 11868 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11870 (eval $ac_try) 2>&5
11871 ac_status=$?
c0d27fcc 11872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11873 (exit $ac_status); }; }; then
98418dba 11874 eval "$as_ac_var=yes"
503d2be0
AS
11875else
11876 echo "$as_me: failed program was:" >&5
19650fd6
AS
11877sed 's/^/| /' conftest.$ac_ext >&5
11878
98418dba 11879eval "$as_ac_var=no"
503d2be0
AS
11880fi
11881rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ffe36136 11882fi
c0d27fcc 11883echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
11884echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11885if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11886 cat >>confdefs.h <<_ACEOF
98418dba 11887#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11888_ACEOF
ffe36136 11889
ba4481b5 11890fi
98418dba 11891done
ba4481b5 11892
c0d27fcc 11893echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
11894echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
11895if test "${ac_cv_func_working_mktime+set}" = set; then
11896 echo $ECHO_N "(cached) $ECHO_C" >&6
11897else
11898 if test "$cross_compiling" = yes; then
11899 ac_cv_func_working_mktime=no
11900else
11901 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 11902#line $LINENO "configure"
19650fd6
AS
11903/* confdefs.h. */
11904_ACEOF
11905cat confdefs.h >>conftest.$ac_ext
11906cat >>conftest.$ac_ext <<_ACEOF
11907/* end confdefs.h. */
98418dba
CW
11908/* Test program from Paul Eggert and Tony Leneis. */
11909#if TIME_WITH_SYS_TIME
11910# include <sys/time.h>
11911# include <time.h>
11912#else
11913# if HAVE_SYS_TIME_H
11914# include <sys/time.h>
11915# else
11916# include <time.h>
11917# endif
11918#endif
ba4481b5 11919
98418dba
CW
11920#if HAVE_UNISTD_H
11921# include <unistd.h>
11922#endif
ba4481b5 11923
98418dba
CW
11924#if !HAVE_ALARM
11925# define alarm(X) /* empty */
11926#endif
df645f7c 11927
98418dba
CW
11928/* Work around redefinition to rpl_putenv by other config tests. */
11929#undef putenv
df645f7c 11930
98418dba 11931static time_t time_t_max;
df645f7c 11932
98418dba 11933/* Values we'll use to set the TZ environment variable. */
793fa0d7
DL
11934static const char *const tz_strings[] = {
11935 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
11936 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
11937};
11938#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 11939
98418dba
CW
11940/* Fail if mktime fails to convert a date in the spring-forward gap.
11941 Based on a problem report from Andreas Jaeger. */
11942static void
11943spring_forward_gap ()
11944{
11945 /* glibc (up to about 1998-10-07) failed this test. */
11946 struct tm tm;
11947
11948 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11949 instead of "TZ=America/Vancouver" in order to detect the bug even
11950 on systems that don't support the Olson extension, or don't have the
11951 full zoneinfo tables installed. */
11952 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
11953
11954 tm.tm_year = 98;
11955 tm.tm_mon = 3;
11956 tm.tm_mday = 5;
11957 tm.tm_hour = 2;
11958 tm.tm_min = 0;
11959 tm.tm_sec = 0;
11960 tm.tm_isdst = -1;
11961 if (mktime (&tm) == (time_t)-1)
11962 exit (1);
11963}
11964
11965static void
793fa0d7 11966mktime_test (now)
98418dba
CW
11967 time_t now;
11968{
11969 struct tm *lt;
11970 if ((lt = localtime (&now)) && mktime (lt) != now)
11971 exit (1);
793fa0d7
DL
11972 now = time_t_max - now;
11973 if ((lt = localtime (&now)) && mktime (lt) != now)
11974 exit (1);
98418dba
CW
11975}
11976
11977static void
11978irix_6_4_bug ()
11979{
11980 /* Based on code from Ariel Faigon. */
11981 struct tm tm;
11982 tm.tm_year = 96;
11983 tm.tm_mon = 3;
11984 tm.tm_mday = 0;
11985 tm.tm_hour = 0;
11986 tm.tm_min = 0;
11987 tm.tm_sec = 0;
11988 tm.tm_isdst = -1;
11989 mktime (&tm);
11990 if (tm.tm_mon != 2 || tm.tm_mday != 31)
11991 exit (1);
11992}
11993
11994static void
11995bigtime_test (j)
11996 int j;
11997{
11998 struct tm tm;
11999 time_t now;
12000 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
12001 now = mktime (&tm);
12002 if (now != (time_t) -1)
12003 {
12004 struct tm *lt = localtime (&now);
12005 if (! (lt
12006 && lt->tm_year == tm.tm_year
12007 && lt->tm_mon == tm.tm_mon
12008 && lt->tm_mday == tm.tm_mday
12009 && lt->tm_hour == tm.tm_hour
12010 && lt->tm_min == tm.tm_min
12011 && lt->tm_sec == tm.tm_sec
12012 && lt->tm_yday == tm.tm_yday
12013 && lt->tm_wday == tm.tm_wday
12014 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
12015 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
12016 exit (1);
12017 }
12018}
12019
12020int
12021main ()
12022{
12023 time_t t, delta;
12024 int i, j;
12025
12026 /* This test makes some buggy mktime implementations loop.
12027 Give up after 60 seconds; a mktime slower than that
12028 isn't worth using anyway. */
12029 alarm (60);
12030
12031 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
12032 continue;
12033 time_t_max--;
12034 delta = time_t_max / 997; /* a suitable prime number */
12035 for (i = 0; i < N_STRINGS; i++)
12036 {
12037 if (tz_strings[i])
12038 putenv (tz_strings[i]);
503d2be0 12039
98418dba
CW
12040 for (t = 0; t <= time_t_max - delta; t += delta)
12041 mktime_test (t);
793fa0d7
DL
12042 mktime_test ((time_t) 60 * 60);
12043 mktime_test ((time_t) 60 * 60 * 24);
98418dba
CW
12044
12045 for (j = 1; 0 < j; j *= 2)
793fa0d7 12046 bigtime_test (j);
98418dba
CW
12047 bigtime_test (j - 1);
12048 }
12049 irix_6_4_bug ();
12050 spring_forward_gap ();
12051 exit (0);
503d2be0
AS
12052}
12053_ACEOF
98418dba 12054rm -f conftest$ac_exeext
c0d27fcc 12055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12056 (eval $ac_link) 2>&5
12057 ac_status=$?
c0d27fcc 12058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12059 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 12060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12061 (eval $ac_try) 2>&5
12062 ac_status=$?
c0d27fcc 12063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12064 (exit $ac_status); }; }; then
98418dba 12065 ac_cv_func_working_mktime=yes
503d2be0 12066else
98418dba
CW
12067 echo "$as_me: program exited with status $ac_status" >&5
12068echo "$as_me: failed program was:" >&5
19650fd6
AS
12069sed 's/^/| /' conftest.$ac_ext >&5
12070
c0d27fcc 12071( exit $ac_status )
98418dba 12072ac_cv_func_working_mktime=no
503d2be0 12073fi
851a3062 12074rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 12075fi
ba4481b5 12076fi
c0d27fcc 12077echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
12078echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
12079if test $ac_cv_func_working_mktime = no; then
12080 LIBOBJS="$LIBOBJS mktime.$ac_objext"
ba4481b5
DL
12081fi
12082
98418dba 12083if test "$ac_cv_func_working_mktime" = no; then
b936fae4 12084
c0d27fcc 12085cat >>confdefs.h <<\_ACEOF
98418dba 12086#define BROKEN_MKTIME 1
c0d27fcc 12087_ACEOF
ba4481b5 12088
ba4481b5 12089fi
503d2be0 12090
98418dba
CW
12091ac_have_func=no # yes means we've found a way to get the load average.
12092
6bae0ccf
DL
12093# Make sure getloadavg.c is where it belongs, at configure-time.
12094test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
12095 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
12096echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
12097 { (exit 1); exit 1; }; }
12098
98418dba
CW
12099ac_save_LIBS=$LIBS
12100
12101# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 12102(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
12103echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
12104if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 12105 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12106else
503d2be0 12107 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 12108#line $LINENO "configure"
19650fd6
AS
12109/* confdefs.h. */
12110_ACEOF
12111cat confdefs.h >>conftest.$ac_ext
12112cat >>conftest.$ac_ext <<_ACEOF
12113/* end confdefs.h. */
98418dba 12114/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
12115 which can conflict with char getloadavg (); below.
12116 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12117 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
12118#ifdef __STDC__
12119# include <limits.h>
12120#else
12121# include <assert.h>
12122#endif
ba4481b5 12123/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12124#ifdef __cplusplus
12125extern "C"
19650fd6 12126{
503d2be0 12127#endif
ba4481b5 12128/* We use char because int might match the return type of a gcc2
503d2be0 12129 builtin and then its argument prototype would still apply. */
98418dba 12130char getloadavg ();
98418dba
CW
12131/* The GNU C library defines this for functions which it implements
12132 to always fail with ENOSYS. Some functions are actually named
12133 something starting with __ and the normal name is an alias. */
12134#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
12135choke me
12136#else
19650fd6
AS
12137char (*f) () = getloadavg;
12138#endif
12139#ifdef __cplusplus
12140}
cd958eb3
MB
12141#endif
12142
19650fd6
AS
12143int
12144main ()
12145{
12146return f != getloadavg;
503d2be0
AS
12147 ;
12148 return 0;
12149}
12150_ACEOF
12151rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12152if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12153 (eval $ac_link) 2>&5
12154 ac_status=$?
c0d27fcc 12155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12156 (exit $ac_status); } &&
793fa0d7 12157 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12159 (eval $ac_try) 2>&5
12160 ac_status=$?
c0d27fcc 12161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12162 (exit $ac_status); }; }; then
98418dba 12163 ac_cv_func_getloadavg=yes
503d2be0
AS
12164else
12165 echo "$as_me: failed program was:" >&5
19650fd6
AS
12166sed 's/^/| /' conftest.$ac_ext >&5
12167
98418dba 12168ac_cv_func_getloadavg=no
503d2be0
AS
12169fi
12170rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 12171fi
c0d27fcc 12172echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
12173echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
12174if test $ac_cv_func_getloadavg = yes; then
12175 exit 0
12176else
12177 exit 1
ba4481b5 12178fi
98418dba 12179) && ac_have_func=yes
ba4481b5 12180
98418dba 12181# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 12182
98418dba
CW
12183for ac_func in pstat_getdynamic
12184do
12185as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 12186echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
12187echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12188if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 12189 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12190else
503d2be0 12191 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 12192#line $LINENO "configure"
19650fd6
AS
12193/* confdefs.h. */
12194_ACEOF
12195cat confdefs.h >>conftest.$ac_ext
12196cat >>conftest.$ac_ext <<_ACEOF
12197/* end confdefs.h. */
98418dba 12198/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
12199 which can conflict with char $ac_func (); below.
12200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12201 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
12202#ifdef __STDC__
12203# include <limits.h>
12204#else
12205# include <assert.h>
12206#endif
ba4481b5 12207/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12208#ifdef __cplusplus
12209extern "C"
19650fd6 12210{
503d2be0 12211#endif
ba4481b5 12212/* We use char because int might match the return type of a gcc2
503d2be0 12213 builtin and then its argument prototype would still apply. */
98418dba 12214char $ac_func ();
98418dba
CW
12215/* The GNU C library defines this for functions which it implements
12216 to always fail with ENOSYS. Some functions are actually named
12217 something starting with __ and the normal name is an alias. */
12218#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12219choke me
12220#else
19650fd6
AS
12221char (*f) () = $ac_func;
12222#endif
12223#ifdef __cplusplus
12224}
98418dba
CW
12225#endif
12226
19650fd6
AS
12227int
12228main ()
12229{
12230return f != $ac_func;
98418dba
CW
12231 ;
12232 return 0;
12233}
f21fadcc 12234_ACEOF
98418dba 12235rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12236if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 12237 (eval $ac_link) 2>&5
f21fadcc 12238 ac_status=$?
c0d27fcc 12239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12240 (exit $ac_status); } &&
793fa0d7 12241 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
12243 (eval $ac_try) 2>&5
12244 ac_status=$?
c0d27fcc 12245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12246 (exit $ac_status); }; }; then
12247 eval "$as_ac_var=yes"
f21fadcc
JD
12248else
12249 echo "$as_me: failed program was:" >&5
19650fd6
AS
12250sed 's/^/| /' conftest.$ac_ext >&5
12251
98418dba 12252eval "$as_ac_var=no"
f21fadcc 12253fi
98418dba 12254rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
f21fadcc 12255fi
c0d27fcc 12256echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
12257echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12258if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 12259 cat >>confdefs.h <<_ACEOF
98418dba 12260#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 12261_ACEOF
98418dba
CW
12262
12263fi
12264done
12265
c0d27fcc 12266
98418dba
CW
12267# Solaris has libkstat which does not require root.
12268
c0d27fcc 12269echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
12270echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
12271if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
12272 echo $ECHO_N "(cached) $ECHO_C" >&6
12273else
12274 ac_check_lib_save_LIBS=$LIBS
98418dba 12275LIBS="-lkstat $LIBS"
f21fadcc 12276cat >conftest.$ac_ext <<_ACEOF
793fa0d7 12277#line $LINENO "configure"
19650fd6
AS
12278/* confdefs.h. */
12279_ACEOF
12280cat confdefs.h >>conftest.$ac_ext
12281cat >>conftest.$ac_ext <<_ACEOF
12282/* end confdefs.h. */
f21fadcc
JD
12283
12284/* Override any gcc2 internal prototype to avoid an error. */
12285#ifdef __cplusplus
12286extern "C"
12287#endif
12288/* We use char because int might match the return type of a gcc2
12289 builtin and then its argument prototype would still apply. */
98418dba 12290char kstat_open ();
f21fadcc
JD
12291int
12292main ()
12293{
98418dba 12294kstat_open ();
f21fadcc
JD
12295 ;
12296 return 0;
12297}
12298_ACEOF
12299rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12300if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
f21fadcc
JD
12301 (eval $ac_link) 2>&5
12302 ac_status=$?
c0d27fcc 12303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 12304 (exit $ac_status); } &&
793fa0d7 12305 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
12307 (eval $ac_try) 2>&5
12308 ac_status=$?
c0d27fcc 12309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 12310 (exit $ac_status); }; }; then
98418dba 12311 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
12312else
12313 echo "$as_me: failed program was:" >&5
19650fd6
AS
12314sed 's/^/| /' conftest.$ac_ext >&5
12315
98418dba 12316ac_cv_lib_kstat_kstat_open=no
f21fadcc
JD
12317fi
12318rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12319LIBS=$ac_check_lib_save_LIBS
12320fi
c0d27fcc 12321echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
12322echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
12323if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 12324 cat >>confdefs.h <<_ACEOF
98418dba 12325#define HAVE_LIBKSTAT 1
c0d27fcc 12326_ACEOF
f21fadcc 12327
98418dba 12328 LIBS="-lkstat $LIBS"
f21fadcc 12329
f21fadcc
JD
12330fi
12331
98418dba
CW
12332test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
12333
12334# Some systems with -lutil have (and need) -lkvm as well, some do not.
12335# On Solaris, -lkvm requires nlist from -lelf, so check that first
12336# to get the right answer into the cache.
12337# For kstat on solaris, we need libelf to force the definition of SVR4 below.
12338if test $ac_have_func = no; then
c0d27fcc 12339 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
12340echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
12341if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 12342 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12343else
98418dba
CW
12344 ac_check_lib_save_LIBS=$LIBS
12345LIBS="-lelf $LIBS"
12346cat >conftest.$ac_ext <<_ACEOF
793fa0d7 12347#line $LINENO "configure"
19650fd6
AS
12348/* confdefs.h. */
12349_ACEOF
12350cat confdefs.h >>conftest.$ac_ext
12351cat >>conftest.$ac_ext <<_ACEOF
12352/* end confdefs.h. */
98418dba
CW
12353
12354/* Override any gcc2 internal prototype to avoid an error. */
12355#ifdef __cplusplus
12356extern "C"
12357#endif
12358/* We use char because int might match the return type of a gcc2
12359 builtin and then its argument prototype would still apply. */
12360char elf_begin ();
503d2be0
AS
12361int
12362main ()
12363{
98418dba 12364elf_begin ();
503d2be0
AS
12365 ;
12366 return 0;
12367}
12368_ACEOF
12369rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12370if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12371 (eval $ac_link) 2>&5
12372 ac_status=$?
c0d27fcc 12373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12374 (exit $ac_status); } &&
793fa0d7 12375 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12377 (eval $ac_try) 2>&5
12378 ac_status=$?
c0d27fcc 12379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12380 (exit $ac_status); }; }; then
98418dba 12381 ac_cv_lib_elf_elf_begin=yes
ba4481b5 12382else
503d2be0 12383 echo "$as_me: failed program was:" >&5
19650fd6
AS
12384sed 's/^/| /' conftest.$ac_ext >&5
12385
98418dba 12386ac_cv_lib_elf_elf_begin=no
ba4481b5 12387fi
503d2be0 12388rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 12389LIBS=$ac_check_lib_save_LIBS
ba4481b5 12390fi
c0d27fcc 12391echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
12392echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
12393if test $ac_cv_lib_elf_elf_begin = yes; then
12394 LIBS="-lelf $LIBS"
ba4481b5
DL
12395fi
12396
98418dba
CW
12397fi
12398if test $ac_have_func = no; then
c0d27fcc 12399 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
12400echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
12401if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 12402 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12403else
98418dba
CW
12404 ac_check_lib_save_LIBS=$LIBS
12405LIBS="-lkvm $LIBS"
12406cat >conftest.$ac_ext <<_ACEOF
793fa0d7 12407#line $LINENO "configure"
19650fd6
AS
12408/* confdefs.h. */
12409_ACEOF
12410cat confdefs.h >>conftest.$ac_ext
12411cat >>conftest.$ac_ext <<_ACEOF
12412/* end confdefs.h. */
98418dba
CW
12413
12414/* Override any gcc2 internal prototype to avoid an error. */
12415#ifdef __cplusplus
12416extern "C"
12417#endif
12418/* We use char because int might match the return type of a gcc2
12419 builtin and then its argument prototype would still apply. */
12420char kvm_open ();
503d2be0
AS
12421int
12422main ()
12423{
98418dba 12424kvm_open ();
503d2be0
AS
12425 ;
12426 return 0;
12427}
12428_ACEOF
12429rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12430if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12431 (eval $ac_link) 2>&5
12432 ac_status=$?
c0d27fcc 12433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12434 (exit $ac_status); } &&
793fa0d7 12435 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12437 (eval $ac_try) 2>&5
12438 ac_status=$?
c0d27fcc 12439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12440 (exit $ac_status); }; }; then
98418dba 12441 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
12442else
12443 echo "$as_me: failed program was:" >&5
19650fd6
AS
12444sed 's/^/| /' conftest.$ac_ext >&5
12445
98418dba 12446ac_cv_lib_kvm_kvm_open=no
503d2be0
AS
12447fi
12448rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 12449LIBS=$ac_check_lib_save_LIBS
503d2be0 12450fi
c0d27fcc 12451echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
12452echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
12453if test $ac_cv_lib_kvm_kvm_open = yes; then
12454 LIBS="-lkvm $LIBS"
ba4481b5
DL
12455fi
12456
98418dba 12457 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 12458 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
12459echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
12460if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 12461 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12462else
98418dba
CW
12463 ac_check_lib_save_LIBS=$LIBS
12464LIBS="-lutil $LIBS"
12465cat >conftest.$ac_ext <<_ACEOF
793fa0d7 12466#line $LINENO "configure"
19650fd6
AS
12467/* confdefs.h. */
12468_ACEOF
12469cat confdefs.h >>conftest.$ac_ext
12470cat >>conftest.$ac_ext <<_ACEOF
12471/* end confdefs.h. */
98418dba
CW
12472
12473/* Override any gcc2 internal prototype to avoid an error. */
12474#ifdef __cplusplus
12475extern "C"
12476#endif
12477/* We use char because int might match the return type of a gcc2
12478 builtin and then its argument prototype would still apply. */
12479char getloadavg ();
503d2be0
AS
12480int
12481main ()
12482{
98418dba 12483getloadavg ();
503d2be0
AS
12484 ;
12485 return 0;
12486}
12487_ACEOF
12488rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12489if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12490 (eval $ac_link) 2>&5
12491 ac_status=$?
c0d27fcc 12492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12493 (exit $ac_status); } &&
793fa0d7 12494 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12496 (eval $ac_try) 2>&5
12497 ac_status=$?
c0d27fcc 12498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12499 (exit $ac_status); }; }; then
98418dba 12500 ac_cv_lib_util_getloadavg=yes
ba4481b5 12501else
503d2be0 12502 echo "$as_me: failed program was:" >&5
19650fd6
AS
12503sed 's/^/| /' conftest.$ac_ext >&5
12504
98418dba 12505ac_cv_lib_util_getloadavg=no
ba4481b5 12506fi
503d2be0 12507rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12508LIBS=$ac_check_lib_save_LIBS
12509fi
c0d27fcc 12510echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
12511echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
12512if test $ac_cv_lib_util_getloadavg = yes; then
12513 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 12514fi
503d2be0 12515
98418dba 12516fi
ba4481b5 12517
98418dba
CW
12518if test $ac_have_func = no; then
12519 # There is a commonly available library for RS/6000 AIX.
12520 # Since it is not a standard part of AIX, it might be installed locally.
12521 ac_getloadavg_LIBS=$LIBS
12522 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 12523 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
12524echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
12525if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 12526 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12527else
98418dba
CW
12528 ac_check_lib_save_LIBS=$LIBS
12529LIBS="-lgetloadavg $LIBS"
12530cat >conftest.$ac_ext <<_ACEOF
793fa0d7 12531#line $LINENO "configure"
19650fd6
AS
12532/* confdefs.h. */
12533_ACEOF
12534cat confdefs.h >>conftest.$ac_ext
12535cat >>conftest.$ac_ext <<_ACEOF
12536/* end confdefs.h. */
ba4481b5 12537
98418dba
CW
12538/* Override any gcc2 internal prototype to avoid an error. */
12539#ifdef __cplusplus
12540extern "C"
12541#endif
12542/* We use char because int might match the return type of a gcc2
12543 builtin and then its argument prototype would still apply. */
12544char getloadavg ();
98418dba
CW
12545int
12546main ()
12547{
12548getloadavg ();
12549 ;
12550 return 0;
12551}
503d2be0 12552_ACEOF
98418dba 12553rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12554if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
12555 (eval $ac_link) 2>&5
12556 ac_status=$?
c0d27fcc 12557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12558 (exit $ac_status); } &&
793fa0d7 12559 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
12561 (eval $ac_try) 2>&5
12562 ac_status=$?
c0d27fcc 12563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12564 (exit $ac_status); }; }; then
12565 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 12566else
98418dba 12567 echo "$as_me: failed program was:" >&5
19650fd6
AS
12568sed 's/^/| /' conftest.$ac_ext >&5
12569
98418dba
CW
12570ac_cv_lib_getloadavg_getloadavg=no
12571fi
12572rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12573LIBS=$ac_check_lib_save_LIBS
12574fi
c0d27fcc 12575echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
12576echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
12577if test $ac_cv_lib_getloadavg_getloadavg = yes; then
12578 LIBS="-lgetloadavg $LIBS"
12579else
12580 LIBS=$ac_getloadavg_LIBS
ba4481b5 12581fi
ba4481b5
DL
12582
12583fi
98418dba
CW
12584
12585# Make sure it is really in the library, if we think we found it,
12586# otherwise set up the replacement function.
12587
12588for ac_func in getloadavg
12589do
12590as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 12591echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
12592echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12593if eval "test \"\${$as_ac_var+set}\" = set"; then
12594 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12595else
503d2be0 12596 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 12597#line $LINENO "configure"
19650fd6
AS
12598/* confdefs.h. */
12599_ACEOF
12600cat confdefs.h >>conftest.$ac_ext
12601cat >>conftest.$ac_ext <<_ACEOF
12602/* end confdefs.h. */
ba4481b5 12603/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
12604 which can conflict with char $ac_func (); below.
12605 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12606 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
12607#ifdef __STDC__
12608# include <limits.h>
12609#else
12610# include <assert.h>
12611#endif
ba4481b5 12612/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12613#ifdef __cplusplus
12614extern "C"
19650fd6 12615{
503d2be0 12616#endif
ba4481b5 12617/* We use char because int might match the return type of a gcc2
503d2be0
AS
12618 builtin and then its argument prototype would still apply. */
12619char $ac_func ();
ba4481b5
DL
12620/* The GNU C library defines this for functions which it implements
12621 to always fail with ENOSYS. Some functions are actually named
12622 something starting with __ and the normal name is an alias. */
12623#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12624choke me
12625#else
19650fd6
AS
12626char (*f) () = $ac_func;
12627#endif
12628#ifdef __cplusplus
12629}
cd958eb3
MB
12630#endif
12631
19650fd6
AS
12632int
12633main ()
12634{
12635return f != $ac_func;
503d2be0
AS
12636 ;
12637 return 0;
12638}
12639_ACEOF
12640rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12641if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12642 (eval $ac_link) 2>&5
12643 ac_status=$?
c0d27fcc 12644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12645 (exit $ac_status); } &&
793fa0d7 12646 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12648 (eval $ac_try) 2>&5
12649 ac_status=$?
c0d27fcc 12650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12651 (exit $ac_status); }; }; then
12652 eval "$as_ac_var=yes"
12653else
12654 echo "$as_me: failed program was:" >&5
19650fd6
AS
12655sed 's/^/| /' conftest.$ac_ext >&5
12656
503d2be0
AS
12657eval "$as_ac_var=no"
12658fi
12659rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12660fi
c0d27fcc 12661echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
12662echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12663if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 12664 cat >>confdefs.h <<_ACEOF
98418dba 12665#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 12666_ACEOF
503d2be0 12667
98418dba
CW
12668else
12669 LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
ba4481b5 12670
c0d27fcc 12671cat >>confdefs.h <<\_ACEOF
98418dba 12672#define C_GETLOADAVG 1
c0d27fcc 12673_ACEOF
ba4481b5 12674
98418dba
CW
12675# Figure out what our getloadavg.c needs.
12676ac_have_func=no
c0d27fcc
MR
12677if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
12678 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
12679echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
12680if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 12681 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12682fi
12683echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
12684echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 12685else
c0d27fcc
MR
12686 # Is the header compilable?
12687echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
12688echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
12689cat >conftest.$ac_ext <<_ACEOF
793fa0d7 12690#line $LINENO "configure"
19650fd6
AS
12691/* confdefs.h. */
12692_ACEOF
12693cat confdefs.h >>conftest.$ac_ext
12694cat >>conftest.$ac_ext <<_ACEOF
12695/* end confdefs.h. */
c0d27fcc
MR
12696$ac_includes_default
12697#include <sys/dg_sys_info.h>
12698_ACEOF
12699rm -f conftest.$ac_objext
12700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12701 (eval $ac_compile) 2>&5
12702 ac_status=$?
12703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12704 (exit $ac_status); } &&
793fa0d7 12705 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12707 (eval $ac_try) 2>&5
12708 ac_status=$?
12709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12710 (exit $ac_status); }; }; then
12711 ac_header_compiler=yes
12712else
12713 echo "$as_me: failed program was:" >&5
19650fd6
AS
12714sed 's/^/| /' conftest.$ac_ext >&5
12715
c0d27fcc
MR
12716ac_header_compiler=no
12717fi
12718rm -f conftest.$ac_objext conftest.$ac_ext
12719echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12720echo "${ECHO_T}$ac_header_compiler" >&6
12721
12722# Is the header present?
12723echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
12724echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
12725cat >conftest.$ac_ext <<_ACEOF
793fa0d7 12726#line $LINENO "configure"
19650fd6
AS
12727/* confdefs.h. */
12728_ACEOF
12729cat confdefs.h >>conftest.$ac_ext
12730cat >>conftest.$ac_ext <<_ACEOF
12731/* end confdefs.h. */
98418dba
CW
12732#include <sys/dg_sys_info.h>
12733_ACEOF
c0d27fcc 12734if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12735 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12736 ac_status=$?
6bae0ccf 12737 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12738 rm -f conftest.er1
12739 cat conftest.err >&5
c0d27fcc 12740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12741 (exit $ac_status); } >/dev/null; then
12742 if test -s conftest.err; then
12743 ac_cpp_err=$ac_c_preproc_warn_flag
12744 else
12745 ac_cpp_err=
12746 fi
12747else
12748 ac_cpp_err=yes
ba4481b5 12749fi
98418dba 12750if test -z "$ac_cpp_err"; then
c0d27fcc 12751 ac_header_preproc=yes
98418dba
CW
12752else
12753 echo "$as_me: failed program was:" >&5
19650fd6
AS
12754sed 's/^/| /' conftest.$ac_ext >&5
12755
c0d27fcc 12756 ac_header_preproc=no
ba4481b5 12757fi
98418dba 12758rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12759echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12760echo "${ECHO_T}$ac_header_preproc" >&6
12761
12762# So? What about this header?
12763case $ac_header_compiler:$ac_header_preproc in
12764 yes:no )
12765 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
12766echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
12767 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
12768echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
12769 (
12770 cat <<\_ASBOX
12771## ------------------------------------ ##
12772## Report this to bug-autoconf@gnu.org. ##
12773## ------------------------------------ ##
12774_ASBOX
12775 ) |
12776 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 12777 ;;
c0d27fcc
MR
12778 no:yes )
12779 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
12780echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
793fa0d7
DL
12781 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
12782echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
c0d27fcc 12783 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 12784echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
12785 (
12786 cat <<\_ASBOX
793fa0d7
DL
12787## ------------------------------------ ##
12788## Report this to bug-autoconf@gnu.org. ##
12789## ------------------------------------ ##
19650fd6
AS
12790_ASBOX
12791 ) |
12792 sed "s/^/$as_me: WARNING: /" >&2
12793 ;;
c0d27fcc
MR
12794esac
12795echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
12796echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
12797if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
12798 echo $ECHO_N "(cached) $ECHO_C" >&6
12799else
12800 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 12801fi
c0d27fcc 12802echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 12803echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
12804
12805fi
98418dba
CW
12806if test $ac_cv_header_sys_dg_sys_info_h = yes; then
12807 ac_have_func=yes
ba4481b5 12808
c0d27fcc 12809cat >>confdefs.h <<\_ACEOF
98418dba 12810#define DGUX 1
c0d27fcc
MR
12811_ACEOF
12812
503d2be0 12813
c0d27fcc 12814echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
12815echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
12816if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 12817 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12818else
503d2be0 12819 ac_check_lib_save_LIBS=$LIBS
98418dba 12820LIBS="-ldgc $LIBS"
503d2be0 12821cat >conftest.$ac_ext <<_ACEOF
793fa0d7 12822#line $LINENO "configure"
19650fd6
AS
12823/* confdefs.h. */
12824_ACEOF
12825cat confdefs.h >>conftest.$ac_ext
12826cat >>conftest.$ac_ext <<_ACEOF
12827/* end confdefs.h. */
503d2be0 12828
ba4481b5 12829/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12830#ifdef __cplusplus
12831extern "C"
12832#endif
ba4481b5 12833/* We use char because int might match the return type of a gcc2
503d2be0 12834 builtin and then its argument prototype would still apply. */
98418dba 12835char dg_sys_info ();
503d2be0
AS
12836int
12837main ()
12838{
98418dba 12839dg_sys_info ();
503d2be0
AS
12840 ;
12841 return 0;
12842}
12843_ACEOF
12844rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12845if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12846 (eval $ac_link) 2>&5
12847 ac_status=$?
c0d27fcc 12848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12849 (exit $ac_status); } &&
793fa0d7 12850 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12852 (eval $ac_try) 2>&5
12853 ac_status=$?
c0d27fcc 12854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12855 (exit $ac_status); }; }; then
98418dba 12856 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
12857else
12858 echo "$as_me: failed program was:" >&5
19650fd6
AS
12859sed 's/^/| /' conftest.$ac_ext >&5
12860
98418dba 12861ac_cv_lib_dgc_dg_sys_info=no
503d2be0
AS
12862fi
12863rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12864LIBS=$ac_check_lib_save_LIBS
12865fi
c0d27fcc 12866echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
12867echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
12868if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 12869 cat >>confdefs.h <<_ACEOF
98418dba 12870#define HAVE_LIBDGC 1
c0d27fcc 12871_ACEOF
ba4481b5 12872
98418dba 12873 LIBS="-ldgc $LIBS"
ba4481b5 12874
ba4481b5
DL
12875fi
12876
98418dba 12877fi
503d2be0 12878
c0d27fcc
MR
12879
12880
12881if test "${ac_cv_header_locale_h+set}" = set; then
12882 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
12883echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
12884if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 12885 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12886fi
12887echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
12888echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 12889else
c0d27fcc
MR
12890 # Is the header compilable?
12891echo "$as_me:$LINENO: checking locale.h usability" >&5
12892echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
12893cat >conftest.$ac_ext <<_ACEOF
793fa0d7 12894#line $LINENO "configure"
19650fd6
AS
12895/* confdefs.h. */
12896_ACEOF
12897cat confdefs.h >>conftest.$ac_ext
12898cat >>conftest.$ac_ext <<_ACEOF
12899/* end confdefs.h. */
c0d27fcc
MR
12900$ac_includes_default
12901#include <locale.h>
12902_ACEOF
12903rm -f conftest.$ac_objext
12904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12905 (eval $ac_compile) 2>&5
12906 ac_status=$?
12907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12908 (exit $ac_status); } &&
793fa0d7 12909 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12911 (eval $ac_try) 2>&5
12912 ac_status=$?
12913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12914 (exit $ac_status); }; }; then
12915 ac_header_compiler=yes
12916else
12917 echo "$as_me: failed program was:" >&5
19650fd6
AS
12918sed 's/^/| /' conftest.$ac_ext >&5
12919
c0d27fcc
MR
12920ac_header_compiler=no
12921fi
12922rm -f conftest.$ac_objext conftest.$ac_ext
12923echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12924echo "${ECHO_T}$ac_header_compiler" >&6
12925
12926# Is the header present?
12927echo "$as_me:$LINENO: checking locale.h presence" >&5
12928echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
12929cat >conftest.$ac_ext <<_ACEOF
793fa0d7 12930#line $LINENO "configure"
19650fd6
AS
12931/* confdefs.h. */
12932_ACEOF
12933cat confdefs.h >>conftest.$ac_ext
12934cat >>conftest.$ac_ext <<_ACEOF
12935/* end confdefs.h. */
98418dba 12936#include <locale.h>
503d2be0 12937_ACEOF
c0d27fcc 12938if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 12939 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 12940 ac_status=$?
6bae0ccf 12941 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12942 rm -f conftest.er1
12943 cat conftest.err >&5
c0d27fcc 12944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12945 (exit $ac_status); } >/dev/null; then
12946 if test -s conftest.err; then
12947 ac_cpp_err=$ac_c_preproc_warn_flag
12948 else
12949 ac_cpp_err=
12950 fi
503d2be0 12951else
98418dba 12952 ac_cpp_err=yes
503d2be0 12953fi
98418dba 12954if test -z "$ac_cpp_err"; then
c0d27fcc 12955 ac_header_preproc=yes
98418dba
CW
12956else
12957 echo "$as_me: failed program was:" >&5
19650fd6
AS
12958sed 's/^/| /' conftest.$ac_ext >&5
12959
c0d27fcc 12960 ac_header_preproc=no
ba4481b5 12961fi
98418dba 12962rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12963echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12964echo "${ECHO_T}$ac_header_preproc" >&6
12965
12966# So? What about this header?
12967case $ac_header_compiler:$ac_header_preproc in
12968 yes:no )
12969 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
12970echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
12971 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
12972echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
12973 (
12974 cat <<\_ASBOX
12975## ------------------------------------ ##
12976## Report this to bug-autoconf@gnu.org. ##
12977## ------------------------------------ ##
12978_ASBOX
12979 ) |
12980 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 12981 ;;
c0d27fcc
MR
12982 no:yes )
12983 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
12984echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
793fa0d7
DL
12985 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
12986echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
c0d27fcc 12987 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 12988echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
12989 (
12990 cat <<\_ASBOX
793fa0d7
DL
12991## ------------------------------------ ##
12992## Report this to bug-autoconf@gnu.org. ##
12993## ------------------------------------ ##
19650fd6
AS
12994_ASBOX
12995 ) |
12996 sed "s/^/$as_me: WARNING: /" >&2
12997 ;;
c0d27fcc
MR
12998esac
12999echo "$as_me:$LINENO: checking for locale.h" >&5
13000echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
13001if test "${ac_cv_header_locale_h+set}" = set; then
13002 echo $ECHO_N "(cached) $ECHO_C" >&6
13003else
13004 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 13005fi
c0d27fcc 13006echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
13007echo "${ECHO_T}$ac_cv_header_locale_h" >&6
13008
c0d27fcc
MR
13009fi
13010
13011
13012
98418dba 13013for ac_func in setlocale
ba4481b5 13014do
503d2be0 13015as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13016echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
13017echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13018if eval "test \"\${$as_ac_var+set}\" = set"; then
13019 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13020else
503d2be0 13021 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 13022#line $LINENO "configure"
19650fd6
AS
13023/* confdefs.h. */
13024_ACEOF
13025cat confdefs.h >>conftest.$ac_ext
13026cat >>conftest.$ac_ext <<_ACEOF
13027/* end confdefs.h. */
ba4481b5 13028/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13029 which can conflict with char $ac_func (); below.
13030 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13031 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
13032#ifdef __STDC__
13033# include <limits.h>
13034#else
13035# include <assert.h>
13036#endif
ba4481b5 13037/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13038#ifdef __cplusplus
13039extern "C"
19650fd6 13040{
503d2be0 13041#endif
ba4481b5 13042/* We use char because int might match the return type of a gcc2
503d2be0
AS
13043 builtin and then its argument prototype would still apply. */
13044char $ac_func ();
ba4481b5
DL
13045/* The GNU C library defines this for functions which it implements
13046 to always fail with ENOSYS. Some functions are actually named
13047 something starting with __ and the normal name is an alias. */
13048#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13049choke me
13050#else
19650fd6
AS
13051char (*f) () = $ac_func;
13052#endif
13053#ifdef __cplusplus
13054}
ba4481b5
DL
13055#endif
13056
19650fd6
AS
13057int
13058main ()
13059{
13060return f != $ac_func;
503d2be0
AS
13061 ;
13062 return 0;
13063}
13064_ACEOF
13065rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13066if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13067 (eval $ac_link) 2>&5
13068 ac_status=$?
c0d27fcc 13069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13070 (exit $ac_status); } &&
793fa0d7 13071 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13073 (eval $ac_try) 2>&5
13074 ac_status=$?
c0d27fcc 13075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13076 (exit $ac_status); }; }; then
13077 eval "$as_ac_var=yes"
13078else
13079 echo "$as_me: failed program was:" >&5
19650fd6
AS
13080sed 's/^/| /' conftest.$ac_ext >&5
13081
503d2be0
AS
13082eval "$as_ac_var=no"
13083fi
13084rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13085fi
c0d27fcc 13086echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13087echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13088if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13089 cat >>confdefs.h <<_ACEOF
503d2be0 13090#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13091_ACEOF
ba4481b5 13092
ba4481b5
DL
13093fi
13094done
13095
c0d27fcc 13096
98418dba
CW
13097# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
13098# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
13099# Irix 4.0.5F has the header but not the library.
13100if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
13101 ac_have_func=yes
13102
c0d27fcc 13103cat >>confdefs.h <<\_ACEOF
98418dba 13104#define SVR4 1
c0d27fcc 13105_ACEOF
98418dba
CW
13106
13107fi
13108
13109if test $ac_have_func = no; then
c0d27fcc
MR
13110 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
13111 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
13112echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
13113if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 13114 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13115fi
13116echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
13117echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 13118else
c0d27fcc
MR
13119 # Is the header compilable?
13120echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
13121echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
13122cat >conftest.$ac_ext <<_ACEOF
793fa0d7 13123#line $LINENO "configure"
19650fd6
AS
13124/* confdefs.h. */
13125_ACEOF
13126cat confdefs.h >>conftest.$ac_ext
13127cat >>conftest.$ac_ext <<_ACEOF
13128/* end confdefs.h. */
c0d27fcc
MR
13129$ac_includes_default
13130#include <inq_stats/cpustats.h>
13131_ACEOF
13132rm -f conftest.$ac_objext
13133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13134 (eval $ac_compile) 2>&5
13135 ac_status=$?
13136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13137 (exit $ac_status); } &&
793fa0d7 13138 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13140 (eval $ac_try) 2>&5
13141 ac_status=$?
13142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13143 (exit $ac_status); }; }; then
13144 ac_header_compiler=yes
13145else
13146 echo "$as_me: failed program was:" >&5
19650fd6
AS
13147sed 's/^/| /' conftest.$ac_ext >&5
13148
c0d27fcc
MR
13149ac_header_compiler=no
13150fi
13151rm -f conftest.$ac_objext conftest.$ac_ext
13152echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13153echo "${ECHO_T}$ac_header_compiler" >&6
13154
13155# Is the header present?
13156echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
13157echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
13158cat >conftest.$ac_ext <<_ACEOF
793fa0d7 13159#line $LINENO "configure"
19650fd6
AS
13160/* confdefs.h. */
13161_ACEOF
13162cat confdefs.h >>conftest.$ac_ext
13163cat >>conftest.$ac_ext <<_ACEOF
13164/* end confdefs.h. */
98418dba 13165#include <inq_stats/cpustats.h>
503d2be0 13166_ACEOF
c0d27fcc 13167if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
13168 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13169 ac_status=$?
6bae0ccf 13170 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13171 rm -f conftest.er1
13172 cat conftest.err >&5
c0d27fcc 13173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13174 (exit $ac_status); } >/dev/null; then
13175 if test -s conftest.err; then
13176 ac_cpp_err=$ac_c_preproc_warn_flag
13177 else
13178 ac_cpp_err=
13179 fi
13180else
13181 ac_cpp_err=yes
13182fi
13183if test -z "$ac_cpp_err"; then
c0d27fcc 13184 ac_header_preproc=yes
503d2be0
AS
13185else
13186 echo "$as_me: failed program was:" >&5
19650fd6
AS
13187sed 's/^/| /' conftest.$ac_ext >&5
13188
c0d27fcc 13189 ac_header_preproc=no
ba4481b5 13190fi
503d2be0 13191rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13192echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13193echo "${ECHO_T}$ac_header_preproc" >&6
13194
13195# So? What about this header?
13196case $ac_header_compiler:$ac_header_preproc in
13197 yes:no )
13198 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
13199echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
13200 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
13201echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
13202 (
13203 cat <<\_ASBOX
13204## ------------------------------------ ##
13205## Report this to bug-autoconf@gnu.org. ##
13206## ------------------------------------ ##
13207_ASBOX
13208 ) |
13209 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 13210 ;;
c0d27fcc
MR
13211 no:yes )
13212 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
13213echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
793fa0d7
DL
13214 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
13215echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
c0d27fcc 13216 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 13217echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
13218 (
13219 cat <<\_ASBOX
793fa0d7
DL
13220## ------------------------------------ ##
13221## Report this to bug-autoconf@gnu.org. ##
13222## ------------------------------------ ##
19650fd6
AS
13223_ASBOX
13224 ) |
13225 sed "s/^/$as_me: WARNING: /" >&2
13226 ;;
c0d27fcc
MR
13227esac
13228echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
13229echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
13230if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
13231 echo $ECHO_N "(cached) $ECHO_C" >&6
13232else
13233 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 13234fi
c0d27fcc 13235echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 13236echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
13237
13238fi
98418dba
CW
13239if test $ac_cv_header_inq_stats_cpustats_h = yes; then
13240 ac_have_func=yes
ba4481b5 13241
c0d27fcc 13242cat >>confdefs.h <<\_ACEOF
98418dba 13243#define UMAX 1
c0d27fcc 13244_ACEOF
98418dba 13245
c0d27fcc
MR
13246
13247cat >>confdefs.h <<\_ACEOF
98418dba 13248#define UMAX4_3 1
c0d27fcc 13249_ACEOF
98418dba
CW
13250
13251fi
13252
c0d27fcc 13253
98418dba
CW
13254fi
13255
13256if test $ac_have_func = no; then
c0d27fcc
MR
13257 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
13258 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
13259echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
13260if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 13261 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13262fi
13263echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
13264echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 13265else
c0d27fcc
MR
13266 # Is the header compilable?
13267echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
13268echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
13269cat >conftest.$ac_ext <<_ACEOF
793fa0d7 13270#line $LINENO "configure"
19650fd6
AS
13271/* confdefs.h. */
13272_ACEOF
13273cat confdefs.h >>conftest.$ac_ext
13274cat >>conftest.$ac_ext <<_ACEOF
13275/* end confdefs.h. */
c0d27fcc
MR
13276$ac_includes_default
13277#include <sys/cpustats.h>
13278_ACEOF
13279rm -f conftest.$ac_objext
13280if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13281 (eval $ac_compile) 2>&5
13282 ac_status=$?
13283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13284 (exit $ac_status); } &&
793fa0d7 13285 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13287 (eval $ac_try) 2>&5
13288 ac_status=$?
13289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13290 (exit $ac_status); }; }; then
13291 ac_header_compiler=yes
13292else
13293 echo "$as_me: failed program was:" >&5
19650fd6
AS
13294sed 's/^/| /' conftest.$ac_ext >&5
13295
c0d27fcc
MR
13296ac_header_compiler=no
13297fi
13298rm -f conftest.$ac_objext conftest.$ac_ext
13299echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13300echo "${ECHO_T}$ac_header_compiler" >&6
13301
13302# Is the header present?
13303echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
13304echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
13305cat >conftest.$ac_ext <<_ACEOF
793fa0d7 13306#line $LINENO "configure"
19650fd6
AS
13307/* confdefs.h. */
13308_ACEOF
13309cat confdefs.h >>conftest.$ac_ext
13310cat >>conftest.$ac_ext <<_ACEOF
13311/* end confdefs.h. */
98418dba
CW
13312#include <sys/cpustats.h>
13313_ACEOF
c0d27fcc 13314if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
13315 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13316 ac_status=$?
6bae0ccf 13317 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13318 rm -f conftest.er1
13319 cat conftest.err >&5
c0d27fcc 13320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13321 (exit $ac_status); } >/dev/null; then
13322 if test -s conftest.err; then
13323 ac_cpp_err=$ac_c_preproc_warn_flag
13324 else
13325 ac_cpp_err=
13326 fi
13327else
13328 ac_cpp_err=yes
503d2be0 13329fi
98418dba 13330if test -z "$ac_cpp_err"; then
c0d27fcc 13331 ac_header_preproc=yes
98418dba
CW
13332else
13333 echo "$as_me: failed program was:" >&5
19650fd6
AS
13334sed 's/^/| /' conftest.$ac_ext >&5
13335
c0d27fcc 13336 ac_header_preproc=no
98418dba
CW
13337fi
13338rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13339echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13340echo "${ECHO_T}$ac_header_preproc" >&6
13341
13342# So? What about this header?
13343case $ac_header_compiler:$ac_header_preproc in
13344 yes:no )
13345 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
13346echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
13347 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
13348echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
13349 (
13350 cat <<\_ASBOX
13351## ------------------------------------ ##
13352## Report this to bug-autoconf@gnu.org. ##
13353## ------------------------------------ ##
13354_ASBOX
13355 ) |
13356 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 13357 ;;
c0d27fcc
MR
13358 no:yes )
13359 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
13360echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
793fa0d7
DL
13361 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
13362echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
c0d27fcc 13363 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 13364echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
13365 (
13366 cat <<\_ASBOX
793fa0d7
DL
13367## ------------------------------------ ##
13368## Report this to bug-autoconf@gnu.org. ##
13369## ------------------------------------ ##
19650fd6
AS
13370_ASBOX
13371 ) |
13372 sed "s/^/$as_me: WARNING: /" >&2
13373 ;;
c0d27fcc
MR
13374esac
13375echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
13376echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
13377if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
13378 echo $ECHO_N "(cached) $ECHO_C" >&6
13379else
13380 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 13381fi
c0d27fcc 13382echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 13383echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
13384
13385fi
98418dba 13386if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 13387 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 13388#define UMAX 1
c0d27fcc 13389_ACEOF
ba4481b5 13390
98418dba
CW
13391fi
13392
c0d27fcc 13393
98418dba
CW
13394fi
13395
13396if test $ac_have_func = no; then
13397
13398for ac_header in mach/mach.h
2c9dccc9
PJ
13399do
13400as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
13401if eval "test \"\${$as_ac_Header+set}\" = set"; then
13402 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
13403echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13404if eval "test \"\${$as_ac_Header+set}\" = set"; then
13405 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13406fi
13407echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13408echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 13409else
c0d27fcc
MR
13410 # Is the header compilable?
13411echo "$as_me:$LINENO: checking $ac_header usability" >&5
13412echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13413cat >conftest.$ac_ext <<_ACEOF
793fa0d7 13414#line $LINENO "configure"
19650fd6
AS
13415/* confdefs.h. */
13416_ACEOF
13417cat confdefs.h >>conftest.$ac_ext
13418cat >>conftest.$ac_ext <<_ACEOF
13419/* end confdefs.h. */
c0d27fcc
MR
13420$ac_includes_default
13421#include <$ac_header>
13422_ACEOF
13423rm -f conftest.$ac_objext
13424if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13425 (eval $ac_compile) 2>&5
13426 ac_status=$?
13427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13428 (exit $ac_status); } &&
793fa0d7 13429 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13431 (eval $ac_try) 2>&5
13432 ac_status=$?
13433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13434 (exit $ac_status); }; }; then
13435 ac_header_compiler=yes
13436else
13437 echo "$as_me: failed program was:" >&5
19650fd6
AS
13438sed 's/^/| /' conftest.$ac_ext >&5
13439
c0d27fcc
MR
13440ac_header_compiler=no
13441fi
13442rm -f conftest.$ac_objext conftest.$ac_ext
13443echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13444echo "${ECHO_T}$ac_header_compiler" >&6
13445
13446# Is the header present?
13447echo "$as_me:$LINENO: checking $ac_header presence" >&5
13448echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13449cat >conftest.$ac_ext <<_ACEOF
793fa0d7 13450#line $LINENO "configure"
19650fd6
AS
13451/* confdefs.h. */
13452_ACEOF
13453cat confdefs.h >>conftest.$ac_ext
13454cat >>conftest.$ac_ext <<_ACEOF
13455/* end confdefs.h. */
2c9dccc9
PJ
13456#include <$ac_header>
13457_ACEOF
c0d27fcc 13458if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
13459 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13460 ac_status=$?
6bae0ccf 13461 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
13462 rm -f conftest.er1
13463 cat conftest.err >&5
c0d27fcc 13464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
13465 (exit $ac_status); } >/dev/null; then
13466 if test -s conftest.err; then
13467 ac_cpp_err=$ac_c_preproc_warn_flag
13468 else
13469 ac_cpp_err=
13470 fi
13471else
13472 ac_cpp_err=yes
13473fi
13474if test -z "$ac_cpp_err"; then
c0d27fcc
MR
13475 ac_header_preproc=yes
13476else
13477 echo "$as_me: failed program was:" >&5
19650fd6
AS
13478sed 's/^/| /' conftest.$ac_ext >&5
13479
c0d27fcc
MR
13480 ac_header_preproc=no
13481fi
13482rm -f conftest.err conftest.$ac_ext
13483echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13484echo "${ECHO_T}$ac_header_preproc" >&6
13485
13486# So? What about this header?
13487case $ac_header_compiler:$ac_header_preproc in
13488 yes:no )
13489 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13490echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
13491 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13492echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13493 (
13494 cat <<\_ASBOX
13495## ------------------------------------ ##
13496## Report this to bug-autoconf@gnu.org. ##
13497## ------------------------------------ ##
13498_ASBOX
13499 ) |
13500 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 13501 ;;
c0d27fcc
MR
13502 no:yes )
13503 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13504echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
13505 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13506echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 13507 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13508echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
13509 (
13510 cat <<\_ASBOX
793fa0d7
DL
13511## ------------------------------------ ##
13512## Report this to bug-autoconf@gnu.org. ##
13513## ------------------------------------ ##
19650fd6
AS
13514_ASBOX
13515 ) |
13516 sed "s/^/$as_me: WARNING: /" >&2
13517 ;;
c0d27fcc
MR
13518esac
13519echo "$as_me:$LINENO: checking for $ac_header" >&5
13520echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13521if eval "test \"\${$as_ac_Header+set}\" = set"; then
13522 echo $ECHO_N "(cached) $ECHO_C" >&6
13523else
793fa0d7 13524 eval "$as_ac_Header=$ac_header_preproc"
c0d27fcc
MR
13525fi
13526echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13527echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13528
13529fi
13530if test `eval echo '${'$as_ac_Header'}'` = yes; then
13531 cat >>confdefs.h <<_ACEOF
13532#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13533_ACEOF
13534
13535fi
13536
13537done
13538
13539fi
13540
13541
13542for ac_header in nlist.h
13543do
13544as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13545if eval "test \"\${$as_ac_Header+set}\" = set"; then
13546 echo "$as_me:$LINENO: checking for $ac_header" >&5
13547echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13548if eval "test \"\${$as_ac_Header+set}\" = set"; then
13549 echo $ECHO_N "(cached) $ECHO_C" >&6
13550fi
13551echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13552echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13553else
13554 # Is the header compilable?
13555echo "$as_me:$LINENO: checking $ac_header usability" >&5
13556echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13557cat >conftest.$ac_ext <<_ACEOF
793fa0d7 13558#line $LINENO "configure"
19650fd6
AS
13559/* confdefs.h. */
13560_ACEOF
13561cat confdefs.h >>conftest.$ac_ext
13562cat >>conftest.$ac_ext <<_ACEOF
13563/* end confdefs.h. */
c0d27fcc
MR
13564$ac_includes_default
13565#include <$ac_header>
13566_ACEOF
13567rm -f conftest.$ac_objext
13568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13569 (eval $ac_compile) 2>&5
13570 ac_status=$?
13571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13572 (exit $ac_status); } &&
793fa0d7 13573 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13575 (eval $ac_try) 2>&5
13576 ac_status=$?
13577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13578 (exit $ac_status); }; }; then
13579 ac_header_compiler=yes
2c9dccc9
PJ
13580else
13581 echo "$as_me: failed program was:" >&5
19650fd6
AS
13582sed 's/^/| /' conftest.$ac_ext >&5
13583
c0d27fcc 13584ac_header_compiler=no
98418dba 13585fi
c0d27fcc
MR
13586rm -f conftest.$ac_objext conftest.$ac_ext
13587echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13588echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 13589
c0d27fcc
MR
13590# Is the header present?
13591echo "$as_me:$LINENO: checking $ac_header presence" >&5
13592echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13593cat >conftest.$ac_ext <<_ACEOF
793fa0d7 13594#line $LINENO "configure"
19650fd6
AS
13595/* confdefs.h. */
13596_ACEOF
13597cat confdefs.h >>conftest.$ac_ext
13598cat >>conftest.$ac_ext <<_ACEOF
13599/* end confdefs.h. */
503d2be0
AS
13600#include <$ac_header>
13601_ACEOF
c0d27fcc 13602if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
13603 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13604 ac_status=$?
6bae0ccf 13605 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13606 rm -f conftest.er1
13607 cat conftest.err >&5
c0d27fcc 13608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13609 (exit $ac_status); } >/dev/null; then
13610 if test -s conftest.err; then
13611 ac_cpp_err=$ac_c_preproc_warn_flag
13612 else
13613 ac_cpp_err=
13614 fi
13615else
13616 ac_cpp_err=yes
13617fi
13618if test -z "$ac_cpp_err"; then
c0d27fcc 13619 ac_header_preproc=yes
503d2be0
AS
13620else
13621 echo "$as_me: failed program was:" >&5
19650fd6
AS
13622sed 's/^/| /' conftest.$ac_ext >&5
13623
c0d27fcc 13624 ac_header_preproc=no
b5de8dc0 13625fi
503d2be0 13626rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13627echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13628echo "${ECHO_T}$ac_header_preproc" >&6
13629
13630# So? What about this header?
13631case $ac_header_compiler:$ac_header_preproc in
13632 yes:no )
13633 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13634echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
13635 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13636echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13637 (
13638 cat <<\_ASBOX
13639## ------------------------------------ ##
13640## Report this to bug-autoconf@gnu.org. ##
13641## ------------------------------------ ##
13642_ASBOX
13643 ) |
13644 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 13645 ;;
c0d27fcc
MR
13646 no:yes )
13647 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13648echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
13649 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13650echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 13651 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13652echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
13653 (
13654 cat <<\_ASBOX
793fa0d7
DL
13655## ------------------------------------ ##
13656## Report this to bug-autoconf@gnu.org. ##
13657## ------------------------------------ ##
19650fd6
AS
13658_ASBOX
13659 ) |
13660 sed "s/^/$as_me: WARNING: /" >&2
13661 ;;
c0d27fcc
MR
13662esac
13663echo "$as_me:$LINENO: checking for $ac_header" >&5
13664echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13665if eval "test \"\${$as_ac_Header+set}\" = set"; then
13666 echo $ECHO_N "(cached) $ECHO_C" >&6
13667else
793fa0d7 13668 eval "$as_ac_Header=$ac_header_preproc"
b5de8dc0 13669fi
c0d27fcc 13670echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 13671echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
13672
13673fi
98418dba 13674if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 13675 cat >>confdefs.h <<_ACEOF
98418dba 13676#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
13677_ACEOF
13678 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
13679echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
13680if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 13681 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 13682else
503d2be0 13683 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 13684#line $LINENO "configure"
19650fd6
AS
13685/* confdefs.h. */
13686_ACEOF
13687cat confdefs.h >>conftest.$ac_ext
13688cat >>conftest.$ac_ext <<_ACEOF
13689/* end confdefs.h. */
98418dba 13690#include <nlist.h>
b5de8dc0 13691
503d2be0
AS
13692int
13693main ()
13694{
98418dba
CW
13695static struct nlist ac_aggr;
13696if (ac_aggr.n_un.n_name)
13697return 0;
503d2be0
AS
13698 ;
13699 return 0;
13700}
13701_ACEOF
98418dba 13702rm -f conftest.$ac_objext
c0d27fcc 13703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba 13704 (eval $ac_compile) 2>&5
503d2be0 13705 ac_status=$?
c0d27fcc 13706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13707 (exit $ac_status); } &&
793fa0d7 13708 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 13709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13710 (eval $ac_try) 2>&5
13711 ac_status=$?
c0d27fcc 13712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13713 (exit $ac_status); }; }; then
98418dba 13714 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
13715else
13716 echo "$as_me: failed program was:" >&5
19650fd6
AS
13717sed 's/^/| /' conftest.$ac_ext >&5
13718
6bae0ccf 13719cat >conftest.$ac_ext <<_ACEOF
793fa0d7 13720#line $LINENO "configure"
19650fd6
AS
13721/* confdefs.h. */
13722_ACEOF
13723cat confdefs.h >>conftest.$ac_ext
13724cat >>conftest.$ac_ext <<_ACEOF
13725/* end confdefs.h. */
6bae0ccf
DL
13726#include <nlist.h>
13727
13728int
13729main ()
13730{
13731static struct nlist ac_aggr;
13732if (sizeof ac_aggr.n_un.n_name)
13733return 0;
13734 ;
13735 return 0;
13736}
13737_ACEOF
13738rm -f conftest.$ac_objext
13739if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13740 (eval $ac_compile) 2>&5
13741 ac_status=$?
13742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13743 (exit $ac_status); } &&
793fa0d7 13744 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
13745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13746 (eval $ac_try) 2>&5
13747 ac_status=$?
13748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13749 (exit $ac_status); }; }; then
13750 ac_cv_member_struct_nlist_n_un_n_name=yes
13751else
13752 echo "$as_me: failed program was:" >&5
19650fd6
AS
13753sed 's/^/| /' conftest.$ac_ext >&5
13754
98418dba 13755ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 13756fi
98418dba 13757rm -f conftest.$ac_objext conftest.$ac_ext
b5de8dc0 13758fi
6bae0ccf
DL
13759rm -f conftest.$ac_objext conftest.$ac_ext
13760fi
c0d27fcc 13761echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
13762echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
13763if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 13764
c0d27fcc 13765cat >>confdefs.h <<_ACEOF
98418dba 13766#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 13767_ACEOF
b5de8dc0 13768
c0d27fcc
MR
13769
13770cat >>confdefs.h <<\_ACEOF
98418dba 13771#define NLIST_NAME_UNION 1
c0d27fcc 13772_ACEOF
b5de8dc0 13773
98418dba 13774fi
b5de8dc0 13775
c0d27fcc 13776
98418dba 13777fi
c0d27fcc 13778
98418dba 13779done
b5de8dc0 13780
98418dba
CW
13781fi
13782done
b5de8dc0 13783
c0d27fcc 13784
98418dba 13785# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 13786echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
13787echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
13788if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
13789 echo $ECHO_N "(cached) $ECHO_C" >&6
13790else
13791 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 13792#line $LINENO "configure"
19650fd6
AS
13793/* confdefs.h. */
13794_ACEOF
13795cat confdefs.h >>conftest.$ac_ext
13796cat >>conftest.$ac_ext <<_ACEOF
13797/* end confdefs.h. */
6bae0ccf 13798#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
13799#ifdef LDAV_PRIVILEGED
13800Yowza Am I SETGID yet
13801#endif
13802_ACEOF
13803if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13804 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
13805 ac_cv_func_getloadavg_setgid=yes
13806else
13807 ac_cv_func_getloadavg_setgid=no
13808fi
13809rm -f conftest*
b5de8dc0 13810
98418dba 13811fi
c0d27fcc 13812echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
13813echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
13814if test $ac_cv_func_getloadavg_setgid = yes; then
13815 NEED_SETGID=true
b5de8dc0 13816
c0d27fcc 13817cat >>confdefs.h <<\_ACEOF
98418dba 13818#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 13819_ACEOF
98418dba 13820
b5de8dc0 13821else
98418dba 13822 NEED_SETGID=false
b5de8dc0 13823fi
98418dba
CW
13824
13825if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 13826 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
13827echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
13828if test "${ac_cv_group_kmem+set}" = set; then
13829 echo $ECHO_N "(cached) $ECHO_C" >&6
13830else
13831 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
13832 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
13833 # If we got an error (system does not support symlinks), try without -L.
13834 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
13835 ac_cv_group_kmem=`echo $ac_ls_output \
793fa0d7 13836 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
13837 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
13838 / /s/.* //;p;'`
13839
b5de8dc0 13840fi
c0d27fcc 13841echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
13842echo "${ECHO_T}$ac_cv_group_kmem" >&6
13843 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 13844fi
98418dba
CW
13845if test "x$ac_save_LIBS" = x; then
13846 GETLOADAVG_LIBS=$LIBS
13847else
13848 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 13849fi
98418dba 13850LIBS=$ac_save_LIBS
b5de8dc0 13851
c0d27fcc
MR
13852
13853
13854echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
13855echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13856if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 13857 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 13858else
b936fae4
AS
13859 while :; do
13860 ac_cv_sys_largefile_source=no
503d2be0 13861 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 13862#line $LINENO "configure"
19650fd6
AS
13863/* confdefs.h. */
13864_ACEOF
13865cat confdefs.h >>conftest.$ac_ext
13866cat >>conftest.$ac_ext <<_ACEOF
13867/* end confdefs.h. */
b936fae4 13868#include <stdio.h>
503d2be0
AS
13869int
13870main ()
13871{
b936fae4
AS
13872return !fseeko;
13873 ;
13874 return 0;
13875}
13876_ACEOF
13877rm -f conftest.$ac_objext
c0d27fcc 13878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
b936fae4
AS
13879 (eval $ac_compile) 2>&5
13880 ac_status=$?
c0d27fcc 13881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 13882 (exit $ac_status); } &&
793fa0d7 13883 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 13884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
13885 (eval $ac_try) 2>&5
13886 ac_status=$?
c0d27fcc 13887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
13888 (exit $ac_status); }; }; then
13889 break
13890else
13891 echo "$as_me: failed program was:" >&5
19650fd6
AS
13892sed 's/^/| /' conftest.$ac_ext >&5
13893
b936fae4
AS
13894fi
13895rm -f conftest.$ac_objext conftest.$ac_ext
13896 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 13897#line $LINENO "configure"
19650fd6
AS
13898/* confdefs.h. */
13899_ACEOF
13900cat confdefs.h >>conftest.$ac_ext
13901cat >>conftest.$ac_ext <<_ACEOF
13902/* end confdefs.h. */
b936fae4
AS
13903#define _LARGEFILE_SOURCE 1
13904#include <stdio.h>
b936fae4
AS
13905int
13906main ()
13907{
13908return !fseeko;
13909 ;
13910 return 0;
13911}
13912_ACEOF
13913rm -f conftest.$ac_objext
c0d27fcc 13914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
b936fae4
AS
13915 (eval $ac_compile) 2>&5
13916 ac_status=$?
c0d27fcc 13917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 13918 (exit $ac_status); } &&
793fa0d7 13919 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 13920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
13921 (eval $ac_try) 2>&5
13922 ac_status=$?
c0d27fcc 13923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
13924 (exit $ac_status); }; }; then
13925 ac_cv_sys_largefile_source=1; break
13926else
13927 echo "$as_me: failed program was:" >&5
19650fd6
AS
13928sed 's/^/| /' conftest.$ac_ext >&5
13929
b936fae4
AS
13930fi
13931rm -f conftest.$ac_objext conftest.$ac_ext
13932 break
13933done
13934fi
c0d27fcc 13935echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
13936echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13937if test "$ac_cv_sys_largefile_source" != no; then
13938
c0d27fcc 13939cat >>confdefs.h <<_ACEOF
b936fae4 13940#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 13941_ACEOF
b936fae4
AS
13942
13943fi
13944rm -f conftest*
4c343001 13945
b936fae4
AS
13946# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13947# in glibc 2.1.3, but that breaks too many other things.
13948# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 13949echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
13950echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13951if test "${ac_cv_func_fseeko+set}" = set; then
13952 echo $ECHO_N "(cached) $ECHO_C" >&6
13953else
13954 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 13955#line $LINENO "configure"
19650fd6
AS
13956/* confdefs.h. */
13957_ACEOF
13958cat confdefs.h >>conftest.$ac_ext
13959cat >>conftest.$ac_ext <<_ACEOF
13960/* end confdefs.h. */
b936fae4 13961#include <stdio.h>
b936fae4
AS
13962int
13963main ()
13964{
13965return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
13966 ;
13967 return 0;
13968}
13969_ACEOF
13970rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13971if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13972 (eval $ac_link) 2>&5
13973 ac_status=$?
c0d27fcc 13974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13975 (exit $ac_status); } &&
793fa0d7 13976 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13978 (eval $ac_try) 2>&5
13979 ac_status=$?
c0d27fcc 13980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13981 (exit $ac_status); }; }; then
b936fae4 13982 ac_cv_func_fseeko=yes
503d2be0
AS
13983else
13984 echo "$as_me: failed program was:" >&5
19650fd6
AS
13985sed 's/^/| /' conftest.$ac_ext >&5
13986
b936fae4 13987ac_cv_func_fseeko=no
503d2be0
AS
13988fi
13989rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13990fi
c0d27fcc 13991echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
13992echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13993if test $ac_cv_func_fseeko = yes; then
13994
c0d27fcc 13995cat >>confdefs.h <<\_ACEOF
b936fae4 13996#define HAVE_FSEEKO 1
c0d27fcc 13997_ACEOF
b936fae4 13998
4c343001
DL
13999fi
14000
c0d27fcc 14001
cd958eb3
MB
14002echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
14003echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
14004if test "${ac_cv_func_getpgrp_void+set}" = set; then
14005 echo $ECHO_N "(cached) $ECHO_C" >&6
14006else
14007 # Use it with a single arg.
14008cat >conftest.$ac_ext <<_ACEOF
793fa0d7 14009#line $LINENO "configure"
19650fd6
AS
14010/* confdefs.h. */
14011_ACEOF
14012cat confdefs.h >>conftest.$ac_ext
14013cat >>conftest.$ac_ext <<_ACEOF
14014/* end confdefs.h. */
cd958eb3
MB
14015$ac_includes_default
14016int
14017main ()
14018{
14019getpgrp (0);
14020 ;
14021 return 0;
14022}
14023_ACEOF
14024rm -f conftest.$ac_objext
14025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14026 (eval $ac_compile) 2>&5
14027 ac_status=$?
14028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14029 (exit $ac_status); } &&
793fa0d7 14030 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
14031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14032 (eval $ac_try) 2>&5
14033 ac_status=$?
14034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14035 (exit $ac_status); }; }; then
14036 ac_cv_func_getpgrp_void=no
14037else
14038 echo "$as_me: failed program was:" >&5
19650fd6
AS
14039sed 's/^/| /' conftest.$ac_ext >&5
14040
cd958eb3
MB
14041ac_cv_func_getpgrp_void=yes
14042fi
14043rm -f conftest.$ac_objext conftest.$ac_ext
14044
14045fi
14046echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
14047echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
14048if test $ac_cv_func_getpgrp_void = yes; then
14049
14050cat >>confdefs.h <<\_ACEOF
14051#define GETPGRP_VOID 1
14052_ACEOF
14053
14054fi
14055
14056
973a76b1
DL
14057
14058for ac_func in strftime
14059do
14060as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14061echo "$as_me:$LINENO: checking for $ac_func" >&5
14062echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14063if eval "test \"\${$as_ac_var+set}\" = set"; then
14064 echo $ECHO_N "(cached) $ECHO_C" >&6
14065else
14066 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 14067#line $LINENO "configure"
19650fd6
AS
14068/* confdefs.h. */
14069_ACEOF
14070cat confdefs.h >>conftest.$ac_ext
14071cat >>conftest.$ac_ext <<_ACEOF
14072/* end confdefs.h. */
973a76b1 14073/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14074 which can conflict with char $ac_func (); below.
14075 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14076 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
14077#ifdef __STDC__
14078# include <limits.h>
14079#else
14080# include <assert.h>
14081#endif
973a76b1
DL
14082/* Override any gcc2 internal prototype to avoid an error. */
14083#ifdef __cplusplus
14084extern "C"
19650fd6 14085{
973a76b1
DL
14086#endif
14087/* We use char because int might match the return type of a gcc2
14088 builtin and then its argument prototype would still apply. */
14089char $ac_func ();
14090/* The GNU C library defines this for functions which it implements
14091 to always fail with ENOSYS. Some functions are actually named
14092 something starting with __ and the normal name is an alias. */
14093#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14094choke me
14095#else
19650fd6
AS
14096char (*f) () = $ac_func;
14097#endif
14098#ifdef __cplusplus
14099}
973a76b1
DL
14100#endif
14101
19650fd6
AS
14102int
14103main ()
14104{
14105return f != $ac_func;
973a76b1
DL
14106 ;
14107 return 0;
14108}
14109_ACEOF
14110rm -f conftest.$ac_objext conftest$ac_exeext
14111if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14112 (eval $ac_link) 2>&5
14113 ac_status=$?
14114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14115 (exit $ac_status); } &&
793fa0d7 14116 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
14117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14118 (eval $ac_try) 2>&5
14119 ac_status=$?
14120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14121 (exit $ac_status); }; }; then
14122 eval "$as_ac_var=yes"
14123else
14124 echo "$as_me: failed program was:" >&5
19650fd6
AS
14125sed 's/^/| /' conftest.$ac_ext >&5
14126
973a76b1
DL
14127eval "$as_ac_var=no"
14128fi
14129rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14130fi
14131echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14132echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14133if test `eval echo '${'$as_ac_var'}'` = yes; then
14134 cat >>confdefs.h <<_ACEOF
14135#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14136_ACEOF
14137
14138else
14139 # strftime is in -lintl on SCO UNIX.
14140echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
14141echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
14142if test "${ac_cv_lib_intl_strftime+set}" = set; then
14143 echo $ECHO_N "(cached) $ECHO_C" >&6
14144else
14145 ac_check_lib_save_LIBS=$LIBS
14146LIBS="-lintl $LIBS"
14147cat >conftest.$ac_ext <<_ACEOF
793fa0d7 14148#line $LINENO "configure"
19650fd6
AS
14149/* confdefs.h. */
14150_ACEOF
14151cat confdefs.h >>conftest.$ac_ext
14152cat >>conftest.$ac_ext <<_ACEOF
14153/* end confdefs.h. */
973a76b1
DL
14154
14155/* Override any gcc2 internal prototype to avoid an error. */
14156#ifdef __cplusplus
14157extern "C"
14158#endif
14159/* We use char because int might match the return type of a gcc2
14160 builtin and then its argument prototype would still apply. */
14161char strftime ();
14162int
14163main ()
14164{
14165strftime ();
14166 ;
14167 return 0;
14168}
14169_ACEOF
14170rm -f conftest.$ac_objext conftest$ac_exeext
14171if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14172 (eval $ac_link) 2>&5
14173 ac_status=$?
14174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14175 (exit $ac_status); } &&
793fa0d7 14176 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
14177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14178 (eval $ac_try) 2>&5
14179 ac_status=$?
14180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14181 (exit $ac_status); }; }; then
14182 ac_cv_lib_intl_strftime=yes
14183else
14184 echo "$as_me: failed program was:" >&5
19650fd6
AS
14185sed 's/^/| /' conftest.$ac_ext >&5
14186
973a76b1
DL
14187ac_cv_lib_intl_strftime=no
14188fi
14189rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14190LIBS=$ac_check_lib_save_LIBS
14191fi
14192echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
14193echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
14194if test $ac_cv_lib_intl_strftime = yes; then
14195 cat >>confdefs.h <<\_ACEOF
14196#define HAVE_STRFTIME 1
14197_ACEOF
14198
14199LIBS="-lintl $LIBS"
14200fi
14201
14202fi
14203done
14204
14205
b936fae4
AS
14206# UNIX98 PTYs.
14207
14208for ac_func in grantpt
503d2be0
AS
14209do
14210as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14211echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
14212echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14213if eval "test \"\${$as_ac_var+set}\" = set"; then
14214 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 14215else
503d2be0 14216 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 14217#line $LINENO "configure"
19650fd6
AS
14218/* confdefs.h. */
14219_ACEOF
14220cat confdefs.h >>conftest.$ac_ext
14221cat >>conftest.$ac_ext <<_ACEOF
14222/* end confdefs.h. */
503d2be0 14223/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14224 which can conflict with char $ac_func (); below.
14225 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14226 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
14227#ifdef __STDC__
14228# include <limits.h>
14229#else
14230# include <assert.h>
14231#endif
4c343001 14232/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14233#ifdef __cplusplus
14234extern "C"
19650fd6 14235{
503d2be0 14236#endif
4c343001 14237/* We use char because int might match the return type of a gcc2
503d2be0
AS
14238 builtin and then its argument prototype would still apply. */
14239char $ac_func ();
503d2be0
AS
14240/* The GNU C library defines this for functions which it implements
14241 to always fail with ENOSYS. Some functions are actually named
14242 something starting with __ and the normal name is an alias. */
14243#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14244choke me
14245#else
19650fd6
AS
14246char (*f) () = $ac_func;
14247#endif
14248#ifdef __cplusplus
14249}
503d2be0 14250#endif
4c343001 14251
19650fd6
AS
14252int
14253main ()
14254{
14255return f != $ac_func;
503d2be0
AS
14256 ;
14257 return 0;
14258}
14259_ACEOF
14260rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14262 (eval $ac_link) 2>&5
14263 ac_status=$?
c0d27fcc 14264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14265 (exit $ac_status); } &&
793fa0d7 14266 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14268 (eval $ac_try) 2>&5
14269 ac_status=$?
c0d27fcc 14270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14271 (exit $ac_status); }; }; then
14272 eval "$as_ac_var=yes"
14273else
14274 echo "$as_me: failed program was:" >&5
19650fd6
AS
14275sed 's/^/| /' conftest.$ac_ext >&5
14276
503d2be0
AS
14277eval "$as_ac_var=no"
14278fi
14279rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14280fi
c0d27fcc 14281echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
14282echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14283if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14284 cat >>confdefs.h <<_ACEOF
503d2be0 14285#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14286_ACEOF
4c343001
DL
14287
14288fi
503d2be0
AS
14289done
14290
c0d27fcc 14291
b936fae4 14292# PTY-related GNU extensions.
4c343001 14293
b936fae4
AS
14294for ac_func in getpt
14295do
14296as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14297echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
14298echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14299if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14300 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 14301else
b936fae4 14302 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 14303#line $LINENO "configure"
19650fd6
AS
14304/* confdefs.h. */
14305_ACEOF
14306cat confdefs.h >>conftest.$ac_ext
14307cat >>conftest.$ac_ext <<_ACEOF
14308/* end confdefs.h. */
087121cc 14309/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14310 which can conflict with char $ac_func (); below.
14311 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14312 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
14313#ifdef __STDC__
14314# include <limits.h>
14315#else
14316# include <assert.h>
14317#endif
087121cc 14318/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14319#ifdef __cplusplus
14320extern "C"
19650fd6 14321{
503d2be0 14322#endif
087121cc 14323/* We use char because int might match the return type of a gcc2
503d2be0
AS
14324 builtin and then its argument prototype would still apply. */
14325char $ac_func ();
087121cc
GM
14326/* The GNU C library defines this for functions which it implements
14327 to always fail with ENOSYS. Some functions are actually named
14328 something starting with __ and the normal name is an alias. */
14329#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14330choke me
14331#else
19650fd6
AS
14332char (*f) () = $ac_func;
14333#endif
14334#ifdef __cplusplus
14335}
087121cc
GM
14336#endif
14337
19650fd6
AS
14338int
14339main ()
14340{
14341return f != $ac_func;
503d2be0
AS
14342 ;
14343 return 0;
14344}
14345_ACEOF
14346rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14347if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14348 (eval $ac_link) 2>&5
14349 ac_status=$?
c0d27fcc 14350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14351 (exit $ac_status); } &&
793fa0d7 14352 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14354 (eval $ac_try) 2>&5
14355 ac_status=$?
c0d27fcc 14356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14357 (exit $ac_status); }; }; then
14358 eval "$as_ac_var=yes"
14359else
14360 echo "$as_me: failed program was:" >&5
19650fd6
AS
14361sed 's/^/| /' conftest.$ac_ext >&5
14362
503d2be0
AS
14363eval "$as_ac_var=no"
14364fi
14365rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14366fi
c0d27fcc 14367echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
14368echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14369if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14370 cat >>confdefs.h <<_ACEOF
503d2be0 14371#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14372_ACEOF
087121cc 14373
087121cc
GM
14374fi
14375done
14376
c0d27fcc 14377
ba4481b5
DL
14378# Check this now, so that we will NOT find the above functions in ncurses.
14379# That is because we have not set up to link ncurses in lib-src.
14380# It's better to believe a function is not available
14381# than to expect to find it in ncurses.
503d2be0 14382
c0d27fcc 14383echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
14384echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
14385if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
14386 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14387else
503d2be0 14388 ac_check_lib_save_LIBS=$LIBS
ba4481b5 14389LIBS="-lncurses $LIBS"
503d2be0 14390cat >conftest.$ac_ext <<_ACEOF
793fa0d7 14391#line $LINENO "configure"
19650fd6
AS
14392/* confdefs.h. */
14393_ACEOF
14394cat confdefs.h >>conftest.$ac_ext
14395cat >>conftest.$ac_ext <<_ACEOF
14396/* end confdefs.h. */
503d2be0 14397
ba4481b5 14398/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14399#ifdef __cplusplus
14400extern "C"
14401#endif
ba4481b5 14402/* We use char because int might match the return type of a gcc2
503d2be0
AS
14403 builtin and then its argument prototype would still apply. */
14404char tparm ();
14405int
14406main ()
14407{
14408tparm ();
14409 ;
14410 return 0;
14411}
14412_ACEOF
14413rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14415 (eval $ac_link) 2>&5
14416 ac_status=$?
c0d27fcc 14417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14418 (exit $ac_status); } &&
793fa0d7 14419 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14421 (eval $ac_try) 2>&5
14422 ac_status=$?
c0d27fcc 14423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14424 (exit $ac_status); }; }; then
14425 ac_cv_lib_ncurses_tparm=yes
14426else
14427 echo "$as_me: failed program was:" >&5
19650fd6
AS
14428sed 's/^/| /' conftest.$ac_ext >&5
14429
503d2be0
AS
14430ac_cv_lib_ncurses_tparm=no
14431fi
14432rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14433LIBS=$ac_check_lib_save_LIBS
14434fi
c0d27fcc 14435echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
14436echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
14437if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 14438 cat >>confdefs.h <<_ACEOF
503d2be0 14439#define HAVE_LIBNCURSES 1
c0d27fcc 14440_ACEOF
ba4481b5
DL
14441
14442 LIBS="-lncurses $LIBS"
14443
ba4481b5
DL
14444fi
14445
c0d27fcc 14446
84e70f78
KR
14447# Do we need the Hesiod library to provide the support routines?
14448if test "$with_hesiod" = yes ; then
14449 # Don't set $LIBS here -- see comments above.
14450 resolv=no
c0d27fcc 14451 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
14452echo $ECHO_N "checking for res_send... $ECHO_C" >&6
14453if test "${ac_cv_func_res_send+set}" = set; then
14454 echo $ECHO_N "(cached) $ECHO_C" >&6
14455else
14456 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 14457#line $LINENO "configure"
19650fd6
AS
14458/* confdefs.h. */
14459_ACEOF
14460cat confdefs.h >>conftest.$ac_ext
14461cat >>conftest.$ac_ext <<_ACEOF
14462/* end confdefs.h. */
84e70f78 14463/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14464 which can conflict with char res_send (); below.
14465 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14466 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
14467#ifdef __STDC__
14468# include <limits.h>
14469#else
14470# include <assert.h>
14471#endif
84e70f78
KR
14472/* Override any gcc2 internal prototype to avoid an error. */
14473#ifdef __cplusplus
14474extern "C"
19650fd6 14475{
84e70f78
KR
14476#endif
14477/* We use char because int might match the return type of a gcc2
14478 builtin and then its argument prototype would still apply. */
14479char res_send ();
84e70f78
KR
14480/* The GNU C library defines this for functions which it implements
14481 to always fail with ENOSYS. Some functions are actually named
14482 something starting with __ and the normal name is an alias. */
14483#if defined (__stub_res_send) || defined (__stub___res_send)
14484choke me
14485#else
19650fd6
AS
14486char (*f) () = res_send;
14487#endif
14488#ifdef __cplusplus
14489}
cd958eb3
MB
14490#endif
14491
19650fd6
AS
14492int
14493main ()
14494{
14495return f != res_send;
84e70f78
KR
14496 ;
14497 return 0;
14498}
14499_ACEOF
14500rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14501if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14502 (eval $ac_link) 2>&5
14503 ac_status=$?
c0d27fcc 14504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 14505 (exit $ac_status); } &&
793fa0d7 14506 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14508 (eval $ac_try) 2>&5
14509 ac_status=$?
c0d27fcc 14510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14511 (exit $ac_status); }; }; then
14512 ac_cv_func_res_send=yes
14513else
14514 echo "$as_me: failed program was:" >&5
19650fd6
AS
14515sed 's/^/| /' conftest.$ac_ext >&5
14516
84e70f78
KR
14517ac_cv_func_res_send=no
14518fi
14519rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14520fi
c0d27fcc 14521echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
14522echo "${ECHO_T}$ac_cv_func_res_send" >&6
14523if test $ac_cv_func_res_send = yes; then
14524 :
14525else
c0d27fcc 14526 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
14527echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
14528if test "${ac_cv_func___res_send+set}" = set; then
14529 echo $ECHO_N "(cached) $ECHO_C" >&6
14530else
14531 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 14532#line $LINENO "configure"
19650fd6
AS
14533/* confdefs.h. */
14534_ACEOF
14535cat confdefs.h >>conftest.$ac_ext
14536cat >>conftest.$ac_ext <<_ACEOF
14537/* end confdefs.h. */
84e70f78 14538/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14539 which can conflict with char __res_send (); below.
14540 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14541 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
14542#ifdef __STDC__
14543# include <limits.h>
14544#else
14545# include <assert.h>
14546#endif
84e70f78
KR
14547/* Override any gcc2 internal prototype to avoid an error. */
14548#ifdef __cplusplus
14549extern "C"
19650fd6 14550{
84e70f78
KR
14551#endif
14552/* We use char because int might match the return type of a gcc2
14553 builtin and then its argument prototype would still apply. */
14554char __res_send ();
84e70f78
KR
14555/* The GNU C library defines this for functions which it implements
14556 to always fail with ENOSYS. Some functions are actually named
14557 something starting with __ and the normal name is an alias. */
14558#if defined (__stub___res_send) || defined (__stub_____res_send)
14559choke me
14560#else
19650fd6
AS
14561char (*f) () = __res_send;
14562#endif
14563#ifdef __cplusplus
14564}
84e70f78
KR
14565#endif
14566
19650fd6
AS
14567int
14568main ()
14569{
14570return f != __res_send;
84e70f78
KR
14571 ;
14572 return 0;
14573}
14574_ACEOF
14575rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14576if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14577 (eval $ac_link) 2>&5
14578 ac_status=$?
c0d27fcc 14579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 14580 (exit $ac_status); } &&
793fa0d7 14581 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14583 (eval $ac_try) 2>&5
14584 ac_status=$?
c0d27fcc 14585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14586 (exit $ac_status); }; }; then
14587 ac_cv_func___res_send=yes
14588else
14589 echo "$as_me: failed program was:" >&5
19650fd6
AS
14590sed 's/^/| /' conftest.$ac_ext >&5
14591
84e70f78
KR
14592ac_cv_func___res_send=no
14593fi
14594rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14595fi
c0d27fcc 14596echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
14597echo "${ECHO_T}$ac_cv_func___res_send" >&6
14598if test $ac_cv_func___res_send = yes; then
14599 :
14600else
c0d27fcc 14601 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
14602echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
14603if test "${ac_cv_lib_resolv_res_send+set}" = set; then
14604 echo $ECHO_N "(cached) $ECHO_C" >&6
14605else
14606 ac_check_lib_save_LIBS=$LIBS
14607LIBS="-lresolv $LIBS"
14608cat >conftest.$ac_ext <<_ACEOF
793fa0d7 14609#line $LINENO "configure"
19650fd6
AS
14610/* confdefs.h. */
14611_ACEOF
14612cat confdefs.h >>conftest.$ac_ext
14613cat >>conftest.$ac_ext <<_ACEOF
14614/* end confdefs.h. */
84e70f78
KR
14615
14616/* Override any gcc2 internal prototype to avoid an error. */
14617#ifdef __cplusplus
14618extern "C"
14619#endif
14620/* We use char because int might match the return type of a gcc2
14621 builtin and then its argument prototype would still apply. */
14622char res_send ();
14623int
14624main ()
14625{
14626res_send ();
14627 ;
14628 return 0;
14629}
14630_ACEOF
14631rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14632if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14633 (eval $ac_link) 2>&5
14634 ac_status=$?
c0d27fcc 14635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 14636 (exit $ac_status); } &&
793fa0d7 14637 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14639 (eval $ac_try) 2>&5
14640 ac_status=$?
c0d27fcc 14641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14642 (exit $ac_status); }; }; then
14643 ac_cv_lib_resolv_res_send=yes
14644else
14645 echo "$as_me: failed program was:" >&5
19650fd6
AS
14646sed 's/^/| /' conftest.$ac_ext >&5
14647
84e70f78
KR
14648ac_cv_lib_resolv_res_send=no
14649fi
14650rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14651LIBS=$ac_check_lib_save_LIBS
14652fi
c0d27fcc 14653echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
14654echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
14655if test $ac_cv_lib_resolv_res_send = yes; then
14656 resolv=yes
14657else
c0d27fcc 14658 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
14659echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
14660if test "${ac_cv_lib_resolv___res_send+set}" = set; then
14661 echo $ECHO_N "(cached) $ECHO_C" >&6
14662else
14663 ac_check_lib_save_LIBS=$LIBS
14664LIBS="-lresolv $LIBS"
14665cat >conftest.$ac_ext <<_ACEOF
793fa0d7 14666#line $LINENO "configure"
19650fd6
AS
14667/* confdefs.h. */
14668_ACEOF
14669cat confdefs.h >>conftest.$ac_ext
14670cat >>conftest.$ac_ext <<_ACEOF
14671/* end confdefs.h. */
84e70f78
KR
14672
14673/* Override any gcc2 internal prototype to avoid an error. */
14674#ifdef __cplusplus
14675extern "C"
14676#endif
14677/* We use char because int might match the return type of a gcc2
14678 builtin and then its argument prototype would still apply. */
14679char __res_send ();
14680int
14681main ()
14682{
14683__res_send ();
14684 ;
14685 return 0;
14686}
14687_ACEOF
14688rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14689if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14690 (eval $ac_link) 2>&5
14691 ac_status=$?
c0d27fcc 14692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 14693 (exit $ac_status); } &&
793fa0d7 14694 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14696 (eval $ac_try) 2>&5
14697 ac_status=$?
c0d27fcc 14698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14699 (exit $ac_status); }; }; then
14700 ac_cv_lib_resolv___res_send=yes
14701else
14702 echo "$as_me: failed program was:" >&5
19650fd6
AS
14703sed 's/^/| /' conftest.$ac_ext >&5
14704
84e70f78
KR
14705ac_cv_lib_resolv___res_send=no
14706fi
14707rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14708LIBS=$ac_check_lib_save_LIBS
14709fi
c0d27fcc 14710echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
14711echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
14712if test $ac_cv_lib_resolv___res_send = yes; then
14713 resolv=yes
14714fi
14715
14716fi
14717
14718fi
14719
14720fi
14721
14722 if test "$resolv" = yes ; then
14723 RESOLVLIB=-lresolv
b936fae4 14724
c0d27fcc 14725cat >>confdefs.h <<\_ACEOF
84e70f78 14726#define HAVE_LIBRESOLV 1
c0d27fcc 14727_ACEOF
84e70f78
KR
14728
14729 else
14730 RESOLVLIB=
14731 fi
c0d27fcc 14732 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
14733echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
14734if test "${ac_cv_func_hes_getmailhost+set}" = set; then
14735 echo $ECHO_N "(cached) $ECHO_C" >&6
14736else
14737 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 14738#line $LINENO "configure"
19650fd6
AS
14739/* confdefs.h. */
14740_ACEOF
14741cat confdefs.h >>conftest.$ac_ext
14742cat >>conftest.$ac_ext <<_ACEOF
14743/* end confdefs.h. */
84e70f78 14744/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14745 which can conflict with char hes_getmailhost (); below.
14746 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14747 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
14748#ifdef __STDC__
14749# include <limits.h>
14750#else
14751# include <assert.h>
14752#endif
84e70f78
KR
14753/* Override any gcc2 internal prototype to avoid an error. */
14754#ifdef __cplusplus
14755extern "C"
19650fd6 14756{
84e70f78
KR
14757#endif
14758/* We use char because int might match the return type of a gcc2
14759 builtin and then its argument prototype would still apply. */
14760char hes_getmailhost ();
84e70f78
KR
14761/* The GNU C library defines this for functions which it implements
14762 to always fail with ENOSYS. Some functions are actually named
14763 something starting with __ and the normal name is an alias. */
14764#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
14765choke me
14766#else
19650fd6
AS
14767char (*f) () = hes_getmailhost;
14768#endif
14769#ifdef __cplusplus
14770}
cd958eb3
MB
14771#endif
14772
19650fd6
AS
14773int
14774main ()
14775{
14776return f != hes_getmailhost;
84e70f78
KR
14777 ;
14778 return 0;
14779}
14780_ACEOF
14781rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14782if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14783 (eval $ac_link) 2>&5
14784 ac_status=$?
c0d27fcc 14785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 14786 (exit $ac_status); } &&
793fa0d7 14787 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14789 (eval $ac_try) 2>&5
14790 ac_status=$?
c0d27fcc 14791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14792 (exit $ac_status); }; }; then
14793 ac_cv_func_hes_getmailhost=yes
14794else
14795 echo "$as_me: failed program was:" >&5
19650fd6
AS
14796sed 's/^/| /' conftest.$ac_ext >&5
14797
84e70f78
KR
14798ac_cv_func_hes_getmailhost=no
14799fi
14800rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14801fi
c0d27fcc 14802echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
14803echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
14804if test $ac_cv_func_hes_getmailhost = yes; then
14805 :
14806else
c0d27fcc 14807 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
14808echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
14809if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
14810 echo $ECHO_N "(cached) $ECHO_C" >&6
14811else
14812 ac_check_lib_save_LIBS=$LIBS
14813LIBS="-lhesiod $RESOLVLIB $LIBS"
14814cat >conftest.$ac_ext <<_ACEOF
793fa0d7 14815#line $LINENO "configure"
19650fd6
AS
14816/* confdefs.h. */
14817_ACEOF
14818cat confdefs.h >>conftest.$ac_ext
14819cat >>conftest.$ac_ext <<_ACEOF
14820/* end confdefs.h. */
84e70f78
KR
14821
14822/* Override any gcc2 internal prototype to avoid an error. */
14823#ifdef __cplusplus
14824extern "C"
14825#endif
14826/* We use char because int might match the return type of a gcc2
14827 builtin and then its argument prototype would still apply. */
14828char hes_getmailhost ();
14829int
14830main ()
14831{
14832hes_getmailhost ();
14833 ;
14834 return 0;
14835}
14836_ACEOF
14837rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14838if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14839 (eval $ac_link) 2>&5
14840 ac_status=$?
c0d27fcc 14841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 14842 (exit $ac_status); } &&
793fa0d7 14843 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14845 (eval $ac_try) 2>&5
14846 ac_status=$?
c0d27fcc 14847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14848 (exit $ac_status); }; }; then
14849 ac_cv_lib_hesiod_hes_getmailhost=yes
14850else
14851 echo "$as_me: failed program was:" >&5
19650fd6
AS
14852sed 's/^/| /' conftest.$ac_ext >&5
14853
84e70f78
KR
14854ac_cv_lib_hesiod_hes_getmailhost=no
14855fi
14856rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14857LIBS=$ac_check_lib_save_LIBS
14858fi
c0d27fcc 14859echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
14860echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
14861if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 14862
c0d27fcc 14863cat >>confdefs.h <<\_ACEOF
84e70f78 14864#define HAVE_LIBHESIOD 1
c0d27fcc 14865_ACEOF
84e70f78
KR
14866
14867else
14868 :
14869fi
14870
14871fi
14872
14873fi
14874
a21616bd
KR
14875# These tell us which Kerberos-related libraries to use.
14876if test "${with_kerberos+set}" = set; then
503d2be0 14877
c0d27fcc 14878echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
14879echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
14880if test "${ac_cv_lib_com_err_com_err+set}" = set; then
14881 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14882else
503d2be0 14883 ac_check_lib_save_LIBS=$LIBS
a21616bd 14884LIBS="-lcom_err $LIBS"
503d2be0 14885cat >conftest.$ac_ext <<_ACEOF
793fa0d7 14886#line $LINENO "configure"
19650fd6
AS
14887/* confdefs.h. */
14888_ACEOF
14889cat confdefs.h >>conftest.$ac_ext
14890cat >>conftest.$ac_ext <<_ACEOF
14891/* end confdefs.h. */
503d2be0 14892
a21616bd 14893/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14894#ifdef __cplusplus
14895extern "C"
14896#endif
a21616bd 14897/* We use char because int might match the return type of a gcc2
503d2be0
AS
14898 builtin and then its argument prototype would still apply. */
14899char com_err ();
14900int
14901main ()
14902{
14903com_err ();
14904 ;
14905 return 0;
14906}
14907_ACEOF
14908rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14909if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14910 (eval $ac_link) 2>&5
14911 ac_status=$?
c0d27fcc 14912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14913 (exit $ac_status); } &&
793fa0d7 14914 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14916 (eval $ac_try) 2>&5
14917 ac_status=$?
c0d27fcc 14918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14919 (exit $ac_status); }; }; then
14920 ac_cv_lib_com_err_com_err=yes
14921else
14922 echo "$as_me: failed program was:" >&5
19650fd6
AS
14923sed 's/^/| /' conftest.$ac_ext >&5
14924
503d2be0
AS
14925ac_cv_lib_com_err_com_err=no
14926fi
14927rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14928LIBS=$ac_check_lib_save_LIBS
14929fi
c0d27fcc 14930echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
14931echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
14932if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 14933 cat >>confdefs.h <<_ACEOF
503d2be0 14934#define HAVE_LIBCOM_ERR 1
c0d27fcc 14935_ACEOF
a21616bd
KR
14936
14937 LIBS="-lcom_err $LIBS"
14938
a21616bd
KR
14939fi
14940
c0d27fcc
MR
14941
14942echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
14943echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
14944if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
14945 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14946else
503d2be0 14947 ac_check_lib_save_LIBS=$LIBS
a21616bd 14948LIBS="-lk5crypto $LIBS"
503d2be0 14949cat >conftest.$ac_ext <<_ACEOF
793fa0d7 14950#line $LINENO "configure"
19650fd6
AS
14951/* confdefs.h. */
14952_ACEOF
14953cat confdefs.h >>conftest.$ac_ext
14954cat >>conftest.$ac_ext <<_ACEOF
14955/* end confdefs.h. */
503d2be0 14956
a21616bd 14957/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14958#ifdef __cplusplus
14959extern "C"
14960#endif
a21616bd 14961/* We use char because int might match the return type of a gcc2
503d2be0
AS
14962 builtin and then its argument prototype would still apply. */
14963char mit_des_cbc_encrypt ();
14964int
14965main ()
14966{
14967mit_des_cbc_encrypt ();
14968 ;
14969 return 0;
14970}
14971_ACEOF
14972rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14974 (eval $ac_link) 2>&5
14975 ac_status=$?
c0d27fcc 14976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14977 (exit $ac_status); } &&
793fa0d7 14978 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14980 (eval $ac_try) 2>&5
14981 ac_status=$?
c0d27fcc 14982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14983 (exit $ac_status); }; }; then
14984 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
14985else
14986 echo "$as_me: failed program was:" >&5
19650fd6
AS
14987sed 's/^/| /' conftest.$ac_ext >&5
14988
503d2be0
AS
14989ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
14990fi
14991rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14992LIBS=$ac_check_lib_save_LIBS
14993fi
c0d27fcc 14994echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
14995echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
14996if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 14997 cat >>confdefs.h <<_ACEOF
503d2be0 14998#define HAVE_LIBK5CRYPTO 1
c0d27fcc 14999_ACEOF
a21616bd
KR
15000
15001 LIBS="-lk5crypto $LIBS"
15002
a21616bd
KR
15003fi
15004
c0d27fcc
MR
15005
15006echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
15007echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
15008if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
15009 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 15010else
503d2be0 15011 ac_check_lib_save_LIBS=$LIBS
a21616bd 15012LIBS="-lcrypto $LIBS"
503d2be0 15013cat >conftest.$ac_ext <<_ACEOF
793fa0d7 15014#line $LINENO "configure"
19650fd6
AS
15015/* confdefs.h. */
15016_ACEOF
15017cat confdefs.h >>conftest.$ac_ext
15018cat >>conftest.$ac_ext <<_ACEOF
15019/* end confdefs.h. */
503d2be0 15020
a21616bd 15021/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15022#ifdef __cplusplus
15023extern "C"
15024#endif
a21616bd 15025/* We use char because int might match the return type of a gcc2
503d2be0
AS
15026 builtin and then its argument prototype would still apply. */
15027char mit_des_cbc_encrypt ();
15028int
15029main ()
15030{
15031mit_des_cbc_encrypt ();
15032 ;
15033 return 0;
15034}
15035_ACEOF
15036rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15037if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15038 (eval $ac_link) 2>&5
15039 ac_status=$?
c0d27fcc 15040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15041 (exit $ac_status); } &&
793fa0d7 15042 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15044 (eval $ac_try) 2>&5
15045 ac_status=$?
c0d27fcc 15046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15047 (exit $ac_status); }; }; then
15048 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
15049else
15050 echo "$as_me: failed program was:" >&5
19650fd6
AS
15051sed 's/^/| /' conftest.$ac_ext >&5
15052
503d2be0
AS
15053ac_cv_lib_crypto_mit_des_cbc_encrypt=no
15054fi
15055rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15056LIBS=$ac_check_lib_save_LIBS
15057fi
c0d27fcc 15058echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
15059echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
15060if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 15061 cat >>confdefs.h <<_ACEOF
503d2be0 15062#define HAVE_LIBCRYPTO 1
c0d27fcc 15063_ACEOF
a21616bd
KR
15064
15065 LIBS="-lcrypto $LIBS"
15066
a21616bd
KR
15067fi
15068
c0d27fcc
MR
15069
15070echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
15071echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
15072if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
15073 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 15074else
503d2be0 15075 ac_check_lib_save_LIBS=$LIBS
a21616bd 15076LIBS="-lkrb5 $LIBS"
503d2be0 15077cat >conftest.$ac_ext <<_ACEOF
793fa0d7 15078#line $LINENO "configure"
19650fd6
AS
15079/* confdefs.h. */
15080_ACEOF
15081cat confdefs.h >>conftest.$ac_ext
15082cat >>conftest.$ac_ext <<_ACEOF
15083/* end confdefs.h. */
a21616bd 15084
503d2be0
AS
15085/* Override any gcc2 internal prototype to avoid an error. */
15086#ifdef __cplusplus
15087extern "C"
15088#endif
15089/* We use char because int might match the return type of a gcc2
15090 builtin and then its argument prototype would still apply. */
15091char krb5_init_context ();
15092int
15093main ()
15094{
15095krb5_init_context ();
15096 ;
15097 return 0;
15098}
15099_ACEOF
15100rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15102 (eval $ac_link) 2>&5
15103 ac_status=$?
c0d27fcc 15104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15105 (exit $ac_status); } &&
793fa0d7 15106 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15108 (eval $ac_try) 2>&5
15109 ac_status=$?
c0d27fcc 15110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15111 (exit $ac_status); }; }; then
15112 ac_cv_lib_krb5_krb5_init_context=yes
15113else
15114 echo "$as_me: failed program was:" >&5
19650fd6
AS
15115sed 's/^/| /' conftest.$ac_ext >&5
15116
503d2be0
AS
15117ac_cv_lib_krb5_krb5_init_context=no
15118fi
15119rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15120LIBS=$ac_check_lib_save_LIBS
15121fi
c0d27fcc 15122echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
15123echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
15124if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 15125 cat >>confdefs.h <<_ACEOF
503d2be0 15126#define HAVE_LIBKRB5 1
c0d27fcc 15127_ACEOF
a21616bd
KR
15128
15129 LIBS="-lkrb5 $LIBS"
15130
a21616bd
KR
15131fi
15132
15133 if test "${with_kerberos5+set}" != set; then
503d2be0 15134
c0d27fcc 15135echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
15136echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
15137if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
15138 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 15139else
503d2be0 15140 ac_check_lib_save_LIBS=$LIBS
a21616bd 15141LIBS="-ldes425 $LIBS"
503d2be0 15142cat >conftest.$ac_ext <<_ACEOF
793fa0d7 15143#line $LINENO "configure"
19650fd6
AS
15144/* confdefs.h. */
15145_ACEOF
15146cat confdefs.h >>conftest.$ac_ext
15147cat >>conftest.$ac_ext <<_ACEOF
15148/* end confdefs.h. */
503d2be0 15149
a21616bd 15150/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15151#ifdef __cplusplus
15152extern "C"
15153#endif
a21616bd 15154/* We use char because int might match the return type of a gcc2
503d2be0
AS
15155 builtin and then its argument prototype would still apply. */
15156char des_cbc_encrypt ();
15157int
15158main ()
15159{
15160des_cbc_encrypt ();
15161 ;
15162 return 0;
15163}
15164_ACEOF
15165rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15166if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15167 (eval $ac_link) 2>&5
15168 ac_status=$?
c0d27fcc 15169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15170 (exit $ac_status); } &&
793fa0d7 15171 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15173 (eval $ac_try) 2>&5
15174 ac_status=$?
c0d27fcc 15175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15176 (exit $ac_status); }; }; then
15177 ac_cv_lib_des425_des_cbc_encrypt=yes
15178else
15179 echo "$as_me: failed program was:" >&5
19650fd6
AS
15180sed 's/^/| /' conftest.$ac_ext >&5
15181
503d2be0
AS
15182ac_cv_lib_des425_des_cbc_encrypt=no
15183fi
15184rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15185LIBS=$ac_check_lib_save_LIBS
15186fi
c0d27fcc 15187echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
15188echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
15189if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 15190 cat >>confdefs.h <<_ACEOF
503d2be0 15191#define HAVE_LIBDES425 1
c0d27fcc 15192_ACEOF
a21616bd
KR
15193
15194 LIBS="-ldes425 $LIBS"
15195
15196else
503d2be0 15197
c0d27fcc 15198echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
15199echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
15200if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
15201 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 15202else
503d2be0 15203 ac_check_lib_save_LIBS=$LIBS
a21616bd 15204LIBS="-ldes $LIBS"
503d2be0 15205cat >conftest.$ac_ext <<_ACEOF
793fa0d7 15206#line $LINENO "configure"
19650fd6
AS
15207/* confdefs.h. */
15208_ACEOF
15209cat confdefs.h >>conftest.$ac_ext
15210cat >>conftest.$ac_ext <<_ACEOF
15211/* end confdefs.h. */
503d2be0 15212
a21616bd 15213/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15214#ifdef __cplusplus
15215extern "C"
15216#endif
a21616bd 15217/* We use char because int might match the return type of a gcc2
503d2be0
AS
15218 builtin and then its argument prototype would still apply. */
15219char des_cbc_encrypt ();
15220int
15221main ()
15222{
15223des_cbc_encrypt ();
15224 ;
15225 return 0;
15226}
15227_ACEOF
15228rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15229if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15230 (eval $ac_link) 2>&5
15231 ac_status=$?
c0d27fcc 15232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15233 (exit $ac_status); } &&
793fa0d7 15234 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15236 (eval $ac_try) 2>&5
15237 ac_status=$?
c0d27fcc 15238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15239 (exit $ac_status); }; }; then
15240 ac_cv_lib_des_des_cbc_encrypt=yes
15241else
15242 echo "$as_me: failed program was:" >&5
19650fd6
AS
15243sed 's/^/| /' conftest.$ac_ext >&5
15244
503d2be0
AS
15245ac_cv_lib_des_des_cbc_encrypt=no
15246fi
15247rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15248LIBS=$ac_check_lib_save_LIBS
15249fi
c0d27fcc 15250echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
15251echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
15252if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 15253 cat >>confdefs.h <<_ACEOF
503d2be0 15254#define HAVE_LIBDES 1
c0d27fcc 15255_ACEOF
a21616bd
KR
15256
15257 LIBS="-ldes $LIBS"
15258
a21616bd
KR
15259fi
15260
15261fi
15262
c0d27fcc
MR
15263
15264echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
15265echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
15266if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
15267 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 15268else
503d2be0 15269 ac_check_lib_save_LIBS=$LIBS
a21616bd 15270LIBS="-lkrb4 $LIBS"
503d2be0 15271cat >conftest.$ac_ext <<_ACEOF
793fa0d7 15272#line $LINENO "configure"
19650fd6
AS
15273/* confdefs.h. */
15274_ACEOF
15275cat confdefs.h >>conftest.$ac_ext
15276cat >>conftest.$ac_ext <<_ACEOF
15277/* end confdefs.h. */
503d2be0 15278
a21616bd 15279/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15280#ifdef __cplusplus
15281extern "C"
15282#endif
a21616bd 15283/* We use char because int might match the return type of a gcc2
503d2be0
AS
15284 builtin and then its argument prototype would still apply. */
15285char krb_get_cred ();
15286int
15287main ()
15288{
15289krb_get_cred ();
15290 ;
15291 return 0;
15292}
15293_ACEOF
15294rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15295if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15296 (eval $ac_link) 2>&5
15297 ac_status=$?
c0d27fcc 15298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15299 (exit $ac_status); } &&
793fa0d7 15300 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15302 (eval $ac_try) 2>&5
15303 ac_status=$?
c0d27fcc 15304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15305 (exit $ac_status); }; }; then
15306 ac_cv_lib_krb4_krb_get_cred=yes
15307else
15308 echo "$as_me: failed program was:" >&5
19650fd6
AS
15309sed 's/^/| /' conftest.$ac_ext >&5
15310
503d2be0
AS
15311ac_cv_lib_krb4_krb_get_cred=no
15312fi
15313rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15314LIBS=$ac_check_lib_save_LIBS
15315fi
c0d27fcc 15316echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
15317echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
15318if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 15319 cat >>confdefs.h <<_ACEOF
503d2be0 15320#define HAVE_LIBKRB4 1
c0d27fcc 15321_ACEOF
a21616bd
KR
15322
15323 LIBS="-lkrb4 $LIBS"
15324
15325else
503d2be0 15326
c0d27fcc 15327echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
15328echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
15329if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
15330 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 15331else
503d2be0 15332 ac_check_lib_save_LIBS=$LIBS
a21616bd 15333LIBS="-lkrb $LIBS"
503d2be0 15334cat >conftest.$ac_ext <<_ACEOF
793fa0d7 15335#line $LINENO "configure"
19650fd6
AS
15336/* confdefs.h. */
15337_ACEOF
15338cat confdefs.h >>conftest.$ac_ext
15339cat >>conftest.$ac_ext <<_ACEOF
15340/* end confdefs.h. */
503d2be0 15341
a21616bd 15342/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15343#ifdef __cplusplus
15344extern "C"
15345#endif
a21616bd 15346/* We use char because int might match the return type of a gcc2
503d2be0
AS
15347 builtin and then its argument prototype would still apply. */
15348char krb_get_cred ();
15349int
15350main ()
15351{
15352krb_get_cred ();
15353 ;
15354 return 0;
15355}
15356_ACEOF
15357rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15358if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15359 (eval $ac_link) 2>&5
15360 ac_status=$?
c0d27fcc 15361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15362 (exit $ac_status); } &&
793fa0d7 15363 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15365 (eval $ac_try) 2>&5
15366 ac_status=$?
c0d27fcc 15367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15368 (exit $ac_status); }; }; then
15369 ac_cv_lib_krb_krb_get_cred=yes
15370else
15371 echo "$as_me: failed program was:" >&5
19650fd6
AS
15372sed 's/^/| /' conftest.$ac_ext >&5
15373
503d2be0
AS
15374ac_cv_lib_krb_krb_get_cred=no
15375fi
15376rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15377LIBS=$ac_check_lib_save_LIBS
15378fi
c0d27fcc 15379echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
15380echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
15381if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 15382 cat >>confdefs.h <<_ACEOF
503d2be0 15383#define HAVE_LIBKRB 1
c0d27fcc 15384_ACEOF
a21616bd
KR
15385
15386 LIBS="-lkrb $LIBS"
15387
a21616bd
KR
15388fi
15389
15390fi
15391
15392 fi
15393
15394 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
15395
15396for ac_header in krb5.h
a21616bd 15397do
503d2be0 15398as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15399if eval "test \"\${$as_ac_Header+set}\" = set"; then
15400 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15401echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15402if eval "test \"\${$as_ac_Header+set}\" = set"; then
15403 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15404fi
15405echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15406echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15407else
c0d27fcc
MR
15408 # Is the header compilable?
15409echo "$as_me:$LINENO: checking $ac_header usability" >&5
15410echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15411cat >conftest.$ac_ext <<_ACEOF
793fa0d7 15412#line $LINENO "configure"
19650fd6
AS
15413/* confdefs.h. */
15414_ACEOF
15415cat confdefs.h >>conftest.$ac_ext
15416cat >>conftest.$ac_ext <<_ACEOF
15417/* end confdefs.h. */
c0d27fcc
MR
15418$ac_includes_default
15419#include <$ac_header>
15420_ACEOF
15421rm -f conftest.$ac_objext
15422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15423 (eval $ac_compile) 2>&5
15424 ac_status=$?
15425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15426 (exit $ac_status); } &&
793fa0d7 15427 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15429 (eval $ac_try) 2>&5
15430 ac_status=$?
15431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15432 (exit $ac_status); }; }; then
15433 ac_header_compiler=yes
15434else
15435 echo "$as_me: failed program was:" >&5
19650fd6
AS
15436sed 's/^/| /' conftest.$ac_ext >&5
15437
c0d27fcc
MR
15438ac_header_compiler=no
15439fi
15440rm -f conftest.$ac_objext conftest.$ac_ext
15441echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15442echo "${ECHO_T}$ac_header_compiler" >&6
15443
15444# Is the header present?
15445echo "$as_me:$LINENO: checking $ac_header presence" >&5
15446echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15447cat >conftest.$ac_ext <<_ACEOF
793fa0d7 15448#line $LINENO "configure"
19650fd6
AS
15449/* confdefs.h. */
15450_ACEOF
15451cat confdefs.h >>conftest.$ac_ext
15452cat >>conftest.$ac_ext <<_ACEOF
15453/* end confdefs.h. */
503d2be0
AS
15454#include <$ac_header>
15455_ACEOF
c0d27fcc 15456if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15457 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15458 ac_status=$?
6bae0ccf 15459 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15460 rm -f conftest.er1
15461 cat conftest.err >&5
c0d27fcc 15462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15463 (exit $ac_status); } >/dev/null; then
15464 if test -s conftest.err; then
15465 ac_cpp_err=$ac_c_preproc_warn_flag
15466 else
15467 ac_cpp_err=
15468 fi
15469else
15470 ac_cpp_err=yes
15471fi
15472if test -z "$ac_cpp_err"; then
c0d27fcc 15473 ac_header_preproc=yes
503d2be0
AS
15474else
15475 echo "$as_me: failed program was:" >&5
19650fd6
AS
15476sed 's/^/| /' conftest.$ac_ext >&5
15477
c0d27fcc 15478 ac_header_preproc=no
a21616bd 15479fi
503d2be0 15480rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15481echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15482echo "${ECHO_T}$ac_header_preproc" >&6
15483
15484# So? What about this header?
15485case $ac_header_compiler:$ac_header_preproc in
15486 yes:no )
15487 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15488echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
15489 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15490echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15491 (
15492 cat <<\_ASBOX
15493## ------------------------------------ ##
15494## Report this to bug-autoconf@gnu.org. ##
15495## ------------------------------------ ##
15496_ASBOX
15497 ) |
15498 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 15499 ;;
c0d27fcc
MR
15500 no:yes )
15501 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15502echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
15503 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15504echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 15505 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15506echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
15507 (
15508 cat <<\_ASBOX
793fa0d7
DL
15509## ------------------------------------ ##
15510## Report this to bug-autoconf@gnu.org. ##
15511## ------------------------------------ ##
19650fd6
AS
15512_ASBOX
15513 ) |
15514 sed "s/^/$as_me: WARNING: /" >&2
15515 ;;
c0d27fcc
MR
15516esac
15517echo "$as_me:$LINENO: checking for $ac_header" >&5
15518echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15519if eval "test \"\${$as_ac_Header+set}\" = set"; then
15520 echo $ECHO_N "(cached) $ECHO_C" >&6
15521else
793fa0d7 15522 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15523fi
c0d27fcc 15524echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15525echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15526
15527fi
503d2be0 15528if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15529 cat >>confdefs.h <<_ACEOF
503d2be0 15530#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15531_ACEOF
503d2be0 15532
a21616bd 15533fi
c0d27fcc 15534
a21616bd
KR
15535done
15536
15537 else
503d2be0
AS
15538
15539for ac_header in des.h
a21616bd 15540do
503d2be0 15541as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15542if eval "test \"\${$as_ac_Header+set}\" = set"; then
15543 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15544echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15545if eval "test \"\${$as_ac_Header+set}\" = set"; then
15546 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15547fi
15548echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15549echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15550else
c0d27fcc
MR
15551 # Is the header compilable?
15552echo "$as_me:$LINENO: checking $ac_header usability" >&5
15553echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15554cat >conftest.$ac_ext <<_ACEOF
793fa0d7 15555#line $LINENO "configure"
19650fd6
AS
15556/* confdefs.h. */
15557_ACEOF
15558cat confdefs.h >>conftest.$ac_ext
15559cat >>conftest.$ac_ext <<_ACEOF
15560/* end confdefs.h. */
c0d27fcc
MR
15561$ac_includes_default
15562#include <$ac_header>
15563_ACEOF
15564rm -f conftest.$ac_objext
15565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15566 (eval $ac_compile) 2>&5
15567 ac_status=$?
15568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15569 (exit $ac_status); } &&
793fa0d7 15570 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15572 (eval $ac_try) 2>&5
15573 ac_status=$?
15574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15575 (exit $ac_status); }; }; then
15576 ac_header_compiler=yes
15577else
15578 echo "$as_me: failed program was:" >&5
19650fd6
AS
15579sed 's/^/| /' conftest.$ac_ext >&5
15580
c0d27fcc
MR
15581ac_header_compiler=no
15582fi
15583rm -f conftest.$ac_objext conftest.$ac_ext
15584echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15585echo "${ECHO_T}$ac_header_compiler" >&6
15586
15587# Is the header present?
15588echo "$as_me:$LINENO: checking $ac_header presence" >&5
15589echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15590cat >conftest.$ac_ext <<_ACEOF
793fa0d7 15591#line $LINENO "configure"
19650fd6
AS
15592/* confdefs.h. */
15593_ACEOF
15594cat confdefs.h >>conftest.$ac_ext
15595cat >>conftest.$ac_ext <<_ACEOF
15596/* end confdefs.h. */
503d2be0
AS
15597#include <$ac_header>
15598_ACEOF
c0d27fcc 15599if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15600 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15601 ac_status=$?
6bae0ccf 15602 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15603 rm -f conftest.er1
15604 cat conftest.err >&5
c0d27fcc 15605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15606 (exit $ac_status); } >/dev/null; then
15607 if test -s conftest.err; then
15608 ac_cpp_err=$ac_c_preproc_warn_flag
15609 else
15610 ac_cpp_err=
15611 fi
15612else
15613 ac_cpp_err=yes
15614fi
15615if test -z "$ac_cpp_err"; then
c0d27fcc 15616 ac_header_preproc=yes
503d2be0
AS
15617else
15618 echo "$as_me: failed program was:" >&5
19650fd6
AS
15619sed 's/^/| /' conftest.$ac_ext >&5
15620
c0d27fcc 15621 ac_header_preproc=no
a21616bd 15622fi
503d2be0 15623rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15624echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15625echo "${ECHO_T}$ac_header_preproc" >&6
15626
15627# So? What about this header?
15628case $ac_header_compiler:$ac_header_preproc in
15629 yes:no )
15630 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15631echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
15632 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15633echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15634 (
15635 cat <<\_ASBOX
15636## ------------------------------------ ##
15637## Report this to bug-autoconf@gnu.org. ##
15638## ------------------------------------ ##
15639_ASBOX
15640 ) |
15641 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 15642 ;;
c0d27fcc
MR
15643 no:yes )
15644 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15645echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
15646 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15647echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 15648 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15649echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
15650 (
15651 cat <<\_ASBOX
793fa0d7
DL
15652## ------------------------------------ ##
15653## Report this to bug-autoconf@gnu.org. ##
15654## ------------------------------------ ##
19650fd6
AS
15655_ASBOX
15656 ) |
15657 sed "s/^/$as_me: WARNING: /" >&2
15658 ;;
c0d27fcc
MR
15659esac
15660echo "$as_me:$LINENO: checking for $ac_header" >&5
15661echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15662if eval "test \"\${$as_ac_Header+set}\" = set"; then
15663 echo $ECHO_N "(cached) $ECHO_C" >&6
15664else
793fa0d7 15665 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15666fi
c0d27fcc 15667echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15668echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15669
15670fi
503d2be0 15671if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15672 cat >>confdefs.h <<_ACEOF
503d2be0 15673#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15674_ACEOF
503d2be0 15675
a21616bd 15676else
503d2be0
AS
15677
15678for ac_header in kerberosIV/des.h
a21616bd 15679do
503d2be0 15680as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15681if eval "test \"\${$as_ac_Header+set}\" = set"; then
15682 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15683echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15684if eval "test \"\${$as_ac_Header+set}\" = set"; then
15685 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15686fi
15687echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15688echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15689else
c0d27fcc
MR
15690 # Is the header compilable?
15691echo "$as_me:$LINENO: checking $ac_header usability" >&5
15692echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15693cat >conftest.$ac_ext <<_ACEOF
793fa0d7 15694#line $LINENO "configure"
19650fd6
AS
15695/* confdefs.h. */
15696_ACEOF
15697cat confdefs.h >>conftest.$ac_ext
15698cat >>conftest.$ac_ext <<_ACEOF
15699/* end confdefs.h. */
c0d27fcc
MR
15700$ac_includes_default
15701#include <$ac_header>
15702_ACEOF
15703rm -f conftest.$ac_objext
15704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15705 (eval $ac_compile) 2>&5
15706 ac_status=$?
15707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15708 (exit $ac_status); } &&
793fa0d7 15709 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15711 (eval $ac_try) 2>&5
15712 ac_status=$?
15713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15714 (exit $ac_status); }; }; then
15715 ac_header_compiler=yes
15716else
15717 echo "$as_me: failed program was:" >&5
19650fd6
AS
15718sed 's/^/| /' conftest.$ac_ext >&5
15719
c0d27fcc
MR
15720ac_header_compiler=no
15721fi
15722rm -f conftest.$ac_objext conftest.$ac_ext
15723echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15724echo "${ECHO_T}$ac_header_compiler" >&6
15725
15726# Is the header present?
15727echo "$as_me:$LINENO: checking $ac_header presence" >&5
15728echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15729cat >conftest.$ac_ext <<_ACEOF
793fa0d7 15730#line $LINENO "configure"
19650fd6
AS
15731/* confdefs.h. */
15732_ACEOF
15733cat confdefs.h >>conftest.$ac_ext
15734cat >>conftest.$ac_ext <<_ACEOF
15735/* end confdefs.h. */
503d2be0
AS
15736#include <$ac_header>
15737_ACEOF
c0d27fcc 15738if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15739 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15740 ac_status=$?
6bae0ccf 15741 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15742 rm -f conftest.er1
15743 cat conftest.err >&5
c0d27fcc 15744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15745 (exit $ac_status); } >/dev/null; then
15746 if test -s conftest.err; then
15747 ac_cpp_err=$ac_c_preproc_warn_flag
15748 else
15749 ac_cpp_err=
15750 fi
15751else
15752 ac_cpp_err=yes
15753fi
15754if test -z "$ac_cpp_err"; then
c0d27fcc 15755 ac_header_preproc=yes
503d2be0
AS
15756else
15757 echo "$as_me: failed program was:" >&5
19650fd6
AS
15758sed 's/^/| /' conftest.$ac_ext >&5
15759
c0d27fcc 15760 ac_header_preproc=no
a21616bd 15761fi
503d2be0 15762rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15763echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15764echo "${ECHO_T}$ac_header_preproc" >&6
15765
15766# So? What about this header?
15767case $ac_header_compiler:$ac_header_preproc in
15768 yes:no )
15769 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15770echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
15771 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15772echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15773 (
15774 cat <<\_ASBOX
15775## ------------------------------------ ##
15776## Report this to bug-autoconf@gnu.org. ##
15777## ------------------------------------ ##
15778_ASBOX
15779 ) |
15780 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 15781 ;;
c0d27fcc
MR
15782 no:yes )
15783 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15784echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
15785 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15786echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 15787 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15788echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
15789 (
15790 cat <<\_ASBOX
793fa0d7
DL
15791## ------------------------------------ ##
15792## Report this to bug-autoconf@gnu.org. ##
15793## ------------------------------------ ##
19650fd6
AS
15794_ASBOX
15795 ) |
15796 sed "s/^/$as_me: WARNING: /" >&2
15797 ;;
c0d27fcc
MR
15798esac
15799echo "$as_me:$LINENO: checking for $ac_header" >&5
15800echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15801if eval "test \"\${$as_ac_Header+set}\" = set"; then
15802 echo $ECHO_N "(cached) $ECHO_C" >&6
15803else
793fa0d7 15804 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15805fi
c0d27fcc 15806echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15807echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15808
15809fi
503d2be0 15810if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15811 cat >>confdefs.h <<_ACEOF
503d2be0 15812#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15813_ACEOF
503d2be0 15814
a21616bd 15815else
503d2be0
AS
15816
15817for ac_header in kerberos/des.h
a21616bd 15818do
503d2be0 15819as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15820if eval "test \"\${$as_ac_Header+set}\" = set"; then
15821 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15822echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15823if eval "test \"\${$as_ac_Header+set}\" = set"; then
15824 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15825fi
15826echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15827echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15828else
c0d27fcc
MR
15829 # Is the header compilable?
15830echo "$as_me:$LINENO: checking $ac_header usability" >&5
15831echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15832cat >conftest.$ac_ext <<_ACEOF
793fa0d7 15833#line $LINENO "configure"
19650fd6
AS
15834/* confdefs.h. */
15835_ACEOF
15836cat confdefs.h >>conftest.$ac_ext
15837cat >>conftest.$ac_ext <<_ACEOF
15838/* end confdefs.h. */
c0d27fcc
MR
15839$ac_includes_default
15840#include <$ac_header>
15841_ACEOF
15842rm -f conftest.$ac_objext
15843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15844 (eval $ac_compile) 2>&5
15845 ac_status=$?
15846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15847 (exit $ac_status); } &&
793fa0d7 15848 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15850 (eval $ac_try) 2>&5
15851 ac_status=$?
15852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15853 (exit $ac_status); }; }; then
15854 ac_header_compiler=yes
15855else
15856 echo "$as_me: failed program was:" >&5
19650fd6
AS
15857sed 's/^/| /' conftest.$ac_ext >&5
15858
c0d27fcc
MR
15859ac_header_compiler=no
15860fi
15861rm -f conftest.$ac_objext conftest.$ac_ext
15862echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15863echo "${ECHO_T}$ac_header_compiler" >&6
15864
15865# Is the header present?
15866echo "$as_me:$LINENO: checking $ac_header presence" >&5
15867echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15868cat >conftest.$ac_ext <<_ACEOF
793fa0d7 15869#line $LINENO "configure"
19650fd6
AS
15870/* confdefs.h. */
15871_ACEOF
15872cat confdefs.h >>conftest.$ac_ext
15873cat >>conftest.$ac_ext <<_ACEOF
15874/* end confdefs.h. */
503d2be0
AS
15875#include <$ac_header>
15876_ACEOF
c0d27fcc 15877if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15878 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15879 ac_status=$?
6bae0ccf 15880 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15881 rm -f conftest.er1
15882 cat conftest.err >&5
c0d27fcc 15883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15884 (exit $ac_status); } >/dev/null; then
15885 if test -s conftest.err; then
15886 ac_cpp_err=$ac_c_preproc_warn_flag
15887 else
15888 ac_cpp_err=
15889 fi
15890else
15891 ac_cpp_err=yes
15892fi
15893if test -z "$ac_cpp_err"; then
c0d27fcc 15894 ac_header_preproc=yes
503d2be0
AS
15895else
15896 echo "$as_me: failed program was:" >&5
19650fd6
AS
15897sed 's/^/| /' conftest.$ac_ext >&5
15898
c0d27fcc 15899 ac_header_preproc=no
a21616bd 15900fi
503d2be0 15901rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15902echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15903echo "${ECHO_T}$ac_header_preproc" >&6
15904
15905# So? What about this header?
15906case $ac_header_compiler:$ac_header_preproc in
15907 yes:no )
15908 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15909echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
15910 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15911echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15912 (
15913 cat <<\_ASBOX
15914## ------------------------------------ ##
15915## Report this to bug-autoconf@gnu.org. ##
15916## ------------------------------------ ##
15917_ASBOX
15918 ) |
15919 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 15920 ;;
c0d27fcc
MR
15921 no:yes )
15922 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15923echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
15924 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15925echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 15926 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15927echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
15928 (
15929 cat <<\_ASBOX
793fa0d7
DL
15930## ------------------------------------ ##
15931## Report this to bug-autoconf@gnu.org. ##
15932## ------------------------------------ ##
19650fd6
AS
15933_ASBOX
15934 ) |
15935 sed "s/^/$as_me: WARNING: /" >&2
15936 ;;
c0d27fcc
MR
15937esac
15938echo "$as_me:$LINENO: checking for $ac_header" >&5
15939echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15940if eval "test \"\${$as_ac_Header+set}\" = set"; then
15941 echo $ECHO_N "(cached) $ECHO_C" >&6
15942else
793fa0d7 15943 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15944fi
c0d27fcc 15945echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15946echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15947
15948fi
503d2be0 15949if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15950 cat >>confdefs.h <<_ACEOF
503d2be0 15951#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15952_ACEOF
a21616bd
KR
15953
15954fi
c0d27fcc 15955
a21616bd
KR
15956done
15957
98418dba 15958fi
c0d27fcc 15959
925c2f3f
EZ
15960done
15961
98418dba 15962fi
c0d27fcc 15963
925c2f3f 15964done
98418dba 15965
c0d27fcc 15966
925c2f3f
EZ
15967for ac_header in krb.h
15968do
15969as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15970if eval "test \"\${$as_ac_Header+set}\" = set"; then
15971 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
15972echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15973if eval "test \"\${$as_ac_Header+set}\" = set"; then
15974 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15975fi
15976echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15977echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15978else
15979 # Is the header compilable?
15980echo "$as_me:$LINENO: checking $ac_header usability" >&5
15981echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15982cat >conftest.$ac_ext <<_ACEOF
793fa0d7 15983#line $LINENO "configure"
19650fd6
AS
15984/* confdefs.h. */
15985_ACEOF
15986cat confdefs.h >>conftest.$ac_ext
15987cat >>conftest.$ac_ext <<_ACEOF
15988/* end confdefs.h. */
c0d27fcc
MR
15989$ac_includes_default
15990#include <$ac_header>
15991_ACEOF
15992rm -f conftest.$ac_objext
15993if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15994 (eval $ac_compile) 2>&5
15995 ac_status=$?
15996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15997 (exit $ac_status); } &&
793fa0d7 15998 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16000 (eval $ac_try) 2>&5
16001 ac_status=$?
16002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16003 (exit $ac_status); }; }; then
16004 ac_header_compiler=yes
925c2f3f 16005else
c0d27fcc 16006 echo "$as_me: failed program was:" >&5
19650fd6
AS
16007sed 's/^/| /' conftest.$ac_ext >&5
16008
c0d27fcc
MR
16009ac_header_compiler=no
16010fi
16011rm -f conftest.$ac_objext conftest.$ac_ext
16012echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16013echo "${ECHO_T}$ac_header_compiler" >&6
16014
16015# Is the header present?
16016echo "$as_me:$LINENO: checking $ac_header presence" >&5
16017echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16018cat >conftest.$ac_ext <<_ACEOF
793fa0d7 16019#line $LINENO "configure"
19650fd6
AS
16020/* confdefs.h. */
16021_ACEOF
16022cat confdefs.h >>conftest.$ac_ext
16023cat >>conftest.$ac_ext <<_ACEOF
16024/* end confdefs.h. */
503d2be0
AS
16025#include <$ac_header>
16026_ACEOF
c0d27fcc 16027if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16028 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16029 ac_status=$?
6bae0ccf 16030 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16031 rm -f conftest.er1
16032 cat conftest.err >&5
c0d27fcc 16033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16034 (exit $ac_status); } >/dev/null; then
16035 if test -s conftest.err; then
16036 ac_cpp_err=$ac_c_preproc_warn_flag
16037 else
16038 ac_cpp_err=
16039 fi
16040else
16041 ac_cpp_err=yes
16042fi
16043if test -z "$ac_cpp_err"; then
c0d27fcc 16044 ac_header_preproc=yes
503d2be0
AS
16045else
16046 echo "$as_me: failed program was:" >&5
19650fd6
AS
16047sed 's/^/| /' conftest.$ac_ext >&5
16048
c0d27fcc 16049 ac_header_preproc=no
a21616bd 16050fi
503d2be0 16051rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16052echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16053echo "${ECHO_T}$ac_header_preproc" >&6
16054
16055# So? What about this header?
16056case $ac_header_compiler:$ac_header_preproc in
16057 yes:no )
16058 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16059echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
16060 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16061echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16062 (
16063 cat <<\_ASBOX
16064## ------------------------------------ ##
16065## Report this to bug-autoconf@gnu.org. ##
16066## ------------------------------------ ##
16067_ASBOX
16068 ) |
16069 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 16070 ;;
c0d27fcc
MR
16071 no:yes )
16072 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16073echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
16074 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16075echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 16076 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16077echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
16078 (
16079 cat <<\_ASBOX
793fa0d7
DL
16080## ------------------------------------ ##
16081## Report this to bug-autoconf@gnu.org. ##
16082## ------------------------------------ ##
19650fd6
AS
16083_ASBOX
16084 ) |
16085 sed "s/^/$as_me: WARNING: /" >&2
16086 ;;
c0d27fcc
MR
16087esac
16088echo "$as_me:$LINENO: checking for $ac_header" >&5
16089echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16090if eval "test \"\${$as_ac_Header+set}\" = set"; then
16091 echo $ECHO_N "(cached) $ECHO_C" >&6
16092else
793fa0d7 16093 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 16094fi
c0d27fcc 16095echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16096echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16097
16098fi
503d2be0 16099if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16100 cat >>confdefs.h <<_ACEOF
503d2be0 16101#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16102_ACEOF
503d2be0 16103
a21616bd 16104else
503d2be0
AS
16105
16106for ac_header in kerberosIV/krb.h
a21616bd 16107do
503d2be0 16108as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16109if eval "test \"\${$as_ac_Header+set}\" = set"; then
16110 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
16111echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16112if eval "test \"\${$as_ac_Header+set}\" = set"; then
16113 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16114fi
16115echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16116echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16117else
c0d27fcc
MR
16118 # Is the header compilable?
16119echo "$as_me:$LINENO: checking $ac_header usability" >&5
16120echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16121cat >conftest.$ac_ext <<_ACEOF
793fa0d7 16122#line $LINENO "configure"
19650fd6
AS
16123/* confdefs.h. */
16124_ACEOF
16125cat confdefs.h >>conftest.$ac_ext
16126cat >>conftest.$ac_ext <<_ACEOF
16127/* end confdefs.h. */
c0d27fcc
MR
16128$ac_includes_default
16129#include <$ac_header>
16130_ACEOF
16131rm -f conftest.$ac_objext
16132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16133 (eval $ac_compile) 2>&5
16134 ac_status=$?
16135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16136 (exit $ac_status); } &&
793fa0d7 16137 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16139 (eval $ac_try) 2>&5
16140 ac_status=$?
16141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16142 (exit $ac_status); }; }; then
16143 ac_header_compiler=yes
16144else
16145 echo "$as_me: failed program was:" >&5
19650fd6
AS
16146sed 's/^/| /' conftest.$ac_ext >&5
16147
c0d27fcc
MR
16148ac_header_compiler=no
16149fi
16150rm -f conftest.$ac_objext conftest.$ac_ext
16151echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16152echo "${ECHO_T}$ac_header_compiler" >&6
16153
16154# Is the header present?
16155echo "$as_me:$LINENO: checking $ac_header presence" >&5
16156echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16157cat >conftest.$ac_ext <<_ACEOF
793fa0d7 16158#line $LINENO "configure"
19650fd6
AS
16159/* confdefs.h. */
16160_ACEOF
16161cat confdefs.h >>conftest.$ac_ext
16162cat >>conftest.$ac_ext <<_ACEOF
16163/* end confdefs.h. */
503d2be0
AS
16164#include <$ac_header>
16165_ACEOF
c0d27fcc 16166if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16167 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16168 ac_status=$?
6bae0ccf 16169 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16170 rm -f conftest.er1
16171 cat conftest.err >&5
c0d27fcc 16172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16173 (exit $ac_status); } >/dev/null; then
16174 if test -s conftest.err; then
16175 ac_cpp_err=$ac_c_preproc_warn_flag
16176 else
16177 ac_cpp_err=
16178 fi
16179else
16180 ac_cpp_err=yes
16181fi
16182if test -z "$ac_cpp_err"; then
c0d27fcc 16183 ac_header_preproc=yes
503d2be0
AS
16184else
16185 echo "$as_me: failed program was:" >&5
19650fd6
AS
16186sed 's/^/| /' conftest.$ac_ext >&5
16187
c0d27fcc 16188 ac_header_preproc=no
a21616bd 16189fi
503d2be0 16190rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16191echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16192echo "${ECHO_T}$ac_header_preproc" >&6
16193
16194# So? What about this header?
16195case $ac_header_compiler:$ac_header_preproc in
16196 yes:no )
16197 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16198echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
16199 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16200echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16201 (
16202 cat <<\_ASBOX
16203## ------------------------------------ ##
16204## Report this to bug-autoconf@gnu.org. ##
16205## ------------------------------------ ##
16206_ASBOX
16207 ) |
16208 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 16209 ;;
c0d27fcc
MR
16210 no:yes )
16211 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16212echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
16213 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16214echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 16215 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16216echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
16217 (
16218 cat <<\_ASBOX
793fa0d7
DL
16219## ------------------------------------ ##
16220## Report this to bug-autoconf@gnu.org. ##
16221## ------------------------------------ ##
19650fd6
AS
16222_ASBOX
16223 ) |
16224 sed "s/^/$as_me: WARNING: /" >&2
16225 ;;
c0d27fcc
MR
16226esac
16227echo "$as_me:$LINENO: checking for $ac_header" >&5
16228echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16229if eval "test \"\${$as_ac_Header+set}\" = set"; then
16230 echo $ECHO_N "(cached) $ECHO_C" >&6
16231else
793fa0d7 16232 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 16233fi
c0d27fcc 16234echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16235echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16236
16237fi
503d2be0 16238if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16239 cat >>confdefs.h <<_ACEOF
503d2be0 16240#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16241_ACEOF
503d2be0 16242
a21616bd 16243else
503d2be0
AS
16244
16245for ac_header in kerberos/krb.h
a21616bd 16246do
503d2be0 16247as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16248if eval "test \"\${$as_ac_Header+set}\" = set"; then
16249 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
16250echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16251if eval "test \"\${$as_ac_Header+set}\" = set"; then
16252 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16253fi
16254echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16255echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16256else
c0d27fcc
MR
16257 # Is the header compilable?
16258echo "$as_me:$LINENO: checking $ac_header usability" >&5
16259echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16260cat >conftest.$ac_ext <<_ACEOF
793fa0d7 16261#line $LINENO "configure"
19650fd6
AS
16262/* confdefs.h. */
16263_ACEOF
16264cat confdefs.h >>conftest.$ac_ext
16265cat >>conftest.$ac_ext <<_ACEOF
16266/* end confdefs.h. */
c0d27fcc
MR
16267$ac_includes_default
16268#include <$ac_header>
16269_ACEOF
16270rm -f conftest.$ac_objext
16271if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16272 (eval $ac_compile) 2>&5
16273 ac_status=$?
16274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16275 (exit $ac_status); } &&
793fa0d7 16276 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16278 (eval $ac_try) 2>&5
16279 ac_status=$?
16280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16281 (exit $ac_status); }; }; then
16282 ac_header_compiler=yes
16283else
16284 echo "$as_me: failed program was:" >&5
19650fd6
AS
16285sed 's/^/| /' conftest.$ac_ext >&5
16286
c0d27fcc
MR
16287ac_header_compiler=no
16288fi
16289rm -f conftest.$ac_objext conftest.$ac_ext
16290echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16291echo "${ECHO_T}$ac_header_compiler" >&6
16292
16293# Is the header present?
16294echo "$as_me:$LINENO: checking $ac_header presence" >&5
16295echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16296cat >conftest.$ac_ext <<_ACEOF
793fa0d7 16297#line $LINENO "configure"
19650fd6
AS
16298/* confdefs.h. */
16299_ACEOF
16300cat confdefs.h >>conftest.$ac_ext
16301cat >>conftest.$ac_ext <<_ACEOF
16302/* end confdefs.h. */
503d2be0
AS
16303#include <$ac_header>
16304_ACEOF
c0d27fcc 16305if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16306 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16307 ac_status=$?
6bae0ccf 16308 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16309 rm -f conftest.er1
16310 cat conftest.err >&5
c0d27fcc 16311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16312 (exit $ac_status); } >/dev/null; then
16313 if test -s conftest.err; then
16314 ac_cpp_err=$ac_c_preproc_warn_flag
16315 else
16316 ac_cpp_err=
16317 fi
16318else
16319 ac_cpp_err=yes
16320fi
16321if test -z "$ac_cpp_err"; then
c0d27fcc 16322 ac_header_preproc=yes
503d2be0
AS
16323else
16324 echo "$as_me: failed program was:" >&5
19650fd6
AS
16325sed 's/^/| /' conftest.$ac_ext >&5
16326
c0d27fcc 16327 ac_header_preproc=no
a21616bd 16328fi
503d2be0 16329rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16330echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16331echo "${ECHO_T}$ac_header_preproc" >&6
16332
16333# So? What about this header?
16334case $ac_header_compiler:$ac_header_preproc in
16335 yes:no )
16336 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16337echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
16338 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16339echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16340 (
16341 cat <<\_ASBOX
16342## ------------------------------------ ##
16343## Report this to bug-autoconf@gnu.org. ##
16344## ------------------------------------ ##
16345_ASBOX
16346 ) |
16347 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 16348 ;;
c0d27fcc
MR
16349 no:yes )
16350 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16351echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
16352 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16353echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 16354 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16355echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
16356 (
16357 cat <<\_ASBOX
793fa0d7
DL
16358## ------------------------------------ ##
16359## Report this to bug-autoconf@gnu.org. ##
16360## ------------------------------------ ##
19650fd6
AS
16361_ASBOX
16362 ) |
16363 sed "s/^/$as_me: WARNING: /" >&2
16364 ;;
c0d27fcc
MR
16365esac
16366echo "$as_me:$LINENO: checking for $ac_header" >&5
16367echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16368if eval "test \"\${$as_ac_Header+set}\" = set"; then
16369 echo $ECHO_N "(cached) $ECHO_C" >&6
16370else
793fa0d7 16371 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 16372fi
c0d27fcc 16373echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16374echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16375
16376fi
503d2be0 16377if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16378 cat >>confdefs.h <<_ACEOF
503d2be0 16379#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16380_ACEOF
503d2be0 16381
a21616bd 16382fi
c0d27fcc 16383
a21616bd
KR
16384done
16385
16386fi
c0d27fcc 16387
a21616bd
KR
16388done
16389
16390fi
c0d27fcc 16391
a21616bd
KR
16392done
16393
16394 fi
503d2be0
AS
16395
16396for ac_header in com_err.h
a21616bd 16397do
503d2be0 16398as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16399if eval "test \"\${$as_ac_Header+set}\" = set"; then
16400 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
16401echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16402if eval "test \"\${$as_ac_Header+set}\" = set"; then
16403 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16404fi
16405echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16406echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16407else
c0d27fcc
MR
16408 # Is the header compilable?
16409echo "$as_me:$LINENO: checking $ac_header usability" >&5
16410echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16411cat >conftest.$ac_ext <<_ACEOF
793fa0d7 16412#line $LINENO "configure"
19650fd6
AS
16413/* confdefs.h. */
16414_ACEOF
16415cat confdefs.h >>conftest.$ac_ext
16416cat >>conftest.$ac_ext <<_ACEOF
16417/* end confdefs.h. */
c0d27fcc
MR
16418$ac_includes_default
16419#include <$ac_header>
16420_ACEOF
16421rm -f conftest.$ac_objext
16422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16423 (eval $ac_compile) 2>&5
16424 ac_status=$?
16425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16426 (exit $ac_status); } &&
793fa0d7 16427 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16429 (eval $ac_try) 2>&5
16430 ac_status=$?
16431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16432 (exit $ac_status); }; }; then
16433 ac_header_compiler=yes
16434else
16435 echo "$as_me: failed program was:" >&5
19650fd6
AS
16436sed 's/^/| /' conftest.$ac_ext >&5
16437
c0d27fcc
MR
16438ac_header_compiler=no
16439fi
16440rm -f conftest.$ac_objext conftest.$ac_ext
16441echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16442echo "${ECHO_T}$ac_header_compiler" >&6
16443
16444# Is the header present?
16445echo "$as_me:$LINENO: checking $ac_header presence" >&5
16446echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16447cat >conftest.$ac_ext <<_ACEOF
793fa0d7 16448#line $LINENO "configure"
19650fd6
AS
16449/* confdefs.h. */
16450_ACEOF
16451cat confdefs.h >>conftest.$ac_ext
16452cat >>conftest.$ac_ext <<_ACEOF
16453/* end confdefs.h. */
503d2be0
AS
16454#include <$ac_header>
16455_ACEOF
c0d27fcc 16456if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16457 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16458 ac_status=$?
6bae0ccf 16459 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16460 rm -f conftest.er1
16461 cat conftest.err >&5
c0d27fcc 16462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16463 (exit $ac_status); } >/dev/null; then
16464 if test -s conftest.err; then
16465 ac_cpp_err=$ac_c_preproc_warn_flag
16466 else
16467 ac_cpp_err=
16468 fi
16469else
16470 ac_cpp_err=yes
16471fi
16472if test -z "$ac_cpp_err"; then
c0d27fcc 16473 ac_header_preproc=yes
503d2be0
AS
16474else
16475 echo "$as_me: failed program was:" >&5
19650fd6
AS
16476sed 's/^/| /' conftest.$ac_ext >&5
16477
c0d27fcc 16478 ac_header_preproc=no
a21616bd 16479fi
503d2be0 16480rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16481echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16482echo "${ECHO_T}$ac_header_preproc" >&6
16483
16484# So? What about this header?
16485case $ac_header_compiler:$ac_header_preproc in
16486 yes:no )
16487 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16488echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
16489 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16490echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16491 (
16492 cat <<\_ASBOX
16493## ------------------------------------ ##
16494## Report this to bug-autoconf@gnu.org. ##
16495## ------------------------------------ ##
16496_ASBOX
16497 ) |
16498 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 16499 ;;
c0d27fcc
MR
16500 no:yes )
16501 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16502echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
16503 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16504echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 16505 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16506echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
16507 (
16508 cat <<\_ASBOX
793fa0d7
DL
16509## ------------------------------------ ##
16510## Report this to bug-autoconf@gnu.org. ##
16511## ------------------------------------ ##
19650fd6
AS
16512_ASBOX
16513 ) |
16514 sed "s/^/$as_me: WARNING: /" >&2
16515 ;;
c0d27fcc
MR
16516esac
16517echo "$as_me:$LINENO: checking for $ac_header" >&5
16518echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16519if eval "test \"\${$as_ac_Header+set}\" = set"; then
16520 echo $ECHO_N "(cached) $ECHO_C" >&6
16521else
793fa0d7 16522 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 16523fi
c0d27fcc 16524echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16525echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16526
16527fi
503d2be0 16528if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16529 cat >>confdefs.h <<_ACEOF
503d2be0 16530#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16531_ACEOF
503d2be0 16532
a21616bd 16533fi
c0d27fcc 16534
a21616bd
KR
16535done
16536
16537fi
16538
ba4481b5
DL
16539# Solaris requires -lintl if you want strerror (which calls dgettext)
16540# to return localized messages.
503d2be0 16541
c0d27fcc 16542echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
16543echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
16544if test "${ac_cv_lib_intl_dgettext+set}" = set; then
16545 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16546else
503d2be0 16547 ac_check_lib_save_LIBS=$LIBS
ba4481b5 16548LIBS="-lintl $LIBS"
503d2be0 16549cat >conftest.$ac_ext <<_ACEOF
793fa0d7 16550#line $LINENO "configure"
19650fd6
AS
16551/* confdefs.h. */
16552_ACEOF
16553cat confdefs.h >>conftest.$ac_ext
16554cat >>conftest.$ac_ext <<_ACEOF
16555/* end confdefs.h. */
503d2be0 16556
ba4481b5 16557/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16558#ifdef __cplusplus
16559extern "C"
16560#endif
ba4481b5 16561/* We use char because int might match the return type of a gcc2
503d2be0
AS
16562 builtin and then its argument prototype would still apply. */
16563char dgettext ();
16564int
16565main ()
16566{
16567dgettext ();
16568 ;
16569 return 0;
16570}
16571_ACEOF
16572rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16573if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16574 (eval $ac_link) 2>&5
16575 ac_status=$?
c0d27fcc 16576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16577 (exit $ac_status); } &&
793fa0d7 16578 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16580 (eval $ac_try) 2>&5
16581 ac_status=$?
c0d27fcc 16582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16583 (exit $ac_status); }; }; then
16584 ac_cv_lib_intl_dgettext=yes
16585else
16586 echo "$as_me: failed program was:" >&5
19650fd6
AS
16587sed 's/^/| /' conftest.$ac_ext >&5
16588
503d2be0
AS
16589ac_cv_lib_intl_dgettext=no
16590fi
16591rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16592LIBS=$ac_check_lib_save_LIBS
16593fi
c0d27fcc 16594echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
16595echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
16596if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 16597 cat >>confdefs.h <<_ACEOF
503d2be0 16598#define HAVE_LIBINTL 1
c0d27fcc 16599_ACEOF
ba4481b5
DL
16600
16601 LIBS="-lintl $LIBS"
16602
ba4481b5
DL
16603fi
16604
c0d27fcc
MR
16605
16606echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
16607echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
16608if test "${emacs_cv_localtime_cache+set}" = set; then
16609 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
16610else
16611 if test x$ac_cv_func_tzset = xyes; then
16612if test "$cross_compiling" = yes; then
16613 # If we have tzset, assume the worst when cross-compiling.
16614emacs_cv_localtime_cache=yes
16615else
503d2be0 16616 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 16617#line $LINENO "configure"
19650fd6
AS
16618/* confdefs.h. */
16619_ACEOF
16620cat confdefs.h >>conftest.$ac_ext
16621cat >>conftest.$ac_ext <<_ACEOF
16622/* end confdefs.h. */
ba4481b5 16623#include <time.h>
ba4481b5
DL
16624extern char **environ;
16625unset_TZ ()
16626{
16627 char **from, **to;
16628 for (to = from = environ; (*to = *from); from++)
16629 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
16630 to++;
16631}
16632char TZ_GMT0[] = "TZ=GMT0";
16633char TZ_PST8[] = "TZ=PST8";
16634main()
16635{
16636 time_t now = time ((time_t *) 0);
16637 int hour_GMT0, hour_unset;
16638 if (putenv (TZ_GMT0) != 0)
16639 exit (1);
16640 hour_GMT0 = localtime (&now)->tm_hour;
16641 unset_TZ ();
16642 hour_unset = localtime (&now)->tm_hour;
16643 if (putenv (TZ_PST8) != 0)
16644 exit (1);
16645 if (localtime (&now)->tm_hour == hour_GMT0)
16646 exit (1);
16647 unset_TZ ();
16648 if (localtime (&now)->tm_hour != hour_unset)
16649 exit (1);
16650 exit (0);
16651}
503d2be0
AS
16652_ACEOF
16653rm -f conftest$ac_exeext
c0d27fcc 16654if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16655 (eval $ac_link) 2>&5
16656 ac_status=$?
c0d27fcc 16657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16658 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 16659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16660 (eval $ac_try) 2>&5
16661 ac_status=$?
c0d27fcc 16662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16663 (exit $ac_status); }; }; then
ba4481b5
DL
16664 emacs_cv_localtime_cache=no
16665else
503d2be0
AS
16666 echo "$as_me: program exited with status $ac_status" >&5
16667echo "$as_me: failed program was:" >&5
19650fd6
AS
16668sed 's/^/| /' conftest.$ac_ext >&5
16669
c0d27fcc 16670( exit $ac_status )
503d2be0 16671emacs_cv_localtime_cache=yes
ba4481b5 16672fi
851a3062 16673rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 16674fi
ba4481b5
DL
16675else
16676 # If we lack tzset, report that localtime does not cache TZ,
16677 # since we can't invalidate the cache if we don't have tzset.
16678 emacs_cv_localtime_cache=no
16679fi
16680fi
c0d27fcc 16681echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 16682echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 16683if test $emacs_cv_localtime_cache = yes; then
b936fae4 16684
c0d27fcc 16685cat >>confdefs.h <<\_ACEOF
ba4481b5 16686#define LOCALTIME_CACHE 1
c0d27fcc 16687_ACEOF
ba4481b5
DL
16688
16689fi
16690
16691if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
16692
16693for ac_func in gettimeofday
48d4b120 16694do
503d2be0 16695as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 16696echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
16697echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16698if eval "test \"\${$as_ac_var+set}\" = set"; then
16699 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 16700else
503d2be0 16701 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 16702#line $LINENO "configure"
19650fd6
AS
16703/* confdefs.h. */
16704_ACEOF
16705cat confdefs.h >>conftest.$ac_ext
16706cat >>conftest.$ac_ext <<_ACEOF
16707/* end confdefs.h. */
48d4b120 16708/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16709 which can conflict with char $ac_func (); below.
16710 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16711 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
16712#ifdef __STDC__
16713# include <limits.h>
16714#else
16715# include <assert.h>
16716#endif
48d4b120 16717/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16718#ifdef __cplusplus
16719extern "C"
19650fd6 16720{
503d2be0 16721#endif
48d4b120 16722/* We use char because int might match the return type of a gcc2
503d2be0
AS
16723 builtin and then its argument prototype would still apply. */
16724char $ac_func ();
48d4b120
DL
16725/* The GNU C library defines this for functions which it implements
16726 to always fail with ENOSYS. Some functions are actually named
16727 something starting with __ and the normal name is an alias. */
16728#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16729choke me
16730#else
19650fd6
AS
16731char (*f) () = $ac_func;
16732#endif
16733#ifdef __cplusplus
16734}
cd958eb3
MB
16735#endif
16736
19650fd6
AS
16737int
16738main ()
16739{
16740return f != $ac_func;
503d2be0
AS
16741 ;
16742 return 0;
16743}
16744_ACEOF
16745rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16746if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16747 (eval $ac_link) 2>&5
16748 ac_status=$?
c0d27fcc 16749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16750 (exit $ac_status); } &&
793fa0d7 16751 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16753 (eval $ac_try) 2>&5
16754 ac_status=$?
c0d27fcc 16755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16756 (exit $ac_status); }; }; then
16757 eval "$as_ac_var=yes"
16758else
16759 echo "$as_me: failed program was:" >&5
19650fd6
AS
16760sed 's/^/| /' conftest.$ac_ext >&5
16761
503d2be0
AS
16762eval "$as_ac_var=no"
16763fi
16764rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16765fi
c0d27fcc 16766echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
16767echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16768if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16769 cat >>confdefs.h <<_ACEOF
503d2be0 16770#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16771_ACEOF
48d4b120 16772
48d4b120
DL
16773fi
16774done
16775
b936fae4 16776 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 16777 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
16778echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
16779if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
16780 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16781else
503d2be0 16782 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 16783#line $LINENO "configure"
19650fd6
AS
16784/* confdefs.h. */
16785_ACEOF
16786cat confdefs.h >>conftest.$ac_ext
16787cat >>conftest.$ac_ext <<_ACEOF
16788/* end confdefs.h. */
ba4481b5 16789
a3f08d9e
DL
16790#ifdef TIME_WITH_SYS_TIME
16791#include <sys/time.h>
16792#include <time.h>
16793#else
16794#ifdef HAVE_SYS_TIME_H
16795#include <sys/time.h>
16796#else
16797#include <time.h>
16798#endif
16799#endif
503d2be0
AS
16800int
16801main ()
16802{
a3f08d9e 16803struct timeval time;
b936fae4 16804 gettimeofday (&time, 0);
503d2be0
AS
16805 ;
16806 return 0;
16807}
16808_ACEOF
16809rm -f conftest.$ac_objext
c0d27fcc 16810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
16811 (eval $ac_compile) 2>&5
16812 ac_status=$?
c0d27fcc 16813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16814 (exit $ac_status); } &&
793fa0d7 16815 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16817 (eval $ac_try) 2>&5
16818 ac_status=$?
c0d27fcc 16819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16820 (exit $ac_status); }; }; then
ba4481b5
DL
16821 emacs_cv_gettimeofday_two_arguments=yes
16822else
503d2be0 16823 echo "$as_me: failed program was:" >&5
19650fd6
AS
16824sed 's/^/| /' conftest.$ac_ext >&5
16825
503d2be0 16826emacs_cv_gettimeofday_two_arguments=no
ba4481b5 16827fi
503d2be0 16828rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 16829fi
c0d27fcc 16830echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 16831echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
16832 if test $emacs_cv_gettimeofday_two_arguments = no; then
16833
c0d27fcc 16834cat >>confdefs.h <<\_ACEOF
ba4481b5 16835#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 16836_ACEOF
ba4481b5 16837
b936fae4 16838 fi
ba4481b5
DL
16839 fi
16840fi
16841
973a76b1
DL
16842# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
16843echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
16844echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
16845if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
16846 echo $ECHO_N "(cached) $ECHO_C" >&6
16847else
16848 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 16849#line $LINENO "configure"
19650fd6
AS
16850/* confdefs.h. */
16851_ACEOF
16852cat confdefs.h >>conftest.$ac_ext
16853cat >>conftest.$ac_ext <<_ACEOF
16854/* end confdefs.h. */
973a76b1
DL
16855#include <sys/types.h>
16856#include <$ac_cv_struct_tm>
16857
16858
16859int
16860main ()
16861{
16862static struct tm ac_aggr;
16863if (ac_aggr.tm_zone)
16864return 0;
16865 ;
16866 return 0;
16867}
16868_ACEOF
16869rm -f conftest.$ac_objext
16870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16871 (eval $ac_compile) 2>&5
16872 ac_status=$?
16873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16874 (exit $ac_status); } &&
793fa0d7 16875 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
16876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16877 (eval $ac_try) 2>&5
16878 ac_status=$?
16879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16880 (exit $ac_status); }; }; then
16881 ac_cv_member_struct_tm_tm_zone=yes
16882else
16883 echo "$as_me: failed program was:" >&5
19650fd6
AS
16884sed 's/^/| /' conftest.$ac_ext >&5
16885
973a76b1 16886cat >conftest.$ac_ext <<_ACEOF
793fa0d7 16887#line $LINENO "configure"
19650fd6
AS
16888/* confdefs.h. */
16889_ACEOF
16890cat confdefs.h >>conftest.$ac_ext
16891cat >>conftest.$ac_ext <<_ACEOF
16892/* end confdefs.h. */
973a76b1
DL
16893#include <sys/types.h>
16894#include <$ac_cv_struct_tm>
16895
16896
16897int
16898main ()
16899{
16900static struct tm ac_aggr;
16901if (sizeof ac_aggr.tm_zone)
16902return 0;
16903 ;
16904 return 0;
16905}
16906_ACEOF
16907rm -f conftest.$ac_objext
16908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16909 (eval $ac_compile) 2>&5
16910 ac_status=$?
16911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16912 (exit $ac_status); } &&
793fa0d7 16913 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
16914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16915 (eval $ac_try) 2>&5
16916 ac_status=$?
16917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16918 (exit $ac_status); }; }; then
16919 ac_cv_member_struct_tm_tm_zone=yes
16920else
16921 echo "$as_me: failed program was:" >&5
19650fd6
AS
16922sed 's/^/| /' conftest.$ac_ext >&5
16923
973a76b1
DL
16924ac_cv_member_struct_tm_tm_zone=no
16925fi
16926rm -f conftest.$ac_objext conftest.$ac_ext
16927fi
16928rm -f conftest.$ac_objext conftest.$ac_ext
16929fi
16930echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16931echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
16932if test $ac_cv_member_struct_tm_tm_zone = yes; then
16933
16934cat >>confdefs.h <<_ACEOF
16935#define HAVE_STRUCT_TM_TM_ZONE 1
16936_ACEOF
16937
16938
16939fi
16940
16941if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16942
16943cat >>confdefs.h <<\_ACEOF
16944#define HAVE_TM_ZONE 1
16945_ACEOF
16946
16947else
16948 echo "$as_me:$LINENO: checking for tzname" >&5
16949echo $ECHO_N "checking for tzname... $ECHO_C" >&6
16950if test "${ac_cv_var_tzname+set}" = set; then
16951 echo $ECHO_N "(cached) $ECHO_C" >&6
16952else
16953 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 16954#line $LINENO "configure"
19650fd6
AS
16955/* confdefs.h. */
16956_ACEOF
16957cat confdefs.h >>conftest.$ac_ext
16958cat >>conftest.$ac_ext <<_ACEOF
16959/* end confdefs.h. */
973a76b1
DL
16960#include <time.h>
16961#ifndef tzname /* For SGI. */
16962extern char *tzname[]; /* RS6000 and others reject char **tzname. */
16963#endif
16964
16965int
16966main ()
16967{
16968atoi(*tzname);
16969 ;
16970 return 0;
16971}
16972_ACEOF
16973rm -f conftest.$ac_objext conftest$ac_exeext
16974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16975 (eval $ac_link) 2>&5
16976 ac_status=$?
16977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16978 (exit $ac_status); } &&
793fa0d7 16979 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
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_var_tzname=yes
16986else
16987 echo "$as_me: failed program was:" >&5
19650fd6
AS
16988sed 's/^/| /' conftest.$ac_ext >&5
16989
973a76b1
DL
16990ac_cv_var_tzname=no
16991fi
16992rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16993fi
16994echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
16995echo "${ECHO_T}$ac_cv_var_tzname" >&6
16996 if test $ac_cv_var_tzname = yes; then
16997
16998cat >>confdefs.h <<\_ACEOF
16999#define HAVE_TZNAME 1
17000_ACEOF
17001
17002 fi
17003fi
17004
17005
48d4b120 17006if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 17007 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
17008echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
17009if test "${emacs_cv_struct_timezone+set}" = set; then
17010 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 17011else
503d2be0 17012 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 17013#line $LINENO "configure"
19650fd6
AS
17014/* confdefs.h. */
17015_ACEOF
17016cat confdefs.h >>conftest.$ac_ext
17017cat >>conftest.$ac_ext <<_ACEOF
17018/* end confdefs.h. */
48d4b120 17019#include <sys/time.h>
503d2be0
AS
17020int
17021main ()
17022{
48d4b120 17023struct timezone tz;
503d2be0
AS
17024 ;
17025 return 0;
17026}
17027_ACEOF
17028rm -f conftest.$ac_objext
c0d27fcc 17029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
17030 (eval $ac_compile) 2>&5
17031 ac_status=$?
c0d27fcc 17032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17033 (exit $ac_status); } &&
793fa0d7 17034 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 17035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17036 (eval $ac_try) 2>&5
17037 ac_status=$?
c0d27fcc 17038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17039 (exit $ac_status); }; }; then
48d4b120
DL
17040 if test "$cross_compiling" = yes; then
17041 emacs_cv_struct_timezone=yes
17042else
503d2be0 17043 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 17044#line $LINENO "configure"
19650fd6
AS
17045/* confdefs.h. */
17046_ACEOF
17047cat confdefs.h >>conftest.$ac_ext
17048cat >>conftest.$ac_ext <<_ACEOF
17049/* end confdefs.h. */
48d4b120
DL
17050
17051#ifdef TIME_WITH_SYS_TIME
17052#include <sys/time.h>
17053#include <time.h>
17054#else
17055#ifdef HAVE_SYS_TIME_H
17056#include <sys/time.h>
17057#else
17058#include <time.h>
17059#endif
17060#endif
17061main () {
17062 struct timeval time;
17063 struct timezone dummy;
17064 exit (gettimeofday (&time, &dummy));
17065}
503d2be0
AS
17066_ACEOF
17067rm -f conftest$ac_exeext
c0d27fcc 17068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
17069 (eval $ac_link) 2>&5
17070 ac_status=$?
c0d27fcc 17071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 17073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17074 (eval $ac_try) 2>&5
17075 ac_status=$?
c0d27fcc 17076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17077 (exit $ac_status); }; }; then
48d4b120
DL
17078 emacs_cv_struct_timezone=yes
17079else
503d2be0
AS
17080 echo "$as_me: program exited with status $ac_status" >&5
17081echo "$as_me: failed program was:" >&5
19650fd6
AS
17082sed 's/^/| /' conftest.$ac_ext >&5
17083
c0d27fcc 17084( exit $ac_status )
503d2be0 17085emacs_cv_struct_timezone=no
48d4b120 17086fi
851a3062 17087rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 17088fi
48d4b120 17089else
503d2be0 17090 echo "$as_me: failed program was:" >&5
19650fd6
AS
17091sed 's/^/| /' conftest.$ac_ext >&5
17092
503d2be0 17093emacs_cv_struct_timezone=no
48d4b120 17094fi
503d2be0 17095rm -f conftest.$ac_objext conftest.$ac_ext
48d4b120 17096fi
c0d27fcc 17097echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 17098echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
17099fi
17100
ba4481b5 17101ok_so_far=yes
c0d27fcc 17102echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
17103echo $ECHO_N "checking for socket... $ECHO_C" >&6
17104if test "${ac_cv_func_socket+set}" = set; then
17105 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17106else
503d2be0 17107 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 17108#line $LINENO "configure"
19650fd6
AS
17109/* confdefs.h. */
17110_ACEOF
17111cat confdefs.h >>conftest.$ac_ext
17112cat >>conftest.$ac_ext <<_ACEOF
17113/* end confdefs.h. */
ba4481b5 17114/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17115 which can conflict with char socket (); below.
17116 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17117 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
17118#ifdef __STDC__
17119# include <limits.h>
17120#else
17121# include <assert.h>
17122#endif
ba4481b5 17123/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17124#ifdef __cplusplus
17125extern "C"
19650fd6 17126{
503d2be0 17127#endif
ba4481b5 17128/* We use char because int might match the return type of a gcc2
503d2be0
AS
17129 builtin and then its argument prototype would still apply. */
17130char socket ();
ba4481b5
DL
17131/* The GNU C library defines this for functions which it implements
17132 to always fail with ENOSYS. Some functions are actually named
17133 something starting with __ and the normal name is an alias. */
17134#if defined (__stub_socket) || defined (__stub___socket)
17135choke me
17136#else
19650fd6
AS
17137char (*f) () = socket;
17138#endif
17139#ifdef __cplusplus
17140}
cd958eb3
MB
17141#endif
17142
19650fd6
AS
17143int
17144main ()
17145{
17146return f != socket;
503d2be0
AS
17147 ;
17148 return 0;
17149}
17150_ACEOF
17151rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17152if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
17153 (eval $ac_link) 2>&5
17154 ac_status=$?
c0d27fcc 17155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17156 (exit $ac_status); } &&
793fa0d7 17157 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17159 (eval $ac_try) 2>&5
17160 ac_status=$?
c0d27fcc 17161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17162 (exit $ac_status); }; }; then
17163 ac_cv_func_socket=yes
17164else
17165 echo "$as_me: failed program was:" >&5
19650fd6
AS
17166sed 's/^/| /' conftest.$ac_ext >&5
17167
503d2be0
AS
17168ac_cv_func_socket=no
17169fi
17170rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17171fi
c0d27fcc 17172echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
17173echo "${ECHO_T}$ac_cv_func_socket" >&6
17174if test $ac_cv_func_socket = yes; then
ba4481b5
DL
17175 :
17176else
503d2be0 17177 ok_so_far=no
ba4481b5
DL
17178fi
17179
17180if test $ok_so_far = yes; then
c0d27fcc
MR
17181 if test "${ac_cv_header_netinet_in_h+set}" = set; then
17182 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
17183echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
17184if test "${ac_cv_header_netinet_in_h+set}" = set; then
17185 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
17186fi
17187echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
17188echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 17189else
c0d27fcc
MR
17190 # Is the header compilable?
17191echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
17192echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
17193cat >conftest.$ac_ext <<_ACEOF
793fa0d7 17194#line $LINENO "configure"
19650fd6
AS
17195/* confdefs.h. */
17196_ACEOF
17197cat confdefs.h >>conftest.$ac_ext
17198cat >>conftest.$ac_ext <<_ACEOF
17199/* end confdefs.h. */
c0d27fcc
MR
17200$ac_includes_default
17201#include <netinet/in.h>
17202_ACEOF
17203rm -f conftest.$ac_objext
17204if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17205 (eval $ac_compile) 2>&5
17206 ac_status=$?
17207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17208 (exit $ac_status); } &&
793fa0d7 17209 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
17210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17211 (eval $ac_try) 2>&5
17212 ac_status=$?
17213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17214 (exit $ac_status); }; }; then
17215 ac_header_compiler=yes
17216else
17217 echo "$as_me: failed program was:" >&5
19650fd6
AS
17218sed 's/^/| /' conftest.$ac_ext >&5
17219
c0d27fcc
MR
17220ac_header_compiler=no
17221fi
17222rm -f conftest.$ac_objext conftest.$ac_ext
17223echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17224echo "${ECHO_T}$ac_header_compiler" >&6
17225
17226# Is the header present?
17227echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
17228echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
17229cat >conftest.$ac_ext <<_ACEOF
793fa0d7 17230#line $LINENO "configure"
19650fd6
AS
17231/* confdefs.h. */
17232_ACEOF
17233cat confdefs.h >>conftest.$ac_ext
17234cat >>conftest.$ac_ext <<_ACEOF
17235/* end confdefs.h. */
ba4481b5 17236#include <netinet/in.h>
503d2be0 17237_ACEOF
c0d27fcc 17238if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
17239 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17240 ac_status=$?
6bae0ccf 17241 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17242 rm -f conftest.er1
17243 cat conftest.err >&5
c0d27fcc 17244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17245 (exit $ac_status); } >/dev/null; then
17246 if test -s conftest.err; then
17247 ac_cpp_err=$ac_c_preproc_warn_flag
17248 else
17249 ac_cpp_err=
17250 fi
17251else
17252 ac_cpp_err=yes
17253fi
17254if test -z "$ac_cpp_err"; then
c0d27fcc 17255 ac_header_preproc=yes
ba4481b5 17256else
503d2be0 17257 echo "$as_me: failed program was:" >&5
19650fd6
AS
17258sed 's/^/| /' conftest.$ac_ext >&5
17259
c0d27fcc 17260 ac_header_preproc=no
ba4481b5 17261fi
503d2be0 17262rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
17263echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17264echo "${ECHO_T}$ac_header_preproc" >&6
17265
17266# So? What about this header?
17267case $ac_header_compiler:$ac_header_preproc in
17268 yes:no )
17269 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
17270echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
17271 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
17272echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
17273 (
17274 cat <<\_ASBOX
17275## ------------------------------------ ##
17276## Report this to bug-autoconf@gnu.org. ##
17277## ------------------------------------ ##
17278_ASBOX
17279 ) |
17280 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 17281 ;;
c0d27fcc
MR
17282 no:yes )
17283 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
17284echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
793fa0d7
DL
17285 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
17286echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
c0d27fcc 17287 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 17288echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
17289 (
17290 cat <<\_ASBOX
793fa0d7
DL
17291## ------------------------------------ ##
17292## Report this to bug-autoconf@gnu.org. ##
17293## ------------------------------------ ##
19650fd6
AS
17294_ASBOX
17295 ) |
17296 sed "s/^/$as_me: WARNING: /" >&2
17297 ;;
c0d27fcc
MR
17298esac
17299echo "$as_me:$LINENO: checking for netinet/in.h" >&5
17300echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
17301if test "${ac_cv_header_netinet_in_h+set}" = set; then
17302 echo $ECHO_N "(cached) $ECHO_C" >&6
17303else
17304 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 17305fi
c0d27fcc 17306echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 17307echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
17308
17309fi
503d2be0 17310if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
17311 :
17312else
503d2be0 17313 ok_so_far=no
ba4481b5
DL
17314fi
17315
c0d27fcc 17316
ba4481b5
DL
17317fi
17318if test $ok_so_far = yes; then
c0d27fcc
MR
17319 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
17320 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
17321echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
17322if test "${ac_cv_header_arpa_inet_h+set}" = set; then
17323 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
17324fi
17325echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
17326echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 17327else
c0d27fcc
MR
17328 # Is the header compilable?
17329echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
17330echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
17331cat >conftest.$ac_ext <<_ACEOF
793fa0d7 17332#line $LINENO "configure"
19650fd6
AS
17333/* confdefs.h. */
17334_ACEOF
17335cat confdefs.h >>conftest.$ac_ext
17336cat >>conftest.$ac_ext <<_ACEOF
17337/* end confdefs.h. */
c0d27fcc
MR
17338$ac_includes_default
17339#include <arpa/inet.h>
17340_ACEOF
17341rm -f conftest.$ac_objext
17342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17343 (eval $ac_compile) 2>&5
17344 ac_status=$?
17345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17346 (exit $ac_status); } &&
793fa0d7 17347 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
17348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17349 (eval $ac_try) 2>&5
17350 ac_status=$?
17351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17352 (exit $ac_status); }; }; then
17353 ac_header_compiler=yes
17354else
17355 echo "$as_me: failed program was:" >&5
19650fd6
AS
17356sed 's/^/| /' conftest.$ac_ext >&5
17357
c0d27fcc
MR
17358ac_header_compiler=no
17359fi
17360rm -f conftest.$ac_objext conftest.$ac_ext
17361echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17362echo "${ECHO_T}$ac_header_compiler" >&6
17363
17364# Is the header present?
17365echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
17366echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
17367cat >conftest.$ac_ext <<_ACEOF
793fa0d7 17368#line $LINENO "configure"
19650fd6
AS
17369/* confdefs.h. */
17370_ACEOF
17371cat confdefs.h >>conftest.$ac_ext
17372cat >>conftest.$ac_ext <<_ACEOF
17373/* end confdefs.h. */
ba4481b5 17374#include <arpa/inet.h>
503d2be0 17375_ACEOF
c0d27fcc 17376if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
17377 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17378 ac_status=$?
6bae0ccf 17379 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17380 rm -f conftest.er1
17381 cat conftest.err >&5
c0d27fcc 17382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17383 (exit $ac_status); } >/dev/null; then
17384 if test -s conftest.err; then
17385 ac_cpp_err=$ac_c_preproc_warn_flag
17386 else
17387 ac_cpp_err=
17388 fi
17389else
17390 ac_cpp_err=yes
17391fi
17392if test -z "$ac_cpp_err"; then
c0d27fcc 17393 ac_header_preproc=yes
ba4481b5 17394else
503d2be0 17395 echo "$as_me: failed program was:" >&5
19650fd6
AS
17396sed 's/^/| /' conftest.$ac_ext >&5
17397
c0d27fcc 17398 ac_header_preproc=no
ba4481b5 17399fi
503d2be0 17400rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
17401echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17402echo "${ECHO_T}$ac_header_preproc" >&6
17403
17404# So? What about this header?
17405case $ac_header_compiler:$ac_header_preproc in
17406 yes:no )
17407 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
17408echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
17409 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
17410echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
17411 (
17412 cat <<\_ASBOX
17413## ------------------------------------ ##
17414## Report this to bug-autoconf@gnu.org. ##
17415## ------------------------------------ ##
17416_ASBOX
17417 ) |
17418 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 17419 ;;
c0d27fcc
MR
17420 no:yes )
17421 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
17422echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
793fa0d7
DL
17423 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
17424echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
c0d27fcc 17425 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 17426echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
17427 (
17428 cat <<\_ASBOX
793fa0d7
DL
17429## ------------------------------------ ##
17430## Report this to bug-autoconf@gnu.org. ##
17431## ------------------------------------ ##
19650fd6
AS
17432_ASBOX
17433 ) |
17434 sed "s/^/$as_me: WARNING: /" >&2
17435 ;;
c0d27fcc
MR
17436esac
17437echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
17438echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
17439if test "${ac_cv_header_arpa_inet_h+set}" = set; then
17440 echo $ECHO_N "(cached) $ECHO_C" >&6
17441else
17442 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 17443fi
c0d27fcc 17444echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 17445echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
17446
17447fi
503d2be0 17448if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
17449 :
17450else
503d2be0 17451 ok_so_far=no
ba4481b5
DL
17452fi
17453
c0d27fcc 17454
ba4481b5
DL
17455fi
17456if test $ok_so_far = yes; then
b936fae4 17457
c0d27fcc 17458cat >>confdefs.h <<\_ACEOF
ba4481b5 17459#define HAVE_INET_SOCKETS 1
c0d27fcc 17460_ACEOF
ba4481b5
DL
17461
17462fi
17463
17464if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 17465
c0d27fcc 17466cat >>confdefs.h <<\_ACEOF
ba4481b5 17467#define HAVE_AIX_SMT_EXP 1
c0d27fcc 17468_ACEOF
ba4481b5
DL
17469
17470fi
17471
c0d27fcc 17472echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 17473echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 17474if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 17475 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 17476echo "${ECHO_T}yes" >&6
b936fae4 17477
c0d27fcc 17478cat >>confdefs.h <<\_ACEOF
3d9fec71 17479#define HAVE_DEV_PTMX 1
c0d27fcc 17480_ACEOF
3d9fec71
DL
17481
17482else
c0d27fcc 17483 echo "$as_me:$LINENO: result: no" >&5
503d2be0 17484echo "${ECHO_T}no" >&6
3d9fec71
DL
17485fi
17486
c0d27fcc 17487echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
17488echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17489if test "${ac_cv_type_pid_t+set}" = set; then
17490 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 17491else
503d2be0 17492 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 17493#line $LINENO "configure"
19650fd6
AS
17494/* confdefs.h. */
17495_ACEOF
17496cat confdefs.h >>conftest.$ac_ext
17497cat >>conftest.$ac_ext <<_ACEOF
17498/* end confdefs.h. */
503d2be0
AS
17499$ac_includes_default
17500int
17501main ()
17502{
17503if ((pid_t *) 0)
17504 return 0;
17505if (sizeof (pid_t))
17506 return 0;
17507 ;
17508 return 0;
17509}
17510_ACEOF
17511rm -f conftest.$ac_objext
c0d27fcc 17512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
17513 (eval $ac_compile) 2>&5
17514 ac_status=$?
c0d27fcc 17515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17516 (exit $ac_status); } &&
793fa0d7 17517 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 17518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17519 (eval $ac_try) 2>&5
17520 ac_status=$?
c0d27fcc 17521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17522 (exit $ac_status); }; }; then
647847ea
DL
17523 ac_cv_type_pid_t=yes
17524else
503d2be0 17525 echo "$as_me: failed program was:" >&5
19650fd6
AS
17526sed 's/^/| /' conftest.$ac_ext >&5
17527
503d2be0 17528ac_cv_type_pid_t=no
647847ea 17529fi
503d2be0 17530rm -f conftest.$ac_objext conftest.$ac_ext
647847ea 17531fi
c0d27fcc 17532echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
17533echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17534if test $ac_cv_type_pid_t = yes; then
17535 :
17536else
17537
c0d27fcc 17538cat >>confdefs.h <<_ACEOF
647847ea 17539#define pid_t int
c0d27fcc 17540_ACEOF
647847ea
DL
17541
17542fi
17543
c0d27fcc
MR
17544
17545
503d2be0
AS
17546for ac_header in unistd.h vfork.h
17547do
17548as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
17549if eval "test \"\${$as_ac_Header+set}\" = set"; then
17550 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
17551echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17552if eval "test \"\${$as_ac_Header+set}\" = set"; then
17553 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
17554fi
17555echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17556echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 17557else
c0d27fcc
MR
17558 # Is the header compilable?
17559echo "$as_me:$LINENO: checking $ac_header usability" >&5
17560echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17561cat >conftest.$ac_ext <<_ACEOF
793fa0d7 17562#line $LINENO "configure"
19650fd6
AS
17563/* confdefs.h. */
17564_ACEOF
17565cat confdefs.h >>conftest.$ac_ext
17566cat >>conftest.$ac_ext <<_ACEOF
17567/* end confdefs.h. */
c0d27fcc
MR
17568$ac_includes_default
17569#include <$ac_header>
17570_ACEOF
17571rm -f conftest.$ac_objext
17572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17573 (eval $ac_compile) 2>&5
17574 ac_status=$?
17575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17576 (exit $ac_status); } &&
793fa0d7 17577 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
17578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17579 (eval $ac_try) 2>&5
17580 ac_status=$?
17581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17582 (exit $ac_status); }; }; then
17583 ac_header_compiler=yes
17584else
17585 echo "$as_me: failed program was:" >&5
19650fd6
AS
17586sed 's/^/| /' conftest.$ac_ext >&5
17587
c0d27fcc
MR
17588ac_header_compiler=no
17589fi
17590rm -f conftest.$ac_objext conftest.$ac_ext
17591echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17592echo "${ECHO_T}$ac_header_compiler" >&6
17593
17594# Is the header present?
17595echo "$as_me:$LINENO: checking $ac_header presence" >&5
17596echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17597cat >conftest.$ac_ext <<_ACEOF
793fa0d7 17598#line $LINENO "configure"
19650fd6
AS
17599/* confdefs.h. */
17600_ACEOF
17601cat confdefs.h >>conftest.$ac_ext
17602cat >>conftest.$ac_ext <<_ACEOF
17603/* end confdefs.h. */
503d2be0
AS
17604#include <$ac_header>
17605_ACEOF
c0d27fcc 17606if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
17607 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17608 ac_status=$?
6bae0ccf 17609 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17610 rm -f conftest.er1
17611 cat conftest.err >&5
c0d27fcc 17612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17613 (exit $ac_status); } >/dev/null; then
17614 if test -s conftest.err; then
17615 ac_cpp_err=$ac_c_preproc_warn_flag
17616 else
17617 ac_cpp_err=
17618 fi
647847ea 17619else
503d2be0
AS
17620 ac_cpp_err=yes
17621fi
17622if test -z "$ac_cpp_err"; then
c0d27fcc 17623 ac_header_preproc=yes
647847ea 17624else
503d2be0 17625 echo "$as_me: failed program was:" >&5
19650fd6
AS
17626sed 's/^/| /' conftest.$ac_ext >&5
17627
c0d27fcc 17628 ac_header_preproc=no
647847ea 17629fi
503d2be0 17630rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
17631echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17632echo "${ECHO_T}$ac_header_preproc" >&6
17633
17634# So? What about this header?
17635case $ac_header_compiler:$ac_header_preproc in
17636 yes:no )
17637 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17638echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
793fa0d7
DL
17639 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17640echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17641 (
17642 cat <<\_ASBOX
17643## ------------------------------------ ##
17644## Report this to bug-autoconf@gnu.org. ##
17645## ------------------------------------ ##
17646_ASBOX
17647 ) |
17648 sed "s/^/$as_me: WARNING: /" >&2
19650fd6 17649 ;;
c0d27fcc
MR
17650 no:yes )
17651 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17652echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
793fa0d7
DL
17653 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17654echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
c0d27fcc 17655 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 17656echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19650fd6
AS
17657 (
17658 cat <<\_ASBOX
793fa0d7
DL
17659## ------------------------------------ ##
17660## Report this to bug-autoconf@gnu.org. ##
17661## ------------------------------------ ##
19650fd6
AS
17662_ASBOX
17663 ) |
17664 sed "s/^/$as_me: WARNING: /" >&2
17665 ;;
c0d27fcc
MR
17666esac
17667echo "$as_me:$LINENO: checking for $ac_header" >&5
17668echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17669if eval "test \"\${$as_ac_Header+set}\" = set"; then
17670 echo $ECHO_N "(cached) $ECHO_C" >&6
17671else
793fa0d7 17672 eval "$as_ac_Header=$ac_header_preproc"
647847ea 17673fi
c0d27fcc 17674echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 17675echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
17676
17677fi
503d2be0 17678if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 17679 cat >>confdefs.h <<_ACEOF
503d2be0 17680#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 17681_ACEOF
647847ea 17682
73b77ee5 17683fi
c0d27fcc 17684
503d2be0 17685done
73b77ee5 17686
c0d27fcc
MR
17687
17688
503d2be0
AS
17689for ac_func in fork vfork
17690do
17691as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 17692echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
17693echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17694if eval "test \"\${$as_ac_var+set}\" = set"; then
17695 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 17696else
503d2be0 17697 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 17698#line $LINENO "configure"
19650fd6
AS
17699/* confdefs.h. */
17700_ACEOF
17701cat confdefs.h >>conftest.$ac_ext
17702cat >>conftest.$ac_ext <<_ACEOF
17703/* end confdefs.h. */
fa0b693c 17704/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17705 which can conflict with char $ac_func (); below.
17706 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17707 <limits.h> exists even on freestanding compilers. */
19650fd6
AS
17708#ifdef __STDC__
17709# include <limits.h>
17710#else
17711# include <assert.h>
17712#endif
fa0b693c 17713/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17714#ifdef __cplusplus
17715extern "C"
19650fd6 17716{
503d2be0 17717#endif
fa0b693c 17718/* We use char because int might match the return type of a gcc2
503d2be0
AS
17719 builtin and then its argument prototype would still apply. */
17720char $ac_func ();
fa0b693c
GM
17721/* The GNU C library defines this for functions which it implements
17722 to always fail with ENOSYS. Some functions are actually named
17723 something starting with __ and the normal name is an alias. */
503d2be0 17724#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
17725choke me
17726#else
19650fd6
AS
17727char (*f) () = $ac_func;
17728#endif
17729#ifdef __cplusplus
17730}
fa0b693c
GM
17731#endif
17732
19650fd6
AS
17733int
17734main ()
17735{
17736return f != $ac_func;
503d2be0
AS
17737 ;
17738 return 0;
17739}
17740_ACEOF
17741rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17742if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
17743 (eval $ac_link) 2>&5
17744 ac_status=$?
c0d27fcc 17745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17746 (exit $ac_status); } &&
793fa0d7 17747 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17749 (eval $ac_try) 2>&5
17750 ac_status=$?
c0d27fcc 17751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17752 (exit $ac_status); }; }; then
17753 eval "$as_ac_var=yes"
17754else
17755 echo "$as_me: failed program was:" >&5
19650fd6
AS
17756sed 's/^/| /' conftest.$ac_ext >&5
17757
503d2be0
AS
17758eval "$as_ac_var=no"
17759fi
17760rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17761fi
c0d27fcc 17762echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17763echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17764if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17765 cat >>confdefs.h <<_ACEOF
503d2be0 17766#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17767_ACEOF
503d2be0 17768
fa0b693c 17769fi
503d2be0 17770done
fa0b693c 17771
503d2be0 17772if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 17773 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
17774echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17775if test "${ac_cv_func_fork_works+set}" = set; then
17776 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 17777else
503d2be0
AS
17778 if test "$cross_compiling" = yes; then
17779 ac_cv_func_fork_works=cross
17780else
17781 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 17782/* By Ruediger Kuhlmann. */
503d2be0
AS
17783 #include <sys/types.h>
17784 #if HAVE_UNISTD_H
17785 # include <unistd.h>
17786 #endif
17787 /* Some systems only have a dummy stub for fork() */
17788 int main ()
17789 {
793fa0d7
DL
17790 if (fork() < 0)
17791 exit (1);
17792 exit (0);
503d2be0
AS
17793 }
17794_ACEOF
17795rm -f conftest$ac_exeext
c0d27fcc 17796if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
17797 (eval $ac_link) 2>&5
17798 ac_status=$?
c0d27fcc 17799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 17801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17802 (eval $ac_try) 2>&5
17803 ac_status=$?
c0d27fcc 17804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17805 (exit $ac_status); }; }; then
17806 ac_cv_func_fork_works=yes
17807else
17808 echo "$as_me: program exited with status $ac_status" >&5
17809echo "$as_me: failed program was:" >&5
19650fd6
AS
17810sed 's/^/| /' conftest.$ac_ext >&5
17811
c0d27fcc 17812( exit $ac_status )
503d2be0
AS
17813ac_cv_func_fork_works=no
17814fi
851a3062 17815rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
17816fi
17817fi
c0d27fcc 17818echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
17819echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17820
6bae0ccf
DL
17821else
17822 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
17823fi
17824if test "x$ac_cv_func_fork_works" = xcross; then
17825 case $host in
17826 *-*-amigaos* | *-*-msdosdjgpp*)
17827 # Override, as these systems have only a dummy fork() stub
17828 ac_cv_func_fork_works=no
17829 ;;
17830 *)
17831 ac_cv_func_fork_works=yes
17832 ;;
17833 esac
c0d27fcc
MR
17834 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
17835echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 17836fi
73b77ee5 17837ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 17838if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 17839 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
17840echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17841if test "${ac_cv_func_vfork_works+set}" = set; then
17842 echo $ECHO_N "(cached) $ECHO_C" >&6
17843else
17844 if test "$cross_compiling" = yes; then
17845 ac_cv_func_vfork_works=cross
fa0b693c 17846else
503d2be0 17847 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 17848#line $LINENO "configure"
19650fd6
AS
17849/* confdefs.h. */
17850_ACEOF
17851cat confdefs.h >>conftest.$ac_ext
17852cat >>conftest.$ac_ext <<_ACEOF
17853/* end confdefs.h. */
73b77ee5
GM
17854/* Thanks to Paul Eggert for this test. */
17855#include <stdio.h>
19650fd6 17856#include <stdlib.h>
fa0b693c 17857#include <sys/types.h>
73b77ee5 17858#include <sys/stat.h>
19650fd6 17859#include <sys/wait.h>
503d2be0
AS
17860#if HAVE_UNISTD_H
17861# include <unistd.h>
73b77ee5 17862#endif
503d2be0
AS
17863#if HAVE_VFORK_H
17864# include <vfork.h>
73b77ee5
GM
17865#endif
17866/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
17867 argument registers are propagated back to the parent. The compiler
17868 is told about this with #include <vfork.h>, but some compilers
17869 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
17870 static variable whose address is put into a register that is
17871 clobbered by the vfork. */
19650fd6 17872static void
fa0b693c 17873#ifdef __cplusplus
73b77ee5 17874sparc_address_test (int arg)
503d2be0 17875# else
73b77ee5 17876sparc_address_test (arg) int arg;
fa0b693c 17877#endif
fa0b693c 17878{
73b77ee5
GM
17879 static pid_t child;
17880 if (!child) {
17881 child = vfork ();
17882 if (child < 0) {
17883 perror ("vfork");
17884 _exit(2);
17885 }
17886 if (!child) {
17887 arg = getpid();
17888 write(-1, "", 0);
17889 _exit (arg);
17890 }
17891 }
17892}
503d2be0
AS
17893
17894int
17895main ()
17896{
73b77ee5
GM
17897 pid_t parent = getpid ();
17898 pid_t child;
fa0b693c 17899
19650fd6 17900 sparc_address_test (0);
fa0b693c 17901
73b77ee5 17902 child = vfork ();
fa0b693c 17903
73b77ee5 17904 if (child == 0) {
503d2be0
AS
17905 /* Here is another test for sparc vfork register problems. This
17906 test uses lots of local variables, at least as many local
17907 variables as main has allocated so far including compiler
17908 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
17909 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
17910 reuse the register of parent for one of the local variables,
17911 since it will think that parent can't possibly be used any more
17912 in this routine. Assigning to the local variable will thus
17913 munge parent in the parent process. */
73b77ee5
GM
17914 pid_t
17915 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17916 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17917 /* Convince the compiler that p..p7 are live; otherwise, it might
17918 use the same hardware register for all 8 local variables. */
17919 if (p != p1 || p != p2 || p != p3 || p != p4
17920 || p != p5 || p != p6 || p != p7)
17921 _exit(1);
fa0b693c 17922
503d2be0
AS
17923 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17924 from child file descriptors. If the child closes a descriptor
17925 before it execs or exits, this munges the parent's descriptor
17926 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
17927 _exit(close(fileno(stdout)) != 0);
17928 } else {
17929 int status;
17930 struct stat st;
17931
17932 while (wait(&status) != child)
17933 ;
17934 exit(
17935 /* Was there some problem with vforking? */
17936 child < 0
17937
17938 /* Did the child fail? (This shouldn't happen.) */
17939 || status
17940
17941 /* Did the vfork/compiler bug occur? */
17942 || parent != getpid()
fa0b693c 17943
73b77ee5
GM
17944 /* Did the file descriptor bug occur? */
17945 || fstat(fileno(stdout), &st) != 0
17946 );
17947 }
17948}
503d2be0
AS
17949_ACEOF
17950rm -f conftest$ac_exeext
c0d27fcc 17951if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
17952 (eval $ac_link) 2>&5
17953 ac_status=$?
c0d27fcc 17954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17955 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 17956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17957 (eval $ac_try) 2>&5
17958 ac_status=$?
c0d27fcc 17959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17960 (exit $ac_status); }; }; then
73b77ee5 17961 ac_cv_func_vfork_works=yes
fa0b693c 17962else
503d2be0
AS
17963 echo "$as_me: program exited with status $ac_status" >&5
17964echo "$as_me: failed program was:" >&5
19650fd6
AS
17965sed 's/^/| /' conftest.$ac_ext >&5
17966
c0d27fcc 17967( exit $ac_status )
503d2be0
AS
17968ac_cv_func_vfork_works=no
17969fi
851a3062 17970rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 17971fi
fa0b693c 17972fi
c0d27fcc 17973echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 17974echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 17975
503d2be0
AS
17976fi;
17977if test "x$ac_cv_func_fork_works" = xcross; then
17978 ac_cv_func_vfork_works=ac_cv_func_vfork
c0d27fcc
MR
17979 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
17980echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
17981fi
17982
503d2be0
AS
17983if test "x$ac_cv_func_vfork_works" = xyes; then
17984
c0d27fcc 17985cat >>confdefs.h <<\_ACEOF
503d2be0 17986#define HAVE_WORKING_VFORK 1
c0d27fcc 17987_ACEOF
503d2be0
AS
17988
17989else
17990
c0d27fcc 17991cat >>confdefs.h <<\_ACEOF
73b77ee5 17992#define vfork fork
c0d27fcc 17993_ACEOF
fa0b693c
GM
17994
17995fi
503d2be0
AS
17996if test "x$ac_cv_func_fork_works" = xyes; then
17997
c0d27fcc 17998cat >>confdefs.h <<\_ACEOF
503d2be0 17999#define HAVE_WORKING_FORK 1
c0d27fcc 18000_ACEOF
fa0b693c 18001
503d2be0 18002fi
647847ea 18003
c0d27fcc 18004
6a3a24fa
JD
18005echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
18006echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
18007if test "${emacs_cv_langinfo_codeset+set}" = set; then
18008 echo $ECHO_N "(cached) $ECHO_C" >&6
18009else
18010 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 18011#line $LINENO "configure"
19650fd6
AS
18012/* confdefs.h. */
18013_ACEOF
18014cat confdefs.h >>conftest.$ac_ext
18015cat >>conftest.$ac_ext <<_ACEOF
18016/* end confdefs.h. */
6a3a24fa
JD
18017#include <langinfo.h>
18018int
18019main ()
18020{
18021char* cs = nl_langinfo(CODESET);
18022 ;
18023 return 0;
18024}
18025_ACEOF
18026rm -f conftest.$ac_objext conftest$ac_exeext
18027if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18028 (eval $ac_link) 2>&5
18029 ac_status=$?
18030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18031 (exit $ac_status); } &&
793fa0d7 18032 { ac_try='test -s conftest$ac_exeext'
6a3a24fa
JD
18033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18034 (eval $ac_try) 2>&5
18035 ac_status=$?
18036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18037 (exit $ac_status); }; }; then
18038 emacs_cv_langinfo_codeset=yes
18039else
18040 echo "$as_me: failed program was:" >&5
19650fd6
AS
18041sed 's/^/| /' conftest.$ac_ext >&5
18042
6a3a24fa
JD
18043emacs_cv_langinfo_codeset=no
18044fi
18045rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18046
18047fi
18048echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
18049echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
18050if test $emacs_cv_langinfo_codeset = yes; then
18051
18052cat >>confdefs.h <<\_ACEOF
18053#define HAVE_LANGINFO_CODESET 1
18054_ACEOF
18055
18056fi
18057
c0d27fcc 18058echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
18059echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18060if test "${ac_cv_type_size_t+set}" = set; then
18061 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 18062else
503d2be0 18063 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 18064#line $LINENO "configure"
19650fd6
AS
18065/* confdefs.h. */
18066_ACEOF
18067cat confdefs.h >>conftest.$ac_ext
18068cat >>conftest.$ac_ext <<_ACEOF
18069/* end confdefs.h. */
503d2be0
AS
18070$ac_includes_default
18071int
18072main ()
18073{
18074if ((size_t *) 0)
18075 return 0;
18076if (sizeof (size_t))
18077 return 0;
18078 ;
18079 return 0;
18080}
18081_ACEOF
18082rm -f conftest.$ac_objext
c0d27fcc 18083if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
18084 (eval $ac_compile) 2>&5
18085 ac_status=$?
c0d27fcc 18086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18087 (exit $ac_status); } &&
793fa0d7 18088 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 18089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18090 (eval $ac_try) 2>&5
18091 ac_status=$?
c0d27fcc 18092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18093 (exit $ac_status); }; }; then
8730a8da
DL
18094 ac_cv_type_size_t=yes
18095else
503d2be0 18096 echo "$as_me: failed program was:" >&5
19650fd6
AS
18097sed 's/^/| /' conftest.$ac_ext >&5
18098
503d2be0 18099ac_cv_type_size_t=no
8730a8da 18100fi
503d2be0 18101rm -f conftest.$ac_objext conftest.$ac_ext
8730a8da 18102fi
c0d27fcc 18103echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
18104echo "${ECHO_T}$ac_cv_type_size_t" >&6
18105if test $ac_cv_type_size_t = yes; then
503d2be0 18106
c0d27fcc
MR
18107cat >>confdefs.h <<_ACEOF
18108#define HAVE_SIZE_T 1
18109_ACEOF
18110
8730a8da
DL
18111
18112fi
18113
c0d27fcc 18114
973a76b1
DL
18115echo "$as_me:$LINENO: checking for mbstate_t" >&5
18116echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
18117if test "${ac_cv_type_mbstate_t+set}" = set; then
18118 echo $ECHO_N "(cached) $ECHO_C" >&6
18119else
18120 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 18121#line $LINENO "configure"
19650fd6
AS
18122/* confdefs.h. */
18123_ACEOF
18124cat confdefs.h >>conftest.$ac_ext
18125cat >>conftest.$ac_ext <<_ACEOF
18126/* end confdefs.h. */
973a76b1
DL
18127$ac_includes_default
18128# include <wchar.h>
18129int
18130main ()
18131{
18132mbstate_t x; return sizeof x;
18133 ;
18134 return 0;
18135}
18136_ACEOF
18137rm -f conftest.$ac_objext
18138if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18139 (eval $ac_compile) 2>&5
18140 ac_status=$?
18141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18142 (exit $ac_status); } &&
793fa0d7 18143 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
18144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18145 (eval $ac_try) 2>&5
18146 ac_status=$?
18147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18148 (exit $ac_status); }; }; then
18149 ac_cv_type_mbstate_t=yes
18150else
18151 echo "$as_me: failed program was:" >&5
19650fd6
AS
18152sed 's/^/| /' conftest.$ac_ext >&5
18153
973a76b1
DL
18154ac_cv_type_mbstate_t=no
18155fi
18156rm -f conftest.$ac_objext conftest.$ac_ext
18157fi
18158echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
18159echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
18160 if test $ac_cv_type_mbstate_t = yes; then
18161
18162cat >>confdefs.h <<\_ACEOF
18163#define HAVE_MBSTATE_T 1
18164_ACEOF
18165
18166 else
18167
18168cat >>confdefs.h <<\_ACEOF
18169#define mbstate_t int
18170_ACEOF
18171
18172 fi
18173
22044edf
DL
18174echo "$as_me:$LINENO: checking for C restrict keyword" >&5
18175echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
18176if test "${emacs_cv_c_restrict+set}" = set; then
18177 echo $ECHO_N "(cached) $ECHO_C" >&6
18178else
18179 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 18180#line $LINENO "configure"
19650fd6
AS
18181/* confdefs.h. */
18182_ACEOF
18183cat confdefs.h >>conftest.$ac_ext
18184cat >>conftest.$ac_ext <<_ACEOF
18185/* end confdefs.h. */
22044edf
DL
18186void fred (int *restrict x);
18187int
18188main ()
18189{
b936fae4 18190
22044edf
DL
18191 ;
18192 return 0;
18193}
c0d27fcc 18194_ACEOF
22044edf
DL
18195rm -f conftest.$ac_objext
18196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18197 (eval $ac_compile) 2>&5
18198 ac_status=$?
18199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18200 (exit $ac_status); } &&
793fa0d7 18201 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
18202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18203 (eval $ac_try) 2>&5
18204 ac_status=$?
18205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18206 (exit $ac_status); }; }; then
18207 emacs_cv_c_restrict=yes
18208else
18209 echo "$as_me: failed program was:" >&5
19650fd6
AS
18210sed 's/^/| /' conftest.$ac_ext >&5
18211
22044edf 18212cat >conftest.$ac_ext <<_ACEOF
793fa0d7 18213#line $LINENO "configure"
19650fd6
AS
18214/* confdefs.h. */
18215_ACEOF
18216cat confdefs.h >>conftest.$ac_ext
18217cat >>conftest.$ac_ext <<_ACEOF
18218/* end confdefs.h. */
22044edf
DL
18219void fred (int *__restrict x);
18220int
18221main ()
18222{
c0d27fcc 18223
22044edf
DL
18224 ;
18225 return 0;
18226}
c0d27fcc 18227_ACEOF
22044edf
DL
18228rm -f conftest.$ac_objext
18229if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18230 (eval $ac_compile) 2>&5
18231 ac_status=$?
18232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18233 (exit $ac_status); } &&
793fa0d7 18234 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
18235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18236 (eval $ac_try) 2>&5
18237 ac_status=$?
18238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18239 (exit $ac_status); }; }; then
18240 emacs_cv_c_restrict=__restrict
18241else
18242 echo "$as_me: failed program was:" >&5
19650fd6
AS
18243sed 's/^/| /' conftest.$ac_ext >&5
18244
22044edf 18245emacs_cv_c_restrict=no
ba4481b5 18246fi
22044edf 18247rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 18248fi
22044edf 18249rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 18250fi
22044edf
DL
18251echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
18252echo "${ECHO_T}$emacs_cv_c_restrict" >&6
18253case "$emacs_cv_c_restrict" in
18254 yes) emacs_restrict=restrict;;
18255 no) emacs_restrict="";;
18256 *) emacs_restrict="$emacs_cv_c_restrict";;
18257esac
18258if test "$emacs_restrict" != __restrict; then
b936fae4 18259
22044edf
DL
18260cat >>confdefs.h <<_ACEOF
18261#define __restrict $emacs_restrict
c0d27fcc 18262_ACEOF
ba4481b5
DL
18263
18264fi
ba4481b5 18265
22044edf
DL
18266echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
18267echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
18268if test "${emacs_cv_c_restrict_arr+set}" = set; then
18269 echo $ECHO_N "(cached) $ECHO_C" >&6
18270else
18271 cat >conftest.$ac_ext <<_ACEOF
793fa0d7 18272#line $LINENO "configure"
19650fd6
AS
18273/* confdefs.h. */
18274_ACEOF
18275cat confdefs.h >>conftest.$ac_ext
18276cat >>conftest.$ac_ext <<_ACEOF
18277/* end confdefs.h. */
22044edf
DL
18278void fred (int x[__restrict]);
18279int
18280main ()
18281{
b936fae4 18282
22044edf
DL
18283 ;
18284 return 0;
18285}
c0d27fcc 18286_ACEOF
22044edf
DL
18287rm -f conftest.$ac_objext
18288if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18289 (eval $ac_compile) 2>&5
18290 ac_status=$?
18291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18292 (exit $ac_status); } &&
793fa0d7 18293 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
18294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18295 (eval $ac_try) 2>&5
18296 ac_status=$?
18297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18298 (exit $ac_status); }; }; then
18299 emacs_cv_c_restrict_arr=yes
18300else
18301 echo "$as_me: failed program was:" >&5
19650fd6
AS
18302sed 's/^/| /' conftest.$ac_ext >&5
18303
22044edf 18304emacs_cv_c_restrict_arr=no
ba4481b5 18305fi
22044edf
DL
18306rm -f conftest.$ac_objext conftest.$ac_ext
18307fi
18308echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
18309echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
18310if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 18311
c0d27fcc 18312cat >>confdefs.h <<\_ACEOF
22044edf 18313#define __restrict_arr __restrict
c0d27fcc 18314_ACEOF
ba4481b5 18315
ba4481b5
DL
18316fi
18317
c0d27fcc 18318
c0d27fcc 18319
22044edf
DL
18320# Set up the CFLAGS for real compilation, so we can substitute it.
18321CFLAGS="$REAL_CFLAGS"
18322CPPFLAGS="$REAL_CPPFLAGS"
18323
18324#### Find out which version of Emacs this is.
18325version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
18326 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
18327if test x"${version}" = x; then
18328 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
18329echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
18330 { (exit 1); exit 1; }; }
18331fi
18332
18333### Specify what sort of things we'll be editing into Makefile and config.h.
18334### Use configuration here uncanonicalized to avoid exceeding size limits.
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
6a3a24fa 18367
22044edf
DL
18368
18369
18370cat >>confdefs.h <<_ACEOF
18371#define EMACS_CONFIGURATION "${canonical}"
18372_ACEOF
18373
18374
18375cat >>confdefs.h <<_ACEOF
18376#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
18377_ACEOF
18378
18379
18380cat >>confdefs.h <<_ACEOF
18381#define config_machfile "${machfile}"
18382_ACEOF
18383
18384
18385cat >>confdefs.h <<_ACEOF
18386#define config_opsysfile "${opsysfile}"
18387_ACEOF
18388
18389
18390cat >>confdefs.h <<_ACEOF
18391#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
18392_ACEOF
18393
18394
18395cat >>confdefs.h <<_ACEOF
18396#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
18397_ACEOF
18398
18399
18400cat >>confdefs.h <<_ACEOF
18401#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
18402_ACEOF
18403
18404
18405cat >>confdefs.h <<_ACEOF
18406#define UNEXEC_SRC ${UNEXEC_SRC}
18407_ACEOF
18408
18409
18410if test "${HAVE_X_WINDOWS}" = "yes" ; then
18411
18412cat >>confdefs.h <<\_ACEOF
18413#define HAVE_X_WINDOWS 1
18414_ACEOF
18415
18416fi
18417if test "${USE_X_TOOLKIT}" != "none" ; then
18418
18419cat >>confdefs.h <<\_ACEOF
18420#define USE_X_TOOLKIT 1
18421_ACEOF
18422
18423fi
18424if test "${HAVE_X11}" = "yes" ; then
18425
18426cat >>confdefs.h <<\_ACEOF
18427#define HAVE_X11 1
18428_ACEOF
18429
18430fi
18431if test "${HAVE_XFREE386}" = "yes" ; then
18432
18433cat >>confdefs.h <<\_ACEOF
18434#define HAVE_XFREE386 1
18435_ACEOF
18436
18437fi
18438if test "${HAVE_MENUS}" = "yes" ; then
18439
18440cat >>confdefs.h <<\_ACEOF
18441#define HAVE_MENUS 1
18442_ACEOF
18443
18444fi
18445if test "${GNU_MALLOC}" = "yes" ; then
18446
18447cat >>confdefs.h <<\_ACEOF
18448#define GNU_MALLOC 1
18449_ACEOF
18450
18451fi
18452if test "${REL_ALLOC}" = "yes" ; then
18453
18454cat >>confdefs.h <<\_ACEOF
18455#define REL_ALLOC 1
18456_ACEOF
18457
18458fi
18459
18460
18461
c0d27fcc
MR
18462
18463
ba4481b5 18464#### Report on what we decided to do.
488dd4c4
JD
18465#### Report GTK as a toolkit, even if it doesn't use Xt.
18466#### It makes printing result more understandable as using GTK sets
18467#### toolkit_scroll_bars to yes by default.
18468if test "${HAVE_GTK}" = "yes"; then
18469 USE_X_TOOLKIT=GTK
18470fi
18471
ba4481b5
DL
18472echo "
18473Configured for \`${canonical}'.
18474
18475 Where should the build process find the source code? ${srcdir}
18476 What operating system and machine description files should Emacs use?
18477 \`${opsysfile}' and \`${machfile}'
18478 What compiler should emacs be built with? ${CC} ${CFLAGS}
18479 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 18480 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 18481 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 18482 What window system should Emacs use? ${window_system}
8e967cf7 18483 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
18484
18485if test -n "${x_includes}"; then
18486echo " Where do we find X Windows header files? ${x_includes}"
18487else
18488echo " Where do we find X Windows header files? Standard dirs"
18489fi
18490if test -n "${x_libraries}"; then
18491echo " Where do we find X Windows libraries? ${x_libraries}"
18492else
18493echo " Where do we find X Windows libraries? Standard dirs"
18494fi
18495
18496echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
18497echo " Does Emacs use -lXpm? ${HAVE_XPM}"
18498echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
18499echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
18500echo " Does Emacs use -lungif? ${HAVE_GIF}"
18501echo " Does Emacs use -lpng? ${HAVE_PNG}"
18502echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
18503echo
18504
18505# Remove any trailing slashes in these variables.
18506test "${prefix}" != NONE &&
18507 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
18508test "${exec_prefix}" != NONE &&
18509 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
18510
d0e9bfd2
GM
18511## Check if the C preprocessor will convert `..' to `. .'. If so, set
18512## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
18513## from Makefile.c can correctly provide the arg `-traditional' to the
18514## C preprocessor.
18515
503d2be0 18516cat >conftest.$ac_ext <<_ACEOF
793fa0d7 18517#line $LINENO "configure"
19650fd6
AS
18518/* confdefs.h. */
18519_ACEOF
18520cat confdefs.h >>conftest.$ac_ext
18521cat >>conftest.$ac_ext <<_ACEOF
18522/* end confdefs.h. */
d0e9bfd2 18523yes..yes
503d2be0 18524_ACEOF
d0e9bfd2 18525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18526 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
18527 CPP_NEED_TRADITIONAL=no
18528else
d0e9bfd2
GM
18529 CPP_NEED_TRADITIONAL=yes
18530fi
18531rm -f conftest*
18532
c0d27fcc 18533
6bae0ccf
DL
18534 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"
18535 ac_config_commands="$ac_config_commands default"
503d2be0 18536cat >confcache <<\_ACEOF
ba4481b5
DL
18537# This file is a shell script that caches the results of configure
18538# tests run on this system so they can be shared between configure
503d2be0
AS
18539# scripts and configure runs, see configure's option --config-cache.
18540# It is not useful on other systems. If it contains results you don't
18541# want to keep, you may remove or edit it.
ba4481b5 18542#
503d2be0
AS
18543# config.status only pays attention to the cache file if you give it
18544# the --recheck option to rerun configure.
ba4481b5 18545#
6bae0ccf 18546# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
18547# loading this file, other *unset* `ac_cv_foo' will be assigned the
18548# following values.
18549
18550_ACEOF
18551
ba4481b5
DL
18552# The following way of writing the cache mishandles newlines in values,
18553# but we know of no workaround that is simple, portable, and efficient.
18554# So, don't put newlines in cache variables' values.
18555# Ultrix sh set writes to stderr and can't be redirected directly,
18556# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
18557{
18558 (set) 2>&1 |
18559 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18560 *ac_space=\ *)
18561 # `set' does not quote correctly, so add quotes (double-quote
18562 # substitution turns \\\\ into \\, and sed turns \\ into \).
18563 sed -n \
793fa0d7
DL
18564 "s/'/'\\\\''/g;
18565 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
503d2be0
AS
18566 ;;
18567 *)
18568 # `set' quotes correctly as required by POSIX, so do not add quotes.
18569 sed -n \
793fa0d7 18570 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
18571 ;;
18572 esac;
18573} |
18574 sed '
18575 t clear
18576 : clear
18577 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18578 t end
18579 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18580 : end' >>confcache
19650fd6 18581if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 18582 if test -w $cache_file; then
503d2be0
AS
18583 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18584 cat confcache >$cache_file
ba4481b5
DL
18585 else
18586 echo "not updating unwritable cache $cache_file"
18587 fi
18588fi
18589rm -f confcache
18590
ba4481b5
DL
18591test "x$prefix" = xNONE && prefix=$ac_default_prefix
18592# Let make expand exec_prefix.
18593test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18594
503d2be0
AS
18595# VPATH may cause trouble with some makes, so we remove $(srcdir),
18596# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18597# trailing colons and then remove the whole line if VPATH becomes empty
18598# (actually we leave an empty line to preserve line numbers).
ba4481b5 18599if test "x$srcdir" = x.; then
793fa0d7 18600 ac_vpsub='/^[ ]*VPATH[ ]*=/{
503d2be0
AS
18601s/:*\$(srcdir):*/:/;
18602s/:*\${srcdir}:*/:/;
18603s/:*@srcdir@:*/:/;
793fa0d7 18604s/^\([^=]*=[ ]*\):*/\1/;
503d2be0 18605s/:*$//;
793fa0d7 18606s/^[^=]*=[ ]*$//;
503d2be0 18607}'
ba4481b5
DL
18608fi
18609
ba4481b5
DL
18610DEFS=-DHAVE_CONFIG_H
18611
6bae0ccf
DL
18612ac_libobjs=
18613ac_ltlibobjs=
18614for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18615 # 1. Remove the extension, and $U if already installed.
18616 ac_i=`echo "$ac_i" |
793fa0d7 18617 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6bae0ccf
DL
18618 # 2. Add them.
18619 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18620 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18621done
18622LIBOBJS=$ac_libobjs
18623
18624LTLIBOBJS=$ac_ltlibobjs
18625
18626
c0d27fcc 18627
ba4481b5 18628: ${CONFIG_STATUS=./config.status}
503d2be0
AS
18629ac_clean_files_save=$ac_clean_files
18630ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 18631{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
18632echo "$as_me: creating $CONFIG_STATUS" >&6;}
18633cat >$CONFIG_STATUS <<_ACEOF
18634#! $SHELL
c0d27fcc 18635# Generated by $as_me.
ba4481b5 18636# Run this file to recreate the current configuration.
ba4481b5 18637# Compiler output produced by configure, useful for debugging
503d2be0 18638# configure, is in config.log if it exists.
ba4481b5 18639
503d2be0 18640debug=false
19650fd6
AS
18641ac_cs_recheck=false
18642ac_cs_silent=false
503d2be0 18643SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
18644_ACEOF
18645
18646cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
18647## --------------------- ##
18648## M4sh Initialization. ##
18649## --------------------- ##
18650
503d2be0
AS
18651# Be Bourne compatible
18652if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18653 emulate sh
18654 NULLCMD=:
6bae0ccf
DL
18655 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18656 # is contrary to our usage. Disable this feature.
18657 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
18658elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18659 set -o posix
18660fi
18661
c0d27fcc 18662# Support unset when possible.
793fa0d7 18663if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
c0d27fcc
MR
18664 as_unset=unset
18665else
18666 as_unset=false
18667fi
18668
6bae0ccf
DL
18669
18670# Work around bugs in pre-3.0 UWIN ksh.
18671$as_unset ENV MAIL MAILPATH
18672PS1='$ '
18673PS2='> '
18674PS4='+ '
18675
18676# NLS nuisances.
19650fd6
AS
18677for as_var in \
18678 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18679 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18680 LC_TELEPHONE LC_TIME
6bae0ccf 18681do
793fa0d7 18682 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
18683 eval $as_var=C; export $as_var
18684 else
18685 $as_unset $as_var
18686 fi
18687done
18688
18689# Required to use basename.
18690if expr a : '\(a\)' >/dev/null 2>&1; then
18691 as_expr=expr
18692else
18693 as_expr=false
18694fi
18695
18696if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18697 as_basename=basename
18698else
18699 as_basename=false
18700fi
c0d27fcc
MR
18701
18702
503d2be0 18703# Name of the executable.
6bae0ccf 18704as_me=`$as_basename "$0" ||
c0d27fcc
MR
18705$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18706 X"$0" : 'X\(//\)$' \| \
18707 X"$0" : 'X\(/\)$' \| \
18708 . : '\(.\)' 2>/dev/null ||
18709echo X/"$0" |
18710 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18711 /^X\/\(\/\/\)$/{ s//\1/; q; }
18712 /^X\/\(\/\).*/{ s//\1/; q; }
18713 s/.*/./; q'`
18714
6bae0ccf 18715
c0d27fcc
MR
18716# PATH needs CR, and LINENO needs CR and PATH.
18717# Avoid depending upon Character Ranges.
18718as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18719as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18720as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18721as_cr_digits='0123456789'
18722as_cr_alnum=$as_cr_Letters$as_cr_digits
18723
18724# The user is always right.
18725if test "${PATH_SEPARATOR+set}" != set; then
19650fd6
AS
18726 echo "#! /bin/sh" >conf$$.sh
18727 echo "exit 0" >>conf$$.sh
18728 chmod +x conf$$.sh
18729 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
18730 PATH_SEPARATOR=';'
18731 else
18732 PATH_SEPARATOR=:
18733 fi
19650fd6 18734 rm -f conf$$.sh
c0d27fcc
MR
18735fi
18736
18737
18738 as_lineno_1=$LINENO
18739 as_lineno_2=$LINENO
18740 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18741 test "x$as_lineno_1" != "x$as_lineno_2" &&
18742 test "x$as_lineno_3" = "x$as_lineno_2" || {
18743 # Find who we are. Look in the path if we contain no path at all
18744 # relative or not.
18745 case $0 in
18746 *[\\/]* ) as_myself=$0 ;;
18747 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18748for as_dir in $PATH
18749do
18750 IFS=$as_save_IFS
18751 test -z "$as_dir" && as_dir=.
18752 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18753done
18754
18755 ;;
18756 esac
18757 # We did not find ourselves, most probably we were run as `sh COMMAND'
18758 # in which case we are not to be found in the path.
18759 if test "x$as_myself" = x; then
18760 as_myself=$0
18761 fi
18762 if test ! -f "$as_myself"; then
18763 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18764echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18765 { (exit 1); exit 1; }; }
18766 fi
18767 case $CONFIG_SHELL in
18768 '')
18769 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18770for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18771do
18772 IFS=$as_save_IFS
18773 test -z "$as_dir" && as_dir=.
18774 for as_base in sh bash ksh sh5; do
18775 case $as_dir in
18776 /*)
18777 if ("$as_dir/$as_base" -c '
18778 as_lineno_1=$LINENO
18779 as_lineno_2=$LINENO
18780 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18781 test "x$as_lineno_1" != "x$as_lineno_2" &&
18782 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
18783 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18784 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
18785 CONFIG_SHELL=$as_dir/$as_base
18786 export CONFIG_SHELL
18787 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18788 fi;;
18789 esac
18790 done
18791done
18792;;
18793 esac
18794
18795 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18796 # uniformly replaced by the line number. The first 'sed' inserts a
18797 # line-number line before each line; the second 'sed' does the real
18798 # work. The second script uses 'N' to pair each line-number line
18799 # with the numbered line, and appends trailing '-' during
18800 # substitution so that $LINENO is not a special case at line end.
18801 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18802 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18803 sed '=' <$as_myself |
18804 sed '
18805 N
18806 s,$,-,
18807 : loop
18808 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18809 t loop
18810 s,-$,,
18811 s,^['$as_cr_digits']*\n,,
18812 ' >$as_me.lineno &&
18813 chmod +x $as_me.lineno ||
18814 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18815echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18816 { (exit 1); exit 1; }; }
18817
18818 # Don't try to exec as it changes $[0], causing all sort of problems
18819 # (the dirname of $[0] is not the place where we might find the
18820 # original and so on. Autoconf is especially sensible to this).
18821 . ./$as_me.lineno
18822 # Exit status is that of the last command.
18823 exit
18824}
18825
18826
18827case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18828 *c*,-n*) ECHO_N= ECHO_C='
18829' ECHO_T=' ' ;;
18830 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18831 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18832esac
503d2be0
AS
18833
18834if expr a : '\(a\)' >/dev/null 2>&1; then
18835 as_expr=expr
18836else
18837 as_expr=false
18838fi
18839
18840rm -f conf$$ conf$$.exe conf$$.file
18841echo >conf$$.file
18842if ln -s conf$$.file conf$$ 2>/dev/null; then
18843 # We could just check for DJGPP; but this test a) works b) is more generic
18844 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18845 if test -f conf$$.exe; then
18846 # Don't use ln at all; we don't have any links
18847 as_ln_s='cp -p'
18848 else
18849 as_ln_s='ln -s'
18850 fi
18851elif ln conf$$.file conf$$ 2>/dev/null; then
18852 as_ln_s=ln
18853else
18854 as_ln_s='cp -p'
18855fi
18856rm -f conf$$ conf$$.exe conf$$.file
18857
6bae0ccf
DL
18858if mkdir -p . 2>/dev/null; then
18859 as_mkdir_p=:
18860else
18861 as_mkdir_p=false
18862fi
18863
503d2be0
AS
18864as_executable_p="test -f"
18865
c0d27fcc
MR
18866# Sed expression to map a string onto a valid CPP name.
18867as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18868
18869# Sed expression to map a string onto a valid variable name.
18870as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
503d2be0 18871
503d2be0
AS
18872
18873# IFS
18874# We need space, tab and new line, in precisely that order.
18875as_nl='
18876'
18877IFS=" $as_nl"
18878
18879# CDPATH.
6bae0ccf 18880$as_unset CDPATH
503d2be0
AS
18881
18882exec 6>&1
18883
c0d27fcc
MR
18884# Open the log real soon, to keep \$[0] and so on meaningful, and to
18885# report actual input values of CONFIG_FILES etc. instead of their
18886# values after options handling. Logging --version etc. is OK.
18887exec 5>>config.log
18888{
18889 echo
18890 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18891## Running $as_me. ##
18892_ASBOX
18893} >&5
18894cat >&5 <<_CSEOF
18895
18896This file was extended by $as_me, which was
793fa0d7 18897generated by GNU Autoconf 2.57. Invocation command line was
c0d27fcc
MR
18898
18899 CONFIG_FILES = $CONFIG_FILES
18900 CONFIG_HEADERS = $CONFIG_HEADERS
18901 CONFIG_LINKS = $CONFIG_LINKS
18902 CONFIG_COMMANDS = $CONFIG_COMMANDS
18903 $ $0 $@
18904
18905_CSEOF
18906echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18907echo >&5
503d2be0
AS
18908_ACEOF
18909
18910# Files that config.status was made for.
18911if test -n "$ac_config_files"; then
18912 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18913fi
18914
18915if test -n "$ac_config_headers"; then
18916 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18917fi
18918
18919if test -n "$ac_config_links"; then
18920 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18921fi
18922
18923if test -n "$ac_config_commands"; then
18924 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18925fi
18926
c0d27fcc 18927cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18928
18929ac_cs_usage="\
18930\`$as_me' instantiates files from templates according to the
18931current configuration.
18932
18933Usage: $0 [OPTIONS] [FILE]...
18934
18935 -h, --help print this help, then exit
18936 -V, --version print version number, then exit
19650fd6 18937 -q, --quiet do not print progress messages
503d2be0
AS
18938 -d, --debug don't remove temporary files
18939 --recheck update $as_me by reconfiguring in the same conditions
18940 --file=FILE[:TEMPLATE]
793fa0d7 18941 instantiate the configuration file FILE
503d2be0 18942 --header=FILE[:TEMPLATE]
793fa0d7 18943 instantiate the configuration header FILE
503d2be0
AS
18944
18945Configuration files:
18946$config_files
18947
18948Configuration headers:
18949$config_headers
18950
18951Configuration commands:
18952$config_commands
18953
18954Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 18955_ACEOF
503d2be0 18956
c0d27fcc 18957cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
18958ac_cs_version="\\
18959config.status
793fa0d7 18960configured by $0, generated by GNU Autoconf 2.57,
503d2be0
AS
18961 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18962
793fa0d7
DL
18963Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18964Free Software Foundation, Inc.
503d2be0
AS
18965This config.status script is free software; the Free Software Foundation
18966gives unlimited permission to copy, distribute and modify it."
18967srcdir=$srcdir
18968INSTALL="$INSTALL"
c0d27fcc 18969_ACEOF
503d2be0 18970
c0d27fcc 18971cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18972# If no file are specified by the user, then we need to provide default
18973# value. By we need to know if files were specified by the user.
18974ac_need_defaults=:
18975while test $# != 0
ba4481b5 18976do
503d2be0
AS
18977 case $1 in
18978 --*=*)
18979 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18980 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
18981 ac_shift=:
18982 ;;
18983 -*)
18984 ac_option=$1
18985 ac_optarg=$2
18986 ac_shift=shift
503d2be0 18987 ;;
503d2be0
AS
18988 *) # This is not an option, so the user has probably given explicit
18989 # arguments.
6bae0ccf 18990 ac_option=$1
503d2be0
AS
18991 ac_need_defaults=false;;
18992 esac
18993
6bae0ccf 18994 case $ac_option in
503d2be0 18995 # Handling of the options.
c0d27fcc 18996_ACEOF
f57bd967 18997cat >>$CONFIG_STATUS <<\_ACEOF
19650fd6
AS
18998 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18999 ac_cs_recheck=: ;;
503d2be0
AS
19000 --version | --vers* | -V )
19001 echo "$ac_cs_version"; exit 0 ;;
19002 --he | --h)
19003 # Conflict between --help and --header
c0d27fcc 19004 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
19005Try \`$0 --help' for more information." >&5
19006echo "$as_me: error: ambiguous option: $1
19007Try \`$0 --help' for more information." >&2;}
19008 { (exit 1); exit 1; }; };;
19009 --help | --hel | -h )
19010 echo "$ac_cs_usage"; exit 0 ;;
19011 --debug | --d* | -d )
19012 debug=: ;;
19013 --file | --fil | --fi | --f )
6bae0ccf
DL
19014 $ac_shift
19015 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
19016 ac_need_defaults=false;;
19017 --header | --heade | --head | --hea )
6bae0ccf
DL
19018 $ac_shift
19019 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 19020 ac_need_defaults=false;;
19650fd6
AS
19021 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19022 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19023 ac_cs_silent=: ;;
503d2be0
AS
19024
19025 # This is an error.
c0d27fcc 19026 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
19027Try \`$0 --help' for more information." >&5
19028echo "$as_me: error: unrecognized option: $1
19029Try \`$0 --help' for more information." >&2;}
19030 { (exit 1); exit 1; }; } ;;
19031
19032 *) ac_config_targets="$ac_config_targets $1" ;;
19033
ba4481b5 19034 esac
503d2be0 19035 shift
ba4481b5
DL
19036done
19037
19650fd6
AS
19038ac_configure_extra_args=
19039
19040if $ac_cs_silent; then
19041 exec 6>/dev/null
19042 ac_configure_extra_args="$ac_configure_extra_args --silent"
19043fi
19044
19045_ACEOF
19046cat >>$CONFIG_STATUS <<_ACEOF
19047if \$ac_cs_recheck; then
19048 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19049 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19050fi
19051
503d2be0 19052_ACEOF
ba4481b5 19053
c0d27fcc 19054cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
19055#
19056# INIT-COMMANDS section.
19057#
ba4481b5 19058
503d2be0
AS
19059GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
19060
c0d27fcc
MR
19061_ACEOF
19062
503d2be0 19063
c0d27fcc
MR
19064
19065cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
19066for ac_config_target in $ac_config_targets
19067do
19068 case "$ac_config_target" in
19069 # Handling of arguments.
19070 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19071 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
19072 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
19073 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
19074 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
19075 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
19076 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 19077 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 19078 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
19079 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
19080 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19081 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 19082 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
19083echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19084 { (exit 1); exit 1; }; };;
19085 esac
ba4481b5 19086done
503d2be0
AS
19087
19088# If the user did not use the arguments to specify the items to instantiate,
19089# then the envvar interface is used. Set only those that are not.
19090# We use the long form for the default assignment because of an extremely
19091# bizarre bug on SunOS 4.1.3.
19092if $ac_need_defaults; then
19093 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19094 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19095 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 19096fi
503d2be0 19097
19650fd6
AS
19098# Have a temporary directory for convenience. Make it in the build tree
19099# simply because there is no reason to put it here, and in addition,
19100# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
19101# Create a temporary directory, and hook for its removal unless debugging.
19102$debug ||
19103{
19104 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19105 trap '{ (exit 1); exit 1; }' 1 2 13 15
19106}
19107
19108# Create a (secure) tmp directory for tmp files.
19650fd6 19109
503d2be0 19110{
19650fd6 19111 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
19112 test -n "$tmp" && test -d "$tmp"
19113} ||
19114{
19650fd6 19115 tmp=./confstat$$-$RANDOM
503d2be0
AS
19116 (umask 077 && mkdir $tmp)
19117} ||
19118{
19650fd6 19119 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
19120 { (exit 1); exit 1; }
19121}
19122
c0d27fcc 19123_ACEOF
503d2be0 19124
c0d27fcc 19125cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
19126
19127#
19128# CONFIG_FILES section.
19129#
19130
19131# No need to generate the scripts if there are no CONFIG_FILES.
19132# This happens for instance when ./config.status config.h
19133if test -n "\$CONFIG_FILES"; then
19134 # Protect against being on the right side of a sed subst in config.status.
19135 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19136 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19137s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
19138s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19139s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19140s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19141s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19142s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19143s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
19144s,@exec_prefix@,$exec_prefix,;t t
19145s,@prefix@,$prefix,;t t
19146s,@program_transform_name@,$program_transform_name,;t t
19147s,@bindir@,$bindir,;t t
19148s,@sbindir@,$sbindir,;t t
19149s,@libexecdir@,$libexecdir,;t t
19150s,@datadir@,$datadir,;t t
19151s,@sysconfdir@,$sysconfdir,;t t
19152s,@sharedstatedir@,$sharedstatedir,;t t
19153s,@localstatedir@,$localstatedir,;t t
19154s,@libdir@,$libdir,;t t
19155s,@includedir@,$includedir,;t t
19156s,@oldincludedir@,$oldincludedir,;t t
19157s,@infodir@,$infodir,;t t
19158s,@mandir@,$mandir,;t t
503d2be0
AS
19159s,@build_alias@,$build_alias,;t t
19160s,@host_alias@,$host_alias,;t t
19161s,@target_alias@,$target_alias,;t t
c0d27fcc 19162s,@DEFS@,$DEFS,;t t
503d2be0
AS
19163s,@ECHO_C@,$ECHO_C,;t t
19164s,@ECHO_N@,$ECHO_N,;t t
19165s,@ECHO_T@,$ECHO_T,;t t
503d2be0 19166s,@LIBS@,$LIBS,;t t
19650fd6 19167s,@MAINT@,$MAINT,;t t
503d2be0
AS
19168s,@build@,$build,;t t
19169s,@build_cpu@,$build_cpu,;t t
19170s,@build_vendor@,$build_vendor,;t t
19171s,@build_os@,$build_os,;t t
19172s,@host@,$host,;t t
19173s,@host_cpu@,$host_cpu,;t t
19174s,@host_vendor@,$host_vendor,;t t
19175s,@host_os@,$host_os,;t t
19176s,@CC@,$CC,;t t
19177s,@CFLAGS@,$CFLAGS,;t t
19178s,@LDFLAGS@,$LDFLAGS,;t t
19179s,@CPPFLAGS@,$CPPFLAGS,;t t
19180s,@ac_ct_CC@,$ac_ct_CC,;t t
19181s,@EXEEXT@,$EXEEXT,;t t
19182s,@OBJEXT@,$OBJEXT,;t t
19183s,@LN_S@,$LN_S,;t t
19184s,@CPP@,$CPP,;t t
19185s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19186s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19187s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
19188s,@RANLIB@,$RANLIB,;t t
19189s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 19190s,@INSTALL_INFO@,$INSTALL_INFO,;t t
6bae0ccf 19191s,@EGREP@,$EGREP,;t t
503d2be0
AS
19192s,@LIBSOUND@,$LIBSOUND,;t t
19193s,@SET_MAKE@,$SET_MAKE,;t t
488dd4c4
JD
19194s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19195s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
19196s,@GTK_LIBS@,$GTK_LIBS,;t t
503d2be0
AS
19197s,@ALLOCA@,$ALLOCA,;t t
19198s,@liblockfile@,$liblockfile,;t t
19199s,@LIBOBJS@,$LIBOBJS,;t t
19200s,@NEED_SETGID@,$NEED_SETGID,;t t
19201s,@KMEM_GROUP@,$KMEM_GROUP,;t t
19202s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
19203s,@version@,$version,;t t
19204s,@configuration@,$configuration,;t t
19205s,@canonical@,$canonical,;t t
19206s,@srcdir@,$srcdir,;t t
19207s,@lispdir@,$lispdir,;t t
19208s,@locallisppath@,$locallisppath,;t t
19209s,@lisppath@,$lisppath,;t t
19210s,@x_default_search_path@,$x_default_search_path,;t t
19211s,@etcdir@,$etcdir,;t t
19212s,@archlibdir@,$archlibdir,;t t
19213s,@docdir@,$docdir,;t t
19214s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
19215s,@gamedir@,$gamedir,;t t
19216s,@gameuser@,$gameuser,;t t
503d2be0
AS
19217s,@c_switch_system@,$c_switch_system,;t t
19218s,@c_switch_machine@,$c_switch_machine,;t t
19219s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
19220s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
19221s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
19222s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
19223s,@machfile@,$machfile,;t t
19224s,@opsysfile@,$opsysfile,;t t
6a3a24fa 19225s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 19226s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
19227CEOF
19228
c0d27fcc 19229_ACEOF
ba4481b5 19230
c0d27fcc 19231 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
19232 # Split the substitutions into bite-sized pieces for seds with
19233 # small command number limits, like on Digital OSF/1 and HP-UX.
19234 ac_max_sed_lines=48
19235 ac_sed_frag=1 # Number of current file.
19236 ac_beg=1 # First line for current file.
19237 ac_end=$ac_max_sed_lines # Line after last line for current file.
19238 ac_more_lines=:
19239 ac_sed_cmds=
19240 while $ac_more_lines; do
19241 if test $ac_beg -gt 1; then
19242 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19243 else
19244 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19245 fi
19246 if test ! -s $tmp/subs.frag; then
19247 ac_more_lines=false
19248 else
19249 # The purpose of the label and of the branching condition is to
19250 # speed up the sed processing (if there are no `@' at all, there
19251 # is no need to browse any of the substitutions).
19252 # These are the two extra sed commands mentioned above.
19253 (echo ':t
19254 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19255 if test -z "$ac_sed_cmds"; then
793fa0d7 19256 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0 19257 else
793fa0d7 19258 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0
AS
19259 fi
19260 ac_sed_frag=`expr $ac_sed_frag + 1`
19261 ac_beg=$ac_end
19262 ac_end=`expr $ac_end + $ac_max_sed_lines`
19263 fi
19264 done
19265 if test -z "$ac_sed_cmds"; then
19266 ac_sed_cmds=cat
19267 fi
19268fi # test -n "$CONFIG_FILES"
ba4481b5 19269
c0d27fcc
MR
19270_ACEOF
19271cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 19272for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 19273 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
19274 case $ac_file in
19275 - | *:- | *:-:* ) # input from stdin
793fa0d7
DL
19276 cat >$tmp/stdin
19277 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19278 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 19279 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
793fa0d7 19280 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 19281 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
19282 esac
19283
503d2be0 19284 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
19285 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19286$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
793fa0d7
DL
19287 X"$ac_file" : 'X\(//\)[^/]' \| \
19288 X"$ac_file" : 'X\(//\)$' \| \
19289 X"$ac_file" : 'X\(/\)' \| \
19290 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
19291echo X"$ac_file" |
19292 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19293 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19294 /^X\(\/\/\)$/{ s//\1/; q; }
19295 /^X\(\/\).*/{ s//\1/; q; }
19296 s/.*/./; q'`
6bae0ccf
DL
19297 { if $as_mkdir_p; then
19298 mkdir -p "$ac_dir"
19299 else
19300 as_dir="$ac_dir"
19301 as_dirs=
19302 while test ! -d "$as_dir"; do
19303 as_dirs="$as_dir $as_dirs"
19304 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
793fa0d7
DL
19306 X"$as_dir" : 'X\(//\)[^/]' \| \
19307 X"$as_dir" : 'X\(//\)$' \| \
19308 X"$as_dir" : 'X\(/\)' \| \
19309 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
19310echo X"$as_dir" |
19311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19312 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19313 /^X\(\/\/\)$/{ s//\1/; q; }
19314 /^X\(\/\).*/{ s//\1/; q; }
19315 s/.*/./; q'`
19316 done
19317 test ! -n "$as_dirs" || mkdir $as_dirs
19318 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19319echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19320 { (exit 1); exit 1; }; }; }
503d2be0 19321
c0d27fcc 19322 ac_builddir=.
98418dba 19323
c0d27fcc
MR
19324if test "$ac_dir" != .; then
19325 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19326 # A "../" for each directory in $ac_dir_suffix.
19327 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19328else
19329 ac_dir_suffix= ac_top_builddir=
19330fi
19331
19332case $srcdir in
19333 .) # No --srcdir option. We are building in place.
19334 ac_srcdir=.
19335 if test -z "$ac_top_builddir"; then
19336 ac_top_srcdir=.
19337 else
19338 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19339 fi ;;
19340 [\\/]* | ?:[\\/]* ) # Absolute path.
19341 ac_srcdir=$srcdir$ac_dir_suffix;
19342 ac_top_srcdir=$srcdir ;;
ba4481b5 19343 *) # Relative path.
c0d27fcc
MR
19344 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19345 ac_top_srcdir=$ac_top_builddir$srcdir ;;
19346esac
19347# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19348# absolute.
19349ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6bae0ccf 19350ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
c0d27fcc
MR
19351ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19352ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19353
ba4481b5 19354
503d2be0
AS
19355 case $INSTALL in
19356 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 19357 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
19358 esac
19359
503d2be0 19360 if test x"$ac_file" != x-; then
c0d27fcc 19361 { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
19362echo "$as_me: creating $ac_file" >&6;}
19363 rm -f "$ac_file"
19364 fi
19365 # Let's still pretend it is `configure' which instantiates (i.e., don't
19366 # use $as_me), people would be surprised to read:
c0d27fcc
MR
19367 # /* config.h. Generated by config.status. */
19368 if test x"$ac_file" = x-; then
19369 configure_input=
19370 else
19371 configure_input="$ac_file. "
19372 fi
19373 configure_input=$configure_input"Generated from `echo $ac_file_in |
793fa0d7 19374 sed 's,.*/,,'` by configure."
503d2be0
AS
19375
19376 # First look for the input files in the build tree, otherwise in the
19377 # src tree.
19378 ac_file_inputs=`IFS=:
19379 for f in $ac_file_in; do
19380 case $f in
19381 -) echo $tmp/stdin ;;
19382 [\\/$]*)
793fa0d7
DL
19383 # Absolute (can't be DOS-style, as IFS=:)
19384 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
19385echo "$as_me: error: cannot find input file: $f" >&2;}
19386 { (exit 1); exit 1; }; }
793fa0d7 19387 echo $f;;
503d2be0 19388 *) # Relative
793fa0d7
DL
19389 if test -f "$f"; then
19390 # Build tree
19391 echo $f
19392 elif test -f "$srcdir/$f"; then
19393 # Source tree
19394 echo $srcdir/$f
19395 else
19396 # /dev/null tree
19397 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
19398echo "$as_me: error: cannot find input file: $f" >&2;}
19399 { (exit 1); exit 1; }; }
793fa0d7 19400 fi;;
503d2be0
AS
19401 esac
19402 done` || { (exit 1); exit 1; }
c0d27fcc
MR
19403_ACEOF
19404cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
19405 sed "$ac_vpsub
19406$extrasub
c0d27fcc
MR
19407_ACEOF
19408cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
19409:t
19410/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19411s,@configure_input@,$configure_input,;t t
19412s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 19413s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 19414s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
19415s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19416s,@builddir@,$ac_builddir,;t t
19417s,@abs_builddir@,$ac_abs_builddir,;t t
19418s,@top_builddir@,$ac_top_builddir,;t t
19419s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
19420s,@INSTALL@,$ac_INSTALL,;t t
19421" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19422 rm -f $tmp/stdin
19423 if test x"$ac_file" != x-; then
19424 mv $tmp/out $ac_file
19425 else
19426 cat $tmp/out
19427 rm -f $tmp/out
19428 fi
19429
19430done
c0d27fcc
MR
19431_ACEOF
19432cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 19433
503d2be0
AS
19434#
19435# CONFIG_HEADER section.
19436#
ba4481b5
DL
19437
19438# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19439# NAME is the cpp macro being defined and VALUE is the value it is being given.
19440#
19441# ac_d sets the value in "#define NAME VALUE" lines.
793fa0d7
DL
19442ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19443ac_dB='[ ].*$,\1#\2'
503d2be0
AS
19444ac_dC=' '
19445ac_dD=',;t'
19446# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
793fa0d7 19447ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
503d2be0 19448ac_uB='$,\1#\2define\3'
ba4481b5 19449ac_uC=' '
503d2be0 19450ac_uD=',;t'
ba4481b5 19451
503d2be0 19452for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 19453 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
19454 case $ac_file in
19455 - | *:- | *:-:* ) # input from stdin
793fa0d7
DL
19456 cat >$tmp/stdin
19457 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19458 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 19459 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
793fa0d7 19460 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 19461 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
19462 esac
19463
c0d27fcc 19464 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
19465echo "$as_me: creating $ac_file" >&6;}
19466
19467 # First look for the input files in the build tree, otherwise in the
19468 # src tree.
19469 ac_file_inputs=`IFS=:
19470 for f in $ac_file_in; do
19471 case $f in
19472 -) echo $tmp/stdin ;;
19473 [\\/$]*)
793fa0d7
DL
19474 # Absolute (can't be DOS-style, as IFS=:)
19475 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
19476echo "$as_me: error: cannot find input file: $f" >&2;}
19477 { (exit 1); exit 1; }; }
793fa0d7 19478 echo $f;;
503d2be0 19479 *) # Relative
793fa0d7
DL
19480 if test -f "$f"; then
19481 # Build tree
19482 echo $f
19483 elif test -f "$srcdir/$f"; then
19484 # Source tree
19485 echo $srcdir/$f
19486 else
19487 # /dev/null tree
19488 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
19489echo "$as_me: error: cannot find input file: $f" >&2;}
19490 { (exit 1); exit 1; }; }
793fa0d7 19491 fi;;
503d2be0
AS
19492 esac
19493 done` || { (exit 1); exit 1; }
19494 # Remove the trailing spaces.
793fa0d7 19495 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
503d2be0 19496
c0d27fcc 19497_ACEOF
503d2be0
AS
19498
19499# Transform confdefs.h into two sed scripts, `conftest.defines' and
19500# `conftest.undefs', that substitutes the proper values into
19501# config.h.in to produce config.h. The first handles `#define'
19502# templates, and the second `#undef' templates.
19503# And first: Protect against being on the right side of a sed subst in
19504# config.status. Protect against being in an unquoted here document
19505# in config.status.
19506rm -f conftest.defines conftest.undefs
19507# Using a here document instead of a string reduces the quoting nightmare.
19508# Putting comments in sed scripts is not portable.
19509#
19510# `end' is used to avoid that the second main sed command (meant for
19511# 0-ary CPP macros) applies to n-ary macro definitions.
19512# See the Autoconf documentation for `clear'.
c0d27fcc 19513cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
19514s/[\\&,]/\\&/g
19515s,[\\$`],\\&,g
19516t clear
19517: clear
793fa0d7 19518s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0 19519t end
793fa0d7 19520s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
503d2be0 19521: end
c0d27fcc 19522_ACEOF
503d2be0
AS
19523# If some macros were called several times there might be several times
19524# the same #defines, which is useless. Nevertheless, we may not want to
19525# sort them, since we want the *last* AC-DEFINE to be honored.
19526uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19527sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19528rm -f confdef2sed.sed
ba4481b5
DL
19529
19530# This sed command replaces #undef with comments. This is necessary, for
19531# example, in the case of _POSIX_SOURCE, which is predefined and required
19532# on some systems where configure will not decide to define it.
c0d27fcc 19533cat >>conftest.undefs <<\_ACEOF
793fa0d7 19534s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 19535_ACEOF
ba4481b5 19536
503d2be0
AS
19537# Break up conftest.defines because some shells have a limit on the size
19538# of here documents, and old seds have small limits too (100 cmds).
19539echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
793fa0d7 19540echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
19541echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19542echo ' :' >>$CONFIG_STATUS
19543rm -f conftest.tail
19544while grep . conftest.defines >/dev/null
19545do
19546 # Write a limited-size here document to $tmp/defines.sed.
19547 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19548 # Speed up: don't consider the non `#define' lines.
793fa0d7 19549 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
503d2be0
AS
19550 # Work around the forget-to-reset-the-flag bug.
19551 echo 't clr' >>$CONFIG_STATUS
19552 echo ': clr' >>$CONFIG_STATUS
19553 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
19554 echo 'CEOF
19555 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19556 rm -f $tmp/in
19557 mv $tmp/out $tmp/in
19558' >>$CONFIG_STATUS
19559 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19560 rm -f conftest.defines
19561 mv conftest.tail conftest.defines
19562done
19563rm -f conftest.defines
6bae0ccf 19564echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 19565echo >>$CONFIG_STATUS
ba4481b5 19566
503d2be0
AS
19567# Break up conftest.undefs because some shells have a limit on the size
19568# of here documents, and old seds have small limits too (100 cmds).
19569echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 19570rm -f conftest.tail
503d2be0 19571while grep . conftest.undefs >/dev/null
ba4481b5 19572do
503d2be0
AS
19573 # Write a limited-size here document to $tmp/undefs.sed.
19574 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19575 # Speed up: don't consider the non `#undef'
793fa0d7 19576 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
503d2be0
AS
19577 # Work around the forget-to-reset-the-flag bug.
19578 echo 't clr' >>$CONFIG_STATUS
19579 echo ': clr' >>$CONFIG_STATUS
19580 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 19581 echo 'CEOF
503d2be0
AS
19582 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19583 rm -f $tmp/in
19584 mv $tmp/out $tmp/in
19585' >>$CONFIG_STATUS
19586 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19587 rm -f conftest.undefs
19588 mv conftest.tail conftest.undefs
ba4481b5 19589done
503d2be0
AS
19590rm -f conftest.undefs
19591
c0d27fcc 19592cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
19593 # Let's still pretend it is `configure' which instantiates (i.e., don't
19594 # use $as_me), people would be surprised to read:
c0d27fcc 19595 # /* config.h. Generated by config.status. */
503d2be0 19596 if test x"$ac_file" = x-; then
c0d27fcc 19597 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 19598 else
c0d27fcc 19599 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
19600 fi
19601 cat $tmp/in >>$tmp/config.h
19602 rm -f $tmp/in
19603 if test x"$ac_file" != x-; then
19650fd6 19604 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 19605 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
19606echo "$as_me: $ac_file is unchanged" >&6;}
19607 else
c0d27fcc
MR
19608 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19609$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
793fa0d7
DL
19610 X"$ac_file" : 'X\(//\)[^/]' \| \
19611 X"$ac_file" : 'X\(//\)$' \| \
19612 X"$ac_file" : 'X\(/\)' \| \
19613 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
19614echo X"$ac_file" |
19615 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19616 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19617 /^X\(\/\/\)$/{ s//\1/; q; }
19618 /^X\(\/\).*/{ s//\1/; q; }
19619 s/.*/./; q'`
6bae0ccf
DL
19620 { if $as_mkdir_p; then
19621 mkdir -p "$ac_dir"
19622 else
19623 as_dir="$ac_dir"
19624 as_dirs=
19625 while test ! -d "$as_dir"; do
19626 as_dirs="$as_dir $as_dirs"
19627 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19628$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
793fa0d7
DL
19629 X"$as_dir" : 'X\(//\)[^/]' \| \
19630 X"$as_dir" : 'X\(//\)$' \| \
19631 X"$as_dir" : 'X\(/\)' \| \
19632 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
19633echo X"$as_dir" |
19634 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19635 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19636 /^X\(\/\/\)$/{ s//\1/; q; }
19637 /^X\(\/\).*/{ s//\1/; q; }
19638 s/.*/./; q'`
19639 done
19640 test ! -n "$as_dirs" || mkdir $as_dirs
19641 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19642echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19643 { (exit 1); exit 1; }; }; }
503d2be0 19644
503d2be0
AS
19645 rm -f $ac_file
19646 mv $tmp/config.h $ac_file
ba4481b5 19647 fi
503d2be0
AS
19648 else
19649 cat $tmp/config.h
19650 rm -f $tmp/config.h
ba4481b5 19651 fi
503d2be0 19652done
c0d27fcc
MR
19653_ACEOF
19654cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
19655
19656#
19657# CONFIG_COMMANDS section.
19658#
19659for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19660 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19661 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
19662 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
19663$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
793fa0d7
DL
19664 X"$ac_dest" : 'X\(//\)[^/]' \| \
19665 X"$ac_dest" : 'X\(//\)$' \| \
19666 X"$ac_dest" : 'X\(/\)' \| \
19667 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
19668echo X"$ac_dest" |
19669 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19670 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19671 /^X\(\/\/\)$/{ s//\1/; q; }
19672 /^X\(\/\).*/{ s//\1/; q; }
19673 s/.*/./; q'`
19674 ac_builddir=.
19675
19676if test "$ac_dir" != .; then
19677 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19678 # A "../" for each directory in $ac_dir_suffix.
19679 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19680else
19681 ac_dir_suffix= ac_top_builddir=
19682fi
19683
19684case $srcdir in
19685 .) # No --srcdir option. We are building in place.
19686 ac_srcdir=.
19687 if test -z "$ac_top_builddir"; then
19688 ac_top_srcdir=.
19689 else
19690 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19691 fi ;;
19692 [\\/]* | ?:[\\/]* ) # Absolute path.
19693 ac_srcdir=$srcdir$ac_dir_suffix;
19694 ac_top_srcdir=$srcdir ;;
19695 *) # Relative path.
19696 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19697 ac_top_srcdir=$ac_top_builddir$srcdir ;;
19698esac
19699# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19700# absolute.
19701ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6bae0ccf 19702ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
c0d27fcc
MR
19703ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19704ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
ba4481b5 19705
c0d27fcc
MR
19706
19707 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
19708echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
19709 case $ac_dest in
19710 default )
ba4481b5
DL
19711
19712### Make the necessary directories, if they don't exist.
19713for dir in etc lisp ; do
19714 test -d ${dir} || mkdir ${dir}
19715done
19716
19717# Build src/Makefile from ${srcdir}/src/Makefile.c
19718# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
19719# This must be done after src/config.h is built, since we rely on that file.
19720
19721# Now get this: Some word that is part of the ${srcdir} directory name
19722# or the ${configuration} value might, just might, happen to be an
19723# identifier like `sun4' or `i386' or something, and be predefined by
19724# the C preprocessor to some helpful value like 1, or maybe the empty
19725# string. Needless to say consequent macro substitutions are less
19726# than conducive to the makefile finding the correct directory.
19727undefs="`echo $top_srcdir $configuration $canonical |
19728sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
19729 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
19730`"
19731
19732echo creating src/epaths.h
4aa6b955 19733${MAKE-make} epaths-force
ba4481b5 19734
1c203d4c
DL
19735# As of 2000-11-19, newest development versions of GNU cpp preprocess
19736# `..' to `. .' unless invoked with -traditional
19737
d0e9bfd2 19738if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
19739 CPPFLAGS="$CPPFLAGS -traditional"
19740fi
19741
ba4481b5
DL
19742echo creating lib-src/Makefile
19743( cd lib-src
19744 rm -f junk.c junk1.c junk2.c
19745 sed -e '/start of cpp stuff/q' \
19746 < Makefile.c > junk1.c
19747 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 19748 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 19749 < Makefile.c > junk.c
503d2be0 19750 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
19751 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
19752 cat junk1.c junk2.c > Makefile.new
19753 rm -f junk.c junk1.c junk2.c
19754 chmod 444 Makefile.new
19755 mv -f Makefile.new Makefile
19756)
19757
19758echo creating src/Makefile
19759( cd src
19760 rm -f junk.c junk1.c junk2.c
19761 sed -e '/start of cpp stuff/q' \
19762 < Makefile.c > junk1.c
19763 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 19764 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 19765 < Makefile.c > junk.c
503d2be0 19766 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
19767 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
19768 cat junk1.c junk2.c > Makefile.new
19769 rm -f junk.c junk1.c junk2.c
19770 chmod 444 Makefile.new
19771 mv -f Makefile.new Makefile
19772)
19773
503d2be0 19774if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 19775 echo creating src/.gdbinit
503d2be0 19776 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
19777fi
19778
19779# This is how we know whether to re-run configure in certain cases.
19780touch src/config.stamp
19781
503d2be0
AS
19782 ;;
19783 esac
19784done
c0d27fcc 19785_ACEOF
503d2be0 19786
c0d27fcc 19787cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 19788
503d2be0 19789{ (exit 0); exit 0; }
c0d27fcc 19790_ACEOF
ba4481b5 19791chmod +x $CONFIG_STATUS
503d2be0
AS
19792ac_clean_files=$ac_clean_files_save
19793
c0d27fcc 19794
503d2be0
AS
19795# configure is writing to config.log, and then calls config.status.
19796# config.status does its own redirection, appending to config.log.
19797# Unfortunately, on DOS this fails, as config.log is still kept open
19798# by configure, so config.status won't be able to write to it; its
19799# output is simply discarded. So we exec the FD to /dev/null,
19800# effectively closing config.log, so it can be properly (re)opened and
19801# appended to by config.status. When coming back to configure, we
19802# need to make the FD available again.
19803if test "$no_create" != yes; then
19804 ac_cs_success=:
19650fd6
AS
19805 ac_config_status_args=
19806 test "$silent" = yes &&
19807 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 19808 exec 5>/dev/null
19650fd6 19809 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
19810 exec 5>>config.log
19811 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19812 # would make configure fail if this is the last instruction.
19813 $ac_cs_success || { (exit 1); exit 1; }
19814fi
f5f47add 19815
c0d27fcc 19816