*** empty log message ***
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
9e71690e 3# Generated by GNU Autoconf 2.57.
ba4481b5 4#
c0d27fcc 5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
503d2be0 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
MR
24# Support unset when possible.
25if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
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.
cd958eb3
MB
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
DL
43do
44 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
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
cd958eb3
MB
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
cd958eb3 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
488dd4c4 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 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 \
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\(.*[^/]\)//*[^/][^/]*/*$' \| \
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
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
806 [$ac_default_prefix]
807 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
808 [PREFIX]
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
503d2be0
AS
858 --disable-largefile omit support for large files
859
860Optional Packages:
861 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
862 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
863 --without-gcc don't use GCC to compile Emacs if GCC is found
864 --without-pop don't support POP mail retrieval with movemail
865 --with-kerberos support Kerberos-authenticated POP
866 --with-kerberos5 support Kerberos version 5 authenticated POP
867 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 868 --without-sound don't compile with sound support
488dd4c4
JD
869 --with-x-toolkit=KIT use an X toolkit
870 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
871 --with-xpm use -lXpm for displaying XPM images
872 --with-jpeg use -ljpeg for displaying JPEG images
873 --with-tiff use -ltiff for displaying TIFF images
874 --with-gif use -lungif for displaying GIF images
875 --with-png use -lpng for displaying PNG images
488dd4c4
JD
876 --with-gtk use GTK (same as --with-x-toolkit=gtk)
877 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 878 --without-toolkit-scroll-bars
cc227489
MB
879 don't use Motif or Xaw3d scroll bars
880 --without-xim don't use X11 XIM
e0f712ba 881 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
882 --with-x use the X Window System
883
884Some influential environment variables:
885 CC C compiler command
886 CFLAGS C compiler flags
887 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
888 nonstandard directory <lib dir>
889 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
890 headers in a nonstandard directory <include dir>
891 CPP C preprocessor
892
893Use these variables to override the choices made by `configure' or to help
894it to find libraries and programs with nonstandard names/locations.
895
c0d27fcc 896_ACEOF
503d2be0
AS
897fi
898
899if test "$ac_init_help" = "recursive"; then
900 # If there are subdirs, report their specific --help.
901 ac_popdir=`pwd`
c0d27fcc
MR
902 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
903 test -d $ac_dir || continue
904 ac_builddir=.
905
906if test "$ac_dir" != .; then
907 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
908 # A "../" for each directory in $ac_dir_suffix.
909 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
910else
911 ac_dir_suffix= ac_top_builddir=
912fi
503d2be0 913
c0d27fcc
MR
914case $srcdir in
915 .) # No --srcdir option. We are building in place.
916 ac_srcdir=.
917 if test -z "$ac_top_builddir"; then
918 ac_top_srcdir=.
919 else
920 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
921 fi ;;
922 [\\/]* | ?:[\\/]* ) # Absolute path.
923 ac_srcdir=$srcdir$ac_dir_suffix;
924 ac_top_srcdir=$srcdir ;;
925 *) # Relative path.
926 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
927 ac_top_srcdir=$ac_top_builddir$srcdir ;;
928esac
929# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
930# absolute.
931ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6bae0ccf 932ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
c0d27fcc
MR
933ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
934ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
935
936 cd $ac_dir
503d2be0 937 # Check for guested configure; otherwise get Cygnus style configure.
c0d27fcc 938 if test -f $ac_srcdir/configure.gnu; then
503d2be0 939 echo
c0d27fcc
MR
940 $SHELL $ac_srcdir/configure.gnu --help=recursive
941 elif test -f $ac_srcdir/configure; then
503d2be0 942 echo
c0d27fcc
MR
943 $SHELL $ac_srcdir/configure --help=recursive
944 elif test -f $ac_srcdir/configure.ac ||
945 test -f $ac_srcdir/configure.in; then
503d2be0
AS
946 echo
947 $ac_configure --help
948 else
c0d27fcc 949 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
503d2be0
AS
950 fi
951 cd $ac_popdir
952 done
953fi
954
955test -n "$ac_init_help" && exit 0
956if $ac_init_version; then
c0d27fcc 957 cat <<\_ACEOF
503d2be0 958
c0d27fcc 959Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
503d2be0
AS
960Free Software Foundation, Inc.
961This configure script is free software; the Free Software Foundation
962gives unlimited permission to copy, distribute and modify it.
c0d27fcc 963_ACEOF
503d2be0
AS
964 exit 0
965fi
966exec 5>config.log
c0d27fcc 967cat >&5 <<_ACEOF
503d2be0
AS
968This file contains any messages produced by compilers while
969running configure, to aid debugging if configure makes a mistake.
970
971It was created by $as_me, which was
9e71690e 972generated by GNU Autoconf 2.57. Invocation command line was
503d2be0
AS
973
974 $ $0 $@
975
c0d27fcc 976_ACEOF
503d2be0
AS
977{
978cat <<_ASUNAME
c0d27fcc
MR
979## --------- ##
980## Platform. ##
981## --------- ##
503d2be0
AS
982
983hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
984uname -m = `(uname -m) 2>/dev/null || echo unknown`
985uname -r = `(uname -r) 2>/dev/null || echo unknown`
986uname -s = `(uname -s) 2>/dev/null || echo unknown`
987uname -v = `(uname -v) 2>/dev/null || echo unknown`
988
989/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
990/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
991
992/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
993/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
994/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
995hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
996/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
997/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
998/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
999
925c2f3f 1000_ASUNAME
c0d27fcc
MR
1001
1002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1003for as_dir in $PATH
1004do
1005 IFS=$as_save_IFS
1006 test -z "$as_dir" && as_dir=.
1007 echo "PATH: $as_dir"
1008done
1009
503d2be0
AS
1010} >&5
1011
c0d27fcc
MR
1012cat >&5 <<_ACEOF
1013
1014
1015## ----------- ##
1016## Core tests. ##
1017## ----------- ##
1018
1019_ACEOF
503d2be0 1020
503d2be0
AS
1021
1022# Keep a trace of the command line.
1023# Strip out --no-create and --no-recursion so they do not pile up.
cd958eb3 1024# Strip out --silent because we don't want to record it for future runs.
503d2be0 1025# Also quote any args containing shell meta-characters.
cd958eb3 1026# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1027ac_configure_args=
cd958eb3
MB
1028ac_configure_args0=
1029ac_configure_args1=
503d2be0 1030ac_sep=
cd958eb3
MB
1031ac_must_keep_next=false
1032for ac_pass in 1 2
503d2be0 1033do
cd958eb3
MB
1034 for ac_arg
1035 do
1036 case $ac_arg in
1037 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1038 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1039 | -silent | --silent | --silen | --sile | --sil)
1040 continue ;;
1041 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1042 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1043 esac
1044 case $ac_pass in
1045 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1046 2)
1047 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1048 if test $ac_must_keep_next = true; then
1049 ac_must_keep_next=false # Got value, back to normal.
1050 else
1051 case $ac_arg in
1052 *=* | --config-cache | -C | -disable-* | --disable-* \
1053 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1054 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1055 | -with-* | --with-* | -without-* | --without-* | --x)
1056 case "$ac_configure_args0 " in
1057 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1058 esac
1059 ;;
1060 -* ) ac_must_keep_next=true ;;
1061 esac
1062 fi
1063 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1064 # Get rid of the leading space.
1065 ac_sep=" "
1066 ;;
1067 esac
1068 done
503d2be0 1069done
cd958eb3
MB
1070$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1071$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1072
1073# When interrupted or exit'd, cleanup temporary files, and complete
1074# config.log. We remove comments because anyway the quotes in there
1075# would cause problems or look ugly.
c0d27fcc
MR
1076# WARNING: Be sure not to use single quotes in there, as some shells,
1077# such as our DU 5.0 friend, will then `close' the trap.
503d2be0
AS
1078trap 'exit_status=$?
1079 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1080 {
1081 echo
6bae0ccf 1082
c0d27fcc
MR
1083 cat <<\_ASBOX
1084## ---------------- ##
1085## Cache variables. ##
1086## ---------------- ##
1087_ASBOX
1088 echo
1089 # The following way of writing the cache mishandles newlines in values,
503d2be0
AS
1090{
1091 (set) 2>&1 |
1092 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1093 *ac_space=\ *)
1094 sed -n \
1095 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1096 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1097 ;;
1098 *)
1099 sed -n \
1100 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1101 ;;
1102 esac;
c0d27fcc
MR
1103}
1104 echo
6bae0ccf
DL
1105
1106 cat <<\_ASBOX
1107## ----------------- ##
1108## Output variables. ##
1109## ----------------- ##
1110_ASBOX
1111 echo
1112 for ac_var in $ac_subst_vars
1113 do
1114 eval ac_val=$`echo $ac_var`
1115 echo "$ac_var='"'"'$ac_val'"'"'"
1116 done | sort
1117 echo
1118
1119 if test -n "$ac_subst_files"; then
1120 cat <<\_ASBOX
1121## ------------- ##
1122## Output files. ##
1123## ------------- ##
1124_ASBOX
1125 echo
1126 for ac_var in $ac_subst_files
1127 do
1128 eval ac_val=$`echo $ac_var`
1129 echo "$ac_var='"'"'$ac_val'"'"'"
1130 done | sort
1131 echo
1132 fi
1133
c0d27fcc
MR
1134 if test -s confdefs.h; then
1135 cat <<\_ASBOX
1136## ----------- ##
1137## confdefs.h. ##
1138## ----------- ##
1139_ASBOX
1140 echo
6bae0ccf 1141 sed "/^$/d" confdefs.h | sort
c0d27fcc
MR
1142 echo
1143 fi
1144 test "$ac_signal" != 0 &&
1145 echo "$as_me: caught signal $ac_signal"
1146 echo "$as_me: exit $exit_status"
1147 } >&5
1148 rm -f core core.* *.core &&
1149 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0
AS
1150 exit $exit_status
1151 ' 0
1152for ac_signal in 1 2 13 15; do
1153 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1154done
1155ac_signal=0
1156
1157# confdefs.h avoids OS command line length limits that DEFS can exceed.
1158rm -rf conftest* confdefs.h
1159# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1160echo >confdefs.h
ba4481b5 1161
c0d27fcc
MR
1162# Predefined preprocessor variables.
1163
1164cat >>confdefs.h <<_ACEOF
1165#define PACKAGE_NAME "$PACKAGE_NAME"
1166_ACEOF
1167
1168
1169cat >>confdefs.h <<_ACEOF
1170#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1171_ACEOF
1172
1173
1174cat >>confdefs.h <<_ACEOF
1175#define PACKAGE_VERSION "$PACKAGE_VERSION"
1176_ACEOF
1177
1178
1179cat >>confdefs.h <<_ACEOF
1180#define PACKAGE_STRING "$PACKAGE_STRING"
1181_ACEOF
1182
1183
1184cat >>confdefs.h <<_ACEOF
1185#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1186_ACEOF
1187
1188
503d2be0 1189# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
1190# Prefer explicitly selected file to automatically selected ones.
1191if test -z "$CONFIG_SITE"; then
1192 if test "x$prefix" != xNONE; then
1193 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1194 else
1195 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1196 fi
1197fi
1198for ac_site_file in $CONFIG_SITE; do
1199 if test -r "$ac_site_file"; then
c0d27fcc 1200 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1201echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1202 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1203 . "$ac_site_file"
1204 fi
1205done
1206
1207if test -r "$cache_file"; then
503d2be0
AS
1208 # Some versions of bash will fail to source /dev/null (special
1209 # files actually), so we avoid doing that.
1210 if test -f "$cache_file"; then
c0d27fcc 1211 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1212echo "$as_me: loading cache $cache_file" >&6;}
1213 case $cache_file in
1214 [\\/]* | ?:[\\/]* ) . $cache_file;;
1215 *) . ./$cache_file;;
1216 esac
1217 fi
ba4481b5 1218else
c0d27fcc 1219 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1220echo "$as_me: creating cache $cache_file" >&6;}
1221 >$cache_file
1222fi
1223
1224# Check that the precious variables saved in the cache have kept the same
1225# value.
1226ac_cache_corrupted=false
1227for ac_var in `(set) 2>&1 |
1228 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1229 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1230 eval ac_new_set=\$ac_env_${ac_var}_set
1231 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1232 eval ac_new_val="\$ac_env_${ac_var}_value"
1233 case $ac_old_set,$ac_new_set in
1234 set,)
c0d27fcc 1235 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1236echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1237 ac_cache_corrupted=: ;;
1238 ,set)
c0d27fcc 1239 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1240echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1241 ac_cache_corrupted=: ;;
1242 ,);;
1243 *)
1244 if test "x$ac_old_val" != "x$ac_new_val"; then
c0d27fcc 1245 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1246echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
c0d27fcc 1247 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1248echo "$as_me: former value: $ac_old_val" >&2;}
c0d27fcc 1249 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0
AS
1250echo "$as_me: current value: $ac_new_val" >&2;}
1251 ac_cache_corrupted=:
1252 fi;;
1253 esac
c0d27fcc 1254 # Pass precious variables to config.status.
503d2be0
AS
1255 if test "$ac_new_set" = set; then
1256 case $ac_new_val in
1257 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
c0d27fcc
MR
1258 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1259 *) ac_arg=$ac_var=$ac_new_val ;;
1260 esac
1261 case " $ac_configure_args " in
1262 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1263 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1264 esac
1265 fi
1266done
1267if $ac_cache_corrupted; then
c0d27fcc 1268 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1269echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1270 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1271echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1272 { (exit 1); exit 1; }; }
ba4481b5
DL
1273fi
1274
1275ac_ext=c
ba4481b5 1276ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
1277ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1278ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1279ac_compiler_gnu=$ac_cv_c_compiler_gnu
1280
c0d27fcc
MR
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
ba4481b5 1297
6bae0ccf
DL
1298
1299 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1300
c0d27fcc 1301
ba5da88a
PJ
1302test "$program_prefix" != NONE &&
1303 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1304# Use a double $ so make ignores it.
1305test "$program_suffix" != NONE &&
1306 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1307# Double any \ or $. echo might interpret backslashes.
1308# By default was `s,x,x', remove it if useless.
1309cat <<\_ACEOF >conftest.sed
1310s/[\\$]/&&/g;s/;s,x,x,$//
1311_ACEOF
1312program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1313rm conftest.sed
1314
c0d27fcc 1315
ba4481b5
DL
1316lispdir='${datadir}/emacs/${version}/lisp'
1317locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1318'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1319lisppath='${locallisppath}:${lispdir}'
1320etcdir='${datadir}/emacs/${version}/etc'
1321archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1322docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1323gamedir='${localstatedir}/games/emacs'
98418dba
CW
1324
1325gameuser=games
1326
c0d27fcc 1327
ba4481b5
DL
1328# Check whether --with-gcc or --without-gcc was given.
1329if test "${with_gcc+set}" = set; then
1330 withval="$with_gcc"
503d2be0
AS
1331
1332fi;
ba4481b5
DL
1333
1334# Check whether --with-pop or --without-pop was given.
1335if test "${with_pop+set}" = set; then
1336 withval="$with_pop"
243cf185 1337 if test "$withval" = yes; then
c0d27fcc 1338 cat >>confdefs.h <<\_ACEOF
ba4481b5 1339#define MAIL_USE_POP 1
c0d27fcc 1340_ACEOF
ba4481b5 1341
243cf185
DL
1342else :
1343fi
3d9fec71 1344else
c0d27fcc 1345 cat >>confdefs.h <<\_ACEOF
3d9fec71 1346#define MAIL_USE_POP 1
c0d27fcc 1347_ACEOF
3d9fec71 1348
503d2be0 1349fi;
ba4481b5 1350
c0d27fcc 1351
a21616bd
KR
1352# Check whether --with-kerberos or --without-kerberos was given.
1353if test "${with_kerberos+set}" = set; then
1354 withval="$with_kerberos"
c0d27fcc 1355 cat >>confdefs.h <<\_ACEOF
a21616bd 1356#define KERBEROS 1
c0d27fcc 1357_ACEOF
a21616bd 1358
503d2be0 1359fi;
a21616bd 1360
c0d27fcc 1361
a21616bd
KR
1362# Check whether --with-kerberos5 or --without-kerberos5 was given.
1363if test "${with_kerberos5+set}" = set; then
1364 withval="$with_kerberos5"
1365 if test "${with_kerberos5+set}" = set; then
1366 if test "${with_kerberos+set}" != set; then
1367 with_kerberos=yes
c0d27fcc 1368 cat >>confdefs.h <<\_ACEOF
a21616bd 1369#define KERBEROS 1
c0d27fcc 1370_ACEOF
a21616bd
KR
1371
1372 fi
1373fi
b936fae4 1374
c0d27fcc 1375cat >>confdefs.h <<\_ACEOF
a21616bd 1376#define KERBEROS5 1
c0d27fcc 1377_ACEOF
a21616bd 1378
503d2be0 1379fi;
a21616bd 1380
ba4481b5
DL
1381# Check whether --with-hesiod or --without-hesiod was given.
1382if test "${with_hesiod+set}" = set; then
1383 withval="$with_hesiod"
b936fae4 1384
c0d27fcc 1385cat >>confdefs.h <<\_ACEOF
ba4481b5 1386#define HESIOD 1
c0d27fcc 1387_ACEOF
ba4481b5 1388
503d2be0 1389fi;
ba4481b5 1390
c0d27fcc 1391
2c9dccc9
PJ
1392# Check whether --with-sound or --without-sound was given.
1393if test "${with_sound+set}" = set; then
1394 withval="$with_sound"
1395
1396fi;
1397
c0d27fcc 1398
ba4481b5
DL
1399# Check whether --with-x-toolkit or --without-x-toolkit was given.
1400if test "${with_x_toolkit+set}" = set; then
1401 withval="$with_x_toolkit"
1402 case "${withval}" in
1403 y | ye | yes ) val=athena ;;
1404 n | no ) val=no ;;
1405 l | lu | luc | luci | lucid ) val=lucid ;;
1406 a | at | ath | athe | athen | athena ) val=athena ;;
1407 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1408 g | gt | gtk ) val=gtk ;;
ba4481b5 1409 * )
c0d27fcc 1410{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1411this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1412Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1413echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1414this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1415Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1416 { (exit 1); exit 1; }; }
ba4481b5
DL
1417 ;;
1418 esac
1419 with_x_toolkit=$val
1420
503d2be0 1421fi;
ba4481b5
DL
1422
1423# Check whether --with-xpm or --without-xpm was given.
1424if test "${with_xpm+set}" = set; then
1425 withval="$with_xpm"
503d2be0
AS
1426
1427fi;
ba4481b5
DL
1428
1429# Check whether --with-jpeg or --without-jpeg was given.
1430if test "${with_jpeg+set}" = set; then
1431 withval="$with_jpeg"
503d2be0
AS
1432
1433fi;
ba4481b5
DL
1434
1435# Check whether --with-tiff or --without-tiff was given.
1436if test "${with_tiff+set}" = set; then
1437 withval="$with_tiff"
503d2be0
AS
1438
1439fi;
ba4481b5
DL
1440
1441# Check whether --with-gif or --without-gif was given.
1442if test "${with_gif+set}" = set; then
1443 withval="$with_gif"
503d2be0
AS
1444
1445fi;
ba4481b5
DL
1446
1447# Check whether --with-png or --without-png was given.
1448if test "${with_png+set}" = set; then
1449 withval="$with_png"
503d2be0
AS
1450
1451fi;
ba4481b5 1452
488dd4c4
JD
1453# Check whether --with-gtk or --without-gtk was given.
1454if test "${with_gtk+set}" = set; then
1455 withval="$with_gtk"
1456
1457fi;
1458
1459# Check whether --with-pkg-config-prog or --without-pkg-config-prog was given.
1460if test "${with_pkg_config_prog+set}" = set; then
1461 withval="$with_pkg_config_prog"
1462
1463fi;
1464
ba4481b5
DL
1465# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1466if test "${with_toolkit_scroll_bars+set}" = set; then
1467 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1468
1469fi;
ba4481b5 1470
1d36487c
GM
1471# Check whether --with-xim or --without-xim was given.
1472if test "${with_xim+set}" = set; then
1473 withval="$with_xim"
1d36487c 1474
503d2be0 1475fi;
ba4481b5 1476
e0f712ba
AC
1477# Check whether --with-carbon or --without-carbon was given.
1478if test "${with_carbon+set}" = set; then
1479 withval="$with_carbon"
1480
1481fi;
6a3a24fa
JD
1482# Check whether --enable-carbon-app or --disable-carbon-app was given.
1483if test "${enable_carbon_app+set}" = set; then
1484 enableval="$enable_carbon_app"
1485 carbon_appdir_x=${enableval}
1486fi;
e0f712ba 1487
ba4481b5 1488#### Make srcdir absolute, if it isn't already. It's important to
17494071 1489#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1490#### give you automounter prefixes, which can go away. We do all this
1491#### so Emacs can find its files when run uninstalled.
17494071
GM
1492## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1493unset CDPATH
ba4481b5
DL
1494case "${srcdir}" in
1495 /* ) ;;
1496 . )
1497 ## We may be able to use the $PWD environment variable to make this
1498 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
1499 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1500 ## but that tested only for a well-formed and valid PWD,
1501 ## it did not object when PWD was well-formed and valid but just wrong.
1502 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
1503 then
1504 srcdir="$PWD"
1505 else
1506 srcdir="`(cd ${srcdir}; pwd)`"
1507 fi
1508 ;;
1509 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1510esac
1511
1512#### Check if the source directory already has a configured system in it.
1513if test `pwd` != `(cd ${srcdir} && pwd)` \
1514 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 1515 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1516 as a build directory right now; it has been configured in its own
1517 right. To configure in another directory as well, you MUST
1518 use GNU make. If you do not have GNU make, then you must
1519 now do \`make distclean' in ${srcdir},
1520 and then run $0 again." >&5
1521echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1522 as a build directory right now; it has been configured in its own
1523 right. To configure in another directory as well, you MUST
1524 use GNU make. If you do not have GNU make, then you must
1525 now do \`make distclean' in ${srcdir},
503d2be0 1526 and then run $0 again." >&2;}
ba4481b5 1527
22044edf 1528extrasub='/^VPATH[ ]*=/c\
ba4481b5
DL
1529vpath %.c $(srcdir)\
1530vpath %.h $(srcdir)\
1531vpath %.y $(srcdir)\
1532vpath %.l $(srcdir)\
1533vpath %.s $(srcdir)\
1534vpath %.in $(srcdir)\
1535vpath %.texi $(srcdir)'
1536fi
1537
1538#### Given the configuration name, set machfile and opsysfile to the
1539#### names of the m/*.h and s/*.h files we should use.
1540
1541### Canonicalize the configuration name.
1542
1543ac_aux_dir=
1544for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1545 if test -f $ac_dir/install-sh; then
1546 ac_aux_dir=$ac_dir
1547 ac_install_sh="$ac_aux_dir/install-sh -c"
1548 break
1549 elif test -f $ac_dir/install.sh; then
1550 ac_aux_dir=$ac_dir
1551 ac_install_sh="$ac_aux_dir/install.sh -c"
1552 break
503d2be0
AS
1553 elif test -f $ac_dir/shtool; then
1554 ac_aux_dir=$ac_dir
1555 ac_install_sh="$ac_aux_dir/shtool install -c"
1556 break
ba4481b5
DL
1557 fi
1558done
1559if test -z "$ac_aux_dir"; then
c0d27fcc 1560 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1561echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1562 { (exit 1); exit 1; }; }
ba4481b5 1563fi
503d2be0
AS
1564ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1565ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1566ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1567
1568# Make sure we can run config.sub.
503d2be0 1569$ac_config_sub sun4 >/dev/null 2>&1 ||
c0d27fcc 1570 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1571echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1572 { (exit 1); exit 1; }; }
1573
c0d27fcc 1574echo "$as_me:$LINENO: checking build system type" >&5
503d2be0
AS
1575echo $ECHO_N "checking build system type... $ECHO_C" >&6
1576if test "${ac_cv_build+set}" = set; then
1577 echo $ECHO_N "(cached) $ECHO_C" >&6
1578else
1579 ac_cv_build_alias=$build_alias
1580test -z "$ac_cv_build_alias" &&
1581 ac_cv_build_alias=`$ac_config_guess`
1582test -z "$ac_cv_build_alias" &&
c0d27fcc 1583 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1584echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1585 { (exit 1); exit 1; }; }
1586ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
c0d27fcc
MR
1587 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1588echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
503d2be0
AS
1589 { (exit 1); exit 1; }; }
1590
1591fi
c0d27fcc 1592echo "$as_me:$LINENO: result: $ac_cv_build" >&5
503d2be0
AS
1593echo "${ECHO_T}$ac_cv_build" >&6
1594build=$ac_cv_build
1595build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1596build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1597build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1598
c0d27fcc
MR
1599
1600echo "$as_me:$LINENO: checking host system type" >&5
503d2be0
AS
1601echo $ECHO_N "checking host system type... $ECHO_C" >&6
1602if test "${ac_cv_host+set}" = set; then
1603 echo $ECHO_N "(cached) $ECHO_C" >&6
1604else
1605 ac_cv_host_alias=$host_alias
1606test -z "$ac_cv_host_alias" &&
1607 ac_cv_host_alias=$ac_cv_build_alias
1608ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
c0d27fcc 1609 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1610echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1611 { (exit 1); exit 1; }; }
1612
1613fi
c0d27fcc 1614echo "$as_me:$LINENO: result: $ac_cv_host" >&5
503d2be0
AS
1615echo "${ECHO_T}$ac_cv_host" >&6
1616host=$ac_cv_host
1617host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1618host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1619host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5 1620
c0d27fcc 1621
ba4481b5 1622canonical=$host
531a3336 1623configuration=${host_alias-$host}
ba4481b5 1624
c0d27fcc 1625
22044edf 1626
ba4481b5
DL
1627### If you add support for a new configuration, add code to this
1628### switch statement to recognize your configuration name and select
1629### the appropriate operating system and machine description files.
1630
1631### You would hope that you could choose an m/*.h file pretty much
1632### based on the machine portion of the configuration name, and an s-
1633### file based on the operating system portion. However, it turns out
1634### that each m/*.h file is pretty manufacturer-specific - for
1635### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1636### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1637### machines. So we basically have to have a special case for each
1638### configuration name.
1639###
1640### As far as handling version numbers on operating systems is
1641### concerned, make sure things will fail in a fixable way. If
1642### /etc/MACHINES doesn't say anything about version numbers, be
1643### prepared to handle anything reasonably. If version numbers
1644### matter, be sure /etc/MACHINES says something about it.
1645###
1646### Eric Raymond says we should accept strings like "sysvr4" to mean
1647### "System V Release 4"; he writes, "The old convention encouraged
1648### confusion between `system' and `release' levels'."
1649
1650machine='' opsys='' unported=no
1651case "${canonical}" in
1652
1096bcc0
GM
1653 ## FreeBSD ports
1654 *-*-freebsd* )
1655 opsys=freebsd
1656 case "${canonical}" in
1657 alpha*-*-freebsd*) machine=alpha ;;
1658 i[3456]86-*-freebsd*) machine=intel386 ;;
1659 esac
1660 ;;
1661
ba4481b5
DL
1662 ## NetBSD ports
1663 *-*-netbsd* )
1664 opsys=netbsd
1665 case "${canonical}" in
1666 alpha*-*-netbsd*) machine=alpha ;;
1667 i[3456]86-*-netbsd*) machine=intel386 ;;
1668 m68k-*-netbsd*)
1669 # This is somewhat bogus.
1670 machine=hp9000s300 ;;
1671 powerpc-apple-netbsd*) machine=macppc ;;
1672 mips-*-netbsd*) machine=pmax ;;
2df636f4 1673 mipsel-*-netbsd*) machine=pmax ;;
97836269 1674 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 1675 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1676 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1677 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1678 vax-*-netbsd*) machine=vax ;;
2df636f4 1679 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1680 esac
1681 ;;
1682
1683 ## OpenBSD ports
1684 *-*-openbsd* )
1685 opsys=openbsd
1686 case "${canonical}" in
1687 alpha*-*-openbsd*) machine=alpha ;;
1688 i386-*-openbsd*) machine=intel386 ;;
1689 m68k-*-openbsd*) machine=hp9000s300 ;;
1690 mipsel-*-openbsd*) machine=pmax ;;
1691 ns32k-*-openbsd*) machine=ns32000 ;;
1692 sparc-*-openbsd*) machine=sparc ;;
1693 vax-*-openbsd*) machine=vax ;;
1694 esac
1695 ;;
1696
1697 ## Acorn RISCiX:
1698 arm-acorn-riscix1.1* )
1699 machine=acorn opsys=riscix1-1
1700 ;;
1701 arm-acorn-riscix1.2* | arm-acorn-riscix )
1702 ## This name is riscix12 instead of riscix1.2
1703 ## to avoid a file name conflict on MSDOS.
1704 machine=acorn opsys=riscix12
1705 ;;
1706
1707 ## BSDI ports
1708 *-*-bsdi* )
1709 opsys=bsdi
1710 case "${canonical}" in
1711 i[345]86-*-bsdi*) machine=intel386 ;;
1712 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1713 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1714 esac
1715 case "${canonical}" in
1716 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1717 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1718 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1719 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1720 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1721 esac
1722 ;;
1723
1724 ## Alliant machines
1725 ## Strictly speaking, we need the version of the alliant operating
1726 ## system to choose the right machine file, but currently the
1727 ## configuration name doesn't tell us enough to choose the right
1728 ## one; we need to give alliants their own operating system name to
1729 ## do this right. When someone cares, they can help us.
1730 fx80-alliant-* )
1731 machine=alliant4 opsys=bsd4-2
1732 ;;
1733 i860-alliant-* )
1734 machine=alliant-2800 opsys=bsd4-3
1735 ;;
1736
1737 ## Alpha (DEC) machines.
1738 alpha*-dec-osf* )
1739 machine=alpha opsys=osf1
1740 # This is needed to find X11R6.1 libraries for certain tests.
1741 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1742 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1743 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1744 # due to non-traditional preprocessing with the current compiler
1745 # defaults. OSF 4 can also have that compiler version, and there
1746 # seems always to have been a usable /usr/bin/cpp.
1747 NON_GNU_CPP=/usr/bin/cpp
ca512671 1748 case "${canonical}" in
a55b799a 1749 alpha*-dec-osf[5-9]*)
bb17930d 1750 opsys=osf5-0 ;;
ca512671 1751 esac
ba4481b5
DL
1752 ;;
1753
1754 alpha*-*-linux-gnu* )
1755 machine=alpha opsys=gnu-linux
1756 ;;
1757
c4bb2108
DL
1758 arm*-*-linux-gnu* )
1759 machine=arm opsys=gnu-linux
1760 ;;
1761
1762 ppc-*-linux | \
1763 powerpc-*-linux* )
3aeecf97 1764 machine=macppc opsys=gnu-linux
c4bb2108
DL
1765 ;;
1766
ba4481b5
DL
1767 ## Altos 3068
1768 m68*-altos-sysv* )
1769 machine=altos opsys=usg5-2
1770 ;;
1771
1772 ## Amdahl UTS
1773 580-amdahl-sysv* )
1774 machine=amdahl opsys=usg5-2-2
1775 ;;
1776
1777 ## Apollo, Domain/OS
1778 m68*-apollo-* )
1779 machine=apollo opsys=bsd4-3
1780 ;;
1781
1782 ## AT&T 3b2, 3b5, 3b15, 3b20
1783 we32k-att-sysv* )
1784 machine=att3b opsys=usg5-2-2
1785 ;;
1786
1787 ## AT&T 3b1 - The Mighty Unix PC!
1788 m68*-att-sysv* )
1789 machine=7300 opsys=usg5-2-2
1790 ;;
1791
1792 ## Bull dpx20
1793 rs6000-bull-bosx* )
1794 machine=ibmrs6000 opsys=aix3-2
1795 ;;
1796
1797 ## Bull dpx2
1798 m68*-bull-sysv3* )
1799 machine=dpx2 opsys=usg5-3
1800 ;;
1801
1802 ## Bull sps7
1803 m68*-bull-sysv2* )
1804 machine=sps7 opsys=usg5-2
1805 ;;
1806
1807 ## CCI 5/32, 6/32 -- see "Tahoe".
1808
1809 ## Celerity
1810 ## I don't know what configuration name to use for this; config.sub
1811 ## doesn't seem to know anything about it. Hey, Celerity users, get
1812 ## in touch with us!
1813 celerity-celerity-bsd* )
1814 machine=celerity opsys=bsd4-2
1815 ;;
1816
1817 ## Clipper
1818 ## What operating systems does this chip run that Emacs has been
1819 ## tested on?
1820 clipper-* )
1821 machine=clipper
1822 ## We'll use the catch-all code at the bottom to guess the
1823 ## operating system.
1824 ;;
1825
df645f7c
AS
1826 ## Compaq Nonstop
1827 mips-compaq-nonstopux* )
1828 machine=nonstopux opsys=nonstopux
1829 ;;
1830
ba4481b5
DL
1831 ## Convex
1832 *-convex-bsd* | *-convex-convexos* )
1833 machine=convex opsys=bsd4-3
1834 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1835 NON_GNU_CPP="cc -E -P"
1836 ;;
1837
1838 ## Cubix QBx/386
1839 i[3456]86-cubix-sysv* )
1840 machine=intel386 opsys=usg5-3
1841 ;;
1842
1843 ## Cydra 5
1844 cydra*-cydrome-sysv* )
1845 machine=cydra5 opsys=usg5-3
1846 ;;
1847
1848 ## Data General AViiON Machines
1849 ## DG changed naming conventions with the release of 5.4.4.10, they
1850 ## dropped the initial 5.4 but left the intervening R. Because of the
1851 ## R this shouldn't conflict with older versions of the OS (which I
1852 ## think were named like dgux4.*). In addition, DG new AViiONs series
1853 ## uses either Motorola M88k or Intel Pentium CPUs.
1854 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1855 machine=aviion opsys=dgux4
1856 ;;
1857 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1858 ## This name is dgux5-4-3 instead of dgux5-4r3
1859 ## to avoid a file name conflict on MSDOS.
1860 machine=aviion opsys=dgux5-4-3
1861 ;;
1862 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1863 machine=aviion opsys=dgux5-4r2
1864 ;;
1865 m88k-dg-dgux* )
1866 machine=aviion opsys=dgux
1867 ;;
1868
1869 ## Data General AViiON Intel (x86) Machines
1870 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1871 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1872 i[345]86-dg-dguxR4* )
1873 machine=aviion-intel opsys=dgux4
1874 ;;
1875
1876 ## DECstations
1877 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1878 machine=pmax opsys=bsd4-2
1879 ;;
1880 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1881 machine=pmax opsys=bsd4-3
1882 ;;
1883 mips-dec-ultrix* )
1884 machine=pmax opsys=ultrix4-3
1885 ;;
1886 mips-dec-osf* )
1887 machine=pmax opsys=osf1
1888 ;;
1889 mips-dec-mach_bsd4.3* )
1890 machine=pmax opsys=mach-bsd4-3
1891 ;;
1892
cd890796
JD
1893 ## Motorola Delta machines
1894 m68k-motorola-sysv* | m68000-motorola-sysv* )
1895 machine=delta opsys=usg5-3
1896 if test -z "`type gnucc | grep 'not found'`"
1897 then
1898 if test -s /etc/167config
1899 then CC="gnucc -m68040"
1900 else CC="gnucc -m68881"
1901 fi
1902 else
1903 if test -z "`type gcc | grep 'not found'`"
1904 then CC=gcc
1905 else CC=cc
1906 fi
1907 fi
1908 ;;
ba4481b5
DL
1909 m88k-motorola-sysv4* )
1910 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1911 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1912 # I hope there are not other 4.0 versions for this machine
1913 # which really need usg5-4 instead.
1914 machine=delta88k opsys=usg5-4-2
1915 ;;
1916 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1917 machine=delta88k opsys=usg5-3
1918 ;;
1919
1920 ## Dual machines
1921 m68*-dual-sysv* )
1922 machine=dual opsys=usg5-2
1923 ;;
1924 m68*-dual-uniplus* )
1925 machine=dual opsys=unipl5-2
1926 ;;
1927
1928 ## Elxsi 6400
1929 elxsi-elxsi-sysv* )
1930 machine=elxsi opsys=usg5-2
1931 ;;
1932
1933 ## Encore machines
1934 ns16k-encore-bsd* )
1935 machine=ns16000 opsys=umax
1936 ;;
1937
65171e3a
DL
1938 ## The GEC 63 - apparently, this port isn't really finished yet.
1939 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
1940
1941 ## Gould Power Node and NP1
1942 pn-gould-bsd4.2* )
1943 machine=gould opsys=bsd4-2
1944 ;;
1945 pn-gould-bsd4.3* )
1946 machine=gould opsys=bsd4-3
1947 ;;
1948 np1-gould-bsd* )
1949 machine=gould-np1 opsys=bsd4-3
1950 ;;
1951
1952 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1953 ## as far as Emacs is concerned).
1954 m88k-harris-cxux* )
1955 # Build needs to be different on 7.0 and later releases
1956 case "`uname -r`" in
1957 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1958 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1959 esac
1960 NON_GNU_CPP="/lib/cpp"
1961 ;;
1962 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1963 m68k-harris-cxux* )
1964 machine=nh3000 opsys=cxux
1965 ;;
1966 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1967 powerpc-harris-powerunix )
1968 machine=nh6000 opsys=powerunix
1969 NON_GNU_CPP="cc -Xo -E -P"
1970 ;;
1971 ## SR2001/SR2201 running HI-UX/MPP
1972 hppa1.1-hitachi-hiuxmpp* )
1973 machine=sr2k opsys=hiuxmpp
1974 ;;
89a336fa
GM
1975 hppa1.1-hitachi-hiuxwe2* )
1976 machine=sr2k opsys=hiuxwe2
1977 ;;
ba4481b5
DL
1978 ## Honeywell XPS100
1979 xps*-honeywell-sysv* )
1980 machine=xps100 opsys=usg5-2
1981 ;;
1982
1983 ## HP 9000 series 200 or 300
1984 m68*-hp-bsd* )
1985 machine=hp9000s300 opsys=bsd4-3
1986 ;;
1987 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1988 m68*-hp-hpux* )
1989 case "`uname -r`" in
1990 ## Someone's system reports A.B8.05 for this.
1991 ## I wonder what other possibilities there are.
1992 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1993 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1994 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1995 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1996 *) machine=hp9000s300 opsys=hpux ;;
1997 esac
1998 ;;
1999
2000 ## HP 9000 series 700 and 800, running HP/UX
2001 hppa*-hp-hpux7* )
2002 machine=hp800 opsys=hpux
2003 ;;
2004 hppa*-hp-hpux8* )
2005 machine=hp800 opsys=hpux8
2006 ;;
2007 hppa*-hp-hpux9shr* )
2008 machine=hp800 opsys=hpux9shr
2009 ;;
2010 hppa*-hp-hpux9* )
2011 machine=hp800 opsys=hpux9
2012 ;;
b0e44248
RB
2013 hppa*-hp-hpux10.2* )
2014 machine=hp800 opsys=hpux10-20
2015 ;;
cc227489 2016 hppa*-hp-hpux10* )
ba4481b5
DL
2017 machine=hp800 opsys=hpux10
2018 ;;
cc227489
MB
2019 hppa*-hp-hpux1[1-9]* )
2020 machine=hp800 opsys=hpux11
2021 ;;
ba4481b5 2022
409d9577
GM
2023 hppa*-*-linux-gnu* )
2024 machine=hp800 opsys=gnu-linux
2025 ;;
2026
ba4481b5
DL
2027 ## HP 9000 series 700 and 800, running HP/UX
2028 hppa*-hp-hpux* )
2029 ## Cross-compilation? Nah!
2030 case "`uname -r`" in
2031 ## Someone's system reports A.B8.05 for this.
2032 ## I wonder what other possibilities there are.
2033 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2034 *.08.* ) machine=hp800 opsys=hpux8 ;;
2035 *.09.* ) machine=hp800 opsys=hpux9 ;;
2036 *) machine=hp800 opsys=hpux10 ;;
2037 esac
2038 ;;
2039 hppa*-*-nextstep* )
2040 machine=hp800 opsys=nextstep
2041 ;;
2042
2043 ## Orion machines
2044 orion-orion-bsd* )
2045 machine=orion opsys=bsd4-2
2046 ;;
2047 clipper-orion-bsd* )
2048 machine=orion105 opsys=bsd4-2
2049 ;;
2050
2051 ## IBM machines
2052 i[3456]86-ibm-aix1.1* )
2053 machine=ibmps2-aix opsys=usg5-2-2
2054 ;;
2055 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2056 machine=ibmps2-aix opsys=usg5-3
2057 ;;
2058 i370-ibm-aix*)
2059 machine=ibm370aix opsys=usg5-3
2060 ;;
55597d70 2061 s390-*-linux-gnu* )
138f0859
GM
2062 machine=ibms390 opsys=gnu-linux
2063 ;;
ba4481b5
DL
2064 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2065 machine=ibmrs6000 opsys=aix3-1
2066 ;;
2067 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2068 machine=ibmrs6000 opsys=aix3-2-5
2069 ;;
2070 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2071 machine=ibmrs6000 opsys=aix4-1
2072 ;;
2073 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2074 machine=ibmrs6000 opsys=aix4-2
2075 ;;
55597d70 2076 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2077 machine=ibmrs6000 opsys=aix4-2
2078 ;;
ba4481b5
DL
2079 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2080 machine=ibmrs6000 opsys=aix4
2081 ;;
2082 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2083 machine=ibmrs6000 opsys=aix4-1
2084 ;;
2085 rs6000-ibm-aix* | powerpc-ibm-aix* )
2086 machine=ibmrs6000 opsys=aix3-2
2087 ;;
2088 romp-ibm-bsd4.3* )
2089 machine=ibmrt opsys=bsd4-3
2090 ;;
2091 romp-ibm-bsd4.2* )
2092 machine=ibmrt opsys=bsd4-2
2093 ;;
2094 romp-ibm-aos4.3* )
2095 machine=ibmrt opsys=bsd4-3
2096 ;;
2097 romp-ibm-aos4.2* )
2098 machine=ibmrt opsys=bsd4-2
2099 ;;
2100 romp-ibm-aos* )
2101 machine=ibmrt opsys=bsd4-3
2102 ;;
2103 romp-ibm-bsd* )
2104 machine=ibmrt opsys=bsd4-3
2105 ;;
2106 romp-ibm-aix* )
2107 machine=ibmrt-aix opsys=usg5-2-2
2108 ;;
2109
2110 ## Integrated Solutions `Optimum V'
2111 m68*-isi-bsd4.2* )
2112 machine=isi-ov opsys=bsd4-2
2113 ;;
2114 m68*-isi-bsd4.3* )
2115 machine=isi-ov opsys=bsd4-3
2116 ;;
2117
2118 ## Intel 386 machines where we do care about the manufacturer
2119 i[3456]86-intsys-sysv* )
2120 machine=is386 opsys=usg5-2-2
2121 ;;
2122
2123 ## Prime EXL
2124 i[3456]86-prime-sysv* )
2125 machine=i386 opsys=usg5-3
2126 ;;
2127
2128 ## Sequent Symmetry running Dynix
2129 i[3456]86-sequent-bsd* )
2130 machine=symmetry opsys=bsd4-3
2131 ;;
2132
2133 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2134 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2135 machine=sequent-ptx opsys=ptx4
2136 NON_GNU_CPP=/lib/cpp
2137 ;;
2138
2139 ## Sequent Symmetry running DYNIX/ptx
2140 ## Use the old cpp rather than the newer ANSI one.
2141 i[3456]86-sequent-ptx* )
2142 machine=sequent-ptx opsys=ptx
2143 NON_GNU_CPP="/lib/cpp"
2144 ;;
2145
2146 ## ncr machine running svr4.3.
2147 i[3456]86-ncr-sysv4.3 )
2148 machine=ncr386 opsys=usg5-4-3
2149 ;;
2150
2151 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2152 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2153 i[3456]86-ncr-sysv* )
2154 machine=ncr386 opsys=usg5-4-2
2155 ;;
2156
2157 ## Intel Paragon OSF/1
2158 i860-intel-osf1* )
2159 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2160 ;;
2161
2162 ## Intel 860
2163 i860-*-sysv4* )
2164 machine=i860 opsys=usg5-4
2165 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2166 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2167 ;;
2168
c76e04a8
GM
2169 ## Macintosh PowerPC
2170 powerpc*-*-linux-gnu* )
2171 machine=macppc opsys=gnu-linux
2172 ;;
2173
ba4481b5
DL
2174 ## Masscomp machines
2175 m68*-masscomp-rtu* )
2176 machine=masscomp opsys=rtu
2177 ;;
2178
2179 ## Megatest machines
2180 m68*-megatest-bsd* )
2181 machine=mega68 opsys=bsd4-2
2182 ;;
2183
2184 ## Workstations sold by MIPS
2185 ## This is not necessarily all workstations using the MIPS processor -
2186 ## Irises are produced by SGI, and DECstations by DEC.
2187
2188 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2189 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2190 ## it gives for choosing between the alternatives seems to be "Use
2191 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2192 ## the BSD world." I'll assume that these are instructions for
2193 ## handling two odd situations, and that every other situation
2194 ## should use mips.h and usg5-2-2, they being listed first.
2195 mips-mips-usg* )
2196 machine=mips4
2197 ## Fall through to the general code at the bottom to decide on the OS.
2198 ;;
2199 mips-mips-riscos4* )
2200 machine=mips4 opsys=bsd4-3
2201 NON_GNU_CC="cc -systype bsd43"
2202 NON_GNU_CPP="cc -systype bsd43 -E"
2203 ;;
2204 mips-mips-riscos5* )
2205 machine=mips4 opsys=riscos5
2206 NON_GNU_CC="cc -systype bsd43"
2207 NON_GNU_CPP="cc -systype bsd43 -E"
2208 ;;
2209 mips-mips-bsd* )
2210 machine=mips opsys=bsd4-3
2211 ;;
2212 mips-mips-* )
2213 machine=mips opsys=usg5-2-2
2214 ;;
2215
2216 ## NeXT
2217 m68*-next-* | m68k-*-nextstep* )
2218 machine=m68k opsys=nextstep
2219 ;;
2220
2221 ## The complete machine from National Semiconductor
2222 ns32k-ns-genix* )
2223 machine=ns32000 opsys=usg5-2
2224 ;;
2225
2226 ## NCR machines
2227 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2228 machine=tower32 opsys=usg5-2-2
2229 ;;
2230 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2231 machine=tower32v3 opsys=usg5-3
2232 ;;
2233
2234 ## NEC EWS4800
2235 mips-nec-sysv4*)
2236 machine=ews4800 opsys=ux4800
2237 ;;
2238
2239 ## Nixdorf Targon 31
2240 m68*-nixdorf-sysv* )
2241 machine=targon31 opsys=usg5-2-2
2242 ;;
2243
2244 ## Nu (TI or LMI)
2245 m68*-nu-sysv* )
2246 machine=nu opsys=usg5-2
2247 ;;
2248
2249 ## Plexus
2250 m68*-plexus-sysv* )
2251 machine=plexus opsys=usg5-2
2252 ;;
2253
ba4481b5
DL
2254 ## Pyramid machines
2255 ## I don't really have any idea what sort of processor the Pyramid has,
2256 ## so I'm assuming it is its own architecture.
2257 pyramid-pyramid-bsd* )
2258 machine=pyramid opsys=bsd4-2
2259 ;;
2260
2261 ## Sequent Balance
2262 ns32k-sequent-bsd4.2* )
2263 machine=sequent opsys=bsd4-2
2264 ;;
2265 ns32k-sequent-bsd4.3* )
2266 machine=sequent opsys=bsd4-3
2267 ;;
2268
2269 ## Siemens Nixdorf
2270 mips-siemens-sysv* | mips-sni-sysv*)
2271 machine=mips-siemens opsys=usg5-4
2272 NON_GNU_CC=/usr/ccs/bin/cc
2273 NON_GNU_CPP=/usr/ccs/lib/cpp
2274 ;;
2275
2276 ## Silicon Graphics machines
2277 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2278 m68*-sgi-iris3.5* )
2279 machine=irist opsys=iris3-5
2280 ;;
2281 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2282 machine=irist opsys=iris3-6
2283 ;;
2284 ## Iris 4D
2285 mips-sgi-irix3* )
2286 machine=iris4d opsys=irix3-3
2287 ;;
2288 mips-sgi-irix4* )
2289 machine=iris4d opsys=irix4-0
2290 ;;
2291 mips-sgi-irix6.5 )
2292 machine=iris4d opsys=irix6-5
946173ad
DL
2293 # Without defining _LANGUAGE_C, things get masked out in the headers
2294 # so that, for instance, grepping for `free' in stdlib.h fails and
2295 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2296 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2297 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2298 ;;
2299 mips-sgi-irix6* )
2300 machine=iris4d opsys=irix6-0
c4bb2108 2301 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2302 # but presumably it does no harm.
2303 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2304 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2305 NON_GCC_TEST_OPTIONS=-32
2306 ;;
2307 mips-sgi-irix5.[01]* )
2308 machine=iris4d opsys=irix5-0
2309 ;;
2310 mips-sgi-irix5* | mips-sgi-irix* )
2311 machine=iris4d opsys=irix5-2
2312 ;;
2313
2314 ## SONY machines
2315 m68*-sony-bsd4.2* )
2316 machine=news opsys=bsd4-2
2317 ;;
2318 m68*-sony-bsd4.3* )
2319 machine=news opsys=bsd4-3
2320 ;;
2321 m68*-sony-newsos3* | m68*-sony-news3*)
2322 machine=news opsys=bsd4-3
2323 ;;
2324 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2325 machine=news-risc opsys=bsd4-3
2326 ;;
2327 mips-sony-newsos6* )
2328 machine=news-r6 opsys=newsos6
2329 ;;
2330 mips-sony-news* )
2331 machine=news-risc opsys=newsos5
2332 ;;
2333
2334 ## Stride
2335 m68*-stride-sysv* )
2336 machine=stride opsys=usg5-2
2337 ;;
2338
2339 ## Suns
2340 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2341 machine=sparc opsys=gnu-linux
2342 ;;
2343
d054101f 2344 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2345 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2346 | rs6000-*-solaris2*)
2347 case "${canonical}" in
2348 m68*-sunos1* ) machine=sun1 ;;
2349 m68*-sunos2* ) machine=sun2 ;;
2350 m68* ) machine=sun3 ;;
2351 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2352 i[3456]86-*-* ) machine=intel386 ;;
2353 powerpcle* ) machine=powerpcle ;;
2354 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2355 sparc* ) machine=sparc ;;
2356 * ) unported=yes ;;
2357 esac
2358 case "${canonical}" in
2359 ## The Sun386 didn't get past 4.0.
2360 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2361 *-sunos4.0* ) opsys=sunos4-0 ;;
2362 *-sunos4.1.[3-9]*noshare )
2363 ## This name is sunos413 instead of sunos4-1-3
2364 ## to avoid a file name conflict on MSDOS.
2365 opsys=sunos413
2366 NON_GNU_CPP=/usr/lib/cpp
2367 NON_GCC_TEST_OPTIONS=-Bstatic
2368 GCC_TEST_OPTIONS=-static
2369 ;;
2370 *-sunos4.1.[3-9]* | *-sunos4shr*)
2371 opsys=sunos4shr
2372 NON_GNU_CPP=/usr/lib/cpp
2373 ;;
2374 *-sunos4* | *-sunos )
2375 opsys=sunos4-1
2376 NON_GCC_TEST_OPTIONS=-Bstatic
2377 GCC_TEST_OPTIONS=-static
2378 ;;
2379 *-sunos5.3* | *-solaris2.3* )
2380 opsys=sol2-3
2381 NON_GNU_CPP=/usr/ccs/lib/cpp
2382 ;;
2383 *-sunos5.4* | *-solaris2.4* )
2384 opsys=sol2-4
2385 NON_GNU_CPP=/usr/ccs/lib/cpp
2386 RANLIB="ar -ts"
2387 ;;
2388 *-sunos5.5* | *-solaris2.5* )
2389 opsys=sol2-5
2390 NON_GNU_CPP=/usr/ccs/lib/cpp
2391 RANLIB="ar -ts"
2392 ;;
8e967cf7
MR
2393 *-sunos5.6* | *-solaris2.6* )
2394 opsys=sol2-6
2395 NON_GNU_CPP=/usr/ccs/lib/cpp
2396 RANLIB="ar -ts"
2397 ;;
ba4481b5 2398 *-sunos5* | *-solaris* )
9e71690e 2399 opsys=sol2-6
ba4481b5
DL
2400 NON_GNU_CPP=/usr/ccs/lib/cpp
2401 ;;
2402 * ) opsys=bsd4-2 ;;
2403 esac
2404 ## Watch out for a compiler that we know will not work.
2405 case "${canonical}" in
2406 *-solaris* | *-sunos5* )
2407 if [ "x$CC" = x/usr/ucb/cc ]; then
2408 ## /usr/ucb/cc doesn't work;
2409 ## we should find some other compiler that does work.
2410 unset CC
2411 fi
2412 ;;
2413 *) ;;
2414 esac
2415 ;;
2416 sparc-*-nextstep* )
2417 machine=sparc opsys=nextstep
2418 ;;
2419
2420 ## Tadpole 68k
2421 m68*-tadpole-sysv* )
2422 machine=tad68k opsys=usg5-3
2423 ;;
2424
2425 ## Tahoe machines
2426 tahoe-tahoe-bsd4.2* )
2427 machine=tahoe opsys=bsd4-2
2428 ;;
2429 tahoe-tahoe-bsd4.3* )
2430 machine=tahoe opsys=bsd4-3
2431 ;;
2432
2433 ## Tandem Integrity S2
2434 mips-tandem-sysv* )
2435 machine=tandem-s2 opsys=usg5-3
2436 ;;
2437
2438 ## Tektronix XD88
2439 m88k-tektronix-sysv3* )
2440 machine=tekxd88 opsys=usg5-3
2441 ;;
2442
2443 ## Tektronix 16000 box (6130?)
2444 ns16k-tektronix-bsd* )
2445 machine=ns16000 opsys=bsd4-2
2446 ;;
2447 ## Tektronix 4300
2448 ## src/m/tek4300.h hints that this is a m68k machine.
2449 m68*-tektronix-bsd* )
2450 machine=tek4300 opsys=bsd4-3
2451 ;;
2452
2453 ## Titan P2 or P3
2454 ## We seem to have lost the machine-description file titan.h!
2455 titan-titan-sysv* )
2456 machine=titan opsys=usg5-3
2457 ;;
2458
2459 ## Ustation E30 (SS5E)
2460 m68*-unisys-uniplus* )
2461 machine=ustation opsystem=unipl5-2
2462 ;;
2463
2464 ## Vaxen.
2465 vax-dec-* )
2466 machine=vax
2467 case "${canonical}" in
2468 *-bsd4.1* ) opsys=bsd4-1 ;;
2469 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2470 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2471 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2472 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2473 *-vms* ) opsys=vms ;;
2474 * ) unported=yes
2475 esac
2476 ;;
2477
2478 ## Whitechapel MG1
2479 ns16k-whitechapel-* )
2480 machine=mg1
2481 ## We don't know what sort of OS runs on these; we'll let the
2482 ## operating system guessing code below try.
2483 ;;
2484
2485 ## Wicat
2486 m68*-wicat-sysv* )
2487 machine=wicat opsys=usg5-2
2488 ;;
2489
f4988be7
GM
2490 ## IA-64
2491 ia64*-*-linux* )
2492 machine=ia64 opsys=gnu-linux
2493 ;;
2494
ba4481b5
DL
2495 ## Intel 386 machines where we don't care about the manufacturer
2496 i[3456]86-*-* )
2497 machine=intel386
2498 case "${canonical}" in
c60ee5e7 2499 *-cygwin ) opsys=cygwin ;;
9f817ea4 2500 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2501 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2502 *-isc2.2* ) opsys=isc2-2 ;;
2503 *-isc4.0* ) opsys=isc4-0 ;;
2504 *-isc4.* ) opsys=isc4-1
2505 GCC_TEST_OPTIONS=-posix
2506 NON_GCC_TEST_OPTIONS=-Xp
2507 ;;
2508 *-isc* ) opsys=isc3-0 ;;
2509 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2510 *-esix* ) opsys=esix ;;
2511 *-xenix* ) opsys=xenix ;;
2512 *-linux-gnu* ) opsys=gnu-linux ;;
2513 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2514 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2515 NON_GNU_CPP=/lib/cpp
2516 # Prevent -belf from being passed to $CPP.
2517 # /lib/cpp does not accept it.
2518 OVERRIDE_CPPFLAGS=" "
2519 ;;
2520 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2521 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2522 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2523 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2524 *-nextstep* ) opsys=nextstep ;;
2525 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2526 esac
2527 ;;
2528
2529 ## m68k Linux-based GNU system
2530 m68k-*-linux-gnu* )
2531 machine=m68k opsys=gnu-linux
2532 ;;
2533
2534 ## Mips Linux-based GNU system
cd958eb3 2535 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2536 machine=mips opsys=gnu-linux
2537 ;;
2538
2539 ## UXP/DS
2540 sparc-fujitsu-sysv4* )
2541 machine=sparc opsys=uxpds
2542 NON_GNU_CPP=/usr/ccs/lib/cpp
2543 RANLIB="ar -ts"
2544 ;;
2545
2546 ## UXP/V
2547 f301-fujitsu-uxpv4.1)
2548 machine=f301 opsys=uxpv
2549 ;;
2550
e0f712ba
AC
2551 ## Darwin / Mac OS X
2552 powerpc-apple-darwin* )
2553 machine=powermac opsys=darwin
2554 # Define CPP as follows to make autoconf work correctly.
2555 CPP="cc -E -traditional-cpp"
2556 ;;
2557
598a2813
AS
2558 ## AMD x86-64 Linux-based GNU system
2559 x86_64-*-linux-gnu* )
24b01ec4 2560 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2561 ;;
2562
ba4481b5
DL
2563 * )
2564 unported=yes
2565 ;;
2566esac
2567
2568### If the code above didn't choose an operating system, just choose
2569### an operating system based on the configuration name. You really
2570### only want to use this when you have no idea what the right
2571### operating system is; if you know what operating systems a machine
2572### runs, it's cleaner to make it explicit in the case statement
2573### above.
2574if test x"${opsys}" = x; then
2575 case "${canonical}" in
2576 *-gnu* ) opsys=gnu ;;
2577 *-bsd4.[01] ) opsys=bsd4-1 ;;
2578 *-bsd4.2 ) opsys=bsd4-2 ;;
2579 *-bsd4.3 ) opsys=bsd4-3 ;;
2580 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2581 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2582 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2583 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2584 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2585 *-sysv5uw* ) opsys=unixware ;;
2586 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2587 *-sysv4.1* | *-sysvr4.1* )
2588 NON_GNU_CPP=/usr/lib/cpp
2589 opsys=usg5-4 ;;
2590 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2591 if [ x$NON_GNU_CPP = x ]; then
2592 if [ -f /usr/ccs/lib/cpp ]; then
2593 NON_GNU_CPP=/usr/ccs/lib/cpp
2594 else
2595 NON_GNU_CPP=/lib/cpp
2596 fi
2597 fi
2598 opsys=usg5-4-2 ;;
2599 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2600 * )
2601 unported=yes
2602 ;;
2603 esac
2604fi
2605
c0d27fcc 2606
22044edf 2607
ba4481b5 2608if test $unported = yes; then
c0d27fcc 2609 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2610Check \`etc/MACHINES' for recognized configuration names." >&5
2611echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2612Check \`etc/MACHINES' for recognized configuration names." >&2;}
2613 { (exit 1); exit 1; }; }
ba4481b5
DL
2614fi
2615
2616machfile="m/${machine}.h"
2617opsysfile="s/${opsys}.h"
2618
c0d27fcc 2619
ba4481b5
DL
2620#### Choose a compiler.
2621test -n "$CC" && cc_specified=yes
2622
2623# Save the value of CFLAGS that the user specified.
2624SPECIFIED_CFLAGS="$CFLAGS"
2625
2626case ${with_gcc} in
2627 "yes" ) CC="gcc" GCC=yes ;;
2628 "no" ) : ${CC=cc} ;;
503d2be0
AS
2629 * )
2630esac
2631ac_ext=c
2632ac_cpp='$CPP $CPPFLAGS'
2633ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2634ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2635ac_compiler_gnu=$ac_cv_c_compiler_gnu
2636if test -n "$ac_tool_prefix"; then
2637 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2638set dummy ${ac_tool_prefix}gcc; ac_word=$2
c0d27fcc 2639echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2640echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2641if test "${ac_cv_prog_CC+set}" = set; then
2642 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2643else
2644 if test -n "$CC"; then
2645 ac_cv_prog_CC="$CC" # Let the user override the test.
2646else
c0d27fcc
MR
2647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2648for as_dir in $PATH
2649do
2650 IFS=$as_save_IFS
2651 test -z "$as_dir" && as_dir=.
2652 for ac_exec_ext in '' $ac_executable_extensions; do
2653 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2654 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2655 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2656 break 2
2657 fi
2658done
503d2be0
AS
2659done
2660
ba4481b5
DL
2661fi
2662fi
503d2be0 2663CC=$ac_cv_prog_CC
ba4481b5 2664if test -n "$CC"; then
c0d27fcc 2665 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2666echo "${ECHO_T}$CC" >&6
2667else
c0d27fcc 2668 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2669echo "${ECHO_T}no" >&6
2670fi
2671
2672fi
2673if test -z "$ac_cv_prog_CC"; then
2674 ac_ct_CC=$CC
2675 # Extract the first word of "gcc", so it can be a program name with args.
2676set dummy gcc; ac_word=$2
c0d27fcc 2677echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2678echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2679if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2680 echo $ECHO_N "(cached) $ECHO_C" >&6
2681else
2682 if test -n "$ac_ct_CC"; then
2683 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2684else
c0d27fcc
MR
2685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2686for as_dir in $PATH
2687do
2688 IFS=$as_save_IFS
2689 test -z "$as_dir" && as_dir=.
2690 for ac_exec_ext in '' $ac_executable_extensions; do
2691 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2692 ac_cv_prog_ac_ct_CC="gcc"
2693 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2694 break 2
2695 fi
2696done
503d2be0
AS
2697done
2698
2699fi
2700fi
2701ac_ct_CC=$ac_cv_prog_ac_ct_CC
2702if test -n "$ac_ct_CC"; then
c0d27fcc 2703 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0 2704echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2705else
c0d27fcc 2706 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2707echo "${ECHO_T}no" >&6
2708fi
2709
2710 CC=$ac_ct_CC
2711else
2712 CC="$ac_cv_prog_CC"
ba4481b5
DL
2713fi
2714
2715if test -z "$CC"; then
503d2be0
AS
2716 if test -n "$ac_tool_prefix"; then
2717 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2718set dummy ${ac_tool_prefix}cc; ac_word=$2
c0d27fcc 2719echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2720echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2721if test "${ac_cv_prog_CC+set}" = set; then
2722 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2723else
2724 if test -n "$CC"; then
2725 ac_cv_prog_CC="$CC" # Let the user override the test.
2726else
c0d27fcc
MR
2727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2728for as_dir in $PATH
2729do
2730 IFS=$as_save_IFS
2731 test -z "$as_dir" && as_dir=.
2732 for ac_exec_ext in '' $ac_executable_extensions; do
2733 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2734 ac_cv_prog_CC="${ac_tool_prefix}cc"
2735 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2736 break 2
2737 fi
2738done
503d2be0
AS
2739done
2740
2741fi
2742fi
2743CC=$ac_cv_prog_CC
2744if test -n "$CC"; then
c0d27fcc 2745 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2746echo "${ECHO_T}$CC" >&6
2747else
c0d27fcc 2748 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2749echo "${ECHO_T}no" >&6
2750fi
2751
2752fi
2753if test -z "$ac_cv_prog_CC"; then
2754 ac_ct_CC=$CC
2755 # Extract the first word of "cc", so it can be a program name with args.
2756set dummy cc; ac_word=$2
c0d27fcc 2757echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2758echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2759if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2760 echo $ECHO_N "(cached) $ECHO_C" >&6
2761else
2762 if test -n "$ac_ct_CC"; then
2763 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2764else
c0d27fcc
MR
2765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2766for as_dir in $PATH
2767do
2768 IFS=$as_save_IFS
2769 test -z "$as_dir" && as_dir=.
2770 for ac_exec_ext in '' $ac_executable_extensions; do
2771 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2772 ac_cv_prog_ac_ct_CC="cc"
2773 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2774 break 2
2775 fi
2776done
503d2be0
AS
2777done
2778
2779fi
2780fi
2781ac_ct_CC=$ac_cv_prog_ac_ct_CC
2782if test -n "$ac_ct_CC"; then
c0d27fcc 2783 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2784echo "${ECHO_T}$ac_ct_CC" >&6
2785else
c0d27fcc 2786 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2787echo "${ECHO_T}no" >&6
2788fi
2789
2790 CC=$ac_ct_CC
2791else
2792 CC="$ac_cv_prog_CC"
2793fi
2794
2795fi
2796if test -z "$CC"; then
2797 # Extract the first word of "cc", so it can be a program name with args.
2798set dummy cc; ac_word=$2
c0d27fcc 2799echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2800echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2801if test "${ac_cv_prog_CC+set}" = set; then
2802 echo $ECHO_N "(cached) $ECHO_C" >&6
2803else
2804 if test -n "$CC"; then
2805 ac_cv_prog_CC="$CC" # Let the user override the test.
2806else
2807 ac_prog_rejected=no
c0d27fcc
MR
2808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2809for as_dir in $PATH
2810do
2811 IFS=$as_save_IFS
2812 test -z "$as_dir" && as_dir=.
2813 for ac_exec_ext in '' $ac_executable_extensions; do
2814 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2815 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2816 ac_prog_rejected=yes
2817 continue
2818 fi
2819 ac_cv_prog_CC="cc"
2820 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2821 break 2
2822 fi
2823done
503d2be0
AS
2824done
2825
ba4481b5
DL
2826if test $ac_prog_rejected = yes; then
2827 # We found a bogon in the path, so make sure we never use it.
2828 set dummy $ac_cv_prog_CC
2829 shift
503d2be0 2830 if test $# != 0; then
ba4481b5
DL
2831 # We chose a different compiler from the bogus one.
2832 # However, it has the same basename, so the bogon will be chosen
2833 # first if we set CC to just the basename; use the full file name.
2834 shift
6bae0ccf 2835 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2836 fi
2837fi
2838fi
2839fi
503d2be0 2840CC=$ac_cv_prog_CC
ba4481b5 2841if test -n "$CC"; then
c0d27fcc 2842 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2843echo "${ECHO_T}$CC" >&6
ba4481b5 2844else
c0d27fcc 2845 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2846echo "${ECHO_T}no" >&6
ba4481b5
DL
2847fi
2848
503d2be0
AS
2849fi
2850if test -z "$CC"; then
2851 if test -n "$ac_tool_prefix"; then
2852 for ac_prog in cl
2853 do
2854 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2855set dummy $ac_tool_prefix$ac_prog; ac_word=$2
c0d27fcc 2856echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2857echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2858if test "${ac_cv_prog_CC+set}" = set; then
2859 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2860else
2861 if test -n "$CC"; then
2862 ac_cv_prog_CC="$CC" # Let the user override the test.
2863else
c0d27fcc
MR
2864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2865for as_dir in $PATH
2866do
2867 IFS=$as_save_IFS
2868 test -z "$as_dir" && as_dir=.
2869 for ac_exec_ext in '' $ac_executable_extensions; do
2870 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2871 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2872 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2873 break 2
2874 fi
2875done
503d2be0
AS
2876done
2877
c4bb2108
DL
2878fi
2879fi
503d2be0 2880CC=$ac_cv_prog_CC
c4bb2108 2881if test -n "$CC"; then
c0d27fcc 2882 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2883echo "${ECHO_T}$CC" >&6
c4bb2108 2884else
c0d27fcc 2885 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2886echo "${ECHO_T}no" >&6
2887fi
2888
2889 test -n "$CC" && break
2890 done
2891fi
2892if test -z "$CC"; then
2893 ac_ct_CC=$CC
2894 for ac_prog in cl
2895do
2896 # Extract the first word of "$ac_prog", so it can be a program name with args.
2897set dummy $ac_prog; ac_word=$2
c0d27fcc 2898echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2899echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2900if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2901 echo $ECHO_N "(cached) $ECHO_C" >&6
2902else
2903 if test -n "$ac_ct_CC"; then
2904 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2905else
c0d27fcc
MR
2906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2907for as_dir in $PATH
2908do
2909 IFS=$as_save_IFS
2910 test -z "$as_dir" && as_dir=.
2911 for ac_exec_ext in '' $ac_executable_extensions; do
2912 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2913 ac_cv_prog_ac_ct_CC="$ac_prog"
2914 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2915 break 2
2916 fi
2917done
503d2be0
AS
2918done
2919
c4bb2108 2920fi
503d2be0
AS
2921fi
2922ac_ct_CC=$ac_cv_prog_ac_ct_CC
2923if test -n "$ac_ct_CC"; then
c0d27fcc 2924 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2925echo "${ECHO_T}$ac_ct_CC" >&6
2926else
c0d27fcc 2927 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2928echo "${ECHO_T}no" >&6
ba4481b5
DL
2929fi
2930
503d2be0
AS
2931 test -n "$ac_ct_CC" && break
2932done
ba4481b5 2933
503d2be0
AS
2934 CC=$ac_ct_CC
2935fi
2936
2937fi
ba4481b5 2938
c0d27fcc 2939
cd958eb3
MB
2940test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2941See \`config.log' for more details." >&5
2942echo "$as_me: error: no acceptable C compiler found in \$PATH
2943See \`config.log' for more details." >&2;}
503d2be0 2944 { (exit 1); exit 1; }; }
c4bb2108 2945
503d2be0 2946# Provide some information about the compiler.
c0d27fcc 2947echo "$as_me:$LINENO:" \
503d2be0
AS
2948 "checking for C compiler version" >&5
2949ac_compiler=`set X $ac_compile; echo $2`
c0d27fcc 2950{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
2951 (eval $ac_compiler --version </dev/null >&5) 2>&5
2952 ac_status=$?
c0d27fcc 2953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 2954 (exit $ac_status); }
c0d27fcc 2955{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
2956 (eval $ac_compiler -v </dev/null >&5) 2>&5
2957 ac_status=$?
c0d27fcc 2958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 2959 (exit $ac_status); }
c0d27fcc 2960{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
2961 (eval $ac_compiler -V </dev/null >&5) 2>&5
2962 ac_status=$?
c0d27fcc 2963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
2964 (exit $ac_status); }
2965
2966cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 2967#line $LINENO "configure"
cd958eb3
MB
2968/* confdefs.h. */
2969_ACEOF
2970cat confdefs.h >>conftest.$ac_ext
2971cat >>conftest.$ac_ext <<_ACEOF
2972/* end confdefs.h. */
c4bb2108 2973
503d2be0
AS
2974int
2975main ()
2976{
2977
2978 ;
2979 return 0;
2980}
2981_ACEOF
2982ac_clean_files_save=$ac_clean_files
cd958eb3 2983ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
2984# Try to create an executable without -o first, disregard a.out.
2985# It will help us diagnose broken compilers, and finding out an intuition
2986# of exeext.
c0d27fcc 2987echo "$as_me:$LINENO: checking for C compiler default output" >&5
503d2be0
AS
2988echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2989ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
c0d27fcc 2990if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
503d2be0
AS
2991 (eval $ac_link_default) 2>&5
2992 ac_status=$?
c0d27fcc 2993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
2994 (exit $ac_status); }; then
2995 # Find the output, starting from the most likely. This scheme is
2996# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2997# resort.
c0d27fcc
MR
2998
2999# Be careful to initialize this variable, since it used to be cached.
3000# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
3001ac_cv_exeext=
cd958eb3
MB
3002# b.out is created by i960 compilers.
3003for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
3004do
6bae0ccf 3005 test -f "$ac_file" || continue
503d2be0 3006 case $ac_file in
cd958eb3
MB
3007 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
3008 ;;
3009 conftest.$ac_ext )
3010 # This is the source file.
3011 ;;
3012 [ab].out )
3013 # We found the default executable, but exeext='' is most
3014 # certainly right.
3015 break;;
3016 *.* )
3017 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3018 # FIXME: I believe we export ac_cv_exeext for Libtool,
3019 # but it would be cool to find out if it's true. Does anybody
3020 # maintain Libtool? --akim.
3021 export ac_cv_exeext
3022 break;;
3023 * )
3024 break;;
503d2be0
AS
3025 esac
3026done
3027else
3028 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3029sed 's/^/| /' conftest.$ac_ext >&5
3030
6bae0ccf 3031{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
cd958eb3 3032See \`config.log' for more details." >&5
6bae0ccf 3033echo "$as_me: error: C compiler cannot create executables
cd958eb3 3034See \`config.log' for more details." >&2;}
503d2be0
AS
3035 { (exit 77); exit 77; }; }
3036fi
3037
3038ac_exeext=$ac_cv_exeext
c0d27fcc 3039echo "$as_me:$LINENO: result: $ac_file" >&5
503d2be0
AS
3040echo "${ECHO_T}$ac_file" >&6
3041
3042# Check the compiler produces executables we can run. If not, either
3043# the compiler is broken, or we cross compile.
c0d27fcc 3044echo "$as_me:$LINENO: checking whether the C compiler works" >&5
503d2be0
AS
3045echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
3046# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3047# If not cross compiling, check that we can run a simple program.
3048if test "$cross_compiling" != yes; then
3049 if { ac_try='./$ac_file'
c0d27fcc 3050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3051 (eval $ac_try) 2>&5
3052 ac_status=$?
c0d27fcc 3053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3054 (exit $ac_status); }; }; then
3055 cross_compiling=no
ba4481b5 3056 else
503d2be0
AS
3057 if test "$cross_compiling" = maybe; then
3058 cross_compiling=yes
3059 else
c0d27fcc 3060 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
cd958eb3
MB
3061If you meant to cross compile, use \`--host'.
3062See \`config.log' for more details." >&5
503d2be0 3063echo "$as_me: error: cannot run C compiled programs.
cd958eb3
MB
3064If you meant to cross compile, use \`--host'.
3065See \`config.log' for more details." >&2;}
503d2be0
AS
3066 { (exit 1); exit 1; }; }
3067 fi
ba4481b5 3068 fi
503d2be0 3069fi
c0d27fcc 3070echo "$as_me:$LINENO: result: yes" >&5
503d2be0
AS
3071echo "${ECHO_T}yes" >&6
3072
cd958eb3 3073rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0
AS
3074ac_clean_files=$ac_clean_files_save
3075# Check the compiler produces executables we can run. If not, either
3076# the compiler is broken, or we cross compile.
c0d27fcc 3077echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
503d2be0 3078echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
c0d27fcc 3079echo "$as_me:$LINENO: result: $cross_compiling" >&5
503d2be0
AS
3080echo "${ECHO_T}$cross_compiling" >&6
3081
c0d27fcc
MR
3082echo "$as_me:$LINENO: checking for suffix of executables" >&5
3083echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
3085 (eval $ac_link) 2>&5
3086 ac_status=$?
c0d27fcc 3087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3088 (exit $ac_status); }; then
3089 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3090# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3091# work properly (i.e., refer to `conftest.exe'), while it won't with
3092# `rm'.
6bae0ccf
DL
3093for ac_file in conftest.exe conftest conftest.*; do
3094 test -f "$ac_file" || continue
503d2be0 3095 case $ac_file in
6bae0ccf 3096 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
503d2be0
AS
3097 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3098 export ac_cv_exeext
3099 break;;
3100 * ) break;;
3101 esac
3102done
ba4481b5 3103else
cd958eb3
MB
3104 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3105See \`config.log' for more details." >&5
3106echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3107See \`config.log' for more details." >&2;}
503d2be0 3108 { (exit 1); exit 1; }; }
ba4481b5 3109fi
ba4481b5 3110
503d2be0 3111rm -f conftest$ac_cv_exeext
c0d27fcc 3112echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
503d2be0 3113echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 3114
503d2be0
AS
3115rm -f conftest.$ac_ext
3116EXEEXT=$ac_cv_exeext
3117ac_exeext=$EXEEXT
c0d27fcc
MR
3118echo "$as_me:$LINENO: checking for suffix of object files" >&5
3119echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
503d2be0
AS
3120if test "${ac_cv_objext+set}" = set; then
3121 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3122else
503d2be0 3123 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3124#line $LINENO "configure"
cd958eb3
MB
3125/* confdefs.h. */
3126_ACEOF
3127cat confdefs.h >>conftest.$ac_ext
3128cat >>conftest.$ac_ext <<_ACEOF
3129/* end confdefs.h. */
ba4481b5 3130
503d2be0
AS
3131int
3132main ()
3133{
ba4481b5 3134
503d2be0
AS
3135 ;
3136 return 0;
3137}
3138_ACEOF
3139rm -f conftest.o conftest.obj
c0d27fcc 3140if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3141 (eval $ac_compile) 2>&5
3142 ac_status=$?
c0d27fcc 3143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3144 (exit $ac_status); }; then
3145 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3146 case $ac_file in
6bae0ccf 3147 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
503d2be0
AS
3148 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3149 break;;
3150 esac
3151done
c4bb2108 3152else
503d2be0 3153 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3154sed 's/^/| /' conftest.$ac_ext >&5
3155
3156{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3157See \`config.log' for more details." >&5
3158echo "$as_me: error: cannot compute suffix of object files: cannot compile
3159See \`config.log' for more details." >&2;}
503d2be0 3160 { (exit 1); exit 1; }; }
c4bb2108
DL
3161fi
3162
503d2be0
AS
3163rm -f conftest.$ac_cv_objext conftest.$ac_ext
3164fi
c0d27fcc 3165echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
503d2be0
AS
3166echo "${ECHO_T}$ac_cv_objext" >&6
3167OBJEXT=$ac_cv_objext
3168ac_objext=$OBJEXT
c0d27fcc 3169echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
3170echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3171if test "${ac_cv_c_compiler_gnu+set}" = set; then
3172 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3173else
503d2be0 3174 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3175#line $LINENO "configure"
cd958eb3
MB
3176/* confdefs.h. */
3177_ACEOF
3178cat confdefs.h >>conftest.$ac_ext
3179cat >>conftest.$ac_ext <<_ACEOF
3180/* end confdefs.h. */
503d2be0
AS
3181
3182int
3183main ()
3184{
3185#ifndef __GNUC__
3186 choke me
3187#endif
3188
3189 ;
3190 return 0;
3191}
3192_ACEOF
3193rm -f conftest.$ac_objext
c0d27fcc 3194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3195 (eval $ac_compile) 2>&5
3196 ac_status=$?
c0d27fcc 3197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3198 (exit $ac_status); } &&
3199 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3201 (eval $ac_try) 2>&5
3202 ac_status=$?
c0d27fcc 3203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3204 (exit $ac_status); }; }; then
3205 ac_compiler_gnu=yes
3206else
3207 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3208sed 's/^/| /' conftest.$ac_ext >&5
3209
503d2be0
AS
3210ac_compiler_gnu=no
3211fi
3212rm -f conftest.$ac_objext conftest.$ac_ext
3213ac_cv_c_compiler_gnu=$ac_compiler_gnu
3214
3215fi
c0d27fcc 3216echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
3217echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3218GCC=`test $ac_compiler_gnu = yes && echo yes`
3219ac_test_CFLAGS=${CFLAGS+set}
3220ac_save_CFLAGS=$CFLAGS
3221CFLAGS="-g"
c0d27fcc 3222echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
503d2be0
AS
3223echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3224if test "${ac_cv_prog_cc_g+set}" = set; then
3225 echo $ECHO_N "(cached) $ECHO_C" >&6
3226else
3227 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3228#line $LINENO "configure"
cd958eb3
MB
3229/* confdefs.h. */
3230_ACEOF
3231cat confdefs.h >>conftest.$ac_ext
3232cat >>conftest.$ac_ext <<_ACEOF
3233/* end confdefs.h. */
503d2be0
AS
3234
3235int
3236main ()
3237{
3238
3239 ;
3240 return 0;
3241}
3242_ACEOF
3243rm -f conftest.$ac_objext
c0d27fcc 3244if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3245 (eval $ac_compile) 2>&5
3246 ac_status=$?
c0d27fcc 3247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3248 (exit $ac_status); } &&
3249 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3251 (eval $ac_try) 2>&5
3252 ac_status=$?
c0d27fcc 3253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3254 (exit $ac_status); }; }; then
ba4481b5
DL
3255 ac_cv_prog_cc_g=yes
3256else
503d2be0 3257 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3258sed 's/^/| /' conftest.$ac_ext >&5
3259
503d2be0 3260ac_cv_prog_cc_g=no
ba4481b5 3261fi
503d2be0 3262rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 3263fi
c0d27fcc 3264echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
503d2be0 3265echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 3266if test "$ac_test_CFLAGS" = set; then
503d2be0 3267 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3268elif test $ac_cv_prog_cc_g = yes; then
3269 if test "$GCC" = yes; then
ba4481b5
DL
3270 CFLAGS="-g -O2"
3271 else
c4bb2108 3272 CFLAGS="-g"
ba4481b5 3273 fi
22afa6e8 3274else
c4bb2108
DL
3275 if test "$GCC" = yes; then
3276 CFLAGS="-O2"
3277 else
3278 CFLAGS=
3279 fi
ba4481b5 3280fi
6bae0ccf
DL
3281echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3282echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3283if test "${ac_cv_prog_cc_stdc+set}" = set; then
3284 echo $ECHO_N "(cached) $ECHO_C" >&6
3285else
3286 ac_cv_prog_cc_stdc=no
3287ac_save_CC=$CC
3288cat >conftest.$ac_ext <<_ACEOF
3289#line $LINENO "configure"
cd958eb3
MB
3290/* confdefs.h. */
3291_ACEOF
3292cat confdefs.h >>conftest.$ac_ext
3293cat >>conftest.$ac_ext <<_ACEOF
3294/* end confdefs.h. */
6bae0ccf
DL
3295#include <stdarg.h>
3296#include <stdio.h>
3297#include <sys/types.h>
3298#include <sys/stat.h>
3299/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3300struct buf { int x; };
3301FILE * (*rcsopen) (struct buf *, struct stat *, int);
3302static char *e (p, i)
3303 char **p;
3304 int i;
3305{
3306 return p[i];
3307}
3308static char *f (char * (*g) (char **, int), char **p, ...)
3309{
3310 char *s;
3311 va_list v;
3312 va_start (v,p);
3313 s = g (p, va_arg (v,int));
3314 va_end (v);
3315 return s;
3316}
3317int test (int i, double x);
3318struct s1 {int (*f) (int a);};
3319struct s2 {int (*f) (double a);};
3320int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3321int argc;
3322char **argv;
3323int
3324main ()
3325{
3326return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3327 ;
3328 return 0;
3329}
3330_ACEOF
3331# Don't try gcc -ansi; that turns off useful extensions and
3332# breaks some systems' header files.
3333# AIX -qlanglvl=ansi
3334# Ultrix and OSF/1 -std1
3335# HP-UX 10.20 and later -Ae
3336# HP-UX older versions -Aa -D_HPUX_SOURCE
3337# SVR4 -Xc -D__EXTENSIONS__
3338for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3339do
3340 CC="$ac_save_CC $ac_arg"
3341 rm -f conftest.$ac_objext
3342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3343 (eval $ac_compile) 2>&5
3344 ac_status=$?
3345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3346 (exit $ac_status); } &&
3347 { ac_try='test -s conftest.$ac_objext'
3348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3349 (eval $ac_try) 2>&5
3350 ac_status=$?
3351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3352 (exit $ac_status); }; }; then
3353 ac_cv_prog_cc_stdc=$ac_arg
3354break
3355else
3356 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3357sed 's/^/| /' conftest.$ac_ext >&5
3358
6bae0ccf
DL
3359fi
3360rm -f conftest.$ac_objext
3361done
3362rm -f conftest.$ac_ext conftest.$ac_objext
3363CC=$ac_save_CC
3364
3365fi
3366
3367case "x$ac_cv_prog_cc_stdc" in
3368 x|xno)
3369 echo "$as_me:$LINENO: result: none needed" >&5
3370echo "${ECHO_T}none needed" >&6 ;;
3371 *)
3372 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3373echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3374 CC="$CC $ac_cv_prog_cc_stdc" ;;
3375esac
3376
503d2be0
AS
3377# Some people use a C++ compiler to compile C. Since we use `exit',
3378# in C++ we need to declare it. In case someone uses the same compiler
3379# for both compiling C and C++ we need to have the C++ compiler decide
3380# the declaration of exit, since it's the most demanding environment.
3381cat >conftest.$ac_ext <<_ACEOF
3382#ifndef __cplusplus
3383 choke me
3384#endif
3385_ACEOF
3386rm -f conftest.$ac_objext
c0d27fcc 3387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3388 (eval $ac_compile) 2>&5
3389 ac_status=$?
c0d27fcc 3390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3391 (exit $ac_status); } &&
3392 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3394 (eval $ac_try) 2>&5
3395 ac_status=$?
c0d27fcc 3396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3397 (exit $ac_status); }; }; then
3398 for ac_declaration in \
849d80cf 3399 '' \
503d2be0
AS
3400 'extern "C" void std::exit (int) throw (); using std::exit;' \
3401 'extern "C" void std::exit (int); using std::exit;' \
3402 'extern "C" void exit (int) throw ();' \
3403 'extern "C" void exit (int);' \
cffcede7 3404 'void exit (int);'
503d2be0
AS
3405do
3406 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3407#line $LINENO "configure"
cd958eb3
MB
3408/* confdefs.h. */
3409_ACEOF
3410cat confdefs.h >>conftest.$ac_ext
3411cat >>conftest.$ac_ext <<_ACEOF
3412/* end confdefs.h. */
503d2be0 3413$ac_declaration
849d80cf 3414#include <stdlib.h>
503d2be0
AS
3415int
3416main ()
3417{
3418exit (42);
3419 ;
3420 return 0;
3421}
3422_ACEOF
3423rm -f conftest.$ac_objext
c0d27fcc 3424if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3425 (eval $ac_compile) 2>&5
3426 ac_status=$?
c0d27fcc 3427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3428 (exit $ac_status); } &&
3429 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3431 (eval $ac_try) 2>&5
3432 ac_status=$?
c0d27fcc 3433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3434 (exit $ac_status); }; }; then
3435 :
3436else
3437 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3438sed 's/^/| /' conftest.$ac_ext >&5
3439
503d2be0
AS
3440continue
3441fi
3442rm -f conftest.$ac_objext conftest.$ac_ext
3443 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3444#line $LINENO "configure"
cd958eb3
MB
3445/* confdefs.h. */
3446_ACEOF
3447cat confdefs.h >>conftest.$ac_ext
3448cat >>conftest.$ac_ext <<_ACEOF
3449/* end confdefs.h. */
503d2be0
AS
3450$ac_declaration
3451int
3452main ()
3453{
3454exit (42);
3455 ;
3456 return 0;
3457}
3458_ACEOF
3459rm -f conftest.$ac_objext
c0d27fcc 3460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3461 (eval $ac_compile) 2>&5
3462 ac_status=$?
c0d27fcc 3463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3464 (exit $ac_status); } &&
3465 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3467 (eval $ac_try) 2>&5
3468 ac_status=$?
c0d27fcc 3469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3470 (exit $ac_status); }; }; then
3471 break
3472else
3473 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3474sed 's/^/| /' conftest.$ac_ext >&5
3475
503d2be0
AS
3476fi
3477rm -f conftest.$ac_objext conftest.$ac_ext
3478done
3479rm -f conftest*
3480if test -n "$ac_declaration"; then
3481 echo '#ifdef __cplusplus' >>confdefs.h
3482 echo $ac_declaration >>confdefs.h
3483 echo '#endif' >>confdefs.h
3484fi
ba4481b5 3485
503d2be0
AS
3486else
3487 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3488sed 's/^/| /' conftest.$ac_ext >&5
3489
503d2be0
AS
3490fi
3491rm -f conftest.$ac_objext conftest.$ac_ext
3492ac_ext=c
3493ac_cpp='$CPP $CPPFLAGS'
3494ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3495ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3496ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3497
c0d27fcc 3498
ba4481b5
DL
3499# On Suns, sometimes $CPP names a directory.
3500if test -n "$CPP" && test -d "$CPP"; then
3501 CPP=
3502fi
3503
3504#### Some systems specify a CPP to use unless we are using GCC.
3505#### Now that we know whether we are using GCC, we can decide whether
3506#### to use that one.
3507if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3508then
3509 CPP="$NON_GNU_CPP"
3510fi
3511
3512#### Some systems specify a CC to use unless we are using GCC.
3513#### Now that we know whether we are using GCC, we can decide whether
3514#### to use that one.
3515if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3516 test x$cc_specified != xyes
3517then
3518 CC="$NON_GNU_CC"
3519fi
3520
3521if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3522then
3523 CC="$CC $GCC_TEST_OPTIONS"
3524fi
3525
3526if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3527then
3528 CC="$CC $NON_GCC_TEST_OPTIONS"
3529fi
3530
6a3a24fa 3531#### Some other nice autoconf tests.
ba4481b5 3532
c0d27fcc 3533echo "$as_me:$LINENO: checking whether ln -s works" >&5
503d2be0
AS
3534echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3535LN_S=$as_ln_s
3536if test "$LN_S" = "ln -s"; then
c0d27fcc 3537 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 3538echo "${ECHO_T}yes" >&6
ba4481b5 3539else
c0d27fcc 3540 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
503d2be0 3541echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
3542fi
3543
503d2be0
AS
3544ac_ext=c
3545ac_cpp='$CPP $CPPFLAGS'
3546ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3547ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3548ac_compiler_gnu=$ac_cv_c_compiler_gnu
c0d27fcc 3549echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
503d2be0 3550echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
3551# On Suns, sometimes $CPP names a directory.
3552if test -n "$CPP" && test -d "$CPP"; then
3553 CPP=
3554fi
3555if test -z "$CPP"; then
503d2be0
AS
3556 if test "${ac_cv_prog_CPP+set}" = set; then
3557 echo $ECHO_N "(cached) $ECHO_C" >&6
3558else
3559 # Double quotes because CPP needs to be expanded
3560 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3561 do
3562 ac_preproc_ok=false
3563for ac_c_preproc_warn_flag in '' yes
3564do
3565 # Use a header file that comes with gcc, so configuring glibc
3566 # with a fresh cross-compiler works.
9e71690e
DK
3567 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3568 # <limits.h> exists even on freestanding compilers.
ba4481b5 3569 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3570 # not just through cpp. "Syntax error" is here to catch this case.
3571 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3572#line $LINENO "configure"
cd958eb3
MB
3573/* confdefs.h. */
3574_ACEOF
3575cat confdefs.h >>conftest.$ac_ext
3576cat >>conftest.$ac_ext <<_ACEOF
3577/* end confdefs.h. */
9e71690e
DK
3578#ifdef __STDC__
3579# include <limits.h>
3580#else
3581# include <assert.h>
3582#endif
503d2be0
AS
3583 Syntax error
3584_ACEOF
c0d27fcc 3585if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3586 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3587 ac_status=$?
6bae0ccf 3588 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3589 rm -f conftest.er1
3590 cat conftest.err >&5
c0d27fcc 3591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3592 (exit $ac_status); } >/dev/null; then
3593 if test -s conftest.err; then
3594 ac_cpp_err=$ac_c_preproc_warn_flag
3595 else
3596 ac_cpp_err=
3597 fi
3598else
3599 ac_cpp_err=yes
3600fi
3601if test -z "$ac_cpp_err"; then
ba4481b5
DL
3602 :
3603else
503d2be0 3604 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3605sed 's/^/| /' conftest.$ac_ext >&5
3606
503d2be0
AS
3607 # Broken: fails on valid input.
3608continue
3609fi
3610rm -f conftest.err conftest.$ac_ext
3611
3612 # OK, works on sane cases. Now check whether non-existent headers
3613 # can be detected and how.
3614 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3615#line $LINENO "configure"
cd958eb3
MB
3616/* confdefs.h. */
3617_ACEOF
3618cat confdefs.h >>conftest.$ac_ext
3619cat >>conftest.$ac_ext <<_ACEOF
3620/* end confdefs.h. */
503d2be0
AS
3621#include <ac_nonexistent.h>
3622_ACEOF
c0d27fcc 3623if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3624 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3625 ac_status=$?
6bae0ccf 3626 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3627 rm -f conftest.er1
3628 cat conftest.err >&5
c0d27fcc 3629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3630 (exit $ac_status); } >/dev/null; then
3631 if test -s conftest.err; then
3632 ac_cpp_err=$ac_c_preproc_warn_flag
3633 else
3634 ac_cpp_err=
3635 fi
3636else
3637 ac_cpp_err=yes
3638fi
3639if test -z "$ac_cpp_err"; then
3640 # Broken: success on invalid input.
3641continue
c4bb2108 3642else
503d2be0 3643 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3644sed 's/^/| /' conftest.$ac_ext >&5
3645
503d2be0
AS
3646 # Passes both tests.
3647ac_preproc_ok=:
3648break
3649fi
3650rm -f conftest.err conftest.$ac_ext
3651
3652done
3653# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3654rm -f conftest.err conftest.$ac_ext
3655if $ac_preproc_ok; then
3656 break
3657fi
3658
3659 done
3660 ac_cv_prog_CPP=$CPP
3661
3662fi
3663 CPP=$ac_cv_prog_CPP
3664else
3665 ac_cv_prog_CPP=$CPP
3666fi
c0d27fcc 3667echo "$as_me:$LINENO: result: $CPP" >&5
503d2be0
AS
3668echo "${ECHO_T}$CPP" >&6
3669ac_preproc_ok=false
3670for ac_c_preproc_warn_flag in '' yes
3671do
3672 # Use a header file that comes with gcc, so configuring glibc
3673 # with a fresh cross-compiler works.
9e71690e
DK
3674 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3675 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
3676 # On the NeXT, cc -E runs the code through the compiler's parser,
3677 # not just through cpp. "Syntax error" is here to catch this case.
3678 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3679#line $LINENO "configure"
cd958eb3
MB
3680/* confdefs.h. */
3681_ACEOF
3682cat confdefs.h >>conftest.$ac_ext
3683cat >>conftest.$ac_ext <<_ACEOF
3684/* end confdefs.h. */
9e71690e
DK
3685#ifdef __STDC__
3686# include <limits.h>
3687#else
3688# include <assert.h>
3689#endif
503d2be0
AS
3690 Syntax error
3691_ACEOF
c0d27fcc 3692if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3693 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3694 ac_status=$?
6bae0ccf 3695 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3696 rm -f conftest.er1
3697 cat conftest.err >&5
c0d27fcc 3698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3699 (exit $ac_status); } >/dev/null; then
3700 if test -s conftest.err; then
3701 ac_cpp_err=$ac_c_preproc_warn_flag
3702 else
3703 ac_cpp_err=
3704 fi
3705else
3706 ac_cpp_err=yes
3707fi
3708if test -z "$ac_cpp_err"; then
ba4481b5
DL
3709 :
3710else
503d2be0 3711 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3712sed 's/^/| /' conftest.$ac_ext >&5
3713
503d2be0
AS
3714 # Broken: fails on valid input.
3715continue
3716fi
3717rm -f conftest.err conftest.$ac_ext
3718
3719 # OK, works on sane cases. Now check whether non-existent headers
3720 # can be detected and how.
3721 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3722#line $LINENO "configure"
cd958eb3
MB
3723/* confdefs.h. */
3724_ACEOF
3725cat confdefs.h >>conftest.$ac_ext
3726cat >>conftest.$ac_ext <<_ACEOF
3727/* end confdefs.h. */
503d2be0
AS
3728#include <ac_nonexistent.h>
3729_ACEOF
c0d27fcc 3730if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3731 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3732 ac_status=$?
6bae0ccf 3733 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3734 rm -f conftest.er1
3735 cat conftest.err >&5
c0d27fcc 3736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3737 (exit $ac_status); } >/dev/null; then
3738 if test -s conftest.err; then
3739 ac_cpp_err=$ac_c_preproc_warn_flag
3740 else
3741 ac_cpp_err=
3742 fi
3743else
3744 ac_cpp_err=yes
c4bb2108 3745fi
503d2be0
AS
3746if test -z "$ac_cpp_err"; then
3747 # Broken: success on invalid input.
3748continue
3749else
3750 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3751sed 's/^/| /' conftest.$ac_ext >&5
3752
503d2be0
AS
3753 # Passes both tests.
3754ac_preproc_ok=:
3755break
ba4481b5 3756fi
503d2be0
AS
3757rm -f conftest.err conftest.$ac_ext
3758
3759done
3760# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3761rm -f conftest.err conftest.$ac_ext
3762if $ac_preproc_ok; then
3763 :
ba4481b5 3764else
cd958eb3
MB
3765 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3766See \`config.log' for more details." >&5
3767echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3768See \`config.log' for more details." >&2;}
503d2be0 3769 { (exit 1); exit 1; }; }
ba4481b5 3770fi
503d2be0
AS
3771
3772ac_ext=c
3773ac_cpp='$CPP $CPPFLAGS'
3774ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3775ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3776ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3777
3778# Find a good install program. We prefer a C program (faster),
3779# so one script is as good as another. But avoid the broken or
3780# incompatible versions:
3781# SysV /etc/install, /usr/sbin/install
3782# SunOS /usr/etc/install
3783# IRIX /sbin/install
3784# AIX /bin/install
503d2be0 3785# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3786# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3787# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3788# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3789# ./install, which can be erroneously created by make from ./install.sh.
c0d27fcc
MR
3790echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3791echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
ba4481b5 3792if test -z "$INSTALL"; then
503d2be0
AS
3793if test "${ac_cv_path_install+set}" = set; then
3794 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3795else
c0d27fcc
MR
3796 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3797for as_dir in $PATH
3798do
3799 IFS=$as_save_IFS
3800 test -z "$as_dir" && as_dir=.
3801 # Account for people who put trailing slashes in PATH elements.
3802case $as_dir/ in
3803 ./ | .// | /cC/* | \
3804 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3805 /usr/ucb/* ) ;;
3806 *)
3807 # OSF1 and SCO ODT 3.0 have their own names for install.
3808 # Don't use installbsd from OSF since it installs stuff as root
3809 # by default.
3810 for ac_prog in ginstall scoinst install; do
3811 for ac_exec_ext in '' $ac_executable_extensions; do
3812 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3813 if test $ac_prog = install &&
3814 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3815 # AIX install. It has an incompatible calling convention.
3816 :
3817 elif test $ac_prog = install &&
3818 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3819 # program-specific install script used by HP pwplus--don't use.
3820 :
3821 else
3822 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3823 break 3
3824 fi
3825 fi
ba4481b5 3826 done
c0d27fcc
MR
3827 done
3828 ;;
3829esac
3830done
3831
ba4481b5
DL
3832
3833fi
3834 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3835 INSTALL=$ac_cv_path_install
ba4481b5
DL
3836 else
3837 # As a last resort, use the slow shell script. We don't cache a
3838 # path for INSTALL within a source directory, because that will
3839 # break other packages using the cache if that directory is
3840 # removed, or if the path is relative.
503d2be0 3841 INSTALL=$ac_install_sh
ba4481b5
DL
3842 fi
3843fi
c0d27fcc 3844echo "$as_me:$LINENO: result: $INSTALL" >&5
503d2be0 3845echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3846
3847# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3848# It thinks the first close brace ends the variable substitution.
3849test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3850
503d2be0 3851test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3852
ba4481b5
DL
3853test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3854
c0d27fcc
MR
3855if test "x$RANLIB" = x; then
3856 if test -n "$ac_tool_prefix"; then
3857 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3858set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3859echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0 3860echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c0d27fcc 3861if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 3862 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3863else
3864 if test -n "$RANLIB"; then
3865 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3866else
c0d27fcc
MR
3867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3868for as_dir in $PATH
3869do
3870 IFS=$as_save_IFS
3871 test -z "$as_dir" && as_dir=.
3872 for ac_exec_ext in '' $ac_executable_extensions; do
3873 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3874 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3875 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3876 break 2
3877 fi
3878done
503d2be0
AS
3879done
3880
7397acc4
DL
3881fi
3882fi
503d2be0 3883RANLIB=$ac_cv_prog_RANLIB
7397acc4 3884if test -n "$RANLIB"; then
c0d27fcc 3885 echo "$as_me:$LINENO: result: $RANLIB" >&5
503d2be0
AS
3886echo "${ECHO_T}$RANLIB" >&6
3887else
c0d27fcc 3888 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
3889echo "${ECHO_T}no" >&6
3890fi
3891
3892fi
3893if test -z "$ac_cv_prog_RANLIB"; then
3894 ac_ct_RANLIB=$RANLIB
3895 # Extract the first word of "ranlib", so it can be a program name with args.
3896set dummy ranlib; ac_word=$2
c0d27fcc 3897echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
3898echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3899if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3900 echo $ECHO_N "(cached) $ECHO_C" >&6
3901else
3902 if test -n "$ac_ct_RANLIB"; then
3903 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3904else
c0d27fcc
MR
3905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3906for as_dir in $PATH
3907do
3908 IFS=$as_save_IFS
3909 test -z "$as_dir" && as_dir=.
3910 for ac_exec_ext in '' $ac_executable_extensions; do
3911 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3912 ac_cv_prog_ac_ct_RANLIB="ranlib"
3913 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3914 break 2
3915 fi
3916done
503d2be0
AS
3917done
3918
3919 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3920fi
3921fi
3922ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3923if test -n "$ac_ct_RANLIB"; then
c0d27fcc 3924 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
503d2be0
AS
3925echo "${ECHO_T}$ac_ct_RANLIB" >&6
3926else
c0d27fcc 3927 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
3928echo "${ECHO_T}no" >&6
3929fi
3930
3931 RANLIB=$ac_ct_RANLIB
7397acc4 3932else
503d2be0 3933 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
3934fi
3935
3936fi
9e71690e
DK
3937# Extract the first word of "install-info", so it can be a program name with args.
3938set dummy install-info; ac_word=$2
3939echo "$as_me:$LINENO: checking for $ac_word" >&5
3940echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3941if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
3942 echo $ECHO_N "(cached) $ECHO_C" >&6
3943else
3944 case $INSTALL_INFO in
3945 [\\/]* | ?:[\\/]*)
3946 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
3947 ;;
3948 *)
3949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3950for as_dir in $PATH
3951do
3952 IFS=$as_save_IFS
3953 test -z "$as_dir" && as_dir=.
3954 for ac_exec_ext in '' $ac_executable_extensions; do
3955 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3956 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
3957 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3958 break 2
3959 fi
3960done
3961done
3962
3963 ;;
3964esac
3965fi
3966INSTALL_INFO=$ac_cv_path_INSTALL_INFO
3967
3968if test -n "$INSTALL_INFO"; then
3969 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
3970echo "${ECHO_T}$INSTALL_INFO" >&6
3971else
3972 echo "$as_me:$LINENO: result: no" >&5
3973echo "${ECHO_T}no" >&6
3974fi
3975
3976# Extract the first word of "install-info", so it can be a program name with args.
3977set dummy install-info; ac_word=$2
3978echo "$as_me:$LINENO: checking for $ac_word" >&5
3979echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3980if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
3981 echo $ECHO_N "(cached) $ECHO_C" >&6
3982else
3983 case $INSTALL_INFO in
3984 [\\/]* | ?:[\\/]*)
3985 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
3986 ;;
3987 *)
3988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3989for as_dir in /usr/sbin
3990do
3991 IFS=$as_save_IFS
3992 test -z "$as_dir" && as_dir=.
3993 for ac_exec_ext in '' $ac_executable_extensions; do
3994 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3995 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
3996 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3997 break 2
3998 fi
3999done
4000done
4001
4002 ;;
4003esac
4004fi
4005INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4006
4007if test -n "$INSTALL_INFO"; then
4008 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4009echo "${ECHO_T}$INSTALL_INFO" >&6
4010else
4011 echo "$as_me:$LINENO: result: no" >&5
4012echo "${ECHO_T}no" >&6
4013fi
4014
4015# Extract the first word of "install-info", so it can be a program name with args.
4016set dummy install-info; ac_word=$2
4017echo "$as_me:$LINENO: checking for $ac_word" >&5
4018echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4019if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4020 echo $ECHO_N "(cached) $ECHO_C" >&6
4021else
4022 case $INSTALL_INFO in
4023 [\\/]* | ?:[\\/]*)
4024 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4025 ;;
4026 *)
4027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4028for as_dir in /sbin
4029do
4030 IFS=$as_save_IFS
4031 test -z "$as_dir" && as_dir=.
4032 for ac_exec_ext in '' $ac_executable_extensions; do
4033 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4034 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4035 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4036 break 2
4037 fi
4038done
4039done
4040
4041 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4042 ;;
4043esac
4044fi
4045INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4046
4047if test -n "$INSTALL_INFO"; then
4048 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4049echo "${ECHO_T}$INSTALL_INFO" >&6
4050else
4051 echo "$as_me:$LINENO: result: no" >&5
4052echo "${ECHO_T}no" >&6
4053fi
4054
ba4481b5 4055
c0d27fcc 4056
8e967cf7
MR
4057if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4058then
4059 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4060fi
4061
4062if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4063then
4064 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4065fi
4066
c0d27fcc
MR
4067
4068
6bae0ccf
DL
4069echo "$as_me:$LINENO: checking for egrep" >&5
4070echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4071if test "${ac_cv_prog_egrep+set}" = set; then
4072 echo $ECHO_N "(cached) $ECHO_C" >&6
4073else
4074 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4075 then ac_cv_prog_egrep='grep -E'
4076 else ac_cv_prog_egrep='egrep'
4077 fi
4078fi
4079echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4080echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4081 EGREP=$ac_cv_prog_egrep
4082
4083
c0d27fcc
MR
4084
4085echo "$as_me:$LINENO: checking for AIX" >&5
503d2be0
AS
4086echo $ECHO_N "checking for AIX... $ECHO_C" >&6
4087cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4088#line $LINENO "configure"
cd958eb3
MB
4089/* confdefs.h. */
4090_ACEOF
4091cat confdefs.h >>conftest.$ac_ext
4092cat >>conftest.$ac_ext <<_ACEOF
4093/* end confdefs.h. */
ba4481b5
DL
4094#ifdef _AIX
4095 yes
4096#endif
4097
503d2be0 4098_ACEOF
ba4481b5 4099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4100 $EGREP "yes" >/dev/null 2>&1; then
c0d27fcc 4101 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 4102echo "${ECHO_T}yes" >&6
c0d27fcc 4103cat >>confdefs.h <<\_ACEOF
ba4481b5 4104#define _ALL_SOURCE 1
c0d27fcc 4105_ACEOF
ba4481b5
DL
4106
4107else
c0d27fcc 4108 echo "$as_me:$LINENO: result: no" >&5
503d2be0 4109echo "${ECHO_T}no" >&6
ba4481b5
DL
4110fi
4111rm -f conftest*
4112
c0d27fcc
MR
4113
4114
3b33a005
DL
4115#### Extract some information from the operating system and machine files.
4116
c0d27fcc 4117{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 4118 - which libraries the lib-src programs will want, and
503d2be0
AS
4119 - whether the GNU malloc routines are usable..." >&5
4120echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 4121 - which libraries the lib-src programs will want, and
503d2be0 4122 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
4123
4124### First figure out CFLAGS (which we use for running the compiler here)
4125### and REAL_CFLAGS (which we use for real compilation).
4126### The two are the same except on a few systems, where they are made
4127### different to work around various lossages. For example,
4128### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
4129### as implying static linking.
4130
4131### If the CFLAGS env var is specified, we use that value
4132### instead of the default.
4133
4134### It's not important that this name contain the PID; you can't run
4135### two configures in the same directory and have anything work
4136### anyway.
4137tempcname="conftest.c"
4138
4139echo '
4140#include "'${srcdir}'/src/'${opsysfile}'"
4141#include "'${srcdir}'/src/'${machfile}'"
4142#ifndef LIBS_MACHINE
4143#define LIBS_MACHINE
4144#endif
4145#ifndef LIBS_SYSTEM
4146#define LIBS_SYSTEM
4147#endif
4148#ifndef C_SWITCH_SYSTEM
4149#define C_SWITCH_SYSTEM
4150#endif
4151#ifndef C_SWITCH_MACHINE
4152#define C_SWITCH_MACHINE
4153#endif
4154configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
4155configure___ c_switch_system=C_SWITCH_SYSTEM
4156configure___ c_switch_machine=C_SWITCH_MACHINE
4157
4158#ifndef LIB_X11_LIB
4159#define LIB_X11_LIB -lX11
4160#endif
4161
4162#ifndef LIBX11_MACHINE
4163#define LIBX11_MACHINE
4164#endif
4165
4166#ifndef LIBX11_SYSTEM
4167#define LIBX11_SYSTEM
4168#endif
4169configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
4170
4171#ifdef UNEXEC
4172configure___ unexec=UNEXEC
4173#else
4174configure___ unexec=unexec.o
4175#endif
4176
4177#ifdef SYSTEM_MALLOC
4178configure___ system_malloc=yes
4179#else
4180configure___ system_malloc=no
4181#endif
4182
ef9e4345
GM
4183#ifdef USE_MMAP_FOR_BUFFERS
4184configure___ use_mmap_for_buffers=yes
73b77ee5 4185#else
ef9e4345 4186configure___ use_mmap_for_buffers=no
73b77ee5
GM
4187#endif
4188
3b33a005
DL
4189#ifndef C_DEBUG_SWITCH
4190#define C_DEBUG_SWITCH -g
4191#endif
4192
4193#ifndef C_OPTIMIZE_SWITCH
4194#ifdef __GNUC__
4195#define C_OPTIMIZE_SWITCH -O2
4196#else
4197#define C_OPTIMIZE_SWITCH -O
4198#endif
4199#endif
4200
4201#ifndef LD_SWITCH_MACHINE
4202#define LD_SWITCH_MACHINE
4203#endif
4204
4205#ifndef LD_SWITCH_SYSTEM
4206#define LD_SWITCH_SYSTEM
4207#endif
4208
4209#ifndef LD_SWITCH_X_SITE_AUX
4210#define LD_SWITCH_X_SITE_AUX
503d2be0 4211#endif
3b33a005
DL
4212
4213configure___ ld_switch_system=LD_SWITCH_SYSTEM
4214configure___ ld_switch_machine=LD_SWITCH_MACHINE
4215
4216#ifdef THIS_IS_CONFIGURE
4217
4218/* Get the CFLAGS for tests in configure. */
4219#ifdef __GNUC__
4220configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4221#else
4222configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4223#endif
4224
4225#else /* not THIS_IS_CONFIGURE */
4226
4227/* Get the CFLAGS for real compilation. */
4228#ifdef __GNUC__
4229configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4230#else
4231configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4232#endif
4233
4234#endif /* not THIS_IS_CONFIGURE */
4235' > ${tempcname}
4236
4237# The value of CPP is a quoted variable reference, so we need to do this
4238# to get its actual value...
4239CPP=`eval "echo $CPP"`
4240eval `${CPP} -Isrc ${tempcname} \
4241 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4242if test "x$SPECIFIED_CFLAGS" = x; then
4243 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
4244 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4245else
4246 REAL_CFLAGS="$CFLAGS"
4247fi
4248rm ${tempcname}
4249
4250ac_link="$ac_link $ld_switch_machine $ld_switch_system"
4251
4252### Make sure subsequent tests use flags consistent with the build flags.
4253
4254if test x"${OVERRIDE_CPPFLAGS}" != x; then
4255 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
4256else
4257 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
4258fi
4259
6bae0ccf
DL
4260
4261
22044edf
DL
4262
4263cat >>confdefs.h <<\_ACEOF
4264#define _GNU_SOURCE 1
4265_ACEOF
4266
4267
4268
503d2be0 4269# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
4270if test "${enable_largefile+set}" = set; then
4271 enableval="$enable_largefile"
f4988be7 4272
503d2be0
AS
4273fi;
4274if test "$enable_largefile" != no; then
f4988be7 4275
c0d27fcc 4276 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
503d2be0
AS
4277echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4278if test "${ac_cv_sys_largefile_CC+set}" = set; then
4279 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4280else
f4988be7 4281 ac_cv_sys_largefile_CC=no
503d2be0
AS
4282 if test "$GCC" != yes; then
4283 ac_save_CC=$CC
4284 while :; do
4285 # IRIX 6.2 and later do not support large files by default,
4286 # so use the C compiler's -n32 option if that helps.
4287 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4288#line $LINENO "configure"
cd958eb3
MB
4289/* confdefs.h. */
4290_ACEOF
4291cat confdefs.h >>conftest.$ac_ext
4292cat >>conftest.$ac_ext <<_ACEOF
4293/* end confdefs.h. */
f4988be7 4294#include <sys/types.h>
503d2be0
AS
4295 /* Check that off_t can represent 2**63 - 1 correctly.
4296 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4297 since some C++ compilers masquerading as C compilers
4298 incorrectly reject 9223372036854775807. */
4299#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4300 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4301 && LARGE_OFF_T % 2147483647 == 1)
4302 ? 1 : -1];
4303int
4304main ()
4305{
f4988be7 4306
503d2be0
AS
4307 ;
4308 return 0;
4309}
4310_ACEOF
4311 rm -f conftest.$ac_objext
c0d27fcc 4312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4313 (eval $ac_compile) 2>&5
4314 ac_status=$?
c0d27fcc 4315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4316 (exit $ac_status); } &&
4317 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4319 (eval $ac_try) 2>&5
4320 ac_status=$?
c0d27fcc 4321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4322 (exit $ac_status); }; }; then
4323 break
b192d653 4324else
503d2be0 4325 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4326sed 's/^/| /' conftest.$ac_ext >&5
4327
503d2be0
AS
4328fi
4329rm -f conftest.$ac_objext
4330 CC="$CC -n32"
4331 rm -f conftest.$ac_objext
c0d27fcc 4332if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4333 (eval $ac_compile) 2>&5
4334 ac_status=$?
c0d27fcc 4335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4336 (exit $ac_status); } &&
4337 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4339 (eval $ac_try) 2>&5
4340 ac_status=$?
c0d27fcc 4341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4342 (exit $ac_status); }; }; then
4343 ac_cv_sys_largefile_CC=' -n32'; break
4344else
4345 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4346sed 's/^/| /' conftest.$ac_ext >&5
4347
503d2be0
AS
4348fi
4349rm -f conftest.$ac_objext
4350 break
4351 done
4352 CC=$ac_save_CC
4353 rm -f conftest.$ac_ext
4354 fi
b192d653 4355fi
c0d27fcc 4356echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
4357echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4358 if test "$ac_cv_sys_largefile_CC" != no; then
4359 CC=$CC$ac_cv_sys_largefile_CC
4360 fi
b192d653 4361
c0d27fcc 4362 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
4363echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4364if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4365 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4366else
503d2be0 4367 while :; do
f4988be7 4368 ac_cv_sys_file_offset_bits=no
503d2be0 4369 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4370#line $LINENO "configure"
cd958eb3
MB
4371/* confdefs.h. */
4372_ACEOF
4373cat confdefs.h >>conftest.$ac_ext
4374cat >>conftest.$ac_ext <<_ACEOF
4375/* end confdefs.h. */
f4988be7 4376#include <sys/types.h>
503d2be0
AS
4377 /* Check that off_t can represent 2**63 - 1 correctly.
4378 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4379 since some C++ compilers masquerading as C compilers
4380 incorrectly reject 9223372036854775807. */
4381#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4382 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4383 && LARGE_OFF_T % 2147483647 == 1)
4384 ? 1 : -1];
4385int
4386main ()
4387{
f4988be7 4388
503d2be0
AS
4389 ;
4390 return 0;
4391}
4392_ACEOF
4393rm -f conftest.$ac_objext
c0d27fcc 4394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4395 (eval $ac_compile) 2>&5
4396 ac_status=$?
c0d27fcc 4397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4398 (exit $ac_status); } &&
4399 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4401 (eval $ac_try) 2>&5
4402 ac_status=$?
c0d27fcc 4403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4404 (exit $ac_status); }; }; then
4405 break
f4988be7 4406else
503d2be0 4407 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4408sed 's/^/| /' conftest.$ac_ext >&5
4409
503d2be0
AS
4410fi
4411rm -f conftest.$ac_objext conftest.$ac_ext
4412 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4413#line $LINENO "configure"
cd958eb3
MB
4414/* confdefs.h. */
4415_ACEOF
4416cat confdefs.h >>conftest.$ac_ext
4417cat >>conftest.$ac_ext <<_ACEOF
4418/* end confdefs.h. */
f4988be7
GM
4419#define _FILE_OFFSET_BITS 64
4420#include <sys/types.h>
503d2be0
AS
4421 /* Check that off_t can represent 2**63 - 1 correctly.
4422 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4423 since some C++ compilers masquerading as C compilers
4424 incorrectly reject 9223372036854775807. */
4425#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4426 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4427 && LARGE_OFF_T % 2147483647 == 1)
4428 ? 1 : -1];
4429int
4430main ()
4431{
4432
4433 ;
4434 return 0;
4435}
4436_ACEOF
4437rm -f conftest.$ac_objext
c0d27fcc 4438if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4439 (eval $ac_compile) 2>&5
4440 ac_status=$?
c0d27fcc 4441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4442 (exit $ac_status); } &&
4443 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4445 (eval $ac_try) 2>&5
4446 ac_status=$?
c0d27fcc 4447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4448 (exit $ac_status); }; }; then
4449 ac_cv_sys_file_offset_bits=64; break
4450else
4451 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4452sed 's/^/| /' conftest.$ac_ext >&5
4453
503d2be0
AS
4454fi
4455rm -f conftest.$ac_objext conftest.$ac_ext
4456 break
4457done
ba4481b5 4458fi
c0d27fcc 4459echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
4460echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
4461if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 4462
c0d27fcc 4463cat >>confdefs.h <<_ACEOF
f4988be7 4464#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 4465_ACEOF
f4988be7 4466
503d2be0
AS
4467fi
4468rm -f conftest*
c0d27fcc 4469 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
4470echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
4471if test "${ac_cv_sys_large_files+set}" = set; then
4472 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4473else
503d2be0 4474 while :; do
f4988be7 4475 ac_cv_sys_large_files=no
503d2be0 4476 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4477#line $LINENO "configure"
cd958eb3
MB
4478/* confdefs.h. */
4479_ACEOF
4480cat confdefs.h >>conftest.$ac_ext
4481cat >>conftest.$ac_ext <<_ACEOF
4482/* end confdefs.h. */
503d2be0
AS
4483#include <sys/types.h>
4484 /* Check that off_t can represent 2**63 - 1 correctly.
4485 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4486 since some C++ compilers masquerading as C compilers
4487 incorrectly reject 9223372036854775807. */
4488#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4489 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4490 && LARGE_OFF_T % 2147483647 == 1)
4491 ? 1 : -1];
4492int
4493main ()
4494{
ba4481b5 4495
503d2be0
AS
4496 ;
4497 return 0;
4498}
4499_ACEOF
4500rm -f conftest.$ac_objext
c0d27fcc 4501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4502 (eval $ac_compile) 2>&5
4503 ac_status=$?
c0d27fcc 4504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4505 (exit $ac_status); } &&
4506 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4508 (eval $ac_try) 2>&5
4509 ac_status=$?
c0d27fcc 4510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4511 (exit $ac_status); }; }; then
4512 break
ba4481b5 4513else
503d2be0 4514 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4515sed 's/^/| /' conftest.$ac_ext >&5
4516
503d2be0
AS
4517fi
4518rm -f conftest.$ac_objext conftest.$ac_ext
4519 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4520#line $LINENO "configure"
cd958eb3
MB
4521/* confdefs.h. */
4522_ACEOF
4523cat confdefs.h >>conftest.$ac_ext
4524cat >>conftest.$ac_ext <<_ACEOF
4525/* end confdefs.h. */
f4988be7 4526#define _LARGE_FILES 1
503d2be0
AS
4527#include <sys/types.h>
4528 /* Check that off_t can represent 2**63 - 1 correctly.
4529 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4530 since some C++ compilers masquerading as C compilers
4531 incorrectly reject 9223372036854775807. */
4532#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4533 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4534 && LARGE_OFF_T % 2147483647 == 1)
4535 ? 1 : -1];
4536int
4537main ()
4538{
f4988be7 4539
503d2be0
AS
4540 ;
4541 return 0;
4542}
4543_ACEOF
4544rm -f conftest.$ac_objext
c0d27fcc 4545if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4546 (eval $ac_compile) 2>&5
4547 ac_status=$?
c0d27fcc 4548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4549 (exit $ac_status); } &&
4550 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4552 (eval $ac_try) 2>&5
4553 ac_status=$?
c0d27fcc 4554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4555 (exit $ac_status); }; }; then
4556 ac_cv_sys_large_files=1; break
4557else
4558 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4559sed 's/^/| /' conftest.$ac_ext >&5
4560
503d2be0
AS
4561fi
4562rm -f conftest.$ac_objext conftest.$ac_ext
4563 break
4564done
ba4481b5 4565fi
c0d27fcc 4566echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
4567echo "${ECHO_T}$ac_cv_sys_large_files" >&6
4568if test "$ac_cv_sys_large_files" != no; then
ba4481b5 4569
c0d27fcc 4570cat >>confdefs.h <<_ACEOF
f4988be7 4571#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 4572_ACEOF
ba4481b5 4573
503d2be0
AS
4574fi
4575rm -f conftest*
4576fi
ba4481b5 4577
c0d27fcc 4578
2c9dccc9
PJ
4579if test "${with_sound}" != "no"; then
4580 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
4581 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4582echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4583if test "${ac_cv_header_stdc+set}" = set; then
4584 echo $ECHO_N "(cached) $ECHO_C" >&6
4585else
4586 cat >conftest.$ac_ext <<_ACEOF
4587#line $LINENO "configure"
cd958eb3
MB
4588/* confdefs.h. */
4589_ACEOF
4590cat confdefs.h >>conftest.$ac_ext
4591cat >>conftest.$ac_ext <<_ACEOF
4592/* end confdefs.h. */
c0d27fcc
MR
4593#include <stdlib.h>
4594#include <stdarg.h>
4595#include <string.h>
4596#include <float.h>
98418dba 4597
cd958eb3
MB
4598int
4599main ()
4600{
4601
4602 ;
4603 return 0;
4604}
c0d27fcc 4605_ACEOF
cd958eb3
MB
4606rm -f conftest.$ac_objext
4607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4608 (eval $ac_compile) 2>&5
c0d27fcc 4609 ac_status=$?
c0d27fcc 4610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
cd958eb3
MB
4611 (exit $ac_status); } &&
4612 { ac_try='test -s conftest.$ac_objext'
4613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4614 (eval $ac_try) 2>&5
4615 ac_status=$?
4616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4617 (exit $ac_status); }; }; then
c0d27fcc
MR
4618 ac_cv_header_stdc=yes
4619else
4620 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4621sed 's/^/| /' conftest.$ac_ext >&5
4622
4623ac_cv_header_stdc=no
c0d27fcc 4624fi
cd958eb3 4625rm -f conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4626
4627if test $ac_cv_header_stdc = yes; then
4628 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4629 cat >conftest.$ac_ext <<_ACEOF
4630#line $LINENO "configure"
cd958eb3
MB
4631/* confdefs.h. */
4632_ACEOF
4633cat confdefs.h >>conftest.$ac_ext
4634cat >>conftest.$ac_ext <<_ACEOF
4635/* end confdefs.h. */
c0d27fcc
MR
4636#include <string.h>
4637
4638_ACEOF
4639if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4640 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
4641 :
4642else
4643 ac_cv_header_stdc=no
4644fi
4645rm -f conftest*
4646
4647fi
4648
4649if test $ac_cv_header_stdc = yes; then
4650 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4651 cat >conftest.$ac_ext <<_ACEOF
4652#line $LINENO "configure"
cd958eb3
MB
4653/* confdefs.h. */
4654_ACEOF
4655cat confdefs.h >>conftest.$ac_ext
4656cat >>conftest.$ac_ext <<_ACEOF
4657/* end confdefs.h. */
c0d27fcc
MR
4658#include <stdlib.h>
4659
4660_ACEOF
4661if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4662 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
4663 :
4664else
4665 ac_cv_header_stdc=no
4666fi
4667rm -f conftest*
4668
4669fi
4670
4671if test $ac_cv_header_stdc = yes; then
4672 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4673 if test "$cross_compiling" = yes; then
4674 :
4675else
4676 cat >conftest.$ac_ext <<_ACEOF
4677#line $LINENO "configure"
cd958eb3
MB
4678/* confdefs.h. */
4679_ACEOF
4680cat confdefs.h >>conftest.$ac_ext
4681cat >>conftest.$ac_ext <<_ACEOF
4682/* end confdefs.h. */
c0d27fcc
MR
4683#include <ctype.h>
4684#if ((' ' & 0x0FF) == 0x020)
4685# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4686# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4687#else
cd958eb3
MB
4688# define ISLOWER(c) \
4689 (('a' <= (c) && (c) <= 'i') \
c0d27fcc
MR
4690 || ('j' <= (c) && (c) <= 'r') \
4691 || ('s' <= (c) && (c) <= 'z'))
4692# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4693#endif
4694
4695#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4696int
4697main ()
4698{
4699 int i;
4700 for (i = 0; i < 256; i++)
4701 if (XOR (islower (i), ISLOWER (i))
4702 || toupper (i) != TOUPPER (i))
4703 exit(2);
4704 exit (0);
4705}
4706_ACEOF
4707rm -f conftest$ac_exeext
4708if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4709 (eval $ac_link) 2>&5
4710 ac_status=$?
4711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4712 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4714 (eval $ac_try) 2>&5
4715 ac_status=$?
4716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4717 (exit $ac_status); }; }; then
4718 :
4719else
4720 echo "$as_me: program exited with status $ac_status" >&5
4721echo "$as_me: failed program was:" >&5
cd958eb3
MB
4722sed 's/^/| /' conftest.$ac_ext >&5
4723
c0d27fcc
MR
4724( exit $ac_status )
4725ac_cv_header_stdc=no
4726fi
6bae0ccf 4727rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4728fi
4729fi
4730fi
4731echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4732echo "${ECHO_T}$ac_cv_header_stdc" >&6
4733if test $ac_cv_header_stdc = yes; then
4734
4735cat >>confdefs.h <<\_ACEOF
4736#define STDC_HEADERS 1
4737_ACEOF
4738
4739fi
4740
4741# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4752 inttypes.h stdint.h unistd.h
98418dba
CW
4753do
4754as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc 4755echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
4756echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4757if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 4758 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4759else
925c2f3f 4760 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4761#line $LINENO "configure"
cd958eb3
MB
4762/* confdefs.h. */
4763_ACEOF
4764cat confdefs.h >>conftest.$ac_ext
4765cat >>conftest.$ac_ext <<_ACEOF
4766/* end confdefs.h. */
c0d27fcc
MR
4767$ac_includes_default
4768
4769#include <$ac_header>
4770_ACEOF
4771rm -f conftest.$ac_objext
4772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4773 (eval $ac_compile) 2>&5
4774 ac_status=$?
4775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4776 (exit $ac_status); } &&
4777 { ac_try='test -s conftest.$ac_objext'
4778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4779 (eval $ac_try) 2>&5
4780 ac_status=$?
4781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4782 (exit $ac_status); }; }; then
4783 eval "$as_ac_Header=yes"
4784else
4785 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4786sed 's/^/| /' conftest.$ac_ext >&5
4787
c0d27fcc
MR
4788eval "$as_ac_Header=no"
4789fi
4790rm -f conftest.$ac_objext conftest.$ac_ext
4791fi
4792echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4793echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4794if test `eval echo '${'$as_ac_Header'}'` = yes; then
4795 cat >>confdefs.h <<_ACEOF
4796#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4797_ACEOF
4798
4799fi
4800
4801done
4802
4803
4804
4805
4806
4807for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
4808do
4809as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4810if eval "test \"\${$as_ac_Header+set}\" = set"; then
4811 echo "$as_me:$LINENO: checking for $ac_header" >&5
4812echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4813if eval "test \"\${$as_ac_Header+set}\" = set"; then
4814 echo $ECHO_N "(cached) $ECHO_C" >&6
4815fi
4816echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4817echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4818else
4819 # Is the header compilable?
4820echo "$as_me:$LINENO: checking $ac_header usability" >&5
4821echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4822cat >conftest.$ac_ext <<_ACEOF
4823#line $LINENO "configure"
cd958eb3
MB
4824/* confdefs.h. */
4825_ACEOF
4826cat confdefs.h >>conftest.$ac_ext
4827cat >>conftest.$ac_ext <<_ACEOF
4828/* end confdefs.h. */
c0d27fcc 4829$ac_includes_default
98418dba 4830#include <$ac_header>
503d2be0 4831_ACEOF
c0d27fcc
MR
4832rm -f conftest.$ac_objext
4833if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4834 (eval $ac_compile) 2>&5
4835 ac_status=$?
4836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4837 (exit $ac_status); } &&
4838 { ac_try='test -s conftest.$ac_objext'
4839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4840 (eval $ac_try) 2>&5
4841 ac_status=$?
4842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4843 (exit $ac_status); }; }; then
4844 ac_header_compiler=yes
4845else
4846 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4847sed 's/^/| /' conftest.$ac_ext >&5
4848
c0d27fcc
MR
4849ac_header_compiler=no
4850fi
4851rm -f conftest.$ac_objext conftest.$ac_ext
4852echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4853echo "${ECHO_T}$ac_header_compiler" >&6
4854
4855# Is the header present?
4856echo "$as_me:$LINENO: checking $ac_header presence" >&5
4857echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4858cat >conftest.$ac_ext <<_ACEOF
4859#line $LINENO "configure"
cd958eb3
MB
4860/* confdefs.h. */
4861_ACEOF
4862cat confdefs.h >>conftest.$ac_ext
4863cat >>conftest.$ac_ext <<_ACEOF
4864/* end confdefs.h. */
c0d27fcc
MR
4865#include <$ac_header>
4866_ACEOF
4867if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 4868 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 4869 ac_status=$?
6bae0ccf 4870 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
4871 rm -f conftest.er1
4872 cat conftest.err >&5
c0d27fcc 4873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
4874 (exit $ac_status); } >/dev/null; then
4875 if test -s conftest.err; then
4876 ac_cpp_err=$ac_c_preproc_warn_flag
4877 else
4878 ac_cpp_err=
4879 fi
4880else
4881 ac_cpp_err=yes
4882fi
4883if test -z "$ac_cpp_err"; then
c0d27fcc 4884 ac_header_preproc=yes
f4988be7 4885else
503d2be0 4886 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4887sed 's/^/| /' conftest.$ac_ext >&5
4888
c0d27fcc 4889 ac_header_preproc=no
f4988be7 4890fi
98418dba 4891rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
4892echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4893echo "${ECHO_T}$ac_header_preproc" >&6
4894
4895# So? What about this header?
4896case $ac_header_compiler:$ac_header_preproc in
4897 yes:no )
4898 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4899echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4900 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
4901echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4902 (
4903 cat <<\_ASBOX
4904## ------------------------------------ ##
4905## Report this to bug-autoconf@gnu.org. ##
4906## ------------------------------------ ##
4907_ASBOX
4908 ) |
4909 sed "s/^/$as_me: WARNING: /" >&2
4910 ;;
c0d27fcc
MR
4911 no:yes )
4912 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4913echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4914 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4915echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4916 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
4917echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4918 (
4919 cat <<\_ASBOX
4920## ------------------------------------ ##
4921## Report this to bug-autoconf@gnu.org. ##
4922## ------------------------------------ ##
4923_ASBOX
4924 ) |
4925 sed "s/^/$as_me: WARNING: /" >&2
4926 ;;
c0d27fcc
MR
4927esac
4928echo "$as_me:$LINENO: checking for $ac_header" >&5
4929echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4930if eval "test \"\${$as_ac_Header+set}\" = set"; then
4931 echo $ECHO_N "(cached) $ECHO_C" >&6
4932else
4933 eval "$as_ac_Header=$ac_header_preproc"
f4988be7 4934fi
c0d27fcc 4935echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 4936echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
4937
4938fi
98418dba 4939if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 4940 cat >>confdefs.h <<_ACEOF
98418dba 4941#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 4942_ACEOF
f4988be7
GM
4943
4944fi
c0d27fcc 4945
98418dba
CW
4946done
4947
4948 # Emulation library used on NetBSD.
c0d27fcc 4949 echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
4950echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
4951if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 4952 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4953else
98418dba
CW
4954 ac_check_lib_save_LIBS=$LIBS
4955LIBS="-lossaudio $LIBS"
4956cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4957#line $LINENO "configure"
cd958eb3
MB
4958/* confdefs.h. */
4959_ACEOF
4960cat confdefs.h >>conftest.$ac_ext
4961cat >>conftest.$ac_ext <<_ACEOF
4962/* end confdefs.h. */
98418dba
CW
4963
4964/* Override any gcc2 internal prototype to avoid an error. */
4965#ifdef __cplusplus
4966extern "C"
f4988be7 4967#endif
98418dba
CW
4968/* We use char because int might match the return type of a gcc2
4969 builtin and then its argument prototype would still apply. */
4970char _oss_ioctl ();
503d2be0
AS
4971int
4972main ()
4973{
98418dba 4974_oss_ioctl ();
503d2be0
AS
4975 ;
4976 return 0;
4977}
4978_ACEOF
98418dba 4979rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 4980if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 4981 (eval $ac_link) 2>&5
503d2be0 4982 ac_status=$?
c0d27fcc 4983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4984 (exit $ac_status); } &&
98418dba 4985 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 4986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4987 (eval $ac_try) 2>&5
4988 ac_status=$?
c0d27fcc 4989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4990 (exit $ac_status); }; }; then
98418dba 4991 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 4992else
503d2be0 4993 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4994sed 's/^/| /' conftest.$ac_ext >&5
4995
98418dba 4996ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 4997fi
98418dba
CW
4998rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4999LIBS=$ac_check_lib_save_LIBS
f4988be7 5000fi
c0d27fcc 5001echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
5002echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
5003if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
5004 LIBSOUND=-lossaudio
5005else
5006 LIBSOUND=
5007fi
5008
c0d27fcc 5009
f4988be7 5010fi
c0d27fcc
MR
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
22044edf
DL
5029
5030
973a76b1 5031
cffcede7 5032
c0d27fcc 5033
f4988be7 5034
98418dba
CW
5035for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5036 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5037 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
cffcede7 5038 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h
98418dba
CW
5039do
5040as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5041if eval "test \"\${$as_ac_Header+set}\" = set"; then
5042 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5043echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5044if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5045 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5046fi
5047echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5048echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5049else
c0d27fcc
MR
5050 # Is the header compilable?
5051echo "$as_me:$LINENO: checking $ac_header usability" >&5
5052echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5053cat >conftest.$ac_ext <<_ACEOF
5054#line $LINENO "configure"
cd958eb3
MB
5055/* confdefs.h. */
5056_ACEOF
5057cat confdefs.h >>conftest.$ac_ext
5058cat >>conftest.$ac_ext <<_ACEOF
5059/* end confdefs.h. */
c0d27fcc
MR
5060$ac_includes_default
5061#include <$ac_header>
5062_ACEOF
5063rm -f conftest.$ac_objext
5064if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5065 (eval $ac_compile) 2>&5
5066 ac_status=$?
5067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5068 (exit $ac_status); } &&
5069 { ac_try='test -s conftest.$ac_objext'
5070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5071 (eval $ac_try) 2>&5
5072 ac_status=$?
5073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5074 (exit $ac_status); }; }; then
5075 ac_header_compiler=yes
5076else
5077 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5078sed 's/^/| /' conftest.$ac_ext >&5
5079
c0d27fcc
MR
5080ac_header_compiler=no
5081fi
5082rm -f conftest.$ac_objext conftest.$ac_ext
5083echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5084echo "${ECHO_T}$ac_header_compiler" >&6
5085
5086# Is the header present?
5087echo "$as_me:$LINENO: checking $ac_header presence" >&5
5088echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5089cat >conftest.$ac_ext <<_ACEOF
5090#line $LINENO "configure"
cd958eb3
MB
5091/* confdefs.h. */
5092_ACEOF
5093cat confdefs.h >>conftest.$ac_ext
5094cat >>conftest.$ac_ext <<_ACEOF
5095/* end confdefs.h. */
98418dba 5096#include <$ac_header>
503d2be0 5097_ACEOF
c0d27fcc 5098if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5099 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5100 ac_status=$?
6bae0ccf 5101 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5102 rm -f conftest.er1
5103 cat conftest.err >&5
c0d27fcc 5104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5105 (exit $ac_status); } >/dev/null; then
5106 if test -s conftest.err; then
5107 ac_cpp_err=$ac_c_preproc_warn_flag
5108 else
5109 ac_cpp_err=
5110 fi
5111else
5112 ac_cpp_err=yes
5113fi
5114if test -z "$ac_cpp_err"; then
c0d27fcc 5115 ac_header_preproc=yes
34ec9ebe 5116else
503d2be0 5117 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5118sed 's/^/| /' conftest.$ac_ext >&5
5119
c0d27fcc 5120 ac_header_preproc=no
34ec9ebe 5121fi
98418dba 5122rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5123echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5124echo "${ECHO_T}$ac_header_preproc" >&6
5125
5126# So? What about this header?
5127case $ac_header_compiler:$ac_header_preproc in
5128 yes:no )
5129 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5130echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5131 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
5132echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5133 (
5134 cat <<\_ASBOX
5135## ------------------------------------ ##
5136## Report this to bug-autoconf@gnu.org. ##
5137## ------------------------------------ ##
5138_ASBOX
5139 ) |
5140 sed "s/^/$as_me: WARNING: /" >&2
5141 ;;
c0d27fcc
MR
5142 no:yes )
5143 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5144echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5145 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5146echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5147 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
5148echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5149 (
5150 cat <<\_ASBOX
5151## ------------------------------------ ##
5152## Report this to bug-autoconf@gnu.org. ##
5153## ------------------------------------ ##
5154_ASBOX
5155 ) |
5156 sed "s/^/$as_me: WARNING: /" >&2
5157 ;;
c0d27fcc
MR
5158esac
5159echo "$as_me:$LINENO: checking for $ac_header" >&5
5160echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5161if eval "test \"\${$as_ac_Header+set}\" = set"; then
5162 echo $ECHO_N "(cached) $ECHO_C" >&6
5163else
5164 eval "$as_ac_Header=$ac_header_preproc"
34ec9ebe 5165fi
c0d27fcc 5166echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5167echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5168
5169fi
98418dba 5170if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5171 cat >>confdefs.h <<_ACEOF
98418dba 5172#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5173_ACEOF
34ec9ebe 5174
98418dba 5175fi
c0d27fcc 5176
98418dba
CW
5177done
5178
22044edf
DL
5179
5180for ac_header in term.h
5181do
5182as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
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
5188 cat >conftest.$ac_ext <<_ACEOF
5189#line $LINENO "configure"
cd958eb3
MB
5190/* confdefs.h. */
5191_ACEOF
5192cat confdefs.h >>conftest.$ac_ext
5193cat >>conftest.$ac_ext <<_ACEOF
5194/* end confdefs.h. */
22044edf
DL
5195#include <$ac_header>
5196_ACEOF
5197if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5198 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5199 ac_status=$?
5200 grep -v '^ *+' conftest.er1 >conftest.err
5201 rm -f conftest.er1
5202 cat conftest.err >&5
5203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5204 (exit $ac_status); } >/dev/null; then
5205 if test -s conftest.err; then
5206 ac_cpp_err=$ac_c_preproc_warn_flag
5207 else
5208 ac_cpp_err=
5209 fi
5210else
5211 ac_cpp_err=yes
5212fi
5213if test -z "$ac_cpp_err"; then
5214 eval "$as_ac_Header=yes"
5215else
5216 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5217sed 's/^/| /' conftest.$ac_ext >&5
5218
22044edf
DL
5219 eval "$as_ac_Header=no"
5220fi
5221rm -f conftest.err conftest.$ac_ext
5222fi
5223echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5224echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5225if test `eval echo '${'$as_ac_Header'}'` = yes; then
5226 cat >>confdefs.h <<_ACEOF
5227#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5228_ACEOF
5229
5230fi
5231
5232done
5233
c0d27fcc 5234echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
5235echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5236if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 5237 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5238else
503d2be0 5239 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5240#line $LINENO "configure"
cd958eb3
MB
5241/* confdefs.h. */
5242_ACEOF
5243cat confdefs.h >>conftest.$ac_ext
5244cat >>conftest.$ac_ext <<_ACEOF
5245/* end confdefs.h. */
98418dba
CW
5246#include <stdlib.h>
5247#include <stdarg.h>
5248#include <string.h>
5249#include <float.h>
5250
cd958eb3
MB
5251int
5252main ()
5253{
5254
5255 ;
5256 return 0;
5257}
98418dba 5258_ACEOF
cd958eb3
MB
5259rm -f conftest.$ac_objext
5260if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5261 (eval $ac_compile) 2>&5
503d2be0 5262 ac_status=$?
c0d27fcc 5263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
cd958eb3
MB
5264 (exit $ac_status); } &&
5265 { ac_try='test -s conftest.$ac_objext'
5266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5267 (eval $ac_try) 2>&5
5268 ac_status=$?
5269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5270 (exit $ac_status); }; }; then
98418dba 5271 ac_cv_header_stdc=yes
ba4481b5 5272else
503d2be0 5273 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5274sed 's/^/| /' conftest.$ac_ext >&5
5275
5276ac_cv_header_stdc=no
ba4481b5 5277fi
cd958eb3 5278rm -f conftest.$ac_objext conftest.$ac_ext
98418dba
CW
5279
5280if test $ac_cv_header_stdc = yes; then
5281 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5282 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5283#line $LINENO "configure"
cd958eb3
MB
5284/* confdefs.h. */
5285_ACEOF
5286cat confdefs.h >>conftest.$ac_ext
5287cat >>conftest.$ac_ext <<_ACEOF
5288/* end confdefs.h. */
98418dba
CW
5289#include <string.h>
5290
5291_ACEOF
5292if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5293 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
5294 :
5295else
5296 ac_cv_header_stdc=no
ba4481b5 5297fi
98418dba 5298rm -f conftest*
ba4481b5
DL
5299
5300fi
5301
98418dba
CW
5302if test $ac_cv_header_stdc = yes; then
5303 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5304 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5305#line $LINENO "configure"
cd958eb3
MB
5306/* confdefs.h. */
5307_ACEOF
5308cat confdefs.h >>conftest.$ac_ext
5309cat >>conftest.$ac_ext <<_ACEOF
5310/* end confdefs.h. */
98418dba
CW
5311#include <stdlib.h>
5312
5313_ACEOF
5314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5315 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
5316 :
5317else
5318 ac_cv_header_stdc=no
5319fi
5320rm -f conftest*
5321
5322fi
5323
5324if test $ac_cv_header_stdc = yes; then
5325 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5326 if test "$cross_compiling" = yes; then
5327 :
d42122a3 5328else
503d2be0 5329 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5330#line $LINENO "configure"
cd958eb3
MB
5331/* confdefs.h. */
5332_ACEOF
5333cat confdefs.h >>conftest.$ac_ext
5334cat >>conftest.$ac_ext <<_ACEOF
5335/* end confdefs.h. */
98418dba
CW
5336#include <ctype.h>
5337#if ((' ' & 0x0FF) == 0x020)
5338# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5339# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5340#else
cd958eb3
MB
5341# define ISLOWER(c) \
5342 (('a' <= (c) && (c) <= 'i') \
98418dba
CW
5343 || ('j' <= (c) && (c) <= 'r') \
5344 || ('s' <= (c) && (c) <= 'z'))
5345# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5346#endif
5347
5348#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
5349int
5350main ()
5351{
98418dba
CW
5352 int i;
5353 for (i = 0; i < 256; i++)
5354 if (XOR (islower (i), ISLOWER (i))
5355 || toupper (i) != TOUPPER (i))
5356 exit(2);
5357 exit (0);
503d2be0
AS
5358}
5359_ACEOF
98418dba 5360rm -f conftest$ac_exeext
c0d27fcc 5361if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 5362 (eval $ac_link) 2>&5
503d2be0 5363 ac_status=$?
c0d27fcc 5364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 5365 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 5366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5367 (eval $ac_try) 2>&5
5368 ac_status=$?
c0d27fcc 5369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5370 (exit $ac_status); }; }; then
98418dba 5371 :
d42122a3 5372else
98418dba
CW
5373 echo "$as_me: program exited with status $ac_status" >&5
5374echo "$as_me: failed program was:" >&5
cd958eb3
MB
5375sed 's/^/| /' conftest.$ac_ext >&5
5376
c0d27fcc 5377( exit $ac_status )
98418dba 5378ac_cv_header_stdc=no
d42122a3 5379fi
6bae0ccf 5380rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 5381fi
98418dba
CW
5382fi
5383fi
c0d27fcc 5384echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
98418dba
CW
5385echo "${ECHO_T}$ac_cv_header_stdc" >&6
5386if test $ac_cv_header_stdc = yes; then
5387
c0d27fcc 5388cat >>confdefs.h <<\_ACEOF
98418dba 5389#define STDC_HEADERS 1
c0d27fcc 5390_ACEOF
d42122a3
DL
5391
5392fi
5393
c0d27fcc 5394echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
5395echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5396if test "${ac_cv_header_time+set}" = set; then
503d2be0 5397 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5398else
503d2be0 5399 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5400#line $LINENO "configure"
cd958eb3
MB
5401/* confdefs.h. */
5402_ACEOF
5403cat confdefs.h >>conftest.$ac_ext
5404cat >>conftest.$ac_ext <<_ACEOF
5405/* end confdefs.h. */
ba4481b5 5406#include <sys/types.h>
98418dba 5407#include <sys/time.h>
ba4481b5 5408#include <time.h>
503d2be0
AS
5409
5410int
5411main ()
5412{
98418dba
CW
5413if ((struct tm *) 0)
5414return 0;
503d2be0
AS
5415 ;
5416 return 0;
5417}
5418_ACEOF
5419rm -f conftest.$ac_objext
c0d27fcc 5420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5421 (eval $ac_compile) 2>&5
5422 ac_status=$?
c0d27fcc 5423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5424 (exit $ac_status); } &&
5425 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5427 (eval $ac_try) 2>&5
5428 ac_status=$?
c0d27fcc 5429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5430 (exit $ac_status); }; }; then
98418dba 5431 ac_cv_header_time=yes
ba4481b5 5432else
503d2be0 5433 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5434sed 's/^/| /' conftest.$ac_ext >&5
5435
98418dba 5436ac_cv_header_time=no
ba4481b5 5437fi
503d2be0 5438rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 5439fi
c0d27fcc 5440echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
5441echo "${ECHO_T}$ac_cv_header_time" >&6
5442if test $ac_cv_header_time = yes; then
503d2be0 5443
c0d27fcc 5444cat >>confdefs.h <<\_ACEOF
98418dba 5445#define TIME_WITH_SYS_TIME 1
c0d27fcc 5446_ACEOF
ba4481b5
DL
5447
5448fi
5449
cd958eb3
MB
5450echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
5451echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
5452if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 5453 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5454else
503d2be0 5455 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5456#line $LINENO "configure"
cd958eb3
MB
5457/* confdefs.h. */
5458_ACEOF
5459cat confdefs.h >>conftest.$ac_ext
5460cat >>conftest.$ac_ext <<_ACEOF
5461/* end confdefs.h. */
5462$ac_includes_default
5463int
5464main ()
5465{
5466#ifndef sys_siglist
5467 char *p = (char *) sys_siglist;
98418dba 5468#endif
503d2be0 5469
cd958eb3
MB
5470 ;
5471 return 0;
5472}
5473_ACEOF
5474rm -f conftest.$ac_objext
5475if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5476 (eval $ac_compile) 2>&5
5477 ac_status=$?
5478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5479 (exit $ac_status); } &&
5480 { ac_try='test -s conftest.$ac_objext'
5481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5482 (eval $ac_try) 2>&5
5483 ac_status=$?
5484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5485 (exit $ac_status); }; }; then
5486 ac_cv_have_decl_sys_siglist=yes
5487else
5488 echo "$as_me: failed program was:" >&5
5489sed 's/^/| /' conftest.$ac_ext >&5
5490
5491ac_cv_have_decl_sys_siglist=no
5492fi
5493rm -f conftest.$ac_objext conftest.$ac_ext
5494fi
5495echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
5496echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
5497if test $ac_cv_have_decl_sys_siglist = yes; then
5498
5499cat >>confdefs.h <<_ACEOF
5500#define HAVE_DECL_SYS_SIGLIST 1
5501_ACEOF
5502
5503
5504else
5505 cat >>confdefs.h <<_ACEOF
5506#define HAVE_DECL_SYS_SIGLIST 0
5507_ACEOF
5508
5509
5510fi
5511
5512
5513if test $ac_cv_have_decl_sys_siglist != yes; then
5514 # For Tru64, at least:
5515 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
5516echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
5517if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
5518 echo $ECHO_N "(cached) $ECHO_C" >&6
5519else
5520 cat >conftest.$ac_ext <<_ACEOF
5521#line $LINENO "configure"
5522/* confdefs.h. */
5523_ACEOF
5524cat confdefs.h >>conftest.$ac_ext
5525cat >>conftest.$ac_ext <<_ACEOF
5526/* end confdefs.h. */
5527$ac_includes_default
503d2be0
AS
5528int
5529main ()
5530{
cd958eb3
MB
5531#ifndef __sys_siglist
5532 char *p = (char *) __sys_siglist;
5533#endif
5534
503d2be0
AS
5535 ;
5536 return 0;
5537}
5538_ACEOF
5539rm -f conftest.$ac_objext
c0d27fcc 5540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5541 (eval $ac_compile) 2>&5
5542 ac_status=$?
c0d27fcc 5543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5544 (exit $ac_status); } &&
5545 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5547 (eval $ac_try) 2>&5
5548 ac_status=$?
c0d27fcc 5549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5550 (exit $ac_status); }; }; then
cd958eb3 5551 ac_cv_have_decl___sys_siglist=yes
ba4481b5 5552else
503d2be0 5553 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5554sed 's/^/| /' conftest.$ac_ext >&5
5555
5556ac_cv_have_decl___sys_siglist=no
ba4481b5 5557fi
503d2be0
AS
5558rm -f conftest.$ac_objext conftest.$ac_ext
5559fi
cd958eb3
MB
5560echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
5561echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6
5562if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 5563
cd958eb3
MB
5564cat >>confdefs.h <<_ACEOF
5565#define HAVE_DECL___SYS_SIGLIST 1
5566_ACEOF
5567
5568
5569else
5570 cat >>confdefs.h <<_ACEOF
5571#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 5572_ACEOF
503d2be0 5573
cd958eb3 5574
ba4481b5
DL
5575fi
5576
cd958eb3
MB
5577
5578 if test $ac_cv_have_decl___sys_siglist = yes; then
5579
5580cat >>confdefs.h <<\_ACEOF
5581#define sys_siglist __sys_siglist
5582_ACEOF
5583
5584 fi
5585fi
c0d27fcc 5586echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
5587echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
5588if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 5589 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5590else
503d2be0 5591 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5592#line $LINENO "configure"
cd958eb3
MB
5593/* confdefs.h. */
5594_ACEOF
5595cat confdefs.h >>conftest.$ac_ext
5596cat >>conftest.$ac_ext <<_ACEOF
5597/* end confdefs.h. */
98418dba
CW
5598#include <sys/types.h>
5599#include <sys/wait.h>
5600#ifndef WEXITSTATUS
5601# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5602#endif
5603#ifndef WIFEXITED
5604# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 5605#endif
503d2be0
AS
5606
5607int
5608main ()
5609{
98418dba
CW
5610 int s;
5611 wait (&s);
5612 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
5613 ;
5614 return 0;
5615}
5616_ACEOF
98418dba 5617rm -f conftest.$ac_objext
c0d27fcc 5618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba 5619 (eval $ac_compile) 2>&5
503d2be0 5620 ac_status=$?
c0d27fcc 5621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5622 (exit $ac_status); } &&
98418dba 5623 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5625 (eval $ac_try) 2>&5
5626 ac_status=$?
c0d27fcc 5627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5628 (exit $ac_status); }; }; then
98418dba 5629 ac_cv_header_sys_wait_h=yes
ba4481b5 5630else
503d2be0 5631 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5632sed 's/^/| /' conftest.$ac_ext >&5
5633
98418dba 5634ac_cv_header_sys_wait_h=no
ba4481b5 5635fi
98418dba 5636rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 5637fi
c0d27fcc 5638echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
5639echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
5640if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 5641
c0d27fcc 5642cat >>confdefs.h <<\_ACEOF
98418dba 5643#define HAVE_SYS_WAIT_H 1
c0d27fcc 5644_ACEOF
ba4481b5 5645
ba4481b5
DL
5646fi
5647
c0d27fcc
MR
5648
5649echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
5650echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
5651if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 5652 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 5653else
503d2be0 5654 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5655#line $LINENO "configure"
cd958eb3
MB
5656/* confdefs.h. */
5657_ACEOF
5658cat confdefs.h >>conftest.$ac_ext
5659cat >>conftest.$ac_ext <<_ACEOF
5660/* end confdefs.h. */
98418dba
CW
5661#ifdef TIME_WITH_SYS_TIME
5662#include <sys/time.h>
5663#include <time.h>
5664#else
5665#ifdef HAVE_SYS_TIME_H
5666#include <sys/time.h>
5667#else
1113b624 5668#include <time.h>
98418dba
CW
5669#endif
5670#endif
5671#ifdef HAVE_UTIME_H
5672#include <utime.h>
5673#endif
503d2be0
AS
5674int
5675main ()
5676{
98418dba 5677static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
5678 ;
5679 return 0;
5680}
5681_ACEOF
98418dba 5682rm -f conftest.$ac_objext
c0d27fcc 5683if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba 5684 (eval $ac_compile) 2>&5
503d2be0 5685 ac_status=$?
c0d27fcc 5686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5687 (exit $ac_status); } &&
98418dba 5688 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5690 (eval $ac_try) 2>&5
5691 ac_status=$?
c0d27fcc 5692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5693 (exit $ac_status); }; }; then
98418dba 5694 emacs_cv_struct_utimbuf=yes
1113b624 5695else
503d2be0 5696 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5697sed 's/^/| /' conftest.$ac_ext >&5
5698
98418dba 5699emacs_cv_struct_utimbuf=no
1113b624 5700fi
98418dba 5701rm -f conftest.$ac_objext conftest.$ac_ext
1113b624 5702fi
c0d27fcc 5703echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
5704echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
5705if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 5706
c0d27fcc 5707cat >>confdefs.h <<\_ACEOF
98418dba 5708#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 5709_ACEOF
1113b624
PE
5710
5711fi
ba4481b5 5712
c0d27fcc 5713echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
5714echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5715if test "${ac_cv_type_signal+set}" = set; then
503d2be0 5716 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5717else
98418dba 5718 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5719#line $LINENO "configure"
cd958eb3
MB
5720/* confdefs.h. */
5721_ACEOF
5722cat confdefs.h >>conftest.$ac_ext
5723cat >>conftest.$ac_ext <<_ACEOF
5724/* end confdefs.h. */
7397acc4 5725#include <sys/types.h>
98418dba
CW
5726#include <signal.h>
5727#ifdef signal
5728# undef signal
5729#endif
5730#ifdef __cplusplus
5731extern "C" void (*signal (int, void (*)(int)))(int);
5732#else
5733void (*signal ()) ();
5734#endif
5735
503d2be0
AS
5736int
5737main ()
5738{
98418dba 5739int i;
503d2be0
AS
5740 ;
5741 return 0;
5742}
5743_ACEOF
98418dba 5744rm -f conftest.$ac_objext
c0d27fcc 5745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5746 (eval $ac_compile) 2>&5
5747 ac_status=$?
c0d27fcc 5748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5749 (exit $ac_status); } &&
5750 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5752 (eval $ac_try) 2>&5
5753 ac_status=$?
c0d27fcc 5754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5755 (exit $ac_status); }; }; then
98418dba 5756 ac_cv_type_signal=void
503d2be0
AS
5757else
5758 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5759sed 's/^/| /' conftest.$ac_ext >&5
5760
98418dba 5761ac_cv_type_signal=int
503d2be0 5762fi
98418dba 5763rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5764fi
c0d27fcc 5765echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 5766echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 5767
c0d27fcc 5768cat >>confdefs.h <<_ACEOF
98418dba 5769#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
5770_ACEOF
5771
503d2be0 5772
c0d27fcc
MR
5773
5774echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
5775echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
5776if test "${emacs_cv_speed_t+set}" = set; then
5777 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5778else
98418dba 5779 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5780#line $LINENO "configure"
cd958eb3
MB
5781/* confdefs.h. */
5782_ACEOF
5783cat confdefs.h >>conftest.$ac_ext
5784cat >>conftest.$ac_ext <<_ACEOF
5785/* end confdefs.h. */
98418dba 5786#include <termios.h>
98418dba
CW
5787int
5788main ()
5789{
5790speed_t x = 1;
5791 ;
5792 return 0;
5793}
5794_ACEOF
5795rm -f conftest.$ac_objext
c0d27fcc 5796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
5797 (eval $ac_compile) 2>&5
5798 ac_status=$?
c0d27fcc 5799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5800 (exit $ac_status); } &&
5801 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
5803 (eval $ac_try) 2>&5
5804 ac_status=$?
c0d27fcc 5805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5806 (exit $ac_status); }; }; then
5807 emacs_cv_speed_t=yes
5808else
5809 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5810sed 's/^/| /' conftest.$ac_ext >&5
5811
98418dba
CW
5812emacs_cv_speed_t=no
5813fi
5814rm -f conftest.$ac_objext conftest.$ac_ext
5815fi
c0d27fcc 5816echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
5817echo "${ECHO_T}$emacs_cv_speed_t" >&6
5818if test $emacs_cv_speed_t = yes; then
b936fae4 5819
c0d27fcc 5820cat >>confdefs.h <<\_ACEOF
98418dba 5821#define HAVE_SPEED_T 1
c0d27fcc 5822_ACEOF
98418dba 5823
7397acc4
DL
5824fi
5825
c0d27fcc 5826echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
5827echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
5828if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 5829 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5830else
503d2be0 5831 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5832#line $LINENO "configure"
cd958eb3
MB
5833/* confdefs.h. */
5834_ACEOF
5835cat confdefs.h >>conftest.$ac_ext
5836cat >>conftest.$ac_ext <<_ACEOF
5837/* end confdefs.h. */
98418dba
CW
5838#ifdef TIME_WITH_SYS_TIME
5839#include <sys/time.h>
5840#include <time.h>
5841#else
5842#ifdef HAVE_SYS_TIME_H
5843#include <sys/time.h>
5844#else
5845#include <time.h>
5846#endif
5847#endif
503d2be0
AS
5848int
5849main ()
5850{
98418dba 5851static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
5852 ;
5853 return 0;
5854}
5855_ACEOF
5856rm -f conftest.$ac_objext
c0d27fcc 5857if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5858 (eval $ac_compile) 2>&5
5859 ac_status=$?
c0d27fcc 5860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5861 (exit $ac_status); } &&
5862 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5864 (eval $ac_try) 2>&5
5865 ac_status=$?
c0d27fcc 5866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5867 (exit $ac_status); }; }; then
98418dba 5868 emacs_cv_struct_timeval=yes
7397acc4 5869else
503d2be0 5870 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5871sed 's/^/| /' conftest.$ac_ext >&5
5872
98418dba 5873emacs_cv_struct_timeval=no
7397acc4 5874fi
503d2be0 5875rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5876fi
c0d27fcc 5877echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
5878echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
5879HAVE_TIMEVAL=$emacs_cv_struct_timeval
5880if test $emacs_cv_struct_timeval = yes; then
b936fae4 5881
c0d27fcc 5882cat >>confdefs.h <<\_ACEOF
98418dba 5883#define HAVE_TIMEVAL 1
c0d27fcc 5884_ACEOF
7397acc4
DL
5885
5886fi
5887
c0d27fcc 5888echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
5889echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
5890if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 5891 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5892else
503d2be0 5893 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5894#line $LINENO "configure"
cd958eb3
MB
5895/* confdefs.h. */
5896_ACEOF
5897cat confdefs.h >>conftest.$ac_ext
5898cat >>conftest.$ac_ext <<_ACEOF
5899/* end confdefs.h. */
98418dba 5900#include <math.h>
503d2be0
AS
5901int
5902main ()
5903{
98418dba 5904static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
5905 ;
5906 return 0;
ba4481b5 5907}
503d2be0
AS
5908_ACEOF
5909rm -f conftest.$ac_objext
c0d27fcc 5910if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5911 (eval $ac_compile) 2>&5
5912 ac_status=$?
c0d27fcc 5913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5914 (exit $ac_status); } &&
5915 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5917 (eval $ac_try) 2>&5
5918 ac_status=$?
c0d27fcc 5919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5920 (exit $ac_status); }; }; then
98418dba 5921 emacs_cv_struct_exception=yes
ba4481b5 5922else
503d2be0 5923 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5924sed 's/^/| /' conftest.$ac_ext >&5
5925
98418dba 5926emacs_cv_struct_exception=no
ba4481b5 5927fi
503d2be0 5928rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 5929fi
c0d27fcc 5930echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
5931echo "${ECHO_T}$emacs_cv_struct_exception" >&6
5932HAVE_EXCEPTION=$emacs_cv_struct_exception
5933if test $emacs_cv_struct_exception != yes; then
b936fae4 5934
c0d27fcc 5935cat >>confdefs.h <<\_ACEOF
98418dba 5936#define NO_MATHERR 1
c0d27fcc 5937_ACEOF
ba4481b5
DL
5938
5939fi
5940
c0d27fcc 5941echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
5942echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
5943if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 5944 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5945else
503d2be0 5946 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5947#line $LINENO "configure"
cd958eb3
MB
5948/* confdefs.h. */
5949_ACEOF
5950cat confdefs.h >>conftest.$ac_ext
5951cat >>conftest.$ac_ext <<_ACEOF
5952/* end confdefs.h. */
98418dba
CW
5953#include <sys/types.h>
5954#include <time.h>
7397acc4 5955
503d2be0
AS
5956int
5957main ()
5958{
98418dba 5959struct tm *tp; tp->tm_sec;
503d2be0
AS
5960 ;
5961 return 0;
5962}
5963_ACEOF
5964rm -f conftest.$ac_objext
c0d27fcc 5965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5966 (eval $ac_compile) 2>&5
5967 ac_status=$?
c0d27fcc 5968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5969 (exit $ac_status); } &&
5970 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5972 (eval $ac_try) 2>&5
5973 ac_status=$?
c0d27fcc 5974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5975 (exit $ac_status); }; }; then
98418dba 5976 ac_cv_struct_tm=time.h
7397acc4 5977else
503d2be0 5978 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5979sed 's/^/| /' conftest.$ac_ext >&5
5980
98418dba 5981ac_cv_struct_tm=sys/time.h
7397acc4 5982fi
503d2be0 5983rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5984fi
c0d27fcc 5985echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
5986echo "${ECHO_T}$ac_cv_struct_tm" >&6
5987if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 5988
c0d27fcc 5989cat >>confdefs.h <<\_ACEOF
98418dba 5990#define TM_IN_SYS_TIME 1
c0d27fcc 5991_ACEOF
7397acc4
DL
5992
5993fi
ba4481b5 5994
c0d27fcc 5995echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
5996echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
5997if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 5998 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5999else
98418dba 6000 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6001#line $LINENO "configure"
cd958eb3
MB
6002/* confdefs.h. */
6003_ACEOF
6004cat confdefs.h >>conftest.$ac_ext
6005cat >>conftest.$ac_ext <<_ACEOF
6006/* end confdefs.h. */
98418dba
CW
6007#include <sys/types.h>
6008#include <$ac_cv_struct_tm>
ba4481b5 6009
c0d27fcc 6010
98418dba
CW
6011int
6012main ()
6013{
6014static struct tm ac_aggr;
6015if (ac_aggr.tm_zone)
6016return 0;
6017 ;
6018 return 0;
6019}
6020_ACEOF
6021rm -f conftest.$ac_objext
c0d27fcc 6022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
6023 (eval $ac_compile) 2>&5
6024 ac_status=$?
c0d27fcc 6025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6026 (exit $ac_status); } &&
6027 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6029 (eval $ac_try) 2>&5
6030 ac_status=$?
c0d27fcc 6031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6032 (exit $ac_status); }; }; then
6033 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 6034else
98418dba 6035 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6036sed 's/^/| /' conftest.$ac_ext >&5
6037
6bae0ccf
DL
6038cat >conftest.$ac_ext <<_ACEOF
6039#line $LINENO "configure"
cd958eb3
MB
6040/* confdefs.h. */
6041_ACEOF
6042cat confdefs.h >>conftest.$ac_ext
6043cat >>conftest.$ac_ext <<_ACEOF
6044/* end confdefs.h. */
6bae0ccf
DL
6045#include <sys/types.h>
6046#include <$ac_cv_struct_tm>
6047
6048
6049int
6050main ()
6051{
6052static struct tm ac_aggr;
6053if (sizeof ac_aggr.tm_zone)
6054return 0;
6055 ;
6056 return 0;
6057}
6058_ACEOF
6059rm -f conftest.$ac_objext
6060if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6061 (eval $ac_compile) 2>&5
6062 ac_status=$?
6063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6064 (exit $ac_status); } &&
6065 { ac_try='test -s conftest.$ac_objext'
6066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6067 (eval $ac_try) 2>&5
6068 ac_status=$?
6069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6070 (exit $ac_status); }; }; then
6071 ac_cv_member_struct_tm_tm_zone=yes
6072else
6073 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6074sed 's/^/| /' conftest.$ac_ext >&5
6075
98418dba 6076ac_cv_member_struct_tm_tm_zone=no
ba4481b5 6077fi
98418dba 6078rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 6079fi
6bae0ccf
DL
6080rm -f conftest.$ac_objext conftest.$ac_ext
6081fi
c0d27fcc 6082echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
6083echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
6084if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 6085
c0d27fcc 6086cat >>confdefs.h <<_ACEOF
98418dba 6087#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
6088_ACEOF
6089
ba4481b5 6090
98418dba 6091fi
ba4481b5 6092
98418dba 6093if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 6094
c0d27fcc 6095cat >>confdefs.h <<\_ACEOF
98418dba 6096#define HAVE_TM_ZONE 1
c0d27fcc 6097_ACEOF
ba4481b5 6098
ba4481b5 6099else
c0d27fcc 6100 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
6101echo $ECHO_N "checking for tzname... $ECHO_C" >&6
6102if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 6103 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6104else
98418dba 6105 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6106#line $LINENO "configure"
cd958eb3
MB
6107/* confdefs.h. */
6108_ACEOF
6109cat confdefs.h >>conftest.$ac_ext
6110cat >>conftest.$ac_ext <<_ACEOF
6111/* end confdefs.h. */
98418dba
CW
6112#include <time.h>
6113#ifndef tzname /* For SGI. */
6114extern char *tzname[]; /* RS6000 and others reject char **tzname. */
6115#endif
6116
98418dba
CW
6117int
6118main ()
6119{
6120atoi(*tzname);
6121 ;
6122 return 0;
6123}
6124_ACEOF
6125rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
6127 (eval $ac_link) 2>&5
6128 ac_status=$?
c0d27fcc 6129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6130 (exit $ac_status); } &&
6131 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6133 (eval $ac_try) 2>&5
6134 ac_status=$?
c0d27fcc 6135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6136 (exit $ac_status); }; }; then
6137 ac_cv_var_tzname=yes
6138else
6139 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6140sed 's/^/| /' conftest.$ac_ext >&5
6141
98418dba 6142ac_cv_var_tzname=no
ba4481b5 6143fi
98418dba
CW
6144rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6145fi
c0d27fcc 6146echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
6147echo "${ECHO_T}$ac_cv_var_tzname" >&6
6148 if test $ac_cv_var_tzname = yes; then
ba4481b5 6149
c0d27fcc 6150cat >>confdefs.h <<\_ACEOF
98418dba 6151#define HAVE_TZNAME 1
c0d27fcc 6152_ACEOF
503d2be0 6153
98418dba
CW
6154 fi
6155fi
503d2be0 6156
c0d27fcc 6157echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
6158echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
6159if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
6160 echo $ECHO_N "(cached) $ECHO_C" >&6
6161else
6162 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6163#line $LINENO "configure"
cd958eb3
MB
6164/* confdefs.h. */
6165_ACEOF
6166cat confdefs.h >>conftest.$ac_ext
6167cat >>conftest.$ac_ext <<_ACEOF
6168/* end confdefs.h. */
98418dba 6169#include <time.h>
b936fae4 6170
98418dba
CW
6171int
6172main ()
6173{
b936fae4
AS
6174static struct tm ac_aggr;
6175if (ac_aggr.tm_gmtoff)
6176return 0;
98418dba
CW
6177 ;
6178 return 0;
6179}
6180_ACEOF
b936fae4 6181rm -f conftest.$ac_objext
c0d27fcc 6182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
b936fae4 6183 (eval $ac_compile) 2>&5
98418dba 6184 ac_status=$?
c0d27fcc 6185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6186 (exit $ac_status); } &&
b936fae4 6187 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6189 (eval $ac_try) 2>&5
6190 ac_status=$?
c0d27fcc 6191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6192 (exit $ac_status); }; }; then
b936fae4 6193 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
6194else
6195 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6196sed 's/^/| /' conftest.$ac_ext >&5
6197
8799b3e4 6198cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6199#line $LINENO "configure"
cd958eb3
MB
6200/* confdefs.h. */
6201_ACEOF
6202cat confdefs.h >>conftest.$ac_ext
6203cat >>conftest.$ac_ext <<_ACEOF
6204/* end confdefs.h. */
6bae0ccf
DL
6205#include <time.h>
6206
8799b3e4
CW
6207int
6208main ()
6209{
6bae0ccf
DL
6210static struct tm ac_aggr;
6211if (sizeof ac_aggr.tm_gmtoff)
6212return 0;
8799b3e4
CW
6213 ;
6214 return 0;
6215}
6216_ACEOF
6bae0ccf 6217rm -f conftest.$ac_objext
c0d27fcc 6218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8799b3e4
CW
6219 (eval $ac_compile) 2>&5
6220 ac_status=$?
c0d27fcc 6221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4
CW
6222 (exit $ac_status); } &&
6223 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
6225 (eval $ac_try) 2>&5
6226 ac_status=$?
c0d27fcc 6227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6228 (exit $ac_status); }; }; then
6bae0ccf 6229 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
6230else
6231 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6232sed 's/^/| /' conftest.$ac_ext >&5
6233
6bae0ccf 6234ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 6235fi
6bae0ccf
DL
6236rm -f conftest.$ac_objext conftest.$ac_ext
6237fi
6238rm -f conftest.$ac_objext conftest.$ac_ext
8799b3e4 6239fi
6bae0ccf
DL
6240echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
6241echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
6242if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
6243
6244cat >>confdefs.h <<\_ACEOF
6245#define HAVE_TM_GMTOFF 1
6246_ACEOF
6247
6248fi
6249
8799b3e4 6250
8799b3e4 6251
c0d27fcc 6252echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
6253echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
6254if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 6255 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
6256echo "${ECHO_T}yes" >&6
6257
c0d27fcc 6258cat >>confdefs.h <<\_ACEOF
98418dba 6259#define PROTOTYPES 1
c0d27fcc
MR
6260_ACEOF
6261
6262
6263cat >>confdefs.h <<\_ACEOF
6264#define __PROTOTYPES 1
6265_ACEOF
98418dba
CW
6266
6267else
c0d27fcc 6268 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
6269echo "${ECHO_T}no" >&6
6270fi
6271
c0d27fcc 6272echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
6273echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
6274if test "${ac_cv_c_volatile+set}" = set; then
6275 echo $ECHO_N "(cached) $ECHO_C" >&6
6276else
6277 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6278#line $LINENO "configure"
cd958eb3
MB
6279/* confdefs.h. */
6280_ACEOF
6281cat confdefs.h >>conftest.$ac_ext
6282cat >>conftest.$ac_ext <<_ACEOF
6283/* end confdefs.h. */
98418dba 6284
98418dba
CW
6285int
6286main ()
6287{
6288
6289volatile int x;
6290int * volatile y;
6291 ;
6292 return 0;
6293}
6294_ACEOF
6295rm -f conftest.$ac_objext
c0d27fcc 6296if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
6297 (eval $ac_compile) 2>&5
6298 ac_status=$?
c0d27fcc 6299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6300 (exit $ac_status); } &&
6301 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6303 (eval $ac_try) 2>&5
6304 ac_status=$?
c0d27fcc 6305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6306 (exit $ac_status); }; }; then
6307 ac_cv_c_volatile=yes
6308else
6309 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6310sed 's/^/| /' conftest.$ac_ext >&5
6311
98418dba
CW
6312ac_cv_c_volatile=no
6313fi
6314rm -f conftest.$ac_objext conftest.$ac_ext
6315fi
c0d27fcc 6316echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
6317echo "${ECHO_T}$ac_cv_c_volatile" >&6
6318if test $ac_cv_c_volatile = no; then
6319
c0d27fcc 6320cat >>confdefs.h <<\_ACEOF
98418dba 6321#define volatile
c0d27fcc 6322_ACEOF
98418dba
CW
6323
6324fi
6325
c0d27fcc 6326echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
6327echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
6328if test "${ac_cv_c_const+set}" = set; then
6329 echo $ECHO_N "(cached) $ECHO_C" >&6
6330else
6331 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6332#line $LINENO "configure"
cd958eb3
MB
6333/* confdefs.h. */
6334_ACEOF
6335cat confdefs.h >>conftest.$ac_ext
6336cat >>conftest.$ac_ext <<_ACEOF
6337/* end confdefs.h. */
98418dba 6338
98418dba
CW
6339int
6340main ()
6341{
6342/* FIXME: Include the comments suggested by Paul. */
6343#ifndef __cplusplus
6344 /* Ultrix mips cc rejects this. */
6345 typedef int charset[2];
6346 const charset x;
6347 /* SunOS 4.1.1 cc rejects this. */
6348 char const *const *ccp;
6349 char **p;
6350 /* NEC SVR4.0.2 mips cc rejects this. */
6351 struct point {int x, y;};
6352 static struct point const zero = {0,0};
6353 /* AIX XL C 1.02.0.0 rejects this.
6354 It does not let you subtract one const X* pointer from another in
6355 an arm of an if-expression whose if-part is not a constant
6356 expression */
6357 const char *g = "string";
6358 ccp = &g + (g ? g-g : 0);
6359 /* HPUX 7.0 cc rejects these. */
6360 ++ccp;
6361 p = (char**) ccp;
6362 ccp = (char const *const *) p;
6363 { /* SCO 3.2v4 cc rejects this. */
6364 char *t;
6365 char const *s = 0 ? (char *) 0 : (char const *) 0;
6366
6367 *t++ = 0;
6368 }
6369 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6370 int x[] = {25, 17};
6371 const int *foo = &x[0];
6372 ++foo;
6373 }
6374 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6375 typedef const int *iptr;
6376 iptr p = 0;
6377 ++p;
6378 }
6379 { /* AIX XL C 1.02.0.0 rejects this saying
6380 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6381 struct s { int j; const int *ap[3]; };
6382 struct s *b; b->j = 5;
6383 }
6384 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6385 const int foo = 10;
6386 }
6387#endif
6388
6389 ;
6390 return 0;
6391}
6392_ACEOF
6393rm -f conftest.$ac_objext
c0d27fcc 6394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
6395 (eval $ac_compile) 2>&5
6396 ac_status=$?
c0d27fcc 6397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6398 (exit $ac_status); } &&
6399 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6401 (eval $ac_try) 2>&5
6402 ac_status=$?
c0d27fcc 6403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6404 (exit $ac_status); }; }; then
6405 ac_cv_c_const=yes
6406else
6407 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6408sed 's/^/| /' conftest.$ac_ext >&5
6409
98418dba
CW
6410ac_cv_c_const=no
6411fi
6412rm -f conftest.$ac_objext conftest.$ac_ext
6413fi
c0d27fcc 6414echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
6415echo "${ECHO_T}$ac_cv_c_const" >&6
6416if test $ac_cv_c_const = no; then
6417
c0d27fcc 6418cat >>confdefs.h <<\_ACEOF
98418dba 6419#define const
c0d27fcc 6420_ACEOF
98418dba
CW
6421
6422fi
6423
c0d27fcc 6424echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
6425echo $ECHO_N "checking for void * support... $ECHO_C" >&6
6426if test "${emacs_cv_void_star+set}" = set; then
6427 echo $ECHO_N "(cached) $ECHO_C" >&6
6428else
6429 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6430#line $LINENO "configure"
cd958eb3
MB
6431/* confdefs.h. */
6432_ACEOF
6433cat confdefs.h >>conftest.$ac_ext
6434cat >>conftest.$ac_ext <<_ACEOF
6435/* end confdefs.h. */
98418dba 6436
98418dba
CW
6437int
6438main ()
6439{
6440void * foo;
6441 ;
6442 return 0;
6443}
6444_ACEOF
6445rm -f conftest.$ac_objext
c0d27fcc 6446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
6447 (eval $ac_compile) 2>&5
6448 ac_status=$?
c0d27fcc 6449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6450 (exit $ac_status); } &&
6451 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6453 (eval $ac_try) 2>&5
6454 ac_status=$?
c0d27fcc 6455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6456 (exit $ac_status); }; }; then
6457 emacs_cv_void_star=yes
6458else
6459 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6460sed 's/^/| /' conftest.$ac_ext >&5
6461
98418dba
CW
6462emacs_cv_void_star=no
6463fi
6464rm -f conftest.$ac_objext conftest.$ac_ext
6465fi
c0d27fcc 6466echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
6467echo "${ECHO_T}$emacs_cv_void_star" >&6
6468if test $emacs_cv_void_star = yes; then
c0d27fcc 6469 cat >>confdefs.h <<\_ACEOF
98418dba 6470#define POINTER_TYPE void
c0d27fcc 6471_ACEOF
98418dba
CW
6472
6473else
c0d27fcc 6474 cat >>confdefs.h <<\_ACEOF
98418dba 6475#define POINTER_TYPE char
c0d27fcc 6476_ACEOF
98418dba
CW
6477
6478fi
6479
c0d27fcc 6480
cd958eb3
MB
6481
6482echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6483echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
98418dba
CW
6484set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
6485if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
6486 echo $ECHO_N "(cached) $ECHO_C" >&6
6487else
c0d27fcc 6488 cat >conftest.make <<\_ACEOF
98418dba 6489all:
cd958eb3 6490 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 6491_ACEOF
98418dba
CW
6492# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6493eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
6494if test -n "$ac_maketemp"; then
6495 eval ac_cv_prog_make_${ac_make}_set=yes
6496else
6497 eval ac_cv_prog_make_${ac_make}_set=no
6498fi
6499rm -f conftest.make
6500fi
6501if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 6502 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
6503echo "${ECHO_T}yes" >&6
6504 SET_MAKE=
6505else
c0d27fcc 6506 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
6507echo "${ECHO_T}no" >&6
6508 SET_MAKE="MAKE=${MAKE-make}"
6509fi
6510
c0d27fcc
MR
6511
6512echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
6513echo $ECHO_N "checking for long file names... $ECHO_C" >&6
6514if test "${ac_cv_sys_long_file_names+set}" = set; then
6515 echo $ECHO_N "(cached) $ECHO_C" >&6
6516else
6517 ac_cv_sys_long_file_names=yes
6518# Test for long file names in all the places we know might matter:
6519# . the current directory, where building will happen
6520# $prefix/lib where we will be installing things
6521# $exec_prefix/lib likewise
6522# eval it to expand exec_prefix.
6523# $TMPDIR if set, where it might want to write temporary files
6524# if $TMPDIR is not set:
6525# /tmp where it might want to write temporary files
6526# /var/tmp likewise
6527# /usr/tmp likewise
6528if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
6529 ac_tmpdirs=$TMPDIR
6530else
6531 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
6532fi
6533for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
6534 test -d $ac_dir || continue
6535 test -w $ac_dir || continue # It is less confusing to not echo anything here.
6536 ac_xdir=$ac_dir/cf$$
6537 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
6538 ac_tf1=$ac_xdir/conftest9012345
6539 ac_tf2=$ac_xdir/conftest9012346
6540 (echo 1 >$ac_tf1) 2>/dev/null
6541 (echo 2 >$ac_tf2) 2>/dev/null
6542 ac_val=`cat $ac_tf1 2>/dev/null`
6543 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
6544 ac_cv_sys_long_file_names=no
6545 rm -rf $ac_xdir 2>/dev/null
6546 break
6547 fi
6548 rm -rf $ac_xdir 2>/dev/null
6549done
6550fi
c0d27fcc 6551echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
6552echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
6553if test $ac_cv_sys_long_file_names = yes; then
6554
c0d27fcc 6555cat >>confdefs.h <<\_ACEOF
98418dba 6556#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 6557_ACEOF
98418dba
CW
6558
6559fi
6560
c0d27fcc 6561
98418dba
CW
6562#### Choose a window system.
6563
c0d27fcc 6564echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
6565echo $ECHO_N "checking for X... $ECHO_C" >&6
6566
c0d27fcc 6567
98418dba
CW
6568# Check whether --with-x or --without-x was given.
6569if test "${with_x+set}" = set; then
6570 withval="$with_x"
6571
6572fi;
6573# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6574if test "x$with_x" = xno; then
6575 # The user explicitly disabled X.
6576 have_x=disabled
6577else
6578 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6579 # Both variables are already set.
6580 have_x=yes
6581 else
6582 if test "${ac_cv_have_x+set}" = set; then
6583 echo $ECHO_N "(cached) $ECHO_C" >&6
6584else
6585 # One or both of the vars are not set, and there is no cached value.
6586ac_x_includes=no ac_x_libraries=no
6587rm -fr conftest.dir
6588if mkdir conftest.dir; then
6589 cd conftest.dir
6590 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 6591 cat >Imakefile <<'_ACEOF'
98418dba
CW
6592acfindx:
6593 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 6594_ACEOF
98418dba
CW
6595 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6596 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6597 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6598 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6599 for ac_extension in a so sl; do
6600 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6601 test -f $ac_im_libdir/libX11.$ac_extension; then
6602 ac_im_usrlibdir=$ac_im_libdir; break
6603 fi
6604 done
6605 # Screen out bogus values from the imake configuration. They are
6606 # bogus both because they are the default anyway, and because
6607 # using them would break gcc on systems where it needs fixed includes.
6608 case $ac_im_incroot in
6609 /usr/include) ;;
6610 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6611 esac
6612 case $ac_im_usrlibdir in
6613 /usr/lib | /lib) ;;
6614 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6615 esac
6616 fi
6617 cd ..
6618 rm -fr conftest.dir
6619fi
6620
6621# Standard set of common directories for X headers.
6622# Check X11 before X11Rn because it is often a symlink to the current release.
6623ac_x_header_dirs='
6624/usr/X11/include
6625/usr/X11R6/include
6626/usr/X11R5/include
6627/usr/X11R4/include
6628
6629/usr/include/X11
6630/usr/include/X11R6
6631/usr/include/X11R5
6632/usr/include/X11R4
6633
6634/usr/local/X11/include
6635/usr/local/X11R6/include
6636/usr/local/X11R5/include
6637/usr/local/X11R4/include
6638
6639/usr/local/include/X11
6640/usr/local/include/X11R6
6641/usr/local/include/X11R5
6642/usr/local/include/X11R4
6643
6644/usr/X386/include
6645/usr/x386/include
6646/usr/XFree86/include/X11
6647
6648/usr/include
6649/usr/local/include
6650/usr/unsupported/include
6651/usr/athena/include
6652/usr/local/x11r5/include
6653/usr/lpp/Xamples/include
6654
6655/usr/openwin/include
6656/usr/openwin/share/include'
6657
6658if test "$ac_x_includes" = no; then
6659 # Guess where to find include files, by looking for Intrinsic.h.
6660 # First, try using that file with no special directory specified.
6661 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6662#line $LINENO "configure"
cd958eb3
MB
6663/* confdefs.h. */
6664_ACEOF
6665cat confdefs.h >>conftest.$ac_ext
6666cat >>conftest.$ac_ext <<_ACEOF
6667/* end confdefs.h. */
98418dba
CW
6668#include <X11/Intrinsic.h>
6669_ACEOF
c0d27fcc 6670if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
6671 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6672 ac_status=$?
6bae0ccf 6673 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6674 rm -f conftest.er1
6675 cat conftest.err >&5
c0d27fcc 6676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6677 (exit $ac_status); } >/dev/null; then
6678 if test -s conftest.err; then
6679 ac_cpp_err=$ac_c_preproc_warn_flag
6680 else
6681 ac_cpp_err=
6682 fi
6683else
6684 ac_cpp_err=yes
6685fi
6686if test -z "$ac_cpp_err"; then
6687 # We can compile using X headers with no special include directory.
6688ac_x_includes=
6689else
6690 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6691sed 's/^/| /' conftest.$ac_ext >&5
6692
98418dba
CW
6693 for ac_dir in $ac_x_header_dirs; do
6694 if test -r "$ac_dir/X11/Intrinsic.h"; then
6695 ac_x_includes=$ac_dir
6696 break
6697 fi
6698done
6699fi
6700rm -f conftest.err conftest.$ac_ext
6701fi # $ac_x_includes = no
6702
6703if test "$ac_x_libraries" = no; then
6704 # Check for the libraries.
6705 # See if we find them without any special options.
6706 # Don't add to $LIBS permanently.
6707 ac_save_LIBS=$LIBS
6708 LIBS="-lXt $LIBS"
6709 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6710#line $LINENO "configure"
cd958eb3
MB
6711/* confdefs.h. */
6712_ACEOF
6713cat confdefs.h >>conftest.$ac_ext
6714cat >>conftest.$ac_ext <<_ACEOF
6715/* end confdefs.h. */
98418dba 6716#include <X11/Intrinsic.h>
98418dba
CW
6717int
6718main ()
6719{
6720XtMalloc (0)
6721 ;
6722 return 0;
6723}
6724_ACEOF
6725rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6726if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
6727 (eval $ac_link) 2>&5
6728 ac_status=$?
c0d27fcc 6729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6730 (exit $ac_status); } &&
6731 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6733 (eval $ac_try) 2>&5
6734 ac_status=$?
c0d27fcc 6735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6736 (exit $ac_status); }; }; then
6737 LIBS=$ac_save_LIBS
6738# We can link X programs with no special library path.
6739ac_x_libraries=
6740else
6741 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6742sed 's/^/| /' conftest.$ac_ext >&5
6743
98418dba
CW
6744LIBS=$ac_save_LIBS
6745for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6746do
6747 # Don't even attempt the hair of trying to link an X program!
6748 for ac_extension in a so sl; do
6749 if test -r $ac_dir/libXt.$ac_extension; then
6750 ac_x_libraries=$ac_dir
6751 break 2
6752 fi
6753 done
6754done
6755fi
6756rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6757fi # $ac_x_libraries = no
6758
6759if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
6760 # Didn't find X anywhere. Cache the known absence of X.
6761 ac_cv_have_x="have_x=no"
6762else
6763 # Record where we found X for the cache.
6764 ac_cv_have_x="have_x=yes \
6765 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6766fi
6767fi
6768
6769 fi
6770 eval "$ac_cv_have_x"
6771fi # $with_x != no
6772
6773if test "$have_x" != yes; then
c0d27fcc 6774 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
6775echo "${ECHO_T}$have_x" >&6
6776 no_x=yes
6777else
6778 # If each of the values was on the command line, it overrides each guess.
6779 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6780 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6781 # Update the cache value to reflect the command line values.
6782 ac_cv_have_x="have_x=yes \
6783 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
c0d27fcc 6784 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
98418dba
CW
6785echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
6786fi
6787
6788if test "$no_x" = yes; then
6789 window_system=none
6790else
6791 window_system=x11
6792fi
6793
6794if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
6795 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
6796 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
6797 x_default_search_path=""
6798 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
6799 x_search_path="\
6800${x_library}/X11/%L/%T/%N%C%S:\
6801${x_library}/X11/%l/%T/%N%C%S:\
6802${x_library}/X11/%T/%N%C%S:\
6803${x_library}/X11/%L/%T/%N%S:\
6804${x_library}/X11/%l/%T/%N%S:\
6805${x_library}/X11/%T/%N%S"
6806 if test x"${x_default_search_path}" = x; then
6807 x_default_search_path=${x_search_path}
6808 else
6809 x_default_search_path="${x_search_path}:${x_default_search_path}"
6810 fi
6811 done
6812fi
6813if test "${x_includes}" != NONE && test -n "${x_includes}"; then
6814 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
6815fi
6816
6817if test x"${x_includes}" = x; then
6818 bitmapdir=/usr/include/X11/bitmaps
6819else
6820 # accumulate include directories that have X11 bitmap subdirectories
6821 bmd_acc="dummyval"
6822 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
6823 if test -d "${bmd}/X11/bitmaps"; then
6824 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
6825 fi
6826 if test -d "${bmd}/bitmaps"; then
6827 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
6828 fi
6829 done
6830 if test ${bmd_acc} != "dummyval"; then
6831 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
6832 fi
6833fi
6834
6835case "${window_system}" in
6836 x11 )
6837 HAVE_X_WINDOWS=yes
6838 HAVE_X11=yes
6839 case "${with_x_toolkit}" in
6840 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
6841 motif ) USE_X_TOOLKIT=MOTIF ;;
488dd4c4
JD
6842 gtk ) with_gtk=yes
6843 USE_X_TOOLKIT=none ;;
98418dba
CW
6844 no ) USE_X_TOOLKIT=none ;;
6845 * ) USE_X_TOOLKIT=maybe ;;
6846 esac
6847 ;;
6848 none )
6849 HAVE_X_WINDOWS=no
6850 HAVE_X11=no
6851 USE_X_TOOLKIT=none
6852 ;;
6853esac
6854
6855### If we're using X11, we should use the X menu package.
6856HAVE_MENUS=no
6857case ${HAVE_X11} in
6858 yes ) HAVE_MENUS=yes ;;
6859esac
6860
6861if test "${opsys}" = "hpux9"; then
6862 case "${x_libraries}" in
6863 *X11R4* )
6864 opsysfile="s/hpux9-x11r4.h"
6865 ;;
6866 esac
6867fi
6868
6869if test "${opsys}" = "hpux9shr"; then
6870 case "${x_libraries}" in
6871 *X11R4* )
6872 opsysfile="s/hpux9shxr4.h"
6873 ;;
6874 esac
6875fi
6876
6877### Compute the unexec source name from the object name.
6878UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
6879
6880# Do the opsystem or machine files prohibit the use of the GNU malloc?
6881# Assume not, until told otherwise.
6882GNU_MALLOC=yes
6883doug_lea_malloc=yes
c0d27fcc 6884echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
6885echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
6886if test "${ac_cv_func_malloc_get_state+set}" = set; then
6887 echo $ECHO_N "(cached) $ECHO_C" >&6
6888else
6889 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6890#line $LINENO "configure"
cd958eb3
MB
6891/* confdefs.h. */
6892_ACEOF
6893cat confdefs.h >>conftest.$ac_ext
6894cat >>conftest.$ac_ext <<_ACEOF
6895/* end confdefs.h. */
98418dba 6896/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
6897 which can conflict with char malloc_get_state (); below.
6898 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6899 <limits.h> exists even on freestanding compilers. */
6900#ifdef __STDC__
6901# include <limits.h>
6902#else
6903# include <assert.h>
6904#endif
98418dba
CW
6905/* Override any gcc2 internal prototype to avoid an error. */
6906#ifdef __cplusplus
6907extern "C"
cd958eb3 6908{
98418dba
CW
6909#endif
6910/* We use char because int might match the return type of a gcc2
6911 builtin and then its argument prototype would still apply. */
6912char malloc_get_state ();
98418dba
CW
6913/* The GNU C library defines this for functions which it implements
6914 to always fail with ENOSYS. Some functions are actually named
6915 something starting with __ and the normal name is an alias. */
6916#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
6917choke me
6918#else
cd958eb3
MB
6919char (*f) () = malloc_get_state;
6920#endif
6921#ifdef __cplusplus
6922}
98418dba
CW
6923#endif
6924
cd958eb3
MB
6925int
6926main ()
6927{
9e71690e 6928return f != malloc_get_state;
98418dba
CW
6929 ;
6930 return 0;
6931}
6932_ACEOF
6933rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6934if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
6935 (eval $ac_link) 2>&5
6936 ac_status=$?
c0d27fcc 6937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6938 (exit $ac_status); } &&
6939 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6941 (eval $ac_try) 2>&5
6942 ac_status=$?
c0d27fcc 6943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6944 (exit $ac_status); }; }; then
6945 ac_cv_func_malloc_get_state=yes
6946else
6947 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6948sed 's/^/| /' conftest.$ac_ext >&5
6949
98418dba
CW
6950ac_cv_func_malloc_get_state=no
6951fi
6952rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6953fi
c0d27fcc 6954echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
6955echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
6956if test $ac_cv_func_malloc_get_state = yes; then
6957 :
6958else
6959 doug_lea_malloc=no
6960fi
6961
c0d27fcc 6962echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
6963echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
6964if test "${ac_cv_func_malloc_set_state+set}" = set; then
6965 echo $ECHO_N "(cached) $ECHO_C" >&6
6966else
6967 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6968#line $LINENO "configure"
cd958eb3
MB
6969/* confdefs.h. */
6970_ACEOF
6971cat confdefs.h >>conftest.$ac_ext
6972cat >>conftest.$ac_ext <<_ACEOF
6973/* end confdefs.h. */
98418dba 6974/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
6975 which can conflict with char malloc_set_state (); below.
6976 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6977 <limits.h> exists even on freestanding compilers. */
6978#ifdef __STDC__
6979# include <limits.h>
6980#else
6981# include <assert.h>
6982#endif
98418dba
CW
6983/* Override any gcc2 internal prototype to avoid an error. */
6984#ifdef __cplusplus
6985extern "C"
cd958eb3 6986{
98418dba
CW
6987#endif
6988/* We use char because int might match the return type of a gcc2
6989 builtin and then its argument prototype would still apply. */
6990char malloc_set_state ();
98418dba
CW
6991/* The GNU C library defines this for functions which it implements
6992 to always fail with ENOSYS. Some functions are actually named
6993 something starting with __ and the normal name is an alias. */
6994#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
6995choke me
6996#else
cd958eb3
MB
6997char (*f) () = malloc_set_state;
6998#endif
6999#ifdef __cplusplus
7000}
98418dba
CW
7001#endif
7002
cd958eb3
MB
7003int
7004main ()
7005{
9e71690e 7006return f != malloc_set_state;
98418dba
CW
7007 ;
7008 return 0;
7009}
7010_ACEOF
7011rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7012if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7013 (eval $ac_link) 2>&5
7014 ac_status=$?
c0d27fcc 7015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7016 (exit $ac_status); } &&
7017 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7019 (eval $ac_try) 2>&5
7020 ac_status=$?
c0d27fcc 7021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7022 (exit $ac_status); }; }; then
7023 ac_cv_func_malloc_set_state=yes
7024else
7025 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7026sed 's/^/| /' conftest.$ac_ext >&5
7027
98418dba
CW
7028ac_cv_func_malloc_set_state=no
7029fi
7030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7031fi
c0d27fcc 7032echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
7033echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
7034if test $ac_cv_func_malloc_set_state = yes; then
7035 :
7036else
7037 doug_lea_malloc=no
7038fi
7039
c0d27fcc 7040echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
7041echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
7042if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
7043 echo $ECHO_N "(cached) $ECHO_C" >&6
7044else
7045 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7046#line $LINENO "configure"
cd958eb3
MB
7047/* confdefs.h. */
7048_ACEOF
7049cat confdefs.h >>conftest.$ac_ext
7050cat >>conftest.$ac_ext <<_ACEOF
7051/* end confdefs.h. */
98418dba 7052extern void (* __after_morecore_hook)();
98418dba
CW
7053int
7054main ()
7055{
7056__after_morecore_hook = 0
7057 ;
7058 return 0;
7059}
7060_ACEOF
7061rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7063 (eval $ac_link) 2>&5
7064 ac_status=$?
c0d27fcc 7065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7066 (exit $ac_status); } &&
7067 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7069 (eval $ac_try) 2>&5
7070 ac_status=$?
c0d27fcc 7071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7072 (exit $ac_status); }; }; then
7073 emacs_cv_var___after_morecore_hook=yes
7074else
7075 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7076sed 's/^/| /' conftest.$ac_ext >&5
7077
98418dba
CW
7078emacs_cv_var___after_morecore_hook=no
7079fi
7080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7081fi
c0d27fcc 7082echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
7083echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
7084if test $emacs_cv_var___after_morecore_hook = no; then
7085 doug_lea_malloc=no
7086fi
7087if test "${system_malloc}" = "yes"; then
7088 GNU_MALLOC=no
7089 GNU_MALLOC_reason="
7090 (The GNU allocators don't work with this system configuration.)"
7091fi
7092if test "$doug_lea_malloc" = "yes" ; then
7093 if test "$GNU_MALLOC" = yes ; then
7094 GNU_MALLOC_reason="
7095 (Using Doug Lea's new malloc from the GNU C Library.)"
7096 fi
b936fae4 7097
c0d27fcc 7098cat >>confdefs.h <<\_ACEOF
98418dba 7099#define DOUG_LEA_MALLOC 1
c0d27fcc 7100_ACEOF
98418dba
CW
7101
7102fi
7103
7104if test x"${REL_ALLOC}" = x; then
7105 REL_ALLOC=${GNU_MALLOC}
7106fi
7107
7108
c0d27fcc
MR
7109
7110
7111for ac_header in stdlib.h unistd.h
98418dba
CW
7112do
7113as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
7114if eval "test \"\${$as_ac_Header+set}\" = set"; then
7115 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
7116echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7117if eval "test \"\${$as_ac_Header+set}\" = set"; then
7118 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
7119fi
7120echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7121echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 7122else
c0d27fcc
MR
7123 # Is the header compilable?
7124echo "$as_me:$LINENO: checking $ac_header usability" >&5
7125echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7126cat >conftest.$ac_ext <<_ACEOF
7127#line $LINENO "configure"
cd958eb3
MB
7128/* confdefs.h. */
7129_ACEOF
7130cat confdefs.h >>conftest.$ac_ext
7131cat >>conftest.$ac_ext <<_ACEOF
7132/* end confdefs.h. */
98418dba
CW
7133$ac_includes_default
7134#include <$ac_header>
7135_ACEOF
7136rm -f conftest.$ac_objext
c0d27fcc 7137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
7138 (eval $ac_compile) 2>&5
7139 ac_status=$?
c0d27fcc 7140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7141 (exit $ac_status); } &&
7142 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7144 (eval $ac_try) 2>&5
7145 ac_status=$?
c0d27fcc 7146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7147 (exit $ac_status); }; }; then
c0d27fcc 7148 ac_header_compiler=yes
98418dba
CW
7149else
7150 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7151sed 's/^/| /' conftest.$ac_ext >&5
7152
c0d27fcc 7153ac_header_compiler=no
98418dba
CW
7154fi
7155rm -f conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
7156echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7157echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 7158
c0d27fcc
MR
7159# Is the header present?
7160echo "$as_me:$LINENO: checking $ac_header presence" >&5
7161echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7162cat >conftest.$ac_ext <<_ACEOF
7163#line $LINENO "configure"
cd958eb3
MB
7164/* confdefs.h. */
7165_ACEOF
7166cat confdefs.h >>conftest.$ac_ext
7167cat >>conftest.$ac_ext <<_ACEOF
7168/* end confdefs.h. */
98418dba
CW
7169#include <$ac_header>
7170_ACEOF
c0d27fcc 7171if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7172 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7173 ac_status=$?
6bae0ccf 7174 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
7175 rm -f conftest.er1
7176 cat conftest.err >&5
c0d27fcc 7177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7178 (exit $ac_status); } >/dev/null; then
7179 if test -s conftest.err; then
7180 ac_cpp_err=$ac_c_preproc_warn_flag
7181 else
7182 ac_cpp_err=
7183 fi
7184else
7185 ac_cpp_err=yes
7186fi
7187if test -z "$ac_cpp_err"; then
c0d27fcc 7188 ac_header_preproc=yes
98418dba
CW
7189else
7190 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7191sed 's/^/| /' conftest.$ac_ext >&5
7192
c0d27fcc 7193 ac_header_preproc=no
98418dba
CW
7194fi
7195rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
7196echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7197echo "${ECHO_T}$ac_header_preproc" >&6
7198
7199# So? What about this header?
7200case $ac_header_compiler:$ac_header_preproc in
7201 yes:no )
7202 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7203echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7204 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
7205echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7206 (
7207 cat <<\_ASBOX
7208## ------------------------------------ ##
7209## Report this to bug-autoconf@gnu.org. ##
7210## ------------------------------------ ##
7211_ASBOX
7212 ) |
7213 sed "s/^/$as_me: WARNING: /" >&2
7214 ;;
c0d27fcc
MR
7215 no:yes )
7216 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7217echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7218 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7219echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7220 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
7221echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7222 (
7223 cat <<\_ASBOX
7224## ------------------------------------ ##
7225## Report this to bug-autoconf@gnu.org. ##
7226## ------------------------------------ ##
7227_ASBOX
7228 ) |
7229 sed "s/^/$as_me: WARNING: /" >&2
7230 ;;
c0d27fcc
MR
7231esac
7232echo "$as_me:$LINENO: checking for $ac_header" >&5
7233echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7234if eval "test \"\${$as_ac_Header+set}\" = set"; then
7235 echo $ECHO_N "(cached) $ECHO_C" >&6
7236else
7237 eval "$as_ac_Header=$ac_header_preproc"
98418dba 7238fi
c0d27fcc 7239echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 7240echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
7241
7242fi
98418dba 7243if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 7244 cat >>confdefs.h <<_ACEOF
98418dba 7245#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 7246_ACEOF
98418dba
CW
7247
7248fi
c0d27fcc 7249
98418dba
CW
7250done
7251
c0d27fcc 7252
98418dba
CW
7253for ac_func in getpagesize
7254do
7255as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 7256echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
7257echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7258if eval "test \"\${$as_ac_var+set}\" = set"; then
7259 echo $ECHO_N "(cached) $ECHO_C" >&6
7260else
7261 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7262#line $LINENO "configure"
cd958eb3
MB
7263/* confdefs.h. */
7264_ACEOF
7265cat confdefs.h >>conftest.$ac_ext
7266cat >>conftest.$ac_ext <<_ACEOF
7267/* end confdefs.h. */
98418dba 7268/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
7269 which can conflict with char $ac_func (); below.
7270 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7271 <limits.h> exists even on freestanding compilers. */
7272#ifdef __STDC__
7273# include <limits.h>
7274#else
7275# include <assert.h>
7276#endif
98418dba
CW
7277/* Override any gcc2 internal prototype to avoid an error. */
7278#ifdef __cplusplus
7279extern "C"
cd958eb3 7280{
98418dba
CW
7281#endif
7282/* We use char because int might match the return type of a gcc2
7283 builtin and then its argument prototype would still apply. */
7284char $ac_func ();
98418dba
CW
7285/* The GNU C library defines this for functions which it implements
7286 to always fail with ENOSYS. Some functions are actually named
7287 something starting with __ and the normal name is an alias. */
7288#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7289choke me
7290#else
cd958eb3
MB
7291char (*f) () = $ac_func;
7292#endif
7293#ifdef __cplusplus
7294}
98418dba
CW
7295#endif
7296
cd958eb3
MB
7297int
7298main ()
7299{
9e71690e 7300return f != $ac_func;
98418dba
CW
7301 ;
7302 return 0;
7303}
7304_ACEOF
7305rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7306if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7307 (eval $ac_link) 2>&5
7308 ac_status=$?
c0d27fcc 7309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7310 (exit $ac_status); } &&
7311 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7313 (eval $ac_try) 2>&5
7314 ac_status=$?
c0d27fcc 7315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7316 (exit $ac_status); }; }; then
7317 eval "$as_ac_var=yes"
7318else
7319 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7320sed 's/^/| /' conftest.$ac_ext >&5
7321
98418dba
CW
7322eval "$as_ac_var=no"
7323fi
7324rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7325fi
c0d27fcc 7326echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
7327echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7328if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 7329 cat >>confdefs.h <<_ACEOF
98418dba 7330#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 7331_ACEOF
98418dba
CW
7332
7333fi
7334done
7335
c0d27fcc 7336echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
7337echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
7338if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7339 echo $ECHO_N "(cached) $ECHO_C" >&6
7340else
7341 if test "$cross_compiling" = yes; then
7342 ac_cv_func_mmap_fixed_mapped=no
7343else
7344 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7345#line $LINENO "configure"
cd958eb3
MB
7346/* confdefs.h. */
7347_ACEOF
7348cat confdefs.h >>conftest.$ac_ext
7349cat >>conftest.$ac_ext <<_ACEOF
7350/* end confdefs.h. */
98418dba 7351$ac_includes_default
c0d27fcc
MR
7352/* malloc might have been renamed as rpl_malloc. */
7353#undef malloc
7354
98418dba
CW
7355/* Thanks to Mike Haertel and Jim Avera for this test.
7356 Here is a matrix of mmap possibilities:
7357 mmap private not fixed
7358 mmap private fixed at somewhere currently unmapped
7359 mmap private fixed at somewhere already mapped
7360 mmap shared not fixed
7361 mmap shared fixed at somewhere currently unmapped
7362 mmap shared fixed at somewhere already mapped
7363 For private mappings, we should verify that changes cannot be read()
7364 back from the file, nor mmap's back from the file at a different
7365 address. (There have been systems where private was not correctly
7366 implemented like the infamous i386 svr4.0, and systems where the
7367 VM page cache was not coherent with the file system buffer cache
7368 like early versions of FreeBSD and possibly contemporary NetBSD.)
7369 For shared mappings, we should conversely verify that changes get
c0d27fcc 7370 propagated back to all the places they're supposed to be.
98418dba
CW
7371
7372 Grep wants private fixed already mapped.
7373 The main things grep needs to know about mmap are:
7374 * does it exist and is it safe to write into the mmap'd area
7375 * how to use it (BSD variants) */
7376
7377#include <fcntl.h>
7378#include <sys/mman.h>
7379
7380#if !STDC_HEADERS && !HAVE_STDLIB_H
7381char *malloc ();
7382#endif
7383
7384/* This mess was copied from the GNU getpagesize.h. */
7385#if !HAVE_GETPAGESIZE
7386/* Assume that all systems that can run configure have sys/param.h. */
7387# if !HAVE_SYS_PARAM_H
7388# define HAVE_SYS_PARAM_H 1
7389# endif
7390
7391# ifdef _SC_PAGESIZE
7392# define getpagesize() sysconf(_SC_PAGESIZE)
7393# else /* no _SC_PAGESIZE */
7394# if HAVE_SYS_PARAM_H
7395# include <sys/param.h>
7396# ifdef EXEC_PAGESIZE
7397# define getpagesize() EXEC_PAGESIZE
7398# else /* no EXEC_PAGESIZE */
7399# ifdef NBPG
7400# define getpagesize() NBPG * CLSIZE
7401# ifndef CLSIZE
7402# define CLSIZE 1
7403# endif /* no CLSIZE */
7404# else /* no NBPG */
7405# ifdef NBPC
7406# define getpagesize() NBPC
7407# else /* no NBPC */
7408# ifdef PAGESIZE
7409# define getpagesize() PAGESIZE
7410# endif /* PAGESIZE */
7411# endif /* no NBPC */
7412# endif /* no NBPG */
7413# endif /* no EXEC_PAGESIZE */
7414# else /* no HAVE_SYS_PARAM_H */
7415# define getpagesize() 8192 /* punt totally */
7416# endif /* no HAVE_SYS_PARAM_H */
7417# endif /* no _SC_PAGESIZE */
7418
7419#endif /* no HAVE_GETPAGESIZE */
7420
7421int
7422main ()
7423{
7424 char *data, *data2, *data3;
7425 int i, pagesize;
7426 int fd;
7427
7428 pagesize = getpagesize ();
7429
7430 /* First, make a file with some known garbage in it. */
7431 data = (char *) malloc (pagesize);
7432 if (!data)
7433 exit (1);
7434 for (i = 0; i < pagesize; ++i)
7435 *(data + i) = rand ();
7436 umask (0);
7437 fd = creat ("conftest.mmap", 0600);
7438 if (fd < 0)
7439 exit (1);
7440 if (write (fd, data, pagesize) != pagesize)
7441 exit (1);
7442 close (fd);
7443
7444 /* Next, try to mmap the file at a fixed address which already has
7445 something else allocated at it. If we can, also make sure that
7446 we see the same garbage. */
7447 fd = open ("conftest.mmap", O_RDWR);
7448 if (fd < 0)
7449 exit (1);
7450 data2 = (char *) malloc (2 * pagesize);
7451 if (!data2)
7452 exit (1);
7453 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7454 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7455 MAP_PRIVATE | MAP_FIXED, fd, 0L))
7456 exit (1);
7457 for (i = 0; i < pagesize; ++i)
7458 if (*(data + i) != *(data2 + i))
7459 exit (1);
7460
7461 /* Finally, make sure that changes to the mapped area do not
7462 percolate back to the file as seen by read(). (This is a bug on
7463 some variants of i386 svr4.0.) */
7464 for (i = 0; i < pagesize; ++i)
7465 *(data2 + i) = *(data2 + i) + 1;
7466 data3 = (char *) malloc (pagesize);
7467 if (!data3)
7468 exit (1);
7469 if (read (fd, data3, pagesize) != pagesize)
7470 exit (1);
7471 for (i = 0; i < pagesize; ++i)
7472 if (*(data + i) != *(data3 + i))
7473 exit (1);
7474 close (fd);
7475 exit (0);
7476}
7477_ACEOF
7478rm -f conftest$ac_exeext
c0d27fcc 7479if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7480 (eval $ac_link) 2>&5
7481 ac_status=$?
c0d27fcc 7482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7483 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 7484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7485 (eval $ac_try) 2>&5
7486 ac_status=$?
c0d27fcc 7487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7488 (exit $ac_status); }; }; then
7489 ac_cv_func_mmap_fixed_mapped=yes
7490else
7491 echo "$as_me: program exited with status $ac_status" >&5
7492echo "$as_me: failed program was:" >&5
cd958eb3
MB
7493sed 's/^/| /' conftest.$ac_ext >&5
7494
c0d27fcc 7495( exit $ac_status )
98418dba
CW
7496ac_cv_func_mmap_fixed_mapped=no
7497fi
6bae0ccf 7498rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
7499fi
7500fi
c0d27fcc 7501echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
7502echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7503if test $ac_cv_func_mmap_fixed_mapped = yes; then
7504
c0d27fcc 7505cat >>confdefs.h <<\_ACEOF
98418dba 7506#define HAVE_MMAP 1
c0d27fcc 7507_ACEOF
98418dba
CW
7508
7509fi
7510rm -f conftest.mmap
7511
7512if test $use_mmap_for_buffers = yes; then
7513 REL_ALLOC=no
7514fi
7515
7516LIBS="$libsrc_libs $LIBS"
7517
c0d27fcc
MR
7518
7519echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
7520echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
7521if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
7522 echo $ECHO_N "(cached) $ECHO_C" >&6
7523else
7524 ac_check_lib_save_LIBS=$LIBS
7525LIBS="-ldnet $LIBS"
7526cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7527#line $LINENO "configure"
cd958eb3
MB
7528/* confdefs.h. */
7529_ACEOF
7530cat confdefs.h >>conftest.$ac_ext
7531cat >>conftest.$ac_ext <<_ACEOF
7532/* end confdefs.h. */
98418dba
CW
7533
7534/* Override any gcc2 internal prototype to avoid an error. */
7535#ifdef __cplusplus
7536extern "C"
7537#endif
7538/* We use char because int might match the return type of a gcc2
7539 builtin and then its argument prototype would still apply. */
7540char dnet_ntoa ();
98418dba
CW
7541int
7542main ()
7543{
7544dnet_ntoa ();
7545 ;
7546 return 0;
7547}
7548_ACEOF
7549rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7551 (eval $ac_link) 2>&5
7552 ac_status=$?
c0d27fcc 7553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7554 (exit $ac_status); } &&
7555 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7557 (eval $ac_try) 2>&5
7558 ac_status=$?
c0d27fcc 7559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7560 (exit $ac_status); }; }; then
7561 ac_cv_lib_dnet_dnet_ntoa=yes
7562else
7563 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7564sed 's/^/| /' conftest.$ac_ext >&5
7565
98418dba
CW
7566ac_cv_lib_dnet_dnet_ntoa=no
7567fi
7568rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7569LIBS=$ac_check_lib_save_LIBS
7570fi
c0d27fcc 7571echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
7572echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
7573if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 7574 cat >>confdefs.h <<_ACEOF
98418dba 7575#define HAVE_LIBDNET 1
c0d27fcc 7576_ACEOF
98418dba
CW
7577
7578 LIBS="-ldnet $LIBS"
7579
7580fi
7581
c0d27fcc
MR
7582
7583echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
7584echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
7585if test "${ac_cv_lib_Xbsd_main+set}" = set; then
7586 echo $ECHO_N "(cached) $ECHO_C" >&6
7587else
7588 ac_check_lib_save_LIBS=$LIBS
7589LIBS="-lXbsd $LIBS"
7590cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7591#line $LINENO "configure"
cd958eb3
MB
7592/* confdefs.h. */
7593_ACEOF
7594cat confdefs.h >>conftest.$ac_ext
7595cat >>conftest.$ac_ext <<_ACEOF
7596/* end confdefs.h. */
98418dba 7597
c0d27fcc 7598
98418dba
CW
7599int
7600main ()
7601{
7602main ();
7603 ;
7604 return 0;
7605}
7606_ACEOF
7607rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7608if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7609 (eval $ac_link) 2>&5
7610 ac_status=$?
c0d27fcc 7611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7612 (exit $ac_status); } &&
7613 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7615 (eval $ac_try) 2>&5
7616 ac_status=$?
c0d27fcc 7617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7618 (exit $ac_status); }; }; then
7619 ac_cv_lib_Xbsd_main=yes
7620else
7621 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7622sed 's/^/| /' conftest.$ac_ext >&5
7623
98418dba
CW
7624ac_cv_lib_Xbsd_main=no
7625fi
7626rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7627LIBS=$ac_check_lib_save_LIBS
7628fi
c0d27fcc 7629echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
7630echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
7631if test $ac_cv_lib_Xbsd_main = yes; then
7632 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
7633fi
7634
c0d27fcc
MR
7635
7636
7637echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
7638echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
7639if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
7640 echo $ECHO_N "(cached) $ECHO_C" >&6
7641else
7642 ac_check_lib_save_LIBS=$LIBS
7643LIBS="-lpthreads $LIBS"
7644cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7645#line $LINENO "configure"
cd958eb3
MB
7646/* confdefs.h. */
7647_ACEOF
7648cat confdefs.h >>conftest.$ac_ext
7649cat >>conftest.$ac_ext <<_ACEOF
7650/* end confdefs.h. */
98418dba
CW
7651
7652/* Override any gcc2 internal prototype to avoid an error. */
7653#ifdef __cplusplus
7654extern "C"
7655#endif
7656/* We use char because int might match the return type of a gcc2
7657 builtin and then its argument prototype would still apply. */
7658char cma_open ();
98418dba
CW
7659int
7660main ()
7661{
7662cma_open ();
7663 ;
7664 return 0;
7665}
7666_ACEOF
7667rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7668if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7669 (eval $ac_link) 2>&5
7670 ac_status=$?
c0d27fcc 7671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7672 (exit $ac_status); } &&
7673 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7675 (eval $ac_try) 2>&5
7676 ac_status=$?
c0d27fcc 7677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7678 (exit $ac_status); }; }; then
7679 ac_cv_lib_pthreads_cma_open=yes
7680else
7681 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7682sed 's/^/| /' conftest.$ac_ext >&5
7683
98418dba
CW
7684ac_cv_lib_pthreads_cma_open=no
7685fi
7686rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7687LIBS=$ac_check_lib_save_LIBS
7688fi
c0d27fcc 7689echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
7690echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
7691if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 7692 cat >>confdefs.h <<_ACEOF
98418dba 7693#define HAVE_LIBPTHREADS 1
c0d27fcc 7694_ACEOF
98418dba
CW
7695
7696 LIBS="-lpthreads $LIBS"
7697
7698fi
7699
c0d27fcc
MR
7700
7701echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
7702echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
7703if test -d /usr/X386/include; then
7704 HAVE_XFREE386=yes
7705 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
7706else
7707 HAVE_XFREE386=no
7708fi
c0d27fcc 7709echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
7710echo "${ECHO_T}$HAVE_XFREE386" >&6
7711
55597d70
DL
7712
7713case ${host_os} in
7714aix*)
7715 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
7716echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
7717if test "${gdb_cv_bigtoc+set}" = set; then
7718 echo $ECHO_N "(cached) $ECHO_C" >&6
7719else
7720
7721 case $GCC in
7722 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
7723 *) gdb_cv_bigtoc=-bbigtoc ;;
7724 esac
7725
7726 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
7727 cat >conftest.$ac_ext <<_ACEOF
7728#line $LINENO "configure"
7729/* confdefs.h. */
7730_ACEOF
7731cat confdefs.h >>conftest.$ac_ext
7732cat >>conftest.$ac_ext <<_ACEOF
7733/* end confdefs.h. */
7734
7735int
7736main ()
7737{
7738int i;
7739 ;
7740 return 0;
7741}
7742_ACEOF
7743rm -f conftest.$ac_objext conftest$ac_exeext
7744if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7745 (eval $ac_link) 2>&5
7746 ac_status=$?
7747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7748 (exit $ac_status); } &&
7749 { ac_try='test -s conftest$ac_exeext'
7750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7751 (eval $ac_try) 2>&5
7752 ac_status=$?
7753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7754 (exit $ac_status); }; }; then
7755 :
7756else
7757 echo "$as_me: failed program was:" >&5
7758sed 's/^/| /' conftest.$ac_ext >&5
7759
7760gdb_cv_bigtoc=
7761fi
7762rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7763
7764fi
7765echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
7766echo "${ECHO_T}$gdb_cv_bigtoc" >&6
7767 ;;
7768esac
7769
ae1a998c
RS
7770# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
7771# used for the tests that follow. We set them back to REAL_CFLAGS and
7772# REAL_CPPFLAGS later on.
98418dba
CW
7773
7774REAL_CPPFLAGS="$CPPFLAGS"
7775
7776if test "${HAVE_X11}" = "yes"; then
7777 DEFS="$C_SWITCH_X_SITE $DEFS"
7778 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
7779 LIBS="$LIBX $LIBS"
7780 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
7781 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
7782
7783 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
7784 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
7785 # but it's more convenient here to set LD_RUN_PATH
7786 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
7787 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
7788 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
7789 export LD_RUN_PATH
7790 fi
7791
7792 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 7793 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
7794echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
7795 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7796#line $LINENO "configure"
cd958eb3
MB
7797/* confdefs.h. */
7798_ACEOF
7799cat confdefs.h >>conftest.$ac_ext
7800cat >>conftest.$ac_ext <<_ACEOF
7801/* end confdefs.h. */
98418dba 7802
98418dba
CW
7803int
7804main ()
7805{
7806XOpenDisplay ("foo");
7807 ;
7808 return 0;
7809}
7810_ACEOF
7811rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7812if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7813 (eval $ac_link) 2>&5
7814 ac_status=$?
c0d27fcc 7815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7816 (exit $ac_status); } &&
7817 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7819 (eval $ac_try) 2>&5
7820 ac_status=$?
c0d27fcc 7821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7822 (exit $ac_status); }; }; then
7823 xlinux_first_failure=no
7824else
7825 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7826sed 's/^/| /' conftest.$ac_ext >&5
7827
98418dba
CW
7828xlinux_first_failure=yes
7829fi
7830rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7831 if test "${xlinux_first_failure}" = "yes"; then
7832 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
7833 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
7834 OLD_CPPFLAGS="$CPPFLAGS"
7835 OLD_LIBS="$LIBS"
7836 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
7837 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
7838 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
7839 LIBS="$LIBS -b i486-linuxaout"
7840 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7841#line $LINENO "configure"
cd958eb3
MB
7842/* confdefs.h. */
7843_ACEOF
7844cat confdefs.h >>conftest.$ac_ext
7845cat >>conftest.$ac_ext <<_ACEOF
7846/* end confdefs.h. */
98418dba 7847
98418dba
CW
7848int
7849main ()
7850{
7851XOpenDisplay ("foo");
7852 ;
7853 return 0;
7854}
7855_ACEOF
7856rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7857if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7858 (eval $ac_link) 2>&5
7859 ac_status=$?
c0d27fcc 7860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7861 (exit $ac_status); } &&
7862 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7864 (eval $ac_try) 2>&5
7865 ac_status=$?
c0d27fcc 7866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7867 (exit $ac_status); }; }; then
7868 xlinux_second_failure=no
7869else
7870 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7871sed 's/^/| /' conftest.$ac_ext >&5
7872
98418dba
CW
7873xlinux_second_failure=yes
7874fi
7875rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7876 if test "${xlinux_second_failure}" = "yes"; then
7877 # If we get the same failure with -b, there is no use adding -b.
7878 # So take it out. This plays safe.
7879 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
7880 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
7881 CPPFLAGS="$OLD_CPPFLAGS"
7882 LIBS="$OLD_LIBS"
c0d27fcc 7883 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7884echo "${ECHO_T}no" >&6
7885 else
c0d27fcc 7886 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7887echo "${ECHO_T}yes" >&6
7888 fi
7889 else
c0d27fcc 7890 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7891echo "${ECHO_T}no" >&6
7892 fi
7893 fi
7894
7895 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
7896 # header files included from there.
c0d27fcc 7897 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
7898echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
7899 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7900#line $LINENO "configure"
cd958eb3
MB
7901/* confdefs.h. */
7902_ACEOF
7903cat confdefs.h >>conftest.$ac_ext
7904cat >>conftest.$ac_ext <<_ACEOF
7905/* end confdefs.h. */
98418dba
CW
7906#include <X11/Xlib.h>
7907#include <X11/XKBlib.h>
98418dba
CW
7908int
7909main ()
7910{
7911XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
7912 ;
7913 return 0;
7914}
7915_ACEOF
7916rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7917if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7918 (eval $ac_link) 2>&5
7919 ac_status=$?
c0d27fcc 7920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7921 (exit $ac_status); } &&
7922 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7924 (eval $ac_try) 2>&5
7925 ac_status=$?
c0d27fcc 7926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7927 (exit $ac_status); }; }; then
7928 emacs_xkb=yes
7929else
7930 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7931sed 's/^/| /' conftest.$ac_ext >&5
7932
98418dba
CW
7933emacs_xkb=no
7934fi
7935rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
c0d27fcc 7936 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
7937echo "${ECHO_T}$emacs_xkb" >&6
7938 if test $emacs_xkb = yes; then
b936fae4 7939
c0d27fcc 7940cat >>confdefs.h <<\_ACEOF
98418dba 7941#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 7942_ACEOF
98418dba
CW
7943
7944 fi
7945
c0d27fcc
MR
7946
7947
7948
7949
98418dba
CW
7950for ac_func in XrmSetDatabase XScreenResourceString \
7951XScreenNumberOfScreen XSetWMProtocols
7952do
7953as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 7954echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
7955echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7956if eval "test \"\${$as_ac_var+set}\" = set"; then
7957 echo $ECHO_N "(cached) $ECHO_C" >&6
7958else
7959 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7960#line $LINENO "configure"
cd958eb3
MB
7961/* confdefs.h. */
7962_ACEOF
7963cat confdefs.h >>conftest.$ac_ext
7964cat >>conftest.$ac_ext <<_ACEOF
7965/* end confdefs.h. */
98418dba 7966/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
7967 which can conflict with char $ac_func (); below.
7968 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7969 <limits.h> exists even on freestanding compilers. */
7970#ifdef __STDC__
7971# include <limits.h>
7972#else
7973# include <assert.h>
7974#endif
98418dba
CW
7975/* Override any gcc2 internal prototype to avoid an error. */
7976#ifdef __cplusplus
7977extern "C"
cd958eb3 7978{
98418dba
CW
7979#endif
7980/* We use char because int might match the return type of a gcc2
7981 builtin and then its argument prototype would still apply. */
7982char $ac_func ();
98418dba
CW
7983/* The GNU C library defines this for functions which it implements
7984 to always fail with ENOSYS. Some functions are actually named
7985 something starting with __ and the normal name is an alias. */
7986#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7987choke me
7988#else
cd958eb3
MB
7989char (*f) () = $ac_func;
7990#endif
7991#ifdef __cplusplus
7992}
98418dba
CW
7993#endif
7994
cd958eb3
MB
7995int
7996main ()
7997{
9e71690e 7998return f != $ac_func;
98418dba
CW
7999 ;
8000 return 0;
8001}
8002_ACEOF
8003rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8004if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8005 (eval $ac_link) 2>&5
8006 ac_status=$?
c0d27fcc 8007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8008 (exit $ac_status); } &&
8009 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8011 (eval $ac_try) 2>&5
8012 ac_status=$?
c0d27fcc 8013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8014 (exit $ac_status); }; }; then
8015 eval "$as_ac_var=yes"
8016else
8017 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8018sed 's/^/| /' conftest.$ac_ext >&5
8019
98418dba
CW
8020eval "$as_ac_var=no"
8021fi
8022rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8023fi
c0d27fcc 8024echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
8025echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8026if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 8027 cat >>confdefs.h <<_ACEOF
98418dba 8028#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 8029_ACEOF
98418dba
CW
8030
8031fi
8032done
8033
8034fi
8035
8036if test "${window_system}" = "x11"; then
c0d27fcc 8037 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
8038echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
8039 if test "${emacs_cv_x11_version_6+set}" = set; then
8040 echo $ECHO_N "(cached) $ECHO_C" >&6
8041else
8042 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8043#line $LINENO "configure"
cd958eb3
MB
8044/* confdefs.h. */
8045_ACEOF
8046cat confdefs.h >>conftest.$ac_ext
8047cat >>conftest.$ac_ext <<_ACEOF
8048/* end confdefs.h. */
98418dba 8049#include <X11/Xlib.h>
98418dba
CW
8050int
8051main ()
8052{
8053#if XlibSpecificationRelease < 6
8054fail;
8055#endif
8056
8057 ;
8058 return 0;
8059}
8060_ACEOF
8061rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8063 (eval $ac_link) 2>&5
8064 ac_status=$?
c0d27fcc 8065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8066 (exit $ac_status); } &&
8067 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8069 (eval $ac_try) 2>&5
8070 ac_status=$?
c0d27fcc 8071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8072 (exit $ac_status); }; }; then
8073 emacs_cv_x11_version_6=yes
8074else
8075 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8076sed 's/^/| /' conftest.$ac_ext >&5
8077
98418dba
CW
8078emacs_cv_x11_version_6=no
8079fi
8080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8081fi
8082
8083 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 8084 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 8085echo "${ECHO_T}6 or newer" >&6
b936fae4 8086
c0d27fcc 8087cat >>confdefs.h <<\_ACEOF
98418dba 8088#define HAVE_X11R6 1
c0d27fcc 8089_ACEOF
98418dba
CW
8090
8091 else
c0d27fcc 8092 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
8093echo "${ECHO_T}before 6" >&6
8094 fi
8095fi
8096
8097if test "${window_system}" = "x11"; then
c0d27fcc 8098 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
8099echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
8100 if test "${emacs_cv_x11_version_5+set}" = set; then
8101 echo $ECHO_N "(cached) $ECHO_C" >&6
8102else
8103 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8104#line $LINENO "configure"
cd958eb3
MB
8105/* confdefs.h. */
8106_ACEOF
8107cat confdefs.h >>conftest.$ac_ext
8108cat >>conftest.$ac_ext <<_ACEOF
8109/* end confdefs.h. */
98418dba 8110#include <X11/Xlib.h>
98418dba
CW
8111int
8112main ()
8113{
8114#if XlibSpecificationRelease < 5
8115fail;
8116#endif
8117
8118 ;
8119 return 0;
8120}
8121_ACEOF
8122rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8123if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8124 (eval $ac_link) 2>&5
8125 ac_status=$?
c0d27fcc 8126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8127 (exit $ac_status); } &&
8128 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8130 (eval $ac_try) 2>&5
8131 ac_status=$?
c0d27fcc 8132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8133 (exit $ac_status); }; }; then
8134 emacs_cv_x11_version_5=yes
8135else
8136 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8137sed 's/^/| /' conftest.$ac_ext >&5
8138
98418dba
CW
8139emacs_cv_x11_version_5=no
8140fi
8141rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8142fi
8143
8144 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 8145 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
8146echo "${ECHO_T}5 or newer" >&6
8147 HAVE_X11R5=yes
b936fae4 8148
c0d27fcc 8149cat >>confdefs.h <<\_ACEOF
98418dba 8150#define HAVE_X11R5 1
c0d27fcc 8151_ACEOF
98418dba
CW
8152
8153 else
8154 HAVE_X11R5=no
c0d27fcc 8155 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
8156echo "${ECHO_T}before 5" >&6
8157 fi
8158fi
8159
488dd4c4
JD
8160
8161
8162HAVE_GTK=no
8163if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 8164 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
8165 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
8166echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
8167 { (exit 1); exit 1; }; };
8168 fi
8169 GLIB_REQUIRED=2.0.1
8170 GTK_REQUIRED=2.0.1
8171 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
8172
8173 if test "X${with_pkg_config_prog}" != X; then
8174 PKG_CONFIG="${with_pkg_config_prog}"
8175 fi
8176
8177 succeeded=no
8178
8179 if test -z "$PKG_CONFIG"; then
8180 # Extract the first word of "pkg-config", so it can be a program name with args.
8181set dummy pkg-config; ac_word=$2
8182echo "$as_me:$LINENO: checking for $ac_word" >&5
8183echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8184if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
8185 echo $ECHO_N "(cached) $ECHO_C" >&6
8186else
8187 case $PKG_CONFIG in
8188 [\\/]* | ?:[\\/]*)
8189 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8190 ;;
8191 *)
8192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8193for as_dir in $PATH
8194do
8195 IFS=$as_save_IFS
8196 test -z "$as_dir" && as_dir=.
8197 for ac_exec_ext in '' $ac_executable_extensions; do
8198 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8199 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8200 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8201 break 2
8202 fi
8203done
8204done
8205
8206 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8207 ;;
8208esac
8209fi
8210PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8211
8212if test -n "$PKG_CONFIG"; then
8213 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
8214echo "${ECHO_T}$PKG_CONFIG" >&6
8215else
8216 echo "$as_me:$LINENO: result: no" >&5
8217echo "${ECHO_T}no" >&6
8218fi
8219
8220 fi
8221
8222 if test "$PKG_CONFIG" = "no" ; then
8223 echo "*** The pkg-config script could not be found. Make sure it is"
8224 echo "*** in your path, or give the full path to pkg-config with"
8225 echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog."
8226 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
8227 else
8228 PKG_CONFIG_MIN_VERSION=0.9.0
8229 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8230 echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
8231echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6
8232
8233 if $PKG_CONFIG --exists "$GTK_MODULES" ; then
8234 echo "$as_me:$LINENO: result: yes" >&5
8235echo "${ECHO_T}yes" >&6
8236 succeeded=yes
8237
8238 echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
8239echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
8240 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
8241 echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
8242echo "${ECHO_T}$GTK_CFLAGS" >&6
8243
8244 echo "$as_me:$LINENO: checking GTK_LIBS" >&5
8245echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
8246 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
8247 echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
8248echo "${ECHO_T}$GTK_LIBS" >&6
8249 else
8250 GTK_CFLAGS=""
8251 GTK_LIBS=""
8252 ## If we have a custom action on failure, don't print errors, but
8253 ## do set a variable so people can do so.
8254 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
8255 echo $GTK_PKG_ERRORS
8256 fi
8257
8258
8259
8260 else
8261 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8262 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8263 fi
8264 fi
8265
8266 if test $succeeded = yes; then
8267 :
8268 else
8269 { { 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
8270echo "$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;}
8271 { (exit 1); exit 1; }; }
8272 fi
8273
8274
8275
8276 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
8277 HAVE_GTK=yes
8278
8279cat >>confdefs.h <<\_ACEOF
8280#define HAVE_GTK 1
8281_ACEOF
8282
8283 USE_X_TOOLKIT=none
8284
8285 with_toolkit_scroll_bars=yes
8286fi
8287
98418dba
CW
8288if test x"${USE_X_TOOLKIT}" = xmaybe; then
8289 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 8290 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
8291echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
8292 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
8293 echo $ECHO_N "(cached) $ECHO_C" >&6
8294else
8295 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8296#line $LINENO "configure"
cd958eb3
MB
8297/* confdefs.h. */
8298_ACEOF
8299cat confdefs.h >>conftest.$ac_ext
8300cat >>conftest.$ac_ext <<_ACEOF
8301/* end confdefs.h. */
98418dba
CW
8302
8303#include <X11/Intrinsic.h>
8304#include <X11/Xaw/Simple.h>
98418dba
CW
8305int
8306main ()
8307{
8308
8309 ;
8310 return 0;
8311}
8312_ACEOF
8313rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8314if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8315 (eval $ac_link) 2>&5
8316 ac_status=$?
c0d27fcc 8317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8318 (exit $ac_status); } &&
8319 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8321 (eval $ac_try) 2>&5
8322 ac_status=$?
c0d27fcc 8323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8324 (exit $ac_status); }; }; then
8325 emacs_cv_x11_version_5_with_xaw=yes
8326else
8327 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8328sed 's/^/| /' conftest.$ac_ext >&5
8329
98418dba
CW
8330emacs_cv_x11_version_5_with_xaw=no
8331fi
8332rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8333fi
8334
8335 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 8336 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
8337echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
8338 USE_X_TOOLKIT=LUCID
8339 else
c0d27fcc 8340 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
8341echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
8342 USE_X_TOOLKIT=none
8343 fi
8344 else
8345 USE_X_TOOLKIT=none
8346 fi
8347fi
8348
8349X_TOOLKIT_TYPE=$USE_X_TOOLKIT
8350
8351if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 8352 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
8353echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
8354 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
8355 echo $ECHO_N "(cached) $ECHO_C" >&6
8356else
8357 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8358#line $LINENO "configure"
cd958eb3
MB
8359/* confdefs.h. */
8360_ACEOF
8361cat confdefs.h >>conftest.$ac_ext
8362cat >>conftest.$ac_ext <<_ACEOF
8363/* end confdefs.h. */
98418dba 8364#include <X11/Intrinsic.h>
98418dba
CW
8365int
8366main ()
8367{
8368#if XtSpecificationRelease < 6
8369fail;
8370#endif
8371
8372 ;
8373 return 0;
8374}
8375_ACEOF
8376rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8377if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8378 (eval $ac_link) 2>&5
8379 ac_status=$?
c0d27fcc 8380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8381 (exit $ac_status); } &&
8382 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8384 (eval $ac_try) 2>&5
8385 ac_status=$?
c0d27fcc 8386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8387 (exit $ac_status); }; }; then
8388 emacs_cv_x11_toolkit_version_6=yes
8389else
8390 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8391sed 's/^/| /' conftest.$ac_ext >&5
8392
98418dba
CW
8393emacs_cv_x11_toolkit_version_6=no
8394fi
8395rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8396fi
8397
8398 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
8399 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 8400 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 8401echo "${ECHO_T}6 or newer" >&6
b936fae4 8402
c0d27fcc 8403cat >>confdefs.h <<\_ACEOF
98418dba 8404#define HAVE_X11XTR6 1
c0d27fcc 8405_ACEOF
98418dba
CW
8406
8407 else
c0d27fcc 8408 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
8409echo "${ECHO_T}before 6" >&6
8410 fi
8411
8412 OLDLIBS="$LIBS"
8413 if test x$HAVE_X11XTR6 = xyes; then
8414 LIBS="-lXt -lSM -lICE $LIBS"
8415 else
8416 LIBS="-lXt $LIBS"
8417 fi
8418
c0d27fcc 8419echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
8420echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
8421if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
8422 echo $ECHO_N "(cached) $ECHO_C" >&6
8423else
8424 ac_check_lib_save_LIBS=$LIBS
8425LIBS="-lXmu $LIBS"
8426cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8427#line $LINENO "configure"
cd958eb3
MB
8428/* confdefs.h. */
8429_ACEOF
8430cat confdefs.h >>conftest.$ac_ext
8431cat >>conftest.$ac_ext <<_ACEOF
8432/* end confdefs.h. */
98418dba
CW
8433
8434/* Override any gcc2 internal prototype to avoid an error. */
8435#ifdef __cplusplus
8436extern "C"
8437#endif
8438/* We use char because int might match the return type of a gcc2
8439 builtin and then its argument prototype would still apply. */
8440char XmuConvertStandardSelection ();
98418dba
CW
8441int
8442main ()
8443{
8444XmuConvertStandardSelection ();
8445 ;
8446 return 0;
8447}
8448_ACEOF
8449rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8450if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8451 (eval $ac_link) 2>&5
8452 ac_status=$?
c0d27fcc 8453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8454 (exit $ac_status); } &&
8455 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8457 (eval $ac_try) 2>&5
8458 ac_status=$?
c0d27fcc 8459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8460 (exit $ac_status); }; }; then
8461 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
8462else
8463 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8464sed 's/^/| /' conftest.$ac_ext >&5
8465
98418dba
CW
8466ac_cv_lib_Xmu_XmuConvertStandardSelection=no
8467fi
8468rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8469LIBS=$ac_check_lib_save_LIBS
8470fi
c0d27fcc 8471echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
8472echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
8473if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 8474 cat >>confdefs.h <<_ACEOF
98418dba 8475#define HAVE_LIBXMU 1
c0d27fcc 8476_ACEOF
98418dba
CW
8477
8478 LIBS="-lXmu $LIBS"
8479
8480fi
8481
8482 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
8483fi
8484
8485# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
8486if test "${HAVE_X11}" = "yes"; then
8487 if test "${USE_X_TOOLKIT}" != "none"; then
8488
c0d27fcc 8489echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
8490echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
8491if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
8492 echo $ECHO_N "(cached) $ECHO_C" >&6
8493else
8494 ac_check_lib_save_LIBS=$LIBS
8495LIBS="-lXext $LIBS"
8496cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8497#line $LINENO "configure"
cd958eb3
MB
8498/* confdefs.h. */
8499_ACEOF
8500cat confdefs.h >>conftest.$ac_ext
8501cat >>conftest.$ac_ext <<_ACEOF
8502/* end confdefs.h. */
98418dba
CW
8503
8504/* Override any gcc2 internal prototype to avoid an error. */
8505#ifdef __cplusplus
8506extern "C"
8507#endif
8508/* We use char because int might match the return type of a gcc2
8509 builtin and then its argument prototype would still apply. */
8510char XShapeQueryExtension ();
98418dba
CW
8511int
8512main ()
8513{
8514XShapeQueryExtension ();
8515 ;
8516 return 0;
8517}
8518_ACEOF
8519rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8520if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8521 (eval $ac_link) 2>&5
8522 ac_status=$?
c0d27fcc 8523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8524 (exit $ac_status); } &&
8525 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8527 (eval $ac_try) 2>&5
8528 ac_status=$?
c0d27fcc 8529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8530 (exit $ac_status); }; }; then
8531 ac_cv_lib_Xext_XShapeQueryExtension=yes
8532else
8533 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8534sed 's/^/| /' conftest.$ac_ext >&5
8535
98418dba
CW
8536ac_cv_lib_Xext_XShapeQueryExtension=no
8537fi
8538rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8539LIBS=$ac_check_lib_save_LIBS
8540fi
c0d27fcc 8541echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
8542echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
8543if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 8544 cat >>confdefs.h <<_ACEOF
98418dba 8545#define HAVE_LIBXEXT 1
c0d27fcc 8546_ACEOF
98418dba
CW
8547
8548 LIBS="-lXext $LIBS"
8549
8550fi
8551
8552 fi
8553fi
8554
8555if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 8556 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
8e967cf7
MR
8557echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
8558if test "${emacs_cv_lesstif+set}" = set; then
8559 echo $ECHO_N "(cached) $ECHO_C" >&6
8560else
ae1a998c
RS
8561 # We put this in CFLAGS temporarily to precede other -I options
8562 # that might be in CFLAGS temporarily.
8563 # We put this in CPPFLAGS where it precedes the other -I options.
8564 OLD_CPPFLAGS=$CPPFLAGS
8565 OLD_CFLAGS=$CFLAGS
8566 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
8567 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
8e967cf7 8568 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8569#line $LINENO "configure"
cd958eb3
MB
8570/* confdefs.h. */
8571_ACEOF
8572cat confdefs.h >>conftest.$ac_ext
8573cat >>conftest.$ac_ext <<_ACEOF
8574/* end confdefs.h. */
8e967cf7
MR
8575#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
8576int
8577main ()
8578{
8579int x = 5;
8580 ;
8581 return 0;
8582}
8583_ACEOF
8584rm -f conftest.$ac_objext
c0d27fcc 8585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8e967cf7
MR
8586 (eval $ac_compile) 2>&5
8587 ac_status=$?
c0d27fcc 8588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7
MR
8589 (exit $ac_status); } &&
8590 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8e967cf7
MR
8592 (eval $ac_try) 2>&5
8593 ac_status=$?
c0d27fcc 8594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7
MR
8595 (exit $ac_status); }; }; then
8596 emacs_cv_lesstif=yes
8597else
8598 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8599sed 's/^/| /' conftest.$ac_ext >&5
8600
8e967cf7
MR
8601emacs_cv_lesstif=no
8602fi
8603rm -f conftest.$ac_objext conftest.$ac_ext
8604fi
c0d27fcc 8605echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
8e967cf7
MR
8606echo "${ECHO_T}$emacs_cv_lesstif" >&6
8607 if test $emacs_cv_lesstif = yes; then
ae1a998c
RS
8608 # Make sure this -I option remains in CPPFLAGS after it is set
8609 # back to REAL_CPPFLAGS.
8610 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
8611 # have those other -I options anyway. Ultimately, having this
8612 # directory ultimately in CPPFLAGS will be enough.
8613 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
8e967cf7 8614 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
ae1a998c
RS
8615 else
8616 CFLAGS=$OLD_CFLAGS
8617 CPPFLAGS=$OLD_CPPFLAGS
8e967cf7 8618 fi
c0d27fcc 8619 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
8620echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
8621if test "${emacs_cv_motif_version_2_1+set}" = set; then
8622 echo $ECHO_N "(cached) $ECHO_C" >&6
8623else
8624 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8625#line $LINENO "configure"
cd958eb3
MB
8626/* confdefs.h. */
8627_ACEOF
8628cat confdefs.h >>conftest.$ac_ext
8629cat >>conftest.$ac_ext <<_ACEOF
8630/* end confdefs.h. */
98418dba 8631#include <Xm/Xm.h>
98418dba
CW
8632int
8633main ()
8634{
8635#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
8636int x = 5;
8637#else
8638Motif version prior to 2.1.
8639#endif
8640 ;
8641 return 0;
8642}
8643_ACEOF
8644rm -f conftest.$ac_objext
c0d27fcc 8645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
8646 (eval $ac_compile) 2>&5
8647 ac_status=$?
c0d27fcc 8648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8649 (exit $ac_status); } &&
8650 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8652 (eval $ac_try) 2>&5
8653 ac_status=$?
c0d27fcc 8654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8655 (exit $ac_status); }; }; then
8656 emacs_cv_motif_version_2_1=yes
8657else
8658 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8659sed 's/^/| /' conftest.$ac_ext >&5
8660
98418dba
CW
8661emacs_cv_motif_version_2_1=no
8662fi
8663rm -f conftest.$ac_objext conftest.$ac_ext
8664fi
c0d27fcc 8665echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
8666echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
8667 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
8668 if test $emacs_cv_motif_version_2_1 = yes; then
8669 HAVE_LIBXP=no
b936fae4 8670
c0d27fcc 8671cat >>confdefs.h <<\_ACEOF
98418dba 8672#define HAVE_MOTIF_2_1 1
c0d27fcc 8673_ACEOF
98418dba 8674
c0d27fcc 8675 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
8676echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
8677if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
8678 echo $ECHO_N "(cached) $ECHO_C" >&6
8679else
8680 ac_check_lib_save_LIBS=$LIBS
8681LIBS="-lXp $LIBS"
8682cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8683#line $LINENO "configure"
cd958eb3
MB
8684/* confdefs.h. */
8685_ACEOF
8686cat confdefs.h >>conftest.$ac_ext
8687cat >>conftest.$ac_ext <<_ACEOF
8688/* end confdefs.h. */
98418dba
CW
8689
8690/* Override any gcc2 internal prototype to avoid an error. */
8691#ifdef __cplusplus
8692extern "C"
8693#endif
8694/* We use char because int might match the return type of a gcc2
8695 builtin and then its argument prototype would still apply. */
8696char XpCreateContext ();
98418dba
CW
8697int
8698main ()
8699{
8700XpCreateContext ();
8701 ;
8702 return 0;
8703}
8704_ACEOF
8705rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8706if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8707 (eval $ac_link) 2>&5
8708 ac_status=$?
c0d27fcc 8709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8710 (exit $ac_status); } &&
8711 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8713 (eval $ac_try) 2>&5
8714 ac_status=$?
c0d27fcc 8715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8716 (exit $ac_status); }; }; then
8717 ac_cv_lib_Xp_XpCreateContext=yes
8718else
8719 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8720sed 's/^/| /' conftest.$ac_ext >&5
8721
98418dba
CW
8722ac_cv_lib_Xp_XpCreateContext=no
8723fi
8724rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8725LIBS=$ac_check_lib_save_LIBS
8726fi
c0d27fcc 8727echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
8728echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
8729if test $ac_cv_lib_Xp_XpCreateContext = yes; then
8730 HAVE_LIBXP=yes
8731fi
503d2be0 8732
98418dba 8733 if test ${HAVE_LIBXP} = yes; then
b936fae4 8734
c0d27fcc 8735cat >>confdefs.h <<\_ACEOF
98418dba 8736#define HAVE_LIBXP 1
c0d27fcc 8737_ACEOF
503d2be0 8738
98418dba
CW
8739 fi
8740 fi
8741fi
8742
8743### Is -lXaw3d available?
8744HAVE_XAW3D=no
8745if test "${HAVE_X11}" = "yes"; then
8746 if test "${USE_X_TOOLKIT}" != "none"; then
22044edf 8747 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
8748echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
8749if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
8750 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 8751else
22044edf 8752 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8753#line $LINENO "configure"
cd958eb3
MB
8754/* confdefs.h. */
8755_ACEOF
8756cat confdefs.h >>conftest.$ac_ext
8757cat >>conftest.$ac_ext <<_ACEOF
8758/* end confdefs.h. */
98418dba 8759#include <X11/Xaw3d/Scrollbar.h>
503d2be0 8760_ACEOF
c0d27fcc 8761if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8762 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8763 ac_status=$?
6bae0ccf 8764 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
8765 rm -f conftest.er1
8766 cat conftest.err >&5
c0d27fcc 8767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
8768 (exit $ac_status); } >/dev/null; then
8769 if test -s conftest.err; then
8770 ac_cpp_err=$ac_c_preproc_warn_flag
8771 else
8772 ac_cpp_err=
8773 fi
8774else
8775 ac_cpp_err=yes
8776fi
8777if test -z "$ac_cpp_err"; then
22044edf 8778 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 8779else
503d2be0 8780 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8781sed 's/^/| /' conftest.$ac_ext >&5
8782
22044edf 8783 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 8784fi
503d2be0 8785rm -f conftest.err conftest.$ac_ext
98418dba 8786fi
c0d27fcc 8787echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 8788echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 8789if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 8790 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
8791echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
8792if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
8793 echo $ECHO_N "(cached) $ECHO_C" >&6
8794else
8795 ac_check_lib_save_LIBS=$LIBS
8796LIBS="-lXaw3d $LIBS"
8797cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8798#line $LINENO "configure"
cd958eb3
MB
8799/* confdefs.h. */
8800_ACEOF
8801cat confdefs.h >>conftest.$ac_ext
8802cat >>conftest.$ac_ext <<_ACEOF
8803/* end confdefs.h. */
98418dba
CW
8804
8805/* Override any gcc2 internal prototype to avoid an error. */
8806#ifdef __cplusplus
8807extern "C"
8808#endif
8809/* We use char because int might match the return type of a gcc2
8810 builtin and then its argument prototype would still apply. */
8811char XawScrollbarSetThumb ();
503d2be0
AS
8812int
8813main ()
8814{
98418dba 8815XawScrollbarSetThumb ();
503d2be0
AS
8816 ;
8817 return 0;
8818}
8819_ACEOF
8820rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8821if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
8822 (eval $ac_link) 2>&5
8823 ac_status=$?
c0d27fcc 8824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
8825 (exit $ac_status); } &&
8826 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
8828 (eval $ac_try) 2>&5
8829 ac_status=$?
c0d27fcc 8830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 8831 (exit $ac_status); }; }; then
98418dba 8832 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 8833else
503d2be0 8834 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8835sed 's/^/| /' conftest.$ac_ext >&5
8836
98418dba 8837ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 8838fi
503d2be0 8839rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 8840LIBS=$ac_check_lib_save_LIBS
ba4481b5 8841fi
c0d27fcc 8842echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
8843echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
8844if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
8845 HAVE_XAW3D=yes
ba4481b5 8846fi
503d2be0 8847
ba4481b5
DL
8848fi
8849
c0d27fcc 8850
98418dba 8851 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 8852
c0d27fcc 8853cat >>confdefs.h <<\_ACEOF
98418dba 8854#define HAVE_XAW3D 1
c0d27fcc 8855_ACEOF
98418dba 8856
ba4481b5 8857 fi
98418dba 8858 fi
ba4481b5
DL
8859fi
8860
c0d27fcc
MR
8861
8862
98418dba
CW
8863USE_TOOLKIT_SCROLL_BARS=no
8864if test "${with_toolkit_scroll_bars}" != "no"; then
8865 if test "${USE_X_TOOLKIT}" != "none"; then
8866 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 8867 cat >>confdefs.h <<\_ACEOF
98418dba 8868#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 8869_ACEOF
98418dba
CW
8870
8871 HAVE_XAW3D=no
8872 USE_TOOLKIT_SCROLL_BARS=yes
8873 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 8874 cat >>confdefs.h <<\_ACEOF
98418dba 8875#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 8876_ACEOF
98418dba
CW
8877
8878 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 8879 fi
488dd4c4
JD
8880 elif test "${HAVE_GTK}" = "yes"; then
8881 cat >>confdefs.h <<\_ACEOF
8882#define USE_TOOLKIT_SCROLL_BARS 1
8883_ACEOF
8884
8885 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
8886 fi
8887fi
8888
c0d27fcc 8889
98418dba 8890if test "${with_xim}" != "no"; then
b936fae4 8891
c0d27fcc 8892cat >>confdefs.h <<\_ACEOF
98418dba 8893#define USE_XIM 1
c0d27fcc 8894_ACEOF
98418dba 8895
849d80cf
DL
8896 late_CFLAGS=$CFLAGS
8897 if test "$GCC" = yes; then
8898 CFLAGS="$CFLAGS --pedantic-errors"
8899 fi
cffcede7
JD
8900 cat >conftest.$ac_ext <<_ACEOF
8901#line $LINENO "configure"
8902/* confdefs.h. */
8903_ACEOF
8904cat confdefs.h >>conftest.$ac_ext
8905cat >>conftest.$ac_ext <<_ACEOF
8906/* end confdefs.h. */
8907
8908#include <X11/Xlib.h>
8909#include <X11/Xresource.h>
8910int
8911main ()
8912{
8913Display *display;
8914XrmDatabase db;
8915char *res_name;
8916char *res_class;
8917XIMProc callback;
8918XPointer *client_data;
849d80cf
DL
8919#ifndef __GNUC__
8920/* If we're not using GCC, it's probably not XFree86, and this is
8921 probably right, but we can't use something like --pedantic-errors. */
8922extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
8923 char*, XIMProc, XPointer*);
8924#endif
cffcede7
JD
8925(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
8926 client_data);
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 emacs_cv_arg6_star=yes
8944else
8945 echo "$as_me: failed program was:" >&5
8946sed 's/^/| /' conftest.$ac_ext >&5
8947
8948fi
8949rm -f conftest.$ac_objext conftest.$ac_ext
8950
8951 if test "$emacs_cv_arg6_star" = yes; then
8952 cat >>confdefs.h <<\_ACEOF
8953#define XRegisterIMInstantiateCallback_arg6 XPointer*
8954_ACEOF
8955
8956 else
8957 cat >>confdefs.h <<\_ACEOF
8958#define XRegisterIMInstantiateCallback_arg6 XPointer
8959_ACEOF
8960
8961 fi
849d80cf 8962 CFLAGS=$late_CFLAGS
98418dba
CW
8963fi
8964
8965### Use -lXpm if available, unless `--with-xpm=no'.
8966HAVE_XPM=no
8967if test "${HAVE_X11}" = "yes"; then
8968 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
8969 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
8970 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
8971echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
8972if test "${ac_cv_header_X11_xpm_h+set}" = set; then
8973 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
8974fi
8975echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
8976echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 8977else
c0d27fcc
MR
8978 # Is the header compilable?
8979echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
8980echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
8981cat >conftest.$ac_ext <<_ACEOF
8982#line $LINENO "configure"
cd958eb3
MB
8983/* confdefs.h. */
8984_ACEOF
8985cat confdefs.h >>conftest.$ac_ext
8986cat >>conftest.$ac_ext <<_ACEOF
8987/* end confdefs.h. */
c0d27fcc
MR
8988$ac_includes_default
8989#include <X11/xpm.h>
8990_ACEOF
8991rm -f conftest.$ac_objext
8992if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8993 (eval $ac_compile) 2>&5
8994 ac_status=$?
8995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8996 (exit $ac_status); } &&
8997 { ac_try='test -s conftest.$ac_objext'
8998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8999 (eval $ac_try) 2>&5
9000 ac_status=$?
9001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9002 (exit $ac_status); }; }; then
9003 ac_header_compiler=yes
9004else
9005 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9006sed 's/^/| /' conftest.$ac_ext >&5
9007
c0d27fcc
MR
9008ac_header_compiler=no
9009fi
9010rm -f conftest.$ac_objext conftest.$ac_ext
9011echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9012echo "${ECHO_T}$ac_header_compiler" >&6
9013
9014# Is the header present?
9015echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
9016echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
9017cat >conftest.$ac_ext <<_ACEOF
9018#line $LINENO "configure"
cd958eb3
MB
9019/* confdefs.h. */
9020_ACEOF
9021cat confdefs.h >>conftest.$ac_ext
9022cat >>conftest.$ac_ext <<_ACEOF
9023/* end confdefs.h. */
98418dba
CW
9024#include <X11/xpm.h>
9025_ACEOF
c0d27fcc 9026if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9027 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9028 ac_status=$?
6bae0ccf 9029 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9030 rm -f conftest.er1
9031 cat conftest.err >&5
c0d27fcc 9032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9033 (exit $ac_status); } >/dev/null; then
9034 if test -s conftest.err; then
9035 ac_cpp_err=$ac_c_preproc_warn_flag
9036 else
9037 ac_cpp_err=
9038 fi
9039else
9040 ac_cpp_err=yes
9041fi
9042if test -z "$ac_cpp_err"; then
c0d27fcc 9043 ac_header_preproc=yes
98418dba
CW
9044else
9045 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9046sed 's/^/| /' conftest.$ac_ext >&5
9047
c0d27fcc 9048 ac_header_preproc=no
98418dba
CW
9049fi
9050rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9051echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9052echo "${ECHO_T}$ac_header_preproc" >&6
9053
9054# So? What about this header?
9055case $ac_header_compiler:$ac_header_preproc in
9056 yes:no )
9057 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
9058echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9059 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9060echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
9061 (
9062 cat <<\_ASBOX
9063## ------------------------------------ ##
9064## Report this to bug-autoconf@gnu.org. ##
9065## ------------------------------------ ##
9066_ASBOX
9067 ) |
9068 sed "s/^/$as_me: WARNING: /" >&2
9069 ;;
c0d27fcc
MR
9070 no:yes )
9071 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
9072echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
9073 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
9074echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
9075 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9076echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
9077 (
9078 cat <<\_ASBOX
9079## ------------------------------------ ##
9080## Report this to bug-autoconf@gnu.org. ##
9081## ------------------------------------ ##
9082_ASBOX
9083 ) |
9084 sed "s/^/$as_me: WARNING: /" >&2
9085 ;;
c0d27fcc
MR
9086esac
9087echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
9088echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
9089if test "${ac_cv_header_X11_xpm_h+set}" = set; then
9090 echo $ECHO_N "(cached) $ECHO_C" >&6
9091else
9092 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 9093fi
c0d27fcc 9094echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 9095echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
9096
9097fi
98418dba 9098if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 9099 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
9100echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
9101if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 9102 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9103else
98418dba
CW
9104 ac_check_lib_save_LIBS=$LIBS
9105LIBS="-lXpm -lX11 $LIBS"
9106cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9107#line $LINENO "configure"
cd958eb3
MB
9108/* confdefs.h. */
9109_ACEOF
9110cat confdefs.h >>conftest.$ac_ext
9111cat >>conftest.$ac_ext <<_ACEOF
9112/* end confdefs.h. */
98418dba 9113
ba4481b5 9114/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9115#ifdef __cplusplus
9116extern "C"
9117#endif
ba4481b5 9118/* We use char because int might match the return type of a gcc2
503d2be0 9119 builtin and then its argument prototype would still apply. */
98418dba 9120char XpmReadFileToPixmap ();
503d2be0
AS
9121int
9122main ()
9123{
98418dba 9124XpmReadFileToPixmap ();
503d2be0
AS
9125 ;
9126 return 0;
9127}
9128_ACEOF
9129rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9131 (eval $ac_link) 2>&5
9132 ac_status=$?
c0d27fcc 9133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
9134 (exit $ac_status); } &&
9135 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
9137 (eval $ac_try) 2>&5
9138 ac_status=$?
c0d27fcc 9139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9140 (exit $ac_status); }; }; then
98418dba 9141 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
9142else
9143 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9144sed 's/^/| /' conftest.$ac_ext >&5
9145
98418dba 9146ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0
AS
9147fi
9148rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 9149LIBS=$ac_check_lib_save_LIBS
503d2be0 9150fi
c0d27fcc 9151echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
9152echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
9153if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
9154 HAVE_XPM=yes
ba4481b5
DL
9155fi
9156
98418dba
CW
9157fi
9158
c0d27fcc 9159
98418dba 9160 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 9161 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
9162echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
9163 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9164#line $LINENO "configure"
cd958eb3
MB
9165/* confdefs.h. */
9166_ACEOF
9167cat confdefs.h >>conftest.$ac_ext
9168cat >>conftest.$ac_ext <<_ACEOF
9169/* end confdefs.h. */
98418dba
CW
9170#include "X11/xpm.h"
9171#ifndef XpmReturnAllocPixels
9172no_return_alloc_pixels
503d2be0 9173#endif
ba4481b5 9174
98418dba
CW
9175_ACEOF
9176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 9177 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
9178 HAVE_XPM=no
9179else
9180 HAVE_XPM=yes
9181fi
9182rm -f conftest*
ba4481b5 9183
c0d27fcc 9184
98418dba 9185 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 9186 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
9187echo "${ECHO_T}yes" >&6
9188 else
c0d27fcc 9189 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9190echo "${ECHO_T}no" >&6
9191 fi
9192 fi
9193 fi
9194
9195 if test "${HAVE_XPM}" = "yes"; then
b936fae4 9196
c0d27fcc 9197cat >>confdefs.h <<\_ACEOF
98418dba 9198#define HAVE_XPM 1
c0d27fcc 9199_ACEOF
98418dba
CW
9200
9201 fi
9202fi
9203
9204### Use -ljpeg if available, unless `--with-jpeg=no'.
9205HAVE_JPEG=no
9206if test "${HAVE_X11}" = "yes"; then
9207 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
9208 if test "${ac_cv_header_jerror_h+set}" = set; then
9209 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
9210echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
9211if test "${ac_cv_header_jerror_h+set}" = set; then
9212 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9213fi
9214echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
9215echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 9216else
c0d27fcc
MR
9217 # Is the header compilable?
9218echo "$as_me:$LINENO: checking jerror.h usability" >&5
9219echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
9220cat >conftest.$ac_ext <<_ACEOF
9221#line $LINENO "configure"
cd958eb3
MB
9222/* confdefs.h. */
9223_ACEOF
9224cat confdefs.h >>conftest.$ac_ext
9225cat >>conftest.$ac_ext <<_ACEOF
9226/* end confdefs.h. */
c0d27fcc
MR
9227$ac_includes_default
9228#include <jerror.h>
9229_ACEOF
9230rm -f conftest.$ac_objext
9231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9232 (eval $ac_compile) 2>&5
9233 ac_status=$?
9234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9235 (exit $ac_status); } &&
9236 { ac_try='test -s conftest.$ac_objext'
9237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9238 (eval $ac_try) 2>&5
9239 ac_status=$?
9240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9241 (exit $ac_status); }; }; then
9242 ac_header_compiler=yes
9243else
9244 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9245sed 's/^/| /' conftest.$ac_ext >&5
9246
c0d27fcc
MR
9247ac_header_compiler=no
9248fi
9249rm -f conftest.$ac_objext conftest.$ac_ext
9250echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9251echo "${ECHO_T}$ac_header_compiler" >&6
9252
9253# Is the header present?
9254echo "$as_me:$LINENO: checking jerror.h presence" >&5
9255echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
9256cat >conftest.$ac_ext <<_ACEOF
9257#line $LINENO "configure"
cd958eb3
MB
9258/* confdefs.h. */
9259_ACEOF
9260cat confdefs.h >>conftest.$ac_ext
9261cat >>conftest.$ac_ext <<_ACEOF
9262/* end confdefs.h. */
98418dba
CW
9263#include <jerror.h>
9264_ACEOF
c0d27fcc 9265if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9266 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9267 ac_status=$?
6bae0ccf 9268 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9269 rm -f conftest.er1
9270 cat conftest.err >&5
c0d27fcc 9271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9272 (exit $ac_status); } >/dev/null; then
9273 if test -s conftest.err; then
9274 ac_cpp_err=$ac_c_preproc_warn_flag
9275 else
9276 ac_cpp_err=
9277 fi
9278else
9279 ac_cpp_err=yes
503d2be0 9280fi
98418dba 9281if test -z "$ac_cpp_err"; then
c0d27fcc 9282 ac_header_preproc=yes
ba4481b5 9283else
98418dba 9284 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9285sed 's/^/| /' conftest.$ac_ext >&5
9286
c0d27fcc 9287 ac_header_preproc=no
98418dba
CW
9288fi
9289rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9290echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9291echo "${ECHO_T}$ac_header_preproc" >&6
9292
9293# So? What about this header?
9294case $ac_header_compiler:$ac_header_preproc in
9295 yes:no )
9296 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
9297echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9298 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9299echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
9300 (
9301 cat <<\_ASBOX
9302## ------------------------------------ ##
9303## Report this to bug-autoconf@gnu.org. ##
9304## ------------------------------------ ##
9305_ASBOX
9306 ) |
9307 sed "s/^/$as_me: WARNING: /" >&2
9308 ;;
c0d27fcc
MR
9309 no:yes )
9310 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
9311echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
9312 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
9313echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
9314 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9315echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
9316 (
9317 cat <<\_ASBOX
9318## ------------------------------------ ##
9319## Report this to bug-autoconf@gnu.org. ##
9320## ------------------------------------ ##
9321_ASBOX
9322 ) |
9323 sed "s/^/$as_me: WARNING: /" >&2
9324 ;;
c0d27fcc
MR
9325esac
9326echo "$as_me:$LINENO: checking for jerror.h" >&5
9327echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
9328if test "${ac_cv_header_jerror_h+set}" = set; then
9329 echo $ECHO_N "(cached) $ECHO_C" >&6
9330else
9331 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 9332fi
c0d27fcc 9333echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 9334echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
9335
9336fi
98418dba 9337if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 9338 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
9339echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
9340if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 9341 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9342else
98418dba
CW
9343 ac_check_lib_save_LIBS=$LIBS
9344LIBS="-ljpeg $LIBS"
9345cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9346#line $LINENO "configure"
cd958eb3
MB
9347/* confdefs.h. */
9348_ACEOF
9349cat confdefs.h >>conftest.$ac_ext
9350cat >>conftest.$ac_ext <<_ACEOF
9351/* end confdefs.h. */
98418dba
CW
9352
9353/* Override any gcc2 internal prototype to avoid an error. */
9354#ifdef __cplusplus
9355extern "C"
9356#endif
9357/* We use char because int might match the return type of a gcc2
9358 builtin and then its argument prototype would still apply. */
9359char jpeg_destroy_compress ();
503d2be0
AS
9360int
9361main ()
9362{
98418dba 9363jpeg_destroy_compress ();
503d2be0
AS
9364 ;
9365 return 0;
9366}
9367_ACEOF
9368rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9369if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9370 (eval $ac_link) 2>&5
9371 ac_status=$?
c0d27fcc 9372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
9373 (exit $ac_status); } &&
9374 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
9376 (eval $ac_try) 2>&5
9377 ac_status=$?
c0d27fcc 9378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9379 (exit $ac_status); }; }; then
98418dba 9380 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 9381else
503d2be0 9382 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9383sed 's/^/| /' conftest.$ac_ext >&5
9384
98418dba 9385ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 9386fi
503d2be0 9387rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 9388LIBS=$ac_check_lib_save_LIBS
ba4481b5 9389fi
c0d27fcc 9390echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
9391echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
9392if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
9393 HAVE_JPEG=yes
ba4481b5 9394fi
98418dba 9395
ba4481b5 9396fi
98418dba 9397
c0d27fcc 9398
ba4481b5 9399 fi
ba4481b5 9400
c0d27fcc 9401
98418dba 9402 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 9403 cat >>confdefs.h <<\_ACEOF
98418dba 9404#define HAVE_JPEG 1
c0d27fcc 9405_ACEOF
98418dba
CW
9406
9407 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9408#line $LINENO "configure"
cd958eb3
MB
9409/* confdefs.h. */
9410_ACEOF
9411cat confdefs.h >>conftest.$ac_ext
9412cat >>conftest.$ac_ext <<_ACEOF
9413/* end confdefs.h. */
22044edf 9414#include <jpeglib.h>
98418dba
CW
9415 version=JPEG_LIB_VERSION
9416
9417_ACEOF
9418if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 9419 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 9420 cat >>confdefs.h <<\_ACEOF
98418dba 9421#define HAVE_JPEG 1
c0d27fcc 9422_ACEOF
ba4481b5 9423
98418dba 9424else
c0d27fcc 9425 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
9426echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
9427 HAVE_JPEG=no
ba4481b5 9428fi
98418dba 9429rm -f conftest*
ba4481b5 9430
98418dba
CW
9431 fi
9432fi
503d2be0 9433
98418dba
CW
9434### Use -lpng if available, unless `--with-png=no'.
9435HAVE_PNG=no
9436if test "${HAVE_X11}" = "yes"; then
9437 if test "${with_png}" != "no"; then
c0d27fcc
MR
9438 if test "${ac_cv_header_png_h+set}" = set; then
9439 echo "$as_me:$LINENO: checking for png.h" >&5
98418dba
CW
9440echo $ECHO_N "checking for png.h... $ECHO_C" >&6
9441if test "${ac_cv_header_png_h+set}" = set; then
503d2be0 9442 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9443fi
9444echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
9445echo "${ECHO_T}$ac_cv_header_png_h" >&6
503d2be0 9446else
c0d27fcc
MR
9447 # Is the header compilable?
9448echo "$as_me:$LINENO: checking png.h usability" >&5
9449echo $ECHO_N "checking png.h usability... $ECHO_C" >&6
9450cat >conftest.$ac_ext <<_ACEOF
9451#line $LINENO "configure"
cd958eb3
MB
9452/* confdefs.h. */
9453_ACEOF
9454cat confdefs.h >>conftest.$ac_ext
9455cat >>conftest.$ac_ext <<_ACEOF
9456/* end confdefs.h. */
c0d27fcc
MR
9457$ac_includes_default
9458#include <png.h>
9459_ACEOF
9460rm -f conftest.$ac_objext
9461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9462 (eval $ac_compile) 2>&5
9463 ac_status=$?
9464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9465 (exit $ac_status); } &&
9466 { ac_try='test -s conftest.$ac_objext'
9467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9468 (eval $ac_try) 2>&5
9469 ac_status=$?
9470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9471 (exit $ac_status); }; }; then
9472 ac_header_compiler=yes
9473else
9474 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9475sed 's/^/| /' conftest.$ac_ext >&5
9476
c0d27fcc
MR
9477ac_header_compiler=no
9478fi
9479rm -f conftest.$ac_objext conftest.$ac_ext
9480echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9481echo "${ECHO_T}$ac_header_compiler" >&6
9482
9483# Is the header present?
9484echo "$as_me:$LINENO: checking png.h presence" >&5
9485echo $ECHO_N "checking png.h presence... $ECHO_C" >&6
9486cat >conftest.$ac_ext <<_ACEOF
9487#line $LINENO "configure"
cd958eb3
MB
9488/* confdefs.h. */
9489_ACEOF
9490cat confdefs.h >>conftest.$ac_ext
9491cat >>conftest.$ac_ext <<_ACEOF
9492/* end confdefs.h. */
98418dba 9493#include <png.h>
503d2be0 9494_ACEOF
c0d27fcc 9495if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9496 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9497 ac_status=$?
6bae0ccf 9498 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
9499 rm -f conftest.er1
9500 cat conftest.err >&5
c0d27fcc 9501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
9502 (exit $ac_status); } >/dev/null; then
9503 if test -s conftest.err; then
9504 ac_cpp_err=$ac_c_preproc_warn_flag
9505 else
9506 ac_cpp_err=
9507 fi
9508else
9509 ac_cpp_err=yes
9510fi
9511if test -z "$ac_cpp_err"; then
c0d27fcc 9512 ac_header_preproc=yes
503d2be0
AS
9513else
9514 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9515sed 's/^/| /' conftest.$ac_ext >&5
9516
c0d27fcc 9517 ac_header_preproc=no
ba4481b5 9518fi
503d2be0 9519rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9520echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9521echo "${ECHO_T}$ac_header_preproc" >&6
9522
9523# So? What about this header?
9524case $ac_header_compiler:$ac_header_preproc in
9525 yes:no )
9526 { echo "$as_me:$LINENO: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&5
9527echo "$as_me: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9528 { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9529echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;}
9530 (
9531 cat <<\_ASBOX
9532## ------------------------------------ ##
9533## Report this to bug-autoconf@gnu.org. ##
9534## ------------------------------------ ##
9535_ASBOX
9536 ) |
9537 sed "s/^/$as_me: WARNING: /" >&2
9538 ;;
c0d27fcc
MR
9539 no:yes )
9540 { echo "$as_me:$LINENO: WARNING: png.h: present but cannot be compiled" >&5
9541echo "$as_me: WARNING: png.h: present but cannot be compiled" >&2;}
9542 { echo "$as_me:$LINENO: WARNING: png.h: check for missing prerequisite headers?" >&5
9543echo "$as_me: WARNING: png.h: check for missing prerequisite headers?" >&2;}
9544 { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9545echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;}
9546 (
9547 cat <<\_ASBOX
9548## ------------------------------------ ##
9549## Report this to bug-autoconf@gnu.org. ##
9550## ------------------------------------ ##
9551_ASBOX
9552 ) |
9553 sed "s/^/$as_me: WARNING: /" >&2
9554 ;;
c0d27fcc
MR
9555esac
9556echo "$as_me:$LINENO: checking for png.h" >&5
9557echo $ECHO_N "checking for png.h... $ECHO_C" >&6
9558if test "${ac_cv_header_png_h+set}" = set; then
9559 echo $ECHO_N "(cached) $ECHO_C" >&6
9560else
9561 ac_cv_header_png_h=$ac_header_preproc
ba4481b5 9562fi
c0d27fcc 9563echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
98418dba 9564echo "${ECHO_T}$ac_cv_header_png_h" >&6
c0d27fcc
MR
9565
9566fi
98418dba 9567if test $ac_cv_header_png_h = yes; then
c0d27fcc 9568 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
9569echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
9570if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 9571 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9572else
98418dba
CW
9573 ac_check_lib_save_LIBS=$LIBS
9574LIBS="-lpng -lz -lm $LIBS"
9575cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9576#line $LINENO "configure"
cd958eb3
MB
9577/* confdefs.h. */
9578_ACEOF
9579cat confdefs.h >>conftest.$ac_ext
9580cat >>conftest.$ac_ext <<_ACEOF
9581/* end confdefs.h. */
98418dba 9582
ba4481b5 9583/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9584#ifdef __cplusplus
9585extern "C"
9586#endif
ba4481b5 9587/* We use char because int might match the return type of a gcc2
503d2be0 9588 builtin and then its argument prototype would still apply. */
98418dba 9589char png_get_channels ();
503d2be0
AS
9590int
9591main ()
9592{
98418dba 9593png_get_channels ();
503d2be0
AS
9594 ;
9595 return 0;
9596}
9597_ACEOF
9598rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9599if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9600 (eval $ac_link) 2>&5
9601 ac_status=$?
c0d27fcc 9602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9603 (exit $ac_status); } &&
9604 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
9606 (eval $ac_try) 2>&5
9607 ac_status=$?
c0d27fcc 9608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9609 (exit $ac_status); }; }; then
98418dba 9610 ac_cv_lib_png_png_get_channels=yes
73b77ee5 9611else
98418dba 9612 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9613sed 's/^/| /' conftest.$ac_ext >&5
9614
98418dba 9615ac_cv_lib_png_png_get_channels=no
73b77ee5 9616fi
98418dba
CW
9617rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9618LIBS=$ac_check_lib_save_LIBS
73b77ee5 9619fi
c0d27fcc 9620echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
9621echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
9622if test $ac_cv_lib_png_png_get_channels = yes; then
9623 HAVE_PNG=yes
73b77ee5 9624fi
503d2be0 9625
98418dba
CW
9626fi
9627
c0d27fcc 9628
98418dba
CW
9629 fi
9630
9631 if test "${HAVE_PNG}" = "yes"; then
b936fae4 9632
c0d27fcc 9633cat >>confdefs.h <<\_ACEOF
98418dba 9634#define HAVE_PNG 1
c0d27fcc 9635_ACEOF
73b77ee5 9636
98418dba 9637 fi
73b77ee5
GM
9638fi
9639
98418dba
CW
9640### Use -ltiff if available, unless `--with-tiff=no'.
9641HAVE_TIFF=no
9642if test "${HAVE_X11}" = "yes"; then
9643 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
9644 if test "${ac_cv_header_tiffio_h+set}" = set; then
9645 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
9646echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
9647if test "${ac_cv_header_tiffio_h+set}" = set; then
9648 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9649fi
9650echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
9651echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 9652else
c0d27fcc
MR
9653 # Is the header compilable?
9654echo "$as_me:$LINENO: checking tiffio.h usability" >&5
9655echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
9656cat >conftest.$ac_ext <<_ACEOF
9657#line $LINENO "configure"
cd958eb3
MB
9658/* confdefs.h. */
9659_ACEOF
9660cat confdefs.h >>conftest.$ac_ext
9661cat >>conftest.$ac_ext <<_ACEOF
9662/* end confdefs.h. */
c0d27fcc
MR
9663$ac_includes_default
9664#include <tiffio.h>
9665_ACEOF
9666rm -f conftest.$ac_objext
9667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9668 (eval $ac_compile) 2>&5
9669 ac_status=$?
9670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9671 (exit $ac_status); } &&
9672 { ac_try='test -s conftest.$ac_objext'
9673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9674 (eval $ac_try) 2>&5
9675 ac_status=$?
9676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9677 (exit $ac_status); }; }; then
9678 ac_header_compiler=yes
9679else
9680 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9681sed 's/^/| /' conftest.$ac_ext >&5
9682
c0d27fcc
MR
9683ac_header_compiler=no
9684fi
9685rm -f conftest.$ac_objext conftest.$ac_ext
9686echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9687echo "${ECHO_T}$ac_header_compiler" >&6
9688
9689# Is the header present?
9690echo "$as_me:$LINENO: checking tiffio.h presence" >&5
9691echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
9692cat >conftest.$ac_ext <<_ACEOF
9693#line $LINENO "configure"
cd958eb3
MB
9694/* confdefs.h. */
9695_ACEOF
9696cat confdefs.h >>conftest.$ac_ext
9697cat >>conftest.$ac_ext <<_ACEOF
9698/* end confdefs.h. */
98418dba
CW
9699#include <tiffio.h>
9700_ACEOF
c0d27fcc 9701if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9702 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9703 ac_status=$?
6bae0ccf 9704 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9705 rm -f conftest.er1
9706 cat conftest.err >&5
c0d27fcc 9707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9708 (exit $ac_status); } >/dev/null; then
9709 if test -s conftest.err; then
9710 ac_cpp_err=$ac_c_preproc_warn_flag
9711 else
9712 ac_cpp_err=
9713 fi
9714else
9715 ac_cpp_err=yes
9716fi
9717if test -z "$ac_cpp_err"; then
c0d27fcc 9718 ac_header_preproc=yes
98418dba
CW
9719else
9720 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9721sed 's/^/| /' conftest.$ac_ext >&5
9722
c0d27fcc 9723 ac_header_preproc=no
98418dba
CW
9724fi
9725rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9726echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9727echo "${ECHO_T}$ac_header_preproc" >&6
9728
9729# So? What about this header?
9730case $ac_header_compiler:$ac_header_preproc in
9731 yes:no )
9732 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
9733echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9734 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9735echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
9736 (
9737 cat <<\_ASBOX
9738## ------------------------------------ ##
9739## Report this to bug-autoconf@gnu.org. ##
9740## ------------------------------------ ##
9741_ASBOX
9742 ) |
9743 sed "s/^/$as_me: WARNING: /" >&2
9744 ;;
c0d27fcc
MR
9745 no:yes )
9746 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
9747echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
9748 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
9749echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
9750 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9751echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
9752 (
9753 cat <<\_ASBOX
9754## ------------------------------------ ##
9755## Report this to bug-autoconf@gnu.org. ##
9756## ------------------------------------ ##
9757_ASBOX
9758 ) |
9759 sed "s/^/$as_me: WARNING: /" >&2
9760 ;;
c0d27fcc
MR
9761esac
9762echo "$as_me:$LINENO: checking for tiffio.h" >&5
9763echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
9764if test "${ac_cv_header_tiffio_h+set}" = set; then
9765 echo $ECHO_N "(cached) $ECHO_C" >&6
9766else
9767 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 9768fi
c0d27fcc 9769echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 9770echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
9771
9772fi
98418dba
CW
9773if test $ac_cv_header_tiffio_h = yes; then
9774 tifflibs="-lz -lm"
9775 # At least one tiff package requires the jpeg library.
9776 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 9777 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
9778echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
9779if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 9780 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 9781else
503d2be0 9782 ac_check_lib_save_LIBS=$LIBS
98418dba 9783LIBS="-ltiff $tifflibs $LIBS"
503d2be0 9784cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9785#line $LINENO "configure"
cd958eb3
MB
9786/* confdefs.h. */
9787_ACEOF
9788cat confdefs.h >>conftest.$ac_ext
9789cat >>conftest.$ac_ext <<_ACEOF
9790/* end confdefs.h. */
503d2be0 9791
73b77ee5 9792/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9793#ifdef __cplusplus
9794extern "C"
9795#endif
73b77ee5 9796/* We use char because int might match the return type of a gcc2
503d2be0 9797 builtin and then its argument prototype would still apply. */
98418dba 9798char TIFFGetVersion ();
503d2be0
AS
9799int
9800main ()
9801{
98418dba 9802TIFFGetVersion ();
503d2be0
AS
9803 ;
9804 return 0;
9805}
9806_ACEOF
9807rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9808if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9809 (eval $ac_link) 2>&5
9810 ac_status=$?
c0d27fcc 9811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
9812 (exit $ac_status); } &&
9813 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
9815 (eval $ac_try) 2>&5
9816 ac_status=$?
c0d27fcc 9817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9818 (exit $ac_status); }; }; then
98418dba 9819 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
9820else
9821 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9822sed 's/^/| /' conftest.$ac_ext >&5
9823
98418dba 9824ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0
AS
9825fi
9826rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9827LIBS=$ac_check_lib_save_LIBS
9828fi
c0d27fcc 9829echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
9830echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
9831if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
9832 HAVE_TIFF=yes
9833fi
9834
9835fi
73b77ee5 9836
c0d27fcc 9837
98418dba
CW
9838 fi
9839
9840 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 9841
c0d27fcc 9842cat >>confdefs.h <<\_ACEOF
98418dba 9843#define HAVE_TIFF 1
c0d27fcc 9844_ACEOF
98418dba
CW
9845
9846 fi
73b77ee5
GM
9847fi
9848
98418dba
CW
9849### Use -lgif if available, unless `--with-gif=no'.
9850HAVE_GIF=no
9851if test "${HAVE_X11}" = "yes"; then
9852 if test "${with_gif}" != "no"; then
c0d27fcc
MR
9853 if test "${ac_cv_header_gif_lib_h+set}" = set; then
9854 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
9855echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
9856if test "${ac_cv_header_gif_lib_h+set}" = set; then
9857 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9858fi
9859echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
9860echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 9861else
c0d27fcc
MR
9862 # Is the header compilable?
9863echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
9864echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
9865cat >conftest.$ac_ext <<_ACEOF
9866#line $LINENO "configure"
cd958eb3
MB
9867/* confdefs.h. */
9868_ACEOF
9869cat confdefs.h >>conftest.$ac_ext
9870cat >>conftest.$ac_ext <<_ACEOF
9871/* end confdefs.h. */
c0d27fcc
MR
9872$ac_includes_default
9873#include <gif_lib.h>
9874_ACEOF
9875rm -f conftest.$ac_objext
9876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9877 (eval $ac_compile) 2>&5
9878 ac_status=$?
9879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9880 (exit $ac_status); } &&
9881 { ac_try='test -s conftest.$ac_objext'
9882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9883 (eval $ac_try) 2>&5
9884 ac_status=$?
9885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9886 (exit $ac_status); }; }; then
9887 ac_header_compiler=yes
9888else
9889 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9890sed 's/^/| /' conftest.$ac_ext >&5
9891
c0d27fcc
MR
9892ac_header_compiler=no
9893fi
9894rm -f conftest.$ac_objext conftest.$ac_ext
9895echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9896echo "${ECHO_T}$ac_header_compiler" >&6
9897
9898# Is the header present?
9899echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
9900echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
9901cat >conftest.$ac_ext <<_ACEOF
9902#line $LINENO "configure"
cd958eb3
MB
9903/* confdefs.h. */
9904_ACEOF
9905cat confdefs.h >>conftest.$ac_ext
9906cat >>conftest.$ac_ext <<_ACEOF
9907/* end confdefs.h. */
98418dba
CW
9908#include <gif_lib.h>
9909_ACEOF
c0d27fcc 9910if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9911 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9912 ac_status=$?
6bae0ccf 9913 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9914 rm -f conftest.er1
9915 cat conftest.err >&5
c0d27fcc 9916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9917 (exit $ac_status); } >/dev/null; then
9918 if test -s conftest.err; then
9919 ac_cpp_err=$ac_c_preproc_warn_flag
9920 else
9921 ac_cpp_err=
9922 fi
9923else
9924 ac_cpp_err=yes
9925fi
9926if test -z "$ac_cpp_err"; then
c0d27fcc 9927 ac_header_preproc=yes
98418dba
CW
9928else
9929 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9930sed 's/^/| /' conftest.$ac_ext >&5
9931
c0d27fcc 9932 ac_header_preproc=no
98418dba
CW
9933fi
9934rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9935echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9936echo "${ECHO_T}$ac_header_preproc" >&6
9937
9938# So? What about this header?
9939case $ac_header_compiler:$ac_header_preproc in
9940 yes:no )
9941 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9942echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9943 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9944echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
9945 (
9946 cat <<\_ASBOX
9947## ------------------------------------ ##
9948## Report this to bug-autoconf@gnu.org. ##
9949## ------------------------------------ ##
9950_ASBOX
9951 ) |
9952 sed "s/^/$as_me: WARNING: /" >&2
9953 ;;
c0d27fcc
MR
9954 no:yes )
9955 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
9956echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
9957 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
9958echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
9959 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9960echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
9961 (
9962 cat <<\_ASBOX
9963## ------------------------------------ ##
9964## Report this to bug-autoconf@gnu.org. ##
9965## ------------------------------------ ##
9966_ASBOX
9967 ) |
9968 sed "s/^/$as_me: WARNING: /" >&2
9969 ;;
c0d27fcc
MR
9970esac
9971echo "$as_me:$LINENO: checking for gif_lib.h" >&5
9972echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
9973if test "${ac_cv_header_gif_lib_h+set}" = set; then
9974 echo $ECHO_N "(cached) $ECHO_C" >&6
9975else
9976 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 9977fi
c0d27fcc 9978echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 9979echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
9980
9981fi
98418dba
CW
9982if test $ac_cv_header_gif_lib_h = yes; then
9983 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
9984# Earlier versions can crash Emacs.
c0d27fcc 9985 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
9986echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
9987if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 9988 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 9989else
503d2be0 9990 ac_check_lib_save_LIBS=$LIBS
98418dba 9991LIBS="-lungif $LIBS"
503d2be0 9992cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9993#line $LINENO "configure"
cd958eb3
MB
9994/* confdefs.h. */
9995_ACEOF
9996cat confdefs.h >>conftest.$ac_ext
9997cat >>conftest.$ac_ext <<_ACEOF
9998/* end confdefs.h. */
73b77ee5 9999
98418dba
CW
10000/* Override any gcc2 internal prototype to avoid an error. */
10001#ifdef __cplusplus
10002extern "C"
10003#endif
10004/* We use char because int might match the return type of a gcc2
10005 builtin and then its argument prototype would still apply. */
10006char EGifPutExtensionLast ();
503d2be0
AS
10007int
10008main ()
10009{
98418dba 10010EGifPutExtensionLast ();
503d2be0
AS
10011 ;
10012 return 0;
10013}
10014_ACEOF
10015rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10016if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10017 (eval $ac_link) 2>&5
10018 ac_status=$?
c0d27fcc 10019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10020 (exit $ac_status); } &&
10021 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10023 (eval $ac_try) 2>&5
10024 ac_status=$?
c0d27fcc 10025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10026 (exit $ac_status); }; }; then
10027 ac_cv_lib_ungif_EGifPutExtensionLast=yes
10028else
10029 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10030sed 's/^/| /' conftest.$ac_ext >&5
10031
98418dba
CW
10032ac_cv_lib_ungif_EGifPutExtensionLast=no
10033fi
10034rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10035LIBS=$ac_check_lib_save_LIBS
10036fi
c0d27fcc 10037echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
10038echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
10039if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
10040 HAVE_GIF=yes
10041fi
10042
10043fi
10044
c0d27fcc 10045
98418dba
CW
10046 fi
10047
10048 if test "${HAVE_GIF}" = "yes"; then
b936fae4 10049
c0d27fcc 10050cat >>confdefs.h <<\_ACEOF
98418dba 10051#define HAVE_GIF 1
c0d27fcc 10052_ACEOF
98418dba
CW
10053
10054 fi
10055fi
10056
c0d27fcc
MR
10057### Use Mac OS X Carbon API to implement GUI.
10058HAVE_CARBON=no
10059if test "${with_carbon}" != "no"; then
10060 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
10061 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
10062echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
10063if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
10064 echo $ECHO_N "(cached) $ECHO_C" >&6
10065fi
10066echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
10067echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
10068else
10069 # Is the header compilable?
10070echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
10071echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
10072cat >conftest.$ac_ext <<_ACEOF
10073#line $LINENO "configure"
cd958eb3
MB
10074/* confdefs.h. */
10075_ACEOF
10076cat confdefs.h >>conftest.$ac_ext
10077cat >>conftest.$ac_ext <<_ACEOF
10078/* end confdefs.h. */
c0d27fcc
MR
10079$ac_includes_default
10080#include <Carbon/Carbon.h>
10081_ACEOF
10082rm -f conftest.$ac_objext
10083if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10084 (eval $ac_compile) 2>&5
10085 ac_status=$?
10086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10087 (exit $ac_status); } &&
10088 { ac_try='test -s conftest.$ac_objext'
10089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10090 (eval $ac_try) 2>&5
10091 ac_status=$?
10092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10093 (exit $ac_status); }; }; then
10094 ac_header_compiler=yes
10095else
10096 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10097sed 's/^/| /' conftest.$ac_ext >&5
10098
c0d27fcc
MR
10099ac_header_compiler=no
10100fi
10101rm -f conftest.$ac_objext conftest.$ac_ext
10102echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10103echo "${ECHO_T}$ac_header_compiler" >&6
10104
10105# Is the header present?
10106echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
10107echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
10108cat >conftest.$ac_ext <<_ACEOF
10109#line $LINENO "configure"
cd958eb3
MB
10110/* confdefs.h. */
10111_ACEOF
10112cat confdefs.h >>conftest.$ac_ext
10113cat >>conftest.$ac_ext <<_ACEOF
10114/* end confdefs.h. */
e0f712ba
AC
10115#include <Carbon/Carbon.h>
10116_ACEOF
c0d27fcc 10117if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
e0f712ba
AC
10118 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10119 ac_status=$?
6bae0ccf 10120 grep -v '^ *+' conftest.er1 >conftest.err
e0f712ba
AC
10121 rm -f conftest.er1
10122 cat conftest.err >&5
c0d27fcc 10123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
e0f712ba
AC
10124 (exit $ac_status); } >/dev/null; then
10125 if test -s conftest.err; then
10126 ac_cpp_err=$ac_c_preproc_warn_flag
10127 else
10128 ac_cpp_err=
10129 fi
10130else
10131 ac_cpp_err=yes
10132fi
10133if test -z "$ac_cpp_err"; then
c0d27fcc 10134 ac_header_preproc=yes
e0f712ba
AC
10135else
10136 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10137sed 's/^/| /' conftest.$ac_ext >&5
10138
c0d27fcc 10139 ac_header_preproc=no
e0f712ba
AC
10140fi
10141rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
10142echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10143echo "${ECHO_T}$ac_header_preproc" >&6
10144
10145# So? What about this header?
10146case $ac_header_compiler:$ac_header_preproc in
10147 yes:no )
10148 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
10149echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10150 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
10151echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
10152 (
10153 cat <<\_ASBOX
10154## ------------------------------------ ##
10155## Report this to bug-autoconf@gnu.org. ##
10156## ------------------------------------ ##
10157_ASBOX
10158 ) |
10159 sed "s/^/$as_me: WARNING: /" >&2
10160 ;;
c0d27fcc
MR
10161 no:yes )
10162 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
10163echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
10164 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
10165echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
10166 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
10167echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
10168 (
10169 cat <<\_ASBOX
10170## ------------------------------------ ##
10171## Report this to bug-autoconf@gnu.org. ##
10172## ------------------------------------ ##
10173_ASBOX
10174 ) |
10175 sed "s/^/$as_me: WARNING: /" >&2
10176 ;;
c0d27fcc
MR
10177esac
10178echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
10179echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
10180if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
10181 echo $ECHO_N "(cached) $ECHO_C" >&6
10182else
10183 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
e0f712ba 10184fi
c0d27fcc 10185echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
e0f712ba 10186echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
c0d27fcc
MR
10187
10188fi
e0f712ba
AC
10189if test $ac_cv_header_Carbon_Carbon_h = yes; then
10190 HAVE_CARBON=yes
10191fi
10192
c0d27fcc 10193
e0f712ba
AC
10194fi
10195
10196if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 10197
c0d27fcc 10198cat >>confdefs.h <<\_ACEOF
e0f712ba 10199#define HAVE_CARBON 1
c0d27fcc 10200_ACEOF
e0f712ba 10201
6a3a24fa
JD
10202 window_system=mac
10203 ## Specify the install directory
10204 carbon_appdir=
10205 if test "${carbon_appdir_x}" != ""; then
10206 case ${carbon_appdir_x} in
10207 y | ye | yes) carbon_appdir=/Applications ;;
10208 * ) carbon_appdir=${carbon_appdir_x} ;;
10209 esac
10210 fi
8f417b3b
AS
10211 # We also have mouse menus.
10212 HAVE_MENUS=yes
e0f712ba
AC
10213fi
10214
98418dba
CW
10215### Use session management (-lSM -lICE) if available
10216HAVE_X_SM=no
10217if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
10218 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
10219 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
10220echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
10221if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
10222 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
10223fi
10224echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
10225echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 10226else
c0d27fcc
MR
10227 # Is the header compilable?
10228echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
10229echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
10230cat >conftest.$ac_ext <<_ACEOF
10231#line $LINENO "configure"
cd958eb3
MB
10232/* confdefs.h. */
10233_ACEOF
10234cat confdefs.h >>conftest.$ac_ext
10235cat >>conftest.$ac_ext <<_ACEOF
10236/* end confdefs.h. */
c0d27fcc
MR
10237$ac_includes_default
10238#include <X11/SM/SMlib.h>
10239_ACEOF
10240rm -f conftest.$ac_objext
10241if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10242 (eval $ac_compile) 2>&5
10243 ac_status=$?
10244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10245 (exit $ac_status); } &&
10246 { ac_try='test -s conftest.$ac_objext'
10247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10248 (eval $ac_try) 2>&5
10249 ac_status=$?
10250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10251 (exit $ac_status); }; }; then
10252 ac_header_compiler=yes
10253else
10254 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10255sed 's/^/| /' conftest.$ac_ext >&5
10256
c0d27fcc
MR
10257ac_header_compiler=no
10258fi
10259rm -f conftest.$ac_objext conftest.$ac_ext
10260echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10261echo "${ECHO_T}$ac_header_compiler" >&6
10262
10263# Is the header present?
10264echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
10265echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
10266cat >conftest.$ac_ext <<_ACEOF
10267#line $LINENO "configure"
cd958eb3
MB
10268/* confdefs.h. */
10269_ACEOF
10270cat confdefs.h >>conftest.$ac_ext
10271cat >>conftest.$ac_ext <<_ACEOF
10272/* end confdefs.h. */
98418dba
CW
10273#include <X11/SM/SMlib.h>
10274_ACEOF
c0d27fcc 10275if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
10276 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10277 ac_status=$?
6bae0ccf 10278 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
10279 rm -f conftest.er1
10280 cat conftest.err >&5
c0d27fcc 10281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10282 (exit $ac_status); } >/dev/null; then
10283 if test -s conftest.err; then
10284 ac_cpp_err=$ac_c_preproc_warn_flag
10285 else
10286 ac_cpp_err=
10287 fi
10288else
10289 ac_cpp_err=yes
503d2be0 10290fi
98418dba 10291if test -z "$ac_cpp_err"; then
c0d27fcc 10292 ac_header_preproc=yes
98418dba
CW
10293else
10294 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10295sed 's/^/| /' conftest.$ac_ext >&5
10296
c0d27fcc 10297 ac_header_preproc=no
98418dba
CW
10298fi
10299rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
10300echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10301echo "${ECHO_T}$ac_header_preproc" >&6
10302
10303# So? What about this header?
10304case $ac_header_compiler:$ac_header_preproc in
10305 yes:no )
10306 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
10307echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10308 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
10309echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
10310 (
10311 cat <<\_ASBOX
10312## ------------------------------------ ##
10313## Report this to bug-autoconf@gnu.org. ##
10314## ------------------------------------ ##
10315_ASBOX
10316 ) |
10317 sed "s/^/$as_me: WARNING: /" >&2
10318 ;;
c0d27fcc
MR
10319 no:yes )
10320 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
10321echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
10322 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
10323echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
10324 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
10325echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
10326 (
10327 cat <<\_ASBOX
10328## ------------------------------------ ##
10329## Report this to bug-autoconf@gnu.org. ##
10330## ------------------------------------ ##
10331_ASBOX
10332 ) |
10333 sed "s/^/$as_me: WARNING: /" >&2
10334 ;;
c0d27fcc
MR
10335esac
10336echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
10337echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
10338if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
10339 echo $ECHO_N "(cached) $ECHO_C" >&6
10340else
10341 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 10342fi
c0d27fcc 10343echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 10344echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
10345
10346fi
98418dba 10347if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 10348 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
10349echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
10350if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 10351 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 10352else
503d2be0 10353 ac_check_lib_save_LIBS=$LIBS
98418dba 10354LIBS="-lSM $LIBS"
503d2be0 10355cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10356#line $LINENO "configure"
cd958eb3
MB
10357/* confdefs.h. */
10358_ACEOF
10359cat confdefs.h >>conftest.$ac_ext
10360cat >>conftest.$ac_ext <<_ACEOF
10361/* end confdefs.h. */
503d2be0 10362
73b77ee5 10363/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10364#ifdef __cplusplus
10365extern "C"
10366#endif
73b77ee5 10367/* We use char because int might match the return type of a gcc2
503d2be0 10368 builtin and then its argument prototype would still apply. */
98418dba 10369char SmcOpenConnection ();
503d2be0
AS
10370int
10371main ()
10372{
98418dba 10373SmcOpenConnection ();
503d2be0
AS
10374 ;
10375 return 0;
10376}
10377_ACEOF
10378rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10379if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10380 (eval $ac_link) 2>&5
10381 ac_status=$?
c0d27fcc 10382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10383 (exit $ac_status); } &&
10384 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10386 (eval $ac_try) 2>&5
10387 ac_status=$?
c0d27fcc 10388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10389 (exit $ac_status); }; }; then
98418dba 10390 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
10391else
10392 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10393sed 's/^/| /' conftest.$ac_ext >&5
10394
98418dba 10395ac_cv_lib_SM_SmcOpenConnection=no
503d2be0
AS
10396fi
10397rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10398LIBS=$ac_check_lib_save_LIBS
10399fi
c0d27fcc 10400echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
10401echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
10402if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
10403 HAVE_X_SM=yes
10404else
10405 -lICE
73b77ee5
GM
10406fi
10407
73b77ee5 10408fi
73b77ee5 10409
c0d27fcc
MR
10410
10411
98418dba 10412 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 10413
c0d27fcc 10414cat >>confdefs.h <<\_ACEOF
98418dba 10415#define HAVE_X_SM 1
c0d27fcc 10416_ACEOF
73b77ee5 10417
98418dba
CW
10418 case "$LIBS" in
10419 *-lSM*) ;;
10420 *) LIBS="-lSM -lICE $LIBS" ;;
10421 esac
73b77ee5 10422 fi
98418dba 10423fi
73b77ee5 10424
98418dba 10425# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 10426echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
10427echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
10428if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
10429 echo $ECHO_N "(cached) $ECHO_C" >&6
10430else
10431 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10432#line $LINENO "configure"
cd958eb3
MB
10433/* confdefs.h. */
10434_ACEOF
10435cat confdefs.h >>conftest.$ac_ext
10436cat >>conftest.$ac_ext <<_ACEOF
10437/* end confdefs.h. */
98418dba 10438#include <netdb.h>
503d2be0
AS
10439int
10440main ()
10441{
98418dba 10442return h_errno;
503d2be0
AS
10443 ;
10444 return 0;
10445}
10446_ACEOF
10447rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10448if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10449 (eval $ac_link) 2>&5
10450 ac_status=$?
c0d27fcc 10451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10452 (exit $ac_status); } &&
10453 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10455 (eval $ac_try) 2>&5
10456 ac_status=$?
c0d27fcc 10457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10458 (exit $ac_status); }; }; then
98418dba 10459 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 10460else
503d2be0 10461 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10462sed 's/^/| /' conftest.$ac_ext >&5
10463
98418dba 10464emacs_cv_netdb_declares_h_errno=no
73b77ee5 10465fi
503d2be0 10466rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10467fi
c0d27fcc 10468echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
10469echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
10470if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 10471
c0d27fcc 10472cat >>confdefs.h <<\_ACEOF
98418dba 10473#define HAVE_H_ERRNO 1
c0d27fcc 10474_ACEOF
73b77ee5 10475
98418dba
CW
10476fi
10477
10478# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10479# for constant arguments. Useless!
c0d27fcc 10480echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
10481echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
10482if test "${ac_cv_working_alloca_h+set}" = set; then
10483 echo $ECHO_N "(cached) $ECHO_C" >&6
10484else
10485 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10486#line $LINENO "configure"
cd958eb3
MB
10487/* confdefs.h. */
10488_ACEOF
10489cat confdefs.h >>conftest.$ac_ext
10490cat >>conftest.$ac_ext <<_ACEOF
10491/* end confdefs.h. */
98418dba 10492#include <alloca.h>
503d2be0
AS
10493int
10494main ()
10495{
98418dba 10496char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
10497 ;
10498 return 0;
10499}
10500_ACEOF
10501rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10502if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10503 (eval $ac_link) 2>&5
10504 ac_status=$?
c0d27fcc 10505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10506 (exit $ac_status); } &&
10507 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10509 (eval $ac_try) 2>&5
10510 ac_status=$?
c0d27fcc 10511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10512 (exit $ac_status); }; }; then
98418dba 10513 ac_cv_working_alloca_h=yes
73b77ee5 10514else
503d2be0 10515 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10516sed 's/^/| /' conftest.$ac_ext >&5
10517
98418dba 10518ac_cv_working_alloca_h=no
73b77ee5 10519fi
503d2be0 10520rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10521fi
c0d27fcc 10522echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
10523echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
10524if test $ac_cv_working_alloca_h = yes; then
73b77ee5 10525
c0d27fcc 10526cat >>confdefs.h <<\_ACEOF
98418dba 10527#define HAVE_ALLOCA_H 1
c0d27fcc 10528_ACEOF
98418dba
CW
10529
10530fi
10531
c0d27fcc 10532echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
10533echo $ECHO_N "checking for alloca... $ECHO_C" >&6
10534if test "${ac_cv_func_alloca_works+set}" = set; then
10535 echo $ECHO_N "(cached) $ECHO_C" >&6
10536else
503d2be0 10537 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10538#line $LINENO "configure"
cd958eb3
MB
10539/* confdefs.h. */
10540_ACEOF
10541cat confdefs.h >>conftest.$ac_ext
10542cat >>conftest.$ac_ext <<_ACEOF
10543/* end confdefs.h. */
98418dba
CW
10544#ifdef __GNUC__
10545# define alloca __builtin_alloca
10546#else
10547# ifdef _MSC_VER
10548# include <malloc.h>
10549# define alloca _alloca
10550# else
10551# if HAVE_ALLOCA_H
10552# include <alloca.h>
10553# else
10554# ifdef _AIX
10555 #pragma alloca
10556# else
10557# ifndef alloca /* predefined by HP cc +Olibcalls */
10558char *alloca ();
10559# endif
10560# endif
10561# endif
10562# endif
10563#endif
10564
503d2be0
AS
10565int
10566main ()
10567{
98418dba 10568char *p = (char *) alloca (1);
503d2be0
AS
10569 ;
10570 return 0;
10571}
10572_ACEOF
10573rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10574if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10575 (eval $ac_link) 2>&5
10576 ac_status=$?
c0d27fcc 10577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10578 (exit $ac_status); } &&
10579 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10581 (eval $ac_try) 2>&5
10582 ac_status=$?
c0d27fcc 10583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10584 (exit $ac_status); }; }; then
98418dba 10585 ac_cv_func_alloca_works=yes
ac95a621 10586else
503d2be0 10587 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10588sed 's/^/| /' conftest.$ac_ext >&5
10589
98418dba 10590ac_cv_func_alloca_works=no
ac95a621 10591fi
503d2be0 10592rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10593fi
c0d27fcc 10594echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 10595echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 10596
98418dba
CW
10597if test $ac_cv_func_alloca_works = yes; then
10598
c0d27fcc 10599cat >>confdefs.h <<\_ACEOF
98418dba 10600#define HAVE_ALLOCA 1
c0d27fcc 10601_ACEOF
98418dba
CW
10602
10603else
10604 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10605# that cause trouble. Some versions do not even contain alloca or
10606# contain a buggy version. If you still want to use their alloca,
10607# use ar to extract alloca.o from them instead of compiling alloca.c.
10608
10609ALLOCA=alloca.$ac_objext
10610
c0d27fcc 10611cat >>confdefs.h <<\_ACEOF
98418dba 10612#define C_ALLOCA 1
c0d27fcc 10613_ACEOF
98418dba 10614
c0d27fcc
MR
10615
10616echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
10617echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
10618if test "${ac_cv_os_cray+set}" = set; then
10619 echo $ECHO_N "(cached) $ECHO_C" >&6
10620else
10621 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10622#line $LINENO "configure"
cd958eb3
MB
10623/* confdefs.h. */
10624_ACEOF
10625cat confdefs.h >>conftest.$ac_ext
10626cat >>conftest.$ac_ext <<_ACEOF
10627/* end confdefs.h. */
98418dba
CW
10628#if defined(CRAY) && ! defined(CRAY2)
10629webecray
10630#else
10631wenotbecray
10632#endif
10633
10634_ACEOF
10635if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 10636 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
10637 ac_cv_os_cray=yes
10638else
10639 ac_cv_os_cray=no
10640fi
10641rm -f conftest*
ac95a621 10642
98418dba 10643fi
c0d27fcc 10644echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
10645echo "${ECHO_T}$ac_cv_os_cray" >&6
10646if test $ac_cv_os_cray = yes; then
10647 for ac_func in _getb67 GETB67 getb67; do
10648 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 10649echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
10650echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10651if eval "test \"\${$as_ac_var+set}\" = set"; then
10652 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 10653else
503d2be0 10654 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10655#line $LINENO "configure"
cd958eb3
MB
10656/* confdefs.h. */
10657_ACEOF
10658cat confdefs.h >>conftest.$ac_ext
10659cat >>conftest.$ac_ext <<_ACEOF
10660/* end confdefs.h. */
73b77ee5 10661/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
10662 which can conflict with char $ac_func (); below.
10663 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10664 <limits.h> exists even on freestanding compilers. */
10665#ifdef __STDC__
10666# include <limits.h>
10667#else
10668# include <assert.h>
10669#endif
73b77ee5 10670/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10671#ifdef __cplusplus
10672extern "C"
cd958eb3 10673{
503d2be0 10674#endif
73b77ee5 10675/* We use char because int might match the return type of a gcc2
503d2be0
AS
10676 builtin and then its argument prototype would still apply. */
10677char $ac_func ();
73b77ee5
GM
10678/* The GNU C library defines this for functions which it implements
10679 to always fail with ENOSYS. Some functions are actually named
10680 something starting with __ and the normal name is an alias. */
10681#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10682choke me
10683#else
cd958eb3
MB
10684char (*f) () = $ac_func;
10685#endif
10686#ifdef __cplusplus
10687}
73b77ee5
GM
10688#endif
10689
cd958eb3
MB
10690int
10691main ()
10692{
9e71690e 10693return f != $ac_func;
503d2be0
AS
10694 ;
10695 return 0;
10696}
10697_ACEOF
10698rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10699if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10700 (eval $ac_link) 2>&5
10701 ac_status=$?
c0d27fcc 10702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10703 (exit $ac_status); } &&
10704 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10706 (eval $ac_try) 2>&5
10707 ac_status=$?
c0d27fcc 10708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10709 (exit $ac_status); }; }; then
10710 eval "$as_ac_var=yes"
10711else
10712 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10713sed 's/^/| /' conftest.$ac_ext >&5
10714
503d2be0
AS
10715eval "$as_ac_var=no"
10716fi
10717rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10718fi
c0d27fcc 10719echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
10720echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10721if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 10722
c0d27fcc 10723cat >>confdefs.h <<_ACEOF
98418dba 10724#define CRAY_STACKSEG_END $ac_func
c0d27fcc 10725_ACEOF
98418dba
CW
10726
10727 break
73b77ee5 10728fi
73b77ee5 10729
98418dba 10730 done
73b77ee5
GM
10731fi
10732
c0d27fcc 10733echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
10734echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
10735if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 10736 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
10737else
10738 if test "$cross_compiling" = yes; then
10739 ac_cv_c_stack_direction=0
73b77ee5 10740else
503d2be0 10741 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10742#line $LINENO "configure"
cd958eb3
MB
10743/* confdefs.h. */
10744_ACEOF
10745cat confdefs.h >>conftest.$ac_ext
10746cat >>conftest.$ac_ext <<_ACEOF
10747/* end confdefs.h. */
503d2be0 10748int
98418dba 10749find_stack_direction ()
503d2be0 10750{
98418dba
CW
10751 static char *addr = 0;
10752 auto char dummy;
10753 if (addr == 0)
10754 {
10755 addr = &dummy;
10756 return find_stack_direction ();
10757 }
73b77ee5 10758 else
98418dba
CW
10759 return (&dummy > addr) ? 1 : -1;
10760}
ba4481b5 10761
503d2be0
AS
10762int
10763main ()
10764{
98418dba 10765 exit (find_stack_direction () < 0);
503d2be0
AS
10766}
10767_ACEOF
98418dba 10768rm -f conftest$ac_exeext
c0d27fcc 10769if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10770 (eval $ac_link) 2>&5
10771 ac_status=$?
c0d27fcc 10772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10773 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 10774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10775 (eval $ac_try) 2>&5
10776 ac_status=$?
c0d27fcc 10777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10778 (exit $ac_status); }; }; then
98418dba 10779 ac_cv_c_stack_direction=1
ba4481b5 10780else
98418dba
CW
10781 echo "$as_me: program exited with status $ac_status" >&5
10782echo "$as_me: failed program was:" >&5
cd958eb3
MB
10783sed 's/^/| /' conftest.$ac_ext >&5
10784
c0d27fcc 10785( exit $ac_status )
98418dba 10786ac_cv_c_stack_direction=-1
ba4481b5 10787fi
6bae0ccf 10788rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 10789fi
98418dba 10790fi
c0d27fcc 10791echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
10792echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
10793
c0d27fcc 10794cat >>confdefs.h <<_ACEOF
98418dba 10795#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
10796_ACEOF
10797
ba4481b5 10798
ba4481b5
DL
10799fi
10800
c0d27fcc 10801
98418dba
CW
10802# fmod, logb, and frexp are found in -lm on most systems.
10803# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
10804
c0d27fcc 10805echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
10806echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
10807if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 10808 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 10809else
98418dba
CW
10810 ac_check_lib_save_LIBS=$LIBS
10811LIBS="-lm $LIBS"
10812cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10813#line $LINENO "configure"
cd958eb3
MB
10814/* confdefs.h. */
10815_ACEOF
10816cat confdefs.h >>conftest.$ac_ext
10817cat >>conftest.$ac_ext <<_ACEOF
10818/* end confdefs.h. */
ba4481b5 10819
98418dba
CW
10820/* Override any gcc2 internal prototype to avoid an error. */
10821#ifdef __cplusplus
10822extern "C"
10823#endif
10824/* We use char because int might match the return type of a gcc2
10825 builtin and then its argument prototype would still apply. */
10826char sqrt ();
503d2be0
AS
10827int
10828main ()
10829{
98418dba 10830sqrt ();
503d2be0
AS
10831 ;
10832 return 0;
10833}
10834_ACEOF
10835rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10836if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10837 (eval $ac_link) 2>&5
10838 ac_status=$?
c0d27fcc 10839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10840 (exit $ac_status); } &&
10841 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10843 (eval $ac_try) 2>&5
10844 ac_status=$?
c0d27fcc 10845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10846 (exit $ac_status); }; }; then
98418dba 10847 ac_cv_lib_m_sqrt=yes
ba4481b5 10848else
503d2be0 10849 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10850sed 's/^/| /' conftest.$ac_ext >&5
10851
98418dba 10852ac_cv_lib_m_sqrt=no
ba4481b5 10853fi
503d2be0 10854rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10855LIBS=$ac_check_lib_save_LIBS
ba4481b5 10856fi
c0d27fcc 10857echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
10858echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
10859if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 10860 cat >>confdefs.h <<_ACEOF
98418dba 10861#define HAVE_LIBM 1
c0d27fcc 10862_ACEOF
98418dba
CW
10863
10864 LIBS="-lm $LIBS"
ba4481b5 10865
ba4481b5
DL
10866fi
10867
c0d27fcc 10868
55597d70
DL
10869# Check for mail-locking functions in a "mail" library. Probably this should
10870# have the same check as for liblockfile below.
98418dba 10871
c0d27fcc 10872echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
10873echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
10874if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 10875 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 10876else
98418dba
CW
10877 ac_check_lib_save_LIBS=$LIBS
10878LIBS="-lmail $LIBS"
10879cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10880#line $LINENO "configure"
cd958eb3
MB
10881/* confdefs.h. */
10882_ACEOF
10883cat confdefs.h >>conftest.$ac_ext
10884cat >>conftest.$ac_ext <<_ACEOF
10885/* end confdefs.h. */
98418dba
CW
10886
10887/* Override any gcc2 internal prototype to avoid an error. */
10888#ifdef __cplusplus
10889extern "C"
10890#endif
10891/* We use char because int might match the return type of a gcc2
10892 builtin and then its argument prototype would still apply. */
10893char maillock ();
503d2be0
AS
10894int
10895main ()
10896{
98418dba 10897maillock ();
503d2be0
AS
10898 ;
10899 return 0;
10900}
10901_ACEOF
10902rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10903if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10904 (eval $ac_link) 2>&5
10905 ac_status=$?
c0d27fcc 10906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10907 (exit $ac_status); } &&
10908 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10910 (eval $ac_try) 2>&5
10911 ac_status=$?
c0d27fcc 10912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10913 (exit $ac_status); }; }; then
98418dba 10914 ac_cv_lib_mail_maillock=yes
ba4481b5 10915else
503d2be0 10916 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10917sed 's/^/| /' conftest.$ac_ext >&5
10918
98418dba 10919ac_cv_lib_mail_maillock=no
ba4481b5 10920fi
503d2be0 10921rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10922LIBS=$ac_check_lib_save_LIBS
ba4481b5 10923fi
c0d27fcc 10924echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
10925echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
10926if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 10927 cat >>confdefs.h <<_ACEOF
98418dba 10928#define HAVE_LIBMAIL 1
c0d27fcc 10929_ACEOF
ba4481b5 10930
98418dba 10931 LIBS="-lmail $LIBS"
ba4481b5 10932
98418dba 10933fi
ba4481b5 10934
c0d27fcc
MR
10935
10936echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
10937echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
10938if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 10939 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 10940else
503d2be0 10941 ac_check_lib_save_LIBS=$LIBS
98418dba 10942LIBS="-llockfile $LIBS"
503d2be0 10943cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10944#line $LINENO "configure"
cd958eb3
MB
10945/* confdefs.h. */
10946_ACEOF
10947cat confdefs.h >>conftest.$ac_ext
10948cat >>conftest.$ac_ext <<_ACEOF
10949/* end confdefs.h. */
503d2be0 10950
ba4481b5 10951/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10952#ifdef __cplusplus
10953extern "C"
10954#endif
ba4481b5 10955/* We use char because int might match the return type of a gcc2
503d2be0 10956 builtin and then its argument prototype would still apply. */
98418dba 10957char maillock ();
503d2be0
AS
10958int
10959main ()
10960{
98418dba 10961maillock ();
503d2be0
AS
10962 ;
10963 return 0;
10964}
10965_ACEOF
10966rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10967if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10968 (eval $ac_link) 2>&5
10969 ac_status=$?
c0d27fcc 10970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10971 (exit $ac_status); } &&
10972 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10974 (eval $ac_try) 2>&5
10975 ac_status=$?
c0d27fcc 10976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10977 (exit $ac_status); }; }; then
98418dba 10978 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
10979else
10980 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10981sed 's/^/| /' conftest.$ac_ext >&5
10982
98418dba
CW
10983ac_cv_lib_lockfile_maillock=no
10984fi
10985rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10986LIBS=$ac_check_lib_save_LIBS
10987fi
c0d27fcc 10988echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
10989echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
10990if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 10991 cat >>confdefs.h <<_ACEOF
98418dba 10992#define HAVE_LIBLOCKFILE 1
c0d27fcc 10993_ACEOF
98418dba
CW
10994
10995 LIBS="-llockfile $LIBS"
10996
10997fi
10998
10999# If we have the shared liblockfile, assume we must use it for mail
11000# locking (e.g. Debian). If we couldn't link against liblockfile
11001# (no liblockfile.a installed), ensure that we don't need to.
11002if test "$ac_cv_lib_lockfile_maillock" = no; then
11003 # Extract the first word of "liblockfile.so", so it can be a program name with args.
11004set dummy liblockfile.so; ac_word=$2
c0d27fcc 11005echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
11006echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11007if test "${ac_cv_prog_liblockfile+set}" = set; then
11008 echo $ECHO_N "(cached) $ECHO_C" >&6
11009else
11010 if test -n "$liblockfile"; then
11011 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
11012else
c0d27fcc 11013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
11014as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
11015for as_dir in $as_dummy
c0d27fcc
MR
11016do
11017 IFS=$as_save_IFS
11018 test -z "$as_dir" && as_dir=.
11019 for ac_exec_ext in '' $ac_executable_extensions; do
11020 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11021 ac_cv_prog_liblockfile="yes"
11022 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11023 break 2
11024 fi
11025done
98418dba
CW
11026done
11027
11028 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 11029fi
503d2be0 11030fi
98418dba
CW
11031liblockfile=$ac_cv_prog_liblockfile
11032if test -n "$liblockfile"; then
c0d27fcc 11033 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
11034echo "${ECHO_T}$liblockfile" >&6
11035else
c0d27fcc 11036 echo "$as_me:$LINENO: result: no" >&5
98418dba 11037echo "${ECHO_T}no" >&6
ba4481b5
DL
11038fi
11039
98418dba 11040 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 11041 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
11042This probably means that movemail could lose mail.
11043There may be a \`development' package to install containing liblockfile." >&5
11044echo "$as_me: error: Shared liblockfile found but can't link against it.
11045This probably means that movemail could lose mail.
11046There may be a \`development' package to install containing liblockfile." >&2;}
11047 { (exit 1); exit 1; }; }
98418dba 11048 else :
55597d70 11049 fi
98418dba 11050fi
503d2be0 11051
98418dba
CW
11052for ac_func in touchlock
11053do
11054as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 11055echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
11056echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11057if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 11058 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 11059else
98418dba 11060 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11061#line $LINENO "configure"
cd958eb3
MB
11062/* confdefs.h. */
11063_ACEOF
11064cat confdefs.h >>conftest.$ac_ext
11065cat >>conftest.$ac_ext <<_ACEOF
11066/* end confdefs.h. */
98418dba 11067/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
11068 which can conflict with char $ac_func (); below.
11069 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11070 <limits.h> exists even on freestanding compilers. */
11071#ifdef __STDC__
11072# include <limits.h>
11073#else
11074# include <assert.h>
11075#endif
457b792c 11076/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11077#ifdef __cplusplus
11078extern "C"
cd958eb3 11079{
503d2be0 11080#endif
457b792c 11081/* We use char because int might match the return type of a gcc2
503d2be0 11082 builtin and then its argument prototype would still apply. */
98418dba 11083char $ac_func ();
98418dba
CW
11084/* The GNU C library defines this for functions which it implements
11085 to always fail with ENOSYS. Some functions are actually named
11086 something starting with __ and the normal name is an alias. */
11087#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11088choke me
11089#else
cd958eb3 11090char (*f) () = $ac_func;
98418dba 11091#endif
cd958eb3
MB
11092#ifdef __cplusplus
11093}
11094#endif
11095
11096int
11097main ()
11098{
9e71690e 11099return f != $ac_func;
503d2be0
AS
11100 ;
11101 return 0;
11102}
11103_ACEOF
11104rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11105if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11106 (eval $ac_link) 2>&5
11107 ac_status=$?
c0d27fcc 11108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11109 (exit $ac_status); } &&
11110 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11112 (eval $ac_try) 2>&5
11113 ac_status=$?
c0d27fcc 11114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11115 (exit $ac_status); }; }; then
98418dba 11116 eval "$as_ac_var=yes"
503d2be0
AS
11117else
11118 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11119sed 's/^/| /' conftest.$ac_ext >&5
11120
98418dba 11121eval "$as_ac_var=no"
503d2be0
AS
11122fi
11123rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
503d2be0 11124fi
c0d27fcc 11125echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
11126echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11127if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11128 cat >>confdefs.h <<_ACEOF
98418dba 11129#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11130_ACEOF
457b792c 11131
457b792c 11132fi
98418dba 11133done
457b792c 11134
c0d27fcc 11135
98418dba
CW
11136for ac_header in maillock.h
11137do
11138as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
11139if eval "test \"\${$as_ac_Header+set}\" = set"; then
11140 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
11141echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11142if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 11143 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11144fi
11145echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11146echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 11147else
c0d27fcc
MR
11148 # Is the header compilable?
11149echo "$as_me:$LINENO: checking $ac_header usability" >&5
11150echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11151cat >conftest.$ac_ext <<_ACEOF
11152#line $LINENO "configure"
cd958eb3
MB
11153/* confdefs.h. */
11154_ACEOF
11155cat confdefs.h >>conftest.$ac_ext
11156cat >>conftest.$ac_ext <<_ACEOF
11157/* end confdefs.h. */
c0d27fcc
MR
11158$ac_includes_default
11159#include <$ac_header>
11160_ACEOF
11161rm -f conftest.$ac_objext
11162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11163 (eval $ac_compile) 2>&5
11164 ac_status=$?
11165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11166 (exit $ac_status); } &&
11167 { ac_try='test -s conftest.$ac_objext'
11168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11169 (eval $ac_try) 2>&5
11170 ac_status=$?
11171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11172 (exit $ac_status); }; }; then
11173 ac_header_compiler=yes
11174else
11175 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11176sed 's/^/| /' conftest.$ac_ext >&5
11177
c0d27fcc
MR
11178ac_header_compiler=no
11179fi
11180rm -f conftest.$ac_objext conftest.$ac_ext
11181echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11182echo "${ECHO_T}$ac_header_compiler" >&6
11183
11184# Is the header present?
11185echo "$as_me:$LINENO: checking $ac_header presence" >&5
11186echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11187cat >conftest.$ac_ext <<_ACEOF
11188#line $LINENO "configure"
cd958eb3
MB
11189/* confdefs.h. */
11190_ACEOF
11191cat confdefs.h >>conftest.$ac_ext
11192cat >>conftest.$ac_ext <<_ACEOF
11193/* end confdefs.h. */
98418dba 11194#include <$ac_header>
503d2be0 11195_ACEOF
c0d27fcc 11196if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 11197 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 11198 ac_status=$?
6bae0ccf 11199 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11200 rm -f conftest.er1
11201 cat conftest.err >&5
c0d27fcc 11202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11203 (exit $ac_status); } >/dev/null; then
11204 if test -s conftest.err; then
11205 ac_cpp_err=$ac_c_preproc_warn_flag
11206 else
11207 ac_cpp_err=
11208 fi
503d2be0 11209else
98418dba 11210 ac_cpp_err=yes
503d2be0 11211fi
98418dba 11212if test -z "$ac_cpp_err"; then
c0d27fcc 11213 ac_header_preproc=yes
98418dba
CW
11214else
11215 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11216sed 's/^/| /' conftest.$ac_ext >&5
11217
c0d27fcc 11218 ac_header_preproc=no
503d2be0 11219fi
98418dba 11220rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11221echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11222echo "${ECHO_T}$ac_header_preproc" >&6
11223
11224# So? What about this header?
11225case $ac_header_compiler:$ac_header_preproc in
11226 yes:no )
11227 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11228echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11229 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11230echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11231 (
11232 cat <<\_ASBOX
11233## ------------------------------------ ##
11234## Report this to bug-autoconf@gnu.org. ##
11235## ------------------------------------ ##
11236_ASBOX
11237 ) |
11238 sed "s/^/$as_me: WARNING: /" >&2
11239 ;;
c0d27fcc
MR
11240 no:yes )
11241 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11242echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11243 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11244echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11245 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11246echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11247 (
11248 cat <<\_ASBOX
11249## ------------------------------------ ##
11250## Report this to bug-autoconf@gnu.org. ##
11251## ------------------------------------ ##
11252_ASBOX
11253 ) |
11254 sed "s/^/$as_me: WARNING: /" >&2
11255 ;;
c0d27fcc
MR
11256esac
11257echo "$as_me:$LINENO: checking for $ac_header" >&5
11258echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11259if eval "test \"\${$as_ac_Header+set}\" = set"; then
11260 echo $ECHO_N "(cached) $ECHO_C" >&6
11261else
11262 eval "$as_ac_Header=$ac_header_preproc"
ba4481b5 11263fi
c0d27fcc 11264echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 11265echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
11266
11267fi
98418dba 11268if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 11269 cat >>confdefs.h <<_ACEOF
98418dba 11270#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 11271_ACEOF
48d4b120 11272
ba4481b5 11273fi
c0d27fcc 11274
98418dba
CW
11275done
11276
c0d27fcc
MR
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
22044edf
DL
11332
11333
c0d27fcc 11334
b0e44248
RB
11335
11336
973a76b1
DL
11337
11338
11339
cd958eb3 11340
25ca0bca 11341
c0d27fcc
MR
11342
11343
98418dba
CW
11344for ac_func in gethostname getdomainname dup2 \
11345rename closedir mkdir rmdir sysinfo \
11346random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
11347strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 11348utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
11349__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
11350sendto recvfrom getsockopt setsockopt getsockname getpeername \
b0e44248 11351gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
973a76b1 11352memset memcmp memmove difftime memcpy mempcpy mblen mbrlen
98418dba
CW
11353do
11354as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 11355echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
11356echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11357if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 11358 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11359else
503d2be0 11360 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11361#line $LINENO "configure"
cd958eb3
MB
11362/* confdefs.h. */
11363_ACEOF
11364cat confdefs.h >>conftest.$ac_ext
11365cat >>conftest.$ac_ext <<_ACEOF
11366/* end confdefs.h. */
98418dba 11367/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
11368 which can conflict with char $ac_func (); below.
11369 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11370 <limits.h> exists even on freestanding compilers. */
11371#ifdef __STDC__
11372# include <limits.h>
11373#else
11374# include <assert.h>
11375#endif
ba4481b5 11376/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11377#ifdef __cplusplus
11378extern "C"
cd958eb3 11379{
503d2be0 11380#endif
ba4481b5 11381/* We use char because int might match the return type of a gcc2
503d2be0 11382 builtin and then its argument prototype would still apply. */
98418dba 11383char $ac_func ();
98418dba
CW
11384/* The GNU C library defines this for functions which it implements
11385 to always fail with ENOSYS. Some functions are actually named
11386 something starting with __ and the normal name is an alias. */
11387#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11388choke me
11389#else
cd958eb3
MB
11390char (*f) () = $ac_func;
11391#endif
11392#ifdef __cplusplus
11393}
98418dba
CW
11394#endif
11395
cd958eb3
MB
11396int
11397main ()
11398{
9e71690e 11399return f != $ac_func;
503d2be0
AS
11400 ;
11401 return 0;
11402}
11403_ACEOF
11404rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11405if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11406 (eval $ac_link) 2>&5
11407 ac_status=$?
c0d27fcc 11408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11409 (exit $ac_status); } &&
11410 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11412 (eval $ac_try) 2>&5
11413 ac_status=$?
c0d27fcc 11414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11415 (exit $ac_status); }; }; then
98418dba 11416 eval "$as_ac_var=yes"
503d2be0
AS
11417else
11418 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11419sed 's/^/| /' conftest.$ac_ext >&5
11420
98418dba 11421eval "$as_ac_var=no"
503d2be0
AS
11422fi
11423rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 11424fi
c0d27fcc 11425echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
11426echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11427if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11428 cat >>confdefs.h <<_ACEOF
98418dba 11429#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11430_ACEOF
ba4481b5 11431
ba4481b5 11432fi
98418dba 11433done
ba4481b5 11434
c0d27fcc
MR
11435
11436
98418dba
CW
11437for ac_header in sys/un.h
11438do
11439as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
11440if eval "test \"\${$as_ac_Header+set}\" = set"; then
11441 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
11442echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11443if eval "test \"\${$as_ac_Header+set}\" = set"; then
11444 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11445fi
11446echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11447echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 11448else
c0d27fcc
MR
11449 # Is the header compilable?
11450echo "$as_me:$LINENO: checking $ac_header usability" >&5
11451echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11452cat >conftest.$ac_ext <<_ACEOF
11453#line $LINENO "configure"
cd958eb3
MB
11454/* confdefs.h. */
11455_ACEOF
11456cat confdefs.h >>conftest.$ac_ext
11457cat >>conftest.$ac_ext <<_ACEOF
11458/* end confdefs.h. */
c0d27fcc
MR
11459$ac_includes_default
11460#include <$ac_header>
11461_ACEOF
11462rm -f conftest.$ac_objext
11463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11464 (eval $ac_compile) 2>&5
11465 ac_status=$?
11466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11467 (exit $ac_status); } &&
11468 { ac_try='test -s conftest.$ac_objext'
11469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11470 (eval $ac_try) 2>&5
11471 ac_status=$?
11472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11473 (exit $ac_status); }; }; then
11474 ac_header_compiler=yes
11475else
11476 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11477sed 's/^/| /' conftest.$ac_ext >&5
11478
c0d27fcc
MR
11479ac_header_compiler=no
11480fi
11481rm -f conftest.$ac_objext conftest.$ac_ext
11482echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11483echo "${ECHO_T}$ac_header_compiler" >&6
11484
11485# Is the header present?
11486echo "$as_me:$LINENO: checking $ac_header presence" >&5
11487echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11488cat >conftest.$ac_ext <<_ACEOF
11489#line $LINENO "configure"
cd958eb3
MB
11490/* confdefs.h. */
11491_ACEOF
11492cat confdefs.h >>conftest.$ac_ext
11493cat >>conftest.$ac_ext <<_ACEOF
11494/* end confdefs.h. */
98418dba 11495#include <$ac_header>
503d2be0 11496_ACEOF
c0d27fcc 11497if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11498 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11499 ac_status=$?
6bae0ccf 11500 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11501 rm -f conftest.er1
11502 cat conftest.err >&5
c0d27fcc 11503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11504 (exit $ac_status); } >/dev/null; then
11505 if test -s conftest.err; then
11506 ac_cpp_err=$ac_c_preproc_warn_flag
11507 else
11508 ac_cpp_err=
11509 fi
11510else
11511 ac_cpp_err=yes
11512fi
11513if test -z "$ac_cpp_err"; then
c0d27fcc 11514 ac_header_preproc=yes
ba4481b5 11515else
503d2be0 11516 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11517sed 's/^/| /' conftest.$ac_ext >&5
11518
c0d27fcc 11519 ac_header_preproc=no
ba4481b5 11520fi
503d2be0 11521rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11522echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11523echo "${ECHO_T}$ac_header_preproc" >&6
11524
11525# So? What about this header?
11526case $ac_header_compiler:$ac_header_preproc in
11527 yes:no )
11528 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11529echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11530 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11531echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11532 (
11533 cat <<\_ASBOX
11534## ------------------------------------ ##
11535## Report this to bug-autoconf@gnu.org. ##
11536## ------------------------------------ ##
11537_ASBOX
11538 ) |
11539 sed "s/^/$as_me: WARNING: /" >&2
11540 ;;
c0d27fcc
MR
11541 no:yes )
11542 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11543echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11544 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11545echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11546 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11547echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11548 (
11549 cat <<\_ASBOX
11550## ------------------------------------ ##
11551## Report this to bug-autoconf@gnu.org. ##
11552## ------------------------------------ ##
11553_ASBOX
11554 ) |
11555 sed "s/^/$as_me: WARNING: /" >&2
11556 ;;
c0d27fcc
MR
11557esac
11558echo "$as_me:$LINENO: checking for $ac_header" >&5
11559echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11560if eval "test \"\${$as_ac_Header+set}\" = set"; then
11561 echo $ECHO_N "(cached) $ECHO_C" >&6
11562else
11563 eval "$as_ac_Header=$ac_header_preproc"
ba4481b5 11564fi
c0d27fcc 11565echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 11566echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
11567
11568fi
925c2f3f 11569if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 11570 cat >>confdefs.h <<_ACEOF
925c2f3f 11571#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 11572_ACEOF
503d2be0 11573
925c2f3f 11574fi
c0d27fcc 11575
925c2f3f
EZ
11576done
11577
c0d27fcc
MR
11578
11579
11580
925c2f3f
EZ
11581for ac_header in sys/time.h unistd.h
11582do
11583as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
11584if eval "test \"\${$as_ac_Header+set}\" = set"; then
11585 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
11586echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11587if eval "test \"\${$as_ac_Header+set}\" = set"; then
11588 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11589fi
11590echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11591echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 11592else
c0d27fcc
MR
11593 # Is the header compilable?
11594echo "$as_me:$LINENO: checking $ac_header usability" >&5
11595echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11596cat >conftest.$ac_ext <<_ACEOF
11597#line $LINENO "configure"
cd958eb3
MB
11598/* confdefs.h. */
11599_ACEOF
11600cat confdefs.h >>conftest.$ac_ext
11601cat >>conftest.$ac_ext <<_ACEOF
11602/* end confdefs.h. */
c0d27fcc
MR
11603$ac_includes_default
11604#include <$ac_header>
11605_ACEOF
11606rm -f conftest.$ac_objext
11607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11608 (eval $ac_compile) 2>&5
11609 ac_status=$?
11610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11611 (exit $ac_status); } &&
11612 { ac_try='test -s conftest.$ac_objext'
11613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11614 (eval $ac_try) 2>&5
11615 ac_status=$?
11616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11617 (exit $ac_status); }; }; then
11618 ac_header_compiler=yes
11619else
11620 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11621sed 's/^/| /' conftest.$ac_ext >&5
11622
c0d27fcc
MR
11623ac_header_compiler=no
11624fi
11625rm -f conftest.$ac_objext conftest.$ac_ext
11626echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11627echo "${ECHO_T}$ac_header_compiler" >&6
11628
11629# Is the header present?
11630echo "$as_me:$LINENO: checking $ac_header presence" >&5
11631echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11632cat >conftest.$ac_ext <<_ACEOF
11633#line $LINENO "configure"
cd958eb3
MB
11634/* confdefs.h. */
11635_ACEOF
11636cat confdefs.h >>conftest.$ac_ext
11637cat >>conftest.$ac_ext <<_ACEOF
11638/* end confdefs.h. */
98418dba 11639#include <$ac_header>
503d2be0 11640_ACEOF
c0d27fcc 11641if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11642 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11643 ac_status=$?
6bae0ccf 11644 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11645 rm -f conftest.er1
11646 cat conftest.err >&5
c0d27fcc 11647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11648 (exit $ac_status); } >/dev/null; then
11649 if test -s conftest.err; then
11650 ac_cpp_err=$ac_c_preproc_warn_flag
11651 else
11652 ac_cpp_err=
11653 fi
11654else
11655 ac_cpp_err=yes
11656fi
11657if test -z "$ac_cpp_err"; then
c0d27fcc 11658 ac_header_preproc=yes
98418dba
CW
11659else
11660 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11661sed 's/^/| /' conftest.$ac_ext >&5
11662
c0d27fcc 11663 ac_header_preproc=no
98418dba
CW
11664fi
11665rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11666echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11667echo "${ECHO_T}$ac_header_preproc" >&6
11668
11669# So? What about this header?
11670case $ac_header_compiler:$ac_header_preproc in
11671 yes:no )
11672 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11673echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11674 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11675echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11676 (
11677 cat <<\_ASBOX
11678## ------------------------------------ ##
11679## Report this to bug-autoconf@gnu.org. ##
11680## ------------------------------------ ##
11681_ASBOX
11682 ) |
11683 sed "s/^/$as_me: WARNING: /" >&2
11684 ;;
c0d27fcc
MR
11685 no:yes )
11686 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11687echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11688 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11689echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11690 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11691echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11692 (
11693 cat <<\_ASBOX
11694## ------------------------------------ ##
11695## Report this to bug-autoconf@gnu.org. ##
11696## ------------------------------------ ##
11697_ASBOX
11698 ) |
11699 sed "s/^/$as_me: WARNING: /" >&2
11700 ;;
c0d27fcc
MR
11701esac
11702echo "$as_me:$LINENO: checking for $ac_header" >&5
11703echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11704if eval "test \"\${$as_ac_Header+set}\" = set"; then
11705 echo $ECHO_N "(cached) $ECHO_C" >&6
11706else
11707 eval "$as_ac_Header=$ac_header_preproc"
ffe36136 11708fi
c0d27fcc 11709echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 11710echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
11711
11712fi
98418dba 11713if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 11714 cat >>confdefs.h <<_ACEOF
98418dba 11715#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 11716_ACEOF
98418dba
CW
11717
11718fi
c0d27fcc 11719
98418dba
CW
11720done
11721
c0d27fcc 11722
98418dba
CW
11723for ac_func in alarm
11724do
11725as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 11726echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
11727echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11728if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 11729 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11730else
98418dba 11731 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11732#line $LINENO "configure"
cd958eb3
MB
11733/* confdefs.h. */
11734_ACEOF
11735cat confdefs.h >>conftest.$ac_ext
11736cat >>conftest.$ac_ext <<_ACEOF
11737/* end confdefs.h. */
98418dba 11738/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
11739 which can conflict with char $ac_func (); below.
11740 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11741 <limits.h> exists even on freestanding compilers. */
11742#ifdef __STDC__
11743# include <limits.h>
11744#else
11745# include <assert.h>
11746#endif
ba4481b5 11747/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11748#ifdef __cplusplus
11749extern "C"
cd958eb3 11750{
503d2be0 11751#endif
ba4481b5 11752/* We use char because int might match the return type of a gcc2
503d2be0 11753 builtin and then its argument prototype would still apply. */
98418dba 11754char $ac_func ();
98418dba
CW
11755/* The GNU C library defines this for functions which it implements
11756 to always fail with ENOSYS. Some functions are actually named
11757 something starting with __ and the normal name is an alias. */
11758#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11759choke me
11760#else
cd958eb3
MB
11761char (*f) () = $ac_func;
11762#endif
11763#ifdef __cplusplus
11764}
98418dba
CW
11765#endif
11766
cd958eb3
MB
11767int
11768main ()
11769{
9e71690e 11770return f != $ac_func;
503d2be0
AS
11771 ;
11772 return 0;
11773}
11774_ACEOF
11775rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11776if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11777 (eval $ac_link) 2>&5
11778 ac_status=$?
c0d27fcc 11779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11780 (exit $ac_status); } &&
11781 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11783 (eval $ac_try) 2>&5
11784 ac_status=$?
c0d27fcc 11785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11786 (exit $ac_status); }; }; then
98418dba 11787 eval "$as_ac_var=yes"
503d2be0
AS
11788else
11789 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11790sed 's/^/| /' conftest.$ac_ext >&5
11791
98418dba 11792eval "$as_ac_var=no"
503d2be0
AS
11793fi
11794rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ffe36136 11795fi
c0d27fcc 11796echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
11797echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11798if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11799 cat >>confdefs.h <<_ACEOF
98418dba 11800#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11801_ACEOF
ffe36136 11802
ba4481b5 11803fi
98418dba 11804done
ba4481b5 11805
c0d27fcc 11806echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
11807echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
11808if test "${ac_cv_func_working_mktime+set}" = set; then
11809 echo $ECHO_N "(cached) $ECHO_C" >&6
11810else
11811 if test "$cross_compiling" = yes; then
11812 ac_cv_func_working_mktime=no
11813else
11814 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11815#line $LINENO "configure"
cd958eb3
MB
11816/* confdefs.h. */
11817_ACEOF
11818cat confdefs.h >>conftest.$ac_ext
11819cat >>conftest.$ac_ext <<_ACEOF
11820/* end confdefs.h. */
98418dba
CW
11821/* Test program from Paul Eggert and Tony Leneis. */
11822#if TIME_WITH_SYS_TIME
11823# include <sys/time.h>
11824# include <time.h>
11825#else
11826# if HAVE_SYS_TIME_H
11827# include <sys/time.h>
11828# else
11829# include <time.h>
11830# endif
11831#endif
ba4481b5 11832
98418dba
CW
11833#if HAVE_UNISTD_H
11834# include <unistd.h>
11835#endif
ba4481b5 11836
98418dba
CW
11837#if !HAVE_ALARM
11838# define alarm(X) /* empty */
11839#endif
df645f7c 11840
98418dba
CW
11841/* Work around redefinition to rpl_putenv by other config tests. */
11842#undef putenv
df645f7c 11843
98418dba 11844static time_t time_t_max;
df645f7c 11845
98418dba
CW
11846/* Values we'll use to set the TZ environment variable. */
11847static const char *const tz_strings[] = {
11848 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
11849 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
11850};
11851#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 11852
98418dba
CW
11853/* Fail if mktime fails to convert a date in the spring-forward gap.
11854 Based on a problem report from Andreas Jaeger. */
11855static void
11856spring_forward_gap ()
11857{
11858 /* glibc (up to about 1998-10-07) failed this test. */
11859 struct tm tm;
11860
11861 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11862 instead of "TZ=America/Vancouver" in order to detect the bug even
11863 on systems that don't support the Olson extension, or don't have the
11864 full zoneinfo tables installed. */
11865 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
11866
11867 tm.tm_year = 98;
11868 tm.tm_mon = 3;
11869 tm.tm_mday = 5;
11870 tm.tm_hour = 2;
11871 tm.tm_min = 0;
11872 tm.tm_sec = 0;
11873 tm.tm_isdst = -1;
11874 if (mktime (&tm) == (time_t)-1)
11875 exit (1);
11876}
11877
11878static void
11879mktime_test (now)
11880 time_t now;
11881{
11882 struct tm *lt;
11883 if ((lt = localtime (&now)) && mktime (lt) != now)
11884 exit (1);
11885 now = time_t_max - now;
11886 if ((lt = localtime (&now)) && mktime (lt) != now)
11887 exit (1);
11888}
11889
11890static void
11891irix_6_4_bug ()
11892{
11893 /* Based on code from Ariel Faigon. */
11894 struct tm tm;
11895 tm.tm_year = 96;
11896 tm.tm_mon = 3;
11897 tm.tm_mday = 0;
11898 tm.tm_hour = 0;
11899 tm.tm_min = 0;
11900 tm.tm_sec = 0;
11901 tm.tm_isdst = -1;
11902 mktime (&tm);
11903 if (tm.tm_mon != 2 || tm.tm_mday != 31)
11904 exit (1);
11905}
11906
11907static void
11908bigtime_test (j)
11909 int j;
11910{
11911 struct tm tm;
11912 time_t now;
11913 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
11914 now = mktime (&tm);
11915 if (now != (time_t) -1)
11916 {
11917 struct tm *lt = localtime (&now);
11918 if (! (lt
11919 && lt->tm_year == tm.tm_year
11920 && lt->tm_mon == tm.tm_mon
11921 && lt->tm_mday == tm.tm_mday
11922 && lt->tm_hour == tm.tm_hour
11923 && lt->tm_min == tm.tm_min
11924 && lt->tm_sec == tm.tm_sec
11925 && lt->tm_yday == tm.tm_yday
11926 && lt->tm_wday == tm.tm_wday
11927 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
11928 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
11929 exit (1);
11930 }
11931}
11932
11933int
11934main ()
11935{
11936 time_t t, delta;
11937 int i, j;
11938
11939 /* This test makes some buggy mktime implementations loop.
11940 Give up after 60 seconds; a mktime slower than that
11941 isn't worth using anyway. */
11942 alarm (60);
11943
11944 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
11945 continue;
11946 time_t_max--;
11947 delta = time_t_max / 997; /* a suitable prime number */
11948 for (i = 0; i < N_STRINGS; i++)
11949 {
11950 if (tz_strings[i])
11951 putenv (tz_strings[i]);
503d2be0 11952
98418dba
CW
11953 for (t = 0; t <= time_t_max - delta; t += delta)
11954 mktime_test (t);
11955 mktime_test ((time_t) 60 * 60);
11956 mktime_test ((time_t) 60 * 60 * 24);
11957
11958 for (j = 1; 0 < j; j *= 2)
11959 bigtime_test (j);
11960 bigtime_test (j - 1);
11961 }
11962 irix_6_4_bug ();
11963 spring_forward_gap ();
11964 exit (0);
503d2be0
AS
11965}
11966_ACEOF
98418dba 11967rm -f conftest$ac_exeext
c0d27fcc 11968if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11969 (eval $ac_link) 2>&5
11970 ac_status=$?
c0d27fcc 11971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11972 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 11973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11974 (eval $ac_try) 2>&5
11975 ac_status=$?
c0d27fcc 11976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11977 (exit $ac_status); }; }; then
98418dba 11978 ac_cv_func_working_mktime=yes
503d2be0 11979else
98418dba
CW
11980 echo "$as_me: program exited with status $ac_status" >&5
11981echo "$as_me: failed program was:" >&5
cd958eb3
MB
11982sed 's/^/| /' conftest.$ac_ext >&5
11983
c0d27fcc 11984( exit $ac_status )
98418dba 11985ac_cv_func_working_mktime=no
503d2be0 11986fi
6bae0ccf 11987rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 11988fi
ba4481b5 11989fi
c0d27fcc 11990echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
11991echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
11992if test $ac_cv_func_working_mktime = no; then
11993 LIBOBJS="$LIBOBJS mktime.$ac_objext"
ba4481b5
DL
11994fi
11995
98418dba 11996if test "$ac_cv_func_working_mktime" = no; then
b936fae4 11997
c0d27fcc 11998cat >>confdefs.h <<\_ACEOF
98418dba 11999#define BROKEN_MKTIME 1
c0d27fcc 12000_ACEOF
ba4481b5 12001
ba4481b5 12002fi
503d2be0 12003
98418dba
CW
12004ac_have_func=no # yes means we've found a way to get the load average.
12005
6bae0ccf
DL
12006# Make sure getloadavg.c is where it belongs, at configure-time.
12007test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
12008 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
12009echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
12010 { (exit 1); exit 1; }; }
12011
98418dba
CW
12012ac_save_LIBS=$LIBS
12013
12014# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 12015(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
12016echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
12017if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 12018 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12019else
503d2be0 12020 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12021#line $LINENO "configure"
cd958eb3
MB
12022/* confdefs.h. */
12023_ACEOF
12024cat confdefs.h >>conftest.$ac_ext
12025cat >>conftest.$ac_ext <<_ACEOF
12026/* end confdefs.h. */
98418dba 12027/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
12028 which can conflict with char getloadavg (); below.
12029 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12030 <limits.h> exists even on freestanding compilers. */
12031#ifdef __STDC__
12032# include <limits.h>
12033#else
12034# include <assert.h>
12035#endif
ba4481b5 12036/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12037#ifdef __cplusplus
12038extern "C"
cd958eb3 12039{
503d2be0 12040#endif
ba4481b5 12041/* We use char because int might match the return type of a gcc2
503d2be0 12042 builtin and then its argument prototype would still apply. */
98418dba 12043char getloadavg ();
98418dba
CW
12044/* The GNU C library defines this for functions which it implements
12045 to always fail with ENOSYS. Some functions are actually named
12046 something starting with __ and the normal name is an alias. */
12047#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
12048choke me
12049#else
cd958eb3 12050char (*f) () = getloadavg;
98418dba 12051#endif
cd958eb3
MB
12052#ifdef __cplusplus
12053}
12054#endif
12055
12056int
12057main ()
12058{
9e71690e 12059return f != getloadavg;
503d2be0
AS
12060 ;
12061 return 0;
12062}
12063_ACEOF
12064rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12066 (eval $ac_link) 2>&5
12067 ac_status=$?
c0d27fcc 12068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12069 (exit $ac_status); } &&
12070 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12072 (eval $ac_try) 2>&5
12073 ac_status=$?
c0d27fcc 12074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12075 (exit $ac_status); }; }; then
98418dba 12076 ac_cv_func_getloadavg=yes
503d2be0
AS
12077else
12078 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12079sed 's/^/| /' conftest.$ac_ext >&5
12080
98418dba 12081ac_cv_func_getloadavg=no
503d2be0
AS
12082fi
12083rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 12084fi
c0d27fcc 12085echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
12086echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
12087if test $ac_cv_func_getloadavg = yes; then
12088 exit 0
12089else
12090 exit 1
ba4481b5 12091fi
98418dba 12092) && ac_have_func=yes
ba4481b5 12093
98418dba 12094# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 12095
98418dba
CW
12096for ac_func in pstat_getdynamic
12097do
12098as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 12099echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
12100echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12101if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 12102 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12103else
503d2be0 12104 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12105#line $LINENO "configure"
cd958eb3
MB
12106/* confdefs.h. */
12107_ACEOF
12108cat confdefs.h >>conftest.$ac_ext
12109cat >>conftest.$ac_ext <<_ACEOF
12110/* end confdefs.h. */
98418dba 12111/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
12112 which can conflict with char $ac_func (); below.
12113 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12114 <limits.h> exists even on freestanding compilers. */
12115#ifdef __STDC__
12116# include <limits.h>
12117#else
12118# include <assert.h>
12119#endif
ba4481b5 12120/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12121#ifdef __cplusplus
12122extern "C"
cd958eb3 12123{
503d2be0 12124#endif
ba4481b5 12125/* We use char because int might match the return type of a gcc2
503d2be0 12126 builtin and then its argument prototype would still apply. */
98418dba 12127char $ac_func ();
98418dba
CW
12128/* The GNU C library defines this for functions which it implements
12129 to always fail with ENOSYS. Some functions are actually named
12130 something starting with __ and the normal name is an alias. */
12131#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12132choke me
12133#else
cd958eb3
MB
12134char (*f) () = $ac_func;
12135#endif
12136#ifdef __cplusplus
12137}
98418dba
CW
12138#endif
12139
cd958eb3
MB
12140int
12141main ()
12142{
9e71690e 12143return f != $ac_func;
98418dba
CW
12144 ;
12145 return 0;
12146}
f21fadcc 12147_ACEOF
98418dba 12148rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 12150 (eval $ac_link) 2>&5
f21fadcc 12151 ac_status=$?
c0d27fcc 12152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12153 (exit $ac_status); } &&
12154 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
12156 (eval $ac_try) 2>&5
12157 ac_status=$?
c0d27fcc 12158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12159 (exit $ac_status); }; }; then
12160 eval "$as_ac_var=yes"
f21fadcc
JD
12161else
12162 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12163sed 's/^/| /' conftest.$ac_ext >&5
12164
98418dba 12165eval "$as_ac_var=no"
f21fadcc 12166fi
98418dba 12167rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
f21fadcc 12168fi
c0d27fcc 12169echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
12170echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12171if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 12172 cat >>confdefs.h <<_ACEOF
98418dba 12173#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 12174_ACEOF
98418dba
CW
12175
12176fi
12177done
12178
c0d27fcc 12179
98418dba
CW
12180# Solaris has libkstat which does not require root.
12181
c0d27fcc 12182echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
12183echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
12184if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
12185 echo $ECHO_N "(cached) $ECHO_C" >&6
12186else
12187 ac_check_lib_save_LIBS=$LIBS
98418dba 12188LIBS="-lkstat $LIBS"
f21fadcc 12189cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12190#line $LINENO "configure"
cd958eb3
MB
12191/* confdefs.h. */
12192_ACEOF
12193cat confdefs.h >>conftest.$ac_ext
12194cat >>conftest.$ac_ext <<_ACEOF
12195/* end confdefs.h. */
f21fadcc
JD
12196
12197/* Override any gcc2 internal prototype to avoid an error. */
12198#ifdef __cplusplus
12199extern "C"
12200#endif
12201/* We use char because int might match the return type of a gcc2
12202 builtin and then its argument prototype would still apply. */
98418dba 12203char kstat_open ();
f21fadcc
JD
12204int
12205main ()
12206{
98418dba 12207kstat_open ();
f21fadcc
JD
12208 ;
12209 return 0;
12210}
12211_ACEOF
12212rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
f21fadcc
JD
12214 (eval $ac_link) 2>&5
12215 ac_status=$?
c0d27fcc 12216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc
JD
12217 (exit $ac_status); } &&
12218 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
12220 (eval $ac_try) 2>&5
12221 ac_status=$?
c0d27fcc 12222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 12223 (exit $ac_status); }; }; then
98418dba 12224 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
12225else
12226 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12227sed 's/^/| /' conftest.$ac_ext >&5
12228
98418dba 12229ac_cv_lib_kstat_kstat_open=no
f21fadcc
JD
12230fi
12231rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12232LIBS=$ac_check_lib_save_LIBS
12233fi
c0d27fcc 12234echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
12235echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
12236if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 12237 cat >>confdefs.h <<_ACEOF
98418dba 12238#define HAVE_LIBKSTAT 1
c0d27fcc 12239_ACEOF
f21fadcc 12240
98418dba 12241 LIBS="-lkstat $LIBS"
f21fadcc 12242
f21fadcc
JD
12243fi
12244
98418dba
CW
12245test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
12246
12247# Some systems with -lutil have (and need) -lkvm as well, some do not.
12248# On Solaris, -lkvm requires nlist from -lelf, so check that first
12249# to get the right answer into the cache.
12250# For kstat on solaris, we need libelf to force the definition of SVR4 below.
12251if test $ac_have_func = no; then
c0d27fcc 12252 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
12253echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
12254if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 12255 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12256else
98418dba
CW
12257 ac_check_lib_save_LIBS=$LIBS
12258LIBS="-lelf $LIBS"
12259cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12260#line $LINENO "configure"
cd958eb3
MB
12261/* confdefs.h. */
12262_ACEOF
12263cat confdefs.h >>conftest.$ac_ext
12264cat >>conftest.$ac_ext <<_ACEOF
12265/* end confdefs.h. */
98418dba
CW
12266
12267/* Override any gcc2 internal prototype to avoid an error. */
12268#ifdef __cplusplus
12269extern "C"
12270#endif
12271/* We use char because int might match the return type of a gcc2
12272 builtin and then its argument prototype would still apply. */
12273char elf_begin ();
503d2be0
AS
12274int
12275main ()
12276{
98418dba 12277elf_begin ();
503d2be0
AS
12278 ;
12279 return 0;
12280}
12281_ACEOF
12282rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12283if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12284 (eval $ac_link) 2>&5
12285 ac_status=$?
c0d27fcc 12286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12287 (exit $ac_status); } &&
12288 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12290 (eval $ac_try) 2>&5
12291 ac_status=$?
c0d27fcc 12292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12293 (exit $ac_status); }; }; then
98418dba 12294 ac_cv_lib_elf_elf_begin=yes
ba4481b5 12295else
503d2be0 12296 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12297sed 's/^/| /' conftest.$ac_ext >&5
12298
98418dba 12299ac_cv_lib_elf_elf_begin=no
ba4481b5 12300fi
503d2be0 12301rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 12302LIBS=$ac_check_lib_save_LIBS
ba4481b5 12303fi
c0d27fcc 12304echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
12305echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
12306if test $ac_cv_lib_elf_elf_begin = yes; then
12307 LIBS="-lelf $LIBS"
ba4481b5
DL
12308fi
12309
98418dba
CW
12310fi
12311if test $ac_have_func = no; then
c0d27fcc 12312 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
12313echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
12314if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 12315 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12316else
98418dba
CW
12317 ac_check_lib_save_LIBS=$LIBS
12318LIBS="-lkvm $LIBS"
12319cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12320#line $LINENO "configure"
cd958eb3
MB
12321/* confdefs.h. */
12322_ACEOF
12323cat confdefs.h >>conftest.$ac_ext
12324cat >>conftest.$ac_ext <<_ACEOF
12325/* end confdefs.h. */
98418dba
CW
12326
12327/* Override any gcc2 internal prototype to avoid an error. */
12328#ifdef __cplusplus
12329extern "C"
12330#endif
12331/* We use char because int might match the return type of a gcc2
12332 builtin and then its argument prototype would still apply. */
12333char kvm_open ();
503d2be0
AS
12334int
12335main ()
12336{
98418dba 12337kvm_open ();
503d2be0
AS
12338 ;
12339 return 0;
12340}
12341_ACEOF
12342rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12343if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12344 (eval $ac_link) 2>&5
12345 ac_status=$?
c0d27fcc 12346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12347 (exit $ac_status); } &&
12348 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12350 (eval $ac_try) 2>&5
12351 ac_status=$?
c0d27fcc 12352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12353 (exit $ac_status); }; }; then
98418dba 12354 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
12355else
12356 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12357sed 's/^/| /' conftest.$ac_ext >&5
12358
98418dba 12359ac_cv_lib_kvm_kvm_open=no
503d2be0
AS
12360fi
12361rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 12362LIBS=$ac_check_lib_save_LIBS
503d2be0 12363fi
c0d27fcc 12364echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
12365echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
12366if test $ac_cv_lib_kvm_kvm_open = yes; then
12367 LIBS="-lkvm $LIBS"
ba4481b5
DL
12368fi
12369
98418dba 12370 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 12371 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
12372echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
12373if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 12374 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12375else
98418dba
CW
12376 ac_check_lib_save_LIBS=$LIBS
12377LIBS="-lutil $LIBS"
12378cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12379#line $LINENO "configure"
cd958eb3
MB
12380/* confdefs.h. */
12381_ACEOF
12382cat confdefs.h >>conftest.$ac_ext
12383cat >>conftest.$ac_ext <<_ACEOF
12384/* end confdefs.h. */
98418dba
CW
12385
12386/* Override any gcc2 internal prototype to avoid an error. */
12387#ifdef __cplusplus
12388extern "C"
12389#endif
12390/* We use char because int might match the return type of a gcc2
12391 builtin and then its argument prototype would still apply. */
12392char getloadavg ();
503d2be0
AS
12393int
12394main ()
12395{
98418dba 12396getloadavg ();
503d2be0
AS
12397 ;
12398 return 0;
12399}
12400_ACEOF
12401rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12402if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12403 (eval $ac_link) 2>&5
12404 ac_status=$?
c0d27fcc 12405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12406 (exit $ac_status); } &&
12407 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12409 (eval $ac_try) 2>&5
12410 ac_status=$?
c0d27fcc 12411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12412 (exit $ac_status); }; }; then
98418dba 12413 ac_cv_lib_util_getloadavg=yes
ba4481b5 12414else
503d2be0 12415 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12416sed 's/^/| /' conftest.$ac_ext >&5
12417
98418dba 12418ac_cv_lib_util_getloadavg=no
ba4481b5 12419fi
503d2be0 12420rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12421LIBS=$ac_check_lib_save_LIBS
12422fi
c0d27fcc 12423echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
12424echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
12425if test $ac_cv_lib_util_getloadavg = yes; then
12426 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 12427fi
503d2be0 12428
98418dba 12429fi
ba4481b5 12430
98418dba
CW
12431if test $ac_have_func = no; then
12432 # There is a commonly available library for RS/6000 AIX.
12433 # Since it is not a standard part of AIX, it might be installed locally.
12434 ac_getloadavg_LIBS=$LIBS
12435 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 12436 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
12437echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
12438if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 12439 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12440else
98418dba
CW
12441 ac_check_lib_save_LIBS=$LIBS
12442LIBS="-lgetloadavg $LIBS"
12443cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12444#line $LINENO "configure"
cd958eb3
MB
12445/* confdefs.h. */
12446_ACEOF
12447cat confdefs.h >>conftest.$ac_ext
12448cat >>conftest.$ac_ext <<_ACEOF
12449/* end confdefs.h. */
ba4481b5 12450
98418dba
CW
12451/* Override any gcc2 internal prototype to avoid an error. */
12452#ifdef __cplusplus
12453extern "C"
12454#endif
12455/* We use char because int might match the return type of a gcc2
12456 builtin and then its argument prototype would still apply. */
12457char getloadavg ();
98418dba
CW
12458int
12459main ()
12460{
12461getloadavg ();
12462 ;
12463 return 0;
12464}
503d2be0 12465_ACEOF
98418dba 12466rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12467if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
12468 (eval $ac_link) 2>&5
12469 ac_status=$?
c0d27fcc 12470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12471 (exit $ac_status); } &&
12472 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
12474 (eval $ac_try) 2>&5
12475 ac_status=$?
c0d27fcc 12476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12477 (exit $ac_status); }; }; then
12478 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 12479else
98418dba 12480 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12481sed 's/^/| /' conftest.$ac_ext >&5
12482
98418dba
CW
12483ac_cv_lib_getloadavg_getloadavg=no
12484fi
12485rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12486LIBS=$ac_check_lib_save_LIBS
12487fi
c0d27fcc 12488echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
12489echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
12490if test $ac_cv_lib_getloadavg_getloadavg = yes; then
12491 LIBS="-lgetloadavg $LIBS"
12492else
12493 LIBS=$ac_getloadavg_LIBS
ba4481b5 12494fi
ba4481b5
DL
12495
12496fi
98418dba
CW
12497
12498# Make sure it is really in the library, if we think we found it,
12499# otherwise set up the replacement function.
12500
12501for ac_func in getloadavg
12502do
12503as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 12504echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
12505echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12506if eval "test \"\${$as_ac_var+set}\" = set"; then
12507 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12508else
503d2be0 12509 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12510#line $LINENO "configure"
cd958eb3
MB
12511/* confdefs.h. */
12512_ACEOF
12513cat confdefs.h >>conftest.$ac_ext
12514cat >>conftest.$ac_ext <<_ACEOF
12515/* end confdefs.h. */
ba4481b5 12516/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
12517 which can conflict with char $ac_func (); below.
12518 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12519 <limits.h> exists even on freestanding compilers. */
12520#ifdef __STDC__
12521# include <limits.h>
12522#else
12523# include <assert.h>
12524#endif
ba4481b5 12525/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12526#ifdef __cplusplus
12527extern "C"
cd958eb3 12528{
503d2be0 12529#endif
ba4481b5 12530/* We use char because int might match the return type of a gcc2
503d2be0
AS
12531 builtin and then its argument prototype would still apply. */
12532char $ac_func ();
ba4481b5
DL
12533/* The GNU C library defines this for functions which it implements
12534 to always fail with ENOSYS. Some functions are actually named
12535 something starting with __ and the normal name is an alias. */
12536#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12537choke me
12538#else
cd958eb3 12539char (*f) () = $ac_func;
ba4481b5 12540#endif
cd958eb3
MB
12541#ifdef __cplusplus
12542}
12543#endif
12544
12545int
12546main ()
12547{
9e71690e 12548return f != $ac_func;
503d2be0
AS
12549 ;
12550 return 0;
12551}
12552_ACEOF
12553rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12554if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12555 (eval $ac_link) 2>&5
12556 ac_status=$?
c0d27fcc 12557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12558 (exit $ac_status); } &&
12559 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12561 (eval $ac_try) 2>&5
12562 ac_status=$?
c0d27fcc 12563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12564 (exit $ac_status); }; }; then
12565 eval "$as_ac_var=yes"
12566else
12567 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12568sed 's/^/| /' conftest.$ac_ext >&5
12569
503d2be0
AS
12570eval "$as_ac_var=no"
12571fi
12572rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12573fi
c0d27fcc 12574echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
12575echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12576if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 12577 cat >>confdefs.h <<_ACEOF
98418dba 12578#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 12579_ACEOF
503d2be0 12580
98418dba
CW
12581else
12582 LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
ba4481b5 12583
c0d27fcc 12584cat >>confdefs.h <<\_ACEOF
98418dba 12585#define C_GETLOADAVG 1
c0d27fcc 12586_ACEOF
ba4481b5 12587
98418dba
CW
12588# Figure out what our getloadavg.c needs.
12589ac_have_func=no
c0d27fcc
MR
12590if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
12591 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
12592echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
12593if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 12594 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12595fi
12596echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
12597echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 12598else
c0d27fcc
MR
12599 # Is the header compilable?
12600echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
12601echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
12602cat >conftest.$ac_ext <<_ACEOF
12603#line $LINENO "configure"
cd958eb3
MB
12604/* confdefs.h. */
12605_ACEOF
12606cat confdefs.h >>conftest.$ac_ext
12607cat >>conftest.$ac_ext <<_ACEOF
12608/* end confdefs.h. */
c0d27fcc
MR
12609$ac_includes_default
12610#include <sys/dg_sys_info.h>
12611_ACEOF
12612rm -f conftest.$ac_objext
12613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12614 (eval $ac_compile) 2>&5
12615 ac_status=$?
12616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12617 (exit $ac_status); } &&
12618 { ac_try='test -s conftest.$ac_objext'
12619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12620 (eval $ac_try) 2>&5
12621 ac_status=$?
12622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12623 (exit $ac_status); }; }; then
12624 ac_header_compiler=yes
12625else
12626 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12627sed 's/^/| /' conftest.$ac_ext >&5
12628
c0d27fcc
MR
12629ac_header_compiler=no
12630fi
12631rm -f conftest.$ac_objext conftest.$ac_ext
12632echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12633echo "${ECHO_T}$ac_header_compiler" >&6
12634
12635# Is the header present?
12636echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
12637echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
12638cat >conftest.$ac_ext <<_ACEOF
12639#line $LINENO "configure"
cd958eb3
MB
12640/* confdefs.h. */
12641_ACEOF
12642cat confdefs.h >>conftest.$ac_ext
12643cat >>conftest.$ac_ext <<_ACEOF
12644/* end confdefs.h. */
98418dba
CW
12645#include <sys/dg_sys_info.h>
12646_ACEOF
c0d27fcc 12647if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12648 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12649 ac_status=$?
6bae0ccf 12650 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12651 rm -f conftest.er1
12652 cat conftest.err >&5
c0d27fcc 12653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12654 (exit $ac_status); } >/dev/null; then
12655 if test -s conftest.err; then
12656 ac_cpp_err=$ac_c_preproc_warn_flag
12657 else
12658 ac_cpp_err=
12659 fi
12660else
12661 ac_cpp_err=yes
ba4481b5 12662fi
98418dba 12663if test -z "$ac_cpp_err"; then
c0d27fcc 12664 ac_header_preproc=yes
98418dba
CW
12665else
12666 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12667sed 's/^/| /' conftest.$ac_ext >&5
12668
c0d27fcc 12669 ac_header_preproc=no
ba4481b5 12670fi
98418dba 12671rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12672echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12673echo "${ECHO_T}$ac_header_preproc" >&6
12674
12675# So? What about this header?
12676case $ac_header_compiler:$ac_header_preproc in
12677 yes:no )
12678 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
12679echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12680 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12681echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
12682 (
12683 cat <<\_ASBOX
12684## ------------------------------------ ##
12685## Report this to bug-autoconf@gnu.org. ##
12686## ------------------------------------ ##
12687_ASBOX
12688 ) |
12689 sed "s/^/$as_me: WARNING: /" >&2
12690 ;;
c0d27fcc
MR
12691 no:yes )
12692 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
12693echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
12694 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
12695echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
12696 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12697echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
12698 (
12699 cat <<\_ASBOX
12700## ------------------------------------ ##
12701## Report this to bug-autoconf@gnu.org. ##
12702## ------------------------------------ ##
12703_ASBOX
12704 ) |
12705 sed "s/^/$as_me: WARNING: /" >&2
12706 ;;
c0d27fcc
MR
12707esac
12708echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
12709echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
12710if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
12711 echo $ECHO_N "(cached) $ECHO_C" >&6
12712else
12713 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 12714fi
c0d27fcc 12715echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 12716echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
12717
12718fi
98418dba
CW
12719if test $ac_cv_header_sys_dg_sys_info_h = yes; then
12720 ac_have_func=yes
ba4481b5 12721
c0d27fcc 12722cat >>confdefs.h <<\_ACEOF
98418dba 12723#define DGUX 1
c0d27fcc
MR
12724_ACEOF
12725
503d2be0 12726
c0d27fcc 12727echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
12728echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
12729if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 12730 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12731else
503d2be0 12732 ac_check_lib_save_LIBS=$LIBS
98418dba 12733LIBS="-ldgc $LIBS"
503d2be0 12734cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12735#line $LINENO "configure"
cd958eb3
MB
12736/* confdefs.h. */
12737_ACEOF
12738cat confdefs.h >>conftest.$ac_ext
12739cat >>conftest.$ac_ext <<_ACEOF
12740/* end confdefs.h. */
503d2be0 12741
ba4481b5 12742/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12743#ifdef __cplusplus
12744extern "C"
12745#endif
ba4481b5 12746/* We use char because int might match the return type of a gcc2
503d2be0 12747 builtin and then its argument prototype would still apply. */
98418dba 12748char dg_sys_info ();
503d2be0
AS
12749int
12750main ()
12751{
98418dba 12752dg_sys_info ();
503d2be0
AS
12753 ;
12754 return 0;
12755}
12756_ACEOF
12757rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12758if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12759 (eval $ac_link) 2>&5
12760 ac_status=$?
c0d27fcc 12761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12762 (exit $ac_status); } &&
12763 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12765 (eval $ac_try) 2>&5
12766 ac_status=$?
c0d27fcc 12767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12768 (exit $ac_status); }; }; then
98418dba 12769 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
12770else
12771 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12772sed 's/^/| /' conftest.$ac_ext >&5
12773
98418dba 12774ac_cv_lib_dgc_dg_sys_info=no
503d2be0
AS
12775fi
12776rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12777LIBS=$ac_check_lib_save_LIBS
12778fi
c0d27fcc 12779echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
12780echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
12781if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 12782 cat >>confdefs.h <<_ACEOF
98418dba 12783#define HAVE_LIBDGC 1
c0d27fcc 12784_ACEOF
ba4481b5 12785
98418dba 12786 LIBS="-ldgc $LIBS"
ba4481b5 12787
ba4481b5
DL
12788fi
12789
98418dba 12790fi
503d2be0 12791
c0d27fcc
MR
12792
12793
12794if test "${ac_cv_header_locale_h+set}" = set; then
12795 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
12796echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
12797if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 12798 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12799fi
12800echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
12801echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 12802else
c0d27fcc
MR
12803 # Is the header compilable?
12804echo "$as_me:$LINENO: checking locale.h usability" >&5
12805echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
12806cat >conftest.$ac_ext <<_ACEOF
12807#line $LINENO "configure"
cd958eb3
MB
12808/* confdefs.h. */
12809_ACEOF
12810cat confdefs.h >>conftest.$ac_ext
12811cat >>conftest.$ac_ext <<_ACEOF
12812/* end confdefs.h. */
c0d27fcc
MR
12813$ac_includes_default
12814#include <locale.h>
12815_ACEOF
12816rm -f conftest.$ac_objext
12817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12818 (eval $ac_compile) 2>&5
12819 ac_status=$?
12820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12821 (exit $ac_status); } &&
12822 { ac_try='test -s conftest.$ac_objext'
12823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12824 (eval $ac_try) 2>&5
12825 ac_status=$?
12826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12827 (exit $ac_status); }; }; then
12828 ac_header_compiler=yes
12829else
12830 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12831sed 's/^/| /' conftest.$ac_ext >&5
12832
c0d27fcc
MR
12833ac_header_compiler=no
12834fi
12835rm -f conftest.$ac_objext conftest.$ac_ext
12836echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12837echo "${ECHO_T}$ac_header_compiler" >&6
12838
12839# Is the header present?
12840echo "$as_me:$LINENO: checking locale.h presence" >&5
12841echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
12842cat >conftest.$ac_ext <<_ACEOF
12843#line $LINENO "configure"
cd958eb3
MB
12844/* confdefs.h. */
12845_ACEOF
12846cat confdefs.h >>conftest.$ac_ext
12847cat >>conftest.$ac_ext <<_ACEOF
12848/* end confdefs.h. */
98418dba 12849#include <locale.h>
503d2be0 12850_ACEOF
c0d27fcc 12851if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 12852 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 12853 ac_status=$?
6bae0ccf 12854 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12855 rm -f conftest.er1
12856 cat conftest.err >&5
c0d27fcc 12857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12858 (exit $ac_status); } >/dev/null; then
12859 if test -s conftest.err; then
12860 ac_cpp_err=$ac_c_preproc_warn_flag
12861 else
12862 ac_cpp_err=
12863 fi
503d2be0 12864else
98418dba 12865 ac_cpp_err=yes
503d2be0 12866fi
98418dba 12867if test -z "$ac_cpp_err"; then
c0d27fcc 12868 ac_header_preproc=yes
98418dba
CW
12869else
12870 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12871sed 's/^/| /' conftest.$ac_ext >&5
12872
c0d27fcc 12873 ac_header_preproc=no
ba4481b5 12874fi
98418dba 12875rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12876echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12877echo "${ECHO_T}$ac_header_preproc" >&6
12878
12879# So? What about this header?
12880case $ac_header_compiler:$ac_header_preproc in
12881 yes:no )
12882 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
12883echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12884 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12885echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
12886 (
12887 cat <<\_ASBOX
12888## ------------------------------------ ##
12889## Report this to bug-autoconf@gnu.org. ##
12890## ------------------------------------ ##
12891_ASBOX
12892 ) |
12893 sed "s/^/$as_me: WARNING: /" >&2
12894 ;;
c0d27fcc
MR
12895 no:yes )
12896 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
12897echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
12898 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
12899echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
12900 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12901echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
12902 (
12903 cat <<\_ASBOX
12904## ------------------------------------ ##
12905## Report this to bug-autoconf@gnu.org. ##
12906## ------------------------------------ ##
12907_ASBOX
12908 ) |
12909 sed "s/^/$as_me: WARNING: /" >&2
12910 ;;
c0d27fcc
MR
12911esac
12912echo "$as_me:$LINENO: checking for locale.h" >&5
12913echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
12914if test "${ac_cv_header_locale_h+set}" = set; then
12915 echo $ECHO_N "(cached) $ECHO_C" >&6
12916else
12917 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 12918fi
c0d27fcc 12919echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
12920echo "${ECHO_T}$ac_cv_header_locale_h" >&6
12921
c0d27fcc
MR
12922fi
12923
12924
12925
98418dba 12926for ac_func in setlocale
ba4481b5 12927do
503d2be0 12928as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 12929echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
12930echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12931if eval "test \"\${$as_ac_var+set}\" = set"; then
12932 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12933else
503d2be0 12934 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12935#line $LINENO "configure"
cd958eb3
MB
12936/* confdefs.h. */
12937_ACEOF
12938cat confdefs.h >>conftest.$ac_ext
12939cat >>conftest.$ac_ext <<_ACEOF
12940/* end confdefs.h. */
ba4481b5 12941/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
12942 which can conflict with char $ac_func (); below.
12943 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12944 <limits.h> exists even on freestanding compilers. */
12945#ifdef __STDC__
12946# include <limits.h>
12947#else
12948# include <assert.h>
12949#endif
ba4481b5 12950/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12951#ifdef __cplusplus
12952extern "C"
cd958eb3 12953{
503d2be0 12954#endif
ba4481b5 12955/* We use char because int might match the return type of a gcc2
503d2be0
AS
12956 builtin and then its argument prototype would still apply. */
12957char $ac_func ();
ba4481b5
DL
12958/* The GNU C library defines this for functions which it implements
12959 to always fail with ENOSYS. Some functions are actually named
12960 something starting with __ and the normal name is an alias. */
12961#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12962choke me
12963#else
cd958eb3
MB
12964char (*f) () = $ac_func;
12965#endif
12966#ifdef __cplusplus
12967}
ba4481b5
DL
12968#endif
12969
cd958eb3
MB
12970int
12971main ()
12972{
9e71690e 12973return f != $ac_func;
503d2be0
AS
12974 ;
12975 return 0;
12976}
12977_ACEOF
12978rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12979if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12980 (eval $ac_link) 2>&5
12981 ac_status=$?
c0d27fcc 12982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12983 (exit $ac_status); } &&
12984 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12986 (eval $ac_try) 2>&5
12987 ac_status=$?
c0d27fcc 12988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12989 (exit $ac_status); }; }; then
12990 eval "$as_ac_var=yes"
12991else
12992 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12993sed 's/^/| /' conftest.$ac_ext >&5
12994
503d2be0
AS
12995eval "$as_ac_var=no"
12996fi
12997rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12998fi
c0d27fcc 12999echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13000echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13001if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13002 cat >>confdefs.h <<_ACEOF
503d2be0 13003#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13004_ACEOF
ba4481b5 13005
ba4481b5
DL
13006fi
13007done
13008
c0d27fcc 13009
98418dba
CW
13010# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
13011# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
13012# Irix 4.0.5F has the header but not the library.
13013if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
13014 ac_have_func=yes
13015
c0d27fcc 13016cat >>confdefs.h <<\_ACEOF
98418dba 13017#define SVR4 1
c0d27fcc 13018_ACEOF
98418dba
CW
13019
13020fi
13021
13022if test $ac_have_func = no; then
c0d27fcc
MR
13023 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
13024 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
13025echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
13026if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 13027 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13028fi
13029echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
13030echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 13031else
c0d27fcc
MR
13032 # Is the header compilable?
13033echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
13034echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
13035cat >conftest.$ac_ext <<_ACEOF
13036#line $LINENO "configure"
cd958eb3
MB
13037/* confdefs.h. */
13038_ACEOF
13039cat confdefs.h >>conftest.$ac_ext
13040cat >>conftest.$ac_ext <<_ACEOF
13041/* end confdefs.h. */
c0d27fcc
MR
13042$ac_includes_default
13043#include <inq_stats/cpustats.h>
13044_ACEOF
13045rm -f conftest.$ac_objext
13046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13047 (eval $ac_compile) 2>&5
13048 ac_status=$?
13049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13050 (exit $ac_status); } &&
13051 { ac_try='test -s conftest.$ac_objext'
13052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13053 (eval $ac_try) 2>&5
13054 ac_status=$?
13055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13056 (exit $ac_status); }; }; then
13057 ac_header_compiler=yes
13058else
13059 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13060sed 's/^/| /' conftest.$ac_ext >&5
13061
c0d27fcc
MR
13062ac_header_compiler=no
13063fi
13064rm -f conftest.$ac_objext conftest.$ac_ext
13065echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13066echo "${ECHO_T}$ac_header_compiler" >&6
13067
13068# Is the header present?
13069echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
13070echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
13071cat >conftest.$ac_ext <<_ACEOF
13072#line $LINENO "configure"
cd958eb3
MB
13073/* confdefs.h. */
13074_ACEOF
13075cat confdefs.h >>conftest.$ac_ext
13076cat >>conftest.$ac_ext <<_ACEOF
13077/* end confdefs.h. */
98418dba 13078#include <inq_stats/cpustats.h>
503d2be0 13079_ACEOF
c0d27fcc 13080if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
13081 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13082 ac_status=$?
6bae0ccf 13083 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13084 rm -f conftest.er1
13085 cat conftest.err >&5
c0d27fcc 13086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13087 (exit $ac_status); } >/dev/null; then
13088 if test -s conftest.err; then
13089 ac_cpp_err=$ac_c_preproc_warn_flag
13090 else
13091 ac_cpp_err=
13092 fi
13093else
13094 ac_cpp_err=yes
13095fi
13096if test -z "$ac_cpp_err"; then
c0d27fcc 13097 ac_header_preproc=yes
503d2be0
AS
13098else
13099 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13100sed 's/^/| /' conftest.$ac_ext >&5
13101
c0d27fcc 13102 ac_header_preproc=no
ba4481b5 13103fi
503d2be0 13104rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13105echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13106echo "${ECHO_T}$ac_header_preproc" >&6
13107
13108# So? What about this header?
13109case $ac_header_compiler:$ac_header_preproc in
13110 yes:no )
13111 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
13112echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13113 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13114echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
13115 (
13116 cat <<\_ASBOX
13117## ------------------------------------ ##
13118## Report this to bug-autoconf@gnu.org. ##
13119## ------------------------------------ ##
13120_ASBOX
13121 ) |
13122 sed "s/^/$as_me: WARNING: /" >&2
13123 ;;
c0d27fcc
MR
13124 no:yes )
13125 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
13126echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
13127 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
13128echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
13129 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13130echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
13131 (
13132 cat <<\_ASBOX
13133## ------------------------------------ ##
13134## Report this to bug-autoconf@gnu.org. ##
13135## ------------------------------------ ##
13136_ASBOX
13137 ) |
13138 sed "s/^/$as_me: WARNING: /" >&2
13139 ;;
c0d27fcc
MR
13140esac
13141echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
13142echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
13143if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
13144 echo $ECHO_N "(cached) $ECHO_C" >&6
13145else
13146 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 13147fi
c0d27fcc 13148echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 13149echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
13150
13151fi
98418dba
CW
13152if test $ac_cv_header_inq_stats_cpustats_h = yes; then
13153 ac_have_func=yes
ba4481b5 13154
c0d27fcc 13155cat >>confdefs.h <<\_ACEOF
98418dba 13156#define UMAX 1
c0d27fcc 13157_ACEOF
98418dba 13158
c0d27fcc
MR
13159
13160cat >>confdefs.h <<\_ACEOF
98418dba 13161#define UMAX4_3 1
c0d27fcc 13162_ACEOF
98418dba
CW
13163
13164fi
13165
c0d27fcc 13166
98418dba
CW
13167fi
13168
13169if test $ac_have_func = no; then
c0d27fcc
MR
13170 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
13171 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
13172echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
13173if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 13174 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13175fi
13176echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
13177echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 13178else
c0d27fcc
MR
13179 # Is the header compilable?
13180echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
13181echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
13182cat >conftest.$ac_ext <<_ACEOF
13183#line $LINENO "configure"
cd958eb3
MB
13184/* confdefs.h. */
13185_ACEOF
13186cat confdefs.h >>conftest.$ac_ext
13187cat >>conftest.$ac_ext <<_ACEOF
13188/* end confdefs.h. */
c0d27fcc
MR
13189$ac_includes_default
13190#include <sys/cpustats.h>
13191_ACEOF
13192rm -f conftest.$ac_objext
13193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13194 (eval $ac_compile) 2>&5
13195 ac_status=$?
13196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13197 (exit $ac_status); } &&
13198 { ac_try='test -s conftest.$ac_objext'
13199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13200 (eval $ac_try) 2>&5
13201 ac_status=$?
13202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13203 (exit $ac_status); }; }; then
13204 ac_header_compiler=yes
13205else
13206 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13207sed 's/^/| /' conftest.$ac_ext >&5
13208
c0d27fcc
MR
13209ac_header_compiler=no
13210fi
13211rm -f conftest.$ac_objext conftest.$ac_ext
13212echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13213echo "${ECHO_T}$ac_header_compiler" >&6
13214
13215# Is the header present?
13216echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
13217echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
13218cat >conftest.$ac_ext <<_ACEOF
13219#line $LINENO "configure"
cd958eb3
MB
13220/* confdefs.h. */
13221_ACEOF
13222cat confdefs.h >>conftest.$ac_ext
13223cat >>conftest.$ac_ext <<_ACEOF
13224/* end confdefs.h. */
98418dba
CW
13225#include <sys/cpustats.h>
13226_ACEOF
c0d27fcc 13227if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
13228 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13229 ac_status=$?
6bae0ccf 13230 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13231 rm -f conftest.er1
13232 cat conftest.err >&5
c0d27fcc 13233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13234 (exit $ac_status); } >/dev/null; then
13235 if test -s conftest.err; then
13236 ac_cpp_err=$ac_c_preproc_warn_flag
13237 else
13238 ac_cpp_err=
13239 fi
13240else
13241 ac_cpp_err=yes
503d2be0 13242fi
98418dba 13243if test -z "$ac_cpp_err"; then
c0d27fcc 13244 ac_header_preproc=yes
98418dba
CW
13245else
13246 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13247sed 's/^/| /' conftest.$ac_ext >&5
13248
c0d27fcc 13249 ac_header_preproc=no
98418dba
CW
13250fi
13251rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13252echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13253echo "${ECHO_T}$ac_header_preproc" >&6
13254
13255# So? What about this header?
13256case $ac_header_compiler:$ac_header_preproc in
13257 yes:no )
13258 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
13259echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13260 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13261echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
13262 (
13263 cat <<\_ASBOX
13264## ------------------------------------ ##
13265## Report this to bug-autoconf@gnu.org. ##
13266## ------------------------------------ ##
13267_ASBOX
13268 ) |
13269 sed "s/^/$as_me: WARNING: /" >&2
13270 ;;
c0d27fcc
MR
13271 no:yes )
13272 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
13273echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
13274 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
13275echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
13276 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13277echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
13278 (
13279 cat <<\_ASBOX
13280## ------------------------------------ ##
13281## Report this to bug-autoconf@gnu.org. ##
13282## ------------------------------------ ##
13283_ASBOX
13284 ) |
13285 sed "s/^/$as_me: WARNING: /" >&2
13286 ;;
c0d27fcc
MR
13287esac
13288echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
13289echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
13290if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
13291 echo $ECHO_N "(cached) $ECHO_C" >&6
13292else
13293 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 13294fi
c0d27fcc 13295echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 13296echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
13297
13298fi
98418dba 13299if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 13300 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 13301#define UMAX 1
c0d27fcc 13302_ACEOF
ba4481b5 13303
98418dba
CW
13304fi
13305
c0d27fcc 13306
98418dba
CW
13307fi
13308
13309if test $ac_have_func = no; then
13310
13311for ac_header in mach/mach.h
2c9dccc9
PJ
13312do
13313as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
13314if eval "test \"\${$as_ac_Header+set}\" = set"; then
13315 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
13316echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13317if eval "test \"\${$as_ac_Header+set}\" = set"; then
13318 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13319fi
13320echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13321echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 13322else
c0d27fcc
MR
13323 # Is the header compilable?
13324echo "$as_me:$LINENO: checking $ac_header usability" >&5
13325echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13326cat >conftest.$ac_ext <<_ACEOF
13327#line $LINENO "configure"
cd958eb3
MB
13328/* confdefs.h. */
13329_ACEOF
13330cat confdefs.h >>conftest.$ac_ext
13331cat >>conftest.$ac_ext <<_ACEOF
13332/* end confdefs.h. */
c0d27fcc
MR
13333$ac_includes_default
13334#include <$ac_header>
13335_ACEOF
13336rm -f conftest.$ac_objext
13337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13338 (eval $ac_compile) 2>&5
13339 ac_status=$?
13340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13341 (exit $ac_status); } &&
13342 { ac_try='test -s conftest.$ac_objext'
13343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13344 (eval $ac_try) 2>&5
13345 ac_status=$?
13346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13347 (exit $ac_status); }; }; then
13348 ac_header_compiler=yes
13349else
13350 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13351sed 's/^/| /' conftest.$ac_ext >&5
13352
c0d27fcc
MR
13353ac_header_compiler=no
13354fi
13355rm -f conftest.$ac_objext conftest.$ac_ext
13356echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13357echo "${ECHO_T}$ac_header_compiler" >&6
13358
13359# Is the header present?
13360echo "$as_me:$LINENO: checking $ac_header presence" >&5
13361echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13362cat >conftest.$ac_ext <<_ACEOF
13363#line $LINENO "configure"
cd958eb3
MB
13364/* confdefs.h. */
13365_ACEOF
13366cat confdefs.h >>conftest.$ac_ext
13367cat >>conftest.$ac_ext <<_ACEOF
13368/* end confdefs.h. */
2c9dccc9
PJ
13369#include <$ac_header>
13370_ACEOF
c0d27fcc 13371if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
13372 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13373 ac_status=$?
6bae0ccf 13374 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
13375 rm -f conftest.er1
13376 cat conftest.err >&5
c0d27fcc 13377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
13378 (exit $ac_status); } >/dev/null; then
13379 if test -s conftest.err; then
13380 ac_cpp_err=$ac_c_preproc_warn_flag
13381 else
13382 ac_cpp_err=
13383 fi
13384else
13385 ac_cpp_err=yes
13386fi
13387if test -z "$ac_cpp_err"; then
c0d27fcc
MR
13388 ac_header_preproc=yes
13389else
13390 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13391sed 's/^/| /' conftest.$ac_ext >&5
13392
c0d27fcc
MR
13393 ac_header_preproc=no
13394fi
13395rm -f conftest.err conftest.$ac_ext
13396echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13397echo "${ECHO_T}$ac_header_preproc" >&6
13398
13399# So? What about this header?
13400case $ac_header_compiler:$ac_header_preproc in
13401 yes:no )
13402 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13403echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13404 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13405echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13406 (
13407 cat <<\_ASBOX
13408## ------------------------------------ ##
13409## Report this to bug-autoconf@gnu.org. ##
13410## ------------------------------------ ##
13411_ASBOX
13412 ) |
13413 sed "s/^/$as_me: WARNING: /" >&2
13414 ;;
c0d27fcc
MR
13415 no:yes )
13416 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13417echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13418 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13419echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13420 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13421echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13422 (
13423 cat <<\_ASBOX
13424## ------------------------------------ ##
13425## Report this to bug-autoconf@gnu.org. ##
13426## ------------------------------------ ##
13427_ASBOX
13428 ) |
13429 sed "s/^/$as_me: WARNING: /" >&2
13430 ;;
c0d27fcc
MR
13431esac
13432echo "$as_me:$LINENO: checking for $ac_header" >&5
13433echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13434if eval "test \"\${$as_ac_Header+set}\" = set"; then
13435 echo $ECHO_N "(cached) $ECHO_C" >&6
13436else
13437 eval "$as_ac_Header=$ac_header_preproc"
13438fi
13439echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13440echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13441
13442fi
13443if test `eval echo '${'$as_ac_Header'}'` = yes; then
13444 cat >>confdefs.h <<_ACEOF
13445#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13446_ACEOF
13447
13448fi
13449
13450done
13451
13452fi
13453
13454
13455for ac_header in nlist.h
13456do
13457as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13458if eval "test \"\${$as_ac_Header+set}\" = set"; then
13459 echo "$as_me:$LINENO: checking for $ac_header" >&5
13460echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13461if eval "test \"\${$as_ac_Header+set}\" = set"; then
13462 echo $ECHO_N "(cached) $ECHO_C" >&6
13463fi
13464echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13465echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13466else
13467 # Is the header compilable?
13468echo "$as_me:$LINENO: checking $ac_header usability" >&5
13469echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13470cat >conftest.$ac_ext <<_ACEOF
13471#line $LINENO "configure"
cd958eb3
MB
13472/* confdefs.h. */
13473_ACEOF
13474cat confdefs.h >>conftest.$ac_ext
13475cat >>conftest.$ac_ext <<_ACEOF
13476/* end confdefs.h. */
c0d27fcc
MR
13477$ac_includes_default
13478#include <$ac_header>
13479_ACEOF
13480rm -f conftest.$ac_objext
13481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13482 (eval $ac_compile) 2>&5
13483 ac_status=$?
13484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13485 (exit $ac_status); } &&
13486 { ac_try='test -s conftest.$ac_objext'
13487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13488 (eval $ac_try) 2>&5
13489 ac_status=$?
13490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13491 (exit $ac_status); }; }; then
13492 ac_header_compiler=yes
2c9dccc9
PJ
13493else
13494 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13495sed 's/^/| /' conftest.$ac_ext >&5
13496
c0d27fcc 13497ac_header_compiler=no
98418dba 13498fi
c0d27fcc
MR
13499rm -f conftest.$ac_objext conftest.$ac_ext
13500echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13501echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 13502
c0d27fcc
MR
13503# Is the header present?
13504echo "$as_me:$LINENO: checking $ac_header presence" >&5
13505echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13506cat >conftest.$ac_ext <<_ACEOF
13507#line $LINENO "configure"
cd958eb3
MB
13508/* confdefs.h. */
13509_ACEOF
13510cat confdefs.h >>conftest.$ac_ext
13511cat >>conftest.$ac_ext <<_ACEOF
13512/* end confdefs.h. */
503d2be0
AS
13513#include <$ac_header>
13514_ACEOF
c0d27fcc 13515if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
13516 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13517 ac_status=$?
6bae0ccf 13518 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13519 rm -f conftest.er1
13520 cat conftest.err >&5
c0d27fcc 13521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13522 (exit $ac_status); } >/dev/null; then
13523 if test -s conftest.err; then
13524 ac_cpp_err=$ac_c_preproc_warn_flag
13525 else
13526 ac_cpp_err=
13527 fi
13528else
13529 ac_cpp_err=yes
13530fi
13531if test -z "$ac_cpp_err"; then
c0d27fcc 13532 ac_header_preproc=yes
503d2be0
AS
13533else
13534 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13535sed 's/^/| /' conftest.$ac_ext >&5
13536
c0d27fcc 13537 ac_header_preproc=no
b5de8dc0 13538fi
503d2be0 13539rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13540echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13541echo "${ECHO_T}$ac_header_preproc" >&6
13542
13543# So? What about this header?
13544case $ac_header_compiler:$ac_header_preproc in
13545 yes:no )
13546 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13547echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13548 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13549echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13550 (
13551 cat <<\_ASBOX
13552## ------------------------------------ ##
13553## Report this to bug-autoconf@gnu.org. ##
13554## ------------------------------------ ##
13555_ASBOX
13556 ) |
13557 sed "s/^/$as_me: WARNING: /" >&2
13558 ;;
c0d27fcc
MR
13559 no:yes )
13560 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13561echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13562 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13563echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13564 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13565echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13566 (
13567 cat <<\_ASBOX
13568## ------------------------------------ ##
13569## Report this to bug-autoconf@gnu.org. ##
13570## ------------------------------------ ##
13571_ASBOX
13572 ) |
13573 sed "s/^/$as_me: WARNING: /" >&2
13574 ;;
c0d27fcc
MR
13575esac
13576echo "$as_me:$LINENO: checking for $ac_header" >&5
13577echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13578if eval "test \"\${$as_ac_Header+set}\" = set"; then
13579 echo $ECHO_N "(cached) $ECHO_C" >&6
13580else
13581 eval "$as_ac_Header=$ac_header_preproc"
b5de8dc0 13582fi
c0d27fcc 13583echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 13584echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
13585
13586fi
98418dba 13587if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 13588 cat >>confdefs.h <<_ACEOF
98418dba 13589#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
13590_ACEOF
13591 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
13592echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
13593if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 13594 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 13595else
503d2be0 13596 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13597#line $LINENO "configure"
cd958eb3
MB
13598/* confdefs.h. */
13599_ACEOF
13600cat confdefs.h >>conftest.$ac_ext
13601cat >>conftest.$ac_ext <<_ACEOF
13602/* end confdefs.h. */
98418dba 13603#include <nlist.h>
b5de8dc0 13604
503d2be0
AS
13605int
13606main ()
13607{
98418dba
CW
13608static struct nlist ac_aggr;
13609if (ac_aggr.n_un.n_name)
13610return 0;
503d2be0
AS
13611 ;
13612 return 0;
13613}
13614_ACEOF
98418dba 13615rm -f conftest.$ac_objext
c0d27fcc 13616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba 13617 (eval $ac_compile) 2>&5
503d2be0 13618 ac_status=$?
c0d27fcc 13619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13620 (exit $ac_status); } &&
98418dba 13621 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 13622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13623 (eval $ac_try) 2>&5
13624 ac_status=$?
c0d27fcc 13625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13626 (exit $ac_status); }; }; then
98418dba 13627 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
13628else
13629 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13630sed 's/^/| /' conftest.$ac_ext >&5
13631
6bae0ccf
DL
13632cat >conftest.$ac_ext <<_ACEOF
13633#line $LINENO "configure"
cd958eb3
MB
13634/* confdefs.h. */
13635_ACEOF
13636cat confdefs.h >>conftest.$ac_ext
13637cat >>conftest.$ac_ext <<_ACEOF
13638/* end confdefs.h. */
6bae0ccf
DL
13639#include <nlist.h>
13640
13641int
13642main ()
13643{
13644static struct nlist ac_aggr;
13645if (sizeof ac_aggr.n_un.n_name)
13646return 0;
13647 ;
13648 return 0;
13649}
13650_ACEOF
13651rm -f conftest.$ac_objext
13652if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13653 (eval $ac_compile) 2>&5
13654 ac_status=$?
13655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13656 (exit $ac_status); } &&
13657 { ac_try='test -s conftest.$ac_objext'
13658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13659 (eval $ac_try) 2>&5
13660 ac_status=$?
13661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13662 (exit $ac_status); }; }; then
13663 ac_cv_member_struct_nlist_n_un_n_name=yes
13664else
13665 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13666sed 's/^/| /' conftest.$ac_ext >&5
13667
98418dba 13668ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 13669fi
98418dba 13670rm -f conftest.$ac_objext conftest.$ac_ext
b5de8dc0 13671fi
6bae0ccf
DL
13672rm -f conftest.$ac_objext conftest.$ac_ext
13673fi
c0d27fcc 13674echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
13675echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
13676if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 13677
c0d27fcc 13678cat >>confdefs.h <<_ACEOF
98418dba 13679#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 13680_ACEOF
b5de8dc0 13681
c0d27fcc
MR
13682
13683cat >>confdefs.h <<\_ACEOF
98418dba 13684#define NLIST_NAME_UNION 1
c0d27fcc 13685_ACEOF
b5de8dc0 13686
98418dba 13687fi
b5de8dc0 13688
c0d27fcc 13689
98418dba 13690fi
c0d27fcc 13691
98418dba 13692done
b5de8dc0 13693
98418dba
CW
13694fi
13695done
b5de8dc0 13696
c0d27fcc 13697
98418dba 13698# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 13699echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
13700echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
13701if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
13702 echo $ECHO_N "(cached) $ECHO_C" >&6
13703else
13704 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13705#line $LINENO "configure"
cd958eb3
MB
13706/* confdefs.h. */
13707_ACEOF
13708cat confdefs.h >>conftest.$ac_ext
13709cat >>conftest.$ac_ext <<_ACEOF
13710/* end confdefs.h. */
6bae0ccf 13711#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
13712#ifdef LDAV_PRIVILEGED
13713Yowza Am I SETGID yet
13714#endif
13715_ACEOF
13716if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13717 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
13718 ac_cv_func_getloadavg_setgid=yes
13719else
13720 ac_cv_func_getloadavg_setgid=no
13721fi
13722rm -f conftest*
b5de8dc0 13723
98418dba 13724fi
c0d27fcc 13725echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
13726echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
13727if test $ac_cv_func_getloadavg_setgid = yes; then
13728 NEED_SETGID=true
b5de8dc0 13729
c0d27fcc 13730cat >>confdefs.h <<\_ACEOF
98418dba 13731#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 13732_ACEOF
98418dba 13733
b5de8dc0 13734else
98418dba 13735 NEED_SETGID=false
b5de8dc0 13736fi
98418dba
CW
13737
13738if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 13739 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
13740echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
13741if test "${ac_cv_group_kmem+set}" = set; then
13742 echo $ECHO_N "(cached) $ECHO_C" >&6
13743else
13744 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
13745 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
13746 # If we got an error (system does not support symlinks), try without -L.
13747 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
13748 ac_cv_group_kmem=`echo $ac_ls_output \
13749 | sed -ne 's/[ ][ ]*/ /g;
13750 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
13751 / /s/.* //;p;'`
13752
b5de8dc0 13753fi
c0d27fcc 13754echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
13755echo "${ECHO_T}$ac_cv_group_kmem" >&6
13756 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 13757fi
98418dba
CW
13758if test "x$ac_save_LIBS" = x; then
13759 GETLOADAVG_LIBS=$LIBS
13760else
13761 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 13762fi
98418dba 13763LIBS=$ac_save_LIBS
b5de8dc0 13764
c0d27fcc
MR
13765
13766
13767echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
13768echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13769if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 13770 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 13771else
b936fae4
AS
13772 while :; do
13773 ac_cv_sys_largefile_source=no
503d2be0 13774 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13775#line $LINENO "configure"
cd958eb3
MB
13776/* confdefs.h. */
13777_ACEOF
13778cat confdefs.h >>conftest.$ac_ext
13779cat >>conftest.$ac_ext <<_ACEOF
13780/* end confdefs.h. */
b936fae4 13781#include <stdio.h>
503d2be0
AS
13782int
13783main ()
13784{
b936fae4
AS
13785return !fseeko;
13786 ;
13787 return 0;
13788}
13789_ACEOF
13790rm -f conftest.$ac_objext
c0d27fcc 13791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
b936fae4
AS
13792 (eval $ac_compile) 2>&5
13793 ac_status=$?
c0d27fcc 13794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
13795 (exit $ac_status); } &&
13796 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 13797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
13798 (eval $ac_try) 2>&5
13799 ac_status=$?
c0d27fcc 13800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
13801 (exit $ac_status); }; }; then
13802 break
13803else
13804 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13805sed 's/^/| /' conftest.$ac_ext >&5
13806
b936fae4
AS
13807fi
13808rm -f conftest.$ac_objext conftest.$ac_ext
13809 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13810#line $LINENO "configure"
cd958eb3
MB
13811/* confdefs.h. */
13812_ACEOF
13813cat confdefs.h >>conftest.$ac_ext
13814cat >>conftest.$ac_ext <<_ACEOF
13815/* end confdefs.h. */
b936fae4
AS
13816#define _LARGEFILE_SOURCE 1
13817#include <stdio.h>
b936fae4
AS
13818int
13819main ()
13820{
13821return !fseeko;
13822 ;
13823 return 0;
13824}
13825_ACEOF
13826rm -f conftest.$ac_objext
c0d27fcc 13827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
b936fae4
AS
13828 (eval $ac_compile) 2>&5
13829 ac_status=$?
c0d27fcc 13830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
13831 (exit $ac_status); } &&
13832 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 13833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
13834 (eval $ac_try) 2>&5
13835 ac_status=$?
c0d27fcc 13836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
13837 (exit $ac_status); }; }; then
13838 ac_cv_sys_largefile_source=1; break
13839else
13840 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13841sed 's/^/| /' conftest.$ac_ext >&5
13842
b936fae4
AS
13843fi
13844rm -f conftest.$ac_objext conftest.$ac_ext
13845 break
13846done
13847fi
c0d27fcc 13848echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
13849echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13850if test "$ac_cv_sys_largefile_source" != no; then
13851
c0d27fcc 13852cat >>confdefs.h <<_ACEOF
b936fae4 13853#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 13854_ACEOF
b936fae4
AS
13855
13856fi
13857rm -f conftest*
4c343001 13858
b936fae4
AS
13859# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13860# in glibc 2.1.3, but that breaks too many other things.
13861# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 13862echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
13863echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13864if test "${ac_cv_func_fseeko+set}" = set; then
13865 echo $ECHO_N "(cached) $ECHO_C" >&6
13866else
13867 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13868#line $LINENO "configure"
cd958eb3
MB
13869/* confdefs.h. */
13870_ACEOF
13871cat confdefs.h >>conftest.$ac_ext
13872cat >>conftest.$ac_ext <<_ACEOF
13873/* end confdefs.h. */
b936fae4 13874#include <stdio.h>
b936fae4
AS
13875int
13876main ()
13877{
13878return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
13879 ;
13880 return 0;
13881}
13882_ACEOF
13883rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13885 (eval $ac_link) 2>&5
13886 ac_status=$?
c0d27fcc 13887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13888 (exit $ac_status); } &&
13889 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13891 (eval $ac_try) 2>&5
13892 ac_status=$?
c0d27fcc 13893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13894 (exit $ac_status); }; }; then
b936fae4 13895 ac_cv_func_fseeko=yes
503d2be0
AS
13896else
13897 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13898sed 's/^/| /' conftest.$ac_ext >&5
13899
b936fae4 13900ac_cv_func_fseeko=no
503d2be0
AS
13901fi
13902rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13903fi
c0d27fcc 13904echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
13905echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13906if test $ac_cv_func_fseeko = yes; then
13907
c0d27fcc 13908cat >>confdefs.h <<\_ACEOF
b936fae4 13909#define HAVE_FSEEKO 1
c0d27fcc 13910_ACEOF
b936fae4 13911
4c343001
DL
13912fi
13913
c0d27fcc 13914
cd958eb3
MB
13915echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
13916echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
13917if test "${ac_cv_func_getpgrp_void+set}" = set; then
13918 echo $ECHO_N "(cached) $ECHO_C" >&6
13919else
13920 # Use it with a single arg.
13921cat >conftest.$ac_ext <<_ACEOF
13922#line $LINENO "configure"
13923/* confdefs.h. */
13924_ACEOF
13925cat confdefs.h >>conftest.$ac_ext
13926cat >>conftest.$ac_ext <<_ACEOF
13927/* end confdefs.h. */
13928$ac_includes_default
13929int
13930main ()
13931{
13932getpgrp (0);
13933 ;
13934 return 0;
13935}
13936_ACEOF
13937rm -f conftest.$ac_objext
13938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13939 (eval $ac_compile) 2>&5
13940 ac_status=$?
13941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13942 (exit $ac_status); } &&
13943 { ac_try='test -s conftest.$ac_objext'
13944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13945 (eval $ac_try) 2>&5
13946 ac_status=$?
13947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13948 (exit $ac_status); }; }; then
13949 ac_cv_func_getpgrp_void=no
13950else
13951 echo "$as_me: failed program was:" >&5
13952sed 's/^/| /' conftest.$ac_ext >&5
13953
13954ac_cv_func_getpgrp_void=yes
13955fi
13956rm -f conftest.$ac_objext conftest.$ac_ext
13957
13958fi
13959echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
13960echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
13961if test $ac_cv_func_getpgrp_void = yes; then
13962
13963cat >>confdefs.h <<\_ACEOF
13964#define GETPGRP_VOID 1
13965_ACEOF
13966
13967fi
13968
13969
973a76b1
DL
13970
13971for ac_func in strftime
13972do
13973as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13974echo "$as_me:$LINENO: checking for $ac_func" >&5
13975echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13976if eval "test \"\${$as_ac_var+set}\" = set"; then
13977 echo $ECHO_N "(cached) $ECHO_C" >&6
13978else
13979 cat >conftest.$ac_ext <<_ACEOF
13980#line $LINENO "configure"
13981/* confdefs.h. */
13982_ACEOF
13983cat confdefs.h >>conftest.$ac_ext
13984cat >>conftest.$ac_ext <<_ACEOF
13985/* end confdefs.h. */
13986/* System header to define __stub macros and hopefully few prototypes,
13987 which can conflict with char $ac_func (); below.
13988 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13989 <limits.h> exists even on freestanding compilers. */
13990#ifdef __STDC__
13991# include <limits.h>
13992#else
13993# include <assert.h>
13994#endif
13995/* Override any gcc2 internal prototype to avoid an error. */
13996#ifdef __cplusplus
13997extern "C"
13998{
13999#endif
14000/* We use char because int might match the return type of a gcc2
14001 builtin and then its argument prototype would still apply. */
14002char $ac_func ();
14003/* The GNU C library defines this for functions which it implements
14004 to always fail with ENOSYS. Some functions are actually named
14005 something starting with __ and the normal name is an alias. */
14006#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14007choke me
14008#else
14009char (*f) () = $ac_func;
14010#endif
14011#ifdef __cplusplus
14012}
14013#endif
14014
14015int
14016main ()
14017{
14018return f != $ac_func;
14019 ;
14020 return 0;
14021}
14022_ACEOF
14023rm -f conftest.$ac_objext conftest$ac_exeext
14024if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14025 (eval $ac_link) 2>&5
14026 ac_status=$?
14027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14028 (exit $ac_status); } &&
14029 { ac_try='test -s conftest$ac_exeext'
14030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14031 (eval $ac_try) 2>&5
14032 ac_status=$?
14033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14034 (exit $ac_status); }; }; then
14035 eval "$as_ac_var=yes"
14036else
14037 echo "$as_me: failed program was:" >&5
14038sed 's/^/| /' conftest.$ac_ext >&5
14039
14040eval "$as_ac_var=no"
14041fi
14042rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14043fi
14044echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14045echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14046if test `eval echo '${'$as_ac_var'}'` = yes; then
14047 cat >>confdefs.h <<_ACEOF
14048#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14049_ACEOF
14050
14051else
14052 # strftime is in -lintl on SCO UNIX.
14053echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
14054echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
14055if test "${ac_cv_lib_intl_strftime+set}" = set; then
14056 echo $ECHO_N "(cached) $ECHO_C" >&6
14057else
14058 ac_check_lib_save_LIBS=$LIBS
14059LIBS="-lintl $LIBS"
14060cat >conftest.$ac_ext <<_ACEOF
14061#line $LINENO "configure"
14062/* confdefs.h. */
14063_ACEOF
14064cat confdefs.h >>conftest.$ac_ext
14065cat >>conftest.$ac_ext <<_ACEOF
14066/* end confdefs.h. */
14067
14068/* Override any gcc2 internal prototype to avoid an error. */
14069#ifdef __cplusplus
14070extern "C"
14071#endif
14072/* We use char because int might match the return type of a gcc2
14073 builtin and then its argument prototype would still apply. */
14074char strftime ();
14075int
14076main ()
14077{
14078strftime ();
14079 ;
14080 return 0;
14081}
14082_ACEOF
14083rm -f conftest.$ac_objext conftest$ac_exeext
14084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14085 (eval $ac_link) 2>&5
14086 ac_status=$?
14087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14088 (exit $ac_status); } &&
14089 { ac_try='test -s conftest$ac_exeext'
14090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14091 (eval $ac_try) 2>&5
14092 ac_status=$?
14093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14094 (exit $ac_status); }; }; then
14095 ac_cv_lib_intl_strftime=yes
14096else
14097 echo "$as_me: failed program was:" >&5
14098sed 's/^/| /' conftest.$ac_ext >&5
14099
14100ac_cv_lib_intl_strftime=no
14101fi
14102rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14103LIBS=$ac_check_lib_save_LIBS
14104fi
14105echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
14106echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
14107if test $ac_cv_lib_intl_strftime = yes; then
14108 cat >>confdefs.h <<\_ACEOF
14109#define HAVE_STRFTIME 1
14110_ACEOF
14111
14112LIBS="-lintl $LIBS"
14113fi
14114
14115fi
14116done
14117
14118
b936fae4
AS
14119# UNIX98 PTYs.
14120
14121for ac_func in grantpt
503d2be0
AS
14122do
14123as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14124echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
14125echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14126if eval "test \"\${$as_ac_var+set}\" = set"; then
14127 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 14128else
503d2be0 14129 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14130#line $LINENO "configure"
cd958eb3
MB
14131/* confdefs.h. */
14132_ACEOF
14133cat confdefs.h >>conftest.$ac_ext
14134cat >>conftest.$ac_ext <<_ACEOF
14135/* end confdefs.h. */
503d2be0 14136/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
14137 which can conflict with char $ac_func (); below.
14138 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14139 <limits.h> exists even on freestanding compilers. */
14140#ifdef __STDC__
14141# include <limits.h>
14142#else
14143# include <assert.h>
14144#endif
4c343001 14145/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14146#ifdef __cplusplus
14147extern "C"
cd958eb3 14148{
503d2be0 14149#endif
4c343001 14150/* We use char because int might match the return type of a gcc2
503d2be0
AS
14151 builtin and then its argument prototype would still apply. */
14152char $ac_func ();
503d2be0
AS
14153/* The GNU C library defines this for functions which it implements
14154 to always fail with ENOSYS. Some functions are actually named
14155 something starting with __ and the normal name is an alias. */
14156#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14157choke me
14158#else
cd958eb3
MB
14159char (*f) () = $ac_func;
14160#endif
14161#ifdef __cplusplus
14162}
503d2be0 14163#endif
4c343001 14164
cd958eb3
MB
14165int
14166main ()
14167{
9e71690e 14168return f != $ac_func;
503d2be0
AS
14169 ;
14170 return 0;
14171}
14172_ACEOF
14173rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14174if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14175 (eval $ac_link) 2>&5
14176 ac_status=$?
c0d27fcc 14177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14178 (exit $ac_status); } &&
14179 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14181 (eval $ac_try) 2>&5
14182 ac_status=$?
c0d27fcc 14183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14184 (exit $ac_status); }; }; then
14185 eval "$as_ac_var=yes"
14186else
14187 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14188sed 's/^/| /' conftest.$ac_ext >&5
14189
503d2be0
AS
14190eval "$as_ac_var=no"
14191fi
14192rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14193fi
c0d27fcc 14194echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
14195echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14196if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14197 cat >>confdefs.h <<_ACEOF
503d2be0 14198#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14199_ACEOF
4c343001
DL
14200
14201fi
503d2be0
AS
14202done
14203
c0d27fcc 14204
b936fae4 14205# PTY-related GNU extensions.
4c343001 14206
b936fae4
AS
14207for ac_func in getpt
14208do
14209as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14210echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
14211echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14212if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14213 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 14214else
b936fae4 14215 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14216#line $LINENO "configure"
cd958eb3
MB
14217/* confdefs.h. */
14218_ACEOF
14219cat confdefs.h >>conftest.$ac_ext
14220cat >>conftest.$ac_ext <<_ACEOF
14221/* end confdefs.h. */
087121cc 14222/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
14223 which can conflict with char $ac_func (); below.
14224 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14225 <limits.h> exists even on freestanding compilers. */
14226#ifdef __STDC__
14227# include <limits.h>
14228#else
14229# include <assert.h>
14230#endif
087121cc 14231/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14232#ifdef __cplusplus
14233extern "C"
cd958eb3 14234{
503d2be0 14235#endif
087121cc 14236/* We use char because int might match the return type of a gcc2
503d2be0
AS
14237 builtin and then its argument prototype would still apply. */
14238char $ac_func ();
087121cc
GM
14239/* The GNU C library defines this for functions which it implements
14240 to always fail with ENOSYS. Some functions are actually named
14241 something starting with __ and the normal name is an alias. */
14242#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14243choke me
14244#else
cd958eb3
MB
14245char (*f) () = $ac_func;
14246#endif
14247#ifdef __cplusplus
14248}
087121cc
GM
14249#endif
14250
cd958eb3
MB
14251int
14252main ()
14253{
9e71690e 14254return f != $ac_func;
503d2be0
AS
14255 ;
14256 return 0;
14257}
14258_ACEOF
14259rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14260if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14261 (eval $ac_link) 2>&5
14262 ac_status=$?
c0d27fcc 14263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14264 (exit $ac_status); } &&
14265 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14267 (eval $ac_try) 2>&5
14268 ac_status=$?
c0d27fcc 14269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14270 (exit $ac_status); }; }; then
14271 eval "$as_ac_var=yes"
14272else
14273 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14274sed 's/^/| /' conftest.$ac_ext >&5
14275
503d2be0
AS
14276eval "$as_ac_var=no"
14277fi
14278rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14279fi
c0d27fcc 14280echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
14281echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14282if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14283 cat >>confdefs.h <<_ACEOF
503d2be0 14284#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14285_ACEOF
087121cc 14286
087121cc
GM
14287fi
14288done
14289
c0d27fcc 14290
ba4481b5
DL
14291# Check this now, so that we will NOT find the above functions in ncurses.
14292# That is because we have not set up to link ncurses in lib-src.
14293# It's better to believe a function is not available
14294# than to expect to find it in ncurses.
503d2be0 14295
c0d27fcc 14296echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
14297echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
14298if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
14299 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14300else
503d2be0 14301 ac_check_lib_save_LIBS=$LIBS
ba4481b5 14302LIBS="-lncurses $LIBS"
503d2be0 14303cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14304#line $LINENO "configure"
cd958eb3
MB
14305/* confdefs.h. */
14306_ACEOF
14307cat confdefs.h >>conftest.$ac_ext
14308cat >>conftest.$ac_ext <<_ACEOF
14309/* end confdefs.h. */
503d2be0 14310
ba4481b5 14311/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14312#ifdef __cplusplus
14313extern "C"
14314#endif
ba4481b5 14315/* We use char because int might match the return type of a gcc2
503d2be0
AS
14316 builtin and then its argument prototype would still apply. */
14317char tparm ();
14318int
14319main ()
14320{
14321tparm ();
14322 ;
14323 return 0;
14324}
14325_ACEOF
14326rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14328 (eval $ac_link) 2>&5
14329 ac_status=$?
c0d27fcc 14330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14331 (exit $ac_status); } &&
14332 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14334 (eval $ac_try) 2>&5
14335 ac_status=$?
c0d27fcc 14336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14337 (exit $ac_status); }; }; then
14338 ac_cv_lib_ncurses_tparm=yes
14339else
14340 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14341sed 's/^/| /' conftest.$ac_ext >&5
14342
503d2be0
AS
14343ac_cv_lib_ncurses_tparm=no
14344fi
14345rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14346LIBS=$ac_check_lib_save_LIBS
14347fi
c0d27fcc 14348echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
14349echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
14350if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 14351 cat >>confdefs.h <<_ACEOF
503d2be0 14352#define HAVE_LIBNCURSES 1
c0d27fcc 14353_ACEOF
ba4481b5
DL
14354
14355 LIBS="-lncurses $LIBS"
14356
ba4481b5
DL
14357fi
14358
c0d27fcc 14359
84e70f78
KR
14360# Do we need the Hesiod library to provide the support routines?
14361if test "$with_hesiod" = yes ; then
14362 # Don't set $LIBS here -- see comments above.
14363 resolv=no
c0d27fcc 14364 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
14365echo $ECHO_N "checking for res_send... $ECHO_C" >&6
14366if test "${ac_cv_func_res_send+set}" = set; then
14367 echo $ECHO_N "(cached) $ECHO_C" >&6
14368else
14369 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14370#line $LINENO "configure"
cd958eb3
MB
14371/* confdefs.h. */
14372_ACEOF
14373cat confdefs.h >>conftest.$ac_ext
14374cat >>conftest.$ac_ext <<_ACEOF
14375/* end confdefs.h. */
84e70f78 14376/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
14377 which can conflict with char res_send (); below.
14378 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14379 <limits.h> exists even on freestanding compilers. */
14380#ifdef __STDC__
14381# include <limits.h>
14382#else
14383# include <assert.h>
14384#endif
84e70f78
KR
14385/* Override any gcc2 internal prototype to avoid an error. */
14386#ifdef __cplusplus
14387extern "C"
cd958eb3 14388{
84e70f78
KR
14389#endif
14390/* We use char because int might match the return type of a gcc2
14391 builtin and then its argument prototype would still apply. */
14392char res_send ();
84e70f78
KR
14393/* The GNU C library defines this for functions which it implements
14394 to always fail with ENOSYS. Some functions are actually named
14395 something starting with __ and the normal name is an alias. */
14396#if defined (__stub_res_send) || defined (__stub___res_send)
14397choke me
14398#else
cd958eb3 14399char (*f) () = res_send;
84e70f78 14400#endif
cd958eb3
MB
14401#ifdef __cplusplus
14402}
14403#endif
14404
14405int
14406main ()
14407{
9e71690e 14408return f != res_send;
84e70f78
KR
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
84e70f78
KR
14415 (eval $ac_link) 2>&5
14416 ac_status=$?
c0d27fcc 14417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14418 (exit $ac_status); } &&
14419 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14421 (eval $ac_try) 2>&5
14422 ac_status=$?
c0d27fcc 14423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14424 (exit $ac_status); }; }; then
14425 ac_cv_func_res_send=yes
14426else
14427 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14428sed 's/^/| /' conftest.$ac_ext >&5
14429
84e70f78
KR
14430ac_cv_func_res_send=no
14431fi
14432rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14433fi
c0d27fcc 14434echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
14435echo "${ECHO_T}$ac_cv_func_res_send" >&6
14436if test $ac_cv_func_res_send = yes; then
14437 :
14438else
c0d27fcc 14439 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
14440echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
14441if test "${ac_cv_func___res_send+set}" = set; then
14442 echo $ECHO_N "(cached) $ECHO_C" >&6
14443else
14444 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14445#line $LINENO "configure"
cd958eb3
MB
14446/* confdefs.h. */
14447_ACEOF
14448cat confdefs.h >>conftest.$ac_ext
14449cat >>conftest.$ac_ext <<_ACEOF
14450/* end confdefs.h. */
84e70f78 14451/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
14452 which can conflict with char __res_send (); below.
14453 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14454 <limits.h> exists even on freestanding compilers. */
14455#ifdef __STDC__
14456# include <limits.h>
14457#else
14458# include <assert.h>
14459#endif
84e70f78
KR
14460/* Override any gcc2 internal prototype to avoid an error. */
14461#ifdef __cplusplus
14462extern "C"
cd958eb3 14463{
84e70f78
KR
14464#endif
14465/* We use char because int might match the return type of a gcc2
14466 builtin and then its argument prototype would still apply. */
14467char __res_send ();
84e70f78
KR
14468/* The GNU C library defines this for functions which it implements
14469 to always fail with ENOSYS. Some functions are actually named
14470 something starting with __ and the normal name is an alias. */
14471#if defined (__stub___res_send) || defined (__stub_____res_send)
14472choke me
14473#else
cd958eb3
MB
14474char (*f) () = __res_send;
14475#endif
14476#ifdef __cplusplus
14477}
84e70f78
KR
14478#endif
14479
cd958eb3
MB
14480int
14481main ()
14482{
9e71690e 14483return f != __res_send;
84e70f78
KR
14484 ;
14485 return 0;
14486}
14487_ACEOF
14488rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14489if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14490 (eval $ac_link) 2>&5
14491 ac_status=$?
c0d27fcc 14492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14493 (exit $ac_status); } &&
14494 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14496 (eval $ac_try) 2>&5
14497 ac_status=$?
c0d27fcc 14498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14499 (exit $ac_status); }; }; then
14500 ac_cv_func___res_send=yes
14501else
14502 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14503sed 's/^/| /' conftest.$ac_ext >&5
14504
84e70f78
KR
14505ac_cv_func___res_send=no
14506fi
14507rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14508fi
c0d27fcc 14509echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
14510echo "${ECHO_T}$ac_cv_func___res_send" >&6
14511if test $ac_cv_func___res_send = yes; then
14512 :
14513else
c0d27fcc 14514 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
14515echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
14516if test "${ac_cv_lib_resolv_res_send+set}" = set; then
14517 echo $ECHO_N "(cached) $ECHO_C" >&6
14518else
14519 ac_check_lib_save_LIBS=$LIBS
14520LIBS="-lresolv $LIBS"
14521cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14522#line $LINENO "configure"
cd958eb3
MB
14523/* confdefs.h. */
14524_ACEOF
14525cat confdefs.h >>conftest.$ac_ext
14526cat >>conftest.$ac_ext <<_ACEOF
14527/* end confdefs.h. */
84e70f78
KR
14528
14529/* Override any gcc2 internal prototype to avoid an error. */
14530#ifdef __cplusplus
14531extern "C"
14532#endif
14533/* We use char because int might match the return type of a gcc2
14534 builtin and then its argument prototype would still apply. */
14535char res_send ();
14536int
14537main ()
14538{
14539res_send ();
14540 ;
14541 return 0;
14542}
14543_ACEOF
14544rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14546 (eval $ac_link) 2>&5
14547 ac_status=$?
c0d27fcc 14548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14549 (exit $ac_status); } &&
14550 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14552 (eval $ac_try) 2>&5
14553 ac_status=$?
c0d27fcc 14554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14555 (exit $ac_status); }; }; then
14556 ac_cv_lib_resolv_res_send=yes
14557else
14558 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14559sed 's/^/| /' conftest.$ac_ext >&5
14560
84e70f78
KR
14561ac_cv_lib_resolv_res_send=no
14562fi
14563rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14564LIBS=$ac_check_lib_save_LIBS
14565fi
c0d27fcc 14566echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
14567echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
14568if test $ac_cv_lib_resolv_res_send = yes; then
14569 resolv=yes
14570else
c0d27fcc 14571 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
14572echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
14573if test "${ac_cv_lib_resolv___res_send+set}" = set; then
14574 echo $ECHO_N "(cached) $ECHO_C" >&6
14575else
14576 ac_check_lib_save_LIBS=$LIBS
14577LIBS="-lresolv $LIBS"
14578cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14579#line $LINENO "configure"
cd958eb3
MB
14580/* confdefs.h. */
14581_ACEOF
14582cat confdefs.h >>conftest.$ac_ext
14583cat >>conftest.$ac_ext <<_ACEOF
14584/* end confdefs.h. */
84e70f78
KR
14585
14586/* Override any gcc2 internal prototype to avoid an error. */
14587#ifdef __cplusplus
14588extern "C"
14589#endif
14590/* We use char because int might match the return type of a gcc2
14591 builtin and then its argument prototype would still apply. */
14592char __res_send ();
14593int
14594main ()
14595{
14596__res_send ();
14597 ;
14598 return 0;
14599}
14600_ACEOF
14601rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14602if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14603 (eval $ac_link) 2>&5
14604 ac_status=$?
c0d27fcc 14605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14606 (exit $ac_status); } &&
14607 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14609 (eval $ac_try) 2>&5
14610 ac_status=$?
c0d27fcc 14611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14612 (exit $ac_status); }; }; then
14613 ac_cv_lib_resolv___res_send=yes
14614else
14615 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14616sed 's/^/| /' conftest.$ac_ext >&5
14617
84e70f78
KR
14618ac_cv_lib_resolv___res_send=no
14619fi
14620rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14621LIBS=$ac_check_lib_save_LIBS
14622fi
c0d27fcc 14623echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
14624echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
14625if test $ac_cv_lib_resolv___res_send = yes; then
14626 resolv=yes
14627fi
14628
14629fi
14630
14631fi
14632
14633fi
14634
14635 if test "$resolv" = yes ; then
14636 RESOLVLIB=-lresolv
b936fae4 14637
c0d27fcc 14638cat >>confdefs.h <<\_ACEOF
84e70f78 14639#define HAVE_LIBRESOLV 1
c0d27fcc 14640_ACEOF
84e70f78
KR
14641
14642 else
14643 RESOLVLIB=
14644 fi
c0d27fcc 14645 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
14646echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
14647if test "${ac_cv_func_hes_getmailhost+set}" = set; then
14648 echo $ECHO_N "(cached) $ECHO_C" >&6
14649else
14650 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14651#line $LINENO "configure"
cd958eb3
MB
14652/* confdefs.h. */
14653_ACEOF
14654cat confdefs.h >>conftest.$ac_ext
14655cat >>conftest.$ac_ext <<_ACEOF
14656/* end confdefs.h. */
84e70f78 14657/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
14658 which can conflict with char hes_getmailhost (); below.
14659 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14660 <limits.h> exists even on freestanding compilers. */
14661#ifdef __STDC__
14662# include <limits.h>
14663#else
14664# include <assert.h>
14665#endif
84e70f78
KR
14666/* Override any gcc2 internal prototype to avoid an error. */
14667#ifdef __cplusplus
14668extern "C"
cd958eb3 14669{
84e70f78
KR
14670#endif
14671/* We use char because int might match the return type of a gcc2
14672 builtin and then its argument prototype would still apply. */
14673char hes_getmailhost ();
84e70f78
KR
14674/* The GNU C library defines this for functions which it implements
14675 to always fail with ENOSYS. Some functions are actually named
14676 something starting with __ and the normal name is an alias. */
14677#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
14678choke me
14679#else
cd958eb3 14680char (*f) () = hes_getmailhost;
84e70f78 14681#endif
cd958eb3
MB
14682#ifdef __cplusplus
14683}
14684#endif
14685
14686int
14687main ()
14688{
9e71690e 14689return f != hes_getmailhost;
84e70f78
KR
14690 ;
14691 return 0;
14692}
14693_ACEOF
14694rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14696 (eval $ac_link) 2>&5
14697 ac_status=$?
c0d27fcc 14698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14699 (exit $ac_status); } &&
14700 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14702 (eval $ac_try) 2>&5
14703 ac_status=$?
c0d27fcc 14704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14705 (exit $ac_status); }; }; then
14706 ac_cv_func_hes_getmailhost=yes
14707else
14708 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14709sed 's/^/| /' conftest.$ac_ext >&5
14710
84e70f78
KR
14711ac_cv_func_hes_getmailhost=no
14712fi
14713rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14714fi
c0d27fcc 14715echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
14716echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
14717if test $ac_cv_func_hes_getmailhost = yes; then
14718 :
14719else
c0d27fcc 14720 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
14721echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
14722if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
14723 echo $ECHO_N "(cached) $ECHO_C" >&6
14724else
14725 ac_check_lib_save_LIBS=$LIBS
14726LIBS="-lhesiod $RESOLVLIB $LIBS"
14727cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14728#line $LINENO "configure"
cd958eb3
MB
14729/* confdefs.h. */
14730_ACEOF
14731cat confdefs.h >>conftest.$ac_ext
14732cat >>conftest.$ac_ext <<_ACEOF
14733/* end confdefs.h. */
84e70f78
KR
14734
14735/* Override any gcc2 internal prototype to avoid an error. */
14736#ifdef __cplusplus
14737extern "C"
14738#endif
14739/* We use char because int might match the return type of a gcc2
14740 builtin and then its argument prototype would still apply. */
14741char hes_getmailhost ();
14742int
14743main ()
14744{
14745hes_getmailhost ();
14746 ;
14747 return 0;
14748}
14749_ACEOF
14750rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14751if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14752 (eval $ac_link) 2>&5
14753 ac_status=$?
c0d27fcc 14754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14755 (exit $ac_status); } &&
14756 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14758 (eval $ac_try) 2>&5
14759 ac_status=$?
c0d27fcc 14760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14761 (exit $ac_status); }; }; then
14762 ac_cv_lib_hesiod_hes_getmailhost=yes
14763else
14764 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14765sed 's/^/| /' conftest.$ac_ext >&5
14766
84e70f78
KR
14767ac_cv_lib_hesiod_hes_getmailhost=no
14768fi
14769rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14770LIBS=$ac_check_lib_save_LIBS
14771fi
c0d27fcc 14772echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
14773echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
14774if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 14775
c0d27fcc 14776cat >>confdefs.h <<\_ACEOF
84e70f78 14777#define HAVE_LIBHESIOD 1
c0d27fcc 14778_ACEOF
84e70f78
KR
14779
14780else
14781 :
14782fi
14783
14784fi
14785
14786fi
14787
a21616bd
KR
14788# These tell us which Kerberos-related libraries to use.
14789if test "${with_kerberos+set}" = set; then
503d2be0 14790
c0d27fcc 14791echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
14792echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
14793if test "${ac_cv_lib_com_err_com_err+set}" = set; then
14794 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14795else
503d2be0 14796 ac_check_lib_save_LIBS=$LIBS
a21616bd 14797LIBS="-lcom_err $LIBS"
503d2be0 14798cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14799#line $LINENO "configure"
cd958eb3
MB
14800/* confdefs.h. */
14801_ACEOF
14802cat confdefs.h >>conftest.$ac_ext
14803cat >>conftest.$ac_ext <<_ACEOF
14804/* end confdefs.h. */
503d2be0 14805
a21616bd 14806/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14807#ifdef __cplusplus
14808extern "C"
14809#endif
a21616bd 14810/* We use char because int might match the return type of a gcc2
503d2be0
AS
14811 builtin and then its argument prototype would still apply. */
14812char com_err ();
14813int
14814main ()
14815{
14816com_err ();
14817 ;
14818 return 0;
14819}
14820_ACEOF
14821rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14822if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14823 (eval $ac_link) 2>&5
14824 ac_status=$?
c0d27fcc 14825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14826 (exit $ac_status); } &&
14827 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14829 (eval $ac_try) 2>&5
14830 ac_status=$?
c0d27fcc 14831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14832 (exit $ac_status); }; }; then
14833 ac_cv_lib_com_err_com_err=yes
14834else
14835 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14836sed 's/^/| /' conftest.$ac_ext >&5
14837
503d2be0
AS
14838ac_cv_lib_com_err_com_err=no
14839fi
14840rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14841LIBS=$ac_check_lib_save_LIBS
14842fi
c0d27fcc 14843echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
14844echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
14845if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 14846 cat >>confdefs.h <<_ACEOF
503d2be0 14847#define HAVE_LIBCOM_ERR 1
c0d27fcc 14848_ACEOF
a21616bd
KR
14849
14850 LIBS="-lcom_err $LIBS"
14851
a21616bd
KR
14852fi
14853
c0d27fcc
MR
14854
14855echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
14856echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
14857if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
14858 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14859else
503d2be0 14860 ac_check_lib_save_LIBS=$LIBS
a21616bd 14861LIBS="-lk5crypto $LIBS"
503d2be0 14862cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14863#line $LINENO "configure"
cd958eb3
MB
14864/* confdefs.h. */
14865_ACEOF
14866cat confdefs.h >>conftest.$ac_ext
14867cat >>conftest.$ac_ext <<_ACEOF
14868/* end confdefs.h. */
503d2be0 14869
a21616bd 14870/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14871#ifdef __cplusplus
14872extern "C"
14873#endif
a21616bd 14874/* We use char because int might match the return type of a gcc2
503d2be0
AS
14875 builtin and then its argument prototype would still apply. */
14876char mit_des_cbc_encrypt ();
14877int
14878main ()
14879{
14880mit_des_cbc_encrypt ();
14881 ;
14882 return 0;
14883}
14884_ACEOF
14885rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14886if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14887 (eval $ac_link) 2>&5
14888 ac_status=$?
c0d27fcc 14889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14890 (exit $ac_status); } &&
14891 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14893 (eval $ac_try) 2>&5
14894 ac_status=$?
c0d27fcc 14895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14896 (exit $ac_status); }; }; then
14897 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
14898else
14899 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14900sed 's/^/| /' conftest.$ac_ext >&5
14901
503d2be0
AS
14902ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
14903fi
14904rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14905LIBS=$ac_check_lib_save_LIBS
14906fi
c0d27fcc 14907echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
14908echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
14909if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 14910 cat >>confdefs.h <<_ACEOF
503d2be0 14911#define HAVE_LIBK5CRYPTO 1
c0d27fcc 14912_ACEOF
a21616bd
KR
14913
14914 LIBS="-lk5crypto $LIBS"
14915
a21616bd
KR
14916fi
14917
c0d27fcc
MR
14918
14919echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
14920echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
14921if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
14922 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14923else
503d2be0 14924 ac_check_lib_save_LIBS=$LIBS
a21616bd 14925LIBS="-lcrypto $LIBS"
503d2be0 14926cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14927#line $LINENO "configure"
cd958eb3
MB
14928/* confdefs.h. */
14929_ACEOF
14930cat confdefs.h >>conftest.$ac_ext
14931cat >>conftest.$ac_ext <<_ACEOF
14932/* end confdefs.h. */
503d2be0 14933
a21616bd 14934/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14935#ifdef __cplusplus
14936extern "C"
14937#endif
a21616bd 14938/* We use char because int might match the return type of a gcc2
503d2be0
AS
14939 builtin and then its argument prototype would still apply. */
14940char mit_des_cbc_encrypt ();
14941int
14942main ()
14943{
14944mit_des_cbc_encrypt ();
14945 ;
14946 return 0;
14947}
14948_ACEOF
14949rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14950if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14951 (eval $ac_link) 2>&5
14952 ac_status=$?
c0d27fcc 14953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14954 (exit $ac_status); } &&
14955 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14957 (eval $ac_try) 2>&5
14958 ac_status=$?
c0d27fcc 14959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14960 (exit $ac_status); }; }; then
14961 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
14962else
14963 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14964sed 's/^/| /' conftest.$ac_ext >&5
14965
503d2be0
AS
14966ac_cv_lib_crypto_mit_des_cbc_encrypt=no
14967fi
14968rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14969LIBS=$ac_check_lib_save_LIBS
14970fi
c0d27fcc 14971echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
14972echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
14973if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 14974 cat >>confdefs.h <<_ACEOF
503d2be0 14975#define HAVE_LIBCRYPTO 1
c0d27fcc 14976_ACEOF
a21616bd
KR
14977
14978 LIBS="-lcrypto $LIBS"
14979
a21616bd
KR
14980fi
14981
c0d27fcc
MR
14982
14983echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
14984echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
14985if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
14986 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14987else
503d2be0 14988 ac_check_lib_save_LIBS=$LIBS
a21616bd 14989LIBS="-lkrb5 $LIBS"
503d2be0 14990cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14991#line $LINENO "configure"
cd958eb3
MB
14992/* confdefs.h. */
14993_ACEOF
14994cat confdefs.h >>conftest.$ac_ext
14995cat >>conftest.$ac_ext <<_ACEOF
14996/* end confdefs.h. */
a21616bd 14997
503d2be0
AS
14998/* Override any gcc2 internal prototype to avoid an error. */
14999#ifdef __cplusplus
15000extern "C"
15001#endif
15002/* We use char because int might match the return type of a gcc2
15003 builtin and then its argument prototype would still apply. */
15004char krb5_init_context ();
15005int
15006main ()
15007{
15008krb5_init_context ();
15009 ;
15010 return 0;
15011}
15012_ACEOF
15013rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15014if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15015 (eval $ac_link) 2>&5
15016 ac_status=$?
c0d27fcc 15017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15018 (exit $ac_status); } &&
15019 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15021 (eval $ac_try) 2>&5
15022 ac_status=$?
c0d27fcc 15023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15024 (exit $ac_status); }; }; then
15025 ac_cv_lib_krb5_krb5_init_context=yes
15026else
15027 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15028sed 's/^/| /' conftest.$ac_ext >&5
15029
503d2be0
AS
15030ac_cv_lib_krb5_krb5_init_context=no
15031fi
15032rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15033LIBS=$ac_check_lib_save_LIBS
15034fi
c0d27fcc 15035echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
15036echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
15037if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 15038 cat >>confdefs.h <<_ACEOF
503d2be0 15039#define HAVE_LIBKRB5 1
c0d27fcc 15040_ACEOF
a21616bd
KR
15041
15042 LIBS="-lkrb5 $LIBS"
15043
a21616bd
KR
15044fi
15045
15046 if test "${with_kerberos5+set}" != set; then
503d2be0 15047
c0d27fcc 15048echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
15049echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
15050if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
15051 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 15052else
503d2be0 15053 ac_check_lib_save_LIBS=$LIBS
a21616bd 15054LIBS="-ldes425 $LIBS"
503d2be0 15055cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 15056#line $LINENO "configure"
cd958eb3
MB
15057/* confdefs.h. */
15058_ACEOF
15059cat confdefs.h >>conftest.$ac_ext
15060cat >>conftest.$ac_ext <<_ACEOF
15061/* end confdefs.h. */
503d2be0 15062
a21616bd 15063/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15064#ifdef __cplusplus
15065extern "C"
15066#endif
a21616bd 15067/* We use char because int might match the return type of a gcc2
503d2be0
AS
15068 builtin and then its argument prototype would still apply. */
15069char des_cbc_encrypt ();
15070int
15071main ()
15072{
15073des_cbc_encrypt ();
15074 ;
15075 return 0;
15076}
15077_ACEOF
15078rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15079if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15080 (eval $ac_link) 2>&5
15081 ac_status=$?
c0d27fcc 15082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15083 (exit $ac_status); } &&
15084 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15086 (eval $ac_try) 2>&5
15087 ac_status=$?
c0d27fcc 15088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15089 (exit $ac_status); }; }; then
15090 ac_cv_lib_des425_des_cbc_encrypt=yes
15091else
15092 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15093sed 's/^/| /' conftest.$ac_ext >&5
15094
503d2be0
AS
15095ac_cv_lib_des425_des_cbc_encrypt=no
15096fi
15097rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15098LIBS=$ac_check_lib_save_LIBS
15099fi
c0d27fcc 15100echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
15101echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
15102if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 15103 cat >>confdefs.h <<_ACEOF
503d2be0 15104#define HAVE_LIBDES425 1
c0d27fcc 15105_ACEOF
a21616bd
KR
15106
15107 LIBS="-ldes425 $LIBS"
15108
15109else
503d2be0 15110
c0d27fcc 15111echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
15112echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
15113if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
15114 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 15115else
503d2be0 15116 ac_check_lib_save_LIBS=$LIBS
a21616bd 15117LIBS="-ldes $LIBS"
503d2be0 15118cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 15119#line $LINENO "configure"
cd958eb3
MB
15120/* confdefs.h. */
15121_ACEOF
15122cat confdefs.h >>conftest.$ac_ext
15123cat >>conftest.$ac_ext <<_ACEOF
15124/* end confdefs.h. */
503d2be0 15125
a21616bd 15126/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15127#ifdef __cplusplus
15128extern "C"
15129#endif
a21616bd 15130/* We use char because int might match the return type of a gcc2
503d2be0
AS
15131 builtin and then its argument prototype would still apply. */
15132char des_cbc_encrypt ();
15133int
15134main ()
15135{
15136des_cbc_encrypt ();
15137 ;
15138 return 0;
15139}
15140_ACEOF
15141rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15142if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15143 (eval $ac_link) 2>&5
15144 ac_status=$?
c0d27fcc 15145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15146 (exit $ac_status); } &&
15147 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15149 (eval $ac_try) 2>&5
15150 ac_status=$?
c0d27fcc 15151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15152 (exit $ac_status); }; }; then
15153 ac_cv_lib_des_des_cbc_encrypt=yes
15154else
15155 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15156sed 's/^/| /' conftest.$ac_ext >&5
15157
503d2be0
AS
15158ac_cv_lib_des_des_cbc_encrypt=no
15159fi
15160rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15161LIBS=$ac_check_lib_save_LIBS
15162fi
c0d27fcc 15163echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
15164echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
15165if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 15166 cat >>confdefs.h <<_ACEOF
503d2be0 15167#define HAVE_LIBDES 1
c0d27fcc 15168_ACEOF
a21616bd
KR
15169
15170 LIBS="-ldes $LIBS"
15171
a21616bd
KR
15172fi
15173
15174fi
15175
c0d27fcc
MR
15176
15177echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
15178echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
15179if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
15180 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 15181else
503d2be0 15182 ac_check_lib_save_LIBS=$LIBS
a21616bd 15183LIBS="-lkrb4 $LIBS"
503d2be0 15184cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 15185#line $LINENO "configure"
cd958eb3
MB
15186/* confdefs.h. */
15187_ACEOF
15188cat confdefs.h >>conftest.$ac_ext
15189cat >>conftest.$ac_ext <<_ACEOF
15190/* end confdefs.h. */
503d2be0 15191
a21616bd 15192/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15193#ifdef __cplusplus
15194extern "C"
15195#endif
a21616bd 15196/* We use char because int might match the return type of a gcc2
503d2be0
AS
15197 builtin and then its argument prototype would still apply. */
15198char krb_get_cred ();
15199int
15200main ()
15201{
15202krb_get_cred ();
15203 ;
15204 return 0;
15205}
15206_ACEOF
15207rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15208if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15209 (eval $ac_link) 2>&5
15210 ac_status=$?
c0d27fcc 15211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15212 (exit $ac_status); } &&
15213 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15215 (eval $ac_try) 2>&5
15216 ac_status=$?
c0d27fcc 15217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15218 (exit $ac_status); }; }; then
15219 ac_cv_lib_krb4_krb_get_cred=yes
15220else
15221 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15222sed 's/^/| /' conftest.$ac_ext >&5
15223
503d2be0
AS
15224ac_cv_lib_krb4_krb_get_cred=no
15225fi
15226rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15227LIBS=$ac_check_lib_save_LIBS
15228fi
c0d27fcc 15229echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
15230echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
15231if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 15232 cat >>confdefs.h <<_ACEOF
503d2be0 15233#define HAVE_LIBKRB4 1
c0d27fcc 15234_ACEOF
a21616bd
KR
15235
15236 LIBS="-lkrb4 $LIBS"
15237
15238else
503d2be0 15239
c0d27fcc 15240echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
15241echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
15242if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
15243 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 15244else
503d2be0 15245 ac_check_lib_save_LIBS=$LIBS
a21616bd 15246LIBS="-lkrb $LIBS"
503d2be0 15247cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 15248#line $LINENO "configure"
cd958eb3
MB
15249/* confdefs.h. */
15250_ACEOF
15251cat confdefs.h >>conftest.$ac_ext
15252cat >>conftest.$ac_ext <<_ACEOF
15253/* end confdefs.h. */
503d2be0 15254
a21616bd 15255/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15256#ifdef __cplusplus
15257extern "C"
15258#endif
a21616bd 15259/* We use char because int might match the return type of a gcc2
503d2be0
AS
15260 builtin and then its argument prototype would still apply. */
15261char krb_get_cred ();
15262int
15263main ()
15264{
15265krb_get_cred ();
15266 ;
15267 return 0;
15268}
15269_ACEOF
15270rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15271if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15272 (eval $ac_link) 2>&5
15273 ac_status=$?
c0d27fcc 15274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15275 (exit $ac_status); } &&
15276 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15278 (eval $ac_try) 2>&5
15279 ac_status=$?
c0d27fcc 15280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15281 (exit $ac_status); }; }; then
15282 ac_cv_lib_krb_krb_get_cred=yes
15283else
15284 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15285sed 's/^/| /' conftest.$ac_ext >&5
15286
503d2be0
AS
15287ac_cv_lib_krb_krb_get_cred=no
15288fi
15289rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15290LIBS=$ac_check_lib_save_LIBS
15291fi
c0d27fcc 15292echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
15293echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
15294if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 15295 cat >>confdefs.h <<_ACEOF
503d2be0 15296#define HAVE_LIBKRB 1
c0d27fcc 15297_ACEOF
a21616bd
KR
15298
15299 LIBS="-lkrb $LIBS"
15300
a21616bd
KR
15301fi
15302
15303fi
15304
15305 fi
15306
15307 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
15308
15309for ac_header in krb5.h
a21616bd 15310do
503d2be0 15311as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15312if eval "test \"\${$as_ac_Header+set}\" = set"; then
15313 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15314echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15315if eval "test \"\${$as_ac_Header+set}\" = set"; then
15316 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15317fi
15318echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15319echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15320else
c0d27fcc
MR
15321 # Is the header compilable?
15322echo "$as_me:$LINENO: checking $ac_header usability" >&5
15323echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15324cat >conftest.$ac_ext <<_ACEOF
15325#line $LINENO "configure"
cd958eb3
MB
15326/* confdefs.h. */
15327_ACEOF
15328cat confdefs.h >>conftest.$ac_ext
15329cat >>conftest.$ac_ext <<_ACEOF
15330/* end confdefs.h. */
c0d27fcc
MR
15331$ac_includes_default
15332#include <$ac_header>
15333_ACEOF
15334rm -f conftest.$ac_objext
15335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15336 (eval $ac_compile) 2>&5
15337 ac_status=$?
15338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15339 (exit $ac_status); } &&
15340 { ac_try='test -s conftest.$ac_objext'
15341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15342 (eval $ac_try) 2>&5
15343 ac_status=$?
15344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15345 (exit $ac_status); }; }; then
15346 ac_header_compiler=yes
15347else
15348 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15349sed 's/^/| /' conftest.$ac_ext >&5
15350
c0d27fcc
MR
15351ac_header_compiler=no
15352fi
15353rm -f conftest.$ac_objext conftest.$ac_ext
15354echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15355echo "${ECHO_T}$ac_header_compiler" >&6
15356
15357# Is the header present?
15358echo "$as_me:$LINENO: checking $ac_header presence" >&5
15359echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15360cat >conftest.$ac_ext <<_ACEOF
15361#line $LINENO "configure"
cd958eb3
MB
15362/* confdefs.h. */
15363_ACEOF
15364cat confdefs.h >>conftest.$ac_ext
15365cat >>conftest.$ac_ext <<_ACEOF
15366/* end confdefs.h. */
503d2be0
AS
15367#include <$ac_header>
15368_ACEOF
c0d27fcc 15369if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15370 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15371 ac_status=$?
6bae0ccf 15372 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15373 rm -f conftest.er1
15374 cat conftest.err >&5
c0d27fcc 15375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15376 (exit $ac_status); } >/dev/null; then
15377 if test -s conftest.err; then
15378 ac_cpp_err=$ac_c_preproc_warn_flag
15379 else
15380 ac_cpp_err=
15381 fi
15382else
15383 ac_cpp_err=yes
15384fi
15385if test -z "$ac_cpp_err"; then
c0d27fcc 15386 ac_header_preproc=yes
503d2be0
AS
15387else
15388 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15389sed 's/^/| /' conftest.$ac_ext >&5
15390
c0d27fcc 15391 ac_header_preproc=no
a21616bd 15392fi
503d2be0 15393rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15394echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15395echo "${ECHO_T}$ac_header_preproc" >&6
15396
15397# So? What about this header?
15398case $ac_header_compiler:$ac_header_preproc in
15399 yes:no )
15400 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15401echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15402 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15403echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15404 (
15405 cat <<\_ASBOX
15406## ------------------------------------ ##
15407## Report this to bug-autoconf@gnu.org. ##
15408## ------------------------------------ ##
15409_ASBOX
15410 ) |
15411 sed "s/^/$as_me: WARNING: /" >&2
15412 ;;
c0d27fcc
MR
15413 no:yes )
15414 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15415echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15416 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15417echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15418 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15419echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15420 (
15421 cat <<\_ASBOX
15422## ------------------------------------ ##
15423## Report this to bug-autoconf@gnu.org. ##
15424## ------------------------------------ ##
15425_ASBOX
15426 ) |
15427 sed "s/^/$as_me: WARNING: /" >&2
15428 ;;
c0d27fcc
MR
15429esac
15430echo "$as_me:$LINENO: checking for $ac_header" >&5
15431echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15432if eval "test \"\${$as_ac_Header+set}\" = set"; then
15433 echo $ECHO_N "(cached) $ECHO_C" >&6
15434else
15435 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15436fi
c0d27fcc 15437echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15438echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15439
15440fi
503d2be0 15441if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15442 cat >>confdefs.h <<_ACEOF
503d2be0 15443#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15444_ACEOF
503d2be0 15445
a21616bd 15446fi
c0d27fcc 15447
a21616bd
KR
15448done
15449
15450 else
503d2be0
AS
15451
15452for ac_header in des.h
a21616bd 15453do
503d2be0 15454as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15455if eval "test \"\${$as_ac_Header+set}\" = set"; then
15456 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15457echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15458if eval "test \"\${$as_ac_Header+set}\" = set"; then
15459 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15460fi
15461echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15462echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15463else
c0d27fcc
MR
15464 # Is the header compilable?
15465echo "$as_me:$LINENO: checking $ac_header usability" >&5
15466echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15467cat >conftest.$ac_ext <<_ACEOF
15468#line $LINENO "configure"
cd958eb3
MB
15469/* confdefs.h. */
15470_ACEOF
15471cat confdefs.h >>conftest.$ac_ext
15472cat >>conftest.$ac_ext <<_ACEOF
15473/* end confdefs.h. */
c0d27fcc
MR
15474$ac_includes_default
15475#include <$ac_header>
15476_ACEOF
15477rm -f conftest.$ac_objext
15478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15479 (eval $ac_compile) 2>&5
15480 ac_status=$?
15481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15482 (exit $ac_status); } &&
15483 { ac_try='test -s conftest.$ac_objext'
15484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15485 (eval $ac_try) 2>&5
15486 ac_status=$?
15487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15488 (exit $ac_status); }; }; then
15489 ac_header_compiler=yes
15490else
15491 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15492sed 's/^/| /' conftest.$ac_ext >&5
15493
c0d27fcc
MR
15494ac_header_compiler=no
15495fi
15496rm -f conftest.$ac_objext conftest.$ac_ext
15497echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15498echo "${ECHO_T}$ac_header_compiler" >&6
15499
15500# Is the header present?
15501echo "$as_me:$LINENO: checking $ac_header presence" >&5
15502echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15503cat >conftest.$ac_ext <<_ACEOF
15504#line $LINENO "configure"
cd958eb3
MB
15505/* confdefs.h. */
15506_ACEOF
15507cat confdefs.h >>conftest.$ac_ext
15508cat >>conftest.$ac_ext <<_ACEOF
15509/* end confdefs.h. */
503d2be0
AS
15510#include <$ac_header>
15511_ACEOF
c0d27fcc 15512if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15513 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15514 ac_status=$?
6bae0ccf 15515 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15516 rm -f conftest.er1
15517 cat conftest.err >&5
c0d27fcc 15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15519 (exit $ac_status); } >/dev/null; then
15520 if test -s conftest.err; then
15521 ac_cpp_err=$ac_c_preproc_warn_flag
15522 else
15523 ac_cpp_err=
15524 fi
15525else
15526 ac_cpp_err=yes
15527fi
15528if test -z "$ac_cpp_err"; then
c0d27fcc 15529 ac_header_preproc=yes
503d2be0
AS
15530else
15531 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15532sed 's/^/| /' conftest.$ac_ext >&5
15533
c0d27fcc 15534 ac_header_preproc=no
a21616bd 15535fi
503d2be0 15536rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15537echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15538echo "${ECHO_T}$ac_header_preproc" >&6
15539
15540# So? What about this header?
15541case $ac_header_compiler:$ac_header_preproc in
15542 yes:no )
15543 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15544echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15545 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15546echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15547 (
15548 cat <<\_ASBOX
15549## ------------------------------------ ##
15550## Report this to bug-autoconf@gnu.org. ##
15551## ------------------------------------ ##
15552_ASBOX
15553 ) |
15554 sed "s/^/$as_me: WARNING: /" >&2
15555 ;;
c0d27fcc
MR
15556 no:yes )
15557 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15558echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15559 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15560echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15561 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15562echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15563 (
15564 cat <<\_ASBOX
15565## ------------------------------------ ##
15566## Report this to bug-autoconf@gnu.org. ##
15567## ------------------------------------ ##
15568_ASBOX
15569 ) |
15570 sed "s/^/$as_me: WARNING: /" >&2
15571 ;;
c0d27fcc
MR
15572esac
15573echo "$as_me:$LINENO: checking for $ac_header" >&5
15574echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15575if eval "test \"\${$as_ac_Header+set}\" = set"; then
15576 echo $ECHO_N "(cached) $ECHO_C" >&6
15577else
15578 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15579fi
c0d27fcc 15580echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15581echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15582
15583fi
503d2be0 15584if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15585 cat >>confdefs.h <<_ACEOF
503d2be0 15586#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15587_ACEOF
503d2be0 15588
a21616bd 15589else
503d2be0
AS
15590
15591for ac_header in kerberosIV/des.h
a21616bd 15592do
503d2be0 15593as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15594if eval "test \"\${$as_ac_Header+set}\" = set"; then
15595 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15596echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15597if eval "test \"\${$as_ac_Header+set}\" = set"; then
15598 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15599fi
15600echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15601echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15602else
c0d27fcc
MR
15603 # Is the header compilable?
15604echo "$as_me:$LINENO: checking $ac_header usability" >&5
15605echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15606cat >conftest.$ac_ext <<_ACEOF
15607#line $LINENO "configure"
cd958eb3
MB
15608/* confdefs.h. */
15609_ACEOF
15610cat confdefs.h >>conftest.$ac_ext
15611cat >>conftest.$ac_ext <<_ACEOF
15612/* end confdefs.h. */
c0d27fcc
MR
15613$ac_includes_default
15614#include <$ac_header>
15615_ACEOF
15616rm -f conftest.$ac_objext
15617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15618 (eval $ac_compile) 2>&5
15619 ac_status=$?
15620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15621 (exit $ac_status); } &&
15622 { ac_try='test -s conftest.$ac_objext'
15623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15624 (eval $ac_try) 2>&5
15625 ac_status=$?
15626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15627 (exit $ac_status); }; }; then
15628 ac_header_compiler=yes
15629else
15630 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15631sed 's/^/| /' conftest.$ac_ext >&5
15632
c0d27fcc
MR
15633ac_header_compiler=no
15634fi
15635rm -f conftest.$ac_objext conftest.$ac_ext
15636echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15637echo "${ECHO_T}$ac_header_compiler" >&6
15638
15639# Is the header present?
15640echo "$as_me:$LINENO: checking $ac_header presence" >&5
15641echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15642cat >conftest.$ac_ext <<_ACEOF
15643#line $LINENO "configure"
cd958eb3
MB
15644/* confdefs.h. */
15645_ACEOF
15646cat confdefs.h >>conftest.$ac_ext
15647cat >>conftest.$ac_ext <<_ACEOF
15648/* end confdefs.h. */
503d2be0
AS
15649#include <$ac_header>
15650_ACEOF
c0d27fcc 15651if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15652 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15653 ac_status=$?
6bae0ccf 15654 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15655 rm -f conftest.er1
15656 cat conftest.err >&5
c0d27fcc 15657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15658 (exit $ac_status); } >/dev/null; then
15659 if test -s conftest.err; then
15660 ac_cpp_err=$ac_c_preproc_warn_flag
15661 else
15662 ac_cpp_err=
15663 fi
15664else
15665 ac_cpp_err=yes
15666fi
15667if test -z "$ac_cpp_err"; then
c0d27fcc 15668 ac_header_preproc=yes
503d2be0
AS
15669else
15670 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15671sed 's/^/| /' conftest.$ac_ext >&5
15672
c0d27fcc 15673 ac_header_preproc=no
a21616bd 15674fi
503d2be0 15675rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15676echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15677echo "${ECHO_T}$ac_header_preproc" >&6
15678
15679# So? What about this header?
15680case $ac_header_compiler:$ac_header_preproc in
15681 yes:no )
15682 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15683echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15684 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15685echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15686 (
15687 cat <<\_ASBOX
15688## ------------------------------------ ##
15689## Report this to bug-autoconf@gnu.org. ##
15690## ------------------------------------ ##
15691_ASBOX
15692 ) |
15693 sed "s/^/$as_me: WARNING: /" >&2
15694 ;;
c0d27fcc
MR
15695 no:yes )
15696 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15697echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15698 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15699echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15700 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15701echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15702 (
15703 cat <<\_ASBOX
15704## ------------------------------------ ##
15705## Report this to bug-autoconf@gnu.org. ##
15706## ------------------------------------ ##
15707_ASBOX
15708 ) |
15709 sed "s/^/$as_me: WARNING: /" >&2
15710 ;;
c0d27fcc
MR
15711esac
15712echo "$as_me:$LINENO: checking for $ac_header" >&5
15713echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15714if eval "test \"\${$as_ac_Header+set}\" = set"; then
15715 echo $ECHO_N "(cached) $ECHO_C" >&6
15716else
15717 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15718fi
c0d27fcc 15719echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15720echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15721
15722fi
503d2be0 15723if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15724 cat >>confdefs.h <<_ACEOF
503d2be0 15725#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15726_ACEOF
503d2be0 15727
a21616bd 15728else
503d2be0
AS
15729
15730for ac_header in kerberos/des.h
a21616bd 15731do
503d2be0 15732as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15733if eval "test \"\${$as_ac_Header+set}\" = set"; then
15734 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15735echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15736if eval "test \"\${$as_ac_Header+set}\" = set"; then
15737 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15738fi
15739echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15740echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15741else
c0d27fcc
MR
15742 # Is the header compilable?
15743echo "$as_me:$LINENO: checking $ac_header usability" >&5
15744echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15745cat >conftest.$ac_ext <<_ACEOF
15746#line $LINENO "configure"
cd958eb3
MB
15747/* confdefs.h. */
15748_ACEOF
15749cat confdefs.h >>conftest.$ac_ext
15750cat >>conftest.$ac_ext <<_ACEOF
15751/* end confdefs.h. */
c0d27fcc
MR
15752$ac_includes_default
15753#include <$ac_header>
15754_ACEOF
15755rm -f conftest.$ac_objext
15756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15757 (eval $ac_compile) 2>&5
15758 ac_status=$?
15759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15760 (exit $ac_status); } &&
15761 { ac_try='test -s conftest.$ac_objext'
15762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15763 (eval $ac_try) 2>&5
15764 ac_status=$?
15765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15766 (exit $ac_status); }; }; then
15767 ac_header_compiler=yes
15768else
15769 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15770sed 's/^/| /' conftest.$ac_ext >&5
15771
c0d27fcc
MR
15772ac_header_compiler=no
15773fi
15774rm -f conftest.$ac_objext conftest.$ac_ext
15775echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15776echo "${ECHO_T}$ac_header_compiler" >&6
15777
15778# Is the header present?
15779echo "$as_me:$LINENO: checking $ac_header presence" >&5
15780echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15781cat >conftest.$ac_ext <<_ACEOF
15782#line $LINENO "configure"
cd958eb3
MB
15783/* confdefs.h. */
15784_ACEOF
15785cat confdefs.h >>conftest.$ac_ext
15786cat >>conftest.$ac_ext <<_ACEOF
15787/* end confdefs.h. */
503d2be0
AS
15788#include <$ac_header>
15789_ACEOF
c0d27fcc 15790if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15791 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15792 ac_status=$?
6bae0ccf 15793 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15794 rm -f conftest.er1
15795 cat conftest.err >&5
c0d27fcc 15796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15797 (exit $ac_status); } >/dev/null; then
15798 if test -s conftest.err; then
15799 ac_cpp_err=$ac_c_preproc_warn_flag
15800 else
15801 ac_cpp_err=
15802 fi
15803else
15804 ac_cpp_err=yes
15805fi
15806if test -z "$ac_cpp_err"; then
c0d27fcc 15807 ac_header_preproc=yes
503d2be0
AS
15808else
15809 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15810sed 's/^/| /' conftest.$ac_ext >&5
15811
c0d27fcc 15812 ac_header_preproc=no
a21616bd 15813fi
503d2be0 15814rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15815echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15816echo "${ECHO_T}$ac_header_preproc" >&6
15817
15818# So? What about this header?
15819case $ac_header_compiler:$ac_header_preproc in
15820 yes:no )
15821 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15822echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15823 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15824echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15825 (
15826 cat <<\_ASBOX
15827## ------------------------------------ ##
15828## Report this to bug-autoconf@gnu.org. ##
15829## ------------------------------------ ##
15830_ASBOX
15831 ) |
15832 sed "s/^/$as_me: WARNING: /" >&2
15833 ;;
c0d27fcc
MR
15834 no:yes )
15835 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15836echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15837 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15838echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15839 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15840echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15841 (
15842 cat <<\_ASBOX
15843## ------------------------------------ ##
15844## Report this to bug-autoconf@gnu.org. ##
15845## ------------------------------------ ##
15846_ASBOX
15847 ) |
15848 sed "s/^/$as_me: WARNING: /" >&2
15849 ;;
c0d27fcc
MR
15850esac
15851echo "$as_me:$LINENO: checking for $ac_header" >&5
15852echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15853if eval "test \"\${$as_ac_Header+set}\" = set"; then
15854 echo $ECHO_N "(cached) $ECHO_C" >&6
15855else
15856 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15857fi
c0d27fcc 15858echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15859echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15860
15861fi
503d2be0 15862if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15863 cat >>confdefs.h <<_ACEOF
503d2be0 15864#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15865_ACEOF
a21616bd
KR
15866
15867fi
c0d27fcc 15868
a21616bd
KR
15869done
15870
98418dba 15871fi
c0d27fcc 15872
925c2f3f
EZ
15873done
15874
98418dba 15875fi
c0d27fcc 15876
925c2f3f 15877done
98418dba 15878
c0d27fcc 15879
925c2f3f
EZ
15880for ac_header in krb.h
15881do
15882as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15883if eval "test \"\${$as_ac_Header+set}\" = set"; then
15884 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
15885echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15886if eval "test \"\${$as_ac_Header+set}\" = set"; then
15887 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15888fi
15889echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15890echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15891else
15892 # Is the header compilable?
15893echo "$as_me:$LINENO: checking $ac_header usability" >&5
15894echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15895cat >conftest.$ac_ext <<_ACEOF
15896#line $LINENO "configure"
cd958eb3
MB
15897/* confdefs.h. */
15898_ACEOF
15899cat confdefs.h >>conftest.$ac_ext
15900cat >>conftest.$ac_ext <<_ACEOF
15901/* end confdefs.h. */
c0d27fcc
MR
15902$ac_includes_default
15903#include <$ac_header>
15904_ACEOF
15905rm -f conftest.$ac_objext
15906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15907 (eval $ac_compile) 2>&5
15908 ac_status=$?
15909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15910 (exit $ac_status); } &&
15911 { ac_try='test -s conftest.$ac_objext'
15912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15913 (eval $ac_try) 2>&5
15914 ac_status=$?
15915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15916 (exit $ac_status); }; }; then
15917 ac_header_compiler=yes
925c2f3f 15918else
c0d27fcc 15919 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15920sed 's/^/| /' conftest.$ac_ext >&5
15921
c0d27fcc
MR
15922ac_header_compiler=no
15923fi
15924rm -f conftest.$ac_objext conftest.$ac_ext
15925echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15926echo "${ECHO_T}$ac_header_compiler" >&6
15927
15928# Is the header present?
15929echo "$as_me:$LINENO: checking $ac_header presence" >&5
15930echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15931cat >conftest.$ac_ext <<_ACEOF
15932#line $LINENO "configure"
cd958eb3
MB
15933/* confdefs.h. */
15934_ACEOF
15935cat confdefs.h >>conftest.$ac_ext
15936cat >>conftest.$ac_ext <<_ACEOF
15937/* end confdefs.h. */
503d2be0
AS
15938#include <$ac_header>
15939_ACEOF
c0d27fcc 15940if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15941 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15942 ac_status=$?
6bae0ccf 15943 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15944 rm -f conftest.er1
15945 cat conftest.err >&5
c0d27fcc 15946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15947 (exit $ac_status); } >/dev/null; then
15948 if test -s conftest.err; then
15949 ac_cpp_err=$ac_c_preproc_warn_flag
15950 else
15951 ac_cpp_err=
15952 fi
15953else
15954 ac_cpp_err=yes
15955fi
15956if test -z "$ac_cpp_err"; then
c0d27fcc 15957 ac_header_preproc=yes
503d2be0
AS
15958else
15959 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15960sed 's/^/| /' conftest.$ac_ext >&5
15961
c0d27fcc 15962 ac_header_preproc=no
a21616bd 15963fi
503d2be0 15964rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15965echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15966echo "${ECHO_T}$ac_header_preproc" >&6
15967
15968# So? What about this header?
15969case $ac_header_compiler:$ac_header_preproc in
15970 yes:no )
15971 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15972echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15973 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15974echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15975 (
15976 cat <<\_ASBOX
15977## ------------------------------------ ##
15978## Report this to bug-autoconf@gnu.org. ##
15979## ------------------------------------ ##
15980_ASBOX
15981 ) |
15982 sed "s/^/$as_me: WARNING: /" >&2
15983 ;;
c0d27fcc
MR
15984 no:yes )
15985 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15986echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15987 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15988echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15989 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15990echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15991 (
15992 cat <<\_ASBOX
15993## ------------------------------------ ##
15994## Report this to bug-autoconf@gnu.org. ##
15995## ------------------------------------ ##
15996_ASBOX
15997 ) |
15998 sed "s/^/$as_me: WARNING: /" >&2
15999 ;;
c0d27fcc
MR
16000esac
16001echo "$as_me:$LINENO: checking for $ac_header" >&5
16002echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16003if eval "test \"\${$as_ac_Header+set}\" = set"; then
16004 echo $ECHO_N "(cached) $ECHO_C" >&6
16005else
16006 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 16007fi
c0d27fcc 16008echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16009echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16010
16011fi
503d2be0 16012if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16013 cat >>confdefs.h <<_ACEOF
503d2be0 16014#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16015_ACEOF
503d2be0 16016
a21616bd 16017else
503d2be0
AS
16018
16019for ac_header in kerberosIV/krb.h
a21616bd 16020do
503d2be0 16021as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16022if eval "test \"\${$as_ac_Header+set}\" = set"; then
16023 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
16024echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16025if eval "test \"\${$as_ac_Header+set}\" = set"; then
16026 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16027fi
16028echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16029echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16030else
c0d27fcc
MR
16031 # Is the header compilable?
16032echo "$as_me:$LINENO: checking $ac_header usability" >&5
16033echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16034cat >conftest.$ac_ext <<_ACEOF
16035#line $LINENO "configure"
cd958eb3
MB
16036/* confdefs.h. */
16037_ACEOF
16038cat confdefs.h >>conftest.$ac_ext
16039cat >>conftest.$ac_ext <<_ACEOF
16040/* end confdefs.h. */
c0d27fcc
MR
16041$ac_includes_default
16042#include <$ac_header>
16043_ACEOF
16044rm -f conftest.$ac_objext
16045if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16046 (eval $ac_compile) 2>&5
16047 ac_status=$?
16048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16049 (exit $ac_status); } &&
16050 { ac_try='test -s conftest.$ac_objext'
16051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16052 (eval $ac_try) 2>&5
16053 ac_status=$?
16054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16055 (exit $ac_status); }; }; then
16056 ac_header_compiler=yes
16057else
16058 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16059sed 's/^/| /' conftest.$ac_ext >&5
16060
c0d27fcc
MR
16061ac_header_compiler=no
16062fi
16063rm -f conftest.$ac_objext conftest.$ac_ext
16064echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16065echo "${ECHO_T}$ac_header_compiler" >&6
16066
16067# Is the header present?
16068echo "$as_me:$LINENO: checking $ac_header presence" >&5
16069echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16070cat >conftest.$ac_ext <<_ACEOF
16071#line $LINENO "configure"
cd958eb3
MB
16072/* confdefs.h. */
16073_ACEOF
16074cat confdefs.h >>conftest.$ac_ext
16075cat >>conftest.$ac_ext <<_ACEOF
16076/* end confdefs.h. */
503d2be0
AS
16077#include <$ac_header>
16078_ACEOF
c0d27fcc 16079if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16080 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16081 ac_status=$?
6bae0ccf 16082 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16083 rm -f conftest.er1
16084 cat conftest.err >&5
c0d27fcc 16085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16086 (exit $ac_status); } >/dev/null; then
16087 if test -s conftest.err; then
16088 ac_cpp_err=$ac_c_preproc_warn_flag
16089 else
16090 ac_cpp_err=
16091 fi
16092else
16093 ac_cpp_err=yes
16094fi
16095if test -z "$ac_cpp_err"; then
c0d27fcc 16096 ac_header_preproc=yes
503d2be0
AS
16097else
16098 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16099sed 's/^/| /' conftest.$ac_ext >&5
16100
c0d27fcc 16101 ac_header_preproc=no
a21616bd 16102fi
503d2be0 16103rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16104echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16105echo "${ECHO_T}$ac_header_preproc" >&6
16106
16107# So? What about this header?
16108case $ac_header_compiler:$ac_header_preproc in
16109 yes:no )
16110 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16111echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16112 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16113echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16114 (
16115 cat <<\_ASBOX
16116## ------------------------------------ ##
16117## Report this to bug-autoconf@gnu.org. ##
16118## ------------------------------------ ##
16119_ASBOX
16120 ) |
16121 sed "s/^/$as_me: WARNING: /" >&2
16122 ;;
c0d27fcc
MR
16123 no:yes )
16124 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16125echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16126 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16127echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16128 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16129echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16130 (
16131 cat <<\_ASBOX
16132## ------------------------------------ ##
16133## Report this to bug-autoconf@gnu.org. ##
16134## ------------------------------------ ##
16135_ASBOX
16136 ) |
16137 sed "s/^/$as_me: WARNING: /" >&2
16138 ;;
c0d27fcc
MR
16139esac
16140echo "$as_me:$LINENO: checking for $ac_header" >&5
16141echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16142if eval "test \"\${$as_ac_Header+set}\" = set"; then
16143 echo $ECHO_N "(cached) $ECHO_C" >&6
16144else
16145 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 16146fi
c0d27fcc 16147echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16148echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16149
16150fi
503d2be0 16151if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16152 cat >>confdefs.h <<_ACEOF
503d2be0 16153#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16154_ACEOF
503d2be0 16155
a21616bd 16156else
503d2be0
AS
16157
16158for ac_header in kerberos/krb.h
a21616bd 16159do
503d2be0 16160as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16161if eval "test \"\${$as_ac_Header+set}\" = set"; then
16162 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
16163echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16164if eval "test \"\${$as_ac_Header+set}\" = set"; then
16165 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16166fi
16167echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16168echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16169else
c0d27fcc
MR
16170 # Is the header compilable?
16171echo "$as_me:$LINENO: checking $ac_header usability" >&5
16172echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16173cat >conftest.$ac_ext <<_ACEOF
16174#line $LINENO "configure"
cd958eb3
MB
16175/* confdefs.h. */
16176_ACEOF
16177cat confdefs.h >>conftest.$ac_ext
16178cat >>conftest.$ac_ext <<_ACEOF
16179/* end confdefs.h. */
c0d27fcc
MR
16180$ac_includes_default
16181#include <$ac_header>
16182_ACEOF
16183rm -f conftest.$ac_objext
16184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16185 (eval $ac_compile) 2>&5
16186 ac_status=$?
16187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16188 (exit $ac_status); } &&
16189 { ac_try='test -s conftest.$ac_objext'
16190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16191 (eval $ac_try) 2>&5
16192 ac_status=$?
16193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16194 (exit $ac_status); }; }; then
16195 ac_header_compiler=yes
16196else
16197 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16198sed 's/^/| /' conftest.$ac_ext >&5
16199
c0d27fcc
MR
16200ac_header_compiler=no
16201fi
16202rm -f conftest.$ac_objext conftest.$ac_ext
16203echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16204echo "${ECHO_T}$ac_header_compiler" >&6
16205
16206# Is the header present?
16207echo "$as_me:$LINENO: checking $ac_header presence" >&5
16208echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16209cat >conftest.$ac_ext <<_ACEOF
16210#line $LINENO "configure"
cd958eb3
MB
16211/* confdefs.h. */
16212_ACEOF
16213cat confdefs.h >>conftest.$ac_ext
16214cat >>conftest.$ac_ext <<_ACEOF
16215/* end confdefs.h. */
503d2be0
AS
16216#include <$ac_header>
16217_ACEOF
c0d27fcc 16218if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16219 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16220 ac_status=$?
6bae0ccf 16221 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16222 rm -f conftest.er1
16223 cat conftest.err >&5
c0d27fcc 16224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16225 (exit $ac_status); } >/dev/null; then
16226 if test -s conftest.err; then
16227 ac_cpp_err=$ac_c_preproc_warn_flag
16228 else
16229 ac_cpp_err=
16230 fi
16231else
16232 ac_cpp_err=yes
16233fi
16234if test -z "$ac_cpp_err"; then
c0d27fcc 16235 ac_header_preproc=yes
503d2be0
AS
16236else
16237 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16238sed 's/^/| /' conftest.$ac_ext >&5
16239
c0d27fcc 16240 ac_header_preproc=no
a21616bd 16241fi
503d2be0 16242rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16243echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16244echo "${ECHO_T}$ac_header_preproc" >&6
16245
16246# So? What about this header?
16247case $ac_header_compiler:$ac_header_preproc in
16248 yes:no )
16249 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16250echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16251 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16252echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16253 (
16254 cat <<\_ASBOX
16255## ------------------------------------ ##
16256## Report this to bug-autoconf@gnu.org. ##
16257## ------------------------------------ ##
16258_ASBOX
16259 ) |
16260 sed "s/^/$as_me: WARNING: /" >&2
16261 ;;
c0d27fcc
MR
16262 no:yes )
16263 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16264echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16265 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16266echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16267 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16268echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16269 (
16270 cat <<\_ASBOX
16271## ------------------------------------ ##
16272## Report this to bug-autoconf@gnu.org. ##
16273## ------------------------------------ ##
16274_ASBOX
16275 ) |
16276 sed "s/^/$as_me: WARNING: /" >&2
16277 ;;
c0d27fcc
MR
16278esac
16279echo "$as_me:$LINENO: checking for $ac_header" >&5
16280echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16281if eval "test \"\${$as_ac_Header+set}\" = set"; then
16282 echo $ECHO_N "(cached) $ECHO_C" >&6
16283else
16284 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 16285fi
c0d27fcc 16286echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16287echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16288
16289fi
503d2be0 16290if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16291 cat >>confdefs.h <<_ACEOF
503d2be0 16292#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16293_ACEOF
503d2be0 16294
a21616bd 16295fi
c0d27fcc 16296
a21616bd
KR
16297done
16298
16299fi
c0d27fcc 16300
a21616bd
KR
16301done
16302
16303fi
c0d27fcc 16304
a21616bd
KR
16305done
16306
16307 fi
503d2be0
AS
16308
16309for ac_header in com_err.h
a21616bd 16310do
503d2be0 16311as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16312if eval "test \"\${$as_ac_Header+set}\" = set"; then
16313 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
16314echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16315if eval "test \"\${$as_ac_Header+set}\" = set"; then
16316 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16317fi
16318echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16319echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16320else
c0d27fcc
MR
16321 # Is the header compilable?
16322echo "$as_me:$LINENO: checking $ac_header usability" >&5
16323echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16324cat >conftest.$ac_ext <<_ACEOF
16325#line $LINENO "configure"
cd958eb3
MB
16326/* confdefs.h. */
16327_ACEOF
16328cat confdefs.h >>conftest.$ac_ext
16329cat >>conftest.$ac_ext <<_ACEOF
16330/* end confdefs.h. */
c0d27fcc
MR
16331$ac_includes_default
16332#include <$ac_header>
16333_ACEOF
16334rm -f conftest.$ac_objext
16335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16336 (eval $ac_compile) 2>&5
16337 ac_status=$?
16338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16339 (exit $ac_status); } &&
16340 { ac_try='test -s conftest.$ac_objext'
16341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16342 (eval $ac_try) 2>&5
16343 ac_status=$?
16344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16345 (exit $ac_status); }; }; then
16346 ac_header_compiler=yes
16347else
16348 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16349sed 's/^/| /' conftest.$ac_ext >&5
16350
c0d27fcc
MR
16351ac_header_compiler=no
16352fi
16353rm -f conftest.$ac_objext conftest.$ac_ext
16354echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16355echo "${ECHO_T}$ac_header_compiler" >&6
16356
16357# Is the header present?
16358echo "$as_me:$LINENO: checking $ac_header presence" >&5
16359echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16360cat >conftest.$ac_ext <<_ACEOF
16361#line $LINENO "configure"
cd958eb3
MB
16362/* confdefs.h. */
16363_ACEOF
16364cat confdefs.h >>conftest.$ac_ext
16365cat >>conftest.$ac_ext <<_ACEOF
16366/* end confdefs.h. */
503d2be0
AS
16367#include <$ac_header>
16368_ACEOF
c0d27fcc 16369if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16370 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16371 ac_status=$?
6bae0ccf 16372 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16373 rm -f conftest.er1
16374 cat conftest.err >&5
c0d27fcc 16375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16376 (exit $ac_status); } >/dev/null; then
16377 if test -s conftest.err; then
16378 ac_cpp_err=$ac_c_preproc_warn_flag
16379 else
16380 ac_cpp_err=
16381 fi
16382else
16383 ac_cpp_err=yes
16384fi
16385if test -z "$ac_cpp_err"; then
c0d27fcc 16386 ac_header_preproc=yes
503d2be0
AS
16387else
16388 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16389sed 's/^/| /' conftest.$ac_ext >&5
16390
c0d27fcc 16391 ac_header_preproc=no
a21616bd 16392fi
503d2be0 16393rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16394echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16395echo "${ECHO_T}$ac_header_preproc" >&6
16396
16397# So? What about this header?
16398case $ac_header_compiler:$ac_header_preproc in
16399 yes:no )
16400 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16401echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16402 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16403echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16404 (
16405 cat <<\_ASBOX
16406## ------------------------------------ ##
16407## Report this to bug-autoconf@gnu.org. ##
16408## ------------------------------------ ##
16409_ASBOX
16410 ) |
16411 sed "s/^/$as_me: WARNING: /" >&2
16412 ;;
c0d27fcc
MR
16413 no:yes )
16414 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16415echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16416 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16417echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16418 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16419echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16420 (
16421 cat <<\_ASBOX
16422## ------------------------------------ ##
16423## Report this to bug-autoconf@gnu.org. ##
16424## ------------------------------------ ##
16425_ASBOX
16426 ) |
16427 sed "s/^/$as_me: WARNING: /" >&2
16428 ;;
c0d27fcc
MR
16429esac
16430echo "$as_me:$LINENO: checking for $ac_header" >&5
16431echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16432if eval "test \"\${$as_ac_Header+set}\" = set"; then
16433 echo $ECHO_N "(cached) $ECHO_C" >&6
16434else
16435 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 16436fi
c0d27fcc 16437echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16438echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16439
16440fi
503d2be0 16441if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16442 cat >>confdefs.h <<_ACEOF
503d2be0 16443#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16444_ACEOF
503d2be0 16445
a21616bd 16446fi
c0d27fcc 16447
a21616bd
KR
16448done
16449
16450fi
16451
ba4481b5
DL
16452# Solaris requires -lintl if you want strerror (which calls dgettext)
16453# to return localized messages.
503d2be0 16454
c0d27fcc 16455echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
16456echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
16457if test "${ac_cv_lib_intl_dgettext+set}" = set; then
16458 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16459else
503d2be0 16460 ac_check_lib_save_LIBS=$LIBS
ba4481b5 16461LIBS="-lintl $LIBS"
503d2be0 16462cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16463#line $LINENO "configure"
cd958eb3
MB
16464/* confdefs.h. */
16465_ACEOF
16466cat confdefs.h >>conftest.$ac_ext
16467cat >>conftest.$ac_ext <<_ACEOF
16468/* end confdefs.h. */
503d2be0 16469
ba4481b5 16470/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16471#ifdef __cplusplus
16472extern "C"
16473#endif
ba4481b5 16474/* We use char because int might match the return type of a gcc2
503d2be0
AS
16475 builtin and then its argument prototype would still apply. */
16476char dgettext ();
16477int
16478main ()
16479{
16480dgettext ();
16481 ;
16482 return 0;
16483}
16484_ACEOF
16485rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16487 (eval $ac_link) 2>&5
16488 ac_status=$?
c0d27fcc 16489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16490 (exit $ac_status); } &&
16491 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16493 (eval $ac_try) 2>&5
16494 ac_status=$?
c0d27fcc 16495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16496 (exit $ac_status); }; }; then
16497 ac_cv_lib_intl_dgettext=yes
16498else
16499 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16500sed 's/^/| /' conftest.$ac_ext >&5
16501
503d2be0
AS
16502ac_cv_lib_intl_dgettext=no
16503fi
16504rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16505LIBS=$ac_check_lib_save_LIBS
16506fi
c0d27fcc 16507echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
16508echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
16509if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 16510 cat >>confdefs.h <<_ACEOF
503d2be0 16511#define HAVE_LIBINTL 1
c0d27fcc 16512_ACEOF
ba4481b5
DL
16513
16514 LIBS="-lintl $LIBS"
16515
ba4481b5
DL
16516fi
16517
c0d27fcc
MR
16518
16519echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
16520echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
16521if test "${emacs_cv_localtime_cache+set}" = set; then
16522 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
16523else
16524 if test x$ac_cv_func_tzset = xyes; then
16525if test "$cross_compiling" = yes; then
16526 # If we have tzset, assume the worst when cross-compiling.
16527emacs_cv_localtime_cache=yes
16528else
503d2be0 16529 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16530#line $LINENO "configure"
cd958eb3
MB
16531/* confdefs.h. */
16532_ACEOF
16533cat confdefs.h >>conftest.$ac_ext
16534cat >>conftest.$ac_ext <<_ACEOF
16535/* end confdefs.h. */
ba4481b5 16536#include <time.h>
ba4481b5
DL
16537extern char **environ;
16538unset_TZ ()
16539{
16540 char **from, **to;
16541 for (to = from = environ; (*to = *from); from++)
16542 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
16543 to++;
16544}
16545char TZ_GMT0[] = "TZ=GMT0";
16546char TZ_PST8[] = "TZ=PST8";
16547main()
16548{
16549 time_t now = time ((time_t *) 0);
16550 int hour_GMT0, hour_unset;
16551 if (putenv (TZ_GMT0) != 0)
16552 exit (1);
16553 hour_GMT0 = localtime (&now)->tm_hour;
16554 unset_TZ ();
16555 hour_unset = localtime (&now)->tm_hour;
16556 if (putenv (TZ_PST8) != 0)
16557 exit (1);
16558 if (localtime (&now)->tm_hour == hour_GMT0)
16559 exit (1);
16560 unset_TZ ();
16561 if (localtime (&now)->tm_hour != hour_unset)
16562 exit (1);
16563 exit (0);
16564}
503d2be0
AS
16565_ACEOF
16566rm -f conftest$ac_exeext
c0d27fcc 16567if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16568 (eval $ac_link) 2>&5
16569 ac_status=$?
c0d27fcc 16570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16571 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 16572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16573 (eval $ac_try) 2>&5
16574 ac_status=$?
c0d27fcc 16575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16576 (exit $ac_status); }; }; then
ba4481b5
DL
16577 emacs_cv_localtime_cache=no
16578else
503d2be0
AS
16579 echo "$as_me: program exited with status $ac_status" >&5
16580echo "$as_me: failed program was:" >&5
cd958eb3
MB
16581sed 's/^/| /' conftest.$ac_ext >&5
16582
c0d27fcc 16583( exit $ac_status )
503d2be0 16584emacs_cv_localtime_cache=yes
ba4481b5 16585fi
6bae0ccf 16586rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 16587fi
ba4481b5
DL
16588else
16589 # If we lack tzset, report that localtime does not cache TZ,
16590 # since we can't invalidate the cache if we don't have tzset.
16591 emacs_cv_localtime_cache=no
16592fi
16593fi
c0d27fcc 16594echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 16595echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 16596if test $emacs_cv_localtime_cache = yes; then
b936fae4 16597
c0d27fcc 16598cat >>confdefs.h <<\_ACEOF
ba4481b5 16599#define LOCALTIME_CACHE 1
c0d27fcc 16600_ACEOF
ba4481b5
DL
16601
16602fi
16603
16604if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
16605
16606for ac_func in gettimeofday
48d4b120 16607do
503d2be0 16608as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 16609echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
16610echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16611if eval "test \"\${$as_ac_var+set}\" = set"; then
16612 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 16613else
503d2be0 16614 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16615#line $LINENO "configure"
cd958eb3
MB
16616/* confdefs.h. */
16617_ACEOF
16618cat confdefs.h >>conftest.$ac_ext
16619cat >>conftest.$ac_ext <<_ACEOF
16620/* end confdefs.h. */
48d4b120 16621/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
16622 which can conflict with char $ac_func (); below.
16623 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16624 <limits.h> exists even on freestanding compilers. */
16625#ifdef __STDC__
16626# include <limits.h>
16627#else
16628# include <assert.h>
16629#endif
48d4b120 16630/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16631#ifdef __cplusplus
16632extern "C"
cd958eb3 16633{
503d2be0 16634#endif
48d4b120 16635/* We use char because int might match the return type of a gcc2
503d2be0
AS
16636 builtin and then its argument prototype would still apply. */
16637char $ac_func ();
48d4b120
DL
16638/* The GNU C library defines this for functions which it implements
16639 to always fail with ENOSYS. Some functions are actually named
16640 something starting with __ and the normal name is an alias. */
16641#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16642choke me
16643#else
cd958eb3 16644char (*f) () = $ac_func;
48d4b120 16645#endif
cd958eb3
MB
16646#ifdef __cplusplus
16647}
16648#endif
16649
16650int
16651main ()
16652{
9e71690e 16653return f != $ac_func;
503d2be0
AS
16654 ;
16655 return 0;
16656}
16657_ACEOF
16658rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16659if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16660 (eval $ac_link) 2>&5
16661 ac_status=$?
c0d27fcc 16662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16663 (exit $ac_status); } &&
16664 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16666 (eval $ac_try) 2>&5
16667 ac_status=$?
c0d27fcc 16668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16669 (exit $ac_status); }; }; then
16670 eval "$as_ac_var=yes"
16671else
16672 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16673sed 's/^/| /' conftest.$ac_ext >&5
16674
503d2be0
AS
16675eval "$as_ac_var=no"
16676fi
16677rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16678fi
c0d27fcc 16679echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
16680echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16681if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16682 cat >>confdefs.h <<_ACEOF
503d2be0 16683#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16684_ACEOF
48d4b120 16685
48d4b120
DL
16686fi
16687done
16688
b936fae4 16689 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 16690 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
16691echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
16692if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
16693 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16694else
503d2be0 16695 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16696#line $LINENO "configure"
cd958eb3
MB
16697/* confdefs.h. */
16698_ACEOF
16699cat confdefs.h >>conftest.$ac_ext
16700cat >>conftest.$ac_ext <<_ACEOF
16701/* end confdefs.h. */
ba4481b5 16702
a3f08d9e
DL
16703#ifdef TIME_WITH_SYS_TIME
16704#include <sys/time.h>
16705#include <time.h>
16706#else
16707#ifdef HAVE_SYS_TIME_H
16708#include <sys/time.h>
16709#else
16710#include <time.h>
16711#endif
16712#endif
503d2be0
AS
16713int
16714main ()
16715{
a3f08d9e 16716struct timeval time;
b936fae4 16717 gettimeofday (&time, 0);
503d2be0
AS
16718 ;
16719 return 0;
16720}
16721_ACEOF
16722rm -f conftest.$ac_objext
c0d27fcc 16723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
16724 (eval $ac_compile) 2>&5
16725 ac_status=$?
c0d27fcc 16726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16727 (exit $ac_status); } &&
16728 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16730 (eval $ac_try) 2>&5
16731 ac_status=$?
c0d27fcc 16732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16733 (exit $ac_status); }; }; then
ba4481b5
DL
16734 emacs_cv_gettimeofday_two_arguments=yes
16735else
503d2be0 16736 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16737sed 's/^/| /' conftest.$ac_ext >&5
16738
503d2be0 16739emacs_cv_gettimeofday_two_arguments=no
ba4481b5 16740fi
503d2be0 16741rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 16742fi
c0d27fcc 16743echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 16744echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
16745 if test $emacs_cv_gettimeofday_two_arguments = no; then
16746
c0d27fcc 16747cat >>confdefs.h <<\_ACEOF
ba4481b5 16748#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 16749_ACEOF
ba4481b5 16750
b936fae4 16751 fi
ba4481b5
DL
16752 fi
16753fi
16754
973a76b1
DL
16755# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
16756echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
16757echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
16758if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
16759 echo $ECHO_N "(cached) $ECHO_C" >&6
16760else
16761 cat >conftest.$ac_ext <<_ACEOF
16762#line $LINENO "configure"
16763/* confdefs.h. */
16764_ACEOF
16765cat confdefs.h >>conftest.$ac_ext
16766cat >>conftest.$ac_ext <<_ACEOF
16767/* end confdefs.h. */
16768#include <sys/types.h>
16769#include <$ac_cv_struct_tm>
16770
16771
16772int
16773main ()
16774{
16775static struct tm ac_aggr;
16776if (ac_aggr.tm_zone)
16777return 0;
16778 ;
16779 return 0;
16780}
16781_ACEOF
16782rm -f conftest.$ac_objext
16783if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16784 (eval $ac_compile) 2>&5
16785 ac_status=$?
16786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16787 (exit $ac_status); } &&
16788 { ac_try='test -s conftest.$ac_objext'
16789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16790 (eval $ac_try) 2>&5
16791 ac_status=$?
16792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16793 (exit $ac_status); }; }; then
16794 ac_cv_member_struct_tm_tm_zone=yes
16795else
16796 echo "$as_me: failed program was:" >&5
16797sed 's/^/| /' conftest.$ac_ext >&5
16798
16799cat >conftest.$ac_ext <<_ACEOF
16800#line $LINENO "configure"
16801/* confdefs.h. */
16802_ACEOF
16803cat confdefs.h >>conftest.$ac_ext
16804cat >>conftest.$ac_ext <<_ACEOF
16805/* end confdefs.h. */
16806#include <sys/types.h>
16807#include <$ac_cv_struct_tm>
16808
16809
16810int
16811main ()
16812{
16813static struct tm ac_aggr;
16814if (sizeof ac_aggr.tm_zone)
16815return 0;
16816 ;
16817 return 0;
16818}
16819_ACEOF
16820rm -f conftest.$ac_objext
16821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16822 (eval $ac_compile) 2>&5
16823 ac_status=$?
16824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16825 (exit $ac_status); } &&
16826 { ac_try='test -s conftest.$ac_objext'
16827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16828 (eval $ac_try) 2>&5
16829 ac_status=$?
16830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16831 (exit $ac_status); }; }; then
16832 ac_cv_member_struct_tm_tm_zone=yes
16833else
16834 echo "$as_me: failed program was:" >&5
16835sed 's/^/| /' conftest.$ac_ext >&5
16836
16837ac_cv_member_struct_tm_tm_zone=no
16838fi
16839rm -f conftest.$ac_objext conftest.$ac_ext
16840fi
16841rm -f conftest.$ac_objext conftest.$ac_ext
16842fi
16843echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16844echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
16845if test $ac_cv_member_struct_tm_tm_zone = yes; then
16846
16847cat >>confdefs.h <<_ACEOF
16848#define HAVE_STRUCT_TM_TM_ZONE 1
16849_ACEOF
16850
16851
16852fi
16853
16854if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16855
16856cat >>confdefs.h <<\_ACEOF
16857#define HAVE_TM_ZONE 1
16858_ACEOF
16859
16860else
16861 echo "$as_me:$LINENO: checking for tzname" >&5
16862echo $ECHO_N "checking for tzname... $ECHO_C" >&6
16863if test "${ac_cv_var_tzname+set}" = set; then
16864 echo $ECHO_N "(cached) $ECHO_C" >&6
16865else
16866 cat >conftest.$ac_ext <<_ACEOF
16867#line $LINENO "configure"
16868/* confdefs.h. */
16869_ACEOF
16870cat confdefs.h >>conftest.$ac_ext
16871cat >>conftest.$ac_ext <<_ACEOF
16872/* end confdefs.h. */
16873#include <time.h>
16874#ifndef tzname /* For SGI. */
16875extern char *tzname[]; /* RS6000 and others reject char **tzname. */
16876#endif
16877
16878int
16879main ()
16880{
16881atoi(*tzname);
16882 ;
16883 return 0;
16884}
16885_ACEOF
16886rm -f conftest.$ac_objext conftest$ac_exeext
16887if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16888 (eval $ac_link) 2>&5
16889 ac_status=$?
16890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16891 (exit $ac_status); } &&
16892 { ac_try='test -s conftest$ac_exeext'
16893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16894 (eval $ac_try) 2>&5
16895 ac_status=$?
16896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16897 (exit $ac_status); }; }; then
16898 ac_cv_var_tzname=yes
16899else
16900 echo "$as_me: failed program was:" >&5
16901sed 's/^/| /' conftest.$ac_ext >&5
16902
16903ac_cv_var_tzname=no
16904fi
16905rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16906fi
16907echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
16908echo "${ECHO_T}$ac_cv_var_tzname" >&6
16909 if test $ac_cv_var_tzname = yes; then
16910
16911cat >>confdefs.h <<\_ACEOF
16912#define HAVE_TZNAME 1
16913_ACEOF
16914
16915 fi
16916fi
16917
16918
48d4b120 16919if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 16920 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
16921echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
16922if test "${emacs_cv_struct_timezone+set}" = set; then
16923 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 16924else
503d2be0 16925 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16926#line $LINENO "configure"
cd958eb3
MB
16927/* confdefs.h. */
16928_ACEOF
16929cat confdefs.h >>conftest.$ac_ext
16930cat >>conftest.$ac_ext <<_ACEOF
16931/* end confdefs.h. */
48d4b120 16932#include <sys/time.h>
503d2be0
AS
16933int
16934main ()
16935{
48d4b120 16936struct timezone tz;
503d2be0
AS
16937 ;
16938 return 0;
16939}
16940_ACEOF
16941rm -f conftest.$ac_objext
c0d27fcc 16942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
16943 (eval $ac_compile) 2>&5
16944 ac_status=$?
c0d27fcc 16945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16946 (exit $ac_status); } &&
16947 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16949 (eval $ac_try) 2>&5
16950 ac_status=$?
c0d27fcc 16951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16952 (exit $ac_status); }; }; then
48d4b120
DL
16953 if test "$cross_compiling" = yes; then
16954 emacs_cv_struct_timezone=yes
16955else
503d2be0 16956 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16957#line $LINENO "configure"
cd958eb3
MB
16958/* confdefs.h. */
16959_ACEOF
16960cat confdefs.h >>conftest.$ac_ext
16961cat >>conftest.$ac_ext <<_ACEOF
16962/* end confdefs.h. */
48d4b120
DL
16963
16964#ifdef TIME_WITH_SYS_TIME
16965#include <sys/time.h>
16966#include <time.h>
16967#else
16968#ifdef HAVE_SYS_TIME_H
16969#include <sys/time.h>
16970#else
16971#include <time.h>
16972#endif
16973#endif
16974main () {
16975 struct timeval time;
16976 struct timezone dummy;
16977 exit (gettimeofday (&time, &dummy));
16978}
503d2be0
AS
16979_ACEOF
16980rm -f conftest$ac_exeext
c0d27fcc 16981if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16982 (eval $ac_link) 2>&5
16983 ac_status=$?
c0d27fcc 16984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16985 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 16986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16987 (eval $ac_try) 2>&5
16988 ac_status=$?
c0d27fcc 16989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16990 (exit $ac_status); }; }; then
48d4b120
DL
16991 emacs_cv_struct_timezone=yes
16992else
503d2be0
AS
16993 echo "$as_me: program exited with status $ac_status" >&5
16994echo "$as_me: failed program was:" >&5
cd958eb3
MB
16995sed 's/^/| /' conftest.$ac_ext >&5
16996
c0d27fcc 16997( exit $ac_status )
503d2be0 16998emacs_cv_struct_timezone=no
48d4b120 16999fi
6bae0ccf 17000rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 17001fi
48d4b120 17002else
503d2be0 17003 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17004sed 's/^/| /' conftest.$ac_ext >&5
17005
503d2be0 17006emacs_cv_struct_timezone=no
48d4b120 17007fi
503d2be0 17008rm -f conftest.$ac_objext conftest.$ac_ext
48d4b120 17009fi
c0d27fcc 17010echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 17011echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
17012fi
17013
ba4481b5 17014ok_so_far=yes
c0d27fcc 17015echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
17016echo $ECHO_N "checking for socket... $ECHO_C" >&6
17017if test "${ac_cv_func_socket+set}" = set; then
17018 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17019else
503d2be0 17020 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 17021#line $LINENO "configure"
cd958eb3
MB
17022/* confdefs.h. */
17023_ACEOF
17024cat confdefs.h >>conftest.$ac_ext
17025cat >>conftest.$ac_ext <<_ACEOF
17026/* end confdefs.h. */
ba4481b5 17027/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
17028 which can conflict with char socket (); below.
17029 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17030 <limits.h> exists even on freestanding compilers. */
17031#ifdef __STDC__
17032# include <limits.h>
17033#else
17034# include <assert.h>
17035#endif
ba4481b5 17036/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17037#ifdef __cplusplus
17038extern "C"
cd958eb3 17039{
503d2be0 17040#endif
ba4481b5 17041/* We use char because int might match the return type of a gcc2
503d2be0
AS
17042 builtin and then its argument prototype would still apply. */
17043char socket ();
ba4481b5
DL
17044/* The GNU C library defines this for functions which it implements
17045 to always fail with ENOSYS. Some functions are actually named
17046 something starting with __ and the normal name is an alias. */
17047#if defined (__stub_socket) || defined (__stub___socket)
17048choke me
17049#else
cd958eb3 17050char (*f) () = socket;
ba4481b5 17051#endif
cd958eb3
MB
17052#ifdef __cplusplus
17053}
17054#endif
17055
17056int
17057main ()
17058{
9e71690e 17059return f != socket;
503d2be0
AS
17060 ;
17061 return 0;
17062}
17063_ACEOF
17064rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
17066 (eval $ac_link) 2>&5
17067 ac_status=$?
c0d27fcc 17068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17069 (exit $ac_status); } &&
17070 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17072 (eval $ac_try) 2>&5
17073 ac_status=$?
c0d27fcc 17074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17075 (exit $ac_status); }; }; then
17076 ac_cv_func_socket=yes
17077else
17078 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17079sed 's/^/| /' conftest.$ac_ext >&5
17080
503d2be0
AS
17081ac_cv_func_socket=no
17082fi
17083rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17084fi
c0d27fcc 17085echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
17086echo "${ECHO_T}$ac_cv_func_socket" >&6
17087if test $ac_cv_func_socket = yes; then
ba4481b5
DL
17088 :
17089else
503d2be0 17090 ok_so_far=no
ba4481b5
DL
17091fi
17092
17093if test $ok_so_far = yes; then
c0d27fcc
MR
17094 if test "${ac_cv_header_netinet_in_h+set}" = set; then
17095 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
17096echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
17097if test "${ac_cv_header_netinet_in_h+set}" = set; then
17098 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
17099fi
17100echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
17101echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 17102else
c0d27fcc
MR
17103 # Is the header compilable?
17104echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
17105echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
17106cat >conftest.$ac_ext <<_ACEOF
17107#line $LINENO "configure"
cd958eb3
MB
17108/* confdefs.h. */
17109_ACEOF
17110cat confdefs.h >>conftest.$ac_ext
17111cat >>conftest.$ac_ext <<_ACEOF
17112/* end confdefs.h. */
c0d27fcc
MR
17113$ac_includes_default
17114#include <netinet/in.h>
17115_ACEOF
17116rm -f conftest.$ac_objext
17117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17118 (eval $ac_compile) 2>&5
17119 ac_status=$?
17120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17121 (exit $ac_status); } &&
17122 { ac_try='test -s conftest.$ac_objext'
17123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17124 (eval $ac_try) 2>&5
17125 ac_status=$?
17126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17127 (exit $ac_status); }; }; then
17128 ac_header_compiler=yes
17129else
17130 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17131sed 's/^/| /' conftest.$ac_ext >&5
17132
c0d27fcc
MR
17133ac_header_compiler=no
17134fi
17135rm -f conftest.$ac_objext conftest.$ac_ext
17136echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17137echo "${ECHO_T}$ac_header_compiler" >&6
17138
17139# Is the header present?
17140echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
17141echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
17142cat >conftest.$ac_ext <<_ACEOF
17143#line $LINENO "configure"
cd958eb3
MB
17144/* confdefs.h. */
17145_ACEOF
17146cat confdefs.h >>conftest.$ac_ext
17147cat >>conftest.$ac_ext <<_ACEOF
17148/* end confdefs.h. */
ba4481b5 17149#include <netinet/in.h>
503d2be0 17150_ACEOF
c0d27fcc 17151if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
17152 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17153 ac_status=$?
6bae0ccf 17154 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17155 rm -f conftest.er1
17156 cat conftest.err >&5
c0d27fcc 17157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17158 (exit $ac_status); } >/dev/null; then
17159 if test -s conftest.err; then
17160 ac_cpp_err=$ac_c_preproc_warn_flag
17161 else
17162 ac_cpp_err=
17163 fi
17164else
17165 ac_cpp_err=yes
17166fi
17167if test -z "$ac_cpp_err"; then
c0d27fcc 17168 ac_header_preproc=yes
ba4481b5 17169else
503d2be0 17170 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17171sed 's/^/| /' conftest.$ac_ext >&5
17172
c0d27fcc 17173 ac_header_preproc=no
ba4481b5 17174fi
503d2be0 17175rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
17176echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17177echo "${ECHO_T}$ac_header_preproc" >&6
17178
17179# So? What about this header?
17180case $ac_header_compiler:$ac_header_preproc in
17181 yes:no )
17182 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
17183echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17184 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
17185echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
17186 (
17187 cat <<\_ASBOX
17188## ------------------------------------ ##
17189## Report this to bug-autoconf@gnu.org. ##
17190## ------------------------------------ ##
17191_ASBOX
17192 ) |
17193 sed "s/^/$as_me: WARNING: /" >&2
17194 ;;
c0d27fcc
MR
17195 no:yes )
17196 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
17197echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
17198 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
17199echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
17200 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
17201echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
17202 (
17203 cat <<\_ASBOX
17204## ------------------------------------ ##
17205## Report this to bug-autoconf@gnu.org. ##
17206## ------------------------------------ ##
17207_ASBOX
17208 ) |
17209 sed "s/^/$as_me: WARNING: /" >&2
17210 ;;
c0d27fcc
MR
17211esac
17212echo "$as_me:$LINENO: checking for netinet/in.h" >&5
17213echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
17214if test "${ac_cv_header_netinet_in_h+set}" = set; then
17215 echo $ECHO_N "(cached) $ECHO_C" >&6
17216else
17217 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 17218fi
c0d27fcc 17219echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 17220echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
17221
17222fi
503d2be0 17223if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
17224 :
17225else
503d2be0 17226 ok_so_far=no
ba4481b5
DL
17227fi
17228
c0d27fcc 17229
ba4481b5
DL
17230fi
17231if test $ok_so_far = yes; then
c0d27fcc
MR
17232 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
17233 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
17234echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
17235if test "${ac_cv_header_arpa_inet_h+set}" = set; then
17236 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
17237fi
17238echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
17239echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 17240else
c0d27fcc
MR
17241 # Is the header compilable?
17242echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
17243echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
17244cat >conftest.$ac_ext <<_ACEOF
17245#line $LINENO "configure"
cd958eb3
MB
17246/* confdefs.h. */
17247_ACEOF
17248cat confdefs.h >>conftest.$ac_ext
17249cat >>conftest.$ac_ext <<_ACEOF
17250/* end confdefs.h. */
c0d27fcc
MR
17251$ac_includes_default
17252#include <arpa/inet.h>
17253_ACEOF
17254rm -f conftest.$ac_objext
17255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17256 (eval $ac_compile) 2>&5
17257 ac_status=$?
17258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17259 (exit $ac_status); } &&
17260 { ac_try='test -s conftest.$ac_objext'
17261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17262 (eval $ac_try) 2>&5
17263 ac_status=$?
17264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17265 (exit $ac_status); }; }; then
17266 ac_header_compiler=yes
17267else
17268 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17269sed 's/^/| /' conftest.$ac_ext >&5
17270
c0d27fcc
MR
17271ac_header_compiler=no
17272fi
17273rm -f conftest.$ac_objext conftest.$ac_ext
17274echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17275echo "${ECHO_T}$ac_header_compiler" >&6
17276
17277# Is the header present?
17278echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
17279echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
17280cat >conftest.$ac_ext <<_ACEOF
17281#line $LINENO "configure"
cd958eb3
MB
17282/* confdefs.h. */
17283_ACEOF
17284cat confdefs.h >>conftest.$ac_ext
17285cat >>conftest.$ac_ext <<_ACEOF
17286/* end confdefs.h. */
ba4481b5 17287#include <arpa/inet.h>
503d2be0 17288_ACEOF
c0d27fcc 17289if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
17290 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17291 ac_status=$?
6bae0ccf 17292 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17293 rm -f conftest.er1
17294 cat conftest.err >&5
c0d27fcc 17295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17296 (exit $ac_status); } >/dev/null; then
17297 if test -s conftest.err; then
17298 ac_cpp_err=$ac_c_preproc_warn_flag
17299 else
17300 ac_cpp_err=
17301 fi
17302else
17303 ac_cpp_err=yes
17304fi
17305if test -z "$ac_cpp_err"; then
c0d27fcc 17306 ac_header_preproc=yes
ba4481b5 17307else
503d2be0 17308 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17309sed 's/^/| /' conftest.$ac_ext >&5
17310
c0d27fcc 17311 ac_header_preproc=no
ba4481b5 17312fi
503d2be0 17313rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
17314echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17315echo "${ECHO_T}$ac_header_preproc" >&6
17316
17317# So? What about this header?
17318case $ac_header_compiler:$ac_header_preproc in
17319 yes:no )
17320 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
17321echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17322 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
17323echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
17324 (
17325 cat <<\_ASBOX
17326## ------------------------------------ ##
17327## Report this to bug-autoconf@gnu.org. ##
17328## ------------------------------------ ##
17329_ASBOX
17330 ) |
17331 sed "s/^/$as_me: WARNING: /" >&2
17332 ;;
c0d27fcc
MR
17333 no:yes )
17334 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
17335echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
17336 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
17337echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
17338 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
17339echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
17340 (
17341 cat <<\_ASBOX
17342## ------------------------------------ ##
17343## Report this to bug-autoconf@gnu.org. ##
17344## ------------------------------------ ##
17345_ASBOX
17346 ) |
17347 sed "s/^/$as_me: WARNING: /" >&2
17348 ;;
c0d27fcc
MR
17349esac
17350echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
17351echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
17352if test "${ac_cv_header_arpa_inet_h+set}" = set; then
17353 echo $ECHO_N "(cached) $ECHO_C" >&6
17354else
17355 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 17356fi
c0d27fcc 17357echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 17358echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
17359
17360fi
503d2be0 17361if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
17362 :
17363else
503d2be0 17364 ok_so_far=no
ba4481b5
DL
17365fi
17366
c0d27fcc 17367
ba4481b5
DL
17368fi
17369if test $ok_so_far = yes; then
b936fae4 17370
c0d27fcc 17371cat >>confdefs.h <<\_ACEOF
ba4481b5 17372#define HAVE_INET_SOCKETS 1
c0d27fcc 17373_ACEOF
ba4481b5
DL
17374
17375fi
17376
17377if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 17378
c0d27fcc 17379cat >>confdefs.h <<\_ACEOF
ba4481b5 17380#define HAVE_AIX_SMT_EXP 1
c0d27fcc 17381_ACEOF
ba4481b5
DL
17382
17383fi
17384
c0d27fcc 17385echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 17386echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 17387if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 17388 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 17389echo "${ECHO_T}yes" >&6
b936fae4 17390
c0d27fcc 17391cat >>confdefs.h <<\_ACEOF
3d9fec71 17392#define HAVE_DEV_PTMX 1
c0d27fcc 17393_ACEOF
3d9fec71
DL
17394
17395else
c0d27fcc 17396 echo "$as_me:$LINENO: result: no" >&5
503d2be0 17397echo "${ECHO_T}no" >&6
3d9fec71
DL
17398fi
17399
c0d27fcc 17400echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
17401echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17402if test "${ac_cv_type_pid_t+set}" = set; then
17403 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 17404else
503d2be0 17405 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 17406#line $LINENO "configure"
cd958eb3
MB
17407/* confdefs.h. */
17408_ACEOF
17409cat confdefs.h >>conftest.$ac_ext
17410cat >>conftest.$ac_ext <<_ACEOF
17411/* end confdefs.h. */
503d2be0
AS
17412$ac_includes_default
17413int
17414main ()
17415{
17416if ((pid_t *) 0)
17417 return 0;
17418if (sizeof (pid_t))
17419 return 0;
17420 ;
17421 return 0;
17422}
17423_ACEOF
17424rm -f conftest.$ac_objext
c0d27fcc 17425if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
17426 (eval $ac_compile) 2>&5
17427 ac_status=$?
c0d27fcc 17428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17429 (exit $ac_status); } &&
17430 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 17431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17432 (eval $ac_try) 2>&5
17433 ac_status=$?
c0d27fcc 17434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17435 (exit $ac_status); }; }; then
647847ea
DL
17436 ac_cv_type_pid_t=yes
17437else
503d2be0 17438 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17439sed 's/^/| /' conftest.$ac_ext >&5
17440
503d2be0 17441ac_cv_type_pid_t=no
647847ea 17442fi
503d2be0 17443rm -f conftest.$ac_objext conftest.$ac_ext
647847ea 17444fi
c0d27fcc 17445echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
17446echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17447if test $ac_cv_type_pid_t = yes; then
17448 :
17449else
17450
c0d27fcc 17451cat >>confdefs.h <<_ACEOF
647847ea 17452#define pid_t int
c0d27fcc 17453_ACEOF
647847ea
DL
17454
17455fi
17456
c0d27fcc
MR
17457
17458
503d2be0
AS
17459for ac_header in unistd.h vfork.h
17460do
17461as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
17462if eval "test \"\${$as_ac_Header+set}\" = set"; then
17463 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
17464echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17465if eval "test \"\${$as_ac_Header+set}\" = set"; then
17466 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
17467fi
17468echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17469echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 17470else
c0d27fcc
MR
17471 # Is the header compilable?
17472echo "$as_me:$LINENO: checking $ac_header usability" >&5
17473echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17474cat >conftest.$ac_ext <<_ACEOF
17475#line $LINENO "configure"
cd958eb3
MB
17476/* confdefs.h. */
17477_ACEOF
17478cat confdefs.h >>conftest.$ac_ext
17479cat >>conftest.$ac_ext <<_ACEOF
17480/* end confdefs.h. */
c0d27fcc
MR
17481$ac_includes_default
17482#include <$ac_header>
17483_ACEOF
17484rm -f conftest.$ac_objext
17485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17486 (eval $ac_compile) 2>&5
17487 ac_status=$?
17488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17489 (exit $ac_status); } &&
17490 { ac_try='test -s conftest.$ac_objext'
17491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17492 (eval $ac_try) 2>&5
17493 ac_status=$?
17494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17495 (exit $ac_status); }; }; then
17496 ac_header_compiler=yes
17497else
17498 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17499sed 's/^/| /' conftest.$ac_ext >&5
17500
c0d27fcc
MR
17501ac_header_compiler=no
17502fi
17503rm -f conftest.$ac_objext conftest.$ac_ext
17504echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17505echo "${ECHO_T}$ac_header_compiler" >&6
17506
17507# Is the header present?
17508echo "$as_me:$LINENO: checking $ac_header presence" >&5
17509echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17510cat >conftest.$ac_ext <<_ACEOF
17511#line $LINENO "configure"
cd958eb3
MB
17512/* confdefs.h. */
17513_ACEOF
17514cat confdefs.h >>conftest.$ac_ext
17515cat >>conftest.$ac_ext <<_ACEOF
17516/* end confdefs.h. */
503d2be0
AS
17517#include <$ac_header>
17518_ACEOF
c0d27fcc 17519if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
17520 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17521 ac_status=$?
6bae0ccf 17522 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17523 rm -f conftest.er1
17524 cat conftest.err >&5
c0d27fcc 17525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17526 (exit $ac_status); } >/dev/null; then
17527 if test -s conftest.err; then
17528 ac_cpp_err=$ac_c_preproc_warn_flag
17529 else
17530 ac_cpp_err=
17531 fi
647847ea 17532else
503d2be0
AS
17533 ac_cpp_err=yes
17534fi
17535if test -z "$ac_cpp_err"; then
c0d27fcc 17536 ac_header_preproc=yes
647847ea 17537else
503d2be0 17538 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17539sed 's/^/| /' conftest.$ac_ext >&5
17540
c0d27fcc 17541 ac_header_preproc=no
647847ea 17542fi
503d2be0 17543rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
17544echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17545echo "${ECHO_T}$ac_header_preproc" >&6
17546
17547# So? What about this header?
17548case $ac_header_compiler:$ac_header_preproc in
17549 yes:no )
17550 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17551echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17552 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
17553echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17554 (
17555 cat <<\_ASBOX
17556## ------------------------------------ ##
17557## Report this to bug-autoconf@gnu.org. ##
17558## ------------------------------------ ##
17559_ASBOX
17560 ) |
17561 sed "s/^/$as_me: WARNING: /" >&2
17562 ;;
c0d27fcc
MR
17563 no:yes )
17564 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17565echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17566 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17567echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17568 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
17569echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17570 (
17571 cat <<\_ASBOX
17572## ------------------------------------ ##
17573## Report this to bug-autoconf@gnu.org. ##
17574## ------------------------------------ ##
17575_ASBOX
17576 ) |
17577 sed "s/^/$as_me: WARNING: /" >&2
17578 ;;
c0d27fcc
MR
17579esac
17580echo "$as_me:$LINENO: checking for $ac_header" >&5
17581echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17582if eval "test \"\${$as_ac_Header+set}\" = set"; then
17583 echo $ECHO_N "(cached) $ECHO_C" >&6
17584else
17585 eval "$as_ac_Header=$ac_header_preproc"
647847ea 17586fi
c0d27fcc 17587echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 17588echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
17589
17590fi
503d2be0 17591if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 17592 cat >>confdefs.h <<_ACEOF
503d2be0 17593#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 17594_ACEOF
647847ea 17595
73b77ee5 17596fi
c0d27fcc 17597
503d2be0 17598done
73b77ee5 17599
c0d27fcc
MR
17600
17601
503d2be0
AS
17602for ac_func in fork vfork
17603do
17604as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 17605echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
17606echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17607if eval "test \"\${$as_ac_var+set}\" = set"; then
17608 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 17609else
503d2be0 17610 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 17611#line $LINENO "configure"
cd958eb3
MB
17612/* confdefs.h. */
17613_ACEOF
17614cat confdefs.h >>conftest.$ac_ext
17615cat >>conftest.$ac_ext <<_ACEOF
17616/* end confdefs.h. */
fa0b693c 17617/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
17618 which can conflict with char $ac_func (); below.
17619 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17620 <limits.h> exists even on freestanding compilers. */
17621#ifdef __STDC__
17622# include <limits.h>
17623#else
17624# include <assert.h>
17625#endif
fa0b693c 17626/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17627#ifdef __cplusplus
17628extern "C"
cd958eb3 17629{
503d2be0 17630#endif
fa0b693c 17631/* We use char because int might match the return type of a gcc2
503d2be0
AS
17632 builtin and then its argument prototype would still apply. */
17633char $ac_func ();
fa0b693c
GM
17634/* The GNU C library defines this for functions which it implements
17635 to always fail with ENOSYS. Some functions are actually named
17636 something starting with __ and the normal name is an alias. */
503d2be0 17637#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
17638choke me
17639#else
cd958eb3
MB
17640char (*f) () = $ac_func;
17641#endif
17642#ifdef __cplusplus
17643}
fa0b693c
GM
17644#endif
17645
cd958eb3
MB
17646int
17647main ()
17648{
9e71690e 17649return f != $ac_func;
503d2be0
AS
17650 ;
17651 return 0;
17652}
17653_ACEOF
17654rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17655if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
17656 (eval $ac_link) 2>&5
17657 ac_status=$?
c0d27fcc 17658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17659 (exit $ac_status); } &&
17660 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17662 (eval $ac_try) 2>&5
17663 ac_status=$?
c0d27fcc 17664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17665 (exit $ac_status); }; }; then
17666 eval "$as_ac_var=yes"
17667else
17668 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17669sed 's/^/| /' conftest.$ac_ext >&5
17670
503d2be0
AS
17671eval "$as_ac_var=no"
17672fi
17673rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17674fi
c0d27fcc 17675echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17676echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17677if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17678 cat >>confdefs.h <<_ACEOF
503d2be0 17679#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17680_ACEOF
503d2be0 17681
fa0b693c 17682fi
503d2be0 17683done
fa0b693c 17684
503d2be0 17685if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 17686 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
17687echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17688if test "${ac_cv_func_fork_works+set}" = set; then
17689 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 17690else
503d2be0
AS
17691 if test "$cross_compiling" = yes; then
17692 ac_cv_func_fork_works=cross
17693else
17694 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 17695/* By Ruediger Kuhlmann. */
503d2be0
AS
17696 #include <sys/types.h>
17697 #if HAVE_UNISTD_H
17698 # include <unistd.h>
17699 #endif
17700 /* Some systems only have a dummy stub for fork() */
17701 int main ()
17702 {
17703 if (fork() < 0)
17704 exit (1);
17705 exit (0);
17706 }
17707_ACEOF
17708rm -f conftest$ac_exeext
c0d27fcc 17709if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
17710 (eval $ac_link) 2>&5
17711 ac_status=$?
c0d27fcc 17712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17713 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 17714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17715 (eval $ac_try) 2>&5
17716 ac_status=$?
c0d27fcc 17717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17718 (exit $ac_status); }; }; then
17719 ac_cv_func_fork_works=yes
17720else
17721 echo "$as_me: program exited with status $ac_status" >&5
17722echo "$as_me: failed program was:" >&5
cd958eb3
MB
17723sed 's/^/| /' conftest.$ac_ext >&5
17724
c0d27fcc 17725( exit $ac_status )
503d2be0
AS
17726ac_cv_func_fork_works=no
17727fi
6bae0ccf 17728rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
17729fi
17730fi
c0d27fcc 17731echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
17732echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17733
6bae0ccf
DL
17734else
17735 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
17736fi
17737if test "x$ac_cv_func_fork_works" = xcross; then
17738 case $host in
17739 *-*-amigaos* | *-*-msdosdjgpp*)
17740 # Override, as these systems have only a dummy fork() stub
17741 ac_cv_func_fork_works=no
17742 ;;
17743 *)
17744 ac_cv_func_fork_works=yes
17745 ;;
17746 esac
c0d27fcc
MR
17747 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
17748echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 17749fi
73b77ee5 17750ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 17751if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 17752 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
17753echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17754if test "${ac_cv_func_vfork_works+set}" = set; then
17755 echo $ECHO_N "(cached) $ECHO_C" >&6
17756else
17757 if test "$cross_compiling" = yes; then
17758 ac_cv_func_vfork_works=cross
fa0b693c 17759else
503d2be0 17760 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 17761#line $LINENO "configure"
cd958eb3
MB
17762/* confdefs.h. */
17763_ACEOF
17764cat confdefs.h >>conftest.$ac_ext
17765cat >>conftest.$ac_ext <<_ACEOF
17766/* end confdefs.h. */
73b77ee5
GM
17767/* Thanks to Paul Eggert for this test. */
17768#include <stdio.h>
cd958eb3 17769#include <stdlib.h>
fa0b693c 17770#include <sys/types.h>
73b77ee5 17771#include <sys/stat.h>
cd958eb3 17772#include <sys/wait.h>
503d2be0
AS
17773#if HAVE_UNISTD_H
17774# include <unistd.h>
73b77ee5 17775#endif
503d2be0
AS
17776#if HAVE_VFORK_H
17777# include <vfork.h>
73b77ee5
GM
17778#endif
17779/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
17780 argument registers are propagated back to the parent. The compiler
17781 is told about this with #include <vfork.h>, but some compilers
17782 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
17783 static variable whose address is put into a register that is
17784 clobbered by the vfork. */
cd958eb3 17785static void
fa0b693c 17786#ifdef __cplusplus
73b77ee5 17787sparc_address_test (int arg)
503d2be0 17788# else
73b77ee5 17789sparc_address_test (arg) int arg;
fa0b693c 17790#endif
fa0b693c 17791{
73b77ee5
GM
17792 static pid_t child;
17793 if (!child) {
17794 child = vfork ();
17795 if (child < 0) {
17796 perror ("vfork");
17797 _exit(2);
17798 }
17799 if (!child) {
17800 arg = getpid();
17801 write(-1, "", 0);
17802 _exit (arg);
17803 }
17804 }
17805}
503d2be0
AS
17806
17807int
17808main ()
17809{
73b77ee5
GM
17810 pid_t parent = getpid ();
17811 pid_t child;
fa0b693c 17812
cd958eb3 17813 sparc_address_test (0);
fa0b693c 17814
73b77ee5 17815 child = vfork ();
fa0b693c 17816
73b77ee5 17817 if (child == 0) {
503d2be0
AS
17818 /* Here is another test for sparc vfork register problems. This
17819 test uses lots of local variables, at least as many local
17820 variables as main has allocated so far including compiler
17821 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
17822 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
17823 reuse the register of parent for one of the local variables,
17824 since it will think that parent can't possibly be used any more
17825 in this routine. Assigning to the local variable will thus
17826 munge parent in the parent process. */
73b77ee5
GM
17827 pid_t
17828 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17829 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17830 /* Convince the compiler that p..p7 are live; otherwise, it might
17831 use the same hardware register for all 8 local variables. */
17832 if (p != p1 || p != p2 || p != p3 || p != p4
17833 || p != p5 || p != p6 || p != p7)
17834 _exit(1);
fa0b693c 17835
503d2be0
AS
17836 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17837 from child file descriptors. If the child closes a descriptor
17838 before it execs or exits, this munges the parent's descriptor
17839 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
17840 _exit(close(fileno(stdout)) != 0);
17841 } else {
17842 int status;
17843 struct stat st;
17844
17845 while (wait(&status) != child)
17846 ;
17847 exit(
17848 /* Was there some problem with vforking? */
17849 child < 0
17850
17851 /* Did the child fail? (This shouldn't happen.) */
17852 || status
17853
17854 /* Did the vfork/compiler bug occur? */
17855 || parent != getpid()
fa0b693c 17856
73b77ee5
GM
17857 /* Did the file descriptor bug occur? */
17858 || fstat(fileno(stdout), &st) != 0
17859 );
17860 }
17861}
503d2be0
AS
17862_ACEOF
17863rm -f conftest$ac_exeext
c0d27fcc 17864if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
17865 (eval $ac_link) 2>&5
17866 ac_status=$?
c0d27fcc 17867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17868 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 17869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17870 (eval $ac_try) 2>&5
17871 ac_status=$?
c0d27fcc 17872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17873 (exit $ac_status); }; }; then
73b77ee5 17874 ac_cv_func_vfork_works=yes
fa0b693c 17875else
503d2be0
AS
17876 echo "$as_me: program exited with status $ac_status" >&5
17877echo "$as_me: failed program was:" >&5
cd958eb3
MB
17878sed 's/^/| /' conftest.$ac_ext >&5
17879
c0d27fcc 17880( exit $ac_status )
503d2be0
AS
17881ac_cv_func_vfork_works=no
17882fi
6bae0ccf 17883rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 17884fi
fa0b693c 17885fi
c0d27fcc 17886echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 17887echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 17888
503d2be0
AS
17889fi;
17890if test "x$ac_cv_func_fork_works" = xcross; then
17891 ac_cv_func_vfork_works=ac_cv_func_vfork
c0d27fcc
MR
17892 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
17893echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
17894fi
17895
503d2be0
AS
17896if test "x$ac_cv_func_vfork_works" = xyes; then
17897
c0d27fcc 17898cat >>confdefs.h <<\_ACEOF
503d2be0 17899#define HAVE_WORKING_VFORK 1
c0d27fcc 17900_ACEOF
503d2be0
AS
17901
17902else
17903
c0d27fcc 17904cat >>confdefs.h <<\_ACEOF
73b77ee5 17905#define vfork fork
c0d27fcc 17906_ACEOF
fa0b693c
GM
17907
17908fi
503d2be0
AS
17909if test "x$ac_cv_func_fork_works" = xyes; then
17910
c0d27fcc 17911cat >>confdefs.h <<\_ACEOF
503d2be0 17912#define HAVE_WORKING_FORK 1
c0d27fcc 17913_ACEOF
fa0b693c 17914
503d2be0 17915fi
647847ea 17916
c0d27fcc 17917
6a3a24fa
JD
17918echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
17919echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
17920if test "${emacs_cv_langinfo_codeset+set}" = set; then
17921 echo $ECHO_N "(cached) $ECHO_C" >&6
17922else
17923 cat >conftest.$ac_ext <<_ACEOF
17924#line $LINENO "configure"
17925/* confdefs.h. */
17926_ACEOF
17927cat confdefs.h >>conftest.$ac_ext
17928cat >>conftest.$ac_ext <<_ACEOF
17929/* end confdefs.h. */
17930#include <langinfo.h>
17931int
17932main ()
17933{
17934char* cs = nl_langinfo(CODESET);
17935 ;
17936 return 0;
17937}
17938_ACEOF
17939rm -f conftest.$ac_objext conftest$ac_exeext
17940if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17941 (eval $ac_link) 2>&5
17942 ac_status=$?
17943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17944 (exit $ac_status); } &&
17945 { ac_try='test -s conftest$ac_exeext'
17946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17947 (eval $ac_try) 2>&5
17948 ac_status=$?
17949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17950 (exit $ac_status); }; }; then
17951 emacs_cv_langinfo_codeset=yes
17952else
17953 echo "$as_me: failed program was:" >&5
17954sed 's/^/| /' conftest.$ac_ext >&5
17955
17956emacs_cv_langinfo_codeset=no
17957fi
17958rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17959
17960fi
17961echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
17962echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
17963if test $emacs_cv_langinfo_codeset = yes; then
17964
17965cat >>confdefs.h <<\_ACEOF
17966#define HAVE_LANGINFO_CODESET 1
17967_ACEOF
17968
17969fi
17970
c0d27fcc 17971echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
17972echo $ECHO_N "checking for size_t... $ECHO_C" >&6
17973if test "${ac_cv_type_size_t+set}" = set; then
17974 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 17975else
503d2be0 17976 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 17977#line $LINENO "configure"
cd958eb3
MB
17978/* confdefs.h. */
17979_ACEOF
17980cat confdefs.h >>conftest.$ac_ext
17981cat >>conftest.$ac_ext <<_ACEOF
17982/* end confdefs.h. */
503d2be0
AS
17983$ac_includes_default
17984int
17985main ()
17986{
17987if ((size_t *) 0)
17988 return 0;
17989if (sizeof (size_t))
17990 return 0;
17991 ;
17992 return 0;
17993}
17994_ACEOF
17995rm -f conftest.$ac_objext
c0d27fcc 17996if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
17997 (eval $ac_compile) 2>&5
17998 ac_status=$?
c0d27fcc 17999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18000 (exit $ac_status); } &&
18001 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 18002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18003 (eval $ac_try) 2>&5
18004 ac_status=$?
c0d27fcc 18005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18006 (exit $ac_status); }; }; then
8730a8da
DL
18007 ac_cv_type_size_t=yes
18008else
503d2be0 18009 echo "$as_me: failed program was:" >&5
cd958eb3
MB
18010sed 's/^/| /' conftest.$ac_ext >&5
18011
503d2be0 18012ac_cv_type_size_t=no
8730a8da 18013fi
503d2be0 18014rm -f conftest.$ac_objext conftest.$ac_ext
8730a8da 18015fi
c0d27fcc 18016echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
18017echo "${ECHO_T}$ac_cv_type_size_t" >&6
18018if test $ac_cv_type_size_t = yes; then
503d2be0 18019
c0d27fcc
MR
18020cat >>confdefs.h <<_ACEOF
18021#define HAVE_SIZE_T 1
18022_ACEOF
18023
8730a8da
DL
18024
18025fi
18026
c0d27fcc 18027
973a76b1
DL
18028echo "$as_me:$LINENO: checking for mbstate_t" >&5
18029echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
18030if test "${ac_cv_type_mbstate_t+set}" = set; then
18031 echo $ECHO_N "(cached) $ECHO_C" >&6
18032else
18033 cat >conftest.$ac_ext <<_ACEOF
18034#line $LINENO "configure"
18035/* confdefs.h. */
18036_ACEOF
18037cat confdefs.h >>conftest.$ac_ext
18038cat >>conftest.$ac_ext <<_ACEOF
18039/* end confdefs.h. */
18040$ac_includes_default
18041# include <wchar.h>
18042int
18043main ()
18044{
18045mbstate_t x; return sizeof x;
18046 ;
18047 return 0;
18048}
18049_ACEOF
18050rm -f conftest.$ac_objext
18051if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18052 (eval $ac_compile) 2>&5
18053 ac_status=$?
18054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18055 (exit $ac_status); } &&
18056 { ac_try='test -s conftest.$ac_objext'
18057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18058 (eval $ac_try) 2>&5
18059 ac_status=$?
18060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18061 (exit $ac_status); }; }; then
18062 ac_cv_type_mbstate_t=yes
18063else
18064 echo "$as_me: failed program was:" >&5
18065sed 's/^/| /' conftest.$ac_ext >&5
18066
18067ac_cv_type_mbstate_t=no
18068fi
18069rm -f conftest.$ac_objext conftest.$ac_ext
18070fi
18071echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
18072echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
18073 if test $ac_cv_type_mbstate_t = yes; then
18074
18075cat >>confdefs.h <<\_ACEOF
18076#define HAVE_MBSTATE_T 1
18077_ACEOF
18078
18079 else
18080
18081cat >>confdefs.h <<\_ACEOF
18082#define mbstate_t int
18083_ACEOF
18084
18085 fi
18086
22044edf
DL
18087echo "$as_me:$LINENO: checking for C restrict keyword" >&5
18088echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
18089if test "${emacs_cv_c_restrict+set}" = set; then
18090 echo $ECHO_N "(cached) $ECHO_C" >&6
18091else
18092 cat >conftest.$ac_ext <<_ACEOF
18093#line $LINENO "configure"
cd958eb3
MB
18094/* confdefs.h. */
18095_ACEOF
18096cat confdefs.h >>conftest.$ac_ext
18097cat >>conftest.$ac_ext <<_ACEOF
18098/* end confdefs.h. */
22044edf
DL
18099void fred (int *restrict x);
18100int
18101main ()
18102{
b936fae4 18103
22044edf
DL
18104 ;
18105 return 0;
18106}
c0d27fcc 18107_ACEOF
22044edf
DL
18108rm -f conftest.$ac_objext
18109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18110 (eval $ac_compile) 2>&5
18111 ac_status=$?
18112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18113 (exit $ac_status); } &&
18114 { ac_try='test -s conftest.$ac_objext'
18115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18116 (eval $ac_try) 2>&5
18117 ac_status=$?
18118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18119 (exit $ac_status); }; }; then
18120 emacs_cv_c_restrict=yes
18121else
18122 echo "$as_me: failed program was:" >&5
cd958eb3
MB
18123sed 's/^/| /' conftest.$ac_ext >&5
18124
22044edf
DL
18125cat >conftest.$ac_ext <<_ACEOF
18126#line $LINENO "configure"
cd958eb3
MB
18127/* confdefs.h. */
18128_ACEOF
18129cat confdefs.h >>conftest.$ac_ext
18130cat >>conftest.$ac_ext <<_ACEOF
18131/* end confdefs.h. */
22044edf
DL
18132void fred (int *__restrict x);
18133int
18134main ()
18135{
c0d27fcc 18136
22044edf
DL
18137 ;
18138 return 0;
18139}
c0d27fcc 18140_ACEOF
22044edf
DL
18141rm -f conftest.$ac_objext
18142if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18143 (eval $ac_compile) 2>&5
18144 ac_status=$?
18145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18146 (exit $ac_status); } &&
18147 { ac_try='test -s conftest.$ac_objext'
18148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18149 (eval $ac_try) 2>&5
18150 ac_status=$?
18151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18152 (exit $ac_status); }; }; then
18153 emacs_cv_c_restrict=__restrict
18154else
18155 echo "$as_me: failed program was:" >&5
cd958eb3
MB
18156sed 's/^/| /' conftest.$ac_ext >&5
18157
22044edf 18158emacs_cv_c_restrict=no
ba4481b5 18159fi
22044edf 18160rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 18161fi
22044edf 18162rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 18163fi
22044edf
DL
18164echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
18165echo "${ECHO_T}$emacs_cv_c_restrict" >&6
18166case "$emacs_cv_c_restrict" in
18167 yes) emacs_restrict=restrict;;
18168 no) emacs_restrict="";;
18169 *) emacs_restrict="$emacs_cv_c_restrict";;
18170esac
18171if test "$emacs_restrict" != __restrict; then
b936fae4 18172
22044edf
DL
18173cat >>confdefs.h <<_ACEOF
18174#define __restrict $emacs_restrict
c0d27fcc 18175_ACEOF
ba4481b5
DL
18176
18177fi
ba4481b5 18178
22044edf
DL
18179echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
18180echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
18181if test "${emacs_cv_c_restrict_arr+set}" = set; then
18182 echo $ECHO_N "(cached) $ECHO_C" >&6
18183else
18184 cat >conftest.$ac_ext <<_ACEOF
18185#line $LINENO "configure"
cd958eb3
MB
18186/* confdefs.h. */
18187_ACEOF
18188cat confdefs.h >>conftest.$ac_ext
18189cat >>conftest.$ac_ext <<_ACEOF
18190/* end confdefs.h. */
22044edf
DL
18191void fred (int x[__restrict]);
18192int
18193main ()
18194{
b936fae4 18195
22044edf
DL
18196 ;
18197 return 0;
18198}
c0d27fcc 18199_ACEOF
22044edf
DL
18200rm -f conftest.$ac_objext
18201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18202 (eval $ac_compile) 2>&5
18203 ac_status=$?
18204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18205 (exit $ac_status); } &&
18206 { ac_try='test -s conftest.$ac_objext'
18207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18208 (eval $ac_try) 2>&5
18209 ac_status=$?
18210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18211 (exit $ac_status); }; }; then
18212 emacs_cv_c_restrict_arr=yes
18213else
18214 echo "$as_me: failed program was:" >&5
cd958eb3
MB
18215sed 's/^/| /' conftest.$ac_ext >&5
18216
22044edf 18217emacs_cv_c_restrict_arr=no
ba4481b5 18218fi
22044edf
DL
18219rm -f conftest.$ac_objext conftest.$ac_ext
18220fi
18221echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
18222echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
18223if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 18224
c0d27fcc 18225cat >>confdefs.h <<\_ACEOF
22044edf 18226#define __restrict_arr __restrict
c0d27fcc 18227_ACEOF
ba4481b5 18228
ba4481b5
DL
18229fi
18230
c0d27fcc 18231
c0d27fcc 18232
22044edf
DL
18233# Set up the CFLAGS for real compilation, so we can substitute it.
18234CFLAGS="$REAL_CFLAGS"
18235CPPFLAGS="$REAL_CPPFLAGS"
18236
18237#### Find out which version of Emacs this is.
18238version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
18239 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
18240if test x"${version}" = x; then
18241 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
18242echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
18243 { (exit 1); exit 1; }; }
18244fi
18245
18246### Specify what sort of things we'll be editing into Makefile and config.h.
18247### Use configuration here uncanonicalized to avoid exceeding size limits.
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
6a3a24fa 18280
22044edf
DL
18281
18282
18283cat >>confdefs.h <<_ACEOF
18284#define EMACS_CONFIGURATION "${canonical}"
18285_ACEOF
18286
18287
18288cat >>confdefs.h <<_ACEOF
18289#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
18290_ACEOF
18291
18292
18293cat >>confdefs.h <<_ACEOF
18294#define config_machfile "${machfile}"
18295_ACEOF
18296
18297
18298cat >>confdefs.h <<_ACEOF
18299#define config_opsysfile "${opsysfile}"
18300_ACEOF
18301
18302
18303cat >>confdefs.h <<_ACEOF
18304#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
18305_ACEOF
18306
18307
18308cat >>confdefs.h <<_ACEOF
18309#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
18310_ACEOF
18311
18312
18313cat >>confdefs.h <<_ACEOF
18314#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
18315_ACEOF
18316
18317
18318cat >>confdefs.h <<_ACEOF
18319#define UNEXEC_SRC ${UNEXEC_SRC}
18320_ACEOF
18321
18322
18323if test "${HAVE_X_WINDOWS}" = "yes" ; then
18324
18325cat >>confdefs.h <<\_ACEOF
18326#define HAVE_X_WINDOWS 1
18327_ACEOF
18328
18329fi
18330if test "${USE_X_TOOLKIT}" != "none" ; then
18331
18332cat >>confdefs.h <<\_ACEOF
18333#define USE_X_TOOLKIT 1
18334_ACEOF
18335
18336fi
18337if test "${HAVE_X11}" = "yes" ; then
18338
18339cat >>confdefs.h <<\_ACEOF
18340#define HAVE_X11 1
18341_ACEOF
18342
18343fi
18344if test "${HAVE_XFREE386}" = "yes" ; then
18345
18346cat >>confdefs.h <<\_ACEOF
18347#define HAVE_XFREE386 1
18348_ACEOF
18349
18350fi
18351if test "${HAVE_MENUS}" = "yes" ; then
18352
18353cat >>confdefs.h <<\_ACEOF
18354#define HAVE_MENUS 1
18355_ACEOF
18356
18357fi
18358if test "${GNU_MALLOC}" = "yes" ; then
18359
18360cat >>confdefs.h <<\_ACEOF
18361#define GNU_MALLOC 1
18362_ACEOF
18363
18364fi
18365if test "${REL_ALLOC}" = "yes" ; then
18366
18367cat >>confdefs.h <<\_ACEOF
18368#define REL_ALLOC 1
18369_ACEOF
18370
18371fi
18372
18373
18374
c0d27fcc
MR
18375
18376
ba4481b5 18377#### Report on what we decided to do.
488dd4c4
JD
18378#### Report GTK as a toolkit, even if it doesn't use Xt.
18379#### It makes printing result more understandable as using GTK sets
18380#### toolkit_scroll_bars to yes by default.
18381if test "${HAVE_GTK}" = "yes"; then
18382 USE_X_TOOLKIT=GTK
18383fi
18384
ba4481b5
DL
18385echo "
18386Configured for \`${canonical}'.
18387
18388 Where should the build process find the source code? ${srcdir}
18389 What operating system and machine description files should Emacs use?
18390 \`${opsysfile}' and \`${machfile}'
18391 What compiler should emacs be built with? ${CC} ${CFLAGS}
18392 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 18393 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 18394 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 18395 What window system should Emacs use? ${window_system}
8e967cf7 18396 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
18397
18398if test -n "${x_includes}"; then
18399echo " Where do we find X Windows header files? ${x_includes}"
18400else
18401echo " Where do we find X Windows header files? Standard dirs"
18402fi
18403if test -n "${x_libraries}"; then
18404echo " Where do we find X Windows libraries? ${x_libraries}"
18405else
18406echo " Where do we find X Windows libraries? Standard dirs"
18407fi
18408
18409echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
18410echo " Does Emacs use -lXpm? ${HAVE_XPM}"
18411echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
18412echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
18413echo " Does Emacs use -lungif? ${HAVE_GIF}"
18414echo " Does Emacs use -lpng? ${HAVE_PNG}"
18415echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
18416echo
18417
18418# Remove any trailing slashes in these variables.
18419test "${prefix}" != NONE &&
18420 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
18421test "${exec_prefix}" != NONE &&
18422 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
18423
d0e9bfd2
GM
18424## Check if the C preprocessor will convert `..' to `. .'. If so, set
18425## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
18426## from Makefile.c can correctly provide the arg `-traditional' to the
18427## C preprocessor.
18428
503d2be0 18429cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 18430#line $LINENO "configure"
cd958eb3
MB
18431/* confdefs.h. */
18432_ACEOF
18433cat confdefs.h >>conftest.$ac_ext
18434cat >>conftest.$ac_ext <<_ACEOF
18435/* end confdefs.h. */
d0e9bfd2 18436yes..yes
503d2be0 18437_ACEOF
d0e9bfd2 18438if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18439 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
18440 CPP_NEED_TRADITIONAL=no
18441else
d0e9bfd2
GM
18442 CPP_NEED_TRADITIONAL=yes
18443fi
18444rm -f conftest*
18445
c0d27fcc 18446
6bae0ccf
DL
18447 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"
18448 ac_config_commands="$ac_config_commands default"
503d2be0 18449cat >confcache <<\_ACEOF
ba4481b5
DL
18450# This file is a shell script that caches the results of configure
18451# tests run on this system so they can be shared between configure
503d2be0
AS
18452# scripts and configure runs, see configure's option --config-cache.
18453# It is not useful on other systems. If it contains results you don't
18454# want to keep, you may remove or edit it.
ba4481b5 18455#
503d2be0
AS
18456# config.status only pays attention to the cache file if you give it
18457# the --recheck option to rerun configure.
ba4481b5 18458#
6bae0ccf 18459# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
18460# loading this file, other *unset* `ac_cv_foo' will be assigned the
18461# following values.
18462
18463_ACEOF
18464
ba4481b5
DL
18465# The following way of writing the cache mishandles newlines in values,
18466# but we know of no workaround that is simple, portable, and efficient.
18467# So, don't put newlines in cache variables' values.
18468# Ultrix sh set writes to stderr and can't be redirected directly,
18469# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
18470{
18471 (set) 2>&1 |
18472 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18473 *ac_space=\ *)
18474 # `set' does not quote correctly, so add quotes (double-quote
18475 # substitution turns \\\\ into \\, and sed turns \\ into \).
18476 sed -n \
18477 "s/'/'\\\\''/g;
18478 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18479 ;;
18480 *)
18481 # `set' quotes correctly as required by POSIX, so do not add quotes.
18482 sed -n \
18483 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18484 ;;
18485 esac;
18486} |
18487 sed '
18488 t clear
18489 : clear
18490 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18491 t end
18492 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18493 : end' >>confcache
cd958eb3 18494if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 18495 if test -w $cache_file; then
503d2be0
AS
18496 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18497 cat confcache >$cache_file
ba4481b5
DL
18498 else
18499 echo "not updating unwritable cache $cache_file"
18500 fi
18501fi
18502rm -f confcache
18503
ba4481b5
DL
18504test "x$prefix" = xNONE && prefix=$ac_default_prefix
18505# Let make expand exec_prefix.
18506test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18507
503d2be0
AS
18508# VPATH may cause trouble with some makes, so we remove $(srcdir),
18509# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18510# trailing colons and then remove the whole line if VPATH becomes empty
18511# (actually we leave an empty line to preserve line numbers).
ba4481b5 18512if test "x$srcdir" = x.; then
503d2be0
AS
18513 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18514s/:*\$(srcdir):*/:/;
18515s/:*\${srcdir}:*/:/;
18516s/:*@srcdir@:*/:/;
18517s/^\([^=]*=[ ]*\):*/\1/;
18518s/:*$//;
18519s/^[^=]*=[ ]*$//;
18520}'
ba4481b5
DL
18521fi
18522
ba4481b5
DL
18523DEFS=-DHAVE_CONFIG_H
18524
6bae0ccf
DL
18525ac_libobjs=
18526ac_ltlibobjs=
18527for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18528 # 1. Remove the extension, and $U if already installed.
18529 ac_i=`echo "$ac_i" |
18530 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18531 # 2. Add them.
18532 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18533 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18534done
18535LIBOBJS=$ac_libobjs
18536
18537LTLIBOBJS=$ac_ltlibobjs
18538
18539
c0d27fcc 18540
ba4481b5 18541: ${CONFIG_STATUS=./config.status}
503d2be0
AS
18542ac_clean_files_save=$ac_clean_files
18543ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 18544{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
18545echo "$as_me: creating $CONFIG_STATUS" >&6;}
18546cat >$CONFIG_STATUS <<_ACEOF
18547#! $SHELL
c0d27fcc 18548# Generated by $as_me.
ba4481b5 18549# Run this file to recreate the current configuration.
ba4481b5 18550# Compiler output produced by configure, useful for debugging
503d2be0 18551# configure, is in config.log if it exists.
ba4481b5 18552
503d2be0 18553debug=false
cd958eb3
MB
18554ac_cs_recheck=false
18555ac_cs_silent=false
503d2be0 18556SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
18557_ACEOF
18558
18559cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
18560## --------------------- ##
18561## M4sh Initialization. ##
18562## --------------------- ##
18563
503d2be0
AS
18564# Be Bourne compatible
18565if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18566 emulate sh
18567 NULLCMD=:
6bae0ccf
DL
18568 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18569 # is contrary to our usage. Disable this feature.
18570 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
18571elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18572 set -o posix
18573fi
18574
c0d27fcc
MR
18575# Support unset when possible.
18576if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18577 as_unset=unset
18578else
18579 as_unset=false
18580fi
18581
6bae0ccf
DL
18582
18583# Work around bugs in pre-3.0 UWIN ksh.
18584$as_unset ENV MAIL MAILPATH
18585PS1='$ '
18586PS2='> '
18587PS4='+ '
18588
18589# NLS nuisances.
cd958eb3
MB
18590for as_var in \
18591 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18592 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18593 LC_TELEPHONE LC_TIME
6bae0ccf
DL
18594do
18595 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18596 eval $as_var=C; export $as_var
18597 else
18598 $as_unset $as_var
18599 fi
18600done
18601
18602# Required to use basename.
18603if expr a : '\(a\)' >/dev/null 2>&1; then
18604 as_expr=expr
18605else
18606 as_expr=false
18607fi
18608
18609if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18610 as_basename=basename
18611else
18612 as_basename=false
18613fi
c0d27fcc
MR
18614
18615
503d2be0 18616# Name of the executable.
6bae0ccf 18617as_me=`$as_basename "$0" ||
c0d27fcc
MR
18618$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18619 X"$0" : 'X\(//\)$' \| \
18620 X"$0" : 'X\(/\)$' \| \
18621 . : '\(.\)' 2>/dev/null ||
18622echo X/"$0" |
18623 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18624 /^X\/\(\/\/\)$/{ s//\1/; q; }
18625 /^X\/\(\/\).*/{ s//\1/; q; }
18626 s/.*/./; q'`
18627
6bae0ccf 18628
c0d27fcc
MR
18629# PATH needs CR, and LINENO needs CR and PATH.
18630# Avoid depending upon Character Ranges.
18631as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18632as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18633as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18634as_cr_digits='0123456789'
18635as_cr_alnum=$as_cr_Letters$as_cr_digits
18636
18637# The user is always right.
18638if test "${PATH_SEPARATOR+set}" != set; then
cd958eb3
MB
18639 echo "#! /bin/sh" >conf$$.sh
18640 echo "exit 0" >>conf$$.sh
18641 chmod +x conf$$.sh
18642 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
18643 PATH_SEPARATOR=';'
18644 else
18645 PATH_SEPARATOR=:
18646 fi
cd958eb3 18647 rm -f conf$$.sh
c0d27fcc
MR
18648fi
18649
18650
18651 as_lineno_1=$LINENO
18652 as_lineno_2=$LINENO
18653 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18654 test "x$as_lineno_1" != "x$as_lineno_2" &&
18655 test "x$as_lineno_3" = "x$as_lineno_2" || {
18656 # Find who we are. Look in the path if we contain no path at all
18657 # relative or not.
18658 case $0 in
18659 *[\\/]* ) as_myself=$0 ;;
18660 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18661for as_dir in $PATH
18662do
18663 IFS=$as_save_IFS
18664 test -z "$as_dir" && as_dir=.
18665 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18666done
18667
18668 ;;
18669 esac
18670 # We did not find ourselves, most probably we were run as `sh COMMAND'
18671 # in which case we are not to be found in the path.
18672 if test "x$as_myself" = x; then
18673 as_myself=$0
18674 fi
18675 if test ! -f "$as_myself"; then
18676 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18677echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18678 { (exit 1); exit 1; }; }
18679 fi
18680 case $CONFIG_SHELL in
18681 '')
18682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18683for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18684do
18685 IFS=$as_save_IFS
18686 test -z "$as_dir" && as_dir=.
18687 for as_base in sh bash ksh sh5; do
18688 case $as_dir in
18689 /*)
18690 if ("$as_dir/$as_base" -c '
18691 as_lineno_1=$LINENO
18692 as_lineno_2=$LINENO
18693 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18694 test "x$as_lineno_1" != "x$as_lineno_2" &&
18695 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
18696 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18697 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
18698 CONFIG_SHELL=$as_dir/$as_base
18699 export CONFIG_SHELL
18700 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18701 fi;;
18702 esac
18703 done
18704done
18705;;
18706 esac
18707
18708 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18709 # uniformly replaced by the line number. The first 'sed' inserts a
18710 # line-number line before each line; the second 'sed' does the real
18711 # work. The second script uses 'N' to pair each line-number line
18712 # with the numbered line, and appends trailing '-' during
18713 # substitution so that $LINENO is not a special case at line end.
18714 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18715 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18716 sed '=' <$as_myself |
18717 sed '
18718 N
18719 s,$,-,
18720 : loop
18721 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18722 t loop
18723 s,-$,,
18724 s,^['$as_cr_digits']*\n,,
18725 ' >$as_me.lineno &&
18726 chmod +x $as_me.lineno ||
18727 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18728echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18729 { (exit 1); exit 1; }; }
18730
18731 # Don't try to exec as it changes $[0], causing all sort of problems
18732 # (the dirname of $[0] is not the place where we might find the
18733 # original and so on. Autoconf is especially sensible to this).
18734 . ./$as_me.lineno
18735 # Exit status is that of the last command.
18736 exit
18737}
18738
18739
18740case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18741 *c*,-n*) ECHO_N= ECHO_C='
18742' ECHO_T=' ' ;;
18743 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18744 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18745esac
503d2be0
AS
18746
18747if expr a : '\(a\)' >/dev/null 2>&1; then
18748 as_expr=expr
18749else
18750 as_expr=false
18751fi
18752
18753rm -f conf$$ conf$$.exe conf$$.file
18754echo >conf$$.file
18755if ln -s conf$$.file conf$$ 2>/dev/null; then
18756 # We could just check for DJGPP; but this test a) works b) is more generic
18757 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18758 if test -f conf$$.exe; then
18759 # Don't use ln at all; we don't have any links
18760 as_ln_s='cp -p'
18761 else
18762 as_ln_s='ln -s'
18763 fi
18764elif ln conf$$.file conf$$ 2>/dev/null; then
18765 as_ln_s=ln
18766else
18767 as_ln_s='cp -p'
18768fi
18769rm -f conf$$ conf$$.exe conf$$.file
18770
6bae0ccf
DL
18771if mkdir -p . 2>/dev/null; then
18772 as_mkdir_p=:
18773else
18774 as_mkdir_p=false
18775fi
18776
503d2be0
AS
18777as_executable_p="test -f"
18778
c0d27fcc
MR
18779# Sed expression to map a string onto a valid CPP name.
18780as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18781
18782# Sed expression to map a string onto a valid variable name.
18783as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
503d2be0 18784
503d2be0
AS
18785
18786# IFS
18787# We need space, tab and new line, in precisely that order.
18788as_nl='
18789'
18790IFS=" $as_nl"
18791
18792# CDPATH.
6bae0ccf 18793$as_unset CDPATH
503d2be0
AS
18794
18795exec 6>&1
18796
c0d27fcc
MR
18797# Open the log real soon, to keep \$[0] and so on meaningful, and to
18798# report actual input values of CONFIG_FILES etc. instead of their
18799# values after options handling. Logging --version etc. is OK.
18800exec 5>>config.log
18801{
18802 echo
18803 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18804## Running $as_me. ##
18805_ASBOX
18806} >&5
18807cat >&5 <<_CSEOF
18808
18809This file was extended by $as_me, which was
9e71690e 18810generated by GNU Autoconf 2.57. Invocation command line was
c0d27fcc
MR
18811
18812 CONFIG_FILES = $CONFIG_FILES
18813 CONFIG_HEADERS = $CONFIG_HEADERS
18814 CONFIG_LINKS = $CONFIG_LINKS
18815 CONFIG_COMMANDS = $CONFIG_COMMANDS
18816 $ $0 $@
18817
18818_CSEOF
18819echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18820echo >&5
503d2be0
AS
18821_ACEOF
18822
18823# Files that config.status was made for.
18824if test -n "$ac_config_files"; then
18825 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18826fi
18827
18828if test -n "$ac_config_headers"; then
18829 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18830fi
18831
18832if test -n "$ac_config_links"; then
18833 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18834fi
18835
18836if test -n "$ac_config_commands"; then
18837 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18838fi
18839
c0d27fcc 18840cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18841
18842ac_cs_usage="\
18843\`$as_me' instantiates files from templates according to the
18844current configuration.
18845
18846Usage: $0 [OPTIONS] [FILE]...
18847
18848 -h, --help print this help, then exit
18849 -V, --version print version number, then exit
cd958eb3 18850 -q, --quiet do not print progress messages
503d2be0
AS
18851 -d, --debug don't remove temporary files
18852 --recheck update $as_me by reconfiguring in the same conditions
18853 --file=FILE[:TEMPLATE]
18854 instantiate the configuration file FILE
18855 --header=FILE[:TEMPLATE]
18856 instantiate the configuration header FILE
18857
18858Configuration files:
18859$config_files
18860
18861Configuration headers:
18862$config_headers
18863
18864Configuration commands:
18865$config_commands
18866
18867Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 18868_ACEOF
503d2be0 18869
c0d27fcc 18870cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
18871ac_cs_version="\\
18872config.status
9e71690e 18873configured by $0, generated by GNU Autoconf 2.57,
503d2be0
AS
18874 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18875
18876Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18877Free Software Foundation, Inc.
18878This config.status script is free software; the Free Software Foundation
18879gives unlimited permission to copy, distribute and modify it."
18880srcdir=$srcdir
18881INSTALL="$INSTALL"
c0d27fcc 18882_ACEOF
503d2be0 18883
c0d27fcc 18884cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18885# If no file are specified by the user, then we need to provide default
18886# value. By we need to know if files were specified by the user.
18887ac_need_defaults=:
18888while test $# != 0
ba4481b5 18889do
503d2be0
AS
18890 case $1 in
18891 --*=*)
18892 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18893 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
18894 ac_shift=:
18895 ;;
18896 -*)
18897 ac_option=$1
18898 ac_optarg=$2
18899 ac_shift=shift
503d2be0 18900 ;;
503d2be0
AS
18901 *) # This is not an option, so the user has probably given explicit
18902 # arguments.
6bae0ccf 18903 ac_option=$1
503d2be0
AS
18904 ac_need_defaults=false;;
18905 esac
18906
6bae0ccf 18907 case $ac_option in
503d2be0 18908 # Handling of the options.
c0d27fcc 18909_ACEOF
c0d27fcc 18910cat >>$CONFIG_STATUS <<\_ACEOF
cd958eb3
MB
18911 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18912 ac_cs_recheck=: ;;
503d2be0
AS
18913 --version | --vers* | -V )
18914 echo "$ac_cs_version"; exit 0 ;;
18915 --he | --h)
18916 # Conflict between --help and --header
c0d27fcc 18917 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
18918Try \`$0 --help' for more information." >&5
18919echo "$as_me: error: ambiguous option: $1
18920Try \`$0 --help' for more information." >&2;}
18921 { (exit 1); exit 1; }; };;
18922 --help | --hel | -h )
18923 echo "$ac_cs_usage"; exit 0 ;;
18924 --debug | --d* | -d )
18925 debug=: ;;
18926 --file | --fil | --fi | --f )
6bae0ccf
DL
18927 $ac_shift
18928 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
18929 ac_need_defaults=false;;
18930 --header | --heade | --head | --hea )
6bae0ccf
DL
18931 $ac_shift
18932 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 18933 ac_need_defaults=false;;
cd958eb3
MB
18934 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18935 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18936 ac_cs_silent=: ;;
503d2be0
AS
18937
18938 # This is an error.
c0d27fcc 18939 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
18940Try \`$0 --help' for more information." >&5
18941echo "$as_me: error: unrecognized option: $1
18942Try \`$0 --help' for more information." >&2;}
18943 { (exit 1); exit 1; }; } ;;
18944
18945 *) ac_config_targets="$ac_config_targets $1" ;;
18946
ba4481b5 18947 esac
503d2be0 18948 shift
ba4481b5
DL
18949done
18950
cd958eb3
MB
18951ac_configure_extra_args=
18952
18953if $ac_cs_silent; then
18954 exec 6>/dev/null
18955 ac_configure_extra_args="$ac_configure_extra_args --silent"
18956fi
18957
18958_ACEOF
18959cat >>$CONFIG_STATUS <<_ACEOF
18960if \$ac_cs_recheck; then
18961 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18962 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18963fi
18964
503d2be0 18965_ACEOF
ba4481b5 18966
c0d27fcc 18967cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
18968#
18969# INIT-COMMANDS section.
18970#
ba4481b5 18971
503d2be0
AS
18972GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
18973
c0d27fcc
MR
18974_ACEOF
18975
503d2be0 18976
c0d27fcc
MR
18977
18978cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18979for ac_config_target in $ac_config_targets
18980do
18981 case "$ac_config_target" in
18982 # Handling of arguments.
18983 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18984 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
18985 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
18986 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
18987 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
18988 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
18989 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 18990 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 18991 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
18992 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
18993 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18994 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 18995 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
18996echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18997 { (exit 1); exit 1; }; };;
18998 esac
ba4481b5 18999done
503d2be0
AS
19000
19001# If the user did not use the arguments to specify the items to instantiate,
19002# then the envvar interface is used. Set only those that are not.
19003# We use the long form for the default assignment because of an extremely
19004# bizarre bug on SunOS 4.1.3.
19005if $ac_need_defaults; then
19006 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19007 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19008 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 19009fi
503d2be0 19010
cd958eb3
MB
19011# Have a temporary directory for convenience. Make it in the build tree
19012# simply because there is no reason to put it here, and in addition,
19013# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
19014# Create a temporary directory, and hook for its removal unless debugging.
19015$debug ||
19016{
19017 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19018 trap '{ (exit 1); exit 1; }' 1 2 13 15
19019}
19020
19021# Create a (secure) tmp directory for tmp files.
cd958eb3 19022
503d2be0 19023{
cd958eb3 19024 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
19025 test -n "$tmp" && test -d "$tmp"
19026} ||
19027{
cd958eb3 19028 tmp=./confstat$$-$RANDOM
503d2be0
AS
19029 (umask 077 && mkdir $tmp)
19030} ||
19031{
cd958eb3 19032 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
19033 { (exit 1); exit 1; }
19034}
19035
c0d27fcc 19036_ACEOF
503d2be0 19037
c0d27fcc 19038cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
19039
19040#
19041# CONFIG_FILES section.
19042#
19043
19044# No need to generate the scripts if there are no CONFIG_FILES.
19045# This happens for instance when ./config.status config.h
19046if test -n "\$CONFIG_FILES"; then
19047 # Protect against being on the right side of a sed subst in config.status.
19048 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19049 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19050s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
19051s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19052s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19053s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19054s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19055s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19056s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
19057s,@exec_prefix@,$exec_prefix,;t t
19058s,@prefix@,$prefix,;t t
19059s,@program_transform_name@,$program_transform_name,;t t
19060s,@bindir@,$bindir,;t t
19061s,@sbindir@,$sbindir,;t t
19062s,@libexecdir@,$libexecdir,;t t
19063s,@datadir@,$datadir,;t t
19064s,@sysconfdir@,$sysconfdir,;t t
19065s,@sharedstatedir@,$sharedstatedir,;t t
19066s,@localstatedir@,$localstatedir,;t t
19067s,@libdir@,$libdir,;t t
19068s,@includedir@,$includedir,;t t
19069s,@oldincludedir@,$oldincludedir,;t t
19070s,@infodir@,$infodir,;t t
19071s,@mandir@,$mandir,;t t
503d2be0
AS
19072s,@build_alias@,$build_alias,;t t
19073s,@host_alias@,$host_alias,;t t
19074s,@target_alias@,$target_alias,;t t
c0d27fcc 19075s,@DEFS@,$DEFS,;t t
503d2be0
AS
19076s,@ECHO_C@,$ECHO_C,;t t
19077s,@ECHO_N@,$ECHO_N,;t t
19078s,@ECHO_T@,$ECHO_T,;t t
503d2be0
AS
19079s,@LIBS@,$LIBS,;t t
19080s,@build@,$build,;t t
19081s,@build_cpu@,$build_cpu,;t t
19082s,@build_vendor@,$build_vendor,;t t
19083s,@build_os@,$build_os,;t t
19084s,@host@,$host,;t t
19085s,@host_cpu@,$host_cpu,;t t
19086s,@host_vendor@,$host_vendor,;t t
19087s,@host_os@,$host_os,;t t
19088s,@CC@,$CC,;t t
19089s,@CFLAGS@,$CFLAGS,;t t
19090s,@LDFLAGS@,$LDFLAGS,;t t
19091s,@CPPFLAGS@,$CPPFLAGS,;t t
19092s,@ac_ct_CC@,$ac_ct_CC,;t t
19093s,@EXEEXT@,$EXEEXT,;t t
19094s,@OBJEXT@,$OBJEXT,;t t
19095s,@LN_S@,$LN_S,;t t
19096s,@CPP@,$CPP,;t t
19097s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19098s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19099s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
19100s,@RANLIB@,$RANLIB,;t t
19101s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 19102s,@INSTALL_INFO@,$INSTALL_INFO,;t t
6bae0ccf 19103s,@EGREP@,$EGREP,;t t
503d2be0
AS
19104s,@LIBSOUND@,$LIBSOUND,;t t
19105s,@SET_MAKE@,$SET_MAKE,;t t
488dd4c4
JD
19106s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19107s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
19108s,@GTK_LIBS@,$GTK_LIBS,;t t
503d2be0
AS
19109s,@ALLOCA@,$ALLOCA,;t t
19110s,@liblockfile@,$liblockfile,;t t
19111s,@LIBOBJS@,$LIBOBJS,;t t
19112s,@NEED_SETGID@,$NEED_SETGID,;t t
19113s,@KMEM_GROUP@,$KMEM_GROUP,;t t
19114s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
19115s,@version@,$version,;t t
19116s,@configuration@,$configuration,;t t
19117s,@canonical@,$canonical,;t t
19118s,@srcdir@,$srcdir,;t t
19119s,@lispdir@,$lispdir,;t t
19120s,@locallisppath@,$locallisppath,;t t
19121s,@lisppath@,$lisppath,;t t
19122s,@x_default_search_path@,$x_default_search_path,;t t
19123s,@etcdir@,$etcdir,;t t
19124s,@archlibdir@,$archlibdir,;t t
19125s,@docdir@,$docdir,;t t
19126s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
19127s,@gamedir@,$gamedir,;t t
19128s,@gameuser@,$gameuser,;t t
503d2be0
AS
19129s,@c_switch_system@,$c_switch_system,;t t
19130s,@c_switch_machine@,$c_switch_machine,;t t
19131s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
19132s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
19133s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
19134s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
19135s,@machfile@,$machfile,;t t
19136s,@opsysfile@,$opsysfile,;t t
6a3a24fa 19137s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 19138s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
19139CEOF
19140
c0d27fcc 19141_ACEOF
ba4481b5 19142
c0d27fcc 19143 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
19144 # Split the substitutions into bite-sized pieces for seds with
19145 # small command number limits, like on Digital OSF/1 and HP-UX.
19146 ac_max_sed_lines=48
19147 ac_sed_frag=1 # Number of current file.
19148 ac_beg=1 # First line for current file.
19149 ac_end=$ac_max_sed_lines # Line after last line for current file.
19150 ac_more_lines=:
19151 ac_sed_cmds=
19152 while $ac_more_lines; do
19153 if test $ac_beg -gt 1; then
19154 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19155 else
19156 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19157 fi
19158 if test ! -s $tmp/subs.frag; then
19159 ac_more_lines=false
19160 else
19161 # The purpose of the label and of the branching condition is to
19162 # speed up the sed processing (if there are no `@' at all, there
19163 # is no need to browse any of the substitutions).
19164 # These are the two extra sed commands mentioned above.
19165 (echo ':t
19166 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19167 if test -z "$ac_sed_cmds"; then
19168 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19169 else
19170 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19171 fi
19172 ac_sed_frag=`expr $ac_sed_frag + 1`
19173 ac_beg=$ac_end
19174 ac_end=`expr $ac_end + $ac_max_sed_lines`
19175 fi
19176 done
19177 if test -z "$ac_sed_cmds"; then
19178 ac_sed_cmds=cat
19179 fi
19180fi # test -n "$CONFIG_FILES"
ba4481b5 19181
c0d27fcc
MR
19182_ACEOF
19183cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 19184for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 19185 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
19186 case $ac_file in
19187 - | *:- | *:-:* ) # input from stdin
19188 cat >$tmp/stdin
19189 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19190 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19191 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19192 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19193 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
19194 esac
19195
503d2be0 19196 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
19197 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19198$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
503d2be0
AS
19199 X"$ac_file" : 'X\(//\)[^/]' \| \
19200 X"$ac_file" : 'X\(//\)$' \| \
19201 X"$ac_file" : 'X\(/\)' \| \
19202 . : '\(.\)' 2>/dev/null ||
19203echo X"$ac_file" |
19204 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19205 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19206 /^X\(\/\/\)$/{ s//\1/; q; }
19207 /^X\(\/\).*/{ s//\1/; q; }
19208 s/.*/./; q'`
6bae0ccf
DL
19209 { if $as_mkdir_p; then
19210 mkdir -p "$ac_dir"
19211 else
19212 as_dir="$ac_dir"
19213 as_dirs=
19214 while test ! -d "$as_dir"; do
19215 as_dirs="$as_dir $as_dirs"
19216 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19217$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19218 X"$as_dir" : 'X\(//\)[^/]' \| \
19219 X"$as_dir" : 'X\(//\)$' \| \
19220 X"$as_dir" : 'X\(/\)' \| \
19221 . : '\(.\)' 2>/dev/null ||
19222echo X"$as_dir" |
19223 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19224 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19225 /^X\(\/\/\)$/{ s//\1/; q; }
19226 /^X\(\/\).*/{ s//\1/; q; }
19227 s/.*/./; q'`
19228 done
19229 test ! -n "$as_dirs" || mkdir $as_dirs
19230 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19231echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19232 { (exit 1); exit 1; }; }; }
503d2be0 19233
c0d27fcc 19234 ac_builddir=.
98418dba 19235
c0d27fcc
MR
19236if test "$ac_dir" != .; then
19237 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19238 # A "../" for each directory in $ac_dir_suffix.
19239 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19240else
19241 ac_dir_suffix= ac_top_builddir=
19242fi
19243
19244case $srcdir in
19245 .) # No --srcdir option. We are building in place.
19246 ac_srcdir=.
19247 if test -z "$ac_top_builddir"; then
19248 ac_top_srcdir=.
19249 else
19250 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19251 fi ;;
19252 [\\/]* | ?:[\\/]* ) # Absolute path.
19253 ac_srcdir=$srcdir$ac_dir_suffix;
19254 ac_top_srcdir=$srcdir ;;
ba4481b5 19255 *) # Relative path.
c0d27fcc
MR
19256 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19257 ac_top_srcdir=$ac_top_builddir$srcdir ;;
19258esac
19259# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19260# absolute.
19261ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6bae0ccf 19262ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
c0d27fcc
MR
19263ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19264ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19265
ba4481b5 19266
503d2be0
AS
19267 case $INSTALL in
19268 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 19269 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
19270 esac
19271
503d2be0 19272 if test x"$ac_file" != x-; then
c0d27fcc 19273 { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
19274echo "$as_me: creating $ac_file" >&6;}
19275 rm -f "$ac_file"
19276 fi
19277 # Let's still pretend it is `configure' which instantiates (i.e., don't
19278 # use $as_me), people would be surprised to read:
c0d27fcc
MR
19279 # /* config.h. Generated by config.status. */
19280 if test x"$ac_file" = x-; then
19281 configure_input=
19282 else
19283 configure_input="$ac_file. "
19284 fi
19285 configure_input=$configure_input"Generated from `echo $ac_file_in |
19286 sed 's,.*/,,'` by configure."
503d2be0
AS
19287
19288 # First look for the input files in the build tree, otherwise in the
19289 # src tree.
19290 ac_file_inputs=`IFS=:
19291 for f in $ac_file_in; do
19292 case $f in
19293 -) echo $tmp/stdin ;;
19294 [\\/$]*)
19295 # Absolute (can't be DOS-style, as IFS=:)
c0d27fcc 19296 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
19297echo "$as_me: error: cannot find input file: $f" >&2;}
19298 { (exit 1); exit 1; }; }
19299 echo $f;;
19300 *) # Relative
19301 if test -f "$f"; then
19302 # Build tree
19303 echo $f
19304 elif test -f "$srcdir/$f"; then
19305 # Source tree
19306 echo $srcdir/$f
19307 else
19308 # /dev/null tree
c0d27fcc 19309 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
19310echo "$as_me: error: cannot find input file: $f" >&2;}
19311 { (exit 1); exit 1; }; }
19312 fi;;
19313 esac
19314 done` || { (exit 1); exit 1; }
c0d27fcc
MR
19315_ACEOF
19316cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
19317 sed "$ac_vpsub
19318$extrasub
c0d27fcc
MR
19319_ACEOF
19320cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
19321:t
19322/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19323s,@configure_input@,$configure_input,;t t
19324s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 19325s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 19326s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
19327s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19328s,@builddir@,$ac_builddir,;t t
19329s,@abs_builddir@,$ac_abs_builddir,;t t
19330s,@top_builddir@,$ac_top_builddir,;t t
19331s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
19332s,@INSTALL@,$ac_INSTALL,;t t
19333" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19334 rm -f $tmp/stdin
19335 if test x"$ac_file" != x-; then
19336 mv $tmp/out $ac_file
19337 else
19338 cat $tmp/out
19339 rm -f $tmp/out
19340 fi
19341
19342done
c0d27fcc
MR
19343_ACEOF
19344cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 19345
503d2be0
AS
19346#
19347# CONFIG_HEADER section.
19348#
ba4481b5
DL
19349
19350# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19351# NAME is the cpp macro being defined and VALUE is the value it is being given.
19352#
19353# ac_d sets the value in "#define NAME VALUE" lines.
503d2be0
AS
19354ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19355ac_dB='[ ].*$,\1#\2'
19356ac_dC=' '
19357ac_dD=',;t'
19358# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19359ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19360ac_uB='$,\1#\2define\3'
ba4481b5 19361ac_uC=' '
503d2be0 19362ac_uD=',;t'
ba4481b5 19363
503d2be0 19364for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 19365 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
19366 case $ac_file in
19367 - | *:- | *:-:* ) # input from stdin
19368 cat >$tmp/stdin
19369 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19370 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19371 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19372 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19373 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
19374 esac
19375
c0d27fcc 19376 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
19377echo "$as_me: creating $ac_file" >&6;}
19378
19379 # First look for the input files in the build tree, otherwise in the
19380 # src tree.
19381 ac_file_inputs=`IFS=:
19382 for f in $ac_file_in; do
19383 case $f in
19384 -) echo $tmp/stdin ;;
19385 [\\/$]*)
19386 # Absolute (can't be DOS-style, as IFS=:)
c0d27fcc 19387 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
19388echo "$as_me: error: cannot find input file: $f" >&2;}
19389 { (exit 1); exit 1; }; }
19390 echo $f;;
19391 *) # Relative
19392 if test -f "$f"; then
19393 # Build tree
19394 echo $f
19395 elif test -f "$srcdir/$f"; then
19396 # Source tree
19397 echo $srcdir/$f
19398 else
19399 # /dev/null tree
c0d27fcc 19400 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
19401echo "$as_me: error: cannot find input file: $f" >&2;}
19402 { (exit 1); exit 1; }; }
19403 fi;;
19404 esac
19405 done` || { (exit 1); exit 1; }
19406 # Remove the trailing spaces.
19407 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
19408
c0d27fcc 19409_ACEOF
503d2be0
AS
19410
19411# Transform confdefs.h into two sed scripts, `conftest.defines' and
19412# `conftest.undefs', that substitutes the proper values into
19413# config.h.in to produce config.h. The first handles `#define'
19414# templates, and the second `#undef' templates.
19415# And first: Protect against being on the right side of a sed subst in
19416# config.status. Protect against being in an unquoted here document
19417# in config.status.
19418rm -f conftest.defines conftest.undefs
19419# Using a here document instead of a string reduces the quoting nightmare.
19420# Putting comments in sed scripts is not portable.
19421#
19422# `end' is used to avoid that the second main sed command (meant for
19423# 0-ary CPP macros) applies to n-ary macro definitions.
19424# See the Autoconf documentation for `clear'.
c0d27fcc 19425cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
19426s/[\\&,]/\\&/g
19427s,[\\$`],\\&,g
19428t clear
19429: clear
c0d27fcc 19430s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0
AS
19431t end
19432s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19433: end
c0d27fcc 19434_ACEOF
503d2be0
AS
19435# If some macros were called several times there might be several times
19436# the same #defines, which is useless. Nevertheless, we may not want to
19437# sort them, since we want the *last* AC-DEFINE to be honored.
19438uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19439sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19440rm -f confdef2sed.sed
ba4481b5
DL
19441
19442# This sed command replaces #undef with comments. This is necessary, for
19443# example, in the case of _POSIX_SOURCE, which is predefined and required
19444# on some systems where configure will not decide to define it.
c0d27fcc 19445cat >>conftest.undefs <<\_ACEOF
503d2be0 19446s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 19447_ACEOF
ba4481b5 19448
503d2be0
AS
19449# Break up conftest.defines because some shells have a limit on the size
19450# of here documents, and old seds have small limits too (100 cmds).
19451echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
6bae0ccf 19452echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
19453echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19454echo ' :' >>$CONFIG_STATUS
19455rm -f conftest.tail
19456while grep . conftest.defines >/dev/null
19457do
19458 # Write a limited-size here document to $tmp/defines.sed.
19459 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19460 # Speed up: don't consider the non `#define' lines.
19461 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19462 # Work around the forget-to-reset-the-flag bug.
19463 echo 't clr' >>$CONFIG_STATUS
19464 echo ': clr' >>$CONFIG_STATUS
19465 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
19466 echo 'CEOF
19467 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19468 rm -f $tmp/in
19469 mv $tmp/out $tmp/in
19470' >>$CONFIG_STATUS
19471 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19472 rm -f conftest.defines
19473 mv conftest.tail conftest.defines
19474done
19475rm -f conftest.defines
6bae0ccf 19476echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 19477echo >>$CONFIG_STATUS
ba4481b5 19478
503d2be0
AS
19479# Break up conftest.undefs because some shells have a limit on the size
19480# of here documents, and old seds have small limits too (100 cmds).
19481echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 19482rm -f conftest.tail
503d2be0 19483while grep . conftest.undefs >/dev/null
ba4481b5 19484do
503d2be0
AS
19485 # Write a limited-size here document to $tmp/undefs.sed.
19486 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19487 # Speed up: don't consider the non `#undef'
19488 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19489 # Work around the forget-to-reset-the-flag bug.
19490 echo 't clr' >>$CONFIG_STATUS
19491 echo ': clr' >>$CONFIG_STATUS
19492 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 19493 echo 'CEOF
503d2be0
AS
19494 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19495 rm -f $tmp/in
19496 mv $tmp/out $tmp/in
19497' >>$CONFIG_STATUS
19498 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19499 rm -f conftest.undefs
19500 mv conftest.tail conftest.undefs
ba4481b5 19501done
503d2be0
AS
19502rm -f conftest.undefs
19503
c0d27fcc 19504cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
19505 # Let's still pretend it is `configure' which instantiates (i.e., don't
19506 # use $as_me), people would be surprised to read:
c0d27fcc 19507 # /* config.h. Generated by config.status. */
503d2be0 19508 if test x"$ac_file" = x-; then
c0d27fcc 19509 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 19510 else
c0d27fcc 19511 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
19512 fi
19513 cat $tmp/in >>$tmp/config.h
19514 rm -f $tmp/in
19515 if test x"$ac_file" != x-; then
cd958eb3 19516 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 19517 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
19518echo "$as_me: $ac_file is unchanged" >&6;}
19519 else
c0d27fcc
MR
19520 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19521$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
503d2be0
AS
19522 X"$ac_file" : 'X\(//\)[^/]' \| \
19523 X"$ac_file" : 'X\(//\)$' \| \
19524 X"$ac_file" : 'X\(/\)' \| \
19525 . : '\(.\)' 2>/dev/null ||
19526echo X"$ac_file" |
19527 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19528 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19529 /^X\(\/\/\)$/{ s//\1/; q; }
19530 /^X\(\/\).*/{ s//\1/; q; }
19531 s/.*/./; q'`
6bae0ccf
DL
19532 { if $as_mkdir_p; then
19533 mkdir -p "$ac_dir"
19534 else
19535 as_dir="$ac_dir"
19536 as_dirs=
19537 while test ! -d "$as_dir"; do
19538 as_dirs="$as_dir $as_dirs"
19539 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19540$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19541 X"$as_dir" : 'X\(//\)[^/]' \| \
19542 X"$as_dir" : 'X\(//\)$' \| \
19543 X"$as_dir" : 'X\(/\)' \| \
19544 . : '\(.\)' 2>/dev/null ||
19545echo X"$as_dir" |
19546 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19547 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19548 /^X\(\/\/\)$/{ s//\1/; q; }
19549 /^X\(\/\).*/{ s//\1/; q; }
19550 s/.*/./; q'`
19551 done
19552 test ! -n "$as_dirs" || mkdir $as_dirs
19553 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19554echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19555 { (exit 1); exit 1; }; }; }
503d2be0 19556
503d2be0
AS
19557 rm -f $ac_file
19558 mv $tmp/config.h $ac_file
ba4481b5 19559 fi
503d2be0
AS
19560 else
19561 cat $tmp/config.h
19562 rm -f $tmp/config.h
ba4481b5 19563 fi
503d2be0 19564done
c0d27fcc
MR
19565_ACEOF
19566cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
19567
19568#
19569# CONFIG_COMMANDS section.
19570#
19571for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19572 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19573 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
19574 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
19575$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19576 X"$ac_dest" : 'X\(//\)[^/]' \| \
19577 X"$ac_dest" : 'X\(//\)$' \| \
19578 X"$ac_dest" : 'X\(/\)' \| \
19579 . : '\(.\)' 2>/dev/null ||
19580echo X"$ac_dest" |
19581 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19582 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19583 /^X\(\/\/\)$/{ s//\1/; q; }
19584 /^X\(\/\).*/{ s//\1/; q; }
19585 s/.*/./; q'`
19586 ac_builddir=.
19587
19588if test "$ac_dir" != .; then
19589 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19590 # A "../" for each directory in $ac_dir_suffix.
19591 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19592else
19593 ac_dir_suffix= ac_top_builddir=
19594fi
19595
19596case $srcdir in
19597 .) # No --srcdir option. We are building in place.
19598 ac_srcdir=.
19599 if test -z "$ac_top_builddir"; then
19600 ac_top_srcdir=.
19601 else
19602 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19603 fi ;;
19604 [\\/]* | ?:[\\/]* ) # Absolute path.
19605 ac_srcdir=$srcdir$ac_dir_suffix;
19606 ac_top_srcdir=$srcdir ;;
19607 *) # Relative path.
19608 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19609 ac_top_srcdir=$ac_top_builddir$srcdir ;;
19610esac
19611# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19612# absolute.
19613ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6bae0ccf 19614ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
c0d27fcc
MR
19615ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19616ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
ba4481b5 19617
c0d27fcc
MR
19618
19619 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
19620echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
19621 case $ac_dest in
19622 default )
ba4481b5
DL
19623
19624### Make the necessary directories, if they don't exist.
19625for dir in etc lisp ; do
19626 test -d ${dir} || mkdir ${dir}
19627done
19628
19629# Build src/Makefile from ${srcdir}/src/Makefile.c
19630# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
19631# This must be done after src/config.h is built, since we rely on that file.
19632
19633# Now get this: Some word that is part of the ${srcdir} directory name
19634# or the ${configuration} value might, just might, happen to be an
19635# identifier like `sun4' or `i386' or something, and be predefined by
19636# the C preprocessor to some helpful value like 1, or maybe the empty
19637# string. Needless to say consequent macro substitutions are less
19638# than conducive to the makefile finding the correct directory.
19639undefs="`echo $top_srcdir $configuration $canonical |
19640sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
19641 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
19642`"
19643
19644echo creating src/epaths.h
4aa6b955 19645${MAKE-make} epaths-force
ba4481b5 19646
1c203d4c
DL
19647# As of 2000-11-19, newest development versions of GNU cpp preprocess
19648# `..' to `. .' unless invoked with -traditional
19649
d0e9bfd2 19650if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
19651 CPPFLAGS="$CPPFLAGS -traditional"
19652fi
19653
ba4481b5
DL
19654echo creating lib-src/Makefile
19655( cd lib-src
19656 rm -f junk.c junk1.c junk2.c
19657 sed -e '/start of cpp stuff/q' \
19658 < Makefile.c > junk1.c
19659 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 19660 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 19661 < Makefile.c > junk.c
503d2be0 19662 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
19663 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
19664 cat junk1.c junk2.c > Makefile.new
19665 rm -f junk.c junk1.c junk2.c
19666 chmod 444 Makefile.new
19667 mv -f Makefile.new Makefile
19668)
19669
19670echo creating src/Makefile
19671( cd src
19672 rm -f junk.c junk1.c junk2.c
19673 sed -e '/start of cpp stuff/q' \
19674 < Makefile.c > junk1.c
19675 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 19676 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 19677 < Makefile.c > junk.c
503d2be0 19678 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
19679 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
19680 cat junk1.c junk2.c > Makefile.new
19681 rm -f junk.c junk1.c junk2.c
19682 chmod 444 Makefile.new
19683 mv -f Makefile.new Makefile
19684)
19685
503d2be0 19686if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 19687 echo creating src/.gdbinit
503d2be0 19688 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
19689fi
19690
19691# This is how we know whether to re-run configure in certain cases.
19692touch src/config.stamp
19693
503d2be0
AS
19694 ;;
19695 esac
19696done
c0d27fcc 19697_ACEOF
503d2be0 19698
c0d27fcc 19699cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 19700
503d2be0 19701{ (exit 0); exit 0; }
c0d27fcc 19702_ACEOF
ba4481b5 19703chmod +x $CONFIG_STATUS
503d2be0
AS
19704ac_clean_files=$ac_clean_files_save
19705
c0d27fcc 19706
503d2be0
AS
19707# configure is writing to config.log, and then calls config.status.
19708# config.status does its own redirection, appending to config.log.
19709# Unfortunately, on DOS this fails, as config.log is still kept open
19710# by configure, so config.status won't be able to write to it; its
19711# output is simply discarded. So we exec the FD to /dev/null,
19712# effectively closing config.log, so it can be properly (re)opened and
19713# appended to by config.status. When coming back to configure, we
19714# need to make the FD available again.
19715if test "$no_create" != yes; then
19716 ac_cs_success=:
cd958eb3
MB
19717 ac_config_status_args=
19718 test "$silent" = yes &&
19719 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 19720 exec 5>/dev/null
cd958eb3 19721 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
19722 exec 5>>config.log
19723 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19724 # would make configure fail if this is the last instruction.
19725 $ac_cs_success || { (exit 1); exit 1; }
19726fi
f5f47add 19727
c0d27fcc 19728