Merge from gnus--rel--5.10
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
ca81d7a0 3# Generated by GNU Autoconf 2.60.
ba4481b5 4#
ca81d7a0
JD
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006 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+"$@"}'='"$@"'
ca81d7a0
JD
20 setopt NO_GLOB_SUBST
21else
22 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
503d2be0 23fi
ca81d7a0 24BIN_SH=xpg4; export BIN_SH # for Tru64
edfaf76d 25DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 26
ca81d7a0
JD
27
28# PATH needs CR
29# Avoid depending upon Character Ranges.
30as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33as_cr_digits='0123456789'
34as_cr_alnum=$as_cr_Letters$as_cr_digits
35
36# The user is always right.
37if test "${PATH_SEPARATOR+set}" != set; then
38 echo "#! /bin/sh" >conf$$.sh
39 echo "exit 0" >>conf$$.sh
40 chmod +x conf$$.sh
41 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
42 PATH_SEPARATOR=';'
43 else
44 PATH_SEPARATOR=:
45 fi
46 rm -f conf$$.sh
47fi
48
c0d27fcc 49# Support unset when possible.
edfaf76d 50if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
51 as_unset=unset
52else
53 as_unset=false
54fi
55
6bae0ccf 56
ca81d7a0
JD
57# IFS
58# We need space, tab and new line, in precisely that order. Quoting is
59# there to prevent editors from complaining about space-tab.
60# (If _AS_PATH_WALK were called with IFS unset, it would disable word
61# splitting by setting IFS to empty value.)
62as_nl='
63'
64IFS=" "" $as_nl"
65
66# Find who we are. Look in the path if we contain no directory separator.
67case $0 in
68 *[\\/]* ) as_myself=$0 ;;
69 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
70for as_dir in $PATH
71do
72 IFS=$as_save_IFS
73 test -z "$as_dir" && as_dir=.
74 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
75done
76IFS=$as_save_IFS
77
78 ;;
79esac
80# We did not find ourselves, most probably we were run as `sh COMMAND'
81# in which case we are not to be found in the path.
82if test "x$as_myself" = x; then
83 as_myself=$0
84fi
85if test ! -f "$as_myself"; then
86 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
87 { (exit 1); exit 1; }
88fi
89
6bae0ccf 90# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
91for as_var in ENV MAIL MAILPATH
92do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
93done
6bae0ccf
DL
94PS1='$ '
95PS2='> '
96PS4='+ '
97
98# NLS nuisances.
19650fd6
AS
99for as_var in \
100 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
101 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
102 LC_TELEPHONE LC_TIME
6bae0ccf 103do
edfaf76d 104 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
105 eval $as_var=C; export $as_var
106 else
ca81d7a0 107 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
108 fi
109done
110
111# Required to use basename.
ca81d7a0
JD
112if expr a : '\(a\)' >/dev/null 2>&1 &&
113 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
114 as_expr=expr
115else
116 as_expr=false
117fi
118
ca81d7a0 119if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
120 as_basename=basename
121else
122 as_basename=false
123fi
c0d27fcc
MR
124
125
503d2be0 126# Name of the executable.
ca81d7a0 127as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
128$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
129 X"$0" : 'X\(//\)$' \| \
ca81d7a0 130 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 131echo X/"$0" |
ca81d7a0
JD
132 sed '/^.*\/\([^/][^/]*\)\/*$/{
133 s//\1/
134 q
135 }
136 /^X\/\(\/\/\)$/{
137 s//\1/
138 q
139 }
140 /^X\/\(\/\).*/{
141 s//\1/
142 q
143 }
144 s/.*/./; q'`
c0d27fcc 145
ca81d7a0
JD
146# CDPATH.
147$as_unset CDPATH
8eeae1c9 148
8eeae1c9 149
ca81d7a0
JD
150if test "x$CONFIG_SHELL" = x; then
151 if (eval ":") 2>/dev/null; then
152 as_have_required=yes
153else
154 as_have_required=no
8eeae1c9
JD
155fi
156
ca81d7a0
JD
157 if test $as_have_required = yes && (eval ":
158(as_func_return () {
159 (exit \$1)
160}
161as_func_success () {
162 as_func_return 0
163}
164as_func_failure () {
165 as_func_return 1
166}
167as_func_ret_success () {
168 return 0
169}
170as_func_ret_failure () {
171 return 1
172}
8eeae1c9 173
ca81d7a0
JD
174exitcode=0
175if as_func_success; then
176 :
177else
178 exitcode=1
179 echo as_func_success failed.
180fi
8eeae1c9 181
ca81d7a0
JD
182if as_func_failure; then
183 exitcode=1
184 echo as_func_failure succeeded.
185fi
186
187if as_func_ret_success; then
188 :
189else
190 exitcode=1
191 echo as_func_ret_success failed.
192fi
193
194if as_func_ret_failure; then
195 exitcode=1
196 echo as_func_ret_failure succeeded.
197fi
198
199if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
200 :
201else
202 exitcode=1
203 echo positional parameters were not saved.
204fi
205
206test \$exitcode = 0) || { (exit 1); exit 1; }
207
208(
209 as_lineno_1=\$LINENO
210 as_lineno_2=\$LINENO
211 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
212 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
213") 2> /dev/null; then
214 :
215else
216 as_candidate_shells=
c0d27fcc 217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
ca81d7a0 218for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
c0d27fcc
MR
219do
220 IFS=$as_save_IFS
221 test -z "$as_dir" && as_dir=.
ca81d7a0 222 case $as_dir in
c0d27fcc 223 /*)
ca81d7a0
JD
224 for as_base in sh bash ksh sh5; do
225 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
226 done;;
227 esac
228done
229IFS=$as_save_IFS
230
231
232 for as_shell in $as_candidate_shells $SHELL; do
233 # Try only shells that exist, to save several forks.
234 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
235 { ("$as_shell") 2> /dev/null <<\_ASEOF
236# Be Bourne compatible
237if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
238 emulate sh
239 NULLCMD=:
240 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
241 # is contrary to our usage. Disable this feature.
242 alias -g '${1+"$@"}'='"$@"'
243 setopt NO_GLOB_SUBST
244else
245 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
246fi
247BIN_SH=xpg4; export BIN_SH # for Tru64
248DUALCASE=1; export DUALCASE # for MKS sh
249
250:
251_ASEOF
252}; then
253 CONFIG_SHELL=$as_shell
254 as_have_required=yes
255 if { "$as_shell" 2> /dev/null <<\_ASEOF
256# Be Bourne compatible
257if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
258 emulate sh
259 NULLCMD=:
260 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
261 # is contrary to our usage. Disable this feature.
262 alias -g '${1+"$@"}'='"$@"'
263 setopt NO_GLOB_SUBST
264else
265 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
266fi
267BIN_SH=xpg4; export BIN_SH # for Tru64
268DUALCASE=1; export DUALCASE # for MKS sh
269
270:
271(as_func_return () {
272 (exit $1)
273}
274as_func_success () {
275 as_func_return 0
276}
277as_func_failure () {
278 as_func_return 1
279}
280as_func_ret_success () {
281 return 0
282}
283as_func_ret_failure () {
284 return 1
285}
286
287exitcode=0
288if as_func_success; then
289 :
290else
291 exitcode=1
292 echo as_func_success failed.
293fi
294
295if as_func_failure; then
296 exitcode=1
297 echo as_func_failure succeeded.
298fi
299
300if as_func_ret_success; then
301 :
302else
303 exitcode=1
304 echo as_func_ret_success failed.
305fi
306
307if as_func_ret_failure; then
308 exitcode=1
309 echo as_func_ret_failure succeeded.
310fi
311
312if ( set x; as_func_ret_success y && test x = "$1" ); then
313 :
314else
315 exitcode=1
316 echo positional parameters were not saved.
317fi
318
319test $exitcode = 0) || { (exit 1); exit 1; }
320
321(
8eeae1c9
JD
322 as_lineno_1=$LINENO
323 as_lineno_2=$LINENO
324 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0
JD
325 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
326
327_ASEOF
328}; then
329 break
330fi
331
332fi
333
334 done
335
336 if test "x$CONFIG_SHELL" != x; then
337 for as_var in BASH_ENV ENV
338 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
339 done
340 export CONFIG_SHELL
341 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
342fi
343
344
345 if test $as_have_required = no; then
346 echo This script requires a shell more modern than all the
347 echo shells that I found on your system. Please install a
348 echo modern shell, or manually run the script under such a
349 echo shell if you do have one.
350 { (exit 1); exit 1; }
351fi
352
353
354fi
355
356fi
357
358
359
360(eval "as_func_return () {
361 (exit \$1)
362}
363as_func_success () {
364 as_func_return 0
365}
366as_func_failure () {
367 as_func_return 1
368}
369as_func_ret_success () {
370 return 0
371}
372as_func_ret_failure () {
373 return 1
374}
375
376exitcode=0
377if as_func_success; then
378 :
379else
380 exitcode=1
381 echo as_func_success failed.
382fi
383
384if as_func_failure; then
385 exitcode=1
386 echo as_func_failure succeeded.
387fi
388
389if as_func_ret_success; then
390 :
391else
392 exitcode=1
393 echo as_func_ret_success failed.
394fi
395
396if as_func_ret_failure; then
397 exitcode=1
398 echo as_func_ret_failure succeeded.
399fi
400
401if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
402 :
403else
404 exitcode=1
405 echo positional parameters were not saved.
406fi
407
408test \$exitcode = 0") || {
409 echo No shell found that supports shell functions.
410 echo Please tell autoconf@gnu.org about your system,
411 echo including any error possibly output before this
412 echo message
413}
414
415
416
417 as_lineno_1=$LINENO
418 as_lineno_2=$LINENO
419 test "x$as_lineno_1" != "x$as_lineno_2" &&
420 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
421
422 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
423 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
424 # line-number line after each line using $LINENO; the second 'sed'
425 # does the real work. The second script uses 'N' to pair each
426 # line-number line with the line containing $LINENO, and appends
427 # trailing '-' during substitution so that $LINENO is not a special
428 # case at line end.
c0d27fcc 429 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
430 # scripts with optimization help from Paolo Bonzini. Blame Lee
431 # E. McMahon (1931-1989) for sed's syntax. :-)
432 sed -n '
433 p
434 /[$]LINENO/=
435 ' <$as_myself |
c0d27fcc 436 sed '
ca81d7a0
JD
437 s/[$]LINENO.*/&-/
438 t lineno
439 b
440 :lineno
c0d27fcc 441 N
ca81d7a0
JD
442 :loop
443 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 444 t loop
ca81d7a0 445 s/-\n.*//
c0d27fcc 446 ' >$as_me.lineno &&
ca81d7a0 447 chmod +x "$as_me.lineno" ||
c0d27fcc
MR
448 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
449 { (exit 1); exit 1; }; }
450
451 # Don't try to exec as it changes $[0], causing all sort of problems
452 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
453 # original and so on. Autoconf is especially sensitive to this).
454 . "./$as_me.lineno"
c0d27fcc
MR
455 # Exit status is that of the last command.
456 exit
457}
458
459
ca81d7a0
JD
460if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
461 as_dirname=dirname
462else
463 as_dirname=false
464fi
465
466ECHO_C= ECHO_N= ECHO_T=
467case `echo -n x` in
468-n*)
469 case `echo 'x\c'` in
470 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
471 *) ECHO_C='\c';;
472 esac;;
473*)
474 ECHO_N='-n';;
c0d27fcc 475esac
503d2be0 476
ca81d7a0
JD
477if expr a : '\(a\)' >/dev/null 2>&1 &&
478 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
479 as_expr=expr
480else
481 as_expr=false
482fi
483
484rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
485if test -d conf$$.dir; then
486 rm -f conf$$.dir/conf$$.file
487else
488 rm -f conf$$.dir
489 mkdir conf$$.dir
490fi
503d2be0
AS
491echo >conf$$.file
492if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
493 as_ln_s='ln -s'
494 # ... but there are two gotchas:
495 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
496 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
497 # In both cases, we have to default to `cp -p'.
498 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 499 as_ln_s='cp -p'
503d2be0
AS
500elif ln conf$$.file conf$$ 2>/dev/null; then
501 as_ln_s=ln
502else
503 as_ln_s='cp -p'
504fi
ca81d7a0
JD
505rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
506rmdir conf$$.dir 2>/dev/null
503d2be0 507
6bae0ccf
DL
508if mkdir -p . 2>/dev/null; then
509 as_mkdir_p=:
510else
edfaf76d 511 test -d ./-p && rmdir ./-p
6bae0ccf
DL
512 as_mkdir_p=false
513fi
514
ca81d7a0
JD
515# Find out whether ``test -x'' works. Don't use a zero-byte file, as
516# systems may use methods other than mode bits to determine executability.
517cat >conf$$.file <<_ASEOF
518#! /bin/sh
519exit 0
520_ASEOF
521chmod +x conf$$.file
522if test -x conf$$.file >/dev/null 2>&1; then
523 as_executable_p="test -x"
524else
525 as_executable_p=:
526fi
527rm -f conf$$.file
503d2be0 528
c0d27fcc 529# Sed expression to map a string onto a valid CPP name.
edfaf76d 530as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
531
532# Sed expression to map a string onto a valid variable name.
edfaf76d 533as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 534
503d2be0 535
c0d27fcc 536
ca81d7a0 537exec 7<&0 </dev/null 6>&1
503d2be0
AS
538
539# Name of the host.
540# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
541# so uname gets run too.
542ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
543
503d2be0
AS
544#
545# Initializations.
546#
ba4481b5 547ac_default_prefix=/usr/local
ca81d7a0 548ac_clean_files=
6bae0ccf 549ac_config_libobj_dir=.
ca81d7a0 550LIBOBJS=
503d2be0
AS
551cross_compiling=no
552subdirs=
c0d27fcc
MR
553MFLAGS=
554MAKEFLAGS=
503d2be0
AS
555SHELL=${CONFIG_SHELL-/bin/sh}
556
c0d27fcc
MR
557# Identity of this package.
558PACKAGE_NAME=
559PACKAGE_TARNAME=
560PACKAGE_VERSION=
561PACKAGE_STRING=
562PACKAGE_BUGREPORT=
563
503d2be0 564ac_unique_file="src/lisp.h"
6bae0ccf 565ac_config_libobj_dir=src
503d2be0
AS
566# Factoring default headers for most tests.
567ac_includes_default="\
568#include <stdio.h>
569#if HAVE_SYS_TYPES_H
570# include <sys/types.h>
571#endif
572#if HAVE_SYS_STAT_H
573# include <sys/stat.h>
574#endif
575#if STDC_HEADERS
576# include <stdlib.h>
577# include <stddef.h>
578#else
579# if HAVE_STDLIB_H
580# include <stdlib.h>
581# endif
582#endif
583#if HAVE_STRING_H
584# if !STDC_HEADERS && HAVE_MEMORY_H
585# include <memory.h>
586# endif
587# include <string.h>
588#endif
589#if HAVE_STRINGS_H
590# include <strings.h>
591#endif
592#if HAVE_INTTYPES_H
593# include <inttypes.h>
ca81d7a0
JD
594#endif
595#if HAVE_STDINT_H
596# include <stdint.h>
503d2be0
AS
597#endif
598#if HAVE_UNISTD_H
599# include <unistd.h>
600#endif"
ba4481b5 601
ca81d7a0
JD
602ac_subst_vars='SHELL
603PATH_SEPARATOR
604PACKAGE_NAME
605PACKAGE_TARNAME
606PACKAGE_VERSION
607PACKAGE_STRING
608PACKAGE_BUGREPORT
609exec_prefix
610prefix
611program_transform_name
612bindir
613sbindir
614libexecdir
615datarootdir
616datadir
617sysconfdir
618sharedstatedir
619localstatedir
620includedir
621oldincludedir
622docdir
623infodir
624htmldir
625dvidir
626pdfdir
627psdir
628libdir
629localedir
630mandir
631DEFS
632ECHO_C
633ECHO_N
634ECHO_T
635LIBS
636build_alias
637host_alias
638target_alias
639MAINT
640build
641build_cpu
642build_vendor
643build_os
644host
645host_cpu
646host_vendor
647host_os
648CC
649CFLAGS
650LDFLAGS
651CPPFLAGS
652ac_ct_CC
653EXEEXT
654OBJEXT
655CPP
656GREP
657EGREP
658LN_S
659INSTALL_PROGRAM
660INSTALL_SCRIPT
661INSTALL_DATA
662RANLIB
663INSTALL_INFO
664GZIP_PROG
665LIBSOUND
666PKG_CONFIG
667ALSA_CFLAGS
668ALSA_LIBS
669
670CFLAGS_SOUND
671SET_MAKE
672XMKMF
673GTK_CFLAGS
674GTK_LIBS
675ALLOCA
676liblockfile
677LIBOBJS
678NEED_SETGID
679KMEM_GROUP
680GETLOADAVG_LIBS
681GETOPT_H
682GETOPTOBJS
683version
684configuration
685canonical
686srcdir
687lispdir
688locallisppath
689lisppath
690x_default_search_path
691etcdir
692archlibdir
693bitmapdir
694gamedir
695gameuser
696c_switch_system
697c_switch_machine
698LD_SWITCH_X_SITE
699LD_SWITCH_X_SITE_AUX
700C_SWITCH_X_SITE
701X_TOOLKIT_TYPE
702machfile
703opsysfile
704carbon_appdir
705LTLIBOBJS'
6bae0ccf 706ac_subst_files=''
ca81d7a0
JD
707 ac_precious_vars='build_alias
708host_alias
709target_alias
710CC
711CFLAGS
712LDFLAGS
713CPPFLAGS
714CPP
715XMKMF'
716
c0d27fcc 717
ba4481b5 718# Initialize some variables set by options.
503d2be0
AS
719ac_init_help=
720ac_init_version=false
ba4481b5
DL
721# The variables have the same names as the options, with
722# dashes changed to underlines.
503d2be0 723cache_file=/dev/null
ba4481b5 724exec_prefix=NONE
ba4481b5 725no_create=
ba4481b5
DL
726no_recursion=
727prefix=NONE
728program_prefix=NONE
729program_suffix=NONE
730program_transform_name=s,x,x,
731silent=
732site=
733srcdir=
ba4481b5
DL
734verbose=
735x_includes=NONE
736x_libraries=NONE
503d2be0
AS
737
738# Installation directory options.
739# These are left unexpanded so users can "make install exec_prefix=/foo"
740# and all the variables that are supposed to be based on exec_prefix
741# by default will actually change.
742# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 743# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
744bindir='${exec_prefix}/bin'
745sbindir='${exec_prefix}/sbin'
746libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
747datarootdir='${prefix}/share'
748datadir='${datarootdir}'
ba4481b5
DL
749sysconfdir='${prefix}/etc'
750sharedstatedir='${prefix}/com'
751localstatedir='${prefix}/var'
ba4481b5
DL
752includedir='${prefix}/include'
753oldincludedir='/usr/include'
ca81d7a0
JD
754docdir='${datarootdir}/doc/${PACKAGE}'
755infodir='${datarootdir}/info'
756htmldir='${docdir}'
757dvidir='${docdir}'
758pdfdir='${docdir}'
759psdir='${docdir}'
760libdir='${exec_prefix}/lib'
761localedir='${datarootdir}/locale'
762mandir='${datarootdir}/man'
ba4481b5 763
ba4481b5 764ac_prev=
ca81d7a0 765ac_dashdash=
ba4481b5
DL
766for ac_option
767do
ba4481b5
DL
768 # If the previous option needs an argument, assign it.
769 if test -n "$ac_prev"; then
ca81d7a0 770 eval $ac_prev=\$ac_option
ba4481b5
DL
771 ac_prev=
772 continue
773 fi
774
ca81d7a0
JD
775 case $ac_option in
776 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
777 *) ac_optarg=yes ;;
778 esac
ba4481b5
DL
779
780 # Accept the important Cygnus configure options, so we can diagnose typos.
781
ca81d7a0
JD
782 case $ac_dashdash$ac_option in
783 --)
784 ac_dashdash=yes ;;
ba4481b5
DL
785
786 -bindir | --bindir | --bindi | --bind | --bin | --bi)
787 ac_prev=bindir ;;
788 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 789 bindir=$ac_optarg ;;
ba4481b5
DL
790
791 -build | --build | --buil | --bui | --bu)
503d2be0 792 ac_prev=build_alias ;;
ba4481b5 793 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 794 build_alias=$ac_optarg ;;
ba4481b5
DL
795
796 -cache-file | --cache-file | --cache-fil | --cache-fi \
797 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
798 ac_prev=cache_file ;;
799 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
800 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
801 cache_file=$ac_optarg ;;
802
803 --config-cache | -C)
804 cache_file=config.cache ;;
ba4481b5 805
ca81d7a0 806 -datadir | --datadir | --datadi | --datad)
ba4481b5 807 ac_prev=datadir ;;
ca81d7a0 808 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 809 datadir=$ac_optarg ;;
ba4481b5 810
ca81d7a0
JD
811 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
812 | --dataroo | --dataro | --datar)
813 ac_prev=datarootdir ;;
814 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
815 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
816 datarootdir=$ac_optarg ;;
817
ba4481b5 818 -disable-* | --disable-*)
503d2be0 819 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 820 # Reject names that are not valid shell variable names.
503d2be0
AS
821 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
822 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
823 { (exit 1); exit 1; }; }
824 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
ca81d7a0
JD
825 eval enable_$ac_feature=no ;;
826
827 -docdir | --docdir | --docdi | --doc | --do)
828 ac_prev=docdir ;;
829 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
830 docdir=$ac_optarg ;;
831
832 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
833 ac_prev=dvidir ;;
834 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
835 dvidir=$ac_optarg ;;
ba4481b5
DL
836
837 -enable-* | --enable-*)
503d2be0 838 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 839 # Reject names that are not valid shell variable names.
503d2be0
AS
840 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
841 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
842 { (exit 1); exit 1; }; }
843 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
ca81d7a0 844 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
845
846 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
847 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
848 | --exec | --exe | --ex)
849 ac_prev=exec_prefix ;;
850 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
851 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
852 | --exec=* | --exe=* | --ex=*)
503d2be0 853 exec_prefix=$ac_optarg ;;
ba4481b5
DL
854
855 -gas | --gas | --ga | --g)
856 # Obsolete; use --with-gas.
857 with_gas=yes ;;
858
503d2be0
AS
859 -help | --help | --hel | --he | -h)
860 ac_init_help=long ;;
861 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
862 ac_init_help=recursive ;;
863 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
864 ac_init_help=short ;;
ba4481b5
DL
865
866 -host | --host | --hos | --ho)
503d2be0 867 ac_prev=host_alias ;;
ba4481b5 868 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 869 host_alias=$ac_optarg ;;
ba4481b5 870
ca81d7a0
JD
871 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
872 ac_prev=htmldir ;;
873 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
874 | --ht=*)
875 htmldir=$ac_optarg ;;
876
ba4481b5
DL
877 -includedir | --includedir | --includedi | --included | --include \
878 | --includ | --inclu | --incl | --inc)
879 ac_prev=includedir ;;
880 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
881 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 882 includedir=$ac_optarg ;;
ba4481b5
DL
883
884 -infodir | --infodir | --infodi | --infod | --info | --inf)
885 ac_prev=infodir ;;
886 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 887 infodir=$ac_optarg ;;
ba4481b5
DL
888
889 -libdir | --libdir | --libdi | --libd)
890 ac_prev=libdir ;;
891 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 892 libdir=$ac_optarg ;;
ba4481b5
DL
893
894 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
895 | --libexe | --libex | --libe)
896 ac_prev=libexecdir ;;
897 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
898 | --libexe=* | --libex=* | --libe=*)
503d2be0 899 libexecdir=$ac_optarg ;;
ba4481b5 900
ca81d7a0
JD
901 -localedir | --localedir | --localedi | --localed | --locale)
902 ac_prev=localedir ;;
903 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
904 localedir=$ac_optarg ;;
905
ba4481b5 906 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 907 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
908 ac_prev=localstatedir ;;
909 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 910 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 911 localstatedir=$ac_optarg ;;
ba4481b5
DL
912
913 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
914 ac_prev=mandir ;;
915 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 916 mandir=$ac_optarg ;;
ba4481b5
DL
917
918 -nfp | --nfp | --nf)
919 # Obsolete; use --without-fp.
920 with_fp=no ;;
921
922 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 923 | --no-cr | --no-c | -n)
ba4481b5
DL
924 no_create=yes ;;
925
926 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
927 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
928 no_recursion=yes ;;
929
930 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
931 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
932 | --oldin | --oldi | --old | --ol | --o)
933 ac_prev=oldincludedir ;;
934 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
935 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
936 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 937 oldincludedir=$ac_optarg ;;
ba4481b5
DL
938
939 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
940 ac_prev=prefix ;;
941 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 942 prefix=$ac_optarg ;;
ba4481b5
DL
943
944 -program-prefix | --program-prefix | --program-prefi | --program-pref \
945 | --program-pre | --program-pr | --program-p)
946 ac_prev=program_prefix ;;
947 -program-prefix=* | --program-prefix=* | --program-prefi=* \
948 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 949 program_prefix=$ac_optarg ;;
ba4481b5
DL
950
951 -program-suffix | --program-suffix | --program-suffi | --program-suff \
952 | --program-suf | --program-su | --program-s)
953 ac_prev=program_suffix ;;
954 -program-suffix=* | --program-suffix=* | --program-suffi=* \
955 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 956 program_suffix=$ac_optarg ;;
ba4481b5
DL
957
958 -program-transform-name | --program-transform-name \
959 | --program-transform-nam | --program-transform-na \
960 | --program-transform-n | --program-transform- \
961 | --program-transform | --program-transfor \
962 | --program-transfo | --program-transf \
963 | --program-trans | --program-tran \
964 | --progr-tra | --program-tr | --program-t)
965 ac_prev=program_transform_name ;;
966 -program-transform-name=* | --program-transform-name=* \
967 | --program-transform-nam=* | --program-transform-na=* \
968 | --program-transform-n=* | --program-transform-=* \
969 | --program-transform=* | --program-transfor=* \
970 | --program-transfo=* | --program-transf=* \
971 | --program-trans=* | --program-tran=* \
972 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 973 program_transform_name=$ac_optarg ;;
ba4481b5 974
ca81d7a0
JD
975 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
976 ac_prev=pdfdir ;;
977 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
978 pdfdir=$ac_optarg ;;
979
980 -psdir | --psdir | --psdi | --psd | --ps)
981 ac_prev=psdir ;;
982 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
983 psdir=$ac_optarg ;;
984
ba4481b5
DL
985 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
986 | -silent | --silent | --silen | --sile | --sil)
987 silent=yes ;;
988
989 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
990 ac_prev=sbindir ;;
991 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
992 | --sbi=* | --sb=*)
503d2be0 993 sbindir=$ac_optarg ;;
ba4481b5
DL
994
995 -sharedstatedir | --sharedstatedir | --sharedstatedi \
996 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
997 | --sharedst | --shareds | --shared | --share | --shar \
998 | --sha | --sh)
999 ac_prev=sharedstatedir ;;
1000 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1001 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1002 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1003 | --sha=* | --sh=*)
503d2be0 1004 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1005
1006 -site | --site | --sit)
1007 ac_prev=site ;;
1008 -site=* | --site=* | --sit=*)
503d2be0 1009 site=$ac_optarg ;;
ba4481b5
DL
1010
1011 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1012 ac_prev=srcdir ;;
1013 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1014 srcdir=$ac_optarg ;;
ba4481b5
DL
1015
1016 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1017 | --syscon | --sysco | --sysc | --sys | --sy)
1018 ac_prev=sysconfdir ;;
1019 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1020 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1021 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1022
1023 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1024 ac_prev=target_alias ;;
ba4481b5 1025 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1026 target_alias=$ac_optarg ;;
ba4481b5
DL
1027
1028 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1029 verbose=yes ;;
1030
503d2be0
AS
1031 -version | --version | --versio | --versi | --vers | -V)
1032 ac_init_version=: ;;
ba4481b5
DL
1033
1034 -with-* | --with-*)
503d2be0 1035 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1036 # Reject names that are not valid shell variable names.
503d2be0
AS
1037 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1038 { echo "$as_me: error: invalid package name: $ac_package" >&2
1039 { (exit 1); exit 1; }; }
ba4481b5 1040 ac_package=`echo $ac_package| sed 's/-/_/g'`
ca81d7a0 1041 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1042
1043 -without-* | --without-*)
503d2be0 1044 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1045 # Reject names that are not valid shell variable names.
503d2be0
AS
1046 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1047 { echo "$as_me: error: invalid package name: $ac_package" >&2
1048 { (exit 1); exit 1; }; }
1049 ac_package=`echo $ac_package | sed 's/-/_/g'`
ca81d7a0 1050 eval with_$ac_package=no ;;
ba4481b5
DL
1051
1052 --x)
1053 # Obsolete; use --with-x.
1054 with_x=yes ;;
1055
1056 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1057 | --x-incl | --x-inc | --x-in | --x-i)
1058 ac_prev=x_includes ;;
1059 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1060 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1061 x_includes=$ac_optarg ;;
ba4481b5
DL
1062
1063 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1064 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1065 ac_prev=x_libraries ;;
1066 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1067 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1068 x_libraries=$ac_optarg ;;
ba4481b5 1069
503d2be0
AS
1070 -*) { echo "$as_me: error: unrecognized option: $ac_option
1071Try \`$0 --help' for more information." >&2
1072 { (exit 1); exit 1; }; }
ba4481b5
DL
1073 ;;
1074
503d2be0
AS
1075 *=*)
1076 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1077 # Reject names that are not valid shell variable names.
1078 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1079 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1080 { (exit 1); exit 1; }; }
ca81d7a0 1081 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1082 export $ac_envvar ;;
1083
ba4481b5 1084 *)
503d2be0
AS
1085 # FIXME: should be removed in autoconf 3.0.
1086 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1087 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1088 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1089 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1090 ;;
1091
1092 esac
1093done
1094
1095if test -n "$ac_prev"; then
503d2be0
AS
1096 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1097 { echo "$as_me: error: missing argument to $ac_option" >&2
1098 { (exit 1); exit 1; }; }
ba4481b5 1099fi
ba4481b5 1100
ca81d7a0
JD
1101# Be sure to have absolute directory names.
1102for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1103 datadir sysconfdir sharedstatedir localstatedir includedir \
1104 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1105 libdir localedir mandir
4b411bfe 1106do
ca81d7a0 1107 eval ac_val=\$$ac_var
4b411bfe 1108 case $ac_val in
ca81d7a0
JD
1109 [\\/$]* | ?:[\\/]* ) continue;;
1110 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1111 esac
ca81d7a0
JD
1112 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1113 { (exit 1); exit 1; }; }
ba4481b5
DL
1114done
1115
503d2be0
AS
1116# There might be people who depend on the old broken behavior: `$host'
1117# used to hold the argument of --host etc.
c0d27fcc 1118# FIXME: To remove some day.
503d2be0
AS
1119build=$build_alias
1120host=$host_alias
1121target=$target_alias
1122
c0d27fcc 1123# FIXME: To remove some day.
503d2be0
AS
1124if test "x$host_alias" != x; then
1125 if test "x$build_alias" = x; then
1126 cross_compiling=maybe
1127 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1128 If a cross compiler is detected then cross compile mode will be used." >&2
1129 elif test "x$build_alias" != "x$host_alias"; then
1130 cross_compiling=yes
1131 fi
1132fi
ba4481b5 1133
503d2be0
AS
1134ac_tool_prefix=
1135test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1136
503d2be0 1137test "$silent" = yes && exec 6>/dev/null
ba4481b5 1138
c0d27fcc 1139
ca81d7a0
JD
1140ac_pwd=`pwd` && test -n "$ac_pwd" &&
1141ac_ls_di=`ls -di .` &&
1142ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1143 { echo "$as_me: error: Working directory cannot be determined" >&2
1144 { (exit 1); exit 1; }; }
1145test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1146 { echo "$as_me: error: pwd does not report name of working directory" >&2
1147 { (exit 1); exit 1; }; }
1148
1149
ba4481b5
DL
1150# Find the source files, if location was not specified.
1151if test -z "$srcdir"; then
1152 ac_srcdir_defaulted=yes
ca81d7a0
JD
1153 # Try the directory containing this script, then the parent directory.
1154 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1155$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1156 X"$0" : 'X\(//\)[^/]' \| \
1157 X"$0" : 'X\(//\)$' \| \
ca81d7a0 1158 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1159echo X"$0" |
ca81d7a0
JD
1160 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1161 s//\1/
1162 q
1163 }
1164 /^X\(\/\/\)[^/].*/{
1165 s//\1/
1166 q
1167 }
1168 /^X\(\/\/\)$/{
1169 s//\1/
1170 q
1171 }
1172 /^X\(\/\).*/{
1173 s//\1/
1174 q
1175 }
1176 s/.*/./; q'`
ba4481b5 1177 srcdir=$ac_confdir
ca81d7a0 1178 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1179 srcdir=..
1180 fi
1181else
1182 ac_srcdir_defaulted=no
1183fi
ca81d7a0
JD
1184if test ! -r "$srcdir/$ac_unique_file"; then
1185 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1186 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1187 { (exit 1); exit 1; }; }
ba4481b5 1188fi
ca81d7a0
JD
1189ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1190ac_abs_confdir=`(
1191 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1192 { (exit 1); exit 1; }; }
ca81d7a0
JD
1193 pwd)`
1194# When building in place, set srcdir=.
1195if test "$ac_abs_confdir" = "$ac_pwd"; then
1196 srcdir=.
1197fi
1198# Remove unnecessary trailing slashes from srcdir.
1199# Double slashes in file names in object file debugging info
1200# mess up M-x gdb in Emacs.
1201case $srcdir in
1202*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1203esac
1204for ac_var in $ac_precious_vars; do
1205 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1206 eval ac_env_${ac_var}_value=\$${ac_var}
1207 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1208 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1209done
503d2be0
AS
1210
1211#
1212# Report the --help message.
1213#
1214if test "$ac_init_help" = "long"; then
1215 # Omit some internal or obsolete options to make the list less imposing.
1216 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1217 cat <<_ACEOF
503d2be0
AS
1218\`configure' configures this package to adapt to many kinds of systems.
1219
1220Usage: $0 [OPTION]... [VAR=VALUE]...
1221
1222To assign environment variables (e.g., CC, CFLAGS...), specify them as
1223VAR=VALUE. See below for descriptions of some of the useful variables.
1224
1225Defaults for the options are specified in brackets.
1226
1227Configuration:
1228 -h, --help display this help and exit
1229 --help=short display options specific to this package
1230 --help=recursive display the short help of all the included packages
1231 -V, --version display version information and exit
1232 -q, --quiet, --silent do not print \`checking...' messages
1233 --cache-file=FILE cache test results in FILE [disabled]
1234 -C, --config-cache alias for \`--cache-file=config.cache'
1235 -n, --no-create do not create output files
1236 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1237
503d2be0
AS
1238Installation directories:
1239 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1240 [$ac_default_prefix]
503d2be0 1241 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1242 [PREFIX]
503d2be0
AS
1243
1244By default, \`make install' will install all the files in
1245\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1246an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1247for instance \`--prefix=\$HOME'.
1248
1249For better control, use the options below.
1250
1251Fine tuning of the installation directories:
1252 --bindir=DIR user executables [EPREFIX/bin]
1253 --sbindir=DIR system admin executables [EPREFIX/sbin]
1254 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1255 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1256 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1257 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1258 --libdir=DIR object code libraries [EPREFIX/lib]
1259 --includedir=DIR C header files [PREFIX/include]
1260 --oldincludedir=DIR C header files for non-gcc [/usr/include]
ca81d7a0
JD
1261 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1262 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1263 --infodir=DIR info documentation [DATAROOTDIR/info]
1264 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1265 --mandir=DIR man documentation [DATAROOTDIR/man]
1266 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1267 --htmldir=DIR html documentation [DOCDIR]
1268 --dvidir=DIR dvi documentation [DOCDIR]
1269 --pdfdir=DIR pdf documentation [DOCDIR]
1270 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1271_ACEOF
503d2be0 1272
c0d27fcc 1273 cat <<\_ACEOF
503d2be0 1274
ba5da88a
PJ
1275Program names:
1276 --program-prefix=PREFIX prepend PREFIX to installed program names
1277 --program-suffix=SUFFIX append SUFFIX to installed program names
1278 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1279
503d2be0
AS
1280X features:
1281 --x-includes=DIR X include files are in DIR
1282 --x-libraries=DIR X library files are in DIR
1283
1284System types:
1285 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1286 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1287_ACEOF
503d2be0
AS
1288fi
1289
1290if test -n "$ac_init_help"; then
1291
c0d27fcc 1292 cat <<\_ACEOF
503d2be0
AS
1293
1294Optional Features:
1295 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1296 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6a3a24fa
JD
1297 --enable-carbon-app[=DIR] [DIR=/Application]
1298 specify install directory for Emacs.app on Mac OS X
d0098f13 1299 --enable-asserts compile code with asserts enabled
19650fd6
AS
1300 --enable-maintainer-mode enable make rules and dependencies not useful
1301 (and sometimes confusing) to the casual installer
9adfabc2
LK
1302 --enable-locallisppath=PATH
1303 directories Emacs should search for lisp files
1304 specific to this site
503d2be0
AS
1305 --disable-largefile omit support for large files
1306
1307Optional Packages:
1308 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1309 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1310 --without-gcc don't use GCC to compile Emacs if GCC is found
1311 --without-pop don't support POP mail retrieval with movemail
1312 --with-kerberos support Kerberos-authenticated POP
1313 --with-kerberos5 support Kerberos version 5 authenticated POP
1314 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1315 --without-sound don't compile with sound support
488dd4c4
JD
1316 --with-x-toolkit=KIT use an X toolkit
1317 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
1318 --with-xpm use -lXpm for displaying XPM images
1319 --with-jpeg use -ljpeg for displaying JPEG images
1320 --with-tiff use -ltiff for displaying TIFF images
1321 --with-gif use -lungif for displaying GIF images
1322 --with-png use -lpng for displaying PNG images
488dd4c4
JD
1323 --with-gtk use GTK (same as --with-x-toolkit=gtk)
1324 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 1325 --without-toolkit-scroll-bars
cc227489
MB
1326 don't use Motif or Xaw3d scroll bars
1327 --without-xim don't use X11 XIM
e0f712ba 1328 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
1329 --with-x use the X Window System
1330
1331Some influential environment variables:
1332 CC C compiler command
1333 CFLAGS C compiler flags
1334 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1335 nonstandard directory <lib dir>
ca81d7a0
JD
1336 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1337 you have headers in a nonstandard directory <include dir>
503d2be0 1338 CPP C preprocessor
ca81d7a0 1339 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1340
1341Use these variables to override the choices made by `configure' or to help
1342it to find libraries and programs with nonstandard names/locations.
1343
c0d27fcc 1344_ACEOF
ca81d7a0 1345ac_status=$?
503d2be0
AS
1346fi
1347
1348if test "$ac_init_help" = "recursive"; then
1349 # If there are subdirs, report their specific --help.
c0d27fcc 1350 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
ca81d7a0 1351 test -d "$ac_dir" || continue
c0d27fcc
MR
1352 ac_builddir=.
1353
ca81d7a0
JD
1354case "$ac_dir" in
1355.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1356*)
c0d27fcc 1357 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
1358 # A ".." for each directory in $ac_dir_suffix.
1359 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1360 case $ac_top_builddir_sub in
1361 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1362 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1363 esac ;;
1364esac
1365ac_abs_top_builddir=$ac_pwd
1366ac_abs_builddir=$ac_pwd$ac_dir_suffix
1367# for backward compatibility:
1368ac_top_builddir=$ac_top_build_prefix
503d2be0 1369
c0d27fcc 1370case $srcdir in
ca81d7a0 1371 .) # We are building in place.
c0d27fcc 1372 ac_srcdir=.
ca81d7a0
JD
1373 ac_top_srcdir=$ac_top_builddir_sub
1374 ac_abs_top_srcdir=$ac_pwd ;;
1375 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1376 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1377 ac_top_srcdir=$srcdir
1378 ac_abs_top_srcdir=$srcdir ;;
1379 *) # Relative name.
1380 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1381 ac_top_srcdir=$ac_top_build_prefix$srcdir
1382 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1383esac
ca81d7a0
JD
1384ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1385
1386 cd "$ac_dir" || { ac_status=$?; continue; }
1387 # Check for guested configure.
1388 if test -f "$ac_srcdir/configure.gnu"; then
1389 echo &&
1390 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1391 elif test -f "$ac_srcdir/configure"; then
1392 echo &&
1393 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1394 else
c0d27fcc 1395 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1396 fi || ac_status=$?
1397 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1398 done
1399fi
1400
ca81d7a0 1401test -n "$ac_init_help" && exit $ac_status
503d2be0 1402if $ac_init_version; then
c0d27fcc 1403 cat <<\_ACEOF
ca81d7a0
JD
1404configure
1405generated by GNU Autoconf 2.60
503d2be0 1406
ca81d7a0
JD
1407Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14082002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1409This configure script is free software; the Free Software Foundation
1410gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1411_ACEOF
ca81d7a0 1412 exit
503d2be0 1413fi
ca81d7a0 1414cat >config.log <<_ACEOF
503d2be0
AS
1415This file contains any messages produced by compilers while
1416running configure, to aid debugging if configure makes a mistake.
1417
1418It was created by $as_me, which was
ca81d7a0 1419generated by GNU Autoconf 2.60. Invocation command line was
503d2be0
AS
1420
1421 $ $0 $@
1422
c0d27fcc 1423_ACEOF
ca81d7a0 1424exec 5>>config.log
503d2be0
AS
1425{
1426cat <<_ASUNAME
c0d27fcc
MR
1427## --------- ##
1428## Platform. ##
1429## --------- ##
503d2be0
AS
1430
1431hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1432uname -m = `(uname -m) 2>/dev/null || echo unknown`
1433uname -r = `(uname -r) 2>/dev/null || echo unknown`
1434uname -s = `(uname -s) 2>/dev/null || echo unknown`
1435uname -v = `(uname -v) 2>/dev/null || echo unknown`
1436
1437/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1438/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1439
1440/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1441/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1442/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1443/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1444/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1445/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1446/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1447
925c2f3f 1448_ASUNAME
c0d27fcc
MR
1449
1450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1451for as_dir in $PATH
1452do
1453 IFS=$as_save_IFS
1454 test -z "$as_dir" && as_dir=.
1455 echo "PATH: $as_dir"
1456done
ca81d7a0 1457IFS=$as_save_IFS
c0d27fcc 1458
503d2be0
AS
1459} >&5
1460
c0d27fcc
MR
1461cat >&5 <<_ACEOF
1462
1463
1464## ----------- ##
1465## Core tests. ##
1466## ----------- ##
1467
1468_ACEOF
503d2be0 1469
503d2be0
AS
1470
1471# Keep a trace of the command line.
1472# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1473# Strip out --silent because we don't want to record it for future runs.
503d2be0 1474# Also quote any args containing shell meta-characters.
19650fd6 1475# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1476ac_configure_args=
19650fd6
AS
1477ac_configure_args0=
1478ac_configure_args1=
19650fd6
AS
1479ac_must_keep_next=false
1480for ac_pass in 1 2
503d2be0 1481do
19650fd6
AS
1482 for ac_arg
1483 do
1484 case $ac_arg in
1485 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1486 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1487 | -silent | --silent | --silen | --sile | --sil)
1488 continue ;;
ca81d7a0 1489 *\'*)
19650fd6
AS
1490 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1491 esac
1492 case $ac_pass in
1493 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1494 2)
1495 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1496 if test $ac_must_keep_next = true; then
edfaf76d 1497 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1498 else
edfaf76d
LK
1499 case $ac_arg in
1500 *=* | --config-cache | -C | -disable-* | --disable-* \
1501 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1502 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1503 | -with-* | --with-* | -without-* | --without-* | --x)
1504 case "$ac_configure_args0 " in
1505 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1506 esac
1507 ;;
1508 -* ) ac_must_keep_next=true ;;
1509 esac
19650fd6 1510 fi
ca81d7a0 1511 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1512 ;;
1513 esac
1514 done
503d2be0 1515done
19650fd6
AS
1516$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1517$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1518
1519# When interrupted or exit'd, cleanup temporary files, and complete
1520# config.log. We remove comments because anyway the quotes in there
1521# would cause problems or look ugly.
ca81d7a0
JD
1522# WARNING: Use '\'' to represent an apostrophe within the trap.
1523# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1524trap 'exit_status=$?
1525 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1526 {
1527 echo
6bae0ccf 1528
c0d27fcc
MR
1529 cat <<\_ASBOX
1530## ---------------- ##
1531## Cache variables. ##
1532## ---------------- ##
1533_ASBOX
1534 echo
1535 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1536(
1537 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1538 eval ac_val=\$$ac_var
1539 case $ac_val in #(
1540 *${as_nl}*)
1541 case $ac_var in #(
1542 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1543echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1544 esac
1545 case $ac_var in #(
1546 _ | IFS | as_nl) ;; #(
1547 *) $as_unset $ac_var ;;
1548 esac ;;
1549 esac
1550 done
503d2be0 1551 (set) 2>&1 |
ca81d7a0
JD
1552 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1553 *${as_nl}ac_space=\ *)
503d2be0 1554 sed -n \
ca81d7a0
JD
1555 "s/'\''/'\''\\\\'\'''\''/g;
1556 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1557 ;; #(
503d2be0 1558 *)
ca81d7a0 1559 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1560 ;;
ca81d7a0
JD
1561 esac |
1562 sort
1563)
c0d27fcc 1564 echo
6bae0ccf
DL
1565
1566 cat <<\_ASBOX
1567## ----------------- ##
1568## Output variables. ##
1569## ----------------- ##
1570_ASBOX
1571 echo
1572 for ac_var in $ac_subst_vars
1573 do
ca81d7a0
JD
1574 eval ac_val=\$$ac_var
1575 case $ac_val in
1576 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1577 esac
1578 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1579 done | sort
1580 echo
1581
1582 if test -n "$ac_subst_files"; then
1583 cat <<\_ASBOX
ca81d7a0
JD
1584## ------------------- ##
1585## File substitutions. ##
1586## ------------------- ##
6bae0ccf
DL
1587_ASBOX
1588 echo
1589 for ac_var in $ac_subst_files
1590 do
ca81d7a0
JD
1591 eval ac_val=\$$ac_var
1592 case $ac_val in
1593 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1594 esac
1595 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1596 done | sort
1597 echo
1598 fi
1599
c0d27fcc
MR
1600 if test -s confdefs.h; then
1601 cat <<\_ASBOX
1602## ----------- ##
1603## confdefs.h. ##
1604## ----------- ##
1605_ASBOX
1606 echo
ca81d7a0 1607 cat confdefs.h
c0d27fcc
MR
1608 echo
1609 fi
1610 test "$ac_signal" != 0 &&
1611 echo "$as_me: caught signal $ac_signal"
1612 echo "$as_me: exit $exit_status"
1613 } >&5
ca81d7a0
JD
1614 rm -f core *.core core.conftest.* &&
1615 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1616 exit $exit_status
ca81d7a0 1617' 0
503d2be0
AS
1618for ac_signal in 1 2 13 15; do
1619 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1620done
1621ac_signal=0
1622
1623# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1624rm -f -r conftest* confdefs.h
ba4481b5 1625
c0d27fcc
MR
1626# Predefined preprocessor variables.
1627
1628cat >>confdefs.h <<_ACEOF
1629#define PACKAGE_NAME "$PACKAGE_NAME"
1630_ACEOF
1631
1632
1633cat >>confdefs.h <<_ACEOF
1634#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1635_ACEOF
1636
1637
1638cat >>confdefs.h <<_ACEOF
1639#define PACKAGE_VERSION "$PACKAGE_VERSION"
1640_ACEOF
1641
1642
1643cat >>confdefs.h <<_ACEOF
1644#define PACKAGE_STRING "$PACKAGE_STRING"
1645_ACEOF
1646
1647
1648cat >>confdefs.h <<_ACEOF
1649#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1650_ACEOF
1651
1652
503d2be0 1653# Let the site file select an alternate cache file if it wants to.
ba4481b5 1654# Prefer explicitly selected file to automatically selected ones.
ca81d7a0
JD
1655if test -n "$CONFIG_SITE"; then
1656 set x "$CONFIG_SITE"
1657elif test "x$prefix" != xNONE; then
1658 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1659else
1660 set x "$ac_default_prefix/share/config.site" \
1661 "$ac_default_prefix/etc/config.site"
ba4481b5 1662fi
ca81d7a0
JD
1663shift
1664for ac_site_file
1665do
ba4481b5 1666 if test -r "$ac_site_file"; then
c0d27fcc 1667 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1668echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1669 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1670 . "$ac_site_file"
1671 fi
1672done
1673
1674if test -r "$cache_file"; then
503d2be0
AS
1675 # Some versions of bash will fail to source /dev/null (special
1676 # files actually), so we avoid doing that.
1677 if test -f "$cache_file"; then
c0d27fcc 1678 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1679echo "$as_me: loading cache $cache_file" >&6;}
1680 case $cache_file in
ca81d7a0
JD
1681 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1682 *) . "./$cache_file";;
503d2be0
AS
1683 esac
1684 fi
ba4481b5 1685else
c0d27fcc 1686 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1687echo "$as_me: creating cache $cache_file" >&6;}
1688 >$cache_file
1689fi
1690
1691# Check that the precious variables saved in the cache have kept the same
1692# value.
1693ac_cache_corrupted=false
ca81d7a0 1694for ac_var in $ac_precious_vars; do
503d2be0
AS
1695 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1696 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1697 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1698 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1699 case $ac_old_set,$ac_new_set in
1700 set,)
c0d27fcc 1701 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1702echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1703 ac_cache_corrupted=: ;;
1704 ,set)
c0d27fcc 1705 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1706echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1707 ac_cache_corrupted=: ;;
1708 ,);;
1709 *)
1710 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1711 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1712echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1713 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1714echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1715 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1716echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1717 ac_cache_corrupted=:
503d2be0
AS
1718 fi;;
1719 esac
c0d27fcc 1720 # Pass precious variables to config.status.
503d2be0
AS
1721 if test "$ac_new_set" = set; then
1722 case $ac_new_val in
ca81d7a0 1723 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1724 *) ac_arg=$ac_var=$ac_new_val ;;
1725 esac
1726 case " $ac_configure_args " in
1727 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1728 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1729 esac
1730 fi
1731done
1732if $ac_cache_corrupted; then
c0d27fcc 1733 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1734echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1735 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1736echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1737 { (exit 1); exit 1; }; }
ba4481b5
DL
1738fi
1739
c0d27fcc
MR
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
ba4481b5 1755
ca81d7a0
JD
1756ac_ext=c
1757ac_cpp='$CPP $CPPFLAGS'
1758ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1759ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1760ac_compiler_gnu=$ac_cv_c_compiler_gnu
6bae0ccf 1761
4b411bfe 1762
ca81d7a0 1763ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1764
c0d27fcc 1765
ba5da88a 1766test "$program_prefix" != NONE &&
ca81d7a0 1767 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1768# Use a double $ so make ignores it.
1769test "$program_suffix" != NONE &&
ca81d7a0 1770 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1771# Double any \ or $. echo might interpret backslashes.
1772# By default was `s,x,x', remove it if useless.
1773cat <<\_ACEOF >conftest.sed
1774s/[\\$]/&&/g;s/;s,x,x,$//
1775_ACEOF
1776program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
ca81d7a0 1777rm -f conftest.sed
ba5da88a 1778
c0d27fcc 1779
ba4481b5
DL
1780lispdir='${datadir}/emacs/${version}/lisp'
1781locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1782'${datadir}/emacs/site-lisp'
1783lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1784etcdir='${datadir}/emacs/${version}/etc'
1785archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1786docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1787gamedir='${localstatedir}/games/emacs'
98418dba
CW
1788
1789gameuser=games
1790
c0d27fcc 1791
ca81d7a0 1792# Check whether --with-gcc was given.
ba4481b5 1793if test "${with_gcc+set}" = set; then
ca81d7a0
JD
1794 withval=$with_gcc;
1795fi
503d2be0 1796
ba4481b5 1797
ca81d7a0 1798# Check whether --with-pop was given.
ba4481b5 1799if test "${with_pop+set}" = set; then
ca81d7a0 1800 withval=$with_pop; if test "$withval" = yes; then
c0d27fcc 1801 cat >>confdefs.h <<\_ACEOF
ba4481b5 1802#define MAIL_USE_POP 1
c0d27fcc 1803_ACEOF
ba4481b5 1804
243cf185
DL
1805else :
1806fi
3d9fec71 1807else
c0d27fcc 1808 cat >>confdefs.h <<\_ACEOF
3d9fec71 1809#define MAIL_USE_POP 1
c0d27fcc 1810_ACEOF
3d9fec71 1811
ca81d7a0
JD
1812fi
1813
ba4481b5 1814
c0d27fcc 1815
ca81d7a0 1816# Check whether --with-kerberos was given.
a21616bd 1817if test "${with_kerberos+set}" = set; then
ca81d7a0 1818 withval=$with_kerberos; cat >>confdefs.h <<\_ACEOF
a21616bd 1819#define KERBEROS 1
c0d27fcc 1820_ACEOF
a21616bd 1821
ca81d7a0
JD
1822fi
1823
a21616bd 1824
c0d27fcc 1825
ca81d7a0 1826# Check whether --with-kerberos5 was given.
a21616bd 1827if test "${with_kerberos5+set}" = set; then
ca81d7a0 1828 withval=$with_kerberos5; if test "${with_kerberos5+set}" = set; then
a21616bd
KR
1829 if test "${with_kerberos+set}" != set; then
1830 with_kerberos=yes
c0d27fcc 1831 cat >>confdefs.h <<\_ACEOF
a21616bd 1832#define KERBEROS 1
c0d27fcc 1833_ACEOF
a21616bd
KR
1834
1835 fi
1836fi
b936fae4 1837
c0d27fcc 1838cat >>confdefs.h <<\_ACEOF
a21616bd 1839#define KERBEROS5 1
c0d27fcc 1840_ACEOF
a21616bd 1841
ca81d7a0 1842fi
b936fae4 1843
4b411bfe 1844
ca81d7a0
JD
1845# Check whether --with-hesiod was given.
1846if test "${with_hesiod+set}" = set; then
1847 withval=$with_hesiod;
c0d27fcc 1848cat >>confdefs.h <<\_ACEOF
ba4481b5 1849#define HESIOD 1
c0d27fcc 1850_ACEOF
ba4481b5 1851
ca81d7a0
JD
1852fi
1853
ba4481b5 1854
c0d27fcc 1855
ca81d7a0 1856# Check whether --with-sound was given.
2c9dccc9 1857if test "${with_sound+set}" = set; then
ca81d7a0
JD
1858 withval=$with_sound;
1859fi
2c9dccc9 1860
2c9dccc9 1861
c0d27fcc 1862
ca81d7a0 1863# Check whether --with-x-toolkit was given.
ba4481b5 1864if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1865 withval=$with_x_toolkit; case "${withval}" in
ba4481b5
DL
1866 y | ye | yes ) val=athena ;;
1867 n | no ) val=no ;;
1868 l | lu | luc | luci | lucid ) val=lucid ;;
1869 a | at | ath | athe | athen | athena ) val=athena ;;
1870 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1871 g | gt | gtk ) val=gtk ;;
ba4481b5 1872 * )
c0d27fcc 1873{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1874this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1875Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1876echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1877this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1878Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1879 { (exit 1); exit 1; }; }
ba4481b5
DL
1880 ;;
1881 esac
1882 with_x_toolkit=$val
1883
ca81d7a0 1884fi
8eeae1c9 1885
ca81d7a0
JD
1886
1887# Check whether --with-xpm was given.
ba4481b5 1888if test "${with_xpm+set}" = set; then
ca81d7a0
JD
1889 withval=$with_xpm;
1890fi
503d2be0 1891
ba4481b5 1892
ca81d7a0 1893# Check whether --with-jpeg was given.
ba4481b5 1894if test "${with_jpeg+set}" = set; then
ca81d7a0
JD
1895 withval=$with_jpeg;
1896fi
503d2be0 1897
ba4481b5 1898
ca81d7a0 1899# Check whether --with-tiff was given.
ba4481b5 1900if test "${with_tiff+set}" = set; then
ca81d7a0
JD
1901 withval=$with_tiff;
1902fi
503d2be0 1903
ba4481b5 1904
ca81d7a0 1905# Check whether --with-gif was given.
ba4481b5 1906if test "${with_gif+set}" = set; then
ca81d7a0
JD
1907 withval=$with_gif;
1908fi
503d2be0 1909
ba4481b5 1910
ca81d7a0 1911# Check whether --with-png was given.
ba4481b5 1912if test "${with_png+set}" = set; then
ca81d7a0
JD
1913 withval=$with_png;
1914fi
503d2be0 1915
ba4481b5 1916
ca81d7a0 1917# Check whether --with-gtk was given.
488dd4c4 1918if test "${with_gtk+set}" = set; then
ca81d7a0
JD
1919 withval=$with_gtk;
1920fi
488dd4c4 1921
488dd4c4 1922
ca81d7a0 1923# Check whether --with-pkg-config-prog was given.
488dd4c4 1924if test "${with_pkg_config_prog+set}" = set; then
ca81d7a0
JD
1925 withval=$with_pkg_config_prog;
1926fi
488dd4c4 1927
488dd4c4 1928
ca81d7a0 1929# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 1930if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0
JD
1931 withval=$with_toolkit_scroll_bars;
1932fi
503d2be0 1933
ba4481b5 1934
ca81d7a0 1935# Check whether --with-xim was given.
1d36487c 1936if test "${with_xim+set}" = set; then
ca81d7a0
JD
1937 withval=$with_xim;
1938fi
1d36487c 1939
ba4481b5 1940
ca81d7a0 1941# Check whether --with-carbon was given.
e0f712ba 1942if test "${with_carbon+set}" = set; then
ca81d7a0
JD
1943 withval=$with_carbon;
1944fi
e0f712ba 1945
ca81d7a0 1946# Check whether --enable-carbon-app was given.
6a3a24fa 1947if test "${enable_carbon_app+set}" = set; then
ca81d7a0
JD
1948 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
1949fi
1950
e0f712ba 1951
ca81d7a0 1952# Check whether --enable-asserts was given.
d0098f13 1953if test "${enable_asserts+set}" = set; then
ca81d7a0 1954 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
1955else
1956 USE_XASSERTS=no
ca81d7a0 1957fi
8eeae1c9 1958
ca81d7a0
JD
1959
1960# Check whether --enable-maintainer-mode was given.
19650fd6 1961if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 1962 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
1963else
1964 USE_MAINTAINER_MODE=no
ca81d7a0
JD
1965fi
1966
19650fd6
AS
1967if test $USE_MAINTAINER_MODE = yes; then
1968 MAINT=
1969else
1970 MAINT=#
1971fi
1972
1973
ca81d7a0 1974# Check whether --enable-locallisppath was given.
9adfabc2 1975if test "${enable_locallisppath+set}" = set; then
ca81d7a0 1976 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
1977 locallisppath=
1978elif test "${enableval}" != "yes"; then
1979 locallisppath=${enableval}
1980fi
ca81d7a0
JD
1981fi
1982
9adfabc2 1983
ba4481b5 1984#### Make srcdir absolute, if it isn't already. It's important to
17494071 1985#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1986#### give you automounter prefixes, which can go away. We do all this
1987#### so Emacs can find its files when run uninstalled.
17494071
GM
1988## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1989unset CDPATH
ba4481b5
DL
1990case "${srcdir}" in
1991 /* ) ;;
1992 . )
1993 ## We may be able to use the $PWD environment variable to make this
1994 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
1995 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1996 ## but that tested only for a well-formed and valid PWD,
1997 ## it did not object when PWD was well-formed and valid but just wrong.
1998 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
1999 then
2000 srcdir="$PWD"
2001 else
2002 srcdir="`(cd ${srcdir}; pwd)`"
2003 fi
2004 ;;
2005 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2006esac
2007
2008#### Check if the source directory already has a configured system in it.
2009if test `pwd` != `(cd ${srcdir} && pwd)` \
2010 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2011 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2012 as a build directory right now; it has been configured in its own
2013 right. To configure in another directory as well, you MUST
2014 use GNU make. If you do not have GNU make, then you must
2015 now do \`make distclean' in ${srcdir},
2016 and then run $0 again." >&5
2017echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2018 as a build directory right now; it has been configured in its own
2019 right. To configure in another directory as well, you MUST
2020 use GNU make. If you do not have GNU make, then you must
2021 now do \`make distclean' in ${srcdir},
503d2be0 2022 and then run $0 again." >&2;}
ba4481b5
DL
2023fi
2024
2025#### Given the configuration name, set machfile and opsysfile to the
2026#### names of the m/*.h and s/*.h files we should use.
2027
2028### Canonicalize the configuration name.
2029
2030ac_aux_dir=
ca81d7a0
JD
2031for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2032 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2033 ac_aux_dir=$ac_dir
2034 ac_install_sh="$ac_aux_dir/install-sh -c"
2035 break
ca81d7a0 2036 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2037 ac_aux_dir=$ac_dir
2038 ac_install_sh="$ac_aux_dir/install.sh -c"
2039 break
ca81d7a0 2040 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2041 ac_aux_dir=$ac_dir
2042 ac_install_sh="$ac_aux_dir/shtool install -c"
2043 break
ba4481b5
DL
2044 fi
2045done
2046if test -z "$ac_aux_dir"; then
ca81d7a0
JD
2047 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2048echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2049 { (exit 1); exit 1; }; }
ba4481b5 2050fi
ca81d7a0
JD
2051
2052# These three variables are undocumented and unsupported,
2053# and are intended to be withdrawn in a future Autoconf release.
2054# They can cause serious problems if a builder's source tree is in a directory
2055# whose full name contains unusual characters.
2056ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2057ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2058ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2059
ba4481b5
DL
2060
2061# Make sure we can run config.sub.
ca81d7a0
JD
2062$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2063 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2064echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2065 { (exit 1); exit 1; }; }
2066
ca81d7a0
JD
2067{ echo "$as_me:$LINENO: checking build system type" >&5
2068echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2069if test "${ac_cv_build+set}" = set; then
2070 echo $ECHO_N "(cached) $ECHO_C" >&6
2071else
ca81d7a0
JD
2072 ac_build_alias=$build_alias
2073test "x$ac_build_alias" = x &&
2074 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2075test "x$ac_build_alias" = x &&
c0d27fcc 2076 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2077echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2078 { (exit 1); exit 1; }; }
ca81d7a0
JD
2079ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2080 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2081echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2082 { (exit 1); exit 1; }; }
2083
2084fi
ca81d7a0
JD
2085{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2086echo "${ECHO_T}$ac_cv_build" >&6; }
2087case $ac_cv_build in
2088*-*-*) ;;
2089*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2090echo "$as_me: error: invalid value of canonical build" >&2;}
2091 { (exit 1); exit 1; }; };;
2092esac
503d2be0 2093build=$ac_cv_build
ca81d7a0
JD
2094ac_save_IFS=$IFS; IFS='-'
2095set x $ac_cv_build
2096shift
2097build_cpu=$1
2098build_vendor=$2
2099shift; shift
2100# Remember, the first character of IFS is used to create $*,
2101# except with old shells:
2102build_os=$*
2103IFS=$ac_save_IFS
2104case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2105
2106
2107{ echo "$as_me:$LINENO: checking host system type" >&5
2108echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2109if test "${ac_cv_host+set}" = set; then
2110 echo $ECHO_N "(cached) $ECHO_C" >&6
2111else
ca81d7a0
JD
2112 if test "x$host_alias" = x; then
2113 ac_cv_host=$ac_cv_build
2114else
2115 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2116 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2117echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2118 { (exit 1); exit 1; }; }
ca81d7a0 2119fi
503d2be0
AS
2120
2121fi
ca81d7a0
JD
2122{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2123echo "${ECHO_T}$ac_cv_host" >&6; }
2124case $ac_cv_host in
2125*-*-*) ;;
2126*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2127echo "$as_me: error: invalid value of canonical host" >&2;}
2128 { (exit 1); exit 1; }; };;
2129esac
503d2be0 2130host=$ac_cv_host
ca81d7a0
JD
2131ac_save_IFS=$IFS; IFS='-'
2132set x $ac_cv_host
2133shift
2134host_cpu=$1
2135host_vendor=$2
2136shift; shift
2137# Remember, the first character of IFS is used to create $*,
2138# except with old shells:
2139host_os=$*
2140IFS=$ac_save_IFS
2141case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2142
c0d27fcc 2143
ba4481b5 2144canonical=$host
531a3336 2145configuration=${host_alias-$host}
ba4481b5 2146
c0d27fcc 2147
22044edf 2148
ba4481b5
DL
2149### If you add support for a new configuration, add code to this
2150### switch statement to recognize your configuration name and select
2151### the appropriate operating system and machine description files.
2152
2153### You would hope that you could choose an m/*.h file pretty much
2154### based on the machine portion of the configuration name, and an s-
2155### file based on the operating system portion. However, it turns out
2156### that each m/*.h file is pretty manufacturer-specific - for
2157### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
2158### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
2159### machines. So we basically have to have a special case for each
2160### configuration name.
2161###
2162### As far as handling version numbers on operating systems is
2163### concerned, make sure things will fail in a fixable way. If
2164### /etc/MACHINES doesn't say anything about version numbers, be
2165### prepared to handle anything reasonably. If version numbers
2166### matter, be sure /etc/MACHINES says something about it.
2167###
2168### Eric Raymond says we should accept strings like "sysvr4" to mean
2169### "System V Release 4"; he writes, "The old convention encouraged
2170### confusion between `system' and `release' levels'."
2171
2172machine='' opsys='' unported=no
2173case "${canonical}" in
2174
1096bcc0
GM
2175 ## FreeBSD ports
2176 *-*-freebsd* )
2177 opsys=freebsd
2178 case "${canonical}" in
2179 alpha*-*-freebsd*) machine=alpha ;;
ec8fcb10
YM
2180 ia64-*-freebsd*) machine=ia64 ;;
2181 sparc64-*-freebsd*) machine=sparc ;;
2182 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2183 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 2184 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2185 esac
2186 ;;
2187
ba4481b5
DL
2188 ## NetBSD ports
2189 *-*-netbsd* )
2190 opsys=netbsd
dd038e26 2191 if test -f /usr/lib/crti.o; then
f57bd967
DL
2192
2193cat >>confdefs.h <<\_ACEOF
2194#define HAVE_CRTIN
dd038e26
AS
2195_ACEOF
2196
2197 fi
2198
ba4481b5
DL
2199 case "${canonical}" in
2200 alpha*-*-netbsd*) machine=alpha ;;
2201 i[3456]86-*-netbsd*) machine=intel386 ;;
2202 m68k-*-netbsd*)
2203 # This is somewhat bogus.
2204 machine=hp9000s300 ;;
2205 powerpc-apple-netbsd*) machine=macppc ;;
2206 mips-*-netbsd*) machine=pmax ;;
2df636f4 2207 mipsel-*-netbsd*) machine=pmax ;;
97836269 2208 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 2209 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 2210 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2211 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2212 vax-*-netbsd*) machine=vax ;;
2df636f4 2213 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
2214 esac
2215 ;;
2216
2217 ## OpenBSD ports
2218 *-*-openbsd* )
2219 opsys=openbsd
2220 case "${canonical}" in
2221 alpha*-*-openbsd*) machine=alpha ;;
2222 i386-*-openbsd*) machine=intel386 ;;
4713fa76 2223 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2224 m68k-*-openbsd*) machine=hp9000s300 ;;
2225 mipsel-*-openbsd*) machine=pmax ;;
2226 ns32k-*-openbsd*) machine=ns32000 ;;
2227 sparc-*-openbsd*) machine=sparc ;;
2228 vax-*-openbsd*) machine=vax ;;
2229 esac
2230 ;;
2231
10a3b1a1
EZ
2232 ## LynxOS ports
2233 *-*-lynxos* )
2234 opsys=lynxos
2235 case "${canonical}" in
2236 i[3456]86-*-lynxos*) machine=intel386 ;;
2237 powerpc-*-lynxos*) machine=powerpc ;;
2238 esac
2239 ;;
2240
ba4481b5
DL
2241 ## Acorn RISCiX:
2242 arm-acorn-riscix1.1* )
2243 machine=acorn opsys=riscix1-1
2244 ;;
2245 arm-acorn-riscix1.2* | arm-acorn-riscix )
2246 ## This name is riscix12 instead of riscix1.2
2247 ## to avoid a file name conflict on MSDOS.
2248 machine=acorn opsys=riscix12
2249 ;;
2250
2251 ## BSDI ports
2252 *-*-bsdi* )
2253 opsys=bsdi
2254 case "${canonical}" in
2255 i[345]86-*-bsdi*) machine=intel386 ;;
2256 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 2257 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
2258 esac
2259 case "${canonical}" in
2260 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
2261 *-*-bsdi2.0* ) opsys=bsdos2 ;;
2262 *-*-bsdi2* ) opsys=bsdos2-1 ;;
2263 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 2264 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
2265 esac
2266 ;;
2267
2268 ## Alliant machines
2269 ## Strictly speaking, we need the version of the alliant operating
2270 ## system to choose the right machine file, but currently the
2271 ## configuration name doesn't tell us enough to choose the right
2272 ## one; we need to give alliants their own operating system name to
2273 ## do this right. When someone cares, they can help us.
2274 fx80-alliant-* )
2275 machine=alliant4 opsys=bsd4-2
2276 ;;
2277 i860-alliant-* )
2278 machine=alliant-2800 opsys=bsd4-3
2279 ;;
2280
2281 ## Alpha (DEC) machines.
2282 alpha*-dec-osf* )
2283 machine=alpha opsys=osf1
2284 # This is needed to find X11R6.1 libraries for certain tests.
2285 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
2286 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
2287 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
2288 # due to non-traditional preprocessing with the current compiler
2289 # defaults. OSF 4 can also have that compiler version, and there
2290 # seems always to have been a usable /usr/bin/cpp.
2291 NON_GNU_CPP=/usr/bin/cpp
ca512671 2292 case "${canonical}" in
a55b799a 2293 alpha*-dec-osf[5-9]*)
bb17930d 2294 opsys=osf5-0 ;;
ca512671 2295 esac
ba4481b5
DL
2296 ;;
2297
2298 alpha*-*-linux-gnu* )
2299 machine=alpha opsys=gnu-linux
2300 ;;
2301
c4bb2108
DL
2302 arm*-*-linux-gnu* )
2303 machine=arm opsys=gnu-linux
2304 ;;
2305
ba4481b5
DL
2306 ## Altos 3068
2307 m68*-altos-sysv* )
2308 machine=altos opsys=usg5-2
2309 ;;
2310
2311 ## Amdahl UTS
2312 580-amdahl-sysv* )
2313 machine=amdahl opsys=usg5-2-2
2314 ;;
2315
2316 ## Apollo, Domain/OS
2317 m68*-apollo-* )
2318 machine=apollo opsys=bsd4-3
2319 ;;
2320
2321 ## AT&T 3b2, 3b5, 3b15, 3b20
2322 we32k-att-sysv* )
2323 machine=att3b opsys=usg5-2-2
2324 ;;
2325
2326 ## AT&T 3b1 - The Mighty Unix PC!
2327 m68*-att-sysv* )
2328 machine=7300 opsys=usg5-2-2
2329 ;;
2330
2331 ## Bull dpx20
2332 rs6000-bull-bosx* )
2333 machine=ibmrs6000 opsys=aix3-2
2334 ;;
2335
2336 ## Bull dpx2
2337 m68*-bull-sysv3* )
2338 machine=dpx2 opsys=usg5-3
2339 ;;
2340
2341 ## Bull sps7
2342 m68*-bull-sysv2* )
2343 machine=sps7 opsys=usg5-2
2344 ;;
2345
2346 ## CCI 5/32, 6/32 -- see "Tahoe".
2347
2348 ## Celerity
2349 ## I don't know what configuration name to use for this; config.sub
2350 ## doesn't seem to know anything about it. Hey, Celerity users, get
2351 ## in touch with us!
2352 celerity-celerity-bsd* )
2353 machine=celerity opsys=bsd4-2
2354 ;;
2355
2356 ## Clipper
2357 ## What operating systems does this chip run that Emacs has been
2358 ## tested on?
2359 clipper-* )
2360 machine=clipper
2361 ## We'll use the catch-all code at the bottom to guess the
2362 ## operating system.
2363 ;;
2364
df645f7c
AS
2365 ## Compaq Nonstop
2366 mips-compaq-nonstopux* )
2367 machine=nonstopux opsys=nonstopux
2368 ;;
2369
ba4481b5
DL
2370 ## Convex
2371 *-convex-bsd* | *-convex-convexos* )
2372 machine=convex opsys=bsd4-3
2373 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
2374 NON_GNU_CPP="cc -E -P"
2375 ;;
2376
2377 ## Cubix QBx/386
2378 i[3456]86-cubix-sysv* )
2379 machine=intel386 opsys=usg5-3
2380 ;;
2381
2382 ## Cydra 5
2383 cydra*-cydrome-sysv* )
2384 machine=cydra5 opsys=usg5-3
2385 ;;
2386
2387 ## Data General AViiON Machines
2388 ## DG changed naming conventions with the release of 5.4.4.10, they
2389 ## dropped the initial 5.4 but left the intervening R. Because of the
2390 ## R this shouldn't conflict with older versions of the OS (which I
2391 ## think were named like dgux4.*). In addition, DG new AViiONs series
2392 ## uses either Motorola M88k or Intel Pentium CPUs.
2393 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
2394 machine=aviion opsys=dgux4
2395 ;;
2396 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
2397 ## This name is dgux5-4-3 instead of dgux5-4r3
2398 ## to avoid a file name conflict on MSDOS.
2399 machine=aviion opsys=dgux5-4-3
2400 ;;
2401 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
2402 machine=aviion opsys=dgux5-4r2
2403 ;;
2404 m88k-dg-dgux* )
2405 machine=aviion opsys=dgux
2406 ;;
2407
2408 ## Data General AViiON Intel (x86) Machines
2409 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
2410 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
2411 i[345]86-dg-dguxR4* )
2412 machine=aviion-intel opsys=dgux4
2413 ;;
2414
2415 ## DECstations
2416 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
2417 machine=pmax opsys=bsd4-2
2418 ;;
2419 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
2420 machine=pmax opsys=bsd4-3
2421 ;;
2422 mips-dec-ultrix* )
2423 machine=pmax opsys=ultrix4-3
2424 ;;
2425 mips-dec-osf* )
2426 machine=pmax opsys=osf1
2427 ;;
2428 mips-dec-mach_bsd4.3* )
2429 machine=pmax opsys=mach-bsd4-3
2430 ;;
2431
cd890796
JD
2432 ## Motorola Delta machines
2433 m68k-motorola-sysv* | m68000-motorola-sysv* )
2434 machine=delta opsys=usg5-3
2435 if test -z "`type gnucc | grep 'not found'`"
2436 then
2437 if test -s /etc/167config
2438 then CC="gnucc -m68040"
2439 else CC="gnucc -m68881"
2440 fi
2441 else
2442 if test -z "`type gcc | grep 'not found'`"
2443 then CC=gcc
2444 else CC=cc
2445 fi
2446 fi
2447 ;;
ba4481b5
DL
2448 m88k-motorola-sysv4* )
2449 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
2450 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
2451 # I hope there are not other 4.0 versions for this machine
2452 # which really need usg5-4 instead.
2453 machine=delta88k opsys=usg5-4-2
2454 ;;
2455 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
2456 machine=delta88k opsys=usg5-3
2457 ;;
2458
2459 ## Dual machines
2460 m68*-dual-sysv* )
2461 machine=dual opsys=usg5-2
2462 ;;
2463 m68*-dual-uniplus* )
2464 machine=dual opsys=unipl5-2
2465 ;;
2466
2467 ## Elxsi 6400
2468 elxsi-elxsi-sysv* )
2469 machine=elxsi opsys=usg5-2
2470 ;;
2471
2472 ## Encore machines
2473 ns16k-encore-bsd* )
2474 machine=ns16000 opsys=umax
2475 ;;
2476
65171e3a
DL
2477 ## The GEC 63 - apparently, this port isn't really finished yet.
2478 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
2479
2480 ## Gould Power Node and NP1
2481 pn-gould-bsd4.2* )
2482 machine=gould opsys=bsd4-2
2483 ;;
2484 pn-gould-bsd4.3* )
2485 machine=gould opsys=bsd4-3
2486 ;;
2487 np1-gould-bsd* )
2488 machine=gould-np1 opsys=bsd4-3
2489 ;;
2490
2491 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2492 ## as far as Emacs is concerned).
2493 m88k-harris-cxux* )
2494 # Build needs to be different on 7.0 and later releases
2495 case "`uname -r`" in
2496 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2497 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2498 esac
2499 NON_GNU_CPP="/lib/cpp"
2500 ;;
2501 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2502 m68k-harris-cxux* )
2503 machine=nh3000 opsys=cxux
2504 ;;
2505 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2506 powerpc-harris-powerunix )
2507 machine=nh6000 opsys=powerunix
2508 NON_GNU_CPP="cc -Xo -E -P"
2509 ;;
2510 ## SR2001/SR2201 running HI-UX/MPP
2511 hppa1.1-hitachi-hiuxmpp* )
2512 machine=sr2k opsys=hiuxmpp
2513 ;;
89a336fa
GM
2514 hppa1.1-hitachi-hiuxwe2* )
2515 machine=sr2k opsys=hiuxwe2
2516 ;;
ba4481b5
DL
2517 ## Honeywell XPS100
2518 xps*-honeywell-sysv* )
2519 machine=xps100 opsys=usg5-2
2520 ;;
2521
2522 ## HP 9000 series 200 or 300
2523 m68*-hp-bsd* )
2524 machine=hp9000s300 opsys=bsd4-3
2525 ;;
2526 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2527 m68*-hp-hpux* )
2528 case "`uname -r`" in
2529 ## Someone's system reports A.B8.05 for this.
2530 ## I wonder what other possibilities there are.
2531 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2532 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2533 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2534 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2535 *) machine=hp9000s300 opsys=hpux ;;
2536 esac
2537 ;;
2538
2539 ## HP 9000 series 700 and 800, running HP/UX
2540 hppa*-hp-hpux7* )
2541 machine=hp800 opsys=hpux
2542 ;;
2543 hppa*-hp-hpux8* )
2544 machine=hp800 opsys=hpux8
2545 ;;
2546 hppa*-hp-hpux9shr* )
2547 machine=hp800 opsys=hpux9shr
2548 ;;
2549 hppa*-hp-hpux9* )
2550 machine=hp800 opsys=hpux9
2551 ;;
b0e44248
RB
2552 hppa*-hp-hpux10.2* )
2553 machine=hp800 opsys=hpux10-20
2554 ;;
cc227489 2555 hppa*-hp-hpux10* )
ba4481b5
DL
2556 machine=hp800 opsys=hpux10
2557 ;;
cc227489
MB
2558 hppa*-hp-hpux1[1-9]* )
2559 machine=hp800 opsys=hpux11
7c00e1e9 2560 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
cc227489 2561 ;;
ba4481b5 2562
409d9577
GM
2563 hppa*-*-linux-gnu* )
2564 machine=hp800 opsys=gnu-linux
2565 ;;
2566
ba4481b5
DL
2567 ## HP 9000 series 700 and 800, running HP/UX
2568 hppa*-hp-hpux* )
2569 ## Cross-compilation? Nah!
2570 case "`uname -r`" in
2571 ## Someone's system reports A.B8.05 for this.
2572 ## I wonder what other possibilities there are.
2573 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2574 *.08.* ) machine=hp800 opsys=hpux8 ;;
2575 *.09.* ) machine=hp800 opsys=hpux9 ;;
2576 *) machine=hp800 opsys=hpux10 ;;
2577 esac
2578 ;;
2579 hppa*-*-nextstep* )
2580 machine=hp800 opsys=nextstep
2581 ;;
2582
2583 ## Orion machines
2584 orion-orion-bsd* )
2585 machine=orion opsys=bsd4-2
2586 ;;
2587 clipper-orion-bsd* )
2588 machine=orion105 opsys=bsd4-2
2589 ;;
2590
2591 ## IBM machines
2592 i[3456]86-ibm-aix1.1* )
2593 machine=ibmps2-aix opsys=usg5-2-2
2594 ;;
2595 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2596 machine=ibmps2-aix opsys=usg5-3
2597 ;;
2598 i370-ibm-aix*)
2599 machine=ibm370aix opsys=usg5-3
2600 ;;
55597d70 2601 s390-*-linux-gnu* )
138f0859
GM
2602 machine=ibms390 opsys=gnu-linux
2603 ;;
bcdb1378
EZ
2604 s390x-*-linux-gnu* )
2605 machine=ibms390x opsys=gnu-linux
2606 ;;
ba4481b5
DL
2607 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2608 machine=ibmrs6000 opsys=aix3-1
2609 ;;
2610 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2611 machine=ibmrs6000 opsys=aix3-2-5
2612 ;;
2613 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2614 machine=ibmrs6000 opsys=aix4-1
2615 ;;
2616 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2617 machine=ibmrs6000 opsys=aix4-2
2618 ;;
55597d70 2619 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2620 machine=ibmrs6000 opsys=aix4-2
2621 ;;
ba4481b5
DL
2622 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2623 machine=ibmrs6000 opsys=aix4
2624 ;;
2625 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2626 machine=ibmrs6000 opsys=aix4-1
2627 ;;
2628 rs6000-ibm-aix* | powerpc-ibm-aix* )
2629 machine=ibmrs6000 opsys=aix3-2
2630 ;;
2631 romp-ibm-bsd4.3* )
2632 machine=ibmrt opsys=bsd4-3
2633 ;;
2634 romp-ibm-bsd4.2* )
2635 machine=ibmrt opsys=bsd4-2
2636 ;;
2637 romp-ibm-aos4.3* )
2638 machine=ibmrt opsys=bsd4-3
2639 ;;
2640 romp-ibm-aos4.2* )
2641 machine=ibmrt opsys=bsd4-2
2642 ;;
2643 romp-ibm-aos* )
2644 machine=ibmrt opsys=bsd4-3
2645 ;;
2646 romp-ibm-bsd* )
2647 machine=ibmrt opsys=bsd4-3
2648 ;;
2649 romp-ibm-aix* )
2650 machine=ibmrt-aix opsys=usg5-2-2
2651 ;;
2652
2653 ## Integrated Solutions `Optimum V'
2654 m68*-isi-bsd4.2* )
2655 machine=isi-ov opsys=bsd4-2
2656 ;;
2657 m68*-isi-bsd4.3* )
2658 machine=isi-ov opsys=bsd4-3
2659 ;;
2660
2661 ## Intel 386 machines where we do care about the manufacturer
2662 i[3456]86-intsys-sysv* )
2663 machine=is386 opsys=usg5-2-2
2664 ;;
2665
2666 ## Prime EXL
2667 i[3456]86-prime-sysv* )
2668 machine=i386 opsys=usg5-3
2669 ;;
2670
2671 ## Sequent Symmetry running Dynix
2672 i[3456]86-sequent-bsd* )
2673 machine=symmetry opsys=bsd4-3
2674 ;;
2675
2676 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2677 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2678 machine=sequent-ptx opsys=ptx4
2679 NON_GNU_CPP=/lib/cpp
2680 ;;
2681
2682 ## Sequent Symmetry running DYNIX/ptx
2683 ## Use the old cpp rather than the newer ANSI one.
2684 i[3456]86-sequent-ptx* )
2685 machine=sequent-ptx opsys=ptx
2686 NON_GNU_CPP="/lib/cpp"
2687 ;;
2688
2689 ## ncr machine running svr4.3.
2690 i[3456]86-ncr-sysv4.3 )
2691 machine=ncr386 opsys=usg5-4-3
2692 ;;
2693
2694 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2695 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2696 i[3456]86-ncr-sysv* )
2697 machine=ncr386 opsys=usg5-4-2
2698 ;;
2699
2700 ## Intel Paragon OSF/1
2701 i860-intel-osf1* )
2702 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2703 ;;
2704
2705 ## Intel 860
2706 i860-*-sysv4* )
2707 machine=i860 opsys=usg5-4
2708 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2709 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2710 ;;
2711
c76e04a8
GM
2712 ## Macintosh PowerPC
2713 powerpc*-*-linux-gnu* )
2714 machine=macppc opsys=gnu-linux
2715 ;;
2716
ba4481b5
DL
2717 ## Masscomp machines
2718 m68*-masscomp-rtu* )
2719 machine=masscomp opsys=rtu
2720 ;;
2721
2722 ## Megatest machines
2723 m68*-megatest-bsd* )
2724 machine=mega68 opsys=bsd4-2
2725 ;;
2726
2727 ## Workstations sold by MIPS
2728 ## This is not necessarily all workstations using the MIPS processor -
2729 ## Irises are produced by SGI, and DECstations by DEC.
2730
2731 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2732 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2733 ## it gives for choosing between the alternatives seems to be "Use
2734 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2735 ## the BSD world." I'll assume that these are instructions for
2736 ## handling two odd situations, and that every other situation
2737 ## should use mips.h and usg5-2-2, they being listed first.
2738 mips-mips-usg* )
2739 machine=mips4
2740 ## Fall through to the general code at the bottom to decide on the OS.
2741 ;;
2742 mips-mips-riscos4* )
2743 machine=mips4 opsys=bsd4-3
2744 NON_GNU_CC="cc -systype bsd43"
2745 NON_GNU_CPP="cc -systype bsd43 -E"
2746 ;;
2747 mips-mips-riscos5* )
2748 machine=mips4 opsys=riscos5
2749 NON_GNU_CC="cc -systype bsd43"
2750 NON_GNU_CPP="cc -systype bsd43 -E"
2751 ;;
2752 mips-mips-bsd* )
2753 machine=mips opsys=bsd4-3
2754 ;;
2755 mips-mips-* )
2756 machine=mips opsys=usg5-2-2
2757 ;;
2758
2759 ## NeXT
2760 m68*-next-* | m68k-*-nextstep* )
2761 machine=m68k opsys=nextstep
2762 ;;
2763
2764 ## The complete machine from National Semiconductor
2765 ns32k-ns-genix* )
2766 machine=ns32000 opsys=usg5-2
2767 ;;
2768
2769 ## NCR machines
2770 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2771 machine=tower32 opsys=usg5-2-2
2772 ;;
2773 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2774 machine=tower32v3 opsys=usg5-3
2775 ;;
2776
2777 ## NEC EWS4800
2778 mips-nec-sysv4*)
2779 machine=ews4800 opsys=ux4800
2780 ;;
2781
2782 ## Nixdorf Targon 31
2783 m68*-nixdorf-sysv* )
2784 machine=targon31 opsys=usg5-2-2
2785 ;;
2786
2787 ## Nu (TI or LMI)
2788 m68*-nu-sysv* )
2789 machine=nu opsys=usg5-2
2790 ;;
2791
2792 ## Plexus
2793 m68*-plexus-sysv* )
2794 machine=plexus opsys=usg5-2
2795 ;;
2796
ba4481b5
DL
2797 ## Pyramid machines
2798 ## I don't really have any idea what sort of processor the Pyramid has,
2799 ## so I'm assuming it is its own architecture.
2800 pyramid-pyramid-bsd* )
2801 machine=pyramid opsys=bsd4-2
2802 ;;
2803
2804 ## Sequent Balance
2805 ns32k-sequent-bsd4.2* )
2806 machine=sequent opsys=bsd4-2
2807 ;;
2808 ns32k-sequent-bsd4.3* )
2809 machine=sequent opsys=bsd4-3
2810 ;;
2811
2812 ## Siemens Nixdorf
2813 mips-siemens-sysv* | mips-sni-sysv*)
2814 machine=mips-siemens opsys=usg5-4
2815 NON_GNU_CC=/usr/ccs/bin/cc
2816 NON_GNU_CPP=/usr/ccs/lib/cpp
2817 ;;
2818
2819 ## Silicon Graphics machines
2820 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2821 m68*-sgi-iris3.5* )
2822 machine=irist opsys=iris3-5
2823 ;;
2824 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2825 machine=irist opsys=iris3-6
2826 ;;
2827 ## Iris 4D
2828 mips-sgi-irix3* )
2829 machine=iris4d opsys=irix3-3
2830 ;;
2831 mips-sgi-irix4* )
2832 machine=iris4d opsys=irix4-0
2833 ;;
2834 mips-sgi-irix6.5 )
2835 machine=iris4d opsys=irix6-5
946173ad
DL
2836 # Without defining _LANGUAGE_C, things get masked out in the headers
2837 # so that, for instance, grepping for `free' in stdlib.h fails and
2838 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2839 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2840 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2841 ;;
2842 mips-sgi-irix6* )
2843 machine=iris4d opsys=irix6-0
c4bb2108 2844 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2845 # but presumably it does no harm.
2846 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2847 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2848 NON_GCC_TEST_OPTIONS=-32
2849 ;;
2850 mips-sgi-irix5.[01]* )
2851 machine=iris4d opsys=irix5-0
2852 ;;
2853 mips-sgi-irix5* | mips-sgi-irix* )
2854 machine=iris4d opsys=irix5-2
2855 ;;
2856
2857 ## SONY machines
2858 m68*-sony-bsd4.2* )
2859 machine=news opsys=bsd4-2
2860 ;;
2861 m68*-sony-bsd4.3* )
2862 machine=news opsys=bsd4-3
2863 ;;
2864 m68*-sony-newsos3* | m68*-sony-news3*)
2865 machine=news opsys=bsd4-3
2866 ;;
2867 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2868 machine=news-risc opsys=bsd4-3
2869 ;;
2870 mips-sony-newsos6* )
2871 machine=news-r6 opsys=newsos6
2872 ;;
2873 mips-sony-news* )
2874 machine=news-risc opsys=newsos5
2875 ;;
2876
2877 ## Stride
2878 m68*-stride-sysv* )
2879 machine=stride opsys=usg5-2
2880 ;;
2881
2882 ## Suns
2883 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2884 machine=sparc opsys=gnu-linux
2885 ;;
2886
d054101f 2887 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2888 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2889 | rs6000-*-solaris2*)
2890 case "${canonical}" in
2891 m68*-sunos1* ) machine=sun1 ;;
2892 m68*-sunos2* ) machine=sun2 ;;
2893 m68* ) machine=sun3 ;;
2894 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2895 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2896 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2897 powerpcle* ) machine=powerpcle ;;
2898 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2899 sparc* ) machine=sparc ;;
2900 * ) unported=yes ;;
2901 esac
2902 case "${canonical}" in
2903 ## The Sun386 didn't get past 4.0.
2904 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2905 *-sunos4.0* ) opsys=sunos4-0 ;;
2906 *-sunos4.1.[3-9]*noshare )
2907 ## This name is sunos413 instead of sunos4-1-3
2908 ## to avoid a file name conflict on MSDOS.
2909 opsys=sunos413
2910 NON_GNU_CPP=/usr/lib/cpp
2911 NON_GCC_TEST_OPTIONS=-Bstatic
2912 GCC_TEST_OPTIONS=-static
2913 ;;
2914 *-sunos4.1.[3-9]* | *-sunos4shr*)
2915 opsys=sunos4shr
2916 NON_GNU_CPP=/usr/lib/cpp
2917 ;;
2918 *-sunos4* | *-sunos )
2919 opsys=sunos4-1
2920 NON_GCC_TEST_OPTIONS=-Bstatic
2921 GCC_TEST_OPTIONS=-static
2922 ;;
2923 *-sunos5.3* | *-solaris2.3* )
2924 opsys=sol2-3
2925 NON_GNU_CPP=/usr/ccs/lib/cpp
2926 ;;
2927 *-sunos5.4* | *-solaris2.4* )
2928 opsys=sol2-4
2929 NON_GNU_CPP=/usr/ccs/lib/cpp
2930 RANLIB="ar -ts"
2931 ;;
2932 *-sunos5.5* | *-solaris2.5* )
2933 opsys=sol2-5
2934 NON_GNU_CPP=/usr/ccs/lib/cpp
2935 RANLIB="ar -ts"
2936 ;;
8e967cf7
MR
2937 *-sunos5.6* | *-solaris2.6* )
2938 opsys=sol2-6
2939 NON_GNU_CPP=/usr/ccs/lib/cpp
2940 RANLIB="ar -ts"
2941 ;;
ba4481b5 2942 *-sunos5* | *-solaris* )
9e71690e 2943 opsys=sol2-6
ba4481b5
DL
2944 NON_GNU_CPP=/usr/ccs/lib/cpp
2945 ;;
2946 * ) opsys=bsd4-2 ;;
2947 esac
2948 ## Watch out for a compiler that we know will not work.
2949 case "${canonical}" in
2950 *-solaris* | *-sunos5* )
2951 if [ "x$CC" = x/usr/ucb/cc ]; then
2952 ## /usr/ucb/cc doesn't work;
2953 ## we should find some other compiler that does work.
2954 unset CC
2955 fi
2956 ;;
2957 *) ;;
2958 esac
2959 ;;
2960 sparc-*-nextstep* )
2961 machine=sparc opsys=nextstep
2962 ;;
2963
2964 ## Tadpole 68k
2965 m68*-tadpole-sysv* )
2966 machine=tad68k opsys=usg5-3
2967 ;;
2968
2969 ## Tahoe machines
2970 tahoe-tahoe-bsd4.2* )
2971 machine=tahoe opsys=bsd4-2
2972 ;;
2973 tahoe-tahoe-bsd4.3* )
2974 machine=tahoe opsys=bsd4-3
2975 ;;
2976
2977 ## Tandem Integrity S2
2978 mips-tandem-sysv* )
2979 machine=tandem-s2 opsys=usg5-3
2980 ;;
2981
2982 ## Tektronix XD88
2983 m88k-tektronix-sysv3* )
2984 machine=tekxd88 opsys=usg5-3
2985 ;;
2986
2987 ## Tektronix 16000 box (6130?)
2988 ns16k-tektronix-bsd* )
2989 machine=ns16000 opsys=bsd4-2
2990 ;;
2991 ## Tektronix 4300
2992 ## src/m/tek4300.h hints that this is a m68k machine.
2993 m68*-tektronix-bsd* )
2994 machine=tek4300 opsys=bsd4-3
2995 ;;
2996
2997 ## Titan P2 or P3
2998 ## We seem to have lost the machine-description file titan.h!
2999 titan-titan-sysv* )
3000 machine=titan opsys=usg5-3
3001 ;;
3002
3003 ## Ustation E30 (SS5E)
3004 m68*-unisys-uniplus* )
3005 machine=ustation opsystem=unipl5-2
3006 ;;
3007
3008 ## Vaxen.
3009 vax-dec-* )
3010 machine=vax
3011 case "${canonical}" in
3012 *-bsd4.1* ) opsys=bsd4-1 ;;
3013 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
3014 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
3015 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
3016 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
3017 *-vms* ) opsys=vms ;;
3018 * ) unported=yes
3019 esac
3020 ;;
3021
3022 ## Whitechapel MG1
3023 ns16k-whitechapel-* )
3024 machine=mg1
3025 ## We don't know what sort of OS runs on these; we'll let the
3026 ## operating system guessing code below try.
3027 ;;
3028
3029 ## Wicat
3030 m68*-wicat-sysv* )
3031 machine=wicat opsys=usg5-2
3032 ;;
3033
f4988be7
GM
3034 ## IA-64
3035 ia64*-*-linux* )
3036 machine=ia64 opsys=gnu-linux
3037 ;;
3038
ba4481b5
DL
3039 ## Intel 386 machines where we don't care about the manufacturer
3040 i[3456]86-*-* )
3041 machine=intel386
3042 case "${canonical}" in
c60ee5e7 3043 *-cygwin ) opsys=cygwin ;;
eae54018 3044 *-darwin* ) opsys=darwin
23fd4483
ST
3045 CPP="${CC-cc} -E -no-cpp-precomp"
3046 ;;
ba4481b5
DL
3047 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
3048 *-isc2.2* ) opsys=isc2-2 ;;
3049 *-isc4.0* ) opsys=isc4-0 ;;
3050 *-isc4.* ) opsys=isc4-1
3051 GCC_TEST_OPTIONS=-posix
3052 NON_GCC_TEST_OPTIONS=-Xp
3053 ;;
3054 *-isc* ) opsys=isc3-0 ;;
3055 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
3056 *-esix* ) opsys=esix ;;
3057 *-xenix* ) opsys=xenix ;;
3058 *-linux-gnu* ) opsys=gnu-linux ;;
3059 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 3060 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
3061 NON_GNU_CPP=/lib/cpp
3062 # Prevent -belf from being passed to $CPP.
3063 # /lib/cpp does not accept it.
3064 OVERRIDE_CPPFLAGS=" "
3065 ;;
3066 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
3067 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3068 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 3069 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
3070 *-nextstep* ) opsys=nextstep ;;
3071 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3072 esac
3073 ;;
3074
3075 ## m68k Linux-based GNU system
3076 m68k-*-linux-gnu* )
3077 machine=m68k opsys=gnu-linux
3078 ;;
3079
3080 ## Mips Linux-based GNU system
cd958eb3 3081 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
3082 machine=mips opsys=gnu-linux
3083 ;;
3084
3085 ## UXP/DS
3086 sparc-fujitsu-sysv4* )
3087 machine=sparc opsys=uxpds
3088 NON_GNU_CPP=/usr/ccs/lib/cpp
3089 RANLIB="ar -ts"
3090 ;;
3091
3092 ## UXP/V
3093 f301-fujitsu-uxpv4.1)
3094 machine=f301 opsys=uxpv
3095 ;;
3096
e0f712ba
AC
3097 ## Darwin / Mac OS X
3098 powerpc-apple-darwin* )
3099 machine=powermac opsys=darwin
3100 # Define CPP as follows to make autoconf work correctly.
2a75d75d 3101 CPP="${CC-cc} -E -no-cpp-precomp"
8ae52ca6
RF
3102 # Use fink packages if available.
3103 if test -d /sw/include && test -d /sw/lib; then
3104 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
3105 CPP="${CPP} ${GCC_TEST_OPTIONS}"
3106 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
3107 fi
e0f712ba
AC
3108 ;;
3109
598a2813
AS
3110 ## AMD x86-64 Linux-based GNU system
3111 x86_64-*-linux-gnu* )
24b01ec4 3112 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
3113 ;;
3114
ba4481b5
DL
3115 * )
3116 unported=yes
3117 ;;
3118esac
3119
3120### If the code above didn't choose an operating system, just choose
3121### an operating system based on the configuration name. You really
3122### only want to use this when you have no idea what the right
3123### operating system is; if you know what operating systems a machine
3124### runs, it's cleaner to make it explicit in the case statement
3125### above.
3126if test x"${opsys}" = x; then
3127 case "${canonical}" in
3128 *-gnu* ) opsys=gnu ;;
3129 *-bsd4.[01] ) opsys=bsd4-1 ;;
3130 *-bsd4.2 ) opsys=bsd4-2 ;;
3131 *-bsd4.3 ) opsys=bsd4-3 ;;
3132 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
3133 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
3134 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
3135 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
3136 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
3137 *-sysv5uw* ) opsys=unixware ;;
3138 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
3139 *-sysv4.1* | *-sysvr4.1* )
3140 NON_GNU_CPP=/usr/lib/cpp
3141 opsys=usg5-4 ;;
3142 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
3143 if [ x$NON_GNU_CPP = x ]; then
3144 if [ -f /usr/ccs/lib/cpp ]; then
3145 NON_GNU_CPP=/usr/ccs/lib/cpp
3146 else
3147 NON_GNU_CPP=/lib/cpp
3148 fi
3149 fi
3150 opsys=usg5-4-2 ;;
3151 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
3152 * )
3153 unported=yes
3154 ;;
3155 esac
3156fi
3157
c0d27fcc 3158
22044edf 3159
ba4481b5 3160if test $unported = yes; then
c0d27fcc 3161 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
3162Check \`etc/MACHINES' for recognized configuration names." >&5
3163echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
3164Check \`etc/MACHINES' for recognized configuration names." >&2;}
3165 { (exit 1); exit 1; }; }
ba4481b5
DL
3166fi
3167
3168machfile="m/${machine}.h"
3169opsysfile="s/${opsys}.h"
3170
c0d27fcc 3171
ba4481b5
DL
3172#### Choose a compiler.
3173test -n "$CC" && cc_specified=yes
3174
3175# Save the value of CFLAGS that the user specified.
3176SPECIFIED_CFLAGS="$CFLAGS"
3177
3178case ${with_gcc} in
3179 "yes" ) CC="gcc" GCC=yes ;;
3180 "no" ) : ${CC=cc} ;;
503d2be0
AS
3181 * )
3182esac
3183ac_ext=c
3184ac_cpp='$CPP $CPPFLAGS'
3185ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3186ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3187ac_compiler_gnu=$ac_cv_c_compiler_gnu
3188if test -n "$ac_tool_prefix"; then
3189 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3190set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
3191{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3192echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3193if test "${ac_cv_prog_CC+set}" = set; then
3194 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3195else
3196 if test -n "$CC"; then
3197 ac_cv_prog_CC="$CC" # Let the user override the test.
3198else
c0d27fcc
MR
3199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3200for as_dir in $PATH
3201do
3202 IFS=$as_save_IFS
3203 test -z "$as_dir" && as_dir=.
3204 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 3205 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3206 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3207 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3208 break 2
3209 fi
3210done
503d2be0 3211done
ca81d7a0 3212IFS=$as_save_IFS
503d2be0 3213
ba4481b5
DL
3214fi
3215fi
503d2be0 3216CC=$ac_cv_prog_CC
ba4481b5 3217if test -n "$CC"; then
ca81d7a0
JD
3218 { echo "$as_me:$LINENO: result: $CC" >&5
3219echo "${ECHO_T}$CC" >&6; }
503d2be0 3220else
ca81d7a0
JD
3221 { echo "$as_me:$LINENO: result: no" >&5
3222echo "${ECHO_T}no" >&6; }
503d2be0
AS
3223fi
3224
ca81d7a0 3225
503d2be0
AS
3226fi
3227if test -z "$ac_cv_prog_CC"; then
3228 ac_ct_CC=$CC
3229 # Extract the first word of "gcc", so it can be a program name with args.
3230set dummy gcc; ac_word=$2
ca81d7a0
JD
3231{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3232echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3233if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3234 echo $ECHO_N "(cached) $ECHO_C" >&6
3235else
3236 if test -n "$ac_ct_CC"; then
3237 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3238else
c0d27fcc
MR
3239as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3240for as_dir in $PATH
3241do
3242 IFS=$as_save_IFS
3243 test -z "$as_dir" && as_dir=.
3244 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 3245 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3246 ac_cv_prog_ac_ct_CC="gcc"
3247 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3248 break 2
3249 fi
3250done
503d2be0 3251done
ca81d7a0 3252IFS=$as_save_IFS
503d2be0
AS
3253
3254fi
3255fi
3256ac_ct_CC=$ac_cv_prog_ac_ct_CC
3257if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3258 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3259echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 3260else
ca81d7a0
JD
3261 { echo "$as_me:$LINENO: result: no" >&5
3262echo "${ECHO_T}no" >&6; }
503d2be0
AS
3263fi
3264
ca81d7a0
JD
3265 if test "x$ac_ct_CC" = x; then
3266 CC=""
3267 else
3268 case $cross_compiling:$ac_tool_warned in
3269yes:)
3270{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3271whose name does not start with the host triplet. If you think this
3272configuration is useful to you, please write to autoconf@gnu.org." >&5
3273echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3274whose name does not start with the host triplet. If you think this
3275configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3276ac_tool_warned=yes ;;
3277esac
3278 CC=$ac_ct_CC
3279 fi
503d2be0
AS
3280else
3281 CC="$ac_cv_prog_CC"
ba4481b5
DL
3282fi
3283
3284if test -z "$CC"; then
ca81d7a0
JD
3285 if test -n "$ac_tool_prefix"; then
3286 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 3287set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
3288{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3289echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3290if test "${ac_cv_prog_CC+set}" = set; then
3291 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3292else
3293 if test -n "$CC"; then
3294 ac_cv_prog_CC="$CC" # Let the user override the test.
3295else
c0d27fcc
MR
3296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3297for as_dir in $PATH
3298do
3299 IFS=$as_save_IFS
3300 test -z "$as_dir" && as_dir=.
3301 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 3302 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3303 ac_cv_prog_CC="${ac_tool_prefix}cc"
3304 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3305 break 2
3306 fi
3307done
503d2be0 3308done
ca81d7a0 3309IFS=$as_save_IFS
503d2be0
AS
3310
3311fi
3312fi
3313CC=$ac_cv_prog_CC
3314if test -n "$CC"; then
ca81d7a0
JD
3315 { echo "$as_me:$LINENO: result: $CC" >&5
3316echo "${ECHO_T}$CC" >&6; }
4b411bfe 3317else
ca81d7a0
JD
3318 { echo "$as_me:$LINENO: result: no" >&5
3319echo "${ECHO_T}no" >&6; }
4b411bfe
CY
3320fi
3321
4b411bfe 3322
ca81d7a0 3323 fi
503d2be0
AS
3324fi
3325if test -z "$CC"; then
3326 # Extract the first word of "cc", so it can be a program name with args.
3327set dummy cc; ac_word=$2
ca81d7a0
JD
3328{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3329echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3330if test "${ac_cv_prog_CC+set}" = set; then
3331 echo $ECHO_N "(cached) $ECHO_C" >&6
3332else
3333 if test -n "$CC"; then
3334 ac_cv_prog_CC="$CC" # Let the user override the test.
3335else
3336 ac_prog_rejected=no
c0d27fcc
MR
3337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3338for as_dir in $PATH
3339do
3340 IFS=$as_save_IFS
3341 test -z "$as_dir" && as_dir=.
3342 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 3343 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3344 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3345 ac_prog_rejected=yes
3346 continue
3347 fi
3348 ac_cv_prog_CC="cc"
3349 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3350 break 2
3351 fi
3352done
503d2be0 3353done
ca81d7a0 3354IFS=$as_save_IFS
503d2be0 3355
ba4481b5
DL
3356if test $ac_prog_rejected = yes; then
3357 # We found a bogon in the path, so make sure we never use it.
3358 set dummy $ac_cv_prog_CC
3359 shift
503d2be0 3360 if test $# != 0; then
ba4481b5
DL
3361 # We chose a different compiler from the bogus one.
3362 # However, it has the same basename, so the bogon will be chosen
3363 # first if we set CC to just the basename; use the full file name.
3364 shift
6bae0ccf 3365 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
3366 fi
3367fi
3368fi
3369fi
503d2be0 3370CC=$ac_cv_prog_CC
ba4481b5 3371if test -n "$CC"; then
ca81d7a0
JD
3372 { echo "$as_me:$LINENO: result: $CC" >&5
3373echo "${ECHO_T}$CC" >&6; }
ba4481b5 3374else
ca81d7a0
JD
3375 { echo "$as_me:$LINENO: result: no" >&5
3376echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3377fi
3378
ca81d7a0 3379
503d2be0
AS
3380fi
3381if test -z "$CC"; then
3382 if test -n "$ac_tool_prefix"; then
ca81d7a0 3383 for ac_prog in cl.exe
503d2be0
AS
3384 do
3385 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3386set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
3387{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3388echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3389if test "${ac_cv_prog_CC+set}" = set; then
3390 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
3391else
3392 if test -n "$CC"; then
3393 ac_cv_prog_CC="$CC" # Let the user override the test.
3394else
c0d27fcc
MR
3395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3396for as_dir in $PATH
3397do
3398 IFS=$as_save_IFS
3399 test -z "$as_dir" && as_dir=.
3400 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 3401 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3402 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3403 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3404 break 2
3405 fi
3406done
503d2be0 3407done
ca81d7a0 3408IFS=$as_save_IFS
503d2be0 3409
c4bb2108
DL
3410fi
3411fi
503d2be0 3412CC=$ac_cv_prog_CC
c4bb2108 3413if test -n "$CC"; then
ca81d7a0
JD
3414 { echo "$as_me:$LINENO: result: $CC" >&5
3415echo "${ECHO_T}$CC" >&6; }
c4bb2108 3416else
ca81d7a0
JD
3417 { echo "$as_me:$LINENO: result: no" >&5
3418echo "${ECHO_T}no" >&6; }
503d2be0
AS
3419fi
3420
ca81d7a0 3421
503d2be0
AS
3422 test -n "$CC" && break
3423 done
3424fi
3425if test -z "$CC"; then
3426 ac_ct_CC=$CC
ca81d7a0 3427 for ac_prog in cl.exe
503d2be0
AS
3428do
3429 # Extract the first word of "$ac_prog", so it can be a program name with args.
3430set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
3431{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3432echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3433if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3434 echo $ECHO_N "(cached) $ECHO_C" >&6
3435else
3436 if test -n "$ac_ct_CC"; then
3437 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3438else
c0d27fcc
MR
3439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3440for as_dir in $PATH
3441do
3442 IFS=$as_save_IFS
3443 test -z "$as_dir" && as_dir=.
3444 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 3445 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3446 ac_cv_prog_ac_ct_CC="$ac_prog"
3447 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3448 break 2
3449 fi
3450done
503d2be0 3451done
ca81d7a0 3452IFS=$as_save_IFS
503d2be0 3453
c4bb2108 3454fi
503d2be0
AS
3455fi
3456ac_ct_CC=$ac_cv_prog_ac_ct_CC
3457if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3458 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3459echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3460else
ca81d7a0
JD
3461 { echo "$as_me:$LINENO: result: no" >&5
3462echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3463fi
3464
ca81d7a0 3465
503d2be0
AS
3466 test -n "$ac_ct_CC" && break
3467done
ba4481b5 3468
ca81d7a0
JD
3469 if test "x$ac_ct_CC" = x; then
3470 CC=""
3471 else
3472 case $cross_compiling:$ac_tool_warned in
3473yes:)
3474{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3475whose name does not start with the host triplet. If you think this
3476configuration is useful to you, please write to autoconf@gnu.org." >&5
3477echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3478whose name does not start with the host triplet. If you think this
3479configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3480ac_tool_warned=yes ;;
3481esac
3482 CC=$ac_ct_CC
3483 fi
503d2be0
AS
3484fi
3485
3486fi
ba4481b5 3487
c0d27fcc 3488
19650fd6
AS
3489test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3490See \`config.log' for more details." >&5
3491echo "$as_me: error: no acceptable C compiler found in \$PATH
3492See \`config.log' for more details." >&2;}
503d2be0 3493 { (exit 1); exit 1; }; }
c4bb2108 3494
503d2be0 3495# Provide some information about the compiler.
ca81d7a0 3496echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3497ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3498{ (ac_try="$ac_compiler --version >&5"
3499case "(($ac_try" in
3500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3501 *) ac_try_echo=$ac_try;;
3502esac
3503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3504 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3505 ac_status=$?
c0d27fcc 3506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3507 (exit $ac_status); }
ca81d7a0
JD
3508{ (ac_try="$ac_compiler -v >&5"
3509case "(($ac_try" in
3510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3511 *) ac_try_echo=$ac_try;;
3512esac
3513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3514 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3515 ac_status=$?
c0d27fcc 3516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3517 (exit $ac_status); }
ca81d7a0
JD
3518{ (ac_try="$ac_compiler -V >&5"
3519case "(($ac_try" in
3520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3521 *) ac_try_echo=$ac_try;;
3522esac
3523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3524 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3525 ac_status=$?
c0d27fcc 3526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3527 (exit $ac_status); }
3528
3529cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3530/* confdefs.h. */
3531_ACEOF
3532cat confdefs.h >>conftest.$ac_ext
3533cat >>conftest.$ac_ext <<_ACEOF
3534/* end confdefs.h. */
c4bb2108 3535
503d2be0
AS
3536int
3537main ()
3538{
3539
3540 ;
3541 return 0;
3542}
3543_ACEOF
3544ac_clean_files_save=$ac_clean_files
19650fd6 3545ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3546# Try to create an executable without -o first, disregard a.out.
3547# It will help us diagnose broken compilers, and finding out an intuition
3548# of exeext.
ca81d7a0
JD
3549{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3550echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3551ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3552#
3553# List of possible output files, starting from the most likely.
3554# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3555# only as a last resort. b.out is created by i960 compilers.
3556ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3557#
3558# The IRIX 6 linker writes into existing files which may not be
3559# executable, retaining their permissions. Remove them first so a
3560# subsequent execution test works.
3561ac_rmfiles=
3562for ac_file in $ac_files
3563do
3564 case $ac_file in
3565 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3566 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3567 esac
3568done
3569rm -f $ac_rmfiles
3570
3571if { (ac_try="$ac_link_default"
3572case "(($ac_try" in
3573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3574 *) ac_try_echo=$ac_try;;
3575esac
3576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3577 (eval "$ac_link_default") 2>&5
503d2be0 3578 ac_status=$?
c0d27fcc 3579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3580 (exit $ac_status); }; then
ca81d7a0
JD
3581 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3582# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3583# in a Makefile. We should not override ac_cv_exeext if it was cached,
3584# so that the user can short-circuit this test for compilers unknown to
3585# Autoconf.
3586for ac_file in $ac_files
19650fd6 3587do
6bae0ccf 3588 test -f "$ac_file" || continue
503d2be0 3589 case $ac_file in
ca81d7a0 3590 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3591 ;;
19650fd6 3592 [ab].out )
edfaf76d
LK
3593 # We found the default executable, but exeext='' is most
3594 # certainly right.
3595 break;;
19650fd6 3596 *.* )
ca81d7a0
JD
3597 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3598 then :; else
3599 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3600 fi
3601 # We set ac_cv_exeext here because the later test for it is not
3602 # safe: cross compilers may not add the suffix if given an `-o'
3603 # argument, so we may need to know it at that point already.
3604 # Even if this section looks crufty: it has the advantage of
3605 # actually working.
edfaf76d 3606 break;;
19650fd6 3607 * )
edfaf76d 3608 break;;
503d2be0
AS
3609 esac
3610done
ca81d7a0
JD
3611test "$ac_cv_exeext" = no && ac_cv_exeext=
3612
503d2be0
AS
3613else
3614 echo "$as_me: failed program was:" >&5
19650fd6
AS
3615sed 's/^/| /' conftest.$ac_ext >&5
3616
6bae0ccf 3617{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3618See \`config.log' for more details." >&5
6bae0ccf 3619echo "$as_me: error: C compiler cannot create executables
19650fd6 3620See \`config.log' for more details." >&2;}
503d2be0
AS
3621 { (exit 77); exit 77; }; }
3622fi
3623
3624ac_exeext=$ac_cv_exeext
ca81d7a0
JD
3625{ echo "$as_me:$LINENO: result: $ac_file" >&5
3626echo "${ECHO_T}$ac_file" >&6; }
503d2be0 3627
ca81d7a0 3628# Check that the compiler produces executables we can run. If not, either
503d2be0 3629# the compiler is broken, or we cross compile.
ca81d7a0
JD
3630{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3631echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3632# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3633# If not cross compiling, check that we can run a simple program.
3634if test "$cross_compiling" != yes; then
3635 if { ac_try='./$ac_file'
ca81d7a0
JD
3636 { (case "(($ac_try" in
3637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3638 *) ac_try_echo=$ac_try;;
3639esac
3640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3641 (eval "$ac_try") 2>&5
503d2be0 3642 ac_status=$?
c0d27fcc 3643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3644 (exit $ac_status); }; }; then
3645 cross_compiling=no
ba4481b5 3646 else
503d2be0
AS
3647 if test "$cross_compiling" = maybe; then
3648 cross_compiling=yes
3649 else
c0d27fcc 3650 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3651If you meant to cross compile, use \`--host'.
3652See \`config.log' for more details." >&5
503d2be0 3653echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3654If you meant to cross compile, use \`--host'.
3655See \`config.log' for more details." >&2;}
503d2be0
AS
3656 { (exit 1); exit 1; }; }
3657 fi
ba4481b5 3658 fi
503d2be0 3659fi
ca81d7a0
JD
3660{ echo "$as_me:$LINENO: result: yes" >&5
3661echo "${ECHO_T}yes" >&6; }
503d2be0 3662
19650fd6 3663rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3664ac_clean_files=$ac_clean_files_save
ca81d7a0 3665# Check that the compiler produces executables we can run. If not, either
503d2be0 3666# the compiler is broken, or we cross compile.
ca81d7a0
JD
3667{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3668echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3669{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3670echo "${ECHO_T}$cross_compiling" >&6; }
3671
3672{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3673echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3674if { (ac_try="$ac_link"
3675case "(($ac_try" in
3676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3677 *) ac_try_echo=$ac_try;;
3678esac
3679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3680 (eval "$ac_link") 2>&5
503d2be0 3681 ac_status=$?
c0d27fcc 3682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3683 (exit $ac_status); }; then
3684 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3685# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3686# work properly (i.e., refer to `conftest.exe'), while it won't with
3687# `rm'.
6bae0ccf
DL
3688for ac_file in conftest.exe conftest conftest.*; do
3689 test -f "$ac_file" || continue
503d2be0 3690 case $ac_file in
ca81d7a0 3691 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3692 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3693 break;;
503d2be0
AS
3694 * ) break;;
3695 esac
3696done
ba4481b5 3697else
19650fd6
AS
3698 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3699See \`config.log' for more details." >&5
3700echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3701See \`config.log' for more details." >&2;}
503d2be0 3702 { (exit 1); exit 1; }; }
ba4481b5 3703fi
ba4481b5 3704
503d2be0 3705rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3706{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3707echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3708
503d2be0
AS
3709rm -f conftest.$ac_ext
3710EXEEXT=$ac_cv_exeext
3711ac_exeext=$EXEEXT
ca81d7a0
JD
3712{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3713echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3714if test "${ac_cv_objext+set}" = set; then
3715 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3716else
503d2be0 3717 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3718/* confdefs.h. */
3719_ACEOF
3720cat confdefs.h >>conftest.$ac_ext
3721cat >>conftest.$ac_ext <<_ACEOF
3722/* end confdefs.h. */
ba4481b5 3723
503d2be0
AS
3724int
3725main ()
3726{
ba4481b5 3727
503d2be0
AS
3728 ;
3729 return 0;
3730}
3731_ACEOF
3732rm -f conftest.o conftest.obj
ca81d7a0
JD
3733if { (ac_try="$ac_compile"
3734case "(($ac_try" in
3735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3736 *) ac_try_echo=$ac_try;;
3737esac
3738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3739 (eval "$ac_compile") 2>&5
503d2be0 3740 ac_status=$?
c0d27fcc 3741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3742 (exit $ac_status); }; then
ca81d7a0
JD
3743 for ac_file in conftest.o conftest.obj conftest.*; do
3744 test -f "$ac_file" || continue;
503d2be0 3745 case $ac_file in
ca81d7a0 3746 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3747 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3748 break;;
3749 esac
3750done
c4bb2108 3751else
503d2be0 3752 echo "$as_me: failed program was:" >&5
19650fd6
AS
3753sed 's/^/| /' conftest.$ac_ext >&5
3754
3755{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3756See \`config.log' for more details." >&5
3757echo "$as_me: error: cannot compute suffix of object files: cannot compile
3758See \`config.log' for more details." >&2;}
503d2be0 3759 { (exit 1); exit 1; }; }
c4bb2108
DL
3760fi
3761
503d2be0
AS
3762rm -f conftest.$ac_cv_objext conftest.$ac_ext
3763fi
ca81d7a0
JD
3764{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3765echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3766OBJEXT=$ac_cv_objext
3767ac_objext=$OBJEXT
ca81d7a0
JD
3768{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3769echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3770if test "${ac_cv_c_compiler_gnu+set}" = set; then
3771 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3772else
503d2be0 3773 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3774/* confdefs.h. */
3775_ACEOF
3776cat confdefs.h >>conftest.$ac_ext
3777cat >>conftest.$ac_ext <<_ACEOF
3778/* end confdefs.h. */
503d2be0
AS
3779
3780int
3781main ()
3782{
3783#ifndef __GNUC__
3784 choke me
3785#endif
3786
3787 ;
3788 return 0;
3789}
3790_ACEOF
3791rm -f conftest.$ac_objext
ca81d7a0
JD
3792if { (ac_try="$ac_compile"
3793case "(($ac_try" in
3794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3795 *) ac_try_echo=$ac_try;;
3796esac
3797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3798 (eval "$ac_compile") 2>conftest.er1
503d2be0 3799 ac_status=$?
edfaf76d
LK
3800 grep -v '^ *+' conftest.er1 >conftest.err
3801 rm -f conftest.er1
3802 cat conftest.err >&5
c0d27fcc 3803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3804 (exit $ac_status); } &&
ca81d7a0
JD
3805 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3806 { (case "(($ac_try" in
3807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3808 *) ac_try_echo=$ac_try;;
3809esac
3810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3811 (eval "$ac_try") 2>&5
edfaf76d
LK
3812 ac_status=$?
3813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3814 (exit $ac_status); }; } &&
3815 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
3816 { (case "(($ac_try" in
3817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3818 *) ac_try_echo=$ac_try;;
3819esac
3820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3821 (eval "$ac_try") 2>&5
503d2be0 3822 ac_status=$?
c0d27fcc 3823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3824 (exit $ac_status); }; }; then
3825 ac_compiler_gnu=yes
3826else
3827 echo "$as_me: failed program was:" >&5
19650fd6
AS
3828sed 's/^/| /' conftest.$ac_ext >&5
3829
ca81d7a0 3830 ac_compiler_gnu=no
503d2be0 3831fi
ca81d7a0
JD
3832
3833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3834ac_cv_c_compiler_gnu=$ac_compiler_gnu
3835
3836fi
ca81d7a0
JD
3837{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3838echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3839GCC=`test $ac_compiler_gnu = yes && echo yes`
3840ac_test_CFLAGS=${CFLAGS+set}
3841ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3842{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3843echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3844if test "${ac_cv_prog_cc_g+set}" = set; then
3845 echo $ECHO_N "(cached) $ECHO_C" >&6
3846else
ca81d7a0
JD
3847 ac_save_c_werror_flag=$ac_c_werror_flag
3848 ac_c_werror_flag=yes
3849 ac_cv_prog_cc_g=no
3850 CFLAGS="-g"
3851 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3852/* confdefs.h. */
3853_ACEOF
3854cat confdefs.h >>conftest.$ac_ext
3855cat >>conftest.$ac_ext <<_ACEOF
3856/* end confdefs.h. */
503d2be0
AS
3857
3858int
3859main ()
3860{
3861
3862 ;
3863 return 0;
3864}
3865_ACEOF
3866rm -f conftest.$ac_objext
ca81d7a0
JD
3867if { (ac_try="$ac_compile"
3868case "(($ac_try" in
3869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3870 *) ac_try_echo=$ac_try;;
3871esac
3872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3873 (eval "$ac_compile") 2>conftest.er1
503d2be0 3874 ac_status=$?
edfaf76d
LK
3875 grep -v '^ *+' conftest.er1 >conftest.err
3876 rm -f conftest.er1
3877 cat conftest.err >&5
c0d27fcc 3878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3879 (exit $ac_status); } &&
ca81d7a0
JD
3880 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3881 { (case "(($ac_try" in
3882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3883 *) ac_try_echo=$ac_try;;
3884esac
3885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3886 (eval "$ac_try") 2>&5
edfaf76d
LK
3887 ac_status=$?
3888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3889 (exit $ac_status); }; } &&
3890 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
3891 { (case "(($ac_try" in
3892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3893 *) ac_try_echo=$ac_try;;
3894esac
3895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3896 (eval "$ac_try") 2>&5
503d2be0 3897 ac_status=$?
c0d27fcc 3898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3899 (exit $ac_status); }; }; then
ba4481b5
DL
3900 ac_cv_prog_cc_g=yes
3901else
503d2be0 3902 echo "$as_me: failed program was:" >&5
19650fd6
AS
3903sed 's/^/| /' conftest.$ac_ext >&5
3904
ca81d7a0
JD
3905 CFLAGS=""
3906 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3907/* confdefs.h. */
3908_ACEOF
3909cat confdefs.h >>conftest.$ac_ext
3910cat >>conftest.$ac_ext <<_ACEOF
3911/* end confdefs.h. */
edfaf76d 3912
6bae0ccf
DL
3913int
3914main ()
3915{
ca81d7a0 3916
6bae0ccf
DL
3917 ;
3918 return 0;
3919}
3920_ACEOF
ca81d7a0
JD
3921rm -f conftest.$ac_objext
3922if { (ac_try="$ac_compile"
3923case "(($ac_try" in
3924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3925 *) ac_try_echo=$ac_try;;
3926esac
3927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3928 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3929 ac_status=$?
edfaf76d
LK
3930 grep -v '^ *+' conftest.er1 >conftest.err
3931 rm -f conftest.er1
3932 cat conftest.err >&5
6bae0ccf
DL
3933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3934 (exit $ac_status); } &&
ca81d7a0
JD
3935 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3936 { (case "(($ac_try" in
3937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3938 *) ac_try_echo=$ac_try;;
3939esac
3940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3941 (eval "$ac_try") 2>&5
edfaf76d
LK
3942 ac_status=$?
3943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3944 (exit $ac_status); }; } &&
3945 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
3946 { (case "(($ac_try" in
3947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3948 *) ac_try_echo=$ac_try;;
3949esac
3950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3951 (eval "$ac_try") 2>&5
6bae0ccf
DL
3952 ac_status=$?
3953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3954 (exit $ac_status); }; }; then
ca81d7a0 3955 :
6bae0ccf
DL
3956else
3957 echo "$as_me: failed program was:" >&5
19650fd6
AS
3958sed 's/^/| /' conftest.$ac_ext >&5
3959
ca81d7a0
JD
3960 ac_c_werror_flag=$ac_save_c_werror_flag
3961 CFLAGS="-g"
3962 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3963/* confdefs.h. */
19650fd6
AS
3964_ACEOF
3965cat confdefs.h >>conftest.$ac_ext
3966cat >>conftest.$ac_ext <<_ACEOF
3967/* end confdefs.h. */
ca81d7a0 3968
503d2be0
AS
3969int
3970main ()
3971{
ca81d7a0 3972
503d2be0
AS
3973 ;
3974 return 0;
3975}
3976_ACEOF
3977rm -f conftest.$ac_objext
ca81d7a0
JD
3978if { (ac_try="$ac_compile"
3979case "(($ac_try" in
3980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3981 *) ac_try_echo=$ac_try;;
3982esac
3983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3984 (eval "$ac_compile") 2>conftest.er1
503d2be0 3985 ac_status=$?
edfaf76d
LK
3986 grep -v '^ *+' conftest.er1 >conftest.err
3987 rm -f conftest.er1
3988 cat conftest.err >&5
c0d27fcc 3989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3990 (exit $ac_status); } &&
ca81d7a0
JD
3991 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3992 { (case "(($ac_try" in
3993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3994 *) ac_try_echo=$ac_try;;
3995esac
3996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3997 (eval "$ac_try") 2>&5
edfaf76d
LK
3998 ac_status=$?
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); }; } &&
4001 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
4002 { (case "(($ac_try" in
4003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4004 *) ac_try_echo=$ac_try;;
4005esac
4006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4007 (eval "$ac_try") 2>&5
503d2be0 4008 ac_status=$?
c0d27fcc 4009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4010 (exit $ac_status); }; }; then
ca81d7a0 4011 ac_cv_prog_cc_g=yes
503d2be0
AS
4012else
4013 echo "$as_me: failed program was:" >&5
19650fd6
AS
4014sed 's/^/| /' conftest.$ac_ext >&5
4015
ca81d7a0 4016
8eeae1c9 4017fi
ca81d7a0
JD
4018
4019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4020fi
4021
4022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4023fi
4024
4025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4026 ac_c_werror_flag=$ac_save_c_werror_flag
4027fi
4028{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4029echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
4030if test "$ac_test_CFLAGS" = set; then
4031 CFLAGS=$ac_save_CFLAGS
4032elif test $ac_cv_prog_cc_g = yes; then
4033 if test "$GCC" = yes; then
4034 CFLAGS="-g -O2"
4035 else
4036 CFLAGS="-g"
4037 fi
4038else
4039 if test "$GCC" = yes; then
4040 CFLAGS="-O2"
4041 else
4042 CFLAGS=
4043 fi
4044fi
4045{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
4046echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
4047if test "${ac_cv_prog_cc_c89+set}" = set; then
4048 echo $ECHO_N "(cached) $ECHO_C" >&6
4049else
4050 ac_cv_prog_cc_c89=no
4051ac_save_CC=$CC
4052cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4053/* confdefs.h. */
4054_ACEOF
4055cat confdefs.h >>conftest.$ac_ext
4056cat >>conftest.$ac_ext <<_ACEOF
4057/* end confdefs.h. */
ca81d7a0
JD
4058#include <stdarg.h>
4059#include <stdio.h>
4060#include <sys/types.h>
4061#include <sys/stat.h>
4062/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4063struct buf { int x; };
4064FILE * (*rcsopen) (struct buf *, struct stat *, int);
4065static char *e (p, i)
4066 char **p;
4067 int i;
4068{
4069 return p[i];
4070}
4071static char *f (char * (*g) (char **, int), char **p, ...)
4072{
4073 char *s;
4074 va_list v;
4075 va_start (v,p);
4076 s = g (p, va_arg (v,int));
4077 va_end (v);
4078 return s;
4079}
4080
4081/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4082 function prototypes and stuff, but not '\xHH' hex character constants.
4083 These don't provoke an error unfortunately, instead are silently treated
4084 as 'x'. The following induces an error, until -std is added to get
4085 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4086 array size at least. It's necessary to write '\x00'==0 to get something
4087 that's true only with -std. */
4088int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4089
4090/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4091 inside strings and character constants. */
4092#define FOO(x) 'x'
4093int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4094
4095int test (int i, double x);
4096struct s1 {int (*f) (int a);};
4097struct s2 {int (*f) (double a);};
4098int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4099int argc;
4100char **argv;
503d2be0
AS
4101int
4102main ()
4103{
ca81d7a0 4104return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
503d2be0
AS
4105 ;
4106 return 0;
4107}
4108_ACEOF
ca81d7a0
JD
4109for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4110 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4111do
4112 CC="$ac_save_CC $ac_arg"
4113 rm -f conftest.$ac_objext
4114if { (ac_try="$ac_compile"
4115case "(($ac_try" in
4116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4117 *) ac_try_echo=$ac_try;;
4118esac
4119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4120 (eval "$ac_compile") 2>conftest.er1
503d2be0 4121 ac_status=$?
edfaf76d
LK
4122 grep -v '^ *+' conftest.er1 >conftest.err
4123 rm -f conftest.er1
4124 cat conftest.err >&5
c0d27fcc 4125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4126 (exit $ac_status); } &&
ca81d7a0
JD
4127 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4128 { (case "(($ac_try" in
4129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4130 *) ac_try_echo=$ac_try;;
4131esac
4132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4133 (eval "$ac_try") 2>&5
edfaf76d
LK
4134 ac_status=$?
4135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4136 (exit $ac_status); }; } &&
4137 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
4138 { (case "(($ac_try" in
4139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4140 *) ac_try_echo=$ac_try;;
4141esac
4142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4143 (eval "$ac_try") 2>&5
503d2be0 4144 ac_status=$?
c0d27fcc 4145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4146 (exit $ac_status); }; }; then
ca81d7a0 4147 ac_cv_prog_cc_c89=$ac_arg
503d2be0
AS
4148else
4149 echo "$as_me: failed program was:" >&5
19650fd6
AS
4150sed 's/^/| /' conftest.$ac_ext >&5
4151
ca81d7a0 4152
503d2be0 4153fi
ca81d7a0
JD
4154
4155rm -f core conftest.err conftest.$ac_objext
4156 test "x$ac_cv_prog_cc_c89" != "xno" && break
503d2be0 4157done
ca81d7a0
JD
4158rm -f conftest.$ac_ext
4159CC=$ac_save_CC
4160
503d2be0 4161fi
ca81d7a0
JD
4162# AC_CACHE_VAL
4163case "x$ac_cv_prog_cc_c89" in
4164 x)
4165 { echo "$as_me:$LINENO: result: none needed" >&5
4166echo "${ECHO_T}none needed" >&6; } ;;
4167 xno)
4168 { echo "$as_me:$LINENO: result: unsupported" >&5
4169echo "${ECHO_T}unsupported" >&6; } ;;
4170 *)
4171 CC="$CC $ac_cv_prog_cc_c89"
4172 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
4173echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
4174esac
ba4481b5 4175
19650fd6 4176
503d2be0
AS
4177ac_ext=c
4178ac_cpp='$CPP $CPPFLAGS'
4179ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4180ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4181ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 4182
c0d27fcc 4183
ba4481b5
DL
4184# On Suns, sometimes $CPP names a directory.
4185if test -n "$CPP" && test -d "$CPP"; then
4186 CPP=
4187fi
4188
4189#### Some systems specify a CPP to use unless we are using GCC.
4190#### Now that we know whether we are using GCC, we can decide whether
4191#### to use that one.
4192if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4193then
4194 CPP="$NON_GNU_CPP"
4195fi
4196
4197#### Some systems specify a CC to use unless we are using GCC.
4198#### Now that we know whether we are using GCC, we can decide whether
4199#### to use that one.
4200if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4201 test x$cc_specified != xyes
4202then
4203 CC="$NON_GNU_CC"
4204fi
4205
4206if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
4207then
4208 CC="$CC $GCC_TEST_OPTIONS"
4209fi
4210
4211if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
4212then
4213 CC="$CC $NON_GCC_TEST_OPTIONS"
4214fi
4215
e143ad11
AS
4216
4217ac_ext=c
4218ac_cpp='$CPP $CPPFLAGS'
4219ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4220ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4221ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4222{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4223echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
4224# On Suns, sometimes $CPP names a directory.
4225if test -n "$CPP" && test -d "$CPP"; then
4226 CPP=
4227fi
4228if test -z "$CPP"; then
4229 if test "${ac_cv_prog_CPP+set}" = set; then
4230 echo $ECHO_N "(cached) $ECHO_C" >&6
4231else
4232 # Double quotes because CPP needs to be expanded
4233 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4234 do
4235 ac_preproc_ok=false
4236for ac_c_preproc_warn_flag in '' yes
4237do
4238 # Use a header file that comes with gcc, so configuring glibc
4239 # with a fresh cross-compiler works.
4240 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4241 # <limits.h> exists even on freestanding compilers.
4242 # On the NeXT, cc -E runs the code through the compiler's parser,
4243 # not just through cpp. "Syntax error" is here to catch this case.
4244 cat >conftest.$ac_ext <<_ACEOF
4245/* confdefs.h. */
4246_ACEOF
4247cat confdefs.h >>conftest.$ac_ext
4248cat >>conftest.$ac_ext <<_ACEOF
4249/* end confdefs.h. */
4250#ifdef __STDC__
4251# include <limits.h>
4252#else
4253# include <assert.h>
4254#endif
4255 Syntax error
4256_ACEOF
ca81d7a0
JD
4257if { (ac_try="$ac_cpp conftest.$ac_ext"
4258case "(($ac_try" in
4259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4260 *) ac_try_echo=$ac_try;;
4261esac
4262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4263 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4264 ac_status=$?
4265 grep -v '^ *+' conftest.er1 >conftest.err
4266 rm -f conftest.er1
4267 cat conftest.err >&5
4268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4269 (exit $ac_status); } >/dev/null; then
4270 if test -s conftest.err; then
4271 ac_cpp_err=$ac_c_preproc_warn_flag
4272 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4273 else
4274 ac_cpp_err=
4275 fi
4276else
4277 ac_cpp_err=yes
4278fi
4279if test -z "$ac_cpp_err"; then
4280 :
4281else
4282 echo "$as_me: failed program was:" >&5
4283sed 's/^/| /' conftest.$ac_ext >&5
4284
4285 # Broken: fails on valid input.
4286continue
4287fi
ca81d7a0 4288
e143ad11
AS
4289rm -f conftest.err conftest.$ac_ext
4290
ca81d7a0 4291 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4292 # can be detected and how.
4293 cat >conftest.$ac_ext <<_ACEOF
4294/* confdefs.h. */
4295_ACEOF
4296cat confdefs.h >>conftest.$ac_ext
4297cat >>conftest.$ac_ext <<_ACEOF
4298/* end confdefs.h. */
4299#include <ac_nonexistent.h>
4300_ACEOF
ca81d7a0
JD
4301if { (ac_try="$ac_cpp conftest.$ac_ext"
4302case "(($ac_try" in
4303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4304 *) ac_try_echo=$ac_try;;
4305esac
4306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4307 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4308 ac_status=$?
4309 grep -v '^ *+' conftest.er1 >conftest.err
4310 rm -f conftest.er1
4311 cat conftest.err >&5
4312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4313 (exit $ac_status); } >/dev/null; then
4314 if test -s conftest.err; then
4315 ac_cpp_err=$ac_c_preproc_warn_flag
4316 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4317 else
4318 ac_cpp_err=
4319 fi
4320else
4321 ac_cpp_err=yes
4322fi
4323if test -z "$ac_cpp_err"; then
4324 # Broken: success on invalid input.
4325continue
4326else
4327 echo "$as_me: failed program was:" >&5
4328sed 's/^/| /' conftest.$ac_ext >&5
4329
4330 # Passes both tests.
4331ac_preproc_ok=:
4332break
4333fi
ca81d7a0 4334
e143ad11
AS
4335rm -f conftest.err conftest.$ac_ext
4336
4337done
4338# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4339rm -f conftest.err conftest.$ac_ext
4340if $ac_preproc_ok; then
4341 break
4342fi
4343
4344 done
4345 ac_cv_prog_CPP=$CPP
4346
4347fi
4348 CPP=$ac_cv_prog_CPP
4349else
4350 ac_cv_prog_CPP=$CPP
4351fi
ca81d7a0
JD
4352{ echo "$as_me:$LINENO: result: $CPP" >&5
4353echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
4354ac_preproc_ok=false
4355for ac_c_preproc_warn_flag in '' yes
4356do
4357 # Use a header file that comes with gcc, so configuring glibc
4358 # with a fresh cross-compiler works.
4359 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4360 # <limits.h> exists even on freestanding compilers.
4361 # On the NeXT, cc -E runs the code through the compiler's parser,
4362 # not just through cpp. "Syntax error" is here to catch this case.
4363 cat >conftest.$ac_ext <<_ACEOF
4364/* confdefs.h. */
4365_ACEOF
4366cat confdefs.h >>conftest.$ac_ext
4367cat >>conftest.$ac_ext <<_ACEOF
4368/* end confdefs.h. */
4369#ifdef __STDC__
4370# include <limits.h>
4371#else
4372# include <assert.h>
4373#endif
4374 Syntax error
4375_ACEOF
ca81d7a0
JD
4376if { (ac_try="$ac_cpp conftest.$ac_ext"
4377case "(($ac_try" in
4378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4379 *) ac_try_echo=$ac_try;;
4380esac
4381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4382 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4383 ac_status=$?
4384 grep -v '^ *+' conftest.er1 >conftest.err
4385 rm -f conftest.er1
4386 cat conftest.err >&5
4387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4388 (exit $ac_status); } >/dev/null; then
4389 if test -s conftest.err; then
4390 ac_cpp_err=$ac_c_preproc_warn_flag
4391 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4392 else
4393 ac_cpp_err=
4394 fi
4395else
4396 ac_cpp_err=yes
4397fi
4398if test -z "$ac_cpp_err"; then
4399 :
4400else
4401 echo "$as_me: failed program was:" >&5
4402sed 's/^/| /' conftest.$ac_ext >&5
4403
4404 # Broken: fails on valid input.
4405continue
4406fi
ca81d7a0 4407
e143ad11
AS
4408rm -f conftest.err conftest.$ac_ext
4409
ca81d7a0 4410 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4411 # can be detected and how.
4412 cat >conftest.$ac_ext <<_ACEOF
4413/* confdefs.h. */
4414_ACEOF
4415cat confdefs.h >>conftest.$ac_ext
4416cat >>conftest.$ac_ext <<_ACEOF
4417/* end confdefs.h. */
4418#include <ac_nonexistent.h>
4419_ACEOF
ca81d7a0
JD
4420if { (ac_try="$ac_cpp conftest.$ac_ext"
4421case "(($ac_try" in
4422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4423 *) ac_try_echo=$ac_try;;
4424esac
4425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4426 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4427 ac_status=$?
4428 grep -v '^ *+' conftest.er1 >conftest.err
4429 rm -f conftest.er1
4430 cat conftest.err >&5
4431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4432 (exit $ac_status); } >/dev/null; then
4433 if test -s conftest.err; then
4434 ac_cpp_err=$ac_c_preproc_warn_flag
4435 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4436 else
4437 ac_cpp_err=
4438 fi
4439else
4440 ac_cpp_err=yes
4441fi
4442if test -z "$ac_cpp_err"; then
4443 # Broken: success on invalid input.
4444continue
4445else
4446 echo "$as_me: failed program was:" >&5
4447sed 's/^/| /' conftest.$ac_ext >&5
4448
4449 # Passes both tests.
4450ac_preproc_ok=:
4451break
4452fi
ca81d7a0 4453
e143ad11
AS
4454rm -f conftest.err conftest.$ac_ext
4455
4456done
4457# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4458rm -f conftest.err conftest.$ac_ext
4459if $ac_preproc_ok; then
4460 :
4461else
4462 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4463See \`config.log' for more details." >&5
4464echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4465See \`config.log' for more details." >&2;}
4466 { (exit 1); exit 1; }; }
4467fi
4468
4469ac_ext=c
4470ac_cpp='$CPP $CPPFLAGS'
4471ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4472ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4473ac_compiler_gnu=$ac_cv_c_compiler_gnu
4474
4475
ca81d7a0
JD
4476{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4477echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4478if test "${ac_cv_path_GREP+set}" = set; then
4479 echo $ECHO_N "(cached) $ECHO_C" >&6
4480else
4481 # Extract the first word of "grep ggrep" to use in msg output
4482if test -z "$GREP"; then
4483set dummy grep ggrep; ac_prog_name=$2
4484if test "${ac_cv_path_GREP+set}" = set; then
4485 echo $ECHO_N "(cached) $ECHO_C" >&6
4486else
4487 ac_path_GREP_found=false
4488# Loop through the user's path and test for each of PROGNAME-LIST
4489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4490for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4491do
4492 IFS=$as_save_IFS
4493 test -z "$as_dir" && as_dir=.
4494 for ac_prog in grep ggrep; do
4495 for ac_exec_ext in '' $ac_executable_extensions; do
4496 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4497 { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
4498 # Check for GNU ac_path_GREP and select it if it is found.
4499 # Check for GNU $ac_path_GREP
4500case `"$ac_path_GREP" --version 2>&1` in
4501*GNU*)
4502 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4503*)
4504 ac_count=0
4505 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4506 while :
4507 do
4508 cat "conftest.in" "conftest.in" >"conftest.tmp"
4509 mv "conftest.tmp" "conftest.in"
4510 cp "conftest.in" "conftest.nl"
4511 echo 'GREP' >> "conftest.nl"
4512 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4513 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4514 ac_count=`expr $ac_count + 1`
4515 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4516 # Best one so far, save it but keep looking for a better one
4517 ac_cv_path_GREP="$ac_path_GREP"
4518 ac_path_GREP_max=$ac_count
4519 fi
4520 # 10*(2^10) chars as input seems more than enough
4521 test $ac_count -gt 10 && break
4522 done
4523 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4524esac
4525
4526
4527 $ac_path_GREP_found && break 3
4528 done
4529done
4530
4531done
4532IFS=$as_save_IFS
4533
4534
4535fi
4536
4537GREP="$ac_cv_path_GREP"
4538if test -z "$GREP"; then
4539 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4540echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4541 { (exit 1); exit 1; }; }
4542fi
4543
4544else
4545 ac_cv_path_GREP=$GREP
4546fi
4547
4548
4549fi
4550{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4551echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4552 GREP="$ac_cv_path_GREP"
4553
4554
4555{ echo "$as_me:$LINENO: checking for egrep" >&5
4556echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4557if test "${ac_cv_path_EGREP+set}" = set; then
8eeae1c9
JD
4558 echo $ECHO_N "(cached) $ECHO_C" >&6
4559else
ca81d7a0
JD
4560 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4561 then ac_cv_path_EGREP="$GREP -E"
4562 else
4563 # Extract the first word of "egrep" to use in msg output
4564if test -z "$EGREP"; then
4565set dummy egrep; ac_prog_name=$2
4566if test "${ac_cv_path_EGREP+set}" = set; then
4567 echo $ECHO_N "(cached) $ECHO_C" >&6
4568else
4569 ac_path_EGREP_found=false
4570# Loop through the user's path and test for each of PROGNAME-LIST
4571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4572for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4573do
4574 IFS=$as_save_IFS
4575 test -z "$as_dir" && as_dir=.
4576 for ac_prog in egrep; do
4577 for ac_exec_ext in '' $ac_executable_extensions; do
4578 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4579 { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
4580 # Check for GNU ac_path_EGREP and select it if it is found.
4581 # Check for GNU $ac_path_EGREP
4582case `"$ac_path_EGREP" --version 2>&1` in
4583*GNU*)
4584 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4585*)
4586 ac_count=0
4587 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4588 while :
4589 do
4590 cat "conftest.in" "conftest.in" >"conftest.tmp"
4591 mv "conftest.tmp" "conftest.in"
4592 cp "conftest.in" "conftest.nl"
4593 echo 'EGREP' >> "conftest.nl"
4594 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4595 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4596 ac_count=`expr $ac_count + 1`
4597 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4598 # Best one so far, save it but keep looking for a better one
4599 ac_cv_path_EGREP="$ac_path_EGREP"
4600 ac_path_EGREP_max=$ac_count
e143ad11 4601 fi
ca81d7a0
JD
4602 # 10*(2^10) chars as input seems more than enough
4603 test $ac_count -gt 10 && break
4604 done
4605 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4606esac
4607
4608
4609 $ac_path_EGREP_found && break 3
4610 done
4611done
4612
4613done
4614IFS=$as_save_IFS
4615
4616
4617fi
4618
4619EGREP="$ac_cv_path_EGREP"
4620if test -z "$EGREP"; then
4621 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4622echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4623 { (exit 1); exit 1; }; }
4624fi
4625
4626else
4627 ac_cv_path_EGREP=$EGREP
4628fi
4629
4630
4631 fi
8eeae1c9 4632fi
ca81d7a0
JD
4633{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4634echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4635 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4636
4637
4638
ca81d7a0
JD
4639{ echo "$as_me:$LINENO: checking for AIX" >&5
4640echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4641cat >conftest.$ac_ext <<_ACEOF
4642/* confdefs.h. */
4643_ACEOF
4644cat confdefs.h >>conftest.$ac_ext
4645cat >>conftest.$ac_ext <<_ACEOF
4646/* end confdefs.h. */
4647#ifdef _AIX
4648 yes
4649#endif
4650
4651_ACEOF
4652if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4653 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4654 { echo "$as_me:$LINENO: result: yes" >&5
4655echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4656cat >>confdefs.h <<\_ACEOF
4657#define _ALL_SOURCE 1
4658_ACEOF
4659
4660else
ca81d7a0
JD
4661 { echo "$as_me:$LINENO: result: no" >&5
4662echo "${ECHO_T}no" >&6; }
e143ad11
AS
4663fi
4664rm -f conftest*
4665
4666
4667
4668cat >>confdefs.h <<\_ACEOF
4669#define _GNU_SOURCE 1
4670_ACEOF
4671
4672
4673
01abe918 4674### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4675{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4676echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4677SAVE_CFLAGS="$CFLAGS"
4678CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4679cat >conftest.$ac_ext <<_ACEOF
4680/* confdefs.h. */
4681_ACEOF
4682cat confdefs.h >>conftest.$ac_ext
4683cat >>conftest.$ac_ext <<_ACEOF
4684/* end confdefs.h. */
4685
4686int
4687main ()
4688{
4689
4690 ;
4691 return 0;
4692}
4693_ACEOF
4694rm -f conftest.$ac_objext
ca81d7a0
JD
4695if { (ac_try="$ac_compile"
4696case "(($ac_try" in
4697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4698 *) ac_try_echo=$ac_try;;
4699esac
4700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4701 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4702 ac_status=$?
4703 grep -v '^ *+' conftest.er1 >conftest.err
4704 rm -f conftest.er1
4705 cat conftest.err >&5
4706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4707 (exit $ac_status); } &&
ca81d7a0
JD
4708 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4709 { (case "(($ac_try" in
4710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4711 *) ac_try_echo=$ac_try;;
4712esac
4713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4714 (eval "$ac_try") 2>&5
01abe918
CY
4715 ac_status=$?
4716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4717 (exit $ac_status); }; } &&
4718 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
4719 { (case "(($ac_try" in
4720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4721 *) ac_try_echo=$ac_try;;
4722esac
4723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4724 (eval "$ac_try") 2>&5
01abe918
CY
4725 ac_status=$?
4726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4727 (exit $ac_status); }; }; then
4728 has_option=yes
4729else
4730 echo "$as_me: failed program was:" >&5
4731sed 's/^/| /' conftest.$ac_ext >&5
4732
ca81d7a0 4733 has_option=no
01abe918 4734fi
ca81d7a0
JD
4735
4736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4737if test $has_option = yes; then
4738 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4739fi
ca81d7a0
JD
4740{ echo "$as_me:$LINENO: result: $has_option" >&5
4741echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4742CFLAGS="$SAVE_CFLAGS"
4743unset has_option
4744unset SAVE_CFLAGS
4745
6a3a24fa 4746#### Some other nice autoconf tests.
ba4481b5 4747
ca81d7a0
JD
4748{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4749echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4750LN_S=$as_ln_s
4751if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4752 { echo "$as_me:$LINENO: result: yes" >&5
4753echo "${ECHO_T}yes" >&6; }
ba4481b5 4754else
ca81d7a0
JD
4755 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4756echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4757fi
4758
503d2be0
AS
4759ac_ext=c
4760ac_cpp='$CPP $CPPFLAGS'
4761ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4762ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4763ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4764{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4765echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4766# On Suns, sometimes $CPP names a directory.
4767if test -n "$CPP" && test -d "$CPP"; then
4768 CPP=
4769fi
4770if test -z "$CPP"; then
503d2be0
AS
4771 if test "${ac_cv_prog_CPP+set}" = set; then
4772 echo $ECHO_N "(cached) $ECHO_C" >&6
4773else
4774 # Double quotes because CPP needs to be expanded
4775 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4776 do
4777 ac_preproc_ok=false
4778for ac_c_preproc_warn_flag in '' yes
4779do
4780 # Use a header file that comes with gcc, so configuring glibc
4781 # with a fresh cross-compiler works.
19650fd6
AS
4782 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4783 # <limits.h> exists even on freestanding compilers.
ba4481b5 4784 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4785 # not just through cpp. "Syntax error" is here to catch this case.
4786 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4787/* confdefs.h. */
4788_ACEOF
4789cat confdefs.h >>conftest.$ac_ext
4790cat >>conftest.$ac_ext <<_ACEOF
4791/* end confdefs.h. */
4792#ifdef __STDC__
4793# include <limits.h>
4794#else
4795# include <assert.h>
4796#endif
edfaf76d 4797 Syntax error
503d2be0 4798_ACEOF
ca81d7a0
JD
4799if { (ac_try="$ac_cpp conftest.$ac_ext"
4800case "(($ac_try" in
4801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4802 *) ac_try_echo=$ac_try;;
4803esac
4804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4805 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4806 ac_status=$?
6bae0ccf 4807 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4808 rm -f conftest.er1
4809 cat conftest.err >&5
c0d27fcc 4810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4811 (exit $ac_status); } >/dev/null; then
4812 if test -s conftest.err; then
4813 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4814 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4815 else
4816 ac_cpp_err=
4817 fi
4818else
4819 ac_cpp_err=yes
4820fi
4821if test -z "$ac_cpp_err"; then
ba4481b5
DL
4822 :
4823else
503d2be0 4824 echo "$as_me: failed program was:" >&5
19650fd6
AS
4825sed 's/^/| /' conftest.$ac_ext >&5
4826
503d2be0
AS
4827 # Broken: fails on valid input.
4828continue
4829fi
ca81d7a0 4830
503d2be0
AS
4831rm -f conftest.err conftest.$ac_ext
4832
ca81d7a0 4833 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4834 # can be detected and how.
4835 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4836/* confdefs.h. */
4837_ACEOF
4838cat confdefs.h >>conftest.$ac_ext
4839cat >>conftest.$ac_ext <<_ACEOF
4840/* end confdefs.h. */
503d2be0
AS
4841#include <ac_nonexistent.h>
4842_ACEOF
ca81d7a0
JD
4843if { (ac_try="$ac_cpp conftest.$ac_ext"
4844case "(($ac_try" in
4845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4846 *) ac_try_echo=$ac_try;;
4847esac
4848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4849 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4850 ac_status=$?
6bae0ccf 4851 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4852 rm -f conftest.er1
4853 cat conftest.err >&5
c0d27fcc 4854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4855 (exit $ac_status); } >/dev/null; then
4856 if test -s conftest.err; then
4857 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4858 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4859 else
4860 ac_cpp_err=
4861 fi
4862else
4863 ac_cpp_err=yes
4864fi
4865if test -z "$ac_cpp_err"; then
4866 # Broken: success on invalid input.
4867continue
c4bb2108 4868else
503d2be0 4869 echo "$as_me: failed program was:" >&5
19650fd6
AS
4870sed 's/^/| /' conftest.$ac_ext >&5
4871
503d2be0
AS
4872 # Passes both tests.
4873ac_preproc_ok=:
4874break
4875fi
ca81d7a0 4876
503d2be0
AS
4877rm -f conftest.err conftest.$ac_ext
4878
4879done
4880# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4881rm -f conftest.err conftest.$ac_ext
4882if $ac_preproc_ok; then
4883 break
4884fi
4885
4886 done
4887 ac_cv_prog_CPP=$CPP
4888
4889fi
4890 CPP=$ac_cv_prog_CPP
4891else
4892 ac_cv_prog_CPP=$CPP
4893fi
ca81d7a0
JD
4894{ echo "$as_me:$LINENO: result: $CPP" >&5
4895echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4896ac_preproc_ok=false
4897for ac_c_preproc_warn_flag in '' yes
4898do
4899 # Use a header file that comes with gcc, so configuring glibc
4900 # with a fresh cross-compiler works.
19650fd6
AS
4901 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4902 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4903 # On the NeXT, cc -E runs the code through the compiler's parser,
4904 # not just through cpp. "Syntax error" is here to catch this case.
4905 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4906/* confdefs.h. */
4907_ACEOF
4908cat confdefs.h >>conftest.$ac_ext
4909cat >>conftest.$ac_ext <<_ACEOF
4910/* end confdefs.h. */
4911#ifdef __STDC__
4912# include <limits.h>
4913#else
4914# include <assert.h>
4915#endif
edfaf76d 4916 Syntax error
503d2be0 4917_ACEOF
ca81d7a0
JD
4918if { (ac_try="$ac_cpp conftest.$ac_ext"
4919case "(($ac_try" in
4920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4921 *) ac_try_echo=$ac_try;;
4922esac
4923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4924 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4925 ac_status=$?
6bae0ccf 4926 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4927 rm -f conftest.er1
4928 cat conftest.err >&5
c0d27fcc 4929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4930 (exit $ac_status); } >/dev/null; then
4931 if test -s conftest.err; then
4932 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4933 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4934 else
4935 ac_cpp_err=
4936 fi
4937else
4938 ac_cpp_err=yes
4939fi
4940if test -z "$ac_cpp_err"; then
ba4481b5
DL
4941 :
4942else
503d2be0 4943 echo "$as_me: failed program was:" >&5
19650fd6
AS
4944sed 's/^/| /' conftest.$ac_ext >&5
4945
503d2be0
AS
4946 # Broken: fails on valid input.
4947continue
4948fi
ca81d7a0 4949
503d2be0
AS
4950rm -f conftest.err conftest.$ac_ext
4951
ca81d7a0 4952 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4953 # can be detected and how.
4954 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4955/* confdefs.h. */
4956_ACEOF
4957cat confdefs.h >>conftest.$ac_ext
4958cat >>conftest.$ac_ext <<_ACEOF
4959/* end confdefs.h. */
503d2be0
AS
4960#include <ac_nonexistent.h>
4961_ACEOF
ca81d7a0
JD
4962if { (ac_try="$ac_cpp conftest.$ac_ext"
4963case "(($ac_try" in
4964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4965 *) ac_try_echo=$ac_try;;
4966esac
4967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4968 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4969 ac_status=$?
6bae0ccf 4970 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4971 rm -f conftest.er1
4972 cat conftest.err >&5
c0d27fcc 4973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4974 (exit $ac_status); } >/dev/null; then
4975 if test -s conftest.err; then
4976 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4977 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4978 else
4979 ac_cpp_err=
4980 fi
4981else
4982 ac_cpp_err=yes
c4bb2108 4983fi
503d2be0
AS
4984if test -z "$ac_cpp_err"; then
4985 # Broken: success on invalid input.
4986continue
4987else
4988 echo "$as_me: failed program was:" >&5
19650fd6
AS
4989sed 's/^/| /' conftest.$ac_ext >&5
4990
503d2be0
AS
4991 # Passes both tests.
4992ac_preproc_ok=:
4993break
ba4481b5 4994fi
ca81d7a0 4995
503d2be0
AS
4996rm -f conftest.err conftest.$ac_ext
4997
4998done
4999# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5000rm -f conftest.err conftest.$ac_ext
5001if $ac_preproc_ok; then
5002 :
ba4481b5 5003else
19650fd6
AS
5004 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
5005See \`config.log' for more details." >&5
5006echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
5007See \`config.log' for more details." >&2;}
503d2be0 5008 { (exit 1); exit 1; }; }
ba4481b5 5009fi
503d2be0
AS
5010
5011ac_ext=c
5012ac_cpp='$CPP $CPPFLAGS'
5013ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5014ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5015ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
5016
5017# Find a good install program. We prefer a C program (faster),
5018# so one script is as good as another. But avoid the broken or
5019# incompatible versions:
5020# SysV /etc/install, /usr/sbin/install
5021# SunOS /usr/etc/install
5022# IRIX /sbin/install
5023# AIX /bin/install
503d2be0 5024# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 5025# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
5026# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5027# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 5028# OS/2's system install, which has a completely different semantic
ba4481b5 5029# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
5030{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
5031echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 5032if test -z "$INSTALL"; then
503d2be0
AS
5033if test "${ac_cv_path_install+set}" = set; then
5034 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5035else
c0d27fcc
MR
5036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5037for as_dir in $PATH
5038do
5039 IFS=$as_save_IFS
5040 test -z "$as_dir" && as_dir=.
5041 # Account for people who put trailing slashes in PATH elements.
5042case $as_dir/ in
5043 ./ | .// | /cC/* | \
5044 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 5045 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
5046 /usr/ucb/* ) ;;
5047 *)
5048 # OSF1 and SCO ODT 3.0 have their own names for install.
5049 # Don't use installbsd from OSF since it installs stuff as root
5050 # by default.
5051 for ac_prog in ginstall scoinst install; do
5052 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 5053 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
5054 if test $ac_prog = install &&
5055 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5056 # AIX install. It has an incompatible calling convention.
5057 :
5058 elif test $ac_prog = install &&
5059 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5060 # program-specific install script used by HP pwplus--don't use.
5061 :
5062 else
5063 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5064 break 3
5065 fi
5066 fi
ba4481b5 5067 done
c0d27fcc
MR
5068 done
5069 ;;
5070esac
5071done
ca81d7a0 5072IFS=$as_save_IFS
c0d27fcc 5073
ba4481b5
DL
5074
5075fi
5076 if test "${ac_cv_path_install+set}" = set; then
503d2be0 5077 INSTALL=$ac_cv_path_install
ba4481b5 5078 else
ca81d7a0
JD
5079 # As a last resort, use the slow shell script. Don't cache a
5080 # value for INSTALL within a source directory, because that will
ba4481b5 5081 # break other packages using the cache if that directory is
ca81d7a0 5082 # removed, or if the value is a relative name.
503d2be0 5083 INSTALL=$ac_install_sh
ba4481b5
DL
5084 fi
5085fi
ca81d7a0
JD
5086{ echo "$as_me:$LINENO: result: $INSTALL" >&5
5087echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
5088
5089# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5090# It thinks the first close brace ends the variable substitution.
5091test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5092
503d2be0 5093test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5094
ba4481b5
DL
5095test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5096
c0d27fcc
MR
5097if test "x$RANLIB" = x; then
5098 if test -n "$ac_tool_prefix"; then
5099 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5100set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
5101{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5102echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5103if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 5104 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5105else
5106 if test -n "$RANLIB"; then
5107 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5108else
c0d27fcc
MR
5109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5110for as_dir in $PATH
5111do
5112 IFS=$as_save_IFS
5113 test -z "$as_dir" && as_dir=.
5114 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 5115 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5116 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5117 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5118 break 2
5119 fi
5120done
503d2be0 5121done
ca81d7a0 5122IFS=$as_save_IFS
503d2be0 5123
7397acc4
DL
5124fi
5125fi
503d2be0 5126RANLIB=$ac_cv_prog_RANLIB
7397acc4 5127if test -n "$RANLIB"; then
ca81d7a0
JD
5128 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5129echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5130else
ca81d7a0
JD
5131 { echo "$as_me:$LINENO: result: no" >&5
5132echo "${ECHO_T}no" >&6; }
503d2be0
AS
5133fi
5134
ca81d7a0 5135
503d2be0
AS
5136fi
5137if test -z "$ac_cv_prog_RANLIB"; then
5138 ac_ct_RANLIB=$RANLIB
5139 # Extract the first word of "ranlib", so it can be a program name with args.
5140set dummy ranlib; ac_word=$2
ca81d7a0
JD
5141{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5142echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5143if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5144 echo $ECHO_N "(cached) $ECHO_C" >&6
5145else
5146 if test -n "$ac_ct_RANLIB"; then
5147 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5148else
c0d27fcc
MR
5149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5150for as_dir in $PATH
5151do
5152 IFS=$as_save_IFS
5153 test -z "$as_dir" && as_dir=.
5154 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 5155 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5156 ac_cv_prog_ac_ct_RANLIB="ranlib"
5157 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5158 break 2
5159 fi
5160done
503d2be0 5161done
ca81d7a0 5162IFS=$as_save_IFS
503d2be0 5163
503d2be0
AS
5164fi
5165fi
5166ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5167if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
5168 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5169echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5170else
ca81d7a0
JD
5171 { echo "$as_me:$LINENO: result: no" >&5
5172echo "${ECHO_T}no" >&6; }
503d2be0
AS
5173fi
5174
ca81d7a0
JD
5175 if test "x$ac_ct_RANLIB" = x; then
5176 RANLIB=":"
5177 else
5178 case $cross_compiling:$ac_tool_warned in
5179yes:)
5180{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5181whose name does not start with the host triplet. If you think this
5182configuration is useful to you, please write to autoconf@gnu.org." >&5
5183echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5184whose name does not start with the host triplet. If you think this
5185configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5186ac_tool_warned=yes ;;
5187esac
5188 RANLIB=$ac_ct_RANLIB
5189 fi
7397acc4 5190else
503d2be0 5191 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5192fi
5193
5194fi
9e71690e
DK
5195# Extract the first word of "install-info", so it can be a program name with args.
5196set dummy install-info; ac_word=$2
ca81d7a0
JD
5197{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5198echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5199if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5200 echo $ECHO_N "(cached) $ECHO_C" >&6
5201else
5202 case $INSTALL_INFO in
5203 [\\/]* | ?:[\\/]*)
5204 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5205 ;;
5206 *)
5207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5208for as_dir in $PATH
5209do
5210 IFS=$as_save_IFS
5211 test -z "$as_dir" && as_dir=.
5212 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 5213 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5214 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5215 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5216 break 2
5217 fi
5218done
5219done
ca81d7a0 5220IFS=$as_save_IFS
9e71690e
DK
5221
5222 ;;
5223esac
5224fi
5225INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5226if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5227 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5228echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5229else
ca81d7a0
JD
5230 { echo "$as_me:$LINENO: result: no" >&5
5231echo "${ECHO_T}no" >&6; }
9e71690e
DK
5232fi
5233
ca81d7a0 5234
9e71690e
DK
5235# Extract the first word of "install-info", so it can be a program name with args.
5236set dummy install-info; ac_word=$2
ca81d7a0
JD
5237{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5238echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5239if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5240 echo $ECHO_N "(cached) $ECHO_C" >&6
5241else
5242 case $INSTALL_INFO in
5243 [\\/]* | ?:[\\/]*)
5244 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5245 ;;
5246 *)
5247 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5248for as_dir in /usr/sbin
5249do
5250 IFS=$as_save_IFS
5251 test -z "$as_dir" && as_dir=.
5252 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 5253 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5254 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5255 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5256 break 2
5257 fi
5258done
5259done
ca81d7a0 5260IFS=$as_save_IFS
9e71690e
DK
5261
5262 ;;
5263esac
5264fi
5265INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5266if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5267 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5268echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5269else
ca81d7a0
JD
5270 { echo "$as_me:$LINENO: result: no" >&5
5271echo "${ECHO_T}no" >&6; }
9e71690e
DK
5272fi
5273
ca81d7a0 5274
9e71690e
DK
5275# Extract the first word of "install-info", so it can be a program name with args.
5276set dummy install-info; ac_word=$2
ca81d7a0
JD
5277{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5278echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5279if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5280 echo $ECHO_N "(cached) $ECHO_C" >&6
5281else
5282 case $INSTALL_INFO in
5283 [\\/]* | ?:[\\/]*)
5284 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5285 ;;
5286 *)
5287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5288for as_dir in /sbin
5289do
5290 IFS=$as_save_IFS
5291 test -z "$as_dir" && as_dir=.
5292 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 5293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5294 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5295 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5296 break 2
5297 fi
5298done
5299done
ca81d7a0 5300IFS=$as_save_IFS
9e71690e
DK
5301
5302 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5303 ;;
5304esac
5305fi
5306INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5307if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5308 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5309echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5310else
ca81d7a0
JD
5311 { echo "$as_me:$LINENO: result: no" >&5
5312echo "${ECHO_T}no" >&6; }
9e71690e
DK
5313fi
5314
ca81d7a0 5315
8ae52ca6
RF
5316# Extract the first word of "gzip", so it can be a program name with args.
5317set dummy gzip; ac_word=$2
ca81d7a0
JD
5318{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5319echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5320if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5321 echo $ECHO_N "(cached) $ECHO_C" >&6
5322else
46e35e9f 5323 case $GZIP_PROG in
8ae52ca6 5324 [\\/]* | ?:[\\/]*)
46e35e9f 5325 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5326 ;;
5327 *)
5328 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5329for as_dir in $PATH
5330do
5331 IFS=$as_save_IFS
5332 test -z "$as_dir" && as_dir=.
5333 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 5334 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5335 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5336 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5337 break 2
5338 fi
5339done
5340done
ca81d7a0 5341IFS=$as_save_IFS
8ae52ca6
RF
5342
5343 ;;
5344esac
5345fi
46e35e9f 5346GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5347if test -n "$GZIP_PROG"; then
ca81d7a0
JD
5348 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5349echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5350else
ca81d7a0
JD
5351 { echo "$as_me:$LINENO: result: no" >&5
5352echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5353fi
5354
ba4481b5 5355
c0d27fcc 5356
ca81d7a0 5357
8e967cf7
MR
5358if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5359then
5360 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5361fi
5362
5363if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5364then
5365 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5366fi
5367
c0d27fcc 5368
fe239f0f 5369late_LDFLAGS=$LDFLAGS
4af002d6 5370if test "$GCC" = yes; then
fe239f0f
AS
5371 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5372else
5373 LDFLAGS="$LDFLAGS -znocombreloc"
5374fi
5375
ca81d7a0
JD
5376{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5377echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5378cat >conftest.$ac_ext <<_ACEOF
5379main(){return 0;}
5380_ACEOF
5381rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5382if { (ac_try="$ac_link"
5383case "(($ac_try" in
5384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5385 *) ac_try_echo=$ac_try;;
5386esac
5387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5388 (eval "$ac_link") 2>conftest.er1
fe239f0f 5389 ac_status=$?
edfaf76d
LK
5390 grep -v '^ *+' conftest.er1 >conftest.err
5391 rm -f conftest.er1
5392 cat conftest.err >&5
fe239f0f
AS
5393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5394 (exit $ac_status); } &&
ca81d7a0
JD
5395 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5396 { (case "(($ac_try" in
5397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5398 *) ac_try_echo=$ac_try;;
5399esac
5400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5401 (eval "$ac_try") 2>&5
edfaf76d
LK
5402 ac_status=$?
5403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5404 (exit $ac_status); }; } &&
5405 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
5406 { (case "(($ac_try" in
5407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5408 *) ac_try_echo=$ac_try;;
5409esac
5410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5411 (eval "$ac_try") 2>&5
fe239f0f
AS
5412 ac_status=$?
5413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5414 (exit $ac_status); }; }; then
ca81d7a0
JD
5415 { echo "$as_me:$LINENO: result: yes" >&5
5416echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5417else
5418 echo "$as_me: failed program was:" >&5
5419sed 's/^/| /' conftest.$ac_ext >&5
5420
ca81d7a0
JD
5421 LDFLAGS=$late_LDFLAGS
5422 { echo "$as_me:$LINENO: result: no" >&5
5423echo "${ECHO_T}no" >&6; }
fe239f0f 5424fi
ca81d7a0
JD
5425
5426rm -f core conftest.err conftest.$ac_objext \
edfaf76d 5427 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5428
3b33a005
DL
5429#### Extract some information from the operating system and machine files.
5430
c0d27fcc 5431{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5432 - which libraries the lib-src programs will want, and
503d2be0
AS
5433 - whether the GNU malloc routines are usable..." >&5
5434echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5435 - which libraries the lib-src programs will want, and
503d2be0 5436 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5437
5438### First figure out CFLAGS (which we use for running the compiler here)
5439### and REAL_CFLAGS (which we use for real compilation).
5440### The two are the same except on a few systems, where they are made
5441### different to work around various lossages. For example,
5442### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5443### as implying static linking.
5444
5445### If the CFLAGS env var is specified, we use that value
5446### instead of the default.
5447
5448### It's not important that this name contain the PID; you can't run
5449### two configures in the same directory and have anything work
5450### anyway.
5451tempcname="conftest.c"
5452
5453echo '
5454#include "'${srcdir}'/src/'${opsysfile}'"
5455#include "'${srcdir}'/src/'${machfile}'"
5456#ifndef LIBS_MACHINE
5457#define LIBS_MACHINE
5458#endif
5459#ifndef LIBS_SYSTEM
5460#define LIBS_SYSTEM
5461#endif
5462#ifndef C_SWITCH_SYSTEM
5463#define C_SWITCH_SYSTEM
5464#endif
5465#ifndef C_SWITCH_MACHINE
5466#define C_SWITCH_MACHINE
5467#endif
5468configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5469configure___ c_switch_system=C_SWITCH_SYSTEM
5470configure___ c_switch_machine=C_SWITCH_MACHINE
5471
5472#ifndef LIB_X11_LIB
5473#define LIB_X11_LIB -lX11
5474#endif
5475
5476#ifndef LIBX11_MACHINE
5477#define LIBX11_MACHINE
5478#endif
5479
5480#ifndef LIBX11_SYSTEM
5481#define LIBX11_SYSTEM
5482#endif
5483configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
5484
5485#ifdef UNEXEC
5486configure___ unexec=UNEXEC
5487#else
5488configure___ unexec=unexec.o
5489#endif
5490
5491#ifdef SYSTEM_MALLOC
5492configure___ system_malloc=yes
5493#else
5494configure___ system_malloc=no
5495#endif
5496
ef9e4345
GM
5497#ifdef USE_MMAP_FOR_BUFFERS
5498configure___ use_mmap_for_buffers=yes
73b77ee5 5499#else
ef9e4345 5500configure___ use_mmap_for_buffers=no
73b77ee5
GM
5501#endif
5502
3b33a005
DL
5503#ifndef C_DEBUG_SWITCH
5504#define C_DEBUG_SWITCH -g
5505#endif
5506
5507#ifndef C_OPTIMIZE_SWITCH
5508#ifdef __GNUC__
5509#define C_OPTIMIZE_SWITCH -O2
5510#else
5511#define C_OPTIMIZE_SWITCH -O
5512#endif
5513#endif
5514
01abe918
CY
5515#ifndef C_WARNINGS_SWITCH
5516#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5517#endif
5518
3b33a005
DL
5519#ifndef LD_SWITCH_MACHINE
5520#define LD_SWITCH_MACHINE
5521#endif
5522
5523#ifndef LD_SWITCH_SYSTEM
5524#define LD_SWITCH_SYSTEM
5525#endif
5526
5527#ifndef LD_SWITCH_X_SITE_AUX
5528#define LD_SWITCH_X_SITE_AUX
503d2be0 5529#endif
3b33a005
DL
5530
5531configure___ ld_switch_system=LD_SWITCH_SYSTEM
5532configure___ ld_switch_machine=LD_SWITCH_MACHINE
5533
5534#ifdef THIS_IS_CONFIGURE
5535
5536/* Get the CFLAGS for tests in configure. */
5537#ifdef __GNUC__
5538configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5539#else
5540configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5541#endif
5542
5543#else /* not THIS_IS_CONFIGURE */
5544
5545/* Get the CFLAGS for real compilation. */
5546#ifdef __GNUC__
01abe918 5547configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5548#else
5549configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5550#endif
5551
5552#endif /* not THIS_IS_CONFIGURE */
5553' > ${tempcname}
5554
5555# The value of CPP is a quoted variable reference, so we need to do this
5556# to get its actual value...
5557CPP=`eval "echo $CPP"`
5558eval `${CPP} -Isrc ${tempcname} \
5559 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5560if test "x$SPECIFIED_CFLAGS" = x; then
5561 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5562 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5563else
5564 REAL_CFLAGS="$CFLAGS"
5565fi
5566rm ${tempcname}
5567
5568ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5569
5570### Make sure subsequent tests use flags consistent with the build flags.
5571
5572if test x"${OVERRIDE_CPPFLAGS}" != x; then
5573 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5574else
5575 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5576fi
5577
6bae0ccf
DL
5578
5579
ca81d7a0 5580# Check whether --enable-largefile was given.
f4988be7 5581if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5582 enableval=$enable_largefile;
5583fi
f4988be7 5584
503d2be0 5585if test "$enable_largefile" != no; then
f4988be7 5586
ca81d7a0
JD
5587 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5588echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5589if test "${ac_cv_sys_largefile_CC+set}" = set; then
5590 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5591else
f4988be7 5592 ac_cv_sys_largefile_CC=no
503d2be0
AS
5593 if test "$GCC" != yes; then
5594 ac_save_CC=$CC
5595 while :; do
ca81d7a0
JD
5596 # IRIX 6.2 and later do not support large files by default,
5597 # so use the C compiler's -n32 option if that helps.
edfaf76d 5598 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5599/* confdefs.h. */
5600_ACEOF
5601cat confdefs.h >>conftest.$ac_ext
5602cat >>conftest.$ac_ext <<_ACEOF
5603/* end confdefs.h. */
f4988be7 5604#include <sys/types.h>
503d2be0
AS
5605 /* Check that off_t can represent 2**63 - 1 correctly.
5606 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5607 since some C++ compilers masquerading as C compilers
5608 incorrectly reject 9223372036854775807. */
5609#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5610 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5611 && LARGE_OFF_T % 2147483647 == 1)
5612 ? 1 : -1];
5613int
5614main ()
5615{
f4988be7 5616
503d2be0
AS
5617 ;
5618 return 0;
5619}
5620_ACEOF
ca81d7a0
JD
5621 rm -f conftest.$ac_objext
5622if { (ac_try="$ac_compile"
5623case "(($ac_try" in
5624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5625 *) ac_try_echo=$ac_try;;
5626esac
5627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5628 (eval "$ac_compile") 2>conftest.er1
503d2be0 5629 ac_status=$?
edfaf76d
LK
5630 grep -v '^ *+' conftest.er1 >conftest.err
5631 rm -f conftest.er1
5632 cat conftest.err >&5
c0d27fcc 5633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5634 (exit $ac_status); } &&
ca81d7a0
JD
5635 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5636 { (case "(($ac_try" in
5637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5638 *) ac_try_echo=$ac_try;;
5639esac
5640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5641 (eval "$ac_try") 2>&5
edfaf76d
LK
5642 ac_status=$?
5643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5644 (exit $ac_status); }; } &&
5645 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
5646 { (case "(($ac_try" in
5647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5648 *) ac_try_echo=$ac_try;;
5649esac
5650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5651 (eval "$ac_try") 2>&5
503d2be0 5652 ac_status=$?
c0d27fcc 5653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5654 (exit $ac_status); }; }; then
5655 break
b192d653 5656else
503d2be0 5657 echo "$as_me: failed program was:" >&5
19650fd6
AS
5658sed 's/^/| /' conftest.$ac_ext >&5
5659
ca81d7a0 5660
503d2be0 5661fi
ca81d7a0
JD
5662
5663rm -f core conftest.err conftest.$ac_objext
5664 CC="$CC -n32"
5665 rm -f conftest.$ac_objext
5666if { (ac_try="$ac_compile"
5667case "(($ac_try" in
5668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5669 *) ac_try_echo=$ac_try;;
5670esac
5671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5672 (eval "$ac_compile") 2>conftest.er1
503d2be0 5673 ac_status=$?
edfaf76d
LK
5674 grep -v '^ *+' conftest.er1 >conftest.err
5675 rm -f conftest.er1
5676 cat conftest.err >&5
c0d27fcc 5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5678 (exit $ac_status); } &&
ca81d7a0
JD
5679 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5680 { (case "(($ac_try" in
5681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5682 *) ac_try_echo=$ac_try;;
5683esac
5684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5685 (eval "$ac_try") 2>&5
edfaf76d
LK
5686 ac_status=$?
5687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5688 (exit $ac_status); }; } &&
5689 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
5690 { (case "(($ac_try" in
5691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5692 *) ac_try_echo=$ac_try;;
5693esac
5694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5695 (eval "$ac_try") 2>&5
503d2be0 5696 ac_status=$?
c0d27fcc 5697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5698 (exit $ac_status); }; }; then
5699 ac_cv_sys_largefile_CC=' -n32'; break
5700else
5701 echo "$as_me: failed program was:" >&5
19650fd6
AS
5702sed 's/^/| /' conftest.$ac_ext >&5
5703
ca81d7a0 5704
503d2be0 5705fi
ca81d7a0
JD
5706
5707rm -f core conftest.err conftest.$ac_objext
edfaf76d 5708 break
503d2be0
AS
5709 done
5710 CC=$ac_save_CC
5711 rm -f conftest.$ac_ext
5712 fi
b192d653 5713fi
ca81d7a0
JD
5714{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5715echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5716 if test "$ac_cv_sys_largefile_CC" != no; then
5717 CC=$CC$ac_cv_sys_largefile_CC
5718 fi
b192d653 5719
ca81d7a0
JD
5720 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5721echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5722if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5723 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5724else
503d2be0 5725 while :; do
f4988be7 5726 ac_cv_sys_file_offset_bits=no
503d2be0 5727 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5728/* confdefs.h. */
5729_ACEOF
5730cat confdefs.h >>conftest.$ac_ext
5731cat >>conftest.$ac_ext <<_ACEOF
5732/* end confdefs.h. */
f4988be7 5733#include <sys/types.h>
503d2be0
AS
5734 /* Check that off_t can represent 2**63 - 1 correctly.
5735 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5736 since some C++ compilers masquerading as C compilers
5737 incorrectly reject 9223372036854775807. */
5738#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5739 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5740 && LARGE_OFF_T % 2147483647 == 1)
5741 ? 1 : -1];
5742int
5743main ()
5744{
f4988be7 5745
503d2be0
AS
5746 ;
5747 return 0;
5748}
5749_ACEOF
5750rm -f conftest.$ac_objext
ca81d7a0
JD
5751if { (ac_try="$ac_compile"
5752case "(($ac_try" in
5753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5754 *) ac_try_echo=$ac_try;;
5755esac
5756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5757 (eval "$ac_compile") 2>conftest.er1
503d2be0 5758 ac_status=$?
edfaf76d
LK
5759 grep -v '^ *+' conftest.er1 >conftest.err
5760 rm -f conftest.er1
5761 cat conftest.err >&5
c0d27fcc 5762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5763 (exit $ac_status); } &&
ca81d7a0
JD
5764 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5765 { (case "(($ac_try" in
5766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5767 *) ac_try_echo=$ac_try;;
5768esac
5769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5770 (eval "$ac_try") 2>&5
edfaf76d
LK
5771 ac_status=$?
5772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5773 (exit $ac_status); }; } &&
5774 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
5775 { (case "(($ac_try" in
5776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5777 *) ac_try_echo=$ac_try;;
5778esac
5779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5780 (eval "$ac_try") 2>&5
503d2be0 5781 ac_status=$?
c0d27fcc 5782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5783 (exit $ac_status); }; }; then
5784 break
f4988be7 5785else
503d2be0 5786 echo "$as_me: failed program was:" >&5
19650fd6
AS
5787sed 's/^/| /' conftest.$ac_ext >&5
5788
ca81d7a0 5789
503d2be0 5790fi
ca81d7a0
JD
5791
5792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5793 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5794/* confdefs.h. */
5795_ACEOF
5796cat confdefs.h >>conftest.$ac_ext
5797cat >>conftest.$ac_ext <<_ACEOF
5798/* end confdefs.h. */
f4988be7
GM
5799#define _FILE_OFFSET_BITS 64
5800#include <sys/types.h>
503d2be0
AS
5801 /* Check that off_t can represent 2**63 - 1 correctly.
5802 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5803 since some C++ compilers masquerading as C compilers
5804 incorrectly reject 9223372036854775807. */
5805#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5806 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5807 && LARGE_OFF_T % 2147483647 == 1)
5808 ? 1 : -1];
5809int
5810main ()
5811{
5812
5813 ;
5814 return 0;
5815}
5816_ACEOF
5817rm -f conftest.$ac_objext
ca81d7a0
JD
5818if { (ac_try="$ac_compile"
5819case "(($ac_try" in
5820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5821 *) ac_try_echo=$ac_try;;
5822esac
5823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5824 (eval "$ac_compile") 2>conftest.er1
503d2be0 5825 ac_status=$?
edfaf76d
LK
5826 grep -v '^ *+' conftest.er1 >conftest.err
5827 rm -f conftest.er1
5828 cat conftest.err >&5
c0d27fcc 5829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5830 (exit $ac_status); } &&
ca81d7a0
JD
5831 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5832 { (case "(($ac_try" in
5833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5834 *) ac_try_echo=$ac_try;;
5835esac
5836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5837 (eval "$ac_try") 2>&5
edfaf76d
LK
5838 ac_status=$?
5839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5840 (exit $ac_status); }; } &&
5841 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
5842 { (case "(($ac_try" in
5843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5844 *) ac_try_echo=$ac_try;;
5845esac
5846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5847 (eval "$ac_try") 2>&5
503d2be0 5848 ac_status=$?
c0d27fcc 5849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5850 (exit $ac_status); }; }; then
5851 ac_cv_sys_file_offset_bits=64; break
5852else
5853 echo "$as_me: failed program was:" >&5
19650fd6
AS
5854sed 's/^/| /' conftest.$ac_ext >&5
5855
ca81d7a0 5856
503d2be0 5857fi
ca81d7a0
JD
5858
5859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
5860 break
5861done
ba4481b5 5862fi
ca81d7a0
JD
5863{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5864echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
503d2be0 5865if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 5866
c0d27fcc 5867cat >>confdefs.h <<_ACEOF
f4988be7 5868#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5869_ACEOF
f4988be7 5870
503d2be0
AS
5871fi
5872rm -f conftest*
ca81d7a0
JD
5873 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
5874echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5875if test "${ac_cv_sys_large_files+set}" = set; then
5876 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5877else
503d2be0 5878 while :; do
f4988be7 5879 ac_cv_sys_large_files=no
503d2be0 5880 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5881/* confdefs.h. */
5882_ACEOF
5883cat confdefs.h >>conftest.$ac_ext
5884cat >>conftest.$ac_ext <<_ACEOF
5885/* end confdefs.h. */
503d2be0
AS
5886#include <sys/types.h>
5887 /* Check that off_t can represent 2**63 - 1 correctly.
5888 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5889 since some C++ compilers masquerading as C compilers
5890 incorrectly reject 9223372036854775807. */
5891#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5892 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5893 && LARGE_OFF_T % 2147483647 == 1)
5894 ? 1 : -1];
5895int
5896main ()
5897{
ba4481b5 5898
503d2be0
AS
5899 ;
5900 return 0;
5901}
5902_ACEOF
5903rm -f conftest.$ac_objext
ca81d7a0
JD
5904if { (ac_try="$ac_compile"
5905case "(($ac_try" in
5906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5907 *) ac_try_echo=$ac_try;;
5908esac
5909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5910 (eval "$ac_compile") 2>conftest.er1
503d2be0 5911 ac_status=$?
edfaf76d
LK
5912 grep -v '^ *+' conftest.er1 >conftest.err
5913 rm -f conftest.er1
5914 cat conftest.err >&5
c0d27fcc 5915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5916 (exit $ac_status); } &&
ca81d7a0
JD
5917 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5918 { (case "(($ac_try" in
5919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5920 *) ac_try_echo=$ac_try;;
5921esac
5922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5923 (eval "$ac_try") 2>&5
edfaf76d
LK
5924 ac_status=$?
5925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5926 (exit $ac_status); }; } &&
5927 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
5928 { (case "(($ac_try" in
5929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5930 *) ac_try_echo=$ac_try;;
5931esac
5932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5933 (eval "$ac_try") 2>&5
503d2be0 5934 ac_status=$?
c0d27fcc 5935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5936 (exit $ac_status); }; }; then
5937 break
ba4481b5 5938else
503d2be0 5939 echo "$as_me: failed program was:" >&5
19650fd6
AS
5940sed 's/^/| /' conftest.$ac_ext >&5
5941
ca81d7a0 5942
503d2be0 5943fi
ca81d7a0
JD
5944
5945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5946 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5947/* confdefs.h. */
5948_ACEOF
5949cat confdefs.h >>conftest.$ac_ext
5950cat >>conftest.$ac_ext <<_ACEOF
5951/* end confdefs.h. */
f4988be7 5952#define _LARGE_FILES 1
503d2be0
AS
5953#include <sys/types.h>
5954 /* Check that off_t can represent 2**63 - 1 correctly.
5955 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5956 since some C++ compilers masquerading as C compilers
5957 incorrectly reject 9223372036854775807. */
5958#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5959 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5960 && LARGE_OFF_T % 2147483647 == 1)
5961 ? 1 : -1];
5962int
5963main ()
5964{
f4988be7 5965
503d2be0
AS
5966 ;
5967 return 0;
5968}
5969_ACEOF
5970rm -f conftest.$ac_objext
ca81d7a0
JD
5971if { (ac_try="$ac_compile"
5972case "(($ac_try" in
5973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5974 *) ac_try_echo=$ac_try;;
5975esac
5976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5977 (eval "$ac_compile") 2>conftest.er1
503d2be0 5978 ac_status=$?
edfaf76d
LK
5979 grep -v '^ *+' conftest.er1 >conftest.err
5980 rm -f conftest.er1
5981 cat conftest.err >&5
c0d27fcc 5982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5983 (exit $ac_status); } &&
ca81d7a0
JD
5984 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5985 { (case "(($ac_try" in
5986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5987 *) ac_try_echo=$ac_try;;
5988esac
5989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5990 (eval "$ac_try") 2>&5
edfaf76d
LK
5991 ac_status=$?
5992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5993 (exit $ac_status); }; } &&
5994 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
5995 { (case "(($ac_try" in
5996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5997 *) ac_try_echo=$ac_try;;
5998esac
5999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6000 (eval "$ac_try") 2>&5
503d2be0 6001 ac_status=$?
c0d27fcc 6002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
6003 (exit $ac_status); }; }; then
6004 ac_cv_sys_large_files=1; break
6005else
6006 echo "$as_me: failed program was:" >&5
19650fd6
AS
6007sed 's/^/| /' conftest.$ac_ext >&5
6008
ca81d7a0 6009
503d2be0 6010fi
ca81d7a0
JD
6011
6012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
6013 break
6014done
ba4481b5 6015fi
ca81d7a0
JD
6016{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
6017echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
503d2be0 6018if test "$ac_cv_sys_large_files" != no; then
ba4481b5 6019
c0d27fcc 6020cat >>confdefs.h <<_ACEOF
f4988be7 6021#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 6022_ACEOF
ba4481b5 6023
503d2be0
AS
6024fi
6025rm -f conftest*
6026fi
ba4481b5 6027
c0d27fcc 6028
439f58ee 6029
bc5d9888
CY
6030### The standard library on x86-64 GNU/Linux distributions can
6031### be located in either /usr/lib64 or /usr/lib.
6032case "${canonical}" in
6033 x86_64-*-linux-gnu* )
6034 if test -d /usr/lib64; then
6035
6036cat >>confdefs.h <<\_ACEOF
6037#define HAVE_X86_64_LIB64_DIR 1
6038_ACEOF
6039
6040fi
6041esac
6042
439f58ee
JD
6043
6044
6045
2c9dccc9
PJ
6046if test "${with_sound}" != "no"; then
6047 # Sound support for GNU/Linux and the free BSDs.
ca81d7a0
JD
6048 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6049echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
c0d27fcc
MR
6050if test "${ac_cv_header_stdc+set}" = set; then
6051 echo $ECHO_N "(cached) $ECHO_C" >&6
6052else
6053 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6054/* confdefs.h. */
6055_ACEOF
6056cat confdefs.h >>conftest.$ac_ext
6057cat >>conftest.$ac_ext <<_ACEOF
6058/* end confdefs.h. */
c0d27fcc
MR
6059#include <stdlib.h>
6060#include <stdarg.h>
6061#include <string.h>
6062#include <float.h>
98418dba 6063
19650fd6
AS
6064int
6065main ()
6066{
6067
6068 ;
6069 return 0;
6070}
c0d27fcc 6071_ACEOF
19650fd6 6072rm -f conftest.$ac_objext
ca81d7a0
JD
6073if { (ac_try="$ac_compile"
6074case "(($ac_try" in
6075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6076 *) ac_try_echo=$ac_try;;
6077esac
6078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6079 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6080 ac_status=$?
edfaf76d
LK
6081 grep -v '^ *+' conftest.er1 >conftest.err
6082 rm -f conftest.er1
6083 cat conftest.err >&5
cd958eb3 6084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 6085 (exit $ac_status); } &&
ca81d7a0
JD
6086 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6087 { (case "(($ac_try" in
6088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6089 *) ac_try_echo=$ac_try;;
6090esac
6091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6092 (eval "$ac_try") 2>&5
edfaf76d
LK
6093 ac_status=$?
6094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6095 (exit $ac_status); }; } &&
6096 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
6097 { (case "(($ac_try" in
6098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6099 *) ac_try_echo=$ac_try;;
6100esac
6101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6102 (eval "$ac_try") 2>&5
19650fd6
AS
6103 ac_status=$?
6104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6105 (exit $ac_status); }; }; then
c0d27fcc
MR
6106 ac_cv_header_stdc=yes
6107else
6108 echo "$as_me: failed program was:" >&5
19650fd6
AS
6109sed 's/^/| /' conftest.$ac_ext >&5
6110
ca81d7a0 6111 ac_cv_header_stdc=no
c0d27fcc 6112fi
ca81d7a0
JD
6113
6114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
6115
6116if test $ac_cv_header_stdc = yes; then
6117 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6118 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6119/* confdefs.h. */
6120_ACEOF
6121cat confdefs.h >>conftest.$ac_ext
6122cat >>conftest.$ac_ext <<_ACEOF
6123/* end confdefs.h. */
c0d27fcc
MR
6124#include <string.h>
6125
6126_ACEOF
6127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6128 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
6129 :
6130else
6131 ac_cv_header_stdc=no
6132fi
6133rm -f conftest*
6134
6135fi
6136
6137if test $ac_cv_header_stdc = yes; then
6138 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6139 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6140/* confdefs.h. */
6141_ACEOF
6142cat confdefs.h >>conftest.$ac_ext
6143cat >>conftest.$ac_ext <<_ACEOF
6144/* end confdefs.h. */
c0d27fcc
MR
6145#include <stdlib.h>
6146
6147_ACEOF
6148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6149 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
6150 :
6151else
6152 ac_cv_header_stdc=no
6153fi
6154rm -f conftest*
6155
6156fi
6157
6158if test $ac_cv_header_stdc = yes; then
6159 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6160 if test "$cross_compiling" = yes; then
6161 :
6162else
6163 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6164/* confdefs.h. */
6165_ACEOF
6166cat confdefs.h >>conftest.$ac_ext
6167cat >>conftest.$ac_ext <<_ACEOF
6168/* end confdefs.h. */
c0d27fcc 6169#include <ctype.h>
ca81d7a0 6170#include <stdlib.h>
c0d27fcc
MR
6171#if ((' ' & 0x0FF) == 0x020)
6172# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6173# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6174#else
19650fd6 6175# define ISLOWER(c) \
edfaf76d
LK
6176 (('a' <= (c) && (c) <= 'i') \
6177 || ('j' <= (c) && (c) <= 'r') \
6178 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
6179# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6180#endif
6181
6182#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6183int
6184main ()
6185{
6186 int i;
6187 for (i = 0; i < 256; i++)
6188 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6189 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6190 return 2;
6191 return 0;
c0d27fcc
MR
6192}
6193_ACEOF
6194rm -f conftest$ac_exeext
ca81d7a0
JD
6195if { (ac_try="$ac_link"
6196case "(($ac_try" in
6197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6198 *) ac_try_echo=$ac_try;;
6199esac
6200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6201 (eval "$ac_link") 2>&5
c0d27fcc
MR
6202 ac_status=$?
6203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6204 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6205 { (case "(($ac_try" in
6206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6207 *) ac_try_echo=$ac_try;;
6208esac
6209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6210 (eval "$ac_try") 2>&5
c0d27fcc
MR
6211 ac_status=$?
6212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6213 (exit $ac_status); }; }; then
6214 :
6215else
6216 echo "$as_me: program exited with status $ac_status" >&5
6217echo "$as_me: failed program was:" >&5
19650fd6
AS
6218sed 's/^/| /' conftest.$ac_ext >&5
6219
c0d27fcc
MR
6220( exit $ac_status )
6221ac_cv_header_stdc=no
6222fi
ca81d7a0 6223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6224fi
ca81d7a0
JD
6225
6226
c0d27fcc
MR
6227fi
6228fi
ca81d7a0
JD
6229{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6230echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
c0d27fcc
MR
6231if test $ac_cv_header_stdc = yes; then
6232
6233cat >>confdefs.h <<\_ACEOF
6234#define STDC_HEADERS 1
6235_ACEOF
6236
6237fi
6238
6239# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 6250 inttypes.h stdint.h unistd.h
98418dba
CW
6251do
6252as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6253{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6254echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6255if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6256 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6257else
925c2f3f 6258 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6259/* confdefs.h. */
6260_ACEOF
6261cat confdefs.h >>conftest.$ac_ext
6262cat >>conftest.$ac_ext <<_ACEOF
6263/* end confdefs.h. */
c0d27fcc
MR
6264$ac_includes_default
6265
6266#include <$ac_header>
6267_ACEOF
6268rm -f conftest.$ac_objext
ca81d7a0
JD
6269if { (ac_try="$ac_compile"
6270case "(($ac_try" in
6271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6272 *) ac_try_echo=$ac_try;;
6273esac
6274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6275 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6276 ac_status=$?
edfaf76d
LK
6277 grep -v '^ *+' conftest.er1 >conftest.err
6278 rm -f conftest.er1
6279 cat conftest.err >&5
c0d27fcc
MR
6280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6281 (exit $ac_status); } &&
ca81d7a0
JD
6282 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6283 { (case "(($ac_try" in
6284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6285 *) ac_try_echo=$ac_try;;
6286esac
6287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6288 (eval "$ac_try") 2>&5
edfaf76d
LK
6289 ac_status=$?
6290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6291 (exit $ac_status); }; } &&
6292 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
6293 { (case "(($ac_try" in
6294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6295 *) ac_try_echo=$ac_try;;
6296esac
6297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6298 (eval "$ac_try") 2>&5
c0d27fcc
MR
6299 ac_status=$?
6300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6301 (exit $ac_status); }; }; then
6302 eval "$as_ac_Header=yes"
6303else
6304 echo "$as_me: failed program was:" >&5
19650fd6
AS
6305sed 's/^/| /' conftest.$ac_ext >&5
6306
ca81d7a0 6307 eval "$as_ac_Header=no"
c0d27fcc 6308fi
ca81d7a0
JD
6309
6310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6311fi
ca81d7a0
JD
6312ac_res=`eval echo '${'$as_ac_Header'}'`
6313 { echo "$as_me:$LINENO: result: $ac_res" >&5
6314echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6315if test `eval echo '${'$as_ac_Header'}'` = yes; then
6316 cat >>confdefs.h <<_ACEOF
6317#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6318_ACEOF
6319
6320fi
6321
6322done
6323
6324
6325
6326
6327
6328for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
6329do
6330as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6331if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6332 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6333echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6334if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6335 echo $ECHO_N "(cached) $ECHO_C" >&6
6336fi
ca81d7a0
JD
6337ac_res=`eval echo '${'$as_ac_Header'}'`
6338 { echo "$as_me:$LINENO: result: $ac_res" >&5
6339echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6340else
6341 # Is the header compilable?
ca81d7a0
JD
6342{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6343echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6344cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6345/* confdefs.h. */
6346_ACEOF
6347cat confdefs.h >>conftest.$ac_ext
6348cat >>conftest.$ac_ext <<_ACEOF
6349/* end confdefs.h. */
c0d27fcc 6350$ac_includes_default
98418dba 6351#include <$ac_header>
503d2be0 6352_ACEOF
c0d27fcc 6353rm -f conftest.$ac_objext
ca81d7a0
JD
6354if { (ac_try="$ac_compile"
6355case "(($ac_try" in
6356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6357 *) ac_try_echo=$ac_try;;
6358esac
6359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6360 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6361 ac_status=$?
edfaf76d
LK
6362 grep -v '^ *+' conftest.er1 >conftest.err
6363 rm -f conftest.er1
6364 cat conftest.err >&5
c0d27fcc
MR
6365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6366 (exit $ac_status); } &&
ca81d7a0
JD
6367 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6368 { (case "(($ac_try" in
6369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6370 *) ac_try_echo=$ac_try;;
6371esac
6372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6373 (eval "$ac_try") 2>&5
edfaf76d
LK
6374 ac_status=$?
6375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6376 (exit $ac_status); }; } &&
6377 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
6378 { (case "(($ac_try" in
6379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6380 *) ac_try_echo=$ac_try;;
6381esac
6382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6383 (eval "$ac_try") 2>&5
c0d27fcc
MR
6384 ac_status=$?
6385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6386 (exit $ac_status); }; }; then
6387 ac_header_compiler=yes
6388else
6389 echo "$as_me: failed program was:" >&5
19650fd6
AS
6390sed 's/^/| /' conftest.$ac_ext >&5
6391
ca81d7a0 6392 ac_header_compiler=no
c0d27fcc 6393fi
ca81d7a0
JD
6394
6395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6396{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6397echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6398
6399# Is the header present?
ca81d7a0
JD
6400{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6401echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6402cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6403/* confdefs.h. */
6404_ACEOF
6405cat confdefs.h >>conftest.$ac_ext
6406cat >>conftest.$ac_ext <<_ACEOF
6407/* end confdefs.h. */
c0d27fcc
MR
6408#include <$ac_header>
6409_ACEOF
ca81d7a0
JD
6410if { (ac_try="$ac_cpp conftest.$ac_ext"
6411case "(($ac_try" in
6412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6413 *) ac_try_echo=$ac_try;;
6414esac
6415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6416 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6417 ac_status=$?
6bae0ccf 6418 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6419 rm -f conftest.er1
6420 cat conftest.err >&5
c0d27fcc 6421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6422 (exit $ac_status); } >/dev/null; then
6423 if test -s conftest.err; then
6424 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 6425 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
6426 else
6427 ac_cpp_err=
6428 fi
6429else
6430 ac_cpp_err=yes
6431fi
6432if test -z "$ac_cpp_err"; then
c0d27fcc 6433 ac_header_preproc=yes
f4988be7 6434else
503d2be0 6435 echo "$as_me: failed program was:" >&5
19650fd6
AS
6436sed 's/^/| /' conftest.$ac_ext >&5
6437
c0d27fcc 6438 ac_header_preproc=no
f4988be7 6439fi
ca81d7a0 6440
98418dba 6441rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6442{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6443echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6444
6445# So? What about this header?
edfaf76d
LK
6446case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6447 yes:no: )
c0d27fcc
MR
6448 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6449echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6450 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6451echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6452 ac_header_preproc=yes
19650fd6 6453 ;;
edfaf76d 6454 no:yes:* )
c0d27fcc
MR
6455 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6456echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6457 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6458echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6459 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6460echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6461 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6462echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6463 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6464echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6465 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6466echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6467
19650fd6 6468 ;;
c0d27fcc 6469esac
ca81d7a0
JD
6470{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6471echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6472if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6473 echo $ECHO_N "(cached) $ECHO_C" >&6
6474else
edfaf76d 6475 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6476fi
ca81d7a0
JD
6477ac_res=`eval echo '${'$as_ac_Header'}'`
6478 { echo "$as_me:$LINENO: result: $ac_res" >&5
6479echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6480
6481fi
98418dba 6482if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6483 cat >>confdefs.h <<_ACEOF
98418dba 6484#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6485_ACEOF
f4988be7
GM
6486
6487fi
c0d27fcc 6488
98418dba
CW
6489done
6490
6491 # Emulation library used on NetBSD.
ca81d7a0
JD
6492 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6493echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6494if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6495 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6496else
98418dba
CW
6497 ac_check_lib_save_LIBS=$LIBS
6498LIBS="-lossaudio $LIBS"
6499cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6500/* confdefs.h. */
6501_ACEOF
6502cat confdefs.h >>conftest.$ac_ext
6503cat >>conftest.$ac_ext <<_ACEOF
6504/* end confdefs.h. */
98418dba 6505
ca81d7a0
JD
6506/* Override any GCC internal prototype to avoid an error.
6507 Use char because int might match the return type of a GCC
6508 builtin and then its argument prototype would still apply. */
98418dba
CW
6509#ifdef __cplusplus
6510extern "C"
f4988be7 6511#endif
98418dba 6512char _oss_ioctl ();
503d2be0
AS
6513int
6514main ()
6515{
ca81d7a0 6516return _oss_ioctl ();
503d2be0
AS
6517 ;
6518 return 0;
6519}
6520_ACEOF
98418dba 6521rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6522if { (ac_try="$ac_link"
6523case "(($ac_try" in
6524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6525 *) ac_try_echo=$ac_try;;
6526esac
6527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6528 (eval "$ac_link") 2>conftest.er1
503d2be0 6529 ac_status=$?
edfaf76d
LK
6530 grep -v '^ *+' conftest.er1 >conftest.err
6531 rm -f conftest.er1
6532 cat conftest.err >&5
c0d27fcc 6533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6534 (exit $ac_status); } &&
ca81d7a0
JD
6535 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6536 { (case "(($ac_try" in
6537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6538 *) ac_try_echo=$ac_try;;
6539esac
6540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6541 (eval "$ac_try") 2>&5
edfaf76d
LK
6542 ac_status=$?
6543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6544 (exit $ac_status); }; } &&
6545 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
6546 { (case "(($ac_try" in
6547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6548 *) ac_try_echo=$ac_try;;
6549esac
6550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6551 (eval "$ac_try") 2>&5
503d2be0 6552 ac_status=$?
c0d27fcc 6553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6554 (exit $ac_status); }; }; then
98418dba 6555 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6556else
503d2be0 6557 echo "$as_me: failed program was:" >&5
19650fd6
AS
6558sed 's/^/| /' conftest.$ac_ext >&5
6559
ca81d7a0 6560 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6561fi
ca81d7a0
JD
6562
6563rm -f core conftest.err conftest.$ac_objext \
edfaf76d 6564 conftest$ac_exeext conftest.$ac_ext
98418dba 6565LIBS=$ac_check_lib_save_LIBS
f4988be7 6566fi
ca81d7a0
JD
6567{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6568echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6569if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6570 LIBSOUND=-lossaudio
6571else
6572 LIBSOUND=
6573fi
6574
c0d27fcc 6575
439f58ee
JD
6576
6577 ALSA_REQUIRED=1.0.0
6578 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
6579 if test "X${with_pkg_config_prog}" != X; then
6580 PKG_CONFIG="${with_pkg_config_prog}"
6581 fi
6582
6583 succeeded=no
6584
6585 if test -z "$PKG_CONFIG"; then
6586 # Extract the first word of "pkg-config", so it can be a program name with args.
6587set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6588{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6589echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6590if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6591 echo $ECHO_N "(cached) $ECHO_C" >&6
6592else
6593 case $PKG_CONFIG in
6594 [\\/]* | ?:[\\/]*)
6595 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6596 ;;
6597 *)
6598 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6599for as_dir in $PATH
6600do
6601 IFS=$as_save_IFS
6602 test -z "$as_dir" && as_dir=.
6603 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 6604 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6605 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6606 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6607 break 2
6608 fi
6609done
6610done
ca81d7a0 6611IFS=$as_save_IFS
439f58ee
JD
6612
6613 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6614 ;;
6615esac
6616fi
6617PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6618if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6619 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6620echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6621else
ca81d7a0
JD
6622 { echo "$as_me:$LINENO: result: no" >&5
6623echo "${ECHO_T}no" >&6; }
439f58ee
JD
6624fi
6625
ca81d7a0 6626
439f58ee
JD
6627 fi
6628
6629 if test "$PKG_CONFIG" = "no" ; then
6630 HAVE_ALSA=no
6631 else
6632 PKG_CONFIG_MIN_VERSION=0.9.0
6633 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6634 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6635echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6636
67db6aa2 6637 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6638 { echo "$as_me:$LINENO: result: yes" >&5
6639echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6640 succeeded=yes
6641
ca81d7a0
JD
6642 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6643echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
439f58ee 6644 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"`
ca81d7a0
JD
6645 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6646echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6647
ca81d7a0
JD
6648 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6649echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
439f58ee 6650 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"`
ca81d7a0
JD
6651 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6652echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6653 else
ca81d7a0
JD
6654 { echo "$as_me:$LINENO: result: no" >&5
6655echo "${ECHO_T}no" >&6; }
439f58ee
JD
6656 ALSA_CFLAGS=""
6657 ALSA_LIBS=""
6658 ## If we have a custom action on failure, don't print errors, but
6659 ## do set a variable so people can do so.
6660 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6661
6662 fi
6663
6664
6665
6666 else
6667 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6668 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6669 fi
6670 fi
6671
6672 if test $succeeded = yes; then
6673 HAVE_ALSA=yes
6674 else
6675 HAVE_ALSA=no
6676 fi
6677
6678 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6679 SAVE_CFLAGS="$CFLAGS"
6680 SAVE_LDFLAGS="$LDFLAGS"
6681 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6682 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6683 cat >conftest.$ac_ext <<_ACEOF
6684/* confdefs.h. */
6685_ACEOF
6686cat confdefs.h >>conftest.$ac_ext
6687cat >>conftest.$ac_ext <<_ACEOF
6688/* end confdefs.h. */
6689#include <asoundlib.h>
6690int
6691main ()
6692{
6693snd_lib_error_set_handler (0);
6694 ;
6695 return 0;
6696}
6697_ACEOF
6698rm -f conftest.$ac_objext
6699if { (ac_try="$ac_compile"
6700case "(($ac_try" in
6701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6702 *) ac_try_echo=$ac_try;;
6703esac
6704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6705 (eval "$ac_compile") 2>conftest.er1
6706 ac_status=$?
6707 grep -v '^ *+' conftest.er1 >conftest.err
6708 rm -f conftest.er1
6709 cat conftest.err >&5
6710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6711 (exit $ac_status); } &&
6712 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6713 { (case "(($ac_try" in
6714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6715 *) ac_try_echo=$ac_try;;
6716esac
6717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6718 (eval "$ac_try") 2>&5
6719 ac_status=$?
6720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6721 (exit $ac_status); }; } &&
6722 { ac_try='test -s conftest.$ac_objext'
6723 { (case "(($ac_try" in
6724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6725 *) ac_try_echo=$ac_try;;
6726esac
6727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6728 (eval "$ac_try") 2>&5
6729 ac_status=$?
6730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6731 (exit $ac_status); }; }; then
6732 emacs_alsa_normal=yes
6733else
6734 echo "$as_me: failed program was:" >&5
6735sed 's/^/| /' conftest.$ac_ext >&5
6736
6737 emacs_alsa_normal=no
6738fi
6739
6740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6741 if test "$emacs_alsa_normal" != yes; then
6742 cat >conftest.$ac_ext <<_ACEOF
6743/* confdefs.h. */
6744_ACEOF
6745cat confdefs.h >>conftest.$ac_ext
6746cat >>conftest.$ac_ext <<_ACEOF
6747/* end confdefs.h. */
6748#include <alsa/asoundlib.h>
6749int
6750main ()
6751{
6752snd_lib_error_set_handler (0);
6753 ;
6754 return 0;
6755}
6756_ACEOF
6757rm -f conftest.$ac_objext
6758if { (ac_try="$ac_compile"
6759case "(($ac_try" in
6760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6761 *) ac_try_echo=$ac_try;;
6762esac
6763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6764 (eval "$ac_compile") 2>conftest.er1
6765 ac_status=$?
6766 grep -v '^ *+' conftest.er1 >conftest.err
6767 rm -f conftest.er1
6768 cat conftest.err >&5
6769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6770 (exit $ac_status); } &&
6771 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6772 { (case "(($ac_try" in
6773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6774 *) ac_try_echo=$ac_try;;
6775esac
6776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6777 (eval "$ac_try") 2>&5
6778 ac_status=$?
6779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6780 (exit $ac_status); }; } &&
6781 { ac_try='test -s conftest.$ac_objext'
6782 { (case "(($ac_try" in
6783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6784 *) ac_try_echo=$ac_try;;
6785esac
6786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6787 (eval "$ac_try") 2>&5
6788 ac_status=$?
6789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6790 (exit $ac_status); }; }; then
6791 emacs_alsa_subdir=yes
6792else
6793 echo "$as_me: failed program was:" >&5
6794sed 's/^/| /' conftest.$ac_ext >&5
6795
6796 emacs_alsa_subdir=no
6797fi
6798
6799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6800 if test "$emacs_alsa_subdir" != yes; then
6801 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6802echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6803 { (exit 1); exit 1; }; }
6804 fi
6805 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6806 fi
6807
6808 CFLAGS="$SAVE_CFLAGS"
6809 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6810 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6811 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6812
6813cat >>confdefs.h <<\_ACEOF
6814#define HAVE_ALSA 1
6815_ACEOF
6816
ca81d7a0 6817
439f58ee
JD
6818 fi
6819
f4988be7 6820fi
c0d27fcc
MR
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
22044edf
DL
6839
6840
973a76b1 6841
cffcede7 6842
551ffc27 6843
226e2359 6844
c0d27fcc 6845
f4988be7 6846
98418dba
CW
6847for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6848 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6849 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6850 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6851 sys/utsname.h pwd.h
98418dba
CW
6852do
6853as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6854if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6855 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6856echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6857if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6858 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6859fi
ca81d7a0
JD
6860ac_res=`eval echo '${'$as_ac_Header'}'`
6861 { echo "$as_me:$LINENO: result: $ac_res" >&5
6862echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6863else
c0d27fcc 6864 # Is the header compilable?
ca81d7a0
JD
6865{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6866echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6867cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6868/* confdefs.h. */
6869_ACEOF
6870cat confdefs.h >>conftest.$ac_ext
6871cat >>conftest.$ac_ext <<_ACEOF
6872/* end confdefs.h. */
c0d27fcc
MR
6873$ac_includes_default
6874#include <$ac_header>
6875_ACEOF
6876rm -f conftest.$ac_objext
ca81d7a0
JD
6877if { (ac_try="$ac_compile"
6878case "(($ac_try" in
6879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6880 *) ac_try_echo=$ac_try;;
6881esac
6882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6883 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6884 ac_status=$?
edfaf76d
LK
6885 grep -v '^ *+' conftest.er1 >conftest.err
6886 rm -f conftest.er1
6887 cat conftest.err >&5
c0d27fcc
MR
6888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6889 (exit $ac_status); } &&
ca81d7a0
JD
6890 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6891 { (case "(($ac_try" in
6892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6893 *) ac_try_echo=$ac_try;;
6894esac
6895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6896 (eval "$ac_try") 2>&5
edfaf76d
LK
6897 ac_status=$?
6898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6899 (exit $ac_status); }; } &&
6900 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
6901 { (case "(($ac_try" in
6902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6903 *) ac_try_echo=$ac_try;;
6904esac
6905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6906 (eval "$ac_try") 2>&5
c0d27fcc
MR
6907 ac_status=$?
6908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6909 (exit $ac_status); }; }; then
6910 ac_header_compiler=yes
6911else
6912 echo "$as_me: failed program was:" >&5
19650fd6
AS
6913sed 's/^/| /' conftest.$ac_ext >&5
6914
ca81d7a0 6915 ac_header_compiler=no
c0d27fcc 6916fi
ca81d7a0
JD
6917
6918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6919{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6920echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6921
6922# Is the header present?
ca81d7a0
JD
6923{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6924echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6925cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6926/* confdefs.h. */
6927_ACEOF
6928cat confdefs.h >>conftest.$ac_ext
6929cat >>conftest.$ac_ext <<_ACEOF
6930/* end confdefs.h. */
98418dba 6931#include <$ac_header>
503d2be0 6932_ACEOF
ca81d7a0
JD
6933if { (ac_try="$ac_cpp conftest.$ac_ext"
6934case "(($ac_try" in
6935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6936 *) ac_try_echo=$ac_try;;
6937esac
6938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6939 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6940 ac_status=$?
6bae0ccf 6941 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6942 rm -f conftest.er1
6943 cat conftest.err >&5
c0d27fcc 6944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6945 (exit $ac_status); } >/dev/null; then
6946 if test -s conftest.err; then
6947 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 6948 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
6949 else
6950 ac_cpp_err=
6951 fi
6952else
6953 ac_cpp_err=yes
6954fi
6955if test -z "$ac_cpp_err"; then
c0d27fcc 6956 ac_header_preproc=yes
34ec9ebe 6957else
503d2be0 6958 echo "$as_me: failed program was:" >&5
19650fd6
AS
6959sed 's/^/| /' conftest.$ac_ext >&5
6960
c0d27fcc 6961 ac_header_preproc=no
34ec9ebe 6962fi
ca81d7a0 6963
98418dba 6964rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6965{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6966echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6967
6968# So? What about this header?
edfaf76d
LK
6969case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6970 yes:no: )
c0d27fcc
MR
6971 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6972echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6973 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6974echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6975 ac_header_preproc=yes
19650fd6 6976 ;;
edfaf76d 6977 no:yes:* )
c0d27fcc
MR
6978 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6979echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6980 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6981echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6982 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6983echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6984 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6985echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6986 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6987echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6988 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6989echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6990
19650fd6 6991 ;;
c0d27fcc 6992esac
ca81d7a0
JD
6993{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6994echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6995if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6996 echo $ECHO_N "(cached) $ECHO_C" >&6
6997else
edfaf76d 6998 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6999fi
ca81d7a0
JD
7000ac_res=`eval echo '${'$as_ac_Header'}'`
7001 { echo "$as_me:$LINENO: result: $ac_res" >&5
7002echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
7003
7004fi
98418dba 7005if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 7006 cat >>confdefs.h <<_ACEOF
98418dba 7007#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 7008_ACEOF
34ec9ebe 7009
98418dba 7010fi
c0d27fcc 7011
98418dba
CW
7012done
7013
22044edf 7014
ca81d7a0
JD
7015{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
7016echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
7017cat >conftest.$ac_ext <<_ACEOF
7018/* confdefs.h. */
7019_ACEOF
7020cat confdefs.h >>conftest.$ac_ext
7021cat >>conftest.$ac_ext <<_ACEOF
7022/* end confdefs.h. */
7023#include <sys/personality.h>
7024int
7025main ()
7026{
7027personality (PER_LINUX32)
7028 ;
7029 return 0;
7030}
7031_ACEOF
7032rm -f conftest.$ac_objext
ca81d7a0
JD
7033if { (ac_try="$ac_compile"
7034case "(($ac_try" in
7035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7036 *) ac_try_echo=$ac_try;;
7037esac
7038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7039 (eval "$ac_compile") 2>conftest.er1
f17e308a 7040 ac_status=$?
edfaf76d
LK
7041 grep -v '^ *+' conftest.er1 >conftest.err
7042 rm -f conftest.er1
7043 cat conftest.err >&5
f17e308a
JD
7044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7045 (exit $ac_status); } &&
ca81d7a0
JD
7046 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7047 { (case "(($ac_try" in
7048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7049 *) ac_try_echo=$ac_try;;
7050esac
7051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7052 (eval "$ac_try") 2>&5
edfaf76d
LK
7053 ac_status=$?
7054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7055 (exit $ac_status); }; } &&
7056 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
7057 { (case "(($ac_try" in
7058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7059 *) ac_try_echo=$ac_try;;
7060esac
7061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7062 (eval "$ac_try") 2>&5
f17e308a
JD
7063 ac_status=$?
7064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7065 (exit $ac_status); }; }; then
7066 emacs_cv_personality_linux32=yes
7067else
7068 echo "$as_me: failed program was:" >&5
7069sed 's/^/| /' conftest.$ac_ext >&5
7070
ca81d7a0 7071 emacs_cv_personality_linux32=no
f17e308a 7072fi
ca81d7a0
JD
7073
7074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7075{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
7076echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
7077
7078if test $emacs_cv_personality_linux32 = yes; then
7079
7080cat >>confdefs.h <<\_ACEOF
7081#define HAVE_PERSONALITY_LINUX32 1
7082_ACEOF
7083
7084fi
7085
7086
22044edf
DL
7087for ac_header in term.h
7088do
7089as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7090{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7091echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7092if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
7093 echo $ECHO_N "(cached) $ECHO_C" >&6
7094else
7095 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7096/* confdefs.h. */
7097_ACEOF
7098cat confdefs.h >>conftest.$ac_ext
7099cat >>conftest.$ac_ext <<_ACEOF
7100/* end confdefs.h. */
22044edf
DL
7101#include <$ac_header>
7102_ACEOF
ca81d7a0
JD
7103if { (ac_try="$ac_cpp conftest.$ac_ext"
7104case "(($ac_try" in
7105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7106 *) ac_try_echo=$ac_try;;
7107esac
7108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7109 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
7110 ac_status=$?
7111 grep -v '^ *+' conftest.er1 >conftest.err
7112 rm -f conftest.er1
7113 cat conftest.err >&5
7114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7115 (exit $ac_status); } >/dev/null; then
7116 if test -s conftest.err; then
7117 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 7118 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22044edf
DL
7119 else
7120 ac_cpp_err=
7121 fi
7122else
7123 ac_cpp_err=yes
7124fi
7125if test -z "$ac_cpp_err"; then
7126 eval "$as_ac_Header=yes"
7127else
7128 echo "$as_me: failed program was:" >&5
19650fd6
AS
7129sed 's/^/| /' conftest.$ac_ext >&5
7130
22044edf
DL
7131 eval "$as_ac_Header=no"
7132fi
ca81d7a0 7133
22044edf
DL
7134rm -f conftest.err conftest.$ac_ext
7135fi
ca81d7a0
JD
7136ac_res=`eval echo '${'$as_ac_Header'}'`
7137 { echo "$as_me:$LINENO: result: $ac_res" >&5
7138echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
7139if test `eval echo '${'$as_ac_Header'}'` = yes; then
7140 cat >>confdefs.h <<_ACEOF
7141#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7142_ACEOF
7143
7144fi
7145
7146done
7147
ca81d7a0
JD
7148{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7149echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 7150if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 7151 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7152else
503d2be0 7153 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7154/* confdefs.h. */
7155_ACEOF
7156cat confdefs.h >>conftest.$ac_ext
7157cat >>conftest.$ac_ext <<_ACEOF
7158/* end confdefs.h. */
98418dba
CW
7159#include <stdlib.h>
7160#include <stdarg.h>
7161#include <string.h>
7162#include <float.h>
7163
19650fd6
AS
7164int
7165main ()
7166{
7167
7168 ;
7169 return 0;
7170}
98418dba 7171_ACEOF
19650fd6 7172rm -f conftest.$ac_objext
ca81d7a0
JD
7173if { (ac_try="$ac_compile"
7174case "(($ac_try" in
7175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7176 *) ac_try_echo=$ac_try;;
7177esac
7178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7179 (eval "$ac_compile") 2>conftest.er1
cd958eb3 7180 ac_status=$?
edfaf76d
LK
7181 grep -v '^ *+' conftest.er1 >conftest.err
7182 rm -f conftest.er1
7183 cat conftest.err >&5
cd958eb3 7184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 7185 (exit $ac_status); } &&
ca81d7a0
JD
7186 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7187 { (case "(($ac_try" in
7188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7189 *) ac_try_echo=$ac_try;;
7190esac
7191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7192 (eval "$ac_try") 2>&5
edfaf76d
LK
7193 ac_status=$?
7194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7195 (exit $ac_status); }; } &&
7196 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
7197 { (case "(($ac_try" in
7198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7199 *) ac_try_echo=$ac_try;;
7200esac
7201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7202 (eval "$ac_try") 2>&5
19650fd6
AS
7203 ac_status=$?
7204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7205 (exit $ac_status); }; }; then
98418dba 7206 ac_cv_header_stdc=yes
ba4481b5 7207else
503d2be0 7208 echo "$as_me: failed program was:" >&5
19650fd6
AS
7209sed 's/^/| /' conftest.$ac_ext >&5
7210
ca81d7a0 7211 ac_cv_header_stdc=no
ba4481b5 7212fi
ca81d7a0
JD
7213
7214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
7215
7216if test $ac_cv_header_stdc = yes; then
7217 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7218 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7219/* confdefs.h. */
7220_ACEOF
7221cat confdefs.h >>conftest.$ac_ext
7222cat >>conftest.$ac_ext <<_ACEOF
7223/* end confdefs.h. */
98418dba
CW
7224#include <string.h>
7225
7226_ACEOF
7227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 7228 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
7229 :
7230else
7231 ac_cv_header_stdc=no
ba4481b5 7232fi
98418dba 7233rm -f conftest*
ba4481b5
DL
7234
7235fi
7236
98418dba
CW
7237if test $ac_cv_header_stdc = yes; then
7238 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7239 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7240/* confdefs.h. */
7241_ACEOF
7242cat confdefs.h >>conftest.$ac_ext
7243cat >>conftest.$ac_ext <<_ACEOF
7244/* end confdefs.h. */
98418dba
CW
7245#include <stdlib.h>
7246
7247_ACEOF
7248if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 7249 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
7250 :
7251else
7252 ac_cv_header_stdc=no
7253fi
7254rm -f conftest*
7255
7256fi
7257
7258if test $ac_cv_header_stdc = yes; then
7259 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7260 if test "$cross_compiling" = yes; then
7261 :
d42122a3 7262else
503d2be0 7263 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7264/* confdefs.h. */
7265_ACEOF
7266cat confdefs.h >>conftest.$ac_ext
7267cat >>conftest.$ac_ext <<_ACEOF
7268/* end confdefs.h. */
98418dba 7269#include <ctype.h>
ca81d7a0 7270#include <stdlib.h>
98418dba
CW
7271#if ((' ' & 0x0FF) == 0x020)
7272# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7273# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7274#else
19650fd6 7275# define ISLOWER(c) \
edfaf76d
LK
7276 (('a' <= (c) && (c) <= 'i') \
7277 || ('j' <= (c) && (c) <= 'r') \
7278 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
7279# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7280#endif
7281
7282#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
7283int
7284main ()
7285{
98418dba
CW
7286 int i;
7287 for (i = 0; i < 256; i++)
7288 if (XOR (islower (i), ISLOWER (i))
edfaf76d 7289 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
7290 return 2;
7291 return 0;
503d2be0
AS
7292}
7293_ACEOF
98418dba 7294rm -f conftest$ac_exeext
ca81d7a0
JD
7295if { (ac_try="$ac_link"
7296case "(($ac_try" in
7297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7298 *) ac_try_echo=$ac_try;;
7299esac
7300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7301 (eval "$ac_link") 2>&5
503d2be0 7302 ac_status=$?
c0d27fcc 7303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7304 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
7305 { (case "(($ac_try" in
7306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7307 *) ac_try_echo=$ac_try;;
7308esac
7309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7310 (eval "$ac_try") 2>&5
503d2be0 7311 ac_status=$?
c0d27fcc 7312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7313 (exit $ac_status); }; }; then
98418dba 7314 :
d42122a3 7315else
98418dba
CW
7316 echo "$as_me: program exited with status $ac_status" >&5
7317echo "$as_me: failed program was:" >&5
19650fd6
AS
7318sed 's/^/| /' conftest.$ac_ext >&5
7319
c0d27fcc 7320( exit $ac_status )
98418dba 7321ac_cv_header_stdc=no
d42122a3 7322fi
ca81d7a0 7323rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 7324fi
ca81d7a0
JD
7325
7326
98418dba
CW
7327fi
7328fi
ca81d7a0
JD
7329{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7330echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
7331if test $ac_cv_header_stdc = yes; then
7332
c0d27fcc 7333cat >>confdefs.h <<\_ACEOF
98418dba 7334#define STDC_HEADERS 1
c0d27fcc 7335_ACEOF
d42122a3
DL
7336
7337fi
7338
ca81d7a0
JD
7339{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7340echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 7341if test "${ac_cv_header_time+set}" = set; then
503d2be0 7342 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7343else
503d2be0 7344 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7345/* confdefs.h. */
7346_ACEOF
7347cat confdefs.h >>conftest.$ac_ext
7348cat >>conftest.$ac_ext <<_ACEOF
7349/* end confdefs.h. */
ba4481b5 7350#include <sys/types.h>
98418dba 7351#include <sys/time.h>
ba4481b5 7352#include <time.h>
503d2be0
AS
7353
7354int
7355main ()
7356{
98418dba
CW
7357if ((struct tm *) 0)
7358return 0;
503d2be0
AS
7359 ;
7360 return 0;
7361}
7362_ACEOF
7363rm -f conftest.$ac_objext
ca81d7a0
JD
7364if { (ac_try="$ac_compile"
7365case "(($ac_try" in
7366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7367 *) ac_try_echo=$ac_try;;
7368esac
7369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7370 (eval "$ac_compile") 2>conftest.er1
503d2be0 7371 ac_status=$?
edfaf76d
LK
7372 grep -v '^ *+' conftest.er1 >conftest.err
7373 rm -f conftest.er1
7374 cat conftest.err >&5
c0d27fcc 7375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7376 (exit $ac_status); } &&
ca81d7a0
JD
7377 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7378 { (case "(($ac_try" in
7379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7380 *) ac_try_echo=$ac_try;;
7381esac
7382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7383 (eval "$ac_try") 2>&5
edfaf76d
LK
7384 ac_status=$?
7385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7386 (exit $ac_status); }; } &&
7387 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
7388 { (case "(($ac_try" in
7389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7390 *) ac_try_echo=$ac_try;;
7391esac
7392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7393 (eval "$ac_try") 2>&5
503d2be0 7394 ac_status=$?
c0d27fcc 7395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7396 (exit $ac_status); }; }; then
98418dba 7397 ac_cv_header_time=yes
ba4481b5 7398else
503d2be0 7399 echo "$as_me: failed program was:" >&5
19650fd6
AS
7400sed 's/^/| /' conftest.$ac_ext >&5
7401
ca81d7a0 7402 ac_cv_header_time=no
ba4481b5 7403fi
ca81d7a0
JD
7404
7405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7406fi
ca81d7a0
JD
7407{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7408echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 7409if test $ac_cv_header_time = yes; then
503d2be0 7410
c0d27fcc 7411cat >>confdefs.h <<\_ACEOF
98418dba 7412#define TIME_WITH_SYS_TIME 1
c0d27fcc 7413_ACEOF
ba4481b5
DL
7414
7415fi
7416
ca81d7a0
JD
7417{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
7418echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 7419if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 7420 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7421else
503d2be0 7422 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7423/* confdefs.h. */
7424_ACEOF
7425cat confdefs.h >>conftest.$ac_ext
7426cat >>conftest.$ac_ext <<_ACEOF
7427/* end confdefs.h. */
cd958eb3
MB
7428$ac_includes_default
7429int
7430main ()
7431{
7432#ifndef sys_siglist
7433 char *p = (char *) sys_siglist;
ca81d7a0 7434 return !p;
98418dba 7435#endif
503d2be0 7436
cd958eb3
MB
7437 ;
7438 return 0;
7439}
7440_ACEOF
7441rm -f conftest.$ac_objext
ca81d7a0
JD
7442if { (ac_try="$ac_compile"
7443case "(($ac_try" in
7444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7445 *) ac_try_echo=$ac_try;;
7446esac
7447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7448 (eval "$ac_compile") 2>conftest.er1
cd958eb3 7449 ac_status=$?
edfaf76d
LK
7450 grep -v '^ *+' conftest.er1 >conftest.err
7451 rm -f conftest.er1
7452 cat conftest.err >&5
cd958eb3
MB
7453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7454 (exit $ac_status); } &&
ca81d7a0
JD
7455 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7456 { (case "(($ac_try" in
7457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7458 *) ac_try_echo=$ac_try;;
7459esac
7460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7461 (eval "$ac_try") 2>&5
edfaf76d
LK
7462 ac_status=$?
7463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7464 (exit $ac_status); }; } &&
7465 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
7466 { (case "(($ac_try" in
7467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7468 *) ac_try_echo=$ac_try;;
7469esac
7470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7471 (eval "$ac_try") 2>&5
cd958eb3
MB
7472 ac_status=$?
7473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7474 (exit $ac_status); }; }; then
7475 ac_cv_have_decl_sys_siglist=yes
7476else
7477 echo "$as_me: failed program was:" >&5
19650fd6
AS
7478sed 's/^/| /' conftest.$ac_ext >&5
7479
ca81d7a0 7480 ac_cv_have_decl_sys_siglist=no
cd958eb3 7481fi
ca81d7a0
JD
7482
7483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 7484fi
ca81d7a0
JD
7485{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
7486echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
7487if test $ac_cv_have_decl_sys_siglist = yes; then
7488
7489cat >>confdefs.h <<_ACEOF
7490#define HAVE_DECL_SYS_SIGLIST 1
7491_ACEOF
7492
7493
7494else
7495 cat >>confdefs.h <<_ACEOF
7496#define HAVE_DECL_SYS_SIGLIST 0
7497_ACEOF
7498
7499
7500fi
7501
7502
7503if test $ac_cv_have_decl_sys_siglist != yes; then
7504 # For Tru64, at least:
ca81d7a0
JD
7505 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
7506echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
7507if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
7508 echo $ECHO_N "(cached) $ECHO_C" >&6
7509else
7510 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7511/* confdefs.h. */
7512_ACEOF
7513cat confdefs.h >>conftest.$ac_ext
7514cat >>conftest.$ac_ext <<_ACEOF
7515/* end confdefs.h. */
cd958eb3 7516$ac_includes_default
503d2be0
AS
7517int
7518main ()
7519{
cd958eb3
MB
7520#ifndef __sys_siglist
7521 char *p = (char *) __sys_siglist;
ca81d7a0 7522 return !p;
cd958eb3
MB
7523#endif
7524
503d2be0
AS
7525 ;
7526 return 0;
7527}
7528_ACEOF
7529rm -f conftest.$ac_objext
ca81d7a0
JD
7530if { (ac_try="$ac_compile"
7531case "(($ac_try" in
7532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7533 *) ac_try_echo=$ac_try;;
7534esac
7535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7536 (eval "$ac_compile") 2>conftest.er1
503d2be0 7537 ac_status=$?
edfaf76d
LK
7538 grep -v '^ *+' conftest.er1 >conftest.err
7539 rm -f conftest.er1
7540 cat conftest.err >&5
c0d27fcc 7541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7542 (exit $ac_status); } &&
ca81d7a0
JD
7543 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7544 { (case "(($ac_try" in
7545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7546 *) ac_try_echo=$ac_try;;
7547esac
7548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7549 (eval "$ac_try") 2>&5
edfaf76d
LK
7550 ac_status=$?
7551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7552 (exit $ac_status); }; } &&
7553 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
7554 { (case "(($ac_try" in
7555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7556 *) ac_try_echo=$ac_try;;
7557esac
7558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7559 (eval "$ac_try") 2>&5
503d2be0 7560 ac_status=$?
c0d27fcc 7561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7562 (exit $ac_status); }; }; then
cd958eb3 7563 ac_cv_have_decl___sys_siglist=yes
ba4481b5 7564else
503d2be0 7565 echo "$as_me: failed program was:" >&5
19650fd6
AS
7566sed 's/^/| /' conftest.$ac_ext >&5
7567
ca81d7a0 7568 ac_cv_have_decl___sys_siglist=no
ba4481b5 7569fi
ca81d7a0
JD
7570
7571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 7572fi
ca81d7a0
JD
7573{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
7574echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 7575if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 7576
cd958eb3
MB
7577cat >>confdefs.h <<_ACEOF
7578#define HAVE_DECL___SYS_SIGLIST 1
7579_ACEOF
7580
7581
7582else
7583 cat >>confdefs.h <<_ACEOF
7584#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 7585_ACEOF
503d2be0 7586
cd958eb3 7587
ba4481b5
DL
7588fi
7589
cd958eb3
MB
7590
7591 if test $ac_cv_have_decl___sys_siglist = yes; then
7592
7593cat >>confdefs.h <<\_ACEOF
7594#define sys_siglist __sys_siglist
7595_ACEOF
7596
7597 fi
7598fi
ca81d7a0
JD
7599{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7600echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 7601if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 7602 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7603else
503d2be0 7604 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7605/* confdefs.h. */
7606_ACEOF
7607cat confdefs.h >>conftest.$ac_ext
7608cat >>conftest.$ac_ext <<_ACEOF
7609/* end confdefs.h. */
98418dba
CW
7610#include <sys/types.h>
7611#include <sys/wait.h>
7612#ifndef WEXITSTATUS
ca81d7a0 7613# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7614#endif
7615#ifndef WIFEXITED
7616# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7617#endif
503d2be0
AS
7618
7619int
7620main ()
7621{
98418dba
CW
7622 int s;
7623 wait (&s);
7624 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7625 ;
7626 return 0;
7627}
7628_ACEOF
98418dba 7629rm -f conftest.$ac_objext
ca81d7a0
JD
7630if { (ac_try="$ac_compile"
7631case "(($ac_try" in
7632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7633 *) ac_try_echo=$ac_try;;
7634esac
7635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7636 (eval "$ac_compile") 2>conftest.er1
503d2be0 7637 ac_status=$?
edfaf76d
LK
7638 grep -v '^ *+' conftest.er1 >conftest.err
7639 rm -f conftest.er1
7640 cat conftest.err >&5
c0d27fcc 7641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7642 (exit $ac_status); } &&
ca81d7a0
JD
7643 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7644 { (case "(($ac_try" in
7645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7646 *) ac_try_echo=$ac_try;;
7647esac
7648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7649 (eval "$ac_try") 2>&5
edfaf76d
LK
7650 ac_status=$?
7651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7652 (exit $ac_status); }; } &&
7653 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
7654 { (case "(($ac_try" in
7655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7656 *) ac_try_echo=$ac_try;;
7657esac
7658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7659 (eval "$ac_try") 2>&5
503d2be0 7660 ac_status=$?
c0d27fcc 7661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7662 (exit $ac_status); }; }; then
98418dba 7663 ac_cv_header_sys_wait_h=yes
ba4481b5 7664else
503d2be0 7665 echo "$as_me: failed program was:" >&5
19650fd6
AS
7666sed 's/^/| /' conftest.$ac_ext >&5
7667
ca81d7a0 7668 ac_cv_header_sys_wait_h=no
ba4481b5 7669fi
ca81d7a0
JD
7670
7671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7672fi
ca81d7a0
JD
7673{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7674echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7675if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7676
c0d27fcc 7677cat >>confdefs.h <<\_ACEOF
98418dba 7678#define HAVE_SYS_WAIT_H 1
c0d27fcc 7679_ACEOF
ba4481b5 7680
ba4481b5
DL
7681fi
7682
c0d27fcc 7683
ca81d7a0
JD
7684{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7685echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7686if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7687 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7688else
503d2be0 7689 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7690/* confdefs.h. */
7691_ACEOF
7692cat confdefs.h >>conftest.$ac_ext
7693cat >>conftest.$ac_ext <<_ACEOF
7694/* end confdefs.h. */
98418dba
CW
7695#ifdef TIME_WITH_SYS_TIME
7696#include <sys/time.h>
7697#include <time.h>
7698#else
7699#ifdef HAVE_SYS_TIME_H
7700#include <sys/time.h>
7701#else
1113b624 7702#include <time.h>
98418dba
CW
7703#endif
7704#endif
7705#ifdef HAVE_UTIME_H
7706#include <utime.h>
7707#endif
503d2be0
AS
7708int
7709main ()
7710{
98418dba 7711static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7712 ;
7713 return 0;
7714}
7715_ACEOF
98418dba 7716rm -f conftest.$ac_objext
ca81d7a0
JD
7717if { (ac_try="$ac_compile"
7718case "(($ac_try" in
7719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7720 *) ac_try_echo=$ac_try;;
7721esac
7722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7723 (eval "$ac_compile") 2>conftest.er1
503d2be0 7724 ac_status=$?
edfaf76d
LK
7725 grep -v '^ *+' conftest.er1 >conftest.err
7726 rm -f conftest.er1
7727 cat conftest.err >&5
c0d27fcc 7728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7729 (exit $ac_status); } &&
ca81d7a0
JD
7730 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7731 { (case "(($ac_try" in
7732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7733 *) ac_try_echo=$ac_try;;
7734esac
7735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7736 (eval "$ac_try") 2>&5
edfaf76d
LK
7737 ac_status=$?
7738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7739 (exit $ac_status); }; } &&
7740 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
7741 { (case "(($ac_try" in
7742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7743 *) ac_try_echo=$ac_try;;
7744esac
7745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7746 (eval "$ac_try") 2>&5
503d2be0 7747 ac_status=$?
c0d27fcc 7748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7749 (exit $ac_status); }; }; then
98418dba 7750 emacs_cv_struct_utimbuf=yes
1113b624 7751else
503d2be0 7752 echo "$as_me: failed program was:" >&5
19650fd6
AS
7753sed 's/^/| /' conftest.$ac_ext >&5
7754
ca81d7a0 7755 emacs_cv_struct_utimbuf=no
1113b624 7756fi
ca81d7a0
JD
7757
7758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7759fi
ca81d7a0
JD
7760{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7761echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7762if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7763
c0d27fcc 7764cat >>confdefs.h <<\_ACEOF
98418dba 7765#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7766_ACEOF
1113b624
PE
7767
7768fi
ba4481b5 7769
ca81d7a0
JD
7770{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7771echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7772if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7773 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7774else
98418dba 7775 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7776/* confdefs.h. */
7777_ACEOF
7778cat confdefs.h >>conftest.$ac_ext
7779cat >>conftest.$ac_ext <<_ACEOF
7780/* end confdefs.h. */
7397acc4 7781#include <sys/types.h>
98418dba 7782#include <signal.h>
98418dba 7783
503d2be0
AS
7784int
7785main ()
7786{
ca81d7a0 7787return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7788 ;
7789 return 0;
7790}
7791_ACEOF
98418dba 7792rm -f conftest.$ac_objext
ca81d7a0
JD
7793if { (ac_try="$ac_compile"
7794case "(($ac_try" in
7795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7796 *) ac_try_echo=$ac_try;;
7797esac
7798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7799 (eval "$ac_compile") 2>conftest.er1
503d2be0 7800 ac_status=$?
edfaf76d
LK
7801 grep -v '^ *+' conftest.er1 >conftest.err
7802 rm -f conftest.er1
7803 cat conftest.err >&5
c0d27fcc 7804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7805 (exit $ac_status); } &&
ca81d7a0
JD
7806 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7807 { (case "(($ac_try" in
7808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7809 *) ac_try_echo=$ac_try;;
7810esac
7811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7812 (eval "$ac_try") 2>&5
edfaf76d
LK
7813 ac_status=$?
7814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7815 (exit $ac_status); }; } &&
7816 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
7817 { (case "(($ac_try" in
7818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7819 *) ac_try_echo=$ac_try;;
7820esac
7821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7822 (eval "$ac_try") 2>&5
503d2be0 7823 ac_status=$?
c0d27fcc 7824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7825 (exit $ac_status); }; }; then
ca81d7a0 7826 ac_cv_type_signal=int
503d2be0
AS
7827else
7828 echo "$as_me: failed program was:" >&5
19650fd6
AS
7829sed 's/^/| /' conftest.$ac_ext >&5
7830
ca81d7a0 7831 ac_cv_type_signal=void
503d2be0 7832fi
ca81d7a0
JD
7833
7834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7835fi
ca81d7a0
JD
7836{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7837echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7838
c0d27fcc 7839cat >>confdefs.h <<_ACEOF
98418dba 7840#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7841_ACEOF
7842
503d2be0 7843
c0d27fcc 7844
ca81d7a0
JD
7845{ echo "$as_me:$LINENO: checking for speed_t" >&5
7846echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7847if test "${emacs_cv_speed_t+set}" = set; then
7848 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7849else
98418dba 7850 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7851/* confdefs.h. */
7852_ACEOF
7853cat confdefs.h >>conftest.$ac_ext
7854cat >>conftest.$ac_ext <<_ACEOF
7855/* end confdefs.h. */
98418dba 7856#include <termios.h>
98418dba
CW
7857int
7858main ()
7859{
7860speed_t x = 1;
7861 ;
7862 return 0;
7863}
7864_ACEOF
7865rm -f conftest.$ac_objext
ca81d7a0
JD
7866if { (ac_try="$ac_compile"
7867case "(($ac_try" in
7868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7869 *) ac_try_echo=$ac_try;;
7870esac
7871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7872 (eval "$ac_compile") 2>conftest.er1
98418dba 7873 ac_status=$?
edfaf76d
LK
7874 grep -v '^ *+' conftest.er1 >conftest.err
7875 rm -f conftest.er1
7876 cat conftest.err >&5
c0d27fcc 7877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7878 (exit $ac_status); } &&
ca81d7a0
JD
7879 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7880 { (case "(($ac_try" in
7881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7882 *) ac_try_echo=$ac_try;;
7883esac
7884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7885 (eval "$ac_try") 2>&5
edfaf76d
LK
7886 ac_status=$?
7887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7888 (exit $ac_status); }; } &&
7889 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
7890 { (case "(($ac_try" in
7891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7892 *) ac_try_echo=$ac_try;;
7893esac
7894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7895 (eval "$ac_try") 2>&5
98418dba 7896 ac_status=$?
c0d27fcc 7897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7898 (exit $ac_status); }; }; then
7899 emacs_cv_speed_t=yes
7900else
7901 echo "$as_me: failed program was:" >&5
19650fd6
AS
7902sed 's/^/| /' conftest.$ac_ext >&5
7903
ca81d7a0 7904 emacs_cv_speed_t=no
98418dba 7905fi
ca81d7a0
JD
7906
7907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7908fi
ca81d7a0
JD
7909{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7910echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7911if test $emacs_cv_speed_t = yes; then
b936fae4 7912
c0d27fcc 7913cat >>confdefs.h <<\_ACEOF
98418dba 7914#define HAVE_SPEED_T 1
c0d27fcc 7915_ACEOF
98418dba 7916
7397acc4
DL
7917fi
7918
ca81d7a0
JD
7919{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7920echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7921if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7922 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7923else
503d2be0 7924 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7925/* confdefs.h. */
7926_ACEOF
7927cat confdefs.h >>conftest.$ac_ext
7928cat >>conftest.$ac_ext <<_ACEOF
7929/* end confdefs.h. */
98418dba
CW
7930#ifdef TIME_WITH_SYS_TIME
7931#include <sys/time.h>
7932#include <time.h>
7933#else
7934#ifdef HAVE_SYS_TIME_H
7935#include <sys/time.h>
7936#else
7937#include <time.h>
7938#endif
7939#endif
503d2be0
AS
7940int
7941main ()
7942{
98418dba 7943static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7944 ;
7945 return 0;
7946}
7947_ACEOF
7948rm -f conftest.$ac_objext
ca81d7a0
JD
7949if { (ac_try="$ac_compile"
7950case "(($ac_try" in
7951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7952 *) ac_try_echo=$ac_try;;
7953esac
7954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7955 (eval "$ac_compile") 2>conftest.er1
503d2be0 7956 ac_status=$?
edfaf76d
LK
7957 grep -v '^ *+' conftest.er1 >conftest.err
7958 rm -f conftest.er1
7959 cat conftest.err >&5
c0d27fcc 7960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7961 (exit $ac_status); } &&
ca81d7a0
JD
7962 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7963 { (case "(($ac_try" in
7964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7965 *) ac_try_echo=$ac_try;;
7966esac
7967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7968 (eval "$ac_try") 2>&5
503d2be0 7969 ac_status=$?
c0d27fcc 7970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
7971 (exit $ac_status); }; } &&
7972 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
7973 { (case "(($ac_try" in
7974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7975 *) ac_try_echo=$ac_try;;
7976esac
7977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7978 (eval "$ac_try") 2>&5
edfaf76d
LK
7979 ac_status=$?
7980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7981 (exit $ac_status); }; }; then
7982 emacs_cv_struct_timeval=yes
7983else
503d2be0 7984 echo "$as_me: failed program was:" >&5
19650fd6
AS
7985sed 's/^/| /' conftest.$ac_ext >&5
7986
ca81d7a0 7987 emacs_cv_struct_timeval=no
7397acc4 7988fi
ca81d7a0
JD
7989
7990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7991fi
ca81d7a0
JD
7992{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7993echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7994HAVE_TIMEVAL=$emacs_cv_struct_timeval
7995if test $emacs_cv_struct_timeval = yes; then
b936fae4 7996
c0d27fcc 7997cat >>confdefs.h <<\_ACEOF
98418dba 7998#define HAVE_TIMEVAL 1
c0d27fcc 7999_ACEOF
7397acc4
DL
8000
8001fi
8002
ca81d7a0
JD
8003{ echo "$as_me:$LINENO: checking for struct exception" >&5
8004echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 8005if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 8006 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8007else
503d2be0 8008 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8009/* confdefs.h. */
8010_ACEOF
8011cat confdefs.h >>conftest.$ac_ext
8012cat >>conftest.$ac_ext <<_ACEOF
8013/* end confdefs.h. */
98418dba 8014#include <math.h>
503d2be0
AS
8015int
8016main ()
8017{
98418dba 8018static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
8019 ;
8020 return 0;
ba4481b5 8021}
503d2be0
AS
8022_ACEOF
8023rm -f conftest.$ac_objext
ca81d7a0
JD
8024if { (ac_try="$ac_compile"
8025case "(($ac_try" in
8026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8027 *) ac_try_echo=$ac_try;;
8028esac
8029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8030 (eval "$ac_compile") 2>conftest.er1
503d2be0 8031 ac_status=$?
edfaf76d
LK
8032 grep -v '^ *+' conftest.er1 >conftest.err
8033 rm -f conftest.er1
8034 cat conftest.err >&5
c0d27fcc 8035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 8036 (exit $ac_status); } &&
ca81d7a0
JD
8037 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8038 { (case "(($ac_try" in
8039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8040 *) ac_try_echo=$ac_try;;
8041esac
8042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8043 (eval "$ac_try") 2>&5
edfaf76d
LK
8044 ac_status=$?
8045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8046 (exit $ac_status); }; } &&
8047 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
8048 { (case "(($ac_try" in
8049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8050 *) ac_try_echo=$ac_try;;
8051esac
8052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8053 (eval "$ac_try") 2>&5
503d2be0 8054 ac_status=$?
c0d27fcc 8055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 8056 (exit $ac_status); }; }; then
98418dba 8057 emacs_cv_struct_exception=yes
ba4481b5 8058else
503d2be0 8059 echo "$as_me: failed program was:" >&5
19650fd6
AS
8060sed 's/^/| /' conftest.$ac_ext >&5
8061
ca81d7a0 8062 emacs_cv_struct_exception=no
ba4481b5 8063fi
ca81d7a0
JD
8064
8065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 8066fi
ca81d7a0
JD
8067{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
8068echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
8069HAVE_EXCEPTION=$emacs_cv_struct_exception
8070if test $emacs_cv_struct_exception != yes; then
b936fae4 8071
c0d27fcc 8072cat >>confdefs.h <<\_ACEOF
98418dba 8073#define NO_MATHERR 1
c0d27fcc 8074_ACEOF
ba4481b5
DL
8075
8076fi
8077
7862d3a8
AS
8078
8079for ac_header in sys/socket.h
8080do
8081as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
8082if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8083 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8084echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8085if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
8086 echo $ECHO_N "(cached) $ECHO_C" >&6
8087fi
ca81d7a0
JD
8088ac_res=`eval echo '${'$as_ac_Header'}'`
8089 { echo "$as_me:$LINENO: result: $ac_res" >&5
8090echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
8091else
8092 # Is the header compilable?
ca81d7a0
JD
8093{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
8094echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
8095cat >conftest.$ac_ext <<_ACEOF
8096/* confdefs.h. */
8097_ACEOF
8098cat confdefs.h >>conftest.$ac_ext
8099cat >>conftest.$ac_ext <<_ACEOF
8100/* end confdefs.h. */
8101$ac_includes_default
8102#include <$ac_header>
8103_ACEOF
8104rm -f conftest.$ac_objext
ca81d7a0
JD
8105if { (ac_try="$ac_compile"
8106case "(($ac_try" in
8107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8108 *) ac_try_echo=$ac_try;;
8109esac
8110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8111 (eval "$ac_compile") 2>conftest.er1
7862d3a8 8112 ac_status=$?
edfaf76d
LK
8113 grep -v '^ *+' conftest.er1 >conftest.err
8114 rm -f conftest.er1
8115 cat conftest.err >&5
7862d3a8
AS
8116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8117 (exit $ac_status); } &&
ca81d7a0
JD
8118 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8119 { (case "(($ac_try" in
8120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8121 *) ac_try_echo=$ac_try;;
8122esac
8123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8124 (eval "$ac_try") 2>&5
edfaf76d
LK
8125 ac_status=$?
8126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8127 (exit $ac_status); }; } &&
8128 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
8129 { (case "(($ac_try" in
8130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8131 *) ac_try_echo=$ac_try;;
8132esac
8133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8134 (eval "$ac_try") 2>&5
7862d3a8
AS
8135 ac_status=$?
8136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8137 (exit $ac_status); }; }; then
8138 ac_header_compiler=yes
8139else
8140 echo "$as_me: failed program was:" >&5
8141sed 's/^/| /' conftest.$ac_ext >&5
8142
ca81d7a0 8143 ac_header_compiler=no
7862d3a8 8144fi
ca81d7a0
JD
8145
8146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8147{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8148echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
8149
8150# Is the header present?
ca81d7a0
JD
8151{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
8152echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
8153cat >conftest.$ac_ext <<_ACEOF
8154/* confdefs.h. */
8155_ACEOF
8156cat confdefs.h >>conftest.$ac_ext
8157cat >>conftest.$ac_ext <<_ACEOF
8158/* end confdefs.h. */
8159#include <$ac_header>
8160_ACEOF
ca81d7a0
JD
8161if { (ac_try="$ac_cpp conftest.$ac_ext"
8162case "(($ac_try" in
8163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8164 *) ac_try_echo=$ac_try;;
8165esac
8166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8167 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
8168 ac_status=$?
8169 grep -v '^ *+' conftest.er1 >conftest.err
8170 rm -f conftest.er1
8171 cat conftest.err >&5
8172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173 (exit $ac_status); } >/dev/null; then
8174 if test -s conftest.err; then
8175 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 8176 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7862d3a8
AS
8177 else
8178 ac_cpp_err=
8179 fi
8180else
8181 ac_cpp_err=yes
8182fi
8183if test -z "$ac_cpp_err"; then
8184 ac_header_preproc=yes
8185else
8186 echo "$as_me: failed program was:" >&5
8187sed 's/^/| /' conftest.$ac_ext >&5
8188
8189 ac_header_preproc=no
8190fi
ca81d7a0 8191
7862d3a8 8192rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
8193{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8194echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
8195
8196# So? What about this header?
edfaf76d
LK
8197case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8198 yes:no: )
7862d3a8
AS
8199 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8200echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
8201 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8202echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8203 ac_header_preproc=yes
7862d3a8 8204 ;;
edfaf76d 8205 no:yes:* )
7862d3a8
AS
8206 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8207echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
8208 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8209echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8210 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8211echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8212 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8213echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
8214 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8215echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
8216 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8217echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 8218
7862d3a8
AS
8219 ;;
8220esac
ca81d7a0
JD
8221{ echo "$as_me:$LINENO: checking for $ac_header" >&5
8222echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8223if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
8224 echo $ECHO_N "(cached) $ECHO_C" >&6
8225else
edfaf76d 8226 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 8227fi
ca81d7a0
JD
8228ac_res=`eval echo '${'$as_ac_Header'}'`
8229 { echo "$as_me:$LINENO: result: $ac_res" >&5
8230echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
8231
8232fi
8233if test `eval echo '${'$as_ac_Header'}'` = yes; then
8234 cat >>confdefs.h <<_ACEOF
8235#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8236_ACEOF
8237
8238fi
8239
8240done
8241
8242
8243for ac_header in net/if.h
8244do
8245as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
8246{ echo "$as_me:$LINENO: checking for $ac_header" >&5
8247echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8248if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
8249 echo $ECHO_N "(cached) $ECHO_C" >&6
8250else
8251 cat >conftest.$ac_ext <<_ACEOF
8252/* confdefs.h. */
8253_ACEOF
8254cat confdefs.h >>conftest.$ac_ext
8255cat >>conftest.$ac_ext <<_ACEOF
8256/* end confdefs.h. */
8257$ac_includes_default
8258#if HAVE_SYS_SOCKET_H
8259#include <sys/socket.h>
8260#endif
8261
8262#include <$ac_header>
8263_ACEOF
8264rm -f conftest.$ac_objext
ca81d7a0
JD
8265if { (ac_try="$ac_compile"
8266case "(($ac_try" in
8267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8268 *) ac_try_echo=$ac_try;;
8269esac
8270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8271 (eval "$ac_compile") 2>conftest.er1
7862d3a8 8272 ac_status=$?
edfaf76d
LK
8273 grep -v '^ *+' conftest.er1 >conftest.err
8274 rm -f conftest.er1
8275 cat conftest.err >&5
7862d3a8
AS
8276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8277 (exit $ac_status); } &&
ca81d7a0
JD
8278 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8279 { (case "(($ac_try" in
8280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8281 *) ac_try_echo=$ac_try;;
8282esac
8283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8284 (eval "$ac_try") 2>&5
edfaf76d
LK
8285 ac_status=$?
8286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8287 (exit $ac_status); }; } &&
8288 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
8289 { (case "(($ac_try" in
8290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8291 *) ac_try_echo=$ac_try;;
8292esac
8293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8294 (eval "$ac_try") 2>&5
7862d3a8
AS
8295 ac_status=$?
8296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8297 (exit $ac_status); }; }; then
8298 eval "$as_ac_Header=yes"
8299else
8300 echo "$as_me: failed program was:" >&5
8301sed 's/^/| /' conftest.$ac_ext >&5
8302
ca81d7a0 8303 eval "$as_ac_Header=no"
7862d3a8 8304fi
ca81d7a0
JD
8305
8306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 8307fi
ca81d7a0
JD
8308ac_res=`eval echo '${'$as_ac_Header'}'`
8309 { echo "$as_me:$LINENO: result: $ac_res" >&5
8310echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
8311if test `eval echo '${'$as_ac_Header'}'` = yes; then
8312 cat >>confdefs.h <<_ACEOF
8313#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8314_ACEOF
8315
8316fi
8317
8318done
8319
8320
ca81d7a0
JD
8321{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
8322echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 8323if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 8324 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 8325else
503d2be0 8326 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8327/* confdefs.h. */
8328_ACEOF
8329cat confdefs.h >>conftest.$ac_ext
8330cat >>conftest.$ac_ext <<_ACEOF
8331/* end confdefs.h. */
98418dba
CW
8332#include <sys/types.h>
8333#include <time.h>
7397acc4 8334
503d2be0
AS
8335int
8336main ()
8337{
98418dba 8338struct tm *tp; tp->tm_sec;
503d2be0
AS
8339 ;
8340 return 0;
8341}
8342_ACEOF
8343rm -f conftest.$ac_objext
ca81d7a0
JD
8344if { (ac_try="$ac_compile"
8345case "(($ac_try" in
8346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8347 *) ac_try_echo=$ac_try;;
8348esac
8349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8350 (eval "$ac_compile") 2>conftest.er1
503d2be0 8351 ac_status=$?
edfaf76d
LK
8352 grep -v '^ *+' conftest.er1 >conftest.err
8353 rm -f conftest.er1
8354 cat conftest.err >&5
c0d27fcc 8355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 8356 (exit $ac_status); } &&
ca81d7a0
JD
8357 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8358 { (case "(($ac_try" in
8359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8360 *) ac_try_echo=$ac_try;;
8361esac
8362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8363 (eval "$ac_try") 2>&5
edfaf76d
LK
8364 ac_status=$?
8365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8366 (exit $ac_status); }; } &&
8367 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
8368 { (case "(($ac_try" in
8369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8370 *) ac_try_echo=$ac_try;;
8371esac
8372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8373 (eval "$ac_try") 2>&5
35996d22
AS
8374 ac_status=$?
8375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8376 (exit $ac_status); }; }; then
8377 ac_cv_struct_tm=time.h
8378else
503d2be0 8379 echo "$as_me: failed program was:" >&5
19650fd6
AS
8380sed 's/^/| /' conftest.$ac_ext >&5
8381
ca81d7a0 8382 ac_cv_struct_tm=sys/time.h
7397acc4 8383fi
ca81d7a0
JD
8384
8385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 8386fi
ca81d7a0
JD
8387{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
8388echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 8389if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 8390
c0d27fcc 8391cat >>confdefs.h <<\_ACEOF
98418dba 8392#define TM_IN_SYS_TIME 1
c0d27fcc 8393_ACEOF
7397acc4
DL
8394
8395fi
ba4481b5 8396
ca81d7a0
JD
8397{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
8398echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 8399if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 8400 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8401else
98418dba 8402 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8403/* confdefs.h. */
8404_ACEOF
8405cat confdefs.h >>conftest.$ac_ext
8406cat >>conftest.$ac_ext <<_ACEOF
8407/* end confdefs.h. */
98418dba
CW
8408#include <sys/types.h>
8409#include <$ac_cv_struct_tm>
ba4481b5 8410
c0d27fcc 8411
98418dba
CW
8412int
8413main ()
8414{
8415static struct tm ac_aggr;
8416if (ac_aggr.tm_zone)
8417return 0;
8418 ;
8419 return 0;
8420}
8421_ACEOF
8422rm -f conftest.$ac_objext
ca81d7a0
JD
8423if { (ac_try="$ac_compile"
8424case "(($ac_try" in
8425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8426 *) ac_try_echo=$ac_try;;
8427esac
8428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8429 (eval "$ac_compile") 2>conftest.er1
98418dba 8430 ac_status=$?
edfaf76d
LK
8431 grep -v '^ *+' conftest.er1 >conftest.err
8432 rm -f conftest.er1
8433 cat conftest.err >&5
c0d27fcc 8434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8435 (exit $ac_status); } &&
ca81d7a0
JD
8436 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8437 { (case "(($ac_try" in
8438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8439 *) ac_try_echo=$ac_try;;
8440esac
8441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8442 (eval "$ac_try") 2>&5
edfaf76d
LK
8443 ac_status=$?
8444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8445 (exit $ac_status); }; } &&
8446 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
8447 { (case "(($ac_try" in
8448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8449 *) ac_try_echo=$ac_try;;
8450esac
8451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8452 (eval "$ac_try") 2>&5
98418dba 8453 ac_status=$?
c0d27fcc 8454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8455 (exit $ac_status); }; }; then
8456 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 8457else
98418dba 8458 echo "$as_me: failed program was:" >&5
19650fd6
AS
8459sed 's/^/| /' conftest.$ac_ext >&5
8460
ca81d7a0 8461 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8462/* confdefs.h. */
8463_ACEOF
8464cat confdefs.h >>conftest.$ac_ext
8465cat >>conftest.$ac_ext <<_ACEOF
8466/* end confdefs.h. */
6bae0ccf
DL
8467#include <sys/types.h>
8468#include <$ac_cv_struct_tm>
8469
8470
8471int
8472main ()
8473{
8474static struct tm ac_aggr;
8475if (sizeof ac_aggr.tm_zone)
8476return 0;
8477 ;
8478 return 0;
8479}
8480_ACEOF
8481rm -f conftest.$ac_objext
ca81d7a0
JD
8482if { (ac_try="$ac_compile"
8483case "(($ac_try" in
8484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8485 *) ac_try_echo=$ac_try;;
8486esac
8487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8488 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 8489 ac_status=$?
edfaf76d
LK
8490 grep -v '^ *+' conftest.er1 >conftest.err
8491 rm -f conftest.er1
8492 cat conftest.err >&5
6bae0ccf
DL
8493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8494 (exit $ac_status); } &&
ca81d7a0
JD
8495 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8496 { (case "(($ac_try" in
8497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8498 *) ac_try_echo=$ac_try;;
8499esac
8500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8501 (eval "$ac_try") 2>&5
edfaf76d
LK
8502 ac_status=$?
8503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8504 (exit $ac_status); }; } &&
8505 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
8506 { (case "(($ac_try" in
8507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8508 *) ac_try_echo=$ac_try;;
8509esac
8510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8511 (eval "$ac_try") 2>&5
6bae0ccf
DL
8512 ac_status=$?
8513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8514 (exit $ac_status); }; }; then
8515 ac_cv_member_struct_tm_tm_zone=yes
8516else
8517 echo "$as_me: failed program was:" >&5
19650fd6
AS
8518sed 's/^/| /' conftest.$ac_ext >&5
8519
ca81d7a0 8520 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 8521fi
ca81d7a0
JD
8522
8523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 8524fi
ca81d7a0
JD
8525
8526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8527fi
ca81d7a0
JD
8528{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
8529echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 8530if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 8531
c0d27fcc 8532cat >>confdefs.h <<_ACEOF
98418dba 8533#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
8534_ACEOF
8535
ba4481b5 8536
98418dba 8537fi
ba4481b5 8538
98418dba 8539if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 8540
c0d27fcc 8541cat >>confdefs.h <<\_ACEOF
98418dba 8542#define HAVE_TM_ZONE 1
c0d27fcc 8543_ACEOF
ba4481b5 8544
ba4481b5 8545else
ca81d7a0
JD
8546 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
8547echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
8548if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 8549 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8550else
98418dba 8551 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8552/* confdefs.h. */
8553_ACEOF
8554cat confdefs.h >>conftest.$ac_ext
8555cat >>conftest.$ac_ext <<_ACEOF
8556/* end confdefs.h. */
98418dba 8557#include <time.h>
98418dba 8558
98418dba
CW
8559int
8560main ()
8561{
ca81d7a0
JD
8562#ifndef tzname
8563 char *p = (char *) tzname;
8564 return !p;
8565#endif
8566
98418dba
CW
8567 ;
8568 return 0;
8569}
8570_ACEOF
ca81d7a0
JD
8571rm -f conftest.$ac_objext
8572if { (ac_try="$ac_compile"
8573case "(($ac_try" in
8574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8575 *) ac_try_echo=$ac_try;;
8576esac
8577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8578 (eval "$ac_compile") 2>conftest.er1
98418dba 8579 ac_status=$?
edfaf76d
LK
8580 grep -v '^ *+' conftest.er1 >conftest.err
8581 rm -f conftest.er1
8582 cat conftest.err >&5
c0d27fcc 8583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8584 (exit $ac_status); } &&
ca81d7a0
JD
8585 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8586 { (case "(($ac_try" in
8587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8588 *) ac_try_echo=$ac_try;;
8589esac
8590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8591 (eval "$ac_try") 2>&5
edfaf76d
LK
8592 ac_status=$?
8593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8594 (exit $ac_status); }; } &&
ca81d7a0
JD
8595 { ac_try='test -s conftest.$ac_objext'
8596 { (case "(($ac_try" in
8597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8598 *) ac_try_echo=$ac_try;;
8599esac
8600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8601 (eval "$ac_try") 2>&5
98418dba 8602 ac_status=$?
c0d27fcc 8603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8604 (exit $ac_status); }; }; then
ca81d7a0 8605 ac_cv_have_decl_tzname=yes
98418dba
CW
8606else
8607 echo "$as_me: failed program was:" >&5
19650fd6
AS
8608sed 's/^/| /' conftest.$ac_ext >&5
8609
ca81d7a0 8610 ac_cv_have_decl_tzname=no
ba4481b5 8611fi
ca81d7a0
JD
8612
8613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8614fi
ca81d7a0
JD
8615{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
8616echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
8617if test $ac_cv_have_decl_tzname = yes; then
ba4481b5 8618
ca81d7a0
JD
8619cat >>confdefs.h <<_ACEOF
8620#define HAVE_DECL_TZNAME 1
c0d27fcc 8621_ACEOF
503d2be0 8622
ca81d7a0
JD
8623
8624else
8625 cat >>confdefs.h <<_ACEOF
8626#define HAVE_DECL_TZNAME 0
8627_ACEOF
8628
8629
98418dba 8630fi
503d2be0 8631
ca81d7a0
JD
8632
8633 { echo "$as_me:$LINENO: checking for tzname" >&5
8634echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
8635if test "${ac_cv_var_tzname+set}" = set; then
98418dba
CW
8636 echo $ECHO_N "(cached) $ECHO_C" >&6
8637else
8638 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8639/* confdefs.h. */
8640_ACEOF
8641cat confdefs.h >>conftest.$ac_ext
8642cat >>conftest.$ac_ext <<_ACEOF
8643/* end confdefs.h. */
98418dba 8644#include <time.h>
ca81d7a0
JD
8645#if !HAVE_DECL_TZNAME
8646extern char *tzname[];
8647#endif
b936fae4 8648
98418dba
CW
8649int
8650main ()
8651{
ca81d7a0 8652return tzname[0][0];
98418dba
CW
8653 ;
8654 return 0;
8655}
8656_ACEOF
ca81d7a0
JD
8657rm -f conftest.$ac_objext conftest$ac_exeext
8658if { (ac_try="$ac_link"
8659case "(($ac_try" in
8660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8661 *) ac_try_echo=$ac_try;;
8662esac
8663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8664 (eval "$ac_link") 2>conftest.er1
98418dba 8665 ac_status=$?
edfaf76d
LK
8666 grep -v '^ *+' conftest.er1 >conftest.err
8667 rm -f conftest.er1
8668 cat conftest.err >&5
c0d27fcc 8669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8670 (exit $ac_status); } &&
ca81d7a0
JD
8671 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8672 { (case "(($ac_try" in
8673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8674 *) ac_try_echo=$ac_try;;
8675esac
8676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8677 (eval "$ac_try") 2>&5
edfaf76d
LK
8678 ac_status=$?
8679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8680 (exit $ac_status); }; } &&
ca81d7a0
JD
8681 { ac_try='test -s conftest$ac_exeext'
8682 { (case "(($ac_try" in
8683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8684 *) ac_try_echo=$ac_try;;
8685esac
8686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8687 (eval "$ac_try") 2>&5
98418dba 8688 ac_status=$?
c0d27fcc 8689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8690 (exit $ac_status); }; }; then
ca81d7a0 8691 ac_cv_var_tzname=yes
98418dba
CW
8692else
8693 echo "$as_me: failed program was:" >&5
19650fd6
AS
8694sed 's/^/| /' conftest.$ac_ext >&5
8695
ca81d7a0
JD
8696 ac_cv_var_tzname=no
8697fi
6bae0ccf 8698
ca81d7a0
JD
8699rm -f core conftest.err conftest.$ac_objext \
8700 conftest$ac_exeext conftest.$ac_ext
8701fi
8702{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
8703echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
8704 if test $ac_cv_var_tzname = yes; then
8705
8706cat >>confdefs.h <<\_ACEOF
8707#define HAVE_TZNAME 1
8708_ACEOF
8709
8710 fi
8711fi
8712
8713{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
8714echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
8715if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
8716 echo $ECHO_N "(cached) $ECHO_C" >&6
8717else
8718 cat >conftest.$ac_ext <<_ACEOF
8719/* confdefs.h. */
8720_ACEOF
8721cat confdefs.h >>conftest.$ac_ext
8722cat >>conftest.$ac_ext <<_ACEOF
8723/* end confdefs.h. */
8724#include <time.h>
8725
8726int
8727main ()
8728{
8729static struct tm ac_aggr;
8730if (ac_aggr.tm_gmtoff)
8731return 0;
8732 ;
8733 return 0;
8734}
8735_ACEOF
8736rm -f conftest.$ac_objext
8737if { (ac_try="$ac_compile"
8738case "(($ac_try" in
8739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8740 *) ac_try_echo=$ac_try;;
8741esac
8742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8743 (eval "$ac_compile") 2>conftest.er1
8744 ac_status=$?
8745 grep -v '^ *+' conftest.er1 >conftest.err
8746 rm -f conftest.er1
8747 cat conftest.err >&5
8748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8749 (exit $ac_status); } &&
8750 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8751 { (case "(($ac_try" in
8752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8753 *) ac_try_echo=$ac_try;;
8754esac
8755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8756 (eval "$ac_try") 2>&5
8757 ac_status=$?
8758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8759 (exit $ac_status); }; } &&
8760 { ac_try='test -s conftest.$ac_objext'
8761 { (case "(($ac_try" in
8762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8763 *) ac_try_echo=$ac_try;;
8764esac
8765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8766 (eval "$ac_try") 2>&5
8767 ac_status=$?
8768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8769 (exit $ac_status); }; }; then
8770 ac_cv_member_struct_tm_tm_gmtoff=yes
8771else
8772 echo "$as_me: failed program was:" >&5
8773sed 's/^/| /' conftest.$ac_ext >&5
8774
8775 cat >conftest.$ac_ext <<_ACEOF
8776/* confdefs.h. */
8777_ACEOF
8778cat confdefs.h >>conftest.$ac_ext
8779cat >>conftest.$ac_ext <<_ACEOF
8780/* end confdefs.h. */
8781#include <time.h>
8782
8783int
8784main ()
8785{
8786static struct tm ac_aggr;
8787if (sizeof ac_aggr.tm_gmtoff)
6bae0ccf 8788return 0;
8799b3e4
CW
8789 ;
8790 return 0;
8791}
8792_ACEOF
6bae0ccf 8793rm -f conftest.$ac_objext
ca81d7a0
JD
8794if { (ac_try="$ac_compile"
8795case "(($ac_try" in
8796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8797 *) ac_try_echo=$ac_try;;
8798esac
8799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8800 (eval "$ac_compile") 2>conftest.er1
8799b3e4 8801 ac_status=$?
edfaf76d
LK
8802 grep -v '^ *+' conftest.er1 >conftest.err
8803 rm -f conftest.er1
8804 cat conftest.err >&5
c0d27fcc 8805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 8806 (exit $ac_status); } &&
ca81d7a0
JD
8807 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8808 { (case "(($ac_try" in
8809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8810 *) ac_try_echo=$ac_try;;
8811esac
8812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8813 (eval "$ac_try") 2>&5
edfaf76d
LK
8814 ac_status=$?
8815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8816 (exit $ac_status); }; } &&
8817 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
8818 { (case "(($ac_try" in
8819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8820 *) ac_try_echo=$ac_try;;
8821esac
8822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8823 (eval "$ac_try") 2>&5
8799b3e4 8824 ac_status=$?
c0d27fcc 8825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 8826 (exit $ac_status); }; }; then
6bae0ccf 8827 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
8828else
8829 echo "$as_me: failed program was:" >&5
19650fd6
AS
8830sed 's/^/| /' conftest.$ac_ext >&5
8831
ca81d7a0 8832 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 8833fi
ca81d7a0
JD
8834
8835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8836fi
ca81d7a0
JD
8837
8838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 8839fi
ca81d7a0
JD
8840{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
8841echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
8842if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
8843
8844cat >>confdefs.h <<\_ACEOF
8845#define HAVE_TM_GMTOFF 1
8846_ACEOF
8847
8848fi
8849
ca81d7a0
JD
8850{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
8851echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
8852if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
8853 echo $ECHO_N "(cached) $ECHO_C" >&6
8854else
8855 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8856/* confdefs.h. */
8857_ACEOF
8858cat confdefs.h >>conftest.$ac_ext
8859cat >>conftest.$ac_ext <<_ACEOF
8860/* end confdefs.h. */
7862d3a8
AS
8861$ac_includes_default
8862#if HAVE_SYS_SOCKET_H
8863#include <sys/socket.h>
8864#endif
8865#if HAVE_NET_IF_H
96f3a036 8866#include <net/if.h>
7862d3a8 8867#endif
96f3a036
DL
8868
8869int
8870main ()
8871{
8872static struct ifreq ac_aggr;
8873if (ac_aggr.ifr_flags)
8874return 0;
8875 ;
8876 return 0;
8877}
8878_ACEOF
8879rm -f conftest.$ac_objext
ca81d7a0
JD
8880if { (ac_try="$ac_compile"
8881case "(($ac_try" in
8882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8883 *) ac_try_echo=$ac_try;;
8884esac
8885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8886 (eval "$ac_compile") 2>conftest.er1
96f3a036 8887 ac_status=$?
edfaf76d
LK
8888 grep -v '^ *+' conftest.er1 >conftest.err
8889 rm -f conftest.er1
8890 cat conftest.err >&5
96f3a036
DL
8891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8892 (exit $ac_status); } &&
ca81d7a0
JD
8893 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8894 { (case "(($ac_try" in
8895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8896 *) ac_try_echo=$ac_try;;
8897esac
8898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8899 (eval "$ac_try") 2>&5
edfaf76d
LK
8900 ac_status=$?
8901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8902 (exit $ac_status); }; } &&
8903 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
8904 { (case "(($ac_try" in
8905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8906 *) ac_try_echo=$ac_try;;
8907esac
8908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8909 (eval "$ac_try") 2>&5
96f3a036
DL
8910 ac_status=$?
8911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8912 (exit $ac_status); }; }; then
8913 ac_cv_member_struct_ifreq_ifr_flags=yes
8914else
8915 echo "$as_me: failed program was:" >&5
8916sed 's/^/| /' conftest.$ac_ext >&5
8917
ca81d7a0 8918 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8919/* confdefs.h. */
8920_ACEOF
8921cat confdefs.h >>conftest.$ac_ext
8922cat >>conftest.$ac_ext <<_ACEOF
8923/* end confdefs.h. */
7862d3a8
AS
8924$ac_includes_default
8925#if HAVE_SYS_SOCKET_H
8926#include <sys/socket.h>
8927#endif
8928#if HAVE_NET_IF_H
96f3a036 8929#include <net/if.h>
7862d3a8 8930#endif
96f3a036
DL
8931
8932int
8933main ()
8934{
8935static struct ifreq ac_aggr;
8936if (sizeof ac_aggr.ifr_flags)
8937return 0;
8938 ;
8939 return 0;
8940}
8941_ACEOF
8942rm -f conftest.$ac_objext
ca81d7a0
JD
8943if { (ac_try="$ac_compile"
8944case "(($ac_try" in
8945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8946 *) ac_try_echo=$ac_try;;
8947esac
8948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8949 (eval "$ac_compile") 2>conftest.er1
96f3a036 8950 ac_status=$?
edfaf76d
LK
8951 grep -v '^ *+' conftest.er1 >conftest.err
8952 rm -f conftest.er1
8953 cat conftest.err >&5
96f3a036
DL
8954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8955 (exit $ac_status); } &&
ca81d7a0
JD
8956 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8957 { (case "(($ac_try" in
8958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8959 *) ac_try_echo=$ac_try;;
8960esac
8961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8962 (eval "$ac_try") 2>&5
edfaf76d
LK
8963 ac_status=$?
8964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8965 (exit $ac_status); }; } &&
8966 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
8967 { (case "(($ac_try" in
8968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8969 *) ac_try_echo=$ac_try;;
8970esac
8971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8972 (eval "$ac_try") 2>&5
96f3a036
DL
8973 ac_status=$?
8974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8975 (exit $ac_status); }; }; then
8976 ac_cv_member_struct_ifreq_ifr_flags=yes
8977else
8978 echo "$as_me: failed program was:" >&5
8979sed 's/^/| /' conftest.$ac_ext >&5
8980
ca81d7a0 8981 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8982fi
ca81d7a0
JD
8983
8984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8985fi
ca81d7a0
JD
8986
8987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8988fi
ca81d7a0
JD
8989{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8990echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8991if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8992
8993cat >>confdefs.h <<_ACEOF
8994#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8995_ACEOF
8996
8997
8998fi
ca81d7a0
JD
8999{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
9000echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
9001if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
9002 echo $ECHO_N "(cached) $ECHO_C" >&6
9003else
9004 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
9005/* confdefs.h. */
9006_ACEOF
9007cat confdefs.h >>conftest.$ac_ext
9008cat >>conftest.$ac_ext <<_ACEOF
9009/* end confdefs.h. */
7862d3a8
AS
9010$ac_includes_default
9011#if HAVE_SYS_SOCKET_H
9012#include <sys/socket.h>
9013#endif
9014#if HAVE_NET_IF_H
96f3a036 9015#include <net/if.h>
7862d3a8 9016#endif
96f3a036
DL
9017
9018int
9019main ()
9020{
9021static struct ifreq ac_aggr;
9022if (ac_aggr.ifr_hwaddr)
9023return 0;
9024 ;
9025 return 0;
9026}
9027_ACEOF
9028rm -f conftest.$ac_objext
ca81d7a0
JD
9029if { (ac_try="$ac_compile"
9030case "(($ac_try" in
9031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9032 *) ac_try_echo=$ac_try;;
9033esac
9034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9035 (eval "$ac_compile") 2>conftest.er1
96f3a036 9036 ac_status=$?
edfaf76d
LK
9037 grep -v '^ *+' conftest.er1 >conftest.err
9038 rm -f conftest.er1
9039 cat conftest.err >&5
96f3a036
DL
9040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9041 (exit $ac_status); } &&
ca81d7a0
JD
9042 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9043 { (case "(($ac_try" in
9044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9045 *) ac_try_echo=$ac_try;;
9046esac
9047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9048 (eval "$ac_try") 2>&5
edfaf76d
LK
9049 ac_status=$?
9050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9051 (exit $ac_status); }; } &&
9052 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
9053 { (case "(($ac_try" in
9054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9055 *) ac_try_echo=$ac_try;;
9056esac
9057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9058 (eval "$ac_try") 2>&5
96f3a036
DL
9059 ac_status=$?
9060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9061 (exit $ac_status); }; }; then
9062 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
9063else
9064 echo "$as_me: failed program was:" >&5
9065sed 's/^/| /' conftest.$ac_ext >&5
9066
ca81d7a0 9067 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
9068/* confdefs.h. */
9069_ACEOF
9070cat confdefs.h >>conftest.$ac_ext
9071cat >>conftest.$ac_ext <<_ACEOF
9072/* end confdefs.h. */
7862d3a8
AS
9073$ac_includes_default
9074#if HAVE_SYS_SOCKET_H
9075#include <sys/socket.h>
9076#endif
9077#if HAVE_NET_IF_H
96f3a036 9078#include <net/if.h>
7862d3a8 9079#endif
96f3a036
DL
9080
9081int
9082main ()
9083{
9084static struct ifreq ac_aggr;
9085if (sizeof ac_aggr.ifr_hwaddr)
9086return 0;
9087 ;
9088 return 0;
9089}
9090_ACEOF
9091rm -f conftest.$ac_objext
ca81d7a0
JD
9092if { (ac_try="$ac_compile"
9093case "(($ac_try" in
9094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9095 *) ac_try_echo=$ac_try;;
9096esac
9097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9098 (eval "$ac_compile") 2>conftest.er1
96f3a036 9099 ac_status=$?
edfaf76d
LK
9100 grep -v '^ *+' conftest.er1 >conftest.err
9101 rm -f conftest.er1
9102 cat conftest.err >&5
96f3a036
DL
9103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9104 (exit $ac_status); } &&
ca81d7a0
JD
9105 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9106 { (case "(($ac_try" in
9107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9108 *) ac_try_echo=$ac_try;;
9109esac
9110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9111 (eval "$ac_try") 2>&5
edfaf76d
LK
9112 ac_status=$?
9113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9114 (exit $ac_status); }; } &&
9115 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
9116 { (case "(($ac_try" in
9117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9118 *) ac_try_echo=$ac_try;;
9119esac
9120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9121 (eval "$ac_try") 2>&5
96f3a036
DL
9122 ac_status=$?
9123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9124 (exit $ac_status); }; }; then
9125 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
9126else
9127 echo "$as_me: failed program was:" >&5
9128sed 's/^/| /' conftest.$ac_ext >&5
9129
ca81d7a0 9130 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 9131fi
ca81d7a0
JD
9132
9133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 9134fi
ca81d7a0
JD
9135
9136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 9137fi
ca81d7a0
JD
9138{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
9139echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
9140if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
9141
9142cat >>confdefs.h <<_ACEOF
9143#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9144_ACEOF
9145
9146
9147fi
ca81d7a0
JD
9148{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
9149echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
9150if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
9151 echo $ECHO_N "(cached) $ECHO_C" >&6
9152else
9153 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
9154/* confdefs.h. */
9155_ACEOF
9156cat confdefs.h >>conftest.$ac_ext
9157cat >>conftest.$ac_ext <<_ACEOF
9158/* end confdefs.h. */
7862d3a8
AS
9159$ac_includes_default
9160#if HAVE_SYS_SOCKET_H
9161#include <sys/socket.h>
9162#endif
9163#if HAVE_NET_IF_H
96f3a036 9164#include <net/if.h>
7862d3a8 9165#endif
96f3a036
DL
9166
9167int
9168main ()
9169{
9170static struct ifreq ac_aggr;
9171if (ac_aggr.ifr_netmask)
9172return 0;
9173 ;
9174 return 0;
9175}
9176_ACEOF
9177rm -f conftest.$ac_objext
ca81d7a0
JD
9178if { (ac_try="$ac_compile"
9179case "(($ac_try" in
9180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9181 *) ac_try_echo=$ac_try;;
9182esac
9183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9184 (eval "$ac_compile") 2>conftest.er1
96f3a036 9185 ac_status=$?
edfaf76d
LK
9186 grep -v '^ *+' conftest.er1 >conftest.err
9187 rm -f conftest.er1
9188 cat conftest.err >&5
96f3a036
DL
9189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9190 (exit $ac_status); } &&
ca81d7a0
JD
9191 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9192 { (case "(($ac_try" in
9193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9194 *) ac_try_echo=$ac_try;;
9195esac
9196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9197 (eval "$ac_try") 2>&5
edfaf76d
LK
9198 ac_status=$?
9199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9200 (exit $ac_status); }; } &&
9201 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
9202 { (case "(($ac_try" in
9203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9204 *) ac_try_echo=$ac_try;;
9205esac
9206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9207 (eval "$ac_try") 2>&5
96f3a036
DL
9208 ac_status=$?
9209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9210 (exit $ac_status); }; }; then
9211 ac_cv_member_struct_ifreq_ifr_netmask=yes
9212else
9213 echo "$as_me: failed program was:" >&5
9214sed 's/^/| /' conftest.$ac_ext >&5
9215
ca81d7a0 9216 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
9217/* confdefs.h. */
9218_ACEOF
9219cat confdefs.h >>conftest.$ac_ext
9220cat >>conftest.$ac_ext <<_ACEOF
9221/* end confdefs.h. */
7862d3a8
AS
9222$ac_includes_default
9223#if HAVE_SYS_SOCKET_H
9224#include <sys/socket.h>
9225#endif
9226#if HAVE_NET_IF_H
96f3a036 9227#include <net/if.h>
7862d3a8 9228#endif
96f3a036
DL
9229
9230int
9231main ()
9232{
9233static struct ifreq ac_aggr;
9234if (sizeof ac_aggr.ifr_netmask)
9235return 0;
9236 ;
9237 return 0;
9238}
9239_ACEOF
9240rm -f conftest.$ac_objext
ca81d7a0
JD
9241if { (ac_try="$ac_compile"
9242case "(($ac_try" in
9243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9244 *) ac_try_echo=$ac_try;;
9245esac
9246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9247 (eval "$ac_compile") 2>conftest.er1
96f3a036 9248 ac_status=$?
edfaf76d
LK
9249 grep -v '^ *+' conftest.er1 >conftest.err
9250 rm -f conftest.er1
9251 cat conftest.err >&5
96f3a036
DL
9252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9253 (exit $ac_status); } &&
ca81d7a0
JD
9254 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9255 { (case "(($ac_try" in
9256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9257 *) ac_try_echo=$ac_try;;
9258esac
9259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9260 (eval "$ac_try") 2>&5
edfaf76d
LK
9261 ac_status=$?
9262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9263 (exit $ac_status); }; } &&
9264 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
9265 { (case "(($ac_try" in
9266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9267 *) ac_try_echo=$ac_try;;
9268esac
9269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9270 (eval "$ac_try") 2>&5
96f3a036
DL
9271 ac_status=$?
9272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9273 (exit $ac_status); }; }; then
9274 ac_cv_member_struct_ifreq_ifr_netmask=yes
9275else
9276 echo "$as_me: failed program was:" >&5
9277sed 's/^/| /' conftest.$ac_ext >&5
9278
ca81d7a0 9279 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 9280fi
ca81d7a0
JD
9281
9282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 9283fi
ca81d7a0
JD
9284
9285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 9286fi
ca81d7a0
JD
9287{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
9288echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
9289if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
9290
9291cat >>confdefs.h <<_ACEOF
9292#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
9293_ACEOF
9294
9295
9296fi
ca81d7a0
JD
9297{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
9298echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
9299if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
9300 echo $ECHO_N "(cached) $ECHO_C" >&6
9301else
9302 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
9303/* confdefs.h. */
9304_ACEOF
9305cat confdefs.h >>conftest.$ac_ext
9306cat >>conftest.$ac_ext <<_ACEOF
9307/* end confdefs.h. */
7862d3a8
AS
9308$ac_includes_default
9309#if HAVE_SYS_SOCKET_H
9310#include <sys/socket.h>
9311#endif
9312#if HAVE_NET_IF_H
96f3a036 9313#include <net/if.h>
7862d3a8 9314#endif
96f3a036
DL
9315
9316int
9317main ()
9318{
9319static struct ifreq ac_aggr;
9320if (ac_aggr.ifr_broadaddr)
9321return 0;
9322 ;
9323 return 0;
9324}
9325_ACEOF
9326rm -f conftest.$ac_objext
ca81d7a0
JD
9327if { (ac_try="$ac_compile"
9328case "(($ac_try" in
9329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9330 *) ac_try_echo=$ac_try;;
9331esac
9332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9333 (eval "$ac_compile") 2>conftest.er1
96f3a036 9334 ac_status=$?
edfaf76d
LK
9335 grep -v '^ *+' conftest.er1 >conftest.err
9336 rm -f conftest.er1
9337 cat conftest.err >&5
96f3a036
DL
9338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9339 (exit $ac_status); } &&
ca81d7a0
JD
9340 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9341 { (case "(($ac_try" in
9342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9343 *) ac_try_echo=$ac_try;;
9344esac
9345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9346 (eval "$ac_try") 2>&5
edfaf76d
LK
9347 ac_status=$?
9348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9349 (exit $ac_status); }; } &&
9350 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
9351 { (case "(($ac_try" in
9352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9353 *) ac_try_echo=$ac_try;;
9354esac
9355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9356 (eval "$ac_try") 2>&5
96f3a036
DL
9357 ac_status=$?
9358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9359 (exit $ac_status); }; }; then
9360 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
9361else
9362 echo "$as_me: failed program was:" >&5
9363sed 's/^/| /' conftest.$ac_ext >&5
9364
ca81d7a0 9365 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
9366/* confdefs.h. */
9367_ACEOF
9368cat confdefs.h >>conftest.$ac_ext
9369cat >>conftest.$ac_ext <<_ACEOF
9370/* end confdefs.h. */
7862d3a8
AS
9371$ac_includes_default
9372#if HAVE_SYS_SOCKET_H
9373#include <sys/socket.h>
9374#endif
9375#if HAVE_NET_IF_H
96f3a036 9376#include <net/if.h>
7862d3a8 9377#endif
96f3a036
DL
9378
9379int
9380main ()
9381{
9382static struct ifreq ac_aggr;
9383if (sizeof ac_aggr.ifr_broadaddr)
9384return 0;
9385 ;
9386 return 0;
9387}
9388_ACEOF
9389rm -f conftest.$ac_objext
ca81d7a0
JD
9390if { (ac_try="$ac_compile"
9391case "(($ac_try" in
9392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9393 *) ac_try_echo=$ac_try;;
9394esac
9395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9396 (eval "$ac_compile") 2>conftest.er1
96f3a036 9397 ac_status=$?
edfaf76d
LK
9398 grep -v '^ *+' conftest.er1 >conftest.err
9399 rm -f conftest.er1
9400 cat conftest.err >&5
96f3a036
DL
9401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9402 (exit $ac_status); } &&
ca81d7a0
JD
9403 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9404 { (case "(($ac_try" in
9405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9406 *) ac_try_echo=$ac_try;;
9407esac
9408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9409 (eval "$ac_try") 2>&5
edfaf76d
LK
9410 ac_status=$?
9411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9412 (exit $ac_status); }; } &&
9413 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
9414 { (case "(($ac_try" in
9415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9416 *) ac_try_echo=$ac_try;;
9417esac
9418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9419 (eval "$ac_try") 2>&5
96f3a036
DL
9420 ac_status=$?
9421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9422 (exit $ac_status); }; }; then
9423 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
9424else
9425 echo "$as_me: failed program was:" >&5
9426sed 's/^/| /' conftest.$ac_ext >&5
9427
ca81d7a0 9428 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 9429fi
ca81d7a0
JD
9430
9431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 9432fi
ca81d7a0
JD
9433
9434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 9435fi
ca81d7a0
JD
9436{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
9437echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
9438if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
9439
9440cat >>confdefs.h <<_ACEOF
9441#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
9442_ACEOF
9443
9444
9445fi
ca81d7a0
JD
9446{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
9447echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
9448if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
9449 echo $ECHO_N "(cached) $ECHO_C" >&6
9450else
9451 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
9452/* confdefs.h. */
9453_ACEOF
9454cat confdefs.h >>conftest.$ac_ext
9455cat >>conftest.$ac_ext <<_ACEOF
9456/* end confdefs.h. */
7862d3a8
AS
9457$ac_includes_default
9458#if HAVE_SYS_SOCKET_H
9459#include <sys/socket.h>
9460#endif
9461#if HAVE_NET_IF_H
96f3a036 9462#include <net/if.h>
7862d3a8 9463#endif
96f3a036
DL
9464
9465int
9466main ()
9467{
9468static struct ifreq ac_aggr;
9469if (ac_aggr.ifr_addr)
9470return 0;
9471 ;
9472 return 0;
9473}
9474_ACEOF
9475rm -f conftest.$ac_objext
ca81d7a0
JD
9476if { (ac_try="$ac_compile"
9477case "(($ac_try" in
9478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9479 *) ac_try_echo=$ac_try;;
9480esac
9481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9482 (eval "$ac_compile") 2>conftest.er1
96f3a036 9483 ac_status=$?
edfaf76d
LK
9484 grep -v '^ *+' conftest.er1 >conftest.err
9485 rm -f conftest.er1
9486 cat conftest.err >&5
96f3a036
DL
9487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9488 (exit $ac_status); } &&
ca81d7a0
JD
9489 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9490 { (case "(($ac_try" in
9491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9492 *) ac_try_echo=$ac_try;;
9493esac
9494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9495 (eval "$ac_try") 2>&5
edfaf76d
LK
9496 ac_status=$?
9497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9498 (exit $ac_status); }; } &&
9499 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
9500 { (case "(($ac_try" in
9501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9502 *) ac_try_echo=$ac_try;;
9503esac
9504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9505 (eval "$ac_try") 2>&5
96f3a036
DL
9506 ac_status=$?
9507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9508 (exit $ac_status); }; }; then
9509 ac_cv_member_struct_ifreq_ifr_addr=yes
9510else
9511 echo "$as_me: failed program was:" >&5
9512sed 's/^/| /' conftest.$ac_ext >&5
9513
ca81d7a0 9514 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
9515/* confdefs.h. */
9516_ACEOF
9517cat confdefs.h >>conftest.$ac_ext
9518cat >>conftest.$ac_ext <<_ACEOF
9519/* end confdefs.h. */
7862d3a8
AS
9520$ac_includes_default
9521#if HAVE_SYS_SOCKET_H
9522#include <sys/socket.h>
9523#endif
9524#if HAVE_NET_IF_H
96f3a036 9525#include <net/if.h>
7862d3a8 9526#endif
96f3a036
DL
9527
9528int
9529main ()
9530{
9531static struct ifreq ac_aggr;
9532if (sizeof ac_aggr.ifr_addr)
9533return 0;
9534 ;
9535 return 0;
9536}
9537_ACEOF
9538rm -f conftest.$ac_objext
ca81d7a0
JD
9539if { (ac_try="$ac_compile"
9540case "(($ac_try" in
9541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9542 *) ac_try_echo=$ac_try;;
9543esac
9544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9545 (eval "$ac_compile") 2>conftest.er1
96f3a036 9546 ac_status=$?
edfaf76d
LK
9547 grep -v '^ *+' conftest.er1 >conftest.err
9548 rm -f conftest.er1
9549 cat conftest.err >&5
96f3a036
DL
9550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9551 (exit $ac_status); } &&
ca81d7a0
JD
9552 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9553 { (case "(($ac_try" in
9554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9555 *) ac_try_echo=$ac_try;;
9556esac
9557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9558 (eval "$ac_try") 2>&5
edfaf76d
LK
9559 ac_status=$?
9560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9561 (exit $ac_status); }; } &&
9562 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
9563 { (case "(($ac_try" in
9564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9565 *) ac_try_echo=$ac_try;;
9566esac
9567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9568 (eval "$ac_try") 2>&5
96f3a036
DL
9569 ac_status=$?
9570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9571 (exit $ac_status); }; }; then
9572 ac_cv_member_struct_ifreq_ifr_addr=yes
9573else
9574 echo "$as_me: failed program was:" >&5
9575sed 's/^/| /' conftest.$ac_ext >&5
9576
ca81d7a0 9577 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 9578fi
ca81d7a0
JD
9579
9580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 9581fi
ca81d7a0
JD
9582
9583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 9584fi
ca81d7a0
JD
9585{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
9586echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
9587if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
9588
9589cat >>confdefs.h <<_ACEOF
9590#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9591_ACEOF
9592
9593
9594fi
9595
8799b3e4 9596
8799b3e4 9597
ca81d7a0
JD
9598{ echo "$as_me:$LINENO: checking for function prototypes" >&5
9599echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
9600if test "$ac_cv_prog_cc_c89" != no; then
9601 { echo "$as_me:$LINENO: result: yes" >&5
9602echo "${ECHO_T}yes" >&6; }
98418dba 9603
c0d27fcc 9604cat >>confdefs.h <<\_ACEOF
98418dba 9605#define PROTOTYPES 1
c0d27fcc
MR
9606_ACEOF
9607
9608
9609cat >>confdefs.h <<\_ACEOF
9610#define __PROTOTYPES 1
9611_ACEOF
98418dba
CW
9612
9613else
ca81d7a0
JD
9614 { echo "$as_me:$LINENO: result: no" >&5
9615echo "${ECHO_T}no" >&6; }
98418dba
CW
9616fi
9617
ca81d7a0
JD
9618{ echo "$as_me:$LINENO: checking for working volatile" >&5
9619echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
9620if test "${ac_cv_c_volatile+set}" = set; then
9621 echo $ECHO_N "(cached) $ECHO_C" >&6
9622else
9623 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9624/* confdefs.h. */
9625_ACEOF
9626cat confdefs.h >>conftest.$ac_ext
9627cat >>conftest.$ac_ext <<_ACEOF
9628/* end confdefs.h. */
98418dba 9629
98418dba
CW
9630int
9631main ()
9632{
9633
9634volatile int x;
ca81d7a0
JD
9635int * volatile y = (int *) 0;
9636return !x && !y;
98418dba
CW
9637 ;
9638 return 0;
9639}
9640_ACEOF
9641rm -f conftest.$ac_objext
ca81d7a0
JD
9642if { (ac_try="$ac_compile"
9643case "(($ac_try" in
9644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9645 *) ac_try_echo=$ac_try;;
9646esac
9647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9648 (eval "$ac_compile") 2>conftest.er1
98418dba 9649 ac_status=$?
edfaf76d
LK
9650 grep -v '^ *+' conftest.er1 >conftest.err
9651 rm -f conftest.er1
9652 cat conftest.err >&5
c0d27fcc 9653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9654 (exit $ac_status); } &&
ca81d7a0
JD
9655 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9656 { (case "(($ac_try" in
9657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9658 *) ac_try_echo=$ac_try;;
9659esac
9660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9661 (eval "$ac_try") 2>&5
edfaf76d
LK
9662 ac_status=$?
9663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9664 (exit $ac_status); }; } &&
9665 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
9666 { (case "(($ac_try" in
9667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9668 *) ac_try_echo=$ac_try;;
9669esac
9670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9671 (eval "$ac_try") 2>&5
98418dba 9672 ac_status=$?
c0d27fcc 9673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9674 (exit $ac_status); }; }; then
9675 ac_cv_c_volatile=yes
9676else
9677 echo "$as_me: failed program was:" >&5
19650fd6
AS
9678sed 's/^/| /' conftest.$ac_ext >&5
9679
ca81d7a0 9680 ac_cv_c_volatile=no
98418dba 9681fi
ca81d7a0
JD
9682
9683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 9684fi
ca81d7a0
JD
9685{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
9686echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
9687if test $ac_cv_c_volatile = no; then
9688
c0d27fcc 9689cat >>confdefs.h <<\_ACEOF
98418dba 9690#define volatile
c0d27fcc 9691_ACEOF
98418dba
CW
9692
9693fi
9694
ca81d7a0
JD
9695{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
9696echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
9697if test "${ac_cv_c_const+set}" = set; then
9698 echo $ECHO_N "(cached) $ECHO_C" >&6
9699else
9700 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9701/* confdefs.h. */
9702_ACEOF
9703cat confdefs.h >>conftest.$ac_ext
9704cat >>conftest.$ac_ext <<_ACEOF
9705/* end confdefs.h. */
98418dba 9706
98418dba
CW
9707int
9708main ()
9709{
9710/* FIXME: Include the comments suggested by Paul. */
9711#ifndef __cplusplus
9712 /* Ultrix mips cc rejects this. */
9713 typedef int charset[2];
9714 const charset x;
9715 /* SunOS 4.1.1 cc rejects this. */
9716 char const *const *ccp;
9717 char **p;
9718 /* NEC SVR4.0.2 mips cc rejects this. */
9719 struct point {int x, y;};
9720 static struct point const zero = {0,0};
9721 /* AIX XL C 1.02.0.0 rejects this.
9722 It does not let you subtract one const X* pointer from another in
9723 an arm of an if-expression whose if-part is not a constant
9724 expression */
9725 const char *g = "string";
9726 ccp = &g + (g ? g-g : 0);
9727 /* HPUX 7.0 cc rejects these. */
9728 ++ccp;
9729 p = (char**) ccp;
9730 ccp = (char const *const *) p;
9731 { /* SCO 3.2v4 cc rejects this. */
9732 char *t;
9733 char const *s = 0 ? (char *) 0 : (char const *) 0;
9734
9735 *t++ = 0;
ca81d7a0 9736 if (s) return 0;
98418dba
CW
9737 }
9738 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9739 int x[] = {25, 17};
9740 const int *foo = &x[0];
9741 ++foo;
9742 }
9743 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9744 typedef const int *iptr;
9745 iptr p = 0;
9746 ++p;
9747 }
9748 { /* AIX XL C 1.02.0.0 rejects this saying
9749 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9750 struct s { int j; const int *ap[3]; };
9751 struct s *b; b->j = 5;
9752 }
9753 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9754 const int foo = 10;
ca81d7a0 9755 if (!foo) return 0;
98418dba 9756 }
ca81d7a0 9757 return !x[0] && !zero.x;
98418dba
CW
9758#endif
9759
9760 ;
9761 return 0;
9762}
9763_ACEOF
9764rm -f conftest.$ac_objext
ca81d7a0
JD
9765if { (ac_try="$ac_compile"
9766case "(($ac_try" in
9767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9768 *) ac_try_echo=$ac_try;;
9769esac
9770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9771 (eval "$ac_compile") 2>conftest.er1
98418dba 9772 ac_status=$?
edfaf76d
LK
9773 grep -v '^ *+' conftest.er1 >conftest.err
9774 rm -f conftest.er1
9775 cat conftest.err >&5
c0d27fcc 9776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9777 (exit $ac_status); } &&
ca81d7a0
JD
9778 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9779 { (case "(($ac_try" in
9780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9781 *) ac_try_echo=$ac_try;;
9782esac
9783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9784 (eval "$ac_try") 2>&5
edfaf76d
LK
9785 ac_status=$?
9786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9787 (exit $ac_status); }; } &&
9788 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
9789 { (case "(($ac_try" in
9790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9791 *) ac_try_echo=$ac_try;;
9792esac
9793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9794 (eval "$ac_try") 2>&5
98418dba 9795 ac_status=$?
c0d27fcc 9796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9797 (exit $ac_status); }; }; then
9798 ac_cv_c_const=yes
9799else
9800 echo "$as_me: failed program was:" >&5
19650fd6
AS
9801sed 's/^/| /' conftest.$ac_ext >&5
9802
ca81d7a0 9803 ac_cv_c_const=no
98418dba 9804fi
ca81d7a0
JD
9805
9806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 9807fi
ca81d7a0
JD
9808{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
9809echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
9810if test $ac_cv_c_const = no; then
9811
c0d27fcc 9812cat >>confdefs.h <<\_ACEOF
98418dba 9813#define const
c0d27fcc 9814_ACEOF
98418dba
CW
9815
9816fi
9817
ca81d7a0
JD
9818{ echo "$as_me:$LINENO: checking for void * support" >&5
9819echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
9820if test "${emacs_cv_void_star+set}" = set; then
9821 echo $ECHO_N "(cached) $ECHO_C" >&6
9822else
9823 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9824/* confdefs.h. */
9825_ACEOF
9826cat confdefs.h >>conftest.$ac_ext
9827cat >>conftest.$ac_ext <<_ACEOF
9828/* end confdefs.h. */
98418dba 9829
98418dba
CW
9830int
9831main ()
9832{
9833void * foo;
9834 ;
9835 return 0;
9836}
9837_ACEOF
9838rm -f conftest.$ac_objext
ca81d7a0
JD
9839if { (ac_try="$ac_compile"
9840case "(($ac_try" in
9841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9842 *) ac_try_echo=$ac_try;;
9843esac
9844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9845 (eval "$ac_compile") 2>conftest.er1
98418dba 9846 ac_status=$?
edfaf76d
LK
9847 grep -v '^ *+' conftest.er1 >conftest.err
9848 rm -f conftest.er1
9849 cat conftest.err >&5
c0d27fcc 9850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9851 (exit $ac_status); } &&
ca81d7a0
JD
9852 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9853 { (case "(($ac_try" in
9854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9855 *) ac_try_echo=$ac_try;;
9856esac
9857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9858 (eval "$ac_try") 2>&5
edfaf76d
LK
9859 ac_status=$?
9860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9861 (exit $ac_status); }; } &&
9862 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
9863 { (case "(($ac_try" in
9864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9865 *) ac_try_echo=$ac_try;;
9866esac
9867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9868 (eval "$ac_try") 2>&5
98418dba 9869 ac_status=$?
c0d27fcc 9870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9871 (exit $ac_status); }; }; then
9872 emacs_cv_void_star=yes
9873else
9874 echo "$as_me: failed program was:" >&5
19650fd6
AS
9875sed 's/^/| /' conftest.$ac_ext >&5
9876
ca81d7a0 9877 emacs_cv_void_star=no
98418dba 9878fi
ca81d7a0
JD
9879
9880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 9881fi
ca81d7a0
JD
9882{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
9883echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 9884if test $emacs_cv_void_star = yes; then
c0d27fcc 9885 cat >>confdefs.h <<\_ACEOF
98418dba 9886#define POINTER_TYPE void
c0d27fcc 9887_ACEOF
98418dba
CW
9888
9889else
c0d27fcc 9890 cat >>confdefs.h <<\_ACEOF
98418dba 9891#define POINTER_TYPE char
c0d27fcc 9892_ACEOF
98418dba
CW
9893
9894fi
9895
c0d27fcc 9896
4494a266
JD
9897
9898
cd958eb3 9899
ca81d7a0
JD
9900{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
9901echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
9902set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
9903if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9904 echo $ECHO_N "(cached) $ECHO_C" >&6
9905else
c0d27fcc 9906 cat >conftest.make <<\_ACEOF
ca81d7a0 9907SHELL = /bin/sh
98418dba 9908all:
ca81d7a0 9909 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 9910_ACEOF
98418dba 9911# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
9912case `${MAKE-make} -f conftest.make 2>/dev/null` in
9913 *@@@%%%=?*=@@@%%%*)
9914 eval ac_cv_prog_make_${ac_make}_set=yes;;
9915 *)
9916 eval ac_cv_prog_make_${ac_make}_set=no;;
9917esac
4b411bfe 9918rm -f conftest.make
98418dba 9919fi
ca81d7a0
JD
9920if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
9921 { echo "$as_me:$LINENO: result: yes" >&5
9922echo "${ECHO_T}yes" >&6; }
98418dba
CW
9923 SET_MAKE=
9924else
ca81d7a0
JD
9925 { echo "$as_me:$LINENO: result: no" >&5
9926echo "${ECHO_T}no" >&6; }
98418dba
CW
9927 SET_MAKE="MAKE=${MAKE-make}"
9928fi
9929
c0d27fcc 9930
ca81d7a0
JD
9931{ echo "$as_me:$LINENO: checking for long file names" >&5
9932echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
9933if test "${ac_cv_sys_long_file_names+set}" = set; then
9934 echo $ECHO_N "(cached) $ECHO_C" >&6
9935else
9936 ac_cv_sys_long_file_names=yes
9937# Test for long file names in all the places we know might matter:
9938# . the current directory, where building will happen
9939# $prefix/lib where we will be installing things
9940# $exec_prefix/lib likewise
98418dba 9941# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
9942# /tmp where it might want to write temporary files
9943# /var/tmp likewise
9944# /usr/tmp likewise
ca81d7a0
JD
9945for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9946 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9947 # in the usual case where exec_prefix is '${prefix}'.
9948 case $ac_dir in #(
9949 . | /* | ?:[\\/]*) ;; #(
9950 *) continue;;
9951 esac
9952 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 9953 ac_xdir=$ac_dir/cf$$
ca81d7a0 9954 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
9955 ac_tf1=$ac_xdir/conftest9012345
9956 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 9957 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 9958 ac_cv_sys_long_file_names=no
ca81d7a0
JD
9959 rm -f -r "$ac_xdir" 2>/dev/null
9960 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
9961done
9962fi
ca81d7a0
JD
9963{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
9964echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
9965if test $ac_cv_sys_long_file_names = yes; then
9966
c0d27fcc 9967cat >>confdefs.h <<\_ACEOF
98418dba 9968#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 9969_ACEOF
98418dba
CW
9970
9971fi
9972
c0d27fcc 9973
98418dba
CW
9974#### Choose a window system.
9975
ca81d7a0
JD
9976{ echo "$as_me:$LINENO: checking for X" >&5
9977echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 9978
c0d27fcc 9979
ca81d7a0 9980# Check whether --with-x was given.
98418dba 9981if test "${with_x+set}" = set; then
ca81d7a0
JD
9982 withval=$with_x;
9983fi
98418dba 9984
98418dba
CW
9985# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9986if test "x$with_x" = xno; then
9987 # The user explicitly disabled X.
9988 have_x=disabled
9989else
ca81d7a0
JD
9990 case $x_includes,$x_libraries in #(
9991 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
9992echo "$as_me: error: Cannot use X directory names containing '" >&2;}
9993 { (exit 1); exit 1; }; };; #(
9994 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
9995 echo $ECHO_N "(cached) $ECHO_C" >&6
9996else
9997 # One or both of the vars are not set, and there is no cached value.
9998ac_x_includes=no ac_x_libraries=no
ca81d7a0 9999rm -f -r conftest.dir
98418dba
CW
10000if mkdir conftest.dir; then
10001 cd conftest.dir
c0d27fcc 10002 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
10003incroot:
10004 @echo incroot='${INCROOT}'
10005usrlibdir:
10006 @echo usrlibdir='${USRLIBDIR}'
10007libdir:
10008 @echo libdir='${LIBDIR}'
10009_ACEOF
10010 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 10011 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
10012 for ac_var in incroot usrlibdir libdir; do
10013 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
10014 done
98418dba
CW
10015 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10016 for ac_extension in a so sl; do
ca81d7a0
JD
10017 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
10018 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 10019 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
10020 fi
10021 done
10022 # Screen out bogus values from the imake configuration. They are
10023 # bogus both because they are the default anyway, and because
10024 # using them would break gcc on systems where it needs fixed includes.
10025 case $ac_im_incroot in
ca81d7a0 10026 /usr/include) ac_x_includes= ;;
98418dba
CW
10027 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
10028 esac
10029 case $ac_im_usrlibdir in
10030 /usr/lib | /lib) ;;
10031 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
10032 esac
10033 fi
10034 cd ..
ca81d7a0 10035 rm -f -r conftest.dir
98418dba
CW
10036fi
10037
10038# Standard set of common directories for X headers.
10039# Check X11 before X11Rn because it is often a symlink to the current release.
10040ac_x_header_dirs='
10041/usr/X11/include
10042/usr/X11R6/include
10043/usr/X11R5/include
10044/usr/X11R4/include
10045
10046/usr/include/X11
10047/usr/include/X11R6
10048/usr/include/X11R5
10049/usr/include/X11R4
10050
10051/usr/local/X11/include
10052/usr/local/X11R6/include
10053/usr/local/X11R5/include
10054/usr/local/X11R4/include
10055
10056/usr/local/include/X11
10057/usr/local/include/X11R6
10058/usr/local/include/X11R5
10059/usr/local/include/X11R4
10060
10061/usr/X386/include
10062/usr/x386/include
10063/usr/XFree86/include/X11
10064
10065/usr/include
10066/usr/local/include
10067/usr/unsupported/include
10068/usr/athena/include
10069/usr/local/x11r5/include
10070/usr/lpp/Xamples/include
10071
10072/usr/openwin/include
10073/usr/openwin/share/include'
10074
10075if test "$ac_x_includes" = no; then
ca81d7a0 10076 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
10077 # First, try using that file with no special directory specified.
10078 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10079/* confdefs.h. */
10080_ACEOF
10081cat confdefs.h >>conftest.$ac_ext
10082cat >>conftest.$ac_ext <<_ACEOF
10083/* end confdefs.h. */
ca81d7a0 10084#include <X11/Xlib.h>
98418dba 10085_ACEOF
ca81d7a0
JD
10086if { (ac_try="$ac_cpp conftest.$ac_ext"
10087case "(($ac_try" in
10088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10089 *) ac_try_echo=$ac_try;;
10090esac
10091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10092 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 10093 ac_status=$?
6bae0ccf 10094 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
10095 rm -f conftest.er1
10096 cat conftest.err >&5
c0d27fcc 10097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10098 (exit $ac_status); } >/dev/null; then
10099 if test -s conftest.err; then
10100 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 10101 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
10102 else
10103 ac_cpp_err=
10104 fi
10105else
10106 ac_cpp_err=yes
10107fi
10108if test -z "$ac_cpp_err"; then
10109 # We can compile using X headers with no special include directory.
10110ac_x_includes=
10111else
10112 echo "$as_me: failed program was:" >&5
19650fd6
AS
10113sed 's/^/| /' conftest.$ac_ext >&5
10114
98418dba 10115 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 10116 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
10117 ac_x_includes=$ac_dir
10118 break
10119 fi
10120done
10121fi
ca81d7a0 10122
98418dba
CW
10123rm -f conftest.err conftest.$ac_ext
10124fi # $ac_x_includes = no
10125
10126if test "$ac_x_libraries" = no; then
10127 # Check for the libraries.
10128 # See if we find them without any special options.
10129 # Don't add to $LIBS permanently.
10130 ac_save_LIBS=$LIBS
4713fa76 10131 LIBS="-lXt $LIBS"
98418dba 10132 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10133/* confdefs.h. */
10134_ACEOF
10135cat confdefs.h >>conftest.$ac_ext
10136cat >>conftest.$ac_ext <<_ACEOF
10137/* end confdefs.h. */
ca81d7a0 10138#include <X11/Xlib.h>
98418dba
CW
10139int
10140main ()
10141{
ca81d7a0 10142XrmInitialize ()
98418dba
CW
10143 ;
10144 return 0;
10145}
10146_ACEOF
10147rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10148if { (ac_try="$ac_link"
10149case "(($ac_try" in
10150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10151 *) ac_try_echo=$ac_try;;
10152esac
10153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10154 (eval "$ac_link") 2>conftest.er1
98418dba 10155 ac_status=$?
edfaf76d
LK
10156 grep -v '^ *+' conftest.er1 >conftest.err
10157 rm -f conftest.er1
10158 cat conftest.err >&5
c0d27fcc 10159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10160 (exit $ac_status); } &&
ca81d7a0
JD
10161 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10162 { (case "(($ac_try" in
10163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10164 *) ac_try_echo=$ac_try;;
10165esac
10166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10167 (eval "$ac_try") 2>&5
edfaf76d
LK
10168 ac_status=$?
10169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10170 (exit $ac_status); }; } &&
10171 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
10172 { (case "(($ac_try" in
10173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10174 *) ac_try_echo=$ac_try;;
10175esac
10176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10177 (eval "$ac_try") 2>&5
98418dba 10178 ac_status=$?
c0d27fcc 10179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10180 (exit $ac_status); }; }; then
10181 LIBS=$ac_save_LIBS
10182# We can link X programs with no special library path.
10183ac_x_libraries=
10184else
10185 echo "$as_me: failed program was:" >&5
19650fd6
AS
10186sed 's/^/| /' conftest.$ac_ext >&5
10187
ca81d7a0 10188 LIBS=$ac_save_LIBS
98418dba
CW
10189for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
10190do
10191 # Don't even attempt the hair of trying to link an X program!
10192 for ac_extension in a so sl; do
ca81d7a0 10193 if test -r "$ac_dir/libXt.$ac_extension"; then
98418dba
CW
10194 ac_x_libraries=$ac_dir
10195 break 2
10196 fi
10197 done
10198done
10199fi
ca81d7a0
JD
10200
10201rm -f core conftest.err conftest.$ac_objext \
edfaf76d 10202 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10203fi # $ac_x_libraries = no
10204
ca81d7a0
JD
10205case $ac_x_includes,$ac_x_libraries in #(
10206 no,* | *,no | *\'*)
10207 # Didn't find X, or a directory has "'" in its name.
10208 ac_cv_have_x="have_x=no";; #(
10209 *)
10210 # Record where we found X for the cache.
10211 ac_cv_have_x="have_x=yes\
10212 ac_x_includes='$ac_x_includes'\
10213 ac_x_libraries='$ac_x_libraries'"
10214esac
4b411bfe 10215fi
ca81d7a0
JD
10216;; #(
10217 *) have_x=yes;;
10218 esac
98418dba
CW
10219 eval "$ac_cv_have_x"
10220fi # $with_x != no
10221
10222if test "$have_x" != yes; then
ca81d7a0
JD
10223 { echo "$as_me:$LINENO: result: $have_x" >&5
10224echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
10225 no_x=yes
10226else
10227 # If each of the values was on the command line, it overrides each guess.
10228 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10229 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10230 # Update the cache value to reflect the command line values.
ca81d7a0
JD
10231 ac_cv_have_x="have_x=yes\
10232 ac_x_includes='$x_includes'\
10233 ac_x_libraries='$x_libraries'"
10234 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
10235echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
10236fi
10237
10238if test "$no_x" = yes; then
10239 window_system=none
10240else
10241 window_system=x11
10242fi
10243
92d1ccf4
AS
10244if test "${x_libraries}" != NONE; then
10245 if test -n "${x_libraries}"; then
10246 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
10247 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
10248 fi
98418dba 10249 x_default_search_path=""
92d1ccf4
AS
10250 x_search_path=${x_libraries}
10251 if test -z "${x_search_path}"; then
10252 x_search_path=/usr/lib
10253 fi
10254 for x_library in `echo ${x_search_path}: | \
10255 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
10256 x_search_path="\
10257${x_library}/X11/%L/%T/%N%C%S:\
10258${x_library}/X11/%l/%T/%N%C%S:\
10259${x_library}/X11/%T/%N%C%S:\
10260${x_library}/X11/%L/%T/%N%S:\
10261${x_library}/X11/%l/%T/%N%S:\
10262${x_library}/X11/%T/%N%S"
10263 if test x"${x_default_search_path}" = x; then
10264 x_default_search_path=${x_search_path}
10265 else
10266 x_default_search_path="${x_search_path}:${x_default_search_path}"
10267 fi
10268 done
10269fi
10270if test "${x_includes}" != NONE && test -n "${x_includes}"; then
10271 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
10272fi
10273
10274if test x"${x_includes}" = x; then
10275 bitmapdir=/usr/include/X11/bitmaps
10276else
10277 # accumulate include directories that have X11 bitmap subdirectories
10278 bmd_acc="dummyval"
10279 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
10280 if test -d "${bmd}/X11/bitmaps"; then
10281 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
10282 fi
10283 if test -d "${bmd}/bitmaps"; then
10284 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
10285 fi
10286 done
10287 if test ${bmd_acc} != "dummyval"; then
10288 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
10289 fi
10290fi
10291
5d6da11e 10292HAVE_CARBON=no
1d4d5604
YM
10293if test "${with_carbon}" != no; then
10294 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
ca81d7a0
JD
10295 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
10296echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
10297if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
10298 echo $ECHO_N "(cached) $ECHO_C" >&6
10299fi
ca81d7a0
JD
10300{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
10301echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
10302else
10303 # Is the header compilable?
ca81d7a0
JD
10304{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
10305echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
10306cat >conftest.$ac_ext <<_ACEOF
10307/* confdefs.h. */
10308_ACEOF
10309cat confdefs.h >>conftest.$ac_ext
10310cat >>conftest.$ac_ext <<_ACEOF
10311/* end confdefs.h. */
10312$ac_includes_default
10313#include <Carbon/Carbon.h>
10314_ACEOF
10315rm -f conftest.$ac_objext
ca81d7a0
JD
10316if { (ac_try="$ac_compile"
10317case "(($ac_try" in
10318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10319 *) ac_try_echo=$ac_try;;
10320esac
10321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10322 (eval "$ac_compile") 2>conftest.er1
5d6da11e 10323 ac_status=$?
edfaf76d
LK
10324 grep -v '^ *+' conftest.er1 >conftest.err
10325 rm -f conftest.er1
10326 cat conftest.err >&5
5d6da11e
YM
10327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10328 (exit $ac_status); } &&
ca81d7a0
JD
10329 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10330 { (case "(($ac_try" in
10331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10332 *) ac_try_echo=$ac_try;;
10333esac
10334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10335 (eval "$ac_try") 2>&5
edfaf76d
LK
10336 ac_status=$?
10337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10338 (exit $ac_status); }; } &&
10339 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
10340 { (case "(($ac_try" in
10341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10342 *) ac_try_echo=$ac_try;;
10343esac
10344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10345 (eval "$ac_try") 2>&5
5d6da11e
YM
10346 ac_status=$?
10347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10348 (exit $ac_status); }; }; then
10349 ac_header_compiler=yes
10350else
10351 echo "$as_me: failed program was:" >&5
10352sed 's/^/| /' conftest.$ac_ext >&5
10353
ca81d7a0 10354 ac_header_compiler=no
5d6da11e 10355fi
ca81d7a0
JD
10356
10357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10358{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10359echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
10360
10361# Is the header present?
ca81d7a0
JD
10362{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
10363echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
10364cat >conftest.$ac_ext <<_ACEOF
10365/* confdefs.h. */
10366_ACEOF
10367cat confdefs.h >>conftest.$ac_ext
10368cat >>conftest.$ac_ext <<_ACEOF
10369/* end confdefs.h. */
10370#include <Carbon/Carbon.h>
10371_ACEOF
ca81d7a0
JD
10372if { (ac_try="$ac_cpp conftest.$ac_ext"
10373case "(($ac_try" in
10374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10375 *) ac_try_echo=$ac_try;;
10376esac
10377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10378 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
10379 ac_status=$?
10380 grep -v '^ *+' conftest.er1 >conftest.err
10381 rm -f conftest.er1
10382 cat conftest.err >&5
10383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10384 (exit $ac_status); } >/dev/null; then
10385 if test -s conftest.err; then
10386 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 10387 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5d6da11e
YM
10388 else
10389 ac_cpp_err=
10390 fi
10391else
10392 ac_cpp_err=yes
10393fi
10394if test -z "$ac_cpp_err"; then
10395 ac_header_preproc=yes
10396else
10397 echo "$as_me: failed program was:" >&5
10398sed 's/^/| /' conftest.$ac_ext >&5
10399
10400 ac_header_preproc=no
10401fi
ca81d7a0 10402
5d6da11e 10403rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
10404{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10405echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
10406
10407# So? What about this header?
edfaf76d
LK
10408case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10409 yes:no: )
5d6da11e
YM
10410 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
10411echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
10412 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
10413echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
10414 ac_header_preproc=yes
5d6da11e 10415 ;;
edfaf76d 10416 no:yes:* )
5d6da11e
YM
10417 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
10418echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
10419 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
10420echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
10421 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
10422echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
10423 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
10424echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
10425 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
10426echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
10427 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
10428echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 10429
5d6da11e
YM
10430 ;;
10431esac
ca81d7a0
JD
10432{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
10433echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
10434if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
10435 echo $ECHO_N "(cached) $ECHO_C" >&6
10436else
10437 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
10438fi
ca81d7a0
JD
10439{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
10440echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
10441
10442fi
10443if test $ac_cv_header_Carbon_Carbon_h = yes; then
10444 HAVE_CARBON=yes
10445fi
10446
10447
1d4d5604
YM
10448fi
10449if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
10450 if test "${with_carbon+set}" != set \
10451 && test "${carbon_appdir_x+set}" != set; then
ec8fcb10
YM
10452 for var in with_x with_x_toolkit with_gtk with_xim \
10453 with_xpm with_jpeg with_tiff with_gif with_png; do
10454 if eval test \"\${$var+set}\" = set; then
10455 HAVE_CARBON=no
10456 break
10457 fi
10458 done
5d6da11e
YM
10459 fi
10460fi
1d4d5604
YM
10461if test "${HAVE_CARBON}" = yes; then
10462 window_system=mac
10463fi
10464
10465case "${window_system}" in
10466 x11 )
10467 HAVE_X_WINDOWS=yes
10468 HAVE_X11=yes
10469 case "${with_x_toolkit}" in
10470 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
10471 motif ) USE_X_TOOLKIT=MOTIF ;;
10472 gtk ) with_gtk=yes
10473 USE_X_TOOLKIT=none ;;
10474 no ) USE_X_TOOLKIT=none ;;
10475 * ) USE_X_TOOLKIT=maybe ;;
10476 esac
10477 ;;
10478 mac | none )
10479 HAVE_X_WINDOWS=no
10480 HAVE_X11=no
10481 USE_X_TOOLKIT=none
10482 ;;
10483esac
10484
10485### If we're using X11, we should use the X menu package.
10486HAVE_MENUS=no
10487case ${HAVE_X11} in
10488 yes ) HAVE_MENUS=yes ;;
10489esac
10490
10491if test "${opsys}" = "hpux9"; then
10492 case "${x_libraries}" in
10493 *X11R4* )
10494 opsysfile="s/hpux9-x11r4.h"
10495 ;;
10496 esac
10497fi
10498
10499if test "${opsys}" = "hpux9shr"; then
10500 case "${x_libraries}" in
10501 *X11R4* )
10502 opsysfile="s/hpux9shxr4.h"
10503 ;;
10504 esac
10505fi
5d6da11e 10506
98418dba
CW
10507### Compute the unexec source name from the object name.
10508UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
10509
10510# Do the opsystem or machine files prohibit the use of the GNU malloc?
10511# Assume not, until told otherwise.
10512GNU_MALLOC=yes
10513doug_lea_malloc=yes
ca81d7a0
JD
10514{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
10515echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
10516if test "${ac_cv_func_malloc_get_state+set}" = set; then
10517 echo $ECHO_N "(cached) $ECHO_C" >&6
10518else
10519 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10520/* confdefs.h. */
10521_ACEOF
10522cat confdefs.h >>conftest.$ac_ext
10523cat >>conftest.$ac_ext <<_ACEOF
10524/* end confdefs.h. */
edfaf76d
LK
10525/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
10526 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10527#define malloc_get_state innocuous_malloc_get_state
10528
98418dba 10529/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10530 which can conflict with char malloc_get_state (); below.
10531 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10532 <limits.h> exists even on freestanding compilers. */
edfaf76d 10533
19650fd6
AS
10534#ifdef __STDC__
10535# include <limits.h>
10536#else
10537# include <assert.h>
10538#endif
edfaf76d
LK
10539
10540#undef malloc_get_state
10541
ca81d7a0
JD
10542/* Override any GCC internal prototype to avoid an error.
10543 Use char because int might match the return type of a GCC
10544 builtin and then its argument prototype would still apply. */
98418dba
CW
10545#ifdef __cplusplus
10546extern "C"
10547#endif
98418dba 10548char malloc_get_state ();
98418dba
CW
10549/* The GNU C library defines this for functions which it implements
10550 to always fail with ENOSYS. Some functions are actually named
10551 something starting with __ and the normal name is an alias. */
ca81d7a0 10552#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 10553choke me
98418dba
CW
10554#endif
10555
19650fd6
AS
10556int
10557main ()
10558{
ca81d7a0 10559return malloc_get_state ();
98418dba
CW
10560 ;
10561 return 0;
10562}
10563_ACEOF
10564rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10565if { (ac_try="$ac_link"
10566case "(($ac_try" in
10567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10568 *) ac_try_echo=$ac_try;;
10569esac
10570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10571 (eval "$ac_link") 2>conftest.er1
98418dba 10572 ac_status=$?
edfaf76d
LK
10573 grep -v '^ *+' conftest.er1 >conftest.err
10574 rm -f conftest.er1
10575 cat conftest.err >&5
c0d27fcc 10576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10577 (exit $ac_status); } &&
ca81d7a0
JD
10578 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10579 { (case "(($ac_try" in
10580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10581 *) ac_try_echo=$ac_try;;
10582esac
10583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10584 (eval "$ac_try") 2>&5
edfaf76d
LK
10585 ac_status=$?
10586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10587 (exit $ac_status); }; } &&
10588 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
10589 { (case "(($ac_try" in
10590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10591 *) ac_try_echo=$ac_try;;
10592esac
10593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10594 (eval "$ac_try") 2>&5
98418dba 10595 ac_status=$?
c0d27fcc 10596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10597 (exit $ac_status); }; }; then
10598 ac_cv_func_malloc_get_state=yes
10599else
10600 echo "$as_me: failed program was:" >&5
19650fd6
AS
10601sed 's/^/| /' conftest.$ac_ext >&5
10602
ca81d7a0 10603 ac_cv_func_malloc_get_state=no
98418dba 10604fi
ca81d7a0
JD
10605
10606rm -f core conftest.err conftest.$ac_objext \
edfaf76d 10607 conftest$ac_exeext conftest.$ac_ext
98418dba 10608fi
ca81d7a0
JD
10609{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
10610echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
10611if test $ac_cv_func_malloc_get_state = yes; then
10612 :
10613else
10614 doug_lea_malloc=no
10615fi
10616
ca81d7a0
JD
10617{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
10618echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
10619if test "${ac_cv_func_malloc_set_state+set}" = set; then
10620 echo $ECHO_N "(cached) $ECHO_C" >&6
10621else
10622 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10623/* confdefs.h. */
10624_ACEOF
10625cat confdefs.h >>conftest.$ac_ext
10626cat >>conftest.$ac_ext <<_ACEOF
10627/* end confdefs.h. */
edfaf76d
LK
10628/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
10629 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10630#define malloc_set_state innocuous_malloc_set_state
10631
98418dba 10632/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10633 which can conflict with char malloc_set_state (); below.
10634 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10635 <limits.h> exists even on freestanding compilers. */
edfaf76d 10636
19650fd6
AS
10637#ifdef __STDC__
10638# include <limits.h>
10639#else
10640# include <assert.h>
10641#endif
edfaf76d
LK
10642
10643#undef malloc_set_state
10644
ca81d7a0
JD
10645/* Override any GCC internal prototype to avoid an error.
10646 Use char because int might match the return type of a GCC
10647 builtin and then its argument prototype would still apply. */
98418dba
CW
10648#ifdef __cplusplus
10649extern "C"
10650#endif
98418dba 10651char malloc_set_state ();
98418dba
CW
10652/* The GNU C library defines this for functions which it implements
10653 to always fail with ENOSYS. Some functions are actually named
10654 something starting with __ and the normal name is an alias. */
ca81d7a0 10655#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 10656choke me
98418dba
CW
10657#endif
10658
19650fd6
AS
10659int
10660main ()
10661{
ca81d7a0 10662return malloc_set_state ();
98418dba
CW
10663 ;
10664 return 0;
10665}
10666_ACEOF
10667rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10668if { (ac_try="$ac_link"
10669case "(($ac_try" in
10670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10671 *) ac_try_echo=$ac_try;;
10672esac
10673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10674 (eval "$ac_link") 2>conftest.er1
98418dba 10675 ac_status=$?
edfaf76d
LK
10676 grep -v '^ *+' conftest.er1 >conftest.err
10677 rm -f conftest.er1
10678 cat conftest.err >&5
c0d27fcc 10679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10680 (exit $ac_status); } &&
ca81d7a0
JD
10681 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10682 { (case "(($ac_try" in
10683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10684 *) ac_try_echo=$ac_try;;
10685esac
10686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10687 (eval "$ac_try") 2>&5
edfaf76d
LK
10688 ac_status=$?
10689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10690 (exit $ac_status); }; } &&
10691 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
10692 { (case "(($ac_try" in
10693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10694 *) ac_try_echo=$ac_try;;
10695esac
10696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10697 (eval "$ac_try") 2>&5
98418dba 10698 ac_status=$?
c0d27fcc 10699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10700 (exit $ac_status); }; }; then
10701 ac_cv_func_malloc_set_state=yes
10702else
10703 echo "$as_me: failed program was:" >&5
19650fd6
AS
10704sed 's/^/| /' conftest.$ac_ext >&5
10705
ca81d7a0 10706 ac_cv_func_malloc_set_state=no
98418dba 10707fi
ca81d7a0
JD
10708
10709rm -f core conftest.err conftest.$ac_objext \
edfaf76d 10710 conftest$ac_exeext conftest.$ac_ext
98418dba 10711fi
ca81d7a0
JD
10712{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
10713echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
10714if test $ac_cv_func_malloc_set_state = yes; then
10715 :
10716else
10717 doug_lea_malloc=no
10718fi
10719
ca81d7a0
JD
10720{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
10721echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
10722if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
10723 echo $ECHO_N "(cached) $ECHO_C" >&6
10724else
10725 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10726/* confdefs.h. */
10727_ACEOF
10728cat confdefs.h >>conftest.$ac_ext
10729cat >>conftest.$ac_ext <<_ACEOF
10730/* end confdefs.h. */
98418dba 10731extern void (* __after_morecore_hook)();
98418dba
CW
10732int
10733main ()
10734{
10735__after_morecore_hook = 0
10736 ;
10737 return 0;
10738}
10739_ACEOF
10740rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10741if { (ac_try="$ac_link"
10742case "(($ac_try" in
10743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10744 *) ac_try_echo=$ac_try;;
10745esac
10746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10747 (eval "$ac_link") 2>conftest.er1
98418dba 10748 ac_status=$?
edfaf76d
LK
10749 grep -v '^ *+' conftest.er1 >conftest.err
10750 rm -f conftest.er1
10751 cat conftest.err >&5
c0d27fcc 10752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10753 (exit $ac_status); } &&
ca81d7a0
JD
10754 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10755 { (case "(($ac_try" in
10756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10757 *) ac_try_echo=$ac_try;;
10758esac
10759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10760 (eval "$ac_try") 2>&5
edfaf76d
LK
10761 ac_status=$?
10762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10763 (exit $ac_status); }; } &&
10764 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
10765 { (case "(($ac_try" in
10766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10767 *) ac_try_echo=$ac_try;;
10768esac
10769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10770 (eval "$ac_try") 2>&5
98418dba 10771 ac_status=$?
c0d27fcc 10772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10773 (exit $ac_status); }; }; then
10774 emacs_cv_var___after_morecore_hook=yes
10775else
10776 echo "$as_me: failed program was:" >&5
19650fd6
AS
10777sed 's/^/| /' conftest.$ac_ext >&5
10778
ca81d7a0 10779 emacs_cv_var___after_morecore_hook=no
98418dba 10780fi
ca81d7a0
JD
10781
10782rm -f core conftest.err conftest.$ac_objext \
edfaf76d 10783 conftest$ac_exeext conftest.$ac_ext
98418dba 10784fi
ca81d7a0
JD
10785{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
10786echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
10787if test $emacs_cv_var___after_morecore_hook = no; then
10788 doug_lea_malloc=no
10789fi
10790if test "${system_malloc}" = "yes"; then
10791 GNU_MALLOC=no
10792 GNU_MALLOC_reason="
10793 (The GNU allocators don't work with this system configuration.)"
10794fi
10795if test "$doug_lea_malloc" = "yes" ; then
10796 if test "$GNU_MALLOC" = yes ; then
10797 GNU_MALLOC_reason="
10798 (Using Doug Lea's new malloc from the GNU C Library.)"
10799 fi
b936fae4 10800
c0d27fcc 10801cat >>confdefs.h <<\_ACEOF
98418dba 10802#define DOUG_LEA_MALLOC 1
c0d27fcc 10803_ACEOF
98418dba
CW
10804
10805fi
10806
10807if test x"${REL_ALLOC}" = x; then
10808 REL_ALLOC=${GNU_MALLOC}
10809fi
10810
10811
c0d27fcc
MR
10812
10813
10814for ac_header in stdlib.h unistd.h
98418dba
CW
10815do
10816as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
10817if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10818 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10819echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10820if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 10821 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 10822fi
ca81d7a0
JD
10823ac_res=`eval echo '${'$as_ac_Header'}'`
10824 { echo "$as_me:$LINENO: result: $ac_res" >&5
10825echo "${ECHO_T}$ac_res" >&6; }
98418dba 10826else
c0d27fcc 10827 # Is the header compilable?
ca81d7a0
JD
10828{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
10829echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 10830cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10831/* confdefs.h. */
10832_ACEOF
10833cat confdefs.h >>conftest.$ac_ext
10834cat >>conftest.$ac_ext <<_ACEOF
10835/* end confdefs.h. */
98418dba
CW
10836$ac_includes_default
10837#include <$ac_header>
10838_ACEOF
10839rm -f conftest.$ac_objext
ca81d7a0
JD
10840if { (ac_try="$ac_compile"
10841case "(($ac_try" in
10842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10843 *) ac_try_echo=$ac_try;;
10844esac
10845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10846 (eval "$ac_compile") 2>conftest.er1
98418dba 10847 ac_status=$?
edfaf76d
LK
10848 grep -v '^ *+' conftest.er1 >conftest.err
10849 rm -f conftest.er1
10850 cat conftest.err >&5
c0d27fcc 10851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10852 (exit $ac_status); } &&
ca81d7a0
JD
10853 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10854 { (case "(($ac_try" in
10855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10856 *) ac_try_echo=$ac_try;;
10857esac
10858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10859 (eval "$ac_try") 2>&5
edfaf76d
LK
10860 ac_status=$?
10861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10862 (exit $ac_status); }; } &&
10863 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
10864 { (case "(($ac_try" in
10865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10866 *) ac_try_echo=$ac_try;;
10867esac
10868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10869 (eval "$ac_try") 2>&5
98418dba 10870 ac_status=$?
c0d27fcc 10871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10872 (exit $ac_status); }; }; then
c0d27fcc 10873 ac_header_compiler=yes
98418dba
CW
10874else
10875 echo "$as_me: failed program was:" >&5
19650fd6
AS
10876sed 's/^/| /' conftest.$ac_ext >&5
10877
ca81d7a0 10878 ac_header_compiler=no
98418dba 10879fi
ca81d7a0
JD
10880
10881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10882{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10883echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 10884
c0d27fcc 10885# Is the header present?
ca81d7a0
JD
10886{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
10887echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 10888cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10889/* confdefs.h. */
10890_ACEOF
10891cat confdefs.h >>conftest.$ac_ext
10892cat >>conftest.$ac_ext <<_ACEOF
10893/* end confdefs.h. */
98418dba
CW
10894#include <$ac_header>
10895_ACEOF
ca81d7a0
JD
10896if { (ac_try="$ac_cpp conftest.$ac_ext"
10897case "(($ac_try" in
10898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10899 *) ac_try_echo=$ac_try;;
10900esac
10901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10902 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 10903 ac_status=$?
6bae0ccf 10904 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
10905 rm -f conftest.er1
10906 cat conftest.err >&5
c0d27fcc 10907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10908 (exit $ac_status); } >/dev/null; then
10909 if test -s conftest.err; then
10910 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 10911 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
10912 else
10913 ac_cpp_err=
10914 fi
10915else
10916 ac_cpp_err=yes
10917fi
10918if test -z "$ac_cpp_err"; then
c0d27fcc 10919 ac_header_preproc=yes
98418dba
CW
10920else
10921 echo "$as_me: failed program was:" >&5
19650fd6
AS
10922sed 's/^/| /' conftest.$ac_ext >&5
10923
c0d27fcc 10924 ac_header_preproc=no
98418dba 10925fi
ca81d7a0 10926
98418dba 10927rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
10928{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10929echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
10930
10931# So? What about this header?
edfaf76d
LK
10932case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10933 yes:no: )
c0d27fcc
MR
10934 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10935echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
10936 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10937echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10938 ac_header_preproc=yes
10939 ;;
10940 no:yes:* )
10941 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10942echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10943 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10944echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10945 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10946echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10947 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10948echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
10949 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10950echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
10951 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10952echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 10953
19650fd6 10954 ;;
c0d27fcc 10955esac
ca81d7a0
JD
10956{ echo "$as_me:$LINENO: checking for $ac_header" >&5
10957echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10958if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
10959 echo $ECHO_N "(cached) $ECHO_C" >&6
10960else
edfaf76d 10961 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 10962fi
ca81d7a0
JD
10963ac_res=`eval echo '${'$as_ac_Header'}'`
10964 { echo "$as_me:$LINENO: result: $ac_res" >&5
10965echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
10966
10967fi
98418dba 10968if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 10969 cat >>confdefs.h <<_ACEOF
98418dba 10970#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 10971_ACEOF
98418dba
CW
10972
10973fi
c0d27fcc 10974
98418dba
CW
10975done
10976
c0d27fcc 10977
98418dba
CW
10978for ac_func in getpagesize
10979do
10980as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10981{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10982echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10983if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10984 echo $ECHO_N "(cached) $ECHO_C" >&6
10985else
10986 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10987/* confdefs.h. */
10988_ACEOF
10989cat confdefs.h >>conftest.$ac_ext
10990cat >>conftest.$ac_ext <<_ACEOF
10991/* end confdefs.h. */
edfaf76d
LK
10992/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10993 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10994#define $ac_func innocuous_$ac_func
10995
98418dba 10996/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10997 which can conflict with char $ac_func (); below.
10998 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10999 <limits.h> exists even on freestanding compilers. */
edfaf76d 11000
19650fd6
AS
11001#ifdef __STDC__
11002# include <limits.h>
11003#else
11004# include <assert.h>
11005#endif
edfaf76d
LK
11006
11007#undef $ac_func
11008
ca81d7a0
JD
11009/* Override any GCC internal prototype to avoid an error.
11010 Use char because int might match the return type of a GCC
11011 builtin and then its argument prototype would still apply. */
98418dba
CW
11012#ifdef __cplusplus
11013extern "C"
11014#endif
98418dba 11015char $ac_func ();
98418dba
CW
11016/* The GNU C library defines this for functions which it implements
11017 to always fail with ENOSYS. Some functions are actually named
11018 something starting with __ and the normal name is an alias. */
ca81d7a0 11019#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 11020choke me
98418dba
CW
11021#endif
11022
19650fd6
AS
11023int
11024main ()
11025{
ca81d7a0 11026return $ac_func ();
98418dba
CW
11027 ;
11028 return 0;
11029}
11030_ACEOF
11031rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11032if { (ac_try="$ac_link"
11033case "(($ac_try" in
11034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11035 *) ac_try_echo=$ac_try;;
11036esac
11037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11038 (eval "$ac_link") 2>conftest.er1
98418dba 11039 ac_status=$?
edfaf76d
LK
11040 grep -v '^ *+' conftest.er1 >conftest.err
11041 rm -f conftest.er1
11042 cat conftest.err >&5
c0d27fcc 11043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11044 (exit $ac_status); } &&
ca81d7a0
JD
11045 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11046 { (case "(($ac_try" in
11047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11048 *) ac_try_echo=$ac_try;;
11049esac
11050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11051 (eval "$ac_try") 2>&5
edfaf76d
LK
11052 ac_status=$?
11053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11054 (exit $ac_status); }; } &&
11055 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
11056 { (case "(($ac_try" in
11057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11058 *) ac_try_echo=$ac_try;;
11059esac
11060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11061 (eval "$ac_try") 2>&5
98418dba 11062 ac_status=$?
c0d27fcc 11063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11064 (exit $ac_status); }; }; then
11065 eval "$as_ac_var=yes"
11066else
11067 echo "$as_me: failed program was:" >&5
19650fd6
AS
11068sed 's/^/| /' conftest.$ac_ext >&5
11069
ca81d7a0 11070 eval "$as_ac_var=no"
98418dba 11071fi
ca81d7a0
JD
11072
11073rm -f core conftest.err conftest.$ac_objext \
edfaf76d 11074 conftest$ac_exeext conftest.$ac_ext
98418dba 11075fi
ca81d7a0
JD
11076ac_res=`eval echo '${'$as_ac_var'}'`
11077 { echo "$as_me:$LINENO: result: $ac_res" >&5
11078echo "${ECHO_T}$ac_res" >&6; }
98418dba 11079if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11080 cat >>confdefs.h <<_ACEOF
98418dba 11081#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11082_ACEOF
98418dba
CW
11083
11084fi
11085done
11086
ca81d7a0
JD
11087{ echo "$as_me:$LINENO: checking for working mmap" >&5
11088echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
11089if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
11090 echo $ECHO_N "(cached) $ECHO_C" >&6
11091else
11092 if test "$cross_compiling" = yes; then
11093 ac_cv_func_mmap_fixed_mapped=no
11094else
11095 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11096/* confdefs.h. */
11097_ACEOF
11098cat confdefs.h >>conftest.$ac_ext
11099cat >>conftest.$ac_ext <<_ACEOF
11100/* end confdefs.h. */
98418dba 11101$ac_includes_default
c0d27fcc
MR
11102/* malloc might have been renamed as rpl_malloc. */
11103#undef malloc
11104
98418dba
CW
11105/* Thanks to Mike Haertel and Jim Avera for this test.
11106 Here is a matrix of mmap possibilities:
11107 mmap private not fixed
11108 mmap private fixed at somewhere currently unmapped
11109 mmap private fixed at somewhere already mapped
11110 mmap shared not fixed
11111 mmap shared fixed at somewhere currently unmapped
11112 mmap shared fixed at somewhere already mapped
11113 For private mappings, we should verify that changes cannot be read()
11114 back from the file, nor mmap's back from the file at a different
11115 address. (There have been systems where private was not correctly
11116 implemented like the infamous i386 svr4.0, and systems where the
11117 VM page cache was not coherent with the file system buffer cache
11118 like early versions of FreeBSD and possibly contemporary NetBSD.)
11119 For shared mappings, we should conversely verify that changes get
c0d27fcc 11120 propagated back to all the places they're supposed to be.
98418dba
CW
11121
11122 Grep wants private fixed already mapped.
11123 The main things grep needs to know about mmap are:
11124 * does it exist and is it safe to write into the mmap'd area
11125 * how to use it (BSD variants) */
11126
11127#include <fcntl.h>
11128#include <sys/mman.h>
11129
11130#if !STDC_HEADERS && !HAVE_STDLIB_H
11131char *malloc ();
11132#endif
11133
11134/* This mess was copied from the GNU getpagesize.h. */
11135#if !HAVE_GETPAGESIZE
11136/* Assume that all systems that can run configure have sys/param.h. */
11137# if !HAVE_SYS_PARAM_H
11138# define HAVE_SYS_PARAM_H 1
11139# endif
11140
11141# ifdef _SC_PAGESIZE
11142# define getpagesize() sysconf(_SC_PAGESIZE)
11143# else /* no _SC_PAGESIZE */
11144# if HAVE_SYS_PARAM_H
11145# include <sys/param.h>
11146# ifdef EXEC_PAGESIZE
11147# define getpagesize() EXEC_PAGESIZE
11148# else /* no EXEC_PAGESIZE */
11149# ifdef NBPG
11150# define getpagesize() NBPG * CLSIZE
11151# ifndef CLSIZE
11152# define CLSIZE 1
11153# endif /* no CLSIZE */
11154# else /* no NBPG */
11155# ifdef NBPC
11156# define getpagesize() NBPC
11157# else /* no NBPC */
11158# ifdef PAGESIZE
11159# define getpagesize() PAGESIZE
11160# endif /* PAGESIZE */
11161# endif /* no NBPC */
11162# endif /* no NBPG */
11163# endif /* no EXEC_PAGESIZE */
11164# else /* no HAVE_SYS_PARAM_H */
11165# define getpagesize() 8192 /* punt totally */
11166# endif /* no HAVE_SYS_PARAM_H */
11167# endif /* no _SC_PAGESIZE */
11168
11169#endif /* no HAVE_GETPAGESIZE */
11170
11171int
11172main ()
11173{
11174 char *data, *data2, *data3;
11175 int i, pagesize;
11176 int fd;
11177
11178 pagesize = getpagesize ();
11179
11180 /* First, make a file with some known garbage in it. */
11181 data = (char *) malloc (pagesize);
11182 if (!data)
ca81d7a0 11183 return 1;
98418dba
CW
11184 for (i = 0; i < pagesize; ++i)
11185 *(data + i) = rand ();
11186 umask (0);
11187 fd = creat ("conftest.mmap", 0600);
11188 if (fd < 0)
ca81d7a0 11189 return 1;
98418dba 11190 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 11191 return 1;
98418dba
CW
11192 close (fd);
11193
11194 /* Next, try to mmap the file at a fixed address which already has
11195 something else allocated at it. If we can, also make sure that
11196 we see the same garbage. */
11197 fd = open ("conftest.mmap", O_RDWR);
11198 if (fd < 0)
ca81d7a0 11199 return 1;
98418dba
CW
11200 data2 = (char *) malloc (2 * pagesize);
11201 if (!data2)
ca81d7a0
JD
11202 return 1;
11203 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 11204 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 11205 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 11206 return 1;
98418dba
CW
11207 for (i = 0; i < pagesize; ++i)
11208 if (*(data + i) != *(data2 + i))
ca81d7a0 11209 return 1;
98418dba
CW
11210
11211 /* Finally, make sure that changes to the mapped area do not
11212 percolate back to the file as seen by read(). (This is a bug on
11213 some variants of i386 svr4.0.) */
11214 for (i = 0; i < pagesize; ++i)
11215 *(data2 + i) = *(data2 + i) + 1;
11216 data3 = (char *) malloc (pagesize);
11217 if (!data3)
ca81d7a0 11218 return 1;
98418dba 11219 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 11220 return 1;
98418dba
CW
11221 for (i = 0; i < pagesize; ++i)
11222 if (*(data + i) != *(data3 + i))
ca81d7a0 11223 return 1;
98418dba 11224 close (fd);
ca81d7a0 11225 return 0;
98418dba
CW
11226}
11227_ACEOF
11228rm -f conftest$ac_exeext
ca81d7a0
JD
11229if { (ac_try="$ac_link"
11230case "(($ac_try" in
11231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11232 *) ac_try_echo=$ac_try;;
11233esac
11234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11235 (eval "$ac_link") 2>&5
98418dba 11236 ac_status=$?
c0d27fcc 11237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11238 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
11239 { (case "(($ac_try" in
11240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11241 *) ac_try_echo=$ac_try;;
11242esac
11243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11244 (eval "$ac_try") 2>&5
98418dba 11245 ac_status=$?
c0d27fcc 11246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11247 (exit $ac_status); }; }; then
11248 ac_cv_func_mmap_fixed_mapped=yes
11249else
11250 echo "$as_me: program exited with status $ac_status" >&5
11251echo "$as_me: failed program was:" >&5
19650fd6
AS
11252sed 's/^/| /' conftest.$ac_ext >&5
11253
c0d27fcc 11254( exit $ac_status )
98418dba
CW
11255ac_cv_func_mmap_fixed_mapped=no
11256fi
ca81d7a0 11257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 11258fi
ca81d7a0
JD
11259
11260
98418dba 11261fi
ca81d7a0
JD
11262{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
11263echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
11264if test $ac_cv_func_mmap_fixed_mapped = yes; then
11265
c0d27fcc 11266cat >>confdefs.h <<\_ACEOF
98418dba 11267#define HAVE_MMAP 1
c0d27fcc 11268_ACEOF
98418dba
CW
11269
11270fi
11271rm -f conftest.mmap
11272
11273if test $use_mmap_for_buffers = yes; then
11274 REL_ALLOC=no
11275fi
11276
11277LIBS="$libsrc_libs $LIBS"
11278
c0d27fcc 11279
ca81d7a0
JD
11280{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
11281echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
11282if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
11283 echo $ECHO_N "(cached) $ECHO_C" >&6
11284else
11285 ac_check_lib_save_LIBS=$LIBS
11286LIBS="-ldnet $LIBS"
11287cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11288/* confdefs.h. */
11289_ACEOF
11290cat confdefs.h >>conftest.$ac_ext
11291cat >>conftest.$ac_ext <<_ACEOF
11292/* end confdefs.h. */
98418dba 11293
ca81d7a0
JD
11294/* Override any GCC internal prototype to avoid an error.
11295 Use char because int might match the return type of a GCC
11296 builtin and then its argument prototype would still apply. */
98418dba
CW
11297#ifdef __cplusplus
11298extern "C"
11299#endif
98418dba 11300char dnet_ntoa ();
98418dba
CW
11301int
11302main ()
11303{
ca81d7a0 11304return dnet_ntoa ();
98418dba
CW
11305 ;
11306 return 0;
11307}
11308_ACEOF
11309rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11310if { (ac_try="$ac_link"
11311case "(($ac_try" in
11312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11313 *) ac_try_echo=$ac_try;;
11314esac
11315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11316 (eval "$ac_link") 2>conftest.er1
98418dba 11317 ac_status=$?
edfaf76d
LK
11318 grep -v '^ *+' conftest.er1 >conftest.err
11319 rm -f conftest.er1
11320 cat conftest.err >&5
c0d27fcc 11321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11322 (exit $ac_status); } &&
ca81d7a0
JD
11323 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11324 { (case "(($ac_try" in
11325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11326 *) ac_try_echo=$ac_try;;
11327esac
11328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11329 (eval "$ac_try") 2>&5
edfaf76d
LK
11330 ac_status=$?
11331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11332 (exit $ac_status); }; } &&
11333 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
11334 { (case "(($ac_try" in
11335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11336 *) ac_try_echo=$ac_try;;
11337esac
11338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11339 (eval "$ac_try") 2>&5
98418dba 11340 ac_status=$?
c0d27fcc 11341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11342 (exit $ac_status); }; }; then
11343 ac_cv_lib_dnet_dnet_ntoa=yes
11344else
11345 echo "$as_me: failed program was:" >&5
19650fd6
AS
11346sed 's/^/| /' conftest.$ac_ext >&5
11347
ca81d7a0 11348 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 11349fi
ca81d7a0
JD
11350
11351rm -f core conftest.err conftest.$ac_objext \
edfaf76d 11352 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11353LIBS=$ac_check_lib_save_LIBS
11354fi
ca81d7a0
JD
11355{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
11356echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 11357if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 11358 cat >>confdefs.h <<_ACEOF
98418dba 11359#define HAVE_LIBDNET 1
c0d27fcc 11360_ACEOF
98418dba
CW
11361
11362 LIBS="-ldnet $LIBS"
11363
11364fi
11365
c0d27fcc 11366
ca81d7a0
JD
11367{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
11368echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
11369if test "${ac_cv_lib_Xbsd_main+set}" = set; then
11370 echo $ECHO_N "(cached) $ECHO_C" >&6
11371else
11372 ac_check_lib_save_LIBS=$LIBS
11373LIBS="-lXbsd $LIBS"
11374cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11375/* confdefs.h. */
11376_ACEOF
11377cat confdefs.h >>conftest.$ac_ext
11378cat >>conftest.$ac_ext <<_ACEOF
11379/* end confdefs.h. */
98418dba 11380
c0d27fcc 11381
98418dba
CW
11382int
11383main ()
11384{
ca81d7a0 11385return main ();
98418dba
CW
11386 ;
11387 return 0;
11388}
11389_ACEOF
11390rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11391if { (ac_try="$ac_link"
11392case "(($ac_try" in
11393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11394 *) ac_try_echo=$ac_try;;
11395esac
11396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11397 (eval "$ac_link") 2>conftest.er1
98418dba 11398 ac_status=$?
edfaf76d
LK
11399 grep -v '^ *+' conftest.er1 >conftest.err
11400 rm -f conftest.er1
11401 cat conftest.err >&5
c0d27fcc 11402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11403 (exit $ac_status); } &&
ca81d7a0
JD
11404 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11405 { (case "(($ac_try" in
11406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11407 *) ac_try_echo=$ac_try;;
11408esac
11409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11410 (eval "$ac_try") 2>&5
edfaf76d
LK
11411 ac_status=$?
11412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11413 (exit $ac_status); }; } &&
11414 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
11415 { (case "(($ac_try" in
11416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11417 *) ac_try_echo=$ac_try;;
11418esac
11419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11420 (eval "$ac_try") 2>&5
98418dba 11421 ac_status=$?
c0d27fcc 11422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11423 (exit $ac_status); }; }; then
11424 ac_cv_lib_Xbsd_main=yes
11425else
11426 echo "$as_me: failed program was:" >&5
19650fd6
AS
11427sed 's/^/| /' conftest.$ac_ext >&5
11428
ca81d7a0 11429 ac_cv_lib_Xbsd_main=no
98418dba 11430fi
ca81d7a0
JD
11431
11432rm -f core conftest.err conftest.$ac_objext \
edfaf76d 11433 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11434LIBS=$ac_check_lib_save_LIBS
11435fi
ca81d7a0
JD
11436{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
11437echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
11438if test $ac_cv_lib_Xbsd_main = yes; then
11439 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
11440fi
11441
c0d27fcc
MR
11442
11443
ca81d7a0
JD
11444{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
11445echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
11446if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
11447 echo $ECHO_N "(cached) $ECHO_C" >&6
11448else
11449 ac_check_lib_save_LIBS=$LIBS
11450LIBS="-lpthreads $LIBS"
11451cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11452/* confdefs.h. */
11453_ACEOF
11454cat confdefs.h >>conftest.$ac_ext
11455cat >>conftest.$ac_ext <<_ACEOF
11456/* end confdefs.h. */
98418dba 11457
ca81d7a0
JD
11458/* Override any GCC internal prototype to avoid an error.
11459 Use char because int might match the return type of a GCC
11460 builtin and then its argument prototype would still apply. */
98418dba
CW
11461#ifdef __cplusplus
11462extern "C"
11463#endif
98418dba 11464char cma_open ();
98418dba
CW
11465int
11466main ()
11467{
ca81d7a0 11468return cma_open ();
98418dba
CW
11469 ;
11470 return 0;
11471}
11472_ACEOF
11473rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11474if { (ac_try="$ac_link"
11475case "(($ac_try" in
11476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11477 *) ac_try_echo=$ac_try;;
11478esac
11479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11480 (eval "$ac_link") 2>conftest.er1
98418dba 11481 ac_status=$?
edfaf76d
LK
11482 grep -v '^ *+' conftest.er1 >conftest.err
11483 rm -f conftest.er1
11484 cat conftest.err >&5
c0d27fcc 11485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11486 (exit $ac_status); } &&
ca81d7a0
JD
11487 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11488 { (case "(($ac_try" in
11489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11490 *) ac_try_echo=$ac_try;;
11491esac
11492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11493 (eval "$ac_try") 2>&5
edfaf76d
LK
11494 ac_status=$?
11495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11496 (exit $ac_status); }; } &&
11497 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
11498 { (case "(($ac_try" in
11499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11500 *) ac_try_echo=$ac_try;;
11501esac
11502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11503 (eval "$ac_try") 2>&5
98418dba 11504 ac_status=$?
c0d27fcc 11505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11506 (exit $ac_status); }; }; then
11507 ac_cv_lib_pthreads_cma_open=yes
11508else
11509 echo "$as_me: failed program was:" >&5
19650fd6
AS
11510sed 's/^/| /' conftest.$ac_ext >&5
11511
ca81d7a0 11512 ac_cv_lib_pthreads_cma_open=no
98418dba 11513fi
ca81d7a0
JD
11514
11515rm -f core conftest.err conftest.$ac_objext \
edfaf76d 11516 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11517LIBS=$ac_check_lib_save_LIBS
11518fi
ca81d7a0
JD
11519{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
11520echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 11521if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 11522 cat >>confdefs.h <<_ACEOF
98418dba 11523#define HAVE_LIBPTHREADS 1
c0d27fcc 11524_ACEOF
98418dba
CW
11525
11526 LIBS="-lpthreads $LIBS"
11527
11528fi
11529
c0d27fcc 11530
ca81d7a0
JD
11531{ echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
11532echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6; }
98418dba
CW
11533if test -d /usr/X386/include; then
11534 HAVE_XFREE386=yes
11535 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
11536else
11537 HAVE_XFREE386=no
11538fi
ca81d7a0
JD
11539{ echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
11540echo "${ECHO_T}$HAVE_XFREE386" >&6; }
98418dba 11541
55597d70
DL
11542
11543case ${host_os} in
11544aix*)
ca81d7a0
JD
11545 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
11546echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
11547if test "${gdb_cv_bigtoc+set}" = set; then
11548 echo $ECHO_N "(cached) $ECHO_C" >&6
11549else
11550
11551 case $GCC in
11552 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11553 *) gdb_cv_bigtoc=-bbigtoc ;;
11554 esac
11555
11556 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
11557 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11558/* confdefs.h. */
11559_ACEOF
11560cat confdefs.h >>conftest.$ac_ext
11561cat >>conftest.$ac_ext <<_ACEOF
11562/* end confdefs.h. */
55597d70
DL
11563
11564int
11565main ()
11566{
11567int i;
11568 ;
11569 return 0;
11570}
11571_ACEOF
11572rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11573if { (ac_try="$ac_link"
11574case "(($ac_try" in
11575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11576 *) ac_try_echo=$ac_try;;
11577esac
11578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11579 (eval "$ac_link") 2>conftest.er1
55597d70 11580 ac_status=$?
edfaf76d
LK
11581 grep -v '^ *+' conftest.er1 >conftest.err
11582 rm -f conftest.er1
11583 cat conftest.err >&5
55597d70
DL
11584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11585 (exit $ac_status); } &&
ca81d7a0
JD
11586 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11587 { (case "(($ac_try" in
11588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11589 *) ac_try_echo=$ac_try;;
11590esac
11591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11592 (eval "$ac_try") 2>&5
edfaf76d
LK
11593 ac_status=$?
11594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11595 (exit $ac_status); }; } &&
11596 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
11597 { (case "(($ac_try" in
11598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11599 *) ac_try_echo=$ac_try;;
11600esac
11601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11602 (eval "$ac_try") 2>&5
55597d70
DL
11603 ac_status=$?
11604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11605 (exit $ac_status); }; }; then
11606 :
11607else
11608 echo "$as_me: failed program was:" >&5
19650fd6
AS
11609sed 's/^/| /' conftest.$ac_ext >&5
11610
ca81d7a0 11611 gdb_cv_bigtoc=
55597d70 11612fi
ca81d7a0
JD
11613
11614rm -f core conftest.err conftest.$ac_objext \
edfaf76d 11615 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
11616
11617fi
ca81d7a0
JD
11618{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
11619echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
11620 ;;
11621esac
11622
ae1a998c
RS
11623# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
11624# used for the tests that follow. We set them back to REAL_CFLAGS and
11625# REAL_CPPFLAGS later on.
98418dba
CW
11626
11627REAL_CPPFLAGS="$CPPFLAGS"
11628
11629if test "${HAVE_X11}" = "yes"; then
11630 DEFS="$C_SWITCH_X_SITE $DEFS"
11631 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
11632 LIBS="$LIBX $LIBS"
11633 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
11634 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
11635
11636 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
11637 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
11638 # but it's more convenient here to set LD_RUN_PATH
11639 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
11640 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
11641 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
11642 export LD_RUN_PATH
11643 fi
11644
11645 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
11646 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
11647echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 11648 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11649/* confdefs.h. */
11650_ACEOF
11651cat confdefs.h >>conftest.$ac_ext
11652cat >>conftest.$ac_ext <<_ACEOF
11653/* end confdefs.h. */
98418dba 11654
98418dba
CW
11655int
11656main ()
11657{
11658XOpenDisplay ("foo");
11659 ;
11660 return 0;
11661}
11662_ACEOF
11663rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11664if { (ac_try="$ac_link"
11665case "(($ac_try" in
11666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11667 *) ac_try_echo=$ac_try;;
11668esac
11669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11670 (eval "$ac_link") 2>conftest.er1
98418dba 11671 ac_status=$?
edfaf76d
LK
11672 grep -v '^ *+' conftest.er1 >conftest.err
11673 rm -f conftest.er1
11674 cat conftest.err >&5
c0d27fcc 11675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11676 (exit $ac_status); } &&
ca81d7a0
JD
11677 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11678 { (case "(($ac_try" in
11679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11680 *) ac_try_echo=$ac_try;;
11681esac
11682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11683 (eval "$ac_try") 2>&5
edfaf76d
LK
11684 ac_status=$?
11685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11686 (exit $ac_status); }; } &&
11687 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
11688 { (case "(($ac_try" in
11689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11690 *) ac_try_echo=$ac_try;;
11691esac
11692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11693 (eval "$ac_try") 2>&5
35996d22
AS
11694 ac_status=$?
11695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11696 (exit $ac_status); }; }; then
11697 xlinux_first_failure=no
98418dba
CW
11698else
11699 echo "$as_me: failed program was:" >&5
19650fd6
AS
11700sed 's/^/| /' conftest.$ac_ext >&5
11701
ca81d7a0 11702 xlinux_first_failure=yes
98418dba 11703fi
ca81d7a0
JD
11704
11705rm -f core conftest.err conftest.$ac_objext \
edfaf76d 11706 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11707 if test "${xlinux_first_failure}" = "yes"; then
11708 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
11709 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
11710 OLD_CPPFLAGS="$CPPFLAGS"
11711 OLD_LIBS="$LIBS"
11712 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
11713 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
11714 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
11715 LIBS="$LIBS -b i486-linuxaout"
11716 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11717/* confdefs.h. */
11718_ACEOF
11719cat confdefs.h >>conftest.$ac_ext
11720cat >>conftest.$ac_ext <<_ACEOF
11721/* end confdefs.h. */
98418dba 11722
98418dba
CW
11723int
11724main ()
11725{
11726XOpenDisplay ("foo");
11727 ;
11728 return 0;
11729}
11730_ACEOF
11731rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11732if { (ac_try="$ac_link"
11733case "(($ac_try" in
11734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11735 *) ac_try_echo=$ac_try;;
11736esac
11737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11738 (eval "$ac_link") 2>conftest.er1
98418dba 11739 ac_status=$?
edfaf76d
LK
11740 grep -v '^ *+' conftest.er1 >conftest.err
11741 rm -f conftest.er1
11742 cat conftest.err >&5
c0d27fcc 11743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11744 (exit $ac_status); } &&
ca81d7a0
JD
11745 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11746 { (case "(($ac_try" in
11747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11748 *) ac_try_echo=$ac_try;;
11749esac
11750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11751 (eval "$ac_try") 2>&5
edfaf76d
LK
11752 ac_status=$?
11753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11754 (exit $ac_status); }; } &&
11755 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
11756 { (case "(($ac_try" in
11757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11758 *) ac_try_echo=$ac_try;;
11759esac
11760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11761 (eval "$ac_try") 2>&5
98418dba 11762 ac_status=$?
c0d27fcc 11763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11764 (exit $ac_status); }; }; then
11765 xlinux_second_failure=no
11766else
11767 echo "$as_me: failed program was:" >&5
19650fd6
AS
11768sed 's/^/| /' conftest.$ac_ext >&5
11769
ca81d7a0 11770 xlinux_second_failure=yes
98418dba 11771fi
ca81d7a0
JD
11772
11773rm -f core conftest.err conftest.$ac_objext \
edfaf76d 11774 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11775 if test "${xlinux_second_failure}" = "yes"; then
11776 # If we get the same failure with -b, there is no use adding -b.
11777 # So take it out. This plays safe.
11778 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
11779 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
11780 CPPFLAGS="$OLD_CPPFLAGS"
11781 LIBS="$OLD_LIBS"
ca81d7a0
JD
11782 { echo "$as_me:$LINENO: result: no" >&5
11783echo "${ECHO_T}no" >&6; }
98418dba 11784 else
ca81d7a0
JD
11785 { echo "$as_me:$LINENO: result: yes" >&5
11786echo "${ECHO_T}yes" >&6; }
98418dba
CW
11787 fi
11788 else
ca81d7a0
JD
11789 { echo "$as_me:$LINENO: result: no" >&5
11790echo "${ECHO_T}no" >&6; }
98418dba
CW
11791 fi
11792 fi
11793
11794 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
11795 # header files included from there.
ca81d7a0
JD
11796 { echo "$as_me:$LINENO: checking for Xkb" >&5
11797echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 11798 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11799/* confdefs.h. */
11800_ACEOF
11801cat confdefs.h >>conftest.$ac_ext
11802cat >>conftest.$ac_ext <<_ACEOF
11803/* end confdefs.h. */
98418dba
CW
11804#include <X11/Xlib.h>
11805#include <X11/XKBlib.h>
98418dba
CW
11806int
11807main ()
11808{
11809XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
11810 ;
11811 return 0;
11812}
11813_ACEOF
11814rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11815if { (ac_try="$ac_link"
11816case "(($ac_try" in
11817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11818 *) ac_try_echo=$ac_try;;
11819esac
11820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11821 (eval "$ac_link") 2>conftest.er1
98418dba 11822 ac_status=$?
edfaf76d
LK
11823 grep -v '^ *+' conftest.er1 >conftest.err
11824 rm -f conftest.er1
11825 cat conftest.err >&5
c0d27fcc 11826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11827 (exit $ac_status); } &&
ca81d7a0
JD
11828 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11829 { (case "(($ac_try" in
11830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11831 *) ac_try_echo=$ac_try;;
11832esac
11833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11834 (eval "$ac_try") 2>&5
edfaf76d
LK
11835 ac_status=$?
11836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11837 (exit $ac_status); }; } &&
11838 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
11839 { (case "(($ac_try" in
11840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11841 *) ac_try_echo=$ac_try;;
11842esac
11843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11844 (eval "$ac_try") 2>&5
98418dba 11845 ac_status=$?
c0d27fcc 11846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11847 (exit $ac_status); }; }; then
11848 emacs_xkb=yes
11849else
11850 echo "$as_me: failed program was:" >&5
19650fd6
AS
11851sed 's/^/| /' conftest.$ac_ext >&5
11852
ca81d7a0 11853 emacs_xkb=no
98418dba 11854fi
ca81d7a0
JD
11855
11856rm -f core conftest.err conftest.$ac_objext \
edfaf76d 11857 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
11858 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
11859echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 11860 if test $emacs_xkb = yes; then
b936fae4 11861
c0d27fcc 11862cat >>confdefs.h <<\_ACEOF
98418dba 11863#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 11864_ACEOF
98418dba
CW
11865
11866 fi
11867
c0d27fcc
MR
11868
11869
11870
11871
98418dba
CW
11872for ac_func in XrmSetDatabase XScreenResourceString \
11873XScreenNumberOfScreen XSetWMProtocols
11874do
11875as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11876{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11877echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11878if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
11879 echo $ECHO_N "(cached) $ECHO_C" >&6
11880else
11881 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11882/* confdefs.h. */
11883_ACEOF
11884cat confdefs.h >>conftest.$ac_ext
11885cat >>conftest.$ac_ext <<_ACEOF
11886/* end confdefs.h. */
edfaf76d
LK
11887/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11888 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11889#define $ac_func innocuous_$ac_func
11890
98418dba 11891/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
11892 which can conflict with char $ac_func (); below.
11893 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11894 <limits.h> exists even on freestanding compilers. */
edfaf76d 11895
19650fd6
AS
11896#ifdef __STDC__
11897# include <limits.h>
11898#else
11899# include <assert.h>
11900#endif
edfaf76d
LK
11901
11902#undef $ac_func
11903
ca81d7a0
JD
11904/* Override any GCC internal prototype to avoid an error.
11905 Use char because int might match the return type of a GCC
11906 builtin and then its argument prototype would still apply. */
98418dba
CW
11907#ifdef __cplusplus
11908extern "C"
11909#endif
98418dba 11910char $ac_func ();
98418dba
CW
11911/* The GNU C library defines this for functions which it implements
11912 to always fail with ENOSYS. Some functions are actually named
11913 something starting with __ and the normal name is an alias. */
ca81d7a0 11914#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 11915choke me
98418dba
CW
11916#endif
11917
19650fd6
AS
11918int
11919main ()
11920{
ca81d7a0 11921return $ac_func ();
98418dba
CW
11922 ;
11923 return 0;
11924}
11925_ACEOF
11926rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11927if { (ac_try="$ac_link"
11928case "(($ac_try" in
11929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11930 *) ac_try_echo=$ac_try;;
11931esac
11932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11933 (eval "$ac_link") 2>conftest.er1
98418dba 11934 ac_status=$?
edfaf76d
LK
11935 grep -v '^ *+' conftest.er1 >conftest.err
11936 rm -f conftest.er1
11937 cat conftest.err >&5
c0d27fcc 11938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11939 (exit $ac_status); } &&
ca81d7a0
JD
11940 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11941 { (case "(($ac_try" in
11942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11943 *) ac_try_echo=$ac_try;;
11944esac
11945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11946 (eval "$ac_try") 2>&5
edfaf76d
LK
11947 ac_status=$?
11948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11949 (exit $ac_status); }; } &&
11950 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
11951 { (case "(($ac_try" in
11952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11953 *) ac_try_echo=$ac_try;;
11954esac
11955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11956 (eval "$ac_try") 2>&5
98418dba 11957 ac_status=$?
c0d27fcc 11958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11959 (exit $ac_status); }; }; then
11960 eval "$as_ac_var=yes"
11961else
11962 echo "$as_me: failed program was:" >&5
19650fd6
AS
11963sed 's/^/| /' conftest.$ac_ext >&5
11964
ca81d7a0 11965 eval "$as_ac_var=no"
98418dba 11966fi
ca81d7a0
JD
11967
11968rm -f core conftest.err conftest.$ac_objext \
edfaf76d 11969 conftest$ac_exeext conftest.$ac_ext
98418dba 11970fi
ca81d7a0
JD
11971ac_res=`eval echo '${'$as_ac_var'}'`
11972 { echo "$as_me:$LINENO: result: $ac_res" >&5
11973echo "${ECHO_T}$ac_res" >&6; }
98418dba 11974if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11975 cat >>confdefs.h <<_ACEOF
98418dba 11976#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11977_ACEOF
98418dba
CW
11978
11979fi
11980done
11981
11982fi
11983
11984if test "${window_system}" = "x11"; then
ca81d7a0
JD
11985 { echo "$as_me:$LINENO: checking X11 version 6" >&5
11986echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
11987 if test "${emacs_cv_x11_version_6+set}" = set; then
11988 echo $ECHO_N "(cached) $ECHO_C" >&6
11989else
11990 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11991/* confdefs.h. */
11992_ACEOF
11993cat confdefs.h >>conftest.$ac_ext
11994cat >>conftest.$ac_ext <<_ACEOF
11995/* end confdefs.h. */
98418dba 11996#include <X11/Xlib.h>
98418dba
CW
11997int
11998main ()
11999{
12000#if XlibSpecificationRelease < 6
12001fail;
12002#endif
12003
12004 ;
12005 return 0;
12006}
12007_ACEOF
12008rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12009if { (ac_try="$ac_link"
12010case "(($ac_try" in
12011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12012 *) ac_try_echo=$ac_try;;
12013esac
12014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12015 (eval "$ac_link") 2>conftest.er1
98418dba 12016 ac_status=$?
edfaf76d
LK
12017 grep -v '^ *+' conftest.er1 >conftest.err
12018 rm -f conftest.er1
12019 cat conftest.err >&5
c0d27fcc 12020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12021 (exit $ac_status); } &&
ca81d7a0
JD
12022 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12023 { (case "(($ac_try" in
12024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12025 *) ac_try_echo=$ac_try;;
12026esac
12027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12028 (eval "$ac_try") 2>&5
edfaf76d
LK
12029 ac_status=$?
12030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12031 (exit $ac_status); }; } &&
12032 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
12033 { (case "(($ac_try" in
12034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12035 *) ac_try_echo=$ac_try;;
12036esac
12037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12038 (eval "$ac_try") 2>&5
98418dba 12039 ac_status=$?
c0d27fcc 12040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12041 (exit $ac_status); }; }; then
12042 emacs_cv_x11_version_6=yes
12043else
12044 echo "$as_me: failed program was:" >&5
19650fd6
AS
12045sed 's/^/| /' conftest.$ac_ext >&5
12046
ca81d7a0 12047 emacs_cv_x11_version_6=no
98418dba 12048fi
ca81d7a0
JD
12049
12050rm -f core conftest.err conftest.$ac_objext \
edfaf76d 12051 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12052fi
12053
12054 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
12055 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12056echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12057
c0d27fcc 12058cat >>confdefs.h <<\_ACEOF
98418dba 12059#define HAVE_X11R6 1
c0d27fcc 12060_ACEOF
98418dba
CW
12061
12062 else
ca81d7a0
JD
12063 { echo "$as_me:$LINENO: result: before 6" >&5
12064echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12065 fi
12066fi
12067
12068if test "${window_system}" = "x11"; then
ca81d7a0
JD
12069 { echo "$as_me:$LINENO: checking X11 version 5" >&5
12070echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6; }
98418dba
CW
12071 if test "${emacs_cv_x11_version_5+set}" = set; then
12072 echo $ECHO_N "(cached) $ECHO_C" >&6
12073else
12074 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12075/* confdefs.h. */
12076_ACEOF
12077cat confdefs.h >>conftest.$ac_ext
12078cat >>conftest.$ac_ext <<_ACEOF
12079/* end confdefs.h. */
98418dba 12080#include <X11/Xlib.h>
98418dba
CW
12081int
12082main ()
12083{
12084#if XlibSpecificationRelease < 5
12085fail;
12086#endif
12087
12088 ;
12089 return 0;
12090}
12091_ACEOF
12092rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12093if { (ac_try="$ac_link"
12094case "(($ac_try" in
12095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12096 *) ac_try_echo=$ac_try;;
12097esac
12098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12099 (eval "$ac_link") 2>conftest.er1
98418dba 12100 ac_status=$?
edfaf76d
LK
12101 grep -v '^ *+' conftest.er1 >conftest.err
12102 rm -f conftest.er1
12103 cat conftest.err >&5
c0d27fcc 12104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12105 (exit $ac_status); } &&
ca81d7a0
JD
12106 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12107 { (case "(($ac_try" in
12108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12109 *) ac_try_echo=$ac_try;;
12110esac
12111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12112 (eval "$ac_try") 2>&5
edfaf76d
LK
12113 ac_status=$?
12114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12115 (exit $ac_status); }; } &&
12116 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
12117 { (case "(($ac_try" in
12118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12119 *) ac_try_echo=$ac_try;;
12120esac
12121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12122 (eval "$ac_try") 2>&5
98418dba 12123 ac_status=$?
c0d27fcc 12124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12125 (exit $ac_status); }; }; then
12126 emacs_cv_x11_version_5=yes
12127else
12128 echo "$as_me: failed program was:" >&5
19650fd6
AS
12129sed 's/^/| /' conftest.$ac_ext >&5
12130
ca81d7a0 12131 emacs_cv_x11_version_5=no
98418dba 12132fi
ca81d7a0
JD
12133
12134rm -f core conftest.err conftest.$ac_objext \
edfaf76d 12135 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12136fi
12137
12138 if test $emacs_cv_x11_version_5 = yes; then
ca81d7a0
JD
12139 { echo "$as_me:$LINENO: result: 5 or newer" >&5
12140echo "${ECHO_T}5 or newer" >&6; }
98418dba 12141 HAVE_X11R5=yes
b936fae4 12142
c0d27fcc 12143cat >>confdefs.h <<\_ACEOF
98418dba 12144#define HAVE_X11R5 1
c0d27fcc 12145_ACEOF
98418dba
CW
12146
12147 else
12148 HAVE_X11R5=no
ca81d7a0
JD
12149 { echo "$as_me:$LINENO: result: before 5" >&5
12150echo "${ECHO_T}before 5" >&6; }
98418dba
CW
12151 fi
12152fi
12153
488dd4c4 12154HAVE_GTK=no
8eeae1c9
JD
12155if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then
12156 USE_X_TOOLKIT=none
12157fi
488dd4c4 12158if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 12159 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
12160 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
12161echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
12162 { (exit 1); exit 1; }; };
12163 fi
448541bc
JD
12164 GLIB_REQUIRED=2.4
12165 GTK_REQUIRED=2.4
488dd4c4
JD
12166 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
12167
12168 if test "X${with_pkg_config_prog}" != X; then
12169 PKG_CONFIG="${with_pkg_config_prog}"
12170 fi
12171
12172 succeeded=no
12173
12174 if test -z "$PKG_CONFIG"; then
12175 # Extract the first word of "pkg-config", so it can be a program name with args.
12176set dummy pkg-config; ac_word=$2
ca81d7a0
JD
12177{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12178echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
12179if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12180 echo $ECHO_N "(cached) $ECHO_C" >&6
12181else
12182 case $PKG_CONFIG in
12183 [\\/]* | ?:[\\/]*)
12184 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12185 ;;
12186 *)
12187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12188for as_dir in $PATH
12189do
12190 IFS=$as_save_IFS
12191 test -z "$as_dir" && as_dir=.
12192 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 12193 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
12194 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12195 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12196 break 2
12197 fi
12198done
12199done
ca81d7a0 12200IFS=$as_save_IFS
488dd4c4
JD
12201
12202 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12203 ;;
12204esac
12205fi
12206PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 12207if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
12208 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12209echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 12210else
ca81d7a0
JD
12211 { echo "$as_me:$LINENO: result: no" >&5
12212echo "${ECHO_T}no" >&6; }
488dd4c4
JD
12213fi
12214
ca81d7a0 12215
488dd4c4
JD
12216 fi
12217
12218 if test "$PKG_CONFIG" = "no" ; then
439f58ee
JD
12219 { { echo "$as_me:$LINENO: error:
12220 *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >&5
12221echo "$as_me: error:
12222 *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >&2;}
12223 { (exit 1); exit 1; }; }
488dd4c4
JD
12224 else
12225 PKG_CONFIG_MIN_VERSION=0.9.0
12226 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
12227 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
12228echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 12229
67db6aa2 12230 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
12231 { echo "$as_me:$LINENO: result: yes" >&5
12232echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
12233 succeeded=yes
12234
ca81d7a0
JD
12235 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
12236echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
488dd4c4 12237 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
ca81d7a0
JD
12238 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
12239echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 12240
ca81d7a0
JD
12241 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
12242echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
488dd4c4 12243 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
ca81d7a0
JD
12244 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
12245echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 12246 else
ca81d7a0
JD
12247 { echo "$as_me:$LINENO: result: no" >&5
12248echo "${ECHO_T}no" >&6; }
488dd4c4
JD
12249 GTK_CFLAGS=""
12250 GTK_LIBS=""
12251 ## If we have a custom action on failure, don't print errors, but
12252 ## do set a variable so people can do so.
12253 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
12254 echo $GTK_PKG_ERRORS
12255 fi
12256
12257
12258
12259 else
12260 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12261 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12262 fi
12263 fi
12264
12265 if test $succeeded = yes; then
12266 :
12267 else
12268 { { 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
12269echo "$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;}
12270 { (exit 1); exit 1; }; }
12271 fi
12272
12273
12274
12275 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
12276 CFLAGS="$CFLAGS $GTK_CFLAGS"
12277 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 12278 GTK_COMPILES=no
57669b57 12279
8eeae1c9 12280for ac_func in gtk_main
57669b57
JD
12281do
12282as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
12283{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12284echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12285if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
12286 echo $ECHO_N "(cached) $ECHO_C" >&6
12287else
12288 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
12289/* confdefs.h. */
12290_ACEOF
12291cat confdefs.h >>conftest.$ac_ext
12292cat >>conftest.$ac_ext <<_ACEOF
12293/* end confdefs.h. */
edfaf76d
LK
12294/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
12295 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12296#define $ac_func innocuous_$ac_func
12297
57669b57
JD
12298/* System header to define __stub macros and hopefully few prototypes,
12299 which can conflict with char $ac_func (); below.
12300 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12301 <limits.h> exists even on freestanding compilers. */
edfaf76d 12302
57669b57
JD
12303#ifdef __STDC__
12304# include <limits.h>
12305#else
12306# include <assert.h>
12307#endif
edfaf76d
LK
12308
12309#undef $ac_func
12310
ca81d7a0
JD
12311/* Override any GCC internal prototype to avoid an error.
12312 Use char because int might match the return type of a GCC
12313 builtin and then its argument prototype would still apply. */
57669b57
JD
12314#ifdef __cplusplus
12315extern "C"
57669b57 12316#endif
57669b57
JD
12317char $ac_func ();
12318/* The GNU C library defines this for functions which it implements
12319 to always fail with ENOSYS. Some functions are actually named
12320 something starting with __ and the normal name is an alias. */
ca81d7a0 12321#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 12322choke me
57669b57
JD
12323#endif
12324
12325int
12326main ()
12327{
ca81d7a0 12328return $ac_func ();
57669b57
JD
12329 ;
12330 return 0;
12331}
12332_ACEOF
12333rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12334if { (ac_try="$ac_link"
12335case "(($ac_try" in
12336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12337 *) ac_try_echo=$ac_try;;
12338esac
12339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12340 (eval "$ac_link") 2>conftest.er1
57669b57 12341 ac_status=$?
edfaf76d
LK
12342 grep -v '^ *+' conftest.er1 >conftest.err
12343 rm -f conftest.er1
12344 cat conftest.err >&5
57669b57
JD
12345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12346 (exit $ac_status); } &&
ca81d7a0
JD
12347 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12348 { (case "(($ac_try" in
12349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12350 *) ac_try_echo=$ac_try;;
12351esac
12352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12353 (eval "$ac_try") 2>&5
edfaf76d
LK
12354 ac_status=$?
12355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12356 (exit $ac_status); }; } &&
12357 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
12358 { (case "(($ac_try" in
12359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12360 *) ac_try_echo=$ac_try;;
12361esac
12362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12363 (eval "$ac_try") 2>&5
57669b57
JD
12364 ac_status=$?
12365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12366 (exit $ac_status); }; }; then
12367 eval "$as_ac_var=yes"
12368else
12369 echo "$as_me: failed program was:" >&5
12370sed 's/^/| /' conftest.$ac_ext >&5
12371
ca81d7a0 12372 eval "$as_ac_var=no"
57669b57 12373fi
ca81d7a0
JD
12374
12375rm -f core conftest.err conftest.$ac_objext \
edfaf76d 12376 conftest$ac_exeext conftest.$ac_ext
57669b57 12377fi
ca81d7a0
JD
12378ac_res=`eval echo '${'$as_ac_var'}'`
12379 { echo "$as_me:$LINENO: result: $ac_res" >&5
12380echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
12381if test `eval echo '${'$as_ac_var'}'` = yes; then
12382 cat >>confdefs.h <<_ACEOF
12383#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12384_ACEOF
8eeae1c9 12385 GTK_COMPILES=yes
57669b57
JD
12386fi
12387done
12388
8eeae1c9
JD
12389 if test "${GTK_COMPILES}" != "yes"; then
12390 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
12391echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
12392 { (exit 1); exit 1; }; };
12393 fi
12394
12395 HAVE_GTK=yes
57669b57
JD
12396
12397cat >>confdefs.h <<\_ACEOF
8eeae1c9 12398#define HAVE_GTK 1
572a3cc2
JD
12399_ACEOF
12400
8eeae1c9
JD
12401 USE_X_TOOLKIT=none
12402
12403 if test "$with_toolkit_scroll_bars" != no; then
12404 with_toolkit_scroll_bars=yes
572a3cc2 12405 fi
572a3cc2 12406
8eeae1c9
JD
12407 HAVE_GTK_MULTIDISPLAY=no
12408
12409for ac_func in gdk_display_open
572a3cc2
JD
12410do
12411as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
12412{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12413echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12414if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
12415 echo $ECHO_N "(cached) $ECHO_C" >&6
12416else
12417 cat >conftest.$ac_ext <<_ACEOF
12418/* confdefs.h. */
12419_ACEOF
12420cat confdefs.h >>conftest.$ac_ext
12421cat >>conftest.$ac_ext <<_ACEOF
12422/* end confdefs.h. */
edfaf76d
LK
12423/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
12424 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12425#define $ac_func innocuous_$ac_func
12426
572a3cc2
JD
12427/* System header to define __stub macros and hopefully few prototypes,
12428 which can conflict with char $ac_func (); below.
12429 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12430 <limits.h> exists even on freestanding compilers. */
edfaf76d 12431
572a3cc2
JD
12432#ifdef __STDC__
12433# include <limits.h>
12434#else
12435# include <assert.h>
12436#endif
edfaf76d
LK
12437
12438#undef $ac_func
12439
ca81d7a0
JD
12440/* Override any GCC internal prototype to avoid an error.
12441 Use char because int might match the return type of a GCC
12442 builtin and then its argument prototype would still apply. */
572a3cc2
JD
12443#ifdef __cplusplus
12444extern "C"
572a3cc2 12445#endif
572a3cc2
JD
12446char $ac_func ();
12447/* The GNU C library defines this for functions which it implements
12448 to always fail with ENOSYS. Some functions are actually named
12449 something starting with __ and the normal name is an alias. */
ca81d7a0 12450#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 12451choke me
572a3cc2
JD
12452#endif
12453
12454int
12455main ()
12456{
ca81d7a0 12457return $ac_func ();
572a3cc2
JD
12458 ;
12459 return 0;
12460}
12461_ACEOF
12462rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12463if { (ac_try="$ac_link"
12464case "(($ac_try" in
12465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12466 *) ac_try_echo=$ac_try;;
12467esac
12468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12469 (eval "$ac_link") 2>conftest.er1
572a3cc2 12470 ac_status=$?
edfaf76d
LK
12471 grep -v '^ *+' conftest.er1 >conftest.err
12472 rm -f conftest.er1
12473 cat conftest.err >&5
572a3cc2
JD
12474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12475 (exit $ac_status); } &&
ca81d7a0
JD
12476 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12477 { (case "(($ac_try" in
12478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12479 *) ac_try_echo=$ac_try;;
12480esac
12481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12482 (eval "$ac_try") 2>&5
edfaf76d
LK
12483 ac_status=$?
12484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12485 (exit $ac_status); }; } &&
12486 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
12487 { (case "(($ac_try" in
12488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12489 *) ac_try_echo=$ac_try;;
12490esac
12491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12492 (eval "$ac_try") 2>&5
572a3cc2
JD
12493 ac_status=$?
12494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12495 (exit $ac_status); }; }; then
12496 eval "$as_ac_var=yes"
12497else
12498 echo "$as_me: failed program was:" >&5
12499sed 's/^/| /' conftest.$ac_ext >&5
12500
ca81d7a0 12501 eval "$as_ac_var=no"
572a3cc2 12502fi
ca81d7a0
JD
12503
12504rm -f core conftest.err conftest.$ac_objext \
edfaf76d 12505 conftest$ac_exeext conftest.$ac_ext
572a3cc2 12506fi
ca81d7a0
JD
12507ac_res=`eval echo '${'$as_ac_var'}'`
12508 { echo "$as_me:$LINENO: result: $ac_res" >&5
12509echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
12510if test `eval echo '${'$as_ac_var'}'` = yes; then
12511 cat >>confdefs.h <<_ACEOF
12512#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12513_ACEOF
8eeae1c9 12514 HAVE_GTK_MULTIDISPLAY=yes
572a3cc2
JD
12515fi
12516done
12517
8eeae1c9 12518 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
572a3cc2 12519
8eeae1c9
JD
12520cat >>confdefs.h <<\_ACEOF
12521#define HAVE_GTK_MULTIDISPLAY 1
12522_ACEOF
572a3cc2 12523
8eeae1c9
JD
12524 fi
12525 HAVE_GTK_FILE_SELECTION=no
12526
12527for ac_func in gtk_file_selection_new
572a3cc2
JD
12528do
12529as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
12530{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12531echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12532if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
12533 echo $ECHO_N "(cached) $ECHO_C" >&6
12534else
12535 cat >conftest.$ac_ext <<_ACEOF
12536/* confdefs.h. */
12537_ACEOF
12538cat confdefs.h >>conftest.$ac_ext
12539cat >>conftest.$ac_ext <<_ACEOF
12540/* end confdefs.h. */
edfaf76d
LK
12541/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
12542 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12543#define $ac_func innocuous_$ac_func
12544
572a3cc2
JD
12545/* System header to define __stub macros and hopefully few prototypes,
12546 which can conflict with char $ac_func (); below.
12547 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12548 <limits.h> exists even on freestanding compilers. */
edfaf76d 12549
572a3cc2
JD
12550#ifdef __STDC__
12551# include <limits.h>
12552#else
12553# include <assert.h>
12554#endif
edfaf76d
LK
12555
12556#undef $ac_func
12557
ca81d7a0
JD
12558/* Override any GCC internal prototype to avoid an error.
12559 Use char because int might match the return type of a GCC
12560 builtin and then its argument prototype would still apply. */
572a3cc2
JD
12561#ifdef __cplusplus
12562extern "C"
572a3cc2 12563#endif
572a3cc2
JD
12564char $ac_func ();
12565/* The GNU C library defines this for functions which it implements
12566 to always fail with ENOSYS. Some functions are actually named
12567 something starting with __ and the normal name is an alias. */
ca81d7a0 12568#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 12569choke me
572a3cc2
JD
12570#endif
12571
12572int
12573main ()
12574{
ca81d7a0 12575return $ac_func ();
572a3cc2
JD
12576 ;
12577 return 0;
12578}
12579_ACEOF
12580rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12581if { (ac_try="$ac_link"
12582case "(($ac_try" in
12583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12584 *) ac_try_echo=$ac_try;;
12585esac
12586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12587 (eval "$ac_link") 2>conftest.er1
572a3cc2 12588 ac_status=$?
edfaf76d
LK
12589 grep -v '^ *+' conftest.er1 >conftest.err
12590 rm -f conftest.er1
12591 cat conftest.err >&5
572a3cc2
JD
12592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12593 (exit $ac_status); } &&
ca81d7a0
JD
12594 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12595 { (case "(($ac_try" in
12596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12597 *) ac_try_echo=$ac_try;;
12598esac
12599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12600 (eval "$ac_try") 2>&5
edfaf76d
LK
12601 ac_status=$?
12602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12603 (exit $ac_status); }; } &&
12604 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
12605 { (case "(($ac_try" in
12606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12607 *) ac_try_echo=$ac_try;;
12608esac
12609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12610 (eval "$ac_try") 2>&5
572a3cc2
JD
12611 ac_status=$?
12612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12613 (exit $ac_status); }; }; then
12614 eval "$as_ac_var=yes"
12615else
12616 echo "$as_me: failed program was:" >&5
12617sed 's/^/| /' conftest.$ac_ext >&5
12618
ca81d7a0 12619 eval "$as_ac_var=no"
572a3cc2 12620fi
ca81d7a0
JD
12621
12622rm -f core conftest.err conftest.$ac_objext \
edfaf76d 12623 conftest$ac_exeext conftest.$ac_ext
572a3cc2 12624fi
ca81d7a0
JD
12625ac_res=`eval echo '${'$as_ac_var'}'`
12626 { echo "$as_me:$LINENO: result: $ac_res" >&5
12627echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
12628if test `eval echo '${'$as_ac_var'}'` = yes; then
12629 cat >>confdefs.h <<_ACEOF
12630#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12631_ACEOF
8eeae1c9 12632 HAVE_GTK_FILE_SELECTION=yes
572a3cc2
JD
12633fi
12634done
12635
12636
8eeae1c9 12637 HAVE_GTK_FILE_CHOOSER=no
b8bdffbe 12638
8eeae1c9 12639for ac_func in gtk_file_chooser_dialog_new
b8bdffbe 12640do
8eeae1c9 12641as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
12642{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12643echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12644if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe 12645 echo $ECHO_N "(cached) $ECHO_C" >&6
b8bdffbe 12646else
8eeae1c9 12647 cat >conftest.$ac_ext <<_ACEOF
b8bdffbe
JD
12648/* confdefs.h. */
12649_ACEOF
12650cat confdefs.h >>conftest.$ac_ext
12651cat >>conftest.$ac_ext <<_ACEOF
12652/* end confdefs.h. */
8eeae1c9
JD
12653/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
12654 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12655#define $ac_func innocuous_$ac_func
12656
12657/* System header to define __stub macros and hopefully few prototypes,
12658 which can conflict with char $ac_func (); below.
12659 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12660 <limits.h> exists even on freestanding compilers. */
12661
12662#ifdef __STDC__
12663# include <limits.h>
12664#else
12665# include <assert.h>
12666#endif
12667
12668#undef $ac_func
12669
ca81d7a0
JD
12670/* Override any GCC internal prototype to avoid an error.
12671 Use char because int might match the return type of a GCC
12672 builtin and then its argument prototype would still apply. */
8eeae1c9
JD
12673#ifdef __cplusplus
12674extern "C"
12675#endif
12676char $ac_func ();
12677/* The GNU C library defines this for functions which it implements
12678 to always fail with ENOSYS. Some functions are actually named
12679 something starting with __ and the normal name is an alias. */
ca81d7a0 12680#if defined __stub_$ac_func || defined __stub___$ac_func
8eeae1c9
JD
12681choke me
12682#endif
12683
12684int
12685main ()
12686{
ca81d7a0 12687return $ac_func ();
8eeae1c9
JD
12688 ;
12689 return 0;
12690}
12691_ACEOF
12692rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12693if { (ac_try="$ac_link"
12694case "(($ac_try" in
12695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12696 *) ac_try_echo=$ac_try;;
12697esac
12698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12699 (eval "$ac_link") 2>conftest.er1
8eeae1c9
JD
12700 ac_status=$?
12701 grep -v '^ *+' conftest.er1 >conftest.err
12702 rm -f conftest.er1
12703 cat conftest.err >&5
12704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12705 (exit $ac_status); } &&
ca81d7a0
JD
12706 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12707 { (case "(($ac_try" in
12708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12709 *) ac_try_echo=$ac_try;;
12710esac
12711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12712 (eval "$ac_try") 2>&5
8eeae1c9
JD
12713 ac_status=$?
12714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12715 (exit $ac_status); }; } &&
12716 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
12717 { (case "(($ac_try" in
12718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12719 *) ac_try_echo=$ac_try;;
12720esac
12721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12722 (eval "$ac_try") 2>&5
8eeae1c9
JD
12723 ac_status=$?
12724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12725 (exit $ac_status); }; }; then
12726 eval "$as_ac_var=yes"
12727else
12728 echo "$as_me: failed program was:" >&5
12729sed 's/^/| /' conftest.$ac_ext >&5
12730
ca81d7a0 12731 eval "$as_ac_var=no"
8eeae1c9 12732fi
ca81d7a0
JD
12733
12734rm -f core conftest.err conftest.$ac_objext \
8eeae1c9
JD
12735 conftest$ac_exeext conftest.$ac_ext
12736fi
ca81d7a0
JD
12737ac_res=`eval echo '${'$as_ac_var'}'`
12738 { echo "$as_me:$LINENO: result: $ac_res" >&5
12739echo "${ECHO_T}$ac_res" >&6; }
8eeae1c9
JD
12740if test `eval echo '${'$as_ac_var'}'` = yes; then
12741 cat >>confdefs.h <<_ACEOF
12742#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12743_ACEOF
12744 HAVE_GTK_FILE_CHOOSER=yes
12745fi
12746done
12747
12748
12749 if test "$HAVE_GTK_FILE_SELECTION" = yes \
12750 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
12751
12752cat >>confdefs.h <<\_ACEOF
12753#define HAVE_GTK_FILE_BOTH 1
12754_ACEOF
12755
12756 fi
12757
12758 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
12759 HAVE_GTK_AND_PTHREAD=no
12760
12761for ac_header in pthread.h
12762do
12763as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
12764if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12765 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12766echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12767if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8eeae1c9
JD
12768 echo $ECHO_N "(cached) $ECHO_C" >&6
12769fi
ca81d7a0
JD
12770ac_res=`eval echo '${'$as_ac_Header'}'`
12771 { echo "$as_me:$LINENO: result: $ac_res" >&5
12772echo "${ECHO_T}$ac_res" >&6; }
8eeae1c9
JD
12773else
12774 # Is the header compilable?
ca81d7a0
JD
12775{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
12776echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8eeae1c9
JD
12777cat >conftest.$ac_ext <<_ACEOF
12778/* confdefs.h. */
12779_ACEOF
12780cat confdefs.h >>conftest.$ac_ext
12781cat >>conftest.$ac_ext <<_ACEOF
12782/* end confdefs.h. */
12783$ac_includes_default
12784#include <$ac_header>
12785_ACEOF
12786rm -f conftest.$ac_objext
ca81d7a0
JD
12787if { (ac_try="$ac_compile"
12788case "(($ac_try" in
12789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12790 *) ac_try_echo=$ac_try;;
12791esac
12792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12793 (eval "$ac_compile") 2>conftest.er1
8eeae1c9
JD
12794 ac_status=$?
12795 grep -v '^ *+' conftest.er1 >conftest.err
12796 rm -f conftest.er1
edfaf76d 12797 cat conftest.err >&5
b8bdffbe
JD
12798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12799 (exit $ac_status); } &&
ca81d7a0
JD
12800 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12801 { (case "(($ac_try" in
12802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12803 *) ac_try_echo=$ac_try;;
12804esac
12805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12806 (eval "$ac_try") 2>&5
edfaf76d
LK
12807 ac_status=$?
12808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12809 (exit $ac_status); }; } &&
12810 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
12811 { (case "(($ac_try" in
12812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12813 *) ac_try_echo=$ac_try;;
12814esac
12815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12816 (eval "$ac_try") 2>&5
b8bdffbe
JD
12817 ac_status=$?
12818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12819 (exit $ac_status); }; }; then
12820 ac_header_compiler=yes
12821else
12822 echo "$as_me: failed program was:" >&5
12823sed 's/^/| /' conftest.$ac_ext >&5
12824
ca81d7a0 12825 ac_header_compiler=no
b8bdffbe 12826fi
ca81d7a0
JD
12827
12828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12829{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12830echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
12831
12832# Is the header present?
ca81d7a0
JD
12833{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
12834echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
12835cat >conftest.$ac_ext <<_ACEOF
12836/* confdefs.h. */
12837_ACEOF
12838cat confdefs.h >>conftest.$ac_ext
12839cat >>conftest.$ac_ext <<_ACEOF
12840/* end confdefs.h. */
12841#include <$ac_header>
12842_ACEOF
ca81d7a0
JD
12843if { (ac_try="$ac_cpp conftest.$ac_ext"
12844case "(($ac_try" in
12845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12846 *) ac_try_echo=$ac_try;;
12847esac
12848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12849 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
12850 ac_status=$?
12851 grep -v '^ *+' conftest.er1 >conftest.err
12852 rm -f conftest.er1
12853 cat conftest.err >&5
12854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12855 (exit $ac_status); } >/dev/null; then
12856 if test -s conftest.err; then
12857 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12858 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
b8bdffbe
JD
12859 else
12860 ac_cpp_err=
12861 fi
12862else
12863 ac_cpp_err=yes
12864fi
12865if test -z "$ac_cpp_err"; then
12866 ac_header_preproc=yes
12867else
12868 echo "$as_me: failed program was:" >&5
12869sed 's/^/| /' conftest.$ac_ext >&5
12870
12871 ac_header_preproc=no
12872fi
ca81d7a0 12873
b8bdffbe 12874rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
12875{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12876echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
12877
12878# So? What about this header?
edfaf76d
LK
12879case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12880 yes:no: )
b8bdffbe
JD
12881 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12882echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12883 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12884echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12885 ac_header_preproc=yes
b8bdffbe 12886 ;;
edfaf76d 12887 no:yes:* )
b8bdffbe
JD
12888 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12889echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
12890 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12891echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12892 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12893echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12894 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12895echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
12896 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12897echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12898 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12899echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 12900
b8bdffbe
JD
12901 ;;
12902esac
ca81d7a0
JD
12903{ echo "$as_me:$LINENO: checking for $ac_header" >&5
12904echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12905if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
12906 echo $ECHO_N "(cached) $ECHO_C" >&6
12907else
edfaf76d 12908 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 12909fi
ca81d7a0
JD
12910ac_res=`eval echo '${'$as_ac_Header'}'`
12911 { echo "$as_me:$LINENO: result: $ac_res" >&5
12912echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
12913
12914fi
12915if test `eval echo '${'$as_ac_Header'}'` = yes; then
12916 cat >>confdefs.h <<_ACEOF
12917#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12918_ACEOF
12919
12920fi
12921
12922done
12923
12924 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
12925 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
12926echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
12927if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
12928 echo $ECHO_N "(cached) $ECHO_C" >&6
12929else
12930 ac_check_lib_save_LIBS=$LIBS
12931LIBS="-lpthread $LIBS"
12932cat >conftest.$ac_ext <<_ACEOF
12933/* confdefs.h. */
12934_ACEOF
12935cat confdefs.h >>conftest.$ac_ext
12936cat >>conftest.$ac_ext <<_ACEOF
12937/* end confdefs.h. */
12938
ca81d7a0
JD
12939/* Override any GCC internal prototype to avoid an error.
12940 Use char because int might match the return type of a GCC
12941 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
12942#ifdef __cplusplus
12943extern "C"
12944#endif
b8bdffbe
JD
12945char pthread_self ();
12946int
12947main ()
12948{
ca81d7a0 12949return pthread_self ();
b8bdffbe
JD
12950 ;
12951 return 0;
12952}
12953_ACEOF
12954rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12955if { (ac_try="$ac_link"
12956case "(($ac_try" in
12957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12958 *) ac_try_echo=$ac_try;;
12959esac
12960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12961 (eval "$ac_link") 2>conftest.er1
b8bdffbe 12962 ac_status=$?
edfaf76d
LK
12963 grep -v '^ *+' conftest.er1 >conftest.err
12964 rm -f conftest.er1
12965 cat conftest.err >&5
b8bdffbe
JD
12966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12967 (exit $ac_status); } &&
ca81d7a0
JD
12968 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12969 { (case "(($ac_try" in
12970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12971 *) ac_try_echo=$ac_try;;
12972esac
12973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12974 (eval "$ac_try") 2>&5
edfaf76d
LK
12975 ac_status=$?
12976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12977 (exit $ac_status); }; } &&
12978 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
12979 { (case "(($ac_try" in
12980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12981 *) ac_try_echo=$ac_try;;
12982esac
12983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12984 (eval "$ac_try") 2>&5
b8bdffbe
JD
12985 ac_status=$?
12986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12987 (exit $ac_status); }; }; then
12988 ac_cv_lib_pthread_pthread_self=yes
12989else
12990 echo "$as_me: failed program was:" >&5
12991sed 's/^/| /' conftest.$ac_ext >&5
12992
ca81d7a0 12993 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 12994fi
ca81d7a0
JD
12995
12996rm -f core conftest.err conftest.$ac_objext \
edfaf76d 12997 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
12998LIBS=$ac_check_lib_save_LIBS
12999fi
ca81d7a0
JD
13000{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
13001echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
13002if test $ac_cv_lib_pthread_pthread_self = yes; then
13003 HAVE_GTK_AND_PTHREAD=yes
13004fi
13005
13006 fi
13007 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
13008 GTK_LIBS="$GTK_LIBS -lpthread"
13009
13010cat >>confdefs.h <<\_ACEOF
13011#define HAVE_GTK_AND_PTHREAD 1
13012_ACEOF
13013
13014 fi
57669b57 13015 fi
488dd4c4
JD
13016fi
13017
98418dba
CW
13018if test x"${USE_X_TOOLKIT}" = xmaybe; then
13019 if test x"${HAVE_X11R5}" = xyes; then
ca81d7a0
JD
13020 { echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
13021echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6; }
98418dba
CW
13022 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
13023 echo $ECHO_N "(cached) $ECHO_C" >&6
13024else
13025 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13026/* confdefs.h. */
13027_ACEOF
13028cat confdefs.h >>conftest.$ac_ext
13029cat >>conftest.$ac_ext <<_ACEOF
13030/* end confdefs.h. */
98418dba
CW
13031
13032#include <X11/Intrinsic.h>
13033#include <X11/Xaw/Simple.h>
98418dba
CW
13034int
13035main ()
13036{
13037
13038 ;
13039 return 0;
13040}
13041_ACEOF
13042rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13043if { (ac_try="$ac_link"
13044case "(($ac_try" in
13045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13046 *) ac_try_echo=$ac_try;;
13047esac
13048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13049 (eval "$ac_link") 2>conftest.er1
98418dba 13050 ac_status=$?
edfaf76d
LK
13051 grep -v '^ *+' conftest.er1 >conftest.err
13052 rm -f conftest.er1
13053 cat conftest.err >&5
c0d27fcc 13054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13055 (exit $ac_status); } &&
ca81d7a0
JD
13056 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13057 { (case "(($ac_try" in
13058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13059 *) ac_try_echo=$ac_try;;
13060esac
13061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13062 (eval "$ac_try") 2>&5
edfaf76d
LK
13063 ac_status=$?
13064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13065 (exit $ac_status); }; } &&
13066 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
13067 { (case "(($ac_try" in
13068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13069 *) ac_try_echo=$ac_try;;
13070esac
13071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13072 (eval "$ac_try") 2>&5
98418dba 13073 ac_status=$?
c0d27fcc 13074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13075 (exit $ac_status); }; }; then
13076 emacs_cv_x11_version_5_with_xaw=yes
13077else
13078 echo "$as_me: failed program was:" >&5
19650fd6
AS
13079sed 's/^/| /' conftest.$ac_ext >&5
13080
ca81d7a0 13081 emacs_cv_x11_version_5_with_xaw=no
98418dba 13082fi
ca81d7a0
JD
13083
13084rm -f core conftest.err conftest.$ac_objext \
edfaf76d 13085 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13086fi
13087
13088 if test $emacs_cv_x11_version_5_with_xaw = yes; then
ca81d7a0
JD
13089 { echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
13090echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6; }
98418dba
CW
13091 USE_X_TOOLKIT=LUCID
13092 else
ca81d7a0
JD
13093 { echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
13094echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6; }
98418dba
CW
13095 USE_X_TOOLKIT=none
13096 fi
13097 else
13098 USE_X_TOOLKIT=none
13099 fi
13100fi
13101
13102X_TOOLKIT_TYPE=$USE_X_TOOLKIT
13103
13104if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
13105 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
13106echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
13107 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
13108 echo $ECHO_N "(cached) $ECHO_C" >&6
13109else
13110 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13111/* confdefs.h. */
13112_ACEOF
13113cat confdefs.h >>conftest.$ac_ext
13114cat >>conftest.$ac_ext <<_ACEOF
13115/* end confdefs.h. */
98418dba 13116#include <X11/Intrinsic.h>
98418dba
CW
13117int
13118main ()
13119{
13120#if XtSpecificationRelease < 6
13121fail;
13122#endif
13123
13124 ;
13125 return 0;
13126}
13127_ACEOF
13128rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13129if { (ac_try="$ac_link"
13130case "(($ac_try" in
13131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13132 *) ac_try_echo=$ac_try;;
13133esac
13134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13135 (eval "$ac_link") 2>conftest.er1
98418dba 13136 ac_status=$?
edfaf76d
LK
13137 grep -v '^ *+' conftest.er1 >conftest.err
13138 rm -f conftest.er1
13139 cat conftest.err >&5
c0d27fcc 13140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13141 (exit $ac_status); } &&
ca81d7a0
JD
13142 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13143 { (case "(($ac_try" in
13144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13145 *) ac_try_echo=$ac_try;;
13146esac
13147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13148 (eval "$ac_try") 2>&5
edfaf76d
LK
13149 ac_status=$?
13150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13151 (exit $ac_status); }; } &&
13152 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
13153 { (case "(($ac_try" in
13154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13155 *) ac_try_echo=$ac_try;;
13156esac
13157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13158 (eval "$ac_try") 2>&5
98418dba 13159 ac_status=$?
c0d27fcc 13160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13161 (exit $ac_status); }; }; then
13162 emacs_cv_x11_toolkit_version_6=yes
13163else
13164 echo "$as_me: failed program was:" >&5
19650fd6
AS
13165sed 's/^/| /' conftest.$ac_ext >&5
13166
ca81d7a0 13167 emacs_cv_x11_toolkit_version_6=no
98418dba 13168fi
ca81d7a0
JD
13169
13170rm -f core conftest.err conftest.$ac_objext \
edfaf76d 13171 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13172fi
13173
13174 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
13175 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
13176 { echo "$as_me:$LINENO: result: 6 or newer" >&5
13177echo "${ECHO_T}6 or newer" >&6; }
b936fae4 13178
c0d27fcc 13179cat >>confdefs.h <<\_ACEOF
98418dba 13180#define HAVE_X11XTR6 1
c0d27fcc 13181_ACEOF
98418dba
CW
13182
13183 else
ca81d7a0
JD
13184 { echo "$as_me:$LINENO: result: before 6" >&5
13185echo "${ECHO_T}before 6" >&6; }
98418dba
CW
13186 fi
13187
13188 OLDLIBS="$LIBS"
13189 if test x$HAVE_X11XTR6 = xyes; then
13190 LIBS="-lXt -lSM -lICE $LIBS"
13191 else
13192 LIBS="-lXt $LIBS"
13193 fi
13194
ca81d7a0
JD
13195{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
13196echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
13197if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
13198 echo $ECHO_N "(cached) $ECHO_C" >&6
13199else
13200 ac_check_lib_save_LIBS=$LIBS
13201LIBS="-lXmu $LIBS"
13202cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13203/* confdefs.h. */
13204_ACEOF
13205cat confdefs.h >>conftest.$ac_ext
13206cat >>conftest.$ac_ext <<_ACEOF
13207/* end confdefs.h. */
98418dba 13208
ca81d7a0
JD
13209/* Override any GCC internal prototype to avoid an error.
13210 Use char because int might match the return type of a GCC
13211 builtin and then its argument prototype would still apply. */
98418dba
CW
13212#ifdef __cplusplus
13213extern "C"
13214#endif
98418dba 13215char XmuConvertStandardSelection ();
98418dba
CW
13216int
13217main ()
13218{
ca81d7a0 13219return XmuConvertStandardSelection ();
98418dba
CW
13220 ;
13221 return 0;
13222}
13223_ACEOF
13224rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13225if { (ac_try="$ac_link"
13226case "(($ac_try" in
13227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13228 *) ac_try_echo=$ac_try;;
13229esac
13230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13231 (eval "$ac_link") 2>conftest.er1
98418dba 13232 ac_status=$?
edfaf76d
LK
13233 grep -v '^ *+' conftest.er1 >conftest.err
13234 rm -f conftest.er1
13235 cat conftest.err >&5
c0d27fcc 13236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13237 (exit $ac_status); } &&
ca81d7a0
JD
13238 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13239 { (case "(($ac_try" in
13240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13241 *) ac_try_echo=$ac_try;;
13242esac
13243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13244 (eval "$ac_try") 2>&5
edfaf76d
LK
13245 ac_status=$?
13246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13247 (exit $ac_status); }; } &&
13248 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
13249 { (case "(($ac_try" in
13250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13251 *) ac_try_echo=$ac_try;;
13252esac
13253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13254 (eval "$ac_try") 2>&5
98418dba 13255 ac_status=$?
c0d27fcc 13256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13257 (exit $ac_status); }; }; then
13258 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
13259else
13260 echo "$as_me: failed program was:" >&5
19650fd6
AS
13261sed 's/^/| /' conftest.$ac_ext >&5
13262
ca81d7a0 13263 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 13264fi
ca81d7a0
JD
13265
13266rm -f core conftest.err conftest.$ac_objext \
edfaf76d 13267 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13268LIBS=$ac_check_lib_save_LIBS
13269fi
ca81d7a0
JD
13270{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
13271echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 13272if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 13273 cat >>confdefs.h <<_ACEOF
98418dba 13274#define HAVE_LIBXMU 1
c0d27fcc 13275_ACEOF
98418dba
CW
13276
13277 LIBS="-lXmu $LIBS"
13278
13279fi
13280
13281 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
13282fi
13283
13284# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
13285if test "${HAVE_X11}" = "yes"; then
13286 if test "${USE_X_TOOLKIT}" != "none"; then
13287
ca81d7a0
JD
13288{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
13289echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
13290if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
13291 echo $ECHO_N "(cached) $ECHO_C" >&6
13292else
13293 ac_check_lib_save_LIBS=$LIBS
13294LIBS="-lXext $LIBS"
13295cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13296/* confdefs.h. */
13297_ACEOF
13298cat confdefs.h >>conftest.$ac_ext
13299cat >>conftest.$ac_ext <<_ACEOF
13300/* end confdefs.h. */
98418dba 13301
ca81d7a0
JD
13302/* Override any GCC internal prototype to avoid an error.
13303 Use char because int might match the return type of a GCC
13304 builtin and then its argument prototype would still apply. */
98418dba
CW
13305#ifdef __cplusplus
13306extern "C"
13307#endif
98418dba 13308char XShapeQueryExtension ();
98418dba
CW
13309int
13310main ()
13311{
ca81d7a0 13312return XShapeQueryExtension ();
98418dba
CW
13313 ;
13314 return 0;
13315}
13316_ACEOF
13317rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13318if { (ac_try="$ac_link"
13319case "(($ac_try" in
13320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13321 *) ac_try_echo=$ac_try;;
13322esac
13323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13324 (eval "$ac_link") 2>conftest.er1
98418dba 13325 ac_status=$?
edfaf76d
LK
13326 grep -v '^ *+' conftest.er1 >conftest.err
13327 rm -f conftest.er1
13328 cat conftest.err >&5
c0d27fcc 13329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13330 (exit $ac_status); } &&
ca81d7a0
JD
13331 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13332 { (case "(($ac_try" in
13333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13334 *) ac_try_echo=$ac_try;;
13335esac
13336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13337 (eval "$ac_try") 2>&5
edfaf76d
LK
13338 ac_status=$?
13339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13340 (exit $ac_status); }; } &&
13341 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
13342 { (case "(($ac_try" in
13343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13344 *) ac_try_echo=$ac_try;;
13345esac
13346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13347 (eval "$ac_try") 2>&5
98418dba 13348 ac_status=$?
c0d27fcc 13349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13350 (exit $ac_status); }; }; then
13351 ac_cv_lib_Xext_XShapeQueryExtension=yes
13352else
13353 echo "$as_me: failed program was:" >&5
19650fd6
AS
13354sed 's/^/| /' conftest.$ac_ext >&5
13355
ca81d7a0 13356 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 13357fi
ca81d7a0
JD
13358
13359rm -f core conftest.err conftest.$ac_objext \
edfaf76d 13360 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13361LIBS=$ac_check_lib_save_LIBS
13362fi
ca81d7a0
JD
13363{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
13364echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 13365if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 13366 cat >>confdefs.h <<_ACEOF
98418dba 13367#define HAVE_LIBXEXT 1
c0d27fcc 13368_ACEOF
98418dba
CW
13369
13370 LIBS="-lXext $LIBS"
13371
13372fi
13373
13374 fi
13375fi
13376
13377if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
13378 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
13379echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
13380if test "${emacs_cv_motif_version_2_1+set}" = set; then
13381 echo $ECHO_N "(cached) $ECHO_C" >&6
13382else
13383 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13384/* confdefs.h. */
13385_ACEOF
13386cat confdefs.h >>conftest.$ac_ext
13387cat >>conftest.$ac_ext <<_ACEOF
13388/* end confdefs.h. */
98418dba 13389#include <Xm/Xm.h>
98418dba
CW
13390int
13391main ()
13392{
13393#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
13394int x = 5;
13395#else
13396Motif version prior to 2.1.
13397#endif
13398 ;
13399 return 0;
13400}
13401_ACEOF
13402rm -f conftest.$ac_objext
ca81d7a0
JD
13403if { (ac_try="$ac_compile"
13404case "(($ac_try" in
13405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13406 *) ac_try_echo=$ac_try;;
13407esac
13408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13409 (eval "$ac_compile") 2>conftest.er1
98418dba 13410 ac_status=$?
edfaf76d
LK
13411 grep -v '^ *+' conftest.er1 >conftest.err
13412 rm -f conftest.er1
13413 cat conftest.err >&5
c0d27fcc 13414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13415 (exit $ac_status); } &&
ca81d7a0
JD
13416 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13417 { (case "(($ac_try" in
13418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13419 *) ac_try_echo=$ac_try;;
13420esac
13421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13422 (eval "$ac_try") 2>&5
edfaf76d
LK
13423 ac_status=$?
13424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13425 (exit $ac_status); }; } &&
13426 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
13427 { (case "(($ac_try" in
13428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13429 *) ac_try_echo=$ac_try;;
13430esac
13431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13432 (eval "$ac_try") 2>&5
98418dba 13433 ac_status=$?
c0d27fcc 13434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13435 (exit $ac_status); }; }; then
13436 emacs_cv_motif_version_2_1=yes
13437else
13438 echo "$as_me: failed program was:" >&5
19650fd6
AS
13439sed 's/^/| /' conftest.$ac_ext >&5
13440
ca81d7a0 13441 emacs_cv_motif_version_2_1=no
98418dba 13442fi
ca81d7a0
JD
13443
13444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 13445fi
ca81d7a0
JD
13446{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
13447echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
13448 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
13449 if test $emacs_cv_motif_version_2_1 = yes; then
13450 HAVE_LIBXP=no
b936fae4 13451
c0d27fcc 13452cat >>confdefs.h <<\_ACEOF
98418dba 13453#define HAVE_MOTIF_2_1 1
c0d27fcc 13454_ACEOF
98418dba 13455
ca81d7a0
JD
13456 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
13457echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
13458if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
13459 echo $ECHO_N "(cached) $ECHO_C" >&6
13460else
13461 ac_check_lib_save_LIBS=$LIBS
13462LIBS="-lXp $LIBS"
13463cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13464/* confdefs.h. */
13465_ACEOF
13466cat confdefs.h >>conftest.$ac_ext
13467cat >>conftest.$ac_ext <<_ACEOF
13468/* end confdefs.h. */
98418dba 13469
ca81d7a0
JD
13470/* Override any GCC internal prototype to avoid an error.
13471 Use char because int might match the return type of a GCC
13472 builtin and then its argument prototype would still apply. */
98418dba
CW
13473#ifdef __cplusplus
13474extern "C"
13475#endif
98418dba 13476char XpCreateContext ();
98418dba
CW
13477int
13478main ()
13479{
ca81d7a0 13480return XpCreateContext ();
98418dba
CW
13481 ;
13482 return 0;
13483}
13484_ACEOF
13485rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13486if { (ac_try="$ac_link"
13487case "(($ac_try" in
13488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13489 *) ac_try_echo=$ac_try;;
13490esac
13491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13492 (eval "$ac_link") 2>conftest.er1
98418dba 13493 ac_status=$?
edfaf76d
LK
13494 grep -v '^ *+' conftest.er1 >conftest.err
13495 rm -f conftest.er1
13496 cat conftest.err >&5
c0d27fcc 13497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13498 (exit $ac_status); } &&
ca81d7a0
JD
13499 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13500 { (case "(($ac_try" in
13501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13502 *) ac_try_echo=$ac_try;;
13503esac
13504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13505 (eval "$ac_try") 2>&5
edfaf76d
LK
13506 ac_status=$?
13507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13508 (exit $ac_status); }; } &&
13509 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
13510 { (case "(($ac_try" in
13511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13512 *) ac_try_echo=$ac_try;;
13513esac
13514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13515 (eval "$ac_try") 2>&5
98418dba 13516 ac_status=$?
c0d27fcc 13517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13518 (exit $ac_status); }; }; then
13519 ac_cv_lib_Xp_XpCreateContext=yes
13520else
13521 echo "$as_me: failed program was:" >&5
19650fd6
AS
13522sed 's/^/| /' conftest.$ac_ext >&5
13523
ca81d7a0 13524 ac_cv_lib_Xp_XpCreateContext=no
98418dba 13525fi
ca81d7a0
JD
13526
13527rm -f core conftest.err conftest.$ac_objext \
edfaf76d 13528 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13529LIBS=$ac_check_lib_save_LIBS
13530fi
ca81d7a0
JD
13531{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
13532echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
13533if test $ac_cv_lib_Xp_XpCreateContext = yes; then
13534 HAVE_LIBXP=yes
13535fi
503d2be0 13536
98418dba 13537 if test ${HAVE_LIBXP} = yes; then
b936fae4 13538
c0d27fcc 13539cat >>confdefs.h <<\_ACEOF
98418dba 13540#define HAVE_LIBXP 1
c0d27fcc 13541_ACEOF
503d2be0 13542
98418dba 13543 fi
4693dbc9 13544 else
ca81d7a0
JD
13545 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
13546echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
13547if test "${emacs_cv_lesstif+set}" = set; then
13548 echo $ECHO_N "(cached) $ECHO_C" >&6
13549else
13550 # We put this in CFLAGS temporarily to precede other -I options
13551 # that might be in CFLAGS temporarily.
13552 # We put this in CPPFLAGS where it precedes the other -I options.
13553 OLD_CPPFLAGS=$CPPFLAGS
13554 OLD_CFLAGS=$CFLAGS
13555 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
13556 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
13557 cat >conftest.$ac_ext <<_ACEOF
13558/* confdefs.h. */
13559_ACEOF
13560cat confdefs.h >>conftest.$ac_ext
13561cat >>conftest.$ac_ext <<_ACEOF
13562/* end confdefs.h. */
13563#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
13564int
13565main ()
13566{
13567int x = 5;
13568 ;
13569 return 0;
13570}
13571_ACEOF
13572rm -f conftest.$ac_objext
ca81d7a0
JD
13573if { (ac_try="$ac_compile"
13574case "(($ac_try" in
13575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13576 *) ac_try_echo=$ac_try;;
13577esac
13578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13579 (eval "$ac_compile") 2>conftest.er1
4693dbc9 13580 ac_status=$?
edfaf76d
LK
13581 grep -v '^ *+' conftest.er1 >conftest.err
13582 rm -f conftest.er1
13583 cat conftest.err >&5
4693dbc9
SM
13584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13585 (exit $ac_status); } &&
ca81d7a0
JD
13586 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13587 { (case "(($ac_try" in
13588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13589 *) ac_try_echo=$ac_try;;
13590esac
13591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13592 (eval "$ac_try") 2>&5
edfaf76d
LK
13593 ac_status=$?
13594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13595 (exit $ac_status); }; } &&
13596 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
13597 { (case "(($ac_try" in
13598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13599 *) ac_try_echo=$ac_try;;
13600esac
13601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13602 (eval "$ac_try") 2>&5
4693dbc9
SM
13603 ac_status=$?
13604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13605 (exit $ac_status); }; }; then
13606 emacs_cv_lesstif=yes
13607else
13608 echo "$as_me: failed program was:" >&5
13609sed 's/^/| /' conftest.$ac_ext >&5
13610
ca81d7a0 13611 emacs_cv_lesstif=no
4693dbc9 13612fi
ca81d7a0
JD
13613
13614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 13615fi
ca81d7a0
JD
13616{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
13617echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
13618 if test $emacs_cv_lesstif = yes; then
13619 # Make sure this -I option remains in CPPFLAGS after it is set
13620 # back to REAL_CPPFLAGS.
13621 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
13622 # have those other -I options anyway. Ultimately, having this
13623 # directory ultimately in CPPFLAGS will be enough.
13624 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
13625 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
13626 else
13627 CFLAGS=$OLD_CFLAGS
13628 CPPFLAGS=$OLD_CPPFLAGS
13629 fi
98418dba
CW
13630 fi
13631fi
13632
13633### Is -lXaw3d available?
13634HAVE_XAW3D=no
13635if test "${HAVE_X11}" = "yes"; then
7c00e1e9 13636 if test "${USE_X_TOOLKIT}" != "none" && test "${with_toolkit_scroll_bars}" != "no"; then
ca81d7a0
JD
13637 { echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
13638echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6; }
98418dba
CW
13639if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
13640 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 13641else
22044edf 13642 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13643/* confdefs.h. */
13644_ACEOF
13645cat confdefs.h >>conftest.$ac_ext
13646cat >>conftest.$ac_ext <<_ACEOF
13647/* end confdefs.h. */
98418dba 13648#include <X11/Xaw3d/Scrollbar.h>
503d2be0 13649_ACEOF
ca81d7a0
JD
13650if { (ac_try="$ac_cpp conftest.$ac_ext"
13651case "(($ac_try" in
13652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13653 *) ac_try_echo=$ac_try;;
13654esac
13655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13656 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13657 ac_status=$?
6bae0ccf 13658 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13659 rm -f conftest.er1
13660 cat conftest.err >&5
c0d27fcc 13661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13662 (exit $ac_status); } >/dev/null; then
13663 if test -s conftest.err; then
13664 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 13665 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
13666 else
13667 ac_cpp_err=
13668 fi
13669else
13670 ac_cpp_err=yes
13671fi
13672if test -z "$ac_cpp_err"; then
22044edf 13673 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 13674else
503d2be0 13675 echo "$as_me: failed program was:" >&5
19650fd6
AS
13676sed 's/^/| /' conftest.$ac_ext >&5
13677
22044edf 13678 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 13679fi
ca81d7a0 13680
503d2be0 13681rm -f conftest.err conftest.$ac_ext
98418dba 13682fi
ca81d7a0
JD
13683{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
13684echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6; }
98418dba 13685if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
ca81d7a0
JD
13686 { echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
13687echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6; }
98418dba
CW
13688if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
13689 echo $ECHO_N "(cached) $ECHO_C" >&6
13690else
13691 ac_check_lib_save_LIBS=$LIBS
13692LIBS="-lXaw3d $LIBS"
13693cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13694/* confdefs.h. */
13695_ACEOF
13696cat confdefs.h >>conftest.$ac_ext
13697cat >>conftest.$ac_ext <<_ACEOF
13698/* end confdefs.h. */
98418dba 13699
ca81d7a0
JD
13700/* Override any GCC internal prototype to avoid an error.
13701 Use char because int might match the return type of a GCC
13702 builtin and then its argument prototype would still apply. */
98418dba
CW
13703#ifdef __cplusplus
13704extern "C"
13705#endif
98418dba 13706char XawScrollbarSetThumb ();
503d2be0
AS
13707int
13708main ()
13709{
ca81d7a0 13710return XawScrollbarSetThumb ();
503d2be0
AS
13711 ;
13712 return 0;
13713}
13714_ACEOF
13715rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13716if { (ac_try="$ac_link"
13717case "(($ac_try" in
13718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13719 *) ac_try_echo=$ac_try;;
13720esac
13721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13722 (eval "$ac_link") 2>conftest.er1
503d2be0 13723 ac_status=$?
edfaf76d
LK
13724 grep -v '^ *+' conftest.er1 >conftest.err
13725 rm -f conftest.er1
13726 cat conftest.err >&5
c0d27fcc 13727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13728 (exit $ac_status); } &&
ca81d7a0
JD
13729 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13730 { (case "(($ac_try" in
13731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13732 *) ac_try_echo=$ac_try;;
13733esac
13734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13735 (eval "$ac_try") 2>&5
edfaf76d
LK
13736 ac_status=$?
13737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13738 (exit $ac_status); }; } &&
13739 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
13740 { (case "(($ac_try" in
13741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13742 *) ac_try_echo=$ac_try;;
13743esac
13744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13745 (eval "$ac_try") 2>&5
503d2be0 13746 ac_status=$?
c0d27fcc 13747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13748 (exit $ac_status); }; }; then
98418dba 13749 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 13750else
503d2be0 13751 echo "$as_me: failed program was:" >&5
19650fd6
AS
13752sed 's/^/| /' conftest.$ac_ext >&5
13753
ca81d7a0 13754 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 13755fi
ca81d7a0
JD
13756
13757rm -f core conftest.err conftest.$ac_objext \
edfaf76d 13758 conftest$ac_exeext conftest.$ac_ext
98418dba 13759LIBS=$ac_check_lib_save_LIBS
ba4481b5 13760fi
ca81d7a0
JD
13761{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
13762echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
98418dba
CW
13763if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
13764 HAVE_XAW3D=yes
ba4481b5 13765fi
503d2be0 13766
ba4481b5
DL
13767fi
13768
c0d27fcc 13769
98418dba 13770 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 13771
c0d27fcc 13772cat >>confdefs.h <<\_ACEOF
98418dba 13773#define HAVE_XAW3D 1
c0d27fcc 13774_ACEOF
98418dba 13775
ba4481b5 13776 fi
98418dba 13777 fi
ba4481b5
DL
13778fi
13779
c0d27fcc
MR
13780
13781
98418dba
CW
13782USE_TOOLKIT_SCROLL_BARS=no
13783if test "${with_toolkit_scroll_bars}" != "no"; then
13784 if test "${USE_X_TOOLKIT}" != "none"; then
13785 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 13786 cat >>confdefs.h <<\_ACEOF
98418dba 13787#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 13788_ACEOF
98418dba
CW
13789
13790 HAVE_XAW3D=no
13791 USE_TOOLKIT_SCROLL_BARS=yes
13792 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 13793 cat >>confdefs.h <<\_ACEOF
98418dba 13794#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 13795_ACEOF
98418dba
CW
13796
13797 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 13798 fi
488dd4c4
JD
13799 elif test "${HAVE_GTK}" = "yes"; then
13800 cat >>confdefs.h <<\_ACEOF
13801#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
13802_ACEOF
13803
13804 USE_TOOLKIT_SCROLL_BARS=yes
13805 elif test "${HAVE_CARBON}" = "yes"; then
13806 cat >>confdefs.h <<\_ACEOF
13807#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
13808_ACEOF
13809
13810 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
13811 fi
13812fi
13813
abd39b57 13814cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
13815/* confdefs.h. */
13816_ACEOF
13817cat confdefs.h >>conftest.$ac_ext
13818cat >>conftest.$ac_ext <<_ACEOF
13819/* end confdefs.h. */
13820
13821 #include <X11/Xlib.h>
13822 #include <X11/Xresource.h>
13823int
13824main ()
13825{
13826XIMProc callback;
13827 ;
13828 return 0;
13829}
13830_ACEOF
13831rm -f conftest.$ac_objext
ca81d7a0
JD
13832if { (ac_try="$ac_compile"
13833case "(($ac_try" in
13834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13835 *) ac_try_echo=$ac_try;;
13836esac
13837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13838 (eval "$ac_compile") 2>conftest.er1
abd39b57 13839 ac_status=$?
edfaf76d
LK
13840 grep -v '^ *+' conftest.er1 >conftest.err
13841 rm -f conftest.er1
13842 cat conftest.err >&5
abd39b57
AC
13843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13844 (exit $ac_status); } &&
ca81d7a0
JD
13845 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13846 { (case "(($ac_try" in
13847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13848 *) ac_try_echo=$ac_try;;
13849esac
13850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13851 (eval "$ac_try") 2>&5
edfaf76d
LK
13852 ac_status=$?
13853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13854 (exit $ac_status); }; } &&
13855 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
13856 { (case "(($ac_try" in
13857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13858 *) ac_try_echo=$ac_try;;
13859esac
13860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13861 (eval "$ac_try") 2>&5
abd39b57
AC
13862 ac_status=$?
13863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13864 (exit $ac_status); }; }; then
13865 HAVE_XIM=yes
13866
13867cat >>confdefs.h <<\_ACEOF
13868#define HAVE_XIM 1
13869_ACEOF
13870
13871else
13872 echo "$as_me: failed program was:" >&5
13873sed 's/^/| /' conftest.$ac_ext >&5
13874
ca81d7a0 13875 HAVE_XIM=no
abd39b57 13876fi
ca81d7a0
JD
13877
13878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 13879
c0d27fcc 13880
98418dba 13881if test "${with_xim}" != "no"; then
b936fae4 13882
c0d27fcc 13883cat >>confdefs.h <<\_ACEOF
98418dba 13884#define USE_XIM 1
c0d27fcc 13885_ACEOF
98418dba 13886
793fa0d7 13887fi
abd39b57
AC
13888
13889
13890if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
13891 late_CFLAGS=$CFLAGS
13892 if test "$GCC" = yes; then
13893 CFLAGS="$CFLAGS --pedantic-errors"
13894 fi
cffcede7 13895 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13896/* confdefs.h. */
13897_ACEOF
13898cat confdefs.h >>conftest.$ac_ext
13899cat >>conftest.$ac_ext <<_ACEOF
13900/* end confdefs.h. */
cffcede7
JD
13901
13902#include <X11/Xlib.h>
13903#include <X11/Xresource.h>
13904int
13905main ()
13906{
13907Display *display;
13908XrmDatabase db;
13909char *res_name;
13910char *res_class;
13911XIMProc callback;
13912XPointer *client_data;
849d80cf
DL
13913#ifndef __GNUC__
13914/* If we're not using GCC, it's probably not XFree86, and this is
13915 probably right, but we can't use something like --pedantic-errors. */
13916extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
13917 char*, XIMProc, XPointer*);
13918#endif
cffcede7
JD
13919(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
13920 client_data);
13921 ;
13922 return 0;
13923}
13924_ACEOF
13925rm -f conftest.$ac_objext
ca81d7a0
JD
13926if { (ac_try="$ac_compile"
13927case "(($ac_try" in
13928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13929 *) ac_try_echo=$ac_try;;
13930esac
13931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13932 (eval "$ac_compile") 2>conftest.er1
cffcede7 13933 ac_status=$?
edfaf76d
LK
13934 grep -v '^ *+' conftest.er1 >conftest.err
13935 rm -f conftest.er1
13936 cat conftest.err >&5
cffcede7
JD
13937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13938 (exit $ac_status); } &&
ca81d7a0
JD
13939 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13940 { (case "(($ac_try" in
13941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13942 *) ac_try_echo=$ac_try;;
13943esac
13944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13945 (eval "$ac_try") 2>&5
edfaf76d
LK
13946 ac_status=$?
13947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13948 (exit $ac_status); }; } &&
13949 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
13950 { (case "(($ac_try" in
13951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13952 *) ac_try_echo=$ac_try;;
13953esac
13954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13955 (eval "$ac_try") 2>&5
cffcede7
JD
13956 ac_status=$?
13957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13958 (exit $ac_status); }; }; then
13959 emacs_cv_arg6_star=yes
13960else
13961 echo "$as_me: failed program was:" >&5
19650fd6
AS
13962sed 's/^/| /' conftest.$ac_ext >&5
13963
ca81d7a0 13964
cffcede7 13965fi
ca81d7a0
JD
13966
13967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
13968
13969 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 13970 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
13971#define XRegisterIMInstantiateCallback_arg6 XPointer*
13972_ACEOF
13973
13974 else
f57bd967 13975 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
13976#define XRegisterIMInstantiateCallback_arg6 XPointer
13977_ACEOF
13978
13979 fi
849d80cf 13980 CFLAGS=$late_CFLAGS
98418dba
CW
13981fi
13982
13983### Use -lXpm if available, unless `--with-xpm=no'.
13984HAVE_XPM=no
13985if test "${HAVE_X11}" = "yes"; then
13986 if test "${with_xpm}" != "no"; then
c0d27fcc 13987 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
ca81d7a0
JD
13988 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13989echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
13990if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13991 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13992fi
ca81d7a0
JD
13993{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13994echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 13995else
c0d27fcc 13996 # Is the header compilable?
ca81d7a0
JD
13997{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
13998echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 13999cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14000/* confdefs.h. */
14001_ACEOF
14002cat confdefs.h >>conftest.$ac_ext
14003cat >>conftest.$ac_ext <<_ACEOF
14004/* end confdefs.h. */
c0d27fcc
MR
14005$ac_includes_default
14006#include <X11/xpm.h>
14007_ACEOF
14008rm -f conftest.$ac_objext
ca81d7a0
JD
14009if { (ac_try="$ac_compile"
14010case "(($ac_try" in
14011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14012 *) ac_try_echo=$ac_try;;
14013esac
14014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14015 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14016 ac_status=$?
edfaf76d
LK
14017 grep -v '^ *+' conftest.er1 >conftest.err
14018 rm -f conftest.er1
14019 cat conftest.err >&5
c0d27fcc
MR
14020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14021 (exit $ac_status); } &&
ca81d7a0
JD
14022 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14023 { (case "(($ac_try" in
14024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14025 *) ac_try_echo=$ac_try;;
14026esac
14027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14028 (eval "$ac_try") 2>&5
edfaf76d
LK
14029 ac_status=$?
14030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14031 (exit $ac_status); }; } &&
14032 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
14033 { (case "(($ac_try" in
14034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14035 *) ac_try_echo=$ac_try;;
14036esac
14037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14038 (eval "$ac_try") 2>&5
c0d27fcc
MR
14039 ac_status=$?
14040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14041 (exit $ac_status); }; }; then
14042 ac_header_compiler=yes
14043else
14044 echo "$as_me: failed program was:" >&5
19650fd6
AS
14045sed 's/^/| /' conftest.$ac_ext >&5
14046
ca81d7a0 14047 ac_header_compiler=no
c0d27fcc 14048fi
ca81d7a0
JD
14049
14050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14051{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14052echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14053
14054# Is the header present?
ca81d7a0
JD
14055{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
14056echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 14057cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14058/* confdefs.h. */
14059_ACEOF
14060cat confdefs.h >>conftest.$ac_ext
14061cat >>conftest.$ac_ext <<_ACEOF
14062/* end confdefs.h. */
98418dba
CW
14063#include <X11/xpm.h>
14064_ACEOF
ca81d7a0
JD
14065if { (ac_try="$ac_cpp conftest.$ac_ext"
14066case "(($ac_try" in
14067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14068 *) ac_try_echo=$ac_try;;
14069esac
14070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14071 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14072 ac_status=$?
6bae0ccf 14073 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14074 rm -f conftest.er1
14075 cat conftest.err >&5
c0d27fcc 14076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
14077 (exit $ac_status); } >/dev/null; then
14078 if test -s conftest.err; then
14079 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14080 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
14081 else
14082 ac_cpp_err=
14083 fi
14084else
14085 ac_cpp_err=yes
14086fi
14087if test -z "$ac_cpp_err"; then
c0d27fcc 14088 ac_header_preproc=yes
98418dba
CW
14089else
14090 echo "$as_me: failed program was:" >&5
19650fd6
AS
14091sed 's/^/| /' conftest.$ac_ext >&5
14092
c0d27fcc 14093 ac_header_preproc=no
98418dba 14094fi
ca81d7a0 14095
98418dba 14096rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14097{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14098echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14099
14100# So? What about this header?
edfaf76d
LK
14101case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14102 yes:no: )
c0d27fcc
MR
14103 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14104echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14105 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
14106echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
14107 ac_header_preproc=yes
14108 ;;
14109 no:yes:* )
14110 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
14111echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
14112 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
14113echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
14114 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
14115echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
14116 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
14117echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
14118 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
14119echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14120 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
14121echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14122
19650fd6 14123 ;;
c0d27fcc 14124esac
ca81d7a0
JD
14125{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
14126echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
14127if test "${ac_cv_header_X11_xpm_h+set}" = set; then
14128 echo $ECHO_N "(cached) $ECHO_C" >&6
14129else
14130 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 14131fi
ca81d7a0
JD
14132{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
14133echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
14134
14135fi
98418dba 14136if test $ac_cv_header_X11_xpm_h = yes; then
ca81d7a0
JD
14137 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
14138echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 14139if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 14140 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14141else
98418dba
CW
14142 ac_check_lib_save_LIBS=$LIBS
14143LIBS="-lXpm -lX11 $LIBS"
14144cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14145/* confdefs.h. */
14146_ACEOF
14147cat confdefs.h >>conftest.$ac_ext
14148cat >>conftest.$ac_ext <<_ACEOF
14149/* end confdefs.h. */
98418dba 14150
ca81d7a0
JD
14151/* Override any GCC internal prototype to avoid an error.
14152 Use char because int might match the return type of a GCC
14153 builtin and then its argument prototype would still apply. */
503d2be0
AS
14154#ifdef __cplusplus
14155extern "C"
14156#endif
98418dba 14157char XpmReadFileToPixmap ();
503d2be0
AS
14158int
14159main ()
14160{
ca81d7a0 14161return XpmReadFileToPixmap ();
503d2be0
AS
14162 ;
14163 return 0;
14164}
14165_ACEOF
14166rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14167if { (ac_try="$ac_link"
14168case "(($ac_try" in
14169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14170 *) ac_try_echo=$ac_try;;
14171esac
14172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14173 (eval "$ac_link") 2>conftest.er1
503d2be0 14174 ac_status=$?
edfaf76d
LK
14175 grep -v '^ *+' conftest.er1 >conftest.err
14176 rm -f conftest.er1
14177 cat conftest.err >&5
c0d27fcc 14178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14179 (exit $ac_status); } &&
ca81d7a0
JD
14180 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14181 { (case "(($ac_try" in
14182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14183 *) ac_try_echo=$ac_try;;
14184esac
14185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14186 (eval "$ac_try") 2>&5
edfaf76d
LK
14187 ac_status=$?
14188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14189 (exit $ac_status); }; } &&
14190 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
14191 { (case "(($ac_try" in
14192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14193 *) ac_try_echo=$ac_try;;
14194esac
14195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14196 (eval "$ac_try") 2>&5
503d2be0 14197 ac_status=$?
c0d27fcc 14198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14199 (exit $ac_status); }; }; then
98418dba 14200 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
14201else
14202 echo "$as_me: failed program was:" >&5
19650fd6
AS
14203sed 's/^/| /' conftest.$ac_ext >&5
14204
ca81d7a0 14205 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 14206fi
ca81d7a0
JD
14207
14208rm -f core conftest.err conftest.$ac_objext \
edfaf76d 14209 conftest$ac_exeext conftest.$ac_ext
98418dba 14210LIBS=$ac_check_lib_save_LIBS
503d2be0 14211fi
ca81d7a0
JD
14212{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
14213echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
14214if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
14215 HAVE_XPM=yes
ba4481b5
DL
14216fi
14217
98418dba
CW
14218fi
14219
c0d27fcc 14220
98418dba 14221 if test "${HAVE_XPM}" = "yes"; then
ca81d7a0
JD
14222 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
14223echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 14224 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14225/* confdefs.h. */
14226_ACEOF
14227cat confdefs.h >>conftest.$ac_ext
14228cat >>conftest.$ac_ext <<_ACEOF
14229/* end confdefs.h. */
98418dba
CW
14230#include "X11/xpm.h"
14231#ifndef XpmReturnAllocPixels
14232no_return_alloc_pixels
503d2be0 14233#endif
ba4481b5 14234
98418dba
CW
14235_ACEOF
14236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 14237 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
14238 HAVE_XPM=no
14239else
14240 HAVE_XPM=yes
14241fi
14242rm -f conftest*
ba4481b5 14243
c0d27fcc 14244
98418dba 14245 if test "${HAVE_XPM}" = "yes"; then
ca81d7a0
JD
14246 { echo "$as_me:$LINENO: result: yes" >&5
14247echo "${ECHO_T}yes" >&6; }
98418dba 14248 else
ca81d7a0
JD
14249 { echo "$as_me:$LINENO: result: no" >&5
14250echo "${ECHO_T}no" >&6; }
98418dba
CW
14251 fi
14252 fi
14253 fi
14254
14255 if test "${HAVE_XPM}" = "yes"; then
b936fae4 14256
c0d27fcc 14257cat >>confdefs.h <<\_ACEOF
98418dba 14258#define HAVE_XPM 1
c0d27fcc 14259_ACEOF
98418dba
CW
14260
14261 fi
14262fi
14263
14264### Use -ljpeg if available, unless `--with-jpeg=no'.
14265HAVE_JPEG=no
14266if test "${HAVE_X11}" = "yes"; then
14267 if test "${with_jpeg}" != "no"; then
c0d27fcc 14268 if test "${ac_cv_header_jerror_h+set}" = set; then
ca81d7a0
JD
14269 { echo "$as_me:$LINENO: checking for jerror.h" >&5
14270echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
14271if test "${ac_cv_header_jerror_h+set}" = set; then
14272 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14273fi
ca81d7a0
JD
14274{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
14275echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 14276else
c0d27fcc 14277 # Is the header compilable?
ca81d7a0
JD
14278{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
14279echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 14280cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14281/* confdefs.h. */
14282_ACEOF
14283cat confdefs.h >>conftest.$ac_ext
14284cat >>conftest.$ac_ext <<_ACEOF
14285/* end confdefs.h. */
c0d27fcc
MR
14286$ac_includes_default
14287#include <jerror.h>
14288_ACEOF
14289rm -f conftest.$ac_objext
ca81d7a0
JD
14290if { (ac_try="$ac_compile"
14291case "(($ac_try" in
14292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14293 *) ac_try_echo=$ac_try;;
14294esac
14295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14296 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14297 ac_status=$?
edfaf76d
LK
14298 grep -v '^ *+' conftest.er1 >conftest.err
14299 rm -f conftest.er1
14300 cat conftest.err >&5
c0d27fcc
MR
14301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14302 (exit $ac_status); } &&
ca81d7a0
JD
14303 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14304 { (case "(($ac_try" in
14305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14306 *) ac_try_echo=$ac_try;;
14307esac
14308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14309 (eval "$ac_try") 2>&5
edfaf76d
LK
14310 ac_status=$?
14311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14312 (exit $ac_status); }; } &&
14313 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
14314 { (case "(($ac_try" in
14315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14316 *) ac_try_echo=$ac_try;;
14317esac
14318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14319 (eval "$ac_try") 2>&5
c0d27fcc
MR
14320 ac_status=$?
14321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14322 (exit $ac_status); }; }; then
14323 ac_header_compiler=yes
14324else
14325 echo "$as_me: failed program was:" >&5
19650fd6
AS
14326sed 's/^/| /' conftest.$ac_ext >&5
14327
ca81d7a0 14328 ac_header_compiler=no
c0d27fcc 14329fi
ca81d7a0
JD
14330
14331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14332{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14333echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14334
14335# Is the header present?
ca81d7a0
JD
14336{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
14337echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 14338cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14339/* confdefs.h. */
14340_ACEOF
14341cat confdefs.h >>conftest.$ac_ext
14342cat >>conftest.$ac_ext <<_ACEOF
14343/* end confdefs.h. */
98418dba
CW
14344#include <jerror.h>
14345_ACEOF
ca81d7a0
JD
14346if { (ac_try="$ac_cpp conftest.$ac_ext"
14347case "(($ac_try" in
14348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14349 *) ac_try_echo=$ac_try;;
14350esac
14351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14352 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14353 ac_status=$?
6bae0ccf 14354 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14355 rm -f conftest.er1
14356 cat conftest.err >&5
c0d27fcc 14357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
14358 (exit $ac_status); } >/dev/null; then
14359 if test -s conftest.err; then
14360 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14361 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
14362 else
14363 ac_cpp_err=
14364 fi
14365else
14366 ac_cpp_err=yes
503d2be0 14367fi
98418dba 14368if test -z "$ac_cpp_err"; then
c0d27fcc 14369 ac_header_preproc=yes
ba4481b5 14370else
98418dba 14371 echo "$as_me: failed program was:" >&5
19650fd6
AS
14372sed 's/^/| /' conftest.$ac_ext >&5
14373
c0d27fcc 14374 ac_header_preproc=no
98418dba 14375fi
ca81d7a0 14376
98418dba 14377rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14378{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14379echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14380
14381# So? What about this header?
edfaf76d
LK
14382case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14383 yes:no: )
c0d27fcc
MR
14384 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
14385echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14386 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
14387echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
14388 ac_header_preproc=yes
19650fd6 14389 ;;
edfaf76d 14390 no:yes:* )
c0d27fcc
MR
14391 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
14392echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14393 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
14394echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
14395 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
14396echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
14397 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
14398echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14399 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 14400echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14401 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
14402echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14403
19650fd6 14404 ;;
c0d27fcc 14405esac
ca81d7a0
JD
14406{ echo "$as_me:$LINENO: checking for jerror.h" >&5
14407echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
14408if test "${ac_cv_header_jerror_h+set}" = set; then
14409 echo $ECHO_N "(cached) $ECHO_C" >&6
14410else
14411 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 14412fi
ca81d7a0
JD
14413{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
14414echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
14415
14416fi
98418dba 14417if test $ac_cv_header_jerror_h = yes; then
ca81d7a0
JD
14418 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
14419echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 14420if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 14421 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14422else
98418dba
CW
14423 ac_check_lib_save_LIBS=$LIBS
14424LIBS="-ljpeg $LIBS"
14425cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14426/* confdefs.h. */
14427_ACEOF
14428cat confdefs.h >>conftest.$ac_ext
14429cat >>conftest.$ac_ext <<_ACEOF
14430/* end confdefs.h. */
98418dba 14431
ca81d7a0
JD
14432/* Override any GCC internal prototype to avoid an error.
14433 Use char because int might match the return type of a GCC
14434 builtin and then its argument prototype would still apply. */
98418dba
CW
14435#ifdef __cplusplus
14436extern "C"
14437#endif
98418dba 14438char jpeg_destroy_compress ();
503d2be0
AS
14439int
14440main ()
14441{
ca81d7a0 14442return jpeg_destroy_compress ();
503d2be0
AS
14443 ;
14444 return 0;
14445}
14446_ACEOF
14447rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14448if { (ac_try="$ac_link"
14449case "(($ac_try" in
14450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14451 *) ac_try_echo=$ac_try;;
14452esac
14453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14454 (eval "$ac_link") 2>conftest.er1
503d2be0 14455 ac_status=$?
edfaf76d
LK
14456 grep -v '^ *+' conftest.er1 >conftest.err
14457 rm -f conftest.er1
14458 cat conftest.err >&5
c0d27fcc 14459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14460 (exit $ac_status); } &&
ca81d7a0
JD
14461 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14462 { (case "(($ac_try" in
14463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14464 *) ac_try_echo=$ac_try;;
14465esac
14466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14467 (eval "$ac_try") 2>&5
edfaf76d
LK
14468 ac_status=$?
14469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14470 (exit $ac_status); }; } &&
14471 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
14472 { (case "(($ac_try" in
14473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14474 *) ac_try_echo=$ac_try;;
14475esac
14476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14477 (eval "$ac_try") 2>&5
503d2be0 14478 ac_status=$?
c0d27fcc 14479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14480 (exit $ac_status); }; }; then
98418dba 14481 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 14482else
503d2be0 14483 echo "$as_me: failed program was:" >&5
19650fd6
AS
14484sed 's/^/| /' conftest.$ac_ext >&5
14485
ca81d7a0 14486 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 14487fi
ca81d7a0
JD
14488
14489rm -f core conftest.err conftest.$ac_objext \
edfaf76d 14490 conftest$ac_exeext conftest.$ac_ext
98418dba 14491LIBS=$ac_check_lib_save_LIBS
ba4481b5 14492fi
ca81d7a0
JD
14493{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
14494echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
14495if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
14496 HAVE_JPEG=yes
ba4481b5 14497fi
98418dba 14498
ba4481b5 14499fi
98418dba 14500
c0d27fcc 14501
ba4481b5 14502 fi
ba4481b5 14503
c0d27fcc 14504
98418dba 14505 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 14506 cat >>confdefs.h <<\_ACEOF
98418dba 14507#define HAVE_JPEG 1
c0d27fcc 14508_ACEOF
98418dba
CW
14509
14510 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14511/* confdefs.h. */
14512_ACEOF
14513cat confdefs.h >>conftest.$ac_ext
14514cat >>conftest.$ac_ext <<_ACEOF
14515/* end confdefs.h. */
22044edf 14516#include <jpeglib.h>
98418dba
CW
14517 version=JPEG_LIB_VERSION
14518
14519_ACEOF
14520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 14521 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 14522 cat >>confdefs.h <<\_ACEOF
98418dba 14523#define HAVE_JPEG 1
c0d27fcc 14524_ACEOF
ba4481b5 14525
98418dba 14526else
c0d27fcc 14527 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
14528echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
14529 HAVE_JPEG=no
ba4481b5 14530fi
98418dba 14531rm -f conftest*
ba4481b5 14532
98418dba
CW
14533 fi
14534fi
503d2be0 14535
98418dba
CW
14536### Use -lpng if available, unless `--with-png=no'.
14537HAVE_PNG=no
14538if test "${HAVE_X11}" = "yes"; then
14539 if test "${with_png}" != "no"; then
f57bd967
DL
14540 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
14541 # in /usr/include/libpng.
14542
14543
14544for ac_header in png.h libpng/png.h
14545do
14546as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
14547if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14548 { echo "$as_me:$LINENO: checking for $ac_header" >&5
14549echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14550if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 14551 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14552fi
ca81d7a0
JD
14553ac_res=`eval echo '${'$as_ac_Header'}'`
14554 { echo "$as_me:$LINENO: result: $ac_res" >&5
14555echo "${ECHO_T}$ac_res" >&6; }
503d2be0 14556else
c0d27fcc 14557 # Is the header compilable?
ca81d7a0
JD
14558{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
14559echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 14560cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14561/* confdefs.h. */
14562_ACEOF
14563cat confdefs.h >>conftest.$ac_ext
14564cat >>conftest.$ac_ext <<_ACEOF
14565/* end confdefs.h. */
c0d27fcc 14566$ac_includes_default
f57bd967 14567#include <$ac_header>
c0d27fcc
MR
14568_ACEOF
14569rm -f conftest.$ac_objext
ca81d7a0
JD
14570if { (ac_try="$ac_compile"
14571case "(($ac_try" in
14572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14573 *) ac_try_echo=$ac_try;;
14574esac
14575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14576 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14577 ac_status=$?
edfaf76d
LK
14578 grep -v '^ *+' conftest.er1 >conftest.err
14579 rm -f conftest.er1
14580 cat conftest.err >&5
c0d27fcc
MR
14581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14582 (exit $ac_status); } &&
ca81d7a0
JD
14583 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14584 { (case "(($ac_try" in
14585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14586 *) ac_try_echo=$ac_try;;
14587esac
14588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14589 (eval "$ac_try") 2>&5
edfaf76d
LK
14590 ac_status=$?
14591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14592 (exit $ac_status); }; } &&
14593 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
14594 { (case "(($ac_try" in
14595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14596 *) ac_try_echo=$ac_try;;
14597esac
14598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14599 (eval "$ac_try") 2>&5
c0d27fcc
MR
14600 ac_status=$?
14601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14602 (exit $ac_status); }; }; then
14603 ac_header_compiler=yes
14604else
14605 echo "$as_me: failed program was:" >&5
19650fd6
AS
14606sed 's/^/| /' conftest.$ac_ext >&5
14607
ca81d7a0 14608 ac_header_compiler=no
c0d27fcc 14609fi
ca81d7a0
JD
14610
14611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14612{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14613echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14614
14615# Is the header present?
ca81d7a0
JD
14616{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
14617echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 14618cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14619/* confdefs.h. */
14620_ACEOF
14621cat confdefs.h >>conftest.$ac_ext
14622cat >>conftest.$ac_ext <<_ACEOF
14623/* end confdefs.h. */
f57bd967 14624#include <$ac_header>
503d2be0 14625_ACEOF
ca81d7a0
JD
14626if { (ac_try="$ac_cpp conftest.$ac_ext"
14627case "(($ac_try" in
14628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14629 *) ac_try_echo=$ac_try;;
14630esac
14631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14632 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 14633 ac_status=$?
6bae0ccf 14634 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14635 rm -f conftest.er1
14636 cat conftest.err >&5
c0d27fcc 14637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14638 (exit $ac_status); } >/dev/null; then
14639 if test -s conftest.err; then
14640 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14641 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14642 else
14643 ac_cpp_err=
14644 fi
14645else
14646 ac_cpp_err=yes
14647fi
14648if test -z "$ac_cpp_err"; then
c0d27fcc 14649 ac_header_preproc=yes
503d2be0
AS
14650else
14651 echo "$as_me: failed program was:" >&5
19650fd6
AS
14652sed 's/^/| /' conftest.$ac_ext >&5
14653
c0d27fcc 14654 ac_header_preproc=no
ba4481b5 14655fi
ca81d7a0 14656
503d2be0 14657rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14658{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14659echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14660
14661# So? What about this header?
edfaf76d
LK
14662case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14663 yes:no: )
f57bd967
DL
14664 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14665echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14666 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14667echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14668 ac_header_preproc=yes
19650fd6 14669 ;;
edfaf76d 14670 no:yes:* )
f57bd967
DL
14671 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14672echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14673 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14674echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14675 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14676echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14677 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14678echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 14679 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14680echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14681 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14682echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14683
19650fd6 14684 ;;
c0d27fcc 14685esac
ca81d7a0
JD
14686{ echo "$as_me:$LINENO: checking for $ac_header" >&5
14687echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14688if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
14689 echo $ECHO_N "(cached) $ECHO_C" >&6
14690else
edfaf76d 14691 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 14692fi
ca81d7a0
JD
14693ac_res=`eval echo '${'$as_ac_Header'}'`
14694 { echo "$as_me:$LINENO: result: $ac_res" >&5
14695echo "${ECHO_T}$ac_res" >&6; }
f57bd967 14696
ba4481b5 14697fi
f57bd967
DL
14698if test `eval echo '${'$as_ac_Header'}'` = yes; then
14699 cat >>confdefs.h <<_ACEOF
14700#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14701_ACEOF
c0d27fcc
MR
14702
14703fi
f57bd967
DL
14704
14705done
14706
14707 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
ca81d7a0
JD
14708 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
14709echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 14710if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 14711 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14712else
98418dba
CW
14713 ac_check_lib_save_LIBS=$LIBS
14714LIBS="-lpng -lz -lm $LIBS"
14715cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14716/* confdefs.h. */
14717_ACEOF
14718cat confdefs.h >>conftest.$ac_ext
14719cat >>conftest.$ac_ext <<_ACEOF
14720/* end confdefs.h. */
98418dba 14721
ca81d7a0
JD
14722/* Override any GCC internal prototype to avoid an error.
14723 Use char because int might match the return type of a GCC
14724 builtin and then its argument prototype would still apply. */
503d2be0
AS
14725#ifdef __cplusplus
14726extern "C"
14727#endif
98418dba 14728char png_get_channels ();
503d2be0
AS
14729int
14730main ()
14731{
ca81d7a0 14732return png_get_channels ();
503d2be0
AS
14733 ;
14734 return 0;
14735}
14736_ACEOF
14737rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14738if { (ac_try="$ac_link"
14739case "(($ac_try" in
14740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14741 *) ac_try_echo=$ac_try;;
14742esac
14743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14744 (eval "$ac_link") 2>conftest.er1
503d2be0 14745 ac_status=$?
edfaf76d
LK
14746 grep -v '^ *+' conftest.er1 >conftest.err
14747 rm -f conftest.er1
14748 cat conftest.err >&5
c0d27fcc 14749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14750 (exit $ac_status); } &&
ca81d7a0
JD
14751 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14752 { (case "(($ac_try" in
14753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14754 *) ac_try_echo=$ac_try;;
14755esac
14756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14757 (eval "$ac_try") 2>&5
edfaf76d
LK
14758 ac_status=$?
14759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14760 (exit $ac_status); }; } &&
14761 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
14762 { (case "(($ac_try" in
14763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14764 *) ac_try_echo=$ac_try;;
14765esac
14766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14767 (eval "$ac_try") 2>&5
503d2be0 14768 ac_status=$?
c0d27fcc 14769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14770 (exit $ac_status); }; }; then
98418dba 14771 ac_cv_lib_png_png_get_channels=yes
73b77ee5 14772else
98418dba 14773 echo "$as_me: failed program was:" >&5
19650fd6
AS
14774sed 's/^/| /' conftest.$ac_ext >&5
14775
ca81d7a0 14776 ac_cv_lib_png_png_get_channels=no
73b77ee5 14777fi
ca81d7a0
JD
14778
14779rm -f core conftest.err conftest.$ac_objext \
edfaf76d 14780 conftest$ac_exeext conftest.$ac_ext
98418dba 14781LIBS=$ac_check_lib_save_LIBS
73b77ee5 14782fi
ca81d7a0
JD
14783{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
14784echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
14785if test $ac_cv_lib_png_png_get_channels = yes; then
14786 HAVE_PNG=yes
73b77ee5 14787fi
503d2be0 14788
f57bd967 14789 fi
98418dba
CW
14790 fi
14791
14792 if test "${HAVE_PNG}" = "yes"; then
b936fae4 14793
c0d27fcc 14794cat >>confdefs.h <<\_ACEOF
98418dba 14795#define HAVE_PNG 1
c0d27fcc 14796_ACEOF
73b77ee5 14797
98418dba 14798 fi
73b77ee5
GM
14799fi
14800
98418dba
CW
14801### Use -ltiff if available, unless `--with-tiff=no'.
14802HAVE_TIFF=no
14803if test "${HAVE_X11}" = "yes"; then
14804 if test "${with_tiff}" != "no"; then
c0d27fcc 14805 if test "${ac_cv_header_tiffio_h+set}" = set; then
ca81d7a0
JD
14806 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
14807echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
14808if test "${ac_cv_header_tiffio_h+set}" = set; then
14809 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14810fi
ca81d7a0
JD
14811{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14812echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 14813else
c0d27fcc 14814 # Is the header compilable?
ca81d7a0
JD
14815{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
14816echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 14817cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14818/* confdefs.h. */
14819_ACEOF
14820cat confdefs.h >>conftest.$ac_ext
14821cat >>conftest.$ac_ext <<_ACEOF
14822/* end confdefs.h. */
c0d27fcc
MR
14823$ac_includes_default
14824#include <tiffio.h>
14825_ACEOF
14826rm -f conftest.$ac_objext
ca81d7a0
JD
14827if { (ac_try="$ac_compile"
14828case "(($ac_try" in
14829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14830 *) ac_try_echo=$ac_try;;
14831esac
14832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14833 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14834 ac_status=$?
edfaf76d
LK
14835 grep -v '^ *+' conftest.er1 >conftest.err
14836 rm -f conftest.er1
14837 cat conftest.err >&5
c0d27fcc
MR
14838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14839 (exit $ac_status); } &&
ca81d7a0
JD
14840 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14841 { (case "(($ac_try" in
14842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14843 *) ac_try_echo=$ac_try;;
14844esac
14845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14846 (eval "$ac_try") 2>&5
edfaf76d
LK
14847 ac_status=$?
14848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14849 (exit $ac_status); }; } &&
14850 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
14851 { (case "(($ac_try" in
14852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14853 *) ac_try_echo=$ac_try;;
14854esac
14855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14856 (eval "$ac_try") 2>&5
c0d27fcc
MR
14857 ac_status=$?
14858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14859 (exit $ac_status); }; }; then
14860 ac_header_compiler=yes
14861else
14862 echo "$as_me: failed program was:" >&5
19650fd6
AS
14863sed 's/^/| /' conftest.$ac_ext >&5
14864
ca81d7a0 14865 ac_header_compiler=no
c0d27fcc 14866fi
ca81d7a0
JD
14867
14868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14869{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14870echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14871
14872# Is the header present?
ca81d7a0
JD
14873{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
14874echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 14875cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14876/* confdefs.h. */
14877_ACEOF
14878cat confdefs.h >>conftest.$ac_ext
14879cat >>conftest.$ac_ext <<_ACEOF
14880/* end confdefs.h. */
98418dba
CW
14881#include <tiffio.h>
14882_ACEOF
ca81d7a0
JD
14883if { (ac_try="$ac_cpp conftest.$ac_ext"
14884case "(($ac_try" in
14885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14886 *) ac_try_echo=$ac_try;;
14887esac
14888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14889 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14890 ac_status=$?
6bae0ccf 14891 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14892 rm -f conftest.er1
14893 cat conftest.err >&5
c0d27fcc 14894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
14895 (exit $ac_status); } >/dev/null; then
14896 if test -s conftest.err; then
14897 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14898 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
14899 else
14900 ac_cpp_err=
14901 fi
14902else
14903 ac_cpp_err=yes
14904fi
14905if test -z "$ac_cpp_err"; then
c0d27fcc 14906 ac_header_preproc=yes
98418dba
CW
14907else
14908 echo "$as_me: failed program was:" >&5
19650fd6
AS
14909sed 's/^/| /' conftest.$ac_ext >&5
14910
c0d27fcc 14911 ac_header_preproc=no
98418dba 14912fi
ca81d7a0 14913
98418dba 14914rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14915{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14916echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14917
14918# So? What about this header?
edfaf76d
LK
14919case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14920 yes:no: )
c0d27fcc
MR
14921 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
14922echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14923 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
14924echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
14925 ac_header_preproc=yes
19650fd6 14926 ;;
edfaf76d 14927 no:yes:* )
c0d27fcc
MR
14928 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
14929echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14930 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
14931echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
14932 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
14933echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
14934 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
14935echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14936 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 14937echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14938 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
14939echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14940
19650fd6 14941 ;;
c0d27fcc 14942esac
ca81d7a0
JD
14943{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
14944echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
14945if test "${ac_cv_header_tiffio_h+set}" = set; then
14946 echo $ECHO_N "(cached) $ECHO_C" >&6
14947else
14948 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 14949fi
ca81d7a0
JD
14950{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14951echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
14952
14953fi
98418dba
CW
14954if test $ac_cv_header_tiffio_h = yes; then
14955 tifflibs="-lz -lm"
14956 # At least one tiff package requires the jpeg library.
14957 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ca81d7a0
JD
14958 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
14959echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 14960if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 14961 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14962else
503d2be0 14963 ac_check_lib_save_LIBS=$LIBS
98418dba 14964LIBS="-ltiff $tifflibs $LIBS"
503d2be0 14965cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14966/* confdefs.h. */
14967_ACEOF
14968cat confdefs.h >>conftest.$ac_ext
14969cat >>conftest.$ac_ext <<_ACEOF
14970/* end confdefs.h. */
503d2be0 14971
ca81d7a0
JD
14972/* Override any GCC internal prototype to avoid an error.
14973 Use char because int might match the return type of a GCC
14974 builtin and then its argument prototype would still apply. */
503d2be0
AS
14975#ifdef __cplusplus
14976extern "C"
14977#endif
98418dba 14978char TIFFGetVersion ();
503d2be0
AS
14979int
14980main ()
14981{
ca81d7a0 14982return TIFFGetVersion ();
503d2be0
AS
14983 ;
14984 return 0;
14985}
14986_ACEOF
14987rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14988if { (ac_try="$ac_link"
14989case "(($ac_try" in
14990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14991 *) ac_try_echo=$ac_try;;
14992esac
14993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14994 (eval "$ac_link") 2>conftest.er1
503d2be0 14995 ac_status=$?
edfaf76d
LK
14996 grep -v '^ *+' conftest.er1 >conftest.err
14997 rm -f conftest.er1
14998 cat conftest.err >&5
c0d27fcc 14999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15000 (exit $ac_status); } &&
ca81d7a0
JD
15001 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15002 { (case "(($ac_try" in
15003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15004 *) ac_try_echo=$ac_try;;
15005esac
15006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15007 (eval "$ac_try") 2>&5
edfaf76d
LK
15008 ac_status=$?
15009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15010 (exit $ac_status); }; } &&
15011 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
15012 { (case "(($ac_try" in
15013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15014 *) ac_try_echo=$ac_try;;
15015esac
15016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15017 (eval "$ac_try") 2>&5
503d2be0 15018 ac_status=$?
c0d27fcc 15019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15020 (exit $ac_status); }; }; then
98418dba 15021 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
15022else
15023 echo "$as_me: failed program was:" >&5
19650fd6
AS
15024sed 's/^/| /' conftest.$ac_ext >&5
15025
ca81d7a0 15026 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 15027fi
ca81d7a0
JD
15028
15029rm -f core conftest.err conftest.$ac_objext \
edfaf76d 15030 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15031LIBS=$ac_check_lib_save_LIBS
15032fi
ca81d7a0
JD
15033{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
15034echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
15035if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
15036 HAVE_TIFF=yes
15037fi
15038
15039fi
73b77ee5 15040
c0d27fcc 15041
98418dba
CW
15042 fi
15043
15044 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 15045
c0d27fcc 15046cat >>confdefs.h <<\_ACEOF
98418dba 15047#define HAVE_TIFF 1
c0d27fcc 15048_ACEOF
98418dba
CW
15049
15050 fi
73b77ee5
GM
15051fi
15052
98418dba
CW
15053### Use -lgif if available, unless `--with-gif=no'.
15054HAVE_GIF=no
15055if test "${HAVE_X11}" = "yes"; then
15056 if test "${with_gif}" != "no"; then
c0d27fcc 15057 if test "${ac_cv_header_gif_lib_h+set}" = set; then
ca81d7a0
JD
15058 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
15059echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
15060if test "${ac_cv_header_gif_lib_h+set}" = set; then
15061 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15062fi
ca81d7a0
JD
15063{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
15064echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 15065else
c0d27fcc 15066 # Is the header compilable?
ca81d7a0
JD
15067{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
15068echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 15069cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15070/* confdefs.h. */
15071_ACEOF
15072cat confdefs.h >>conftest.$ac_ext
15073cat >>conftest.$ac_ext <<_ACEOF
15074/* end confdefs.h. */
c0d27fcc
MR
15075$ac_includes_default
15076#include <gif_lib.h>
15077_ACEOF
15078rm -f conftest.$ac_objext
ca81d7a0
JD
15079if { (ac_try="$ac_compile"
15080case "(($ac_try" in
15081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15082 *) ac_try_echo=$ac_try;;
15083esac
15084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15085 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15086 ac_status=$?
edfaf76d
LK
15087 grep -v '^ *+' conftest.er1 >conftest.err
15088 rm -f conftest.er1
15089 cat conftest.err >&5
c0d27fcc
MR
15090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15091 (exit $ac_status); } &&
ca81d7a0
JD
15092 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15093 { (case "(($ac_try" in
15094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15095 *) ac_try_echo=$ac_try;;
15096esac
15097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15098 (eval "$ac_try") 2>&5
edfaf76d
LK
15099 ac_status=$?
15100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15101 (exit $ac_status); }; } &&
15102 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
15103 { (case "(($ac_try" in
15104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15105 *) ac_try_echo=$ac_try;;
15106esac
15107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15108 (eval "$ac_try") 2>&5
c0d27fcc
MR
15109 ac_status=$?
15110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15111 (exit $ac_status); }; }; then
15112 ac_header_compiler=yes
15113else
15114 echo "$as_me: failed program was:" >&5
19650fd6
AS
15115sed 's/^/| /' conftest.$ac_ext >&5
15116
ca81d7a0 15117 ac_header_compiler=no
c0d27fcc 15118fi
ca81d7a0
JD
15119
15120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15121{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15122echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15123
15124# Is the header present?
ca81d7a0
JD
15125{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
15126echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 15127cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15128/* confdefs.h. */
15129_ACEOF
15130cat confdefs.h >>conftest.$ac_ext
15131cat >>conftest.$ac_ext <<_ACEOF
15132/* end confdefs.h. */
98418dba
CW
15133#include <gif_lib.h>
15134_ACEOF
ca81d7a0
JD
15135if { (ac_try="$ac_cpp conftest.$ac_ext"
15136case "(($ac_try" in
15137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15138 *) ac_try_echo=$ac_try;;
15139esac
15140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15141 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 15142 ac_status=$?
6bae0ccf 15143 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15144 rm -f conftest.er1
15145 cat conftest.err >&5
c0d27fcc 15146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15147 (exit $ac_status); } >/dev/null; then
15148 if test -s conftest.err; then
15149 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 15150 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15151 else
15152 ac_cpp_err=
15153 fi
15154else
15155 ac_cpp_err=yes
15156fi
15157if test -z "$ac_cpp_err"; then
c0d27fcc 15158 ac_header_preproc=yes
98418dba
CW
15159else
15160 echo "$as_me: failed program was:" >&5
19650fd6
AS
15161sed 's/^/| /' conftest.$ac_ext >&5
15162
c0d27fcc 15163 ac_header_preproc=no
98418dba 15164fi
ca81d7a0 15165
98418dba 15166rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15167{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15168echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15169
15170# So? What about this header?
edfaf76d
LK
15171case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15172 yes:no: )
c0d27fcc
MR
15173 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15174echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15175 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
15176echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
15177 ac_header_preproc=yes
19650fd6 15178 ;;
edfaf76d 15179 no:yes:* )
c0d27fcc
MR
15180 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
15181echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15182 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
15183echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
15184 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
15185echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
15186 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
15187echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15188 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 15189echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15190 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
15191echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15192
19650fd6 15193 ;;
c0d27fcc 15194esac
ca81d7a0
JD
15195{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
15196echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
15197if test "${ac_cv_header_gif_lib_h+set}" = set; then
15198 echo $ECHO_N "(cached) $ECHO_C" >&6
15199else
15200 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 15201fi
ca81d7a0
JD
15202{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
15203echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
15204
15205fi
98418dba
CW
15206if test $ac_cv_header_gif_lib_h = yes; then
15207 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
15208# Earlier versions can crash Emacs.
ca81d7a0
JD
15209 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
15210echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
98418dba 15211if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 15212 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15213else
503d2be0 15214 ac_check_lib_save_LIBS=$LIBS
98418dba 15215LIBS="-lungif $LIBS"
503d2be0 15216cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15217/* confdefs.h. */
15218_ACEOF
15219cat confdefs.h >>conftest.$ac_ext
15220cat >>conftest.$ac_ext <<_ACEOF
15221/* end confdefs.h. */
73b77ee5 15222
ca81d7a0
JD
15223/* Override any GCC internal prototype to avoid an error.
15224 Use char because int might match the return type of a GCC
15225 builtin and then its argument prototype would still apply. */
98418dba
CW
15226#ifdef __cplusplus
15227extern "C"
15228#endif
98418dba 15229char EGifPutExtensionLast ();
503d2be0
AS
15230int
15231main ()
15232{
ca81d7a0 15233return EGifPutExtensionLast ();
503d2be0
AS
15234 ;
15235 return 0;
15236}
15237_ACEOF
15238rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15239if { (ac_try="$ac_link"
15240case "(($ac_try" in
15241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15242 *) ac_try_echo=$ac_try;;
15243esac
15244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15245 (eval "$ac_link") 2>conftest.er1
503d2be0 15246 ac_status=$?
edfaf76d
LK
15247 grep -v '^ *+' conftest.er1 >conftest.err
15248 rm -f conftest.er1
15249 cat conftest.err >&5
c0d27fcc 15250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15251 (exit $ac_status); } &&
ca81d7a0
JD
15252 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15253 { (case "(($ac_try" in
15254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15255 *) ac_try_echo=$ac_try;;
15256esac
15257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15258 (eval "$ac_try") 2>&5
edfaf76d
LK
15259 ac_status=$?
15260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15261 (exit $ac_status); }; } &&
15262 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
15263 { (case "(($ac_try" in
15264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15265 *) ac_try_echo=$ac_try;;
15266esac
15267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15268 (eval "$ac_try") 2>&5
35996d22
AS
15269 ac_status=$?
15270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15271 (exit $ac_status); }; }; then
15272 ac_cv_lib_ungif_EGifPutExtensionLast=yes
15273else
98418dba 15274 echo "$as_me: failed program was:" >&5
19650fd6
AS
15275sed 's/^/| /' conftest.$ac_ext >&5
15276
ca81d7a0 15277 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba 15278fi
ca81d7a0
JD
15279
15280rm -f core conftest.err conftest.$ac_objext \
edfaf76d 15281 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15282LIBS=$ac_check_lib_save_LIBS
15283fi
ca81d7a0
JD
15284{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
15285echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
98418dba
CW
15286if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
15287 HAVE_GIF=yes
15288fi
15289
15290fi
15291
c0d27fcc 15292
98418dba
CW
15293 fi
15294
15295 if test "${HAVE_GIF}" = "yes"; then
b936fae4 15296
c0d27fcc 15297cat >>confdefs.h <<\_ACEOF
98418dba 15298#define HAVE_GIF 1
c0d27fcc 15299_ACEOF
98418dba
CW
15300
15301 fi
15302fi
15303
cef11da2 15304if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
ca81d7a0
JD
15305 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
15306echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
15307if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
15308 echo $ECHO_N "(cached) $ECHO_C" >&6
15309fi
ca81d7a0
JD
15310{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
15311echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
15312else
15313 # Is the header compilable?
ca81d7a0
JD
15314{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
15315echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
15316cat >conftest.$ac_ext <<_ACEOF
15317/* confdefs.h. */
15318_ACEOF
15319cat confdefs.h >>conftest.$ac_ext
15320cat >>conftest.$ac_ext <<_ACEOF
15321/* end confdefs.h. */
15322$ac_includes_default
15323#include <malloc/malloc.h>
15324_ACEOF
15325rm -f conftest.$ac_objext
ca81d7a0
JD
15326if { (ac_try="$ac_compile"
15327case "(($ac_try" in
15328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15329 *) ac_try_echo=$ac_try;;
15330esac
15331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15332 (eval "$ac_compile") 2>conftest.er1
cef11da2 15333 ac_status=$?
edfaf76d
LK
15334 grep -v '^ *+' conftest.er1 >conftest.err
15335 rm -f conftest.er1
15336 cat conftest.err >&5
cef11da2
ST
15337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15338 (exit $ac_status); } &&
ca81d7a0
JD
15339 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15340 { (case "(($ac_try" in
15341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15342 *) ac_try_echo=$ac_try;;
15343esac
15344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15345 (eval "$ac_try") 2>&5
edfaf76d
LK
15346 ac_status=$?
15347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15348 (exit $ac_status); }; } &&
15349 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
15350 { (case "(($ac_try" in
15351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15352 *) ac_try_echo=$ac_try;;
15353esac
15354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15355 (eval "$ac_try") 2>&5
cef11da2
ST
15356 ac_status=$?
15357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15358 (exit $ac_status); }; }; then
15359 ac_header_compiler=yes
15360else
15361 echo "$as_me: failed program was:" >&5
15362sed 's/^/| /' conftest.$ac_ext >&5
15363
ca81d7a0 15364 ac_header_compiler=no
cef11da2 15365fi
ca81d7a0
JD
15366
15367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15368{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15369echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
15370
15371# Is the header present?
ca81d7a0
JD
15372{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
15373echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
15374cat >conftest.$ac_ext <<_ACEOF
15375/* confdefs.h. */
15376_ACEOF
15377cat confdefs.h >>conftest.$ac_ext
15378cat >>conftest.$ac_ext <<_ACEOF
15379/* end confdefs.h. */
15380#include <malloc/malloc.h>
15381_ACEOF
ca81d7a0
JD
15382if { (ac_try="$ac_cpp conftest.$ac_ext"
15383case "(($ac_try" in
15384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15385 *) ac_try_echo=$ac_try;;
15386esac
15387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15388 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
15389 ac_status=$?
15390 grep -v '^ *+' conftest.er1 >conftest.err
15391 rm -f conftest.er1
15392 cat conftest.err >&5
15393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15394 (exit $ac_status); } >/dev/null; then
15395 if test -s conftest.err; then
15396 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 15397 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
cef11da2
ST
15398 else
15399 ac_cpp_err=
15400 fi
15401else
15402 ac_cpp_err=yes
15403fi
15404if test -z "$ac_cpp_err"; then
15405 ac_header_preproc=yes
15406else
15407 echo "$as_me: failed program was:" >&5
15408sed 's/^/| /' conftest.$ac_ext >&5
15409
15410 ac_header_preproc=no
15411fi
ca81d7a0 15412
cef11da2 15413rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15414{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15415echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
15416
15417# So? What about this header?
edfaf76d
LK
15418case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15419 yes:no: )
cef11da2
ST
15420 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
15421echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15422 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
15423echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
15424 ac_header_preproc=yes
cef11da2 15425 ;;
edfaf76d 15426 no:yes:* )
cef11da2
ST
15427 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
15428echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15429 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
15430echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
15431 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
15432echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
15433 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
15434echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
15435 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
15436echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15437 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
15438echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15439
cef11da2
ST
15440 ;;
15441esac
ca81d7a0
JD
15442{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
15443echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
15444if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
15445 echo $ECHO_N "(cached) $ECHO_C" >&6
15446else
15447 ac_cv_header_malloc_malloc_h=$ac_header_preproc
15448fi
ca81d7a0
JD
15449{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
15450echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
15451
15452fi
15453if test $ac_cv_header_malloc_malloc_h = yes; then
15454
15455cat >>confdefs.h <<\_ACEOF
15456#define HAVE_MALLOC_MALLOC_H 1
15457_ACEOF
15458
15459fi
15460
15461
15462
5d6da11e 15463### Use Mac OS X Carbon API to implement GUI.
e0f712ba 15464if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 15465
c0d27fcc 15466cat >>confdefs.h <<\_ACEOF
e0f712ba 15467#define HAVE_CARBON 1
c0d27fcc 15468_ACEOF
e0f712ba 15469
6a3a24fa
JD
15470 ## Specify the install directory
15471 carbon_appdir=
15472 if test "${carbon_appdir_x}" != ""; then
15473 case ${carbon_appdir_x} in
15474 y | ye | yes) carbon_appdir=/Applications ;;
15475 * ) carbon_appdir=${carbon_appdir_x} ;;
15476 esac
15477 fi
8f417b3b
AS
15478 # We also have mouse menus.
15479 HAVE_MENUS=yes
e0f712ba
AC
15480fi
15481
98418dba
CW
15482### Use session management (-lSM -lICE) if available
15483HAVE_X_SM=no
15484if test "${HAVE_X11}" = "yes"; then
c0d27fcc 15485 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
15486 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15487echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
15488if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15489 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15490fi
ca81d7a0
JD
15491{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15492echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 15493else
c0d27fcc 15494 # Is the header compilable?
ca81d7a0
JD
15495{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
15496echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 15497cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15498/* confdefs.h. */
15499_ACEOF
15500cat confdefs.h >>conftest.$ac_ext
15501cat >>conftest.$ac_ext <<_ACEOF
15502/* end confdefs.h. */
c0d27fcc
MR
15503$ac_includes_default
15504#include <X11/SM/SMlib.h>
15505_ACEOF
15506rm -f conftest.$ac_objext
ca81d7a0
JD
15507if { (ac_try="$ac_compile"
15508case "(($ac_try" in
15509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15510 *) ac_try_echo=$ac_try;;
15511esac
15512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15513 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15514 ac_status=$?
edfaf76d
LK
15515 grep -v '^ *+' conftest.er1 >conftest.err
15516 rm -f conftest.er1
15517 cat conftest.err >&5
c0d27fcc
MR
15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519 (exit $ac_status); } &&
ca81d7a0
JD
15520 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15521 { (case "(($ac_try" in
15522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15523 *) ac_try_echo=$ac_try;;
15524esac
15525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15526 (eval "$ac_try") 2>&5
edfaf76d
LK
15527 ac_status=$?
15528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15529 (exit $ac_status); }; } &&
15530 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
15531 { (case "(($ac_try" in
15532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15533 *) ac_try_echo=$ac_try;;
15534esac
15535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15536 (eval "$ac_try") 2>&5
c0d27fcc
MR
15537 ac_status=$?
15538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15539 (exit $ac_status); }; }; then
15540 ac_header_compiler=yes
15541else
15542 echo "$as_me: failed program was:" >&5
19650fd6
AS
15543sed 's/^/| /' conftest.$ac_ext >&5
15544
ca81d7a0 15545 ac_header_compiler=no
c0d27fcc 15546fi
ca81d7a0
JD
15547
15548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15549{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15550echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15551
15552# Is the header present?
ca81d7a0
JD
15553{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
15554echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 15555cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15556/* confdefs.h. */
15557_ACEOF
15558cat confdefs.h >>conftest.$ac_ext
15559cat >>conftest.$ac_ext <<_ACEOF
15560/* end confdefs.h. */
98418dba
CW
15561#include <X11/SM/SMlib.h>
15562_ACEOF
ca81d7a0
JD
15563if { (ac_try="$ac_cpp conftest.$ac_ext"
15564case "(($ac_try" in
15565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15566 *) ac_try_echo=$ac_try;;
15567esac
15568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15569 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 15570 ac_status=$?
6bae0ccf 15571 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15572 rm -f conftest.er1
15573 cat conftest.err >&5
c0d27fcc 15574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15575 (exit $ac_status); } >/dev/null; then
15576 if test -s conftest.err; then
15577 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 15578 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15579 else
15580 ac_cpp_err=
15581 fi
15582else
15583 ac_cpp_err=yes
503d2be0 15584fi
98418dba 15585if test -z "$ac_cpp_err"; then
c0d27fcc 15586 ac_header_preproc=yes
98418dba
CW
15587else
15588 echo "$as_me: failed program was:" >&5
19650fd6
AS
15589sed 's/^/| /' conftest.$ac_ext >&5
15590
c0d27fcc 15591 ac_header_preproc=no
98418dba 15592fi
ca81d7a0 15593
98418dba 15594rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15595{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15596echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15597
15598# So? What about this header?
edfaf76d
LK
15599case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15600 yes:no: )
c0d27fcc
MR
15601 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15602echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15603 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
15604echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
15605 ac_header_preproc=yes
19650fd6 15606 ;;
edfaf76d 15607 no:yes:* )
c0d27fcc
MR
15608 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
15609echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15610 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
15611echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
15612 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
15613echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
15614 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
15615echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15616 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 15617echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15618 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
15619echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15620
19650fd6 15621 ;;
c0d27fcc 15622esac
ca81d7a0
JD
15623{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15624echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
15625if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15626 echo $ECHO_N "(cached) $ECHO_C" >&6
15627else
15628 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 15629fi
ca81d7a0
JD
15630{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15631echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
15632
15633fi
98418dba 15634if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
15635 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
15636echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 15637if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 15638 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15639else
503d2be0 15640 ac_check_lib_save_LIBS=$LIBS
1660500f 15641LIBS="-lSM -lICE $LIBS"
503d2be0 15642cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15643/* confdefs.h. */
15644_ACEOF
15645cat confdefs.h >>conftest.$ac_ext
15646cat >>conftest.$ac_ext <<_ACEOF
15647/* end confdefs.h. */
503d2be0 15648
ca81d7a0
JD
15649/* Override any GCC internal prototype to avoid an error.
15650 Use char because int might match the return type of a GCC
15651 builtin and then its argument prototype would still apply. */
503d2be0
AS
15652#ifdef __cplusplus
15653extern "C"
15654#endif
98418dba 15655char SmcOpenConnection ();
503d2be0
AS
15656int
15657main ()
15658{
ca81d7a0 15659return SmcOpenConnection ();
503d2be0
AS
15660 ;
15661 return 0;
15662}
15663_ACEOF
15664rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15665if { (ac_try="$ac_link"
15666case "(($ac_try" in
15667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15668 *) ac_try_echo=$ac_try;;
15669esac
15670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15671 (eval "$ac_link") 2>conftest.er1
503d2be0 15672 ac_status=$?
edfaf76d
LK
15673 grep -v '^ *+' conftest.er1 >conftest.err
15674 rm -f conftest.er1
15675 cat conftest.err >&5
c0d27fcc 15676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15677 (exit $ac_status); } &&
ca81d7a0
JD
15678 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15679 { (case "(($ac_try" in
15680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15681 *) ac_try_echo=$ac_try;;
15682esac
15683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15684 (eval "$ac_try") 2>&5
edfaf76d
LK
15685 ac_status=$?
15686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15687 (exit $ac_status); }; } &&
15688 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
15689 { (case "(($ac_try" in
15690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15691 *) ac_try_echo=$ac_try;;
15692esac
15693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15694 (eval "$ac_try") 2>&5
503d2be0 15695 ac_status=$?
c0d27fcc 15696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15697 (exit $ac_status); }; }; then
98418dba 15698 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
15699else
15700 echo "$as_me: failed program was:" >&5
19650fd6
AS
15701sed 's/^/| /' conftest.$ac_ext >&5
15702
ca81d7a0 15703 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 15704fi
ca81d7a0
JD
15705
15706rm -f core conftest.err conftest.$ac_objext \
edfaf76d 15707 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15708LIBS=$ac_check_lib_save_LIBS
15709fi
ca81d7a0
JD
15710{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
15711echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
15712if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
15713 HAVE_X_SM=yes
73b77ee5
GM
15714fi
15715
73b77ee5 15716fi
73b77ee5 15717
c0d27fcc
MR
15718
15719
98418dba 15720 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 15721
c0d27fcc 15722cat >>confdefs.h <<\_ACEOF
98418dba 15723#define HAVE_X_SM 1
c0d27fcc 15724_ACEOF
73b77ee5 15725
98418dba
CW
15726 case "$LIBS" in
15727 *-lSM*) ;;
15728 *) LIBS="-lSM -lICE $LIBS" ;;
15729 esac
73b77ee5 15730 fi
98418dba 15731fi
73b77ee5 15732
98418dba 15733# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
15734{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
15735echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
15736if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
15737 echo $ECHO_N "(cached) $ECHO_C" >&6
15738else
15739 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15740/* confdefs.h. */
15741_ACEOF
15742cat confdefs.h >>conftest.$ac_ext
15743cat >>conftest.$ac_ext <<_ACEOF
15744/* end confdefs.h. */
98418dba 15745#include <netdb.h>
503d2be0
AS
15746int
15747main ()
15748{
98418dba 15749return h_errno;
503d2be0
AS
15750 ;
15751 return 0;
15752}
15753_ACEOF
15754rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15755if { (ac_try="$ac_link"
15756case "(($ac_try" in
15757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15758 *) ac_try_echo=$ac_try;;
15759esac
15760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15761 (eval "$ac_link") 2>conftest.er1
503d2be0 15762 ac_status=$?
edfaf76d
LK
15763 grep -v '^ *+' conftest.er1 >conftest.err
15764 rm -f conftest.er1
15765 cat conftest.err >&5
c0d27fcc 15766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15767 (exit $ac_status); } &&
ca81d7a0
JD
15768 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15769 { (case "(($ac_try" in
15770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15771 *) ac_try_echo=$ac_try;;
15772esac
15773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15774 (eval "$ac_try") 2>&5
edfaf76d
LK
15775 ac_status=$?
15776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15777 (exit $ac_status); }; } &&
15778 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
15779 { (case "(($ac_try" in
15780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15781 *) ac_try_echo=$ac_try;;
15782esac
15783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15784 (eval "$ac_try") 2>&5
503d2be0 15785 ac_status=$?
c0d27fcc 15786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15787 (exit $ac_status); }; }; then
98418dba 15788 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 15789else
503d2be0 15790 echo "$as_me: failed program was:" >&5
19650fd6
AS
15791sed 's/^/| /' conftest.$ac_ext >&5
15792
ca81d7a0 15793 emacs_cv_netdb_declares_h_errno=no
73b77ee5 15794fi
ca81d7a0
JD
15795
15796rm -f core conftest.err conftest.$ac_objext \
edfaf76d 15797 conftest$ac_exeext conftest.$ac_ext
98418dba 15798fi
ca81d7a0
JD
15799{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
15800echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 15801if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 15802
c0d27fcc 15803cat >>confdefs.h <<\_ACEOF
98418dba 15804#define HAVE_H_ERRNO 1
c0d27fcc 15805_ACEOF
73b77ee5 15806
98418dba
CW
15807fi
15808
15809# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15810# for constant arguments. Useless!
ca81d7a0
JD
15811{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
15812echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
15813if test "${ac_cv_working_alloca_h+set}" = set; then
15814 echo $ECHO_N "(cached) $ECHO_C" >&6
15815else
15816 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15817/* confdefs.h. */
15818_ACEOF
15819cat confdefs.h >>conftest.$ac_ext
15820cat >>conftest.$ac_ext <<_ACEOF
15821/* end confdefs.h. */
98418dba 15822#include <alloca.h>
503d2be0
AS
15823int
15824main ()
15825{
98418dba 15826char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 15827 if (p) return 0;
503d2be0
AS
15828 ;
15829 return 0;
15830}
15831_ACEOF
15832rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15833if { (ac_try="$ac_link"
15834case "(($ac_try" in
15835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15836 *) ac_try_echo=$ac_try;;
15837esac
15838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15839 (eval "$ac_link") 2>conftest.er1
503d2be0 15840 ac_status=$?
edfaf76d
LK
15841 grep -v '^ *+' conftest.er1 >conftest.err
15842 rm -f conftest.er1
15843 cat conftest.err >&5
c0d27fcc 15844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15845 (exit $ac_status); } &&
ca81d7a0
JD
15846 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15847 { (case "(($ac_try" in
15848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15849 *) ac_try_echo=$ac_try;;
15850esac
15851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15852 (eval "$ac_try") 2>&5
edfaf76d
LK
15853 ac_status=$?
15854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15855 (exit $ac_status); }; } &&
15856 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
15857 { (case "(($ac_try" in
15858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15859 *) ac_try_echo=$ac_try;;
15860esac
15861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15862 (eval "$ac_try") 2>&5
503d2be0 15863 ac_status=$?
c0d27fcc 15864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15865 (exit $ac_status); }; }; then
98418dba 15866 ac_cv_working_alloca_h=yes
73b77ee5 15867else
503d2be0 15868 echo "$as_me: failed program was:" >&5
19650fd6
AS
15869sed 's/^/| /' conftest.$ac_ext >&5
15870
ca81d7a0 15871 ac_cv_working_alloca_h=no
73b77ee5 15872fi
ca81d7a0
JD
15873
15874rm -f core conftest.err conftest.$ac_objext \
edfaf76d 15875 conftest$ac_exeext conftest.$ac_ext
98418dba 15876fi
ca81d7a0
JD
15877{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
15878echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 15879if test $ac_cv_working_alloca_h = yes; then
73b77ee5 15880
c0d27fcc 15881cat >>confdefs.h <<\_ACEOF
98418dba 15882#define HAVE_ALLOCA_H 1
c0d27fcc 15883_ACEOF
98418dba
CW
15884
15885fi
15886
ca81d7a0
JD
15887{ echo "$as_me:$LINENO: checking for alloca" >&5
15888echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
15889if test "${ac_cv_func_alloca_works+set}" = set; then
15890 echo $ECHO_N "(cached) $ECHO_C" >&6
15891else
503d2be0 15892 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15893/* confdefs.h. */
15894_ACEOF
15895cat confdefs.h >>conftest.$ac_ext
15896cat >>conftest.$ac_ext <<_ACEOF
15897/* end confdefs.h. */
98418dba
CW
15898#ifdef __GNUC__
15899# define alloca __builtin_alloca
15900#else
15901# ifdef _MSC_VER
15902# include <malloc.h>
15903# define alloca _alloca
15904# else
15905# if HAVE_ALLOCA_H
15906# include <alloca.h>
15907# else
15908# ifdef _AIX
15909 #pragma alloca
15910# else
15911# ifndef alloca /* predefined by HP cc +Olibcalls */
15912char *alloca ();
15913# endif
15914# endif
15915# endif
15916# endif
15917#endif
15918
503d2be0
AS
15919int
15920main ()
15921{
98418dba 15922char *p = (char *) alloca (1);
ca81d7a0 15923 if (p) return 0;
503d2be0
AS
15924 ;
15925 return 0;
15926}
15927_ACEOF
15928rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15929if { (ac_try="$ac_link"
15930case "(($ac_try" in
15931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15932 *) ac_try_echo=$ac_try;;
15933esac
15934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15935 (eval "$ac_link") 2>conftest.er1
503d2be0 15936 ac_status=$?
edfaf76d
LK
15937 grep -v '^ *+' conftest.er1 >conftest.err
15938 rm -f conftest.er1
15939 cat conftest.err >&5
c0d27fcc 15940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15941 (exit $ac_status); } &&
ca81d7a0
JD
15942 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15943 { (case "(($ac_try" in
15944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15945 *) ac_try_echo=$ac_try;;
15946esac
15947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15948 (eval "$ac_try") 2>&5
edfaf76d
LK
15949 ac_status=$?
15950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15951 (exit $ac_status); }; } &&
15952 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
15953 { (case "(($ac_try" in
15954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15955 *) ac_try_echo=$ac_try;;
15956esac
15957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15958 (eval "$ac_try") 2>&5
503d2be0 15959 ac_status=$?
c0d27fcc 15960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15961 (exit $ac_status); }; }; then
98418dba 15962 ac_cv_func_alloca_works=yes
ac95a621 15963else
503d2be0 15964 echo "$as_me: failed program was:" >&5
19650fd6
AS
15965sed 's/^/| /' conftest.$ac_ext >&5
15966
ca81d7a0 15967 ac_cv_func_alloca_works=no
ac95a621 15968fi
ca81d7a0
JD
15969
15970rm -f core conftest.err conftest.$ac_objext \
edfaf76d 15971 conftest$ac_exeext conftest.$ac_ext
98418dba 15972fi
ca81d7a0
JD
15973{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15974echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15975
98418dba
CW
15976if test $ac_cv_func_alloca_works = yes; then
15977
c0d27fcc 15978cat >>confdefs.h <<\_ACEOF
98418dba 15979#define HAVE_ALLOCA 1
c0d27fcc 15980_ACEOF
98418dba
CW
15981
15982else
15983 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15984# that cause trouble. Some versions do not even contain alloca or
15985# contain a buggy version. If you still want to use their alloca,
15986# use ar to extract alloca.o from them instead of compiling alloca.c.
15987
ca81d7a0 15988ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15989
c0d27fcc 15990cat >>confdefs.h <<\_ACEOF
98418dba 15991#define C_ALLOCA 1
c0d27fcc 15992_ACEOF
98418dba 15993
c0d27fcc 15994
ca81d7a0
JD
15995{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15996echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
15997if test "${ac_cv_os_cray+set}" = set; then
15998 echo $ECHO_N "(cached) $ECHO_C" >&6
15999else
16000 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16001/* confdefs.h. */
16002_ACEOF
16003cat confdefs.h >>conftest.$ac_ext
16004cat >>conftest.$ac_ext <<_ACEOF
16005/* end confdefs.h. */
ca81d7a0 16006#if defined CRAY && ! defined CRAY2
98418dba
CW
16007webecray
16008#else
16009wenotbecray
16010#endif
16011
16012_ACEOF
16013if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 16014 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
16015 ac_cv_os_cray=yes
16016else
16017 ac_cv_os_cray=no
16018fi
16019rm -f conftest*
ac95a621 16020
98418dba 16021fi
ca81d7a0
JD
16022{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
16023echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
16024if test $ac_cv_os_cray = yes; then
16025 for ac_func in _getb67 GETB67 getb67; do
16026 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16027{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16028echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16029if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16030 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 16031else
503d2be0 16032 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16033/* confdefs.h. */
16034_ACEOF
16035cat confdefs.h >>conftest.$ac_ext
16036cat >>conftest.$ac_ext <<_ACEOF
16037/* end confdefs.h. */
edfaf76d
LK
16038/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16039 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16040#define $ac_func innocuous_$ac_func
16041
73b77ee5 16042/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16043 which can conflict with char $ac_func (); below.
16044 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16045 <limits.h> exists even on freestanding compilers. */
edfaf76d 16046
19650fd6
AS
16047#ifdef __STDC__
16048# include <limits.h>
16049#else
16050# include <assert.h>
16051#endif
edfaf76d
LK
16052
16053#undef $ac_func
16054
ca81d7a0
JD
16055/* Override any GCC internal prototype to avoid an error.
16056 Use char because int might match the return type of a GCC
16057 builtin and then its argument prototype would still apply. */
503d2be0
AS
16058#ifdef __cplusplus
16059extern "C"
16060#endif
503d2be0 16061char $ac_func ();
73b77ee5
GM
16062/* The GNU C library defines this for functions which it implements
16063 to always fail with ENOSYS. Some functions are actually named
16064 something starting with __ and the normal name is an alias. */
ca81d7a0 16065#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 16066choke me
73b77ee5
GM
16067#endif
16068
19650fd6
AS
16069int
16070main ()
16071{
ca81d7a0 16072return $ac_func ();
503d2be0
AS
16073 ;
16074 return 0;
16075}
16076_ACEOF
16077rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16078if { (ac_try="$ac_link"
16079case "(($ac_try" in
16080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16081 *) ac_try_echo=$ac_try;;
16082esac
16083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16084 (eval "$ac_link") 2>conftest.er1
503d2be0 16085 ac_status=$?
edfaf76d
LK
16086 grep -v '^ *+' conftest.er1 >conftest.err
16087 rm -f conftest.er1
16088 cat conftest.err >&5
c0d27fcc 16089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16090 (exit $ac_status); } &&
ca81d7a0
JD
16091 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16092 { (case "(($ac_try" in
16093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16094 *) ac_try_echo=$ac_try;;
16095esac
16096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16097 (eval "$ac_try") 2>&5
edfaf76d
LK
16098 ac_status=$?
16099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16100 (exit $ac_status); }; } &&
16101 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
16102 { (case "(($ac_try" in
16103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16104 *) ac_try_echo=$ac_try;;
16105esac
16106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16107 (eval "$ac_try") 2>&5
503d2be0 16108 ac_status=$?
c0d27fcc 16109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16110 (exit $ac_status); }; }; then
16111 eval "$as_ac_var=yes"
16112else
16113 echo "$as_me: failed program was:" >&5
19650fd6
AS
16114sed 's/^/| /' conftest.$ac_ext >&5
16115
ca81d7a0 16116 eval "$as_ac_var=no"
503d2be0 16117fi
ca81d7a0
JD
16118
16119rm -f core conftest.err conftest.$ac_objext \
edfaf76d 16120 conftest$ac_exeext conftest.$ac_ext
503d2be0 16121fi
ca81d7a0
JD
16122ac_res=`eval echo '${'$as_ac_var'}'`
16123 { echo "$as_me:$LINENO: result: $ac_res" >&5
16124echo "${ECHO_T}$ac_res" >&6; }
503d2be0 16125if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 16126
c0d27fcc 16127cat >>confdefs.h <<_ACEOF
98418dba 16128#define CRAY_STACKSEG_END $ac_func
c0d27fcc 16129_ACEOF
98418dba
CW
16130
16131 break
73b77ee5 16132fi
73b77ee5 16133
98418dba 16134 done
73b77ee5
GM
16135fi
16136
ca81d7a0
JD
16137{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
16138echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 16139if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 16140 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
16141else
16142 if test "$cross_compiling" = yes; then
16143 ac_cv_c_stack_direction=0
73b77ee5 16144else
503d2be0 16145 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16146/* confdefs.h. */
16147_ACEOF
16148cat confdefs.h >>conftest.$ac_ext
16149cat >>conftest.$ac_ext <<_ACEOF
16150/* end confdefs.h. */
ca81d7a0 16151$ac_includes_default
503d2be0 16152int
98418dba 16153find_stack_direction ()
503d2be0 16154{
98418dba
CW
16155 static char *addr = 0;
16156 auto char dummy;
16157 if (addr == 0)
16158 {
16159 addr = &dummy;
16160 return find_stack_direction ();
16161 }
73b77ee5 16162 else
98418dba
CW
16163 return (&dummy > addr) ? 1 : -1;
16164}
ba4481b5 16165
503d2be0
AS
16166int
16167main ()
16168{
ca81d7a0 16169 return find_stack_direction () < 0;
503d2be0
AS
16170}
16171_ACEOF
98418dba 16172rm -f conftest$ac_exeext
ca81d7a0
JD
16173if { (ac_try="$ac_link"
16174case "(($ac_try" in
16175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16176 *) ac_try_echo=$ac_try;;
16177esac
16178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16179 (eval "$ac_link") 2>&5
503d2be0 16180 ac_status=$?
c0d27fcc 16181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16182 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
16183 { (case "(($ac_try" in
16184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16185 *) ac_try_echo=$ac_try;;
16186esac
16187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16188 (eval "$ac_try") 2>&5
503d2be0 16189 ac_status=$?
c0d27fcc 16190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16191 (exit $ac_status); }; }; then
98418dba 16192 ac_cv_c_stack_direction=1
ba4481b5 16193else
98418dba
CW
16194 echo "$as_me: program exited with status $ac_status" >&5
16195echo "$as_me: failed program was:" >&5
19650fd6
AS
16196sed 's/^/| /' conftest.$ac_ext >&5
16197
c0d27fcc 16198( exit $ac_status )
98418dba 16199ac_cv_c_stack_direction=-1
ba4481b5 16200fi
ca81d7a0 16201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 16202fi
ca81d7a0
JD
16203
16204
98418dba 16205fi
ca81d7a0
JD
16206{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
16207echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 16208
c0d27fcc 16209cat >>confdefs.h <<_ACEOF
98418dba 16210#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
16211_ACEOF
16212
ba4481b5 16213
ba4481b5
DL
16214fi
16215
c0d27fcc 16216
98418dba
CW
16217# fmod, logb, and frexp are found in -lm on most systems.
16218# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
16219
ca81d7a0
JD
16220{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
16221echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 16222if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 16223 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16224else
98418dba
CW
16225 ac_check_lib_save_LIBS=$LIBS
16226LIBS="-lm $LIBS"
16227cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16228/* confdefs.h. */
16229_ACEOF
16230cat confdefs.h >>conftest.$ac_ext
16231cat >>conftest.$ac_ext <<_ACEOF
16232/* end confdefs.h. */
ba4481b5 16233
ca81d7a0
JD
16234/* Override any GCC internal prototype to avoid an error.
16235 Use char because int might match the return type of a GCC
16236 builtin and then its argument prototype would still apply. */
98418dba
CW
16237#ifdef __cplusplus
16238extern "C"
16239#endif
98418dba 16240char sqrt ();
503d2be0
AS
16241int
16242main ()
16243{
ca81d7a0 16244return sqrt ();
503d2be0
AS
16245 ;
16246 return 0;
16247}
16248_ACEOF
16249rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16250if { (ac_try="$ac_link"
16251case "(($ac_try" in
16252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16253 *) ac_try_echo=$ac_try;;
16254esac
16255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16256 (eval "$ac_link") 2>conftest.er1
503d2be0 16257 ac_status=$?
edfaf76d
LK
16258 grep -v '^ *+' conftest.er1 >conftest.err
16259 rm -f conftest.er1
16260 cat conftest.err >&5
c0d27fcc 16261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16262 (exit $ac_status); } &&
ca81d7a0
JD
16263 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16264 { (case "(($ac_try" in
16265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16266 *) ac_try_echo=$ac_try;;
16267esac
16268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16269 (eval "$ac_try") 2>&5
edfaf76d
LK
16270 ac_status=$?
16271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16272 (exit $ac_status); }; } &&
16273 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
16274 { (case "(($ac_try" in
16275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16276 *) ac_try_echo=$ac_try;;
16277esac
16278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16279 (eval "$ac_try") 2>&5
503d2be0 16280 ac_status=$?
c0d27fcc 16281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16282 (exit $ac_status); }; }; then
98418dba 16283 ac_cv_lib_m_sqrt=yes
ba4481b5 16284else
503d2be0 16285 echo "$as_me: failed program was:" >&5
19650fd6
AS
16286sed 's/^/| /' conftest.$ac_ext >&5
16287
ca81d7a0 16288 ac_cv_lib_m_sqrt=no
ba4481b5 16289fi
ca81d7a0
JD
16290
16291rm -f core conftest.err conftest.$ac_objext \
edfaf76d 16292 conftest$ac_exeext conftest.$ac_ext
98418dba 16293LIBS=$ac_check_lib_save_LIBS
ba4481b5 16294fi
ca81d7a0
JD
16295{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
16296echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 16297if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 16298 cat >>confdefs.h <<_ACEOF
98418dba 16299#define HAVE_LIBM 1
c0d27fcc 16300_ACEOF
98418dba
CW
16301
16302 LIBS="-lm $LIBS"
ba4481b5 16303
ba4481b5
DL
16304fi
16305
c0d27fcc 16306
55597d70
DL
16307# Check for mail-locking functions in a "mail" library. Probably this should
16308# have the same check as for liblockfile below.
98418dba 16309
ca81d7a0
JD
16310{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
16311echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 16312if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 16313 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16314else
98418dba
CW
16315 ac_check_lib_save_LIBS=$LIBS
16316LIBS="-lmail $LIBS"
16317cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16318/* confdefs.h. */
16319_ACEOF
16320cat confdefs.h >>conftest.$ac_ext
16321cat >>conftest.$ac_ext <<_ACEOF
16322/* end confdefs.h. */
98418dba 16323
ca81d7a0
JD
16324/* Override any GCC internal prototype to avoid an error.
16325 Use char because int might match the return type of a GCC
16326 builtin and then its argument prototype would still apply. */
98418dba
CW
16327#ifdef __cplusplus
16328extern "C"
16329#endif
98418dba 16330char maillock ();
503d2be0
AS
16331int
16332main ()
16333{
ca81d7a0 16334return maillock ();
503d2be0
AS
16335 ;
16336 return 0;
16337}
16338_ACEOF
16339rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16340if { (ac_try="$ac_link"
16341case "(($ac_try" in
16342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16343 *) ac_try_echo=$ac_try;;
16344esac
16345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16346 (eval "$ac_link") 2>conftest.er1
503d2be0 16347 ac_status=$?
edfaf76d
LK
16348 grep -v '^ *+' conftest.er1 >conftest.err
16349 rm -f conftest.er1
16350 cat conftest.err >&5
c0d27fcc 16351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16352 (exit $ac_status); } &&
ca81d7a0
JD
16353 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16354 { (case "(($ac_try" in
16355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16356 *) ac_try_echo=$ac_try;;
16357esac
16358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16359 (eval "$ac_try") 2>&5
edfaf76d
LK
16360 ac_status=$?
16361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16362 (exit $ac_status); }; } &&
16363 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
16364 { (case "(($ac_try" in
16365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16366 *) ac_try_echo=$ac_try;;
16367esac
16368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16369 (eval "$ac_try") 2>&5
503d2be0 16370 ac_status=$?
c0d27fcc 16371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16372 (exit $ac_status); }; }; then
98418dba 16373 ac_cv_lib_mail_maillock=yes
ba4481b5 16374else
503d2be0 16375 echo "$as_me: failed program was:" >&5
19650fd6
AS
16376sed 's/^/| /' conftest.$ac_ext >&5
16377
ca81d7a0 16378 ac_cv_lib_mail_maillock=no
ba4481b5 16379fi
ca81d7a0
JD
16380
16381rm -f core conftest.err conftest.$ac_objext \
edfaf76d 16382 conftest$ac_exeext conftest.$ac_ext
98418dba 16383LIBS=$ac_check_lib_save_LIBS
ba4481b5 16384fi
ca81d7a0
JD
16385{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
16386echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 16387if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 16388 cat >>confdefs.h <<_ACEOF
98418dba 16389#define HAVE_LIBMAIL 1
c0d27fcc 16390_ACEOF
ba4481b5 16391
98418dba 16392 LIBS="-lmail $LIBS"
ba4481b5 16393
98418dba 16394fi
ba4481b5 16395
c0d27fcc 16396
ca81d7a0
JD
16397{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
16398echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 16399if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 16400 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16401else
503d2be0 16402 ac_check_lib_save_LIBS=$LIBS
98418dba 16403LIBS="-llockfile $LIBS"
503d2be0 16404cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16405/* confdefs.h. */
16406_ACEOF
16407cat confdefs.h >>conftest.$ac_ext
16408cat >>conftest.$ac_ext <<_ACEOF
16409/* end confdefs.h. */
503d2be0 16410
ca81d7a0
JD
16411/* Override any GCC internal prototype to avoid an error.
16412 Use char because int might match the return type of a GCC
16413 builtin and then its argument prototype would still apply. */
503d2be0
AS
16414#ifdef __cplusplus
16415extern "C"
16416#endif
98418dba 16417char maillock ();
503d2be0
AS
16418int
16419main ()
16420{
ca81d7a0 16421return maillock ();
503d2be0
AS
16422 ;
16423 return 0;
16424}
16425_ACEOF
16426rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16427if { (ac_try="$ac_link"
16428case "(($ac_try" in
16429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16430 *) ac_try_echo=$ac_try;;
16431esac
16432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16433 (eval "$ac_link") 2>conftest.er1
503d2be0 16434 ac_status=$?
edfaf76d
LK
16435 grep -v '^ *+' conftest.er1 >conftest.err
16436 rm -f conftest.er1
16437 cat conftest.err >&5
c0d27fcc 16438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16439 (exit $ac_status); } &&
ca81d7a0
JD
16440 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16441 { (case "(($ac_try" in
16442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16443 *) ac_try_echo=$ac_try;;
16444esac
16445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16446 (eval "$ac_try") 2>&5
edfaf76d
LK
16447 ac_status=$?
16448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16449 (exit $ac_status); }; } &&
16450 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
16451 { (case "(($ac_try" in
16452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16453 *) ac_try_echo=$ac_try;;
16454esac
16455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16456 (eval "$ac_try") 2>&5
503d2be0 16457 ac_status=$?
c0d27fcc 16458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16459 (exit $ac_status); }; }; then
98418dba 16460 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
16461else
16462 echo "$as_me: failed program was:" >&5
19650fd6
AS
16463sed 's/^/| /' conftest.$ac_ext >&5
16464
ca81d7a0 16465 ac_cv_lib_lockfile_maillock=no
98418dba 16466fi
ca81d7a0
JD
16467
16468rm -f core conftest.err conftest.$ac_objext \
edfaf76d 16469 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
16470LIBS=$ac_check_lib_save_LIBS
16471fi
ca81d7a0
JD
16472{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
16473echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 16474if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 16475 cat >>confdefs.h <<_ACEOF
98418dba 16476#define HAVE_LIBLOCKFILE 1
c0d27fcc 16477_ACEOF
98418dba
CW
16478
16479 LIBS="-llockfile $LIBS"
16480
16481fi
16482
16483# If we have the shared liblockfile, assume we must use it for mail
16484# locking (e.g. Debian). If we couldn't link against liblockfile
16485# (no liblockfile.a installed), ensure that we don't need to.
16486if test "$ac_cv_lib_lockfile_maillock" = no; then
16487 # Extract the first word of "liblockfile.so", so it can be a program name with args.
16488set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
16489{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16490echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
16491if test "${ac_cv_prog_liblockfile+set}" = set; then
16492 echo $ECHO_N "(cached) $ECHO_C" >&6
16493else
16494 if test -n "$liblockfile"; then
16495 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
16496else
c0d27fcc 16497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
16498as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
16499for as_dir in $as_dummy
c0d27fcc
MR
16500do
16501 IFS=$as_save_IFS
16502 test -z "$as_dir" && as_dir=.
16503 for ac_exec_ext in '' $ac_executable_extensions; do
ca81d7a0 16504 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
16505 ac_cv_prog_liblockfile="yes"
16506 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16507 break 2
16508 fi
16509done
98418dba 16510done
ca81d7a0 16511IFS=$as_save_IFS
98418dba
CW
16512
16513 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 16514fi
503d2be0 16515fi
98418dba
CW
16516liblockfile=$ac_cv_prog_liblockfile
16517if test -n "$liblockfile"; then
ca81d7a0
JD
16518 { echo "$as_me:$LINENO: result: $liblockfile" >&5
16519echo "${ECHO_T}$liblockfile" >&6; }
98418dba 16520else
ca81d7a0
JD
16521 { echo "$as_me:$LINENO: result: no" >&5
16522echo "${ECHO_T}no" >&6; }
ba4481b5
DL
16523fi
16524
ca81d7a0 16525
98418dba 16526 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 16527 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
16528This probably means that movemail could lose mail.
16529There may be a \`development' package to install containing liblockfile." >&5
16530echo "$as_me: error: Shared liblockfile found but can't link against it.
16531This probably means that movemail could lose mail.
16532There may be a \`development' package to install containing liblockfile." >&2;}
16533 { (exit 1); exit 1; }; }
98418dba 16534 else :
55597d70 16535 fi
98418dba 16536fi
503d2be0 16537
98418dba
CW
16538for ac_func in touchlock
16539do
16540as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16541{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16542echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16543if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16544 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 16545else
98418dba 16546 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16547/* confdefs.h. */
16548_ACEOF
16549cat confdefs.h >>conftest.$ac_ext
16550cat >>conftest.$ac_ext <<_ACEOF
16551/* end confdefs.h. */
edfaf76d
LK
16552/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16553 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16554#define $ac_func innocuous_$ac_func
16555
98418dba 16556/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16557 which can conflict with char $ac_func (); below.
16558 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16559 <limits.h> exists even on freestanding compilers. */
edfaf76d 16560
19650fd6
AS
16561#ifdef __STDC__
16562# include <limits.h>
16563#else
16564# include <assert.h>
16565#endif
edfaf76d
LK
16566
16567#undef $ac_func
16568
ca81d7a0
JD
16569/* Override any GCC internal prototype to avoid an error.
16570 Use char because int might match the return type of a GCC
16571 builtin and then its argument prototype would still apply. */
503d2be0
AS
16572#ifdef __cplusplus
16573extern "C"
16574#endif
98418dba 16575char $ac_func ();
98418dba
CW
16576/* The GNU C library defines this for functions which it implements
16577 to always fail with ENOSYS. Some functions are actually named
16578 something starting with __ and the normal name is an alias. */
ca81d7a0 16579#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16580choke me
cd958eb3
MB
16581#endif
16582
19650fd6
AS
16583int
16584main ()
16585{
ca81d7a0 16586return $ac_func ();
503d2be0
AS
16587 ;
16588 return 0;
16589}
16590_ACEOF
16591rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16592if { (ac_try="$ac_link"
16593case "(($ac_try" in
16594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16595 *) ac_try_echo=$ac_try;;
16596esac
16597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16598 (eval "$ac_link") 2>conftest.er1
503d2be0 16599 ac_status=$?
edfaf76d
LK
16600 grep -v '^ *+' conftest.er1 >conftest.err
16601 rm -f conftest.er1
16602 cat conftest.err >&5
c0d27fcc 16603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16604 (exit $ac_status); } &&
ca81d7a0
JD
16605 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16606 { (case "(($ac_try" in
16607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16608 *) ac_try_echo=$ac_try;;
16609esac
16610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16611 (eval "$ac_try") 2>&5
edfaf76d
LK
16612 ac_status=$?
16613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16614 (exit $ac_status); }; } &&
16615 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
16616 { (case "(($ac_try" in
16617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16618 *) ac_try_echo=$ac_try;;
16619esac
16620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16621 (eval "$ac_try") 2>&5
503d2be0 16622 ac_status=$?
c0d27fcc 16623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16624 (exit $ac_status); }; }; then
98418dba 16625 eval "$as_ac_var=yes"
503d2be0
AS
16626else
16627 echo "$as_me: failed program was:" >&5
19650fd6
AS
16628sed 's/^/| /' conftest.$ac_ext >&5
16629
ca81d7a0 16630 eval "$as_ac_var=no"
503d2be0 16631fi
ca81d7a0
JD
16632
16633rm -f core conftest.err conftest.$ac_objext \
edfaf76d 16634 conftest$ac_exeext conftest.$ac_ext
503d2be0 16635fi
ca81d7a0
JD
16636ac_res=`eval echo '${'$as_ac_var'}'`
16637 { echo "$as_me:$LINENO: result: $ac_res" >&5
16638echo "${ECHO_T}$ac_res" >&6; }
98418dba 16639if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16640 cat >>confdefs.h <<_ACEOF
98418dba 16641#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16642_ACEOF
457b792c 16643
457b792c 16644fi
98418dba 16645done
457b792c 16646
c0d27fcc 16647
98418dba
CW
16648for ac_header in maillock.h
16649do
16650as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16651if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16652 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16653echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16654if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16655 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16656fi
ca81d7a0
JD
16657ac_res=`eval echo '${'$as_ac_Header'}'`
16658 { echo "$as_me:$LINENO: result: $ac_res" >&5
16659echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 16660else
c0d27fcc 16661 # Is the header compilable?
ca81d7a0
JD
16662{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16663echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16664cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16665/* confdefs.h. */
16666_ACEOF
16667cat confdefs.h >>conftest.$ac_ext
16668cat >>conftest.$ac_ext <<_ACEOF
16669/* end confdefs.h. */
c0d27fcc
MR
16670$ac_includes_default
16671#include <$ac_header>
16672_ACEOF
16673rm -f conftest.$ac_objext
ca81d7a0
JD
16674if { (ac_try="$ac_compile"
16675case "(($ac_try" in
16676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16677 *) ac_try_echo=$ac_try;;
16678esac
16679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16680 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16681 ac_status=$?
edfaf76d
LK
16682 grep -v '^ *+' conftest.er1 >conftest.err
16683 rm -f conftest.er1
16684 cat conftest.err >&5
c0d27fcc
MR
16685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16686 (exit $ac_status); } &&
ca81d7a0
JD
16687 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16688 { (case "(($ac_try" in
16689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16690 *) ac_try_echo=$ac_try;;
16691esac
16692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16693 (eval "$ac_try") 2>&5
edfaf76d
LK
16694 ac_status=$?
16695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16696 (exit $ac_status); }; } &&
16697 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
16698 { (case "(($ac_try" in
16699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16700 *) ac_try_echo=$ac_try;;
16701esac
16702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16703 (eval "$ac_try") 2>&5
c0d27fcc
MR
16704 ac_status=$?
16705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16706 (exit $ac_status); }; }; then
16707 ac_header_compiler=yes
16708else
16709 echo "$as_me: failed program was:" >&5
19650fd6
AS
16710sed 's/^/| /' conftest.$ac_ext >&5
16711
ca81d7a0 16712 ac_header_compiler=no
c0d27fcc 16713fi
ca81d7a0
JD
16714
16715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16716{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16717echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16718
16719# Is the header present?
ca81d7a0
JD
16720{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16721echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16722cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16723/* confdefs.h. */
16724_ACEOF
16725cat confdefs.h >>conftest.$ac_ext
16726cat >>conftest.$ac_ext <<_ACEOF
16727/* end confdefs.h. */
98418dba 16728#include <$ac_header>
503d2be0 16729_ACEOF
ca81d7a0
JD
16730if { (ac_try="$ac_cpp conftest.$ac_ext"
16731case "(($ac_try" in
16732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16733 *) ac_try_echo=$ac_try;;
16734esac
16735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16736 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16737 ac_status=$?
6bae0ccf 16738 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16739 rm -f conftest.er1
16740 cat conftest.err >&5
c0d27fcc 16741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16742 (exit $ac_status); } >/dev/null; then
16743 if test -s conftest.err; then
16744 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16745 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16746 else
16747 ac_cpp_err=
16748 fi
503d2be0 16749else
98418dba 16750 ac_cpp_err=yes
503d2be0 16751fi
98418dba 16752if test -z "$ac_cpp_err"; then
c0d27fcc 16753 ac_header_preproc=yes
98418dba
CW
16754else
16755 echo "$as_me: failed program was:" >&5
19650fd6
AS
16756sed 's/^/| /' conftest.$ac_ext >&5
16757
c0d27fcc 16758 ac_header_preproc=no
503d2be0 16759fi
ca81d7a0 16760
98418dba 16761rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16762{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16763echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16764
16765# So? What about this header?
edfaf76d
LK
16766case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16767 yes:no: )
c0d27fcc
MR
16768 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16769echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16770 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16771echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16772 ac_header_preproc=yes
19650fd6 16773 ;;
edfaf76d 16774 no:yes:* )
c0d27fcc
MR
16775 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16776echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16777 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16778echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16779 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16780echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16781 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16782echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16783 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16784echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16785 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16786echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16787
19650fd6 16788 ;;
c0d27fcc 16789esac
ca81d7a0
JD
16790{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16791echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16792if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16793 echo $ECHO_N "(cached) $ECHO_C" >&6
16794else
edfaf76d 16795 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16796fi
ca81d7a0
JD
16797ac_res=`eval echo '${'$as_ac_Header'}'`
16798 { echo "$as_me:$LINENO: result: $ac_res" >&5
16799echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16800
16801fi
98418dba 16802if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16803 cat >>confdefs.h <<_ACEOF
98418dba 16804#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16805_ACEOF
48d4b120 16806
ba4481b5 16807fi
c0d27fcc 16808
98418dba
CW
16809done
16810
c0d27fcc
MR
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
22044edf
DL
16866
16867
c0d27fcc 16868
b0e44248
RB
16869
16870
973a76b1
DL
16871
16872
16873
cd958eb3 16874
25ca0bca 16875
ea92fc9f 16876
e2fcf543 16877
190956b3 16878
c0d27fcc
MR
16879
16880
98418dba 16881for ac_func in gethostname getdomainname dup2 \
e2fcf543 16882rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
98418dba
CW
16883random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
16884strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 16885utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
16886__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
16887sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 16888gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
4489ece2 16889memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
16890do
16891as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16892{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16893echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16894if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16895 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16896else
503d2be0 16897 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16898/* confdefs.h. */
16899_ACEOF
16900cat confdefs.h >>conftest.$ac_ext
16901cat >>conftest.$ac_ext <<_ACEOF
16902/* end confdefs.h. */
edfaf76d
LK
16903/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16904 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16905#define $ac_func innocuous_$ac_func
16906
98418dba 16907/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16908 which can conflict with char $ac_func (); below.
16909 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16910 <limits.h> exists even on freestanding compilers. */
edfaf76d 16911
19650fd6
AS
16912#ifdef __STDC__
16913# include <limits.h>
16914#else
16915# include <assert.h>
16916#endif
edfaf76d
LK
16917
16918#undef $ac_func
16919
ca81d7a0
JD
16920/* Override any GCC internal prototype to avoid an error.
16921 Use char because int might match the return type of a GCC
16922 builtin and then its argument prototype would still apply. */
503d2be0
AS
16923#ifdef __cplusplus
16924extern "C"
16925#endif
98418dba 16926char $ac_func ();
98418dba
CW
16927/* The GNU C library defines this for functions which it implements
16928 to always fail with ENOSYS. Some functions are actually named
16929 something starting with __ and the normal name is an alias. */
ca81d7a0 16930#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16931choke me
98418dba
CW
16932#endif
16933
19650fd6
AS
16934int
16935main ()
16936{
ca81d7a0 16937return $ac_func ();
503d2be0
AS
16938 ;
16939 return 0;
16940}
16941_ACEOF
16942rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16943if { (ac_try="$ac_link"
16944case "(($ac_try" in
16945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16946 *) ac_try_echo=$ac_try;;
16947esac
16948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16949 (eval "$ac_link") 2>conftest.er1
503d2be0 16950 ac_status=$?
edfaf76d
LK
16951 grep -v '^ *+' conftest.er1 >conftest.err
16952 rm -f conftest.er1
16953 cat conftest.err >&5
c0d27fcc 16954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16955 (exit $ac_status); } &&
ca81d7a0
JD
16956 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16957 { (case "(($ac_try" in
16958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16959 *) ac_try_echo=$ac_try;;
16960esac
16961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16962 (eval "$ac_try") 2>&5
503d2be0 16963 ac_status=$?
c0d27fcc 16964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
16965 (exit $ac_status); }; } &&
16966 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
16967 { (case "(($ac_try" in
16968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16969 *) ac_try_echo=$ac_try;;
16970esac
16971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16972 (eval "$ac_try") 2>&5
edfaf76d
LK
16973 ac_status=$?
16974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16975 (exit $ac_status); }; }; then
98418dba 16976 eval "$as_ac_var=yes"
503d2be0
AS
16977else
16978 echo "$as_me: failed program was:" >&5
19650fd6
AS
16979sed 's/^/| /' conftest.$ac_ext >&5
16980
ca81d7a0 16981 eval "$as_ac_var=no"
503d2be0 16982fi
ca81d7a0
JD
16983
16984rm -f core conftest.err conftest.$ac_objext \
edfaf76d 16985 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16986fi
ca81d7a0
JD
16987ac_res=`eval echo '${'$as_ac_var'}'`
16988 { echo "$as_me:$LINENO: result: $ac_res" >&5
16989echo "${ECHO_T}$ac_res" >&6; }
98418dba 16990if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16991 cat >>confdefs.h <<_ACEOF
98418dba 16992#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16993_ACEOF
ba4481b5 16994
ba4481b5 16995fi
98418dba 16996done
ba4481b5 16997
c0d27fcc
MR
16998
16999
98418dba
CW
17000for ac_header in sys/un.h
17001do
17002as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
17003if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17004 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17005echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17006if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 17007 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17008fi
ca81d7a0
JD
17009ac_res=`eval echo '${'$as_ac_Header'}'`
17010 { echo "$as_me:$LINENO: result: $ac_res" >&5
17011echo "${ECHO_T}$ac_res" >&6; }
98418dba 17012else
c0d27fcc 17013 # Is the header compilable?
ca81d7a0
JD
17014{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17015echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 17016cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17017/* confdefs.h. */
17018_ACEOF
17019cat confdefs.h >>conftest.$ac_ext
17020cat >>conftest.$ac_ext <<_ACEOF
17021/* end confdefs.h. */
c0d27fcc
MR
17022$ac_includes_default
17023#include <$ac_header>
17024_ACEOF
17025rm -f conftest.$ac_objext
ca81d7a0
JD
17026if { (ac_try="$ac_compile"
17027case "(($ac_try" in
17028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17029 *) ac_try_echo=$ac_try;;
17030esac
17031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17032 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17033 ac_status=$?
edfaf76d
LK
17034 grep -v '^ *+' conftest.er1 >conftest.err
17035 rm -f conftest.er1
17036 cat conftest.err >&5
c0d27fcc
MR
17037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17038 (exit $ac_status); } &&
ca81d7a0
JD
17039 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17040 { (case "(($ac_try" in
17041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17042 *) ac_try_echo=$ac_try;;
17043esac
17044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17045 (eval "$ac_try") 2>&5
edfaf76d
LK
17046 ac_status=$?
17047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17048 (exit $ac_status); }; } &&
17049 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
17050 { (case "(($ac_try" in
17051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17052 *) ac_try_echo=$ac_try;;
17053esac
17054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17055 (eval "$ac_try") 2>&5
c0d27fcc
MR
17056 ac_status=$?
17057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17058 (exit $ac_status); }; }; then
17059 ac_header_compiler=yes
17060else
17061 echo "$as_me: failed program was:" >&5
19650fd6
AS
17062sed 's/^/| /' conftest.$ac_ext >&5
17063
ca81d7a0 17064 ac_header_compiler=no
c0d27fcc 17065fi
ca81d7a0
JD
17066
17067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17068{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17069echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17070
17071# Is the header present?
ca81d7a0
JD
17072{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17073echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 17074cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17075/* confdefs.h. */
17076_ACEOF
17077cat confdefs.h >>conftest.$ac_ext
17078cat >>conftest.$ac_ext <<_ACEOF
17079/* end confdefs.h. */
98418dba 17080#include <$ac_header>
503d2be0 17081_ACEOF
ca81d7a0
JD
17082if { (ac_try="$ac_cpp conftest.$ac_ext"
17083case "(($ac_try" in
17084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17085 *) ac_try_echo=$ac_try;;
17086esac
17087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17088 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17089 ac_status=$?
6bae0ccf 17090 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17091 rm -f conftest.er1
17092 cat conftest.err >&5
c0d27fcc 17093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17094 (exit $ac_status); } >/dev/null; then
17095 if test -s conftest.err; then
17096 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 17097 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
17098 else
17099 ac_cpp_err=
17100 fi
17101else
17102 ac_cpp_err=yes
17103fi
17104if test -z "$ac_cpp_err"; then
c0d27fcc 17105 ac_header_preproc=yes
ba4481b5 17106else
503d2be0 17107 echo "$as_me: failed program was:" >&5
19650fd6
AS
17108sed 's/^/| /' conftest.$ac_ext >&5
17109
c0d27fcc 17110 ac_header_preproc=no
ba4481b5 17111fi
ca81d7a0 17112
503d2be0 17113rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17114{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17115echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17116
17117# So? What about this header?
edfaf76d
LK
17118case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17119 yes:no: )
c0d27fcc
MR
17120 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17121echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17122 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17123echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17124 ac_header_preproc=yes
19650fd6 17125 ;;
edfaf76d 17126 no:yes:* )
c0d27fcc
MR
17127 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17128echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
17129 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17130echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17131 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17132echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17133 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17134echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17135 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 17136echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17137 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17138echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17139
19650fd6 17140 ;;
c0d27fcc 17141esac
ca81d7a0
JD
17142{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17143echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17144if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17145 echo $ECHO_N "(cached) $ECHO_C" >&6
17146else
edfaf76d 17147 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 17148fi
ca81d7a0
JD
17149ac_res=`eval echo '${'$as_ac_Header'}'`
17150 { echo "$as_me:$LINENO: result: $ac_res" >&5
17151echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17152
17153fi
925c2f3f 17154if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 17155 cat >>confdefs.h <<_ACEOF
925c2f3f 17156#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 17157_ACEOF
503d2be0 17158
925c2f3f 17159fi
c0d27fcc 17160
925c2f3f
EZ
17161done
17162
c0d27fcc
MR
17163
17164
17165
edfaf76d
LK
17166
17167for ac_header in stdlib.h sys/time.h unistd.h
925c2f3f
EZ
17168do
17169as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
17170if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17171 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17172echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17173if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 17174 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17175fi
ca81d7a0
JD
17176ac_res=`eval echo '${'$as_ac_Header'}'`
17177 { echo "$as_me:$LINENO: result: $ac_res" >&5
17178echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 17179else
c0d27fcc 17180 # Is the header compilable?
ca81d7a0
JD
17181{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17182echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 17183cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17184/* confdefs.h. */
17185_ACEOF
17186cat confdefs.h >>conftest.$ac_ext
17187cat >>conftest.$ac_ext <<_ACEOF
17188/* end confdefs.h. */
c0d27fcc
MR
17189$ac_includes_default
17190#include <$ac_header>
17191_ACEOF
17192rm -f conftest.$ac_objext
ca81d7a0
JD
17193if { (ac_try="$ac_compile"
17194case "(($ac_try" in
17195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17196 *) ac_try_echo=$ac_try;;
17197esac
17198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17199 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17200 ac_status=$?
edfaf76d
LK
17201 grep -v '^ *+' conftest.er1 >conftest.err
17202 rm -f conftest.er1
17203 cat conftest.err >&5
c0d27fcc
MR
17204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17205 (exit $ac_status); } &&
ca81d7a0
JD
17206 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17207 { (case "(($ac_try" in
17208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17209 *) ac_try_echo=$ac_try;;
17210esac
17211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17212 (eval "$ac_try") 2>&5
edfaf76d
LK
17213 ac_status=$?
17214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17215 (exit $ac_status); }; } &&
17216 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
17217 { (case "(($ac_try" in
17218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17219 *) ac_try_echo=$ac_try;;
17220esac
17221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17222 (eval "$ac_try") 2>&5
c0d27fcc
MR
17223 ac_status=$?
17224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17225 (exit $ac_status); }; }; then
17226 ac_header_compiler=yes
17227else
17228 echo "$as_me: failed program was:" >&5
19650fd6
AS
17229sed 's/^/| /' conftest.$ac_ext >&5
17230
ca81d7a0 17231 ac_header_compiler=no
c0d27fcc 17232fi
ca81d7a0
JD
17233
17234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17235{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17236echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17237
17238# Is the header present?
ca81d7a0
JD
17239{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17240echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 17241cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17242/* confdefs.h. */
17243_ACEOF
17244cat confdefs.h >>conftest.$ac_ext
17245cat >>conftest.$ac_ext <<_ACEOF
17246/* end confdefs.h. */
98418dba 17247#include <$ac_header>
503d2be0 17248_ACEOF
ca81d7a0
JD
17249if { (ac_try="$ac_cpp conftest.$ac_ext"
17250case "(($ac_try" in
17251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17252 *) ac_try_echo=$ac_try;;
17253esac
17254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17255 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17256 ac_status=$?
6bae0ccf 17257 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17258 rm -f conftest.er1
17259 cat conftest.err >&5
c0d27fcc 17260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17261 (exit $ac_status); } >/dev/null; then
17262 if test -s conftest.err; then
17263 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 17264 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
17265 else
17266 ac_cpp_err=
17267 fi
17268else
17269 ac_cpp_err=yes
17270fi
17271if test -z "$ac_cpp_err"; then
c0d27fcc 17272 ac_header_preproc=yes
98418dba
CW
17273else
17274 echo "$as_me: failed program was:" >&5
19650fd6
AS
17275sed 's/^/| /' conftest.$ac_ext >&5
17276
c0d27fcc 17277 ac_header_preproc=no
98418dba 17278fi
ca81d7a0 17279
98418dba 17280rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17281{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17282echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17283
17284# So? What about this header?
edfaf76d
LK
17285case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17286 yes:no: )
c0d27fcc
MR
17287 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17288echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17289 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17290echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17291 ac_header_preproc=yes
19650fd6 17292 ;;
edfaf76d 17293 no:yes:* )
c0d27fcc
MR
17294 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17295echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
17296 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17297echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17298 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17299echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17300 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17301echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17302 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 17303echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17304 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17305echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17306
19650fd6 17307 ;;
c0d27fcc 17308esac
ca81d7a0
JD
17309{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17310echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17311if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17312 echo $ECHO_N "(cached) $ECHO_C" >&6
17313else
edfaf76d 17314 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 17315fi
ca81d7a0
JD
17316ac_res=`eval echo '${'$as_ac_Header'}'`
17317 { echo "$as_me:$LINENO: result: $ac_res" >&5
17318echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17319
17320fi
98418dba 17321if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 17322 cat >>confdefs.h <<_ACEOF
98418dba 17323#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 17324_ACEOF
98418dba
CW
17325
17326fi
c0d27fcc 17327
98418dba
CW
17328done
17329
c0d27fcc 17330
98418dba
CW
17331for ac_func in alarm
17332do
17333as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17334{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17335echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17336if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17337 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17338else
98418dba 17339 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17340/* confdefs.h. */
17341_ACEOF
17342cat confdefs.h >>conftest.$ac_ext
17343cat >>conftest.$ac_ext <<_ACEOF
17344/* end confdefs.h. */
edfaf76d
LK
17345/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17346 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17347#define $ac_func innocuous_$ac_func
17348
98418dba 17349/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17350 which can conflict with char $ac_func (); below.
17351 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17352 <limits.h> exists even on freestanding compilers. */
edfaf76d 17353
19650fd6
AS
17354#ifdef __STDC__
17355# include <limits.h>
17356#else
17357# include <assert.h>
17358#endif
edfaf76d
LK
17359
17360#undef $ac_func
17361
ca81d7a0
JD
17362/* Override any GCC internal prototype to avoid an error.
17363 Use char because int might match the return type of a GCC
17364 builtin and then its argument prototype would still apply. */
503d2be0
AS
17365#ifdef __cplusplus
17366extern "C"
17367#endif
98418dba 17368char $ac_func ();
98418dba
CW
17369/* The GNU C library defines this for functions which it implements
17370 to always fail with ENOSYS. Some functions are actually named
17371 something starting with __ and the normal name is an alias. */
ca81d7a0 17372#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 17373choke me
98418dba
CW
17374#endif
17375
19650fd6
AS
17376int
17377main ()
17378{
ca81d7a0 17379return $ac_func ();
503d2be0
AS
17380 ;
17381 return 0;
17382}
17383_ACEOF
17384rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17385if { (ac_try="$ac_link"
17386case "(($ac_try" in
17387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17388 *) ac_try_echo=$ac_try;;
17389esac
17390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17391 (eval "$ac_link") 2>conftest.er1
503d2be0 17392 ac_status=$?
edfaf76d
LK
17393 grep -v '^ *+' conftest.er1 >conftest.err
17394 rm -f conftest.er1
17395 cat conftest.err >&5
c0d27fcc 17396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17397 (exit $ac_status); } &&
ca81d7a0
JD
17398 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17399 { (case "(($ac_try" in
17400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17401 *) ac_try_echo=$ac_try;;
17402esac
17403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17404 (eval "$ac_try") 2>&5
edfaf76d
LK
17405 ac_status=$?
17406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17407 (exit $ac_status); }; } &&
17408 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
17409 { (case "(($ac_try" in
17410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17411 *) ac_try_echo=$ac_try;;
17412esac
17413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17414 (eval "$ac_try") 2>&5
503d2be0 17415 ac_status=$?
c0d27fcc 17416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17417 (exit $ac_status); }; }; then
98418dba 17418 eval "$as_ac_var=yes"
503d2be0
AS
17419else
17420 echo "$as_me: failed program was:" >&5
19650fd6
AS
17421sed 's/^/| /' conftest.$ac_ext >&5
17422
ca81d7a0 17423 eval "$as_ac_var=no"
503d2be0 17424fi
ca81d7a0
JD
17425
17426rm -f core conftest.err conftest.$ac_objext \
edfaf76d 17427 conftest$ac_exeext conftest.$ac_ext
ffe36136 17428fi
ca81d7a0
JD
17429ac_res=`eval echo '${'$as_ac_var'}'`
17430 { echo "$as_me:$LINENO: result: $ac_res" >&5
17431echo "${ECHO_T}$ac_res" >&6; }
98418dba 17432if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17433 cat >>confdefs.h <<_ACEOF
98418dba 17434#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17435_ACEOF
ffe36136 17436
ba4481b5 17437fi
98418dba 17438done
ba4481b5 17439
ca81d7a0
JD
17440{ echo "$as_me:$LINENO: checking for working mktime" >&5
17441echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
17442if test "${ac_cv_func_working_mktime+set}" = set; then
17443 echo $ECHO_N "(cached) $ECHO_C" >&6
17444else
17445 if test "$cross_compiling" = yes; then
17446 ac_cv_func_working_mktime=no
17447else
17448 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17449/* confdefs.h. */
17450_ACEOF
17451cat confdefs.h >>conftest.$ac_ext
17452cat >>conftest.$ac_ext <<_ACEOF
17453/* end confdefs.h. */
98418dba
CW
17454/* Test program from Paul Eggert and Tony Leneis. */
17455#if TIME_WITH_SYS_TIME
17456# include <sys/time.h>
17457# include <time.h>
17458#else
17459# if HAVE_SYS_TIME_H
17460# include <sys/time.h>
17461# else
17462# include <time.h>
17463# endif
17464#endif
ba4481b5 17465
edfaf76d
LK
17466#if HAVE_STDLIB_H
17467# include <stdlib.h>
17468#endif
17469
98418dba
CW
17470#if HAVE_UNISTD_H
17471# include <unistd.h>
17472#endif
ba4481b5 17473
98418dba
CW
17474#if !HAVE_ALARM
17475# define alarm(X) /* empty */
17476#endif
df645f7c 17477
98418dba
CW
17478/* Work around redefinition to rpl_putenv by other config tests. */
17479#undef putenv
df645f7c 17480
98418dba 17481static time_t time_t_max;
edfaf76d 17482static time_t time_t_min;
df645f7c 17483
98418dba 17484/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
17485static char *tz_strings[] = {
17486 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
17487 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
17488};
17489#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 17490
ca81d7a0 17491/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 17492 Based on a problem report from Andreas Jaeger. */
ca81d7a0 17493static int
98418dba
CW
17494spring_forward_gap ()
17495{
17496 /* glibc (up to about 1998-10-07) failed this test. */
17497 struct tm tm;
17498
17499 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
17500 instead of "TZ=America/Vancouver" in order to detect the bug even
17501 on systems that don't support the Olson extension, or don't have the
17502 full zoneinfo tables installed. */
17503 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
17504
17505 tm.tm_year = 98;
17506 tm.tm_mon = 3;
17507 tm.tm_mday = 5;
17508 tm.tm_hour = 2;
17509 tm.tm_min = 0;
17510 tm.tm_sec = 0;
17511 tm.tm_isdst = -1;
ca81d7a0 17512 return mktime (&tm) != (time_t) -1;
98418dba
CW
17513}
17514
ca81d7a0 17515static int
edfaf76d 17516mktime_test1 (now)
98418dba
CW
17517 time_t now;
17518{
17519 struct tm *lt;
ca81d7a0 17520 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
17521}
17522
ca81d7a0 17523static int
edfaf76d
LK
17524mktime_test (now)
17525 time_t now;
17526{
ca81d7a0
JD
17527 return (mktime_test1 (now)
17528 && mktime_test1 ((time_t) (time_t_max - now))
17529 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
17530}
17531
ca81d7a0 17532static int
98418dba
CW
17533irix_6_4_bug ()
17534{
17535 /* Based on code from Ariel Faigon. */
17536 struct tm tm;
17537 tm.tm_year = 96;
17538 tm.tm_mon = 3;
17539 tm.tm_mday = 0;
17540 tm.tm_hour = 0;
17541 tm.tm_min = 0;
17542 tm.tm_sec = 0;
17543 tm.tm_isdst = -1;
17544 mktime (&tm);
ca81d7a0 17545 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
17546}
17547
ca81d7a0 17548static int
98418dba
CW
17549bigtime_test (j)
17550 int j;
17551{
17552 struct tm tm;
17553 time_t now;
17554 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
17555 now = mktime (&tm);
17556 if (now != (time_t) -1)
17557 {
17558 struct tm *lt = localtime (&now);
17559 if (! (lt
17560 && lt->tm_year == tm.tm_year
17561 && lt->tm_mon == tm.tm_mon
17562 && lt->tm_mday == tm.tm_mday
17563 && lt->tm_hour == tm.tm_hour
17564 && lt->tm_min == tm.tm_min
17565 && lt->tm_sec == tm.tm_sec
17566 && lt->tm_yday == tm.tm_yday
17567 && lt->tm_wday == tm.tm_wday
17568 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
17569 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 17570 return 0;
98418dba 17571 }
ca81d7a0 17572 return 1;
98418dba
CW
17573}
17574
17575int
17576main ()
17577{
17578 time_t t, delta;
17579 int i, j;
17580
17581 /* This test makes some buggy mktime implementations loop.
17582 Give up after 60 seconds; a mktime slower than that
17583 isn't worth using anyway. */
17584 alarm (60);
17585
17586 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
17587 continue;
17588 time_t_max--;
edfaf76d
LK
17589 if ((time_t) -1 < 0)
17590 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
17591 continue;
98418dba
CW
17592 delta = time_t_max / 997; /* a suitable prime number */
17593 for (i = 0; i < N_STRINGS; i++)
17594 {
17595 if (tz_strings[i])
17596 putenv (tz_strings[i]);
503d2be0 17597
98418dba 17598 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
17599 if (! mktime_test (t))
17600 return 1;
17601 if (! (mktime_test ((time_t) 1)
17602 && mktime_test ((time_t) (60 * 60))
17603 && mktime_test ((time_t) (60 * 60 * 24))))
17604 return 1;
98418dba
CW
17605
17606 for (j = 1; 0 < j; j *= 2)
ca81d7a0
JD
17607 if (! bigtime_test (j))
17608 return 1;
17609 if (! bigtime_test (j - 1))
17610 return 1;
98418dba 17611 }
ca81d7a0 17612 return ! (irix_6_4_bug () && spring_forward_gap ());
503d2be0
AS
17613}
17614_ACEOF
98418dba 17615rm -f conftest$ac_exeext
ca81d7a0
JD
17616if { (ac_try="$ac_link"
17617case "(($ac_try" in
17618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17619 *) ac_try_echo=$ac_try;;
17620esac
17621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17622 (eval "$ac_link") 2>&5
503d2be0 17623 ac_status=$?
c0d27fcc 17624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 17625 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
17626 { (case "(($ac_try" in
17627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17628 *) ac_try_echo=$ac_try;;
17629esac
17630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17631 (eval "$ac_try") 2>&5
503d2be0 17632 ac_status=$?
c0d27fcc 17633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17634 (exit $ac_status); }; }; then
98418dba 17635 ac_cv_func_working_mktime=yes
503d2be0 17636else
98418dba
CW
17637 echo "$as_me: program exited with status $ac_status" >&5
17638echo "$as_me: failed program was:" >&5
19650fd6
AS
17639sed 's/^/| /' conftest.$ac_ext >&5
17640
c0d27fcc 17641( exit $ac_status )
98418dba 17642ac_cv_func_working_mktime=no
503d2be0 17643fi
ca81d7a0 17644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 17645fi
ca81d7a0
JD
17646
17647
ba4481b5 17648fi
ca81d7a0
JD
17649{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
17650echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 17651if test $ac_cv_func_working_mktime = no; then
ca81d7a0 17652 case " $LIBOBJS " in
edfaf76d 17653 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
17654 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
17655 ;;
edfaf76d
LK
17656esac
17657
ba4481b5
DL
17658fi
17659
98418dba 17660if test "$ac_cv_func_working_mktime" = no; then
b936fae4 17661
c0d27fcc 17662cat >>confdefs.h <<\_ACEOF
98418dba 17663#define BROKEN_MKTIME 1
c0d27fcc 17664_ACEOF
ba4481b5 17665
ba4481b5 17666fi
503d2be0 17667
98418dba
CW
17668ac_have_func=no # yes means we've found a way to get the load average.
17669
6bae0ccf
DL
17670# Make sure getloadavg.c is where it belongs, at configure-time.
17671test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
17672 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
17673echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
17674 { (exit 1); exit 1; }; }
17675
98418dba
CW
17676ac_save_LIBS=$LIBS
17677
17678# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
17679({ echo "$as_me:$LINENO: checking for getloadavg" >&5
17680echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 17681if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 17682 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17683else
503d2be0 17684 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17685/* confdefs.h. */
17686_ACEOF
17687cat confdefs.h >>conftest.$ac_ext
17688cat >>conftest.$ac_ext <<_ACEOF
17689/* end confdefs.h. */
edfaf76d
LK
17690/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
17691 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17692#define getloadavg innocuous_getloadavg
17693
98418dba 17694/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17695 which can conflict with char getloadavg (); below.
17696 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17697 <limits.h> exists even on freestanding compilers. */
edfaf76d 17698
19650fd6
AS
17699#ifdef __STDC__
17700# include <limits.h>
17701#else
17702# include <assert.h>
17703#endif
edfaf76d
LK
17704
17705#undef getloadavg
17706
ca81d7a0
JD
17707/* Override any GCC internal prototype to avoid an error.
17708 Use char because int might match the return type of a GCC
17709 builtin and then its argument prototype would still apply. */
503d2be0
AS
17710#ifdef __cplusplus
17711extern "C"
17712#endif
98418dba 17713char getloadavg ();
98418dba
CW
17714/* The GNU C library defines this for functions which it implements
17715 to always fail with ENOSYS. Some functions are actually named
17716 something starting with __ and the normal name is an alias. */
ca81d7a0 17717#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 17718choke me
cd958eb3
MB
17719#endif
17720
19650fd6
AS
17721int
17722main ()
17723{
ca81d7a0 17724return getloadavg ();
503d2be0
AS
17725 ;
17726 return 0;
17727}
17728_ACEOF
17729rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17730if { (ac_try="$ac_link"
17731case "(($ac_try" in
17732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17733 *) ac_try_echo=$ac_try;;
17734esac
17735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17736 (eval "$ac_link") 2>conftest.er1
503d2be0 17737 ac_status=$?
edfaf76d
LK
17738 grep -v '^ *+' conftest.er1 >conftest.err
17739 rm -f conftest.er1
17740 cat conftest.err >&5
c0d27fcc 17741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17742 (exit $ac_status); } &&
ca81d7a0
JD
17743 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17744 { (case "(($ac_try" in
17745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17746 *) ac_try_echo=$ac_try;;
17747esac
17748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17749 (eval "$ac_try") 2>&5
edfaf76d
LK
17750 ac_status=$?
17751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17752 (exit $ac_status); }; } &&
17753 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
17754 { (case "(($ac_try" in
17755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17756 *) ac_try_echo=$ac_try;;
17757esac
17758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17759 (eval "$ac_try") 2>&5
503d2be0 17760 ac_status=$?
c0d27fcc 17761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17762 (exit $ac_status); }; }; then
98418dba 17763 ac_cv_func_getloadavg=yes
503d2be0
AS
17764else
17765 echo "$as_me: failed program was:" >&5
19650fd6
AS
17766sed 's/^/| /' conftest.$ac_ext >&5
17767
ca81d7a0 17768 ac_cv_func_getloadavg=no
503d2be0 17769fi
ca81d7a0
JD
17770
17771rm -f core conftest.err conftest.$ac_objext \
edfaf76d 17772 conftest$ac_exeext conftest.$ac_ext
ba4481b5 17773fi
ca81d7a0
JD
17774{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
17775echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
17776if test $ac_cv_func_getloadavg = yes; then
17777 exit 0
17778else
17779 exit 1
ba4481b5 17780fi
98418dba 17781) && ac_have_func=yes
ba4481b5 17782
98418dba 17783# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 17784
98418dba
CW
17785for ac_func in pstat_getdynamic
17786do
17787as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17788{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17789echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17790if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17791 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17792else
503d2be0 17793 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17794/* confdefs.h. */
17795_ACEOF
17796cat confdefs.h >>conftest.$ac_ext
17797cat >>conftest.$ac_ext <<_ACEOF
17798/* end confdefs.h. */
edfaf76d
LK
17799/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17800 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17801#define $ac_func innocuous_$ac_func
17802
98418dba 17803/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17804 which can conflict with char $ac_func (); below.
17805 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17806 <limits.h> exists even on freestanding compilers. */
edfaf76d 17807
19650fd6
AS
17808#ifdef __STDC__
17809# include <limits.h>
17810#else
17811# include <assert.h>
17812#endif
edfaf76d
LK
17813
17814#undef $ac_func
17815
ca81d7a0
JD
17816/* Override any GCC internal prototype to avoid an error.
17817 Use char because int might match the return type of a GCC
17818 builtin and then its argument prototype would still apply. */
503d2be0
AS
17819#ifdef __cplusplus
17820extern "C"
17821#endif
98418dba 17822char $ac_func ();
98418dba
CW
17823/* The GNU C library defines this for functions which it implements
17824 to always fail with ENOSYS. Some functions are actually named
17825 something starting with __ and the normal name is an alias. */
ca81d7a0 17826#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 17827choke me
98418dba
CW
17828#endif
17829
19650fd6
AS
17830int
17831main ()
17832{
ca81d7a0 17833return $ac_func ();
98418dba
CW
17834 ;
17835 return 0;
17836}
f21fadcc 17837_ACEOF
98418dba 17838rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17839if { (ac_try="$ac_link"
17840case "(($ac_try" in
17841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17842 *) ac_try_echo=$ac_try;;
17843esac
17844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17845 (eval "$ac_link") 2>conftest.er1
f21fadcc 17846 ac_status=$?
edfaf76d
LK
17847 grep -v '^ *+' conftest.er1 >conftest.err
17848 rm -f conftest.er1
17849 cat conftest.err >&5
c0d27fcc 17850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 17851 (exit $ac_status); } &&
ca81d7a0
JD
17852 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17853 { (case "(($ac_try" in
17854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17855 *) ac_try_echo=$ac_try;;
17856esac
17857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17858 (eval "$ac_try") 2>&5
edfaf76d
LK
17859 ac_status=$?
17860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17861 (exit $ac_status); }; } &&
17862 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
17863 { (case "(($ac_try" in
17864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17865 *) ac_try_echo=$ac_try;;
17866esac
17867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17868 (eval "$ac_try") 2>&5
98418dba 17869 ac_status=$?
c0d27fcc 17870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
17871 (exit $ac_status); }; }; then
17872 eval "$as_ac_var=yes"
f21fadcc
JD
17873else
17874 echo "$as_me: failed program was:" >&5
19650fd6
AS
17875sed 's/^/| /' conftest.$ac_ext >&5
17876
ca81d7a0 17877 eval "$as_ac_var=no"
f21fadcc 17878fi
ca81d7a0
JD
17879
17880rm -f core conftest.err conftest.$ac_objext \
edfaf76d 17881 conftest$ac_exeext conftest.$ac_ext
f21fadcc 17882fi
ca81d7a0
JD
17883ac_res=`eval echo '${'$as_ac_var'}'`
17884 { echo "$as_me:$LINENO: result: $ac_res" >&5
17885echo "${ECHO_T}$ac_res" >&6; }
98418dba 17886if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17887 cat >>confdefs.h <<_ACEOF
98418dba 17888#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17889_ACEOF
98418dba
CW
17890
17891fi
17892done
17893
c0d27fcc 17894
98418dba
CW
17895# Solaris has libkstat which does not require root.
17896
ca81d7a0
JD
17897{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
17898echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 17899if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
17900 echo $ECHO_N "(cached) $ECHO_C" >&6
17901else
17902 ac_check_lib_save_LIBS=$LIBS
98418dba 17903LIBS="-lkstat $LIBS"
f21fadcc 17904cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17905/* confdefs.h. */
17906_ACEOF
17907cat confdefs.h >>conftest.$ac_ext
17908cat >>conftest.$ac_ext <<_ACEOF
17909/* end confdefs.h. */
f21fadcc 17910
ca81d7a0
JD
17911/* Override any GCC internal prototype to avoid an error.
17912 Use char because int might match the return type of a GCC
17913 builtin and then its argument prototype would still apply. */
f21fadcc
JD
17914#ifdef __cplusplus
17915extern "C"
17916#endif
98418dba 17917char kstat_open ();
f21fadcc
JD
17918int
17919main ()
17920{
ca81d7a0 17921return kstat_open ();
f21fadcc
JD
17922 ;
17923 return 0;
17924}
17925_ACEOF
17926rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17927if { (ac_try="$ac_link"
17928case "(($ac_try" in
17929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17930 *) ac_try_echo=$ac_try;;
17931esac
17932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17933 (eval "$ac_link") 2>conftest.er1
f21fadcc 17934 ac_status=$?
edfaf76d
LK
17935 grep -v '^ *+' conftest.er1 >conftest.err
17936 rm -f conftest.er1
17937 cat conftest.err >&5
c0d27fcc 17938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 17939 (exit $ac_status); } &&
ca81d7a0
JD
17940 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17941 { (case "(($ac_try" in
17942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17943 *) ac_try_echo=$ac_try;;
17944esac
17945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17946 (eval "$ac_try") 2>&5
edfaf76d
LK
17947 ac_status=$?
17948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17949 (exit $ac_status); }; } &&
17950 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
17951 { (case "(($ac_try" in
17952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17953 *) ac_try_echo=$ac_try;;
17954esac
17955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17956 (eval "$ac_try") 2>&5
f21fadcc 17957 ac_status=$?
c0d27fcc 17958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 17959 (exit $ac_status); }; }; then
98418dba 17960 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
17961else
17962 echo "$as_me: failed program was:" >&5
19650fd6
AS
17963sed 's/^/| /' conftest.$ac_ext >&5
17964
ca81d7a0 17965 ac_cv_lib_kstat_kstat_open=no
f21fadcc 17966fi
ca81d7a0
JD
17967
17968rm -f core conftest.err conftest.$ac_objext \
edfaf76d 17969 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
17970LIBS=$ac_check_lib_save_LIBS
17971fi
ca81d7a0
JD
17972{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
17973echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 17974if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 17975 cat >>confdefs.h <<_ACEOF
98418dba 17976#define HAVE_LIBKSTAT 1
c0d27fcc 17977_ACEOF
f21fadcc 17978
98418dba 17979 LIBS="-lkstat $LIBS"
f21fadcc 17980
f21fadcc
JD
17981fi
17982
98418dba
CW
17983test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
17984
17985# Some systems with -lutil have (and need) -lkvm as well, some do not.
17986# On Solaris, -lkvm requires nlist from -lelf, so check that first
17987# to get the right answer into the cache.
17988# For kstat on solaris, we need libelf to force the definition of SVR4 below.
17989if test $ac_have_func = no; then
ca81d7a0
JD
17990 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
17991echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 17992if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 17993 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17994else
98418dba
CW
17995 ac_check_lib_save_LIBS=$LIBS
17996LIBS="-lelf $LIBS"
17997cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17998/* confdefs.h. */
17999_ACEOF
18000cat confdefs.h >>conftest.$ac_ext
18001cat >>conftest.$ac_ext <<_ACEOF
18002/* end confdefs.h. */
98418dba 18003
ca81d7a0
JD
18004/* Override any GCC internal prototype to avoid an error.
18005 Use char because int might match the return type of a GCC
18006 builtin and then its argument prototype would still apply. */
98418dba
CW
18007#ifdef __cplusplus
18008extern "C"
18009#endif
98418dba 18010char elf_begin ();
503d2be0
AS
18011int
18012main ()
18013{
ca81d7a0 18014return elf_begin ();
503d2be0
AS
18015 ;
18016 return 0;
18017}
18018_ACEOF
18019rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18020if { (ac_try="$ac_link"
18021case "(($ac_try" in
18022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18023 *) ac_try_echo=$ac_try;;
18024esac
18025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18026 (eval "$ac_link") 2>conftest.er1
503d2be0 18027 ac_status=$?
edfaf76d
LK
18028 grep -v '^ *+' conftest.er1 >conftest.err
18029 rm -f conftest.er1
18030 cat conftest.err >&5
c0d27fcc 18031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18032 (exit $ac_status); } &&
ca81d7a0
JD
18033 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18034 { (case "(($ac_try" in
18035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18036 *) ac_try_echo=$ac_try;;
18037esac
18038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18039 (eval "$ac_try") 2>&5
edfaf76d
LK
18040 ac_status=$?
18041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18042 (exit $ac_status); }; } &&
18043 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
18044 { (case "(($ac_try" in
18045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18046 *) ac_try_echo=$ac_try;;
18047esac
18048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18049 (eval "$ac_try") 2>&5
503d2be0 18050 ac_status=$?
c0d27fcc 18051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18052 (exit $ac_status); }; }; then
98418dba 18053 ac_cv_lib_elf_elf_begin=yes
ba4481b5 18054else
503d2be0 18055 echo "$as_me: failed program was:" >&5
19650fd6
AS
18056sed 's/^/| /' conftest.$ac_ext >&5
18057
ca81d7a0 18058 ac_cv_lib_elf_elf_begin=no
ba4481b5 18059fi
ca81d7a0
JD
18060
18061rm -f core conftest.err conftest.$ac_objext \
edfaf76d 18062 conftest$ac_exeext conftest.$ac_ext
98418dba 18063LIBS=$ac_check_lib_save_LIBS
ba4481b5 18064fi
ca81d7a0
JD
18065{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
18066echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
18067if test $ac_cv_lib_elf_elf_begin = yes; then
18068 LIBS="-lelf $LIBS"
ba4481b5
DL
18069fi
18070
98418dba
CW
18071fi
18072if test $ac_have_func = no; then
ca81d7a0
JD
18073 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
18074echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 18075if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 18076 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18077else
98418dba
CW
18078 ac_check_lib_save_LIBS=$LIBS
18079LIBS="-lkvm $LIBS"
18080cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18081/* confdefs.h. */
18082_ACEOF
18083cat confdefs.h >>conftest.$ac_ext
18084cat >>conftest.$ac_ext <<_ACEOF
18085/* end confdefs.h. */
98418dba 18086
ca81d7a0
JD
18087/* Override any GCC internal prototype to avoid an error.
18088 Use char because int might match the return type of a GCC
18089 builtin and then its argument prototype would still apply. */
98418dba
CW
18090#ifdef __cplusplus
18091extern "C"
18092#endif
98418dba 18093char kvm_open ();
503d2be0
AS
18094int
18095main ()
18096{
ca81d7a0 18097return kvm_open ();
503d2be0
AS
18098 ;
18099 return 0;
18100}
18101_ACEOF
18102rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18103if { (ac_try="$ac_link"
18104case "(($ac_try" in
18105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18106 *) ac_try_echo=$ac_try;;
18107esac
18108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18109 (eval "$ac_link") 2>conftest.er1
503d2be0 18110 ac_status=$?
edfaf76d
LK
18111 grep -v '^ *+' conftest.er1 >conftest.err
18112 rm -f conftest.er1
18113 cat conftest.err >&5
c0d27fcc 18114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18115 (exit $ac_status); } &&
ca81d7a0
JD
18116 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18117 { (case "(($ac_try" in
18118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18119 *) ac_try_echo=$ac_try;;
18120esac
18121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18122 (eval "$ac_try") 2>&5
edfaf76d
LK
18123 ac_status=$?
18124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18125 (exit $ac_status); }; } &&
18126 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
18127 { (case "(($ac_try" in
18128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18129 *) ac_try_echo=$ac_try;;
18130esac
18131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18132 (eval "$ac_try") 2>&5
503d2be0 18133 ac_status=$?
c0d27fcc 18134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18135 (exit $ac_status); }; }; then
98418dba 18136 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
18137else
18138 echo "$as_me: failed program was:" >&5
19650fd6
AS
18139sed 's/^/| /' conftest.$ac_ext >&5
18140
ca81d7a0 18141 ac_cv_lib_kvm_kvm_open=no
503d2be0 18142fi
ca81d7a0
JD
18143
18144rm -f core conftest.err conftest.$ac_objext \
edfaf76d 18145 conftest$ac_exeext conftest.$ac_ext
98418dba 18146LIBS=$ac_check_lib_save_LIBS
503d2be0 18147fi
ca81d7a0
JD
18148{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
18149echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
18150if test $ac_cv_lib_kvm_kvm_open = yes; then
18151 LIBS="-lkvm $LIBS"
ba4481b5
DL
18152fi
18153
98418dba 18154 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
18155 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
18156echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 18157if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 18158 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18159else
98418dba
CW
18160 ac_check_lib_save_LIBS=$LIBS
18161LIBS="-lutil $LIBS"
18162cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18163/* confdefs.h. */
18164_ACEOF
18165cat confdefs.h >>conftest.$ac_ext
18166cat >>conftest.$ac_ext <<_ACEOF
18167/* end confdefs.h. */
98418dba 18168
ca81d7a0
JD
18169/* Override any GCC internal prototype to avoid an error.
18170 Use char because int might match the return type of a GCC
18171 builtin and then its argument prototype would still apply. */
98418dba
CW
18172#ifdef __cplusplus
18173extern "C"
18174#endif
98418dba 18175char getloadavg ();
503d2be0
AS
18176int
18177main ()
18178{
ca81d7a0 18179return getloadavg ();
503d2be0
AS
18180 ;
18181 return 0;
18182}
18183_ACEOF
18184rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18185if { (ac_try="$ac_link"
18186case "(($ac_try" in
18187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18188 *) ac_try_echo=$ac_try;;
18189esac
18190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18191 (eval "$ac_link") 2>conftest.er1
503d2be0 18192 ac_status=$?
edfaf76d
LK
18193 grep -v '^ *+' conftest.er1 >conftest.err
18194 rm -f conftest.er1
18195 cat conftest.err >&5
c0d27fcc 18196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18197 (exit $ac_status); } &&
ca81d7a0
JD
18198 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18199 { (case "(($ac_try" in
18200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18201 *) ac_try_echo=$ac_try;;
18202esac
18203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18204 (eval "$ac_try") 2>&5
edfaf76d
LK
18205 ac_status=$?
18206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18207 (exit $ac_status); }; } &&
18208 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
18209 { (case "(($ac_try" in
18210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18211 *) ac_try_echo=$ac_try;;
18212esac
18213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18214 (eval "$ac_try") 2>&5
35996d22
AS
18215 ac_status=$?
18216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18217 (exit $ac_status); }; }; then
18218 ac_cv_lib_util_getloadavg=yes
18219else
503d2be0 18220 echo "$as_me: failed program was:" >&5
19650fd6
AS
18221sed 's/^/| /' conftest.$ac_ext >&5
18222
ca81d7a0 18223 ac_cv_lib_util_getloadavg=no
ba4481b5 18224fi
ca81d7a0
JD
18225
18226rm -f core conftest.err conftest.$ac_objext \
edfaf76d 18227 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
18228LIBS=$ac_check_lib_save_LIBS
18229fi
ca81d7a0
JD
18230{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
18231echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
18232if test $ac_cv_lib_util_getloadavg = yes; then
18233 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 18234fi
503d2be0 18235
98418dba 18236fi
ba4481b5 18237
98418dba
CW
18238if test $ac_have_func = no; then
18239 # There is a commonly available library for RS/6000 AIX.
18240 # Since it is not a standard part of AIX, it might be installed locally.
18241 ac_getloadavg_LIBS=$LIBS
18242 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
18243 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
18244echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 18245if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 18246 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18247else
98418dba
CW
18248 ac_check_lib_save_LIBS=$LIBS
18249LIBS="-lgetloadavg $LIBS"
18250cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18251/* confdefs.h. */
18252_ACEOF
18253cat confdefs.h >>conftest.$ac_ext
18254cat >>conftest.$ac_ext <<_ACEOF
18255/* end confdefs.h. */
ba4481b5 18256
ca81d7a0
JD
18257/* Override any GCC internal prototype to avoid an error.
18258 Use char because int might match the return type of a GCC
18259 builtin and then its argument prototype would still apply. */
98418dba
CW
18260#ifdef __cplusplus
18261extern "C"
18262#endif
98418dba 18263char getloadavg ();
98418dba
CW
18264int
18265main ()
18266{
ca81d7a0 18267return getloadavg ();
98418dba
CW
18268 ;
18269 return 0;
18270}
503d2be0 18271_ACEOF
98418dba 18272rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18273if { (ac_try="$ac_link"
18274case "(($ac_try" in
18275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18276 *) ac_try_echo=$ac_try;;
18277esac
18278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18279 (eval "$ac_link") 2>conftest.er1
98418dba 18280 ac_status=$?
edfaf76d
LK
18281 grep -v '^ *+' conftest.er1 >conftest.err
18282 rm -f conftest.er1
18283 cat conftest.err >&5
c0d27fcc 18284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 18285 (exit $ac_status); } &&
ca81d7a0
JD
18286 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18287 { (case "(($ac_try" in
18288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18289 *) ac_try_echo=$ac_try;;
18290esac
18291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18292 (eval "$ac_try") 2>&5
edfaf76d
LK
18293 ac_status=$?
18294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18295 (exit $ac_status); }; } &&
18296 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
18297 { (case "(($ac_try" in
18298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18299 *) ac_try_echo=$ac_try;;
18300esac
18301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18302 (eval "$ac_try") 2>&5
98418dba 18303 ac_status=$?
c0d27fcc 18304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
18305 (exit $ac_status); }; }; then
18306 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 18307else
98418dba 18308 echo "$as_me: failed program was:" >&5
19650fd6
AS
18309sed 's/^/| /' conftest.$ac_ext >&5
18310
ca81d7a0 18311 ac_cv_lib_getloadavg_getloadavg=no
98418dba 18312fi
ca81d7a0
JD
18313
18314rm -f core conftest.err conftest.$ac_objext \
edfaf76d 18315 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
18316LIBS=$ac_check_lib_save_LIBS
18317fi
ca81d7a0
JD
18318{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
18319echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
18320if test $ac_cv_lib_getloadavg_getloadavg = yes; then
18321 LIBS="-lgetloadavg $LIBS"
18322else
18323 LIBS=$ac_getloadavg_LIBS
ba4481b5 18324fi
ba4481b5
DL
18325
18326fi
98418dba
CW
18327
18328# Make sure it is really in the library, if we think we found it,
18329# otherwise set up the replacement function.
18330
18331for ac_func in getloadavg
18332do
18333as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18334{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18335echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18336if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 18337 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18338else
503d2be0 18339 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18340/* confdefs.h. */
18341_ACEOF
18342cat confdefs.h >>conftest.$ac_ext
18343cat >>conftest.$ac_ext <<_ACEOF
18344/* end confdefs.h. */
edfaf76d
LK
18345/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18346 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18347#define $ac_func innocuous_$ac_func
18348
ba4481b5 18349/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18350 which can conflict with char $ac_func (); below.
18351 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18352 <limits.h> exists even on freestanding compilers. */
edfaf76d 18353
19650fd6
AS
18354#ifdef __STDC__
18355# include <limits.h>
18356#else
18357# include <assert.h>
18358#endif
edfaf76d
LK
18359
18360#undef $ac_func
18361
ca81d7a0
JD
18362/* Override any GCC internal prototype to avoid an error.
18363 Use char because int might match the return type of a GCC
18364 builtin and then its argument prototype would still apply. */
503d2be0
AS
18365#ifdef __cplusplus
18366extern "C"
18367#endif
503d2be0 18368char $ac_func ();
ba4481b5
DL
18369/* The GNU C library defines this for functions which it implements
18370 to always fail with ENOSYS. Some functions are actually named
18371 something starting with __ and the normal name is an alias. */
ca81d7a0 18372#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 18373choke me
cd958eb3
MB
18374#endif
18375
19650fd6
AS
18376int
18377main ()
18378{
ca81d7a0 18379return $ac_func ();
503d2be0
AS
18380 ;
18381 return 0;
18382}
18383_ACEOF
18384rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18385if { (ac_try="$ac_link"
18386case "(($ac_try" in
18387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18388 *) ac_try_echo=$ac_try;;
18389esac
18390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18391 (eval "$ac_link") 2>conftest.er1
503d2be0 18392 ac_status=$?
edfaf76d
LK
18393 grep -v '^ *+' conftest.er1 >conftest.err
18394 rm -f conftest.er1
18395 cat conftest.err >&5
c0d27fcc 18396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18397 (exit $ac_status); } &&
ca81d7a0
JD
18398 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18399 { (case "(($ac_try" in
18400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18401 *) ac_try_echo=$ac_try;;
18402esac
18403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18404 (eval "$ac_try") 2>&5
edfaf76d
LK
18405 ac_status=$?
18406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18407 (exit $ac_status); }; } &&
18408 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
18409 { (case "(($ac_try" in
18410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18411 *) ac_try_echo=$ac_try;;
18412esac
18413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18414 (eval "$ac_try") 2>&5
503d2be0 18415 ac_status=$?
c0d27fcc 18416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18417 (exit $ac_status); }; }; then
18418 eval "$as_ac_var=yes"
18419else
18420 echo "$as_me: failed program was:" >&5
19650fd6
AS
18421sed 's/^/| /' conftest.$ac_ext >&5
18422
ca81d7a0 18423 eval "$as_ac_var=no"
503d2be0 18424fi
ca81d7a0
JD
18425
18426rm -f core conftest.err conftest.$ac_objext \
edfaf76d 18427 conftest$ac_exeext conftest.$ac_ext
503d2be0 18428fi
ca81d7a0
JD
18429ac_res=`eval echo '${'$as_ac_var'}'`
18430 { echo "$as_me:$LINENO: result: $ac_res" >&5
18431echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18432if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18433 cat >>confdefs.h <<_ACEOF
98418dba 18434#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18435_ACEOF
503d2be0 18436
98418dba 18437else
ca81d7a0 18438 case " $LIBOBJS " in
edfaf76d 18439 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
18440 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
18441 ;;
edfaf76d
LK
18442esac
18443
ba4481b5 18444
c0d27fcc 18445cat >>confdefs.h <<\_ACEOF
98418dba 18446#define C_GETLOADAVG 1
c0d27fcc 18447_ACEOF
ba4481b5 18448
98418dba
CW
18449# Figure out what our getloadavg.c needs.
18450ac_have_func=no
c0d27fcc 18451if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
18452 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
18453echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 18454if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 18455 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18456fi
ca81d7a0
JD
18457{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
18458echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 18459else
c0d27fcc 18460 # Is the header compilable?
ca81d7a0
JD
18461{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
18462echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 18463cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18464/* confdefs.h. */
18465_ACEOF
18466cat confdefs.h >>conftest.$ac_ext
18467cat >>conftest.$ac_ext <<_ACEOF
18468/* end confdefs.h. */
c0d27fcc
MR
18469$ac_includes_default
18470#include <sys/dg_sys_info.h>
18471_ACEOF
18472rm -f conftest.$ac_objext
ca81d7a0
JD
18473if { (ac_try="$ac_compile"
18474case "(($ac_try" in
18475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18476 *) ac_try_echo=$ac_try;;
18477esac
18478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18479 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18480 ac_status=$?
edfaf76d
LK
18481 grep -v '^ *+' conftest.er1 >conftest.err
18482 rm -f conftest.er1
18483 cat conftest.err >&5
c0d27fcc
MR
18484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18485 (exit $ac_status); } &&
ca81d7a0
JD
18486 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18487 { (case "(($ac_try" in
18488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18489 *) ac_try_echo=$ac_try;;
18490esac
18491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18492 (eval "$ac_try") 2>&5
edfaf76d
LK
18493 ac_status=$?
18494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18495 (exit $ac_status); }; } &&
18496 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
18497 { (case "(($ac_try" in
18498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18499 *) ac_try_echo=$ac_try;;
18500esac
18501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18502 (eval "$ac_try") 2>&5
c0d27fcc
MR
18503 ac_status=$?
18504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18505 (exit $ac_status); }; }; then
18506 ac_header_compiler=yes
18507else
18508 echo "$as_me: failed program was:" >&5
19650fd6
AS
18509sed 's/^/| /' conftest.$ac_ext >&5
18510
ca81d7a0 18511 ac_header_compiler=no
c0d27fcc 18512fi
ca81d7a0
JD
18513
18514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18515{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18516echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18517
18518# Is the header present?
ca81d7a0
JD
18519{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
18520echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 18521cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18522/* confdefs.h. */
18523_ACEOF
18524cat confdefs.h >>conftest.$ac_ext
18525cat >>conftest.$ac_ext <<_ACEOF
18526/* end confdefs.h. */
98418dba
CW
18527#include <sys/dg_sys_info.h>
18528_ACEOF
ca81d7a0
JD
18529if { (ac_try="$ac_cpp conftest.$ac_ext"
18530case "(($ac_try" in
18531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18532 *) ac_try_echo=$ac_try;;
18533esac
18534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18535 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 18536 ac_status=$?
6bae0ccf 18537 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18538 rm -f conftest.er1
18539 cat conftest.err >&5
c0d27fcc 18540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
18541 (exit $ac_status); } >/dev/null; then
18542 if test -s conftest.err; then
18543 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 18544 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
18545 else
18546 ac_cpp_err=
18547 fi
18548else
18549 ac_cpp_err=yes
ba4481b5 18550fi
98418dba 18551if test -z "$ac_cpp_err"; then
c0d27fcc 18552 ac_header_preproc=yes
98418dba
CW
18553else
18554 echo "$as_me: failed program was:" >&5
19650fd6
AS
18555sed 's/^/| /' conftest.$ac_ext >&5
18556
c0d27fcc 18557 ac_header_preproc=no
ba4481b5 18558fi
ca81d7a0 18559
98418dba 18560rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18561{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18562echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18563
18564# So? What about this header?
edfaf76d
LK
18565case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18566 yes:no: )
c0d27fcc
MR
18567 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
18568echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18569 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
18570echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
18571 ac_header_preproc=yes
19650fd6 18572 ;;
edfaf76d 18573 no:yes:* )
c0d27fcc
MR
18574 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
18575echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18576 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
18577echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
18578 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
18579echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
18580 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
18581echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18582 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 18583echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18584 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
18585echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18586
19650fd6 18587 ;;
c0d27fcc 18588esac
ca81d7a0
JD
18589{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
18590echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
18591if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
18592 echo $ECHO_N "(cached) $ECHO_C" >&6
18593else
18594 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 18595fi
ca81d7a0
JD
18596{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
18597echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
18598
18599fi
98418dba
CW
18600if test $ac_cv_header_sys_dg_sys_info_h = yes; then
18601 ac_have_func=yes
ba4481b5 18602
c0d27fcc 18603cat >>confdefs.h <<\_ACEOF
98418dba 18604#define DGUX 1
c0d27fcc
MR
18605_ACEOF
18606
503d2be0 18607
ca81d7a0
JD
18608{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
18609echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 18610if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 18611 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18612else
503d2be0 18613 ac_check_lib_save_LIBS=$LIBS
98418dba 18614LIBS="-ldgc $LIBS"
503d2be0 18615cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18616/* confdefs.h. */
18617_ACEOF
18618cat confdefs.h >>conftest.$ac_ext
18619cat >>conftest.$ac_ext <<_ACEOF
18620/* end confdefs.h. */
503d2be0 18621
ca81d7a0
JD
18622/* Override any GCC internal prototype to avoid an error.
18623 Use char because int might match the return type of a GCC
18624 builtin and then its argument prototype would still apply. */
503d2be0
AS
18625#ifdef __cplusplus
18626extern "C"
18627#endif
98418dba 18628char dg_sys_info ();
503d2be0
AS
18629int
18630main ()
18631{
ca81d7a0 18632return dg_sys_info ();
503d2be0
AS
18633 ;
18634 return 0;
18635}
18636_ACEOF
18637rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18638if { (ac_try="$ac_link"
18639case "(($ac_try" in
18640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18641 *) ac_try_echo=$ac_try;;
18642esac
18643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18644 (eval "$ac_link") 2>conftest.er1
503d2be0 18645 ac_status=$?
edfaf76d
LK
18646 grep -v '^ *+' conftest.er1 >conftest.err
18647 rm -f conftest.er1
18648 cat conftest.err >&5
c0d27fcc 18649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18650 (exit $ac_status); } &&
ca81d7a0
JD
18651 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18652 { (case "(($ac_try" in
18653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18654 *) ac_try_echo=$ac_try;;
18655esac
18656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18657 (eval "$ac_try") 2>&5
edfaf76d
LK
18658 ac_status=$?
18659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18660 (exit $ac_status); }; } &&
18661 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
18662 { (case "(($ac_try" in
18663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18664 *) ac_try_echo=$ac_try;;
18665esac
18666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18667 (eval "$ac_try") 2>&5
503d2be0 18668 ac_status=$?
c0d27fcc 18669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18670 (exit $ac_status); }; }; then
98418dba 18671 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
18672else
18673 echo "$as_me: failed program was:" >&5
19650fd6
AS
18674sed 's/^/| /' conftest.$ac_ext >&5
18675
ca81d7a0 18676 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 18677fi
ca81d7a0
JD
18678
18679rm -f core conftest.err conftest.$ac_objext \
edfaf76d 18680 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18681LIBS=$ac_check_lib_save_LIBS
18682fi
ca81d7a0
JD
18683{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
18684echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 18685if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 18686 cat >>confdefs.h <<_ACEOF
98418dba 18687#define HAVE_LIBDGC 1
c0d27fcc 18688_ACEOF
ba4481b5 18689
98418dba 18690 LIBS="-ldgc $LIBS"
ba4481b5 18691
ba4481b5
DL
18692fi
18693
98418dba 18694fi
503d2be0 18695
c0d27fcc
MR
18696
18697
18698if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
18699 { echo "$as_me:$LINENO: checking for locale.h" >&5
18700echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 18701if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 18702 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18703fi
ca81d7a0
JD
18704{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
18705echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 18706else
c0d27fcc 18707 # Is the header compilable?
ca81d7a0
JD
18708{ echo "$as_me:$LINENO: checking locale.h usability" >&5
18709echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 18710cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18711/* confdefs.h. */
18712_ACEOF
18713cat confdefs.h >>conftest.$ac_ext
18714cat >>conftest.$ac_ext <<_ACEOF
18715/* end confdefs.h. */
c0d27fcc
MR
18716$ac_includes_default
18717#include <locale.h>
18718_ACEOF
18719rm -f conftest.$ac_objext
ca81d7a0
JD
18720if { (ac_try="$ac_compile"
18721case "(($ac_try" in
18722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18723 *) ac_try_echo=$ac_try;;
18724esac
18725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18726 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18727 ac_status=$?
edfaf76d
LK
18728 grep -v '^ *+' conftest.er1 >conftest.err
18729 rm -f conftest.er1
18730 cat conftest.err >&5
c0d27fcc
MR
18731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18732 (exit $ac_status); } &&
ca81d7a0
JD
18733 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18734 { (case "(($ac_try" in
18735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18736 *) ac_try_echo=$ac_try;;
18737esac
18738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18739 (eval "$ac_try") 2>&5
edfaf76d
LK
18740 ac_status=$?
18741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18742 (exit $ac_status); }; } &&
18743 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
18744 { (case "(($ac_try" in
18745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18746 *) ac_try_echo=$ac_try;;
18747esac
18748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18749 (eval "$ac_try") 2>&5
c0d27fcc
MR
18750 ac_status=$?
18751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18752 (exit $ac_status); }; }; then
18753 ac_header_compiler=yes
18754else
18755 echo "$as_me: failed program was:" >&5
19650fd6
AS
18756sed 's/^/| /' conftest.$ac_ext >&5
18757
ca81d7a0 18758 ac_header_compiler=no
c0d27fcc 18759fi
ca81d7a0
JD
18760
18761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18762{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18763echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18764
18765# Is the header present?
ca81d7a0
JD
18766{ echo "$as_me:$LINENO: checking locale.h presence" >&5
18767echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 18768cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18769/* confdefs.h. */
18770_ACEOF
18771cat confdefs.h >>conftest.$ac_ext
18772cat >>conftest.$ac_ext <<_ACEOF
18773/* end confdefs.h. */
98418dba 18774#include <locale.h>
503d2be0 18775_ACEOF
ca81d7a0
JD
18776if { (ac_try="$ac_cpp conftest.$ac_ext"
18777case "(($ac_try" in
18778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18779 *) ac_try_echo=$ac_try;;
18780esac
18781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18782 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18783 ac_status=$?
6bae0ccf 18784 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18785 rm -f conftest.er1
18786 cat conftest.err >&5
c0d27fcc 18787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
18788 (exit $ac_status); } >/dev/null; then
18789 if test -s conftest.err; then
18790 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 18791 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
18792 else
18793 ac_cpp_err=
18794 fi
503d2be0 18795else
98418dba 18796 ac_cpp_err=yes
503d2be0 18797fi
98418dba 18798if test -z "$ac_cpp_err"; then
c0d27fcc 18799 ac_header_preproc=yes
98418dba
CW
18800else
18801 echo "$as_me: failed program was:" >&5
19650fd6
AS
18802sed 's/^/| /' conftest.$ac_ext >&5
18803
c0d27fcc 18804 ac_header_preproc=no
ba4481b5 18805fi
ca81d7a0 18806
98418dba 18807rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18808{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18809echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18810
18811# So? What about this header?
edfaf76d
LK
18812case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18813 yes:no: )
c0d27fcc
MR
18814 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
18815echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18816 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
18817echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
18818 ac_header_preproc=yes
19650fd6 18819 ;;
edfaf76d 18820 no:yes:* )
c0d27fcc
MR
18821 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
18822echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18823 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
18824echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
18825 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
18826echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
18827 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
18828echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18829 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 18830echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18831 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
18832echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18833
19650fd6 18834 ;;
c0d27fcc 18835esac
ca81d7a0
JD
18836{ echo "$as_me:$LINENO: checking for locale.h" >&5
18837echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
18838if test "${ac_cv_header_locale_h+set}" = set; then
18839 echo $ECHO_N "(cached) $ECHO_C" >&6
18840else
18841 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 18842fi
ca81d7a0
JD
18843{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
18844echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 18845
c0d27fcc
MR
18846fi
18847
18848
18849
98418dba 18850for ac_func in setlocale
ba4481b5 18851do
503d2be0 18852as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18853{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18854echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18855if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 18856 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18857else
503d2be0 18858 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18859/* confdefs.h. */
18860_ACEOF
18861cat confdefs.h >>conftest.$ac_ext
18862cat >>conftest.$ac_ext <<_ACEOF
18863/* end confdefs.h. */
edfaf76d
LK
18864/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18865 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18866#define $ac_func innocuous_$ac_func
18867
ba4481b5 18868/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18869 which can conflict with char $ac_func (); below.
18870 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18871 <limits.h> exists even on freestanding compilers. */
edfaf76d 18872
19650fd6
AS
18873#ifdef __STDC__
18874# include <limits.h>
18875#else
18876# include <assert.h>
18877#endif
edfaf76d
LK
18878
18879#undef $ac_func
18880
ca81d7a0
JD
18881/* Override any GCC internal prototype to avoid an error.
18882 Use char because int might match the return type of a GCC
18883 builtin and then its argument prototype would still apply. */
503d2be0
AS
18884#ifdef __cplusplus
18885extern "C"
18886#endif
503d2be0 18887char $ac_func ();
ba4481b5
DL
18888/* The GNU C library defines this for functions which it implements
18889 to always fail with ENOSYS. Some functions are actually named
18890 something starting with __ and the normal name is an alias. */
ca81d7a0 18891#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 18892choke me
ba4481b5
DL
18893#endif
18894
19650fd6
AS
18895int
18896main ()
18897{
ca81d7a0 18898return $ac_func ();
503d2be0
AS
18899 ;
18900 return 0;
18901}
18902_ACEOF
18903rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18904if { (ac_try="$ac_link"
18905case "(($ac_try" in
18906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18907 *) ac_try_echo=$ac_try;;
18908esac
18909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18910 (eval "$ac_link") 2>conftest.er1
503d2be0 18911 ac_status=$?
edfaf76d
LK
18912 grep -v '^ *+' conftest.er1 >conftest.err
18913 rm -f conftest.er1
18914 cat conftest.err >&5
c0d27fcc 18915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18916 (exit $ac_status); } &&
ca81d7a0
JD
18917 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18918 { (case "(($ac_try" in
18919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18920 *) ac_try_echo=$ac_try;;
18921esac
18922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18923 (eval "$ac_try") 2>&5
edfaf76d
LK
18924 ac_status=$?
18925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18926 (exit $ac_status); }; } &&
18927 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
18928 { (case "(($ac_try" in
18929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18930 *) ac_try_echo=$ac_try;;
18931esac
18932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18933 (eval "$ac_try") 2>&5
503d2be0 18934 ac_status=$?
c0d27fcc 18935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18936 (exit $ac_status); }; }; then
18937 eval "$as_ac_var=yes"
18938else
18939 echo "$as_me: failed program was:" >&5
19650fd6
AS
18940sed 's/^/| /' conftest.$ac_ext >&5
18941
ca81d7a0 18942 eval "$as_ac_var=no"
503d2be0 18943fi
ca81d7a0
JD
18944
18945rm -f core conftest.err conftest.$ac_objext \
edfaf76d 18946 conftest$ac_exeext conftest.$ac_ext
503d2be0 18947fi
ca81d7a0
JD
18948ac_res=`eval echo '${'$as_ac_var'}'`
18949 { echo "$as_me:$LINENO: result: $ac_res" >&5
18950echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18951if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18952 cat >>confdefs.h <<_ACEOF
503d2be0 18953#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18954_ACEOF
ba4481b5 18955
ba4481b5
DL
18956fi
18957done
18958
c0d27fcc 18959
98418dba
CW
18960# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
18961# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
18962# Irix 4.0.5F has the header but not the library.
18963if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
18964 ac_have_func=yes
18965
c0d27fcc 18966cat >>confdefs.h <<\_ACEOF
98418dba 18967#define SVR4 1
c0d27fcc 18968_ACEOF
98418dba
CW
18969
18970fi
18971
18972if test $ac_have_func = no; then
c0d27fcc 18973 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
18974 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18975echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 18976if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 18977 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18978fi
ca81d7a0
JD
18979{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18980echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 18981else
c0d27fcc 18982 # Is the header compilable?
ca81d7a0
JD
18983{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
18984echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18985cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18986/* confdefs.h. */
18987_ACEOF
18988cat confdefs.h >>conftest.$ac_ext
18989cat >>conftest.$ac_ext <<_ACEOF
18990/* end confdefs.h. */
c0d27fcc
MR
18991$ac_includes_default
18992#include <inq_stats/cpustats.h>
18993_ACEOF
18994rm -f conftest.$ac_objext
ca81d7a0
JD
18995if { (ac_try="$ac_compile"
18996case "(($ac_try" in
18997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18998 *) ac_try_echo=$ac_try;;
18999esac
19000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19001 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 19002 ac_status=$?
edfaf76d
LK
19003 grep -v '^ *+' conftest.er1 >conftest.err
19004 rm -f conftest.er1
19005 cat conftest.err >&5
c0d27fcc
MR
19006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19007 (exit $ac_status); } &&
ca81d7a0
JD
19008 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19009 { (case "(($ac_try" in
19010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19011 *) ac_try_echo=$ac_try;;
19012esac
19013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19014 (eval "$ac_try") 2>&5
edfaf76d
LK
19015 ac_status=$?
19016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19017 (exit $ac_status); }; } &&
19018 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
19019 { (case "(($ac_try" in
19020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19021 *) ac_try_echo=$ac_try;;
19022esac
19023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19024 (eval "$ac_try") 2>&5
c0d27fcc
MR
19025 ac_status=$?
19026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19027 (exit $ac_status); }; }; then
19028 ac_header_compiler=yes
19029else
19030 echo "$as_me: failed program was:" >&5
19650fd6
AS
19031sed 's/^/| /' conftest.$ac_ext >&5
19032
ca81d7a0 19033 ac_header_compiler=no
c0d27fcc 19034fi
ca81d7a0
JD
19035
19036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19037{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19038echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
19039
19040# Is the header present?
ca81d7a0
JD
19041{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
19042echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 19043cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19044/* confdefs.h. */
19045_ACEOF
19046cat confdefs.h >>conftest.$ac_ext
19047cat >>conftest.$ac_ext <<_ACEOF
19048/* end confdefs.h. */
98418dba 19049#include <inq_stats/cpustats.h>
503d2be0 19050_ACEOF
ca81d7a0
JD
19051if { (ac_try="$ac_cpp conftest.$ac_ext"
19052case "(($ac_try" in
19053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19054 *) ac_try_echo=$ac_try;;
19055esac
19056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19057 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 19058 ac_status=$?
6bae0ccf 19059 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19060 rm -f conftest.er1
19061 cat conftest.err >&5
c0d27fcc 19062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19063 (exit $ac_status); } >/dev/null; then
19064 if test -s conftest.err; then
19065 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19066 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19067 else
19068 ac_cpp_err=
19069 fi
19070else
19071 ac_cpp_err=yes
19072fi
19073if test -z "$ac_cpp_err"; then
c0d27fcc 19074 ac_header_preproc=yes
503d2be0
AS
19075else
19076 echo "$as_me: failed program was:" >&5
19650fd6
AS
19077sed 's/^/| /' conftest.$ac_ext >&5
19078
c0d27fcc 19079 ac_header_preproc=no
ba4481b5 19080fi
ca81d7a0 19081
503d2be0 19082rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
19083{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19084echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
19085
19086# So? What about this header?
edfaf76d
LK
19087case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19088 yes:no: )
c0d27fcc
MR
19089 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
19090echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19091 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
19092echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
19093 ac_header_preproc=yes
19650fd6 19094 ;;
edfaf76d 19095 no:yes:* )
c0d27fcc
MR
19096 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
19097echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
19098 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
19099echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
19100 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
19101echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
19102 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
19103echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19104 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 19105echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19106 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
19107echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 19108
19650fd6 19109 ;;
c0d27fcc 19110esac
ca81d7a0
JD
19111{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
19112echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
19113if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
19114 echo $ECHO_N "(cached) $ECHO_C" >&6
19115else
19116 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 19117fi
ca81d7a0
JD
19118{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
19119echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
19120
19121fi
98418dba
CW
19122if test $ac_cv_header_inq_stats_cpustats_h = yes; then
19123 ac_have_func=yes
ba4481b5 19124
c0d27fcc 19125cat >>confdefs.h <<\_ACEOF
98418dba 19126#define UMAX 1
c0d27fcc 19127_ACEOF
98418dba 19128
c0d27fcc
MR
19129
19130cat >>confdefs.h <<\_ACEOF
98418dba 19131#define UMAX4_3 1
c0d27fcc 19132_ACEOF
98418dba
CW
19133
19134fi
19135
c0d27fcc 19136
98418dba
CW
19137fi
19138
19139if test $ac_have_func = no; then
c0d27fcc 19140 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
19141 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
19142echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 19143if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 19144 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 19145fi
ca81d7a0
JD
19146{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
19147echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 19148else
c0d27fcc 19149 # Is the header compilable?
ca81d7a0
JD
19150{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
19151echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 19152cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19153/* confdefs.h. */
19154_ACEOF
19155cat confdefs.h >>conftest.$ac_ext
19156cat >>conftest.$ac_ext <<_ACEOF
19157/* end confdefs.h. */
c0d27fcc
MR
19158$ac_includes_default
19159#include <sys/cpustats.h>
19160_ACEOF
19161rm -f conftest.$ac_objext
ca81d7a0
JD
19162if { (ac_try="$ac_compile"
19163case "(($ac_try" in
19164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19165 *) ac_try_echo=$ac_try;;
19166esac
19167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19168 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 19169 ac_status=$?
edfaf76d
LK
19170 grep -v '^ *+' conftest.er1 >conftest.err
19171 rm -f conftest.er1
19172 cat conftest.err >&5
c0d27fcc
MR
19173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19174 (exit $ac_status); } &&
ca81d7a0
JD
19175 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19176 { (case "(($ac_try" in
19177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19178 *) ac_try_echo=$ac_try;;
19179esac
19180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19181 (eval "$ac_try") 2>&5
edfaf76d
LK
19182 ac_status=$?
19183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19184 (exit $ac_status); }; } &&
19185 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
19186 { (case "(($ac_try" in
19187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19188 *) ac_try_echo=$ac_try;;
19189esac
19190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19191 (eval "$ac_try") 2>&5
c0d27fcc
MR
19192 ac_status=$?
19193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19194 (exit $ac_status); }; }; then
19195 ac_header_compiler=yes
19196else
19197 echo "$as_me: failed program was:" >&5
19650fd6
AS
19198sed 's/^/| /' conftest.$ac_ext >&5
19199
ca81d7a0 19200 ac_header_compiler=no
c0d27fcc 19201fi
ca81d7a0
JD
19202
19203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19204{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19205echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
19206
19207# Is the header present?
ca81d7a0
JD
19208{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
19209echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 19210cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19211/* confdefs.h. */
19212_ACEOF
19213cat confdefs.h >>conftest.$ac_ext
19214cat >>conftest.$ac_ext <<_ACEOF
19215/* end confdefs.h. */
98418dba
CW
19216#include <sys/cpustats.h>
19217_ACEOF
ca81d7a0
JD
19218if { (ac_try="$ac_cpp conftest.$ac_ext"
19219case "(($ac_try" in
19220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19221 *) ac_try_echo=$ac_try;;
19222esac
19223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19224 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 19225 ac_status=$?
6bae0ccf 19226 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
19227 rm -f conftest.er1
19228 cat conftest.err >&5
c0d27fcc 19229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
19230 (exit $ac_status); } >/dev/null; then
19231 if test -s conftest.err; then
19232 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19233 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
19234 else
19235 ac_cpp_err=
19236 fi
19237else
19238 ac_cpp_err=yes
503d2be0 19239fi
98418dba 19240if test -z "$ac_cpp_err"; then
c0d27fcc 19241 ac_header_preproc=yes
98418dba
CW
19242else
19243 echo "$as_me: failed program was:" >&5
19650fd6
AS
19244sed 's/^/| /' conftest.$ac_ext >&5
19245
c0d27fcc 19246 ac_header_preproc=no
98418dba 19247fi
ca81d7a0 19248
98418dba 19249rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
19250{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19251echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
19252
19253# So? What about this header?
edfaf76d
LK
19254case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19255 yes:no: )
c0d27fcc
MR
19256 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
19257echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19258 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
19259echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
19260 ac_header_preproc=yes
19650fd6 19261 ;;
edfaf76d 19262 no:yes:* )
c0d27fcc
MR
19263 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
19264echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
19265 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
19266echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
19267 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
19268echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
19269 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
19270echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19271 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 19272echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19273 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
19274echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 19275
19650fd6 19276 ;;
c0d27fcc 19277esac
ca81d7a0
JD
19278{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
19279echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
19280if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
19281 echo $ECHO_N "(cached) $ECHO_C" >&6
19282else
19283 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 19284fi
ca81d7a0
JD
19285{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
19286echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
19287
19288fi
98418dba 19289if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 19290 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 19291#define UMAX 1
c0d27fcc 19292_ACEOF
ba4481b5 19293
98418dba
CW
19294fi
19295
c0d27fcc 19296
98418dba
CW
19297fi
19298
19299if test $ac_have_func = no; then
19300
19301for ac_header in mach/mach.h
2c9dccc9
PJ
19302do
19303as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
19304if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19305 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19306echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19307if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 19308 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 19309fi
ca81d7a0
JD
19310ac_res=`eval echo '${'$as_ac_Header'}'`
19311 { echo "$as_me:$LINENO: result: $ac_res" >&5
19312echo "${ECHO_T}$ac_res" >&6; }
98418dba 19313else
c0d27fcc 19314 # Is the header compilable?
ca81d7a0
JD
19315{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
19316echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 19317cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19318/* confdefs.h. */
19319_ACEOF
19320cat confdefs.h >>conftest.$ac_ext
19321cat >>conftest.$ac_ext <<_ACEOF
19322/* end confdefs.h. */
c0d27fcc
MR
19323$ac_includes_default
19324#include <$ac_header>
19325_ACEOF
19326rm -f conftest.$ac_objext
ca81d7a0
JD
19327if { (ac_try="$ac_compile"
19328case "(($ac_try" in
19329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19330 *) ac_try_echo=$ac_try;;
19331esac
19332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19333 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 19334 ac_status=$?
edfaf76d
LK
19335 grep -v '^ *+' conftest.er1 >conftest.err
19336 rm -f conftest.er1
19337 cat conftest.err >&5
c0d27fcc
MR
19338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19339 (exit $ac_status); } &&
ca81d7a0
JD
19340 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19341 { (case "(($ac_try" in
19342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19343 *) ac_try_echo=$ac_try;;
19344esac
19345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19346 (eval "$ac_try") 2>&5
edfaf76d
LK
19347 ac_status=$?
19348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19349 (exit $ac_status); }; } &&
19350 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
19351 { (case "(($ac_try" in
19352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19353 *) ac_try_echo=$ac_try;;
19354esac
19355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19356 (eval "$ac_try") 2>&5
c0d27fcc
MR
19357 ac_status=$?
19358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19359 (exit $ac_status); }; }; then
19360 ac_header_compiler=yes
19361else
19362 echo "$as_me: failed program was:" >&5
19650fd6
AS
19363sed 's/^/| /' conftest.$ac_ext >&5
19364
ca81d7a0 19365 ac_header_compiler=no
c0d27fcc 19366fi
ca81d7a0
JD
19367
19368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19369{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19370echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
19371
19372# Is the header present?
ca81d7a0
JD
19373{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
19374echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 19375cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19376/* confdefs.h. */
19377_ACEOF
19378cat confdefs.h >>conftest.$ac_ext
19379cat >>conftest.$ac_ext <<_ACEOF
19380/* end confdefs.h. */
2c9dccc9
PJ
19381#include <$ac_header>
19382_ACEOF
ca81d7a0
JD
19383if { (ac_try="$ac_cpp conftest.$ac_ext"
19384case "(($ac_try" in
19385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19386 *) ac_try_echo=$ac_try;;
19387esac
19388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19389 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 19390 ac_status=$?
6bae0ccf 19391 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
19392 rm -f conftest.er1
19393 cat conftest.err >&5
c0d27fcc 19394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
19395 (exit $ac_status); } >/dev/null; then
19396 if test -s conftest.err; then
19397 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19398 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2c9dccc9
PJ
19399 else
19400 ac_cpp_err=
19401 fi
19402else
19403 ac_cpp_err=yes
19404fi
19405if test -z "$ac_cpp_err"; then
c0d27fcc
MR
19406 ac_header_preproc=yes
19407else
19408 echo "$as_me: failed program was:" >&5
19650fd6
AS
19409sed 's/^/| /' conftest.$ac_ext >&5
19410
c0d27fcc
MR
19411 ac_header_preproc=no
19412fi
ca81d7a0 19413
c0d27fcc 19414rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
19415{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19416echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
19417
19418# So? What about this header?
edfaf76d
LK
19419case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19420 yes:no: )
c0d27fcc
MR
19421 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19422echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19423 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19424echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19425 ac_header_preproc=yes
19650fd6 19426 ;;
edfaf76d 19427 no:yes:* )
c0d27fcc
MR
19428 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19429echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19430 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19431echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19432 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19433echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19434 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19435echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19436 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19437echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19438 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19439echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 19440
19650fd6 19441 ;;
c0d27fcc 19442esac
ca81d7a0
JD
19443{ echo "$as_me:$LINENO: checking for $ac_header" >&5
19444echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19445if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
19446 echo $ECHO_N "(cached) $ECHO_C" >&6
19447else
edfaf76d 19448 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 19449fi
ca81d7a0
JD
19450ac_res=`eval echo '${'$as_ac_Header'}'`
19451 { echo "$as_me:$LINENO: result: $ac_res" >&5
19452echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
19453
19454fi
19455if test `eval echo '${'$as_ac_Header'}'` = yes; then
19456 cat >>confdefs.h <<_ACEOF
19457#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19458_ACEOF
19459
19460fi
19461
19462done
19463
19464fi
19465
19466
19467for ac_header in nlist.h
19468do
19469as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
19470if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19471 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19472echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19473if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
19474 echo $ECHO_N "(cached) $ECHO_C" >&6
19475fi
ca81d7a0
JD
19476ac_res=`eval echo '${'$as_ac_Header'}'`
19477 { echo "$as_me:$LINENO: result: $ac_res" >&5
19478echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
19479else
19480 # Is the header compilable?
ca81d7a0
JD
19481{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
19482echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 19483cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19484/* confdefs.h. */
19485_ACEOF
19486cat confdefs.h >>conftest.$ac_ext
19487cat >>conftest.$ac_ext <<_ACEOF
19488/* end confdefs.h. */
c0d27fcc
MR
19489$ac_includes_default
19490#include <$ac_header>
19491_ACEOF
19492rm -f conftest.$ac_objext
ca81d7a0
JD
19493if { (ac_try="$ac_compile"
19494case "(($ac_try" in
19495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19496 *) ac_try_echo=$ac_try;;
19497esac
19498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19499 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 19500 ac_status=$?
edfaf76d
LK
19501 grep -v '^ *+' conftest.er1 >conftest.err
19502 rm -f conftest.er1
19503 cat conftest.err >&5
c0d27fcc
MR
19504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19505 (exit $ac_status); } &&
ca81d7a0
JD
19506 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19507 { (case "(($ac_try" in
19508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19509 *) ac_try_echo=$ac_try;;
19510esac
19511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19512 (eval "$ac_try") 2>&5
edfaf76d
LK
19513 ac_status=$?
19514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19515 (exit $ac_status); }; } &&
19516 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
19517 { (case "(($ac_try" in
19518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19519 *) ac_try_echo=$ac_try;;
19520esac
19521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19522 (eval "$ac_try") 2>&5
c0d27fcc
MR
19523 ac_status=$?
19524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19525 (exit $ac_status); }; }; then
19526 ac_header_compiler=yes
2c9dccc9
PJ
19527else
19528 echo "$as_me: failed program was:" >&5
19650fd6
AS
19529sed 's/^/| /' conftest.$ac_ext >&5
19530
ca81d7a0 19531 ac_header_compiler=no
98418dba 19532fi
ca81d7a0
JD
19533
19534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19535{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19536echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 19537
c0d27fcc 19538# Is the header present?
ca81d7a0
JD
19539{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
19540echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 19541cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19542/* confdefs.h. */
19543_ACEOF
19544cat confdefs.h >>conftest.$ac_ext
19545cat >>conftest.$ac_ext <<_ACEOF
19546/* end confdefs.h. */
503d2be0
AS
19547#include <$ac_header>
19548_ACEOF
ca81d7a0
JD
19549if { (ac_try="$ac_cpp conftest.$ac_ext"
19550case "(($ac_try" in
19551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19552 *) ac_try_echo=$ac_try;;
19553esac
19554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19555 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 19556 ac_status=$?
6bae0ccf 19557 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19558 rm -f conftest.er1
19559 cat conftest.err >&5
c0d27fcc 19560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19561 (exit $ac_status); } >/dev/null; then
19562 if test -s conftest.err; then
19563 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19564 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19565 else
19566 ac_cpp_err=
19567 fi
19568else
19569 ac_cpp_err=yes
19570fi
19571if test -z "$ac_cpp_err"; then
c0d27fcc 19572 ac_header_preproc=yes
503d2be0
AS
19573else
19574 echo "$as_me: failed program was:" >&5
19650fd6
AS
19575sed 's/^/| /' conftest.$ac_ext >&5
19576
c0d27fcc 19577 ac_header_preproc=no
b5de8dc0 19578fi
ca81d7a0 19579
503d2be0 19580rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
19581{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19582echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
19583
19584# So? What about this header?
edfaf76d
LK
19585case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19586 yes:no: )
c0d27fcc
MR
19587 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19588echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19589 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19590echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19591 ac_header_preproc=yes
19650fd6 19592 ;;
edfaf76d 19593 no:yes:* )
c0d27fcc
MR
19594 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19595echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19596 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19597echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19598 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19599echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19600 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19601echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19602 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19603echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19604 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19605echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 19606
19650fd6 19607 ;;
c0d27fcc 19608esac
ca81d7a0
JD
19609{ echo "$as_me:$LINENO: checking for $ac_header" >&5
19610echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19611if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
19612 echo $ECHO_N "(cached) $ECHO_C" >&6
19613else
edfaf76d 19614 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 19615fi
ca81d7a0
JD
19616ac_res=`eval echo '${'$as_ac_Header'}'`
19617 { echo "$as_me:$LINENO: result: $ac_res" >&5
19618echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
19619
19620fi
98418dba 19621if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19622 cat >>confdefs.h <<_ACEOF
98418dba 19623#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19624_ACEOF
ca81d7a0
JD
19625 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
19626echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 19627if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 19628 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 19629else
503d2be0 19630 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19631/* confdefs.h. */
19632_ACEOF
19633cat confdefs.h >>conftest.$ac_ext
19634cat >>conftest.$ac_ext <<_ACEOF
19635/* end confdefs.h. */
98418dba 19636#include <nlist.h>
b5de8dc0 19637
503d2be0
AS
19638int
19639main ()
19640{
98418dba
CW
19641static struct nlist ac_aggr;
19642if (ac_aggr.n_un.n_name)
19643return 0;
503d2be0
AS
19644 ;
19645 return 0;
19646}
19647_ACEOF
98418dba 19648rm -f conftest.$ac_objext
ca81d7a0
JD
19649if { (ac_try="$ac_compile"
19650case "(($ac_try" in
19651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19652 *) ac_try_echo=$ac_try;;
19653esac
19654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19655 (eval "$ac_compile") 2>conftest.er1
503d2be0 19656 ac_status=$?
edfaf76d
LK
19657 grep -v '^ *+' conftest.er1 >conftest.err
19658 rm -f conftest.er1
19659 cat conftest.err >&5
c0d27fcc 19660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19661 (exit $ac_status); } &&
ca81d7a0
JD
19662 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19663 { (case "(($ac_try" in
19664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19665 *) ac_try_echo=$ac_try;;
19666esac
19667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19668 (eval "$ac_try") 2>&5
503d2be0 19669 ac_status=$?
c0d27fcc 19670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
19671 (exit $ac_status); }; } &&
19672 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
19673 { (case "(($ac_try" in
19674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19675 *) ac_try_echo=$ac_try;;
19676esac
19677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19678 (eval "$ac_try") 2>&5
edfaf76d
LK
19679 ac_status=$?
19680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19681 (exit $ac_status); }; }; then
19682 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
19683else
19684 echo "$as_me: failed program was:" >&5
19650fd6
AS
19685sed 's/^/| /' conftest.$ac_ext >&5
19686
ca81d7a0 19687 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19688/* confdefs.h. */
19689_ACEOF
19690cat confdefs.h >>conftest.$ac_ext
19691cat >>conftest.$ac_ext <<_ACEOF
19692/* end confdefs.h. */
6bae0ccf
DL
19693#include <nlist.h>
19694
19695int
19696main ()
19697{
19698static struct nlist ac_aggr;
19699if (sizeof ac_aggr.n_un.n_name)
19700return 0;
19701 ;
19702 return 0;
19703}
19704_ACEOF
19705rm -f conftest.$ac_objext
ca81d7a0
JD
19706if { (ac_try="$ac_compile"
19707case "(($ac_try" in
19708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19709 *) ac_try_echo=$ac_try;;
19710esac
19711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19712 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 19713 ac_status=$?
edfaf76d
LK
19714 grep -v '^ *+' conftest.er1 >conftest.err
19715 rm -f conftest.er1
19716 cat conftest.err >&5
6bae0ccf
DL
19717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19718 (exit $ac_status); } &&
ca81d7a0
JD
19719 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19720 { (case "(($ac_try" in
19721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19722 *) ac_try_echo=$ac_try;;
19723esac
19724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19725 (eval "$ac_try") 2>&5
edfaf76d
LK
19726 ac_status=$?
19727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19728 (exit $ac_status); }; } &&
19729 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
19730 { (case "(($ac_try" in
19731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19732 *) ac_try_echo=$ac_try;;
19733esac
19734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19735 (eval "$ac_try") 2>&5
6bae0ccf
DL
19736 ac_status=$?
19737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19738 (exit $ac_status); }; }; then
19739 ac_cv_member_struct_nlist_n_un_n_name=yes
19740else
19741 echo "$as_me: failed program was:" >&5
19650fd6
AS
19742sed 's/^/| /' conftest.$ac_ext >&5
19743
ca81d7a0 19744 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 19745fi
ca81d7a0
JD
19746
19747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 19748fi
ca81d7a0
JD
19749
19750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 19751fi
ca81d7a0
JD
19752{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
19753echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 19754if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 19755
c0d27fcc 19756cat >>confdefs.h <<_ACEOF
98418dba 19757#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 19758_ACEOF
b5de8dc0 19759
c0d27fcc
MR
19760
19761cat >>confdefs.h <<\_ACEOF
98418dba 19762#define NLIST_NAME_UNION 1
c0d27fcc 19763_ACEOF
b5de8dc0 19764
98418dba 19765fi
b5de8dc0 19766
c0d27fcc 19767
98418dba 19768fi
c0d27fcc 19769
98418dba 19770done
b5de8dc0 19771
98418dba
CW
19772fi
19773done
b5de8dc0 19774
c0d27fcc 19775
98418dba 19776# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
19777{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
19778echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
19779if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
19780 echo $ECHO_N "(cached) $ECHO_C" >&6
19781else
19782 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19783/* confdefs.h. */
19784_ACEOF
19785cat confdefs.h >>conftest.$ac_ext
19786cat >>conftest.$ac_ext <<_ACEOF
19787/* end confdefs.h. */
6bae0ccf 19788#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
19789#ifdef LDAV_PRIVILEGED
19790Yowza Am I SETGID yet
19791#endif
19792_ACEOF
19793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 19794 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
19795 ac_cv_func_getloadavg_setgid=yes
19796else
19797 ac_cv_func_getloadavg_setgid=no
19798fi
19799rm -f conftest*
b5de8dc0 19800
98418dba 19801fi
ca81d7a0
JD
19802{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
19803echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
19804if test $ac_cv_func_getloadavg_setgid = yes; then
19805 NEED_SETGID=true
b5de8dc0 19806
c0d27fcc 19807cat >>confdefs.h <<\_ACEOF
98418dba 19808#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 19809_ACEOF
98418dba 19810
b5de8dc0 19811else
98418dba 19812 NEED_SETGID=false
b5de8dc0 19813fi
98418dba
CW
19814
19815if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
19816 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
19817echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
19818if test "${ac_cv_group_kmem+set}" = set; then
19819 echo $ECHO_N "(cached) $ECHO_C" >&6
19820else
19821 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
19822 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
19823 # If we got an error (system does not support symlinks), try without -L.
19824 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
19825 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 19826 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
19827 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
19828 / /s/.* //;p;'`
19829
b5de8dc0 19830fi
ca81d7a0
JD
19831{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
19832echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 19833 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 19834fi
98418dba
CW
19835if test "x$ac_save_LIBS" = x; then
19836 GETLOADAVG_LIBS=$LIBS
19837else
19838 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 19839fi
98418dba 19840LIBS=$ac_save_LIBS
b5de8dc0 19841
c0d27fcc
MR
19842
19843
ca81d7a0
JD
19844{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
19845echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 19846if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 19847 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19848else
b936fae4
AS
19849 while :; do
19850 ac_cv_sys_largefile_source=no
503d2be0 19851 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19852/* confdefs.h. */
19853_ACEOF
19854cat confdefs.h >>conftest.$ac_ext
19855cat >>conftest.$ac_ext <<_ACEOF
19856/* end confdefs.h. */
b936fae4 19857#include <stdio.h>
503d2be0
AS
19858int
19859main ()
19860{
b936fae4
AS
19861return !fseeko;
19862 ;
19863 return 0;
19864}
19865_ACEOF
19866rm -f conftest.$ac_objext
ca81d7a0
JD
19867if { (ac_try="$ac_compile"
19868case "(($ac_try" in
19869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19870 *) ac_try_echo=$ac_try;;
19871esac
19872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19873 (eval "$ac_compile") 2>conftest.er1
b936fae4 19874 ac_status=$?
edfaf76d
LK
19875 grep -v '^ *+' conftest.er1 >conftest.err
19876 rm -f conftest.er1
19877 cat conftest.err >&5
c0d27fcc 19878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 19879 (exit $ac_status); } &&
ca81d7a0
JD
19880 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19881 { (case "(($ac_try" in
19882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19883 *) ac_try_echo=$ac_try;;
19884esac
19885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19886 (eval "$ac_try") 2>&5
edfaf76d
LK
19887 ac_status=$?
19888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19889 (exit $ac_status); }; } &&
19890 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
19891 { (case "(($ac_try" in
19892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19893 *) ac_try_echo=$ac_try;;
19894esac
19895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19896 (eval "$ac_try") 2>&5
b936fae4 19897 ac_status=$?
c0d27fcc 19898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
19899 (exit $ac_status); }; }; then
19900 break
19901else
19902 echo "$as_me: failed program was:" >&5
19650fd6
AS
19903sed 's/^/| /' conftest.$ac_ext >&5
19904
ca81d7a0 19905
b936fae4 19906fi
ca81d7a0
JD
19907
19908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4 19909 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19910/* confdefs.h. */
19911_ACEOF
19912cat confdefs.h >>conftest.$ac_ext
19913cat >>conftest.$ac_ext <<_ACEOF
19914/* end confdefs.h. */
b936fae4
AS
19915#define _LARGEFILE_SOURCE 1
19916#include <stdio.h>
b936fae4
AS
19917int
19918main ()
19919{
19920return !fseeko;
19921 ;
19922 return 0;
19923}
19924_ACEOF
19925rm -f conftest.$ac_objext
ca81d7a0
JD
19926if { (ac_try="$ac_compile"
19927case "(($ac_try" in
19928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19929 *) ac_try_echo=$ac_try;;
19930esac
19931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19932 (eval "$ac_compile") 2>conftest.er1
b936fae4 19933 ac_status=$?
edfaf76d
LK
19934 grep -v '^ *+' conftest.er1 >conftest.err
19935 rm -f conftest.er1
19936 cat conftest.err >&5
c0d27fcc 19937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 19938 (exit $ac_status); } &&
ca81d7a0
JD
19939 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19940 { (case "(($ac_try" in
19941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19942 *) ac_try_echo=$ac_try;;
19943esac
19944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19945 (eval "$ac_try") 2>&5
edfaf76d
LK
19946 ac_status=$?
19947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19948 (exit $ac_status); }; } &&
19949 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
19950 { (case "(($ac_try" in
19951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19952 *) ac_try_echo=$ac_try;;
19953esac
19954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19955 (eval "$ac_try") 2>&5
b936fae4 19956 ac_status=$?
c0d27fcc 19957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
19958 (exit $ac_status); }; }; then
19959 ac_cv_sys_largefile_source=1; break
19960else
19961 echo "$as_me: failed program was:" >&5
19650fd6
AS
19962sed 's/^/| /' conftest.$ac_ext >&5
19963
ca81d7a0 19964
b936fae4 19965fi
ca81d7a0
JD
19966
19967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4
AS
19968 break
19969done
19970fi
ca81d7a0
JD
19971{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
19972echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
b936fae4
AS
19973if test "$ac_cv_sys_largefile_source" != no; then
19974
c0d27fcc 19975cat >>confdefs.h <<_ACEOF
b936fae4 19976#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 19977_ACEOF
b936fae4
AS
19978
19979fi
19980rm -f conftest*
4c343001 19981
b936fae4
AS
19982# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
19983# in glibc 2.1.3, but that breaks too many other things.
19984# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
ca81d7a0
JD
19985{ echo "$as_me:$LINENO: checking for fseeko" >&5
19986echo $ECHO_N "checking for fseeko... $ECHO_C" >&6; }
b936fae4
AS
19987if test "${ac_cv_func_fseeko+set}" = set; then
19988 echo $ECHO_N "(cached) $ECHO_C" >&6
19989else
19990 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19991/* confdefs.h. */
19992_ACEOF
19993cat confdefs.h >>conftest.$ac_ext
19994cat >>conftest.$ac_ext <<_ACEOF
19995/* end confdefs.h. */
b936fae4 19996#include <stdio.h>
b936fae4
AS
19997int
19998main ()
19999{
20000return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
20001 ;
20002 return 0;
20003}
20004_ACEOF
20005rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20006if { (ac_try="$ac_link"
20007case "(($ac_try" in
20008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20009 *) ac_try_echo=$ac_try;;
20010esac
20011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20012 (eval "$ac_link") 2>conftest.er1
503d2be0 20013 ac_status=$?
edfaf76d
LK
20014 grep -v '^ *+' conftest.er1 >conftest.err
20015 rm -f conftest.er1
20016 cat conftest.err >&5
c0d27fcc 20017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20018 (exit $ac_status); } &&
ca81d7a0
JD
20019 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20020 { (case "(($ac_try" in
20021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20022 *) ac_try_echo=$ac_try;;
20023esac
20024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20025 (eval "$ac_try") 2>&5
edfaf76d
LK
20026 ac_status=$?
20027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20028 (exit $ac_status); }; } &&
20029 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
20030 { (case "(($ac_try" in
20031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20032 *) ac_try_echo=$ac_try;;
20033esac
20034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20035 (eval "$ac_try") 2>&5
503d2be0 20036 ac_status=$?
c0d27fcc 20037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20038 (exit $ac_status); }; }; then
b936fae4 20039 ac_cv_func_fseeko=yes
503d2be0
AS
20040else
20041 echo "$as_me: failed program was:" >&5
19650fd6
AS
20042sed 's/^/| /' conftest.$ac_ext >&5
20043
ca81d7a0 20044 ac_cv_func_fseeko=no
503d2be0 20045fi
ca81d7a0
JD
20046
20047rm -f core conftest.err conftest.$ac_objext \
edfaf76d 20048 conftest$ac_exeext conftest.$ac_ext
503d2be0 20049fi
ca81d7a0
JD
20050{ echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
20051echo "${ECHO_T}$ac_cv_func_fseeko" >&6; }
b936fae4
AS
20052if test $ac_cv_func_fseeko = yes; then
20053
c0d27fcc 20054cat >>confdefs.h <<\_ACEOF
b936fae4 20055#define HAVE_FSEEKO 1
c0d27fcc 20056_ACEOF
b936fae4 20057
4c343001
DL
20058fi
20059
c0d27fcc 20060
52dbaac8
PE
20061# Configure getopt.
20062# getopt.m4 serial 10
20063
20064# The getopt module assume you want GNU getopt, with getopt_long etc,
20065# rather than vanilla POSIX getopt. This means your your code should
20066# always include <getopt.h> for the getopt prototypes.
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078# Prerequisites of lib/getopt*.
20079
20080
20081
10a3b1a1 20082
52dbaac8
PE
20083 GETOPT_H=
20084
20085for ac_header in getopt.h
20086do
20087as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20088if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20089 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20090echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20091if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
20092 echo $ECHO_N "(cached) $ECHO_C" >&6
20093fi
ca81d7a0
JD
20094ac_res=`eval echo '${'$as_ac_Header'}'`
20095 { echo "$as_me:$LINENO: result: $ac_res" >&5
20096echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
20097else
20098 # Is the header compilable?
ca81d7a0
JD
20099{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20100echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
20101cat >conftest.$ac_ext <<_ACEOF
20102/* confdefs.h. */
20103_ACEOF
20104cat confdefs.h >>conftest.$ac_ext
20105cat >>conftest.$ac_ext <<_ACEOF
20106/* end confdefs.h. */
20107$ac_includes_default
20108#include <$ac_header>
20109_ACEOF
20110rm -f conftest.$ac_objext
ca81d7a0
JD
20111if { (ac_try="$ac_compile"
20112case "(($ac_try" in
20113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20114 *) ac_try_echo=$ac_try;;
20115esac
20116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20117 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
20118 ac_status=$?
20119 grep -v '^ *+' conftest.er1 >conftest.err
20120 rm -f conftest.er1
20121 cat conftest.err >&5
20122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20123 (exit $ac_status); } &&
ca81d7a0
JD
20124 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20125 { (case "(($ac_try" in
20126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20127 *) ac_try_echo=$ac_try;;
20128esac
20129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20130 (eval "$ac_try") 2>&5
52dbaac8
PE
20131 ac_status=$?
20132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20133 (exit $ac_status); }; } &&
20134 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
20135 { (case "(($ac_try" in
20136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20137 *) ac_try_echo=$ac_try;;
20138esac
20139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20140 (eval "$ac_try") 2>&5
52dbaac8
PE
20141 ac_status=$?
20142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20143 (exit $ac_status); }; }; then
20144 ac_header_compiler=yes
20145else
20146 echo "$as_me: failed program was:" >&5
20147sed 's/^/| /' conftest.$ac_ext >&5
20148
ca81d7a0 20149 ac_header_compiler=no
52dbaac8 20150fi
ca81d7a0
JD
20151
20152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20153{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20154echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
20155
20156# Is the header present?
ca81d7a0
JD
20157{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20158echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
20159cat >conftest.$ac_ext <<_ACEOF
20160/* confdefs.h. */
20161_ACEOF
20162cat confdefs.h >>conftest.$ac_ext
20163cat >>conftest.$ac_ext <<_ACEOF
20164/* end confdefs.h. */
20165#include <$ac_header>
20166_ACEOF
ca81d7a0
JD
20167if { (ac_try="$ac_cpp conftest.$ac_ext"
20168case "(($ac_try" in
20169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20170 *) ac_try_echo=$ac_try;;
20171esac
20172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20173 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
20174 ac_status=$?
20175 grep -v '^ *+' conftest.er1 >conftest.err
20176 rm -f conftest.er1
20177 cat conftest.err >&5
20178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20179 (exit $ac_status); } >/dev/null; then
20180 if test -s conftest.err; then
20181 ac_cpp_err=$ac_c_preproc_warn_flag
20182 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20183 else
20184 ac_cpp_err=
20185 fi
20186else
20187 ac_cpp_err=yes
20188fi
20189if test -z "$ac_cpp_err"; then
20190 ac_header_preproc=yes
20191else
20192 echo "$as_me: failed program was:" >&5
20193sed 's/^/| /' conftest.$ac_ext >&5
20194
20195 ac_header_preproc=no
20196fi
ca81d7a0 20197
52dbaac8 20198rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20199{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20200echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
20201
20202# So? What about this header?
20203case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20204 yes:no: )
20205 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20206echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20207 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20208echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20209 ac_header_preproc=yes
20210 ;;
20211 no:yes:* )
20212 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20213echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20214 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20215echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20216 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20217echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20218 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20219echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
20220 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20221echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20222 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20223echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20224
52dbaac8
PE
20225 ;;
20226esac
ca81d7a0
JD
20227{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20228echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20229if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
20230 echo $ECHO_N "(cached) $ECHO_C" >&6
20231else
20232 eval "$as_ac_Header=\$ac_header_preproc"
20233fi
ca81d7a0
JD
20234ac_res=`eval echo '${'$as_ac_Header'}'`
20235 { echo "$as_me:$LINENO: result: $ac_res" >&5
20236echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
20237
20238fi
20239if test `eval echo '${'$as_ac_Header'}'` = yes; then
20240 cat >>confdefs.h <<_ACEOF
20241#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20242_ACEOF
20243
20244else
20245 GETOPT_H=getopt.h
20246fi
20247
20248done
20249
20250 if test -z "$GETOPT_H"; then
20251
20252for ac_func in getopt_long_only
20253do
20254as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
20255{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20256echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20257if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
20258 echo $ECHO_N "(cached) $ECHO_C" >&6
20259else
20260 cat >conftest.$ac_ext <<_ACEOF
20261/* confdefs.h. */
20262_ACEOF
20263cat confdefs.h >>conftest.$ac_ext
20264cat >>conftest.$ac_ext <<_ACEOF
20265/* end confdefs.h. */
20266/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20267 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20268#define $ac_func innocuous_$ac_func
20269
20270/* System header to define __stub macros and hopefully few prototypes,
20271 which can conflict with char $ac_func (); below.
20272 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20273 <limits.h> exists even on freestanding compilers. */
20274
20275#ifdef __STDC__
20276# include <limits.h>
20277#else
20278# include <assert.h>
20279#endif
20280
20281#undef $ac_func
20282
ca81d7a0
JD
20283/* Override any GCC internal prototype to avoid an error.
20284 Use char because int might match the return type of a GCC
20285 builtin and then its argument prototype would still apply. */
52dbaac8
PE
20286#ifdef __cplusplus
20287extern "C"
52dbaac8 20288#endif
52dbaac8
PE
20289char $ac_func ();
20290/* The GNU C library defines this for functions which it implements
20291 to always fail with ENOSYS. Some functions are actually named
20292 something starting with __ and the normal name is an alias. */
ca81d7a0 20293#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 20294choke me
52dbaac8
PE
20295#endif
20296
20297int
20298main ()
20299{
ca81d7a0 20300return $ac_func ();
52dbaac8
PE
20301 ;
20302 return 0;
20303}
20304_ACEOF
20305rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20306if { (ac_try="$ac_link"
20307case "(($ac_try" in
20308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20309 *) ac_try_echo=$ac_try;;
20310esac
20311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20312 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
20313 ac_status=$?
20314 grep -v '^ *+' conftest.er1 >conftest.err
20315 rm -f conftest.er1
20316 cat conftest.err >&5
20317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20318 (exit $ac_status); } &&
ca81d7a0
JD
20319 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20320 { (case "(($ac_try" in
20321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20322 *) ac_try_echo=$ac_try;;
20323esac
20324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20325 (eval "$ac_try") 2>&5
52dbaac8
PE
20326 ac_status=$?
20327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20328 (exit $ac_status); }; } &&
20329 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
20330 { (case "(($ac_try" in
20331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20332 *) ac_try_echo=$ac_try;;
20333esac
20334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20335 (eval "$ac_try") 2>&5
52dbaac8
PE
20336 ac_status=$?
20337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20338 (exit $ac_status); }; }; then
20339 eval "$as_ac_var=yes"
20340else
20341 echo "$as_me: failed program was:" >&5
20342sed 's/^/| /' conftest.$ac_ext >&5
20343
ca81d7a0 20344 eval "$as_ac_var=no"
52dbaac8 20345fi
ca81d7a0
JD
20346
20347rm -f core conftest.err conftest.$ac_objext \
52dbaac8
PE
20348 conftest$ac_exeext conftest.$ac_ext
20349fi
ca81d7a0
JD
20350ac_res=`eval echo '${'$as_ac_var'}'`
20351 { echo "$as_me:$LINENO: result: $ac_res" >&5
20352echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
20353if test `eval echo '${'$as_ac_var'}'` = yes; then
20354 cat >>confdefs.h <<_ACEOF
20355#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20356_ACEOF
20357
20358else
20359 GETOPT_H=getopt.h
20360fi
20361done
20362
20363 fi
20364
20365 if test -z "$GETOPT_H"; then
ca81d7a0
JD
20366 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
20367echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
20368if test "${ac_cv_have_decl_optreset+set}" = set; then
20369 echo $ECHO_N "(cached) $ECHO_C" >&6
20370else
20371 cat >conftest.$ac_ext <<_ACEOF
20372/* confdefs.h. */
20373_ACEOF
20374cat confdefs.h >>conftest.$ac_ext
20375cat >>conftest.$ac_ext <<_ACEOF
20376/* end confdefs.h. */
20377#include <getopt.h>
20378
20379int
20380main ()
20381{
20382#ifndef optreset
20383 char *p = (char *) optreset;
ca81d7a0 20384 return !p;
52dbaac8
PE
20385#endif
20386
20387 ;
20388 return 0;
20389}
20390_ACEOF
20391rm -f conftest.$ac_objext
ca81d7a0
JD
20392if { (ac_try="$ac_compile"
20393case "(($ac_try" in
20394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20395 *) ac_try_echo=$ac_try;;
20396esac
20397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20398 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
20399 ac_status=$?
20400 grep -v '^ *+' conftest.er1 >conftest.err
20401 rm -f conftest.er1
20402 cat conftest.err >&5
20403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20404 (exit $ac_status); } &&
ca81d7a0
JD
20405 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20406 { (case "(($ac_try" in
20407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20408 *) ac_try_echo=$ac_try;;
20409esac
20410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20411 (eval "$ac_try") 2>&5
52dbaac8
PE
20412 ac_status=$?
20413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20414 (exit $ac_status); }; } &&
20415 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
20416 { (case "(($ac_try" in
20417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20418 *) ac_try_echo=$ac_try;;
20419esac
20420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20421 (eval "$ac_try") 2>&5
52dbaac8
PE
20422 ac_status=$?
20423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20424 (exit $ac_status); }; }; then
20425 ac_cv_have_decl_optreset=yes
20426else
20427 echo "$as_me: failed program was:" >&5
20428sed 's/^/| /' conftest.$ac_ext >&5
20429
ca81d7a0 20430 ac_cv_have_decl_optreset=no
52dbaac8 20431fi
ca81d7a0
JD
20432
20433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 20434fi
ca81d7a0
JD
20435{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
20436echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
20437if test $ac_cv_have_decl_optreset = yes; then
20438 GETOPT_H=getopt.h
20439fi
20440
20441 fi
20442
20443 if test -z "$GETOPT_H"; then
ca81d7a0
JD
20444 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
20445echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
20446if test "${gl_cv_func_gnu_getopt+set}" = set; then
20447 echo $ECHO_N "(cached) $ECHO_C" >&6
20448else
20449 if test "$cross_compiling" = yes; then
ca81d7a0
JD
20450 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
20451echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
20452if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
20453 echo $ECHO_N "(cached) $ECHO_C" >&6
20454else
20455 cat >conftest.$ac_ext <<_ACEOF
20456/* confdefs.h. */
20457_ACEOF
20458cat confdefs.h >>conftest.$ac_ext
20459cat >>conftest.$ac_ext <<_ACEOF
20460/* end confdefs.h. */
20461#include <getopt.h>
20462
20463int
20464main ()
20465{
20466#ifndef getopt_clip
20467 char *p = (char *) getopt_clip;
ca81d7a0 20468 return !p;
52dbaac8
PE
20469#endif
20470
20471 ;
20472 return 0;
20473}
20474_ACEOF
20475rm -f conftest.$ac_objext
ca81d7a0
JD
20476if { (ac_try="$ac_compile"
20477case "(($ac_try" in
20478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20479 *) ac_try_echo=$ac_try;;
20480esac
20481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20482 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
20483 ac_status=$?
20484 grep -v '^ *+' conftest.er1 >conftest.err
20485 rm -f conftest.er1
20486 cat conftest.err >&5
20487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20488 (exit $ac_status); } &&
ca81d7a0
JD
20489 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20490 { (case "(($ac_try" in
20491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20492 *) ac_try_echo=$ac_try;;
20493esac
20494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20495 (eval "$ac_try") 2>&5
52dbaac8
PE
20496 ac_status=$?
20497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20498 (exit $ac_status); }; } &&
20499 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
20500 { (case "(($ac_try" in
20501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20502 *) ac_try_echo=$ac_try;;
20503esac
20504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20505 (eval "$ac_try") 2>&5
52dbaac8
PE
20506 ac_status=$?
20507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20508 (exit $ac_status); }; }; then
20509 ac_cv_have_decl_getopt_clip=yes
20510else
20511 echo "$as_me: failed program was:" >&5
20512sed 's/^/| /' conftest.$ac_ext >&5
20513
ca81d7a0 20514 ac_cv_have_decl_getopt_clip=no
52dbaac8 20515fi
ca81d7a0
JD
20516
20517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 20518fi
ca81d7a0
JD
20519{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
20520echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
20521if test $ac_cv_have_decl_getopt_clip = yes; then
20522 gl_cv_func_gnu_getopt=no
20523else
20524 gl_cv_func_gnu_getopt=yes
20525fi
20526
20527else
20528 cat >conftest.$ac_ext <<_ACEOF
20529/* confdefs.h. */
20530_ACEOF
20531cat confdefs.h >>conftest.$ac_ext
20532cat >>conftest.$ac_ext <<_ACEOF
20533/* end confdefs.h. */
20534#include <getopt.h>
20535int
20536main ()
20537{
20538
20539 char *myargv[3];
20540 myargv[0] = "conftest";
20541 myargv[1] = "-+";
20542 myargv[2] = 0;
20543 return getopt (2, myargv, "+a") != '?';
20544
20545 ;
20546 return 0;
20547}
20548_ACEOF
20549rm -f conftest$ac_exeext
ca81d7a0
JD
20550if { (ac_try="$ac_link"
20551case "(($ac_try" in
20552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20553 *) ac_try_echo=$ac_try;;
20554esac
20555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20556 (eval "$ac_link") 2>&5
52dbaac8
PE
20557 ac_status=$?
20558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20559 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
20560 { (case "(($ac_try" in
20561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20562 *) ac_try_echo=$ac_try;;
20563esac
20564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20565 (eval "$ac_try") 2>&5
52dbaac8
PE
20566 ac_status=$?
20567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20568 (exit $ac_status); }; }; then
20569 gl_cv_func_gnu_getopt=yes
20570else
20571 echo "$as_me: program exited with status $ac_status" >&5
20572echo "$as_me: failed program was:" >&5
20573sed 's/^/| /' conftest.$ac_ext >&5
20574
20575( exit $ac_status )
20576gl_cv_func_gnu_getopt=no
20577fi
ca81d7a0 20578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 20579fi
ca81d7a0
JD
20580
20581
52dbaac8 20582fi
ca81d7a0
JD
20583{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
20584echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
20585 if test "$gl_cv_func_gnu_getopt" = "no"; then
20586 GETOPT_H=getopt.h
20587 fi
20588 fi
20589
20590
20591
20592 if test -n "$GETOPT_H"; then
20593
20594
20595 GETOPT_H=getopt.h
20596
20597cat >>confdefs.h <<\_ACEOF
20598#define __GETOPT_PREFIX rpl_
20599_ACEOF
20600
20601
20602
20603 :
20604 GETOPTOBJS='getopt.o getopt1.o'
20605
20606fi
20607
20608
20609
20610
ca81d7a0
JD
20611{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
20612echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
20613if test "${ac_cv_func_getpgrp_void+set}" = set; then
20614 echo $ECHO_N "(cached) $ECHO_C" >&6
20615else
20616 # Use it with a single arg.
20617cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20618/* confdefs.h. */
20619_ACEOF
20620cat confdefs.h >>conftest.$ac_ext
20621cat >>conftest.$ac_ext <<_ACEOF
20622/* end confdefs.h. */
cd958eb3
MB
20623$ac_includes_default
20624int
20625main ()
20626{
20627getpgrp (0);
20628 ;
20629 return 0;
20630}
20631_ACEOF
20632rm -f conftest.$ac_objext
ca81d7a0
JD
20633if { (ac_try="$ac_compile"
20634case "(($ac_try" in
20635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20636 *) ac_try_echo=$ac_try;;
20637esac
20638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20639 (eval "$ac_compile") 2>conftest.er1
cd958eb3 20640 ac_status=$?
edfaf76d
LK
20641 grep -v '^ *+' conftest.er1 >conftest.err
20642 rm -f conftest.er1
20643 cat conftest.err >&5
cd958eb3
MB
20644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20645 (exit $ac_status); } &&
ca81d7a0
JD
20646 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20647 { (case "(($ac_try" in
20648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20649 *) ac_try_echo=$ac_try;;
20650esac
20651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20652 (eval "$ac_try") 2>&5
edfaf76d
LK
20653 ac_status=$?
20654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20655 (exit $ac_status); }; } &&
20656 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
20657 { (case "(($ac_try" in
20658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20659 *) ac_try_echo=$ac_try;;
20660esac
20661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20662 (eval "$ac_try") 2>&5
cd958eb3
MB
20663 ac_status=$?
20664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20665 (exit $ac_status); }; }; then
20666 ac_cv_func_getpgrp_void=no
20667else
20668 echo "$as_me: failed program was:" >&5
19650fd6
AS
20669sed 's/^/| /' conftest.$ac_ext >&5
20670
ca81d7a0 20671 ac_cv_func_getpgrp_void=yes
cd958eb3 20672fi
ca81d7a0
JD
20673
20674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
20675
20676fi
ca81d7a0
JD
20677{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
20678echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
20679if test $ac_cv_func_getpgrp_void = yes; then
20680
20681cat >>confdefs.h <<\_ACEOF
20682#define GETPGRP_VOID 1
20683_ACEOF
20684
20685fi
20686
20687
973a76b1
DL
20688
20689for ac_func in strftime
20690do
20691as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
20692{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20693echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20694if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
20695 echo $ECHO_N "(cached) $ECHO_C" >&6
20696else
20697 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20698/* confdefs.h. */
20699_ACEOF
20700cat confdefs.h >>conftest.$ac_ext
20701cat >>conftest.$ac_ext <<_ACEOF
20702/* end confdefs.h. */
edfaf76d
LK
20703/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20704 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20705#define $ac_func innocuous_$ac_func
20706
973a76b1 20707/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20708 which can conflict with char $ac_func (); below.
20709 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20710 <limits.h> exists even on freestanding compilers. */
edfaf76d 20711
19650fd6
AS
20712#ifdef __STDC__
20713# include <limits.h>
20714#else
20715# include <assert.h>
20716#endif
edfaf76d
LK
20717
20718#undef $ac_func
20719
ca81d7a0
JD
20720/* Override any GCC internal prototype to avoid an error.
20721 Use char because int might match the return type of a GCC
20722 builtin and then its argument prototype would still apply. */
973a76b1
DL
20723#ifdef __cplusplus
20724extern "C"
973a76b1 20725#endif
973a76b1
DL
20726char $ac_func ();
20727/* The GNU C library defines this for functions which it implements
20728 to always fail with ENOSYS. Some functions are actually named
20729 something starting with __ and the normal name is an alias. */
ca81d7a0 20730#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 20731choke me
973a76b1
DL
20732#endif
20733
19650fd6
AS
20734int
20735main ()
20736{
ca81d7a0 20737return $ac_func ();
973a76b1
DL
20738 ;
20739 return 0;
20740}
20741_ACEOF
20742rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20743if { (ac_try="$ac_link"
20744case "(($ac_try" in
20745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20746 *) ac_try_echo=$ac_try;;
20747esac
20748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20749 (eval "$ac_link") 2>conftest.er1
973a76b1 20750 ac_status=$?
edfaf76d
LK
20751 grep -v '^ *+' conftest.er1 >conftest.err
20752 rm -f conftest.er1
20753 cat conftest.err >&5
973a76b1
DL
20754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20755 (exit $ac_status); } &&
ca81d7a0
JD
20756 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20757 { (case "(($ac_try" in
20758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20759 *) ac_try_echo=$ac_try;;
20760esac
20761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20762 (eval "$ac_try") 2>&5
edfaf76d
LK
20763 ac_status=$?
20764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20765 (exit $ac_status); }; } &&
20766 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
20767 { (case "(($ac_try" in
20768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20769 *) ac_try_echo=$ac_try;;
20770esac
20771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20772 (eval "$ac_try") 2>&5
973a76b1
DL
20773 ac_status=$?
20774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20775 (exit $ac_status); }; }; then
20776 eval "$as_ac_var=yes"
20777else
20778 echo "$as_me: failed program was:" >&5
19650fd6
AS
20779sed 's/^/| /' conftest.$ac_ext >&5
20780
ca81d7a0 20781 eval "$as_ac_var=no"
973a76b1 20782fi
ca81d7a0
JD
20783
20784rm -f core conftest.err conftest.$ac_objext \
edfaf76d 20785 conftest$ac_exeext conftest.$ac_ext
973a76b1 20786fi
ca81d7a0
JD
20787ac_res=`eval echo '${'$as_ac_var'}'`
20788 { echo "$as_me:$LINENO: result: $ac_res" >&5
20789echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
20790if test `eval echo '${'$as_ac_var'}'` = yes; then
20791 cat >>confdefs.h <<_ACEOF
20792#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20793_ACEOF
20794
20795else
20796 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
20797{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
20798echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
20799if test "${ac_cv_lib_intl_strftime+set}" = set; then
20800 echo $ECHO_N "(cached) $ECHO_C" >&6
20801else
20802 ac_check_lib_save_LIBS=$LIBS
20803LIBS="-lintl $LIBS"
20804cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20805/* confdefs.h. */
20806_ACEOF
20807cat confdefs.h >>conftest.$ac_ext
20808cat >>conftest.$ac_ext <<_ACEOF
20809/* end confdefs.h. */
973a76b1 20810
ca81d7a0
JD
20811/* Override any GCC internal prototype to avoid an error.
20812 Use char because int might match the return type of a GCC
20813 builtin and then its argument prototype would still apply. */
973a76b1
DL
20814#ifdef __cplusplus
20815extern "C"
20816#endif
973a76b1
DL
20817char strftime ();
20818int
20819main ()
20820{
ca81d7a0 20821return strftime ();
973a76b1
DL
20822 ;
20823 return 0;
20824}
20825_ACEOF
20826rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20827if { (ac_try="$ac_link"
20828case "(($ac_try" in
20829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20830 *) ac_try_echo=$ac_try;;
20831esac
20832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20833 (eval "$ac_link") 2>conftest.er1
973a76b1 20834 ac_status=$?
edfaf76d
LK
20835 grep -v '^ *+' conftest.er1 >conftest.err
20836 rm -f conftest.er1
20837 cat conftest.err >&5
973a76b1
DL
20838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20839 (exit $ac_status); } &&
ca81d7a0
JD
20840 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20841 { (case "(($ac_try" in
20842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20843 *) ac_try_echo=$ac_try;;
20844esac
20845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20846 (eval "$ac_try") 2>&5
edfaf76d
LK
20847 ac_status=$?
20848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20849 (exit $ac_status); }; } &&
20850 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
20851 { (case "(($ac_try" in
20852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20853 *) ac_try_echo=$ac_try;;
20854esac
20855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20856 (eval "$ac_try") 2>&5
973a76b1
DL
20857 ac_status=$?
20858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20859 (exit $ac_status); }; }; then
20860 ac_cv_lib_intl_strftime=yes
20861else
20862 echo "$as_me: failed program was:" >&5
19650fd6
AS
20863sed 's/^/| /' conftest.$ac_ext >&5
20864
ca81d7a0 20865 ac_cv_lib_intl_strftime=no
973a76b1 20866fi
ca81d7a0
JD
20867
20868rm -f core conftest.err conftest.$ac_objext \
edfaf76d 20869 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
20870LIBS=$ac_check_lib_save_LIBS
20871fi
ca81d7a0
JD
20872{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
20873echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
20874if test $ac_cv_lib_intl_strftime = yes; then
20875 cat >>confdefs.h <<\_ACEOF
20876#define HAVE_STRFTIME 1
20877_ACEOF
20878
20879LIBS="-lintl $LIBS"
20880fi
20881
20882fi
20883done
20884
20885
b936fae4
AS
20886# UNIX98 PTYs.
20887
20888for ac_func in grantpt
503d2be0
AS
20889do
20890as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
20891{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20892echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20893if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20894 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 20895else
503d2be0 20896 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20897/* confdefs.h. */
20898_ACEOF
20899cat confdefs.h >>conftest.$ac_ext
20900cat >>conftest.$ac_ext <<_ACEOF
20901/* end confdefs.h. */
edfaf76d
LK
20902/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20903 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20904#define $ac_func innocuous_$ac_func
20905
503d2be0 20906/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20907 which can conflict with char $ac_func (); below.
20908 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20909 <limits.h> exists even on freestanding compilers. */
edfaf76d 20910
19650fd6
AS
20911#ifdef __STDC__
20912# include <limits.h>
20913#else
20914# include <assert.h>
20915#endif
edfaf76d
LK
20916
20917#undef $ac_func
20918
ca81d7a0
JD
20919/* Override any GCC internal prototype to avoid an error.
20920 Use char because int might match the return type of a GCC
20921 builtin and then its argument prototype would still apply. */
503d2be0
AS
20922#ifdef __cplusplus
20923extern "C"
20924#endif
503d2be0 20925char $ac_func ();
503d2be0
AS
20926/* The GNU C library defines this for functions which it implements
20927 to always fail with ENOSYS. Some functions are actually named
20928 something starting with __ and the normal name is an alias. */
ca81d7a0 20929#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 20930choke me
503d2be0 20931#endif
4c343001 20932
19650fd6
AS
20933int
20934main ()
20935{
ca81d7a0 20936return $ac_func ();
503d2be0
AS
20937 ;
20938 return 0;
20939}
20940_ACEOF
20941rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20942if { (ac_try="$ac_link"
20943case "(($ac_try" in
20944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20945 *) ac_try_echo=$ac_try;;
20946esac
20947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20948 (eval "$ac_link") 2>conftest.er1
503d2be0 20949 ac_status=$?
edfaf76d
LK
20950 grep -v '^ *+' conftest.er1 >conftest.err
20951 rm -f conftest.er1
20952 cat conftest.err >&5
c0d27fcc 20953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20954 (exit $ac_status); } &&
ca81d7a0
JD
20955 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20956 { (case "(($ac_try" in
20957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20958 *) ac_try_echo=$ac_try;;
20959esac
20960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20961 (eval "$ac_try") 2>&5
edfaf76d
LK
20962 ac_status=$?
20963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20964 (exit $ac_status); }; } &&
20965 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
20966 { (case "(($ac_try" in
20967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20968 *) ac_try_echo=$ac_try;;
20969esac
20970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20971 (eval "$ac_try") 2>&5
503d2be0 20972 ac_status=$?
c0d27fcc 20973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20974 (exit $ac_status); }; }; then
20975 eval "$as_ac_var=yes"
20976else
20977 echo "$as_me: failed program was:" >&5
19650fd6
AS
20978sed 's/^/| /' conftest.$ac_ext >&5
20979
ca81d7a0 20980 eval "$as_ac_var=no"
503d2be0 20981fi
ca81d7a0
JD
20982
20983rm -f core conftest.err conftest.$ac_objext \
edfaf76d 20984 conftest$ac_exeext conftest.$ac_ext
503d2be0 20985fi
ca81d7a0
JD
20986ac_res=`eval echo '${'$as_ac_var'}'`
20987 { echo "$as_me:$LINENO: result: $ac_res" >&5
20988echo "${ECHO_T}$ac_res" >&6; }
503d2be0 20989if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 20990 cat >>confdefs.h <<_ACEOF
503d2be0 20991#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 20992_ACEOF
4c343001
DL
20993
20994fi
503d2be0
AS
20995done
20996
c0d27fcc 20997
b936fae4 20998# PTY-related GNU extensions.
4c343001 20999
b936fae4
AS
21000for ac_func in getpt
21001do
21002as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
21003{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21004echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21005if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21006 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 21007else
b936fae4 21008 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21009/* confdefs.h. */
21010_ACEOF
21011cat confdefs.h >>conftest.$ac_ext
21012cat >>conftest.$ac_ext <<_ACEOF
21013/* end confdefs.h. */
edfaf76d
LK
21014/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21015 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21016#define $ac_func innocuous_$ac_func
21017
087121cc 21018/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21019 which can conflict with char $ac_func (); below.
21020 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21021 <limits.h> exists even on freestanding compilers. */
edfaf76d 21022
19650fd6
AS
21023#ifdef __STDC__
21024# include <limits.h>
21025#else
21026# include <assert.h>
21027#endif
edfaf76d
LK
21028
21029#undef $ac_func
21030
ca81d7a0
JD
21031/* Override any GCC internal prototype to avoid an error.
21032 Use char because int might match the return type of a GCC
21033 builtin and then its argument prototype would still apply. */
503d2be0
AS
21034#ifdef __cplusplus
21035extern "C"
21036#endif
503d2be0 21037char $ac_func ();
087121cc
GM
21038/* The GNU C library defines this for functions which it implements
21039 to always fail with ENOSYS. Some functions are actually named
21040 something starting with __ and the normal name is an alias. */
ca81d7a0 21041#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 21042choke me
087121cc
GM
21043#endif
21044
19650fd6
AS
21045int
21046main ()
21047{
ca81d7a0 21048return $ac_func ();
503d2be0
AS
21049 ;
21050 return 0;
21051}
21052_ACEOF
21053rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21054if { (ac_try="$ac_link"
21055case "(($ac_try" in
21056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21057 *) ac_try_echo=$ac_try;;
21058esac
21059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21060 (eval "$ac_link") 2>conftest.er1
503d2be0 21061 ac_status=$?
edfaf76d
LK
21062 grep -v '^ *+' conftest.er1 >conftest.err
21063 rm -f conftest.er1
21064 cat conftest.err >&5
c0d27fcc 21065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21066 (exit $ac_status); } &&
ca81d7a0
JD
21067 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21068 { (case "(($ac_try" in
21069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21070 *) ac_try_echo=$ac_try;;
21071esac
21072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21073 (eval "$ac_try") 2>&5
edfaf76d
LK
21074 ac_status=$?
21075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21076 (exit $ac_status); }; } &&
21077 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
21078 { (case "(($ac_try" in
21079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21080 *) ac_try_echo=$ac_try;;
21081esac
21082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21083 (eval "$ac_try") 2>&5
503d2be0 21084 ac_status=$?
c0d27fcc 21085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21086 (exit $ac_status); }; }; then
21087 eval "$as_ac_var=yes"
21088else
21089 echo "$as_me: failed program was:" >&5
19650fd6
AS
21090sed 's/^/| /' conftest.$ac_ext >&5
21091
ca81d7a0 21092 eval "$as_ac_var=no"
503d2be0 21093fi
ca81d7a0
JD
21094
21095rm -f core conftest.err conftest.$ac_objext \
edfaf76d 21096 conftest$ac_exeext conftest.$ac_ext
503d2be0 21097fi
ca81d7a0
JD
21098ac_res=`eval echo '${'$as_ac_var'}'`
21099 { echo "$as_me:$LINENO: result: $ac_res" >&5
21100echo "${ECHO_T}$ac_res" >&6; }
503d2be0 21101if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 21102 cat >>confdefs.h <<_ACEOF
503d2be0 21103#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 21104_ACEOF
087121cc 21105
087121cc
GM
21106fi
21107done
21108
c0d27fcc 21109
ba4481b5
DL
21110# Check this now, so that we will NOT find the above functions in ncurses.
21111# That is because we have not set up to link ncurses in lib-src.
21112# It's better to believe a function is not available
21113# than to expect to find it in ncurses.
503d2be0 21114
ca81d7a0
JD
21115{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
21116echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
21117if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
21118 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21119else
503d2be0 21120 ac_check_lib_save_LIBS=$LIBS
ba4481b5 21121LIBS="-lncurses $LIBS"
503d2be0 21122cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21123/* confdefs.h. */
21124_ACEOF
21125cat confdefs.h >>conftest.$ac_ext
21126cat >>conftest.$ac_ext <<_ACEOF
21127/* end confdefs.h. */
503d2be0 21128
ca81d7a0
JD
21129/* Override any GCC internal prototype to avoid an error.
21130 Use char because int might match the return type of a GCC
21131 builtin and then its argument prototype would still apply. */
503d2be0
AS
21132#ifdef __cplusplus
21133extern "C"
21134#endif
503d2be0
AS
21135char tparm ();
21136int
21137main ()
21138{
ca81d7a0 21139return tparm ();
503d2be0
AS
21140 ;
21141 return 0;
21142}
21143_ACEOF
21144rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21145if { (ac_try="$ac_link"
21146case "(($ac_try" in
21147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21148 *) ac_try_echo=$ac_try;;
21149esac
21150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21151 (eval "$ac_link") 2>conftest.er1
503d2be0 21152 ac_status=$?
edfaf76d
LK
21153 grep -v '^ *+' conftest.er1 >conftest.err
21154 rm -f conftest.er1
21155 cat conftest.err >&5
c0d27fcc 21156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21157 (exit $ac_status); } &&
ca81d7a0
JD
21158 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21159 { (case "(($ac_try" in
21160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21161 *) ac_try_echo=$ac_try;;
21162esac
21163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21164 (eval "$ac_try") 2>&5
edfaf76d
LK
21165 ac_status=$?
21166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21167 (exit $ac_status); }; } &&
21168 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
21169 { (case "(($ac_try" in
21170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21171 *) ac_try_echo=$ac_try;;
21172esac
21173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21174 (eval "$ac_try") 2>&5
503d2be0 21175 ac_status=$?
c0d27fcc 21176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21177 (exit $ac_status); }; }; then
21178 ac_cv_lib_ncurses_tparm=yes
21179else
21180 echo "$as_me: failed program was:" >&5
19650fd6
AS
21181sed 's/^/| /' conftest.$ac_ext >&5
21182
ca81d7a0 21183 ac_cv_lib_ncurses_tparm=no
503d2be0 21184fi
ca81d7a0
JD
21185
21186rm -f core conftest.err conftest.$ac_objext \
edfaf76d 21187 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21188LIBS=$ac_check_lib_save_LIBS
21189fi
ca81d7a0
JD
21190{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
21191echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 21192if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 21193 cat >>confdefs.h <<_ACEOF
503d2be0 21194#define HAVE_LIBNCURSES 1
c0d27fcc 21195_ACEOF
ba4481b5
DL
21196
21197 LIBS="-lncurses $LIBS"
21198
ba4481b5
DL
21199fi
21200
c0d27fcc 21201
84e70f78
KR
21202# Do we need the Hesiod library to provide the support routines?
21203if test "$with_hesiod" = yes ; then
21204 # Don't set $LIBS here -- see comments above.
21205 resolv=no
ca81d7a0
JD
21206 { echo "$as_me:$LINENO: checking for res_send" >&5
21207echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
21208if test "${ac_cv_func_res_send+set}" = set; then
21209 echo $ECHO_N "(cached) $ECHO_C" >&6
21210else
21211 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21212/* confdefs.h. */
21213_ACEOF
21214cat confdefs.h >>conftest.$ac_ext
21215cat >>conftest.$ac_ext <<_ACEOF
21216/* end confdefs.h. */
edfaf76d
LK
21217/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
21218 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21219#define res_send innocuous_res_send
21220
84e70f78 21221/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21222 which can conflict with char res_send (); below.
21223 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21224 <limits.h> exists even on freestanding compilers. */
edfaf76d 21225
19650fd6
AS
21226#ifdef __STDC__
21227# include <limits.h>
21228#else
21229# include <assert.h>
21230#endif
edfaf76d
LK
21231
21232#undef res_send
21233
ca81d7a0
JD
21234/* Override any GCC internal prototype to avoid an error.
21235 Use char because int might match the return type of a GCC
21236 builtin and then its argument prototype would still apply. */
84e70f78
KR
21237#ifdef __cplusplus
21238extern "C"
21239#endif
84e70f78 21240char res_send ();
84e70f78
KR
21241/* The GNU C library defines this for functions which it implements
21242 to always fail with ENOSYS. Some functions are actually named
21243 something starting with __ and the normal name is an alias. */
ca81d7a0 21244#if defined __stub_res_send || defined __stub___res_send
84e70f78 21245choke me
cd958eb3
MB
21246#endif
21247
19650fd6
AS
21248int
21249main ()
21250{
ca81d7a0 21251return res_send ();
84e70f78
KR
21252 ;
21253 return 0;
21254}
21255_ACEOF
21256rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21257if { (ac_try="$ac_link"
21258case "(($ac_try" in
21259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21260 *) ac_try_echo=$ac_try;;
21261esac
21262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21263 (eval "$ac_link") 2>conftest.er1
84e70f78 21264 ac_status=$?
edfaf76d
LK
21265 grep -v '^ *+' conftest.er1 >conftest.err
21266 rm -f conftest.er1
21267 cat conftest.err >&5
c0d27fcc 21268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 21269 (exit $ac_status); } &&
ca81d7a0
JD
21270 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21271 { (case "(($ac_try" in
21272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21273 *) ac_try_echo=$ac_try;;
21274esac
21275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21276 (eval "$ac_try") 2>&5
edfaf76d
LK
21277 ac_status=$?
21278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21279 (exit $ac_status); }; } &&
21280 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
21281 { (case "(($ac_try" in
21282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21283 *) ac_try_echo=$ac_try;;
21284esac
21285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21286 (eval "$ac_try") 2>&5
84e70f78 21287 ac_status=$?
c0d27fcc 21288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
21289 (exit $ac_status); }; }; then
21290 ac_cv_func_res_send=yes
21291else
21292 echo "$as_me: failed program was:" >&5
19650fd6
AS
21293sed 's/^/| /' conftest.$ac_ext >&5
21294
ca81d7a0 21295 ac_cv_func_res_send=no
84e70f78 21296fi
ca81d7a0
JD
21297
21298rm -f core conftest.err conftest.$ac_objext \
edfaf76d 21299 conftest$ac_exeext conftest.$ac_ext
84e70f78 21300fi
ca81d7a0
JD
21301{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
21302echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
21303if test $ac_cv_func_res_send = yes; then
21304 :
21305else
ca81d7a0
JD
21306 { echo "$as_me:$LINENO: checking for __res_send" >&5
21307echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
21308if test "${ac_cv_func___res_send+set}" = set; then
21309 echo $ECHO_N "(cached) $ECHO_C" >&6
21310else
21311 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21312/* confdefs.h. */
21313_ACEOF
21314cat confdefs.h >>conftest.$ac_ext
21315cat >>conftest.$ac_ext <<_ACEOF
21316/* end confdefs.h. */
edfaf76d
LK
21317/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
21318 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21319#define __res_send innocuous___res_send
21320
84e70f78 21321/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21322 which can conflict with char __res_send (); below.
21323 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21324 <limits.h> exists even on freestanding compilers. */
edfaf76d 21325
19650fd6
AS
21326#ifdef __STDC__
21327# include <limits.h>
21328#else
21329# include <assert.h>
21330#endif
edfaf76d
LK
21331
21332#undef __res_send
21333
ca81d7a0
JD
21334/* Override any GCC internal prototype to avoid an error.
21335 Use char because int might match the return type of a GCC
21336 builtin and then its argument prototype would still apply. */
84e70f78
KR
21337#ifdef __cplusplus
21338extern "C"
21339#endif
84e70f78 21340char __res_send ();
84e70f78
KR
21341/* The GNU C library defines this for functions which it implements
21342 to always fail with ENOSYS. Some functions are actually named
21343 something starting with __ and the normal name is an alias. */
ca81d7a0 21344#if defined __stub___res_send || defined __stub_____res_send
84e70f78 21345choke me
84e70f78
KR
21346#endif
21347
19650fd6
AS
21348int
21349main ()
21350{
ca81d7a0 21351return __res_send ();
84e70f78
KR
21352 ;
21353 return 0;
21354}
21355_ACEOF
21356rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21357if { (ac_try="$ac_link"
21358case "(($ac_try" in
21359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21360 *) ac_try_echo=$ac_try;;
21361esac
21362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21363 (eval "$ac_link") 2>conftest.er1
84e70f78 21364 ac_status=$?
edfaf76d
LK
21365 grep -v '^ *+' conftest.er1 >conftest.err
21366 rm -f conftest.er1
21367 cat conftest.err >&5
c0d27fcc 21368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 21369 (exit $ac_status); } &&
ca81d7a0
JD
21370 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21371 { (case "(($ac_try" in
21372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21373 *) ac_try_echo=$ac_try;;
21374esac
21375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21376 (eval "$ac_try") 2>&5
edfaf76d
LK
21377 ac_status=$?
21378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21379 (exit $ac_status); }; } &&
21380 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
21381 { (case "(($ac_try" in
21382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21383 *) ac_try_echo=$ac_try;;
21384esac
21385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21386 (eval "$ac_try") 2>&5
84e70f78 21387 ac_status=$?
c0d27fcc 21388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
21389 (exit $ac_status); }; }; then
21390 ac_cv_func___res_send=yes
21391else
21392 echo "$as_me: failed program was:" >&5
19650fd6
AS
21393sed 's/^/| /' conftest.$ac_ext >&5
21394
ca81d7a0 21395 ac_cv_func___res_send=no
84e70f78 21396fi
ca81d7a0
JD
21397
21398rm -f core conftest.err conftest.$ac_objext \
edfaf76d 21399 conftest$ac_exeext conftest.$ac_ext
84e70f78 21400fi
ca81d7a0
JD
21401{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
21402echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
21403if test $ac_cv_func___res_send = yes; then
21404 :
21405else
ca81d7a0
JD
21406 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
21407echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
21408if test "${ac_cv_lib_resolv_res_send+set}" = set; then
21409 echo $ECHO_N "(cached) $ECHO_C" >&6
21410else
21411 ac_check_lib_save_LIBS=$LIBS
21412LIBS="-lresolv $LIBS"
21413cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21414/* confdefs.h. */
21415_ACEOF
21416cat confdefs.h >>conftest.$ac_ext
21417cat >>conftest.$ac_ext <<_ACEOF
21418/* end confdefs.h. */
84e70f78 21419
ca81d7a0
JD
21420/* Override any GCC internal prototype to avoid an error.
21421 Use char because int might match the return type of a GCC
21422 builtin and then its argument prototype would still apply. */
84e70f78
KR
21423#ifdef __cplusplus
21424extern "C"
21425#endif
84e70f78
KR
21426char res_send ();
21427int
21428main ()
21429{
ca81d7a0 21430return res_send ();
84e70f78
KR
21431 ;
21432 return 0;
21433}
21434_ACEOF
21435rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21436if { (ac_try="$ac_link"
21437case "(($ac_try" in
21438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21439 *) ac_try_echo=$ac_try;;
21440esac
21441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21442 (eval "$ac_link") 2>conftest.er1
84e70f78 21443 ac_status=$?
edfaf76d
LK
21444 grep -v '^ *+' conftest.er1 >conftest.err
21445 rm -f conftest.er1
21446 cat conftest.err >&5
c0d27fcc 21447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 21448 (exit $ac_status); } &&
ca81d7a0
JD
21449 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21450 { (case "(($ac_try" in
21451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21452 *) ac_try_echo=$ac_try;;
21453esac
21454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21455 (eval "$ac_try") 2>&5
edfaf76d
LK
21456 ac_status=$?
21457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21458 (exit $ac_status); }; } &&
21459 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
21460 { (case "(($ac_try" in
21461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21462 *) ac_try_echo=$ac_try;;
21463esac
21464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21465 (eval "$ac_try") 2>&5
84e70f78 21466 ac_status=$?
c0d27fcc 21467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
21468 (exit $ac_status); }; }; then
21469 ac_cv_lib_resolv_res_send=yes
21470else
21471 echo "$as_me: failed program was:" >&5
19650fd6
AS
21472sed 's/^/| /' conftest.$ac_ext >&5
21473
ca81d7a0 21474 ac_cv_lib_resolv_res_send=no
84e70f78 21475fi
ca81d7a0
JD
21476
21477rm -f core conftest.err conftest.$ac_objext \
edfaf76d 21478 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
21479LIBS=$ac_check_lib_save_LIBS
21480fi
ca81d7a0
JD
21481{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
21482echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
21483if test $ac_cv_lib_resolv_res_send = yes; then
21484 resolv=yes
21485else
ca81d7a0
JD
21486 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
21487echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
21488if test "${ac_cv_lib_resolv___res_send+set}" = set; then
21489 echo $ECHO_N "(cached) $ECHO_C" >&6
21490else
21491 ac_check_lib_save_LIBS=$LIBS
21492LIBS="-lresolv $LIBS"
21493cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21494/* confdefs.h. */
21495_ACEOF
21496cat confdefs.h >>conftest.$ac_ext
21497cat >>conftest.$ac_ext <<_ACEOF
21498/* end confdefs.h. */
84e70f78 21499
ca81d7a0
JD
21500/* Override any GCC internal prototype to avoid an error.
21501 Use char because int might match the return type of a GCC
21502 builtin and then its argument prototype would still apply. */
84e70f78
KR
21503#ifdef __cplusplus
21504extern "C"
21505#endif
84e70f78
KR
21506char __res_send ();
21507int
21508main ()
21509{
ca81d7a0 21510return __res_send ();
84e70f78
KR
21511 ;
21512 return 0;
21513}
21514_ACEOF
21515rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21516if { (ac_try="$ac_link"
21517case "(($ac_try" in
21518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21519 *) ac_try_echo=$ac_try;;
21520esac
21521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21522 (eval "$ac_link") 2>conftest.er1
84e70f78 21523 ac_status=$?
edfaf76d
LK
21524 grep -v '^ *+' conftest.er1 >conftest.err
21525 rm -f conftest.er1
21526 cat conftest.err >&5
c0d27fcc 21527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 21528 (exit $ac_status); } &&
ca81d7a0
JD
21529 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21530 { (case "(($ac_try" in
21531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21532 *) ac_try_echo=$ac_try;;
21533esac
21534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21535 (eval "$ac_try") 2>&5
edfaf76d
LK
21536 ac_status=$?
21537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21538 (exit $ac_status); }; } &&
21539 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
21540 { (case "(($ac_try" in
21541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21542 *) ac_try_echo=$ac_try;;
21543esac
21544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21545 (eval "$ac_try") 2>&5
84e70f78 21546 ac_status=$?
c0d27fcc 21547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
21548 (exit $ac_status); }; }; then
21549 ac_cv_lib_resolv___res_send=yes
21550else
21551 echo "$as_me: failed program was:" >&5
19650fd6
AS
21552sed 's/^/| /' conftest.$ac_ext >&5
21553
ca81d7a0 21554 ac_cv_lib_resolv___res_send=no
84e70f78 21555fi
ca81d7a0
JD
21556
21557rm -f core conftest.err conftest.$ac_objext \
edfaf76d 21558 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
21559LIBS=$ac_check_lib_save_LIBS
21560fi
ca81d7a0
JD
21561{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
21562echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
21563if test $ac_cv_lib_resolv___res_send = yes; then
21564 resolv=yes
21565fi
21566
21567fi
21568
21569fi
21570
21571fi
21572
21573 if test "$resolv" = yes ; then
21574 RESOLVLIB=-lresolv
b936fae4 21575
c0d27fcc 21576cat >>confdefs.h <<\_ACEOF
84e70f78 21577#define HAVE_LIBRESOLV 1
c0d27fcc 21578_ACEOF
84e70f78
KR
21579
21580 else
21581 RESOLVLIB=
21582 fi
ca81d7a0
JD
21583 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
21584echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
21585if test "${ac_cv_func_hes_getmailhost+set}" = set; then
21586 echo $ECHO_N "(cached) $ECHO_C" >&6
21587else
21588 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21589/* confdefs.h. */
21590_ACEOF
21591cat confdefs.h >>conftest.$ac_ext
21592cat >>conftest.$ac_ext <<_ACEOF
21593/* end confdefs.h. */
edfaf76d
LK
21594/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
21595 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21596#define hes_getmailhost innocuous_hes_getmailhost
21597
84e70f78 21598/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21599 which can conflict with char hes_getmailhost (); below.
21600 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21601 <limits.h> exists even on freestanding compilers. */
edfaf76d 21602
19650fd6
AS
21603#ifdef __STDC__
21604# include <limits.h>
21605#else
21606# include <assert.h>
21607#endif
edfaf76d
LK
21608
21609#undef hes_getmailhost
21610
ca81d7a0
JD
21611/* Override any GCC internal prototype to avoid an error.
21612 Use char because int might match the return type of a GCC
21613 builtin and then its argument prototype would still apply. */
84e70f78
KR
21614#ifdef __cplusplus
21615extern "C"
21616#endif
84e70f78 21617char hes_getmailhost ();
84e70f78
KR
21618/* The GNU C library defines this for functions which it implements
21619 to always fail with ENOSYS. Some functions are actually named
21620 something starting with __ and the normal name is an alias. */
ca81d7a0 21621#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 21622choke me
cd958eb3
MB
21623#endif
21624
19650fd6
AS
21625int
21626main ()
21627{
ca81d7a0 21628return hes_getmailhost ();
84e70f78
KR
21629 ;
21630 return 0;
21631}
21632_ACEOF
21633rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21634if { (ac_try="$ac_link"
21635case "(($ac_try" in
21636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21637 *) ac_try_echo=$ac_try;;
21638esac
21639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21640 (eval "$ac_link") 2>conftest.er1
84e70f78 21641 ac_status=$?
edfaf76d
LK
21642 grep -v '^ *+' conftest.er1 >conftest.err
21643 rm -f conftest.er1
21644 cat conftest.err >&5
c0d27fcc 21645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 21646 (exit $ac_status); } &&
ca81d7a0
JD
21647 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21648 { (case "(($ac_try" in
21649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21650 *) ac_try_echo=$ac_try;;
21651esac
21652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21653 (eval "$ac_try") 2>&5
edfaf76d
LK
21654 ac_status=$?
21655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21656 (exit $ac_status); }; } &&
21657 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
21658 { (case "(($ac_try" in
21659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21660 *) ac_try_echo=$ac_try;;
21661esac
21662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21663 (eval "$ac_try") 2>&5
84e70f78 21664 ac_status=$?
c0d27fcc 21665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
21666 (exit $ac_status); }; }; then
21667 ac_cv_func_hes_getmailhost=yes
21668else
21669 echo "$as_me: failed program was:" >&5
19650fd6
AS
21670sed 's/^/| /' conftest.$ac_ext >&5
21671
ca81d7a0 21672 ac_cv_func_hes_getmailhost=no
84e70f78 21673fi
ca81d7a0
JD
21674
21675rm -f core conftest.err conftest.$ac_objext \
edfaf76d 21676 conftest$ac_exeext conftest.$ac_ext
84e70f78 21677fi
ca81d7a0
JD
21678{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
21679echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
21680if test $ac_cv_func_hes_getmailhost = yes; then
21681 :
21682else
ca81d7a0
JD
21683 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
21684echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
21685if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
21686 echo $ECHO_N "(cached) $ECHO_C" >&6
21687else
21688 ac_check_lib_save_LIBS=$LIBS
21689LIBS="-lhesiod $RESOLVLIB $LIBS"
21690cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21691/* confdefs.h. */
21692_ACEOF
21693cat confdefs.h >>conftest.$ac_ext
21694cat >>conftest.$ac_ext <<_ACEOF
21695/* end confdefs.h. */
84e70f78 21696
ca81d7a0
JD
21697/* Override any GCC internal prototype to avoid an error.
21698 Use char because int might match the return type of a GCC
21699 builtin and then its argument prototype would still apply. */
84e70f78
KR
21700#ifdef __cplusplus
21701extern "C"
21702#endif
84e70f78
KR
21703char hes_getmailhost ();
21704int
21705main ()
21706{
ca81d7a0 21707return hes_getmailhost ();
84e70f78
KR
21708 ;
21709 return 0;
21710}
21711_ACEOF
21712rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21713if { (ac_try="$ac_link"
21714case "(($ac_try" in
21715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21716 *) ac_try_echo=$ac_try;;
21717esac
21718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21719 (eval "$ac_link") 2>conftest.er1
84e70f78 21720 ac_status=$?
edfaf76d
LK
21721 grep -v '^ *+' conftest.er1 >conftest.err
21722 rm -f conftest.er1
21723 cat conftest.err >&5
c0d27fcc 21724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 21725 (exit $ac_status); } &&
ca81d7a0
JD
21726 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21727 { (case "(($ac_try" in
21728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21729 *) ac_try_echo=$ac_try;;
21730esac
21731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21732 (eval "$ac_try") 2>&5
edfaf76d
LK
21733 ac_status=$?
21734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21735 (exit $ac_status); }; } &&
21736 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
21737 { (case "(($ac_try" in
21738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21739 *) ac_try_echo=$ac_try;;
21740esac
21741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21742 (eval "$ac_try") 2>&5
84e70f78 21743 ac_status=$?
c0d27fcc 21744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
21745 (exit $ac_status); }; }; then
21746 ac_cv_lib_hesiod_hes_getmailhost=yes
21747else
21748 echo "$as_me: failed program was:" >&5
19650fd6
AS
21749sed 's/^/| /' conftest.$ac_ext >&5
21750
ca81d7a0 21751 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 21752fi
ca81d7a0
JD
21753
21754rm -f core conftest.err conftest.$ac_objext \
edfaf76d 21755 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
21756LIBS=$ac_check_lib_save_LIBS
21757fi
ca81d7a0
JD
21758{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
21759echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 21760if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 21761
c0d27fcc 21762cat >>confdefs.h <<\_ACEOF
84e70f78 21763#define HAVE_LIBHESIOD 1
c0d27fcc 21764_ACEOF
84e70f78
KR
21765
21766else
21767 :
21768fi
21769
21770fi
21771
21772fi
21773
a21616bd
KR
21774# These tell us which Kerberos-related libraries to use.
21775if test "${with_kerberos+set}" = set; then
503d2be0 21776
ca81d7a0
JD
21777{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
21778echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
21779if test "${ac_cv_lib_com_err_com_err+set}" = set; then
21780 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21781else
503d2be0 21782 ac_check_lib_save_LIBS=$LIBS
a21616bd 21783LIBS="-lcom_err $LIBS"
503d2be0 21784cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21785/* confdefs.h. */
21786_ACEOF
21787cat confdefs.h >>conftest.$ac_ext
21788cat >>conftest.$ac_ext <<_ACEOF
21789/* end confdefs.h. */
503d2be0 21790
ca81d7a0
JD
21791/* Override any GCC internal prototype to avoid an error.
21792 Use char because int might match the return type of a GCC
21793 builtin and then its argument prototype would still apply. */
503d2be0
AS
21794#ifdef __cplusplus
21795extern "C"
21796#endif
503d2be0
AS
21797char com_err ();
21798int
21799main ()
21800{
ca81d7a0 21801return com_err ();
503d2be0
AS
21802 ;
21803 return 0;
21804}
21805_ACEOF
21806rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21807if { (ac_try="$ac_link"
21808case "(($ac_try" in
21809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21810 *) ac_try_echo=$ac_try;;
21811esac
21812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21813 (eval "$ac_link") 2>conftest.er1
503d2be0 21814 ac_status=$?
edfaf76d
LK
21815 grep -v '^ *+' conftest.er1 >conftest.err
21816 rm -f conftest.er1
21817 cat conftest.err >&5
c0d27fcc 21818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21819 (exit $ac_status); } &&
ca81d7a0
JD
21820 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21821 { (case "(($ac_try" in
21822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21823 *) ac_try_echo=$ac_try;;
21824esac
21825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21826 (eval "$ac_try") 2>&5
edfaf76d
LK
21827 ac_status=$?
21828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21829 (exit $ac_status); }; } &&
21830 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
21831 { (case "(($ac_try" in
21832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21833 *) ac_try_echo=$ac_try;;
21834esac
21835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21836 (eval "$ac_try") 2>&5
503d2be0 21837 ac_status=$?
c0d27fcc 21838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21839 (exit $ac_status); }; }; then
21840 ac_cv_lib_com_err_com_err=yes
21841else
21842 echo "$as_me: failed program was:" >&5
19650fd6
AS
21843sed 's/^/| /' conftest.$ac_ext >&5
21844
ca81d7a0 21845 ac_cv_lib_com_err_com_err=no
503d2be0 21846fi
ca81d7a0
JD
21847
21848rm -f core conftest.err conftest.$ac_objext \
edfaf76d 21849 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21850LIBS=$ac_check_lib_save_LIBS
21851fi
ca81d7a0
JD
21852{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
21853echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 21854if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 21855 cat >>confdefs.h <<_ACEOF
503d2be0 21856#define HAVE_LIBCOM_ERR 1
c0d27fcc 21857_ACEOF
a21616bd
KR
21858
21859 LIBS="-lcom_err $LIBS"
21860
a21616bd
KR
21861fi
21862
c0d27fcc 21863
ca81d7a0
JD
21864{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
21865echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
21866if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
21867 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21868else
503d2be0 21869 ac_check_lib_save_LIBS=$LIBS
a21616bd 21870LIBS="-lk5crypto $LIBS"
503d2be0 21871cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21872/* confdefs.h. */
21873_ACEOF
21874cat confdefs.h >>conftest.$ac_ext
21875cat >>conftest.$ac_ext <<_ACEOF
21876/* end confdefs.h. */
503d2be0 21877
ca81d7a0
JD
21878/* Override any GCC internal prototype to avoid an error.
21879 Use char because int might match the return type of a GCC
21880 builtin and then its argument prototype would still apply. */
503d2be0
AS
21881#ifdef __cplusplus
21882extern "C"
21883#endif
503d2be0
AS
21884char mit_des_cbc_encrypt ();
21885int
21886main ()
21887{
ca81d7a0 21888return mit_des_cbc_encrypt ();
503d2be0
AS
21889 ;
21890 return 0;
21891}
21892_ACEOF
21893rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21894if { (ac_try="$ac_link"
21895case "(($ac_try" in
21896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21897 *) ac_try_echo=$ac_try;;
21898esac
21899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21900 (eval "$ac_link") 2>conftest.er1
503d2be0 21901 ac_status=$?
edfaf76d
LK
21902 grep -v '^ *+' conftest.er1 >conftest.err
21903 rm -f conftest.er1
21904 cat conftest.err >&5
c0d27fcc 21905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21906 (exit $ac_status); } &&
ca81d7a0
JD
21907 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21908 { (case "(($ac_try" in
21909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21910 *) ac_try_echo=$ac_try;;
21911esac
21912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21913 (eval "$ac_try") 2>&5
edfaf76d
LK
21914 ac_status=$?
21915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21916 (exit $ac_status); }; } &&
21917 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
21918 { (case "(($ac_try" in
21919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21920 *) ac_try_echo=$ac_try;;
21921esac
21922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21923 (eval "$ac_try") 2>&5
503d2be0 21924 ac_status=$?
c0d27fcc 21925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21926 (exit $ac_status); }; }; then
21927 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
21928else
21929 echo "$as_me: failed program was:" >&5
19650fd6
AS
21930sed 's/^/| /' conftest.$ac_ext >&5
21931
ca81d7a0 21932 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 21933fi
ca81d7a0
JD
21934
21935rm -f core conftest.err conftest.$ac_objext \
edfaf76d 21936 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21937LIBS=$ac_check_lib_save_LIBS
21938fi
ca81d7a0
JD
21939{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
21940echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 21941if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 21942 cat >>confdefs.h <<_ACEOF
503d2be0 21943#define HAVE_LIBK5CRYPTO 1
c0d27fcc 21944_ACEOF
a21616bd
KR
21945
21946 LIBS="-lk5crypto $LIBS"
21947
a21616bd
KR
21948fi
21949
c0d27fcc 21950
ca81d7a0
JD
21951{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
21952echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
21953if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
21954 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21955else
503d2be0 21956 ac_check_lib_save_LIBS=$LIBS
a21616bd 21957LIBS="-lcrypto $LIBS"
503d2be0 21958cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21959/* confdefs.h. */
21960_ACEOF
21961cat confdefs.h >>conftest.$ac_ext
21962cat >>conftest.$ac_ext <<_ACEOF
21963/* end confdefs.h. */
503d2be0 21964
ca81d7a0
JD
21965/* Override any GCC internal prototype to avoid an error.
21966 Use char because int might match the return type of a GCC
21967 builtin and then its argument prototype would still apply. */
503d2be0
AS
21968#ifdef __cplusplus
21969extern "C"
21970#endif
503d2be0
AS
21971char mit_des_cbc_encrypt ();
21972int
21973main ()
21974{
ca81d7a0 21975return mit_des_cbc_encrypt ();
503d2be0
AS
21976 ;
21977 return 0;
21978}
21979_ACEOF
21980rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21981if { (ac_try="$ac_link"
21982case "(($ac_try" in
21983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21984 *) ac_try_echo=$ac_try;;
21985esac
21986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21987 (eval "$ac_link") 2>conftest.er1
503d2be0 21988 ac_status=$?
edfaf76d
LK
21989 grep -v '^ *+' conftest.er1 >conftest.err
21990 rm -f conftest.er1
21991 cat conftest.err >&5
c0d27fcc 21992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21993 (exit $ac_status); } &&
ca81d7a0
JD
21994 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21995 { (case "(($ac_try" in
21996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21997 *) ac_try_echo=$ac_try;;
21998esac
21999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22000 (eval "$ac_try") 2>&5
edfaf76d
LK
22001 ac_status=$?
22002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22003 (exit $ac_status); }; } &&
22004 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
22005 { (case "(($ac_try" in
22006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22007 *) ac_try_echo=$ac_try;;
22008esac
22009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22010 (eval "$ac_try") 2>&5
503d2be0 22011 ac_status=$?
c0d27fcc 22012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22013 (exit $ac_status); }; }; then
22014 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
22015else
22016 echo "$as_me: failed program was:" >&5
19650fd6
AS
22017sed 's/^/| /' conftest.$ac_ext >&5
22018
ca81d7a0 22019 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 22020fi
ca81d7a0
JD
22021
22022rm -f core conftest.err conftest.$ac_objext \
edfaf76d 22023 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22024LIBS=$ac_check_lib_save_LIBS
22025fi
ca81d7a0
JD
22026{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
22027echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 22028if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 22029 cat >>confdefs.h <<_ACEOF
503d2be0 22030#define HAVE_LIBCRYPTO 1
c0d27fcc 22031_ACEOF
a21616bd
KR
22032
22033 LIBS="-lcrypto $LIBS"
22034
a21616bd
KR
22035fi
22036
c0d27fcc 22037
ca81d7a0
JD
22038{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
22039echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
22040if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
22041 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 22042else
503d2be0 22043 ac_check_lib_save_LIBS=$LIBS
a21616bd 22044LIBS="-lkrb5 $LIBS"
503d2be0 22045cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22046/* confdefs.h. */
22047_ACEOF
22048cat confdefs.h >>conftest.$ac_ext
22049cat >>conftest.$ac_ext <<_ACEOF
22050/* end confdefs.h. */
a21616bd 22051
ca81d7a0
JD
22052/* Override any GCC internal prototype to avoid an error.
22053 Use char because int might match the return type of a GCC
22054 builtin and then its argument prototype would still apply. */
503d2be0
AS
22055#ifdef __cplusplus
22056extern "C"
22057#endif
503d2be0
AS
22058char krb5_init_context ();
22059int
22060main ()
22061{
ca81d7a0 22062return krb5_init_context ();
503d2be0
AS
22063 ;
22064 return 0;
22065}
22066_ACEOF
22067rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22068if { (ac_try="$ac_link"
22069case "(($ac_try" in
22070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22071 *) ac_try_echo=$ac_try;;
22072esac
22073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22074 (eval "$ac_link") 2>conftest.er1
503d2be0 22075 ac_status=$?
edfaf76d
LK
22076 grep -v '^ *+' conftest.er1 >conftest.err
22077 rm -f conftest.er1
22078 cat conftest.err >&5
c0d27fcc 22079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22080 (exit $ac_status); } &&
ca81d7a0
JD
22081 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22082 { (case "(($ac_try" in
22083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22084 *) ac_try_echo=$ac_try;;
22085esac
22086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22087 (eval "$ac_try") 2>&5
edfaf76d
LK
22088 ac_status=$?
22089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22090 (exit $ac_status); }; } &&
22091 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
22092 { (case "(($ac_try" in
22093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22094 *) ac_try_echo=$ac_try;;
22095esac
22096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22097 (eval "$ac_try") 2>&5
503d2be0 22098 ac_status=$?
c0d27fcc 22099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22100 (exit $ac_status); }; }; then
22101 ac_cv_lib_krb5_krb5_init_context=yes
22102else
22103 echo "$as_me: failed program was:" >&5
19650fd6
AS
22104sed 's/^/| /' conftest.$ac_ext >&5
22105
ca81d7a0 22106 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 22107fi
ca81d7a0
JD
22108
22109rm -f core conftest.err conftest.$ac_objext \
edfaf76d 22110 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22111LIBS=$ac_check_lib_save_LIBS
22112fi
ca81d7a0
JD
22113{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
22114echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 22115if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 22116 cat >>confdefs.h <<_ACEOF
503d2be0 22117#define HAVE_LIBKRB5 1
c0d27fcc 22118_ACEOF
a21616bd
KR
22119
22120 LIBS="-lkrb5 $LIBS"
22121
a21616bd
KR
22122fi
22123
22124 if test "${with_kerberos5+set}" != set; then
503d2be0 22125
ca81d7a0
JD
22126{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
22127echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
22128if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
22129 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 22130else
503d2be0 22131 ac_check_lib_save_LIBS=$LIBS
a21616bd 22132LIBS="-ldes425 $LIBS"
503d2be0 22133cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22134/* confdefs.h. */
22135_ACEOF
22136cat confdefs.h >>conftest.$ac_ext
22137cat >>conftest.$ac_ext <<_ACEOF
22138/* end confdefs.h. */
503d2be0 22139
ca81d7a0
JD
22140/* Override any GCC internal prototype to avoid an error.
22141 Use char because int might match the return type of a GCC
22142 builtin and then its argument prototype would still apply. */
503d2be0
AS
22143#ifdef __cplusplus
22144extern "C"
22145#endif
503d2be0
AS
22146char des_cbc_encrypt ();
22147int
22148main ()
22149{
ca81d7a0 22150return des_cbc_encrypt ();
503d2be0
AS
22151 ;
22152 return 0;
22153}
22154_ACEOF
22155rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22156if { (ac_try="$ac_link"
22157case "(($ac_try" in
22158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22159 *) ac_try_echo=$ac_try;;
22160esac
22161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22162 (eval "$ac_link") 2>conftest.er1
503d2be0 22163 ac_status=$?
edfaf76d
LK
22164 grep -v '^ *+' conftest.er1 >conftest.err
22165 rm -f conftest.er1
22166 cat conftest.err >&5
c0d27fcc 22167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22168 (exit $ac_status); } &&
ca81d7a0
JD
22169 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22170 { (case "(($ac_try" in
22171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22172 *) ac_try_echo=$ac_try;;
22173esac
22174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22175 (eval "$ac_try") 2>&5
edfaf76d
LK
22176 ac_status=$?
22177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22178 (exit $ac_status); }; } &&
22179 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
22180 { (case "(($ac_try" in
22181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22182 *) ac_try_echo=$ac_try;;
22183esac
22184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22185 (eval "$ac_try") 2>&5
503d2be0 22186 ac_status=$?
c0d27fcc 22187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22188 (exit $ac_status); }; }; then
22189 ac_cv_lib_des425_des_cbc_encrypt=yes
22190else
22191 echo "$as_me: failed program was:" >&5
19650fd6
AS
22192sed 's/^/| /' conftest.$ac_ext >&5
22193
ca81d7a0 22194 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 22195fi
ca81d7a0
JD
22196
22197rm -f core conftest.err conftest.$ac_objext \
edfaf76d 22198 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22199LIBS=$ac_check_lib_save_LIBS
22200fi
ca81d7a0
JD
22201{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
22202echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 22203if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 22204 cat >>confdefs.h <<_ACEOF
503d2be0 22205#define HAVE_LIBDES425 1
c0d27fcc 22206_ACEOF
a21616bd
KR
22207
22208 LIBS="-ldes425 $LIBS"
22209
22210else
503d2be0 22211
ca81d7a0
JD
22212{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
22213echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
22214if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
22215 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 22216else
503d2be0 22217 ac_check_lib_save_LIBS=$LIBS
a21616bd 22218LIBS="-ldes $LIBS"
503d2be0 22219cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22220/* confdefs.h. */
22221_ACEOF
22222cat confdefs.h >>conftest.$ac_ext
22223cat >>conftest.$ac_ext <<_ACEOF
22224/* end confdefs.h. */
503d2be0 22225
ca81d7a0
JD
22226/* Override any GCC internal prototype to avoid an error.
22227 Use char because int might match the return type of a GCC
22228 builtin and then its argument prototype would still apply. */
503d2be0
AS
22229#ifdef __cplusplus
22230extern "C"
22231#endif
503d2be0
AS
22232char des_cbc_encrypt ();
22233int
22234main ()
22235{
ca81d7a0 22236return des_cbc_encrypt ();
503d2be0
AS
22237 ;
22238 return 0;
22239}
22240_ACEOF
22241rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22242if { (ac_try="$ac_link"
22243case "(($ac_try" in
22244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22245 *) ac_try_echo=$ac_try;;
22246esac
22247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22248 (eval "$ac_link") 2>conftest.er1
503d2be0 22249 ac_status=$?
edfaf76d
LK
22250 grep -v '^ *+' conftest.er1 >conftest.err
22251 rm -f conftest.er1
22252 cat conftest.err >&5
c0d27fcc 22253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22254 (exit $ac_status); } &&
ca81d7a0
JD
22255 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22256 { (case "(($ac_try" in
22257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22258 *) ac_try_echo=$ac_try;;
22259esac
22260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22261 (eval "$ac_try") 2>&5
edfaf76d
LK
22262 ac_status=$?
22263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22264 (exit $ac_status); }; } &&
22265 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
22266 { (case "(($ac_try" in
22267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22268 *) ac_try_echo=$ac_try;;
22269esac
22270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22271 (eval "$ac_try") 2>&5
503d2be0 22272 ac_status=$?
c0d27fcc 22273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22274 (exit $ac_status); }; }; then
22275 ac_cv_lib_des_des_cbc_encrypt=yes
22276else
22277 echo "$as_me: failed program was:" >&5
19650fd6
AS
22278sed 's/^/| /' conftest.$ac_ext >&5
22279
ca81d7a0 22280 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 22281fi
ca81d7a0
JD
22282
22283rm -f core conftest.err conftest.$ac_objext \
edfaf76d 22284 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22285LIBS=$ac_check_lib_save_LIBS
22286fi
ca81d7a0
JD
22287{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
22288echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 22289if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 22290 cat >>confdefs.h <<_ACEOF
503d2be0 22291#define HAVE_LIBDES 1
c0d27fcc 22292_ACEOF
a21616bd
KR
22293
22294 LIBS="-ldes $LIBS"
22295
a21616bd
KR
22296fi
22297
22298fi
22299
c0d27fcc 22300
ca81d7a0
JD
22301{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
22302echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
22303if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
22304 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 22305else
503d2be0 22306 ac_check_lib_save_LIBS=$LIBS
a21616bd 22307LIBS="-lkrb4 $LIBS"
503d2be0 22308cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22309/* confdefs.h. */
22310_ACEOF
22311cat confdefs.h >>conftest.$ac_ext
22312cat >>conftest.$ac_ext <<_ACEOF
22313/* end confdefs.h. */
503d2be0 22314
ca81d7a0
JD
22315/* Override any GCC internal prototype to avoid an error.
22316 Use char because int might match the return type of a GCC
22317 builtin and then its argument prototype would still apply. */
503d2be0
AS
22318#ifdef __cplusplus
22319extern "C"
22320#endif
503d2be0
AS
22321char krb_get_cred ();
22322int
22323main ()
22324{
ca81d7a0 22325return krb_get_cred ();
503d2be0
AS
22326 ;
22327 return 0;
22328}
22329_ACEOF
22330rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22331if { (ac_try="$ac_link"
22332case "(($ac_try" in
22333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22334 *) ac_try_echo=$ac_try;;
22335esac
22336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22337 (eval "$ac_link") 2>conftest.er1
503d2be0 22338 ac_status=$?
edfaf76d
LK
22339 grep -v '^ *+' conftest.er1 >conftest.err
22340 rm -f conftest.er1
22341 cat conftest.err >&5
c0d27fcc 22342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22343 (exit $ac_status); } &&
ca81d7a0
JD
22344 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22345 { (case "(($ac_try" in
22346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22347 *) ac_try_echo=$ac_try;;
22348esac
22349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22350 (eval "$ac_try") 2>&5
edfaf76d
LK
22351 ac_status=$?
22352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22353 (exit $ac_status); }; } &&
22354 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
22355 { (case "(($ac_try" in
22356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22357 *) ac_try_echo=$ac_try;;
22358esac
22359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22360 (eval "$ac_try") 2>&5
503d2be0 22361 ac_status=$?
c0d27fcc 22362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22363 (exit $ac_status); }; }; then
22364 ac_cv_lib_krb4_krb_get_cred=yes
22365else
22366 echo "$as_me: failed program was:" >&5
19650fd6
AS
22367sed 's/^/| /' conftest.$ac_ext >&5
22368
ca81d7a0 22369 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 22370fi
ca81d7a0
JD
22371
22372rm -f core conftest.err conftest.$ac_objext \
edfaf76d 22373 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22374LIBS=$ac_check_lib_save_LIBS
22375fi
ca81d7a0
JD
22376{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
22377echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 22378if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 22379 cat >>confdefs.h <<_ACEOF
503d2be0 22380#define HAVE_LIBKRB4 1
c0d27fcc 22381_ACEOF
a21616bd
KR
22382
22383 LIBS="-lkrb4 $LIBS"
22384
22385else
503d2be0 22386
ca81d7a0
JD
22387{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
22388echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
22389if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
22390 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 22391else
503d2be0 22392 ac_check_lib_save_LIBS=$LIBS
a21616bd 22393LIBS="-lkrb $LIBS"
503d2be0 22394cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22395/* confdefs.h. */
22396_ACEOF
22397cat confdefs.h >>conftest.$ac_ext
22398cat >>conftest.$ac_ext <<_ACEOF
22399/* end confdefs.h. */
503d2be0 22400
ca81d7a0
JD
22401/* Override any GCC internal prototype to avoid an error.
22402 Use char because int might match the return type of a GCC
22403 builtin and then its argument prototype would still apply. */
503d2be0
AS
22404#ifdef __cplusplus
22405extern "C"
22406#endif
503d2be0
AS
22407char krb_get_cred ();
22408int
22409main ()
22410{
ca81d7a0 22411return krb_get_cred ();
503d2be0
AS
22412 ;
22413 return 0;
22414}
22415_ACEOF
22416rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22417if { (ac_try="$ac_link"
22418case "(($ac_try" in
22419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22420 *) ac_try_echo=$ac_try;;
22421esac
22422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22423 (eval "$ac_link") 2>conftest.er1
503d2be0 22424 ac_status=$?
edfaf76d
LK
22425 grep -v '^ *+' conftest.er1 >conftest.err
22426 rm -f conftest.er1
22427 cat conftest.err >&5
c0d27fcc 22428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22429 (exit $ac_status); } &&
ca81d7a0
JD
22430 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22431 { (case "(($ac_try" in
22432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22433 *) ac_try_echo=$ac_try;;
22434esac
22435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22436 (eval "$ac_try") 2>&5
edfaf76d
LK
22437 ac_status=$?
22438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22439 (exit $ac_status); }; } &&
22440 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
22441 { (case "(($ac_try" in
22442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22443 *) ac_try_echo=$ac_try;;
22444esac
22445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22446 (eval "$ac_try") 2>&5
503d2be0 22447 ac_status=$?
c0d27fcc 22448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22449 (exit $ac_status); }; }; then
22450 ac_cv_lib_krb_krb_get_cred=yes
22451else
22452 echo "$as_me: failed program was:" >&5
19650fd6
AS
22453sed 's/^/| /' conftest.$ac_ext >&5
22454
ca81d7a0 22455 ac_cv_lib_krb_krb_get_cred=no
503d2be0 22456fi
ca81d7a0
JD
22457
22458rm -f core conftest.err conftest.$ac_objext \
edfaf76d 22459 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22460LIBS=$ac_check_lib_save_LIBS
22461fi
ca81d7a0
JD
22462{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
22463echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 22464if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 22465 cat >>confdefs.h <<_ACEOF
503d2be0 22466#define HAVE_LIBKRB 1
c0d27fcc 22467_ACEOF
a21616bd
KR
22468
22469 LIBS="-lkrb $LIBS"
22470
a21616bd
KR
22471fi
22472
22473fi
22474
22475 fi
22476
22477 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
22478
22479for ac_header in krb5.h
a21616bd 22480do
503d2be0 22481as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22482if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22483 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22484echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22485if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22486 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22487fi
ca81d7a0
JD
22488ac_res=`eval echo '${'$as_ac_Header'}'`
22489 { echo "$as_me:$LINENO: result: $ac_res" >&5
22490echo "${ECHO_T}$ac_res" >&6; }
98418dba 22491else
c0d27fcc 22492 # Is the header compilable?
ca81d7a0
JD
22493{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22494echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22495cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22496/* confdefs.h. */
22497_ACEOF
22498cat confdefs.h >>conftest.$ac_ext
22499cat >>conftest.$ac_ext <<_ACEOF
22500/* end confdefs.h. */
c0d27fcc
MR
22501$ac_includes_default
22502#include <$ac_header>
22503_ACEOF
22504rm -f conftest.$ac_objext
ca81d7a0
JD
22505if { (ac_try="$ac_compile"
22506case "(($ac_try" in
22507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22508 *) ac_try_echo=$ac_try;;
22509esac
22510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22511 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22512 ac_status=$?
edfaf76d
LK
22513 grep -v '^ *+' conftest.er1 >conftest.err
22514 rm -f conftest.er1
22515 cat conftest.err >&5
c0d27fcc
MR
22516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22517 (exit $ac_status); } &&
ca81d7a0
JD
22518 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22519 { (case "(($ac_try" in
22520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22521 *) ac_try_echo=$ac_try;;
22522esac
22523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22524 (eval "$ac_try") 2>&5
edfaf76d
LK
22525 ac_status=$?
22526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22527 (exit $ac_status); }; } &&
22528 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
22529 { (case "(($ac_try" in
22530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22531 *) ac_try_echo=$ac_try;;
22532esac
22533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22534 (eval "$ac_try") 2>&5
c0d27fcc
MR
22535 ac_status=$?
22536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22537 (exit $ac_status); }; }; then
22538 ac_header_compiler=yes
22539else
22540 echo "$as_me: failed program was:" >&5
19650fd6
AS
22541sed 's/^/| /' conftest.$ac_ext >&5
22542
ca81d7a0 22543 ac_header_compiler=no
c0d27fcc 22544fi
ca81d7a0
JD
22545
22546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22547{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22548echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22549
22550# Is the header present?
ca81d7a0
JD
22551{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22552echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22553cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22554/* confdefs.h. */
22555_ACEOF
22556cat confdefs.h >>conftest.$ac_ext
22557cat >>conftest.$ac_ext <<_ACEOF
22558/* end confdefs.h. */
503d2be0
AS
22559#include <$ac_header>
22560_ACEOF
ca81d7a0
JD
22561if { (ac_try="$ac_cpp conftest.$ac_ext"
22562case "(($ac_try" in
22563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22564 *) ac_try_echo=$ac_try;;
22565esac
22566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22567 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22568 ac_status=$?
6bae0ccf 22569 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22570 rm -f conftest.er1
22571 cat conftest.err >&5
c0d27fcc 22572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22573 (exit $ac_status); } >/dev/null; then
22574 if test -s conftest.err; then
22575 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 22576 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
22577 else
22578 ac_cpp_err=
22579 fi
22580else
22581 ac_cpp_err=yes
22582fi
22583if test -z "$ac_cpp_err"; then
c0d27fcc 22584 ac_header_preproc=yes
503d2be0
AS
22585else
22586 echo "$as_me: failed program was:" >&5
19650fd6
AS
22587sed 's/^/| /' conftest.$ac_ext >&5
22588
c0d27fcc 22589 ac_header_preproc=no
a21616bd 22590fi
ca81d7a0 22591
503d2be0 22592rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22593{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22594echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22595
22596# So? What about this header?
edfaf76d
LK
22597case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22598 yes:no: )
c0d27fcc
MR
22599 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22600echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22601 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22602echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22603 ac_header_preproc=yes
19650fd6 22604 ;;
edfaf76d 22605 no:yes:* )
c0d27fcc
MR
22606 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22607echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22608 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22609echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22610 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22611echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22612 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22613echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22614 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22615echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22616 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22617echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22618
19650fd6 22619 ;;
c0d27fcc 22620esac
ca81d7a0
JD
22621{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22622echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22623if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22624 echo $ECHO_N "(cached) $ECHO_C" >&6
22625else
edfaf76d 22626 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22627fi
ca81d7a0
JD
22628ac_res=`eval echo '${'$as_ac_Header'}'`
22629 { echo "$as_me:$LINENO: result: $ac_res" >&5
22630echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22631
22632fi
503d2be0 22633if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22634 cat >>confdefs.h <<_ACEOF
503d2be0 22635#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22636_ACEOF
503d2be0 22637
a21616bd 22638fi
c0d27fcc 22639
a21616bd
KR
22640done
22641
22642 else
503d2be0
AS
22643
22644for ac_header in des.h
a21616bd 22645do
503d2be0 22646as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22647if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22648 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22649echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22650if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22651 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22652fi
ca81d7a0
JD
22653ac_res=`eval echo '${'$as_ac_Header'}'`
22654 { echo "$as_me:$LINENO: result: $ac_res" >&5
22655echo "${ECHO_T}$ac_res" >&6; }
98418dba 22656else
c0d27fcc 22657 # Is the header compilable?
ca81d7a0
JD
22658{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22659echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22660cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22661/* confdefs.h. */
22662_ACEOF
22663cat confdefs.h >>conftest.$ac_ext
22664cat >>conftest.$ac_ext <<_ACEOF
22665/* end confdefs.h. */
c0d27fcc
MR
22666$ac_includes_default
22667#include <$ac_header>
22668_ACEOF
22669rm -f conftest.$ac_objext
ca81d7a0
JD
22670if { (ac_try="$ac_compile"
22671case "(($ac_try" in
22672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22673 *) ac_try_echo=$ac_try;;
22674esac
22675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22676 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22677 ac_status=$?
edfaf76d
LK
22678 grep -v '^ *+' conftest.er1 >conftest.err
22679 rm -f conftest.er1
22680 cat conftest.err >&5
c0d27fcc
MR
22681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22682 (exit $ac_status); } &&
ca81d7a0
JD
22683 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22684 { (case "(($ac_try" in
22685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22686 *) ac_try_echo=$ac_try;;
22687esac
22688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22689 (eval "$ac_try") 2>&5
edfaf76d
LK
22690 ac_status=$?
22691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22692 (exit $ac_status); }; } &&
22693 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
22694 { (case "(($ac_try" in
22695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22696 *) ac_try_echo=$ac_try;;
22697esac
22698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22699 (eval "$ac_try") 2>&5
c0d27fcc
MR
22700 ac_status=$?
22701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22702 (exit $ac_status); }; }; then
22703 ac_header_compiler=yes
22704else
22705 echo "$as_me: failed program was:" >&5
19650fd6
AS
22706sed 's/^/| /' conftest.$ac_ext >&5
22707
ca81d7a0 22708 ac_header_compiler=no
c0d27fcc 22709fi
ca81d7a0
JD
22710
22711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22712{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22713echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22714
22715# Is the header present?
ca81d7a0
JD
22716{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22717echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22718cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22719/* confdefs.h. */
22720_ACEOF
22721cat confdefs.h >>conftest.$ac_ext
22722cat >>conftest.$ac_ext <<_ACEOF
22723/* end confdefs.h. */
503d2be0
AS
22724#include <$ac_header>
22725_ACEOF
ca81d7a0
JD
22726if { (ac_try="$ac_cpp conftest.$ac_ext"
22727case "(($ac_try" in
22728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22729 *) ac_try_echo=$ac_try;;
22730esac
22731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22732 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22733 ac_status=$?
6bae0ccf 22734 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22735 rm -f conftest.er1
22736 cat conftest.err >&5
c0d27fcc 22737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22738 (exit $ac_status); } >/dev/null; then
22739 if test -s conftest.err; then
22740 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 22741 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
22742 else
22743 ac_cpp_err=
22744 fi
22745else
22746 ac_cpp_err=yes
22747fi
22748if test -z "$ac_cpp_err"; then
c0d27fcc 22749 ac_header_preproc=yes
503d2be0
AS
22750else
22751 echo "$as_me: failed program was:" >&5
19650fd6
AS
22752sed 's/^/| /' conftest.$ac_ext >&5
22753
c0d27fcc 22754 ac_header_preproc=no
a21616bd 22755fi
ca81d7a0 22756
503d2be0 22757rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22758{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22759echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22760
22761# So? What about this header?
edfaf76d
LK
22762case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22763 yes:no: )
c0d27fcc
MR
22764 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22765echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22766 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22767echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22768 ac_header_preproc=yes
19650fd6 22769 ;;
edfaf76d 22770 no:yes:* )
c0d27fcc
MR
22771 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22772echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22773 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22774echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22775 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22776echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22777 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22778echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22779 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22780echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22781 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22782echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22783
19650fd6 22784 ;;
c0d27fcc 22785esac
ca81d7a0
JD
22786{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22787echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22788if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22789 echo $ECHO_N "(cached) $ECHO_C" >&6
22790else
edfaf76d 22791 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22792fi
ca81d7a0
JD
22793ac_res=`eval echo '${'$as_ac_Header'}'`
22794 { echo "$as_me:$LINENO: result: $ac_res" >&5
22795echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22796
22797fi
503d2be0 22798if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22799 cat >>confdefs.h <<_ACEOF
503d2be0 22800#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22801_ACEOF
503d2be0 22802
a21616bd 22803else
503d2be0
AS
22804
22805for ac_header in kerberosIV/des.h
a21616bd 22806do
503d2be0 22807as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22808if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22809 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22810echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22811if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22812 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22813fi
ca81d7a0
JD
22814ac_res=`eval echo '${'$as_ac_Header'}'`
22815 { echo "$as_me:$LINENO: result: $ac_res" >&5
22816echo "${ECHO_T}$ac_res" >&6; }
98418dba 22817else
c0d27fcc 22818 # Is the header compilable?
ca81d7a0
JD
22819{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22820echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22821cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22822/* confdefs.h. */
22823_ACEOF
22824cat confdefs.h >>conftest.$ac_ext
22825cat >>conftest.$ac_ext <<_ACEOF
22826/* end confdefs.h. */
c0d27fcc
MR
22827$ac_includes_default
22828#include <$ac_header>
22829_ACEOF
22830rm -f conftest.$ac_objext
ca81d7a0
JD
22831if { (ac_try="$ac_compile"
22832case "(($ac_try" in
22833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22834 *) ac_try_echo=$ac_try;;
22835esac
22836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22837 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22838 ac_status=$?
edfaf76d
LK
22839 grep -v '^ *+' conftest.er1 >conftest.err
22840 rm -f conftest.er1
22841 cat conftest.err >&5
c0d27fcc
MR
22842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22843 (exit $ac_status); } &&
ca81d7a0
JD
22844 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22845 { (case "(($ac_try" in
22846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22847 *) ac_try_echo=$ac_try;;
22848esac
22849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22850 (eval "$ac_try") 2>&5
edfaf76d
LK
22851 ac_status=$?
22852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22853 (exit $ac_status); }; } &&
22854 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
22855 { (case "(($ac_try" in
22856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22857 *) ac_try_echo=$ac_try;;
22858esac
22859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22860 (eval "$ac_try") 2>&5
c0d27fcc
MR
22861 ac_status=$?
22862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22863 (exit $ac_status); }; }; then
22864 ac_header_compiler=yes
22865else
22866 echo "$as_me: failed program was:" >&5
19650fd6
AS
22867sed 's/^/| /' conftest.$ac_ext >&5
22868
ca81d7a0 22869 ac_header_compiler=no
c0d27fcc 22870fi
ca81d7a0
JD
22871
22872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22873{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22874echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22875
22876# Is the header present?
ca81d7a0
JD
22877{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22878echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22879cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22880/* confdefs.h. */
22881_ACEOF
22882cat confdefs.h >>conftest.$ac_ext
22883cat >>conftest.$ac_ext <<_ACEOF
22884/* end confdefs.h. */
503d2be0
AS
22885#include <$ac_header>
22886_ACEOF
ca81d7a0
JD
22887if { (ac_try="$ac_cpp conftest.$ac_ext"
22888case "(($ac_try" in
22889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22890 *) ac_try_echo=$ac_try;;
22891esac
22892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22893 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22894 ac_status=$?
6bae0ccf 22895 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22896 rm -f conftest.er1
22897 cat conftest.err >&5
c0d27fcc 22898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22899 (exit $ac_status); } >/dev/null; then
22900 if test -s conftest.err; then
22901 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 22902 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
22903 else
22904 ac_cpp_err=
22905 fi
22906else
22907 ac_cpp_err=yes
22908fi
22909if test -z "$ac_cpp_err"; then
c0d27fcc 22910 ac_header_preproc=yes
503d2be0
AS
22911else
22912 echo "$as_me: failed program was:" >&5
19650fd6
AS
22913sed 's/^/| /' conftest.$ac_ext >&5
22914
c0d27fcc 22915 ac_header_preproc=no
a21616bd 22916fi
ca81d7a0 22917
503d2be0 22918rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22919{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22920echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22921
22922# So? What about this header?
edfaf76d
LK
22923case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22924 yes:no: )
c0d27fcc
MR
22925 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22926echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22927 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22928echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22929 ac_header_preproc=yes
19650fd6 22930 ;;
edfaf76d 22931 no:yes:* )
c0d27fcc
MR
22932 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22933echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22934 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22935echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22936 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22937echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22938 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22939echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22940 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22941echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22942 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22943echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22944
19650fd6 22945 ;;
c0d27fcc 22946esac
ca81d7a0
JD
22947{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22948echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22949if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22950 echo $ECHO_N "(cached) $ECHO_C" >&6
22951else
edfaf76d 22952 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22953fi
ca81d7a0
JD
22954ac_res=`eval echo '${'$as_ac_Header'}'`
22955 { echo "$as_me:$LINENO: result: $ac_res" >&5
22956echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22957
22958fi
503d2be0 22959if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22960 cat >>confdefs.h <<_ACEOF
503d2be0 22961#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22962_ACEOF
503d2be0 22963
a21616bd 22964else
503d2be0
AS
22965
22966for ac_header in kerberos/des.h
a21616bd 22967do
503d2be0 22968as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22969if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22970 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22971echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22972if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22973 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22974fi
ca81d7a0
JD
22975ac_res=`eval echo '${'$as_ac_Header'}'`
22976 { echo "$as_me:$LINENO: result: $ac_res" >&5
22977echo "${ECHO_T}$ac_res" >&6; }
98418dba 22978else
c0d27fcc 22979 # Is the header compilable?
ca81d7a0
JD
22980{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22981echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22982cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22983/* confdefs.h. */
22984_ACEOF
22985cat confdefs.h >>conftest.$ac_ext
22986cat >>conftest.$ac_ext <<_ACEOF
22987/* end confdefs.h. */
c0d27fcc
MR
22988$ac_includes_default
22989#include <$ac_header>
22990_ACEOF
22991rm -f conftest.$ac_objext
ca81d7a0
JD
22992if { (ac_try="$ac_compile"
22993case "(($ac_try" in
22994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22995 *) ac_try_echo=$ac_try;;
22996esac
22997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22998 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22999 ac_status=$?
edfaf76d
LK
23000 grep -v '^ *+' conftest.er1 >conftest.err
23001 rm -f conftest.er1
23002 cat conftest.err >&5
c0d27fcc
MR
23003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23004 (exit $ac_status); } &&
ca81d7a0
JD
23005 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23006 { (case "(($ac_try" in
23007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23008 *) ac_try_echo=$ac_try;;
23009esac
23010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23011 (eval "$ac_try") 2>&5
edfaf76d
LK
23012 ac_status=$?
23013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23014 (exit $ac_status); }; } &&
23015 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
23016 { (case "(($ac_try" in
23017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23018 *) ac_try_echo=$ac_try;;
23019esac
23020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23021 (eval "$ac_try") 2>&5
c0d27fcc
MR
23022 ac_status=$?
23023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23024 (exit $ac_status); }; }; then
23025 ac_header_compiler=yes
23026else
23027 echo "$as_me: failed program was:" >&5
19650fd6
AS
23028sed 's/^/| /' conftest.$ac_ext >&5
23029
ca81d7a0 23030 ac_header_compiler=no
c0d27fcc 23031fi
ca81d7a0
JD
23032
23033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23034{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23035echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23036
23037# Is the header present?
ca81d7a0
JD
23038{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23039echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23040cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23041/* confdefs.h. */
23042_ACEOF
23043cat confdefs.h >>conftest.$ac_ext
23044cat >>conftest.$ac_ext <<_ACEOF
23045/* end confdefs.h. */
503d2be0
AS
23046#include <$ac_header>
23047_ACEOF
ca81d7a0
JD
23048if { (ac_try="$ac_cpp conftest.$ac_ext"
23049case "(($ac_try" in
23050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23051 *) ac_try_echo=$ac_try;;
23052esac
23053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23054 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23055 ac_status=$?
6bae0ccf 23056 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23057 rm -f conftest.er1
23058 cat conftest.err >&5
c0d27fcc 23059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23060 (exit $ac_status); } >/dev/null; then
23061 if test -s conftest.err; then
23062 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 23063 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
23064 else
23065 ac_cpp_err=
23066 fi
23067else
23068 ac_cpp_err=yes
23069fi
23070if test -z "$ac_cpp_err"; then
c0d27fcc 23071 ac_header_preproc=yes
503d2be0
AS
23072else
23073 echo "$as_me: failed program was:" >&5
19650fd6
AS
23074sed 's/^/| /' conftest.$ac_ext >&5
23075
c0d27fcc 23076 ac_header_preproc=no
a21616bd 23077fi
ca81d7a0 23078
503d2be0 23079rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23080{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23081echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23082
23083# So? What about this header?
edfaf76d
LK
23084case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23085 yes:no: )
c0d27fcc
MR
23086 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23087echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23088 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23089echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23090 ac_header_preproc=yes
19650fd6 23091 ;;
edfaf76d 23092 no:yes:* )
c0d27fcc
MR
23093 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23094echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23095 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23096echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23097 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23098echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23099 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23100echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23101 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 23102echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23103 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23104echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23105
19650fd6 23106 ;;
c0d27fcc 23107esac
ca81d7a0
JD
23108{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23109echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23110if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
23111 echo $ECHO_N "(cached) $ECHO_C" >&6
23112else
edfaf76d 23113 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 23114fi
ca81d7a0
JD
23115ac_res=`eval echo '${'$as_ac_Header'}'`
23116 { echo "$as_me:$LINENO: result: $ac_res" >&5
23117echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23118
23119fi
503d2be0 23120if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23121 cat >>confdefs.h <<_ACEOF
503d2be0 23122#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23123_ACEOF
a21616bd
KR
23124
23125fi
c0d27fcc 23126
a21616bd
KR
23127done
23128
98418dba 23129fi
c0d27fcc 23130
925c2f3f
EZ
23131done
23132
98418dba 23133fi
c0d27fcc 23134
925c2f3f 23135done
98418dba 23136
c0d27fcc 23137
925c2f3f
EZ
23138for ac_header in krb.h
23139do
23140as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23141if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23142 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23143echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23144if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 23145 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23146fi
ca81d7a0
JD
23147ac_res=`eval echo '${'$as_ac_Header'}'`
23148 { echo "$as_me:$LINENO: result: $ac_res" >&5
23149echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23150else
23151 # Is the header compilable?
ca81d7a0
JD
23152{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23153echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 23154cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23155/* confdefs.h. */
23156_ACEOF
23157cat confdefs.h >>conftest.$ac_ext
23158cat >>conftest.$ac_ext <<_ACEOF
23159/* end confdefs.h. */
c0d27fcc
MR
23160$ac_includes_default
23161#include <$ac_header>
23162_ACEOF
23163rm -f conftest.$ac_objext
ca81d7a0
JD
23164if { (ac_try="$ac_compile"
23165case "(($ac_try" in
23166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23167 *) ac_try_echo=$ac_try;;
23168esac
23169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23170 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23171 ac_status=$?
edfaf76d
LK
23172 grep -v '^ *+' conftest.er1 >conftest.err
23173 rm -f conftest.er1
23174 cat conftest.err >&5
c0d27fcc
MR
23175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23176 (exit $ac_status); } &&
ca81d7a0
JD
23177 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23178 { (case "(($ac_try" in
23179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23180 *) ac_try_echo=$ac_try;;
23181esac
23182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23183 (eval "$ac_try") 2>&5
edfaf76d
LK
23184 ac_status=$?
23185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23186 (exit $ac_status); }; } &&
23187 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
23188 { (case "(($ac_try" in
23189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23190 *) ac_try_echo=$ac_try;;
23191esac
23192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23193 (eval "$ac_try") 2>&5
c0d27fcc
MR
23194 ac_status=$?
23195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23196 (exit $ac_status); }; }; then
23197 ac_header_compiler=yes
925c2f3f 23198else
c0d27fcc 23199 echo "$as_me: failed program was:" >&5
19650fd6
AS
23200sed 's/^/| /' conftest.$ac_ext >&5
23201
ca81d7a0 23202 ac_header_compiler=no
c0d27fcc 23203fi
ca81d7a0
JD
23204
23205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23206{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23207echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23208
23209# Is the header present?
ca81d7a0
JD
23210{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23211echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23212cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23213/* confdefs.h. */
23214_ACEOF
23215cat confdefs.h >>conftest.$ac_ext
23216cat >>conftest.$ac_ext <<_ACEOF
23217/* end confdefs.h. */
503d2be0
AS
23218#include <$ac_header>
23219_ACEOF
ca81d7a0
JD
23220if { (ac_try="$ac_cpp conftest.$ac_ext"
23221case "(($ac_try" in
23222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23223 *) ac_try_echo=$ac_try;;
23224esac
23225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23226 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23227 ac_status=$?
6bae0ccf 23228 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23229 rm -f conftest.er1
23230 cat conftest.err >&5
c0d27fcc 23231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23232 (exit $ac_status); } >/dev/null; then
23233 if test -s conftest.err; then
23234 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 23235 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
23236 else
23237 ac_cpp_err=
23238 fi
23239else
23240 ac_cpp_err=yes
23241fi
23242if test -z "$ac_cpp_err"; then
c0d27fcc 23243 ac_header_preproc=yes
503d2be0
AS
23244else
23245 echo "$as_me: failed program was:" >&5
19650fd6
AS
23246sed 's/^/| /' conftest.$ac_ext >&5
23247
c0d27fcc 23248 ac_header_preproc=no
a21616bd 23249fi
ca81d7a0 23250
503d2be0 23251rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23252{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23253echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23254
23255# So? What about this header?
edfaf76d
LK
23256case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23257 yes:no: )
c0d27fcc
MR
23258 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23259echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23260 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23261echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23262 ac_header_preproc=yes
19650fd6 23263 ;;
edfaf76d 23264 no:yes:* )
c0d27fcc
MR
23265 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23266echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23267 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23268echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23269 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23270echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23271 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23272echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23273 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 23274echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23275 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23276echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23277
19650fd6 23278 ;;
c0d27fcc 23279esac
ca81d7a0
JD
23280{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23281echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23282if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
23283 echo $ECHO_N "(cached) $ECHO_C" >&6
23284else
edfaf76d 23285 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 23286fi
ca81d7a0
JD
23287ac_res=`eval echo '${'$as_ac_Header'}'`
23288 { echo "$as_me:$LINENO: result: $ac_res" >&5
23289echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23290
23291fi
503d2be0 23292if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23293 cat >>confdefs.h <<_ACEOF
503d2be0 23294#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23295_ACEOF
503d2be0 23296
a21616bd 23297else
503d2be0
AS
23298
23299for ac_header in kerberosIV/krb.h
a21616bd 23300do
503d2be0 23301as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23302if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23303 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23304echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23305if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23306 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23307fi
ca81d7a0
JD
23308ac_res=`eval echo '${'$as_ac_Header'}'`
23309 { echo "$as_me:$LINENO: result: $ac_res" >&5
23310echo "${ECHO_T}$ac_res" >&6; }
98418dba 23311else
c0d27fcc 23312 # Is the header compilable?
ca81d7a0
JD
23313{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23314echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 23315cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23316/* confdefs.h. */
23317_ACEOF
23318cat confdefs.h >>conftest.$ac_ext
23319cat >>conftest.$ac_ext <<_ACEOF
23320/* end confdefs.h. */
c0d27fcc
MR
23321$ac_includes_default
23322#include <$ac_header>
23323_ACEOF
23324rm -f conftest.$ac_objext
ca81d7a0
JD
23325if { (ac_try="$ac_compile"
23326case "(($ac_try" in
23327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23328 *) ac_try_echo=$ac_try;;
23329esac
23330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23331 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23332 ac_status=$?
edfaf76d
LK
23333 grep -v '^ *+' conftest.er1 >conftest.err
23334 rm -f conftest.er1
23335 cat conftest.err >&5
c0d27fcc
MR
23336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23337 (exit $ac_status); } &&
ca81d7a0
JD
23338 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23339 { (case "(($ac_try" in
23340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23341 *) ac_try_echo=$ac_try;;
23342esac
23343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23344 (eval "$ac_try") 2>&5
edfaf76d
LK
23345 ac_status=$?
23346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23347 (exit $ac_status); }; } &&
23348 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
23349 { (case "(($ac_try" in
23350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23351 *) ac_try_echo=$ac_try;;
23352esac
23353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23354 (eval "$ac_try") 2>&5
c0d27fcc
MR
23355 ac_status=$?
23356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23357 (exit $ac_status); }; }; then
23358 ac_header_compiler=yes
23359else
23360 echo "$as_me: failed program was:" >&5
19650fd6
AS
23361sed 's/^/| /' conftest.$ac_ext >&5
23362
ca81d7a0 23363 ac_header_compiler=no
c0d27fcc 23364fi
ca81d7a0
JD
23365
23366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23367{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23368echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23369
23370# Is the header present?
ca81d7a0
JD
23371{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23372echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23373cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23374/* confdefs.h. */
23375_ACEOF
23376cat confdefs.h >>conftest.$ac_ext
23377cat >>conftest.$ac_ext <<_ACEOF
23378/* end confdefs.h. */
503d2be0
AS
23379#include <$ac_header>
23380_ACEOF
ca81d7a0
JD
23381if { (ac_try="$ac_cpp conftest.$ac_ext"
23382case "(($ac_try" in
23383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23384 *) ac_try_echo=$ac_try;;
23385esac
23386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23387 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23388 ac_status=$?
6bae0ccf 23389 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23390 rm -f conftest.er1
23391 cat conftest.err >&5
c0d27fcc 23392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23393 (exit $ac_status); } >/dev/null; then
23394 if test -s conftest.err; then
23395 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 23396 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
23397 else
23398 ac_cpp_err=
23399 fi
23400else
23401 ac_cpp_err=yes
23402fi
23403if test -z "$ac_cpp_err"; then
c0d27fcc 23404 ac_header_preproc=yes
503d2be0
AS
23405else
23406 echo "$as_me: failed program was:" >&5
19650fd6
AS
23407sed 's/^/| /' conftest.$ac_ext >&5
23408
c0d27fcc 23409 ac_header_preproc=no
a21616bd 23410fi
ca81d7a0 23411
503d2be0 23412rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23413{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23414echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23415
23416# So? What about this header?
edfaf76d
LK
23417case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23418 yes:no: )
c0d27fcc
MR
23419 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23420echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23421 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23422echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23423 ac_header_preproc=yes
19650fd6 23424 ;;
edfaf76d 23425 no:yes:* )
c0d27fcc
MR
23426 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23427echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23428 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23429echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23430 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23431echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23432 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23433echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23434 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 23435echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23436 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23437echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23438
19650fd6 23439 ;;
c0d27fcc 23440esac
ca81d7a0
JD
23441{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23442echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23443if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
23444 echo $ECHO_N "(cached) $ECHO_C" >&6
23445else
edfaf76d 23446 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 23447fi
ca81d7a0
JD
23448ac_res=`eval echo '${'$as_ac_Header'}'`
23449 { echo "$as_me:$LINENO: result: $ac_res" >&5
23450echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23451
23452fi
503d2be0 23453if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23454 cat >>confdefs.h <<_ACEOF
503d2be0 23455#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23456_ACEOF
503d2be0 23457
a21616bd 23458else
503d2be0
AS
23459
23460for ac_header in kerberos/krb.h
a21616bd 23461do
503d2be0 23462as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23463if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23464 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23465echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23466if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23467 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23468fi
ca81d7a0
JD
23469ac_res=`eval echo '${'$as_ac_Header'}'`
23470 { echo "$as_me:$LINENO: result: $ac_res" >&5
23471echo "${ECHO_T}$ac_res" >&6; }
98418dba 23472else
c0d27fcc 23473 # Is the header compilable?
ca81d7a0
JD
23474{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23475echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 23476cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23477/* confdefs.h. */
23478_ACEOF
23479cat confdefs.h >>conftest.$ac_ext
23480cat >>conftest.$ac_ext <<_ACEOF
23481/* end confdefs.h. */
c0d27fcc
MR
23482$ac_includes_default
23483#include <$ac_header>
23484_ACEOF
23485rm -f conftest.$ac_objext
ca81d7a0
JD
23486if { (ac_try="$ac_compile"
23487case "(($ac_try" in
23488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23489 *) ac_try_echo=$ac_try;;
23490esac
23491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23492 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23493 ac_status=$?
edfaf76d
LK
23494 grep -v '^ *+' conftest.er1 >conftest.err
23495 rm -f conftest.er1
23496 cat conftest.err >&5
c0d27fcc
MR
23497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23498 (exit $ac_status); } &&
ca81d7a0
JD
23499 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23500 { (case "(($ac_try" in
23501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23502 *) ac_try_echo=$ac_try;;
23503esac
23504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23505 (eval "$ac_try") 2>&5
edfaf76d
LK
23506 ac_status=$?
23507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23508 (exit $ac_status); }; } &&
23509 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
23510 { (case "(($ac_try" in
23511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23512 *) ac_try_echo=$ac_try;;
23513esac
23514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23515 (eval "$ac_try") 2>&5
c0d27fcc
MR
23516 ac_status=$?
23517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23518 (exit $ac_status); }; }; then
23519 ac_header_compiler=yes
23520else
23521 echo "$as_me: failed program was:" >&5
19650fd6
AS
23522sed 's/^/| /' conftest.$ac_ext >&5
23523
ca81d7a0 23524 ac_header_compiler=no
c0d27fcc 23525fi
ca81d7a0
JD
23526
23527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23528{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23529echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23530
23531# Is the header present?
ca81d7a0
JD
23532{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23533echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23534cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23535/* confdefs.h. */
23536_ACEOF
23537cat confdefs.h >>conftest.$ac_ext
23538cat >>conftest.$ac_ext <<_ACEOF
23539/* end confdefs.h. */
503d2be0
AS
23540#include <$ac_header>
23541_ACEOF
ca81d7a0
JD
23542if { (ac_try="$ac_cpp conftest.$ac_ext"
23543case "(($ac_try" in
23544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23545 *) ac_try_echo=$ac_try;;
23546esac
23547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23548 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23549 ac_status=$?
6bae0ccf 23550 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23551 rm -f conftest.er1
23552 cat conftest.err >&5
c0d27fcc 23553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23554 (exit $ac_status); } >/dev/null; then
23555 if test -s conftest.err; then
23556 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 23557 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
23558 else
23559 ac_cpp_err=
23560 fi
23561else
23562 ac_cpp_err=yes
23563fi
23564if test -z "$ac_cpp_err"; then
c0d27fcc 23565 ac_header_preproc=yes
503d2be0
AS
23566else
23567 echo "$as_me: failed program was:" >&5
19650fd6
AS
23568sed 's/^/| /' conftest.$ac_ext >&5
23569
c0d27fcc 23570 ac_header_preproc=no
a21616bd 23571fi
ca81d7a0 23572
503d2be0 23573rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23574{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23575echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
23576
23577# So? What about this header?
edfaf76d
LK
23578case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23579 yes:no: )
35996d22
AS
23580 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23581echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23582 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23583echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23584 ac_header_preproc=yes
19650fd6 23585 ;;
edfaf76d 23586 no:yes:* )
c0d27fcc
MR
23587 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23588echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23589 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23590echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23591 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23592echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23593 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23594echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23595 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 23596echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23597 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23598echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23599
19650fd6 23600 ;;
c0d27fcc 23601esac
ca81d7a0
JD
23602{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23603echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23604if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
23605 echo $ECHO_N "(cached) $ECHO_C" >&6
23606else
edfaf76d 23607 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 23608fi
ca81d7a0
JD
23609ac_res=`eval echo '${'$as_ac_Header'}'`
23610 { echo "$as_me:$LINENO: result: $ac_res" >&5
23611echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23612
23613fi
503d2be0 23614if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23615 cat >>confdefs.h <<_ACEOF
503d2be0 23616#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23617_ACEOF
503d2be0 23618
a21616bd 23619fi
c0d27fcc 23620
a21616bd
KR
23621done
23622
23623fi
c0d27fcc 23624
a21616bd
KR
23625done
23626
23627fi
c0d27fcc 23628
a21616bd
KR
23629done
23630
23631 fi
503d2be0
AS
23632
23633for ac_header in com_err.h
a21616bd 23634do
503d2be0 23635as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23636if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23637 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23638echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23639if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23640 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23641fi
ca81d7a0
JD
23642ac_res=`eval echo '${'$as_ac_Header'}'`
23643 { echo "$as_me:$LINENO: result: $ac_res" >&5
23644echo "${ECHO_T}$ac_res" >&6; }
98418dba 23645else
c0d27fcc 23646 # Is the header compilable?
ca81d7a0
JD
23647{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23648echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 23649cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23650/* confdefs.h. */
23651_ACEOF
23652cat confdefs.h >>conftest.$ac_ext
23653cat >>conftest.$ac_ext <<_ACEOF
23654/* end confdefs.h. */
c0d27fcc
MR
23655$ac_includes_default
23656#include <$ac_header>
23657_ACEOF
23658rm -f conftest.$ac_objext
ca81d7a0
JD
23659if { (ac_try="$ac_compile"
23660case "(($ac_try" in
23661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23662 *) ac_try_echo=$ac_try;;
23663esac
23664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23665 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
23666 ac_status=$?
23667 grep -v '^ *+' conftest.er1 >conftest.err
23668 rm -f conftest.er1
23669 cat conftest.err >&5
23670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23671 (exit $ac_status); } &&
ca81d7a0
JD
23672 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23673 { (case "(($ac_try" in
23674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23675 *) ac_try_echo=$ac_try;;
23676esac
23677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23678 (eval "$ac_try") 2>&5
35996d22
AS
23679 ac_status=$?
23680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
23681 (exit $ac_status); }; } &&
23682 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
23683 { (case "(($ac_try" in
23684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23685 *) ac_try_echo=$ac_try;;
23686esac
23687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23688 (eval "$ac_try") 2>&5
c0d27fcc
MR
23689 ac_status=$?
23690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23691 (exit $ac_status); }; }; then
23692 ac_header_compiler=yes
23693else
23694 echo "$as_me: failed program was:" >&5
19650fd6
AS
23695sed 's/^/| /' conftest.$ac_ext >&5
23696
ca81d7a0 23697 ac_header_compiler=no
c0d27fcc 23698fi
ca81d7a0
JD
23699
23700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23701{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23702echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23703
23704# Is the header present?
ca81d7a0
JD
23705{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23706echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23707cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23708/* confdefs.h. */
23709_ACEOF
23710cat confdefs.h >>conftest.$ac_ext
23711cat >>conftest.$ac_ext <<_ACEOF
23712/* end confdefs.h. */
503d2be0
AS
23713#include <$ac_header>
23714_ACEOF
ca81d7a0
JD
23715if { (ac_try="$ac_cpp conftest.$ac_ext"
23716case "(($ac_try" in
23717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23718 *) ac_try_echo=$ac_try;;
23719esac
23720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23721 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23722 ac_status=$?
6bae0ccf 23723 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23724 rm -f conftest.er1
23725 cat conftest.err >&5
c0d27fcc 23726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23727 (exit $ac_status); } >/dev/null; then
23728 if test -s conftest.err; then
23729 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 23730 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
23731 else
23732 ac_cpp_err=
23733 fi
23734else
23735 ac_cpp_err=yes
23736fi
23737if test -z "$ac_cpp_err"; then
c0d27fcc 23738 ac_header_preproc=yes
503d2be0
AS
23739else
23740 echo "$as_me: failed program was:" >&5
19650fd6
AS
23741sed 's/^/| /' conftest.$ac_ext >&5
23742
c0d27fcc 23743 ac_header_preproc=no
a21616bd 23744fi
ca81d7a0 23745
503d2be0 23746rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23747{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23748echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23749
23750# So? What about this header?
edfaf76d
LK
23751case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23752 yes:no: )
c0d27fcc
MR
23753 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23754echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23755 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23756echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23757 ac_header_preproc=yes
19650fd6 23758 ;;
edfaf76d 23759 no:yes:* )
c0d27fcc
MR
23760 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23761echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23762 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23763echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23764 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23765echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23766 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23767echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23768 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 23769echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23770 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23771echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23772
19650fd6 23773 ;;
c0d27fcc 23774esac
ca81d7a0
JD
23775{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23776echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23777if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
23778 echo $ECHO_N "(cached) $ECHO_C" >&6
23779else
edfaf76d 23780 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 23781fi
ca81d7a0
JD
23782ac_res=`eval echo '${'$as_ac_Header'}'`
23783 { echo "$as_me:$LINENO: result: $ac_res" >&5
23784echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23785
23786fi
503d2be0 23787if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23788 cat >>confdefs.h <<_ACEOF
503d2be0 23789#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23790_ACEOF
503d2be0 23791
a21616bd 23792fi
c0d27fcc 23793
a21616bd
KR
23794done
23795
23796fi
23797
ba4481b5
DL
23798# Solaris requires -lintl if you want strerror (which calls dgettext)
23799# to return localized messages.
503d2be0 23800
ca81d7a0
JD
23801{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
23802echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
23803if test "${ac_cv_lib_intl_dgettext+set}" = set; then
23804 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 23805else
503d2be0 23806 ac_check_lib_save_LIBS=$LIBS
ba4481b5 23807LIBS="-lintl $LIBS"
503d2be0 23808cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23809/* confdefs.h. */
23810_ACEOF
23811cat confdefs.h >>conftest.$ac_ext
23812cat >>conftest.$ac_ext <<_ACEOF
23813/* end confdefs.h. */
503d2be0 23814
ca81d7a0
JD
23815/* Override any GCC internal prototype to avoid an error.
23816 Use char because int might match the return type of a GCC
23817 builtin and then its argument prototype would still apply. */
503d2be0
AS
23818#ifdef __cplusplus
23819extern "C"
23820#endif
503d2be0
AS
23821char dgettext ();
23822int
23823main ()
23824{
ca81d7a0 23825return dgettext ();
503d2be0
AS
23826 ;
23827 return 0;
23828}
23829_ACEOF
23830rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23831if { (ac_try="$ac_link"
23832case "(($ac_try" in
23833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23834 *) ac_try_echo=$ac_try;;
23835esac
23836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23837 (eval "$ac_link") 2>conftest.er1
503d2be0 23838 ac_status=$?
edfaf76d
LK
23839 grep -v '^ *+' conftest.er1 >conftest.err
23840 rm -f conftest.er1
23841 cat conftest.err >&5
c0d27fcc 23842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23843 (exit $ac_status); } &&
ca81d7a0
JD
23844 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23845 { (case "(($ac_try" in
23846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23847 *) ac_try_echo=$ac_try;;
23848esac
23849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23850 (eval "$ac_try") 2>&5
edfaf76d
LK
23851 ac_status=$?
23852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23853 (exit $ac_status); }; } &&
23854 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
23855 { (case "(($ac_try" in
23856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23857 *) ac_try_echo=$ac_try;;
23858esac
23859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23860 (eval "$ac_try") 2>&5
503d2be0 23861 ac_status=$?
c0d27fcc 23862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23863 (exit $ac_status); }; }; then
23864 ac_cv_lib_intl_dgettext=yes
23865else
23866 echo "$as_me: failed program was:" >&5
19650fd6
AS
23867sed 's/^/| /' conftest.$ac_ext >&5
23868
ca81d7a0 23869 ac_cv_lib_intl_dgettext=no
503d2be0 23870fi
ca81d7a0
JD
23871
23872rm -f core conftest.err conftest.$ac_objext \
edfaf76d 23873 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
23874LIBS=$ac_check_lib_save_LIBS
23875fi
ca81d7a0
JD
23876{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
23877echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 23878if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 23879 cat >>confdefs.h <<_ACEOF
503d2be0 23880#define HAVE_LIBINTL 1
c0d27fcc 23881_ACEOF
ba4481b5
DL
23882
23883 LIBS="-lintl $LIBS"
23884
ba4481b5
DL
23885fi
23886
c0d27fcc 23887
ca81d7a0
JD
23888{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
23889echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
23890if test "${emacs_cv_localtime_cache+set}" = set; then
23891 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
23892else
23893 if test x$ac_cv_func_tzset = xyes; then
23894if test "$cross_compiling" = yes; then
23895 # If we have tzset, assume the worst when cross-compiling.
23896emacs_cv_localtime_cache=yes
23897else
503d2be0 23898 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23899/* confdefs.h. */
23900_ACEOF
23901cat confdefs.h >>conftest.$ac_ext
23902cat >>conftest.$ac_ext <<_ACEOF
23903/* end confdefs.h. */
ba4481b5 23904#include <time.h>
ba4481b5
DL
23905extern char **environ;
23906unset_TZ ()
23907{
23908 char **from, **to;
23909 for (to = from = environ; (*to = *from); from++)
23910 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
23911 to++;
23912}
23913char TZ_GMT0[] = "TZ=GMT0";
23914char TZ_PST8[] = "TZ=PST8";
23915main()
23916{
23917 time_t now = time ((time_t *) 0);
23918 int hour_GMT0, hour_unset;
23919 if (putenv (TZ_GMT0) != 0)
23920 exit (1);
23921 hour_GMT0 = localtime (&now)->tm_hour;
23922 unset_TZ ();
23923 hour_unset = localtime (&now)->tm_hour;
23924 if (putenv (TZ_PST8) != 0)
23925 exit (1);
23926 if (localtime (&now)->tm_hour == hour_GMT0)
23927 exit (1);
23928 unset_TZ ();
23929 if (localtime (&now)->tm_hour != hour_unset)
23930 exit (1);
23931 exit (0);
23932}
503d2be0
AS
23933_ACEOF
23934rm -f conftest$ac_exeext
ca81d7a0
JD
23935if { (ac_try="$ac_link"
23936case "(($ac_try" in
23937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23938 *) ac_try_echo=$ac_try;;
23939esac
23940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23941 (eval "$ac_link") 2>&5
503d2be0 23942 ac_status=$?
c0d27fcc 23943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23944 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23945 { (case "(($ac_try" in
23946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23947 *) ac_try_echo=$ac_try;;
23948esac
23949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23950 (eval "$ac_try") 2>&5
503d2be0 23951 ac_status=$?
c0d27fcc 23952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23953 (exit $ac_status); }; }; then
ba4481b5
DL
23954 emacs_cv_localtime_cache=no
23955else
503d2be0
AS
23956 echo "$as_me: program exited with status $ac_status" >&5
23957echo "$as_me: failed program was:" >&5
19650fd6
AS
23958sed 's/^/| /' conftest.$ac_ext >&5
23959
c0d27fcc 23960( exit $ac_status )
503d2be0 23961emacs_cv_localtime_cache=yes
ba4481b5 23962fi
ca81d7a0 23963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 23964fi
ca81d7a0
JD
23965
23966
ba4481b5
DL
23967else
23968 # If we lack tzset, report that localtime does not cache TZ,
23969 # since we can't invalidate the cache if we don't have tzset.
23970 emacs_cv_localtime_cache=no
23971fi
23972fi
ca81d7a0
JD
23973{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
23974echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 23975if test $emacs_cv_localtime_cache = yes; then
b936fae4 23976
c0d27fcc 23977cat >>confdefs.h <<\_ACEOF
ba4481b5 23978#define LOCALTIME_CACHE 1
c0d27fcc 23979_ACEOF
ba4481b5
DL
23980
23981fi
23982
23983if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
23984
23985for ac_func in gettimeofday
48d4b120 23986do
503d2be0 23987as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
23988{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23989echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23990if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23991 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 23992else
503d2be0 23993 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23994/* confdefs.h. */
23995_ACEOF
23996cat confdefs.h >>conftest.$ac_ext
23997cat >>conftest.$ac_ext <<_ACEOF
23998/* end confdefs.h. */
edfaf76d
LK
23999/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24000 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24001#define $ac_func innocuous_$ac_func
24002
48d4b120 24003/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
24004 which can conflict with char $ac_func (); below.
24005 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24006 <limits.h> exists even on freestanding compilers. */
edfaf76d 24007
19650fd6
AS
24008#ifdef __STDC__
24009# include <limits.h>
24010#else
24011# include <assert.h>
24012#endif
edfaf76d
LK
24013
24014#undef $ac_func
24015
ca81d7a0
JD
24016/* Override any GCC internal prototype to avoid an error.
24017 Use char because int might match the return type of a GCC
24018 builtin and then its argument prototype would still apply. */
503d2be0
AS
24019#ifdef __cplusplus
24020extern "C"
24021#endif
503d2be0 24022char $ac_func ();
48d4b120
DL
24023/* The GNU C library defines this for functions which it implements
24024 to always fail with ENOSYS. Some functions are actually named
24025 something starting with __ and the normal name is an alias. */
ca81d7a0 24026#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 24027choke me
cd958eb3
MB
24028#endif
24029
19650fd6
AS
24030int
24031main ()
24032{
ca81d7a0 24033return $ac_func ();
503d2be0
AS
24034 ;
24035 return 0;
24036}
24037_ACEOF
24038rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
24039if { (ac_try="$ac_link"
24040case "(($ac_try" in
24041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24042 *) ac_try_echo=$ac_try;;
24043esac
24044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24045 (eval "$ac_link") 2>conftest.er1
503d2be0 24046 ac_status=$?
edfaf76d
LK
24047 grep -v '^ *+' conftest.er1 >conftest.err
24048 rm -f conftest.er1
24049 cat conftest.err >&5
c0d27fcc 24050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 24051 (exit $ac_status); } &&
ca81d7a0
JD
24052 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24053 { (case "(($ac_try" in
24054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24055 *) ac_try_echo=$ac_try;;
24056esac
24057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24058 (eval "$ac_try") 2>&5
edfaf76d
LK
24059 ac_status=$?
24060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24061 (exit $ac_status); }; } &&
24062 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
24063 { (case "(($ac_try" in
24064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24065 *) ac_try_echo=$ac_try;;
24066esac
24067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24068 (eval "$ac_try") 2>&5
503d2be0 24069 ac_status=$?
c0d27fcc 24070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
24071 (exit $ac_status); }; }; then
24072 eval "$as_ac_var=yes"
24073else
24074 echo "$as_me: failed program was:" >&5
19650fd6
AS
24075sed 's/^/| /' conftest.$ac_ext >&5
24076
ca81d7a0 24077 eval "$as_ac_var=no"
503d2be0 24078fi
ca81d7a0
JD
24079
24080rm -f core conftest.err conftest.$ac_objext \
edfaf76d 24081 conftest$ac_exeext conftest.$ac_ext
503d2be0 24082fi
ca81d7a0
JD
24083ac_res=`eval echo '${'$as_ac_var'}'`
24084 { echo "$as_me:$LINENO: result: $ac_res" >&5
24085echo "${ECHO_T}$ac_res" >&6; }
503d2be0 24086if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 24087 cat >>confdefs.h <<_ACEOF
503d2be0 24088#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 24089_ACEOF
48d4b120 24090
48d4b120
DL
24091fi
24092done
24093
b936fae4 24094 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
24095 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
24096echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
24097if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
24098 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 24099else
503d2be0 24100 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24101/* confdefs.h. */
24102_ACEOF
24103cat confdefs.h >>conftest.$ac_ext
24104cat >>conftest.$ac_ext <<_ACEOF
24105/* end confdefs.h. */
ba4481b5 24106
a3f08d9e
DL
24107#ifdef TIME_WITH_SYS_TIME
24108#include <sys/time.h>
24109#include <time.h>
24110#else
24111#ifdef HAVE_SYS_TIME_H
24112#include <sys/time.h>
24113#else
24114#include <time.h>
24115#endif
24116#endif
503d2be0
AS
24117int
24118main ()
24119{
a3f08d9e 24120struct timeval time;
b936fae4 24121 gettimeofday (&time, 0);
503d2be0
AS
24122 ;
24123 return 0;
24124}
24125_ACEOF
24126rm -f conftest.$ac_objext
ca81d7a0
JD
24127if { (ac_try="$ac_compile"
24128case "(($ac_try" in
24129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24130 *) ac_try_echo=$ac_try;;
24131esac
24132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24133 (eval "$ac_compile") 2>conftest.er1
503d2be0 24134 ac_status=$?
edfaf76d
LK
24135 grep -v '^ *+' conftest.er1 >conftest.err
24136 rm -f conftest.er1
24137 cat conftest.err >&5
c0d27fcc 24138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 24139 (exit $ac_status); } &&
ca81d7a0
JD
24140 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24141 { (case "(($ac_try" in
24142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24143 *) ac_try_echo=$ac_try;;
24144esac
24145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24146 (eval "$ac_try") 2>&5
edfaf76d
LK
24147 ac_status=$?
24148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24149 (exit $ac_status); }; } &&
24150 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
24151 { (case "(($ac_try" in
24152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24153 *) ac_try_echo=$ac_try;;
24154esac
24155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24156 (eval "$ac_try") 2>&5
503d2be0 24157 ac_status=$?
c0d27fcc 24158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 24159 (exit $ac_status); }; }; then
ba4481b5
DL
24160 emacs_cv_gettimeofday_two_arguments=yes
24161else
503d2be0 24162 echo "$as_me: failed program was:" >&5
19650fd6
AS
24163sed 's/^/| /' conftest.$ac_ext >&5
24164
ca81d7a0 24165 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 24166fi
ca81d7a0
JD
24167
24168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24169fi
ca81d7a0
JD
24170{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
24171echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
24172 if test $emacs_cv_gettimeofday_two_arguments = no; then
24173
c0d27fcc 24174cat >>confdefs.h <<\_ACEOF
ba4481b5 24175#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 24176_ACEOF
ba4481b5 24177
b936fae4 24178 fi
ba4481b5
DL
24179 fi
24180fi
24181
24182ok_so_far=yes
ca81d7a0
JD
24183{ echo "$as_me:$LINENO: checking for socket" >&5
24184echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
24185if test "${ac_cv_func_socket+set}" = set; then
24186 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 24187else
503d2be0 24188 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24189/* confdefs.h. */
24190_ACEOF
24191cat confdefs.h >>conftest.$ac_ext
24192cat >>conftest.$ac_ext <<_ACEOF
24193/* end confdefs.h. */
edfaf76d
LK
24194/* Define socket to an innocuous variant, in case <limits.h> declares socket.
24195 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24196#define socket innocuous_socket
24197
ba4481b5 24198/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
24199 which can conflict with char socket (); below.
24200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24201 <limits.h> exists even on freestanding compilers. */
edfaf76d 24202
19650fd6
AS
24203#ifdef __STDC__
24204# include <limits.h>
24205#else
24206# include <assert.h>
24207#endif
edfaf76d
LK
24208
24209#undef socket
24210
ca81d7a0
JD
24211/* Override any GCC internal prototype to avoid an error.
24212 Use char because int might match the return type of a GCC
24213 builtin and then its argument prototype would still apply. */
503d2be0
AS
24214#ifdef __cplusplus
24215extern "C"
24216#endif
503d2be0 24217char socket ();
ba4481b5
DL
24218/* The GNU C library defines this for functions which it implements
24219 to always fail with ENOSYS. Some functions are actually named
24220 something starting with __ and the normal name is an alias. */
ca81d7a0 24221#if defined __stub_socket || defined __stub___socket
ba4481b5 24222choke me
cd958eb3
MB
24223#endif
24224
19650fd6
AS
24225int
24226main ()
24227{
ca81d7a0 24228return socket ();
503d2be0
AS
24229 ;
24230 return 0;
24231}
24232_ACEOF
24233rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
24234if { (ac_try="$ac_link"
24235case "(($ac_try" in
24236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24237 *) ac_try_echo=$ac_try;;
24238esac
24239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24240 (eval "$ac_link") 2>conftest.er1
503d2be0 24241 ac_status=$?
edfaf76d
LK
24242 grep -v '^ *+' conftest.er1 >conftest.err
24243 rm -f conftest.er1
24244 cat conftest.err >&5
c0d27fcc 24245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 24246 (exit $ac_status); } &&
ca81d7a0
JD
24247 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24248 { (case "(($ac_try" in
24249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24250 *) ac_try_echo=$ac_try;;
24251esac
24252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24253 (eval "$ac_try") 2>&5
edfaf76d
LK
24254 ac_status=$?
24255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24256 (exit $ac_status); }; } &&
24257 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
24258 { (case "(($ac_try" in
24259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24260 *) ac_try_echo=$ac_try;;
24261esac
24262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24263 (eval "$ac_try") 2>&5
503d2be0 24264 ac_status=$?
c0d27fcc 24265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
24266 (exit $ac_status); }; }; then
24267 ac_cv_func_socket=yes
24268else
24269 echo "$as_me: failed program was:" >&5
19650fd6
AS
24270sed 's/^/| /' conftest.$ac_ext >&5
24271
ca81d7a0 24272 ac_cv_func_socket=no
503d2be0 24273fi
ca81d7a0
JD
24274
24275rm -f core conftest.err conftest.$ac_objext \
edfaf76d 24276 conftest$ac_exeext conftest.$ac_ext
503d2be0 24277fi
ca81d7a0
JD
24278{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
24279echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 24280if test $ac_cv_func_socket = yes; then
ba4481b5
DL
24281 :
24282else
503d2be0 24283 ok_so_far=no
ba4481b5
DL
24284fi
24285
24286if test $ok_so_far = yes; then
c0d27fcc 24287 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
24288 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
24289echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
24290if test "${ac_cv_header_netinet_in_h+set}" = set; then
24291 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 24292fi
ca81d7a0
JD
24293{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
24294echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 24295else
c0d27fcc 24296 # Is the header compilable?
ca81d7a0
JD
24297{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
24298echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 24299cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24300/* confdefs.h. */
24301_ACEOF
24302cat confdefs.h >>conftest.$ac_ext
24303cat >>conftest.$ac_ext <<_ACEOF
24304/* end confdefs.h. */
c0d27fcc
MR
24305$ac_includes_default
24306#include <netinet/in.h>
24307_ACEOF
24308rm -f conftest.$ac_objext
ca81d7a0
JD
24309if { (ac_try="$ac_compile"
24310case "(($ac_try" in
24311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24312 *) ac_try_echo=$ac_try;;
24313esac
24314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24315 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 24316 ac_status=$?
edfaf76d
LK
24317 grep -v '^ *+' conftest.er1 >conftest.err
24318 rm -f conftest.er1
24319 cat conftest.err >&5
c0d27fcc
MR
24320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24321 (exit $ac_status); } &&
ca81d7a0
JD
24322 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24323 { (case "(($ac_try" in
24324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24325 *) ac_try_echo=$ac_try;;
24326esac
24327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24328 (eval "$ac_try") 2>&5
edfaf76d
LK
24329 ac_status=$?
24330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24331 (exit $ac_status); }; } &&
24332 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
24333 { (case "(($ac_try" in
24334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24335 *) ac_try_echo=$ac_try;;
24336esac
24337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24338 (eval "$ac_try") 2>&5
c0d27fcc
MR
24339 ac_status=$?
24340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24341 (exit $ac_status); }; }; then
24342 ac_header_compiler=yes
24343else
24344 echo "$as_me: failed program was:" >&5
19650fd6
AS
24345sed 's/^/| /' conftest.$ac_ext >&5
24346
ca81d7a0 24347 ac_header_compiler=no
c0d27fcc 24348fi
ca81d7a0
JD
24349
24350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24351{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24352echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
24353
24354# Is the header present?
ca81d7a0
JD
24355{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
24356echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 24357cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24358/* confdefs.h. */
24359_ACEOF
24360cat confdefs.h >>conftest.$ac_ext
24361cat >>conftest.$ac_ext <<_ACEOF
24362/* end confdefs.h. */
ba4481b5 24363#include <netinet/in.h>
503d2be0 24364_ACEOF
ca81d7a0
JD
24365if { (ac_try="$ac_cpp conftest.$ac_ext"
24366case "(($ac_try" in
24367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24368 *) ac_try_echo=$ac_try;;
24369esac
24370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24371 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 24372 ac_status=$?
6bae0ccf 24373 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
24374 rm -f conftest.er1
24375 cat conftest.err >&5
c0d27fcc 24376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
24377 (exit $ac_status); } >/dev/null; then
24378 if test -s conftest.err; then
24379 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 24380 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
24381 else
24382 ac_cpp_err=
24383 fi
24384else
24385 ac_cpp_err=yes
24386fi
24387if test -z "$ac_cpp_err"; then
c0d27fcc 24388 ac_header_preproc=yes
ba4481b5 24389else
503d2be0 24390 echo "$as_me: failed program was:" >&5
19650fd6
AS
24391sed 's/^/| /' conftest.$ac_ext >&5
24392
c0d27fcc 24393 ac_header_preproc=no
ba4481b5 24394fi
ca81d7a0 24395
503d2be0 24396rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
24397{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24398echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
24399
24400# So? What about this header?
edfaf76d
LK
24401case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24402 yes:no: )
c0d27fcc
MR
24403 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
24404echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
24405 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
24406echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
24407 ac_header_preproc=yes
19650fd6 24408 ;;
edfaf76d 24409 no:yes:* )
c0d27fcc
MR
24410 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
24411echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
24412 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
24413echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
24414 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
24415echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
24416 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
24417echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 24418 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 24419echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
24420 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
24421echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 24422
19650fd6 24423 ;;
c0d27fcc 24424esac
ca81d7a0
JD
24425{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
24426echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
24427if test "${ac_cv_header_netinet_in_h+set}" = set; then
24428 echo $ECHO_N "(cached) $ECHO_C" >&6
24429else
24430 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 24431fi
ca81d7a0
JD
24432{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
24433echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
24434
24435fi
503d2be0 24436if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
24437 :
24438else
503d2be0 24439 ok_so_far=no
ba4481b5
DL
24440fi
24441
c0d27fcc 24442
ba4481b5
DL
24443fi
24444if test $ok_so_far = yes; then
c0d27fcc 24445 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
24446 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
24447echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
24448if test "${ac_cv_header_arpa_inet_h+set}" = set; then
24449 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 24450fi
ca81d7a0
JD
24451{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
24452echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 24453else
c0d27fcc 24454 # Is the header compilable?
ca81d7a0
JD
24455{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
24456echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 24457cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24458/* confdefs.h. */
24459_ACEOF
24460cat confdefs.h >>conftest.$ac_ext
24461cat >>conftest.$ac_ext <<_ACEOF
24462/* end confdefs.h. */
c0d27fcc
MR
24463$ac_includes_default
24464#include <arpa/inet.h>
24465_ACEOF
24466rm -f conftest.$ac_objext
ca81d7a0
JD
24467if { (ac_try="$ac_compile"
24468case "(($ac_try" in
24469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24470 *) ac_try_echo=$ac_try;;
24471esac
24472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24473 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 24474 ac_status=$?
edfaf76d
LK
24475 grep -v '^ *+' conftest.er1 >conftest.err
24476 rm -f conftest.er1
24477 cat conftest.err >&5
c0d27fcc
MR
24478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24479 (exit $ac_status); } &&
ca81d7a0
JD
24480 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24481 { (case "(($ac_try" in
24482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24483 *) ac_try_echo=$ac_try;;
24484esac
24485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24486 (eval "$ac_try") 2>&5
edfaf76d
LK
24487 ac_status=$?
24488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24489 (exit $ac_status); }; } &&
24490 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
24491 { (case "(($ac_try" in
24492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24493 *) ac_try_echo=$ac_try;;
24494esac
24495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24496 (eval "$ac_try") 2>&5
c0d27fcc
MR
24497 ac_status=$?
24498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24499 (exit $ac_status); }; }; then
24500 ac_header_compiler=yes
24501else
24502 echo "$as_me: failed program was:" >&5
19650fd6
AS
24503sed 's/^/| /' conftest.$ac_ext >&5
24504
ca81d7a0 24505 ac_header_compiler=no
c0d27fcc 24506fi
ca81d7a0
JD
24507
24508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24509{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24510echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
24511
24512# Is the header present?
ca81d7a0
JD
24513{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
24514echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 24515cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24516/* confdefs.h. */
24517_ACEOF
24518cat confdefs.h >>conftest.$ac_ext
24519cat >>conftest.$ac_ext <<_ACEOF
24520/* end confdefs.h. */
ba4481b5 24521#include <arpa/inet.h>
503d2be0 24522_ACEOF
ca81d7a0
JD
24523if { (ac_try="$ac_cpp conftest.$ac_ext"
24524case "(($ac_try" in
24525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24526 *) ac_try_echo=$ac_try;;
24527esac
24528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24529 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 24530 ac_status=$?
6bae0ccf 24531 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
24532 rm -f conftest.er1
24533 cat conftest.err >&5
c0d27fcc 24534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
24535 (exit $ac_status); } >/dev/null; then
24536 if test -s conftest.err; then
24537 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 24538 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
24539 else
24540 ac_cpp_err=
24541 fi
24542else
24543 ac_cpp_err=yes
24544fi
24545if test -z "$ac_cpp_err"; then
c0d27fcc 24546 ac_header_preproc=yes
ba4481b5 24547else
503d2be0 24548 echo "$as_me: failed program was:" >&5
19650fd6
AS
24549sed 's/^/| /' conftest.$ac_ext >&5
24550
c0d27fcc 24551 ac_header_preproc=no
ba4481b5 24552fi
ca81d7a0 24553
503d2be0 24554rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
24555{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24556echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
24557
24558# So? What about this header?
edfaf76d
LK
24559case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24560 yes:no: )
c0d27fcc
MR
24561 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
24562echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
24563 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
24564echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
24565 ac_header_preproc=yes
19650fd6 24566 ;;
edfaf76d 24567 no:yes:* )
c0d27fcc
MR
24568 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
24569echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
24570 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
24571echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
24572 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
24573echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
24574 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
24575echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 24576 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 24577echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
24578 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
24579echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 24580
19650fd6 24581 ;;
c0d27fcc 24582esac
ca81d7a0
JD
24583{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
24584echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
24585if test "${ac_cv_header_arpa_inet_h+set}" = set; then
24586 echo $ECHO_N "(cached) $ECHO_C" >&6
24587else
24588 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 24589fi
ca81d7a0
JD
24590{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
24591echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
24592
24593fi
503d2be0 24594if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
24595 :
24596else
503d2be0 24597 ok_so_far=no
ba4481b5
DL
24598fi
24599
c0d27fcc 24600
ba4481b5
DL
24601fi
24602if test $ok_so_far = yes; then
b936fae4 24603
c0d27fcc 24604cat >>confdefs.h <<\_ACEOF
ba4481b5 24605#define HAVE_INET_SOCKETS 1
c0d27fcc 24606_ACEOF
ba4481b5
DL
24607
24608fi
24609
2d2b6695 24610
7862d3a8 24611for ac_header in sys/ioctl.h
2d2b6695
KS
24612do
24613as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
24614if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
24615 { echo "$as_me:$LINENO: checking for $ac_header" >&5
24616echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
24617if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
24618 echo $ECHO_N "(cached) $ECHO_C" >&6
24619fi
ca81d7a0
JD
24620ac_res=`eval echo '${'$as_ac_Header'}'`
24621 { echo "$as_me:$LINENO: result: $ac_res" >&5
24622echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
24623else
24624 # Is the header compilable?
ca81d7a0
JD
24625{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
24626echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 24627cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
24628/* confdefs.h. */
24629_ACEOF
24630cat confdefs.h >>conftest.$ac_ext
24631cat >>conftest.$ac_ext <<_ACEOF
24632/* end confdefs.h. */
24633$ac_includes_default
24634#include <$ac_header>
24635_ACEOF
24636rm -f conftest.$ac_objext
ca81d7a0
JD
24637if { (ac_try="$ac_compile"
24638case "(($ac_try" in
24639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24640 *) ac_try_echo=$ac_try;;
24641esac
24642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24643 (eval "$ac_compile") 2>conftest.er1
2d2b6695 24644 ac_status=$?
edfaf76d
LK
24645 grep -v '^ *+' conftest.er1 >conftest.err
24646 rm -f conftest.er1
24647 cat conftest.err >&5
2d2b6695
KS
24648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24649 (exit $ac_status); } &&
ca81d7a0
JD
24650 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24651 { (case "(($ac_try" in
24652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24653 *) ac_try_echo=$ac_try;;
24654esac
24655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24656 (eval "$ac_try") 2>&5
edfaf76d
LK
24657 ac_status=$?
24658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24659 (exit $ac_status); }; } &&
24660 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
24661 { (case "(($ac_try" in
24662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24663 *) ac_try_echo=$ac_try;;
24664esac
24665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24666 (eval "$ac_try") 2>&5
2d2b6695
KS
24667 ac_status=$?
24668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24669 (exit $ac_status); }; }; then
24670 ac_header_compiler=yes
24671else
24672 echo "$as_me: failed program was:" >&5
24673sed 's/^/| /' conftest.$ac_ext >&5
24674
ca81d7a0 24675 ac_header_compiler=no
2d2b6695 24676fi
ca81d7a0
JD
24677
24678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24679{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24680echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
24681
24682# Is the header present?
ca81d7a0
JD
24683{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
24684echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 24685cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
24686/* confdefs.h. */
24687_ACEOF
24688cat confdefs.h >>conftest.$ac_ext
24689cat >>conftest.$ac_ext <<_ACEOF
24690/* end confdefs.h. */
24691#include <$ac_header>
24692_ACEOF
ca81d7a0
JD
24693if { (ac_try="$ac_cpp conftest.$ac_ext"
24694case "(($ac_try" in
24695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24696 *) ac_try_echo=$ac_try;;
24697esac
24698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
24700 ac_status=$?
24701 grep -v '^ *+' conftest.er1 >conftest.err
24702 rm -f conftest.er1
24703 cat conftest.err >&5
24704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24705 (exit $ac_status); } >/dev/null; then
24706 if test -s conftest.err; then
24707 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 24708 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2d2b6695
KS
24709 else
24710 ac_cpp_err=
24711 fi
24712else
24713 ac_cpp_err=yes
24714fi
24715if test -z "$ac_cpp_err"; then
24716 ac_header_preproc=yes
24717else
24718 echo "$as_me: failed program was:" >&5
24719sed 's/^/| /' conftest.$ac_ext >&5
24720
24721 ac_header_preproc=no
24722fi
ca81d7a0 24723
2d2b6695 24724rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
24725{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24726echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
24727
24728# So? What about this header?
edfaf76d
LK
24729case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24730 yes:no: )
2d2b6695
KS
24731 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
24732echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
24733 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
24734echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
24735 ac_header_preproc=yes
2d2b6695 24736 ;;
edfaf76d 24737 no:yes:* )
2d2b6695
KS
24738 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
24739echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
24740 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
24741echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
24742 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
24743echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
24744 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
24745echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
24746 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
24747echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
24748 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
24749echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 24750
2d2b6695
KS
24751 ;;
24752esac
ca81d7a0
JD
24753{ echo "$as_me:$LINENO: checking for $ac_header" >&5
24754echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
24755if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
24756 echo $ECHO_N "(cached) $ECHO_C" >&6
24757else
edfaf76d 24758 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 24759fi
ca81d7a0
JD
24760ac_res=`eval echo '${'$as_ac_Header'}'`
24761 { echo "$as_me:$LINENO: result: $ac_res" >&5
24762echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
24763
24764fi
24765if test `eval echo '${'$as_ac_Header'}'` = yes; then
24766 cat >>confdefs.h <<_ACEOF
24767#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24768_ACEOF
24769
24770fi
24771
24772done
24773
24774
ba4481b5 24775if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 24776
c0d27fcc 24777cat >>confdefs.h <<\_ACEOF
ba4481b5 24778#define HAVE_AIX_SMT_EXP 1
c0d27fcc 24779_ACEOF
ba4481b5
DL
24780
24781fi
24782
ca81d7a0
JD
24783{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
24784echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 24785if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
24786 { echo "$as_me:$LINENO: result: yes" >&5
24787echo "${ECHO_T}yes" >&6; }
b936fae4 24788
c0d27fcc 24789cat >>confdefs.h <<\_ACEOF
3d9fec71 24790#define HAVE_DEV_PTMX 1
c0d27fcc 24791_ACEOF
3d9fec71
DL
24792
24793else
ca81d7a0
JD
24794 { echo "$as_me:$LINENO: result: no" >&5
24795echo "${ECHO_T}no" >&6; }
3d9fec71
DL
24796fi
24797
ca81d7a0
JD
24798{ echo "$as_me:$LINENO: checking for pid_t" >&5
24799echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
24800if test "${ac_cv_type_pid_t+set}" = set; then
24801 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 24802else
503d2be0 24803 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24804/* confdefs.h. */
24805_ACEOF
24806cat confdefs.h >>conftest.$ac_ext
24807cat >>conftest.$ac_ext <<_ACEOF
24808/* end confdefs.h. */
503d2be0 24809$ac_includes_default
ca81d7a0 24810typedef pid_t ac__type_new_;
503d2be0
AS
24811int
24812main ()
24813{
ca81d7a0 24814if ((ac__type_new_ *) 0)
503d2be0 24815 return 0;
ca81d7a0 24816if (sizeof (ac__type_new_))
503d2be0
AS
24817 return 0;
24818 ;
24819 return 0;
24820}
24821_ACEOF
24822rm -f conftest.$ac_objext
ca81d7a0
JD
24823if { (ac_try="$ac_compile"
24824case "(($ac_try" in
24825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24826 *) ac_try_echo=$ac_try;;
24827esac
24828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24829 (eval "$ac_compile") 2>conftest.er1
503d2be0 24830 ac_status=$?
edfaf76d
LK
24831 grep -v '^ *+' conftest.er1 >conftest.err
24832 rm -f conftest.er1
24833 cat conftest.err >&5
c0d27fcc 24834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 24835 (exit $ac_status); } &&
ca81d7a0
JD
24836 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24837 { (case "(($ac_try" in
24838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24839 *) ac_try_echo=$ac_try;;
24840esac
24841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24842 (eval "$ac_try") 2>&5
edfaf76d
LK
24843 ac_status=$?
24844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24845 (exit $ac_status); }; } &&
24846 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
24847 { (case "(($ac_try" in
24848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24849 *) ac_try_echo=$ac_try;;
24850esac
24851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24852 (eval "$ac_try") 2>&5
503d2be0 24853 ac_status=$?
c0d27fcc 24854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 24855 (exit $ac_status); }; }; then
647847ea
DL
24856 ac_cv_type_pid_t=yes
24857else
503d2be0 24858 echo "$as_me: failed program was:" >&5
19650fd6
AS
24859sed 's/^/| /' conftest.$ac_ext >&5
24860
ca81d7a0 24861 ac_cv_type_pid_t=no
647847ea 24862fi
ca81d7a0
JD
24863
24864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 24865fi
ca81d7a0
JD
24866{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
24867echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
24868if test $ac_cv_type_pid_t = yes; then
24869 :
24870else
24871
c0d27fcc 24872cat >>confdefs.h <<_ACEOF
647847ea 24873#define pid_t int
c0d27fcc 24874_ACEOF
647847ea
DL
24875
24876fi
24877
c0d27fcc 24878
ca81d7a0 24879for ac_header in vfork.h
503d2be0
AS
24880do
24881as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
24882if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
24883 { echo "$as_me:$LINENO: checking for $ac_header" >&5
24884echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
24885if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 24886 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 24887fi
ca81d7a0
JD
24888ac_res=`eval echo '${'$as_ac_Header'}'`
24889 { echo "$as_me:$LINENO: result: $ac_res" >&5
24890echo "${ECHO_T}$ac_res" >&6; }
98418dba 24891else
c0d27fcc 24892 # Is the header compilable?
ca81d7a0
JD
24893{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
24894echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 24895cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24896/* confdefs.h. */
24897_ACEOF
24898cat confdefs.h >>conftest.$ac_ext
24899cat >>conftest.$ac_ext <<_ACEOF
24900/* end confdefs.h. */
c0d27fcc
MR
24901$ac_includes_default
24902#include <$ac_header>
24903_ACEOF
24904rm -f conftest.$ac_objext
ca81d7a0
JD
24905if { (ac_try="$ac_compile"
24906case "(($ac_try" in
24907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24908 *) ac_try_echo=$ac_try;;
24909esac
24910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24911 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 24912 ac_status=$?
edfaf76d
LK
24913 grep -v '^ *+' conftest.er1 >conftest.err
24914 rm -f conftest.er1
24915 cat conftest.err >&5
c0d27fcc
MR
24916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24917 (exit $ac_status); } &&
ca81d7a0
JD
24918 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24919 { (case "(($ac_try" in
24920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24921 *) ac_try_echo=$ac_try;;
24922esac
24923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24924 (eval "$ac_try") 2>&5
edfaf76d
LK
24925 ac_status=$?
24926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24927 (exit $ac_status); }; } &&
24928 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
24929 { (case "(($ac_try" in
24930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24931 *) ac_try_echo=$ac_try;;
24932esac
24933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24934 (eval "$ac_try") 2>&5
c0d27fcc
MR
24935 ac_status=$?
24936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24937 (exit $ac_status); }; }; then
24938 ac_header_compiler=yes
24939else
24940 echo "$as_me: failed program was:" >&5
19650fd6
AS
24941sed 's/^/| /' conftest.$ac_ext >&5
24942
ca81d7a0 24943 ac_header_compiler=no
c0d27fcc 24944fi
ca81d7a0
JD
24945
24946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24947{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24948echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
24949
24950# Is the header present?
ca81d7a0
JD
24951{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
24952echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 24953cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24954/* confdefs.h. */
24955_ACEOF
24956cat confdefs.h >>conftest.$ac_ext
24957cat >>conftest.$ac_ext <<_ACEOF
24958/* end confdefs.h. */
503d2be0
AS
24959#include <$ac_header>
24960_ACEOF
ca81d7a0
JD
24961if { (ac_try="$ac_cpp conftest.$ac_ext"
24962case "(($ac_try" in
24963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24964 *) ac_try_echo=$ac_try;;
24965esac
24966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24967 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 24968 ac_status=$?
6bae0ccf 24969 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
24970 rm -f conftest.er1
24971 cat conftest.err >&5
c0d27fcc 24972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
24973 (exit $ac_status); } >/dev/null; then
24974 if test -s conftest.err; then
24975 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 24976 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
24977 else
24978 ac_cpp_err=
24979 fi
647847ea 24980else
503d2be0
AS
24981 ac_cpp_err=yes
24982fi
24983if test -z "$ac_cpp_err"; then
c0d27fcc 24984 ac_header_preproc=yes
647847ea 24985else
503d2be0 24986 echo "$as_me: failed program was:" >&5
19650fd6
AS
24987sed 's/^/| /' conftest.$ac_ext >&5
24988
c0d27fcc 24989 ac_header_preproc=no
647847ea 24990fi
ca81d7a0 24991
503d2be0 24992rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
24993{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24994echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
24995
24996# So? What about this header?
edfaf76d
LK
24997case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24998 yes:no: )
c0d27fcc
MR
24999 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25000echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
25001 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25002echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25003 ac_header_preproc=yes
19650fd6 25004 ;;
edfaf76d 25005 no:yes:* )
c0d27fcc
MR
25006 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25007echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
25008 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
25009echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
25010 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25011echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25012 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
25013echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 25014 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 25015echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
25016 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25017echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 25018
19650fd6 25019 ;;
c0d27fcc 25020esac
ca81d7a0
JD
25021{ echo "$as_me:$LINENO: checking for $ac_header" >&5
25022echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
25023if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
25024 echo $ECHO_N "(cached) $ECHO_C" >&6
25025else
edfaf76d 25026 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 25027fi
ca81d7a0
JD
25028ac_res=`eval echo '${'$as_ac_Header'}'`
25029 { echo "$as_me:$LINENO: result: $ac_res" >&5
25030echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
25031
25032fi
503d2be0 25033if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 25034 cat >>confdefs.h <<_ACEOF
503d2be0 25035#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 25036_ACEOF
647847ea 25037
73b77ee5 25038fi
c0d27fcc 25039
503d2be0 25040done
73b77ee5 25041
c0d27fcc
MR
25042
25043
503d2be0
AS
25044for ac_func in fork vfork
25045do
25046as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
25047{ echo "$as_me:$LINENO: checking for $ac_func" >&5
25048echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
25049if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 25050 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 25051else
503d2be0 25052 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
25053/* confdefs.h. */
25054_ACEOF
25055cat confdefs.h >>conftest.$ac_ext
25056cat >>conftest.$ac_ext <<_ACEOF
25057/* end confdefs.h. */
edfaf76d
LK
25058/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
25059 For example, HP-UX 11i <limits.h> declares gettimeofday. */
25060#define $ac_func innocuous_$ac_func
25061
fa0b693c 25062/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
25063 which can conflict with char $ac_func (); below.
25064 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25065 <limits.h> exists even on freestanding compilers. */
edfaf76d 25066
19650fd6
AS
25067#ifdef __STDC__
25068# include <limits.h>
25069#else
25070# include <assert.h>
25071#endif
edfaf76d
LK
25072
25073#undef $ac_func
25074
ca81d7a0
JD
25075/* Override any GCC internal prototype to avoid an error.
25076 Use char because int might match the return type of a GCC
25077 builtin and then its argument prototype would still apply. */
503d2be0
AS
25078#ifdef __cplusplus
25079extern "C"
25080#endif
503d2be0 25081char $ac_func ();
fa0b693c
GM
25082/* The GNU C library defines this for functions which it implements
25083 to always fail with ENOSYS. Some functions are actually named
25084 something starting with __ and the normal name is an alias. */
ca81d7a0 25085#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 25086choke me
fa0b693c
GM
25087#endif
25088
19650fd6
AS
25089int
25090main ()
25091{
ca81d7a0 25092return $ac_func ();
503d2be0
AS
25093 ;
25094 return 0;
25095}
25096_ACEOF
25097rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
25098if { (ac_try="$ac_link"
25099case "(($ac_try" in
25100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25101 *) ac_try_echo=$ac_try;;
25102esac
25103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25104 (eval "$ac_link") 2>conftest.er1
503d2be0 25105 ac_status=$?
edfaf76d
LK
25106 grep -v '^ *+' conftest.er1 >conftest.err
25107 rm -f conftest.er1
25108 cat conftest.err >&5
c0d27fcc 25109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 25110 (exit $ac_status); } &&
ca81d7a0
JD
25111 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25112 { (case "(($ac_try" in
25113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25114 *) ac_try_echo=$ac_try;;
25115esac
25116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25117 (eval "$ac_try") 2>&5
edfaf76d
LK
25118 ac_status=$?
25119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25120 (exit $ac_status); }; } &&
25121 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
25122 { (case "(($ac_try" in
25123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25124 *) ac_try_echo=$ac_try;;
25125esac
25126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25127 (eval "$ac_try") 2>&5
503d2be0 25128 ac_status=$?
c0d27fcc 25129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
25130 (exit $ac_status); }; }; then
25131 eval "$as_ac_var=yes"
25132else
25133 echo "$as_me: failed program was:" >&5
19650fd6
AS
25134sed 's/^/| /' conftest.$ac_ext >&5
25135
ca81d7a0 25136 eval "$as_ac_var=no"
503d2be0 25137fi
ca81d7a0
JD
25138
25139rm -f core conftest.err conftest.$ac_objext \
edfaf76d 25140 conftest$ac_exeext conftest.$ac_ext
503d2be0 25141fi
ca81d7a0
JD
25142ac_res=`eval echo '${'$as_ac_var'}'`
25143 { echo "$as_me:$LINENO: result: $ac_res" >&5
25144echo "${ECHO_T}$ac_res" >&6; }
503d2be0 25145if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 25146 cat >>confdefs.h <<_ACEOF
503d2be0 25147#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 25148_ACEOF
503d2be0 25149
fa0b693c 25150fi
503d2be0 25151done
fa0b693c 25152
503d2be0 25153if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
25154 { echo "$as_me:$LINENO: checking for working fork" >&5
25155echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
25156if test "${ac_cv_func_fork_works+set}" = set; then
25157 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 25158else
503d2be0
AS
25159 if test "$cross_compiling" = yes; then
25160 ac_cv_func_fork_works=cross
25161else
25162 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
25163/* confdefs.h. */
25164_ACEOF
25165cat confdefs.h >>conftest.$ac_ext
25166cat >>conftest.$ac_ext <<_ACEOF
25167/* end confdefs.h. */
25168$ac_includes_default
25169int
25170main ()
25171{
25172
25173 /* By Ruediger Kuhlmann. */
25174 return fork () < 0;
25175
25176 ;
25177 return 0;
25178}
503d2be0
AS
25179_ACEOF
25180rm -f conftest$ac_exeext
ca81d7a0
JD
25181if { (ac_try="$ac_link"
25182case "(($ac_try" in
25183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25184 *) ac_try_echo=$ac_try;;
25185esac
25186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25187 (eval "$ac_link") 2>&5
503d2be0 25188 ac_status=$?
c0d27fcc 25189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 25190 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
25191 { (case "(($ac_try" in
25192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25193 *) ac_try_echo=$ac_try;;
25194esac
25195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25196 (eval "$ac_try") 2>&5
503d2be0 25197 ac_status=$?
c0d27fcc 25198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
25199 (exit $ac_status); }; }; then
25200 ac_cv_func_fork_works=yes
25201else
25202 echo "$as_me: program exited with status $ac_status" >&5
25203echo "$as_me: failed program was:" >&5
19650fd6
AS
25204sed 's/^/| /' conftest.$ac_ext >&5
25205
c0d27fcc 25206( exit $ac_status )
503d2be0
AS
25207ac_cv_func_fork_works=no
25208fi
ca81d7a0 25209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 25210fi
ca81d7a0
JD
25211
25212
503d2be0 25213fi
ca81d7a0
JD
25214{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
25215echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 25216
6bae0ccf
DL
25217else
25218 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
25219fi
25220if test "x$ac_cv_func_fork_works" = xcross; then
25221 case $host in
25222 *-*-amigaos* | *-*-msdosdjgpp*)
25223 # Override, as these systems have only a dummy fork() stub
25224 ac_cv_func_fork_works=no
25225 ;;
25226 *)
25227 ac_cv_func_fork_works=yes
25228 ;;
25229 esac
c0d27fcc
MR
25230 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
25231echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 25232fi
73b77ee5 25233ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 25234if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
25235 { echo "$as_me:$LINENO: checking for working vfork" >&5
25236echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
25237if test "${ac_cv_func_vfork_works+set}" = set; then
25238 echo $ECHO_N "(cached) $ECHO_C" >&6
25239else
25240 if test "$cross_compiling" = yes; then
25241 ac_cv_func_vfork_works=cross
fa0b693c 25242else
503d2be0 25243 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
25244/* confdefs.h. */
25245_ACEOF
25246cat confdefs.h >>conftest.$ac_ext
25247cat >>conftest.$ac_ext <<_ACEOF
25248/* end confdefs.h. */
73b77ee5 25249/* Thanks to Paul Eggert for this test. */
ca81d7a0 25250$ac_includes_default
19650fd6 25251#include <sys/wait.h>
503d2be0
AS
25252#if HAVE_VFORK_H
25253# include <vfork.h>
73b77ee5
GM
25254#endif
25255/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
25256 argument registers are propagated back to the parent. The compiler
25257 is told about this with #include <vfork.h>, but some compilers
25258 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
25259 static variable whose address is put into a register that is
25260 clobbered by the vfork. */
19650fd6 25261static void
fa0b693c 25262#ifdef __cplusplus
73b77ee5 25263sparc_address_test (int arg)
503d2be0 25264# else
73b77ee5 25265sparc_address_test (arg) int arg;
fa0b693c 25266#endif
fa0b693c 25267{
73b77ee5
GM
25268 static pid_t child;
25269 if (!child) {
25270 child = vfork ();
25271 if (child < 0) {
25272 perror ("vfork");
25273 _exit(2);
25274 }
25275 if (!child) {
25276 arg = getpid();
25277 write(-1, "", 0);
25278 _exit (arg);
25279 }
25280 }
25281}
503d2be0
AS
25282
25283int
25284main ()
25285{
73b77ee5
GM
25286 pid_t parent = getpid ();
25287 pid_t child;
fa0b693c 25288
19650fd6 25289 sparc_address_test (0);
fa0b693c 25290
73b77ee5 25291 child = vfork ();
fa0b693c 25292
73b77ee5 25293 if (child == 0) {
503d2be0
AS
25294 /* Here is another test for sparc vfork register problems. This
25295 test uses lots of local variables, at least as many local
25296 variables as main has allocated so far including compiler
25297 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
25298 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
25299 reuse the register of parent for one of the local variables,
25300 since it will think that parent can't possibly be used any more
25301 in this routine. Assigning to the local variable will thus
25302 munge parent in the parent process. */
73b77ee5
GM
25303 pid_t
25304 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
25305 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
25306 /* Convince the compiler that p..p7 are live; otherwise, it might
25307 use the same hardware register for all 8 local variables. */
25308 if (p != p1 || p != p2 || p != p3 || p != p4
25309 || p != p5 || p != p6 || p != p7)
25310 _exit(1);
fa0b693c 25311
503d2be0
AS
25312 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
25313 from child file descriptors. If the child closes a descriptor
25314 before it execs or exits, this munges the parent's descriptor
25315 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
25316 _exit(close(fileno(stdout)) != 0);
25317 } else {
25318 int status;
25319 struct stat st;
25320
25321 while (wait(&status) != child)
25322 ;
ca81d7a0 25323 return (
73b77ee5
GM
25324 /* Was there some problem with vforking? */
25325 child < 0
25326
25327 /* Did the child fail? (This shouldn't happen.) */
25328 || status
25329
25330 /* Did the vfork/compiler bug occur? */
25331 || parent != getpid()
fa0b693c 25332
73b77ee5
GM
25333 /* Did the file descriptor bug occur? */
25334 || fstat(fileno(stdout), &st) != 0
25335 );
25336 }
25337}
503d2be0
AS
25338_ACEOF
25339rm -f conftest$ac_exeext
ca81d7a0
JD
25340if { (ac_try="$ac_link"
25341case "(($ac_try" in
25342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25343 *) ac_try_echo=$ac_try;;
25344esac
25345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25346 (eval "$ac_link") 2>&5
503d2be0 25347 ac_status=$?
c0d27fcc 25348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 25349 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
25350 { (case "(($ac_try" in
25351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25352 *) ac_try_echo=$ac_try;;
25353esac
25354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25355 (eval "$ac_try") 2>&5
503d2be0 25356 ac_status=$?
c0d27fcc 25357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 25358 (exit $ac_status); }; }; then
73b77ee5 25359 ac_cv_func_vfork_works=yes
fa0b693c 25360else
503d2be0
AS
25361 echo "$as_me: program exited with status $ac_status" >&5
25362echo "$as_me: failed program was:" >&5
19650fd6
AS
25363sed 's/^/| /' conftest.$ac_ext >&5
25364
c0d27fcc 25365( exit $ac_status )
503d2be0
AS
25366ac_cv_func_vfork_works=no
25367fi
ca81d7a0 25368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 25369fi
ca81d7a0
JD
25370
25371
fa0b693c 25372fi
ca81d7a0
JD
25373{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
25374echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 25375
503d2be0
AS
25376fi;
25377if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 25378 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
25379 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
25380echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
25381fi
25382
503d2be0
AS
25383if test "x$ac_cv_func_vfork_works" = xyes; then
25384
c0d27fcc 25385cat >>confdefs.h <<\_ACEOF
503d2be0 25386#define HAVE_WORKING_VFORK 1
c0d27fcc 25387_ACEOF
503d2be0
AS
25388
25389else
25390
c0d27fcc 25391cat >>confdefs.h <<\_ACEOF
73b77ee5 25392#define vfork fork
c0d27fcc 25393_ACEOF
fa0b693c
GM
25394
25395fi
503d2be0
AS
25396if test "x$ac_cv_func_fork_works" = xyes; then
25397
c0d27fcc 25398cat >>confdefs.h <<\_ACEOF
503d2be0 25399#define HAVE_WORKING_FORK 1
c0d27fcc 25400_ACEOF
fa0b693c 25401
503d2be0 25402fi
647847ea 25403
c0d27fcc 25404
ca81d7a0
JD
25405{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
25406echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
25407if test "${emacs_cv_langinfo_codeset+set}" = set; then
25408 echo $ECHO_N "(cached) $ECHO_C" >&6
25409else
25410 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
25411/* confdefs.h. */
25412_ACEOF
25413cat confdefs.h >>conftest.$ac_ext
25414cat >>conftest.$ac_ext <<_ACEOF
25415/* end confdefs.h. */
6a3a24fa
JD
25416#include <langinfo.h>
25417int
25418main ()
25419{
25420char* cs = nl_langinfo(CODESET);
25421 ;
25422 return 0;
25423}
25424_ACEOF
25425rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
25426if { (ac_try="$ac_link"
25427case "(($ac_try" in
25428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25429 *) ac_try_echo=$ac_try;;
25430esac
25431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25432 (eval "$ac_link") 2>conftest.er1
6a3a24fa 25433 ac_status=$?
edfaf76d
LK
25434 grep -v '^ *+' conftest.er1 >conftest.err
25435 rm -f conftest.er1
25436 cat conftest.err >&5
6a3a24fa
JD
25437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25438 (exit $ac_status); } &&
ca81d7a0
JD
25439 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25440 { (case "(($ac_try" in
25441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25442 *) ac_try_echo=$ac_try;;
25443esac
25444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25445 (eval "$ac_try") 2>&5
edfaf76d
LK
25446 ac_status=$?
25447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25448 (exit $ac_status); }; } &&
25449 { ac_try='test -s conftest$ac_exeext'
ca81d7a0
JD
25450 { (case "(($ac_try" in
25451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25452 *) ac_try_echo=$ac_try;;
25453esac
25454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25455 (eval "$ac_try") 2>&5
6a3a24fa
JD
25456 ac_status=$?
25457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25458 (exit $ac_status); }; }; then
25459 emacs_cv_langinfo_codeset=yes
25460else
25461 echo "$as_me: failed program was:" >&5
19650fd6
AS
25462sed 's/^/| /' conftest.$ac_ext >&5
25463
ca81d7a0 25464 emacs_cv_langinfo_codeset=no
6a3a24fa 25465fi
ca81d7a0
JD
25466
25467rm -f core conftest.err conftest.$ac_objext \
edfaf76d 25468 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
25469
25470fi
ca81d7a0
JD
25471{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
25472echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
25473if test $emacs_cv_langinfo_codeset = yes; then
25474
25475cat >>confdefs.h <<\_ACEOF
25476#define HAVE_LANGINFO_CODESET 1
25477_ACEOF
25478
25479fi
25480
ca81d7a0
JD
25481{ echo "$as_me:$LINENO: checking for size_t" >&5
25482echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
25483if test "${ac_cv_type_size_t+set}" = set; then
25484 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 25485else
503d2be0 25486 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
25487/* confdefs.h. */
25488_ACEOF
25489cat confdefs.h >>conftest.$ac_ext
25490cat >>conftest.$ac_ext <<_ACEOF
25491/* end confdefs.h. */
503d2be0 25492$ac_includes_default
ca81d7a0 25493typedef size_t ac__type_new_;
503d2be0
AS
25494int
25495main ()
25496{
ca81d7a0 25497if ((ac__type_new_ *) 0)
503d2be0 25498 return 0;
ca81d7a0 25499if (sizeof (ac__type_new_))
503d2be0
AS
25500 return 0;
25501 ;
25502 return 0;
25503}
25504_ACEOF
25505rm -f conftest.$ac_objext
ca81d7a0
JD
25506if { (ac_try="$ac_compile"
25507case "(($ac_try" in
25508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25509 *) ac_try_echo=$ac_try;;
25510esac
25511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25512 (eval "$ac_compile") 2>conftest.er1
503d2be0 25513 ac_status=$?
edfaf76d
LK
25514 grep -v '^ *+' conftest.er1 >conftest.err
25515 rm -f conftest.er1
25516 cat conftest.err >&5
c0d27fcc 25517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 25518 (exit $ac_status); } &&
ca81d7a0
JD
25519 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25520 { (case "(($ac_try" in
25521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25522 *) ac_try_echo=$ac_try;;
25523esac
25524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25525 (eval "$ac_try") 2>&5
edfaf76d
LK
25526 ac_status=$?
25527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25528 (exit $ac_status); }; } &&
25529 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
25530 { (case "(($ac_try" in
25531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25532 *) ac_try_echo=$ac_try;;
25533esac
25534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25535 (eval "$ac_try") 2>&5
503d2be0 25536 ac_status=$?
c0d27fcc 25537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 25538 (exit $ac_status); }; }; then
8730a8da
DL
25539 ac_cv_type_size_t=yes
25540else
503d2be0 25541 echo "$as_me: failed program was:" >&5
19650fd6
AS
25542sed 's/^/| /' conftest.$ac_ext >&5
25543
ca81d7a0 25544 ac_cv_type_size_t=no
8730a8da 25545fi
ca81d7a0
JD
25546
25547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 25548fi
ca81d7a0
JD
25549{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
25550echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 25551if test $ac_cv_type_size_t = yes; then
503d2be0 25552
c0d27fcc
MR
25553cat >>confdefs.h <<_ACEOF
25554#define HAVE_SIZE_T 1
25555_ACEOF
25556
8730a8da
DL
25557
25558fi
25559
c0d27fcc 25560
ca81d7a0
JD
25561{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
25562echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
25563if test "${ac_cv_type_mbstate_t+set}" = set; then
25564 echo $ECHO_N "(cached) $ECHO_C" >&6
25565else
25566 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
25567/* confdefs.h. */
25568_ACEOF
25569cat confdefs.h >>conftest.$ac_ext
25570cat >>conftest.$ac_ext <<_ACEOF
25571/* end confdefs.h. */
973a76b1
DL
25572$ac_includes_default
25573# include <wchar.h>
25574int
25575main ()
25576{
25577mbstate_t x; return sizeof x;
25578 ;
25579 return 0;
25580}
25581_ACEOF
25582rm -f conftest.$ac_objext
ca81d7a0
JD
25583if { (ac_try="$ac_compile"
25584case "(($ac_try" in
25585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25586 *) ac_try_echo=$ac_try;;
25587esac
25588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25589 (eval "$ac_compile") 2>conftest.er1
973a76b1 25590 ac_status=$?
edfaf76d
LK
25591 grep -v '^ *+' conftest.er1 >conftest.err
25592 rm -f conftest.er1
25593 cat conftest.err >&5
973a76b1
DL
25594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25595 (exit $ac_status); } &&
ca81d7a0
JD
25596 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25597 { (case "(($ac_try" in
25598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25599 *) ac_try_echo=$ac_try;;
25600esac
25601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25602 (eval "$ac_try") 2>&5
edfaf76d
LK
25603 ac_status=$?
25604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25605 (exit $ac_status); }; } &&
25606 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
25607 { (case "(($ac_try" in
25608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25609 *) ac_try_echo=$ac_try;;
25610esac
25611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25612 (eval "$ac_try") 2>&5
973a76b1
DL
25613 ac_status=$?
25614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25615 (exit $ac_status); }; }; then
25616 ac_cv_type_mbstate_t=yes
25617else
25618 echo "$as_me: failed program was:" >&5
19650fd6
AS
25619sed 's/^/| /' conftest.$ac_ext >&5
25620
ca81d7a0 25621 ac_cv_type_mbstate_t=no
973a76b1 25622fi
ca81d7a0
JD
25623
25624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 25625fi
ca81d7a0
JD
25626{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
25627echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
25628 if test $ac_cv_type_mbstate_t = yes; then
25629
25630cat >>confdefs.h <<\_ACEOF
25631#define HAVE_MBSTATE_T 1
25632_ACEOF
25633
25634 else
25635
25636cat >>confdefs.h <<\_ACEOF
25637#define mbstate_t int
25638_ACEOF
25639
25640 fi
25641
ca81d7a0
JD
25642{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
25643echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
25644if test "${emacs_cv_c_restrict+set}" = set; then
25645 echo $ECHO_N "(cached) $ECHO_C" >&6
25646else
25647 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
25648/* confdefs.h. */
25649_ACEOF
25650cat confdefs.h >>conftest.$ac_ext
25651cat >>conftest.$ac_ext <<_ACEOF
25652/* end confdefs.h. */
22044edf
DL
25653void fred (int *restrict x);
25654int
25655main ()
25656{
b936fae4 25657
22044edf
DL
25658 ;
25659 return 0;
25660}
c0d27fcc 25661_ACEOF
22044edf 25662rm -f conftest.$ac_objext
ca81d7a0
JD
25663if { (ac_try="$ac_compile"
25664case "(($ac_try" in
25665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25666 *) ac_try_echo=$ac_try;;
25667esac
25668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25669 (eval "$ac_compile") 2>conftest.er1
22044edf 25670 ac_status=$?
edfaf76d
LK
25671 grep -v '^ *+' conftest.er1 >conftest.err
25672 rm -f conftest.er1
25673 cat conftest.err >&5
22044edf
DL
25674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25675 (exit $ac_status); } &&
ca81d7a0
JD
25676 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25677 { (case "(($ac_try" in
25678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25679 *) ac_try_echo=$ac_try;;
25680esac
25681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25682 (eval "$ac_try") 2>&5
edfaf76d
LK
25683 ac_status=$?
25684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25685 (exit $ac_status); }; } &&
25686 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
25687 { (case "(($ac_try" in
25688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25689 *) ac_try_echo=$ac_try;;
25690esac
25691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25692 (eval "$ac_try") 2>&5
22044edf
DL
25693 ac_status=$?
25694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25695 (exit $ac_status); }; }; then
25696 emacs_cv_c_restrict=yes
25697else
25698 echo "$as_me: failed program was:" >&5
19650fd6
AS
25699sed 's/^/| /' conftest.$ac_ext >&5
25700
ca81d7a0 25701 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
25702/* confdefs.h. */
25703_ACEOF
25704cat confdefs.h >>conftest.$ac_ext
25705cat >>conftest.$ac_ext <<_ACEOF
25706/* end confdefs.h. */
22044edf
DL
25707void fred (int *__restrict x);
25708int
25709main ()
25710{
c0d27fcc 25711
22044edf
DL
25712 ;
25713 return 0;
25714}
c0d27fcc 25715_ACEOF
22044edf 25716rm -f conftest.$ac_objext
ca81d7a0
JD
25717if { (ac_try="$ac_compile"
25718case "(($ac_try" in
25719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25720 *) ac_try_echo=$ac_try;;
25721esac
25722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25723 (eval "$ac_compile") 2>conftest.er1
22044edf 25724 ac_status=$?
edfaf76d
LK
25725 grep -v '^ *+' conftest.er1 >conftest.err
25726 rm -f conftest.er1
25727 cat conftest.err >&5
22044edf
DL
25728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25729 (exit $ac_status); } &&
ca81d7a0
JD
25730 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25731 { (case "(($ac_try" in
25732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25733 *) ac_try_echo=$ac_try;;
25734esac
25735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25736 (eval "$ac_try") 2>&5
edfaf76d
LK
25737 ac_status=$?
25738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25739 (exit $ac_status); }; } &&
25740 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
25741 { (case "(($ac_try" in
25742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25743 *) ac_try_echo=$ac_try;;
25744esac
25745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25746 (eval "$ac_try") 2>&5
22044edf
DL
25747 ac_status=$?
25748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25749 (exit $ac_status); }; }; then
25750 emacs_cv_c_restrict=__restrict
25751else
25752 echo "$as_me: failed program was:" >&5
19650fd6
AS
25753sed 's/^/| /' conftest.$ac_ext >&5
25754
ca81d7a0 25755 emacs_cv_c_restrict=no
ba4481b5 25756fi
ca81d7a0
JD
25757
25758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 25759fi
ca81d7a0
JD
25760
25761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 25762fi
ca81d7a0
JD
25763{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
25764echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
25765case "$emacs_cv_c_restrict" in
25766 yes) emacs_restrict=restrict;;
25767 no) emacs_restrict="";;
25768 *) emacs_restrict="$emacs_cv_c_restrict";;
25769esac
25770if test "$emacs_restrict" != __restrict; then
b936fae4 25771
22044edf
DL
25772cat >>confdefs.h <<_ACEOF
25773#define __restrict $emacs_restrict
c0d27fcc 25774_ACEOF
ba4481b5
DL
25775
25776fi
ba4481b5 25777
ca81d7a0
JD
25778{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
25779echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
25780if test "${emacs_cv_c_restrict_arr+set}" = set; then
25781 echo $ECHO_N "(cached) $ECHO_C" >&6
25782else
25783 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
25784/* confdefs.h. */
25785_ACEOF
25786cat confdefs.h >>conftest.$ac_ext
25787cat >>conftest.$ac_ext <<_ACEOF
25788/* end confdefs.h. */
22044edf
DL
25789void fred (int x[__restrict]);
25790int
25791main ()
25792{
b936fae4 25793
22044edf
DL
25794 ;
25795 return 0;
25796}
c0d27fcc 25797_ACEOF
22044edf 25798rm -f conftest.$ac_objext
ca81d7a0
JD
25799if { (ac_try="$ac_compile"
25800case "(($ac_try" in
25801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25802 *) ac_try_echo=$ac_try;;
25803esac
25804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25805 (eval "$ac_compile") 2>conftest.er1
22044edf 25806 ac_status=$?
edfaf76d
LK
25807 grep -v '^ *+' conftest.er1 >conftest.err
25808 rm -f conftest.er1
25809 cat conftest.err >&5
22044edf
DL
25810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25811 (exit $ac_status); } &&
ca81d7a0
JD
25812 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25813 { (case "(($ac_try" in
25814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25815 *) ac_try_echo=$ac_try;;
25816esac
25817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25818 (eval "$ac_try") 2>&5
edfaf76d
LK
25819 ac_status=$?
25820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25821 (exit $ac_status); }; } &&
25822 { ac_try='test -s conftest.$ac_objext'
ca81d7a0
JD
25823 { (case "(($ac_try" in
25824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25825 *) ac_try_echo=$ac_try;;
25826esac
25827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25828 (eval "$ac_try") 2>&5
22044edf
DL
25829 ac_status=$?
25830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25831 (exit $ac_status); }; }; then
25832 emacs_cv_c_restrict_arr=yes
25833else
25834 echo "$as_me: failed program was:" >&5
19650fd6
AS
25835sed 's/^/| /' conftest.$ac_ext >&5
25836
ca81d7a0 25837 emacs_cv_c_restrict_arr=no
ba4481b5 25838fi
ca81d7a0
JD
25839
25840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 25841fi
ca81d7a0
JD
25842{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
25843echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 25844if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 25845
c0d27fcc 25846cat >>confdefs.h <<\_ACEOF
22044edf 25847#define __restrict_arr __restrict
c0d27fcc 25848_ACEOF
ba4481b5 25849
ba4481b5
DL
25850fi
25851
c0d27fcc 25852
c0d27fcc 25853
22044edf
DL
25854# Set up the CFLAGS for real compilation, so we can substitute it.
25855CFLAGS="$REAL_CFLAGS"
25856CPPFLAGS="$REAL_CPPFLAGS"
25857
25858#### Find out which version of Emacs this is.
25859version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
25860 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
25861if test x"${version}" = x; then
25862 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
25863echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
25864 { (exit 1); exit 1; }; }
25865fi
25866
25867### Specify what sort of things we'll be editing into Makefile and config.h.
25868### Use configuration here uncanonicalized to avoid exceeding size limits.
25869
25870
25871
25872
25873
25874
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900
6a3a24fa 25901
22044edf
DL
25902
25903
25904cat >>confdefs.h <<_ACEOF
25905#define EMACS_CONFIGURATION "${canonical}"
25906_ACEOF
25907
25908
25909cat >>confdefs.h <<_ACEOF
25910#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
25911_ACEOF
25912
25913
25914cat >>confdefs.h <<_ACEOF
25915#define config_machfile "${machfile}"
25916_ACEOF
25917
25918
25919cat >>confdefs.h <<_ACEOF
25920#define config_opsysfile "${opsysfile}"
25921_ACEOF
25922
25923
25924cat >>confdefs.h <<_ACEOF
25925#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
25926_ACEOF
25927
25928
25929cat >>confdefs.h <<_ACEOF
25930#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
25931_ACEOF
25932
25933
25934cat >>confdefs.h <<_ACEOF
25935#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
25936_ACEOF
25937
25938
25939cat >>confdefs.h <<_ACEOF
25940#define UNEXEC_SRC ${UNEXEC_SRC}
25941_ACEOF
25942
25943
25944if test "${HAVE_X_WINDOWS}" = "yes" ; then
25945
25946cat >>confdefs.h <<\_ACEOF
25947#define HAVE_X_WINDOWS 1
25948_ACEOF
25949
25950fi
25951if test "${USE_X_TOOLKIT}" != "none" ; then
25952
25953cat >>confdefs.h <<\_ACEOF
25954#define USE_X_TOOLKIT 1
25955_ACEOF
25956
25957fi
25958if test "${HAVE_X11}" = "yes" ; then
25959
25960cat >>confdefs.h <<\_ACEOF
25961#define HAVE_X11 1
25962_ACEOF
25963
25964fi
25965if test "${HAVE_XFREE386}" = "yes" ; then
25966
25967cat >>confdefs.h <<\_ACEOF
25968#define HAVE_XFREE386 1
25969_ACEOF
25970
25971fi
25972if test "${HAVE_MENUS}" = "yes" ; then
25973
25974cat >>confdefs.h <<\_ACEOF
25975#define HAVE_MENUS 1
25976_ACEOF
25977
25978fi
25979if test "${GNU_MALLOC}" = "yes" ; then
25980
25981cat >>confdefs.h <<\_ACEOF
25982#define GNU_MALLOC 1
25983_ACEOF
25984
25985fi
25986if test "${REL_ALLOC}" = "yes" ; then
25987
25988cat >>confdefs.h <<\_ACEOF
25989#define REL_ALLOC 1
25990_ACEOF
25991
25992fi
25993
25994
25995
c0d27fcc
MR
25996
25997
ba4481b5 25998#### Report on what we decided to do.
488dd4c4
JD
25999#### Report GTK as a toolkit, even if it doesn't use Xt.
26000#### It makes printing result more understandable as using GTK sets
26001#### toolkit_scroll_bars to yes by default.
26002if test "${HAVE_GTK}" = "yes"; then
26003 USE_X_TOOLKIT=GTK
26004fi
26005
ba4481b5
DL
26006echo "
26007Configured for \`${canonical}'.
26008
26009 Where should the build process find the source code? ${srcdir}
26010 What operating system and machine description files should Emacs use?
26011 \`${opsysfile}' and \`${machfile}'
26012 What compiler should emacs be built with? ${CC} ${CFLAGS}
26013 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 26014 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 26015 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 26016 What window system should Emacs use? ${window_system}
8e967cf7 26017 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
26018
26019if test -n "${x_includes}"; then
26020echo " Where do we find X Windows header files? ${x_includes}"
26021else
26022echo " Where do we find X Windows header files? Standard dirs"
26023fi
26024if test -n "${x_libraries}"; then
26025echo " Where do we find X Windows libraries? ${x_libraries}"
26026else
26027echo " Where do we find X Windows libraries? Standard dirs"
26028fi
26029
26030echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
26031echo " Does Emacs use -lXpm? ${HAVE_XPM}"
26032echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
26033echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
26034echo " Does Emacs use -lungif? ${HAVE_GIF}"
26035echo " Does Emacs use -lpng? ${HAVE_PNG}"
26036echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
26037echo
26038
d0098f13
JD
26039if test $USE_XASSERTS = yes; then
26040 echo " Compiling with asserts turned on."
d0098f13
JD
26041 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
26042 echo
26043fi
05cf15c6 26044
05cf15c6 26045
05cf15c6 26046
ba4481b5
DL
26047# Remove any trailing slashes in these variables.
26048test "${prefix}" != NONE &&
26049 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
26050test "${exec_prefix}" != NONE &&
26051 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
26052
d0e9bfd2
GM
26053## Check if the C preprocessor will convert `..' to `. .'. If so, set
26054## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
26055## from Makefile.c can correctly provide the arg `-traditional' to the
26056## C preprocessor.
26057
503d2be0 26058cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
26059/* confdefs.h. */
26060_ACEOF
26061cat confdefs.h >>conftest.$ac_ext
26062cat >>conftest.$ac_ext <<_ACEOF
26063/* end confdefs.h. */
d0e9bfd2 26064yes..yes
503d2be0 26065_ACEOF
d0e9bfd2 26066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 26067 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
26068 CPP_NEED_TRADITIONAL=no
26069else
d0e9bfd2
GM
26070 CPP_NEED_TRADITIONAL=yes
26071fi
26072rm -f conftest*
26073
c0d27fcc 26074
ca81d7a0
JD
26075ac_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"
26076
26077ac_config_commands="$ac_config_commands default"
26078
503d2be0 26079cat >confcache <<\_ACEOF
ba4481b5
DL
26080# This file is a shell script that caches the results of configure
26081# tests run on this system so they can be shared between configure
503d2be0
AS
26082# scripts and configure runs, see configure's option --config-cache.
26083# It is not useful on other systems. If it contains results you don't
26084# want to keep, you may remove or edit it.
ba4481b5 26085#
503d2be0
AS
26086# config.status only pays attention to the cache file if you give it
26087# the --recheck option to rerun configure.
ba4481b5 26088#
6bae0ccf 26089# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
26090# loading this file, other *unset* `ac_cv_foo' will be assigned the
26091# following values.
26092
26093_ACEOF
26094
ba4481b5
DL
26095# The following way of writing the cache mishandles newlines in values,
26096# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 26097# So, we kill variables containing newlines.
ba4481b5
DL
26098# Ultrix sh set writes to stderr and can't be redirected directly,
26099# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
26100(
26101 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26102 eval ac_val=\$$ac_var
26103 case $ac_val in #(
26104 *${as_nl}*)
26105 case $ac_var in #(
26106 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26107echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
26108 esac
26109 case $ac_var in #(
26110 _ | IFS | as_nl) ;; #(
26111 *) $as_unset $ac_var ;;
26112 esac ;;
26113 esac
26114 done
26115
503d2be0 26116 (set) 2>&1 |
ca81d7a0
JD
26117 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26118 *${as_nl}ac_space=\ *)
503d2be0
AS
26119 # `set' does not quote correctly, so add quotes (double-quote
26120 # substitution turns \\\\ into \\, and sed turns \\ into \).
26121 sed -n \
edfaf76d
LK
26122 "s/'/'\\\\''/g;
26123 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 26124 ;; #(
503d2be0
AS
26125 *)
26126 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 26127 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 26128 ;;
ca81d7a0
JD
26129 esac |
26130 sort
26131) |
503d2be0 26132 sed '
ca81d7a0 26133 /^ac_cv_env_/b end
503d2be0 26134 t clear
ca81d7a0 26135 :clear
503d2be0
AS
26136 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26137 t end
ca81d7a0
JD
26138 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26139 :end' >>confcache
26140if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26141 if test -w "$cache_file"; then
26142 test "x$cache_file" != "x/dev/null" &&
26143 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26144echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 26145 cat confcache >$cache_file
ba4481b5 26146 else
ca81d7a0
JD
26147 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26148echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
26149 fi
26150fi
26151rm -f confcache
26152
ba4481b5
DL
26153test "x$prefix" = xNONE && prefix=$ac_default_prefix
26154# Let make expand exec_prefix.
26155test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26156
ba4481b5
DL
26157DEFS=-DHAVE_CONFIG_H
26158
6bae0ccf
DL
26159ac_libobjs=
26160ac_ltlibobjs=
26161for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26162 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
26163 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
26164 ac_i=`echo "$ac_i" | sed "$ac_script"`
26165 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26166 # will be set to the directory where LIBOBJS objects are built.
26167 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26168 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
26169done
26170LIBOBJS=$ac_libobjs
26171
26172LTLIBOBJS=$ac_ltlibobjs
26173
26174
c0d27fcc 26175
ba4481b5 26176: ${CONFIG_STATUS=./config.status}
503d2be0
AS
26177ac_clean_files_save=$ac_clean_files
26178ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 26179{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
26180echo "$as_me: creating $CONFIG_STATUS" >&6;}
26181cat >$CONFIG_STATUS <<_ACEOF
26182#! $SHELL
c0d27fcc 26183# Generated by $as_me.
ba4481b5 26184# Run this file to recreate the current configuration.
ba4481b5 26185# Compiler output produced by configure, useful for debugging
503d2be0 26186# configure, is in config.log if it exists.
ba4481b5 26187
503d2be0 26188debug=false
19650fd6
AS
26189ac_cs_recheck=false
26190ac_cs_silent=false
503d2be0 26191SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
26192_ACEOF
26193
26194cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
26195## --------------------- ##
26196## M4sh Initialization. ##
26197## --------------------- ##
26198
503d2be0
AS
26199# Be Bourne compatible
26200if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26201 emulate sh
26202 NULLCMD=:
6bae0ccf
DL
26203 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
26204 # is contrary to our usage. Disable this feature.
26205 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
26206 setopt NO_GLOB_SUBST
26207else
26208 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
503d2be0 26209fi
ca81d7a0 26210BIN_SH=xpg4; export BIN_SH # for Tru64
edfaf76d 26211DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 26212
ca81d7a0
JD
26213
26214# PATH needs CR
26215# Avoid depending upon Character Ranges.
26216as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26217as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26218as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26219as_cr_digits='0123456789'
26220as_cr_alnum=$as_cr_Letters$as_cr_digits
26221
26222# The user is always right.
26223if test "${PATH_SEPARATOR+set}" != set; then
26224 echo "#! /bin/sh" >conf$$.sh
26225 echo "exit 0" >>conf$$.sh
26226 chmod +x conf$$.sh
26227 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26228 PATH_SEPARATOR=';'
26229 else
26230 PATH_SEPARATOR=:
26231 fi
26232 rm -f conf$$.sh
26233fi
26234
c0d27fcc 26235# Support unset when possible.
edfaf76d 26236if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
26237 as_unset=unset
26238else
26239 as_unset=false
26240fi
26241
6bae0ccf 26242
ca81d7a0
JD
26243# IFS
26244# We need space, tab and new line, in precisely that order. Quoting is
26245# there to prevent editors from complaining about space-tab.
26246# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26247# splitting by setting IFS to empty value.)
26248as_nl='
26249'
26250IFS=" "" $as_nl"
26251
26252# Find who we are. Look in the path if we contain no directory separator.
26253case $0 in
26254 *[\\/]* ) as_myself=$0 ;;
26255 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26256for as_dir in $PATH
26257do
26258 IFS=$as_save_IFS
26259 test -z "$as_dir" && as_dir=.
26260 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26261done
26262IFS=$as_save_IFS
26263
26264 ;;
26265esac
26266# We did not find ourselves, most probably we were run as `sh COMMAND'
26267# in which case we are not to be found in the path.
26268if test "x$as_myself" = x; then
26269 as_myself=$0
26270fi
26271if test ! -f "$as_myself"; then
26272 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26273 { (exit 1); exit 1; }
26274fi
26275
6bae0ccf 26276# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
26277for as_var in ENV MAIL MAILPATH
26278do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26279done
6bae0ccf
DL
26280PS1='$ '
26281PS2='> '
26282PS4='+ '
26283
26284# NLS nuisances.
19650fd6
AS
26285for as_var in \
26286 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26287 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26288 LC_TELEPHONE LC_TIME
6bae0ccf 26289do
edfaf76d 26290 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
26291 eval $as_var=C; export $as_var
26292 else
ca81d7a0 26293 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
26294 fi
26295done
26296
26297# Required to use basename.
ca81d7a0
JD
26298if expr a : '\(a\)' >/dev/null 2>&1 &&
26299 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
26300 as_expr=expr
26301else
26302 as_expr=false
26303fi
26304
ca81d7a0 26305if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
26306 as_basename=basename
26307else
26308 as_basename=false
26309fi
c0d27fcc
MR
26310
26311
503d2be0 26312# Name of the executable.
ca81d7a0 26313as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
26314$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26315 X"$0" : 'X\(//\)$' \| \
ca81d7a0 26316 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 26317echo X/"$0" |
ca81d7a0
JD
26318 sed '/^.*\/\([^/][^/]*\)\/*$/{
26319 s//\1/
26320 q
26321 }
26322 /^X\/\(\/\/\)$/{
26323 s//\1/
26324 q
26325 }
26326 /^X\/\(\/\).*/{
26327 s//\1/
26328 q
26329 }
26330 s/.*/./; q'`
c0d27fcc 26331
ca81d7a0
JD
26332# CDPATH.
26333$as_unset CDPATH
4b411bfe
CY
26334
26335
c0d27fcc
MR
26336
26337 as_lineno_1=$LINENO
26338 as_lineno_2=$LINENO
c0d27fcc 26339 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 26340 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
26341
26342 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26343 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
26344 # line-number line after each line using $LINENO; the second 'sed'
26345 # does the real work. The second script uses 'N' to pair each
26346 # line-number line with the line containing $LINENO, and appends
26347 # trailing '-' during substitution so that $LINENO is not a special
26348 # case at line end.
c0d27fcc 26349 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
26350 # scripts with optimization help from Paolo Bonzini. Blame Lee
26351 # E. McMahon (1931-1989) for sed's syntax. :-)
26352 sed -n '
26353 p
26354 /[$]LINENO/=
26355 ' <$as_myself |
c0d27fcc 26356 sed '
ca81d7a0
JD
26357 s/[$]LINENO.*/&-/
26358 t lineno
26359 b
26360 :lineno
c0d27fcc 26361 N
ca81d7a0
JD
26362 :loop
26363 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 26364 t loop
ca81d7a0 26365 s/-\n.*//
c0d27fcc 26366 ' >$as_me.lineno &&
ca81d7a0
JD
26367 chmod +x "$as_me.lineno" ||
26368 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
26369 { (exit 1); exit 1; }; }
26370
26371 # Don't try to exec as it changes $[0], causing all sort of problems
26372 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
26373 # original and so on. Autoconf is especially sensitive to this).
26374 . "./$as_me.lineno"
c0d27fcc
MR
26375 # Exit status is that of the last command.
26376 exit
26377}
26378
26379
ca81d7a0
JD
26380if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26381 as_dirname=dirname
26382else
26383 as_dirname=false
26384fi
26385
26386ECHO_C= ECHO_N= ECHO_T=
26387case `echo -n x` in
26388-n*)
26389 case `echo 'x\c'` in
26390 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26391 *) ECHO_C='\c';;
26392 esac;;
26393*)
26394 ECHO_N='-n';;
c0d27fcc 26395esac
503d2be0 26396
ca81d7a0
JD
26397if expr a : '\(a\)' >/dev/null 2>&1 &&
26398 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
26399 as_expr=expr
26400else
26401 as_expr=false
26402fi
26403
26404rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
26405if test -d conf$$.dir; then
26406 rm -f conf$$.dir/conf$$.file
26407else
26408 rm -f conf$$.dir
26409 mkdir conf$$.dir
26410fi
503d2be0
AS
26411echo >conf$$.file
26412if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
26413 as_ln_s='ln -s'
26414 # ... but there are two gotchas:
26415 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26416 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26417 # In both cases, we have to default to `cp -p'.
26418 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 26419 as_ln_s='cp -p'
503d2be0
AS
26420elif ln conf$$.file conf$$ 2>/dev/null; then
26421 as_ln_s=ln
26422else
26423 as_ln_s='cp -p'
26424fi
ca81d7a0
JD
26425rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26426rmdir conf$$.dir 2>/dev/null
503d2be0 26427
6bae0ccf
DL
26428if mkdir -p . 2>/dev/null; then
26429 as_mkdir_p=:
26430else
edfaf76d 26431 test -d ./-p && rmdir ./-p
6bae0ccf
DL
26432 as_mkdir_p=false
26433fi
26434
ca81d7a0
JD
26435# Find out whether ``test -x'' works. Don't use a zero-byte file, as
26436# systems may use methods other than mode bits to determine executability.
26437cat >conf$$.file <<_ASEOF
26438#! /bin/sh
26439exit 0
26440_ASEOF
26441chmod +x conf$$.file
26442if test -x conf$$.file >/dev/null 2>&1; then
26443 as_executable_p="test -x"
26444else
26445 as_executable_p=:
26446fi
26447rm -f conf$$.file
503d2be0 26448
c0d27fcc 26449# Sed expression to map a string onto a valid CPP name.
edfaf76d 26450as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
26451
26452# Sed expression to map a string onto a valid variable name.
edfaf76d 26453as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 26454
503d2be0 26455
503d2be0
AS
26456exec 6>&1
26457
ca81d7a0 26458# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 26459# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
26460# values after options handling.
26461ac_log="
c0d27fcc 26462This file was extended by $as_me, which was
ca81d7a0 26463generated by GNU Autoconf 2.60. Invocation command line was
c0d27fcc
MR
26464
26465 CONFIG_FILES = $CONFIG_FILES
26466 CONFIG_HEADERS = $CONFIG_HEADERS
26467 CONFIG_LINKS = $CONFIG_LINKS
26468 CONFIG_COMMANDS = $CONFIG_COMMANDS
26469 $ $0 $@
26470
ca81d7a0
JD
26471on `(hostname || uname -n) 2>/dev/null | sed 1q`
26472"
26473
503d2be0
AS
26474_ACEOF
26475
ca81d7a0 26476cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 26477# Files that config.status was made for.
ca81d7a0
JD
26478config_files="$ac_config_files"
26479config_headers="$ac_config_headers"
26480config_commands="$ac_config_commands"
4b411bfe 26481
ca81d7a0 26482_ACEOF
503d2be0 26483
c0d27fcc 26484cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
26485ac_cs_usage="\
26486\`$as_me' instantiates files from templates according to the
26487current configuration.
26488
26489Usage: $0 [OPTIONS] [FILE]...
26490
26491 -h, --help print this help, then exit
26492 -V, --version print version number, then exit
19650fd6 26493 -q, --quiet do not print progress messages
503d2be0
AS
26494 -d, --debug don't remove temporary files
26495 --recheck update $as_me by reconfiguring in the same conditions
26496 --file=FILE[:TEMPLATE]
edfaf76d 26497 instantiate the configuration file FILE
503d2be0 26498 --header=FILE[:TEMPLATE]
edfaf76d 26499 instantiate the configuration header FILE
503d2be0
AS
26500
26501Configuration files:
26502$config_files
26503
26504Configuration headers:
26505$config_headers
26506
26507Configuration commands:
26508$config_commands
26509
26510Report bugs to <bug-autoconf@gnu.org>."
4b411bfe 26511
ca81d7a0 26512_ACEOF
c0d27fcc 26513cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
26514ac_cs_version="\\
26515config.status
ca81d7a0
JD
26516configured by $0, generated by GNU Autoconf 2.60,
26517 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 26518
ca81d7a0 26519Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
26520This config.status script is free software; the Free Software Foundation
26521gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
26522
26523ac_pwd='$ac_pwd'
26524srcdir='$srcdir'
26525INSTALL='$INSTALL'
c0d27fcc 26526_ACEOF
503d2be0 26527
c0d27fcc 26528cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
26529# If no file are specified by the user, then we need to provide default
26530# value. By we need to know if files were specified by the user.
26531ac_need_defaults=:
26532while test $# != 0
ba4481b5 26533do
503d2be0
AS
26534 case $1 in
26535 --*=*)
ca81d7a0
JD
26536 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26537 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
26538 ac_shift=:
26539 ;;
ca81d7a0 26540 *)
6bae0ccf
DL
26541 ac_option=$1
26542 ac_optarg=$2
26543 ac_shift=shift
503d2be0 26544 ;;
503d2be0
AS
26545 esac
26546
6bae0ccf 26547 case $ac_option in
503d2be0 26548 # Handling of the options.
19650fd6
AS
26549 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26550 ac_cs_recheck=: ;;
ca81d7a0
JD
26551 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
26552 echo "$ac_cs_version"; exit ;;
26553 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
26554 debug=: ;;
26555 --file | --fil | --fi | --f )
6bae0ccf
DL
26556 $ac_shift
26557 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
26558 ac_need_defaults=false;;
26559 --header | --heade | --head | --hea )
6bae0ccf
DL
26560 $ac_shift
26561 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 26562 ac_need_defaults=false;;
ca81d7a0
JD
26563 --he | --h)
26564 # Conflict between --help and --header
26565 { echo "$as_me: error: ambiguous option: $1
26566Try \`$0 --help' for more information." >&2
26567 { (exit 1); exit 1; }; };;
26568 --help | --hel | -h )
26569 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
26570 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26571 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26572 ac_cs_silent=: ;;
503d2be0
AS
26573
26574 # This is an error.
ca81d7a0
JD
26575 -*) { echo "$as_me: error: unrecognized option: $1
26576Try \`$0 --help' for more information." >&2
503d2be0
AS
26577 { (exit 1); exit 1; }; } ;;
26578
ca81d7a0
JD
26579 *) ac_config_targets="$ac_config_targets $1"
26580 ac_need_defaults=false ;;
503d2be0 26581
ba4481b5 26582 esac
503d2be0 26583 shift
ba4481b5
DL
26584done
26585
19650fd6
AS
26586ac_configure_extra_args=
26587
26588if $ac_cs_silent; then
26589 exec 6>/dev/null
26590 ac_configure_extra_args="$ac_configure_extra_args --silent"
26591fi
26592
26593_ACEOF
26594cat >>$CONFIG_STATUS <<_ACEOF
26595if \$ac_cs_recheck; then
ca81d7a0
JD
26596 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
26597 CONFIG_SHELL=$SHELL
26598 export CONFIG_SHELL
26599 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
26600fi
26601
503d2be0 26602_ACEOF
ca81d7a0
JD
26603cat >>$CONFIG_STATUS <<\_ACEOF
26604exec 5>>config.log
26605{
26606 echo
26607 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26608## Running $as_me. ##
26609_ASBOX
26610 echo "$ac_log"
26611} >&5
ba4481b5 26612
ca81d7a0 26613_ACEOF
c0d27fcc 26614cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 26615#
ca81d7a0 26616# INIT-COMMANDS
503d2be0 26617#
503d2be0
AS
26618GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
26619
c0d27fcc
MR
26620_ACEOF
26621
4b411bfe 26622cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
26623
26624# Handling of arguments.
503d2be0
AS
26625for ac_config_target in $ac_config_targets
26626do
ca81d7a0
JD
26627 case $ac_config_target in
26628 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
26629 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26630 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
26631 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
26632 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
26633 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
26634 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
26635 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
26636 "lispref/Makefile") CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
26637 "lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
26638 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
26639 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26640
c0d27fcc 26641 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
26642echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26643 { (exit 1); exit 1; }; };;
26644 esac
ba4481b5 26645done
503d2be0 26646
ca81d7a0 26647
503d2be0
AS
26648# If the user did not use the arguments to specify the items to instantiate,
26649# then the envvar interface is used. Set only those that are not.
26650# We use the long form for the default assignment because of an extremely
26651# bizarre bug on SunOS 4.1.3.
26652if $ac_need_defaults; then
26653 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26654 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26655 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 26656fi
503d2be0 26657
19650fd6 26658# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 26659# simply because there is no reason against having it here, and in addition,
19650fd6 26660# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
26661# Hook for its removal unless debugging.
26662# Note that there is a small window in which the directory will not be cleaned:
26663# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
26664$debug ||
26665{
ca81d7a0
JD
26666 tmp=
26667 trap 'exit_status=$?
26668 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26669' 0
503d2be0
AS
26670 trap '{ (exit 1); exit 1; }' 1 2 13 15
26671}
503d2be0 26672# Create a (secure) tmp directory for tmp files.
19650fd6 26673
503d2be0 26674{
ca81d7a0 26675 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
26676 test -n "$tmp" && test -d "$tmp"
26677} ||
26678{
ca81d7a0
JD
26679 tmp=./conf$$-$RANDOM
26680 (umask 077 && mkdir "$tmp")
503d2be0
AS
26681} ||
26682{
19650fd6 26683 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
26684 { (exit 1); exit 1; }
26685}
26686
503d2be0 26687#
ca81d7a0 26688# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
26689#
26690
26691# No need to generate the scripts if there are no CONFIG_FILES.
26692# This happens for instance when ./config.status config.h
ca81d7a0
JD
26693if test -n "$CONFIG_FILES"; then
26694
26695_ACEOF
26696
26697
26698
26699ac_delim='%!_!# '
26700for ac_last_try in false false false false false :; do
26701 cat >conf$$subs.sed <<_ACEOF
26702SHELL!$SHELL$ac_delim
26703PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26704PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26705PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26706PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26707PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26708PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26709exec_prefix!$exec_prefix$ac_delim
26710prefix!$prefix$ac_delim
26711program_transform_name!$program_transform_name$ac_delim
26712bindir!$bindir$ac_delim
26713sbindir!$sbindir$ac_delim
26714libexecdir!$libexecdir$ac_delim
26715datarootdir!$datarootdir$ac_delim
26716datadir!$datadir$ac_delim
26717sysconfdir!$sysconfdir$ac_delim
26718sharedstatedir!$sharedstatedir$ac_delim
26719localstatedir!$localstatedir$ac_delim
26720includedir!$includedir$ac_delim
26721oldincludedir!$oldincludedir$ac_delim
26722docdir!$docdir$ac_delim
26723infodir!$infodir$ac_delim
26724htmldir!$htmldir$ac_delim
26725dvidir!$dvidir$ac_delim
26726pdfdir!$pdfdir$ac_delim
26727psdir!$psdir$ac_delim
26728libdir!$libdir$ac_delim
26729localedir!$localedir$ac_delim
26730mandir!$mandir$ac_delim
26731DEFS!$DEFS$ac_delim
26732ECHO_C!$ECHO_C$ac_delim
26733ECHO_N!$ECHO_N$ac_delim
26734ECHO_T!$ECHO_T$ac_delim
26735LIBS!$LIBS$ac_delim
26736build_alias!$build_alias$ac_delim
26737host_alias!$host_alias$ac_delim
26738target_alias!$target_alias$ac_delim
26739MAINT!$MAINT$ac_delim
26740build!$build$ac_delim
26741build_cpu!$build_cpu$ac_delim
26742build_vendor!$build_vendor$ac_delim
26743build_os!$build_os$ac_delim
26744host!$host$ac_delim
26745host_cpu!$host_cpu$ac_delim
26746host_vendor!$host_vendor$ac_delim
26747host_os!$host_os$ac_delim
26748CC!$CC$ac_delim
26749CFLAGS!$CFLAGS$ac_delim
26750LDFLAGS!$LDFLAGS$ac_delim
26751CPPFLAGS!$CPPFLAGS$ac_delim
26752ac_ct_CC!$ac_ct_CC$ac_delim
26753EXEEXT!$EXEEXT$ac_delim
26754OBJEXT!$OBJEXT$ac_delim
26755CPP!$CPP$ac_delim
26756GREP!$GREP$ac_delim
26757EGREP!$EGREP$ac_delim
26758LN_S!$LN_S$ac_delim
26759INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26760INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26761INSTALL_DATA!$INSTALL_DATA$ac_delim
26762RANLIB!$RANLIB$ac_delim
26763INSTALL_INFO!$INSTALL_INFO$ac_delim
26764GZIP_PROG!$GZIP_PROG$ac_delim
26765LIBSOUND!$LIBSOUND$ac_delim
26766PKG_CONFIG!$PKG_CONFIG$ac_delim
26767ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
26768ALSA_LIBS!$ALSA_LIBS$ac_delim
26769CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
26770SET_MAKE!$SET_MAKE$ac_delim
26771XMKMF!$XMKMF$ac_delim
26772GTK_CFLAGS!$GTK_CFLAGS$ac_delim
26773GTK_LIBS!$GTK_LIBS$ac_delim
26774ALLOCA!$ALLOCA$ac_delim
26775liblockfile!$liblockfile$ac_delim
26776LIBOBJS!$LIBOBJS$ac_delim
26777NEED_SETGID!$NEED_SETGID$ac_delim
26778KMEM_GROUP!$KMEM_GROUP$ac_delim
26779GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
26780GETOPT_H!$GETOPT_H$ac_delim
26781GETOPTOBJS!$GETOPTOBJS$ac_delim
26782version!$version$ac_delim
26783configuration!$configuration$ac_delim
26784canonical!$canonical$ac_delim
26785srcdir!$srcdir$ac_delim
26786lispdir!$lispdir$ac_delim
26787locallisppath!$locallisppath$ac_delim
26788lisppath!$lisppath$ac_delim
26789x_default_search_path!$x_default_search_path$ac_delim
26790etcdir!$etcdir$ac_delim
26791archlibdir!$archlibdir$ac_delim
26792bitmapdir!$bitmapdir$ac_delim
26793gamedir!$gamedir$ac_delim
26794gameuser!$gameuser$ac_delim
26795c_switch_system!$c_switch_system$ac_delim
26796c_switch_machine!$c_switch_machine$ac_delim
26797LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
26798LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
26799_ACEOF
26800
26801 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
26802 break
26803 elif $ac_last_try; then
26804 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26805echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26806 { (exit 1); exit 1; }; }
26807 else
26808 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 26809 fi
ca81d7a0
JD
26810done
26811
26812ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26813if test -n "$ac_eof"; then
26814 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26815 ac_eof=`expr $ac_eof + 1`
26816fi
26817
26818cat >>$CONFIG_STATUS <<_ACEOF
26819cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26820/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26821_ACEOF
26822sed '
26823s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26824s/^/s,@/; s/!/@,|#_!!_#|/
26825:n
26826t n
26827s/'"$ac_delim"'$/,g/; t
26828s/$/\\/; p
26829N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26830' >>$CONFIG_STATUS <conf$$subs.sed
26831rm -f conf$$subs.sed
26832cat >>$CONFIG_STATUS <<_ACEOF
26833CEOF$ac_eof
26834_ACEOF
26835
26836
26837ac_delim='%!_!# '
26838for ac_last_try in false false false false false :; do
26839 cat >conf$$subs.sed <<_ACEOF
26840C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
26841X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
26842machfile!$machfile$ac_delim
26843opsysfile!$opsysfile$ac_delim
26844carbon_appdir!$carbon_appdir$ac_delim
26845LTLIBOBJS!$LTLIBOBJS$ac_delim
26846_ACEOF
26847
26848 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 6; then
26849 break
26850 elif $ac_last_try; then
26851 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26852echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26853 { (exit 1); exit 1; }; }
26854 else
26855 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26856 fi
26857done
26858
26859ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26860if test -n "$ac_eof"; then
26861 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26862 ac_eof=`expr $ac_eof + 1`
26863fi
8eeae1c9 26864
ca81d7a0
JD
26865cat >>$CONFIG_STATUS <<_ACEOF
26866cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26867/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
26868_ACEOF
26869sed '
26870s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26871s/^/s,@/; s/!/@,|#_!!_#|/
26872:n
26873t n
26874s/'"$ac_delim"'$/,g/; t
26875s/$/\\/; p
26876N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26877' >>$CONFIG_STATUS <conf$$subs.sed
26878rm -f conf$$subs.sed
26879cat >>$CONFIG_STATUS <<_ACEOF
26880:end
26881s/|#_!!_#|//g
26882CEOF$ac_eof
c0d27fcc 26883_ACEOF
ca81d7a0
JD
26884
26885
26886# VPATH may cause trouble with some makes, so we remove $(srcdir),
26887# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26888# trailing colons and then remove the whole line if VPATH becomes empty
26889# (actually we leave an empty line to preserve line numbers).
26890if test "x$srcdir" = x.; then
26891 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26892s/:*\$(srcdir):*/:/
26893s/:*\${srcdir}:*/:/
26894s/:*@srcdir@:*/:/
26895s/^\([^=]*=[ ]*\):*/\1/
26896s/:*$//
26897s/^[^=]*=[ ]*$//
26898}'
26899fi
26900
c0d27fcc 26901cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
26902fi # test -n "$CONFIG_FILES"
26903
26904
26905for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
26906do
26907 case $ac_tag in
26908 :[FHLC]) ac_mode=$ac_tag; continue;;
26909 esac
26910 case $ac_mode$ac_tag in
26911 :[FHL]*:*);;
26912 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26913echo "$as_me: error: Invalid tag $ac_tag." >&2;}
26914 { (exit 1); exit 1; }; };;
26915 :[FH]-) ac_tag=-:-;;
26916 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26917 esac
26918 ac_save_IFS=$IFS
26919 IFS=:
26920 set x $ac_tag
26921 IFS=$ac_save_IFS
26922 shift
26923 ac_file=$1
26924 shift
26925
26926 case $ac_mode in
26927 :L) ac_source=$1;;
26928 :[FH])
26929 ac_file_inputs=
26930 for ac_f
26931 do
26932 case $ac_f in
26933 -) ac_f="$tmp/stdin";;
26934 *) # Look for the file first in the build tree, then in the source tree
26935 # (if the path is not absolute). The absolute path cannot be DOS-style,
26936 # because $ac_f cannot contain `:'.
26937 test -f "$ac_f" ||
26938 case $ac_f in
26939 [\\/$]*) false;;
26940 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26941 esac ||
26942 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26943echo "$as_me: error: cannot find input file: $ac_f" >&2;}
26944 { (exit 1); exit 1; }; };;
26945 esac
26946 ac_file_inputs="$ac_file_inputs $ac_f"
26947 done
26948
26949 # Let's still pretend it is `configure' which instantiates (i.e., don't
26950 # use $as_me), people would be surprised to read:
26951 # /* config.h. Generated by config.status. */
26952 configure_input="Generated from "`IFS=:
26953 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
26954 if test x"$ac_file" != x-; then
26955 configure_input="$ac_file. $configure_input"
26956 { echo "$as_me:$LINENO: creating $ac_file" >&5
26957echo "$as_me: creating $ac_file" >&6;}
26958 fi
26959
26960 case $ac_tag in
26961 *:-:* | *:-) cat >"$tmp/stdin";;
26962 esac
26963 ;;
ba4481b5
DL
26964 esac
26965
ca81d7a0 26966 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 26967$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
26968 X"$ac_file" : 'X\(//\)[^/]' \| \
26969 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 26970 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 26971echo X"$ac_file" |
ca81d7a0
JD
26972 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26973 s//\1/
26974 q
26975 }
26976 /^X\(\/\/\)[^/].*/{
26977 s//\1/
26978 q
26979 }
26980 /^X\(\/\/\)$/{
26981 s//\1/
26982 q
26983 }
26984 /^X\(\/\).*/{
26985 s//\1/
26986 q
26987 }
26988 s/.*/./; q'`
26989 { as_dir="$ac_dir"
26990 case $as_dir in #(
26991 -*) as_dir=./$as_dir;;
26992 esac
26993 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 26994 as_dirs=
ca81d7a0
JD
26995 while :; do
26996 case $as_dir in #(
26997 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
26998 *) as_qdir=$as_dir;;
26999 esac
27000 as_dirs="'$as_qdir' $as_dirs"
27001 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 27002$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
27003 X"$as_dir" : 'X\(//\)[^/]' \| \
27004 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 27005 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 27006echo X"$as_dir" |
ca81d7a0
JD
27007 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27008 s//\1/
27009 q
27010 }
27011 /^X\(\/\/\)[^/].*/{
27012 s//\1/
27013 q
27014 }
27015 /^X\(\/\/\)$/{
27016 s//\1/
27017 q
27018 }
27019 /^X\(\/\).*/{
27020 s//\1/
27021 q
27022 }
27023 s/.*/./; q'`
27024 test -d "$as_dir" && break
6bae0ccf 27025 done
ca81d7a0
JD
27026 test -z "$as_dirs" || eval "mkdir $as_dirs"
27027 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27028echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 27029 { (exit 1); exit 1; }; }; }
c0d27fcc 27030 ac_builddir=.
98418dba 27031
ca81d7a0
JD
27032case "$ac_dir" in
27033.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27034*)
c0d27fcc 27035 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
27036 # A ".." for each directory in $ac_dir_suffix.
27037 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
27038 case $ac_top_builddir_sub in
27039 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27040 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27041 esac ;;
27042esac
27043ac_abs_top_builddir=$ac_pwd
27044ac_abs_builddir=$ac_pwd$ac_dir_suffix
27045# for backward compatibility:
27046ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
27047
27048case $srcdir in
ca81d7a0 27049 .) # We are building in place.
c0d27fcc 27050 ac_srcdir=.
ca81d7a0
JD
27051 ac_top_srcdir=$ac_top_builddir_sub
27052 ac_abs_top_srcdir=$ac_pwd ;;
27053 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 27054 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
27055 ac_top_srcdir=$srcdir
27056 ac_abs_top_srcdir=$srcdir ;;
27057 *) # Relative name.
27058 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27059 ac_top_srcdir=$ac_top_build_prefix$srcdir
27060 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 27061esac
ca81d7a0 27062ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 27063
c0d27fcc 27064
ca81d7a0
JD
27065 case $ac_mode in
27066 :F)
27067 #
27068 # CONFIG_FILE
27069 #
ba4481b5 27070
503d2be0
AS
27071 case $INSTALL in
27072 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 27073 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 27074 esac
ca81d7a0 27075_ACEOF
ba4481b5 27076
ca81d7a0
JD
27077cat >>$CONFIG_STATUS <<\_ACEOF
27078# If the template does not know about datarootdir, expand it.
27079# FIXME: This hack should be removed a few years after 2.60.
27080ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 27081
ca81d7a0
JD
27082case `sed -n '/datarootdir/ {
27083 p
27084 q
27085}
27086/@datadir@/p
27087/@docdir@/p
27088/@infodir@/p
27089/@localedir@/p
27090/@mandir@/p
27091' $ac_file_inputs` in
27092*datarootdir*) ac_datarootdir_seen=yes;;
27093*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
27094 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27095echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 27096_ACEOF
ca81d7a0
JD
27097cat >>$CONFIG_STATUS <<_ACEOF
27098 ac_datarootdir_hack='
27099 s&@datadir@&$datadir&g
27100 s&@docdir@&$docdir&g
27101 s&@infodir@&$infodir&g
27102 s&@localedir@&$localedir&g
27103 s&@mandir@&$mandir&g
27104 s&\\\${datarootdir}&$datarootdir&g' ;;
27105esac
27106_ACEOF
27107
27108# Neutralize VPATH when `$srcdir' = `.'.
27109# Shell code in configure.ac might set extrasub.
27110# FIXME: do we really want to maintain this feature?
c0d27fcc 27111cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
27112 sed "$ac_vpsub
27113$extrasub
c0d27fcc
MR
27114_ACEOF
27115cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
27116:t
27117/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
27118s&@configure_input@&$configure_input&;t t
27119s&@top_builddir@&$ac_top_builddir_sub&;t t
27120s&@srcdir@&$ac_srcdir&;t t
27121s&@abs_srcdir@&$ac_abs_srcdir&;t t
27122s&@top_srcdir@&$ac_top_srcdir&;t t
27123s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27124s&@builddir@&$ac_builddir&;t t
27125s&@abs_builddir@&$ac_abs_builddir&;t t
27126s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27127s&@INSTALL@&$ac_INSTALL&;t t
27128$ac_datarootdir_hack
27129" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
27130
27131test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27132 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27133 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
27134 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27135which seems to be undefined. Please make sure it is defined." >&5
27136echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27137which seems to be undefined. Please make sure it is defined." >&2;}
27138
27139 rm -f "$tmp/stdin"
503d2be0 27140 case $ac_file in
ca81d7a0
JD
27141 -) cat "$tmp/out"; rm -f "$tmp/out";;
27142 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 27143 esac
ca81d7a0
JD
27144 ;;
27145 :H)
27146 #
27147 # CONFIG_HEADER
27148 #
27149_ACEOF
27150
27151# Transform confdefs.h into a sed script `conftest.defines', that
27152# substitutes the proper values into config.h.in to produce config.h.
27153rm -f conftest.defines conftest.tail
27154# First, append a space to every undef/define line, to ease matching.
27155echo 's/$/ /' >conftest.defines
27156# Then, protect against being on the right side of a sed subst, or in
27157# an unquoted here document, in config.status. If some macros were
27158# called several times there might be several #defines for the same
27159# symbol, which is useless. But do not sort them, since the last
27160# AC_DEFINE must be honored.
27161ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27162# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27163# NAME is the cpp macro being defined, VALUE is the value it is being given.
27164# PARAMS is the parameter list in the macro definition--in most cases, it's
27165# just an empty string.
27166ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27167ac_dB='\\)[ (].*,\\1define\\2'
27168ac_dC=' '
27169ac_dD=' ,'
27170
27171uniq confdefs.h |
27172 sed -n '
27173 t rset
27174 :rset
27175 s/^[ ]*#[ ]*define[ ][ ]*//
27176 t ok
27177 d
27178 :ok
27179 s/[\\&,]/\\&/g
27180 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27181 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27182 ' >>conftest.defines
27183
27184# Remove the space that was appended to ease matching.
27185# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
27186# example, in the case of _POSIX_SOURCE, which is predefined and required
27187# on some systems where configure will not decide to define it.
ca81d7a0
JD
27188# (The regexp can be short, since the line contains either #define or #undef.)
27189echo 's/ $//
27190s,^[ #]*u.*,/* & */,' >>conftest.defines
27191
27192# Break up conftest.defines:
27193ac_max_sed_lines=50
27194
27195# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27196# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27197# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27198# et cetera.
27199ac_in='$ac_file_inputs'
27200ac_out='"$tmp/out1"'
27201ac_nxt='"$tmp/out2"'
27202
27203while :
503d2be0 27204do
ca81d7a0
JD
27205 # Write a here document:
27206 cat >>$CONFIG_STATUS <<_ACEOF
27207 # First, check the format of the line:
27208 cat >"\$tmp/defines.sed" <<\\CEOF
27209/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27210/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27211b
27212:def
27213_ACEOF
27214 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 27215 echo 'CEOF
ca81d7a0
JD
27216 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27217 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27218 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27219 grep . conftest.tail >/dev/null || break
503d2be0
AS
27220 rm -f conftest.defines
27221 mv conftest.tail conftest.defines
27222done
ca81d7a0 27223rm -f conftest.defines conftest.tail
503d2be0 27224
ca81d7a0 27225echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 27226cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 27227 if test x"$ac_file" != x-; then
ca81d7a0
JD
27228 echo "/* $configure_input */" >"$tmp/config.h"
27229 cat "$ac_result" >>"$tmp/config.h"
27230 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 27231 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
27232echo "$as_me: $ac_file is unchanged" >&6;}
27233 else
503d2be0 27234 rm -f $ac_file
ca81d7a0 27235 mv "$tmp/config.h" $ac_file
ba4481b5 27236 fi
503d2be0 27237 else
ca81d7a0
JD
27238 echo "/* $configure_input */"
27239 cat "$ac_result"
ba4481b5 27240 fi
ca81d7a0
JD
27241 rm -f "$tmp/out12"
27242 ;;
4b411bfe 27243
ca81d7a0
JD
27244 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
27245echo "$as_me: executing $ac_file commands" >&6;}
27246 ;;
27247 esac
c0d27fcc 27248
4b411bfe 27249
ca81d7a0
JD
27250 case $ac_file$ac_mode in
27251 "default":C)
ba4481b5
DL
27252
27253### Make the necessary directories, if they don't exist.
27254for dir in etc lisp ; do
27255 test -d ${dir} || mkdir ${dir}
27256done
27257
27258# Build src/Makefile from ${srcdir}/src/Makefile.c
27259# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
27260# This must be done after src/config.h is built, since we rely on that file.
27261
27262# Now get this: Some word that is part of the ${srcdir} directory name
27263# or the ${configuration} value might, just might, happen to be an
27264# identifier like `sun4' or `i386' or something, and be predefined by
27265# the C preprocessor to some helpful value like 1, or maybe the empty
27266# string. Needless to say consequent macro substitutions are less
27267# than conducive to the makefile finding the correct directory.
27268undefs="`echo $top_srcdir $configuration $canonical |
27269sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
27270 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
27271`"
27272
27273echo creating src/epaths.h
4aa6b955 27274${MAKE-make} epaths-force
ba4481b5 27275
1c203d4c
DL
27276# As of 2000-11-19, newest development versions of GNU cpp preprocess
27277# `..' to `. .' unless invoked with -traditional
27278
d0e9bfd2 27279if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
27280 CPPFLAGS="$CPPFLAGS -traditional"
27281fi
27282
ba4481b5
DL
27283echo creating lib-src/Makefile
27284( cd lib-src
27285 rm -f junk.c junk1.c junk2.c
27286 sed -e '/start of cpp stuff/q' \
27287 < Makefile.c > junk1.c
27288 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 27289 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 27290 < Makefile.c > junk.c
503d2be0 27291 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
27292 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
27293 cat junk1.c junk2.c > Makefile.new
27294 rm -f junk.c junk1.c junk2.c
27295 chmod 444 Makefile.new
27296 mv -f Makefile.new Makefile
27297)
27298
27299echo creating src/Makefile
27300( cd src
27301 rm -f junk.c junk1.c junk2.c
27302 sed -e '/start of cpp stuff/q' \
27303 < Makefile.c > junk1.c
27304 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 27305 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 27306 < Makefile.c > junk.c
503d2be0 27307 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
27308 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
27309 cat junk1.c junk2.c > Makefile.new
27310 rm -f junk.c junk1.c junk2.c
27311 chmod 444 Makefile.new
27312 mv -f Makefile.new Makefile
27313)
27314
503d2be0 27315if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 27316 echo creating src/.gdbinit
503d2be0 27317 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
27318fi
27319
27320# This is how we know whether to re-run configure in certain cases.
27321touch src/config.stamp
27322
503d2be0 27323 ;;
ca81d7a0 27324
503d2be0 27325 esac
ca81d7a0 27326done # for ac_tag
503d2be0 27327
ba4481b5 27328
503d2be0 27329{ (exit 0); exit 0; }
c0d27fcc 27330_ACEOF
ba4481b5 27331chmod +x $CONFIG_STATUS
503d2be0
AS
27332ac_clean_files=$ac_clean_files_save
27333
c0d27fcc 27334
503d2be0
AS
27335# configure is writing to config.log, and then calls config.status.
27336# config.status does its own redirection, appending to config.log.
27337# Unfortunately, on DOS this fails, as config.log is still kept open
27338# by configure, so config.status won't be able to write to it; its
27339# output is simply discarded. So we exec the FD to /dev/null,
27340# effectively closing config.log, so it can be properly (re)opened and
27341# appended to by config.status. When coming back to configure, we
27342# need to make the FD available again.
27343if test "$no_create" != yes; then
27344 ac_cs_success=:
19650fd6
AS
27345 ac_config_status_args=
27346 test "$silent" = yes &&
27347 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 27348 exec 5>/dev/null
19650fd6 27349 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
27350 exec 5>>config.log
27351 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27352 # would make configure fail if this is the last instruction.
27353 $ac_cs_success || { (exit 1); exit 1; }
27354fi
f5f47add 27355
c0d27fcc 27356