* configure.in: Add D-Bus checks. D-Bus is disabled by default.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
d6e01aa5 3# Generated by GNU Autoconf 2.61.
ba4481b5 4#
d6e01aa5
KL
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 12
d6e01aa5
KL
13# Be more Bourne compatible
14DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16 emulate sh
17 NULLCMD=:
6bae0ccf
DL
18 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19 # is contrary to our usage. Disable this feature.
20 alias -g '${1+"$@"}'='"$@"'
d6e01aa5
KL
21 setopt NO_GLOB_SUBST
22else
23 case `(set -o) 2>/dev/null` in
24 *posix*) set -o posix ;;
25esac
26
27fi
28
29
30
31
32# PATH needs CR
33# Avoid depending upon Character Ranges.
34as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37as_cr_digits='0123456789'
38as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40# The user is always right.
41if test "${PATH_SEPARATOR+set}" != set; then
42 echo "#! /bin/sh" >conf$$.sh
43 echo "exit 0" >>conf$$.sh
44 chmod +x conf$$.sh
45 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46 PATH_SEPARATOR=';'
47 else
48 PATH_SEPARATOR=:
49 fi
50 rm -f conf$$.sh
503d2be0
AS
51fi
52
c0d27fcc 53# Support unset when possible.
edfaf76d 54if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
55 as_unset=unset
56else
57 as_unset=false
58fi
59
6bae0ccf 60
d6e01aa5
KL
61# IFS
62# We need space, tab and new line, in precisely that order. Quoting is
63# there to prevent editors from complaining about space-tab.
64# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65# splitting by setting IFS to empty value.)
66as_nl='
67'
68IFS=" "" $as_nl"
69
70# Find who we are. Look in the path if we contain no directory separator.
71case $0 in
72 *[\\/]* ) as_myself=$0 ;;
73 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
74for as_dir in $PATH
75do
76 IFS=$as_save_IFS
77 test -z "$as_dir" && as_dir=.
78 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
79done
80IFS=$as_save_IFS
81
82 ;;
83esac
84# We did not find ourselves, most probably we were run as `sh COMMAND'
85# in which case we are not to be found in the path.
86if test "x$as_myself" = x; then
87 as_myself=$0
88fi
89if test ! -f "$as_myself"; then
90 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
91 { (exit 1); exit 1; }
92fi
93
6bae0ccf 94# Work around bugs in pre-3.0 UWIN ksh.
d6e01aa5
KL
95for as_var in ENV MAIL MAILPATH
96do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
97done
6bae0ccf
DL
98PS1='$ '
99PS2='> '
100PS4='+ '
101
102# NLS nuisances.
19650fd6
AS
103for as_var in \
104 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
105 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
106 LC_TELEPHONE LC_TIME
6bae0ccf 107do
edfaf76d 108 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
109 eval $as_var=C; export $as_var
110 else
d6e01aa5 111 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
112 fi
113done
114
115# Required to use basename.
d6e01aa5
KL
116if expr a : '\(a\)' >/dev/null 2>&1 &&
117 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
118 as_expr=expr
119else
120 as_expr=false
121fi
122
d6e01aa5 123if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
124 as_basename=basename
125else
126 as_basename=false
127fi
c0d27fcc
MR
128
129
503d2be0 130# Name of the executable.
d6e01aa5 131as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
132$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133 X"$0" : 'X\(//\)$' \| \
d6e01aa5 134 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 135echo X/"$0" |
d6e01aa5
KL
136 sed '/^.*\/\([^/][^/]*\)\/*$/{
137 s//\1/
138 q
139 }
140 /^X\/\(\/\/\)$/{
141 s//\1/
142 q
143 }
144 /^X\/\(\/\).*/{
145 s//\1/
146 q
147 }
148 s/.*/./; q'`
c0d27fcc 149
d6e01aa5
KL
150# CDPATH.
151$as_unset CDPATH
6bae0ccf 152
c0d27fcc 153
d6e01aa5
KL
154if test "x$CONFIG_SHELL" = x; then
155 if (eval ":") 2>/dev/null; then
156 as_have_required=yes
157else
158 as_have_required=no
c0d27fcc
MR
159fi
160
d6e01aa5
KL
161 if test $as_have_required = yes && (eval ":
162(as_func_return () {
163 (exit \$1)
164}
165as_func_success () {
166 as_func_return 0
167}
168as_func_failure () {
169 as_func_return 1
170}
171as_func_ret_success () {
172 return 0
173}
174as_func_ret_failure () {
175 return 1
176}
c0d27fcc 177
d6e01aa5
KL
178exitcode=0
179if as_func_success; then
180 :
181else
182 exitcode=1
183 echo as_func_success failed.
184fi
c0d27fcc 185
d6e01aa5
KL
186if as_func_failure; then
187 exitcode=1
188 echo as_func_failure succeeded.
189fi
190
191if as_func_ret_success; then
192 :
193else
194 exitcode=1
195 echo as_func_ret_success failed.
196fi
197
198if as_func_ret_failure; then
199 exitcode=1
200 echo as_func_ret_failure succeeded.
201fi
202
203if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
204 :
205else
206 exitcode=1
207 echo positional parameters were not saved.
208fi
209
210test \$exitcode = 0) || { (exit 1); exit 1; }
211
212(
213 as_lineno_1=\$LINENO
214 as_lineno_2=\$LINENO
215 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
216 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
217") 2> /dev/null; then
218 :
219else
220 as_candidate_shells=
c0d27fcc
MR
221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
222for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
223do
224 IFS=$as_save_IFS
225 test -z "$as_dir" && as_dir=.
d6e01aa5 226 case $as_dir in
c0d27fcc 227 /*)
d6e01aa5
KL
228 for as_base in sh bash ksh sh5; do
229 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
230 done;;
231 esac
232done
233IFS=$as_save_IFS
234
235
236 for as_shell in $as_candidate_shells $SHELL; do
237 # Try only shells that exist, to save several forks.
238 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
239 { ("$as_shell") 2> /dev/null <<\_ASEOF
240if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241 emulate sh
242 NULLCMD=:
243 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244 # is contrary to our usage. Disable this feature.
245 alias -g '${1+"$@"}'='"$@"'
246 setopt NO_GLOB_SUBST
247else
248 case `(set -o) 2>/dev/null` in
249 *posix*) set -o posix ;;
250esac
251
252fi
253
254
255:
256_ASEOF
257}; then
258 CONFIG_SHELL=$as_shell
259 as_have_required=yes
260 if { "$as_shell" 2> /dev/null <<\_ASEOF
261if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262 emulate sh
263 NULLCMD=:
264 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
265 # is contrary to our usage. Disable this feature.
266 alias -g '${1+"$@"}'='"$@"'
267 setopt NO_GLOB_SUBST
268else
269 case `(set -o) 2>/dev/null` in
270 *posix*) set -o posix ;;
271esac
272
273fi
274
275
276:
277(as_func_return () {
278 (exit $1)
279}
280as_func_success () {
281 as_func_return 0
282}
283as_func_failure () {
284 as_func_return 1
285}
286as_func_ret_success () {
287 return 0
288}
289as_func_ret_failure () {
290 return 1
291}
292
293exitcode=0
294if as_func_success; then
295 :
296else
297 exitcode=1
298 echo as_func_success failed.
299fi
300
301if as_func_failure; then
302 exitcode=1
303 echo as_func_failure succeeded.
304fi
305
306if as_func_ret_success; then
307 :
308else
309 exitcode=1
310 echo as_func_ret_success failed.
311fi
312
313if as_func_ret_failure; then
314 exitcode=1
315 echo as_func_ret_failure succeeded.
316fi
317
318if ( set x; as_func_ret_success y && test x = "$1" ); then
319 :
320else
321 exitcode=1
322 echo positional parameters were not saved.
323fi
324
325test $exitcode = 0) || { (exit 1); exit 1; }
326
327(
c0d27fcc
MR
328 as_lineno_1=$LINENO
329 as_lineno_2=$LINENO
c0d27fcc 330 test "x$as_lineno_1" != "x$as_lineno_2" &&
d6e01aa5
KL
331 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
332
333_ASEOF
334}; then
335 break
336fi
337
338fi
339
340 done
341
342 if test "x$CONFIG_SHELL" != x; then
343 for as_var in BASH_ENV ENV
344 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
345 done
346 export CONFIG_SHELL
347 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
348fi
349
350
351 if test $as_have_required = no; then
352 echo This script requires a shell more modern than all the
353 echo shells that I found on your system. Please install a
354 echo modern shell, or manually run the script under such a
355 echo shell if you do have one.
356 { (exit 1); exit 1; }
357fi
358
359
360fi
361
362fi
363
364
365
366(eval "as_func_return () {
367 (exit \$1)
368}
369as_func_success () {
370 as_func_return 0
371}
372as_func_failure () {
373 as_func_return 1
374}
375as_func_ret_success () {
376 return 0
377}
378as_func_ret_failure () {
379 return 1
380}
381
382exitcode=0
383if as_func_success; then
384 :
385else
386 exitcode=1
387 echo as_func_success failed.
388fi
389
390if as_func_failure; then
391 exitcode=1
392 echo as_func_failure succeeded.
393fi
394
395if as_func_ret_success; then
396 :
397else
398 exitcode=1
399 echo as_func_ret_success failed.
400fi
401
402if as_func_ret_failure; then
403 exitcode=1
404 echo as_func_ret_failure succeeded.
405fi
406
407if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
408 :
409else
410 exitcode=1
411 echo positional parameters were not saved.
412fi
413
414test \$exitcode = 0") || {
131e4133
MA
415 echo No shell found that supports shell functions.
416 echo Please tell autoconf@gnu.org about your system,
417 echo including any error possibly output before this
418 echo message
d6e01aa5
KL
419}
420
421
422
423 as_lineno_1=$LINENO
424 as_lineno_2=$LINENO
425 test "x$as_lineno_1" != "x$as_lineno_2" &&
426 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
427
428 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
429 # uniformly replaced by the line number. The first 'sed' inserts a
d6e01aa5
KL
430 # line-number line after each line using $LINENO; the second 'sed'
431 # does the real work. The second script uses 'N' to pair each
432 # line-number line with the line containing $LINENO, and appends
433 # trailing '-' during substitution so that $LINENO is not a special
434 # case at line end.
c0d27fcc 435 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
d6e01aa5
KL
436 # scripts with optimization help from Paolo Bonzini. Blame Lee
437 # E. McMahon (1931-1989) for sed's syntax. :-)
438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
c0d27fcc 442 sed '
d6e01aa5
KL
443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
c0d27fcc 447 N
d6e01aa5
KL
448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 450 t loop
d6e01aa5 451 s/-\n.*//
c0d27fcc 452 ' >$as_me.lineno &&
d6e01aa5 453 chmod +x "$as_me.lineno" ||
c0d27fcc
MR
454 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
455 { (exit 1); exit 1; }; }
456
457 # Don't try to exec as it changes $[0], causing all sort of problems
458 # (the dirname of $[0] is not the place where we might find the
d6e01aa5
KL
459 # original and so on. Autoconf is especially sensitive to this).
460 . "./$as_me.lineno"
c0d27fcc
MR
461 # Exit status is that of the last command.
462 exit
463}
464
465
d6e01aa5
KL
466if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
467 as_dirname=dirname
468else
469 as_dirname=false
470fi
471
472ECHO_C= ECHO_N= ECHO_T=
473case `echo -n x` in
474-n*)
475 case `echo 'x\c'` in
476 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
477 *) ECHO_C='\c';;
478 esac;;
479*)
480 ECHO_N='-n';;
c0d27fcc 481esac
503d2be0 482
d6e01aa5
KL
483if expr a : '\(a\)' >/dev/null 2>&1 &&
484 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
485 as_expr=expr
486else
487 as_expr=false
488fi
489
490rm -f conf$$ conf$$.exe conf$$.file
d6e01aa5
KL
491if test -d conf$$.dir; then
492 rm -f conf$$.dir/conf$$.file
493else
494 rm -f conf$$.dir
495 mkdir conf$$.dir
496fi
503d2be0
AS
497echo >conf$$.file
498if ln -s conf$$.file conf$$ 2>/dev/null; then
d6e01aa5
KL
499 as_ln_s='ln -s'
500 # ... but there are two gotchas:
501 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
502 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
503 # In both cases, we have to default to `cp -p'.
504 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 505 as_ln_s='cp -p'
503d2be0
AS
506elif ln conf$$.file conf$$ 2>/dev/null; then
507 as_ln_s=ln
508else
509 as_ln_s='cp -p'
510fi
d6e01aa5
KL
511rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
512rmdir conf$$.dir 2>/dev/null
503d2be0 513
6bae0ccf
DL
514if mkdir -p . 2>/dev/null; then
515 as_mkdir_p=:
516else
edfaf76d 517 test -d ./-p && rmdir ./-p
6bae0ccf
DL
518 as_mkdir_p=false
519fi
520
d6e01aa5
KL
521if test -x / >/dev/null 2>&1; then
522 as_test_x='test -x'
523else
524 if ls -dL / >/dev/null 2>&1; then
525 as_ls_L_option=L
526 else
527 as_ls_L_option=
528 fi
529 as_test_x='
530 eval sh -c '\''
531 if test -d "$1"; then
532 test -d "$1/.";
533 else
534 case $1 in
535 -*)set "./$1";;
536 esac;
537 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
538 ???[sx]*):;;*)false;;esac;fi
539 '\'' sh
540 '
541fi
542as_executable_p=$as_test_x
503d2be0 543
c0d27fcc 544# Sed expression to map a string onto a valid CPP name.
edfaf76d 545as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
546
547# Sed expression to map a string onto a valid variable name.
edfaf76d 548as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 549
503d2be0 550
c0d27fcc 551
d6e01aa5 552exec 7<&0 </dev/null 6>&1
503d2be0
AS
553
554# Name of the host.
555# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
556# so uname gets run too.
557ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
558
503d2be0
AS
559#
560# Initializations.
561#
ba4481b5 562ac_default_prefix=/usr/local
d6e01aa5 563ac_clean_files=
6bae0ccf 564ac_config_libobj_dir=.
d6e01aa5 565LIBOBJS=
503d2be0
AS
566cross_compiling=no
567subdirs=
c0d27fcc
MR
568MFLAGS=
569MAKEFLAGS=
503d2be0
AS
570SHELL=${CONFIG_SHELL-/bin/sh}
571
c0d27fcc
MR
572# Identity of this package.
573PACKAGE_NAME=
574PACKAGE_TARNAME=
575PACKAGE_VERSION=
576PACKAGE_STRING=
577PACKAGE_BUGREPORT=
578
503d2be0 579ac_unique_file="src/lisp.h"
6bae0ccf 580ac_config_libobj_dir=src
503d2be0
AS
581# Factoring default headers for most tests.
582ac_includes_default="\
583#include <stdio.h>
d6e01aa5 584#ifdef HAVE_SYS_TYPES_H
503d2be0
AS
585# include <sys/types.h>
586#endif
d6e01aa5 587#ifdef HAVE_SYS_STAT_H
503d2be0
AS
588# include <sys/stat.h>
589#endif
d6e01aa5 590#ifdef STDC_HEADERS
503d2be0
AS
591# include <stdlib.h>
592# include <stddef.h>
593#else
d6e01aa5 594# ifdef HAVE_STDLIB_H
503d2be0
AS
595# include <stdlib.h>
596# endif
597#endif
d6e01aa5
KL
598#ifdef HAVE_STRING_H
599# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
503d2be0
AS
600# include <memory.h>
601# endif
602# include <string.h>
603#endif
d6e01aa5 604#ifdef HAVE_STRINGS_H
503d2be0
AS
605# include <strings.h>
606#endif
d6e01aa5 607#ifdef HAVE_INTTYPES_H
503d2be0 608# include <inttypes.h>
503d2be0 609#endif
d6e01aa5
KL
610#ifdef HAVE_STDINT_H
611# include <stdint.h>
612#endif
613#ifdef HAVE_UNISTD_H
503d2be0
AS
614# include <unistd.h>
615#endif"
ba4481b5 616
d6e01aa5
KL
617ac_header_list=
618ac_func_list=
619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656MAINT
657build
658build_cpu
659build_vendor
660build_os
661host
662host_cpu
663host_vendor
664host_os
665CC
666CFLAGS
667LDFLAGS
668CPPFLAGS
669ac_ct_CC
670EXEEXT
671OBJEXT
672CPP
673GREP
674EGREP
675LN_S
676INSTALL_PROGRAM
677INSTALL_SCRIPT
678INSTALL_DATA
679RANLIB
680INSTALL_INFO
681GZIP_PROG
c982cf7d 682MAKEINFO
d6e01aa5
KL
683LIBSOUND
684PKG_CONFIG
685ALSA_CFLAGS
686ALSA_LIBS
687CFLAGS_SOUND
688SET_MAKE
689XMKMF
cfe440b8 690HAVE_XSERVER
0cfc0546
GM
691RSVG_CFLAGS
692RSVG_LIBS
d6e01aa5
KL
693GTK_CFLAGS
694GTK_LIBS
131e4133
MA
695DBUS_CFLAGS
696DBUS_LIBS
697DBUS_INFO
9d89ffd0
JD
698XFT_CFLAGS
699XFT_LIBS
d6e01aa5
KL
700ALLOCA
701liblockfile
702LIBOBJS
703NEED_SETGID
704KMEM_GROUP
705GETLOADAVG_LIBS
706GETOPT_H
707GETOPTOBJS
708version
709configuration
710canonical
711srcdir
712lispdir
713locallisppath
714lisppath
715x_default_search_path
716etcdir
717archlibdir
718bitmapdir
719gamedir
720gameuser
721c_switch_system
722c_switch_machine
723LD_SWITCH_X_SITE
724LD_SWITCH_X_SITE_AUX
725C_SWITCH_X_SITE
726X_TOOLKIT_TYPE
727machfile
728opsysfile
729carbon_appdir
730LTLIBOBJS'
6bae0ccf 731ac_subst_files=''
d6e01aa5
KL
732 ac_precious_vars='build_alias
733host_alias
734target_alias
735CC
736CFLAGS
737LDFLAGS
738LIBS
739CPPFLAGS
740CPP
741XMKMF'
742
c0d27fcc 743
ba4481b5 744# Initialize some variables set by options.
503d2be0
AS
745ac_init_help=
746ac_init_version=false
ba4481b5
DL
747# The variables have the same names as the options, with
748# dashes changed to underlines.
503d2be0 749cache_file=/dev/null
ba4481b5 750exec_prefix=NONE
ba4481b5 751no_create=
ba4481b5
DL
752no_recursion=
753prefix=NONE
754program_prefix=NONE
755program_suffix=NONE
756program_transform_name=s,x,x,
757silent=
758site=
759srcdir=
ba4481b5
DL
760verbose=
761x_includes=NONE
762x_libraries=NONE
503d2be0
AS
763
764# Installation directory options.
765# These are left unexpanded so users can "make install exec_prefix=/foo"
766# and all the variables that are supposed to be based on exec_prefix
767# by default will actually change.
768# Use braces instead of parens because sh, perl, etc. also accept them.
d6e01aa5 769# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
770bindir='${exec_prefix}/bin'
771sbindir='${exec_prefix}/sbin'
772libexecdir='${exec_prefix}/libexec'
d6e01aa5
KL
773datarootdir='${prefix}/share'
774datadir='${datarootdir}'
ba4481b5
DL
775sysconfdir='${prefix}/etc'
776sharedstatedir='${prefix}/com'
777localstatedir='${prefix}/var'
ba4481b5
DL
778includedir='${prefix}/include'
779oldincludedir='/usr/include'
d6e01aa5
KL
780docdir='${datarootdir}/doc/${PACKAGE}'
781infodir='${datarootdir}/info'
782htmldir='${docdir}'
783dvidir='${docdir}'
784pdfdir='${docdir}'
785psdir='${docdir}'
786libdir='${exec_prefix}/lib'
787localedir='${datarootdir}/locale'
788mandir='${datarootdir}/man'
ba4481b5 789
ba4481b5 790ac_prev=
d6e01aa5 791ac_dashdash=
ba4481b5
DL
792for ac_option
793do
ba4481b5
DL
794 # If the previous option needs an argument, assign it.
795 if test -n "$ac_prev"; then
d6e01aa5 796 eval $ac_prev=\$ac_option
ba4481b5
DL
797 ac_prev=
798 continue
799 fi
800
d6e01aa5
KL
801 case $ac_option in
802 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
803 *) ac_optarg=yes ;;
804 esac
ba4481b5
DL
805
806 # Accept the important Cygnus configure options, so we can diagnose typos.
807
d6e01aa5
KL
808 case $ac_dashdash$ac_option in
809 --)
810 ac_dashdash=yes ;;
ba4481b5
DL
811
812 -bindir | --bindir | --bindi | --bind | --bin | --bi)
813 ac_prev=bindir ;;
814 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 815 bindir=$ac_optarg ;;
ba4481b5
DL
816
817 -build | --build | --buil | --bui | --bu)
503d2be0 818 ac_prev=build_alias ;;
ba4481b5 819 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 820 build_alias=$ac_optarg ;;
ba4481b5
DL
821
822 -cache-file | --cache-file | --cache-fil | --cache-fi \
823 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
824 ac_prev=cache_file ;;
825 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
826 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
827 cache_file=$ac_optarg ;;
828
829 --config-cache | -C)
830 cache_file=config.cache ;;
ba4481b5 831
d6e01aa5 832 -datadir | --datadir | --datadi | --datad)
ba4481b5 833 ac_prev=datadir ;;
d6e01aa5 834 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 835 datadir=$ac_optarg ;;
ba4481b5 836
d6e01aa5
KL
837 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
838 | --dataroo | --dataro | --datar)
839 ac_prev=datarootdir ;;
840 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
841 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
842 datarootdir=$ac_optarg ;;
843
ba4481b5 844 -disable-* | --disable-*)
503d2be0 845 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 846 # Reject names that are not valid shell variable names.
d6e01aa5 847 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
848 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
849 { (exit 1); exit 1; }; }
d6e01aa5
KL
850 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
851 eval enable_$ac_feature=no ;;
852
853 -docdir | --docdir | --docdi | --doc | --do)
854 ac_prev=docdir ;;
855 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
856 docdir=$ac_optarg ;;
857
858 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
859 ac_prev=dvidir ;;
860 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
861 dvidir=$ac_optarg ;;
ba4481b5
DL
862
863 -enable-* | --enable-*)
503d2be0 864 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 865 # Reject names that are not valid shell variable names.
d6e01aa5 866 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
867 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
868 { (exit 1); exit 1; }; }
d6e01aa5
KL
869 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
870 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
871
872 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
873 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
874 | --exec | --exe | --ex)
875 ac_prev=exec_prefix ;;
876 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
877 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
878 | --exec=* | --exe=* | --ex=*)
503d2be0 879 exec_prefix=$ac_optarg ;;
ba4481b5
DL
880
881 -gas | --gas | --ga | --g)
882 # Obsolete; use --with-gas.
883 with_gas=yes ;;
884
503d2be0
AS
885 -help | --help | --hel | --he | -h)
886 ac_init_help=long ;;
887 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
888 ac_init_help=recursive ;;
889 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
890 ac_init_help=short ;;
ba4481b5
DL
891
892 -host | --host | --hos | --ho)
503d2be0 893 ac_prev=host_alias ;;
ba4481b5 894 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 895 host_alias=$ac_optarg ;;
ba4481b5 896
d6e01aa5
KL
897 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
898 ac_prev=htmldir ;;
899 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
900 | --ht=*)
901 htmldir=$ac_optarg ;;
902
ba4481b5
DL
903 -includedir | --includedir | --includedi | --included | --include \
904 | --includ | --inclu | --incl | --inc)
905 ac_prev=includedir ;;
906 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
907 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 908 includedir=$ac_optarg ;;
ba4481b5
DL
909
910 -infodir | --infodir | --infodi | --infod | --info | --inf)
911 ac_prev=infodir ;;
912 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 913 infodir=$ac_optarg ;;
ba4481b5
DL
914
915 -libdir | --libdir | --libdi | --libd)
916 ac_prev=libdir ;;
917 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 918 libdir=$ac_optarg ;;
ba4481b5
DL
919
920 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
921 | --libexe | --libex | --libe)
922 ac_prev=libexecdir ;;
923 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
924 | --libexe=* | --libex=* | --libe=*)
503d2be0 925 libexecdir=$ac_optarg ;;
ba4481b5 926
d6e01aa5
KL
927 -localedir | --localedir | --localedi | --localed | --locale)
928 ac_prev=localedir ;;
929 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
930 localedir=$ac_optarg ;;
931
ba4481b5 932 -localstatedir | --localstatedir | --localstatedi | --localstated \
d6e01aa5 933 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
934 ac_prev=localstatedir ;;
935 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
d6e01aa5 936 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 937 localstatedir=$ac_optarg ;;
ba4481b5
DL
938
939 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
940 ac_prev=mandir ;;
941 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 942 mandir=$ac_optarg ;;
ba4481b5
DL
943
944 -nfp | --nfp | --nf)
945 # Obsolete; use --without-fp.
946 with_fp=no ;;
947
948 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 949 | --no-cr | --no-c | -n)
ba4481b5
DL
950 no_create=yes ;;
951
952 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
953 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
954 no_recursion=yes ;;
955
956 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
957 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
958 | --oldin | --oldi | --old | --ol | --o)
959 ac_prev=oldincludedir ;;
960 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
961 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
962 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 963 oldincludedir=$ac_optarg ;;
ba4481b5
DL
964
965 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
966 ac_prev=prefix ;;
967 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 968 prefix=$ac_optarg ;;
ba4481b5
DL
969
970 -program-prefix | --program-prefix | --program-prefi | --program-pref \
971 | --program-pre | --program-pr | --program-p)
972 ac_prev=program_prefix ;;
973 -program-prefix=* | --program-prefix=* | --program-prefi=* \
974 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 975 program_prefix=$ac_optarg ;;
ba4481b5
DL
976
977 -program-suffix | --program-suffix | --program-suffi | --program-suff \
978 | --program-suf | --program-su | --program-s)
979 ac_prev=program_suffix ;;
980 -program-suffix=* | --program-suffix=* | --program-suffi=* \
981 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 982 program_suffix=$ac_optarg ;;
ba4481b5
DL
983
984 -program-transform-name | --program-transform-name \
985 | --program-transform-nam | --program-transform-na \
986 | --program-transform-n | --program-transform- \
987 | --program-transform | --program-transfor \
988 | --program-transfo | --program-transf \
989 | --program-trans | --program-tran \
990 | --progr-tra | --program-tr | --program-t)
991 ac_prev=program_transform_name ;;
992 -program-transform-name=* | --program-transform-name=* \
993 | --program-transform-nam=* | --program-transform-na=* \
994 | --program-transform-n=* | --program-transform-=* \
995 | --program-transform=* | --program-transfor=* \
996 | --program-transfo=* | --program-transf=* \
997 | --program-trans=* | --program-tran=* \
998 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 999 program_transform_name=$ac_optarg ;;
ba4481b5 1000
d6e01aa5
KL
1001 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1002 ac_prev=pdfdir ;;
1003 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1004 pdfdir=$ac_optarg ;;
1005
1006 -psdir | --psdir | --psdi | --psd | --ps)
1007 ac_prev=psdir ;;
1008 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1009 psdir=$ac_optarg ;;
1010
ba4481b5
DL
1011 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1012 | -silent | --silent | --silen | --sile | --sil)
1013 silent=yes ;;
1014
1015 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1016 ac_prev=sbindir ;;
1017 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1018 | --sbi=* | --sb=*)
503d2be0 1019 sbindir=$ac_optarg ;;
ba4481b5
DL
1020
1021 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1022 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1023 | --sharedst | --shareds | --shared | --share | --shar \
1024 | --sha | --sh)
1025 ac_prev=sharedstatedir ;;
1026 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1027 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1028 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1029 | --sha=* | --sh=*)
503d2be0 1030 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1031
1032 -site | --site | --sit)
1033 ac_prev=site ;;
1034 -site=* | --site=* | --sit=*)
503d2be0 1035 site=$ac_optarg ;;
ba4481b5
DL
1036
1037 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1038 ac_prev=srcdir ;;
1039 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1040 srcdir=$ac_optarg ;;
ba4481b5
DL
1041
1042 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1043 | --syscon | --sysco | --sysc | --sys | --sy)
1044 ac_prev=sysconfdir ;;
1045 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1046 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1047 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1048
1049 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1050 ac_prev=target_alias ;;
ba4481b5 1051 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1052 target_alias=$ac_optarg ;;
ba4481b5
DL
1053
1054 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1055 verbose=yes ;;
1056
503d2be0
AS
1057 -version | --version | --versio | --versi | --vers | -V)
1058 ac_init_version=: ;;
ba4481b5
DL
1059
1060 -with-* | --with-*)
503d2be0 1061 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1062 # Reject names that are not valid shell variable names.
d6e01aa5 1063 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1064 { echo "$as_me: error: invalid package name: $ac_package" >&2
1065 { (exit 1); exit 1; }; }
d6e01aa5
KL
1066 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1067 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1068
1069 -without-* | --without-*)
503d2be0 1070 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1071 # Reject names that are not valid shell variable names.
d6e01aa5 1072 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1073 { echo "$as_me: error: invalid package name: $ac_package" >&2
1074 { (exit 1); exit 1; }; }
d6e01aa5
KL
1075 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1076 eval with_$ac_package=no ;;
ba4481b5
DL
1077
1078 --x)
1079 # Obsolete; use --with-x.
1080 with_x=yes ;;
1081
1082 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1083 | --x-incl | --x-inc | --x-in | --x-i)
1084 ac_prev=x_includes ;;
1085 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1086 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1087 x_includes=$ac_optarg ;;
ba4481b5
DL
1088
1089 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1090 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1091 ac_prev=x_libraries ;;
1092 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1093 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1094 x_libraries=$ac_optarg ;;
ba4481b5 1095
503d2be0
AS
1096 -*) { echo "$as_me: error: unrecognized option: $ac_option
1097Try \`$0 --help' for more information." >&2
1098 { (exit 1); exit 1; }; }
ba4481b5
DL
1099 ;;
1100
503d2be0
AS
1101 *=*)
1102 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1103 # Reject names that are not valid shell variable names.
1104 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1105 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1106 { (exit 1); exit 1; }; }
d6e01aa5 1107 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1108 export $ac_envvar ;;
1109
ba4481b5 1110 *)
503d2be0
AS
1111 # FIXME: should be removed in autoconf 3.0.
1112 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1113 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1114 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1115 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1116 ;;
1117
1118 esac
1119done
1120
1121if test -n "$ac_prev"; then
503d2be0
AS
1122 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1123 { echo "$as_me: error: missing argument to $ac_option" >&2
1124 { (exit 1); exit 1; }; }
ba4481b5 1125fi
ba4481b5 1126
d6e01aa5
KL
1127# Be sure to have absolute directory names.
1128for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1129 datadir sysconfdir sharedstatedir localstatedir includedir \
1130 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1131 libdir localedir mandir
ba4481b5 1132do
d6e01aa5 1133 eval ac_val=\$$ac_var
503d2be0 1134 case $ac_val in
d6e01aa5
KL
1135 [\\/$]* | ?:[\\/]* ) continue;;
1136 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1137 esac
d6e01aa5
KL
1138 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1139 { (exit 1); exit 1; }; }
ba4481b5
DL
1140done
1141
503d2be0
AS
1142# There might be people who depend on the old broken behavior: `$host'
1143# used to hold the argument of --host etc.
c0d27fcc 1144# FIXME: To remove some day.
503d2be0
AS
1145build=$build_alias
1146host=$host_alias
1147target=$target_alias
1148
c0d27fcc 1149# FIXME: To remove some day.
503d2be0
AS
1150if test "x$host_alias" != x; then
1151 if test "x$build_alias" = x; then
1152 cross_compiling=maybe
1153 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1154 If a cross compiler is detected then cross compile mode will be used." >&2
1155 elif test "x$build_alias" != "x$host_alias"; then
1156 cross_compiling=yes
1157 fi
1158fi
ba4481b5 1159
503d2be0
AS
1160ac_tool_prefix=
1161test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1162
503d2be0 1163test "$silent" = yes && exec 6>/dev/null
ba4481b5 1164
c0d27fcc 1165
d6e01aa5
KL
1166ac_pwd=`pwd` && test -n "$ac_pwd" &&
1167ac_ls_di=`ls -di .` &&
1168ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1169 { echo "$as_me: error: Working directory cannot be determined" >&2
1170 { (exit 1); exit 1; }; }
1171test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1172 { echo "$as_me: error: pwd does not report name of working directory" >&2
1173 { (exit 1); exit 1; }; }
1174
1175
1176# Find the source files, if location was not specified.
1177if test -z "$srcdir"; then
1178 ac_srcdir_defaulted=yes
1179 # Try the directory containing this script, then the parent directory.
1180 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1181$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1182 X"$0" : 'X\(//\)[^/]' \| \
1183 X"$0" : 'X\(//\)$' \| \
d6e01aa5 1184 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1185echo X"$0" |
d6e01aa5
KL
1186 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1187 s//\1/
1188 q
1189 }
1190 /^X\(\/\/\)[^/].*/{
1191 s//\1/
1192 q
1193 }
1194 /^X\(\/\/\)$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\).*/{
1199 s//\1/
1200 q
1201 }
1202 s/.*/./; q'`
ba4481b5 1203 srcdir=$ac_confdir
d6e01aa5 1204 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1205 srcdir=..
1206 fi
1207else
1208 ac_srcdir_defaulted=no
1209fi
d6e01aa5
KL
1210if test ! -r "$srcdir/$ac_unique_file"; then
1211 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1212 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1213 { (exit 1); exit 1; }; }
ba4481b5 1214fi
d6e01aa5
KL
1215ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1216ac_abs_confdir=`(
1217 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1218 { (exit 1); exit 1; }; }
d6e01aa5
KL
1219 pwd)`
1220# When building in place, set srcdir=.
1221if test "$ac_abs_confdir" = "$ac_pwd"; then
1222 srcdir=.
1223fi
1224# Remove unnecessary trailing slashes from srcdir.
1225# Double slashes in file names in object file debugging info
1226# mess up M-x gdb in Emacs.
1227case $srcdir in
1228*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1229esac
1230for ac_var in $ac_precious_vars; do
1231 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1232 eval ac_env_${ac_var}_value=\$${ac_var}
1233 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1234 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1235done
503d2be0
AS
1236
1237#
1238# Report the --help message.
1239#
1240if test "$ac_init_help" = "long"; then
1241 # Omit some internal or obsolete options to make the list less imposing.
1242 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1243 cat <<_ACEOF
503d2be0
AS
1244\`configure' configures this package to adapt to many kinds of systems.
1245
1246Usage: $0 [OPTION]... [VAR=VALUE]...
1247
1248To assign environment variables (e.g., CC, CFLAGS...), specify them as
1249VAR=VALUE. See below for descriptions of some of the useful variables.
1250
1251Defaults for the options are specified in brackets.
1252
1253Configuration:
1254 -h, --help display this help and exit
1255 --help=short display options specific to this package
1256 --help=recursive display the short help of all the included packages
1257 -V, --version display version information and exit
1258 -q, --quiet, --silent do not print \`checking...' messages
1259 --cache-file=FILE cache test results in FILE [disabled]
1260 -C, --config-cache alias for \`--cache-file=config.cache'
1261 -n, --no-create do not create output files
1262 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1263
503d2be0
AS
1264Installation directories:
1265 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1266 [$ac_default_prefix]
503d2be0 1267 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1268 [PREFIX]
503d2be0
AS
1269
1270By default, \`make install' will install all the files in
1271\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1272an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1273for instance \`--prefix=\$HOME'.
1274
1275For better control, use the options below.
1276
1277Fine tuning of the installation directories:
1278 --bindir=DIR user executables [EPREFIX/bin]
1279 --sbindir=DIR system admin executables [EPREFIX/sbin]
1280 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1281 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1282 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1283 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1284 --libdir=DIR object code libraries [EPREFIX/lib]
1285 --includedir=DIR C header files [PREFIX/include]
1286 --oldincludedir=DIR C header files for non-gcc [/usr/include]
d6e01aa5
KL
1287 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1288 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1289 --infodir=DIR info documentation [DATAROOTDIR/info]
1290 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1291 --mandir=DIR man documentation [DATAROOTDIR/man]
1292 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1293 --htmldir=DIR html documentation [DOCDIR]
1294 --dvidir=DIR dvi documentation [DOCDIR]
1295 --pdfdir=DIR pdf documentation [DOCDIR]
1296 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1297_ACEOF
503d2be0 1298
c0d27fcc 1299 cat <<\_ACEOF
503d2be0 1300
ba5da88a
PJ
1301Program names:
1302 --program-prefix=PREFIX prepend PREFIX to installed program names
1303 --program-suffix=SUFFIX append SUFFIX to installed program names
1304 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1305
503d2be0
AS
1306X features:
1307 --x-includes=DIR X include files are in DIR
1308 --x-libraries=DIR X library files are in DIR
1309
1310System types:
1311 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1312 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1313_ACEOF
503d2be0
AS
1314fi
1315
1316if test -n "$ac_init_help"; then
1317
c0d27fcc 1318 cat <<\_ACEOF
503d2be0
AS
1319
1320Optional Features:
1321 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1322 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
709e90de 1323 --enable-carbon-app[=DIR]
6a3a24fa 1324 specify install directory for Emacs.app on Mac OS X
709e90de 1325 [DIR=/Application]
d0098f13 1326 --enable-asserts compile code with asserts enabled
709e90de
AS
1327 --enable-maintainer-mode
1328 enable make rules and dependencies not useful (and
1329 sometimes confusing) to the casual installer
9adfabc2
LK
1330 --enable-locallisppath=PATH
1331 directories Emacs should search for lisp files
1332 specific to this site
503d2be0
AS
1333 --disable-largefile omit support for large files
1334
1335Optional Packages:
1336 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1337 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1338 --without-gcc don't use GCC to compile Emacs if GCC is found
1339 --without-pop don't support POP mail retrieval with movemail
1340 --with-kerberos support Kerberos-authenticated POP
1341 --with-kerberos5 support Kerberos version 5 authenticated POP
1342 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1343 --without-sound don't compile with sound support
49adb60f
TTN
1344 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
1345 motif, gtk, no)
503d2be0
AS
1346 --with-xpm use -lXpm for displaying XPM images
1347 --with-jpeg use -ljpeg for displaying JPEG images
1348 --with-tiff use -ltiff for displaying TIFF images
63175cd2 1349 --with-gif use -lgif (or -lungif) for displaying GIF images
503d2be0 1350 --with-png use -lpng for displaying PNG images
79011b82 1351 --with-gpm use -lgpm for mouse support on a GNU/Linux console
0cfc0546 1352 --with-rsvg use -lrsvg-2 for displaying SVG images
488dd4c4 1353 --with-gtk use GTK (same as --with-x-toolkit=gtk)
49adb60f 1354 --with-pkg-config-prog Path to pkg-config for finding GTK and librsvg
503d2be0 1355 --without-toolkit-scroll-bars
cc227489 1356 don't use Motif or Xaw3d scroll bars
c982cf7d 1357 --without-xaw3d don't use Xaw3d
cc227489 1358 --without-xim don't use X11 XIM
e0f712ba 1359 --without-carbon don't use Carbon GUI on Mac OS X
131e4133 1360 --without-dbus don't use D-Bus
503d2be0
AS
1361 --with-x use the X Window System
1362
1363Some influential environment variables:
1364 CC C compiler command
1365 CFLAGS C compiler flags
1366 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1367 nonstandard directory <lib dir>
d6e01aa5
KL
1368 LIBS libraries to pass to the linker, e.g. -l<library>
1369 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1370 you have headers in a nonstandard directory <include dir>
503d2be0 1371 CPP C preprocessor
d6e01aa5 1372 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1373
1374Use these variables to override the choices made by `configure' or to help
1375it to find libraries and programs with nonstandard names/locations.
1376
c0d27fcc 1377_ACEOF
d6e01aa5 1378ac_status=$?
503d2be0
AS
1379fi
1380
1381if test "$ac_init_help" = "recursive"; then
1382 # If there are subdirs, report their specific --help.
c0d27fcc 1383 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
d6e01aa5 1384 test -d "$ac_dir" || continue
c0d27fcc
MR
1385 ac_builddir=.
1386
d6e01aa5
KL
1387case "$ac_dir" in
1388.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1389*)
c0d27fcc 1390 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
d6e01aa5
KL
1391 # A ".." for each directory in $ac_dir_suffix.
1392 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1393 case $ac_top_builddir_sub in
1394 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1395 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1396 esac ;;
1397esac
1398ac_abs_top_builddir=$ac_pwd
1399ac_abs_builddir=$ac_pwd$ac_dir_suffix
1400# for backward compatibility:
1401ac_top_builddir=$ac_top_build_prefix
503d2be0 1402
c0d27fcc 1403case $srcdir in
d6e01aa5 1404 .) # We are building in place.
c0d27fcc 1405 ac_srcdir=.
d6e01aa5
KL
1406 ac_top_srcdir=$ac_top_builddir_sub
1407 ac_abs_top_srcdir=$ac_pwd ;;
1408 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1409 ac_srcdir=$srcdir$ac_dir_suffix;
d6e01aa5
KL
1410 ac_top_srcdir=$srcdir
1411 ac_abs_top_srcdir=$srcdir ;;
1412 *) # Relative name.
1413 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1414 ac_top_srcdir=$ac_top_build_prefix$srcdir
1415 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1416esac
d6e01aa5
KL
1417ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1418
1419 cd "$ac_dir" || { ac_status=$?; continue; }
1420 # Check for guested configure.
1421 if test -f "$ac_srcdir/configure.gnu"; then
1422 echo &&
1423 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1424 elif test -f "$ac_srcdir/configure"; then
1425 echo &&
1426 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1427 else
c0d27fcc 1428 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
d6e01aa5
KL
1429 fi || ac_status=$?
1430 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1431 done
1432fi
1433
d6e01aa5 1434test -n "$ac_init_help" && exit $ac_status
503d2be0 1435if $ac_init_version; then
c0d27fcc 1436 cat <<\_ACEOF
d6e01aa5
KL
1437configure
1438generated by GNU Autoconf 2.61
503d2be0 1439
d6e01aa5
KL
1440Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14412002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1442This configure script is free software; the Free Software Foundation
1443gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1444_ACEOF
d6e01aa5 1445 exit
503d2be0 1446fi
d6e01aa5 1447cat >config.log <<_ACEOF
503d2be0
AS
1448This file contains any messages produced by compilers while
1449running configure, to aid debugging if configure makes a mistake.
1450
1451It was created by $as_me, which was
d6e01aa5 1452generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1453
1454 $ $0 $@
1455
c0d27fcc 1456_ACEOF
d6e01aa5 1457exec 5>>config.log
503d2be0
AS
1458{
1459cat <<_ASUNAME
c0d27fcc
MR
1460## --------- ##
1461## Platform. ##
1462## --------- ##
503d2be0
AS
1463
1464hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1465uname -m = `(uname -m) 2>/dev/null || echo unknown`
1466uname -r = `(uname -r) 2>/dev/null || echo unknown`
1467uname -s = `(uname -s) 2>/dev/null || echo unknown`
1468uname -v = `(uname -v) 2>/dev/null || echo unknown`
1469
1470/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1471/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1472
1473/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1474/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1475/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
d6e01aa5 1476/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1477/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1478/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1479/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1480
925c2f3f 1481_ASUNAME
c0d27fcc
MR
1482
1483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1484for as_dir in $PATH
1485do
1486 IFS=$as_save_IFS
1487 test -z "$as_dir" && as_dir=.
1488 echo "PATH: $as_dir"
1489done
d6e01aa5 1490IFS=$as_save_IFS
c0d27fcc 1491
503d2be0
AS
1492} >&5
1493
c0d27fcc
MR
1494cat >&5 <<_ACEOF
1495
1496
1497## ----------- ##
1498## Core tests. ##
1499## ----------- ##
1500
1501_ACEOF
503d2be0 1502
503d2be0
AS
1503
1504# Keep a trace of the command line.
1505# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1506# Strip out --silent because we don't want to record it for future runs.
503d2be0 1507# Also quote any args containing shell meta-characters.
19650fd6 1508# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1509ac_configure_args=
19650fd6
AS
1510ac_configure_args0=
1511ac_configure_args1=
19650fd6
AS
1512ac_must_keep_next=false
1513for ac_pass in 1 2
503d2be0 1514do
19650fd6
AS
1515 for ac_arg
1516 do
1517 case $ac_arg in
1518 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1519 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1520 | -silent | --silent | --silen | --sile | --sil)
1521 continue ;;
d6e01aa5 1522 *\'*)
19650fd6
AS
1523 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1524 esac
1525 case $ac_pass in
1526 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1527 2)
1528 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1529 if test $ac_must_keep_next = true; then
edfaf76d 1530 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1531 else
edfaf76d
LK
1532 case $ac_arg in
1533 *=* | --config-cache | -C | -disable-* | --disable-* \
1534 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1535 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1536 | -with-* | --with-* | -without-* | --without-* | --x)
1537 case "$ac_configure_args0 " in
1538 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1539 esac
1540 ;;
1541 -* ) ac_must_keep_next=true ;;
1542 esac
19650fd6 1543 fi
d6e01aa5 1544 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1545 ;;
1546 esac
1547 done
503d2be0 1548done
19650fd6
AS
1549$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1550$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1551
1552# When interrupted or exit'd, cleanup temporary files, and complete
1553# config.log. We remove comments because anyway the quotes in there
1554# would cause problems or look ugly.
d6e01aa5
KL
1555# WARNING: Use '\'' to represent an apostrophe within the trap.
1556# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1557trap 'exit_status=$?
1558 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1559 {
1560 echo
6bae0ccf 1561
c0d27fcc
MR
1562 cat <<\_ASBOX
1563## ---------------- ##
1564## Cache variables. ##
1565## ---------------- ##
1566_ASBOX
1567 echo
1568 # The following way of writing the cache mishandles newlines in values,
d6e01aa5
KL
1569(
1570 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1571 eval ac_val=\$$ac_var
1572 case $ac_val in #(
1573 *${as_nl}*)
1574 case $ac_var in #(
1575 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1576echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1577 esac
1578 case $ac_var in #(
1579 _ | IFS | as_nl) ;; #(
1580 *) $as_unset $ac_var ;;
1581 esac ;;
1582 esac
1583 done
503d2be0 1584 (set) 2>&1 |
d6e01aa5
KL
1585 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1586 *${as_nl}ac_space=\ *)
503d2be0 1587 sed -n \
d6e01aa5
KL
1588 "s/'\''/'\''\\\\'\'''\''/g;
1589 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1590 ;; #(
503d2be0 1591 *)
d6e01aa5 1592 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1593 ;;
d6e01aa5
KL
1594 esac |
1595 sort
1596)
c0d27fcc 1597 echo
6bae0ccf
DL
1598
1599 cat <<\_ASBOX
1600## ----------------- ##
1601## Output variables. ##
1602## ----------------- ##
1603_ASBOX
1604 echo
1605 for ac_var in $ac_subst_vars
1606 do
d6e01aa5
KL
1607 eval ac_val=\$$ac_var
1608 case $ac_val in
1609 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1610 esac
1611 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1612 done | sort
1613 echo
1614
1615 if test -n "$ac_subst_files"; then
1616 cat <<\_ASBOX
d6e01aa5
KL
1617## ------------------- ##
1618## File substitutions. ##
1619## ------------------- ##
6bae0ccf
DL
1620_ASBOX
1621 echo
1622 for ac_var in $ac_subst_files
1623 do
d6e01aa5
KL
1624 eval ac_val=\$$ac_var
1625 case $ac_val in
1626 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1627 esac
1628 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1629 done | sort
1630 echo
1631 fi
1632
c0d27fcc
MR
1633 if test -s confdefs.h; then
1634 cat <<\_ASBOX
1635## ----------- ##
1636## confdefs.h. ##
1637## ----------- ##
1638_ASBOX
1639 echo
d6e01aa5 1640 cat confdefs.h
c0d27fcc
MR
1641 echo
1642 fi
1643 test "$ac_signal" != 0 &&
1644 echo "$as_me: caught signal $ac_signal"
1645 echo "$as_me: exit $exit_status"
1646 } >&5
d6e01aa5
KL
1647 rm -f core *.core core.conftest.* &&
1648 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1649 exit $exit_status
d6e01aa5 1650' 0
503d2be0
AS
1651for ac_signal in 1 2 13 15; do
1652 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1653done
1654ac_signal=0
1655
1656# confdefs.h avoids OS command line length limits that DEFS can exceed.
d6e01aa5 1657rm -f -r conftest* confdefs.h
ba4481b5 1658
c0d27fcc
MR
1659# Predefined preprocessor variables.
1660
1661cat >>confdefs.h <<_ACEOF
1662#define PACKAGE_NAME "$PACKAGE_NAME"
1663_ACEOF
1664
1665
1666cat >>confdefs.h <<_ACEOF
1667#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1668_ACEOF
1669
1670
1671cat >>confdefs.h <<_ACEOF
1672#define PACKAGE_VERSION "$PACKAGE_VERSION"
1673_ACEOF
1674
1675
1676cat >>confdefs.h <<_ACEOF
1677#define PACKAGE_STRING "$PACKAGE_STRING"
1678_ACEOF
1679
1680
1681cat >>confdefs.h <<_ACEOF
1682#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1683_ACEOF
1684
1685
503d2be0 1686# Let the site file select an alternate cache file if it wants to.
ba4481b5 1687# Prefer explicitly selected file to automatically selected ones.
d6e01aa5
KL
1688if test -n "$CONFIG_SITE"; then
1689 set x "$CONFIG_SITE"
1690elif test "x$prefix" != xNONE; then
1691 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1692else
1693 set x "$ac_default_prefix/share/config.site" \
1694 "$ac_default_prefix/etc/config.site"
ba4481b5 1695fi
d6e01aa5
KL
1696shift
1697for ac_site_file
1698do
ba4481b5 1699 if test -r "$ac_site_file"; then
c0d27fcc 1700 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1701echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1702 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1703 . "$ac_site_file"
1704 fi
1705done
1706
1707if test -r "$cache_file"; then
503d2be0
AS
1708 # Some versions of bash will fail to source /dev/null (special
1709 # files actually), so we avoid doing that.
1710 if test -f "$cache_file"; then
c0d27fcc 1711 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1712echo "$as_me: loading cache $cache_file" >&6;}
1713 case $cache_file in
d6e01aa5
KL
1714 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1715 *) . "./$cache_file";;
503d2be0
AS
1716 esac
1717 fi
ba4481b5 1718else
c0d27fcc 1719 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1720echo "$as_me: creating cache $cache_file" >&6;}
1721 >$cache_file
1722fi
1723
d6e01aa5
KL
1724ac_header_list="$ac_header_list sys/time.h"
1725ac_header_list="$ac_header_list unistd.h"
1726ac_func_list="$ac_func_list alarm"
503d2be0
AS
1727# Check that the precious variables saved in the cache have kept the same
1728# value.
1729ac_cache_corrupted=false
d6e01aa5 1730for ac_var in $ac_precious_vars; do
503d2be0
AS
1731 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1732 eval ac_new_set=\$ac_env_${ac_var}_set
d6e01aa5
KL
1733 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1734 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1735 case $ac_old_set,$ac_new_set in
1736 set,)
c0d27fcc 1737 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1738echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1739 ac_cache_corrupted=: ;;
1740 ,set)
c0d27fcc 1741 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1742echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1743 ac_cache_corrupted=: ;;
1744 ,);;
1745 *)
1746 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1747 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1748echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1749 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1750echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1751 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1752echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1753 ac_cache_corrupted=:
503d2be0
AS
1754 fi;;
1755 esac
c0d27fcc 1756 # Pass precious variables to config.status.
503d2be0
AS
1757 if test "$ac_new_set" = set; then
1758 case $ac_new_val in
d6e01aa5 1759 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1760 *) ac_arg=$ac_var=$ac_new_val ;;
1761 esac
1762 case " $ac_configure_args " in
1763 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1764 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1765 esac
1766 fi
1767done
1768if $ac_cache_corrupted; then
c0d27fcc 1769 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1770echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1771 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1772echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1773 { (exit 1); exit 1; }; }
ba4481b5
DL
1774fi
1775
c0d27fcc
MR
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
d6e01aa5
KL
1792ac_ext=c
1793ac_cpp='$CPP $CPPFLAGS'
1794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1796ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 1797
6bae0ccf 1798
d6e01aa5 1799ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1800
c0d27fcc 1801
ba5da88a 1802test "$program_prefix" != NONE &&
d6e01aa5 1803 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1804# Use a double $ so make ignores it.
1805test "$program_suffix" != NONE &&
d6e01aa5 1806 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1807# Double any \ or $. echo might interpret backslashes.
1808# By default was `s,x,x', remove it if useless.
1809cat <<\_ACEOF >conftest.sed
1810s/[\\$]/&&/g;s/;s,x,x,$//
1811_ACEOF
1812program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
d6e01aa5 1813rm -f conftest.sed
ba5da88a 1814
c0d27fcc 1815
ba4481b5
DL
1816lispdir='${datadir}/emacs/${version}/lisp'
1817locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1818'${datadir}/emacs/site-lisp'
1819lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1820etcdir='${datadir}/emacs/${version}/etc'
1821archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1822docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1823gamedir='${localstatedir}/games/emacs'
98418dba
CW
1824
1825gameuser=games
1826
c0d27fcc 1827
49adb60f 1828
d6e01aa5 1829# Check whether --with-gcc was given.
ba4481b5 1830if test "${with_gcc+set}" = set; then
d6e01aa5
KL
1831 withval=$with_gcc;
1832fi
503d2be0 1833
ba4481b5 1834
49adb60f 1835
d6e01aa5 1836# Check whether --with-pop was given.
ba4481b5 1837if test "${with_pop+set}" = set; then
d6e01aa5 1838 withval=$with_pop; if test "$withval" = yes; then
c0d27fcc 1839 cat >>confdefs.h <<\_ACEOF
ba4481b5 1840#define MAIL_USE_POP 1
c0d27fcc 1841_ACEOF
ba4481b5 1842
243cf185
DL
1843else :
1844fi
3d9fec71 1845else
c0d27fcc 1846 cat >>confdefs.h <<\_ACEOF
3d9fec71 1847#define MAIL_USE_POP 1
c0d27fcc 1848_ACEOF
3d9fec71 1849
d6e01aa5 1850fi
ba4481b5 1851
c0d27fcc 1852
d6e01aa5 1853
49adb60f 1854
d6e01aa5 1855# Check whether --with-kerberos was given.
a21616bd 1856if test "${with_kerberos+set}" = set; then
54e6585f
CY
1857 withval=$with_kerberos; if test "$withval" = yes; then
1858 cat >>confdefs.h <<\_ACEOF
a21616bd 1859#define KERBEROS 1
c0d27fcc 1860_ACEOF
a21616bd 1861
d6e01aa5 1862fi
54e6585f 1863fi
a21616bd 1864
c0d27fcc 1865
d6e01aa5 1866
49adb60f 1867
d6e01aa5 1868# Check whether --with-kerberos5 was given.
a21616bd 1869if test "${with_kerberos5+set}" = set; then
d6e01aa5 1870 withval=$with_kerberos5; if test "${with_kerberos5+set}" = set; then
a21616bd
KR
1871 if test "${with_kerberos+set}" != set; then
1872 with_kerberos=yes
c0d27fcc 1873 cat >>confdefs.h <<\_ACEOF
a21616bd 1874#define KERBEROS 1
c0d27fcc 1875_ACEOF
a21616bd
KR
1876
1877 fi
b936fae4 1878
c0d27fcc 1879cat >>confdefs.h <<\_ACEOF
a21616bd 1880#define KERBEROS5 1
c0d27fcc 1881_ACEOF
a21616bd 1882
d6e01aa5 1883fi
54e6585f 1884fi
a21616bd 1885
b936fae4 1886
49adb60f 1887
d6e01aa5
KL
1888# Check whether --with-hesiod was given.
1889if test "${with_hesiod+set}" = set; then
54e6585f
CY
1890 withval=$with_hesiod; if test "$withval" = yes; then
1891
c0d27fcc 1892cat >>confdefs.h <<\_ACEOF
ba4481b5 1893#define HESIOD 1
c0d27fcc 1894_ACEOF
ba4481b5 1895
d6e01aa5 1896fi
54e6585f 1897fi
ba4481b5 1898
c0d27fcc 1899
d6e01aa5
KL
1900
1901# Check whether --with-sound was given.
2c9dccc9 1902if test "${with_sound+set}" = set; then
d6e01aa5
KL
1903 withval=$with_sound;
1904fi
2c9dccc9 1905
2c9dccc9 1906
c0d27fcc 1907
d6e01aa5 1908# Check whether --with-x-toolkit was given.
ba4481b5 1909if test "${with_x_toolkit+set}" = set; then
d6e01aa5 1910 withval=$with_x_toolkit; case "${withval}" in
089a966d 1911 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1912 n | no ) val=no ;;
1913 l | lu | luc | luci | lucid ) val=lucid ;;
1914 a | at | ath | athe | athen | athena ) val=athena ;;
1915 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1916 g | gt | gtk ) val=gtk ;;
ba4481b5 1917 * )
29d69661 1918{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1919this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661
JD
1920\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
1921echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1922this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1923\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1924 { (exit 1); exit 1; }; }
ba4481b5
DL
1925 ;;
1926 esac
1927 with_x_toolkit=$val
1928
d6e01aa5
KL
1929fi
1930
ba4481b5 1931
49adb60f 1932
d6e01aa5 1933# Check whether --with-xpm was given.
ba4481b5 1934if test "${with_xpm+set}" = set; then
d6e01aa5
KL
1935 withval=$with_xpm;
1936fi
503d2be0 1937
ba4481b5 1938
d6e01aa5 1939# Check whether --with-jpeg was given.
ba4481b5 1940if test "${with_jpeg+set}" = set; then
d6e01aa5
KL
1941 withval=$with_jpeg;
1942fi
503d2be0 1943
ba4481b5 1944
d6e01aa5 1945# Check whether --with-tiff was given.
ba4481b5 1946if test "${with_tiff+set}" = set; then
d6e01aa5
KL
1947 withval=$with_tiff;
1948fi
503d2be0 1949
ba4481b5 1950
d6e01aa5 1951# Check whether --with-gif was given.
ba4481b5 1952if test "${with_gif+set}" = set; then
d6e01aa5
KL
1953 withval=$with_gif;
1954fi
503d2be0 1955
ba4481b5 1956
d6e01aa5 1957# Check whether --with-png was given.
ba4481b5 1958if test "${with_png+set}" = set; then
d6e01aa5
KL
1959 withval=$with_png;
1960fi
503d2be0 1961
ba4481b5 1962
79011b82
NR
1963# Check whether --with-gpm was given.
1964if test "${with_gpm+set}" = set; then
1965 withval=$with_gpm;
1966fi
1967
1968
0cfc0546
GM
1969# Check whether --with-rsvg was given.
1970if test "${with_rsvg+set}" = set; then
1971 withval=$with_rsvg;
1972fi
1973
1974
d6e01aa5 1975# Check whether --with-gtk was given.
488dd4c4 1976if test "${with_gtk+set}" = set; then
d6e01aa5
KL
1977 withval=$with_gtk;
1978fi
488dd4c4 1979
488dd4c4 1980
d6e01aa5 1981# Check whether --with-pkg-config-prog was given.
488dd4c4 1982if test "${with_pkg_config_prog+set}" = set; then
d6e01aa5
KL
1983 withval=$with_pkg_config_prog;
1984fi
488dd4c4 1985
488dd4c4 1986
d6e01aa5 1987# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 1988if test "${with_toolkit_scroll_bars+set}" = set; then
d6e01aa5
KL
1989 withval=$with_toolkit_scroll_bars;
1990fi
503d2be0 1991
ba4481b5 1992
e35a28cd
TTN
1993# Check whether --with-xaw3d was given.
1994if test "${with_xaw3d+set}" = set; then
1995 withval=$with_xaw3d;
c982cf7d
JD
1996fi
1997
1998
d6e01aa5 1999# Check whether --with-xim was given.
1d36487c 2000if test "${with_xim+set}" = set; then
d6e01aa5
KL
2001 withval=$with_xim;
2002fi
1d36487c 2003
ba4481b5 2004
d6e01aa5 2005# Check whether --with-carbon was given.
e0f712ba 2006if test "${with_carbon+set}" = set; then
d6e01aa5
KL
2007 withval=$with_carbon;
2008fi
e0f712ba 2009
49adb60f 2010
131e4133
MA
2011# Check whether --with-dbus was given.
2012if test "${with_dbus+set}" = set; then
2013 withval=$with_dbus;
2014fi
2015
2016
d6e01aa5 2017# Check whether --enable-carbon-app was given.
6a3a24fa 2018if test "${enable_carbon_app+set}" = set; then
d6e01aa5
KL
2019 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
2020fi
e0f712ba 2021
d6e01aa5
KL
2022
2023# Check whether --enable-asserts was given.
d0098f13 2024if test "${enable_asserts+set}" = set; then
d6e01aa5 2025 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2026else
2027 USE_XASSERTS=no
d6e01aa5
KL
2028fi
2029
d0098f13 2030
d6e01aa5 2031# Check whether --enable-maintainer-mode was given.
19650fd6 2032if test "${enable_maintainer_mode+set}" = set; then
d6e01aa5 2033 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2034else
2035 USE_MAINTAINER_MODE=no
d6e01aa5
KL
2036fi
2037
19650fd6
AS
2038if test $USE_MAINTAINER_MODE = yes; then
2039 MAINT=
2040else
2041 MAINT=#
2042fi
2043
2044
d6e01aa5 2045# Check whether --enable-locallisppath was given.
9adfabc2 2046if test "${enable_locallisppath+set}" = set; then
d6e01aa5 2047 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2048 locallisppath=
2049elif test "${enableval}" != "yes"; then
2050 locallisppath=${enableval}
2051fi
d6e01aa5
KL
2052fi
2053
9adfabc2 2054
ba4481b5 2055#### Make srcdir absolute, if it isn't already. It's important to
17494071 2056#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2057#### give you automounter prefixes, which can go away. We do all this
2058#### so Emacs can find its files when run uninstalled.
17494071
GM
2059## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2060unset CDPATH
ba4481b5
DL
2061case "${srcdir}" in
2062 /* ) ;;
2063 . )
2064 ## We may be able to use the $PWD environment variable to make this
2065 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2066 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2067 ## but that tested only for a well-formed and valid PWD,
2068 ## it did not object when PWD was well-formed and valid but just wrong.
2069 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2070 then
2071 srcdir="$PWD"
2072 else
2073 srcdir="`(cd ${srcdir}; pwd)`"
2074 fi
2075 ;;
2076 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2077esac
2078
2079#### Check if the source directory already has a configured system in it.
2080if test `pwd` != `(cd ${srcdir} && pwd)` \
2081 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2082 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2083 as a build directory right now; it has been configured in its own
2084 right. To configure in another directory as well, you MUST
2085 use GNU make. If you do not have GNU make, then you must
2086 now do \`make distclean' in ${srcdir},
2087 and then run $0 again." >&5
2088echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2089 as a build directory right now; it has been configured in its own
2090 right. To configure in another directory as well, you MUST
2091 use GNU make. If you do not have GNU make, then you must
2092 now do \`make distclean' in ${srcdir},
503d2be0 2093 and then run $0 again." >&2;}
ba4481b5
DL
2094fi
2095
2096#### Given the configuration name, set machfile and opsysfile to the
2097#### names of the m/*.h and s/*.h files we should use.
2098
2099### Canonicalize the configuration name.
2100
2101ac_aux_dir=
d6e01aa5
KL
2102for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2103 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2104 ac_aux_dir=$ac_dir
2105 ac_install_sh="$ac_aux_dir/install-sh -c"
2106 break
d6e01aa5 2107 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2108 ac_aux_dir=$ac_dir
2109 ac_install_sh="$ac_aux_dir/install.sh -c"
2110 break
d6e01aa5 2111 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2112 ac_aux_dir=$ac_dir
2113 ac_install_sh="$ac_aux_dir/shtool install -c"
2114 break
ba4481b5
DL
2115 fi
2116done
2117if test -z "$ac_aux_dir"; then
d6e01aa5
KL
2118 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2119echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2120 { (exit 1); exit 1; }; }
ba4481b5 2121fi
d6e01aa5
KL
2122
2123# These three variables are undocumented and unsupported,
2124# and are intended to be withdrawn in a future Autoconf release.
2125# They can cause serious problems if a builder's source tree is in a directory
2126# whose full name contains unusual characters.
2127ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2128ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2129ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2130
ba4481b5
DL
2131
2132# Make sure we can run config.sub.
d6e01aa5
KL
2133$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2134 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2135echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2136 { (exit 1); exit 1; }; }
2137
d6e01aa5
KL
2138{ echo "$as_me:$LINENO: checking build system type" >&5
2139echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2140if test "${ac_cv_build+set}" = set; then
2141 echo $ECHO_N "(cached) $ECHO_C" >&6
2142else
d6e01aa5
KL
2143 ac_build_alias=$build_alias
2144test "x$ac_build_alias" = x &&
2145 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2146test "x$ac_build_alias" = x &&
c0d27fcc 2147 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2148echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2149 { (exit 1); exit 1; }; }
d6e01aa5
KL
2150ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2151 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2152echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2153 { (exit 1); exit 1; }; }
2154
2155fi
d6e01aa5
KL
2156{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2157echo "${ECHO_T}$ac_cv_build" >&6; }
2158case $ac_cv_build in
2159*-*-*) ;;
2160*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2161echo "$as_me: error: invalid value of canonical build" >&2;}
2162 { (exit 1); exit 1; }; };;
2163esac
503d2be0 2164build=$ac_cv_build
d6e01aa5
KL
2165ac_save_IFS=$IFS; IFS='-'
2166set x $ac_cv_build
2167shift
2168build_cpu=$1
2169build_vendor=$2
2170shift; shift
2171# Remember, the first character of IFS is used to create $*,
2172# except with old shells:
2173build_os=$*
2174IFS=$ac_save_IFS
2175case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2176
2177
2178{ echo "$as_me:$LINENO: checking host system type" >&5
2179echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2180if test "${ac_cv_host+set}" = set; then
2181 echo $ECHO_N "(cached) $ECHO_C" >&6
2182else
d6e01aa5
KL
2183 if test "x$host_alias" = x; then
2184 ac_cv_host=$ac_cv_build
2185else
2186 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2187 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2188echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2189 { (exit 1); exit 1; }; }
d6e01aa5 2190fi
503d2be0
AS
2191
2192fi
d6e01aa5
KL
2193{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2194echo "${ECHO_T}$ac_cv_host" >&6; }
2195case $ac_cv_host in
2196*-*-*) ;;
2197*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2198echo "$as_me: error: invalid value of canonical host" >&2;}
2199 { (exit 1); exit 1; }; };;
2200esac
503d2be0 2201host=$ac_cv_host
d6e01aa5
KL
2202ac_save_IFS=$IFS; IFS='-'
2203set x $ac_cv_host
2204shift
2205host_cpu=$1
2206host_vendor=$2
2207shift; shift
2208# Remember, the first character of IFS is used to create $*,
2209# except with old shells:
2210host_os=$*
2211IFS=$ac_save_IFS
2212case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2213
c0d27fcc 2214
ba4481b5 2215canonical=$host
1770dcdc 2216configuration=${host_alias-${build_alias-$host}}
ba4481b5 2217
c0d27fcc 2218
22044edf 2219
ba4481b5
DL
2220### If you add support for a new configuration, add code to this
2221### switch statement to recognize your configuration name and select
2222### the appropriate operating system and machine description files.
2223
2224### You would hope that you could choose an m/*.h file pretty much
2225### based on the machine portion of the configuration name, and an s-
2226### file based on the operating system portion. However, it turns out
2227### that each m/*.h file is pretty manufacturer-specific - for
2228### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
2229### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
2230### machines. So we basically have to have a special case for each
2231### configuration name.
2232###
2233### As far as handling version numbers on operating systems is
2234### concerned, make sure things will fail in a fixable way. If
2235### /etc/MACHINES doesn't say anything about version numbers, be
2236### prepared to handle anything reasonably. If version numbers
2237### matter, be sure /etc/MACHINES says something about it.
2238###
2239### Eric Raymond says we should accept strings like "sysvr4" to mean
2240### "System V Release 4"; he writes, "The old convention encouraged
2241### confusion between `system' and `release' levels'."
2242
2243machine='' opsys='' unported=no
2244case "${canonical}" in
2245
1096bcc0
GM
2246 ## FreeBSD ports
2247 *-*-freebsd* )
2248 opsys=freebsd
2249 case "${canonical}" in
2250 alpha*-*-freebsd*) machine=alpha ;;
ec8fcb10
YM
2251 ia64-*-freebsd*) machine=ia64 ;;
2252 sparc64-*-freebsd*) machine=sparc ;;
2253 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2254 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 2255 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2256 esac
2257 ;;
2258
1b275743
GM
2259 ## FreeBSD kernel + glibc based userland
2260 *-*-kfreebsd*gnu* )
2261 opsys=gnu-kfreebsd
2262 case "${canonical}" in
2263 alpha*-*-kfreebsd*) machine=alpha ;;
2264 ia64-*-kfreebsd*) machine=ia64 ;;
2265 sparc64-*-kfreebsd*) machine=sparc ;;
2266 powerpc-*-kfreebsd*) machine=macppc ;;
2267 i[3456]86-*-kfreebsd*) machine=intel386 ;;
2268 amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;;
2269 esac
2270 ;;
2271
ba4481b5
DL
2272 ## NetBSD ports
2273 *-*-netbsd* )
2274 opsys=netbsd
dd038e26 2275 if test -f /usr/lib/crti.o; then
f57bd967
DL
2276
2277cat >>confdefs.h <<\_ACEOF
2278#define HAVE_CRTIN
dd038e26
AS
2279_ACEOF
2280
2281 fi
2282
ba4481b5
DL
2283 case "${canonical}" in
2284 alpha*-*-netbsd*) machine=alpha ;;
2285 i[3456]86-*-netbsd*) machine=intel386 ;;
2286 m68k-*-netbsd*)
2287 # This is somewhat bogus.
2288 machine=hp9000s300 ;;
ba4481b5 2289 mips-*-netbsd*) machine=pmax ;;
2df636f4 2290 mipsel-*-netbsd*) machine=pmax ;;
97836269 2291 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 2292 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 2293 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2294 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2295 vax-*-netbsd*) machine=vax ;;
2df636f4 2296 arm-*-netbsd*) machine=arm ;;
d54ee7b4 2297 x86_64-*-netbsd*) machine=amdx86-64 ;;
13aadc96 2298 hppa-*-netbsd*) machine=hp800 ;;
d54ee7b4 2299 shle-*-netbsd*) machine=sh3el ;;
ba4481b5
DL
2300 esac
2301 ;;
2302
2303 ## OpenBSD ports
2304 *-*-openbsd* )
2305 opsys=openbsd
2306 case "${canonical}" in
2307 alpha*-*-openbsd*) machine=alpha ;;
85410b02
CY
2308 arm-*-openbsd*) machine=arm ;;
2309 hppa-*-openbsd*) machine=hp9000s300 ;;
2310 i386-*-openbsd*) machine=intel386 ;;
2311 m68k-*-openbsd*) machine=hp9000s300 ;;
2312 m88k-*-openbsd*) machine=aviion ;;
2313 mips64-*-openbsd*) machine=mips64 ;;
2314 powerpc-*-openbsd*) machine=macppc ;;
2315 sh-*-openbsd*) machine=sh3el ;;
2316 sparc*-*-openbsd*) machine=sparc ;;
2317 vax-*-openbsd*) machine=vax ;;
2318 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2319 esac
2320 ;;
2321
10a3b1a1
EZ
2322 ## LynxOS ports
2323 *-*-lynxos* )
2324 opsys=lynxos
2325 case "${canonical}" in
2326 i[3456]86-*-lynxos*) machine=intel386 ;;
2327 powerpc-*-lynxos*) machine=powerpc ;;
2328 esac
2329 ;;
2330
ba4481b5
DL
2331 ## Acorn RISCiX:
2332 arm-acorn-riscix1.1* )
2333 machine=acorn opsys=riscix1-1
2334 ;;
2335 arm-acorn-riscix1.2* | arm-acorn-riscix )
2336 ## This name is riscix12 instead of riscix1.2
2337 ## to avoid a file name conflict on MSDOS.
2338 machine=acorn opsys=riscix12
2339 ;;
2340
2341 ## BSDI ports
2342 *-*-bsdi* )
2343 opsys=bsdi
2344 case "${canonical}" in
2345 i[345]86-*-bsdi*) machine=intel386 ;;
2346 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 2347 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
2348 esac
2349 case "${canonical}" in
2350 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
2351 *-*-bsdi2.0* ) opsys=bsdos2 ;;
2352 *-*-bsdi2* ) opsys=bsdos2-1 ;;
2353 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 2354 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
2355 esac
2356 ;;
2357
2358 ## Alliant machines
2359 ## Strictly speaking, we need the version of the alliant operating
2360 ## system to choose the right machine file, but currently the
2361 ## configuration name doesn't tell us enough to choose the right
2362 ## one; we need to give alliants their own operating system name to
2363 ## do this right. When someone cares, they can help us.
2364 fx80-alliant-* )
2365 machine=alliant4 opsys=bsd4-2
2366 ;;
2367 i860-alliant-* )
2368 machine=alliant-2800 opsys=bsd4-3
2369 ;;
2370
2371 ## Alpha (DEC) machines.
2372 alpha*-dec-osf* )
2373 machine=alpha opsys=osf1
2374 # This is needed to find X11R6.1 libraries for certain tests.
2375 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
2376 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
2377 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
2378 # due to non-traditional preprocessing with the current compiler
2379 # defaults. OSF 4 can also have that compiler version, and there
2380 # seems always to have been a usable /usr/bin/cpp.
2381 NON_GNU_CPP=/usr/bin/cpp
ca512671 2382 case "${canonical}" in
a55b799a 2383 alpha*-dec-osf[5-9]*)
bb17930d 2384 opsys=osf5-0 ;;
ca512671 2385 esac
ba4481b5
DL
2386 ;;
2387
2388 alpha*-*-linux-gnu* )
2389 machine=alpha opsys=gnu-linux
2390 ;;
2391
c4bb2108
DL
2392 arm*-*-linux-gnu* )
2393 machine=arm opsys=gnu-linux
2394 ;;
2395
ba4481b5
DL
2396 ## Altos 3068
2397 m68*-altos-sysv* )
2398 machine=altos opsys=usg5-2
2399 ;;
2400
2401 ## Amdahl UTS
2402 580-amdahl-sysv* )
2403 machine=amdahl opsys=usg5-2-2
2404 ;;
2405
2406 ## Apollo, Domain/OS
2407 m68*-apollo-* )
2408 machine=apollo opsys=bsd4-3
2409 ;;
2410
040c474e
CY
2411 ## Apple Darwin / Mac OS X
2412 *-apple-darwin* )
2413 case "${canonical}" in
2414 i[3456]86-* ) machine=intel386 ;;
2415 powerpc-* ) machine=powermac ;;
2416 * ) unported=yes ;;
2417 esac
2418 opsys=darwin
2419 # Define CPP as follows to make autoconf work correctly.
2420 CPP="${CC-cc} -E -no-cpp-precomp"
2421 # Use fink packages if available.
2422 if test -d /sw/include && test -d /sw/lib; then
2423 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2424 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2425 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2426 fi
2427 ;;
2428
ba4481b5
DL
2429 ## AT&T 3b2, 3b5, 3b15, 3b20
2430 we32k-att-sysv* )
2431 machine=att3b opsys=usg5-2-2
2432 ;;
2433
2434 ## AT&T 3b1 - The Mighty Unix PC!
2435 m68*-att-sysv* )
2436 machine=7300 opsys=usg5-2-2
2437 ;;
2438
2439 ## Bull dpx20
2440 rs6000-bull-bosx* )
2441 machine=ibmrs6000 opsys=aix3-2
2442 ;;
2443
2444 ## Bull dpx2
2445 m68*-bull-sysv3* )
2446 machine=dpx2 opsys=usg5-3
2447 ;;
2448
2449 ## Bull sps7
2450 m68*-bull-sysv2* )
2451 machine=sps7 opsys=usg5-2
2452 ;;
2453
2454 ## CCI 5/32, 6/32 -- see "Tahoe".
2455
2456 ## Celerity
2457 ## I don't know what configuration name to use for this; config.sub
2458 ## doesn't seem to know anything about it. Hey, Celerity users, get
2459 ## in touch with us!
2460 celerity-celerity-bsd* )
2461 machine=celerity opsys=bsd4-2
2462 ;;
2463
2464 ## Clipper
2465 ## What operating systems does this chip run that Emacs has been
2466 ## tested on?
2467 clipper-* )
2468 machine=clipper
2469 ## We'll use the catch-all code at the bottom to guess the
2470 ## operating system.
2471 ;;
2472
df645f7c
AS
2473 ## Compaq Nonstop
2474 mips-compaq-nonstopux* )
2475 machine=nonstopux opsys=nonstopux
2476 ;;
2477
ba4481b5
DL
2478 ## Convex
2479 *-convex-bsd* | *-convex-convexos* )
2480 machine=convex opsys=bsd4-3
2481 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
2482 NON_GNU_CPP="cc -E -P"
2483 ;;
2484
2485 ## Cubix QBx/386
2486 i[3456]86-cubix-sysv* )
2487 machine=intel386 opsys=usg5-3
2488 ;;
2489
2490 ## Cydra 5
2491 cydra*-cydrome-sysv* )
2492 machine=cydra5 opsys=usg5-3
2493 ;;
2494
2495 ## Data General AViiON Machines
2496 ## DG changed naming conventions with the release of 5.4.4.10, they
2497 ## dropped the initial 5.4 but left the intervening R. Because of the
2498 ## R this shouldn't conflict with older versions of the OS (which I
2499 ## think were named like dgux4.*). In addition, DG new AViiONs series
2500 ## uses either Motorola M88k or Intel Pentium CPUs.
2501 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
2502 machine=aviion opsys=dgux4
2503 ;;
2504 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
2505 ## This name is dgux5-4-3 instead of dgux5-4r3
2506 ## to avoid a file name conflict on MSDOS.
2507 machine=aviion opsys=dgux5-4-3
2508 ;;
2509 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
2510 machine=aviion opsys=dgux5-4r2
2511 ;;
2512 m88k-dg-dgux* )
2513 machine=aviion opsys=dgux
2514 ;;
2515
2516 ## Data General AViiON Intel (x86) Machines
2517 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
2518 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
2519 i[345]86-dg-dguxR4* )
2520 machine=aviion-intel opsys=dgux4
2521 ;;
2522
2523 ## DECstations
2524 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
2525 machine=pmax opsys=bsd4-2
2526 ;;
2527 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
2528 machine=pmax opsys=bsd4-3
2529 ;;
2530 mips-dec-ultrix* )
2531 machine=pmax opsys=ultrix4-3
2532 ;;
2533 mips-dec-osf* )
2534 machine=pmax opsys=osf1
2535 ;;
2536 mips-dec-mach_bsd4.3* )
2537 machine=pmax opsys=mach-bsd4-3
2538 ;;
2539
cd890796
JD
2540 ## Motorola Delta machines
2541 m68k-motorola-sysv* | m68000-motorola-sysv* )
2542 machine=delta opsys=usg5-3
2543 if test -z "`type gnucc | grep 'not found'`"
2544 then
2545 if test -s /etc/167config
2546 then CC="gnucc -m68040"
2547 else CC="gnucc -m68881"
2548 fi
2549 else
2550 if test -z "`type gcc | grep 'not found'`"
2551 then CC=gcc
2552 else CC=cc
2553 fi
2554 fi
2555 ;;
ba4481b5
DL
2556 m88k-motorola-sysv4* )
2557 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
2558 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
2559 # I hope there are not other 4.0 versions for this machine
2560 # which really need usg5-4 instead.
2561 machine=delta88k opsys=usg5-4-2
2562 ;;
2563 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
2564 machine=delta88k opsys=usg5-3
2565 ;;
2566
2567 ## Dual machines
2568 m68*-dual-sysv* )
2569 machine=dual opsys=usg5-2
2570 ;;
2571 m68*-dual-uniplus* )
2572 machine=dual opsys=unipl5-2
2573 ;;
2574
2575 ## Elxsi 6400
2576 elxsi-elxsi-sysv* )
2577 machine=elxsi opsys=usg5-2
2578 ;;
2579
2580 ## Encore machines
2581 ns16k-encore-bsd* )
2582 machine=ns16000 opsys=umax
2583 ;;
2584
65171e3a
DL
2585 ## The GEC 63 - apparently, this port isn't really finished yet.
2586 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
2587
2588 ## Gould Power Node and NP1
2589 pn-gould-bsd4.2* )
2590 machine=gould opsys=bsd4-2
2591 ;;
2592 pn-gould-bsd4.3* )
2593 machine=gould opsys=bsd4-3
2594 ;;
2595 np1-gould-bsd* )
2596 machine=gould-np1 opsys=bsd4-3
2597 ;;
2598
2599 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2600 ## as far as Emacs is concerned).
2601 m88k-harris-cxux* )
2602 # Build needs to be different on 7.0 and later releases
2603 case "`uname -r`" in
2604 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2605 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2606 esac
2607 NON_GNU_CPP="/lib/cpp"
2608 ;;
2609 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2610 m68k-harris-cxux* )
2611 machine=nh3000 opsys=cxux
2612 ;;
2613 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2614 powerpc-harris-powerunix )
2615 machine=nh6000 opsys=powerunix
2616 NON_GNU_CPP="cc -Xo -E -P"
2617 ;;
6fbb6db1
GM
2618 ## SR2001/SR2201 running HI-UX/MPP
2619 hppa1.1-hitachi-hiuxmpp* )
2620 machine=sr2k opsys=hiuxmpp
2621 ;;
2622 hppa1.1-hitachi-hiuxwe2* )
2623 machine=sr2k opsys=hiuxwe2
2624 ;;
ba4481b5
DL
2625 ## Honeywell XPS100
2626 xps*-honeywell-sysv* )
2627 machine=xps100 opsys=usg5-2
2628 ;;
2629
2630 ## HP 9000 series 200 or 300
2631 m68*-hp-bsd* )
2632 machine=hp9000s300 opsys=bsd4-3
2633 ;;
2634 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2635 m68*-hp-hpux* )
2636 case "`uname -r`" in
2637 ## Someone's system reports A.B8.05 for this.
2638 ## I wonder what other possibilities there are.
2639 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2640 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2641 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2642 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2643 *) machine=hp9000s300 opsys=hpux ;;
2644 esac
2645 ;;
2646
6fbb6db1
GM
2647 ## HP 9000 series 700 and 800, running HP/UX
2648 hppa*-hp-hpux7* )
2649 machine=hp800 opsys=hpux
2650 ;;
2651 hppa*-hp-hpux8* )
2652 machine=hp800 opsys=hpux8
2653 ;;
2654 hppa*-hp-hpux9shr* )
2655 machine=hp800 opsys=hpux9shr
2656 ;;
2657 hppa*-hp-hpux9* )
2658 machine=hp800 opsys=hpux9
2659 ;;
2660 hppa*-hp-hpux10.2* )
2661 machine=hp800 opsys=hpux10-20
2662 ;;
2663 hppa*-hp-hpux10* )
2664 machine=hp800 opsys=hpux10
2665 ;;
2666 hppa*-hp-hpux1[1-9]* )
2667 machine=hp800 opsys=hpux11
2668 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2669 ;;
2670
13aadc96
CY
2671 hppa*-*-linux-gnu* )
2672 machine=hp800 opsys=gnu-linux
2673 ;;
2674
6fbb6db1
GM
2675 ## HP 9000 series 700 and 800, running HP/UX
2676 hppa*-hp-hpux* )
2677 ## Cross-compilation? Nah!
2678 case "`uname -r`" in
2679 ## Someone's system reports A.B8.05 for this.
2680 ## I wonder what other possibilities there are.
2681 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2682 *.08.* ) machine=hp800 opsys=hpux8 ;;
2683 *.09.* ) machine=hp800 opsys=hpux9 ;;
2684 *) machine=hp800 opsys=hpux10 ;;
2685 esac
2686 ;;
13aadc96
CY
2687 hppa*-*-nextstep* )
2688 machine=hp800 opsys=nextstep
2689 ;;
2690
ba4481b5
DL
2691 ## Orion machines
2692 orion-orion-bsd* )
2693 machine=orion opsys=bsd4-2
2694 ;;
2695 clipper-orion-bsd* )
2696 machine=orion105 opsys=bsd4-2
2697 ;;
2698
2699 ## IBM machines
2700 i[3456]86-ibm-aix1.1* )
2701 machine=ibmps2-aix opsys=usg5-2-2
2702 ;;
2703 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2704 machine=ibmps2-aix opsys=usg5-3
2705 ;;
2706 i370-ibm-aix*)
2707 machine=ibm370aix opsys=usg5-3
2708 ;;
55597d70 2709 s390-*-linux-gnu* )
138f0859
GM
2710 machine=ibms390 opsys=gnu-linux
2711 ;;
bcdb1378
EZ
2712 s390x-*-linux-gnu* )
2713 machine=ibms390x opsys=gnu-linux
2714 ;;
ba4481b5
DL
2715 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2716 machine=ibmrs6000 opsys=aix3-1
2717 ;;
2718 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2719 machine=ibmrs6000 opsys=aix3-2-5
2720 ;;
2721 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2722 machine=ibmrs6000 opsys=aix4-1
2723 ;;
2724 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2725 machine=ibmrs6000 opsys=aix4-2
2726 ;;
67bf991b
CY
2727 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2728 machine=ibmrs6000 opsys=aix4-2
2729 ;;
55597d70 2730 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2731 machine=ibmrs6000 opsys=aix4-2
2732 ;;
ba4481b5
DL
2733 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2734 machine=ibmrs6000 opsys=aix4
2735 ;;
2736 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2737 machine=ibmrs6000 opsys=aix4-1
2738 ;;
2739 rs6000-ibm-aix* | powerpc-ibm-aix* )
2740 machine=ibmrs6000 opsys=aix3-2
2741 ;;
2742 romp-ibm-bsd4.3* )
2743 machine=ibmrt opsys=bsd4-3
2744 ;;
2745 romp-ibm-bsd4.2* )
2746 machine=ibmrt opsys=bsd4-2
2747 ;;
2748 romp-ibm-aos4.3* )
2749 machine=ibmrt opsys=bsd4-3
2750 ;;
2751 romp-ibm-aos4.2* )
2752 machine=ibmrt opsys=bsd4-2
2753 ;;
2754 romp-ibm-aos* )
2755 machine=ibmrt opsys=bsd4-3
2756 ;;
2757 romp-ibm-bsd* )
2758 machine=ibmrt opsys=bsd4-3
2759 ;;
2760 romp-ibm-aix* )
2761 machine=ibmrt-aix opsys=usg5-2-2
2762 ;;
2763
2764 ## Integrated Solutions `Optimum V'
2765 m68*-isi-bsd4.2* )
2766 machine=isi-ov opsys=bsd4-2
2767 ;;
2768 m68*-isi-bsd4.3* )
2769 machine=isi-ov opsys=bsd4-3
2770 ;;
2771
2772 ## Intel 386 machines where we do care about the manufacturer
2773 i[3456]86-intsys-sysv* )
2774 machine=is386 opsys=usg5-2-2
2775 ;;
2776
2777 ## Prime EXL
2778 i[3456]86-prime-sysv* )
2779 machine=i386 opsys=usg5-3
2780 ;;
2781
2782 ## Sequent Symmetry running Dynix
2783 i[3456]86-sequent-bsd* )
2784 machine=symmetry opsys=bsd4-3
2785 ;;
2786
2787 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2788 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2789 machine=sequent-ptx opsys=ptx4
2790 NON_GNU_CPP=/lib/cpp
2791 ;;
2792
2793 ## Sequent Symmetry running DYNIX/ptx
2794 ## Use the old cpp rather than the newer ANSI one.
2795 i[3456]86-sequent-ptx* )
2796 machine=sequent-ptx opsys=ptx
2797 NON_GNU_CPP="/lib/cpp"
2798 ;;
2799
2800 ## ncr machine running svr4.3.
2801 i[3456]86-ncr-sysv4.3 )
2802 machine=ncr386 opsys=usg5-4-3
2803 ;;
2804
2805 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2806 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2807 i[3456]86-ncr-sysv* )
2808 machine=ncr386 opsys=usg5-4-2
2809 ;;
2810
2811 ## Intel Paragon OSF/1
2812 i860-intel-osf1* )
2813 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2814 ;;
2815
2816 ## Intel 860
2817 i860-*-sysv4* )
2818 machine=i860 opsys=usg5-4
2819 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2820 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2821 ;;
2822
c76e04a8
GM
2823 ## Macintosh PowerPC
2824 powerpc*-*-linux-gnu* )
2825 machine=macppc opsys=gnu-linux
2826 ;;
2827
ba4481b5
DL
2828 ## Masscomp machines
2829 m68*-masscomp-rtu* )
2830 machine=masscomp opsys=rtu
2831 ;;
2832
2833 ## Megatest machines
2834 m68*-megatest-bsd* )
2835 machine=mega68 opsys=bsd4-2
2836 ;;
2837
2838 ## Workstations sold by MIPS
2839 ## This is not necessarily all workstations using the MIPS processor -
2840 ## Irises are produced by SGI, and DECstations by DEC.
2841
2842 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2843 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2844 ## it gives for choosing between the alternatives seems to be "Use
2845 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2846 ## the BSD world." I'll assume that these are instructions for
2847 ## handling two odd situations, and that every other situation
2848 ## should use mips.h and usg5-2-2, they being listed first.
2849 mips-mips-usg* )
2850 machine=mips4
2851 ## Fall through to the general code at the bottom to decide on the OS.
2852 ;;
2853 mips-mips-riscos4* )
2854 machine=mips4 opsys=bsd4-3
2855 NON_GNU_CC="cc -systype bsd43"
2856 NON_GNU_CPP="cc -systype bsd43 -E"
2857 ;;
2858 mips-mips-riscos5* )
2859 machine=mips4 opsys=riscos5
2860 NON_GNU_CC="cc -systype bsd43"
2861 NON_GNU_CPP="cc -systype bsd43 -E"
2862 ;;
2863 mips-mips-bsd* )
2864 machine=mips opsys=bsd4-3
2865 ;;
2866 mips-mips-* )
2867 machine=mips opsys=usg5-2-2
2868 ;;
2869
2870 ## NeXT
2871 m68*-next-* | m68k-*-nextstep* )
2872 machine=m68k opsys=nextstep
2873 ;;
2874
2875 ## The complete machine from National Semiconductor
2876 ns32k-ns-genix* )
2877 machine=ns32000 opsys=usg5-2
2878 ;;
2879
2880 ## NCR machines
2881 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2882 machine=tower32 opsys=usg5-2-2
2883 ;;
2884 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2885 machine=tower32v3 opsys=usg5-3
2886 ;;
2887
2888 ## NEC EWS4800
2889 mips-nec-sysv4*)
2890 machine=ews4800 opsys=ux4800
2891 ;;
2892
2893 ## Nixdorf Targon 31
2894 m68*-nixdorf-sysv* )
2895 machine=targon31 opsys=usg5-2-2
2896 ;;
2897
2898 ## Nu (TI or LMI)
2899 m68*-nu-sysv* )
2900 machine=nu opsys=usg5-2
2901 ;;
2902
2903 ## Plexus
2904 m68*-plexus-sysv* )
2905 machine=plexus opsys=usg5-2
2906 ;;
2907
ba4481b5
DL
2908 ## Pyramid machines
2909 ## I don't really have any idea what sort of processor the Pyramid has,
2910 ## so I'm assuming it is its own architecture.
2911 pyramid-pyramid-bsd* )
2912 machine=pyramid opsys=bsd4-2
2913 ;;
2914
2915 ## Sequent Balance
2916 ns32k-sequent-bsd4.2* )
2917 machine=sequent opsys=bsd4-2
2918 ;;
2919 ns32k-sequent-bsd4.3* )
2920 machine=sequent opsys=bsd4-3
2921 ;;
2922
2923 ## Siemens Nixdorf
2924 mips-siemens-sysv* | mips-sni-sysv*)
2925 machine=mips-siemens opsys=usg5-4
2926 NON_GNU_CC=/usr/ccs/bin/cc
2927 NON_GNU_CPP=/usr/ccs/lib/cpp
2928 ;;
2929
2930 ## Silicon Graphics machines
2931 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2932 m68*-sgi-iris3.5* )
2933 machine=irist opsys=iris3-5
2934 ;;
2935 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2936 machine=irist opsys=iris3-6
2937 ;;
2938 ## Iris 4D
2939 mips-sgi-irix3* )
2940 machine=iris4d opsys=irix3-3
2941 ;;
2942 mips-sgi-irix4* )
2943 machine=iris4d opsys=irix4-0
2944 ;;
2945 mips-sgi-irix6.5 )
2946 machine=iris4d opsys=irix6-5
946173ad
DL
2947 # Without defining _LANGUAGE_C, things get masked out in the headers
2948 # so that, for instance, grepping for `free' in stdlib.h fails and
2949 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2950 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2951 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2952 ;;
2953 mips-sgi-irix6* )
2954 machine=iris4d opsys=irix6-0
c4bb2108 2955 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2956 # but presumably it does no harm.
2957 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2958 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2959 NON_GCC_TEST_OPTIONS=-32
2960 ;;
2961 mips-sgi-irix5.[01]* )
2962 machine=iris4d opsys=irix5-0
2963 ;;
2964 mips-sgi-irix5* | mips-sgi-irix* )
2965 machine=iris4d opsys=irix5-2
2966 ;;
2967
2968 ## SONY machines
2969 m68*-sony-bsd4.2* )
2970 machine=news opsys=bsd4-2
2971 ;;
2972 m68*-sony-bsd4.3* )
2973 machine=news opsys=bsd4-3
2974 ;;
2975 m68*-sony-newsos3* | m68*-sony-news3*)
2976 machine=news opsys=bsd4-3
2977 ;;
2978 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2979 machine=news-risc opsys=bsd4-3
2980 ;;
2981 mips-sony-newsos6* )
2982 machine=news-r6 opsys=newsos6
2983 ;;
2984 mips-sony-news* )
2985 machine=news-risc opsys=newsos5
2986 ;;
2987
2988 ## Stride
2989 m68*-stride-sysv* )
2990 machine=stride opsys=usg5-2
2991 ;;
2992
2993 ## Suns
2994 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2995 machine=sparc opsys=gnu-linux
2996 ;;
2997
d054101f 2998 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2999 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
3000 | rs6000-*-solaris2*)
3001 case "${canonical}" in
3002 m68*-sunos1* ) machine=sun1 ;;
3003 m68*-sunos2* ) machine=sun2 ;;
3004 m68* ) machine=sun3 ;;
3005 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
3006 i[3456]86-*-* ) machine=intel386 ;;
af46e133 3007 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
3008 powerpcle* ) machine=powerpcle ;;
3009 powerpc* | rs6000* ) machine=ibmrs6000 ;;
3010 sparc* ) machine=sparc ;;
3011 * ) unported=yes ;;
3012 esac
3013 case "${canonical}" in
3014 ## The Sun386 didn't get past 4.0.
3015 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
3016 *-sunos4.0* ) opsys=sunos4-0 ;;
3017 *-sunos4.1.[3-9]*noshare )
3018 ## This name is sunos413 instead of sunos4-1-3
3019 ## to avoid a file name conflict on MSDOS.
3020 opsys=sunos413
3021 NON_GNU_CPP=/usr/lib/cpp
3022 NON_GCC_TEST_OPTIONS=-Bstatic
3023 GCC_TEST_OPTIONS=-static
3024 ;;
3025 *-sunos4.1.[3-9]* | *-sunos4shr*)
3026 opsys=sunos4shr
3027 NON_GNU_CPP=/usr/lib/cpp
3028 ;;
3029 *-sunos4* | *-sunos )
3030 opsys=sunos4-1
3031 NON_GCC_TEST_OPTIONS=-Bstatic
3032 GCC_TEST_OPTIONS=-static
3033 ;;
3034 *-sunos5.3* | *-solaris2.3* )
3035 opsys=sol2-3
3036 NON_GNU_CPP=/usr/ccs/lib/cpp
3037 ;;
3038 *-sunos5.4* | *-solaris2.4* )
3039 opsys=sol2-4
3040 NON_GNU_CPP=/usr/ccs/lib/cpp
3041 RANLIB="ar -ts"
3042 ;;
3043 *-sunos5.5* | *-solaris2.5* )
3044 opsys=sol2-5
3045 NON_GNU_CPP=/usr/ccs/lib/cpp
3046 RANLIB="ar -ts"
3047 ;;
8e967cf7
MR
3048 *-sunos5.6* | *-solaris2.6* )
3049 opsys=sol2-6
3050 NON_GNU_CPP=/usr/ccs/lib/cpp
3051 RANLIB="ar -ts"
3052 ;;
ba4481b5 3053 *-sunos5* | *-solaris* )
9e71690e 3054 opsys=sol2-6
089a966d
GM
3055 emacs_check_sunpro_c=yes
3056 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5
DL
3057 ;;
3058 * ) opsys=bsd4-2 ;;
3059 esac
3060 ## Watch out for a compiler that we know will not work.
3061 case "${canonical}" in
3062 *-solaris* | *-sunos5* )
3063 if [ "x$CC" = x/usr/ucb/cc ]; then
3064 ## /usr/ucb/cc doesn't work;
3065 ## we should find some other compiler that does work.
3066 unset CC
3067 fi
3068 ;;
3069 *) ;;
3070 esac
3071 ;;
3072 sparc-*-nextstep* )
3073 machine=sparc opsys=nextstep
3074 ;;
3075
3076 ## Tadpole 68k
3077 m68*-tadpole-sysv* )
3078 machine=tad68k opsys=usg5-3
3079 ;;
3080
3081 ## Tahoe machines
3082 tahoe-tahoe-bsd4.2* )
3083 machine=tahoe opsys=bsd4-2
3084 ;;
3085 tahoe-tahoe-bsd4.3* )
3086 machine=tahoe opsys=bsd4-3
3087 ;;
3088
3089 ## Tandem Integrity S2
3090 mips-tandem-sysv* )
3091 machine=tandem-s2 opsys=usg5-3
3092 ;;
3093
3094 ## Tektronix XD88
3095 m88k-tektronix-sysv3* )
3096 machine=tekxd88 opsys=usg5-3
3097 ;;
3098
3099 ## Tektronix 16000 box (6130?)
3100 ns16k-tektronix-bsd* )
3101 machine=ns16000 opsys=bsd4-2
3102 ;;
3103 ## Tektronix 4300
3104 ## src/m/tek4300.h hints that this is a m68k machine.
3105 m68*-tektronix-bsd* )
3106 machine=tek4300 opsys=bsd4-3
3107 ;;
3108
3109 ## Titan P2 or P3
3110 ## We seem to have lost the machine-description file titan.h!
3111 titan-titan-sysv* )
3112 machine=titan opsys=usg5-3
3113 ;;
3114
3115 ## Ustation E30 (SS5E)
3116 m68*-unisys-uniplus* )
3117 machine=ustation opsystem=unipl5-2
3118 ;;
3119
3120 ## Vaxen.
3121 vax-dec-* )
3122 machine=vax
3123 case "${canonical}" in
3124 *-bsd4.1* ) opsys=bsd4-1 ;;
3125 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
3126 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
3127 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
3128 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
3129 *-vms* ) opsys=vms ;;
3130 * ) unported=yes
3131 esac
3132 ;;
3133
3134 ## Whitechapel MG1
3135 ns16k-whitechapel-* )
3136 machine=mg1
3137 ## We don't know what sort of OS runs on these; we'll let the
3138 ## operating system guessing code below try.
3139 ;;
3140
3141 ## Wicat
3142 m68*-wicat-sysv* )
3143 machine=wicat opsys=usg5-2
3144 ;;
3145
f4988be7
GM
3146 ## IA-64
3147 ia64*-*-linux* )
3148 machine=ia64 opsys=gnu-linux
3149 ;;
3150
ba4481b5
DL
3151 ## Intel 386 machines where we don't care about the manufacturer
3152 i[3456]86-*-* )
3153 machine=intel386
3154 case "${canonical}" in
c60ee5e7 3155 *-cygwin ) opsys=cygwin ;;
eae54018 3156 *-darwin* ) opsys=darwin
23fd4483
ST
3157 CPP="${CC-cc} -E -no-cpp-precomp"
3158 ;;
ba4481b5
DL
3159 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
3160 *-isc2.2* ) opsys=isc2-2 ;;
3161 *-isc4.0* ) opsys=isc4-0 ;;
3162 *-isc4.* ) opsys=isc4-1
3163 GCC_TEST_OPTIONS=-posix
3164 NON_GCC_TEST_OPTIONS=-Xp
3165 ;;
3166 *-isc* ) opsys=isc3-0 ;;
3167 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
3168 *-esix* ) opsys=esix ;;
3169 *-xenix* ) opsys=xenix ;;
3170 *-linux-gnu* ) opsys=gnu-linux ;;
3171 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 3172 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
3173 NON_GNU_CPP=/lib/cpp
3174 # Prevent -belf from being passed to $CPP.
3175 # /lib/cpp does not accept it.
3176 OVERRIDE_CPPFLAGS=" "
3177 ;;
3178 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
3179 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3180 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 3181 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
3182 *-nextstep* ) opsys=nextstep ;;
3183 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3184 esac
3185 ;;
3186
3187 ## m68k Linux-based GNU system
3188 m68k-*-linux-gnu* )
3189 machine=m68k opsys=gnu-linux
3190 ;;
3191
3192 ## Mips Linux-based GNU system
cd958eb3 3193 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
3194 machine=mips opsys=gnu-linux
3195 ;;
3196
3197 ## UXP/DS
3198 sparc-fujitsu-sysv4* )
3199 machine=sparc opsys=uxpds
3200 NON_GNU_CPP=/usr/ccs/lib/cpp
3201 RANLIB="ar -ts"
3202 ;;
3203
3204 ## UXP/V
3205 f301-fujitsu-uxpv4.1)
3206 machine=f301 opsys=uxpv
3207 ;;
3208
598a2813
AS
3209 ## AMD x86-64 Linux-based GNU system
3210 x86_64-*-linux-gnu* )
24b01ec4 3211 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
3212 ;;
3213
94218e27
DN
3214 ## Tensilica Xtensa Linux-based GNU system
3215 xtensa-*-linux-gnu* )
3216 machine=xtensa opsys=gnu-linux
3217 ;;
3218
ba4481b5
DL
3219 * )
3220 unported=yes
3221 ;;
3222esac
3223
3224### If the code above didn't choose an operating system, just choose
3225### an operating system based on the configuration name. You really
3226### only want to use this when you have no idea what the right
3227### operating system is; if you know what operating systems a machine
3228### runs, it's cleaner to make it explicit in the case statement
3229### above.
3230if test x"${opsys}" = x; then
3231 case "${canonical}" in
3232 *-gnu* ) opsys=gnu ;;
3233 *-bsd4.[01] ) opsys=bsd4-1 ;;
3234 *-bsd4.2 ) opsys=bsd4-2 ;;
3235 *-bsd4.3 ) opsys=bsd4-3 ;;
3236 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
3237 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
3238 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
3239 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
3240 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
3241 *-sysv5uw* ) opsys=unixware ;;
3242 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
3243 *-sysv4.1* | *-sysvr4.1* )
3244 NON_GNU_CPP=/usr/lib/cpp
3245 opsys=usg5-4 ;;
3246 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
3247 if [ x$NON_GNU_CPP = x ]; then
3248 if [ -f /usr/ccs/lib/cpp ]; then
3249 NON_GNU_CPP=/usr/ccs/lib/cpp
3250 else
3251 NON_GNU_CPP=/lib/cpp
3252 fi
3253 fi
3254 opsys=usg5-4-2 ;;
3255 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
3256 * )
3257 unported=yes
3258 ;;
3259 esac
3260fi
3261
c0d27fcc 3262
22044edf 3263
ba4481b5 3264if test $unported = yes; then
c0d27fcc 3265 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
3266Check \`etc/MACHINES' for recognized configuration names." >&5
3267echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
3268Check \`etc/MACHINES' for recognized configuration names." >&2;}
3269 { (exit 1); exit 1; }; }
ba4481b5
DL
3270fi
3271
3272machfile="m/${machine}.h"
3273opsysfile="s/${opsys}.h"
3274
c0d27fcc 3275
ba4481b5
DL
3276#### Choose a compiler.
3277test -n "$CC" && cc_specified=yes
3278
3279# Save the value of CFLAGS that the user specified.
3280SPECIFIED_CFLAGS="$CFLAGS"
3281
3282case ${with_gcc} in
3283 "yes" ) CC="gcc" GCC=yes ;;
3284 "no" ) : ${CC=cc} ;;
503d2be0
AS
3285 * )
3286esac
3287ac_ext=c
3288ac_cpp='$CPP $CPPFLAGS'
3289ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3290ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3291ac_compiler_gnu=$ac_cv_c_compiler_gnu
3292if test -n "$ac_tool_prefix"; then
3293 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3294set dummy ${ac_tool_prefix}gcc; ac_word=$2
d6e01aa5
KL
3295{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3296echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3297if test "${ac_cv_prog_CC+set}" = set; then
3298 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3299else
3300 if test -n "$CC"; then
3301 ac_cv_prog_CC="$CC" # Let the user override the test.
3302else
c0d27fcc
MR
3303as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3304for as_dir in $PATH
3305do
3306 IFS=$as_save_IFS
3307 test -z "$as_dir" && as_dir=.
3308 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3309 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3310 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3311 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3312 break 2
3313 fi
3314done
503d2be0 3315done
d6e01aa5 3316IFS=$as_save_IFS
503d2be0 3317
ba4481b5
DL
3318fi
3319fi
503d2be0 3320CC=$ac_cv_prog_CC
ba4481b5 3321if test -n "$CC"; then
d6e01aa5
KL
3322 { echo "$as_me:$LINENO: result: $CC" >&5
3323echo "${ECHO_T}$CC" >&6; }
503d2be0 3324else
d6e01aa5
KL
3325 { echo "$as_me:$LINENO: result: no" >&5
3326echo "${ECHO_T}no" >&6; }
503d2be0
AS
3327fi
3328
d6e01aa5 3329
503d2be0
AS
3330fi
3331if test -z "$ac_cv_prog_CC"; then
3332 ac_ct_CC=$CC
3333 # Extract the first word of "gcc", so it can be a program name with args.
3334set dummy gcc; ac_word=$2
d6e01aa5
KL
3335{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3336echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3337if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3338 echo $ECHO_N "(cached) $ECHO_C" >&6
3339else
3340 if test -n "$ac_ct_CC"; then
3341 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3342else
c0d27fcc
MR
3343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3344for as_dir in $PATH
3345do
3346 IFS=$as_save_IFS
3347 test -z "$as_dir" && as_dir=.
3348 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3349 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3350 ac_cv_prog_ac_ct_CC="gcc"
3351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3352 break 2
3353 fi
3354done
503d2be0 3355done
d6e01aa5 3356IFS=$as_save_IFS
503d2be0
AS
3357
3358fi
3359fi
3360ac_ct_CC=$ac_cv_prog_ac_ct_CC
3361if test -n "$ac_ct_CC"; then
d6e01aa5
KL
3362 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3363echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 3364else
d6e01aa5
KL
3365 { echo "$as_me:$LINENO: result: no" >&5
3366echo "${ECHO_T}no" >&6; }
503d2be0
AS
3367fi
3368
d6e01aa5
KL
3369 if test "x$ac_ct_CC" = x; then
3370 CC=""
3371 else
3372 case $cross_compiling:$ac_tool_warned in
3373yes:)
3374{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3375whose name does not start with the host triplet. If you think this
3376configuration is useful to you, please write to autoconf@gnu.org." >&5
3377echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3378whose name does not start with the host triplet. If you think this
3379configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3380ac_tool_warned=yes ;;
3381esac
3382 CC=$ac_ct_CC
3383 fi
503d2be0
AS
3384else
3385 CC="$ac_cv_prog_CC"
ba4481b5
DL
3386fi
3387
3388if test -z "$CC"; then
d6e01aa5
KL
3389 if test -n "$ac_tool_prefix"; then
3390 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 3391set dummy ${ac_tool_prefix}cc; ac_word=$2
d6e01aa5
KL
3392{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3393echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3394if test "${ac_cv_prog_CC+set}" = set; then
3395 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3396else
3397 if test -n "$CC"; then
3398 ac_cv_prog_CC="$CC" # Let the user override the test.
3399else
c0d27fcc
MR
3400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3401for as_dir in $PATH
3402do
3403 IFS=$as_save_IFS
3404 test -z "$as_dir" && as_dir=.
3405 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3406 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3407 ac_cv_prog_CC="${ac_tool_prefix}cc"
3408 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3409 break 2
3410 fi
3411done
503d2be0 3412done
d6e01aa5 3413IFS=$as_save_IFS
503d2be0
AS
3414
3415fi
3416fi
3417CC=$ac_cv_prog_CC
3418if test -n "$CC"; then
d6e01aa5
KL
3419 { echo "$as_me:$LINENO: result: $CC" >&5
3420echo "${ECHO_T}$CC" >&6; }
503d2be0 3421else
d6e01aa5
KL
3422 { echo "$as_me:$LINENO: result: no" >&5
3423echo "${ECHO_T}no" >&6; }
503d2be0
AS
3424fi
3425
503d2be0 3426
d6e01aa5 3427 fi
503d2be0
AS
3428fi
3429if test -z "$CC"; then
3430 # Extract the first word of "cc", so it can be a program name with args.
3431set dummy cc; ac_word=$2
d6e01aa5
KL
3432{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3433echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3434if test "${ac_cv_prog_CC+set}" = set; then
3435 echo $ECHO_N "(cached) $ECHO_C" >&6
3436else
3437 if test -n "$CC"; then
3438 ac_cv_prog_CC="$CC" # Let the user override the test.
3439else
3440 ac_prog_rejected=no
c0d27fcc
MR
3441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3442for as_dir in $PATH
3443do
3444 IFS=$as_save_IFS
3445 test -z "$as_dir" && as_dir=.
3446 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3447 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3448 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3449 ac_prog_rejected=yes
3450 continue
3451 fi
3452 ac_cv_prog_CC="cc"
3453 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3454 break 2
3455 fi
3456done
503d2be0 3457done
d6e01aa5 3458IFS=$as_save_IFS
503d2be0 3459
ba4481b5
DL
3460if test $ac_prog_rejected = yes; then
3461 # We found a bogon in the path, so make sure we never use it.
3462 set dummy $ac_cv_prog_CC
3463 shift
503d2be0 3464 if test $# != 0; then
ba4481b5
DL
3465 # We chose a different compiler from the bogus one.
3466 # However, it has the same basename, so the bogon will be chosen
3467 # first if we set CC to just the basename; use the full file name.
3468 shift
6bae0ccf 3469 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
3470 fi
3471fi
3472fi
3473fi
503d2be0 3474CC=$ac_cv_prog_CC
ba4481b5 3475if test -n "$CC"; then
d6e01aa5
KL
3476 { echo "$as_me:$LINENO: result: $CC" >&5
3477echo "${ECHO_T}$CC" >&6; }
ba4481b5 3478else
d6e01aa5
KL
3479 { echo "$as_me:$LINENO: result: no" >&5
3480echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3481fi
3482
d6e01aa5 3483
503d2be0
AS
3484fi
3485if test -z "$CC"; then
3486 if test -n "$ac_tool_prefix"; then
d6e01aa5 3487 for ac_prog in cl.exe
503d2be0
AS
3488 do
3489 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3490set dummy $ac_tool_prefix$ac_prog; ac_word=$2
d6e01aa5
KL
3491{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3492echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3493if test "${ac_cv_prog_CC+set}" = set; then
3494 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
3495else
3496 if test -n "$CC"; then
3497 ac_cv_prog_CC="$CC" # Let the user override the test.
3498else
c0d27fcc
MR
3499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3500for as_dir in $PATH
3501do
3502 IFS=$as_save_IFS
3503 test -z "$as_dir" && as_dir=.
3504 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3505 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3506 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3507 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3508 break 2
3509 fi
3510done
503d2be0 3511done
d6e01aa5 3512IFS=$as_save_IFS
503d2be0 3513
c4bb2108
DL
3514fi
3515fi
503d2be0 3516CC=$ac_cv_prog_CC
c4bb2108 3517if test -n "$CC"; then
d6e01aa5
KL
3518 { echo "$as_me:$LINENO: result: $CC" >&5
3519echo "${ECHO_T}$CC" >&6; }
c4bb2108 3520else
d6e01aa5
KL
3521 { echo "$as_me:$LINENO: result: no" >&5
3522echo "${ECHO_T}no" >&6; }
503d2be0
AS
3523fi
3524
d6e01aa5 3525
503d2be0
AS
3526 test -n "$CC" && break
3527 done
3528fi
3529if test -z "$CC"; then
3530 ac_ct_CC=$CC
d6e01aa5 3531 for ac_prog in cl.exe
503d2be0
AS
3532do
3533 # Extract the first word of "$ac_prog", so it can be a program name with args.
3534set dummy $ac_prog; ac_word=$2
d6e01aa5
KL
3535{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3536echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3537if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3538 echo $ECHO_N "(cached) $ECHO_C" >&6
3539else
3540 if test -n "$ac_ct_CC"; then
3541 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3542else
c0d27fcc
MR
3543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3544for as_dir in $PATH
3545do
3546 IFS=$as_save_IFS
3547 test -z "$as_dir" && as_dir=.
3548 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3549 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3550 ac_cv_prog_ac_ct_CC="$ac_prog"
3551 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3552 break 2
3553 fi
3554done
503d2be0 3555done
d6e01aa5 3556IFS=$as_save_IFS
503d2be0 3557
c4bb2108 3558fi
503d2be0
AS
3559fi
3560ac_ct_CC=$ac_cv_prog_ac_ct_CC
3561if test -n "$ac_ct_CC"; then
d6e01aa5
KL
3562 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3563echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3564else
d6e01aa5
KL
3565 { echo "$as_me:$LINENO: result: no" >&5
3566echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3567fi
3568
d6e01aa5 3569
503d2be0
AS
3570 test -n "$ac_ct_CC" && break
3571done
ba4481b5 3572
d6e01aa5
KL
3573 if test "x$ac_ct_CC" = x; then
3574 CC=""
3575 else
3576 case $cross_compiling:$ac_tool_warned in
3577yes:)
3578{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3579whose name does not start with the host triplet. If you think this
3580configuration is useful to you, please write to autoconf@gnu.org." >&5
3581echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3582whose name does not start with the host triplet. If you think this
3583configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3584ac_tool_warned=yes ;;
3585esac
3586 CC=$ac_ct_CC
3587 fi
503d2be0
AS
3588fi
3589
3590fi
ba4481b5 3591
c0d27fcc 3592
19650fd6
AS
3593test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3594See \`config.log' for more details." >&5
3595echo "$as_me: error: no acceptable C compiler found in \$PATH
3596See \`config.log' for more details." >&2;}
503d2be0 3597 { (exit 1); exit 1; }; }
c4bb2108 3598
503d2be0 3599# Provide some information about the compiler.
d6e01aa5 3600echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3601ac_compiler=`set X $ac_compile; echo $2`
d6e01aa5
KL
3602{ (ac_try="$ac_compiler --version >&5"
3603case "(($ac_try" in
3604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3605 *) ac_try_echo=$ac_try;;
3606esac
3607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3608 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3609 ac_status=$?
c0d27fcc 3610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3611 (exit $ac_status); }
d6e01aa5
KL
3612{ (ac_try="$ac_compiler -v >&5"
3613case "(($ac_try" in
3614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3615 *) ac_try_echo=$ac_try;;
3616esac
3617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3618 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3619 ac_status=$?
c0d27fcc 3620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3621 (exit $ac_status); }
d6e01aa5
KL
3622{ (ac_try="$ac_compiler -V >&5"
3623case "(($ac_try" in
3624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3625 *) ac_try_echo=$ac_try;;
3626esac
3627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3628 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3629 ac_status=$?
c0d27fcc 3630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3631 (exit $ac_status); }
3632
3633cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3634/* confdefs.h. */
3635_ACEOF
3636cat confdefs.h >>conftest.$ac_ext
3637cat >>conftest.$ac_ext <<_ACEOF
3638/* end confdefs.h. */
c4bb2108 3639
503d2be0
AS
3640int
3641main ()
3642{
3643
3644 ;
3645 return 0;
3646}
3647_ACEOF
3648ac_clean_files_save=$ac_clean_files
19650fd6 3649ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3650# Try to create an executable without -o first, disregard a.out.
3651# It will help us diagnose broken compilers, and finding out an intuition
3652# of exeext.
d6e01aa5
KL
3653{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3654echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3655ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
d6e01aa5
KL
3656#
3657# List of possible output files, starting from the most likely.
3658# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3659# only as a last resort. b.out is created by i960 compilers.
3660ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3661#
3662# The IRIX 6 linker writes into existing files which may not be
3663# executable, retaining their permissions. Remove them first so a
3664# subsequent execution test works.
3665ac_rmfiles=
3666for ac_file in $ac_files
3667do
3668 case $ac_file in
3669 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3670 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3671 esac
3672done
3673rm -f $ac_rmfiles
3674
3675if { (ac_try="$ac_link_default"
3676case "(($ac_try" in
3677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3678 *) ac_try_echo=$ac_try;;
3679esac
3680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3681 (eval "$ac_link_default") 2>&5
503d2be0 3682 ac_status=$?
c0d27fcc 3683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3684 (exit $ac_status); }; then
d6e01aa5
KL
3685 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3686# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3687# in a Makefile. We should not override ac_cv_exeext if it was cached,
3688# so that the user can short-circuit this test for compilers unknown to
3689# Autoconf.
3690for ac_file in $ac_files ''
19650fd6 3691do
6bae0ccf 3692 test -f "$ac_file" || continue
503d2be0 3693 case $ac_file in
d6e01aa5 3694 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3695 ;;
19650fd6 3696 [ab].out )
edfaf76d
LK
3697 # We found the default executable, but exeext='' is most
3698 # certainly right.
3699 break;;
19650fd6 3700 *.* )
d6e01aa5
KL
3701 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3702 then :; else
3703 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3704 fi
3705 # We set ac_cv_exeext here because the later test for it is not
3706 # safe: cross compilers may not add the suffix if given an `-o'
3707 # argument, so we may need to know it at that point already.
3708 # Even if this section looks crufty: it has the advantage of
3709 # actually working.
edfaf76d 3710 break;;
19650fd6 3711 * )
edfaf76d 3712 break;;
503d2be0
AS
3713 esac
3714done
d6e01aa5
KL
3715test "$ac_cv_exeext" = no && ac_cv_exeext=
3716
503d2be0 3717else
d6e01aa5
KL
3718 ac_file=''
3719fi
3720
3721{ echo "$as_me:$LINENO: result: $ac_file" >&5
3722echo "${ECHO_T}$ac_file" >&6; }
3723if test -z "$ac_file"; then
503d2be0 3724 echo "$as_me: failed program was:" >&5
19650fd6
AS
3725sed 's/^/| /' conftest.$ac_ext >&5
3726
6bae0ccf 3727{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3728See \`config.log' for more details." >&5
6bae0ccf 3729echo "$as_me: error: C compiler cannot create executables
19650fd6 3730See \`config.log' for more details." >&2;}
503d2be0
AS
3731 { (exit 77); exit 77; }; }
3732fi
3733
3734ac_exeext=$ac_cv_exeext
503d2be0 3735
d6e01aa5 3736# Check that the compiler produces executables we can run. If not, either
503d2be0 3737# the compiler is broken, or we cross compile.
d6e01aa5
KL
3738{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3739echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3740# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3741# If not cross compiling, check that we can run a simple program.
3742if test "$cross_compiling" != yes; then
3743 if { ac_try='./$ac_file'
d6e01aa5
KL
3744 { (case "(($ac_try" in
3745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3746 *) ac_try_echo=$ac_try;;
3747esac
3748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3749 (eval "$ac_try") 2>&5
503d2be0 3750 ac_status=$?
c0d27fcc 3751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3752 (exit $ac_status); }; }; then
3753 cross_compiling=no
ba4481b5 3754 else
503d2be0
AS
3755 if test "$cross_compiling" = maybe; then
3756 cross_compiling=yes
3757 else
c0d27fcc 3758 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3759If you meant to cross compile, use \`--host'.
3760See \`config.log' for more details." >&5
503d2be0 3761echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3762If you meant to cross compile, use \`--host'.
3763See \`config.log' for more details." >&2;}
503d2be0
AS
3764 { (exit 1); exit 1; }; }
3765 fi
ba4481b5 3766 fi
503d2be0 3767fi
d6e01aa5
KL
3768{ echo "$as_me:$LINENO: result: yes" >&5
3769echo "${ECHO_T}yes" >&6; }
503d2be0 3770
19650fd6 3771rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3772ac_clean_files=$ac_clean_files_save
d6e01aa5 3773# Check that the compiler produces executables we can run. If not, either
503d2be0 3774# the compiler is broken, or we cross compile.
d6e01aa5
KL
3775{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3776echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3777{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3778echo "${ECHO_T}$cross_compiling" >&6; }
3779
3780{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3781echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3782if { (ac_try="$ac_link"
3783case "(($ac_try" in
3784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3785 *) ac_try_echo=$ac_try;;
3786esac
3787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3788 (eval "$ac_link") 2>&5
503d2be0 3789 ac_status=$?
c0d27fcc 3790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3791 (exit $ac_status); }; then
3792 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3793# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3794# work properly (i.e., refer to `conftest.exe'), while it won't with
3795# `rm'.
6bae0ccf
DL
3796for ac_file in conftest.exe conftest conftest.*; do
3797 test -f "$ac_file" || continue
503d2be0 3798 case $ac_file in
d6e01aa5 3799 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3800 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3801 break;;
503d2be0
AS
3802 * ) break;;
3803 esac
3804done
ba4481b5 3805else
19650fd6
AS
3806 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3807See \`config.log' for more details." >&5
3808echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3809See \`config.log' for more details." >&2;}
503d2be0 3810 { (exit 1); exit 1; }; }
ba4481b5 3811fi
ba4481b5 3812
503d2be0 3813rm -f conftest$ac_cv_exeext
d6e01aa5
KL
3814{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3815echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3816
503d2be0
AS
3817rm -f conftest.$ac_ext
3818EXEEXT=$ac_cv_exeext
3819ac_exeext=$EXEEXT
d6e01aa5
KL
3820{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3821echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3822if test "${ac_cv_objext+set}" = set; then
3823 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3824else
503d2be0 3825 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3826/* confdefs.h. */
3827_ACEOF
3828cat confdefs.h >>conftest.$ac_ext
3829cat >>conftest.$ac_ext <<_ACEOF
3830/* end confdefs.h. */
ba4481b5 3831
503d2be0
AS
3832int
3833main ()
3834{
ba4481b5 3835
503d2be0
AS
3836 ;
3837 return 0;
3838}
3839_ACEOF
3840rm -f conftest.o conftest.obj
d6e01aa5
KL
3841if { (ac_try="$ac_compile"
3842case "(($ac_try" in
3843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3844 *) ac_try_echo=$ac_try;;
3845esac
3846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3847 (eval "$ac_compile") 2>&5
503d2be0 3848 ac_status=$?
c0d27fcc 3849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3850 (exit $ac_status); }; then
d6e01aa5
KL
3851 for ac_file in conftest.o conftest.obj conftest.*; do
3852 test -f "$ac_file" || continue;
503d2be0 3853 case $ac_file in
d6e01aa5 3854 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3855 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3856 break;;
3857 esac
3858done
c4bb2108 3859else
503d2be0 3860 echo "$as_me: failed program was:" >&5
19650fd6
AS
3861sed 's/^/| /' conftest.$ac_ext >&5
3862
3863{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3864See \`config.log' for more details." >&5
3865echo "$as_me: error: cannot compute suffix of object files: cannot compile
3866See \`config.log' for more details." >&2;}
503d2be0 3867 { (exit 1); exit 1; }; }
c4bb2108
DL
3868fi
3869
503d2be0
AS
3870rm -f conftest.$ac_cv_objext conftest.$ac_ext
3871fi
d6e01aa5
KL
3872{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3873echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3874OBJEXT=$ac_cv_objext
3875ac_objext=$OBJEXT
d6e01aa5
KL
3876{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3877echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3878if test "${ac_cv_c_compiler_gnu+set}" = set; then
3879 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3880else
503d2be0 3881 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3882/* confdefs.h. */
3883_ACEOF
3884cat confdefs.h >>conftest.$ac_ext
3885cat >>conftest.$ac_ext <<_ACEOF
3886/* end confdefs.h. */
503d2be0
AS
3887
3888int
3889main ()
3890{
3891#ifndef __GNUC__
3892 choke me
3893#endif
3894
3895 ;
3896 return 0;
3897}
3898_ACEOF
3899rm -f conftest.$ac_objext
d6e01aa5
KL
3900if { (ac_try="$ac_compile"
3901case "(($ac_try" in
3902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3903 *) ac_try_echo=$ac_try;;
3904esac
3905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3906 (eval "$ac_compile") 2>conftest.er1
503d2be0 3907 ac_status=$?
edfaf76d
LK
3908 grep -v '^ *+' conftest.er1 >conftest.err
3909 rm -f conftest.er1
3910 cat conftest.err >&5
c0d27fcc 3911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3912 (exit $ac_status); } && {
3913 test -z "$ac_c_werror_flag" ||
3914 test ! -s conftest.err
3915 } && test -s conftest.$ac_objext; then
503d2be0
AS
3916 ac_compiler_gnu=yes
3917else
3918 echo "$as_me: failed program was:" >&5
19650fd6
AS
3919sed 's/^/| /' conftest.$ac_ext >&5
3920
d6e01aa5 3921 ac_compiler_gnu=no
503d2be0 3922fi
d6e01aa5
KL
3923
3924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3925ac_cv_c_compiler_gnu=$ac_compiler_gnu
3926
3927fi
d6e01aa5
KL
3928{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3929echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3930GCC=`test $ac_compiler_gnu = yes && echo yes`
3931ac_test_CFLAGS=${CFLAGS+set}
3932ac_save_CFLAGS=$CFLAGS
d6e01aa5
KL
3933{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3934echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3935if test "${ac_cv_prog_cc_g+set}" = set; then
3936 echo $ECHO_N "(cached) $ECHO_C" >&6
3937else
d6e01aa5
KL
3938 ac_save_c_werror_flag=$ac_c_werror_flag
3939 ac_c_werror_flag=yes
3940 ac_cv_prog_cc_g=no
3941 CFLAGS="-g"
3942 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3943/* confdefs.h. */
3944_ACEOF
3945cat confdefs.h >>conftest.$ac_ext
3946cat >>conftest.$ac_ext <<_ACEOF
3947/* end confdefs.h. */
503d2be0
AS
3948
3949int
3950main ()
3951{
3952
3953 ;
3954 return 0;
3955}
3956_ACEOF
3957rm -f conftest.$ac_objext
d6e01aa5
KL
3958if { (ac_try="$ac_compile"
3959case "(($ac_try" in
3960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3961 *) ac_try_echo=$ac_try;;
3962esac
3963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3964 (eval "$ac_compile") 2>conftest.er1
503d2be0 3965 ac_status=$?
edfaf76d
LK
3966 grep -v '^ *+' conftest.er1 >conftest.err
3967 rm -f conftest.er1
3968 cat conftest.err >&5
c0d27fcc 3969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3970 (exit $ac_status); } && {
3971 test -z "$ac_c_werror_flag" ||
3972 test ! -s conftest.err
3973 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3974 ac_cv_prog_cc_g=yes
3975else
503d2be0 3976 echo "$as_me: failed program was:" >&5
19650fd6
AS
3977sed 's/^/| /' conftest.$ac_ext >&5
3978
d6e01aa5
KL
3979 CFLAGS=""
3980 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3981/* confdefs.h. */
3982_ACEOF
3983cat confdefs.h >>conftest.$ac_ext
3984cat >>conftest.$ac_ext <<_ACEOF
3985/* end confdefs.h. */
d6e01aa5
KL
3986
3987int
3988main ()
6bae0ccf 3989{
edfaf76d 3990
6bae0ccf
DL
3991 ;
3992 return 0;
3993}
3994_ACEOF
d6e01aa5
KL
3995rm -f conftest.$ac_objext
3996if { (ac_try="$ac_compile"
3997case "(($ac_try" in
3998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3999 *) ac_try_echo=$ac_try;;
4000esac
4001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4002 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 4003 ac_status=$?
edfaf76d
LK
4004 grep -v '^ *+' conftest.er1 >conftest.err
4005 rm -f conftest.er1
4006 cat conftest.err >&5
6bae0ccf 4007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4008 (exit $ac_status); } && {
4009 test -z "$ac_c_werror_flag" ||
4010 test ! -s conftest.err
4011 } && test -s conftest.$ac_objext; then
4012 :
6bae0ccf
DL
4013else
4014 echo "$as_me: failed program was:" >&5
19650fd6
AS
4015sed 's/^/| /' conftest.$ac_ext >&5
4016
d6e01aa5
KL
4017 ac_c_werror_flag=$ac_save_c_werror_flag
4018 CFLAGS="-g"
4019 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4020/* confdefs.h. */
4021_ACEOF
4022cat confdefs.h >>conftest.$ac_ext
4023cat >>conftest.$ac_ext <<_ACEOF
4024/* end confdefs.h. */
d6e01aa5 4025
503d2be0
AS
4026int
4027main ()
4028{
d6e01aa5 4029
503d2be0
AS
4030 ;
4031 return 0;
4032}
4033_ACEOF
4034rm -f conftest.$ac_objext
d6e01aa5
KL
4035if { (ac_try="$ac_compile"
4036case "(($ac_try" in
4037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4038 *) ac_try_echo=$ac_try;;
4039esac
4040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4041 (eval "$ac_compile") 2>conftest.er1
503d2be0 4042 ac_status=$?
edfaf76d
LK
4043 grep -v '^ *+' conftest.er1 >conftest.err
4044 rm -f conftest.er1
4045 cat conftest.err >&5
c0d27fcc 4046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4047 (exit $ac_status); } && {
4048 test -z "$ac_c_werror_flag" ||
4049 test ! -s conftest.err
4050 } && test -s conftest.$ac_objext; then
4051 ac_cv_prog_cc_g=yes
503d2be0
AS
4052else
4053 echo "$as_me: failed program was:" >&5
19650fd6
AS
4054sed 's/^/| /' conftest.$ac_ext >&5
4055
d6e01aa5 4056
503d2be0 4057fi
d6e01aa5
KL
4058
4059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4060fi
4061
4062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4063fi
4064
4065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4066 ac_c_werror_flag=$ac_save_c_werror_flag
4067fi
4068{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4069echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
4070if test "$ac_test_CFLAGS" = set; then
4071 CFLAGS=$ac_save_CFLAGS
4072elif test $ac_cv_prog_cc_g = yes; then
4073 if test "$GCC" = yes; then
4074 CFLAGS="-g -O2"
4075 else
4076 CFLAGS="-g"
4077 fi
4078else
4079 if test "$GCC" = yes; then
4080 CFLAGS="-O2"
4081 else
4082 CFLAGS=
4083 fi
4084fi
4085{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
4086echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
4087if test "${ac_cv_prog_cc_c89+set}" = set; then
4088 echo $ECHO_N "(cached) $ECHO_C" >&6
4089else
4090 ac_cv_prog_cc_c89=no
4091ac_save_CC=$CC
4092cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4093/* confdefs.h. */
4094_ACEOF
4095cat confdefs.h >>conftest.$ac_ext
4096cat >>conftest.$ac_ext <<_ACEOF
4097/* end confdefs.h. */
d6e01aa5
KL
4098#include <stdarg.h>
4099#include <stdio.h>
4100#include <sys/types.h>
4101#include <sys/stat.h>
4102/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4103struct buf { int x; };
4104FILE * (*rcsopen) (struct buf *, struct stat *, int);
4105static char *e (p, i)
4106 char **p;
4107 int i;
4108{
4109 return p[i];
4110}
4111static char *f (char * (*g) (char **, int), char **p, ...)
4112{
4113 char *s;
4114 va_list v;
4115 va_start (v,p);
4116 s = g (p, va_arg (v,int));
4117 va_end (v);
4118 return s;
4119}
4120
4121/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4122 function prototypes and stuff, but not '\xHH' hex character constants.
4123 These don't provoke an error unfortunately, instead are silently treated
4124 as 'x'. The following induces an error, until -std is added to get
4125 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4126 array size at least. It's necessary to write '\x00'==0 to get something
4127 that's true only with -std. */
4128int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4129
4130/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4131 inside strings and character constants. */
4132#define FOO(x) 'x'
4133int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4134
4135int test (int i, double x);
4136struct s1 {int (*f) (int a);};
4137struct s2 {int (*f) (double a);};
4138int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4139int argc;
4140char **argv;
503d2be0
AS
4141int
4142main ()
4143{
d6e01aa5 4144return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
503d2be0
AS
4145 ;
4146 return 0;
4147}
4148_ACEOF
d6e01aa5
KL
4149for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4150 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4151do
4152 CC="$ac_save_CC $ac_arg"
4153 rm -f conftest.$ac_objext
4154if { (ac_try="$ac_compile"
4155case "(($ac_try" in
4156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4157 *) ac_try_echo=$ac_try;;
4158esac
4159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4160 (eval "$ac_compile") 2>conftest.er1
503d2be0 4161 ac_status=$?
edfaf76d
LK
4162 grep -v '^ *+' conftest.er1 >conftest.err
4163 rm -f conftest.er1
4164 cat conftest.err >&5
c0d27fcc 4165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4166 (exit $ac_status); } && {
4167 test -z "$ac_c_werror_flag" ||
4168 test ! -s conftest.err
4169 } && test -s conftest.$ac_objext; then
4170 ac_cv_prog_cc_c89=$ac_arg
503d2be0
AS
4171else
4172 echo "$as_me: failed program was:" >&5
19650fd6
AS
4173sed 's/^/| /' conftest.$ac_ext >&5
4174
d6e01aa5 4175
503d2be0 4176fi
d6e01aa5
KL
4177
4178rm -f core conftest.err conftest.$ac_objext
4179 test "x$ac_cv_prog_cc_c89" != "xno" && break
503d2be0 4180done
d6e01aa5
KL
4181rm -f conftest.$ac_ext
4182CC=$ac_save_CC
4183
503d2be0 4184fi
d6e01aa5
KL
4185# AC_CACHE_VAL
4186case "x$ac_cv_prog_cc_c89" in
4187 x)
4188 { echo "$as_me:$LINENO: result: none needed" >&5
4189echo "${ECHO_T}none needed" >&6; } ;;
4190 xno)
4191 { echo "$as_me:$LINENO: result: unsupported" >&5
4192echo "${ECHO_T}unsupported" >&6; } ;;
4193 *)
4194 CC="$CC $ac_cv_prog_cc_c89"
4195 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
4196echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
4197esac
ba4481b5 4198
19650fd6 4199
503d2be0
AS
4200ac_ext=c
4201ac_cpp='$CPP $CPPFLAGS'
4202ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4203ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4204ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 4205
c0d27fcc 4206
ba4481b5
DL
4207# On Suns, sometimes $CPP names a directory.
4208if test -n "$CPP" && test -d "$CPP"; then
4209 CPP=
4210fi
4211
089a966d
GM
4212## If not using gcc, and on Solaris, and no CPP specified, see if
4213## using a Sun compiler, which needs -Xs to prevent whitespace.
4214if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
4215 test x"$CPP" = x; then
4216 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
4217echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
4218
4219if test "${emacs_cv_sunpro_c+set}" = set; then
4220 echo $ECHO_N "(cached) $ECHO_C" >&6
4221else
4222 cat >conftest.$ac_ext <<_ACEOF
4223/* confdefs.h. */
4224_ACEOF
4225cat confdefs.h >>conftest.$ac_ext
4226cat >>conftest.$ac_ext <<_ACEOF
4227/* end confdefs.h. */
4228
4229int
4230main ()
4231{
4232#ifndef __SUNPRO_C
4233fail;
4234#endif
4235
4236 ;
4237 return 0;
4238}
4239_ACEOF
4240rm -f conftest.$ac_objext conftest$ac_exeext
4241if { (ac_try="$ac_link"
4242case "(($ac_try" in
4243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4244 *) ac_try_echo=$ac_try;;
4245esac
4246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4247 (eval "$ac_link") 2>conftest.er1
4248 ac_status=$?
4249 grep -v '^ *+' conftest.er1 >conftest.err
4250 rm -f conftest.er1
4251 cat conftest.err >&5
4252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4253 (exit $ac_status); } && {
4254 test -z "$ac_c_werror_flag" ||
4255 test ! -s conftest.err
4256 } && test -s conftest$ac_exeext &&
4257 $as_test_x conftest$ac_exeext; then
4258 emacs_cv_sunpro_c=yes
4259else
4260 echo "$as_me: failed program was:" >&5
4261sed 's/^/| /' conftest.$ac_ext >&5
4262
4263 emacs_cv_sunpro_c=no
4264fi
4265
4266rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4267 conftest$ac_exeext conftest.$ac_ext
4268fi
4269
4270 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
4271echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
4272
4273 if test x"$emacs_cv_sunpro_c" = xyes; then
4274 NON_GNU_CPP="$CC -E -Xs"
4275 fi
4276fi
4277
ba4481b5
DL
4278#### Some systems specify a CPP to use unless we are using GCC.
4279#### Now that we know whether we are using GCC, we can decide whether
4280#### to use that one.
4281if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4282then
4283 CPP="$NON_GNU_CPP"
4284fi
4285
4286#### Some systems specify a CC to use unless we are using GCC.
4287#### Now that we know whether we are using GCC, we can decide whether
4288#### to use that one.
4289if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4290 test x$cc_specified != xyes
4291then
4292 CC="$NON_GNU_CC"
4293fi
4294
4295if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
4296then
4297 CC="$CC $GCC_TEST_OPTIONS"
4298fi
4299
4300if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
4301then
4302 CC="$CC $NON_GCC_TEST_OPTIONS"
4303fi
4304
e143ad11
AS
4305ac_ext=c
4306ac_cpp='$CPP $CPPFLAGS'
4307ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4308ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4309ac_compiler_gnu=$ac_cv_c_compiler_gnu
d6e01aa5
KL
4310{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4311echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
4312# On Suns, sometimes $CPP names a directory.
4313if test -n "$CPP" && test -d "$CPP"; then
4314 CPP=
4315fi
4316if test -z "$CPP"; then
4317 if test "${ac_cv_prog_CPP+set}" = set; then
4318 echo $ECHO_N "(cached) $ECHO_C" >&6
4319else
4320 # Double quotes because CPP needs to be expanded
4321 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4322 do
4323 ac_preproc_ok=false
4324for ac_c_preproc_warn_flag in '' yes
4325do
4326 # Use a header file that comes with gcc, so configuring glibc
4327 # with a fresh cross-compiler works.
4328 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4329 # <limits.h> exists even on freestanding compilers.
4330 # On the NeXT, cc -E runs the code through the compiler's parser,
4331 # not just through cpp. "Syntax error" is here to catch this case.
4332 cat >conftest.$ac_ext <<_ACEOF
4333/* confdefs.h. */
4334_ACEOF
4335cat confdefs.h >>conftest.$ac_ext
4336cat >>conftest.$ac_ext <<_ACEOF
4337/* end confdefs.h. */
4338#ifdef __STDC__
4339# include <limits.h>
4340#else
4341# include <assert.h>
4342#endif
4343 Syntax error
4344_ACEOF
d6e01aa5
KL
4345if { (ac_try="$ac_cpp conftest.$ac_ext"
4346case "(($ac_try" in
4347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4348 *) ac_try_echo=$ac_try;;
4349esac
4350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4351 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4352 ac_status=$?
4353 grep -v '^ *+' conftest.er1 >conftest.err
4354 rm -f conftest.er1
4355 cat conftest.err >&5
4356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4357 (exit $ac_status); } >/dev/null && {
4358 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4359 test ! -s conftest.err
4360 }; then
e143ad11
AS
4361 :
4362else
4363 echo "$as_me: failed program was:" >&5
4364sed 's/^/| /' conftest.$ac_ext >&5
4365
4366 # Broken: fails on valid input.
4367continue
4368fi
d6e01aa5 4369
e143ad11
AS
4370rm -f conftest.err conftest.$ac_ext
4371
d6e01aa5 4372 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4373 # can be detected and how.
4374 cat >conftest.$ac_ext <<_ACEOF
4375/* confdefs.h. */
4376_ACEOF
4377cat confdefs.h >>conftest.$ac_ext
4378cat >>conftest.$ac_ext <<_ACEOF
4379/* end confdefs.h. */
4380#include <ac_nonexistent.h>
4381_ACEOF
d6e01aa5
KL
4382if { (ac_try="$ac_cpp conftest.$ac_ext"
4383case "(($ac_try" in
4384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4385 *) ac_try_echo=$ac_try;;
4386esac
4387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4388 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4389 ac_status=$?
4390 grep -v '^ *+' conftest.er1 >conftest.err
4391 rm -f conftest.er1
4392 cat conftest.err >&5
4393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4394 (exit $ac_status); } >/dev/null && {
4395 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4396 test ! -s conftest.err
4397 }; then
e143ad11
AS
4398 # Broken: success on invalid input.
4399continue
4400else
4401 echo "$as_me: failed program was:" >&5
4402sed 's/^/| /' conftest.$ac_ext >&5
4403
4404 # Passes both tests.
4405ac_preproc_ok=:
4406break
4407fi
d6e01aa5 4408
e143ad11
AS
4409rm -f conftest.err conftest.$ac_ext
4410
4411done
4412# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4413rm -f conftest.err conftest.$ac_ext
4414if $ac_preproc_ok; then
4415 break
4416fi
4417
4418 done
4419 ac_cv_prog_CPP=$CPP
4420
4421fi
4422 CPP=$ac_cv_prog_CPP
4423else
4424 ac_cv_prog_CPP=$CPP
4425fi
d6e01aa5
KL
4426{ echo "$as_me:$LINENO: result: $CPP" >&5
4427echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
4428ac_preproc_ok=false
4429for ac_c_preproc_warn_flag in '' yes
4430do
4431 # Use a header file that comes with gcc, so configuring glibc
4432 # with a fresh cross-compiler works.
4433 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4434 # <limits.h> exists even on freestanding compilers.
4435 # On the NeXT, cc -E runs the code through the compiler's parser,
4436 # not just through cpp. "Syntax error" is here to catch this case.
4437 cat >conftest.$ac_ext <<_ACEOF
4438/* confdefs.h. */
4439_ACEOF
4440cat confdefs.h >>conftest.$ac_ext
4441cat >>conftest.$ac_ext <<_ACEOF
4442/* end confdefs.h. */
4443#ifdef __STDC__
4444# include <limits.h>
4445#else
4446# include <assert.h>
4447#endif
4448 Syntax error
4449_ACEOF
d6e01aa5
KL
4450if { (ac_try="$ac_cpp conftest.$ac_ext"
4451case "(($ac_try" in
4452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4453 *) ac_try_echo=$ac_try;;
4454esac
4455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4456 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4457 ac_status=$?
4458 grep -v '^ *+' conftest.er1 >conftest.err
4459 rm -f conftest.er1
4460 cat conftest.err >&5
4461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4462 (exit $ac_status); } >/dev/null && {
4463 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4464 test ! -s conftest.err
4465 }; then
e143ad11
AS
4466 :
4467else
4468 echo "$as_me: failed program was:" >&5
4469sed 's/^/| /' conftest.$ac_ext >&5
4470
4471 # Broken: fails on valid input.
4472continue
4473fi
d6e01aa5 4474
e143ad11
AS
4475rm -f conftest.err conftest.$ac_ext
4476
d6e01aa5 4477 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4478 # can be detected and how.
4479 cat >conftest.$ac_ext <<_ACEOF
4480/* confdefs.h. */
4481_ACEOF
4482cat confdefs.h >>conftest.$ac_ext
4483cat >>conftest.$ac_ext <<_ACEOF
4484/* end confdefs.h. */
4485#include <ac_nonexistent.h>
4486_ACEOF
d6e01aa5
KL
4487if { (ac_try="$ac_cpp conftest.$ac_ext"
4488case "(($ac_try" in
4489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4490 *) ac_try_echo=$ac_try;;
4491esac
4492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4493 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4494 ac_status=$?
4495 grep -v '^ *+' conftest.er1 >conftest.err
4496 rm -f conftest.er1
4497 cat conftest.err >&5
4498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4499 (exit $ac_status); } >/dev/null && {
4500 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4501 test ! -s conftest.err
4502 }; then
e143ad11
AS
4503 # Broken: success on invalid input.
4504continue
4505else
4506 echo "$as_me: failed program was:" >&5
4507sed 's/^/| /' conftest.$ac_ext >&5
4508
4509 # Passes both tests.
4510ac_preproc_ok=:
4511break
4512fi
d6e01aa5 4513
e143ad11
AS
4514rm -f conftest.err conftest.$ac_ext
4515
4516done
4517# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4518rm -f conftest.err conftest.$ac_ext
4519if $ac_preproc_ok; then
4520 :
4521else
4522 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4523See \`config.log' for more details." >&5
4524echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4525See \`config.log' for more details." >&2;}
4526 { (exit 1); exit 1; }; }
4527fi
4528
4529ac_ext=c
4530ac_cpp='$CPP $CPPFLAGS'
4531ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4532ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4533ac_compiler_gnu=$ac_cv_c_compiler_gnu
4534
4535
d6e01aa5
KL
4536{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4537echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4538if test "${ac_cv_path_GREP+set}" = set; then
4539 echo $ECHO_N "(cached) $ECHO_C" >&6
4540else
4541 # Extract the first word of "grep ggrep" to use in msg output
4542if test -z "$GREP"; then
4543set dummy grep ggrep; ac_prog_name=$2
4544if test "${ac_cv_path_GREP+set}" = set; then
4545 echo $ECHO_N "(cached) $ECHO_C" >&6
4546else
4547 ac_path_GREP_found=false
4548# Loop through the user's path and test for each of PROGNAME-LIST
4549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4550for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4551do
4552 IFS=$as_save_IFS
4553 test -z "$as_dir" && as_dir=.
4554 for ac_prog in grep ggrep; do
4555 for ac_exec_ext in '' $ac_executable_extensions; do
4556 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4557 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4558 # Check for GNU ac_path_GREP and select it if it is found.
4559 # Check for GNU $ac_path_GREP
4560case `"$ac_path_GREP" --version 2>&1` in
4561*GNU*)
4562 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4563*)
4564 ac_count=0
4565 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4566 while :
4567 do
4568 cat "conftest.in" "conftest.in" >"conftest.tmp"
4569 mv "conftest.tmp" "conftest.in"
4570 cp "conftest.in" "conftest.nl"
4571 echo 'GREP' >> "conftest.nl"
4572 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4573 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4574 ac_count=`expr $ac_count + 1`
4575 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4576 # Best one so far, save it but keep looking for a better one
4577 ac_cv_path_GREP="$ac_path_GREP"
4578 ac_path_GREP_max=$ac_count
4579 fi
4580 # 10*(2^10) chars as input seems more than enough
4581 test $ac_count -gt 10 && break
4582 done
4583 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4584esac
4585
4586
4587 $ac_path_GREP_found && break 3
4588 done
4589done
4590
4591done
4592IFS=$as_save_IFS
4593
4594
4595fi
4596
4597GREP="$ac_cv_path_GREP"
4598if test -z "$GREP"; then
4599 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4600echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4601 { (exit 1); exit 1; }; }
4602fi
4603
4604else
4605 ac_cv_path_GREP=$GREP
4606fi
4607
4608
4609fi
4610{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4611echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4612 GREP="$ac_cv_path_GREP"
4613
4614
4615{ echo "$as_me:$LINENO: checking for egrep" >&5
4616echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4617if test "${ac_cv_path_EGREP+set}" = set; then
4618 echo $ECHO_N "(cached) $ECHO_C" >&6
4619else
4620 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4621 then ac_cv_path_EGREP="$GREP -E"
4622 else
4623 # Extract the first word of "egrep" to use in msg output
4624if test -z "$EGREP"; then
4625set dummy egrep; ac_prog_name=$2
4626if test "${ac_cv_path_EGREP+set}" = set; then
e143ad11
AS
4627 echo $ECHO_N "(cached) $ECHO_C" >&6
4628else
d6e01aa5
KL
4629 ac_path_EGREP_found=false
4630# Loop through the user's path and test for each of PROGNAME-LIST
4631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4632for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4633do
4634 IFS=$as_save_IFS
4635 test -z "$as_dir" && as_dir=.
4636 for ac_prog in egrep; do
4637 for ac_exec_ext in '' $ac_executable_extensions; do
4638 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4639 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4640 # Check for GNU ac_path_EGREP and select it if it is found.
4641 # Check for GNU $ac_path_EGREP
4642case `"$ac_path_EGREP" --version 2>&1` in
4643*GNU*)
4644 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4645*)
4646 ac_count=0
4647 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4648 while :
4649 do
4650 cat "conftest.in" "conftest.in" >"conftest.tmp"
4651 mv "conftest.tmp" "conftest.in"
4652 cp "conftest.in" "conftest.nl"
4653 echo 'EGREP' >> "conftest.nl"
4654 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4655 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4656 ac_count=`expr $ac_count + 1`
4657 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4658 # Best one so far, save it but keep looking for a better one
4659 ac_cv_path_EGREP="$ac_path_EGREP"
4660 ac_path_EGREP_max=$ac_count
e143ad11 4661 fi
d6e01aa5
KL
4662 # 10*(2^10) chars as input seems more than enough
4663 test $ac_count -gt 10 && break
4664 done
4665 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4666esac
4667
4668
4669 $ac_path_EGREP_found && break 3
4670 done
4671done
4672
4673done
4674IFS=$as_save_IFS
4675
4676
4677fi
4678
4679EGREP="$ac_cv_path_EGREP"
4680if test -z "$EGREP"; then
4681 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4682echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4683 { (exit 1); exit 1; }; }
4684fi
4685
4686else
4687 ac_cv_path_EGREP=$EGREP
e143ad11 4688fi
d6e01aa5
KL
4689
4690
4691 fi
4692fi
4693{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4694echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4695 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4696
4697
4698
d6e01aa5
KL
4699{ echo "$as_me:$LINENO: checking for AIX" >&5
4700echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4701cat >conftest.$ac_ext <<_ACEOF
4702/* confdefs.h. */
4703_ACEOF
4704cat confdefs.h >>conftest.$ac_ext
4705cat >>conftest.$ac_ext <<_ACEOF
4706/* end confdefs.h. */
4707#ifdef _AIX
4708 yes
4709#endif
4710
4711_ACEOF
4712if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4713 $EGREP "yes" >/dev/null 2>&1; then
d6e01aa5
KL
4714 { echo "$as_me:$LINENO: result: yes" >&5
4715echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4716cat >>confdefs.h <<\_ACEOF
4717#define _ALL_SOURCE 1
4718_ACEOF
4719
4720else
d6e01aa5
KL
4721 { echo "$as_me:$LINENO: result: no" >&5
4722echo "${ECHO_T}no" >&6; }
e143ad11
AS
4723fi
4724rm -f conftest*
4725
4726
4727
4728cat >>confdefs.h <<\_ACEOF
4729#define _GNU_SOURCE 1
4730_ACEOF
4731
4732
4733
01abe918 4734### Use -Wno-pointer-sign if the compiler supports it
d6e01aa5
KL
4735{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4736echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4737SAVE_CFLAGS="$CFLAGS"
4738CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4739cat >conftest.$ac_ext <<_ACEOF
4740/* confdefs.h. */
4741_ACEOF
4742cat confdefs.h >>conftest.$ac_ext
4743cat >>conftest.$ac_ext <<_ACEOF
4744/* end confdefs.h. */
4745
4746int
4747main ()
4748{
4749
4750 ;
4751 return 0;
4752}
4753_ACEOF
4754rm -f conftest.$ac_objext
d6e01aa5
KL
4755if { (ac_try="$ac_compile"
4756case "(($ac_try" in
4757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4758 *) ac_try_echo=$ac_try;;
4759esac
4760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4761 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4762 ac_status=$?
4763 grep -v '^ *+' conftest.er1 >conftest.err
4764 rm -f conftest.er1
4765 cat conftest.err >&5
4766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4767 (exit $ac_status); } && {
4768 test -z "$ac_c_werror_flag" ||
4769 test ! -s conftest.err
4770 } && test -s conftest.$ac_objext; then
01abe918
CY
4771 has_option=yes
4772else
4773 echo "$as_me: failed program was:" >&5
4774sed 's/^/| /' conftest.$ac_ext >&5
4775
d6e01aa5 4776 has_option=no
01abe918 4777fi
d6e01aa5
KL
4778
4779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4780if test $has_option = yes; then
4781 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4782fi
d6e01aa5
KL
4783{ echo "$as_me:$LINENO: result: $has_option" >&5
4784echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4785CFLAGS="$SAVE_CFLAGS"
4786unset has_option
4787unset SAVE_CFLAGS
4788
6a3a24fa 4789#### Some other nice autoconf tests.
ba4481b5 4790
d6e01aa5
KL
4791{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4792echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4793LN_S=$as_ln_s
4794if test "$LN_S" = "ln -s"; then
d6e01aa5
KL
4795 { echo "$as_me:$LINENO: result: yes" >&5
4796echo "${ECHO_T}yes" >&6; }
ba4481b5 4797else
d6e01aa5
KL
4798 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4799echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4800fi
4801
503d2be0
AS
4802ac_ext=c
4803ac_cpp='$CPP $CPPFLAGS'
4804ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4805ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4806ac_compiler_gnu=$ac_cv_c_compiler_gnu
d6e01aa5
KL
4807{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4808echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4809# On Suns, sometimes $CPP names a directory.
4810if test -n "$CPP" && test -d "$CPP"; then
4811 CPP=
4812fi
4813if test -z "$CPP"; then
503d2be0
AS
4814 if test "${ac_cv_prog_CPP+set}" = set; then
4815 echo $ECHO_N "(cached) $ECHO_C" >&6
4816else
4817 # Double quotes because CPP needs to be expanded
4818 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4819 do
4820 ac_preproc_ok=false
4821for ac_c_preproc_warn_flag in '' yes
4822do
4823 # Use a header file that comes with gcc, so configuring glibc
4824 # with a fresh cross-compiler works.
19650fd6
AS
4825 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4826 # <limits.h> exists even on freestanding compilers.
ba4481b5 4827 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4828 # not just through cpp. "Syntax error" is here to catch this case.
4829 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4830/* confdefs.h. */
4831_ACEOF
4832cat confdefs.h >>conftest.$ac_ext
4833cat >>conftest.$ac_ext <<_ACEOF
4834/* end confdefs.h. */
4835#ifdef __STDC__
4836# include <limits.h>
4837#else
4838# include <assert.h>
4839#endif
edfaf76d 4840 Syntax error
503d2be0 4841_ACEOF
d6e01aa5
KL
4842if { (ac_try="$ac_cpp conftest.$ac_ext"
4843case "(($ac_try" in
4844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4845 *) ac_try_echo=$ac_try;;
4846esac
4847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4848 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4849 ac_status=$?
6bae0ccf 4850 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4851 rm -f conftest.er1
4852 cat conftest.err >&5
c0d27fcc 4853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4854 (exit $ac_status); } >/dev/null && {
4855 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4856 test ! -s conftest.err
4857 }; then
ba4481b5
DL
4858 :
4859else
503d2be0 4860 echo "$as_me: failed program was:" >&5
19650fd6
AS
4861sed 's/^/| /' conftest.$ac_ext >&5
4862
503d2be0
AS
4863 # Broken: fails on valid input.
4864continue
4865fi
d6e01aa5 4866
503d2be0
AS
4867rm -f conftest.err conftest.$ac_ext
4868
d6e01aa5 4869 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4870 # can be detected and how.
4871 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4872/* confdefs.h. */
4873_ACEOF
4874cat confdefs.h >>conftest.$ac_ext
4875cat >>conftest.$ac_ext <<_ACEOF
4876/* end confdefs.h. */
503d2be0
AS
4877#include <ac_nonexistent.h>
4878_ACEOF
d6e01aa5
KL
4879if { (ac_try="$ac_cpp conftest.$ac_ext"
4880case "(($ac_try" in
4881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4882 *) ac_try_echo=$ac_try;;
4883esac
4884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4885 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4886 ac_status=$?
6bae0ccf 4887 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4888 rm -f conftest.er1
4889 cat conftest.err >&5
c0d27fcc 4890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4891 (exit $ac_status); } >/dev/null && {
4892 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4893 test ! -s conftest.err
4894 }; then
503d2be0
AS
4895 # Broken: success on invalid input.
4896continue
c4bb2108 4897else
503d2be0 4898 echo "$as_me: failed program was:" >&5
19650fd6
AS
4899sed 's/^/| /' conftest.$ac_ext >&5
4900
503d2be0
AS
4901 # Passes both tests.
4902ac_preproc_ok=:
4903break
4904fi
d6e01aa5 4905
503d2be0
AS
4906rm -f conftest.err conftest.$ac_ext
4907
4908done
4909# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4910rm -f conftest.err conftest.$ac_ext
4911if $ac_preproc_ok; then
4912 break
4913fi
4914
4915 done
4916 ac_cv_prog_CPP=$CPP
4917
4918fi
4919 CPP=$ac_cv_prog_CPP
4920else
4921 ac_cv_prog_CPP=$CPP
4922fi
d6e01aa5
KL
4923{ echo "$as_me:$LINENO: result: $CPP" >&5
4924echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4925ac_preproc_ok=false
4926for ac_c_preproc_warn_flag in '' yes
4927do
4928 # Use a header file that comes with gcc, so configuring glibc
4929 # with a fresh cross-compiler works.
19650fd6
AS
4930 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4931 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4932 # On the NeXT, cc -E runs the code through the compiler's parser,
4933 # not just through cpp. "Syntax error" is here to catch this case.
4934 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4935/* confdefs.h. */
4936_ACEOF
4937cat confdefs.h >>conftest.$ac_ext
4938cat >>conftest.$ac_ext <<_ACEOF
4939/* end confdefs.h. */
4940#ifdef __STDC__
4941# include <limits.h>
4942#else
4943# include <assert.h>
4944#endif
edfaf76d 4945 Syntax error
503d2be0 4946_ACEOF
d6e01aa5
KL
4947if { (ac_try="$ac_cpp conftest.$ac_ext"
4948case "(($ac_try" in
4949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4950 *) ac_try_echo=$ac_try;;
4951esac
4952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4953 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4954 ac_status=$?
6bae0ccf 4955 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4956 rm -f conftest.er1
4957 cat conftest.err >&5
c0d27fcc 4958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4959 (exit $ac_status); } >/dev/null && {
4960 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4961 test ! -s conftest.err
4962 }; then
ba4481b5
DL
4963 :
4964else
503d2be0 4965 echo "$as_me: failed program was:" >&5
19650fd6
AS
4966sed 's/^/| /' conftest.$ac_ext >&5
4967
503d2be0
AS
4968 # Broken: fails on valid input.
4969continue
4970fi
d6e01aa5 4971
503d2be0
AS
4972rm -f conftest.err conftest.$ac_ext
4973
d6e01aa5 4974 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4975 # can be detected and how.
4976 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4977/* confdefs.h. */
4978_ACEOF
4979cat confdefs.h >>conftest.$ac_ext
4980cat >>conftest.$ac_ext <<_ACEOF
4981/* end confdefs.h. */
503d2be0
AS
4982#include <ac_nonexistent.h>
4983_ACEOF
d6e01aa5
KL
4984if { (ac_try="$ac_cpp conftest.$ac_ext"
4985case "(($ac_try" in
4986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4987 *) ac_try_echo=$ac_try;;
4988esac
4989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4990 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4991 ac_status=$?
6bae0ccf 4992 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4993 rm -f conftest.er1
4994 cat conftest.err >&5
c0d27fcc 4995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4996 (exit $ac_status); } >/dev/null && {
4997 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4998 test ! -s conftest.err
4999 }; then
503d2be0
AS
5000 # Broken: success on invalid input.
5001continue
5002else
5003 echo "$as_me: failed program was:" >&5
19650fd6
AS
5004sed 's/^/| /' conftest.$ac_ext >&5
5005
503d2be0
AS
5006 # Passes both tests.
5007ac_preproc_ok=:
5008break
ba4481b5 5009fi
d6e01aa5 5010
503d2be0
AS
5011rm -f conftest.err conftest.$ac_ext
5012
5013done
5014# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5015rm -f conftest.err conftest.$ac_ext
5016if $ac_preproc_ok; then
5017 :
ba4481b5 5018else
19650fd6
AS
5019 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
5020See \`config.log' for more details." >&5
5021echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
5022See \`config.log' for more details." >&2;}
503d2be0 5023 { (exit 1); exit 1; }; }
ba4481b5 5024fi
503d2be0
AS
5025
5026ac_ext=c
5027ac_cpp='$CPP $CPPFLAGS'
5028ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5029ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5030ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
5031
5032# Find a good install program. We prefer a C program (faster),
5033# so one script is as good as another. But avoid the broken or
5034# incompatible versions:
5035# SysV /etc/install, /usr/sbin/install
5036# SunOS /usr/etc/install
5037# IRIX /sbin/install
5038# AIX /bin/install
503d2be0 5039# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 5040# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
5041# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5042# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 5043# OS/2's system install, which has a completely different semantic
ba4481b5 5044# ./install, which can be erroneously created by make from ./install.sh.
d6e01aa5
KL
5045{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
5046echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 5047if test -z "$INSTALL"; then
503d2be0
AS
5048if test "${ac_cv_path_install+set}" = set; then
5049 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5050else
c0d27fcc
MR
5051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5052for as_dir in $PATH
5053do
5054 IFS=$as_save_IFS
5055 test -z "$as_dir" && as_dir=.
5056 # Account for people who put trailing slashes in PATH elements.
5057case $as_dir/ in
5058 ./ | .// | /cC/* | \
5059 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 5060 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
5061 /usr/ucb/* ) ;;
5062 *)
5063 # OSF1 and SCO ODT 3.0 have their own names for install.
5064 # Don't use installbsd from OSF since it installs stuff as root
5065 # by default.
5066 for ac_prog in ginstall scoinst install; do
5067 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5068 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
5069 if test $ac_prog = install &&
5070 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5071 # AIX install. It has an incompatible calling convention.
5072 :
5073 elif test $ac_prog = install &&
5074 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5075 # program-specific install script used by HP pwplus--don't use.
5076 :
5077 else
5078 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5079 break 3
5080 fi
5081 fi
ba4481b5 5082 done
c0d27fcc
MR
5083 done
5084 ;;
5085esac
5086done
d6e01aa5 5087IFS=$as_save_IFS
c0d27fcc 5088
ba4481b5
DL
5089
5090fi
5091 if test "${ac_cv_path_install+set}" = set; then
503d2be0 5092 INSTALL=$ac_cv_path_install
ba4481b5 5093 else
d6e01aa5
KL
5094 # As a last resort, use the slow shell script. Don't cache a
5095 # value for INSTALL within a source directory, because that will
ba4481b5 5096 # break other packages using the cache if that directory is
d6e01aa5 5097 # removed, or if the value is a relative name.
503d2be0 5098 INSTALL=$ac_install_sh
ba4481b5
DL
5099 fi
5100fi
d6e01aa5
KL
5101{ echo "$as_me:$LINENO: result: $INSTALL" >&5
5102echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
5103
5104# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5105# It thinks the first close brace ends the variable substitution.
5106test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5107
503d2be0 5108test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5109
ba4481b5
DL
5110test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5111
c0d27fcc
MR
5112if test "x$RANLIB" = x; then
5113 if test -n "$ac_tool_prefix"; then
5114 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5115set dummy ${ac_tool_prefix}ranlib; ac_word=$2
d6e01aa5
KL
5116{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5117echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5118if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 5119 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5120else
5121 if test -n "$RANLIB"; then
5122 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5123else
c0d27fcc
MR
5124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5125for as_dir in $PATH
5126do
5127 IFS=$as_save_IFS
5128 test -z "$as_dir" && as_dir=.
5129 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5130 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5131 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5132 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5133 break 2
5134 fi
5135done
503d2be0 5136done
d6e01aa5 5137IFS=$as_save_IFS
503d2be0 5138
7397acc4
DL
5139fi
5140fi
503d2be0 5141RANLIB=$ac_cv_prog_RANLIB
7397acc4 5142if test -n "$RANLIB"; then
d6e01aa5
KL
5143 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5144echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5145else
d6e01aa5
KL
5146 { echo "$as_me:$LINENO: result: no" >&5
5147echo "${ECHO_T}no" >&6; }
503d2be0
AS
5148fi
5149
d6e01aa5 5150
503d2be0
AS
5151fi
5152if test -z "$ac_cv_prog_RANLIB"; then
5153 ac_ct_RANLIB=$RANLIB
5154 # Extract the first word of "ranlib", so it can be a program name with args.
5155set dummy ranlib; ac_word=$2
d6e01aa5
KL
5156{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5157echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5158if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5159 echo $ECHO_N "(cached) $ECHO_C" >&6
5160else
5161 if test -n "$ac_ct_RANLIB"; then
5162 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5163else
c0d27fcc
MR
5164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5165for as_dir in $PATH
5166do
5167 IFS=$as_save_IFS
5168 test -z "$as_dir" && as_dir=.
5169 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5170 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5171 ac_cv_prog_ac_ct_RANLIB="ranlib"
5172 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5173 break 2
5174 fi
5175done
503d2be0 5176done
d6e01aa5 5177IFS=$as_save_IFS
503d2be0 5178
503d2be0
AS
5179fi
5180fi
5181ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5182if test -n "$ac_ct_RANLIB"; then
d6e01aa5
KL
5183 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5184echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5185else
d6e01aa5
KL
5186 { echo "$as_me:$LINENO: result: no" >&5
5187echo "${ECHO_T}no" >&6; }
503d2be0
AS
5188fi
5189
d6e01aa5
KL
5190 if test "x$ac_ct_RANLIB" = x; then
5191 RANLIB=":"
5192 else
5193 case $cross_compiling:$ac_tool_warned in
5194yes:)
5195{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5196whose name does not start with the host triplet. If you think this
5197configuration is useful to you, please write to autoconf@gnu.org." >&5
5198echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5199whose name does not start with the host triplet. If you think this
5200configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5201ac_tool_warned=yes ;;
5202esac
5203 RANLIB=$ac_ct_RANLIB
5204 fi
7397acc4 5205else
503d2be0 5206 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5207fi
5208
5209fi
9e71690e
DK
5210# Extract the first word of "install-info", so it can be a program name with args.
5211set dummy install-info; ac_word=$2
d6e01aa5
KL
5212{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5213echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5214if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5215 echo $ECHO_N "(cached) $ECHO_C" >&6
5216else
5217 case $INSTALL_INFO in
5218 [\\/]* | ?:[\\/]*)
5219 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5220 ;;
5221 *)
5222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5223for as_dir in $PATH
5224do
5225 IFS=$as_save_IFS
5226 test -z "$as_dir" && as_dir=.
5227 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5228 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5229 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5230 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5231 break 2
5232 fi
5233done
5234done
d6e01aa5 5235IFS=$as_save_IFS
9e71690e
DK
5236
5237 ;;
5238esac
5239fi
5240INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5241if test -n "$INSTALL_INFO"; then
d6e01aa5
KL
5242 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5243echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5244else
d6e01aa5
KL
5245 { echo "$as_me:$LINENO: result: no" >&5
5246echo "${ECHO_T}no" >&6; }
9e71690e
DK
5247fi
5248
d6e01aa5 5249
9e71690e
DK
5250# Extract the first word of "install-info", so it can be a program name with args.
5251set dummy install-info; ac_word=$2
d6e01aa5
KL
5252{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5253echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5254if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5255 echo $ECHO_N "(cached) $ECHO_C" >&6
5256else
5257 case $INSTALL_INFO in
5258 [\\/]* | ?:[\\/]*)
5259 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5260 ;;
5261 *)
5262 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5263for as_dir in /usr/sbin
5264do
5265 IFS=$as_save_IFS
5266 test -z "$as_dir" && as_dir=.
5267 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5268 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5269 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5270 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5271 break 2
5272 fi
5273done
5274done
d6e01aa5 5275IFS=$as_save_IFS
9e71690e
DK
5276
5277 ;;
5278esac
5279fi
5280INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5281if test -n "$INSTALL_INFO"; then
d6e01aa5
KL
5282 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5283echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5284else
d6e01aa5
KL
5285 { echo "$as_me:$LINENO: result: no" >&5
5286echo "${ECHO_T}no" >&6; }
9e71690e
DK
5287fi
5288
d6e01aa5 5289
9e71690e
DK
5290# Extract the first word of "install-info", so it can be a program name with args.
5291set dummy install-info; ac_word=$2
d6e01aa5
KL
5292{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5293echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5294if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5295 echo $ECHO_N "(cached) $ECHO_C" >&6
5296else
5297 case $INSTALL_INFO in
5298 [\\/]* | ?:[\\/]*)
5299 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5300 ;;
5301 *)
5302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5303for as_dir in /sbin
5304do
5305 IFS=$as_save_IFS
5306 test -z "$as_dir" && as_dir=.
5307 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5308 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5309 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5310 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5311 break 2
5312 fi
5313done
5314done
d6e01aa5 5315IFS=$as_save_IFS
9e71690e
DK
5316
5317 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5318 ;;
5319esac
5320fi
5321INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5322if test -n "$INSTALL_INFO"; then
d6e01aa5
KL
5323 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5324echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5325else
d6e01aa5
KL
5326 { echo "$as_me:$LINENO: result: no" >&5
5327echo "${ECHO_T}no" >&6; }
9e71690e
DK
5328fi
5329
d6e01aa5 5330
8ae52ca6
RF
5331# Extract the first word of "gzip", so it can be a program name with args.
5332set dummy gzip; ac_word=$2
d6e01aa5
KL
5333{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5334echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5335if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5336 echo $ECHO_N "(cached) $ECHO_C" >&6
5337else
46e35e9f 5338 case $GZIP_PROG in
8ae52ca6 5339 [\\/]* | ?:[\\/]*)
46e35e9f 5340 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5341 ;;
5342 *)
5343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5344for as_dir in $PATH
5345do
5346 IFS=$as_save_IFS
5347 test -z "$as_dir" && as_dir=.
5348 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5349 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5350 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5352 break 2
5353 fi
5354done
5355done
d6e01aa5 5356IFS=$as_save_IFS
8ae52ca6
RF
5357
5358 ;;
5359esac
5360fi
46e35e9f 5361GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5362if test -n "$GZIP_PROG"; then
d6e01aa5
KL
5363 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5364echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5365else
d6e01aa5
KL
5366 { echo "$as_me:$LINENO: result: no" >&5
5367echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5368fi
5369
ba4481b5 5370
c0d27fcc 5371
d6e01aa5 5372
c982cf7d
JD
5373## Need makeinfo >= 4.6 (?) to build the manuals.
5374# Extract the first word of "makeinfo", so it can be a program name with args.
5375set dummy makeinfo; ac_word=$2
5376{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5377echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5378if test "${ac_cv_path_MAKEINFO+set}" = set; then
5379 echo $ECHO_N "(cached) $ECHO_C" >&6
5380else
5381 case $MAKEINFO in
5382 [\\/]* | ?:[\\/]*)
5383 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5384 ;;
5385 *)
5386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5387for as_dir in $PATH
5388do
5389 IFS=$as_save_IFS
5390 test -z "$as_dir" && as_dir=.
5391 for ac_exec_ext in '' $ac_executable_extensions; do
5392 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5393 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5394 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5395 break 2
5396 fi
5397done
5398done
5399IFS=$as_save_IFS
5400
5401 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5402 ;;
5403esac
5404fi
5405MAKEINFO=$ac_cv_path_MAKEINFO
5406if test -n "$MAKEINFO"; then
5407 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5408echo "${ECHO_T}$MAKEINFO" >&6; }
5409else
5410 { echo "$as_me:$LINENO: result: no" >&5
5411echo "${ECHO_T}no" >&6; }
5412fi
5413
5414
5415if test "$MAKEINFO" != "no" && \
d4840f44 5416 test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[6-9]|4\.[1-5][0-9]+)'`" = x; then
c982cf7d
JD
5417 MAKEINFO=no
5418fi
5419
5420if test "$MAKEINFO" = "no"; then
5421 { { echo "$as_me:$LINENO: error: makeinfo >= 4.6 is required " >&5
5422echo "$as_me: error: makeinfo >= 4.6 is required " >&2;}
5423 { (exit 1); exit 1; }; }
5424fi
5425
5426
5427
8e967cf7
MR
5428if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5429then
5430 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5431fi
5432
5433if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5434then
5435 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5436fi
5437
c0d27fcc 5438
fe239f0f 5439late_LDFLAGS=$LDFLAGS
4af002d6 5440if test "$GCC" = yes; then
fe239f0f
AS
5441 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5442else
5443 LDFLAGS="$LDFLAGS -znocombreloc"
5444fi
5445
d6e01aa5
KL
5446{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5447echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5448cat >conftest.$ac_ext <<_ACEOF
5449main(){return 0;}
5450_ACEOF
5451rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
5452if { (ac_try="$ac_link"
5453case "(($ac_try" in
5454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5455 *) ac_try_echo=$ac_try;;
5456esac
5457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5458 (eval "$ac_link") 2>conftest.er1
fe239f0f 5459 ac_status=$?
edfaf76d
LK
5460 grep -v '^ *+' conftest.er1 >conftest.err
5461 rm -f conftest.er1
5462 cat conftest.err >&5
fe239f0f 5463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5464 (exit $ac_status); } && {
5465 test -z "$ac_c_werror_flag" ||
5466 test ! -s conftest.err
5467 } && test -s conftest$ac_exeext &&
5468 $as_test_x conftest$ac_exeext; then
5469 { echo "$as_me:$LINENO: result: yes" >&5
5470echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5471else
5472 echo "$as_me: failed program was:" >&5
5473sed 's/^/| /' conftest.$ac_ext >&5
5474
d6e01aa5
KL
5475 LDFLAGS=$late_LDFLAGS
5476 { echo "$as_me:$LINENO: result: no" >&5
5477echo "${ECHO_T}no" >&6; }
fe239f0f 5478fi
d6e01aa5
KL
5479
5480rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5481 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5482
3b33a005
DL
5483#### Extract some information from the operating system and machine files.
5484
c0d27fcc 5485{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5486 - which libraries the lib-src programs will want, and
503d2be0
AS
5487 - whether the GNU malloc routines are usable..." >&5
5488echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5489 - which libraries the lib-src programs will want, and
503d2be0 5490 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5491
5492### First figure out CFLAGS (which we use for running the compiler here)
5493### and REAL_CFLAGS (which we use for real compilation).
5494### The two are the same except on a few systems, where they are made
5495### different to work around various lossages. For example,
5496### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5497### as implying static linking.
5498
5499### If the CFLAGS env var is specified, we use that value
5500### instead of the default.
5501
5502### It's not important that this name contain the PID; you can't run
5503### two configures in the same directory and have anything work
5504### anyway.
5505tempcname="conftest.c"
5506
5507echo '
5508#include "'${srcdir}'/src/'${opsysfile}'"
5509#include "'${srcdir}'/src/'${machfile}'"
5510#ifndef LIBS_MACHINE
5511#define LIBS_MACHINE
5512#endif
5513#ifndef LIBS_SYSTEM
5514#define LIBS_SYSTEM
5515#endif
5516#ifndef C_SWITCH_SYSTEM
5517#define C_SWITCH_SYSTEM
5518#endif
5519#ifndef C_SWITCH_MACHINE
5520#define C_SWITCH_MACHINE
5521#endif
5522configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5523configure___ c_switch_system=C_SWITCH_SYSTEM
5524configure___ c_switch_machine=C_SWITCH_MACHINE
5525
5526#ifndef LIB_X11_LIB
5527#define LIB_X11_LIB -lX11
5528#endif
5529
5530#ifndef LIBX11_MACHINE
5531#define LIBX11_MACHINE
5532#endif
5533
5534#ifndef LIBX11_SYSTEM
5535#define LIBX11_SYSTEM
5536#endif
5537configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
5538
5539#ifdef UNEXEC
5540configure___ unexec=UNEXEC
5541#else
5542configure___ unexec=unexec.o
5543#endif
5544
5545#ifdef SYSTEM_MALLOC
5546configure___ system_malloc=yes
5547#else
5548configure___ system_malloc=no
5549#endif
5550
ef9e4345
GM
5551#ifdef USE_MMAP_FOR_BUFFERS
5552configure___ use_mmap_for_buffers=yes
73b77ee5 5553#else
ef9e4345 5554configure___ use_mmap_for_buffers=no
73b77ee5
GM
5555#endif
5556
3b33a005
DL
5557#ifndef C_DEBUG_SWITCH
5558#define C_DEBUG_SWITCH -g
5559#endif
5560
5561#ifndef C_OPTIMIZE_SWITCH
5562#ifdef __GNUC__
5563#define C_OPTIMIZE_SWITCH -O2
5564#else
5565#define C_OPTIMIZE_SWITCH -O
5566#endif
5567#endif
5568
01abe918
CY
5569#ifndef C_WARNINGS_SWITCH
5570#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5571#endif
5572
3b33a005
DL
5573#ifndef LD_SWITCH_MACHINE
5574#define LD_SWITCH_MACHINE
5575#endif
5576
5577#ifndef LD_SWITCH_SYSTEM
5578#define LD_SWITCH_SYSTEM
5579#endif
5580
5581#ifndef LD_SWITCH_X_SITE_AUX
5582#define LD_SWITCH_X_SITE_AUX
503d2be0 5583#endif
3b33a005
DL
5584
5585configure___ ld_switch_system=LD_SWITCH_SYSTEM
5586configure___ ld_switch_machine=LD_SWITCH_MACHINE
5587
5588#ifdef THIS_IS_CONFIGURE
5589
5590/* Get the CFLAGS for tests in configure. */
5591#ifdef __GNUC__
5592configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5593#else
5594configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5595#endif
5596
5597#else /* not THIS_IS_CONFIGURE */
5598
5599/* Get the CFLAGS for real compilation. */
5600#ifdef __GNUC__
01abe918 5601configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5602#else
5603configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5604#endif
5605
5606#endif /* not THIS_IS_CONFIGURE */
5607' > ${tempcname}
5608
5609# The value of CPP is a quoted variable reference, so we need to do this
5610# to get its actual value...
5611CPP=`eval "echo $CPP"`
5612eval `${CPP} -Isrc ${tempcname} \
5613 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5614if test "x$SPECIFIED_CFLAGS" = x; then
5615 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5616 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5617else
5618 REAL_CFLAGS="$CFLAGS"
5619fi
5620rm ${tempcname}
5621
5622ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5623
5624### Make sure subsequent tests use flags consistent with the build flags.
5625
5626if test x"${OVERRIDE_CPPFLAGS}" != x; then
5627 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5628else
5629 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5630fi
5631
6bae0ccf
DL
5632
5633
d6e01aa5 5634# Check whether --enable-largefile was given.
f4988be7 5635if test "${enable_largefile+set}" = set; then
d6e01aa5
KL
5636 enableval=$enable_largefile;
5637fi
f4988be7 5638
503d2be0 5639if test "$enable_largefile" != no; then
f4988be7 5640
d6e01aa5
KL
5641 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5642echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5643if test "${ac_cv_sys_largefile_CC+set}" = set; then
5644 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5645else
f4988be7 5646 ac_cv_sys_largefile_CC=no
503d2be0
AS
5647 if test "$GCC" != yes; then
5648 ac_save_CC=$CC
5649 while :; do
d6e01aa5
KL
5650 # IRIX 6.2 and later do not support large files by default,
5651 # so use the C compiler's -n32 option if that helps.
edfaf76d 5652 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5653/* confdefs.h. */
5654_ACEOF
5655cat confdefs.h >>conftest.$ac_ext
5656cat >>conftest.$ac_ext <<_ACEOF
5657/* end confdefs.h. */
f4988be7 5658#include <sys/types.h>
503d2be0
AS
5659 /* Check that off_t can represent 2**63 - 1 correctly.
5660 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5661 since some C++ compilers masquerading as C compilers
5662 incorrectly reject 9223372036854775807. */
5663#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5664 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5665 && LARGE_OFF_T % 2147483647 == 1)
5666 ? 1 : -1];
5667int
5668main ()
5669{
f4988be7 5670
503d2be0
AS
5671 ;
5672 return 0;
5673}
5674_ACEOF
d6e01aa5
KL
5675 rm -f conftest.$ac_objext
5676if { (ac_try="$ac_compile"
5677case "(($ac_try" in
5678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5679 *) ac_try_echo=$ac_try;;
5680esac
5681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5682 (eval "$ac_compile") 2>conftest.er1
503d2be0 5683 ac_status=$?
edfaf76d
LK
5684 grep -v '^ *+' conftest.er1 >conftest.err
5685 rm -f conftest.er1
5686 cat conftest.err >&5
c0d27fcc 5687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5688 (exit $ac_status); } && {
5689 test -z "$ac_c_werror_flag" ||
5690 test ! -s conftest.err
5691 } && test -s conftest.$ac_objext; then
503d2be0 5692 break
b192d653 5693else
503d2be0 5694 echo "$as_me: failed program was:" >&5
19650fd6
AS
5695sed 's/^/| /' conftest.$ac_ext >&5
5696
d6e01aa5 5697
503d2be0 5698fi
d6e01aa5
KL
5699
5700rm -f core conftest.err conftest.$ac_objext
5701 CC="$CC -n32"
5702 rm -f conftest.$ac_objext
5703if { (ac_try="$ac_compile"
5704case "(($ac_try" in
5705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5706 *) ac_try_echo=$ac_try;;
5707esac
5708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5709 (eval "$ac_compile") 2>conftest.er1
503d2be0 5710 ac_status=$?
edfaf76d
LK
5711 grep -v '^ *+' conftest.er1 >conftest.err
5712 rm -f conftest.er1
5713 cat conftest.err >&5
c0d27fcc 5714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5715 (exit $ac_status); } && {
5716 test -z "$ac_c_werror_flag" ||
5717 test ! -s conftest.err
5718 } && test -s conftest.$ac_objext; then
503d2be0
AS
5719 ac_cv_sys_largefile_CC=' -n32'; break
5720else
5721 echo "$as_me: failed program was:" >&5
19650fd6
AS
5722sed 's/^/| /' conftest.$ac_ext >&5
5723
d6e01aa5 5724
503d2be0 5725fi
d6e01aa5
KL
5726
5727rm -f core conftest.err conftest.$ac_objext
edfaf76d 5728 break
503d2be0
AS
5729 done
5730 CC=$ac_save_CC
5731 rm -f conftest.$ac_ext
5732 fi
b192d653 5733fi
d6e01aa5
KL
5734{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5735echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5736 if test "$ac_cv_sys_largefile_CC" != no; then
5737 CC=$CC$ac_cv_sys_largefile_CC
5738 fi
b192d653 5739
d6e01aa5
KL
5740 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5741echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5742if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5743 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5744else
503d2be0 5745 while :; do
503d2be0 5746 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5747/* confdefs.h. */
5748_ACEOF
5749cat confdefs.h >>conftest.$ac_ext
5750cat >>conftest.$ac_ext <<_ACEOF
5751/* end confdefs.h. */
f4988be7 5752#include <sys/types.h>
503d2be0
AS
5753 /* Check that off_t can represent 2**63 - 1 correctly.
5754 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5755 since some C++ compilers masquerading as C compilers
5756 incorrectly reject 9223372036854775807. */
5757#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5758 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5759 && LARGE_OFF_T % 2147483647 == 1)
5760 ? 1 : -1];
5761int
5762main ()
5763{
f4988be7 5764
503d2be0
AS
5765 ;
5766 return 0;
5767}
5768_ACEOF
5769rm -f conftest.$ac_objext
d6e01aa5
KL
5770if { (ac_try="$ac_compile"
5771case "(($ac_try" in
5772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5773 *) ac_try_echo=$ac_try;;
5774esac
5775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5776 (eval "$ac_compile") 2>conftest.er1
503d2be0 5777 ac_status=$?
edfaf76d
LK
5778 grep -v '^ *+' conftest.er1 >conftest.err
5779 rm -f conftest.er1
5780 cat conftest.err >&5
c0d27fcc 5781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5782 (exit $ac_status); } && {
5783 test -z "$ac_c_werror_flag" ||
5784 test ! -s conftest.err
5785 } && test -s conftest.$ac_objext; then
5786 ac_cv_sys_file_offset_bits=no; break
f4988be7 5787else
503d2be0 5788 echo "$as_me: failed program was:" >&5
19650fd6
AS
5789sed 's/^/| /' conftest.$ac_ext >&5
5790
d6e01aa5 5791
503d2be0 5792fi
d6e01aa5
KL
5793
5794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5795 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5796/* confdefs.h. */
5797_ACEOF
5798cat confdefs.h >>conftest.$ac_ext
5799cat >>conftest.$ac_ext <<_ACEOF
5800/* end confdefs.h. */
f4988be7
GM
5801#define _FILE_OFFSET_BITS 64
5802#include <sys/types.h>
503d2be0
AS
5803 /* Check that off_t can represent 2**63 - 1 correctly.
5804 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5805 since some C++ compilers masquerading as C compilers
5806 incorrectly reject 9223372036854775807. */
5807#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5808 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5809 && LARGE_OFF_T % 2147483647 == 1)
5810 ? 1 : -1];
5811int
5812main ()
5813{
5814
5815 ;
5816 return 0;
5817}
5818_ACEOF
5819rm -f conftest.$ac_objext
d6e01aa5
KL
5820if { (ac_try="$ac_compile"
5821case "(($ac_try" in
5822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5823 *) ac_try_echo=$ac_try;;
5824esac
5825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5826 (eval "$ac_compile") 2>conftest.er1
503d2be0 5827 ac_status=$?
edfaf76d
LK
5828 grep -v '^ *+' conftest.er1 >conftest.err
5829 rm -f conftest.er1
5830 cat conftest.err >&5
c0d27fcc 5831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5832 (exit $ac_status); } && {
5833 test -z "$ac_c_werror_flag" ||
5834 test ! -s conftest.err
5835 } && test -s conftest.$ac_objext; then
503d2be0
AS
5836 ac_cv_sys_file_offset_bits=64; break
5837else
5838 echo "$as_me: failed program was:" >&5
19650fd6
AS
5839sed 's/^/| /' conftest.$ac_ext >&5
5840
d6e01aa5 5841
503d2be0 5842fi
d6e01aa5
KL
5843
5844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5845 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5846 break
5847done
ba4481b5 5848fi
d6e01aa5
KL
5849{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5850echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
5851case $ac_cv_sys_file_offset_bits in #(
5852 no | unknown) ;;
5853 *)
c0d27fcc 5854cat >>confdefs.h <<_ACEOF
f4988be7 5855#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5856_ACEOF
d6e01aa5
KL
5857;;
5858esac
503d2be0 5859rm -f conftest*
d6e01aa5
KL
5860 if test $ac_cv_sys_file_offset_bits = unknown; then
5861 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
5862echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5863if test "${ac_cv_sys_large_files+set}" = set; then
5864 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5865else
503d2be0 5866 while :; do
503d2be0 5867 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5868/* confdefs.h. */
5869_ACEOF
5870cat confdefs.h >>conftest.$ac_ext
5871cat >>conftest.$ac_ext <<_ACEOF
5872/* end confdefs.h. */
503d2be0
AS
5873#include <sys/types.h>
5874 /* Check that off_t can represent 2**63 - 1 correctly.
5875 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5876 since some C++ compilers masquerading as C compilers
5877 incorrectly reject 9223372036854775807. */
5878#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5879 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5880 && LARGE_OFF_T % 2147483647 == 1)
5881 ? 1 : -1];
5882int
5883main ()
5884{
ba4481b5 5885
503d2be0
AS
5886 ;
5887 return 0;
5888}
5889_ACEOF
5890rm -f conftest.$ac_objext
d6e01aa5
KL
5891if { (ac_try="$ac_compile"
5892case "(($ac_try" in
5893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5894 *) ac_try_echo=$ac_try;;
5895esac
5896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5897 (eval "$ac_compile") 2>conftest.er1
503d2be0 5898 ac_status=$?
edfaf76d
LK
5899 grep -v '^ *+' conftest.er1 >conftest.err
5900 rm -f conftest.er1
5901 cat conftest.err >&5
c0d27fcc 5902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5903 (exit $ac_status); } && {
5904 test -z "$ac_c_werror_flag" ||
5905 test ! -s conftest.err
5906 } && test -s conftest.$ac_objext; then
5907 ac_cv_sys_large_files=no; break
ba4481b5 5908else
503d2be0 5909 echo "$as_me: failed program was:" >&5
19650fd6
AS
5910sed 's/^/| /' conftest.$ac_ext >&5
5911
d6e01aa5 5912
503d2be0 5913fi
d6e01aa5
KL
5914
5915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5916 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5917/* confdefs.h. */
5918_ACEOF
5919cat confdefs.h >>conftest.$ac_ext
5920cat >>conftest.$ac_ext <<_ACEOF
5921/* end confdefs.h. */
f4988be7 5922#define _LARGE_FILES 1
503d2be0
AS
5923#include <sys/types.h>
5924 /* Check that off_t can represent 2**63 - 1 correctly.
5925 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5926 since some C++ compilers masquerading as C compilers
5927 incorrectly reject 9223372036854775807. */
5928#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5929 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5930 && LARGE_OFF_T % 2147483647 == 1)
5931 ? 1 : -1];
5932int
5933main ()
5934{
f4988be7 5935
503d2be0
AS
5936 ;
5937 return 0;
5938}
5939_ACEOF
5940rm -f conftest.$ac_objext
d6e01aa5
KL
5941if { (ac_try="$ac_compile"
5942case "(($ac_try" in
5943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5944 *) ac_try_echo=$ac_try;;
5945esac
5946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5947 (eval "$ac_compile") 2>conftest.er1
503d2be0 5948 ac_status=$?
edfaf76d
LK
5949 grep -v '^ *+' conftest.er1 >conftest.err
5950 rm -f conftest.er1
5951 cat conftest.err >&5
c0d27fcc 5952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5953 (exit $ac_status); } && {
5954 test -z "$ac_c_werror_flag" ||
5955 test ! -s conftest.err
5956 } && test -s conftest.$ac_objext; then
503d2be0
AS
5957 ac_cv_sys_large_files=1; break
5958else
5959 echo "$as_me: failed program was:" >&5
19650fd6
AS
5960sed 's/^/| /' conftest.$ac_ext >&5
5961
d6e01aa5 5962
503d2be0 5963fi
d6e01aa5
KL
5964
5965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5966 ac_cv_sys_large_files=unknown
503d2be0
AS
5967 break
5968done
ba4481b5 5969fi
d6e01aa5
KL
5970{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5971echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
5972case $ac_cv_sys_large_files in #(
5973 no | unknown) ;;
5974 *)
c0d27fcc 5975cat >>confdefs.h <<_ACEOF
f4988be7 5976#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5977_ACEOF
d6e01aa5
KL
5978;;
5979esac
503d2be0 5980rm -f conftest*
d6e01aa5 5981 fi
503d2be0 5982fi
ba4481b5 5983
c0d27fcc 5984
439f58ee 5985
bc5d9888
CY
5986### The standard library on x86-64 GNU/Linux distributions can
5987### be located in either /usr/lib64 or /usr/lib.
5988case "${canonical}" in
5989 x86_64-*-linux-gnu* )
5990 if test -d /usr/lib64; then
5991
5992cat >>confdefs.h <<\_ACEOF
5993#define HAVE_X86_64_LIB64_DIR 1
5994_ACEOF
5995
5996fi
5997esac
5998
439f58ee
JD
5999
6000
6001
2c9dccc9
PJ
6002if test "${with_sound}" != "no"; then
6003 # Sound support for GNU/Linux and the free BSDs.
d6e01aa5
KL
6004 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6005echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
c0d27fcc
MR
6006if test "${ac_cv_header_stdc+set}" = set; then
6007 echo $ECHO_N "(cached) $ECHO_C" >&6
6008else
6009 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6010/* confdefs.h. */
6011_ACEOF
6012cat confdefs.h >>conftest.$ac_ext
6013cat >>conftest.$ac_ext <<_ACEOF
6014/* end confdefs.h. */
c0d27fcc
MR
6015#include <stdlib.h>
6016#include <stdarg.h>
6017#include <string.h>
6018#include <float.h>
98418dba 6019
19650fd6
AS
6020int
6021main ()
6022{
6023
6024 ;
6025 return 0;
6026}
c0d27fcc 6027_ACEOF
19650fd6 6028rm -f conftest.$ac_objext
d6e01aa5
KL
6029if { (ac_try="$ac_compile"
6030case "(($ac_try" in
6031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6032 *) ac_try_echo=$ac_try;;
6033esac
6034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6035 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6036 ac_status=$?
edfaf76d
LK
6037 grep -v '^ *+' conftest.er1 >conftest.err
6038 rm -f conftest.er1
6039 cat conftest.err >&5
cd958eb3 6040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6041 (exit $ac_status); } && {
6042 test -z "$ac_c_werror_flag" ||
6043 test ! -s conftest.err
6044 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6045 ac_cv_header_stdc=yes
6046else
6047 echo "$as_me: failed program was:" >&5
19650fd6
AS
6048sed 's/^/| /' conftest.$ac_ext >&5
6049
d6e01aa5 6050 ac_cv_header_stdc=no
c0d27fcc 6051fi
d6e01aa5
KL
6052
6053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
6054
6055if test $ac_cv_header_stdc = yes; then
6056 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6057 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6058/* confdefs.h. */
6059_ACEOF
6060cat confdefs.h >>conftest.$ac_ext
6061cat >>conftest.$ac_ext <<_ACEOF
6062/* end confdefs.h. */
c0d27fcc
MR
6063#include <string.h>
6064
6065_ACEOF
6066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6067 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
6068 :
6069else
6070 ac_cv_header_stdc=no
6071fi
6072rm -f conftest*
6073
6074fi
6075
6076if test $ac_cv_header_stdc = yes; then
6077 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6078 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6079/* confdefs.h. */
6080_ACEOF
6081cat confdefs.h >>conftest.$ac_ext
6082cat >>conftest.$ac_ext <<_ACEOF
6083/* end confdefs.h. */
c0d27fcc
MR
6084#include <stdlib.h>
6085
6086_ACEOF
6087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6088 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
6089 :
6090else
6091 ac_cv_header_stdc=no
6092fi
6093rm -f conftest*
6094
6095fi
6096
6097if test $ac_cv_header_stdc = yes; then
6098 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6099 if test "$cross_compiling" = yes; then
6100 :
6101else
6102 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6103/* confdefs.h. */
6104_ACEOF
6105cat confdefs.h >>conftest.$ac_ext
6106cat >>conftest.$ac_ext <<_ACEOF
6107/* end confdefs.h. */
c0d27fcc 6108#include <ctype.h>
d6e01aa5 6109#include <stdlib.h>
c0d27fcc
MR
6110#if ((' ' & 0x0FF) == 0x020)
6111# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6112# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6113#else
19650fd6 6114# define ISLOWER(c) \
edfaf76d
LK
6115 (('a' <= (c) && (c) <= 'i') \
6116 || ('j' <= (c) && (c) <= 'r') \
6117 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
6118# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6119#endif
6120
6121#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6122int
6123main ()
6124{
6125 int i;
6126 for (i = 0; i < 256; i++)
6127 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6128 || toupper (i) != TOUPPER (i))
d6e01aa5
KL
6129 return 2;
6130 return 0;
c0d27fcc
MR
6131}
6132_ACEOF
6133rm -f conftest$ac_exeext
d6e01aa5
KL
6134if { (ac_try="$ac_link"
6135case "(($ac_try" in
6136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6137 *) ac_try_echo=$ac_try;;
6138esac
6139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6140 (eval "$ac_link") 2>&5
c0d27fcc
MR
6141 ac_status=$?
6142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6143 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
6144 { (case "(($ac_try" in
6145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6146 *) ac_try_echo=$ac_try;;
6147esac
6148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6149 (eval "$ac_try") 2>&5
c0d27fcc
MR
6150 ac_status=$?
6151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6152 (exit $ac_status); }; }; then
6153 :
6154else
6155 echo "$as_me: program exited with status $ac_status" >&5
6156echo "$as_me: failed program was:" >&5
19650fd6
AS
6157sed 's/^/| /' conftest.$ac_ext >&5
6158
c0d27fcc
MR
6159( exit $ac_status )
6160ac_cv_header_stdc=no
6161fi
d6e01aa5 6162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6163fi
d6e01aa5
KL
6164
6165
c0d27fcc
MR
6166fi
6167fi
d6e01aa5
KL
6168{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6169echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
c0d27fcc
MR
6170if test $ac_cv_header_stdc = yes; then
6171
6172cat >>confdefs.h <<\_ACEOF
6173#define STDC_HEADERS 1
6174_ACEOF
6175
6176fi
6177
6178# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 6189 inttypes.h stdint.h unistd.h
98418dba
CW
6190do
6191as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
6192{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6193echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6194if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6195 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6196else
925c2f3f 6197 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6198/* confdefs.h. */
6199_ACEOF
6200cat confdefs.h >>conftest.$ac_ext
6201cat >>conftest.$ac_ext <<_ACEOF
6202/* end confdefs.h. */
c0d27fcc
MR
6203$ac_includes_default
6204
6205#include <$ac_header>
6206_ACEOF
6207rm -f conftest.$ac_objext
d6e01aa5
KL
6208if { (ac_try="$ac_compile"
6209case "(($ac_try" in
6210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6211 *) ac_try_echo=$ac_try;;
6212esac
6213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6214 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6215 ac_status=$?
edfaf76d
LK
6216 grep -v '^ *+' conftest.er1 >conftest.err
6217 rm -f conftest.er1
6218 cat conftest.err >&5
c0d27fcc 6219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6220 (exit $ac_status); } && {
6221 test -z "$ac_c_werror_flag" ||
6222 test ! -s conftest.err
6223 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6224 eval "$as_ac_Header=yes"
6225else
6226 echo "$as_me: failed program was:" >&5
19650fd6
AS
6227sed 's/^/| /' conftest.$ac_ext >&5
6228
d6e01aa5 6229 eval "$as_ac_Header=no"
c0d27fcc 6230fi
d6e01aa5
KL
6231
6232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6233fi
d6e01aa5
KL
6234ac_res=`eval echo '${'$as_ac_Header'}'`
6235 { echo "$as_me:$LINENO: result: $ac_res" >&5
6236echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6237if test `eval echo '${'$as_ac_Header'}'` = yes; then
6238 cat >>confdefs.h <<_ACEOF
6239#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6240_ACEOF
6241
6242fi
6243
6244done
6245
6246
6247
6248
6249
6250for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
6251do
6252as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
6253if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6254 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6255echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6256if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6257 echo $ECHO_N "(cached) $ECHO_C" >&6
6258fi
d6e01aa5
KL
6259ac_res=`eval echo '${'$as_ac_Header'}'`
6260 { echo "$as_me:$LINENO: result: $ac_res" >&5
6261echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6262else
6263 # Is the header compilable?
d6e01aa5
KL
6264{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6265echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6266cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6267/* confdefs.h. */
6268_ACEOF
6269cat confdefs.h >>conftest.$ac_ext
6270cat >>conftest.$ac_ext <<_ACEOF
6271/* end confdefs.h. */
c0d27fcc 6272$ac_includes_default
98418dba 6273#include <$ac_header>
503d2be0 6274_ACEOF
c0d27fcc 6275rm -f conftest.$ac_objext
d6e01aa5
KL
6276if { (ac_try="$ac_compile"
6277case "(($ac_try" in
6278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6279 *) ac_try_echo=$ac_try;;
6280esac
6281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6282 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6283 ac_status=$?
edfaf76d
LK
6284 grep -v '^ *+' conftest.er1 >conftest.err
6285 rm -f conftest.er1
6286 cat conftest.err >&5
c0d27fcc 6287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6288 (exit $ac_status); } && {
6289 test -z "$ac_c_werror_flag" ||
6290 test ! -s conftest.err
6291 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6292 ac_header_compiler=yes
6293else
6294 echo "$as_me: failed program was:" >&5
19650fd6
AS
6295sed 's/^/| /' conftest.$ac_ext >&5
6296
d6e01aa5 6297 ac_header_compiler=no
c0d27fcc 6298fi
d6e01aa5
KL
6299
6300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6301{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6302echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6303
6304# Is the header present?
d6e01aa5
KL
6305{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6306echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6307cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6308/* confdefs.h. */
6309_ACEOF
6310cat confdefs.h >>conftest.$ac_ext
6311cat >>conftest.$ac_ext <<_ACEOF
6312/* end confdefs.h. */
c0d27fcc
MR
6313#include <$ac_header>
6314_ACEOF
d6e01aa5
KL
6315if { (ac_try="$ac_cpp conftest.$ac_ext"
6316case "(($ac_try" in
6317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6318 *) ac_try_echo=$ac_try;;
6319esac
6320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6321 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6322 ac_status=$?
6bae0ccf 6323 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6324 rm -f conftest.er1
6325 cat conftest.err >&5
c0d27fcc 6326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6327 (exit $ac_status); } >/dev/null && {
6328 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6329 test ! -s conftest.err
6330 }; then
c0d27fcc 6331 ac_header_preproc=yes
f4988be7 6332else
503d2be0 6333 echo "$as_me: failed program was:" >&5
19650fd6
AS
6334sed 's/^/| /' conftest.$ac_ext >&5
6335
c0d27fcc 6336 ac_header_preproc=no
f4988be7 6337fi
d6e01aa5 6338
98418dba 6339rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
6340{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6341echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6342
6343# So? What about this header?
edfaf76d
LK
6344case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6345 yes:no: )
c0d27fcc
MR
6346 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6347echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6348 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6349echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6350 ac_header_preproc=yes
19650fd6 6351 ;;
edfaf76d 6352 no:yes:* )
c0d27fcc
MR
6353 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6354echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6355 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6356echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6357 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6358echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6359 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6360echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6361 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6362echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6363 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6364echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 6365
19650fd6 6366 ;;
c0d27fcc 6367esac
d6e01aa5
KL
6368{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6369echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6370if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6371 echo $ECHO_N "(cached) $ECHO_C" >&6
6372else
edfaf76d 6373 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6374fi
d6e01aa5
KL
6375ac_res=`eval echo '${'$as_ac_Header'}'`
6376 { echo "$as_me:$LINENO: result: $ac_res" >&5
6377echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6378
6379fi
98418dba 6380if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6381 cat >>confdefs.h <<_ACEOF
98418dba 6382#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6383_ACEOF
f4988be7
GM
6384
6385fi
c0d27fcc 6386
98418dba
CW
6387done
6388
6389 # Emulation library used on NetBSD.
d6e01aa5
KL
6390 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6391echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6392if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6393 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6394else
98418dba
CW
6395 ac_check_lib_save_LIBS=$LIBS
6396LIBS="-lossaudio $LIBS"
6397cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6398/* confdefs.h. */
6399_ACEOF
6400cat confdefs.h >>conftest.$ac_ext
6401cat >>conftest.$ac_ext <<_ACEOF
6402/* end confdefs.h. */
98418dba 6403
d6e01aa5
KL
6404/* Override any GCC internal prototype to avoid an error.
6405 Use char because int might match the return type of a GCC
6406 builtin and then its argument prototype would still apply. */
98418dba
CW
6407#ifdef __cplusplus
6408extern "C"
f4988be7 6409#endif
98418dba 6410char _oss_ioctl ();
503d2be0
AS
6411int
6412main ()
6413{
d6e01aa5 6414return _oss_ioctl ();
503d2be0
AS
6415 ;
6416 return 0;
6417}
6418_ACEOF
98418dba 6419rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
6420if { (ac_try="$ac_link"
6421case "(($ac_try" in
6422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6423 *) ac_try_echo=$ac_try;;
6424esac
6425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6426 (eval "$ac_link") 2>conftest.er1
503d2be0 6427 ac_status=$?
edfaf76d
LK
6428 grep -v '^ *+' conftest.er1 >conftest.err
6429 rm -f conftest.er1
6430 cat conftest.err >&5
c0d27fcc 6431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6432 (exit $ac_status); } && {
6433 test -z "$ac_c_werror_flag" ||
6434 test ! -s conftest.err
6435 } && test -s conftest$ac_exeext &&
6436 $as_test_x conftest$ac_exeext; then
98418dba 6437 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6438else
503d2be0 6439 echo "$as_me: failed program was:" >&5
19650fd6
AS
6440sed 's/^/| /' conftest.$ac_ext >&5
6441
d6e01aa5 6442 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6443fi
d6e01aa5
KL
6444
6445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6446 conftest$ac_exeext conftest.$ac_ext
98418dba 6447LIBS=$ac_check_lib_save_LIBS
f4988be7 6448fi
d6e01aa5
KL
6449{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6450echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6451if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6452 LIBSOUND=-lossaudio
6453else
6454 LIBSOUND=
6455fi
6456
c0d27fcc 6457
439f58ee
JD
6458
6459 ALSA_REQUIRED=1.0.0
6460 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
6461 if test "X${with_pkg_config_prog}" != X; then
6462 PKG_CONFIG="${with_pkg_config_prog}"
6463 fi
6464
6465 succeeded=no
6466
6467 if test -z "$PKG_CONFIG"; then
6468 # Extract the first word of "pkg-config", so it can be a program name with args.
6469set dummy pkg-config; ac_word=$2
d6e01aa5
KL
6470{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6471echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6472if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6473 echo $ECHO_N "(cached) $ECHO_C" >&6
6474else
6475 case $PKG_CONFIG in
6476 [\\/]* | ?:[\\/]*)
6477 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6478 ;;
6479 *)
6480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6481for as_dir in $PATH
6482do
6483 IFS=$as_save_IFS
6484 test -z "$as_dir" && as_dir=.
6485 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 6486 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6487 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6488 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6489 break 2
6490 fi
6491done
6492done
d6e01aa5 6493IFS=$as_save_IFS
439f58ee
JD
6494
6495 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6496 ;;
6497esac
6498fi
6499PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6500if test -n "$PKG_CONFIG"; then
d6e01aa5
KL
6501 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6502echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6503else
d6e01aa5
KL
6504 { echo "$as_me:$LINENO: result: no" >&5
6505echo "${ECHO_T}no" >&6; }
439f58ee
JD
6506fi
6507
d6e01aa5 6508
439f58ee
JD
6509 fi
6510
6511 if test "$PKG_CONFIG" = "no" ; then
6512 HAVE_ALSA=no
6513 else
6514 PKG_CONFIG_MIN_VERSION=0.9.0
6515 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
d6e01aa5
KL
6516 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6517echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6518
67db6aa2 6519 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
d6e01aa5
KL
6520 { echo "$as_me:$LINENO: result: yes" >&5
6521echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6522 succeeded=yes
6523
d6e01aa5
KL
6524 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6525echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6526 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
6527 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6528echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6529
d6e01aa5
KL
6530 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6531echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6532 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
6533 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6534echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6535 else
d6e01aa5
KL
6536 { echo "$as_me:$LINENO: result: no" >&5
6537echo "${ECHO_T}no" >&6; }
439f58ee
JD
6538 ALSA_CFLAGS=""
6539 ALSA_LIBS=""
6540 ## If we have a custom action on failure, don't print errors, but
6541 ## do set a variable so people can do so.
6542 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6543
6544 fi
6545
6546
6547
6548 else
6549 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6550 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6551 fi
6552 fi
6553
6554 if test $succeeded = yes; then
6555 HAVE_ALSA=yes
6556 else
6557 HAVE_ALSA=no
6558 fi
6559
6560 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6561 SAVE_CFLAGS="$CFLAGS"
6562 SAVE_LDFLAGS="$LDFLAGS"
6563 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6564 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6565 cat >conftest.$ac_ext <<_ACEOF
6566/* confdefs.h. */
6567_ACEOF
6568cat confdefs.h >>conftest.$ac_ext
6569cat >>conftest.$ac_ext <<_ACEOF
6570/* end confdefs.h. */
6571#include <asoundlib.h>
6572int
6573main ()
6574{
6575snd_lib_error_set_handler (0);
6576 ;
6577 return 0;
6578}
6579_ACEOF
6580rm -f conftest.$ac_objext
6581if { (ac_try="$ac_compile"
6582case "(($ac_try" in
6583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6584 *) ac_try_echo=$ac_try;;
6585esac
6586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6587 (eval "$ac_compile") 2>conftest.er1
6588 ac_status=$?
6589 grep -v '^ *+' conftest.er1 >conftest.err
6590 rm -f conftest.er1
6591 cat conftest.err >&5
6592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6593 (exit $ac_status); } && {
6594 test -z "$ac_c_werror_flag" ||
6595 test ! -s conftest.err
6596 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6597 emacs_alsa_normal=yes
6598else
6599 echo "$as_me: failed program was:" >&5
6600sed 's/^/| /' conftest.$ac_ext >&5
6601
6602 emacs_alsa_normal=no
6603fi
6604
6605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6606 if test "$emacs_alsa_normal" != yes; then
6607 cat >conftest.$ac_ext <<_ACEOF
6608/* confdefs.h. */
6609_ACEOF
6610cat confdefs.h >>conftest.$ac_ext
6611cat >>conftest.$ac_ext <<_ACEOF
6612/* end confdefs.h. */
6613#include <alsa/asoundlib.h>
6614int
6615main ()
6616{
6617snd_lib_error_set_handler (0);
6618 ;
6619 return 0;
6620}
6621_ACEOF
6622rm -f conftest.$ac_objext
6623if { (ac_try="$ac_compile"
6624case "(($ac_try" in
6625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6626 *) ac_try_echo=$ac_try;;
6627esac
6628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6629 (eval "$ac_compile") 2>conftest.er1
6630 ac_status=$?
6631 grep -v '^ *+' conftest.er1 >conftest.err
6632 rm -f conftest.er1
6633 cat conftest.err >&5
6634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6635 (exit $ac_status); } && {
6636 test -z "$ac_c_werror_flag" ||
6637 test ! -s conftest.err
6638 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6639 emacs_alsa_subdir=yes
6640else
6641 echo "$as_me: failed program was:" >&5
6642sed 's/^/| /' conftest.$ac_ext >&5
6643
6644 emacs_alsa_subdir=no
6645fi
6646
6647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6648 if test "$emacs_alsa_subdir" != yes; then
6649 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6650echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6651 { (exit 1); exit 1; }; }
6652 fi
6653 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6654 fi
6655
6656 CFLAGS="$SAVE_CFLAGS"
6657 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6658 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6659 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6660
6661cat >>confdefs.h <<\_ACEOF
6662#define HAVE_ALSA 1
6663_ACEOF
6664
6665 fi
6666
f4988be7 6667fi
c0d27fcc
MR
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
22044edf
DL
6686
6687
973a76b1 6688
cffcede7 6689
551ffc27 6690
226e2359 6691
c0d27fcc 6692
f4988be7 6693
98418dba
CW
6694for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6695 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6696 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6697 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6698 sys/utsname.h pwd.h
98418dba
CW
6699do
6700as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
6701if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6702 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6703echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6704if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6705 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6706fi
d6e01aa5
KL
6707ac_res=`eval echo '${'$as_ac_Header'}'`
6708 { echo "$as_me:$LINENO: result: $ac_res" >&5
6709echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6710else
c0d27fcc 6711 # Is the header compilable?
d6e01aa5
KL
6712{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6713echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6714cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6715/* confdefs.h. */
6716_ACEOF
6717cat confdefs.h >>conftest.$ac_ext
6718cat >>conftest.$ac_ext <<_ACEOF
6719/* end confdefs.h. */
c0d27fcc
MR
6720$ac_includes_default
6721#include <$ac_header>
6722_ACEOF
6723rm -f conftest.$ac_objext
d6e01aa5
KL
6724if { (ac_try="$ac_compile"
6725case "(($ac_try" in
6726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6727 *) ac_try_echo=$ac_try;;
6728esac
6729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6730 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6731 ac_status=$?
edfaf76d
LK
6732 grep -v '^ *+' conftest.er1 >conftest.err
6733 rm -f conftest.er1
6734 cat conftest.err >&5
c0d27fcc 6735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6736 (exit $ac_status); } && {
6737 test -z "$ac_c_werror_flag" ||
6738 test ! -s conftest.err
6739 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6740 ac_header_compiler=yes
6741else
6742 echo "$as_me: failed program was:" >&5
19650fd6
AS
6743sed 's/^/| /' conftest.$ac_ext >&5
6744
d6e01aa5 6745 ac_header_compiler=no
c0d27fcc 6746fi
d6e01aa5
KL
6747
6748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6749{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6750echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6751
6752# Is the header present?
d6e01aa5
KL
6753{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6754echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6755cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6756/* confdefs.h. */
6757_ACEOF
6758cat confdefs.h >>conftest.$ac_ext
6759cat >>conftest.$ac_ext <<_ACEOF
6760/* end confdefs.h. */
98418dba 6761#include <$ac_header>
503d2be0 6762_ACEOF
d6e01aa5
KL
6763if { (ac_try="$ac_cpp conftest.$ac_ext"
6764case "(($ac_try" in
6765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6766 *) ac_try_echo=$ac_try;;
6767esac
6768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6769 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6770 ac_status=$?
6bae0ccf 6771 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6772 rm -f conftest.er1
6773 cat conftest.err >&5
c0d27fcc 6774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6775 (exit $ac_status); } >/dev/null && {
6776 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6777 test ! -s conftest.err
6778 }; then
c0d27fcc 6779 ac_header_preproc=yes
34ec9ebe 6780else
503d2be0 6781 echo "$as_me: failed program was:" >&5
19650fd6
AS
6782sed 's/^/| /' conftest.$ac_ext >&5
6783
c0d27fcc 6784 ac_header_preproc=no
34ec9ebe 6785fi
d6e01aa5 6786
98418dba 6787rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
6788{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6789echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6790
6791# So? What about this header?
edfaf76d
LK
6792case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6793 yes:no: )
c0d27fcc
MR
6794 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6795echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6796 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6797echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6798 ac_header_preproc=yes
19650fd6 6799 ;;
edfaf76d 6800 no:yes:* )
c0d27fcc
MR
6801 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6802echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6803 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6804echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6805 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6806echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6807 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6808echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6809 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6810echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6811 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6812echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 6813
19650fd6 6814 ;;
c0d27fcc 6815esac
d6e01aa5
KL
6816{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6817echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6818if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6819 echo $ECHO_N "(cached) $ECHO_C" >&6
6820else
edfaf76d 6821 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6822fi
d6e01aa5
KL
6823ac_res=`eval echo '${'$as_ac_Header'}'`
6824 { echo "$as_me:$LINENO: result: $ac_res" >&5
6825echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6826
6827fi
98418dba 6828if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6829 cat >>confdefs.h <<_ACEOF
98418dba 6830#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6831_ACEOF
34ec9ebe 6832
98418dba 6833fi
c0d27fcc 6834
98418dba
CW
6835done
6836
22044edf 6837
d6e01aa5
KL
6838{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6839echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6840cat >conftest.$ac_ext <<_ACEOF
6841/* confdefs.h. */
6842_ACEOF
6843cat confdefs.h >>conftest.$ac_ext
6844cat >>conftest.$ac_ext <<_ACEOF
6845/* end confdefs.h. */
6846#include <sys/personality.h>
6847int
6848main ()
6849{
6850personality (PER_LINUX32)
6851 ;
6852 return 0;
6853}
6854_ACEOF
6855rm -f conftest.$ac_objext
d6e01aa5
KL
6856if { (ac_try="$ac_compile"
6857case "(($ac_try" in
6858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6859 *) ac_try_echo=$ac_try;;
6860esac
6861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6862 (eval "$ac_compile") 2>conftest.er1
f17e308a 6863 ac_status=$?
edfaf76d
LK
6864 grep -v '^ *+' conftest.er1 >conftest.err
6865 rm -f conftest.er1
6866 cat conftest.err >&5
f17e308a 6867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6868 (exit $ac_status); } && {
6869 test -z "$ac_c_werror_flag" ||
6870 test ! -s conftest.err
6871 } && test -s conftest.$ac_objext; then
f17e308a
JD
6872 emacs_cv_personality_linux32=yes
6873else
6874 echo "$as_me: failed program was:" >&5
6875sed 's/^/| /' conftest.$ac_ext >&5
6876
d6e01aa5 6877 emacs_cv_personality_linux32=no
f17e308a 6878fi
d6e01aa5
KL
6879
6880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6881{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6882echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6883
6884if test $emacs_cv_personality_linux32 = yes; then
6885
6886cat >>confdefs.h <<\_ACEOF
6887#define HAVE_PERSONALITY_LINUX32 1
6888_ACEOF
6889
6890fi
6891
6892
22044edf
DL
6893for ac_header in term.h
6894do
6895as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
6896{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6897echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6898if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6899 echo $ECHO_N "(cached) $ECHO_C" >&6
6900else
6901 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6902/* confdefs.h. */
6903_ACEOF
6904cat confdefs.h >>conftest.$ac_ext
6905cat >>conftest.$ac_ext <<_ACEOF
6906/* end confdefs.h. */
22044edf
DL
6907#include <$ac_header>
6908_ACEOF
d6e01aa5
KL
6909if { (ac_try="$ac_cpp conftest.$ac_ext"
6910case "(($ac_try" in
6911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6912 *) ac_try_echo=$ac_try;;
6913esac
6914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6915 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6916 ac_status=$?
6917 grep -v '^ *+' conftest.er1 >conftest.err
6918 rm -f conftest.er1
6919 cat conftest.err >&5
6920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6921 (exit $ac_status); } >/dev/null && {
6922 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6923 test ! -s conftest.err
6924 }; then
22044edf
DL
6925 eval "$as_ac_Header=yes"
6926else
6927 echo "$as_me: failed program was:" >&5
19650fd6
AS
6928sed 's/^/| /' conftest.$ac_ext >&5
6929
22044edf
DL
6930 eval "$as_ac_Header=no"
6931fi
d6e01aa5 6932
22044edf
DL
6933rm -f conftest.err conftest.$ac_ext
6934fi
d6e01aa5
KL
6935ac_res=`eval echo '${'$as_ac_Header'}'`
6936 { echo "$as_me:$LINENO: result: $ac_res" >&5
6937echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6938if test `eval echo '${'$as_ac_Header'}'` = yes; then
6939 cat >>confdefs.h <<_ACEOF
6940#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6941_ACEOF
6942
6943fi
6944
6945done
6946
d6e01aa5
KL
6947{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6948echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6949if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6950 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6951else
503d2be0 6952 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6953/* confdefs.h. */
6954_ACEOF
6955cat confdefs.h >>conftest.$ac_ext
6956cat >>conftest.$ac_ext <<_ACEOF
6957/* end confdefs.h. */
98418dba
CW
6958#include <stdlib.h>
6959#include <stdarg.h>
6960#include <string.h>
6961#include <float.h>
6962
19650fd6
AS
6963int
6964main ()
6965{
6966
6967 ;
6968 return 0;
6969}
98418dba 6970_ACEOF
19650fd6 6971rm -f conftest.$ac_objext
d6e01aa5
KL
6972if { (ac_try="$ac_compile"
6973case "(($ac_try" in
6974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6975 *) ac_try_echo=$ac_try;;
6976esac
6977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6978 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6979 ac_status=$?
edfaf76d
LK
6980 grep -v '^ *+' conftest.er1 >conftest.err
6981 rm -f conftest.er1
6982 cat conftest.err >&5
cd958eb3 6983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6984 (exit $ac_status); } && {
6985 test -z "$ac_c_werror_flag" ||
6986 test ! -s conftest.err
6987 } && test -s conftest.$ac_objext; then
98418dba 6988 ac_cv_header_stdc=yes
ba4481b5 6989else
503d2be0 6990 echo "$as_me: failed program was:" >&5
19650fd6
AS
6991sed 's/^/| /' conftest.$ac_ext >&5
6992
d6e01aa5 6993 ac_cv_header_stdc=no
ba4481b5 6994fi
d6e01aa5
KL
6995
6996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6997
6998if test $ac_cv_header_stdc = yes; then
6999 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7000 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7001/* confdefs.h. */
7002_ACEOF
7003cat confdefs.h >>conftest.$ac_ext
7004cat >>conftest.$ac_ext <<_ACEOF
7005/* end confdefs.h. */
98418dba
CW
7006#include <string.h>
7007
7008_ACEOF
7009if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 7010 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
7011 :
7012else
7013 ac_cv_header_stdc=no
ba4481b5 7014fi
98418dba 7015rm -f conftest*
ba4481b5
DL
7016
7017fi
7018
98418dba
CW
7019if test $ac_cv_header_stdc = yes; then
7020 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7021 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7022/* confdefs.h. */
7023_ACEOF
7024cat confdefs.h >>conftest.$ac_ext
7025cat >>conftest.$ac_ext <<_ACEOF
7026/* end confdefs.h. */
98418dba
CW
7027#include <stdlib.h>
7028
7029_ACEOF
7030if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 7031 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
7032 :
7033else
7034 ac_cv_header_stdc=no
7035fi
7036rm -f conftest*
7037
7038fi
7039
7040if test $ac_cv_header_stdc = yes; then
7041 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7042 if test "$cross_compiling" = yes; then
7043 :
d42122a3 7044else
503d2be0 7045 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7046/* confdefs.h. */
7047_ACEOF
7048cat confdefs.h >>conftest.$ac_ext
7049cat >>conftest.$ac_ext <<_ACEOF
7050/* end confdefs.h. */
98418dba 7051#include <ctype.h>
d6e01aa5 7052#include <stdlib.h>
98418dba
CW
7053#if ((' ' & 0x0FF) == 0x020)
7054# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7055# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7056#else
19650fd6 7057# define ISLOWER(c) \
edfaf76d
LK
7058 (('a' <= (c) && (c) <= 'i') \
7059 || ('j' <= (c) && (c) <= 'r') \
7060 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
7061# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7062#endif
7063
7064#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
7065int
7066main ()
7067{
98418dba
CW
7068 int i;
7069 for (i = 0; i < 256; i++)
7070 if (XOR (islower (i), ISLOWER (i))
edfaf76d 7071 || toupper (i) != TOUPPER (i))
d6e01aa5
KL
7072 return 2;
7073 return 0;
503d2be0
AS
7074}
7075_ACEOF
98418dba 7076rm -f conftest$ac_exeext
d6e01aa5
KL
7077if { (ac_try="$ac_link"
7078case "(($ac_try" in
7079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7080 *) ac_try_echo=$ac_try;;
7081esac
7082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7083 (eval "$ac_link") 2>&5
503d2be0 7084 ac_status=$?
c0d27fcc 7085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7086 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
7087 { (case "(($ac_try" in
7088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7089 *) ac_try_echo=$ac_try;;
7090esac
7091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7092 (eval "$ac_try") 2>&5
503d2be0 7093 ac_status=$?
c0d27fcc 7094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7095 (exit $ac_status); }; }; then
98418dba 7096 :
d42122a3 7097else
98418dba
CW
7098 echo "$as_me: program exited with status $ac_status" >&5
7099echo "$as_me: failed program was:" >&5
19650fd6
AS
7100sed 's/^/| /' conftest.$ac_ext >&5
7101
c0d27fcc 7102( exit $ac_status )
98418dba 7103ac_cv_header_stdc=no
d42122a3 7104fi
d6e01aa5 7105rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 7106fi
d6e01aa5
KL
7107
7108
98418dba
CW
7109fi
7110fi
d6e01aa5
KL
7111{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7112echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
7113if test $ac_cv_header_stdc = yes; then
7114
c0d27fcc 7115cat >>confdefs.h <<\_ACEOF
98418dba 7116#define STDC_HEADERS 1
c0d27fcc 7117_ACEOF
d42122a3
DL
7118
7119fi
7120
d6e01aa5
KL
7121{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7122echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 7123if test "${ac_cv_header_time+set}" = set; then
503d2be0 7124 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7125else
503d2be0 7126 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7127/* confdefs.h. */
7128_ACEOF
7129cat confdefs.h >>conftest.$ac_ext
7130cat >>conftest.$ac_ext <<_ACEOF
7131/* end confdefs.h. */
ba4481b5 7132#include <sys/types.h>
98418dba 7133#include <sys/time.h>
ba4481b5 7134#include <time.h>
503d2be0
AS
7135
7136int
7137main ()
7138{
98418dba
CW
7139if ((struct tm *) 0)
7140return 0;
503d2be0
AS
7141 ;
7142 return 0;
7143}
7144_ACEOF
7145rm -f conftest.$ac_objext
d6e01aa5
KL
7146if { (ac_try="$ac_compile"
7147case "(($ac_try" in
7148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7149 *) ac_try_echo=$ac_try;;
7150esac
7151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7152 (eval "$ac_compile") 2>conftest.er1
503d2be0 7153 ac_status=$?
edfaf76d
LK
7154 grep -v '^ *+' conftest.er1 >conftest.err
7155 rm -f conftest.er1
7156 cat conftest.err >&5
c0d27fcc 7157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7158 (exit $ac_status); } && {
7159 test -z "$ac_c_werror_flag" ||
7160 test ! -s conftest.err
7161 } && test -s conftest.$ac_objext; then
98418dba 7162 ac_cv_header_time=yes
ba4481b5 7163else
503d2be0 7164 echo "$as_me: failed program was:" >&5
19650fd6
AS
7165sed 's/^/| /' conftest.$ac_ext >&5
7166
d6e01aa5 7167 ac_cv_header_time=no
ba4481b5 7168fi
d6e01aa5
KL
7169
7170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7171fi
d6e01aa5
KL
7172{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7173echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 7174if test $ac_cv_header_time = yes; then
503d2be0 7175
c0d27fcc 7176cat >>confdefs.h <<\_ACEOF
98418dba 7177#define TIME_WITH_SYS_TIME 1
c0d27fcc 7178_ACEOF
ba4481b5
DL
7179
7180fi
7181
d6e01aa5
KL
7182{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
7183echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 7184if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 7185 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7186else
503d2be0 7187 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7188/* confdefs.h. */
7189_ACEOF
7190cat confdefs.h >>conftest.$ac_ext
7191cat >>conftest.$ac_ext <<_ACEOF
7192/* end confdefs.h. */
cd958eb3
MB
7193$ac_includes_default
7194int
7195main ()
7196{
7197#ifndef sys_siglist
d6e01aa5 7198 (void) sys_siglist;
98418dba 7199#endif
503d2be0 7200
cd958eb3
MB
7201 ;
7202 return 0;
7203}
7204_ACEOF
7205rm -f conftest.$ac_objext
d6e01aa5
KL
7206if { (ac_try="$ac_compile"
7207case "(($ac_try" in
7208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7209 *) ac_try_echo=$ac_try;;
7210esac
7211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7212 (eval "$ac_compile") 2>conftest.er1
cd958eb3 7213 ac_status=$?
edfaf76d
LK
7214 grep -v '^ *+' conftest.er1 >conftest.err
7215 rm -f conftest.er1
7216 cat conftest.err >&5
cd958eb3 7217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7218 (exit $ac_status); } && {
7219 test -z "$ac_c_werror_flag" ||
7220 test ! -s conftest.err
7221 } && test -s conftest.$ac_objext; then
cd958eb3
MB
7222 ac_cv_have_decl_sys_siglist=yes
7223else
7224 echo "$as_me: failed program was:" >&5
19650fd6
AS
7225sed 's/^/| /' conftest.$ac_ext >&5
7226
d6e01aa5 7227 ac_cv_have_decl_sys_siglist=no
cd958eb3 7228fi
d6e01aa5
KL
7229
7230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 7231fi
d6e01aa5
KL
7232{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
7233echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
7234if test $ac_cv_have_decl_sys_siglist = yes; then
7235
7236cat >>confdefs.h <<_ACEOF
7237#define HAVE_DECL_SYS_SIGLIST 1
7238_ACEOF
7239
7240
7241else
7242 cat >>confdefs.h <<_ACEOF
7243#define HAVE_DECL_SYS_SIGLIST 0
7244_ACEOF
7245
7246
7247fi
7248
7249
7250if test $ac_cv_have_decl_sys_siglist != yes; then
7251 # For Tru64, at least:
d6e01aa5
KL
7252 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
7253echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
7254if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
7255 echo $ECHO_N "(cached) $ECHO_C" >&6
7256else
7257 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7258/* confdefs.h. */
7259_ACEOF
7260cat confdefs.h >>conftest.$ac_ext
7261cat >>conftest.$ac_ext <<_ACEOF
7262/* end confdefs.h. */
cd958eb3 7263$ac_includes_default
503d2be0
AS
7264int
7265main ()
7266{
cd958eb3 7267#ifndef __sys_siglist
d6e01aa5 7268 (void) __sys_siglist;
cd958eb3
MB
7269#endif
7270
503d2be0
AS
7271 ;
7272 return 0;
7273}
7274_ACEOF
7275rm -f conftest.$ac_objext
d6e01aa5
KL
7276if { (ac_try="$ac_compile"
7277case "(($ac_try" in
7278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7279 *) ac_try_echo=$ac_try;;
7280esac
7281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7282 (eval "$ac_compile") 2>conftest.er1
503d2be0 7283 ac_status=$?
edfaf76d
LK
7284 grep -v '^ *+' conftest.er1 >conftest.err
7285 rm -f conftest.er1
7286 cat conftest.err >&5
c0d27fcc 7287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7288 (exit $ac_status); } && {
7289 test -z "$ac_c_werror_flag" ||
7290 test ! -s conftest.err
7291 } && test -s conftest.$ac_objext; then
cd958eb3 7292 ac_cv_have_decl___sys_siglist=yes
ba4481b5 7293else
503d2be0 7294 echo "$as_me: failed program was:" >&5
19650fd6
AS
7295sed 's/^/| /' conftest.$ac_ext >&5
7296
d6e01aa5 7297 ac_cv_have_decl___sys_siglist=no
ba4481b5 7298fi
d6e01aa5
KL
7299
7300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 7301fi
d6e01aa5
KL
7302{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
7303echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 7304if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 7305
cd958eb3
MB
7306cat >>confdefs.h <<_ACEOF
7307#define HAVE_DECL___SYS_SIGLIST 1
7308_ACEOF
7309
7310
7311else
7312 cat >>confdefs.h <<_ACEOF
7313#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 7314_ACEOF
503d2be0 7315
cd958eb3 7316
ba4481b5
DL
7317fi
7318
cd958eb3
MB
7319
7320 if test $ac_cv_have_decl___sys_siglist = yes; then
7321
7322cat >>confdefs.h <<\_ACEOF
7323#define sys_siglist __sys_siglist
7324_ACEOF
7325
7326 fi
7327fi
d6e01aa5
KL
7328{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7329echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 7330if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 7331 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7332else
503d2be0 7333 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7334/* confdefs.h. */
7335_ACEOF
7336cat confdefs.h >>conftest.$ac_ext
7337cat >>conftest.$ac_ext <<_ACEOF
7338/* end confdefs.h. */
98418dba
CW
7339#include <sys/types.h>
7340#include <sys/wait.h>
7341#ifndef WEXITSTATUS
d6e01aa5 7342# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7343#endif
7344#ifndef WIFEXITED
7345# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7346#endif
503d2be0
AS
7347
7348int
7349main ()
7350{
98418dba
CW
7351 int s;
7352 wait (&s);
7353 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7354 ;
7355 return 0;
7356}
7357_ACEOF
98418dba 7358rm -f conftest.$ac_objext
d6e01aa5
KL
7359if { (ac_try="$ac_compile"
7360case "(($ac_try" in
7361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7362 *) ac_try_echo=$ac_try;;
7363esac
7364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7365 (eval "$ac_compile") 2>conftest.er1
503d2be0 7366 ac_status=$?
edfaf76d
LK
7367 grep -v '^ *+' conftest.er1 >conftest.err
7368 rm -f conftest.er1
7369 cat conftest.err >&5
c0d27fcc 7370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7371 (exit $ac_status); } && {
7372 test -z "$ac_c_werror_flag" ||
7373 test ! -s conftest.err
7374 } && test -s conftest.$ac_objext; then
98418dba 7375 ac_cv_header_sys_wait_h=yes
ba4481b5 7376else
503d2be0 7377 echo "$as_me: failed program was:" >&5
19650fd6
AS
7378sed 's/^/| /' conftest.$ac_ext >&5
7379
d6e01aa5 7380 ac_cv_header_sys_wait_h=no
ba4481b5 7381fi
d6e01aa5
KL
7382
7383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7384fi
d6e01aa5
KL
7385{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7386echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7387if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7388
c0d27fcc 7389cat >>confdefs.h <<\_ACEOF
98418dba 7390#define HAVE_SYS_WAIT_H 1
c0d27fcc 7391_ACEOF
ba4481b5 7392
ba4481b5
DL
7393fi
7394
c0d27fcc 7395
d6e01aa5
KL
7396{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7397echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7398if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7399 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7400else
503d2be0 7401 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7402/* confdefs.h. */
7403_ACEOF
7404cat confdefs.h >>conftest.$ac_ext
7405cat >>conftest.$ac_ext <<_ACEOF
7406/* end confdefs.h. */
98418dba
CW
7407#ifdef TIME_WITH_SYS_TIME
7408#include <sys/time.h>
7409#include <time.h>
7410#else
7411#ifdef HAVE_SYS_TIME_H
7412#include <sys/time.h>
7413#else
1113b624 7414#include <time.h>
98418dba
CW
7415#endif
7416#endif
7417#ifdef HAVE_UTIME_H
7418#include <utime.h>
7419#endif
503d2be0
AS
7420int
7421main ()
7422{
98418dba 7423static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7424 ;
7425 return 0;
7426}
7427_ACEOF
98418dba 7428rm -f conftest.$ac_objext
d6e01aa5
KL
7429if { (ac_try="$ac_compile"
7430case "(($ac_try" in
7431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7432 *) ac_try_echo=$ac_try;;
7433esac
7434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7435 (eval "$ac_compile") 2>conftest.er1
503d2be0 7436 ac_status=$?
edfaf76d
LK
7437 grep -v '^ *+' conftest.er1 >conftest.err
7438 rm -f conftest.er1
7439 cat conftest.err >&5
c0d27fcc 7440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7441 (exit $ac_status); } && {
7442 test -z "$ac_c_werror_flag" ||
7443 test ! -s conftest.err
7444 } && test -s conftest.$ac_objext; then
98418dba 7445 emacs_cv_struct_utimbuf=yes
1113b624 7446else
503d2be0 7447 echo "$as_me: failed program was:" >&5
19650fd6
AS
7448sed 's/^/| /' conftest.$ac_ext >&5
7449
d6e01aa5 7450 emacs_cv_struct_utimbuf=no
1113b624 7451fi
d6e01aa5
KL
7452
7453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7454fi
d6e01aa5
KL
7455{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7456echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7457if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7458
c0d27fcc 7459cat >>confdefs.h <<\_ACEOF
98418dba 7460#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7461_ACEOF
1113b624
PE
7462
7463fi
ba4481b5 7464
d6e01aa5
KL
7465{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7466echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7467if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7468 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7469else
98418dba 7470 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7471/* confdefs.h. */
7472_ACEOF
7473cat confdefs.h >>conftest.$ac_ext
7474cat >>conftest.$ac_ext <<_ACEOF
7475/* end confdefs.h. */
7397acc4 7476#include <sys/types.h>
98418dba 7477#include <signal.h>
98418dba 7478
503d2be0
AS
7479int
7480main ()
7481{
d6e01aa5 7482return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7483 ;
7484 return 0;
7485}
7486_ACEOF
98418dba 7487rm -f conftest.$ac_objext
d6e01aa5
KL
7488if { (ac_try="$ac_compile"
7489case "(($ac_try" in
7490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7491 *) ac_try_echo=$ac_try;;
7492esac
7493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7494 (eval "$ac_compile") 2>conftest.er1
503d2be0 7495 ac_status=$?
edfaf76d
LK
7496 grep -v '^ *+' conftest.er1 >conftest.err
7497 rm -f conftest.er1
7498 cat conftest.err >&5
c0d27fcc 7499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7500 (exit $ac_status); } && {
7501 test -z "$ac_c_werror_flag" ||
7502 test ! -s conftest.err
7503 } && test -s conftest.$ac_objext; then
7504 ac_cv_type_signal=int
503d2be0
AS
7505else
7506 echo "$as_me: failed program was:" >&5
19650fd6
AS
7507sed 's/^/| /' conftest.$ac_ext >&5
7508
d6e01aa5 7509 ac_cv_type_signal=void
503d2be0 7510fi
d6e01aa5
KL
7511
7512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7513fi
d6e01aa5
KL
7514{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7515echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7516
c0d27fcc 7517cat >>confdefs.h <<_ACEOF
98418dba 7518#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7519_ACEOF
7520
503d2be0 7521
c0d27fcc 7522
d6e01aa5
KL
7523{ echo "$as_me:$LINENO: checking for speed_t" >&5
7524echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7525if test "${emacs_cv_speed_t+set}" = set; then
7526 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7527else
98418dba 7528 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7529/* confdefs.h. */
7530_ACEOF
7531cat confdefs.h >>conftest.$ac_ext
7532cat >>conftest.$ac_ext <<_ACEOF
7533/* end confdefs.h. */
98418dba 7534#include <termios.h>
98418dba
CW
7535int
7536main ()
7537{
7538speed_t x = 1;
7539 ;
7540 return 0;
7541}
7542_ACEOF
7543rm -f conftest.$ac_objext
d6e01aa5
KL
7544if { (ac_try="$ac_compile"
7545case "(($ac_try" in
7546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7547 *) ac_try_echo=$ac_try;;
7548esac
7549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7550 (eval "$ac_compile") 2>conftest.er1
98418dba 7551 ac_status=$?
edfaf76d
LK
7552 grep -v '^ *+' conftest.er1 >conftest.err
7553 rm -f conftest.er1
7554 cat conftest.err >&5
c0d27fcc 7555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7556 (exit $ac_status); } && {
7557 test -z "$ac_c_werror_flag" ||
7558 test ! -s conftest.err
7559 } && test -s conftest.$ac_objext; then
98418dba
CW
7560 emacs_cv_speed_t=yes
7561else
7562 echo "$as_me: failed program was:" >&5
19650fd6
AS
7563sed 's/^/| /' conftest.$ac_ext >&5
7564
d6e01aa5 7565 emacs_cv_speed_t=no
98418dba 7566fi
d6e01aa5
KL
7567
7568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7569fi
d6e01aa5
KL
7570{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7571echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7572if test $emacs_cv_speed_t = yes; then
b936fae4 7573
c0d27fcc 7574cat >>confdefs.h <<\_ACEOF
98418dba 7575#define HAVE_SPEED_T 1
c0d27fcc 7576_ACEOF
98418dba 7577
7397acc4
DL
7578fi
7579
d6e01aa5
KL
7580{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7581echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7582if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7583 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7584else
503d2be0 7585 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7586/* confdefs.h. */
7587_ACEOF
7588cat confdefs.h >>conftest.$ac_ext
7589cat >>conftest.$ac_ext <<_ACEOF
7590/* end confdefs.h. */
98418dba
CW
7591#ifdef TIME_WITH_SYS_TIME
7592#include <sys/time.h>
7593#include <time.h>
7594#else
7595#ifdef HAVE_SYS_TIME_H
7596#include <sys/time.h>
7597#else
7598#include <time.h>
7599#endif
7600#endif
503d2be0
AS
7601int
7602main ()
7603{
98418dba 7604static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7605 ;
7606 return 0;
7607}
7608_ACEOF
7609rm -f conftest.$ac_objext
d6e01aa5
KL
7610if { (ac_try="$ac_compile"
7611case "(($ac_try" in
7612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7613 *) ac_try_echo=$ac_try;;
7614esac
7615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7616 (eval "$ac_compile") 2>conftest.er1
503d2be0 7617 ac_status=$?
edfaf76d
LK
7618 grep -v '^ *+' conftest.er1 >conftest.err
7619 rm -f conftest.er1
7620 cat conftest.err >&5
c0d27fcc 7621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7622 (exit $ac_status); } && {
7623 test -z "$ac_c_werror_flag" ||
7624 test ! -s conftest.err
7625 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7626 emacs_cv_struct_timeval=yes
7627else
503d2be0 7628 echo "$as_me: failed program was:" >&5
19650fd6
AS
7629sed 's/^/| /' conftest.$ac_ext >&5
7630
d6e01aa5 7631 emacs_cv_struct_timeval=no
7397acc4 7632fi
d6e01aa5
KL
7633
7634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7635fi
d6e01aa5
KL
7636{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7637echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7638HAVE_TIMEVAL=$emacs_cv_struct_timeval
7639if test $emacs_cv_struct_timeval = yes; then
b936fae4 7640
c0d27fcc 7641cat >>confdefs.h <<\_ACEOF
98418dba 7642#define HAVE_TIMEVAL 1
c0d27fcc 7643_ACEOF
7397acc4
DL
7644
7645fi
7646
d6e01aa5
KL
7647{ echo "$as_me:$LINENO: checking for struct exception" >&5
7648echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7649if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7650 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7651else
503d2be0 7652 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7653/* confdefs.h. */
7654_ACEOF
7655cat confdefs.h >>conftest.$ac_ext
7656cat >>conftest.$ac_ext <<_ACEOF
7657/* end confdefs.h. */
98418dba 7658#include <math.h>
503d2be0
AS
7659int
7660main ()
7661{
98418dba 7662static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7663 ;
7664 return 0;
ba4481b5 7665}
503d2be0
AS
7666_ACEOF
7667rm -f conftest.$ac_objext
d6e01aa5
KL
7668if { (ac_try="$ac_compile"
7669case "(($ac_try" in
7670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7671 *) ac_try_echo=$ac_try;;
7672esac
7673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7674 (eval "$ac_compile") 2>conftest.er1
503d2be0 7675 ac_status=$?
edfaf76d
LK
7676 grep -v '^ *+' conftest.er1 >conftest.err
7677 rm -f conftest.er1
7678 cat conftest.err >&5
c0d27fcc 7679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7680 (exit $ac_status); } && {
7681 test -z "$ac_c_werror_flag" ||
7682 test ! -s conftest.err
7683 } && test -s conftest.$ac_objext; then
98418dba 7684 emacs_cv_struct_exception=yes
ba4481b5 7685else
503d2be0 7686 echo "$as_me: failed program was:" >&5
19650fd6
AS
7687sed 's/^/| /' conftest.$ac_ext >&5
7688
d6e01aa5 7689 emacs_cv_struct_exception=no
ba4481b5 7690fi
d6e01aa5
KL
7691
7692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7693fi
d6e01aa5
KL
7694{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7695echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7696HAVE_EXCEPTION=$emacs_cv_struct_exception
7697if test $emacs_cv_struct_exception != yes; then
b936fae4 7698
c0d27fcc 7699cat >>confdefs.h <<\_ACEOF
98418dba 7700#define NO_MATHERR 1
c0d27fcc 7701_ACEOF
ba4481b5
DL
7702
7703fi
7704
7862d3a8
AS
7705
7706for ac_header in sys/socket.h
7707do
7708as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
7709if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7710 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7711echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7712if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7713 echo $ECHO_N "(cached) $ECHO_C" >&6
7714fi
d6e01aa5
KL
7715ac_res=`eval echo '${'$as_ac_Header'}'`
7716 { echo "$as_me:$LINENO: result: $ac_res" >&5
7717echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7718else
7719 # Is the header compilable?
d6e01aa5
KL
7720{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7721echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7722cat >conftest.$ac_ext <<_ACEOF
7723/* confdefs.h. */
7724_ACEOF
7725cat confdefs.h >>conftest.$ac_ext
7726cat >>conftest.$ac_ext <<_ACEOF
7727/* end confdefs.h. */
7728$ac_includes_default
7729#include <$ac_header>
7730_ACEOF
7731rm -f conftest.$ac_objext
d6e01aa5
KL
7732if { (ac_try="$ac_compile"
7733case "(($ac_try" in
7734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7735 *) ac_try_echo=$ac_try;;
7736esac
7737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7738 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7739 ac_status=$?
edfaf76d
LK
7740 grep -v '^ *+' conftest.er1 >conftest.err
7741 rm -f conftest.er1
7742 cat conftest.err >&5
7862d3a8 7743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7744 (exit $ac_status); } && {
7745 test -z "$ac_c_werror_flag" ||
7746 test ! -s conftest.err
7747 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7748 ac_header_compiler=yes
7749else
7750 echo "$as_me: failed program was:" >&5
7751sed 's/^/| /' conftest.$ac_ext >&5
7752
d6e01aa5 7753 ac_header_compiler=no
7862d3a8 7754fi
d6e01aa5
KL
7755
7756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7757{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7758echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7759
7760# Is the header present?
d6e01aa5
KL
7761{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7762echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7763cat >conftest.$ac_ext <<_ACEOF
7764/* confdefs.h. */
7765_ACEOF
7766cat confdefs.h >>conftest.$ac_ext
7767cat >>conftest.$ac_ext <<_ACEOF
7768/* end confdefs.h. */
7769#include <$ac_header>
7770_ACEOF
d6e01aa5
KL
7771if { (ac_try="$ac_cpp conftest.$ac_ext"
7772case "(($ac_try" in
7773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7774 *) ac_try_echo=$ac_try;;
7775esac
7776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7777 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7778 ac_status=$?
7779 grep -v '^ *+' conftest.er1 >conftest.err
7780 rm -f conftest.er1
7781 cat conftest.err >&5
7782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7783 (exit $ac_status); } >/dev/null && {
7784 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7785 test ! -s conftest.err
7786 }; then
7862d3a8
AS
7787 ac_header_preproc=yes
7788else
7789 echo "$as_me: failed program was:" >&5
7790sed 's/^/| /' conftest.$ac_ext >&5
7791
7792 ac_header_preproc=no
7793fi
d6e01aa5 7794
7862d3a8 7795rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
7796{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7797echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7798
7799# So? What about this header?
edfaf76d
LK
7800case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7801 yes:no: )
7862d3a8
AS
7802 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7803echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7804 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7805echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7806 ac_header_preproc=yes
7862d3a8 7807 ;;
edfaf76d 7808 no:yes:* )
7862d3a8
AS
7809 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7810echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7811 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7812echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7813 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7814echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7815 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7816echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7817 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7818echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7819 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7820echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 7821
7862d3a8
AS
7822 ;;
7823esac
d6e01aa5
KL
7824{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7825echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7826if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7827 echo $ECHO_N "(cached) $ECHO_C" >&6
7828else
edfaf76d 7829 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7830fi
d6e01aa5
KL
7831ac_res=`eval echo '${'$as_ac_Header'}'`
7832 { echo "$as_me:$LINENO: result: $ac_res" >&5
7833echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7834
7835fi
7836if test `eval echo '${'$as_ac_Header'}'` = yes; then
7837 cat >>confdefs.h <<_ACEOF
7838#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7839_ACEOF
7840
7841fi
7842
7843done
7844
7845
7846for ac_header in net/if.h
7847do
7848as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
7849{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7850echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7851if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7852 echo $ECHO_N "(cached) $ECHO_C" >&6
7853else
7854 cat >conftest.$ac_ext <<_ACEOF
7855/* confdefs.h. */
7856_ACEOF
7857cat confdefs.h >>conftest.$ac_ext
7858cat >>conftest.$ac_ext <<_ACEOF
7859/* end confdefs.h. */
7860$ac_includes_default
7861#if HAVE_SYS_SOCKET_H
7862#include <sys/socket.h>
7863#endif
7864
7865#include <$ac_header>
7866_ACEOF
7867rm -f conftest.$ac_objext
d6e01aa5
KL
7868if { (ac_try="$ac_compile"
7869case "(($ac_try" in
7870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7871 *) ac_try_echo=$ac_try;;
7872esac
7873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7874 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7875 ac_status=$?
edfaf76d
LK
7876 grep -v '^ *+' conftest.er1 >conftest.err
7877 rm -f conftest.er1
7878 cat conftest.err >&5
7862d3a8 7879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7880 (exit $ac_status); } && {
7881 test -z "$ac_c_werror_flag" ||
7882 test ! -s conftest.err
7883 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7884 eval "$as_ac_Header=yes"
7885else
7886 echo "$as_me: failed program was:" >&5
7887sed 's/^/| /' conftest.$ac_ext >&5
7888
d6e01aa5 7889 eval "$as_ac_Header=no"
7862d3a8 7890fi
d6e01aa5
KL
7891
7892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7893fi
d6e01aa5
KL
7894ac_res=`eval echo '${'$as_ac_Header'}'`
7895 { echo "$as_me:$LINENO: result: $ac_res" >&5
7896echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7897if test `eval echo '${'$as_ac_Header'}'` = yes; then
7898 cat >>confdefs.h <<_ACEOF
7899#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7900_ACEOF
7901
7902fi
7903
7904done
7905
7906
d6e01aa5
KL
7907{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7908echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7909if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7910 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7911else
503d2be0 7912 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7913/* confdefs.h. */
7914_ACEOF
7915cat confdefs.h >>conftest.$ac_ext
7916cat >>conftest.$ac_ext <<_ACEOF
7917/* end confdefs.h. */
98418dba
CW
7918#include <sys/types.h>
7919#include <time.h>
7397acc4 7920
503d2be0
AS
7921int
7922main ()
7923{
d6e01aa5
KL
7924struct tm tm;
7925 int *p = &tm.tm_sec;
7926 return !p;
503d2be0
AS
7927 ;
7928 return 0;
7929}
7930_ACEOF
7931rm -f conftest.$ac_objext
d6e01aa5
KL
7932if { (ac_try="$ac_compile"
7933case "(($ac_try" in
7934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7935 *) ac_try_echo=$ac_try;;
7936esac
7937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7938 (eval "$ac_compile") 2>conftest.er1
503d2be0 7939 ac_status=$?
edfaf76d
LK
7940 grep -v '^ *+' conftest.er1 >conftest.err
7941 rm -f conftest.er1
7942 cat conftest.err >&5
c0d27fcc 7943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7944 (exit $ac_status); } && {
7945 test -z "$ac_c_werror_flag" ||
7946 test ! -s conftest.err
7947 } && test -s conftest.$ac_objext; then
35996d22
AS
7948 ac_cv_struct_tm=time.h
7949else
503d2be0 7950 echo "$as_me: failed program was:" >&5
19650fd6
AS
7951sed 's/^/| /' conftest.$ac_ext >&5
7952
d6e01aa5 7953 ac_cv_struct_tm=sys/time.h
7397acc4 7954fi
d6e01aa5
KL
7955
7956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7957fi
d6e01aa5
KL
7958{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7959echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7960if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7961
c0d27fcc 7962cat >>confdefs.h <<\_ACEOF
98418dba 7963#define TM_IN_SYS_TIME 1
c0d27fcc 7964_ACEOF
7397acc4
DL
7965
7966fi
ba4481b5 7967
d6e01aa5
KL
7968{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7969echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7970if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7971 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7972else
98418dba 7973 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7974/* confdefs.h. */
7975_ACEOF
7976cat confdefs.h >>conftest.$ac_ext
7977cat >>conftest.$ac_ext <<_ACEOF
7978/* end confdefs.h. */
98418dba
CW
7979#include <sys/types.h>
7980#include <$ac_cv_struct_tm>
ba4481b5 7981
c0d27fcc 7982
98418dba
CW
7983int
7984main ()
7985{
7986static struct tm ac_aggr;
7987if (ac_aggr.tm_zone)
7988return 0;
7989 ;
7990 return 0;
7991}
7992_ACEOF
7993rm -f conftest.$ac_objext
d6e01aa5
KL
7994if { (ac_try="$ac_compile"
7995case "(($ac_try" in
7996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7997 *) ac_try_echo=$ac_try;;
7998esac
7999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8000 (eval "$ac_compile") 2>conftest.er1
98418dba 8001 ac_status=$?
edfaf76d
LK
8002 grep -v '^ *+' conftest.er1 >conftest.err
8003 rm -f conftest.er1
8004 cat conftest.err >&5
c0d27fcc 8005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8006 (exit $ac_status); } && {
8007 test -z "$ac_c_werror_flag" ||
8008 test ! -s conftest.err
8009 } && test -s conftest.$ac_objext; then
98418dba 8010 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 8011else
98418dba 8012 echo "$as_me: failed program was:" >&5
19650fd6
AS
8013sed 's/^/| /' conftest.$ac_ext >&5
8014
d6e01aa5 8015 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8016/* confdefs.h. */
8017_ACEOF
8018cat confdefs.h >>conftest.$ac_ext
8019cat >>conftest.$ac_ext <<_ACEOF
8020/* end confdefs.h. */
6bae0ccf
DL
8021#include <sys/types.h>
8022#include <$ac_cv_struct_tm>
8023
8024
8025int
8026main ()
8027{
8028static struct tm ac_aggr;
8029if (sizeof ac_aggr.tm_zone)
8030return 0;
8031 ;
8032 return 0;
8033}
8034_ACEOF
8035rm -f conftest.$ac_objext
d6e01aa5
KL
8036if { (ac_try="$ac_compile"
8037case "(($ac_try" in
8038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8039 *) ac_try_echo=$ac_try;;
8040esac
8041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8042 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 8043 ac_status=$?
edfaf76d
LK
8044 grep -v '^ *+' conftest.er1 >conftest.err
8045 rm -f conftest.er1
8046 cat conftest.err >&5
6bae0ccf 8047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8048 (exit $ac_status); } && {
8049 test -z "$ac_c_werror_flag" ||
8050 test ! -s conftest.err
8051 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
8052 ac_cv_member_struct_tm_tm_zone=yes
8053else
8054 echo "$as_me: failed program was:" >&5
19650fd6
AS
8055sed 's/^/| /' conftest.$ac_ext >&5
8056
d6e01aa5 8057 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 8058fi
d6e01aa5
KL
8059
8060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 8061fi
d6e01aa5
KL
8062
8063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8064fi
d6e01aa5
KL
8065{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
8066echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 8067if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 8068
c0d27fcc 8069cat >>confdefs.h <<_ACEOF
98418dba 8070#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
8071_ACEOF
8072
ba4481b5 8073
98418dba 8074fi
ba4481b5 8075
98418dba 8076if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 8077
c0d27fcc 8078cat >>confdefs.h <<\_ACEOF
98418dba 8079#define HAVE_TM_ZONE 1
c0d27fcc 8080_ACEOF
ba4481b5 8081
ba4481b5 8082else
d6e01aa5
KL
8083 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
8084echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
8085if test "${ac_cv_have_decl_tzname+set}" = set; then
8086 echo $ECHO_N "(cached) $ECHO_C" >&6
8087else
8088 cat >conftest.$ac_ext <<_ACEOF
8089/* confdefs.h. */
8090_ACEOF
8091cat confdefs.h >>conftest.$ac_ext
8092cat >>conftest.$ac_ext <<_ACEOF
8093/* end confdefs.h. */
8094#include <time.h>
8095
8096int
8097main ()
8098{
8099#ifndef tzname
8100 (void) tzname;
8101#endif
8102
8103 ;
8104 return 0;
8105}
8106_ACEOF
8107rm -f conftest.$ac_objext
8108if { (ac_try="$ac_compile"
8109case "(($ac_try" in
8110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8111 *) ac_try_echo=$ac_try;;
8112esac
8113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8114 (eval "$ac_compile") 2>conftest.er1
8115 ac_status=$?
8116 grep -v '^ *+' conftest.er1 >conftest.err
8117 rm -f conftest.er1
8118 cat conftest.err >&5
8119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8120 (exit $ac_status); } && {
8121 test -z "$ac_c_werror_flag" ||
8122 test ! -s conftest.err
8123 } && test -s conftest.$ac_objext; then
8124 ac_cv_have_decl_tzname=yes
8125else
8126 echo "$as_me: failed program was:" >&5
8127sed 's/^/| /' conftest.$ac_ext >&5
8128
8129 ac_cv_have_decl_tzname=no
8130fi
8131
8132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8133fi
8134{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
8135echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
8136if test $ac_cv_have_decl_tzname = yes; then
8137
8138cat >>confdefs.h <<_ACEOF
8139#define HAVE_DECL_TZNAME 1
8140_ACEOF
8141
8142
8143else
8144 cat >>confdefs.h <<_ACEOF
8145#define HAVE_DECL_TZNAME 0
8146_ACEOF
8147
8148
8149fi
8150
8151
8152 { echo "$as_me:$LINENO: checking for tzname" >&5
8153echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 8154if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 8155 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8156else
98418dba 8157 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8158/* confdefs.h. */
8159_ACEOF
8160cat confdefs.h >>conftest.$ac_ext
8161cat >>conftest.$ac_ext <<_ACEOF
8162/* end confdefs.h. */
98418dba 8163#include <time.h>
d6e01aa5
KL
8164#if !HAVE_DECL_TZNAME
8165extern char *tzname[];
98418dba
CW
8166#endif
8167
98418dba
CW
8168int
8169main ()
8170{
d6e01aa5 8171return tzname[0][0];
98418dba
CW
8172 ;
8173 return 0;
8174}
8175_ACEOF
8176rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
8177if { (ac_try="$ac_link"
8178case "(($ac_try" in
8179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8180 *) ac_try_echo=$ac_try;;
8181esac
8182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8183 (eval "$ac_link") 2>conftest.er1
98418dba 8184 ac_status=$?
edfaf76d
LK
8185 grep -v '^ *+' conftest.er1 >conftest.err
8186 rm -f conftest.er1
8187 cat conftest.err >&5
c0d27fcc 8188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8189 (exit $ac_status); } && {
8190 test -z "$ac_c_werror_flag" ||
8191 test ! -s conftest.err
8192 } && test -s conftest$ac_exeext &&
8193 $as_test_x conftest$ac_exeext; then
98418dba
CW
8194 ac_cv_var_tzname=yes
8195else
8196 echo "$as_me: failed program was:" >&5
19650fd6
AS
8197sed 's/^/| /' conftest.$ac_ext >&5
8198
d6e01aa5 8199 ac_cv_var_tzname=no
ba4481b5 8200fi
d6e01aa5
KL
8201
8202rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 8203 conftest$ac_exeext conftest.$ac_ext
98418dba 8204fi
d6e01aa5
KL
8205{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
8206echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 8207 if test $ac_cv_var_tzname = yes; then
ba4481b5 8208
c0d27fcc 8209cat >>confdefs.h <<\_ACEOF
98418dba 8210#define HAVE_TZNAME 1
c0d27fcc 8211_ACEOF
503d2be0 8212
98418dba
CW
8213 fi
8214fi
503d2be0 8215
d6e01aa5
KL
8216{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
8217echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 8218if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
8219 echo $ECHO_N "(cached) $ECHO_C" >&6
8220else
8221 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8222/* confdefs.h. */
8223_ACEOF
8224cat confdefs.h >>conftest.$ac_ext
8225cat >>conftest.$ac_ext <<_ACEOF
8226/* end confdefs.h. */
98418dba 8227#include <time.h>
b936fae4 8228
98418dba
CW
8229int
8230main ()
8231{
b936fae4
AS
8232static struct tm ac_aggr;
8233if (ac_aggr.tm_gmtoff)
8234return 0;
98418dba
CW
8235 ;
8236 return 0;
8237}
8238_ACEOF
b936fae4 8239rm -f conftest.$ac_objext
d6e01aa5
KL
8240if { (ac_try="$ac_compile"
8241case "(($ac_try" in
8242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8243 *) ac_try_echo=$ac_try;;
8244esac
8245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8246 (eval "$ac_compile") 2>conftest.er1
98418dba 8247 ac_status=$?
edfaf76d
LK
8248 grep -v '^ *+' conftest.er1 >conftest.err
8249 rm -f conftest.er1
8250 cat conftest.err >&5
c0d27fcc 8251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8252 (exit $ac_status); } && {
8253 test -z "$ac_c_werror_flag" ||
8254 test ! -s conftest.err
8255 } && test -s conftest.$ac_objext; then
b936fae4 8256 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
8257else
8258 echo "$as_me: failed program was:" >&5
19650fd6
AS
8259sed 's/^/| /' conftest.$ac_ext >&5
8260
d6e01aa5 8261 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8262/* confdefs.h. */
8263_ACEOF
8264cat confdefs.h >>conftest.$ac_ext
8265cat >>conftest.$ac_ext <<_ACEOF
8266/* end confdefs.h. */
6bae0ccf
DL
8267#include <time.h>
8268
8799b3e4
CW
8269int
8270main ()
8271{
6bae0ccf
DL
8272static struct tm ac_aggr;
8273if (sizeof ac_aggr.tm_gmtoff)
8274return 0;
8799b3e4
CW
8275 ;
8276 return 0;
8277}
8278_ACEOF
6bae0ccf 8279rm -f conftest.$ac_objext
d6e01aa5
KL
8280if { (ac_try="$ac_compile"
8281case "(($ac_try" in
8282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8283 *) ac_try_echo=$ac_try;;
8284esac
8285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8286 (eval "$ac_compile") 2>conftest.er1
8799b3e4 8287 ac_status=$?
edfaf76d
LK
8288 grep -v '^ *+' conftest.er1 >conftest.err
8289 rm -f conftest.er1
8290 cat conftest.err >&5
c0d27fcc 8291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8292 (exit $ac_status); } && {
8293 test -z "$ac_c_werror_flag" ||
8294 test ! -s conftest.err
8295 } && test -s conftest.$ac_objext; then
6bae0ccf 8296 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
8297else
8298 echo "$as_me: failed program was:" >&5
19650fd6
AS
8299sed 's/^/| /' conftest.$ac_ext >&5
8300
d6e01aa5 8301 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 8302fi
d6e01aa5
KL
8303
8304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8305fi
d6e01aa5
KL
8306
8307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 8308fi
d6e01aa5
KL
8309{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
8310echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
8311if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
8312
8313cat >>confdefs.h <<\_ACEOF
8314#define HAVE_TM_GMTOFF 1
8315_ACEOF
8316
8317fi
8318
d6e01aa5
KL
8319{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
8320echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
8321if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
8322 echo $ECHO_N "(cached) $ECHO_C" >&6
8323else
8324 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8325/* confdefs.h. */
8326_ACEOF
8327cat confdefs.h >>conftest.$ac_ext
8328cat >>conftest.$ac_ext <<_ACEOF
8329/* end confdefs.h. */
7862d3a8
AS
8330$ac_includes_default
8331#if HAVE_SYS_SOCKET_H
8332#include <sys/socket.h>
8333#endif
8334#if HAVE_NET_IF_H
96f3a036 8335#include <net/if.h>
7862d3a8 8336#endif
96f3a036
DL
8337
8338int
8339main ()
8340{
8341static struct ifreq ac_aggr;
8342if (ac_aggr.ifr_flags)
8343return 0;
8344 ;
8345 return 0;
8346}
8347_ACEOF
8348rm -f conftest.$ac_objext
d6e01aa5
KL
8349if { (ac_try="$ac_compile"
8350case "(($ac_try" in
8351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8352 *) ac_try_echo=$ac_try;;
8353esac
8354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8355 (eval "$ac_compile") 2>conftest.er1
96f3a036 8356 ac_status=$?
edfaf76d
LK
8357 grep -v '^ *+' conftest.er1 >conftest.err
8358 rm -f conftest.er1
8359 cat conftest.err >&5
96f3a036 8360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8361 (exit $ac_status); } && {
8362 test -z "$ac_c_werror_flag" ||
8363 test ! -s conftest.err
8364 } && test -s conftest.$ac_objext; then
96f3a036
DL
8365 ac_cv_member_struct_ifreq_ifr_flags=yes
8366else
8367 echo "$as_me: failed program was:" >&5
8368sed 's/^/| /' conftest.$ac_ext >&5
8369
d6e01aa5 8370 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8371/* confdefs.h. */
8372_ACEOF
8373cat confdefs.h >>conftest.$ac_ext
8374cat >>conftest.$ac_ext <<_ACEOF
8375/* end confdefs.h. */
7862d3a8
AS
8376$ac_includes_default
8377#if HAVE_SYS_SOCKET_H
8378#include <sys/socket.h>
8379#endif
8380#if HAVE_NET_IF_H
96f3a036 8381#include <net/if.h>
7862d3a8 8382#endif
96f3a036
DL
8383
8384int
8385main ()
8386{
8387static struct ifreq ac_aggr;
8388if (sizeof ac_aggr.ifr_flags)
8389return 0;
8390 ;
8391 return 0;
8392}
8393_ACEOF
8394rm -f conftest.$ac_objext
d6e01aa5
KL
8395if { (ac_try="$ac_compile"
8396case "(($ac_try" in
8397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8398 *) ac_try_echo=$ac_try;;
8399esac
8400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8401 (eval "$ac_compile") 2>conftest.er1
96f3a036 8402 ac_status=$?
edfaf76d
LK
8403 grep -v '^ *+' conftest.er1 >conftest.err
8404 rm -f conftest.er1
8405 cat conftest.err >&5
96f3a036 8406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8407 (exit $ac_status); } && {
8408 test -z "$ac_c_werror_flag" ||
8409 test ! -s conftest.err
8410 } && test -s conftest.$ac_objext; then
96f3a036
DL
8411 ac_cv_member_struct_ifreq_ifr_flags=yes
8412else
8413 echo "$as_me: failed program was:" >&5
8414sed 's/^/| /' conftest.$ac_ext >&5
8415
d6e01aa5 8416 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8417fi
d6e01aa5
KL
8418
8419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8420fi
d6e01aa5
KL
8421
8422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8423fi
d6e01aa5
KL
8424{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8425echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8426if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8427
8428cat >>confdefs.h <<_ACEOF
8429#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8430_ACEOF
8431
8432
8433fi
d6e01aa5
KL
8434{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8435echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8436if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8437 echo $ECHO_N "(cached) $ECHO_C" >&6
8438else
8439 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8440/* confdefs.h. */
8441_ACEOF
8442cat confdefs.h >>conftest.$ac_ext
8443cat >>conftest.$ac_ext <<_ACEOF
8444/* end confdefs.h. */
7862d3a8
AS
8445$ac_includes_default
8446#if HAVE_SYS_SOCKET_H
8447#include <sys/socket.h>
8448#endif
8449#if HAVE_NET_IF_H
96f3a036 8450#include <net/if.h>
7862d3a8 8451#endif
96f3a036
DL
8452
8453int
8454main ()
8455{
8456static struct ifreq ac_aggr;
8457if (ac_aggr.ifr_hwaddr)
8458return 0;
8459 ;
8460 return 0;
8461}
8462_ACEOF
8463rm -f conftest.$ac_objext
d6e01aa5
KL
8464if { (ac_try="$ac_compile"
8465case "(($ac_try" in
8466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8467 *) ac_try_echo=$ac_try;;
8468esac
8469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8470 (eval "$ac_compile") 2>conftest.er1
96f3a036 8471 ac_status=$?
edfaf76d
LK
8472 grep -v '^ *+' conftest.er1 >conftest.err
8473 rm -f conftest.er1
8474 cat conftest.err >&5
96f3a036 8475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8476 (exit $ac_status); } && {
8477 test -z "$ac_c_werror_flag" ||
8478 test ! -s conftest.err
8479 } && test -s conftest.$ac_objext; then
96f3a036
DL
8480 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8481else
8482 echo "$as_me: failed program was:" >&5
8483sed 's/^/| /' conftest.$ac_ext >&5
8484
d6e01aa5 8485 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8486/* confdefs.h. */
8487_ACEOF
8488cat confdefs.h >>conftest.$ac_ext
8489cat >>conftest.$ac_ext <<_ACEOF
8490/* end confdefs.h. */
7862d3a8
AS
8491$ac_includes_default
8492#if HAVE_SYS_SOCKET_H
8493#include <sys/socket.h>
8494#endif
8495#if HAVE_NET_IF_H
96f3a036 8496#include <net/if.h>
7862d3a8 8497#endif
96f3a036
DL
8498
8499int
8500main ()
8501{
8502static struct ifreq ac_aggr;
8503if (sizeof ac_aggr.ifr_hwaddr)
8504return 0;
8505 ;
8506 return 0;
8507}
8508_ACEOF
8509rm -f conftest.$ac_objext
d6e01aa5
KL
8510if { (ac_try="$ac_compile"
8511case "(($ac_try" in
8512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8513 *) ac_try_echo=$ac_try;;
8514esac
8515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8516 (eval "$ac_compile") 2>conftest.er1
96f3a036 8517 ac_status=$?
edfaf76d
LK
8518 grep -v '^ *+' conftest.er1 >conftest.err
8519 rm -f conftest.er1
8520 cat conftest.err >&5
96f3a036 8521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8522 (exit $ac_status); } && {
8523 test -z "$ac_c_werror_flag" ||
8524 test ! -s conftest.err
8525 } && test -s conftest.$ac_objext; then
96f3a036
DL
8526 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8527else
8528 echo "$as_me: failed program was:" >&5
8529sed 's/^/| /' conftest.$ac_ext >&5
8530
d6e01aa5 8531 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8532fi
d6e01aa5
KL
8533
8534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8535fi
d6e01aa5
KL
8536
8537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8538fi
d6e01aa5
KL
8539{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8540echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8541if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8542
8543cat >>confdefs.h <<_ACEOF
8544#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8545_ACEOF
8546
8547
8548fi
d6e01aa5
KL
8549{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8550echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8551if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8552 echo $ECHO_N "(cached) $ECHO_C" >&6
8553else
8554 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8555/* confdefs.h. */
8556_ACEOF
8557cat confdefs.h >>conftest.$ac_ext
8558cat >>conftest.$ac_ext <<_ACEOF
8559/* end confdefs.h. */
7862d3a8
AS
8560$ac_includes_default
8561#if HAVE_SYS_SOCKET_H
8562#include <sys/socket.h>
8563#endif
8564#if HAVE_NET_IF_H
96f3a036 8565#include <net/if.h>
7862d3a8 8566#endif
96f3a036
DL
8567
8568int
8569main ()
8570{
8571static struct ifreq ac_aggr;
8572if (ac_aggr.ifr_netmask)
8573return 0;
8574 ;
8575 return 0;
8576}
8577_ACEOF
8578rm -f conftest.$ac_objext
d6e01aa5
KL
8579if { (ac_try="$ac_compile"
8580case "(($ac_try" in
8581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8582 *) ac_try_echo=$ac_try;;
8583esac
8584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8585 (eval "$ac_compile") 2>conftest.er1
96f3a036 8586 ac_status=$?
edfaf76d
LK
8587 grep -v '^ *+' conftest.er1 >conftest.err
8588 rm -f conftest.er1
8589 cat conftest.err >&5
96f3a036 8590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8591 (exit $ac_status); } && {
8592 test -z "$ac_c_werror_flag" ||
8593 test ! -s conftest.err
8594 } && test -s conftest.$ac_objext; then
96f3a036
DL
8595 ac_cv_member_struct_ifreq_ifr_netmask=yes
8596else
8597 echo "$as_me: failed program was:" >&5
8598sed 's/^/| /' conftest.$ac_ext >&5
8599
d6e01aa5 8600 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8601/* confdefs.h. */
8602_ACEOF
8603cat confdefs.h >>conftest.$ac_ext
8604cat >>conftest.$ac_ext <<_ACEOF
8605/* end confdefs.h. */
7862d3a8
AS
8606$ac_includes_default
8607#if HAVE_SYS_SOCKET_H
8608#include <sys/socket.h>
8609#endif
8610#if HAVE_NET_IF_H
96f3a036 8611#include <net/if.h>
7862d3a8 8612#endif
96f3a036
DL
8613
8614int
8615main ()
8616{
8617static struct ifreq ac_aggr;
8618if (sizeof ac_aggr.ifr_netmask)
8619return 0;
8620 ;
8621 return 0;
8622}
8623_ACEOF
8624rm -f conftest.$ac_objext
d6e01aa5
KL
8625if { (ac_try="$ac_compile"
8626case "(($ac_try" in
8627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8628 *) ac_try_echo=$ac_try;;
8629esac
8630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8631 (eval "$ac_compile") 2>conftest.er1
96f3a036 8632 ac_status=$?
edfaf76d
LK
8633 grep -v '^ *+' conftest.er1 >conftest.err
8634 rm -f conftest.er1
8635 cat conftest.err >&5
96f3a036 8636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8637 (exit $ac_status); } && {
8638 test -z "$ac_c_werror_flag" ||
8639 test ! -s conftest.err
8640 } && test -s conftest.$ac_objext; then
96f3a036
DL
8641 ac_cv_member_struct_ifreq_ifr_netmask=yes
8642else
8643 echo "$as_me: failed program was:" >&5
8644sed 's/^/| /' conftest.$ac_ext >&5
8645
d6e01aa5 8646 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8647fi
d6e01aa5
KL
8648
8649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8650fi
d6e01aa5
KL
8651
8652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8653fi
d6e01aa5
KL
8654{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8655echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8656if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8657
8658cat >>confdefs.h <<_ACEOF
8659#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8660_ACEOF
8661
8662
8663fi
d6e01aa5
KL
8664{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8665echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8666if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8667 echo $ECHO_N "(cached) $ECHO_C" >&6
8668else
8669 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8670/* confdefs.h. */
8671_ACEOF
8672cat confdefs.h >>conftest.$ac_ext
8673cat >>conftest.$ac_ext <<_ACEOF
8674/* end confdefs.h. */
7862d3a8
AS
8675$ac_includes_default
8676#if HAVE_SYS_SOCKET_H
8677#include <sys/socket.h>
8678#endif
8679#if HAVE_NET_IF_H
96f3a036 8680#include <net/if.h>
7862d3a8 8681#endif
96f3a036
DL
8682
8683int
8684main ()
8685{
8686static struct ifreq ac_aggr;
8687if (ac_aggr.ifr_broadaddr)
8688return 0;
8689 ;
8690 return 0;
8691}
8692_ACEOF
8693rm -f conftest.$ac_objext
d6e01aa5
KL
8694if { (ac_try="$ac_compile"
8695case "(($ac_try" in
8696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8697 *) ac_try_echo=$ac_try;;
8698esac
8699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8700 (eval "$ac_compile") 2>conftest.er1
96f3a036 8701 ac_status=$?
edfaf76d
LK
8702 grep -v '^ *+' conftest.er1 >conftest.err
8703 rm -f conftest.er1
8704 cat conftest.err >&5
96f3a036 8705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8706 (exit $ac_status); } && {
8707 test -z "$ac_c_werror_flag" ||
8708 test ! -s conftest.err
8709 } && test -s conftest.$ac_objext; then
96f3a036
DL
8710 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8711else
8712 echo "$as_me: failed program was:" >&5
8713sed 's/^/| /' conftest.$ac_ext >&5
8714
d6e01aa5 8715 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8716/* confdefs.h. */
8717_ACEOF
8718cat confdefs.h >>conftest.$ac_ext
8719cat >>conftest.$ac_ext <<_ACEOF
8720/* end confdefs.h. */
7862d3a8
AS
8721$ac_includes_default
8722#if HAVE_SYS_SOCKET_H
8723#include <sys/socket.h>
8724#endif
8725#if HAVE_NET_IF_H
96f3a036 8726#include <net/if.h>
7862d3a8 8727#endif
96f3a036
DL
8728
8729int
8730main ()
8731{
8732static struct ifreq ac_aggr;
8733if (sizeof ac_aggr.ifr_broadaddr)
8734return 0;
8735 ;
8736 return 0;
8737}
8738_ACEOF
8739rm -f conftest.$ac_objext
d6e01aa5
KL
8740if { (ac_try="$ac_compile"
8741case "(($ac_try" in
8742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8743 *) ac_try_echo=$ac_try;;
8744esac
8745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8746 (eval "$ac_compile") 2>conftest.er1
96f3a036 8747 ac_status=$?
edfaf76d
LK
8748 grep -v '^ *+' conftest.er1 >conftest.err
8749 rm -f conftest.er1
8750 cat conftest.err >&5
96f3a036 8751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8752 (exit $ac_status); } && {
8753 test -z "$ac_c_werror_flag" ||
8754 test ! -s conftest.err
8755 } && test -s conftest.$ac_objext; then
96f3a036
DL
8756 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8757else
8758 echo "$as_me: failed program was:" >&5
8759sed 's/^/| /' conftest.$ac_ext >&5
8760
d6e01aa5 8761 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8762fi
d6e01aa5
KL
8763
8764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8765fi
d6e01aa5
KL
8766
8767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8768fi
d6e01aa5
KL
8769{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8770echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8771if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8772
8773cat >>confdefs.h <<_ACEOF
8774#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8775_ACEOF
8776
8777
8778fi
d6e01aa5
KL
8779{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8780echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8781if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8782 echo $ECHO_N "(cached) $ECHO_C" >&6
8783else
8784 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8785/* confdefs.h. */
8786_ACEOF
8787cat confdefs.h >>conftest.$ac_ext
8788cat >>conftest.$ac_ext <<_ACEOF
8789/* end confdefs.h. */
7862d3a8
AS
8790$ac_includes_default
8791#if HAVE_SYS_SOCKET_H
8792#include <sys/socket.h>
8793#endif
8794#if HAVE_NET_IF_H
96f3a036 8795#include <net/if.h>
7862d3a8 8796#endif
96f3a036
DL
8797
8798int
8799main ()
8800{
8801static struct ifreq ac_aggr;
8802if (ac_aggr.ifr_addr)
8803return 0;
8804 ;
8805 return 0;
8806}
8807_ACEOF
8808rm -f conftest.$ac_objext
d6e01aa5
KL
8809if { (ac_try="$ac_compile"
8810case "(($ac_try" in
8811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8812 *) ac_try_echo=$ac_try;;
8813esac
8814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8815 (eval "$ac_compile") 2>conftest.er1
96f3a036 8816 ac_status=$?
edfaf76d
LK
8817 grep -v '^ *+' conftest.er1 >conftest.err
8818 rm -f conftest.er1
8819 cat conftest.err >&5
96f3a036 8820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8821 (exit $ac_status); } && {
8822 test -z "$ac_c_werror_flag" ||
8823 test ! -s conftest.err
8824 } && test -s conftest.$ac_objext; then
96f3a036
DL
8825 ac_cv_member_struct_ifreq_ifr_addr=yes
8826else
8827 echo "$as_me: failed program was:" >&5
8828sed 's/^/| /' conftest.$ac_ext >&5
8829
d6e01aa5 8830 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8831/* confdefs.h. */
8832_ACEOF
8833cat confdefs.h >>conftest.$ac_ext
8834cat >>conftest.$ac_ext <<_ACEOF
8835/* end confdefs.h. */
7862d3a8
AS
8836$ac_includes_default
8837#if HAVE_SYS_SOCKET_H
8838#include <sys/socket.h>
8839#endif
8840#if HAVE_NET_IF_H
96f3a036 8841#include <net/if.h>
7862d3a8 8842#endif
96f3a036
DL
8843
8844int
8845main ()
8846{
8847static struct ifreq ac_aggr;
8848if (sizeof ac_aggr.ifr_addr)
8849return 0;
8850 ;
8851 return 0;
8852}
8853_ACEOF
8854rm -f conftest.$ac_objext
d6e01aa5
KL
8855if { (ac_try="$ac_compile"
8856case "(($ac_try" in
8857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8858 *) ac_try_echo=$ac_try;;
8859esac
8860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8861 (eval "$ac_compile") 2>conftest.er1
96f3a036 8862 ac_status=$?
edfaf76d
LK
8863 grep -v '^ *+' conftest.er1 >conftest.err
8864 rm -f conftest.er1
8865 cat conftest.err >&5
96f3a036 8866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8867 (exit $ac_status); } && {
8868 test -z "$ac_c_werror_flag" ||
8869 test ! -s conftest.err
8870 } && test -s conftest.$ac_objext; then
96f3a036
DL
8871 ac_cv_member_struct_ifreq_ifr_addr=yes
8872else
8873 echo "$as_me: failed program was:" >&5
8874sed 's/^/| /' conftest.$ac_ext >&5
8875
d6e01aa5 8876 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8877fi
d6e01aa5
KL
8878
8879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8880fi
d6e01aa5
KL
8881
8882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8883fi
d6e01aa5
KL
8884{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8885echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8886if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8887
8888cat >>confdefs.h <<_ACEOF
8889#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8890_ACEOF
8891
8892
8893fi
8894
8799b3e4 8895
8799b3e4 8896
d6e01aa5
KL
8897{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8898echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8899if test "$ac_cv_prog_cc_c89" != no; then
8900 { echo "$as_me:$LINENO: result: yes" >&5
8901echo "${ECHO_T}yes" >&6; }
98418dba 8902
c0d27fcc 8903cat >>confdefs.h <<\_ACEOF
98418dba 8904#define PROTOTYPES 1
c0d27fcc
MR
8905_ACEOF
8906
8907
8908cat >>confdefs.h <<\_ACEOF
8909#define __PROTOTYPES 1
8910_ACEOF
98418dba
CW
8911
8912else
d6e01aa5
KL
8913 { echo "$as_me:$LINENO: result: no" >&5
8914echo "${ECHO_T}no" >&6; }
98418dba
CW
8915fi
8916
d6e01aa5
KL
8917{ echo "$as_me:$LINENO: checking for working volatile" >&5
8918echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8919if test "${ac_cv_c_volatile+set}" = set; then
8920 echo $ECHO_N "(cached) $ECHO_C" >&6
8921else
8922 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8923/* confdefs.h. */
8924_ACEOF
8925cat confdefs.h >>conftest.$ac_ext
8926cat >>conftest.$ac_ext <<_ACEOF
8927/* end confdefs.h. */
98418dba 8928
98418dba
CW
8929int
8930main ()
8931{
8932
8933volatile int x;
d6e01aa5
KL
8934int * volatile y = (int *) 0;
8935return !x && !y;
98418dba
CW
8936 ;
8937 return 0;
8938}
8939_ACEOF
8940rm -f conftest.$ac_objext
d6e01aa5
KL
8941if { (ac_try="$ac_compile"
8942case "(($ac_try" in
8943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8944 *) ac_try_echo=$ac_try;;
8945esac
8946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8947 (eval "$ac_compile") 2>conftest.er1
98418dba 8948 ac_status=$?
edfaf76d
LK
8949 grep -v '^ *+' conftest.er1 >conftest.err
8950 rm -f conftest.er1
8951 cat conftest.err >&5
c0d27fcc 8952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8953 (exit $ac_status); } && {
8954 test -z "$ac_c_werror_flag" ||
8955 test ! -s conftest.err
8956 } && test -s conftest.$ac_objext; then
98418dba
CW
8957 ac_cv_c_volatile=yes
8958else
8959 echo "$as_me: failed program was:" >&5
19650fd6
AS
8960sed 's/^/| /' conftest.$ac_ext >&5
8961
d6e01aa5 8962 ac_cv_c_volatile=no
98418dba 8963fi
d6e01aa5
KL
8964
8965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8966fi
d6e01aa5
KL
8967{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8968echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8969if test $ac_cv_c_volatile = no; then
8970
c0d27fcc 8971cat >>confdefs.h <<\_ACEOF
98418dba 8972#define volatile
c0d27fcc 8973_ACEOF
98418dba
CW
8974
8975fi
8976
d6e01aa5
KL
8977{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8978echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8979if test "${ac_cv_c_const+set}" = set; then
8980 echo $ECHO_N "(cached) $ECHO_C" >&6
8981else
8982 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8983/* confdefs.h. */
8984_ACEOF
8985cat confdefs.h >>conftest.$ac_ext
8986cat >>conftest.$ac_ext <<_ACEOF
8987/* end confdefs.h. */
98418dba 8988
98418dba
CW
8989int
8990main ()
8991{
8992/* FIXME: Include the comments suggested by Paul. */
8993#ifndef __cplusplus
8994 /* Ultrix mips cc rejects this. */
8995 typedef int charset[2];
d6e01aa5 8996 const charset cs;
98418dba 8997 /* SunOS 4.1.1 cc rejects this. */
d6e01aa5
KL
8998 char const *const *pcpcc;
8999 char **ppc;
98418dba
CW
9000 /* NEC SVR4.0.2 mips cc rejects this. */
9001 struct point {int x, y;};
9002 static struct point const zero = {0,0};
9003 /* AIX XL C 1.02.0.0 rejects this.
9004 It does not let you subtract one const X* pointer from another in
9005 an arm of an if-expression whose if-part is not a constant
9006 expression */
9007 const char *g = "string";
d6e01aa5 9008 pcpcc = &g + (g ? g-g : 0);
98418dba 9009 /* HPUX 7.0 cc rejects these. */
d6e01aa5
KL
9010 ++pcpcc;
9011 ppc = (char**) pcpcc;
9012 pcpcc = (char const *const *) ppc;
98418dba
CW
9013 { /* SCO 3.2v4 cc rejects this. */
9014 char *t;
9015 char const *s = 0 ? (char *) 0 : (char const *) 0;
9016
9017 *t++ = 0;
d6e01aa5 9018 if (s) return 0;
98418dba
CW
9019 }
9020 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9021 int x[] = {25, 17};
9022 const int *foo = &x[0];
9023 ++foo;
9024 }
9025 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9026 typedef const int *iptr;
9027 iptr p = 0;
9028 ++p;
9029 }
9030 { /* AIX XL C 1.02.0.0 rejects this saying
9031 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9032 struct s { int j; const int *ap[3]; };
9033 struct s *b; b->j = 5;
9034 }
9035 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9036 const int foo = 10;
d6e01aa5 9037 if (!foo) return 0;
98418dba 9038 }
d6e01aa5 9039 return !cs[0] && !zero.x;
98418dba
CW
9040#endif
9041
9042 ;
9043 return 0;
9044}
9045_ACEOF
9046rm -f conftest.$ac_objext
d6e01aa5
KL
9047if { (ac_try="$ac_compile"
9048case "(($ac_try" in
9049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9050 *) ac_try_echo=$ac_try;;
9051esac
9052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9053 (eval "$ac_compile") 2>conftest.er1
98418dba 9054 ac_status=$?
edfaf76d
LK
9055 grep -v '^ *+' conftest.er1 >conftest.err
9056 rm -f conftest.er1
9057 cat conftest.err >&5
c0d27fcc 9058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9059 (exit $ac_status); } && {
9060 test -z "$ac_c_werror_flag" ||
9061 test ! -s conftest.err
9062 } && test -s conftest.$ac_objext; then
98418dba
CW
9063 ac_cv_c_const=yes
9064else
9065 echo "$as_me: failed program was:" >&5
19650fd6
AS
9066sed 's/^/| /' conftest.$ac_ext >&5
9067
d6e01aa5 9068 ac_cv_c_const=no
98418dba 9069fi
d6e01aa5
KL
9070
9071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 9072fi
d6e01aa5
KL
9073{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
9074echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
9075if test $ac_cv_c_const = no; then
9076
c0d27fcc 9077cat >>confdefs.h <<\_ACEOF
98418dba 9078#define const
c0d27fcc 9079_ACEOF
98418dba
CW
9080
9081fi
9082
d6e01aa5
KL
9083{ echo "$as_me:$LINENO: checking for void * support" >&5
9084echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
9085if test "${emacs_cv_void_star+set}" = set; then
9086 echo $ECHO_N "(cached) $ECHO_C" >&6
9087else
9088 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9089/* confdefs.h. */
9090_ACEOF
9091cat confdefs.h >>conftest.$ac_ext
9092cat >>conftest.$ac_ext <<_ACEOF
9093/* end confdefs.h. */
98418dba 9094
98418dba
CW
9095int
9096main ()
9097{
9098void * foo;
9099 ;
9100 return 0;
9101}
9102_ACEOF
9103rm -f conftest.$ac_objext
d6e01aa5
KL
9104if { (ac_try="$ac_compile"
9105case "(($ac_try" in
9106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9107 *) ac_try_echo=$ac_try;;
9108esac
9109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9110 (eval "$ac_compile") 2>conftest.er1
98418dba 9111 ac_status=$?
edfaf76d
LK
9112 grep -v '^ *+' conftest.er1 >conftest.err
9113 rm -f conftest.er1
9114 cat conftest.err >&5
c0d27fcc 9115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9116 (exit $ac_status); } && {
9117 test -z "$ac_c_werror_flag" ||
9118 test ! -s conftest.err
9119 } && test -s conftest.$ac_objext; then
98418dba
CW
9120 emacs_cv_void_star=yes
9121else
9122 echo "$as_me: failed program was:" >&5
19650fd6
AS
9123sed 's/^/| /' conftest.$ac_ext >&5
9124
d6e01aa5 9125 emacs_cv_void_star=no
98418dba 9126fi
d6e01aa5
KL
9127
9128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 9129fi
d6e01aa5
KL
9130{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
9131echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 9132if test $emacs_cv_void_star = yes; then
c0d27fcc 9133 cat >>confdefs.h <<\_ACEOF
98418dba 9134#define POINTER_TYPE void
c0d27fcc 9135_ACEOF
98418dba
CW
9136
9137else
c0d27fcc 9138 cat >>confdefs.h <<\_ACEOF
98418dba 9139#define POINTER_TYPE char
c0d27fcc 9140_ACEOF
98418dba
CW
9141
9142fi
9143
c0d27fcc 9144
4494a266
JD
9145
9146
cd958eb3 9147
d6e01aa5
KL
9148{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
9149echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
9150set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
9151if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9152 echo $ECHO_N "(cached) $ECHO_C" >&6
9153else
c0d27fcc 9154 cat >conftest.make <<\_ACEOF
d6e01aa5 9155SHELL = /bin/sh
98418dba 9156all:
d6e01aa5 9157 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 9158_ACEOF
98418dba 9159# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
d6e01aa5
KL
9160case `${MAKE-make} -f conftest.make 2>/dev/null` in
9161 *@@@%%%=?*=@@@%%%*)
9162 eval ac_cv_prog_make_${ac_make}_set=yes;;
9163 *)
9164 eval ac_cv_prog_make_${ac_make}_set=no;;
9165esac
98418dba
CW
9166rm -f conftest.make
9167fi
d6e01aa5
KL
9168if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
9169 { echo "$as_me:$LINENO: result: yes" >&5
9170echo "${ECHO_T}yes" >&6; }
98418dba
CW
9171 SET_MAKE=
9172else
d6e01aa5
KL
9173 { echo "$as_me:$LINENO: result: no" >&5
9174echo "${ECHO_T}no" >&6; }
98418dba
CW
9175 SET_MAKE="MAKE=${MAKE-make}"
9176fi
9177
c0d27fcc 9178
d6e01aa5
KL
9179{ echo "$as_me:$LINENO: checking for long file names" >&5
9180echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
9181if test "${ac_cv_sys_long_file_names+set}" = set; then
9182 echo $ECHO_N "(cached) $ECHO_C" >&6
9183else
9184 ac_cv_sys_long_file_names=yes
9185# Test for long file names in all the places we know might matter:
9186# . the current directory, where building will happen
9187# $prefix/lib where we will be installing things
9188# $exec_prefix/lib likewise
98418dba 9189# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
9190# /tmp where it might want to write temporary files
9191# /var/tmp likewise
9192# /usr/tmp likewise
d6e01aa5
KL
9193for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9194 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9195 # in the usual case where exec_prefix is '${prefix}'.
9196 case $ac_dir in #(
9197 . | /* | ?:[\\/]*) ;; #(
9198 *) continue;;
9199 esac
9200 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 9201 ac_xdir=$ac_dir/cf$$
d6e01aa5 9202 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
9203 ac_tf1=$ac_xdir/conftest9012345
9204 ac_tf2=$ac_xdir/conftest9012346
d6e01aa5 9205 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 9206 ac_cv_sys_long_file_names=no
d6e01aa5
KL
9207 rm -f -r "$ac_xdir" 2>/dev/null
9208 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
9209done
9210fi
d6e01aa5
KL
9211{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
9212echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
9213if test $ac_cv_sys_long_file_names = yes; then
9214
c0d27fcc 9215cat >>confdefs.h <<\_ACEOF
98418dba 9216#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 9217_ACEOF
98418dba
CW
9218
9219fi
9220
c0d27fcc 9221
98418dba
CW
9222#### Choose a window system.
9223
d6e01aa5
KL
9224{ echo "$as_me:$LINENO: checking for X" >&5
9225echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 9226
c0d27fcc 9227
d6e01aa5 9228# Check whether --with-x was given.
98418dba 9229if test "${with_x+set}" = set; then
d6e01aa5
KL
9230 withval=$with_x;
9231fi
98418dba 9232
98418dba
CW
9233# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9234if test "x$with_x" = xno; then
9235 # The user explicitly disabled X.
9236 have_x=disabled
9237else
d6e01aa5
KL
9238 case $x_includes,$x_libraries in #(
9239 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
9240echo "$as_me: error: Cannot use X directory names containing '" >&2;}
9241 { (exit 1); exit 1; }; };; #(
9242 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
9243 echo $ECHO_N "(cached) $ECHO_C" >&6
9244else
9245 # One or both of the vars are not set, and there is no cached value.
9246ac_x_includes=no ac_x_libraries=no
d6e01aa5 9247rm -f -r conftest.dir
98418dba
CW
9248if mkdir conftest.dir; then
9249 cd conftest.dir
c0d27fcc 9250 cat >Imakefile <<'_ACEOF'
d6e01aa5
KL
9251incroot:
9252 @echo incroot='${INCROOT}'
9253usrlibdir:
9254 @echo usrlibdir='${USRLIBDIR}'
9255libdir:
9256 @echo libdir='${LIBDIR}'
9257_ACEOF
9258 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 9259 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
d6e01aa5
KL
9260 for ac_var in incroot usrlibdir libdir; do
9261 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9262 done
98418dba
CW
9263 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9264 for ac_extension in a so sl; do
d6e01aa5
KL
9265 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9266 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 9267 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
9268 fi
9269 done
9270 # Screen out bogus values from the imake configuration. They are
9271 # bogus both because they are the default anyway, and because
9272 # using them would break gcc on systems where it needs fixed includes.
9273 case $ac_im_incroot in
d6e01aa5 9274 /usr/include) ac_x_includes= ;;
98418dba
CW
9275 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9276 esac
9277 case $ac_im_usrlibdir in
9278 /usr/lib | /lib) ;;
9279 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9280 esac
9281 fi
9282 cd ..
d6e01aa5 9283 rm -f -r conftest.dir
98418dba
CW
9284fi
9285
9286# Standard set of common directories for X headers.
9287# Check X11 before X11Rn because it is often a symlink to the current release.
9288ac_x_header_dirs='
9289/usr/X11/include
9290/usr/X11R6/include
9291/usr/X11R5/include
9292/usr/X11R4/include
9293
9294/usr/include/X11
9295/usr/include/X11R6
9296/usr/include/X11R5
9297/usr/include/X11R4
9298
9299/usr/local/X11/include
9300/usr/local/X11R6/include
9301/usr/local/X11R5/include
9302/usr/local/X11R4/include
9303
9304/usr/local/include/X11
9305/usr/local/include/X11R6
9306/usr/local/include/X11R5
9307/usr/local/include/X11R4
9308
9309/usr/X386/include
9310/usr/x386/include
9311/usr/XFree86/include/X11
9312
9313/usr/include
9314/usr/local/include
9315/usr/unsupported/include
9316/usr/athena/include
9317/usr/local/x11r5/include
9318/usr/lpp/Xamples/include
9319
9320/usr/openwin/include
9321/usr/openwin/share/include'
9322
9323if test "$ac_x_includes" = no; then
d6e01aa5 9324 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
9325 # First, try using that file with no special directory specified.
9326 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9327/* confdefs.h. */
9328_ACEOF
9329cat confdefs.h >>conftest.$ac_ext
9330cat >>conftest.$ac_ext <<_ACEOF
9331/* end confdefs.h. */
c3a63088 9332#include <X11/Xlib.h>
98418dba 9333_ACEOF
d6e01aa5
KL
9334if { (ac_try="$ac_cpp conftest.$ac_ext"
9335case "(($ac_try" in
9336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9337 *) ac_try_echo=$ac_try;;
9338esac
9339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9340 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9341 ac_status=$?
6bae0ccf 9342 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9343 rm -f conftest.er1
9344 cat conftest.err >&5
c0d27fcc 9345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9346 (exit $ac_status); } >/dev/null && {
9347 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9348 test ! -s conftest.err
9349 }; then
98418dba
CW
9350 # We can compile using X headers with no special include directory.
9351ac_x_includes=
9352else
9353 echo "$as_me: failed program was:" >&5
19650fd6
AS
9354sed 's/^/| /' conftest.$ac_ext >&5
9355
98418dba 9356 for ac_dir in $ac_x_header_dirs; do
c3a63088 9357 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9358 ac_x_includes=$ac_dir
9359 break
9360 fi
9361done
9362fi
d6e01aa5 9363
98418dba
CW
9364rm -f conftest.err conftest.$ac_ext
9365fi # $ac_x_includes = no
9366
9367if test "$ac_x_libraries" = no; then
9368 # Check for the libraries.
9369 # See if we find them without any special options.
9370 # Don't add to $LIBS permanently.
9371 ac_save_LIBS=$LIBS
c3a63088 9372 LIBS="-lX11 $LIBS"
98418dba 9373 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9374/* confdefs.h. */
9375_ACEOF
9376cat confdefs.h >>conftest.$ac_ext
9377cat >>conftest.$ac_ext <<_ACEOF
9378/* end confdefs.h. */
c3a63088 9379#include <X11/Xlib.h>
98418dba
CW
9380int
9381main ()
9382{
c3a63088 9383XrmInitialize ()
98418dba
CW
9384 ;
9385 return 0;
9386}
9387_ACEOF
9388rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9389if { (ac_try="$ac_link"
9390case "(($ac_try" in
9391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9392 *) ac_try_echo=$ac_try;;
9393esac
9394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9395 (eval "$ac_link") 2>conftest.er1
98418dba 9396 ac_status=$?
edfaf76d
LK
9397 grep -v '^ *+' conftest.er1 >conftest.err
9398 rm -f conftest.er1
9399 cat conftest.err >&5
c0d27fcc 9400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9401 (exit $ac_status); } && {
9402 test -z "$ac_c_werror_flag" ||
9403 test ! -s conftest.err
9404 } && test -s conftest$ac_exeext &&
9405 $as_test_x conftest$ac_exeext; then
98418dba
CW
9406 LIBS=$ac_save_LIBS
9407# We can link X programs with no special library path.
9408ac_x_libraries=
9409else
9410 echo "$as_me: failed program was:" >&5
19650fd6
AS
9411sed 's/^/| /' conftest.$ac_ext >&5
9412
d6e01aa5 9413 LIBS=$ac_save_LIBS
98418dba
CW
9414for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9415do
9416 # Don't even attempt the hair of trying to link an X program!
9417 for ac_extension in a so sl; do
d6e01aa5 9418 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9419 ac_x_libraries=$ac_dir
9420 break 2
9421 fi
9422 done
9423done
9424fi
d6e01aa5
KL
9425
9426rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9427 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9428fi # $ac_x_libraries = no
9429
d6e01aa5
KL
9430case $ac_x_includes,$ac_x_libraries in #(
9431 no,* | *,no | *\'*)
9432 # Didn't find X, or a directory has "'" in its name.
9433 ac_cv_have_x="have_x=no";; #(
9434 *)
9435 # Record where we found X for the cache.
9436 ac_cv_have_x="have_x=yes\
9437 ac_x_includes='$ac_x_includes'\
9438 ac_x_libraries='$ac_x_libraries'"
9439esac
98418dba 9440fi
d6e01aa5
KL
9441;; #(
9442 *) have_x=yes;;
9443 esac
98418dba
CW
9444 eval "$ac_cv_have_x"
9445fi # $with_x != no
9446
9447if test "$have_x" != yes; then
d6e01aa5
KL
9448 { echo "$as_me:$LINENO: result: $have_x" >&5
9449echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9450 no_x=yes
9451else
9452 # If each of the values was on the command line, it overrides each guess.
9453 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9454 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9455 # Update the cache value to reflect the command line values.
d6e01aa5
KL
9456 ac_cv_have_x="have_x=yes\
9457 ac_x_includes='$x_includes'\
9458 ac_x_libraries='$x_libraries'"
9459 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9460echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9461fi
9462
9463if test "$no_x" = yes; then
9464 window_system=none
9465else
9466 window_system=x11
9467fi
9468
92d1ccf4
AS
9469if test "${x_libraries}" != NONE; then
9470 if test -n "${x_libraries}"; then
9471 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9472 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9473 fi
98418dba 9474 x_default_search_path=""
92d1ccf4
AS
9475 x_search_path=${x_libraries}
9476 if test -z "${x_search_path}"; then
9477 x_search_path=/usr/lib
9478 fi
9479 for x_library in `echo ${x_search_path}: | \
9480 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9481 x_search_path="\
9482${x_library}/X11/%L/%T/%N%C%S:\
9483${x_library}/X11/%l/%T/%N%C%S:\
9484${x_library}/X11/%T/%N%C%S:\
9485${x_library}/X11/%L/%T/%N%S:\
9486${x_library}/X11/%l/%T/%N%S:\
9487${x_library}/X11/%T/%N%S"
9488 if test x"${x_default_search_path}" = x; then
9489 x_default_search_path=${x_search_path}
9490 else
9491 x_default_search_path="${x_search_path}:${x_default_search_path}"
9492 fi
9493 done
9494fi
9495if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9496 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9497fi
9498
9499if test x"${x_includes}" = x; then
9500 bitmapdir=/usr/include/X11/bitmaps
9501else
9502 # accumulate include directories that have X11 bitmap subdirectories
9503 bmd_acc="dummyval"
9504 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9505 if test -d "${bmd}/X11/bitmaps"; then
9506 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9507 fi
9508 if test -d "${bmd}/bitmaps"; then
9509 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9510 fi
9511 done
9512 if test ${bmd_acc} != "dummyval"; then
9513 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9514 fi
9515fi
9516
5d6da11e 9517HAVE_CARBON=no
1d4d5604
YM
9518if test "${with_carbon}" != no; then
9519 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
d6e01aa5
KL
9520 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9521echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9522if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9523 echo $ECHO_N "(cached) $ECHO_C" >&6
9524fi
d6e01aa5
KL
9525{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9526echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9527else
9528 # Is the header compilable?
d6e01aa5
KL
9529{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9530echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
9531cat >conftest.$ac_ext <<_ACEOF
9532/* confdefs.h. */
9533_ACEOF
9534cat confdefs.h >>conftest.$ac_ext
9535cat >>conftest.$ac_ext <<_ACEOF
9536/* end confdefs.h. */
9537$ac_includes_default
9538#include <Carbon/Carbon.h>
9539_ACEOF
9540rm -f conftest.$ac_objext
d6e01aa5
KL
9541if { (ac_try="$ac_compile"
9542case "(($ac_try" in
9543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9544 *) ac_try_echo=$ac_try;;
9545esac
9546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9547 (eval "$ac_compile") 2>conftest.er1
5d6da11e 9548 ac_status=$?
edfaf76d
LK
9549 grep -v '^ *+' conftest.er1 >conftest.err
9550 rm -f conftest.er1
9551 cat conftest.err >&5
5d6da11e 9552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9553 (exit $ac_status); } && {
9554 test -z "$ac_c_werror_flag" ||
9555 test ! -s conftest.err
9556 } && test -s conftest.$ac_objext; then
5d6da11e
YM
9557 ac_header_compiler=yes
9558else
9559 echo "$as_me: failed program was:" >&5
9560sed 's/^/| /' conftest.$ac_ext >&5
9561
d6e01aa5 9562 ac_header_compiler=no
5d6da11e 9563fi
d6e01aa5
KL
9564
9565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9566{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9567echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
9568
9569# Is the header present?
d6e01aa5
KL
9570{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9571echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
9572cat >conftest.$ac_ext <<_ACEOF
9573/* confdefs.h. */
9574_ACEOF
9575cat confdefs.h >>conftest.$ac_ext
9576cat >>conftest.$ac_ext <<_ACEOF
9577/* end confdefs.h. */
9578#include <Carbon/Carbon.h>
9579_ACEOF
d6e01aa5
KL
9580if { (ac_try="$ac_cpp conftest.$ac_ext"
9581case "(($ac_try" in
9582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9583 *) ac_try_echo=$ac_try;;
9584esac
9585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9586 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
9587 ac_status=$?
9588 grep -v '^ *+' conftest.er1 >conftest.err
9589 rm -f conftest.er1
9590 cat conftest.err >&5
9591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9592 (exit $ac_status); } >/dev/null && {
9593 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9594 test ! -s conftest.err
9595 }; then
5d6da11e
YM
9596 ac_header_preproc=yes
9597else
9598 echo "$as_me: failed program was:" >&5
9599sed 's/^/| /' conftest.$ac_ext >&5
9600
9601 ac_header_preproc=no
9602fi
d6e01aa5 9603
5d6da11e 9604rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
9605{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9606echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
9607
9608# So? What about this header?
edfaf76d
LK
9609case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9610 yes:no: )
5d6da11e
YM
9611 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9612echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9613 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
9614echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
9615 ac_header_preproc=yes
5d6da11e 9616 ;;
edfaf76d 9617 no:yes:* )
5d6da11e
YM
9618 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9619echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
9620 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9621echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9622 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
9623echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
9624 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
9625echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
9626 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9627echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9628 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
9629echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 9630
5d6da11e
YM
9631 ;;
9632esac
d6e01aa5
KL
9633{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9634echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9635if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9636 echo $ECHO_N "(cached) $ECHO_C" >&6
9637else
9638 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9639fi
d6e01aa5
KL
9640{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9641echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9642
9643fi
9644if test $ac_cv_header_Carbon_Carbon_h = yes; then
9645 HAVE_CARBON=yes
9646fi
9647
9648
1d4d5604
YM
9649fi
9650if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
9651 if test "${with_carbon+set}" != set \
9652 && test "${carbon_appdir_x+set}" != set; then
ec8fcb10
YM
9653 for var in with_x with_x_toolkit with_gtk with_xim \
9654 with_xpm with_jpeg with_tiff with_gif with_png; do
9655 if eval test \"\${$var+set}\" = set; then
9656 HAVE_CARBON=no
9657 break
9658 fi
9659 done
5d6da11e
YM
9660 fi
9661fi
1d4d5604
YM
9662if test "${HAVE_CARBON}" = yes; then
9663 window_system=mac
9664fi
9665
9666case "${window_system}" in
9667 x11 )
9668 HAVE_X_WINDOWS=yes
9669 HAVE_X11=yes
9670 case "${with_x_toolkit}" in
9671 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9672 motif ) USE_X_TOOLKIT=MOTIF ;;
9673 gtk ) with_gtk=yes
9674 USE_X_TOOLKIT=none ;;
9675 no ) USE_X_TOOLKIT=none ;;
089a966d
GM
9676 * )
9677 if test x"$with_gtk" = xyes; then
9678 USE_X_TOOLKIT=none
9679 else
9680 USE_X_TOOLKIT=maybe
9681 fi
9682 ;;
1d4d5604
YM
9683 esac
9684 ;;
9685 mac | none )
9686 HAVE_X_WINDOWS=no
9687 HAVE_X11=no
9688 USE_X_TOOLKIT=none
9689 ;;
9690esac
9691
cfe440b8
JD
9692if test "$window_system" = none && test "X$with_x" != "Xno"; then
9693 # Extract the first word of "X", so it can be a program name with args.
9694set dummy X; ac_word=$2
9695{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9696echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9697if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
9698 echo $ECHO_N "(cached) $ECHO_C" >&6
9699else
9700 if test -n "$HAVE_XSERVER"; then
9701 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9702else
9703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9704for as_dir in $PATH
9705do
9706 IFS=$as_save_IFS
9707 test -z "$as_dir" && as_dir=.
9708 for ac_exec_ext in '' $ac_executable_extensions; do
9709 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9710 ac_cv_prog_HAVE_XSERVER="true"
9711 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9712 break 2
9713 fi
9714done
9715done
9716IFS=$as_save_IFS
9717
9718 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9719fi
9720fi
9721HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9722if test -n "$HAVE_XSERVER"; then
9723 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9724echo "${ECHO_T}$HAVE_XSERVER" >&6; }
9725else
9726 { echo "$as_me:$LINENO: result: no" >&5
9727echo "${ECHO_T}no" >&6; }
9728fi
9729
9730
9731 if test "$HAVE_XSERVER" = true ||
9732 test -n "$DISPLAY" ||
9733 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9734 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
0cfc0546
GM
9735were found. You should install the relevant development files for X
9736and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9737sure you have development files for image handling, i.e.
9738tiff, gif, jpeg, png and xpm.
9739If you are sure you want Emacs compiled without X window support, pass
9740 --without-x
9741to configure." >&5
9742echo "$as_me: error: You seem to be running X, but no X development libraries
0cfc0546
GM
9743were found. You should install the relevant development files for X
9744and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9745sure you have development files for image handling, i.e.
9746tiff, gif, jpeg, png and xpm.
9747If you are sure you want Emacs compiled without X window support, pass
9748 --without-x
9749to configure." >&2;}
9750 { (exit 1); exit 1; }; }
9751 fi
9752fi
9753
1d4d5604
YM
9754### If we're using X11, we should use the X menu package.
9755HAVE_MENUS=no
9756case ${HAVE_X11} in
9757 yes ) HAVE_MENUS=yes ;;
9758esac
9759
9760if test "${opsys}" = "hpux9"; then
9761 case "${x_libraries}" in
9762 *X11R4* )
9763 opsysfile="s/hpux9-x11r4.h"
9764 ;;
9765 esac
9766fi
9767
9768if test "${opsys}" = "hpux9shr"; then
9769 case "${x_libraries}" in
9770 *X11R4* )
9771 opsysfile="s/hpux9shxr4.h"
9772 ;;
9773 esac
9774fi
5d6da11e 9775
98418dba
CW
9776### Compute the unexec source name from the object name.
9777UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
9778
9779# Do the opsystem or machine files prohibit the use of the GNU malloc?
9780# Assume not, until told otherwise.
9781GNU_MALLOC=yes
9782doug_lea_malloc=yes
d6e01aa5
KL
9783{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9784echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9785if test "${ac_cv_func_malloc_get_state+set}" = set; then
9786 echo $ECHO_N "(cached) $ECHO_C" >&6
9787else
9788 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9789/* confdefs.h. */
9790_ACEOF
9791cat confdefs.h >>conftest.$ac_ext
9792cat >>conftest.$ac_ext <<_ACEOF
9793/* end confdefs.h. */
edfaf76d
LK
9794/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9795 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9796#define malloc_get_state innocuous_malloc_get_state
9797
98418dba 9798/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9799 which can conflict with char malloc_get_state (); below.
9800 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9801 <limits.h> exists even on freestanding compilers. */
edfaf76d 9802
19650fd6
AS
9803#ifdef __STDC__
9804# include <limits.h>
9805#else
9806# include <assert.h>
9807#endif
edfaf76d
LK
9808
9809#undef malloc_get_state
9810
d6e01aa5
KL
9811/* Override any GCC internal prototype to avoid an error.
9812 Use char because int might match the return type of a GCC
9813 builtin and then its argument prototype would still apply. */
98418dba
CW
9814#ifdef __cplusplus
9815extern "C"
9816#endif
98418dba 9817char malloc_get_state ();
98418dba
CW
9818/* The GNU C library defines this for functions which it implements
9819 to always fail with ENOSYS. Some functions are actually named
9820 something starting with __ and the normal name is an alias. */
d6e01aa5 9821#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9822choke me
98418dba
CW
9823#endif
9824
19650fd6
AS
9825int
9826main ()
9827{
d6e01aa5 9828return malloc_get_state ();
98418dba
CW
9829 ;
9830 return 0;
9831}
9832_ACEOF
9833rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9834if { (ac_try="$ac_link"
9835case "(($ac_try" in
9836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9837 *) ac_try_echo=$ac_try;;
9838esac
9839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9840 (eval "$ac_link") 2>conftest.er1
98418dba 9841 ac_status=$?
edfaf76d
LK
9842 grep -v '^ *+' conftest.er1 >conftest.err
9843 rm -f conftest.er1
9844 cat conftest.err >&5
c0d27fcc 9845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9846 (exit $ac_status); } && {
9847 test -z "$ac_c_werror_flag" ||
9848 test ! -s conftest.err
9849 } && test -s conftest$ac_exeext &&
9850 $as_test_x conftest$ac_exeext; then
98418dba
CW
9851 ac_cv_func_malloc_get_state=yes
9852else
9853 echo "$as_me: failed program was:" >&5
19650fd6
AS
9854sed 's/^/| /' conftest.$ac_ext >&5
9855
d6e01aa5 9856 ac_cv_func_malloc_get_state=no
98418dba 9857fi
d6e01aa5
KL
9858
9859rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9860 conftest$ac_exeext conftest.$ac_ext
98418dba 9861fi
d6e01aa5
KL
9862{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9863echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9864if test $ac_cv_func_malloc_get_state = yes; then
9865 :
9866else
9867 doug_lea_malloc=no
9868fi
9869
d6e01aa5
KL
9870{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9871echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9872if test "${ac_cv_func_malloc_set_state+set}" = set; then
9873 echo $ECHO_N "(cached) $ECHO_C" >&6
9874else
9875 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9876/* confdefs.h. */
9877_ACEOF
9878cat confdefs.h >>conftest.$ac_ext
9879cat >>conftest.$ac_ext <<_ACEOF
9880/* end confdefs.h. */
edfaf76d
LK
9881/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9882 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9883#define malloc_set_state innocuous_malloc_set_state
9884
98418dba 9885/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9886 which can conflict with char malloc_set_state (); below.
9887 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9888 <limits.h> exists even on freestanding compilers. */
edfaf76d 9889
19650fd6
AS
9890#ifdef __STDC__
9891# include <limits.h>
9892#else
9893# include <assert.h>
9894#endif
edfaf76d
LK
9895
9896#undef malloc_set_state
9897
d6e01aa5
KL
9898/* Override any GCC internal prototype to avoid an error.
9899 Use char because int might match the return type of a GCC
9900 builtin and then its argument prototype would still apply. */
98418dba
CW
9901#ifdef __cplusplus
9902extern "C"
9903#endif
98418dba 9904char malloc_set_state ();
98418dba
CW
9905/* The GNU C library defines this for functions which it implements
9906 to always fail with ENOSYS. Some functions are actually named
9907 something starting with __ and the normal name is an alias. */
d6e01aa5 9908#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9909choke me
98418dba
CW
9910#endif
9911
19650fd6
AS
9912int
9913main ()
9914{
d6e01aa5 9915return malloc_set_state ();
98418dba
CW
9916 ;
9917 return 0;
9918}
9919_ACEOF
9920rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9921if { (ac_try="$ac_link"
9922case "(($ac_try" in
9923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9924 *) ac_try_echo=$ac_try;;
9925esac
9926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9927 (eval "$ac_link") 2>conftest.er1
98418dba 9928 ac_status=$?
edfaf76d
LK
9929 grep -v '^ *+' conftest.er1 >conftest.err
9930 rm -f conftest.er1
9931 cat conftest.err >&5
c0d27fcc 9932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9933 (exit $ac_status); } && {
9934 test -z "$ac_c_werror_flag" ||
9935 test ! -s conftest.err
9936 } && test -s conftest$ac_exeext &&
9937 $as_test_x conftest$ac_exeext; then
98418dba
CW
9938 ac_cv_func_malloc_set_state=yes
9939else
9940 echo "$as_me: failed program was:" >&5
19650fd6
AS
9941sed 's/^/| /' conftest.$ac_ext >&5
9942
d6e01aa5 9943 ac_cv_func_malloc_set_state=no
98418dba 9944fi
d6e01aa5
KL
9945
9946rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9947 conftest$ac_exeext conftest.$ac_ext
98418dba 9948fi
d6e01aa5
KL
9949{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9950echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9951if test $ac_cv_func_malloc_set_state = yes; then
9952 :
9953else
9954 doug_lea_malloc=no
9955fi
9956
d6e01aa5
KL
9957{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9958echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9959if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9960 echo $ECHO_N "(cached) $ECHO_C" >&6
9961else
9962 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9963/* confdefs.h. */
9964_ACEOF
9965cat confdefs.h >>conftest.$ac_ext
9966cat >>conftest.$ac_ext <<_ACEOF
9967/* end confdefs.h. */
98418dba 9968extern void (* __after_morecore_hook)();
98418dba
CW
9969int
9970main ()
9971{
9972__after_morecore_hook = 0
9973 ;
9974 return 0;
9975}
9976_ACEOF
9977rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9978if { (ac_try="$ac_link"
9979case "(($ac_try" in
9980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9981 *) ac_try_echo=$ac_try;;
9982esac
9983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9984 (eval "$ac_link") 2>conftest.er1
98418dba 9985 ac_status=$?
edfaf76d
LK
9986 grep -v '^ *+' conftest.er1 >conftest.err
9987 rm -f conftest.er1
9988 cat conftest.err >&5
c0d27fcc 9989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9990 (exit $ac_status); } && {
9991 test -z "$ac_c_werror_flag" ||
9992 test ! -s conftest.err
9993 } && test -s conftest$ac_exeext &&
9994 $as_test_x conftest$ac_exeext; then
98418dba
CW
9995 emacs_cv_var___after_morecore_hook=yes
9996else
9997 echo "$as_me: failed program was:" >&5
19650fd6
AS
9998sed 's/^/| /' conftest.$ac_ext >&5
9999
d6e01aa5 10000 emacs_cv_var___after_morecore_hook=no
98418dba 10001fi
d6e01aa5
KL
10002
10003rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10004 conftest$ac_exeext conftest.$ac_ext
98418dba 10005fi
d6e01aa5
KL
10006{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
10007echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
10008if test $emacs_cv_var___after_morecore_hook = no; then
10009 doug_lea_malloc=no
10010fi
10011if test "${system_malloc}" = "yes"; then
10012 GNU_MALLOC=no
10013 GNU_MALLOC_reason="
10014 (The GNU allocators don't work with this system configuration.)"
10015fi
10016if test "$doug_lea_malloc" = "yes" ; then
10017 if test "$GNU_MALLOC" = yes ; then
10018 GNU_MALLOC_reason="
10019 (Using Doug Lea's new malloc from the GNU C Library.)"
10020 fi
b936fae4 10021
c0d27fcc 10022cat >>confdefs.h <<\_ACEOF
98418dba 10023#define DOUG_LEA_MALLOC 1
c0d27fcc 10024_ACEOF
98418dba
CW
10025
10026fi
10027
10028if test x"${REL_ALLOC}" = x; then
10029 REL_ALLOC=${GNU_MALLOC}
10030fi
10031
10032
c0d27fcc
MR
10033
10034
10035for ac_header in stdlib.h unistd.h
98418dba
CW
10036do
10037as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
10038if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10039 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10040echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10041if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 10042 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 10043fi
d6e01aa5
KL
10044ac_res=`eval echo '${'$as_ac_Header'}'`
10045 { echo "$as_me:$LINENO: result: $ac_res" >&5
10046echo "${ECHO_T}$ac_res" >&6; }
98418dba 10047else
c0d27fcc 10048 # Is the header compilable?
d6e01aa5
KL
10049{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
10050echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 10051cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10052/* confdefs.h. */
10053_ACEOF
10054cat confdefs.h >>conftest.$ac_ext
10055cat >>conftest.$ac_ext <<_ACEOF
10056/* end confdefs.h. */
98418dba
CW
10057$ac_includes_default
10058#include <$ac_header>
10059_ACEOF
10060rm -f conftest.$ac_objext
d6e01aa5
KL
10061if { (ac_try="$ac_compile"
10062case "(($ac_try" in
10063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10064 *) ac_try_echo=$ac_try;;
10065esac
10066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10067 (eval "$ac_compile") 2>conftest.er1
98418dba 10068 ac_status=$?
edfaf76d
LK
10069 grep -v '^ *+' conftest.er1 >conftest.err
10070 rm -f conftest.er1
10071 cat conftest.err >&5
c0d27fcc 10072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10073 (exit $ac_status); } && {
10074 test -z "$ac_c_werror_flag" ||
10075 test ! -s conftest.err
10076 } && test -s conftest.$ac_objext; then
c0d27fcc 10077 ac_header_compiler=yes
98418dba
CW
10078else
10079 echo "$as_me: failed program was:" >&5
19650fd6
AS
10080sed 's/^/| /' conftest.$ac_ext >&5
10081
d6e01aa5 10082 ac_header_compiler=no
98418dba 10083fi
d6e01aa5
KL
10084
10085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10086{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10087echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 10088
c0d27fcc 10089# Is the header present?
d6e01aa5
KL
10090{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
10091echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 10092cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10093/* confdefs.h. */
10094_ACEOF
10095cat confdefs.h >>conftest.$ac_ext
10096cat >>conftest.$ac_ext <<_ACEOF
10097/* end confdefs.h. */
98418dba
CW
10098#include <$ac_header>
10099_ACEOF
d6e01aa5
KL
10100if { (ac_try="$ac_cpp conftest.$ac_ext"
10101case "(($ac_try" in
10102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10103 *) ac_try_echo=$ac_try;;
10104esac
10105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10106 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 10107 ac_status=$?
6bae0ccf 10108 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
10109 rm -f conftest.er1
10110 cat conftest.err >&5
c0d27fcc 10111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10112 (exit $ac_status); } >/dev/null && {
10113 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10114 test ! -s conftest.err
10115 }; then
c0d27fcc 10116 ac_header_preproc=yes
98418dba
CW
10117else
10118 echo "$as_me: failed program was:" >&5
19650fd6
AS
10119sed 's/^/| /' conftest.$ac_ext >&5
10120
c0d27fcc 10121 ac_header_preproc=no
98418dba 10122fi
d6e01aa5 10123
98418dba 10124rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
10125{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10126echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
10127
10128# So? What about this header?
edfaf76d
LK
10129case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10130 yes:no: )
c0d27fcc
MR
10131 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10132echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
10133 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10134echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10135 ac_header_preproc=yes
10136 ;;
10137 no:yes:* )
10138 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10139echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10140 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10141echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10142 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10143echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10144 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10145echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
10146 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10147echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
10148 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10149echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 10150
19650fd6 10151 ;;
c0d27fcc 10152esac
d6e01aa5
KL
10153{ echo "$as_me:$LINENO: checking for $ac_header" >&5
10154echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10155if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
10156 echo $ECHO_N "(cached) $ECHO_C" >&6
10157else
edfaf76d 10158 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 10159fi
d6e01aa5
KL
10160ac_res=`eval echo '${'$as_ac_Header'}'`
10161 { echo "$as_me:$LINENO: result: $ac_res" >&5
10162echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
10163
10164fi
98418dba 10165if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 10166 cat >>confdefs.h <<_ACEOF
98418dba 10167#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 10168_ACEOF
98418dba
CW
10169
10170fi
c0d27fcc 10171
98418dba
CW
10172done
10173
c0d27fcc 10174
98418dba
CW
10175for ac_func in getpagesize
10176do
10177as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
10178{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10179echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10180if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10181 echo $ECHO_N "(cached) $ECHO_C" >&6
10182else
10183 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10184/* confdefs.h. */
10185_ACEOF
10186cat confdefs.h >>conftest.$ac_ext
10187cat >>conftest.$ac_ext <<_ACEOF
10188/* end confdefs.h. */
edfaf76d
LK
10189/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10190 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10191#define $ac_func innocuous_$ac_func
10192
98418dba 10193/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10194 which can conflict with char $ac_func (); below.
10195 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10196 <limits.h> exists even on freestanding compilers. */
edfaf76d 10197
19650fd6
AS
10198#ifdef __STDC__
10199# include <limits.h>
10200#else
10201# include <assert.h>
10202#endif
edfaf76d
LK
10203
10204#undef $ac_func
10205
d6e01aa5
KL
10206/* Override any GCC internal prototype to avoid an error.
10207 Use char because int might match the return type of a GCC
10208 builtin and then its argument prototype would still apply. */
98418dba
CW
10209#ifdef __cplusplus
10210extern "C"
10211#endif
98418dba 10212char $ac_func ();
98418dba
CW
10213/* The GNU C library defines this for functions which it implements
10214 to always fail with ENOSYS. Some functions are actually named
10215 something starting with __ and the normal name is an alias. */
d6e01aa5 10216#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10217choke me
98418dba
CW
10218#endif
10219
19650fd6
AS
10220int
10221main ()
10222{
d6e01aa5 10223return $ac_func ();
98418dba
CW
10224 ;
10225 return 0;
10226}
10227_ACEOF
10228rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10229if { (ac_try="$ac_link"
10230case "(($ac_try" in
10231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10232 *) ac_try_echo=$ac_try;;
10233esac
10234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10235 (eval "$ac_link") 2>conftest.er1
98418dba 10236 ac_status=$?
edfaf76d
LK
10237 grep -v '^ *+' conftest.er1 >conftest.err
10238 rm -f conftest.er1
10239 cat conftest.err >&5
c0d27fcc 10240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10241 (exit $ac_status); } && {
10242 test -z "$ac_c_werror_flag" ||
10243 test ! -s conftest.err
10244 } && test -s conftest$ac_exeext &&
10245 $as_test_x conftest$ac_exeext; then
98418dba
CW
10246 eval "$as_ac_var=yes"
10247else
10248 echo "$as_me: failed program was:" >&5
19650fd6
AS
10249sed 's/^/| /' conftest.$ac_ext >&5
10250
d6e01aa5 10251 eval "$as_ac_var=no"
98418dba 10252fi
d6e01aa5
KL
10253
10254rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10255 conftest$ac_exeext conftest.$ac_ext
98418dba 10256fi
d6e01aa5
KL
10257ac_res=`eval echo '${'$as_ac_var'}'`
10258 { echo "$as_me:$LINENO: result: $ac_res" >&5
10259echo "${ECHO_T}$ac_res" >&6; }
98418dba 10260if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10261 cat >>confdefs.h <<_ACEOF
98418dba 10262#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10263_ACEOF
98418dba
CW
10264
10265fi
10266done
10267
d6e01aa5
KL
10268{ echo "$as_me:$LINENO: checking for working mmap" >&5
10269echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
10270if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
10271 echo $ECHO_N "(cached) $ECHO_C" >&6
10272else
10273 if test "$cross_compiling" = yes; then
10274 ac_cv_func_mmap_fixed_mapped=no
10275else
10276 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10277/* confdefs.h. */
10278_ACEOF
10279cat confdefs.h >>conftest.$ac_ext
10280cat >>conftest.$ac_ext <<_ACEOF
10281/* end confdefs.h. */
98418dba 10282$ac_includes_default
c0d27fcc
MR
10283/* malloc might have been renamed as rpl_malloc. */
10284#undef malloc
10285
98418dba
CW
10286/* Thanks to Mike Haertel and Jim Avera for this test.
10287 Here is a matrix of mmap possibilities:
10288 mmap private not fixed
10289 mmap private fixed at somewhere currently unmapped
10290 mmap private fixed at somewhere already mapped
10291 mmap shared not fixed
10292 mmap shared fixed at somewhere currently unmapped
10293 mmap shared fixed at somewhere already mapped
10294 For private mappings, we should verify that changes cannot be read()
10295 back from the file, nor mmap's back from the file at a different
10296 address. (There have been systems where private was not correctly
10297 implemented like the infamous i386 svr4.0, and systems where the
10298 VM page cache was not coherent with the file system buffer cache
10299 like early versions of FreeBSD and possibly contemporary NetBSD.)
10300 For shared mappings, we should conversely verify that changes get
c0d27fcc 10301 propagated back to all the places they're supposed to be.
98418dba
CW
10302
10303 Grep wants private fixed already mapped.
10304 The main things grep needs to know about mmap are:
10305 * does it exist and is it safe to write into the mmap'd area
10306 * how to use it (BSD variants) */
10307
10308#include <fcntl.h>
10309#include <sys/mman.h>
10310
d6e01aa5 10311#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10312char *malloc ();
10313#endif
10314
10315/* This mess was copied from the GNU getpagesize.h. */
d6e01aa5 10316#ifndef HAVE_GETPAGESIZE
98418dba 10317/* Assume that all systems that can run configure have sys/param.h. */
d6e01aa5 10318# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10319# define HAVE_SYS_PARAM_H 1
10320# endif
10321
10322# ifdef _SC_PAGESIZE
10323# define getpagesize() sysconf(_SC_PAGESIZE)
10324# else /* no _SC_PAGESIZE */
d6e01aa5 10325# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10326# include <sys/param.h>
10327# ifdef EXEC_PAGESIZE
10328# define getpagesize() EXEC_PAGESIZE
10329# else /* no EXEC_PAGESIZE */
10330# ifdef NBPG
10331# define getpagesize() NBPG * CLSIZE
10332# ifndef CLSIZE
10333# define CLSIZE 1
10334# endif /* no CLSIZE */
10335# else /* no NBPG */
10336# ifdef NBPC
10337# define getpagesize() NBPC
10338# else /* no NBPC */
10339# ifdef PAGESIZE
10340# define getpagesize() PAGESIZE
10341# endif /* PAGESIZE */
10342# endif /* no NBPC */
10343# endif /* no NBPG */
10344# endif /* no EXEC_PAGESIZE */
10345# else /* no HAVE_SYS_PARAM_H */
10346# define getpagesize() 8192 /* punt totally */
10347# endif /* no HAVE_SYS_PARAM_H */
10348# endif /* no _SC_PAGESIZE */
10349
10350#endif /* no HAVE_GETPAGESIZE */
10351
10352int
10353main ()
10354{
10355 char *data, *data2, *data3;
10356 int i, pagesize;
10357 int fd;
10358
10359 pagesize = getpagesize ();
10360
10361 /* First, make a file with some known garbage in it. */
10362 data = (char *) malloc (pagesize);
10363 if (!data)
d6e01aa5 10364 return 1;
98418dba
CW
10365 for (i = 0; i < pagesize; ++i)
10366 *(data + i) = rand ();
10367 umask (0);
10368 fd = creat ("conftest.mmap", 0600);
10369 if (fd < 0)
d6e01aa5 10370 return 1;
98418dba 10371 if (write (fd, data, pagesize) != pagesize)
d6e01aa5 10372 return 1;
98418dba
CW
10373 close (fd);
10374
10375 /* Next, try to mmap the file at a fixed address which already has
10376 something else allocated at it. If we can, also make sure that
10377 we see the same garbage. */
10378 fd = open ("conftest.mmap", O_RDWR);
10379 if (fd < 0)
d6e01aa5 10380 return 1;
98418dba
CW
10381 data2 = (char *) malloc (2 * pagesize);
10382 if (!data2)
d6e01aa5
KL
10383 return 1;
10384 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10385 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10386 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d6e01aa5 10387 return 1;
98418dba
CW
10388 for (i = 0; i < pagesize; ++i)
10389 if (*(data + i) != *(data2 + i))
d6e01aa5 10390 return 1;
98418dba
CW
10391
10392 /* Finally, make sure that changes to the mapped area do not
10393 percolate back to the file as seen by read(). (This is a bug on
10394 some variants of i386 svr4.0.) */
10395 for (i = 0; i < pagesize; ++i)
10396 *(data2 + i) = *(data2 + i) + 1;
10397 data3 = (char *) malloc (pagesize);
10398 if (!data3)
d6e01aa5 10399 return 1;
98418dba 10400 if (read (fd, data3, pagesize) != pagesize)
d6e01aa5 10401 return 1;
98418dba
CW
10402 for (i = 0; i < pagesize; ++i)
10403 if (*(data + i) != *(data3 + i))
d6e01aa5 10404 return 1;
98418dba 10405 close (fd);
d6e01aa5 10406 return 0;
98418dba
CW
10407}
10408_ACEOF
10409rm -f conftest$ac_exeext
d6e01aa5
KL
10410if { (ac_try="$ac_link"
10411case "(($ac_try" in
10412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10413 *) ac_try_echo=$ac_try;;
10414esac
10415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10416 (eval "$ac_link") 2>&5
98418dba 10417 ac_status=$?
c0d27fcc 10418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10419 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
10420 { (case "(($ac_try" in
10421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10422 *) ac_try_echo=$ac_try;;
10423esac
10424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10425 (eval "$ac_try") 2>&5
98418dba 10426 ac_status=$?
c0d27fcc 10427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10428 (exit $ac_status); }; }; then
10429 ac_cv_func_mmap_fixed_mapped=yes
10430else
10431 echo "$as_me: program exited with status $ac_status" >&5
10432echo "$as_me: failed program was:" >&5
19650fd6
AS
10433sed 's/^/| /' conftest.$ac_ext >&5
10434
c0d27fcc 10435( exit $ac_status )
98418dba
CW
10436ac_cv_func_mmap_fixed_mapped=no
10437fi
d6e01aa5 10438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10439fi
d6e01aa5
KL
10440
10441
98418dba 10442fi
d6e01aa5
KL
10443{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10444echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10445if test $ac_cv_func_mmap_fixed_mapped = yes; then
10446
c0d27fcc 10447cat >>confdefs.h <<\_ACEOF
98418dba 10448#define HAVE_MMAP 1
c0d27fcc 10449_ACEOF
98418dba
CW
10450
10451fi
10452rm -f conftest.mmap
10453
10454if test $use_mmap_for_buffers = yes; then
10455 REL_ALLOC=no
10456fi
10457
10458LIBS="$libsrc_libs $LIBS"
10459
c0d27fcc 10460
d6e01aa5
KL
10461{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10462echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10463if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10464 echo $ECHO_N "(cached) $ECHO_C" >&6
10465else
10466 ac_check_lib_save_LIBS=$LIBS
10467LIBS="-ldnet $LIBS"
10468cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10469/* confdefs.h. */
10470_ACEOF
10471cat confdefs.h >>conftest.$ac_ext
10472cat >>conftest.$ac_ext <<_ACEOF
10473/* end confdefs.h. */
98418dba 10474
d6e01aa5
KL
10475/* Override any GCC internal prototype to avoid an error.
10476 Use char because int might match the return type of a GCC
10477 builtin and then its argument prototype would still apply. */
98418dba
CW
10478#ifdef __cplusplus
10479extern "C"
10480#endif
98418dba 10481char dnet_ntoa ();
98418dba
CW
10482int
10483main ()
10484{
d6e01aa5 10485return dnet_ntoa ();
98418dba
CW
10486 ;
10487 return 0;
10488}
10489_ACEOF
10490rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10491if { (ac_try="$ac_link"
10492case "(($ac_try" in
10493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10494 *) ac_try_echo=$ac_try;;
10495esac
10496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10497 (eval "$ac_link") 2>conftest.er1
98418dba 10498 ac_status=$?
edfaf76d
LK
10499 grep -v '^ *+' conftest.er1 >conftest.err
10500 rm -f conftest.er1
10501 cat conftest.err >&5
c0d27fcc 10502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10503 (exit $ac_status); } && {
10504 test -z "$ac_c_werror_flag" ||
10505 test ! -s conftest.err
10506 } && test -s conftest$ac_exeext &&
10507 $as_test_x conftest$ac_exeext; then
98418dba
CW
10508 ac_cv_lib_dnet_dnet_ntoa=yes
10509else
10510 echo "$as_me: failed program was:" >&5
19650fd6
AS
10511sed 's/^/| /' conftest.$ac_ext >&5
10512
d6e01aa5 10513 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10514fi
d6e01aa5
KL
10515
10516rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10517 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10518LIBS=$ac_check_lib_save_LIBS
10519fi
d6e01aa5
KL
10520{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10521echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10522if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10523 cat >>confdefs.h <<_ACEOF
98418dba 10524#define HAVE_LIBDNET 1
c0d27fcc 10525_ACEOF
98418dba
CW
10526
10527 LIBS="-ldnet $LIBS"
10528
10529fi
10530
c0d27fcc 10531
d6e01aa5
KL
10532{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10533echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10534if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10535 echo $ECHO_N "(cached) $ECHO_C" >&6
10536else
10537 ac_check_lib_save_LIBS=$LIBS
10538LIBS="-lXbsd $LIBS"
10539cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10540/* confdefs.h. */
10541_ACEOF
10542cat confdefs.h >>conftest.$ac_ext
10543cat >>conftest.$ac_ext <<_ACEOF
10544/* end confdefs.h. */
98418dba 10545
c0d27fcc 10546
98418dba
CW
10547int
10548main ()
10549{
d6e01aa5 10550return main ();
98418dba
CW
10551 ;
10552 return 0;
10553}
10554_ACEOF
10555rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10556if { (ac_try="$ac_link"
10557case "(($ac_try" in
10558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10559 *) ac_try_echo=$ac_try;;
10560esac
10561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10562 (eval "$ac_link") 2>conftest.er1
98418dba 10563 ac_status=$?
edfaf76d
LK
10564 grep -v '^ *+' conftest.er1 >conftest.err
10565 rm -f conftest.er1
10566 cat conftest.err >&5
c0d27fcc 10567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10568 (exit $ac_status); } && {
10569 test -z "$ac_c_werror_flag" ||
10570 test ! -s conftest.err
10571 } && test -s conftest$ac_exeext &&
10572 $as_test_x conftest$ac_exeext; then
98418dba
CW
10573 ac_cv_lib_Xbsd_main=yes
10574else
10575 echo "$as_me: failed program was:" >&5
19650fd6
AS
10576sed 's/^/| /' conftest.$ac_ext >&5
10577
d6e01aa5 10578 ac_cv_lib_Xbsd_main=no
98418dba 10579fi
d6e01aa5
KL
10580
10581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10582 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10583LIBS=$ac_check_lib_save_LIBS
10584fi
d6e01aa5
KL
10585{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10586echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10587if test $ac_cv_lib_Xbsd_main = yes; then
10588 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10589fi
10590
c0d27fcc
MR
10591
10592
d6e01aa5
KL
10593{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10594echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10595if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10596 echo $ECHO_N "(cached) $ECHO_C" >&6
10597else
10598 ac_check_lib_save_LIBS=$LIBS
10599LIBS="-lpthreads $LIBS"
10600cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10601/* confdefs.h. */
10602_ACEOF
10603cat confdefs.h >>conftest.$ac_ext
10604cat >>conftest.$ac_ext <<_ACEOF
10605/* end confdefs.h. */
98418dba 10606
d6e01aa5
KL
10607/* Override any GCC internal prototype to avoid an error.
10608 Use char because int might match the return type of a GCC
10609 builtin and then its argument prototype would still apply. */
98418dba
CW
10610#ifdef __cplusplus
10611extern "C"
10612#endif
98418dba 10613char cma_open ();
98418dba
CW
10614int
10615main ()
10616{
d6e01aa5 10617return cma_open ();
98418dba
CW
10618 ;
10619 return 0;
10620}
10621_ACEOF
10622rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10623if { (ac_try="$ac_link"
10624case "(($ac_try" in
10625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10626 *) ac_try_echo=$ac_try;;
10627esac
10628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10629 (eval "$ac_link") 2>conftest.er1
98418dba 10630 ac_status=$?
edfaf76d
LK
10631 grep -v '^ *+' conftest.er1 >conftest.err
10632 rm -f conftest.er1
10633 cat conftest.err >&5
c0d27fcc 10634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10635 (exit $ac_status); } && {
10636 test -z "$ac_c_werror_flag" ||
10637 test ! -s conftest.err
10638 } && test -s conftest$ac_exeext &&
10639 $as_test_x conftest$ac_exeext; then
98418dba
CW
10640 ac_cv_lib_pthreads_cma_open=yes
10641else
10642 echo "$as_me: failed program was:" >&5
19650fd6
AS
10643sed 's/^/| /' conftest.$ac_ext >&5
10644
d6e01aa5 10645 ac_cv_lib_pthreads_cma_open=no
98418dba 10646fi
d6e01aa5
KL
10647
10648rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10649 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10650LIBS=$ac_check_lib_save_LIBS
10651fi
d6e01aa5
KL
10652{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10653echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10654if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10655 cat >>confdefs.h <<_ACEOF
98418dba 10656#define HAVE_LIBPTHREADS 1
c0d27fcc 10657_ACEOF
98418dba
CW
10658
10659 LIBS="-lpthreads $LIBS"
10660
10661fi
10662
c0d27fcc 10663
d6e01aa5
KL
10664{ echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
10665echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6; }
98418dba
CW
10666if test -d /usr/X386/include; then
10667 HAVE_XFREE386=yes
10668 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
10669else
10670 HAVE_XFREE386=no
10671fi
d6e01aa5
KL
10672{ echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
10673echo "${ECHO_T}$HAVE_XFREE386" >&6; }
98418dba 10674
55597d70
DL
10675
10676case ${host_os} in
10677aix*)
d6e01aa5
KL
10678 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10679echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10680if test "${gdb_cv_bigtoc+set}" = set; then
10681 echo $ECHO_N "(cached) $ECHO_C" >&6
10682else
10683
10684 case $GCC in
10685 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10686 *) gdb_cv_bigtoc=-bbigtoc ;;
10687 esac
10688
10689 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10690 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10691/* confdefs.h. */
10692_ACEOF
10693cat confdefs.h >>conftest.$ac_ext
10694cat >>conftest.$ac_ext <<_ACEOF
10695/* end confdefs.h. */
55597d70
DL
10696
10697int
10698main ()
10699{
10700int i;
10701 ;
10702 return 0;
10703}
10704_ACEOF
10705rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10706if { (ac_try="$ac_link"
10707case "(($ac_try" in
10708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10709 *) ac_try_echo=$ac_try;;
10710esac
10711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10712 (eval "$ac_link") 2>conftest.er1
55597d70 10713 ac_status=$?
edfaf76d
LK
10714 grep -v '^ *+' conftest.er1 >conftest.err
10715 rm -f conftest.er1
10716 cat conftest.err >&5
55597d70 10717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10718 (exit $ac_status); } && {
10719 test -z "$ac_c_werror_flag" ||
10720 test ! -s conftest.err
10721 } && test -s conftest$ac_exeext &&
10722 $as_test_x conftest$ac_exeext; then
55597d70
DL
10723 :
10724else
10725 echo "$as_me: failed program was:" >&5
19650fd6
AS
10726sed 's/^/| /' conftest.$ac_ext >&5
10727
d6e01aa5 10728 gdb_cv_bigtoc=
55597d70 10729fi
d6e01aa5
KL
10730
10731rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10732 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10733
10734fi
d6e01aa5
KL
10735{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10736echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10737 ;;
10738esac
10739
ae1a998c
RS
10740# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10741# used for the tests that follow. We set them back to REAL_CFLAGS and
10742# REAL_CPPFLAGS later on.
98418dba
CW
10743
10744REAL_CPPFLAGS="$CPPFLAGS"
10745
10746if test "${HAVE_X11}" = "yes"; then
10747 DEFS="$C_SWITCH_X_SITE $DEFS"
10748 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10749 LIBS="$LIBX $LIBS"
10750 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10751 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10752
10753 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10754 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10755 # but it's more convenient here to set LD_RUN_PATH
10756 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10757 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10758 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10759 export LD_RUN_PATH
10760 fi
10761
10762 if test "${opsys}" = "gnu-linux"; then
d6e01aa5
KL
10763 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10764echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10765 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10766/* confdefs.h. */
10767_ACEOF
10768cat confdefs.h >>conftest.$ac_ext
10769cat >>conftest.$ac_ext <<_ACEOF
10770/* end confdefs.h. */
98418dba 10771
98418dba
CW
10772int
10773main ()
10774{
10775XOpenDisplay ("foo");
10776 ;
10777 return 0;
10778}
10779_ACEOF
10780rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10781if { (ac_try="$ac_link"
10782case "(($ac_try" in
10783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10784 *) ac_try_echo=$ac_try;;
10785esac
10786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10787 (eval "$ac_link") 2>conftest.er1
98418dba 10788 ac_status=$?
edfaf76d
LK
10789 grep -v '^ *+' conftest.er1 >conftest.err
10790 rm -f conftest.er1
10791 cat conftest.err >&5
c0d27fcc 10792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10793 (exit $ac_status); } && {
10794 test -z "$ac_c_werror_flag" ||
10795 test ! -s conftest.err
10796 } && test -s conftest$ac_exeext &&
10797 $as_test_x conftest$ac_exeext; then
35996d22 10798 xlinux_first_failure=no
98418dba
CW
10799else
10800 echo "$as_me: failed program was:" >&5
19650fd6
AS
10801sed 's/^/| /' conftest.$ac_ext >&5
10802
d6e01aa5 10803 xlinux_first_failure=yes
98418dba 10804fi
d6e01aa5
KL
10805
10806rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10807 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10808 if test "${xlinux_first_failure}" = "yes"; then
10809 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10810 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10811 OLD_CPPFLAGS="$CPPFLAGS"
10812 OLD_LIBS="$LIBS"
10813 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10814 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10815 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10816 LIBS="$LIBS -b i486-linuxaout"
10817 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10818/* confdefs.h. */
10819_ACEOF
10820cat confdefs.h >>conftest.$ac_ext
10821cat >>conftest.$ac_ext <<_ACEOF
10822/* end confdefs.h. */
98418dba 10823
98418dba
CW
10824int
10825main ()
10826{
10827XOpenDisplay ("foo");
10828 ;
10829 return 0;
10830}
10831_ACEOF
10832rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10833if { (ac_try="$ac_link"
10834case "(($ac_try" in
10835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10836 *) ac_try_echo=$ac_try;;
10837esac
10838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10839 (eval "$ac_link") 2>conftest.er1
98418dba 10840 ac_status=$?
edfaf76d
LK
10841 grep -v '^ *+' conftest.er1 >conftest.err
10842 rm -f conftest.er1
10843 cat conftest.err >&5
c0d27fcc 10844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10845 (exit $ac_status); } && {
10846 test -z "$ac_c_werror_flag" ||
10847 test ! -s conftest.err
10848 } && test -s conftest$ac_exeext &&
10849 $as_test_x conftest$ac_exeext; then
98418dba
CW
10850 xlinux_second_failure=no
10851else
10852 echo "$as_me: failed program was:" >&5
19650fd6
AS
10853sed 's/^/| /' conftest.$ac_ext >&5
10854
d6e01aa5 10855 xlinux_second_failure=yes
98418dba 10856fi
d6e01aa5
KL
10857
10858rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10859 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10860 if test "${xlinux_second_failure}" = "yes"; then
10861 # If we get the same failure with -b, there is no use adding -b.
10862 # So take it out. This plays safe.
10863 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10864 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10865 CPPFLAGS="$OLD_CPPFLAGS"
10866 LIBS="$OLD_LIBS"
d6e01aa5
KL
10867 { echo "$as_me:$LINENO: result: no" >&5
10868echo "${ECHO_T}no" >&6; }
98418dba 10869 else
d6e01aa5
KL
10870 { echo "$as_me:$LINENO: result: yes" >&5
10871echo "${ECHO_T}yes" >&6; }
98418dba
CW
10872 fi
10873 else
d6e01aa5
KL
10874 { echo "$as_me:$LINENO: result: no" >&5
10875echo "${ECHO_T}no" >&6; }
98418dba
CW
10876 fi
10877 fi
10878
10879 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10880 # header files included from there.
d6e01aa5
KL
10881 { echo "$as_me:$LINENO: checking for Xkb" >&5
10882echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10883 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10884/* confdefs.h. */
10885_ACEOF
10886cat confdefs.h >>conftest.$ac_ext
10887cat >>conftest.$ac_ext <<_ACEOF
10888/* end confdefs.h. */
98418dba
CW
10889#include <X11/Xlib.h>
10890#include <X11/XKBlib.h>
98418dba
CW
10891int
10892main ()
10893{
10894XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10895 ;
10896 return 0;
10897}
10898_ACEOF
10899rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10900if { (ac_try="$ac_link"
10901case "(($ac_try" in
10902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10903 *) ac_try_echo=$ac_try;;
10904esac
10905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10906 (eval "$ac_link") 2>conftest.er1
98418dba 10907 ac_status=$?
edfaf76d
LK
10908 grep -v '^ *+' conftest.er1 >conftest.err
10909 rm -f conftest.er1
10910 cat conftest.err >&5
c0d27fcc 10911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10912 (exit $ac_status); } && {
10913 test -z "$ac_c_werror_flag" ||
10914 test ! -s conftest.err
10915 } && test -s conftest$ac_exeext &&
10916 $as_test_x conftest$ac_exeext; then
98418dba
CW
10917 emacs_xkb=yes
10918else
10919 echo "$as_me: failed program was:" >&5
19650fd6
AS
10920sed 's/^/| /' conftest.$ac_ext >&5
10921
d6e01aa5 10922 emacs_xkb=no
98418dba 10923fi
d6e01aa5
KL
10924
10925rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10926 conftest$ac_exeext conftest.$ac_ext
d6e01aa5
KL
10927 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10928echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10929 if test $emacs_xkb = yes; then
b936fae4 10930
c0d27fcc 10931cat >>confdefs.h <<\_ACEOF
98418dba 10932#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10933_ACEOF
98418dba
CW
10934
10935 fi
10936
c0d27fcc
MR
10937
10938
10939
10940
98418dba
CW
10941for ac_func in XrmSetDatabase XScreenResourceString \
10942XScreenNumberOfScreen XSetWMProtocols
10943do
10944as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
10945{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10946echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10947if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10948 echo $ECHO_N "(cached) $ECHO_C" >&6
10949else
10950 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10951/* confdefs.h. */
10952_ACEOF
10953cat confdefs.h >>conftest.$ac_ext
10954cat >>conftest.$ac_ext <<_ACEOF
10955/* end confdefs.h. */
edfaf76d
LK
10956/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10957 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10958#define $ac_func innocuous_$ac_func
10959
98418dba 10960/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10961 which can conflict with char $ac_func (); below.
10962 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10963 <limits.h> exists even on freestanding compilers. */
edfaf76d 10964
19650fd6
AS
10965#ifdef __STDC__
10966# include <limits.h>
10967#else
10968# include <assert.h>
10969#endif
edfaf76d
LK
10970
10971#undef $ac_func
10972
d6e01aa5
KL
10973/* Override any GCC internal prototype to avoid an error.
10974 Use char because int might match the return type of a GCC
10975 builtin and then its argument prototype would still apply. */
98418dba
CW
10976#ifdef __cplusplus
10977extern "C"
10978#endif
98418dba 10979char $ac_func ();
98418dba
CW
10980/* The GNU C library defines this for functions which it implements
10981 to always fail with ENOSYS. Some functions are actually named
10982 something starting with __ and the normal name is an alias. */
d6e01aa5 10983#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10984choke me
98418dba
CW
10985#endif
10986
19650fd6
AS
10987int
10988main ()
10989{
d6e01aa5 10990return $ac_func ();
98418dba
CW
10991 ;
10992 return 0;
10993}
10994_ACEOF
10995rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10996if { (ac_try="$ac_link"
10997case "(($ac_try" in
10998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10999 *) ac_try_echo=$ac_try;;
11000esac
11001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11002 (eval "$ac_link") 2>conftest.er1
98418dba 11003 ac_status=$?
edfaf76d
LK
11004 grep -v '^ *+' conftest.er1 >conftest.err
11005 rm -f conftest.er1
11006 cat conftest.err >&5
c0d27fcc 11007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11008 (exit $ac_status); } && {
11009 test -z "$ac_c_werror_flag" ||
11010 test ! -s conftest.err
11011 } && test -s conftest$ac_exeext &&
11012 $as_test_x conftest$ac_exeext; then
98418dba
CW
11013 eval "$as_ac_var=yes"
11014else
11015 echo "$as_me: failed program was:" >&5
19650fd6
AS
11016sed 's/^/| /' conftest.$ac_ext >&5
11017
d6e01aa5 11018 eval "$as_ac_var=no"
98418dba 11019fi
d6e01aa5
KL
11020
11021rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11022 conftest$ac_exeext conftest.$ac_ext
98418dba 11023fi
d6e01aa5
KL
11024ac_res=`eval echo '${'$as_ac_var'}'`
11025 { echo "$as_me:$LINENO: result: $ac_res" >&5
11026echo "${ECHO_T}$ac_res" >&6; }
98418dba 11027if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11028 cat >>confdefs.h <<_ACEOF
98418dba 11029#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11030_ACEOF
98418dba
CW
11031
11032fi
11033done
11034
11035fi
11036
11037if test "${window_system}" = "x11"; then
d6e01aa5
KL
11038 { echo "$as_me:$LINENO: checking X11 version 6" >&5
11039echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
11040 if test "${emacs_cv_x11_version_6+set}" = set; then
11041 echo $ECHO_N "(cached) $ECHO_C" >&6
11042else
11043 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11044/* confdefs.h. */
11045_ACEOF
11046cat confdefs.h >>conftest.$ac_ext
11047cat >>conftest.$ac_ext <<_ACEOF
11048/* end confdefs.h. */
98418dba 11049#include <X11/Xlib.h>
98418dba
CW
11050int
11051main ()
11052{
11053#if XlibSpecificationRelease < 6
11054fail;
11055#endif
11056
11057 ;
11058 return 0;
11059}
11060_ACEOF
11061rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11062if { (ac_try="$ac_link"
11063case "(($ac_try" in
11064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11065 *) ac_try_echo=$ac_try;;
11066esac
11067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11068 (eval "$ac_link") 2>conftest.er1
98418dba 11069 ac_status=$?
edfaf76d
LK
11070 grep -v '^ *+' conftest.er1 >conftest.err
11071 rm -f conftest.er1
11072 cat conftest.err >&5
c0d27fcc 11073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11074 (exit $ac_status); } && {
11075 test -z "$ac_c_werror_flag" ||
11076 test ! -s conftest.err
11077 } && test -s conftest$ac_exeext &&
11078 $as_test_x conftest$ac_exeext; then
98418dba
CW
11079 emacs_cv_x11_version_6=yes
11080else
11081 echo "$as_me: failed program was:" >&5
19650fd6
AS
11082sed 's/^/| /' conftest.$ac_ext >&5
11083
d6e01aa5 11084 emacs_cv_x11_version_6=no
98418dba 11085fi
d6e01aa5
KL
11086
11087rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11088 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11089fi
11090
11091 if test $emacs_cv_x11_version_6 = yes; then
d6e01aa5
KL
11092 { echo "$as_me:$LINENO: result: 6 or newer" >&5
11093echo "${ECHO_T}6 or newer" >&6; }
b936fae4 11094
c0d27fcc 11095cat >>confdefs.h <<\_ACEOF
98418dba 11096#define HAVE_X11R6 1
c0d27fcc 11097_ACEOF
98418dba
CW
11098
11099 else
d6e01aa5
KL
11100 { echo "$as_me:$LINENO: result: before 6" >&5
11101echo "${ECHO_T}before 6" >&6; }
98418dba
CW
11102 fi
11103fi
11104
98418dba 11105
0cfc0546
GM
11106### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
11107HAVE_RSVG=no
ae0476ed 11108if test "${HAVE_X11}" = "yes" || test "${HAVE_CARBON}" = "yes"; then
0cfc0546
GM
11109 if test "${with_rsvg}" != "no"; then
11110 if test "X${with_pkg_config_prog}" != X; then
11111 PKG_CONFIG="${with_pkg_config_prog}"
11112 fi
11113
11114 RSVG_REQUIRED=2.0.0
11115 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
11116
11117
11118 succeeded=no
11119
11120 if test -z "$PKG_CONFIG"; then
11121 # Extract the first word of "pkg-config", so it can be a program name with args.
11122set dummy pkg-config; ac_word=$2
11123{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11124echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11125if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11126 echo $ECHO_N "(cached) $ECHO_C" >&6
11127else
11128 case $PKG_CONFIG in
11129 [\\/]* | ?:[\\/]*)
11130 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11131 ;;
11132 *)
11133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11134for as_dir in $PATH
11135do
11136 IFS=$as_save_IFS
11137 test -z "$as_dir" && as_dir=.
11138 for ac_exec_ext in '' $ac_executable_extensions; do
11139 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11140 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11141 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11142 break 2
11143 fi
11144done
11145done
11146IFS=$as_save_IFS
11147
11148 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11149 ;;
11150esac
11151fi
11152PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11153if test -n "$PKG_CONFIG"; then
11154 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11155echo "${ECHO_T}$PKG_CONFIG" >&6; }
11156else
11157 { echo "$as_me:$LINENO: result: no" >&5
11158echo "${ECHO_T}no" >&6; }
11159fi
11160
11161
11162 fi
11163
11164 if test "$PKG_CONFIG" = "no" ; then
11165 :
11166 else
11167 PKG_CONFIG_MIN_VERSION=0.9.0
11168 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11169 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
11170echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
11171
11172 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
11173 { echo "$as_me:$LINENO: result: yes" >&5
11174echo "${ECHO_T}yes" >&6; }
11175 succeeded=yes
11176
11177 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
11178echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
11179 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
11180 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
11181echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
11182
11183 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
11184echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
11185 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
11186 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
11187echo "${ECHO_T}$RSVG_LIBS" >&6; }
11188 else
11189 { echo "$as_me:$LINENO: result: no" >&5
11190echo "${ECHO_T}no" >&6; }
11191 RSVG_CFLAGS=""
11192 RSVG_LIBS=""
11193 ## If we have a custom action on failure, don't print errors, but
11194 ## do set a variable so people can do so.
11195 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
11196
11197 fi
11198
11199
11200
11201 else
11202 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11203 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11204 fi
11205 fi
11206
11207 if test $succeeded = yes; then
11208 :
11209 else
11210 :
11211 fi
11212
11213
11214
11215
11216 if test ".${RSVG_CFLAGS}" != "."; then
11217 HAVE_RSVG=yes
11218
11219cat >>confdefs.h <<\_ACEOF
11220#define HAVE_RSVG 1
11221_ACEOF
11222
11223 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11224 LIBS="$RSVG_LIBS $LIBS"
11225 fi
11226 fi
11227fi
11228
11229
488dd4c4 11230HAVE_GTK=no
8eeae1c9
JD
11231if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then
11232 USE_X_TOOLKIT=none
11233fi
089a966d
GM
11234if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk" || \
11235 test "$USE_X_TOOLKIT" = "maybe"; then
cd890796 11236 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
11237 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
11238echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
11239 { (exit 1); exit 1; }; };
11240 fi
787eb67d
JD
11241 GLIB_REQUIRED=2.6
11242 GTK_REQUIRED=2.6
488dd4c4
JD
11243 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11244
11245 if test "X${with_pkg_config_prog}" != X; then
11246 PKG_CONFIG="${with_pkg_config_prog}"
11247 fi
11248
11249 succeeded=no
11250
11251 if test -z "$PKG_CONFIG"; then
11252 # Extract the first word of "pkg-config", so it can be a program name with args.
11253set dummy pkg-config; ac_word=$2
d6e01aa5
KL
11254{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11255echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
11256if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11257 echo $ECHO_N "(cached) $ECHO_C" >&6
11258else
11259 case $PKG_CONFIG in
11260 [\\/]* | ?:[\\/]*)
11261 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11262 ;;
11263 *)
11264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11265for as_dir in $PATH
11266do
11267 IFS=$as_save_IFS
11268 test -z "$as_dir" && as_dir=.
11269 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 11270 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
11271 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11272 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11273 break 2
11274 fi
11275done
11276done
d6e01aa5 11277IFS=$as_save_IFS
488dd4c4
JD
11278
11279 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11280 ;;
11281esac
11282fi
11283PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 11284if test -n "$PKG_CONFIG"; then
d6e01aa5
KL
11285 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11286echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 11287else
d6e01aa5
KL
11288 { echo "$as_me:$LINENO: result: no" >&5
11289echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11290fi
11291
d6e01aa5 11292
488dd4c4
JD
11293 fi
11294
11295 if test "$PKG_CONFIG" = "no" ; then
089a966d 11296 pkg_check_gtk=no
488dd4c4
JD
11297 else
11298 PKG_CONFIG_MIN_VERSION=0.9.0
11299 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
d6e01aa5
KL
11300 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
11301echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 11302
67db6aa2 11303 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
d6e01aa5
KL
11304 { echo "$as_me:$LINENO: result: yes" >&5
11305echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
11306 succeeded=yes
11307
d6e01aa5
KL
11308 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
11309echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 11310 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
11311 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
11312echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 11313
d6e01aa5
KL
11314 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
11315echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 11316 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
11317 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
11318echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 11319 else
d6e01aa5
KL
11320 { echo "$as_me:$LINENO: result: no" >&5
11321echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11322 GTK_CFLAGS=""
11323 GTK_LIBS=""
11324 ## If we have a custom action on failure, don't print errors, but
11325 ## do set a variable so people can do so.
11326 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 11327
488dd4c4
JD
11328 fi
11329
11330
11331
11332 else
11333 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11334 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11335 fi
11336 fi
11337
11338 if test $succeeded = yes; then
089a966d 11339 pkg_check_gtk=yes
488dd4c4 11340 else
089a966d
GM
11341 pkg_check_gtk=no
11342 fi
11343
11344 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
11345 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
11346echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
11347 { (exit 1); exit 1; }; }
11348 fi
089a966d
GM
11349fi
11350
11351
11352if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
11353
11354
11355
11356 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11357 CFLAGS="$CFLAGS $GTK_CFLAGS"
11358 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11359 GTK_COMPILES=no
57669b57 11360
8eeae1c9 11361for ac_func in gtk_main
57669b57
JD
11362do
11363as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11364{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11365echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11366if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11367 echo $ECHO_N "(cached) $ECHO_C" >&6
11368else
11369 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11370/* confdefs.h. */
11371_ACEOF
11372cat confdefs.h >>conftest.$ac_ext
11373cat >>conftest.$ac_ext <<_ACEOF
11374/* end confdefs.h. */
edfaf76d
LK
11375/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11376 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11377#define $ac_func innocuous_$ac_func
11378
57669b57
JD
11379/* System header to define __stub macros and hopefully few prototypes,
11380 which can conflict with char $ac_func (); below.
11381 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11382 <limits.h> exists even on freestanding compilers. */
edfaf76d 11383
57669b57
JD
11384#ifdef __STDC__
11385# include <limits.h>
11386#else
11387# include <assert.h>
11388#endif
edfaf76d
LK
11389
11390#undef $ac_func
11391
ca81d7a0
JD
11392/* Override any GCC internal prototype to avoid an error.
11393 Use char because int might match the return type of a GCC
11394 builtin and then its argument prototype would still apply. */
57669b57
JD
11395#ifdef __cplusplus
11396extern "C"
57669b57 11397#endif
57669b57
JD
11398char $ac_func ();
11399/* The GNU C library defines this for functions which it implements
11400 to always fail with ENOSYS. Some functions are actually named
11401 something starting with __ and the normal name is an alias. */
ca81d7a0 11402#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11403choke me
57669b57
JD
11404#endif
11405
11406int
11407main ()
11408{
ca81d7a0 11409return $ac_func ();
57669b57
JD
11410 ;
11411 return 0;
11412}
11413_ACEOF
11414rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11415if { (ac_try="$ac_link"
11416case "(($ac_try" in
11417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11418 *) ac_try_echo=$ac_try;;
11419esac
11420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11421 (eval "$ac_link") 2>conftest.er1
57669b57 11422 ac_status=$?
edfaf76d
LK
11423 grep -v '^ *+' conftest.er1 >conftest.err
11424 rm -f conftest.er1
11425 cat conftest.err >&5
57669b57 11426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11427 (exit $ac_status); } && {
11428 test -z "$ac_c_werror_flag" ||
11429 test ! -s conftest.err
11430 } && test -s conftest$ac_exeext &&
11431 $as_test_x conftest$ac_exeext; then
57669b57
JD
11432 eval "$as_ac_var=yes"
11433else
11434 echo "$as_me: failed program was:" >&5
11435sed 's/^/| /' conftest.$ac_ext >&5
11436
ca81d7a0 11437 eval "$as_ac_var=no"
57669b57 11438fi
ca81d7a0 11439
f053c89f 11440rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11441 conftest$ac_exeext conftest.$ac_ext
57669b57 11442fi
ca81d7a0
JD
11443ac_res=`eval echo '${'$as_ac_var'}'`
11444 { echo "$as_me:$LINENO: result: $ac_res" >&5
11445echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11446if test `eval echo '${'$as_ac_var'}'` = yes; then
11447 cat >>confdefs.h <<_ACEOF
11448#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11449_ACEOF
8eeae1c9 11450 GTK_COMPILES=yes
57669b57
JD
11451fi
11452done
11453
8eeae1c9 11454 if test "${GTK_COMPILES}" != "yes"; then
089a966d
GM
11455 if test "$USE_X_TOOLKIT" != "maybe"; then
11456 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
8eeae1c9
JD
11457echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11458 { (exit 1); exit 1; }; };
089a966d
GM
11459 fi
11460 else
11461 HAVE_GTK=yes
488dd4c4
JD
11462
11463cat >>confdefs.h <<\_ACEOF
11464#define HAVE_GTK 1
11465_ACEOF
11466
089a966d
GM
11467 USE_X_TOOLKIT=none
11468 fi
11469
11470fi
11471
11472
11473if test "${HAVE_GTK}" = "yes"; then
488dd4c4 11474
d0a80c21
JD
11475 if test "$with_toolkit_scroll_bars" != no; then
11476 with_toolkit_scroll_bars=yes
11477 fi
57669b57 11478
c982cf7d 11479 HAVE_GTK_MULTIDISPLAY=no
fa1b1007
KL
11480
11481for ac_func in gdk_display_open
11482do
11483as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11484{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11485echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11486if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11487 echo $ECHO_N "(cached) $ECHO_C" >&6
11488else
11489 cat >conftest.$ac_ext <<_ACEOF
11490/* confdefs.h. */
11491_ACEOF
11492cat confdefs.h >>conftest.$ac_ext
11493cat >>conftest.$ac_ext <<_ACEOF
11494/* end confdefs.h. */
11495/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11496 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11497#define $ac_func innocuous_$ac_func
11498
11499/* System header to define __stub macros and hopefully few prototypes,
11500 which can conflict with char $ac_func (); below.
11501 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11502 <limits.h> exists even on freestanding compilers. */
11503
11504#ifdef __STDC__
11505# include <limits.h>
11506#else
11507# include <assert.h>
11508#endif
11509
11510#undef $ac_func
11511
11512/* Override any GCC internal prototype to avoid an error.
11513 Use char because int might match the return type of a GCC
11514 builtin and then its argument prototype would still apply. */
11515#ifdef __cplusplus
11516extern "C"
11517#endif
11518char $ac_func ();
11519/* The GNU C library defines this for functions which it implements
11520 to always fail with ENOSYS. Some functions are actually named
11521 something starting with __ and the normal name is an alias. */
11522#if defined __stub_$ac_func || defined __stub___$ac_func
11523choke me
11524#endif
11525
11526int
11527main ()
11528{
11529return $ac_func ();
11530 ;
11531 return 0;
11532}
11533_ACEOF
11534rm -f conftest.$ac_objext conftest$ac_exeext
11535if { (ac_try="$ac_link"
11536case "(($ac_try" in
11537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11538 *) ac_try_echo=$ac_try;;
11539esac
11540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11541 (eval "$ac_link") 2>conftest.er1
11542 ac_status=$?
11543 grep -v '^ *+' conftest.er1 >conftest.err
11544 rm -f conftest.er1
11545 cat conftest.err >&5
11546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11547 (exit $ac_status); } && {
11548 test -z "$ac_c_werror_flag" ||
11549 test ! -s conftest.err
11550 } && test -s conftest$ac_exeext &&
11551 $as_test_x conftest$ac_exeext; then
11552 eval "$as_ac_var=yes"
11553else
11554 echo "$as_me: failed program was:" >&5
11555sed 's/^/| /' conftest.$ac_ext >&5
11556
11557 eval "$as_ac_var=no"
11558fi
11559
11560rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11561 conftest$ac_exeext conftest.$ac_ext
11562fi
11563ac_res=`eval echo '${'$as_ac_var'}'`
11564 { echo "$as_me:$LINENO: result: $ac_res" >&5
11565echo "${ECHO_T}$ac_res" >&6; }
11566if test `eval echo '${'$as_ac_var'}'` = yes; then
11567 cat >>confdefs.h <<_ACEOF
11568#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11569_ACEOF
11570 HAVE_GTK_MULTIDISPLAY=yes
11571fi
11572done
11573
11574 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11575
11576cat >>confdefs.h <<\_ACEOF
11577#define HAVE_GTK_MULTIDISPLAY 1
11578_ACEOF
11579
11580 fi
57669b57 11581
572a3cc2
JD
11582 HAVE_GTK_FILE_SELECTION=no
11583
11584for ac_func in gtk_file_selection_new
11585do
11586as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
11587{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11588echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11589if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11590 echo $ECHO_N "(cached) $ECHO_C" >&6
11591else
11592 cat >conftest.$ac_ext <<_ACEOF
11593/* confdefs.h. */
11594_ACEOF
11595cat confdefs.h >>conftest.$ac_ext
11596cat >>conftest.$ac_ext <<_ACEOF
11597/* end confdefs.h. */
edfaf76d
LK
11598/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11599 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11600#define $ac_func innocuous_$ac_func
11601
572a3cc2
JD
11602/* System header to define __stub macros and hopefully few prototypes,
11603 which can conflict with char $ac_func (); below.
11604 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11605 <limits.h> exists even on freestanding compilers. */
edfaf76d 11606
572a3cc2
JD
11607#ifdef __STDC__
11608# include <limits.h>
11609#else
11610# include <assert.h>
11611#endif
edfaf76d
LK
11612
11613#undef $ac_func
11614
d6e01aa5
KL
11615/* Override any GCC internal prototype to avoid an error.
11616 Use char because int might match the return type of a GCC
11617 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11618#ifdef __cplusplus
11619extern "C"
572a3cc2 11620#endif
572a3cc2
JD
11621char $ac_func ();
11622/* The GNU C library defines this for functions which it implements
11623 to always fail with ENOSYS. Some functions are actually named
11624 something starting with __ and the normal name is an alias. */
d6e01aa5 11625#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11626choke me
572a3cc2
JD
11627#endif
11628
11629int
11630main ()
11631{
d6e01aa5 11632return $ac_func ();
572a3cc2
JD
11633 ;
11634 return 0;
11635}
11636_ACEOF
11637rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11638if { (ac_try="$ac_link"
11639case "(($ac_try" in
11640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11641 *) ac_try_echo=$ac_try;;
11642esac
11643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11644 (eval "$ac_link") 2>conftest.er1
572a3cc2 11645 ac_status=$?
edfaf76d
LK
11646 grep -v '^ *+' conftest.er1 >conftest.err
11647 rm -f conftest.er1
11648 cat conftest.err >&5
572a3cc2 11649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11650 (exit $ac_status); } && {
11651 test -z "$ac_c_werror_flag" ||
11652 test ! -s conftest.err
11653 } && test -s conftest$ac_exeext &&
11654 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11655 eval "$as_ac_var=yes"
11656else
11657 echo "$as_me: failed program was:" >&5
11658sed 's/^/| /' conftest.$ac_ext >&5
11659
d6e01aa5 11660 eval "$as_ac_var=no"
572a3cc2 11661fi
d6e01aa5
KL
11662
11663rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11664 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11665fi
d6e01aa5
KL
11666ac_res=`eval echo '${'$as_ac_var'}'`
11667 { echo "$as_me:$LINENO: result: $ac_res" >&5
11668echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11669if test `eval echo '${'$as_ac_var'}'` = yes; then
11670 cat >>confdefs.h <<_ACEOF
11671#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11672_ACEOF
11673 HAVE_GTK_FILE_SELECTION=yes
11674fi
11675done
11676
11677
11678 HAVE_GTK_FILE_CHOOSER=no
11679
11680for ac_func in gtk_file_chooser_dialog_new
11681do
11682as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
11683{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11684echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11685if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11686 echo $ECHO_N "(cached) $ECHO_C" >&6
11687else
11688 cat >conftest.$ac_ext <<_ACEOF
11689/* confdefs.h. */
11690_ACEOF
11691cat confdefs.h >>conftest.$ac_ext
11692cat >>conftest.$ac_ext <<_ACEOF
11693/* end confdefs.h. */
edfaf76d
LK
11694/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11695 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11696#define $ac_func innocuous_$ac_func
11697
572a3cc2
JD
11698/* System header to define __stub macros and hopefully few prototypes,
11699 which can conflict with char $ac_func (); below.
11700 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11701 <limits.h> exists even on freestanding compilers. */
edfaf76d 11702
572a3cc2
JD
11703#ifdef __STDC__
11704# include <limits.h>
11705#else
11706# include <assert.h>
11707#endif
edfaf76d
LK
11708
11709#undef $ac_func
11710
d6e01aa5
KL
11711/* Override any GCC internal prototype to avoid an error.
11712 Use char because int might match the return type of a GCC
11713 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11714#ifdef __cplusplus
11715extern "C"
572a3cc2 11716#endif
572a3cc2
JD
11717char $ac_func ();
11718/* The GNU C library defines this for functions which it implements
11719 to always fail with ENOSYS. Some functions are actually named
11720 something starting with __ and the normal name is an alias. */
d6e01aa5 11721#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11722choke me
572a3cc2
JD
11723#endif
11724
11725int
11726main ()
11727{
d6e01aa5 11728return $ac_func ();
572a3cc2
JD
11729 ;
11730 return 0;
11731}
11732_ACEOF
11733rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11734if { (ac_try="$ac_link"
11735case "(($ac_try" in
11736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11737 *) ac_try_echo=$ac_try;;
11738esac
11739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11740 (eval "$ac_link") 2>conftest.er1
572a3cc2 11741 ac_status=$?
edfaf76d
LK
11742 grep -v '^ *+' conftest.er1 >conftest.err
11743 rm -f conftest.er1
11744 cat conftest.err >&5
572a3cc2 11745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11746 (exit $ac_status); } && {
11747 test -z "$ac_c_werror_flag" ||
11748 test ! -s conftest.err
11749 } && test -s conftest$ac_exeext &&
11750 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11751 eval "$as_ac_var=yes"
11752else
11753 echo "$as_me: failed program was:" >&5
11754sed 's/^/| /' conftest.$ac_ext >&5
11755
d6e01aa5 11756 eval "$as_ac_var=no"
572a3cc2 11757fi
d6e01aa5
KL
11758
11759rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11760 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11761fi
d6e01aa5
KL
11762ac_res=`eval echo '${'$as_ac_var'}'`
11763 { echo "$as_me:$LINENO: result: $ac_res" >&5
11764echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11765if test `eval echo '${'$as_ac_var'}'` = yes; then
11766 cat >>confdefs.h <<_ACEOF
11767#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11768_ACEOF
11769 HAVE_GTK_FILE_CHOOSER=yes
11770fi
11771done
11772
11773
11774 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11775 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11776
11777cat >>confdefs.h <<\_ACEOF
11778#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11779_ACEOF
11780
b8bdffbe
JD
11781 fi
11782
11783 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11784 HAVE_GTK_AND_PTHREAD=no
11785
11786for ac_header in pthread.h
11787do
11788as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
11789if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11790 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11791echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11792if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11793 echo $ECHO_N "(cached) $ECHO_C" >&6
11794fi
d6e01aa5
KL
11795ac_res=`eval echo '${'$as_ac_Header'}'`
11796 { echo "$as_me:$LINENO: result: $ac_res" >&5
11797echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11798else
11799 # Is the header compilable?
d6e01aa5
KL
11800{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11801echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11802cat >conftest.$ac_ext <<_ACEOF
11803/* confdefs.h. */
11804_ACEOF
11805cat confdefs.h >>conftest.$ac_ext
11806cat >>conftest.$ac_ext <<_ACEOF
11807/* end confdefs.h. */
11808$ac_includes_default
11809#include <$ac_header>
11810_ACEOF
11811rm -f conftest.$ac_objext
d6e01aa5
KL
11812if { (ac_try="$ac_compile"
11813case "(($ac_try" in
11814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11815 *) ac_try_echo=$ac_try;;
11816esac
11817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11818 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11819 ac_status=$?
edfaf76d
LK
11820 grep -v '^ *+' conftest.er1 >conftest.err
11821 rm -f conftest.er1
11822 cat conftest.err >&5
b8bdffbe 11823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11824 (exit $ac_status); } && {
11825 test -z "$ac_c_werror_flag" ||
11826 test ! -s conftest.err
11827 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11828 ac_header_compiler=yes
11829else
11830 echo "$as_me: failed program was:" >&5
11831sed 's/^/| /' conftest.$ac_ext >&5
11832
d6e01aa5 11833 ac_header_compiler=no
b8bdffbe 11834fi
b8bdffbe 11835
d6e01aa5
KL
11836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11837{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11838echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11839
11840# Is the header present?
d6e01aa5
KL
11841{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11842echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11843cat >conftest.$ac_ext <<_ACEOF
11844/* confdefs.h. */
11845_ACEOF
11846cat confdefs.h >>conftest.$ac_ext
11847cat >>conftest.$ac_ext <<_ACEOF
11848/* end confdefs.h. */
11849#include <$ac_header>
11850_ACEOF
d6e01aa5
KL
11851if { (ac_try="$ac_cpp conftest.$ac_ext"
11852case "(($ac_try" in
11853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11854 *) ac_try_echo=$ac_try;;
11855esac
11856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11857 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11858 ac_status=$?
11859 grep -v '^ *+' conftest.er1 >conftest.err
11860 rm -f conftest.er1
11861 cat conftest.err >&5
11862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11863 (exit $ac_status); } >/dev/null && {
11864 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11865 test ! -s conftest.err
11866 }; then
b8bdffbe
JD
11867 ac_header_preproc=yes
11868else
11869 echo "$as_me: failed program was:" >&5
11870sed 's/^/| /' conftest.$ac_ext >&5
11871
11872 ac_header_preproc=no
11873fi
d6e01aa5 11874
b8bdffbe 11875rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
11876{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11877echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11878
11879# So? What about this header?
edfaf76d
LK
11880case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11881 yes:no: )
b8bdffbe
JD
11882 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11883echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11884 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11885echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11886 ac_header_preproc=yes
b8bdffbe 11887 ;;
edfaf76d 11888 no:yes:* )
b8bdffbe
JD
11889 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11890echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11891 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11892echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11893 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11894echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11895 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11896echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11897 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11898echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11899 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11900echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 11901
b8bdffbe
JD
11902 ;;
11903esac
d6e01aa5
KL
11904{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11905echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11906if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11907 echo $ECHO_N "(cached) $ECHO_C" >&6
11908else
edfaf76d 11909 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11910fi
d6e01aa5
KL
11911ac_res=`eval echo '${'$as_ac_Header'}'`
11912 { echo "$as_me:$LINENO: result: $ac_res" >&5
11913echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11914
11915fi
11916if test `eval echo '${'$as_ac_Header'}'` = yes; then
11917 cat >>confdefs.h <<_ACEOF
11918#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11919_ACEOF
11920
11921fi
11922
11923done
11924
11925 if test "$ac_cv_header_pthread_h"; then
d6e01aa5
KL
11926 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11927echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11928if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11929 echo $ECHO_N "(cached) $ECHO_C" >&6
11930else
11931 ac_check_lib_save_LIBS=$LIBS
11932LIBS="-lpthread $LIBS"
11933cat >conftest.$ac_ext <<_ACEOF
11934/* confdefs.h. */
11935_ACEOF
11936cat confdefs.h >>conftest.$ac_ext
11937cat >>conftest.$ac_ext <<_ACEOF
11938/* end confdefs.h. */
11939
d6e01aa5
KL
11940/* Override any GCC internal prototype to avoid an error.
11941 Use char because int might match the return type of a GCC
11942 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11943#ifdef __cplusplus
11944extern "C"
11945#endif
b8bdffbe
JD
11946char pthread_self ();
11947int
11948main ()
11949{
d6e01aa5 11950return pthread_self ();
b8bdffbe
JD
11951 ;
11952 return 0;
11953}
11954_ACEOF
11955rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11956if { (ac_try="$ac_link"
11957case "(($ac_try" in
11958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11959 *) ac_try_echo=$ac_try;;
11960esac
11961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11962 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11963 ac_status=$?
edfaf76d
LK
11964 grep -v '^ *+' conftest.er1 >conftest.err
11965 rm -f conftest.er1
11966 cat conftest.err >&5
b8bdffbe 11967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11968 (exit $ac_status); } && {
11969 test -z "$ac_c_werror_flag" ||
11970 test ! -s conftest.err
11971 } && test -s conftest$ac_exeext &&
11972 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11973 ac_cv_lib_pthread_pthread_self=yes
11974else
11975 echo "$as_me: failed program was:" >&5
11976sed 's/^/| /' conftest.$ac_ext >&5
11977
d6e01aa5 11978 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11979fi
d6e01aa5
KL
11980
11981rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11982 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11983LIBS=$ac_check_lib_save_LIBS
11984fi
d6e01aa5
KL
11985{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11986echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11987if test $ac_cv_lib_pthread_pthread_self = yes; then
11988 HAVE_GTK_AND_PTHREAD=yes
11989fi
11990
11991 fi
11992 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
11993 case "${canonical}" in
11994 *-hpux*) ;;
11995 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
11996 esac
b8bdffbe
JD
11997
11998cat >>confdefs.h <<\_ACEOF
11999#define HAVE_GTK_AND_PTHREAD 1
12000_ACEOF
12001
12002 fi
57669b57 12003 fi
488dd4c4
JD
12004fi
12005
131e4133
MA
12006HAVE_DBUS=no
12007if test "${with_dbus}" = "yes"; then
12008 { echo "$as_me:$LINENO: checking for dbus_bus_get in -ldbus-1" >&5
12009echo $ECHO_N "checking for dbus_bus_get in -ldbus-1... $ECHO_C" >&6; }
12010if test "${ac_cv_lib_dbus_1_dbus_bus_get+set}" = set; then
12011 echo $ECHO_N "(cached) $ECHO_C" >&6
12012else
12013 ac_check_lib_save_LIBS=$LIBS
12014LIBS="-ldbus-1 $LIBS"
12015cat >conftest.$ac_ext <<_ACEOF
12016/* confdefs.h. */
12017_ACEOF
12018cat confdefs.h >>conftest.$ac_ext
12019cat >>conftest.$ac_ext <<_ACEOF
12020/* end confdefs.h. */
12021
12022/* Override any GCC internal prototype to avoid an error.
12023 Use char because int might match the return type of a GCC
12024 builtin and then its argument prototype would still apply. */
12025#ifdef __cplusplus
12026extern "C"
12027#endif
12028char dbus_bus_get ();
12029int
12030main ()
12031{
12032return dbus_bus_get ();
12033 ;
12034 return 0;
12035}
12036_ACEOF
12037rm -f conftest.$ac_objext conftest$ac_exeext
12038if { (ac_try="$ac_link"
12039case "(($ac_try" in
12040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12041 *) ac_try_echo=$ac_try;;
12042esac
12043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12044 (eval "$ac_link") 2>conftest.er1
12045 ac_status=$?
12046 grep -v '^ *+' conftest.er1 >conftest.err
12047 rm -f conftest.er1
12048 cat conftest.err >&5
12049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12050 (exit $ac_status); } && {
12051 test -z "$ac_c_werror_flag" ||
12052 test ! -s conftest.err
12053 } && test -s conftest$ac_exeext &&
12054 $as_test_x conftest$ac_exeext; then
12055 ac_cv_lib_dbus_1_dbus_bus_get=yes
12056else
12057 echo "$as_me: failed program was:" >&5
12058sed 's/^/| /' conftest.$ac_ext >&5
12059
12060 ac_cv_lib_dbus_1_dbus_bus_get=no
12061fi
12062
12063rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12064 conftest$ac_exeext conftest.$ac_ext
12065LIBS=$ac_check_lib_save_LIBS
12066fi
12067{ echo "$as_me:$LINENO: result: $ac_cv_lib_dbus_1_dbus_bus_get" >&5
12068echo "${ECHO_T}$ac_cv_lib_dbus_1_dbus_bus_get" >&6; }
12069if test $ac_cv_lib_dbus_1_dbus_bus_get = yes; then
12070 HAVE_DBUS=yes
12071fi
12072
12073 if test "$HAVE_DBUS" = yes; then
12074
12075cat >>confdefs.h <<\_ACEOF
12076#define HAVE_DBUS 1
12077_ACEOF
12078
12079 DBUS_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include"
12080
12081 DBUS_LIBS="-ldbus-1"
12082
12083 DBUS_INFO="dbus"
12084 fi
12085fi
12086
12087
9d89ffd0
JD
12088### Link with -lXft if available to work around a bug.
12089HAVE_XFT=maybe
12090if test "${HAVE_GTK}" = "yes"; then
12091 if test "X${with_pkg_config_prog}" != X; then
12092 PKG_CONFIG="${with_pkg_config_prog}"
12093 fi
12094
12095
12096 succeeded=no
12097
12098 if test -z "$PKG_CONFIG"; then
12099 # Extract the first word of "pkg-config", so it can be a program name with args.
12100set dummy pkg-config; ac_word=$2
12101{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12102echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
12103if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12104 echo $ECHO_N "(cached) $ECHO_C" >&6
12105else
12106 case $PKG_CONFIG in
12107 [\\/]* | ?:[\\/]*)
12108 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12109 ;;
12110 *)
12111 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12112for as_dir in $PATH
12113do
12114 IFS=$as_save_IFS
12115 test -z "$as_dir" && as_dir=.
12116 for ac_exec_ext in '' $ac_executable_extensions; do
12117 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12118 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12119 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12120 break 2
12121 fi
12122done
12123done
12124IFS=$as_save_IFS
12125
12126 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12127 ;;
12128esac
12129fi
12130PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12131if test -n "$PKG_CONFIG"; then
12132 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12133echo "${ECHO_T}$PKG_CONFIG" >&6; }
12134else
12135 { echo "$as_me:$LINENO: result: no" >&5
12136echo "${ECHO_T}no" >&6; }
12137fi
12138
12139
12140 fi
12141
12142 if test "$PKG_CONFIG" = "no" ; then
12143 HAVE_XFT=no
12144 else
12145 PKG_CONFIG_MIN_VERSION=0.9.0
12146 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12147 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
12148echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
12149
12150 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
12151 { echo "$as_me:$LINENO: result: yes" >&5
12152echo "${ECHO_T}yes" >&6; }
12153 succeeded=yes
12154
12155 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
12156echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
94315858 12157 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
12158 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
12159echo "${ECHO_T}$XFT_CFLAGS" >&6; }
12160
12161 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
12162echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
94315858 12163 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
12164 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
12165echo "${ECHO_T}$XFT_LIBS" >&6; }
12166 else
12167 { echo "$as_me:$LINENO: result: no" >&5
12168echo "${ECHO_T}no" >&6; }
12169 XFT_CFLAGS=""
12170 XFT_LIBS=""
12171 ## If we have a custom action on failure, don't print errors, but
12172 ## do set a variable so people can do so.
12173 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12174
12175 fi
12176
12177
12178
12179 else
12180 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12181 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12182 fi
12183 fi
12184
12185 if test $succeeded = yes; then
12186 :
12187 else
12188 HAVE_XFT=no
12189 fi
12190
12191 if test "$HAVE_XFT" != no; then
12192 OLD_CFLAGS="$CPPFLAGS"
f23323c5 12193 OLD_CPPFLAGS="$CFLAGS"
9d89ffd0
JD
12194 OLD_LIBS="$LIBS"
12195 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12196 CFLAGS="$CFLAGS $XFT_CFLAGS"
12197 LIBS="$XFT_LIBS $LIBS"
12198 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12199 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12200echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
12201if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12202 echo $ECHO_N "(cached) $ECHO_C" >&6
12203fi
12204{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12205echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
12206else
12207 # Is the header compilable?
12208{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
12209echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
12210cat >conftest.$ac_ext <<_ACEOF
12211/* confdefs.h. */
12212_ACEOF
12213cat confdefs.h >>conftest.$ac_ext
12214cat >>conftest.$ac_ext <<_ACEOF
12215/* end confdefs.h. */
12216$ac_includes_default
12217#include <X11/Xft/Xft.h>
12218_ACEOF
12219rm -f conftest.$ac_objext
12220if { (ac_try="$ac_compile"
12221case "(($ac_try" in
12222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12223 *) ac_try_echo=$ac_try;;
12224esac
12225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12226 (eval "$ac_compile") 2>conftest.er1
12227 ac_status=$?
12228 grep -v '^ *+' conftest.er1 >conftest.err
12229 rm -f conftest.er1
12230 cat conftest.err >&5
12231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12232 (exit $ac_status); } && {
12233 test -z "$ac_c_werror_flag" ||
12234 test ! -s conftest.err
12235 } && test -s conftest.$ac_objext; then
12236 ac_header_compiler=yes
12237else
12238 echo "$as_me: failed program was:" >&5
12239sed 's/^/| /' conftest.$ac_ext >&5
12240
12241 ac_header_compiler=no
12242fi
12243
12244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12245{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12246echo "${ECHO_T}$ac_header_compiler" >&6; }
12247
12248# Is the header present?
12249{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
12250echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
12251cat >conftest.$ac_ext <<_ACEOF
12252/* confdefs.h. */
12253_ACEOF
12254cat confdefs.h >>conftest.$ac_ext
12255cat >>conftest.$ac_ext <<_ACEOF
12256/* end confdefs.h. */
12257#include <X11/Xft/Xft.h>
12258_ACEOF
12259if { (ac_try="$ac_cpp conftest.$ac_ext"
12260case "(($ac_try" in
12261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12262 *) ac_try_echo=$ac_try;;
12263esac
12264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12265 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12266 ac_status=$?
12267 grep -v '^ *+' conftest.er1 >conftest.err
12268 rm -f conftest.er1
12269 cat conftest.err >&5
12270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12271 (exit $ac_status); } >/dev/null && {
12272 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12273 test ! -s conftest.err
12274 }; then
12275 ac_header_preproc=yes
12276else
12277 echo "$as_me: failed program was:" >&5
12278sed 's/^/| /' conftest.$ac_ext >&5
12279
12280 ac_header_preproc=no
12281fi
12282
12283rm -f conftest.err conftest.$ac_ext
12284{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12285echo "${ECHO_T}$ac_header_preproc" >&6; }
12286
12287# So? What about this header?
12288case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12289 yes:no: )
12290 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
12291echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12292 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
12293echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
12294 ac_header_preproc=yes
12295 ;;
12296 no:yes:* )
12297 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
12298echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
12299 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
12300echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
12301 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
12302echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
12303 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
12304echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
12305 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
12306echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
12307 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
12308echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
12309
12310 ;;
12311esac
12312{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12313echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
12314if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12315 echo $ECHO_N "(cached) $ECHO_C" >&6
12316else
12317 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
12318fi
12319{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12320echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
12321
12322fi
12323if test $ac_cv_header_X11_Xft_Xft_h = yes; then
12324 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
12325echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
12326if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
12327 echo $ECHO_N "(cached) $ECHO_C" >&6
12328else
12329 ac_check_lib_save_LIBS=$LIBS
12330LIBS="-lXft $XFT_LIBS $LIBS"
12331cat >conftest.$ac_ext <<_ACEOF
12332/* confdefs.h. */
12333_ACEOF
12334cat confdefs.h >>conftest.$ac_ext
12335cat >>conftest.$ac_ext <<_ACEOF
12336/* end confdefs.h. */
12337
12338/* Override any GCC internal prototype to avoid an error.
12339 Use char because int might match the return type of a GCC
12340 builtin and then its argument prototype would still apply. */
12341#ifdef __cplusplus
12342extern "C"
12343#endif
12344char XftFontOpen ();
12345int
12346main ()
12347{
12348return XftFontOpen ();
12349 ;
12350 return 0;
12351}
12352_ACEOF
12353rm -f conftest.$ac_objext conftest$ac_exeext
12354if { (ac_try="$ac_link"
12355case "(($ac_try" in
12356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12357 *) ac_try_echo=$ac_try;;
12358esac
12359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12360 (eval "$ac_link") 2>conftest.er1
12361 ac_status=$?
12362 grep -v '^ *+' conftest.er1 >conftest.err
12363 rm -f conftest.er1
12364 cat conftest.err >&5
12365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12366 (exit $ac_status); } && {
12367 test -z "$ac_c_werror_flag" ||
12368 test ! -s conftest.err
12369 } && test -s conftest$ac_exeext &&
12370 $as_test_x conftest$ac_exeext; then
12371 ac_cv_lib_Xft_XftFontOpen=yes
12372else
12373 echo "$as_me: failed program was:" >&5
12374sed 's/^/| /' conftest.$ac_ext >&5
12375
12376 ac_cv_lib_Xft_XftFontOpen=no
12377fi
12378
12379rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12380 conftest$ac_exeext conftest.$ac_ext
12381LIBS=$ac_check_lib_save_LIBS
12382fi
12383{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12384echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
12385if test $ac_cv_lib_Xft_XftFontOpen = yes; then
12386 HAVE_XFT=yes
12387fi
12388
12389fi
12390
12391
12392
12393 if test "${HAVE_XFT}" = "yes"; then
12394
12395cat >>confdefs.h <<\_ACEOF
12396#define HAVE_XFT 1
12397_ACEOF
12398
12399
12400 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12401 else
12402 CFLAGS="$OLD_CPPFLAGS"
12403 CFLAGS="$OLD_CFLAGS"
12404 LIBS="$OLD_LIBS"
12405 fi
12406 fi
12407fi
12408
dba7bae0 12409HAVE_XAW3D=no
3685ba3f 12410if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
a5c2c204
JD
12411 if test "$with_xaw3d" != no; then
12412 { echo "$as_me:$LINENO: checking for xaw3d" >&5
dba7bae0 12413echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
a5c2c204 12414 if test "${emacs_cv_xaw3d+set}" = set; then
98418dba
CW
12415 echo $ECHO_N "(cached) $ECHO_C" >&6
12416else
12417 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12418/* confdefs.h. */
12419_ACEOF
12420cat confdefs.h >>conftest.$ac_ext
12421cat >>conftest.$ac_ext <<_ACEOF
12422/* end confdefs.h. */
98418dba
CW
12423
12424#include <X11/Intrinsic.h>
dba7bae0 12425#include <X11/Xaw3d/Simple.h>
98418dba
CW
12426int
12427main ()
12428{
12429
12430 ;
12431 return 0;
12432}
12433_ACEOF
12434rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12435if { (ac_try="$ac_link"
12436case "(($ac_try" in
12437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12438 *) ac_try_echo=$ac_try;;
12439esac
12440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12441 (eval "$ac_link") 2>conftest.er1
98418dba 12442 ac_status=$?
edfaf76d
LK
12443 grep -v '^ *+' conftest.er1 >conftest.err
12444 rm -f conftest.er1
12445 cat conftest.err >&5
c0d27fcc 12446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12447 (exit $ac_status); } && {
12448 test -z "$ac_c_werror_flag" ||
12449 test ! -s conftest.err
12450 } && test -s conftest$ac_exeext &&
12451 $as_test_x conftest$ac_exeext; then
dba7bae0 12452 emacs_cv_xaw3d=yes
98418dba
CW
12453else
12454 echo "$as_me: failed program was:" >&5
19650fd6
AS
12455sed 's/^/| /' conftest.$ac_ext >&5
12456
dba7bae0 12457 emacs_cv_xaw3d=no
98418dba 12458fi
d6e01aa5
KL
12459
12460rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12461 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12462fi
12463
a5c2c204
JD
12464 else
12465 emacs_cv_xaw3d=no
12466 fi
12467 if test $emacs_cv_xaw3d = yes; then
12468 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
dba7bae0 12469echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
a5c2c204
JD
12470 USE_X_TOOLKIT=LUCID
12471 HAVE_XAW3D=yes
dba7bae0
CY
12472
12473cat >>confdefs.h <<\_ACEOF
12474#define HAVE_XAW3D 1
12475_ACEOF
12476
a5c2c204
JD
12477 else
12478 { echo "$as_me:$LINENO: result: no" >&5
dba7bae0 12479echo "${ECHO_T}no" >&6; }
a5c2c204 12480 { echo "$as_me:$LINENO: checking for libXaw" >&5
dba7bae0 12481echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
a5c2c204 12482 if test "${emacs_cv_xaw+set}" = set; then
dba7bae0
CY
12483 echo $ECHO_N "(cached) $ECHO_C" >&6
12484else
12485 cat >conftest.$ac_ext <<_ACEOF
12486/* confdefs.h. */
12487_ACEOF
12488cat confdefs.h >>conftest.$ac_ext
12489cat >>conftest.$ac_ext <<_ACEOF
12490/* end confdefs.h. */
12491
12492#include <X11/Intrinsic.h>
12493#include <X11/Xaw/Simple.h>
12494int
12495main ()
12496{
12497
12498 ;
12499 return 0;
12500}
12501_ACEOF
12502rm -f conftest.$ac_objext conftest$ac_exeext
12503if { (ac_try="$ac_link"
12504case "(($ac_try" in
12505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12506 *) ac_try_echo=$ac_try;;
12507esac
12508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12509 (eval "$ac_link") 2>conftest.er1
12510 ac_status=$?
12511 grep -v '^ *+' conftest.er1 >conftest.err
12512 rm -f conftest.er1
12513 cat conftest.err >&5
12514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12515 (exit $ac_status); } && {
12516 test -z "$ac_c_werror_flag" ||
12517 test ! -s conftest.err
12518 } && test -s conftest$ac_exeext &&
12519 $as_test_x conftest$ac_exeext; then
12520 emacs_cv_xaw=yes
12521else
12522 echo "$as_me: failed program was:" >&5
12523sed 's/^/| /' conftest.$ac_ext >&5
12524
12525 emacs_cv_xaw=no
12526fi
12527
12528rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12529 conftest$ac_exeext conftest.$ac_ext
12530fi
12531
a5c2c204
JD
12532 if test $emacs_cv_xaw = yes; then
12533 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
dba7bae0 12534echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
a5c2c204
JD
12535 USE_X_TOOLKIT=LUCID
12536 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
12537 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
3685ba3f
CY
12538echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
12539 { (exit 1); exit 1; }; }
a5c2c204
JD
12540 else
12541 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
dba7bae0 12542echo "${ECHO_T}no; do not use toolkit by default" >&6; }
a5c2c204 12543 USE_X_TOOLKIT=none
98418dba 12544 fi
98418dba
CW
12545 fi
12546fi
12547
12548X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12549
12550if test "${USE_X_TOOLKIT}" != "none"; then
d6e01aa5
KL
12551 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
12552echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
12553 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
12554 echo $ECHO_N "(cached) $ECHO_C" >&6
12555else
12556 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12557/* confdefs.h. */
12558_ACEOF
12559cat confdefs.h >>conftest.$ac_ext
12560cat >>conftest.$ac_ext <<_ACEOF
12561/* end confdefs.h. */
98418dba 12562#include <X11/Intrinsic.h>
98418dba
CW
12563int
12564main ()
12565{
12566#if XtSpecificationRelease < 6
12567fail;
12568#endif
12569
12570 ;
12571 return 0;
12572}
12573_ACEOF
12574rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12575if { (ac_try="$ac_link"
12576case "(($ac_try" in
12577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12578 *) ac_try_echo=$ac_try;;
12579esac
12580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12581 (eval "$ac_link") 2>conftest.er1
98418dba 12582 ac_status=$?
edfaf76d
LK
12583 grep -v '^ *+' conftest.er1 >conftest.err
12584 rm -f conftest.er1
12585 cat conftest.err >&5
c0d27fcc 12586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12587 (exit $ac_status); } && {
12588 test -z "$ac_c_werror_flag" ||
12589 test ! -s conftest.err
12590 } && test -s conftest$ac_exeext &&
12591 $as_test_x conftest$ac_exeext; then
98418dba
CW
12592 emacs_cv_x11_toolkit_version_6=yes
12593else
12594 echo "$as_me: failed program was:" >&5
19650fd6
AS
12595sed 's/^/| /' conftest.$ac_ext >&5
12596
d6e01aa5 12597 emacs_cv_x11_toolkit_version_6=no
98418dba 12598fi
d6e01aa5
KL
12599
12600rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12601 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12602fi
12603
12604 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12605 if test $emacs_cv_x11_toolkit_version_6 = yes; then
d6e01aa5
KL
12606 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12607echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12608
c0d27fcc 12609cat >>confdefs.h <<\_ACEOF
98418dba 12610#define HAVE_X11XTR6 1
c0d27fcc 12611_ACEOF
98418dba
CW
12612
12613 else
d6e01aa5
KL
12614 { echo "$as_me:$LINENO: result: before 6" >&5
12615echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12616 fi
12617
12618 OLDLIBS="$LIBS"
12619 if test x$HAVE_X11XTR6 = xyes; then
12620 LIBS="-lXt -lSM -lICE $LIBS"
12621 else
12622 LIBS="-lXt $LIBS"
12623 fi
12624
d6e01aa5
KL
12625{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12626echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12627if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12628 echo $ECHO_N "(cached) $ECHO_C" >&6
12629else
12630 ac_check_lib_save_LIBS=$LIBS
12631LIBS="-lXmu $LIBS"
12632cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12633/* confdefs.h. */
12634_ACEOF
12635cat confdefs.h >>conftest.$ac_ext
12636cat >>conftest.$ac_ext <<_ACEOF
12637/* end confdefs.h. */
98418dba 12638
d6e01aa5
KL
12639/* Override any GCC internal prototype to avoid an error.
12640 Use char because int might match the return type of a GCC
12641 builtin and then its argument prototype would still apply. */
98418dba
CW
12642#ifdef __cplusplus
12643extern "C"
12644#endif
98418dba 12645char XmuConvertStandardSelection ();
98418dba
CW
12646int
12647main ()
12648{
d6e01aa5 12649return XmuConvertStandardSelection ();
98418dba
CW
12650 ;
12651 return 0;
12652}
12653_ACEOF
12654rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12655if { (ac_try="$ac_link"
12656case "(($ac_try" in
12657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12658 *) ac_try_echo=$ac_try;;
12659esac
12660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12661 (eval "$ac_link") 2>conftest.er1
98418dba 12662 ac_status=$?
edfaf76d
LK
12663 grep -v '^ *+' conftest.er1 >conftest.err
12664 rm -f conftest.er1
12665 cat conftest.err >&5
c0d27fcc 12666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12667 (exit $ac_status); } && {
12668 test -z "$ac_c_werror_flag" ||
12669 test ! -s conftest.err
12670 } && test -s conftest$ac_exeext &&
12671 $as_test_x conftest$ac_exeext; then
98418dba
CW
12672 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12673else
12674 echo "$as_me: failed program was:" >&5
19650fd6
AS
12675sed 's/^/| /' conftest.$ac_ext >&5
12676
d6e01aa5 12677 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12678fi
d6e01aa5
KL
12679
12680rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12681 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12682LIBS=$ac_check_lib_save_LIBS
12683fi
d6e01aa5
KL
12684{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12685echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12686if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12687 cat >>confdefs.h <<_ACEOF
98418dba 12688#define HAVE_LIBXMU 1
c0d27fcc 12689_ACEOF
98418dba
CW
12690
12691 LIBS="-lXmu $LIBS"
12692
12693fi
12694
12695 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12696fi
12697
12698# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12699if test "${HAVE_X11}" = "yes"; then
12700 if test "${USE_X_TOOLKIT}" != "none"; then
12701
d6e01aa5
KL
12702{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12703echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12704if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12705 echo $ECHO_N "(cached) $ECHO_C" >&6
12706else
12707 ac_check_lib_save_LIBS=$LIBS
12708LIBS="-lXext $LIBS"
12709cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12710/* confdefs.h. */
12711_ACEOF
12712cat confdefs.h >>conftest.$ac_ext
12713cat >>conftest.$ac_ext <<_ACEOF
12714/* end confdefs.h. */
98418dba 12715
d6e01aa5
KL
12716/* Override any GCC internal prototype to avoid an error.
12717 Use char because int might match the return type of a GCC
12718 builtin and then its argument prototype would still apply. */
98418dba
CW
12719#ifdef __cplusplus
12720extern "C"
12721#endif
98418dba 12722char XShapeQueryExtension ();
98418dba
CW
12723int
12724main ()
12725{
d6e01aa5 12726return XShapeQueryExtension ();
98418dba
CW
12727 ;
12728 return 0;
12729}
12730_ACEOF
12731rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12732if { (ac_try="$ac_link"
12733case "(($ac_try" in
12734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12735 *) ac_try_echo=$ac_try;;
12736esac
12737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12738 (eval "$ac_link") 2>conftest.er1
98418dba 12739 ac_status=$?
edfaf76d
LK
12740 grep -v '^ *+' conftest.er1 >conftest.err
12741 rm -f conftest.er1
12742 cat conftest.err >&5
c0d27fcc 12743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12744 (exit $ac_status); } && {
12745 test -z "$ac_c_werror_flag" ||
12746 test ! -s conftest.err
12747 } && test -s conftest$ac_exeext &&
12748 $as_test_x conftest$ac_exeext; then
98418dba
CW
12749 ac_cv_lib_Xext_XShapeQueryExtension=yes
12750else
12751 echo "$as_me: failed program was:" >&5
19650fd6
AS
12752sed 's/^/| /' conftest.$ac_ext >&5
12753
d6e01aa5 12754 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12755fi
d6e01aa5
KL
12756
12757rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12758 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12759LIBS=$ac_check_lib_save_LIBS
12760fi
d6e01aa5
KL
12761{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12762echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12763if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12764 cat >>confdefs.h <<_ACEOF
98418dba 12765#define HAVE_LIBXEXT 1
c0d27fcc 12766_ACEOF
98418dba
CW
12767
12768 LIBS="-lXext $LIBS"
12769
12770fi
12771
12772 fi
12773fi
12774
12775if test "${USE_X_TOOLKIT}" = "MOTIF"; then
d6e01aa5
KL
12776 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12777echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12778if test "${emacs_cv_motif_version_2_1+set}" = set; then
12779 echo $ECHO_N "(cached) $ECHO_C" >&6
12780else
12781 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12782/* confdefs.h. */
12783_ACEOF
12784cat confdefs.h >>conftest.$ac_ext
12785cat >>conftest.$ac_ext <<_ACEOF
12786/* end confdefs.h. */
98418dba 12787#include <Xm/Xm.h>
98418dba
CW
12788int
12789main ()
12790{
12791#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12792int x = 5;
12793#else
12794Motif version prior to 2.1.
12795#endif
12796 ;
12797 return 0;
12798}
12799_ACEOF
12800rm -f conftest.$ac_objext
d6e01aa5
KL
12801if { (ac_try="$ac_compile"
12802case "(($ac_try" in
12803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12804 *) ac_try_echo=$ac_try;;
12805esac
12806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12807 (eval "$ac_compile") 2>conftest.er1
98418dba 12808 ac_status=$?
edfaf76d
LK
12809 grep -v '^ *+' conftest.er1 >conftest.err
12810 rm -f conftest.er1
12811 cat conftest.err >&5
c0d27fcc 12812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12813 (exit $ac_status); } && {
12814 test -z "$ac_c_werror_flag" ||
12815 test ! -s conftest.err
12816 } && test -s conftest.$ac_objext; then
98418dba
CW
12817 emacs_cv_motif_version_2_1=yes
12818else
12819 echo "$as_me: failed program was:" >&5
19650fd6
AS
12820sed 's/^/| /' conftest.$ac_ext >&5
12821
d6e01aa5 12822 emacs_cv_motif_version_2_1=no
98418dba 12823fi
d6e01aa5
KL
12824
12825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12826fi
d6e01aa5
KL
12827{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12828echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12829 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12830 if test $emacs_cv_motif_version_2_1 = yes; then
12831 HAVE_LIBXP=no
b936fae4 12832
c0d27fcc 12833cat >>confdefs.h <<\_ACEOF
98418dba 12834#define HAVE_MOTIF_2_1 1
c0d27fcc 12835_ACEOF
98418dba 12836
d6e01aa5
KL
12837 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12838echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12839if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12840 echo $ECHO_N "(cached) $ECHO_C" >&6
12841else
12842 ac_check_lib_save_LIBS=$LIBS
12843LIBS="-lXp $LIBS"
12844cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12845/* confdefs.h. */
12846_ACEOF
12847cat confdefs.h >>conftest.$ac_ext
12848cat >>conftest.$ac_ext <<_ACEOF
12849/* end confdefs.h. */
98418dba 12850
d6e01aa5
KL
12851/* Override any GCC internal prototype to avoid an error.
12852 Use char because int might match the return type of a GCC
12853 builtin and then its argument prototype would still apply. */
98418dba
CW
12854#ifdef __cplusplus
12855extern "C"
12856#endif
98418dba 12857char XpCreateContext ();
98418dba
CW
12858int
12859main ()
12860{
d6e01aa5 12861return XpCreateContext ();
98418dba
CW
12862 ;
12863 return 0;
12864}
12865_ACEOF
12866rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12867if { (ac_try="$ac_link"
12868case "(($ac_try" in
12869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12870 *) ac_try_echo=$ac_try;;
12871esac
12872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12873 (eval "$ac_link") 2>conftest.er1
98418dba 12874 ac_status=$?
edfaf76d
LK
12875 grep -v '^ *+' conftest.er1 >conftest.err
12876 rm -f conftest.er1
12877 cat conftest.err >&5
c0d27fcc 12878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12879 (exit $ac_status); } && {
12880 test -z "$ac_c_werror_flag" ||
12881 test ! -s conftest.err
12882 } && test -s conftest$ac_exeext &&
12883 $as_test_x conftest$ac_exeext; then
98418dba
CW
12884 ac_cv_lib_Xp_XpCreateContext=yes
12885else
12886 echo "$as_me: failed program was:" >&5
19650fd6
AS
12887sed 's/^/| /' conftest.$ac_ext >&5
12888
d6e01aa5 12889 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12890fi
d6e01aa5
KL
12891
12892rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12893 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12894LIBS=$ac_check_lib_save_LIBS
12895fi
d6e01aa5
KL
12896{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12897echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12898if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12899 HAVE_LIBXP=yes
12900fi
503d2be0 12901
98418dba 12902 if test ${HAVE_LIBXP} = yes; then
b936fae4 12903
c0d27fcc 12904cat >>confdefs.h <<\_ACEOF
98418dba 12905#define HAVE_LIBXP 1
c0d27fcc 12906_ACEOF
503d2be0 12907
98418dba 12908 fi
4693dbc9 12909 else
d6e01aa5
KL
12910 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12911echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12912if test "${emacs_cv_lesstif+set}" = set; then
12913 echo $ECHO_N "(cached) $ECHO_C" >&6
12914else
12915 # We put this in CFLAGS temporarily to precede other -I options
12916 # that might be in CFLAGS temporarily.
12917 # We put this in CPPFLAGS where it precedes the other -I options.
12918 OLD_CPPFLAGS=$CPPFLAGS
12919 OLD_CFLAGS=$CFLAGS
12920 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12921 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12922 cat >conftest.$ac_ext <<_ACEOF
12923/* confdefs.h. */
12924_ACEOF
12925cat confdefs.h >>conftest.$ac_ext
12926cat >>conftest.$ac_ext <<_ACEOF
12927/* end confdefs.h. */
12928#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12929int
12930main ()
12931{
12932int x = 5;
12933 ;
12934 return 0;
12935}
12936_ACEOF
12937rm -f conftest.$ac_objext
d6e01aa5
KL
12938if { (ac_try="$ac_compile"
12939case "(($ac_try" in
12940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12941 *) ac_try_echo=$ac_try;;
12942esac
12943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12944 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12945 ac_status=$?
edfaf76d
LK
12946 grep -v '^ *+' conftest.er1 >conftest.err
12947 rm -f conftest.er1
12948 cat conftest.err >&5
4693dbc9 12949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12950 (exit $ac_status); } && {
12951 test -z "$ac_c_werror_flag" ||
12952 test ! -s conftest.err
12953 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12954 emacs_cv_lesstif=yes
12955else
12956 echo "$as_me: failed program was:" >&5
12957sed 's/^/| /' conftest.$ac_ext >&5
12958
d6e01aa5 12959 emacs_cv_lesstif=no
4693dbc9 12960fi
d6e01aa5
KL
12961
12962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12963fi
d6e01aa5
KL
12964{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12965echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12966 if test $emacs_cv_lesstif = yes; then
12967 # Make sure this -I option remains in CPPFLAGS after it is set
12968 # back to REAL_CPPFLAGS.
12969 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12970 # have those other -I options anyway. Ultimately, having this
12971 # directory ultimately in CPPFLAGS will be enough.
12972 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12973 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12974 else
12975 CFLAGS=$OLD_CFLAGS
12976 CPPFLAGS=$OLD_CPPFLAGS
12977 fi
98418dba
CW
12978 fi
12979fi
12980
c0d27fcc
MR
12981
12982
98418dba
CW
12983USE_TOOLKIT_SCROLL_BARS=no
12984if test "${with_toolkit_scroll_bars}" != "no"; then
12985 if test "${USE_X_TOOLKIT}" != "none"; then
12986 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12987 cat >>confdefs.h <<\_ACEOF
98418dba 12988#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12989_ACEOF
98418dba
CW
12990
12991 HAVE_XAW3D=no
12992 USE_TOOLKIT_SCROLL_BARS=yes
12993 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12994 cat >>confdefs.h <<\_ACEOF
98418dba 12995#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12996_ACEOF
98418dba
CW
12997
12998 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12999 fi
488dd4c4
JD
13000 elif test "${HAVE_GTK}" = "yes"; then
13001 cat >>confdefs.h <<\_ACEOF
13002#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
13003_ACEOF
13004
13005 USE_TOOLKIT_SCROLL_BARS=yes
13006 elif test "${HAVE_CARBON}" = "yes"; then
13007 cat >>confdefs.h <<\_ACEOF
13008#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
13009_ACEOF
13010
13011 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
13012 fi
13013fi
13014
abd39b57 13015cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
13016/* confdefs.h. */
13017_ACEOF
13018cat confdefs.h >>conftest.$ac_ext
13019cat >>conftest.$ac_ext <<_ACEOF
13020/* end confdefs.h. */
13021
13022 #include <X11/Xlib.h>
13023 #include <X11/Xresource.h>
13024int
13025main ()
13026{
13027XIMProc callback;
13028 ;
13029 return 0;
13030}
13031_ACEOF
13032rm -f conftest.$ac_objext
d6e01aa5
KL
13033if { (ac_try="$ac_compile"
13034case "(($ac_try" in
13035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13036 *) ac_try_echo=$ac_try;;
13037esac
13038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13039 (eval "$ac_compile") 2>conftest.er1
abd39b57 13040 ac_status=$?
edfaf76d
LK
13041 grep -v '^ *+' conftest.er1 >conftest.err
13042 rm -f conftest.er1
13043 cat conftest.err >&5
abd39b57 13044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13045 (exit $ac_status); } && {
13046 test -z "$ac_c_werror_flag" ||
13047 test ! -s conftest.err
13048 } && test -s conftest.$ac_objext; then
abd39b57
AC
13049 HAVE_XIM=yes
13050
13051cat >>confdefs.h <<\_ACEOF
13052#define HAVE_XIM 1
13053_ACEOF
13054
13055else
13056 echo "$as_me: failed program was:" >&5
13057sed 's/^/| /' conftest.$ac_ext >&5
13058
d6e01aa5 13059 HAVE_XIM=no
abd39b57 13060fi
d6e01aa5
KL
13061
13062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 13063
c0d27fcc 13064
98418dba 13065if test "${with_xim}" != "no"; then
b936fae4 13066
c0d27fcc 13067cat >>confdefs.h <<\_ACEOF
98418dba 13068#define USE_XIM 1
c0d27fcc 13069_ACEOF
98418dba 13070
793fa0d7 13071fi
abd39b57
AC
13072
13073
13074if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
13075 late_CFLAGS=$CFLAGS
13076 if test "$GCC" = yes; then
13077 CFLAGS="$CFLAGS --pedantic-errors"
13078 fi
cffcede7 13079 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13080/* confdefs.h. */
13081_ACEOF
13082cat confdefs.h >>conftest.$ac_ext
13083cat >>conftest.$ac_ext <<_ACEOF
13084/* end confdefs.h. */
cffcede7
JD
13085
13086#include <X11/Xlib.h>
13087#include <X11/Xresource.h>
13088int
13089main ()
13090{
13091Display *display;
13092XrmDatabase db;
13093char *res_name;
13094char *res_class;
13095XIMProc callback;
13096XPointer *client_data;
849d80cf
DL
13097#ifndef __GNUC__
13098/* If we're not using GCC, it's probably not XFree86, and this is
13099 probably right, but we can't use something like --pedantic-errors. */
13100extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
13101 char*, XIMProc, XPointer*);
13102#endif
cffcede7
JD
13103(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
13104 client_data);
13105 ;
13106 return 0;
13107}
13108_ACEOF
13109rm -f conftest.$ac_objext
d6e01aa5
KL
13110if { (ac_try="$ac_compile"
13111case "(($ac_try" in
13112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13113 *) ac_try_echo=$ac_try;;
13114esac
13115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13116 (eval "$ac_compile") 2>conftest.er1
cffcede7 13117 ac_status=$?
edfaf76d
LK
13118 grep -v '^ *+' conftest.er1 >conftest.err
13119 rm -f conftest.er1
13120 cat conftest.err >&5
cffcede7 13121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13122 (exit $ac_status); } && {
13123 test -z "$ac_c_werror_flag" ||
13124 test ! -s conftest.err
13125 } && test -s conftest.$ac_objext; then
cffcede7
JD
13126 emacs_cv_arg6_star=yes
13127else
13128 echo "$as_me: failed program was:" >&5
19650fd6
AS
13129sed 's/^/| /' conftest.$ac_ext >&5
13130
d6e01aa5 13131
cffcede7 13132fi
d6e01aa5
KL
13133
13134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
13135
13136 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 13137 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
13138#define XRegisterIMInstantiateCallback_arg6 XPointer*
13139_ACEOF
13140
13141 else
f57bd967 13142 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
13143#define XRegisterIMInstantiateCallback_arg6 XPointer
13144_ACEOF
13145
13146 fi
849d80cf 13147 CFLAGS=$late_CFLAGS
98418dba
CW
13148fi
13149
13150### Use -lXpm if available, unless `--with-xpm=no'.
13151HAVE_XPM=no
13152if test "${HAVE_X11}" = "yes"; then
13153 if test "${with_xpm}" != "no"; then
c0d27fcc 13154 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
d6e01aa5
KL
13155 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13156echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
13157if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13158 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13159fi
d6e01aa5
KL
13160{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13161echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 13162else
c0d27fcc 13163 # Is the header compilable?
d6e01aa5
KL
13164{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
13165echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 13166cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13167/* confdefs.h. */
13168_ACEOF
13169cat confdefs.h >>conftest.$ac_ext
13170cat >>conftest.$ac_ext <<_ACEOF
13171/* end confdefs.h. */
c0d27fcc
MR
13172$ac_includes_default
13173#include <X11/xpm.h>
13174_ACEOF
13175rm -f conftest.$ac_objext
d6e01aa5
KL
13176if { (ac_try="$ac_compile"
13177case "(($ac_try" in
13178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13179 *) ac_try_echo=$ac_try;;
13180esac
13181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13182 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13183 ac_status=$?
edfaf76d
LK
13184 grep -v '^ *+' conftest.er1 >conftest.err
13185 rm -f conftest.er1
13186 cat conftest.err >&5
c0d27fcc 13187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13188 (exit $ac_status); } && {
13189 test -z "$ac_c_werror_flag" ||
13190 test ! -s conftest.err
13191 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13192 ac_header_compiler=yes
13193else
13194 echo "$as_me: failed program was:" >&5
19650fd6
AS
13195sed 's/^/| /' conftest.$ac_ext >&5
13196
d6e01aa5 13197 ac_header_compiler=no
c0d27fcc 13198fi
d6e01aa5
KL
13199
13200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13201{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13202echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13203
13204# Is the header present?
d6e01aa5
KL
13205{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
13206echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 13207cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13208/* confdefs.h. */
13209_ACEOF
13210cat confdefs.h >>conftest.$ac_ext
13211cat >>conftest.$ac_ext <<_ACEOF
13212/* end confdefs.h. */
98418dba
CW
13213#include <X11/xpm.h>
13214_ACEOF
d6e01aa5
KL
13215if { (ac_try="$ac_cpp conftest.$ac_ext"
13216case "(($ac_try" in
13217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13218 *) ac_try_echo=$ac_try;;
13219esac
13220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13221 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13222 ac_status=$?
6bae0ccf 13223 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13224 rm -f conftest.er1
13225 cat conftest.err >&5
c0d27fcc 13226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13227 (exit $ac_status); } >/dev/null && {
13228 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13229 test ! -s conftest.err
13230 }; then
c0d27fcc 13231 ac_header_preproc=yes
98418dba
CW
13232else
13233 echo "$as_me: failed program was:" >&5
19650fd6
AS
13234sed 's/^/| /' conftest.$ac_ext >&5
13235
c0d27fcc 13236 ac_header_preproc=no
98418dba 13237fi
d6e01aa5 13238
98418dba 13239rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13240{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13241echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13242
13243# So? What about this header?
edfaf76d
LK
13244case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13245 yes:no: )
c0d27fcc
MR
13246 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
13247echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13248 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
13249echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
13250 ac_header_preproc=yes
13251 ;;
13252 no:yes:* )
13253 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
13254echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
13255 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
13256echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
13257 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
13258echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
13259 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
13260echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
13261 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
13262echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13263 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
13264echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13265
19650fd6 13266 ;;
c0d27fcc 13267esac
d6e01aa5
KL
13268{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13269echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
13270if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13271 echo $ECHO_N "(cached) $ECHO_C" >&6
13272else
13273 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 13274fi
d6e01aa5
KL
13275{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13276echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
13277
13278fi
98418dba 13279if test $ac_cv_header_X11_xpm_h = yes; then
d6e01aa5
KL
13280 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
13281echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 13282if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 13283 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13284else
98418dba
CW
13285 ac_check_lib_save_LIBS=$LIBS
13286LIBS="-lXpm -lX11 $LIBS"
13287cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13288/* confdefs.h. */
13289_ACEOF
13290cat confdefs.h >>conftest.$ac_ext
13291cat >>conftest.$ac_ext <<_ACEOF
13292/* end confdefs.h. */
98418dba 13293
d6e01aa5
KL
13294/* Override any GCC internal prototype to avoid an error.
13295 Use char because int might match the return type of a GCC
13296 builtin and then its argument prototype would still apply. */
503d2be0
AS
13297#ifdef __cplusplus
13298extern "C"
13299#endif
98418dba 13300char XpmReadFileToPixmap ();
503d2be0
AS
13301int
13302main ()
13303{
d6e01aa5 13304return XpmReadFileToPixmap ();
503d2be0
AS
13305 ;
13306 return 0;
13307}
13308_ACEOF
13309rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
13310if { (ac_try="$ac_link"
13311case "(($ac_try" in
13312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13313 *) ac_try_echo=$ac_try;;
13314esac
13315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13316 (eval "$ac_link") 2>conftest.er1
503d2be0 13317 ac_status=$?
edfaf76d
LK
13318 grep -v '^ *+' conftest.er1 >conftest.err
13319 rm -f conftest.er1
13320 cat conftest.err >&5
c0d27fcc 13321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13322 (exit $ac_status); } && {
13323 test -z "$ac_c_werror_flag" ||
13324 test ! -s conftest.err
13325 } && test -s conftest$ac_exeext &&
13326 $as_test_x conftest$ac_exeext; then
98418dba 13327 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
13328else
13329 echo "$as_me: failed program was:" >&5
19650fd6
AS
13330sed 's/^/| /' conftest.$ac_ext >&5
13331
d6e01aa5 13332 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13333fi
d6e01aa5
KL
13334
13335rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13336 conftest$ac_exeext conftest.$ac_ext
98418dba 13337LIBS=$ac_check_lib_save_LIBS
503d2be0 13338fi
d6e01aa5
KL
13339{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13340echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
13341if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
13342 HAVE_XPM=yes
ba4481b5
DL
13343fi
13344
98418dba
CW
13345fi
13346
c0d27fcc 13347
98418dba 13348 if test "${HAVE_XPM}" = "yes"; then
d6e01aa5
KL
13349 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13350echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13351 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13352/* confdefs.h. */
13353_ACEOF
13354cat confdefs.h >>conftest.$ac_ext
13355cat >>conftest.$ac_ext <<_ACEOF
13356/* end confdefs.h. */
98418dba
CW
13357#include "X11/xpm.h"
13358#ifndef XpmReturnAllocPixels
13359no_return_alloc_pixels
503d2be0 13360#endif
ba4481b5 13361
98418dba
CW
13362_ACEOF
13363if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13364 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13365 HAVE_XPM=no
13366else
13367 HAVE_XPM=yes
13368fi
13369rm -f conftest*
ba4481b5 13370
c0d27fcc 13371
98418dba 13372 if test "${HAVE_XPM}" = "yes"; then
d6e01aa5
KL
13373 { echo "$as_me:$LINENO: result: yes" >&5
13374echo "${ECHO_T}yes" >&6; }
98418dba 13375 else
d6e01aa5
KL
13376 { echo "$as_me:$LINENO: result: no" >&5
13377echo "${ECHO_T}no" >&6; }
98418dba
CW
13378 fi
13379 fi
13380 fi
13381
13382 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13383
c0d27fcc 13384cat >>confdefs.h <<\_ACEOF
98418dba 13385#define HAVE_XPM 1
c0d27fcc 13386_ACEOF
98418dba
CW
13387
13388 fi
13389fi
13390
13391### Use -ljpeg if available, unless `--with-jpeg=no'.
13392HAVE_JPEG=no
13393if test "${HAVE_X11}" = "yes"; then
13394 if test "${with_jpeg}" != "no"; then
c0d27fcc 13395 if test "${ac_cv_header_jerror_h+set}" = set; then
d6e01aa5
KL
13396 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13397echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13398if test "${ac_cv_header_jerror_h+set}" = set; then
13399 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13400fi
d6e01aa5
KL
13401{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13402echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13403else
c0d27fcc 13404 # Is the header compilable?
d6e01aa5
KL
13405{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13406echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13407cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13408/* confdefs.h. */
13409_ACEOF
13410cat confdefs.h >>conftest.$ac_ext
13411cat >>conftest.$ac_ext <<_ACEOF
13412/* end confdefs.h. */
c0d27fcc
MR
13413$ac_includes_default
13414#include <jerror.h>
13415_ACEOF
13416rm -f conftest.$ac_objext
d6e01aa5
KL
13417if { (ac_try="$ac_compile"
13418case "(($ac_try" in
13419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13420 *) ac_try_echo=$ac_try;;
13421esac
13422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13423 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13424 ac_status=$?
edfaf76d
LK
13425 grep -v '^ *+' conftest.er1 >conftest.err
13426 rm -f conftest.er1
13427 cat conftest.err >&5
c0d27fcc 13428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13429 (exit $ac_status); } && {
13430 test -z "$ac_c_werror_flag" ||
13431 test ! -s conftest.err
13432 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13433 ac_header_compiler=yes
13434else
13435 echo "$as_me: failed program was:" >&5
19650fd6
AS
13436sed 's/^/| /' conftest.$ac_ext >&5
13437
d6e01aa5 13438 ac_header_compiler=no
c0d27fcc 13439fi
d6e01aa5
KL
13440
13441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13442{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13443echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13444
13445# Is the header present?
d6e01aa5
KL
13446{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13447echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13448cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13449/* confdefs.h. */
13450_ACEOF
13451cat confdefs.h >>conftest.$ac_ext
13452cat >>conftest.$ac_ext <<_ACEOF
13453/* end confdefs.h. */
98418dba
CW
13454#include <jerror.h>
13455_ACEOF
d6e01aa5
KL
13456if { (ac_try="$ac_cpp conftest.$ac_ext"
13457case "(($ac_try" in
13458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13459 *) ac_try_echo=$ac_try;;
13460esac
13461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13462 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13463 ac_status=$?
6bae0ccf 13464 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13465 rm -f conftest.er1
13466 cat conftest.err >&5
c0d27fcc 13467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13468 (exit $ac_status); } >/dev/null && {
13469 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13470 test ! -s conftest.err
13471 }; then
c0d27fcc 13472 ac_header_preproc=yes
ba4481b5 13473else
98418dba 13474 echo "$as_me: failed program was:" >&5
19650fd6
AS
13475sed 's/^/| /' conftest.$ac_ext >&5
13476
c0d27fcc 13477 ac_header_preproc=no
98418dba 13478fi
d6e01aa5 13479
98418dba 13480rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13481{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13482echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13483
13484# So? What about this header?
edfaf76d
LK
13485case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13486 yes:no: )
c0d27fcc
MR
13487 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13488echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13489 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13490echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13491 ac_header_preproc=yes
19650fd6 13492 ;;
edfaf76d 13493 no:yes:* )
c0d27fcc
MR
13494 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13495echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13496 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13497echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13498 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13499echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13500 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13501echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13502 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13503echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13504 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13505echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13506
19650fd6 13507 ;;
c0d27fcc 13508esac
d6e01aa5
KL
13509{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13510echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13511if test "${ac_cv_header_jerror_h+set}" = set; then
13512 echo $ECHO_N "(cached) $ECHO_C" >&6
13513else
13514 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13515fi
d6e01aa5
KL
13516{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13517echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13518
13519fi
98418dba 13520if test $ac_cv_header_jerror_h = yes; then
d6e01aa5
KL
13521 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13522echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13523if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13524 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13525else
98418dba
CW
13526 ac_check_lib_save_LIBS=$LIBS
13527LIBS="-ljpeg $LIBS"
13528cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13529/* confdefs.h. */
13530_ACEOF
13531cat confdefs.h >>conftest.$ac_ext
13532cat >>conftest.$ac_ext <<_ACEOF
13533/* end confdefs.h. */
98418dba 13534
d6e01aa5
KL
13535/* Override any GCC internal prototype to avoid an error.
13536 Use char because int might match the return type of a GCC
13537 builtin and then its argument prototype would still apply. */
98418dba
CW
13538#ifdef __cplusplus
13539extern "C"
13540#endif
98418dba 13541char jpeg_destroy_compress ();
503d2be0
AS
13542int
13543main ()
13544{
d6e01aa5 13545return jpeg_destroy_compress ();
503d2be0
AS
13546 ;
13547 return 0;
13548}
13549_ACEOF
13550rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
13551if { (ac_try="$ac_link"
13552case "(($ac_try" in
13553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13554 *) ac_try_echo=$ac_try;;
13555esac
13556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13557 (eval "$ac_link") 2>conftest.er1
503d2be0 13558 ac_status=$?
edfaf76d
LK
13559 grep -v '^ *+' conftest.er1 >conftest.err
13560 rm -f conftest.er1
13561 cat conftest.err >&5
c0d27fcc 13562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13563 (exit $ac_status); } && {
13564 test -z "$ac_c_werror_flag" ||
13565 test ! -s conftest.err
13566 } && test -s conftest$ac_exeext &&
13567 $as_test_x conftest$ac_exeext; then
98418dba 13568 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13569else
503d2be0 13570 echo "$as_me: failed program was:" >&5
19650fd6
AS
13571sed 's/^/| /' conftest.$ac_ext >&5
13572
d6e01aa5 13573 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13574fi
d6e01aa5
KL
13575
13576rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13577 conftest$ac_exeext conftest.$ac_ext
98418dba 13578LIBS=$ac_check_lib_save_LIBS
ba4481b5 13579fi
d6e01aa5
KL
13580{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13581echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13582if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13583 HAVE_JPEG=yes
ba4481b5 13584fi
98418dba 13585
ba4481b5 13586fi
98418dba 13587
c0d27fcc 13588
ba4481b5 13589 fi
ba4481b5 13590
c0d27fcc 13591
98418dba 13592 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13593 cat >>confdefs.h <<\_ACEOF
98418dba 13594#define HAVE_JPEG 1
c0d27fcc 13595_ACEOF
98418dba
CW
13596
13597 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13598/* confdefs.h. */
13599_ACEOF
13600cat confdefs.h >>conftest.$ac_ext
13601cat >>conftest.$ac_ext <<_ACEOF
13602/* end confdefs.h. */
22044edf 13603#include <jpeglib.h>
98418dba
CW
13604 version=JPEG_LIB_VERSION
13605
13606_ACEOF
13607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13608 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13609 cat >>confdefs.h <<\_ACEOF
98418dba 13610#define HAVE_JPEG 1
c0d27fcc 13611_ACEOF
ba4481b5 13612
98418dba 13613else
c0d27fcc 13614 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13615echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13616 HAVE_JPEG=no
ba4481b5 13617fi
98418dba 13618rm -f conftest*
ba4481b5 13619
98418dba
CW
13620 fi
13621fi
503d2be0 13622
98418dba
CW
13623### Use -lpng if available, unless `--with-png=no'.
13624HAVE_PNG=no
13625if test "${HAVE_X11}" = "yes"; then
13626 if test "${with_png}" != "no"; then
f57bd967
DL
13627 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13628 # in /usr/include/libpng.
13629
13630
13631for ac_header in png.h libpng/png.h
13632do
13633as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
13634if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13635 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13636echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13637if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13638 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13639fi
d6e01aa5
KL
13640ac_res=`eval echo '${'$as_ac_Header'}'`
13641 { echo "$as_me:$LINENO: result: $ac_res" >&5
13642echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13643else
c0d27fcc 13644 # Is the header compilable?
d6e01aa5
KL
13645{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13646echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13647cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13648/* confdefs.h. */
13649_ACEOF
13650cat confdefs.h >>conftest.$ac_ext
13651cat >>conftest.$ac_ext <<_ACEOF
13652/* end confdefs.h. */
c0d27fcc 13653$ac_includes_default
f57bd967 13654#include <$ac_header>
c0d27fcc
MR
13655_ACEOF
13656rm -f conftest.$ac_objext
d6e01aa5
KL
13657if { (ac_try="$ac_compile"
13658case "(($ac_try" in
13659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13660 *) ac_try_echo=$ac_try;;
13661esac
13662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13663 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13664 ac_status=$?
edfaf76d
LK
13665 grep -v '^ *+' conftest.er1 >conftest.err
13666 rm -f conftest.er1
13667 cat conftest.err >&5
c0d27fcc 13668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13669 (exit $ac_status); } && {
13670 test -z "$ac_c_werror_flag" ||
13671 test ! -s conftest.err
13672 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13673 ac_header_compiler=yes
13674else
13675 echo "$as_me: failed program was:" >&5
19650fd6
AS
13676sed 's/^/| /' conftest.$ac_ext >&5
13677
d6e01aa5 13678 ac_header_compiler=no
c0d27fcc 13679fi
d6e01aa5
KL
13680
13681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13682{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13683echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13684
13685# Is the header present?
d6e01aa5
KL
13686{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13687echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13688cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13689/* confdefs.h. */
13690_ACEOF
13691cat confdefs.h >>conftest.$ac_ext
13692cat >>conftest.$ac_ext <<_ACEOF
13693/* end confdefs.h. */
f57bd967 13694#include <$ac_header>
503d2be0 13695_ACEOF
d6e01aa5
KL
13696if { (ac_try="$ac_cpp conftest.$ac_ext"
13697case "(($ac_try" in
13698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13699 *) ac_try_echo=$ac_try;;
13700esac
13701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13702 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13703 ac_status=$?
6bae0ccf 13704 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13705 rm -f conftest.er1
13706 cat conftest.err >&5
c0d27fcc 13707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13708 (exit $ac_status); } >/dev/null && {
13709 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13710 test ! -s conftest.err
13711 }; then
c0d27fcc 13712 ac_header_preproc=yes
503d2be0
AS
13713else
13714 echo "$as_me: failed program was:" >&5
19650fd6
AS
13715sed 's/^/| /' conftest.$ac_ext >&5
13716
c0d27fcc 13717 ac_header_preproc=no
ba4481b5 13718fi
d6e01aa5 13719
503d2be0 13720rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13721{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13722echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13723
13724# So? What about this header?
edfaf76d
LK
13725case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13726 yes:no: )
f57bd967
DL
13727 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13728echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13729 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13730echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13731 ac_header_preproc=yes
19650fd6 13732 ;;
edfaf76d 13733 no:yes:* )
f57bd967
DL
13734 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13735echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13736 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13737echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13738 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13739echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13740 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13741echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 13742 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13743echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13744 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13745echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13746
19650fd6 13747 ;;
c0d27fcc 13748esac
d6e01aa5
KL
13749{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13750echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13751if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
13752 echo $ECHO_N "(cached) $ECHO_C" >&6
13753else
edfaf76d 13754 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 13755fi
d6e01aa5
KL
13756ac_res=`eval echo '${'$as_ac_Header'}'`
13757 { echo "$as_me:$LINENO: result: $ac_res" >&5
13758echo "${ECHO_T}$ac_res" >&6; }
f57bd967 13759
ba4481b5 13760fi
f57bd967
DL
13761if test `eval echo '${'$as_ac_Header'}'` = yes; then
13762 cat >>confdefs.h <<_ACEOF
13763#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13764_ACEOF
c0d27fcc
MR
13765
13766fi
f57bd967
DL
13767
13768done
13769
13770 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
d6e01aa5
KL
13771 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
13772echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 13773if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 13774 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13775else
98418dba
CW
13776 ac_check_lib_save_LIBS=$LIBS
13777LIBS="-lpng -lz -lm $LIBS"
13778cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13779/* confdefs.h. */
13780_ACEOF
13781cat confdefs.h >>conftest.$ac_ext
13782cat >>conftest.$ac_ext <<_ACEOF
13783/* end confdefs.h. */
98418dba 13784
d6e01aa5
KL
13785/* Override any GCC internal prototype to avoid an error.
13786 Use char because int might match the return type of a GCC
13787 builtin and then its argument prototype would still apply. */
503d2be0
AS
13788#ifdef __cplusplus
13789extern "C"
13790#endif
98418dba 13791char png_get_channels ();
503d2be0
AS
13792int
13793main ()
13794{
d6e01aa5 13795return png_get_channels ();
503d2be0
AS
13796 ;
13797 return 0;
13798}
13799_ACEOF
13800rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
13801if { (ac_try="$ac_link"
13802case "(($ac_try" in
13803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13804 *) ac_try_echo=$ac_try;;
13805esac
13806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13807 (eval "$ac_link") 2>conftest.er1
503d2be0 13808 ac_status=$?
edfaf76d
LK
13809 grep -v '^ *+' conftest.er1 >conftest.err
13810 rm -f conftest.er1
13811 cat conftest.err >&5
c0d27fcc 13812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13813 (exit $ac_status); } && {
13814 test -z "$ac_c_werror_flag" ||
13815 test ! -s conftest.err
13816 } && test -s conftest$ac_exeext &&
13817 $as_test_x conftest$ac_exeext; then
98418dba 13818 ac_cv_lib_png_png_get_channels=yes
73b77ee5 13819else
98418dba 13820 echo "$as_me: failed program was:" >&5
19650fd6
AS
13821sed 's/^/| /' conftest.$ac_ext >&5
13822
d6e01aa5 13823 ac_cv_lib_png_png_get_channels=no
73b77ee5 13824fi
d6e01aa5
KL
13825
13826rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13827 conftest$ac_exeext conftest.$ac_ext
98418dba 13828LIBS=$ac_check_lib_save_LIBS
73b77ee5 13829fi
d6e01aa5
KL
13830{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
13831echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
13832if test $ac_cv_lib_png_png_get_channels = yes; then
13833 HAVE_PNG=yes
73b77ee5 13834fi
503d2be0 13835
f57bd967 13836 fi
98418dba
CW
13837 fi
13838
13839 if test "${HAVE_PNG}" = "yes"; then
b936fae4 13840
c0d27fcc 13841cat >>confdefs.h <<\_ACEOF
98418dba 13842#define HAVE_PNG 1
c0d27fcc 13843_ACEOF
73b77ee5 13844
98418dba 13845 fi
73b77ee5
GM
13846fi
13847
98418dba
CW
13848### Use -ltiff if available, unless `--with-tiff=no'.
13849HAVE_TIFF=no
13850if test "${HAVE_X11}" = "yes"; then
13851 if test "${with_tiff}" != "no"; then
c0d27fcc 13852 if test "${ac_cv_header_tiffio_h+set}" = set; then
d6e01aa5
KL
13853 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
13854echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
13855if test "${ac_cv_header_tiffio_h+set}" = set; then
13856 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13857fi
d6e01aa5
KL
13858{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13859echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 13860else
c0d27fcc 13861 # Is the header compilable?
d6e01aa5
KL
13862{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
13863echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 13864cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13865/* confdefs.h. */
13866_ACEOF
13867cat confdefs.h >>conftest.$ac_ext
13868cat >>conftest.$ac_ext <<_ACEOF
13869/* end confdefs.h. */
c0d27fcc
MR
13870$ac_includes_default
13871#include <tiffio.h>
13872_ACEOF
13873rm -f conftest.$ac_objext
d6e01aa5
KL
13874if { (ac_try="$ac_compile"
13875case "(($ac_try" in
13876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13877 *) ac_try_echo=$ac_try;;
13878esac
13879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13880 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13881 ac_status=$?
edfaf76d
LK
13882 grep -v '^ *+' conftest.er1 >conftest.err
13883 rm -f conftest.er1
13884 cat conftest.err >&5
c0d27fcc 13885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13886 (exit $ac_status); } && {
13887 test -z "$ac_c_werror_flag" ||
13888 test ! -s conftest.err
13889 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13890 ac_header_compiler=yes
13891else
13892 echo "$as_me: failed program was:" >&5
19650fd6
AS
13893sed 's/^/| /' conftest.$ac_ext >&5
13894
d6e01aa5 13895 ac_header_compiler=no
c0d27fcc 13896fi
d6e01aa5
KL
13897
13898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13899{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13900echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13901
13902# Is the header present?
d6e01aa5
KL
13903{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
13904echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 13905cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13906/* confdefs.h. */
13907_ACEOF
13908cat confdefs.h >>conftest.$ac_ext
13909cat >>conftest.$ac_ext <<_ACEOF
13910/* end confdefs.h. */
98418dba
CW
13911#include <tiffio.h>
13912_ACEOF
d6e01aa5
KL
13913if { (ac_try="$ac_cpp conftest.$ac_ext"
13914case "(($ac_try" in
13915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13916 *) ac_try_echo=$ac_try;;
13917esac
13918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13919 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13920 ac_status=$?
6bae0ccf 13921 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13922 rm -f conftest.er1
13923 cat conftest.err >&5
c0d27fcc 13924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13925 (exit $ac_status); } >/dev/null && {
13926 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13927 test ! -s conftest.err
13928 }; then
c0d27fcc 13929 ac_header_preproc=yes
98418dba
CW
13930else
13931 echo "$as_me: failed program was:" >&5
19650fd6
AS
13932sed 's/^/| /' conftest.$ac_ext >&5
13933
c0d27fcc 13934 ac_header_preproc=no
98418dba 13935fi
d6e01aa5 13936
98418dba 13937rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13938{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13939echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13940
13941# So? What about this header?
edfaf76d
LK
13942case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13943 yes:no: )
c0d27fcc
MR
13944 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
13945echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13946 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
13947echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
13948 ac_header_preproc=yes
19650fd6 13949 ;;
edfaf76d 13950 no:yes:* )
c0d27fcc
MR
13951 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
13952echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13953 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
13954echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
13955 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
13956echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
13957 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
13958echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13959 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 13960echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13961 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
13962echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13963
19650fd6 13964 ;;
c0d27fcc 13965esac
d6e01aa5
KL
13966{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
13967echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
13968if test "${ac_cv_header_tiffio_h+set}" = set; then
13969 echo $ECHO_N "(cached) $ECHO_C" >&6
13970else
13971 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 13972fi
d6e01aa5
KL
13973{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13974echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
13975
13976fi
98418dba
CW
13977if test $ac_cv_header_tiffio_h = yes; then
13978 tifflibs="-lz -lm"
13979 # At least one tiff package requires the jpeg library.
13980 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
d6e01aa5
KL
13981 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
13982echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 13983if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 13984 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13985else
503d2be0 13986 ac_check_lib_save_LIBS=$LIBS
98418dba 13987LIBS="-ltiff $tifflibs $LIBS"
503d2be0 13988cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13989/* confdefs.h. */
13990_ACEOF
13991cat confdefs.h >>conftest.$ac_ext
13992cat >>conftest.$ac_ext <<_ACEOF
13993/* end confdefs.h. */
503d2be0 13994
d6e01aa5
KL
13995/* Override any GCC internal prototype to avoid an error.
13996 Use char because int might match the return type of a GCC
13997 builtin and then its argument prototype would still apply. */
503d2be0
AS
13998#ifdef __cplusplus
13999extern "C"
14000#endif
98418dba 14001char TIFFGetVersion ();
503d2be0
AS
14002int
14003main ()
14004{
d6e01aa5 14005return TIFFGetVersion ();
503d2be0
AS
14006 ;
14007 return 0;
14008}
14009_ACEOF
14010rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14011if { (ac_try="$ac_link"
14012case "(($ac_try" in
14013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14014 *) ac_try_echo=$ac_try;;
14015esac
14016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14017 (eval "$ac_link") 2>conftest.er1
503d2be0 14018 ac_status=$?
edfaf76d
LK
14019 grep -v '^ *+' conftest.er1 >conftest.err
14020 rm -f conftest.er1
14021 cat conftest.err >&5
c0d27fcc 14022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14023 (exit $ac_status); } && {
14024 test -z "$ac_c_werror_flag" ||
14025 test ! -s conftest.err
14026 } && test -s conftest$ac_exeext &&
14027 $as_test_x conftest$ac_exeext; then
98418dba 14028 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
14029else
14030 echo "$as_me: failed program was:" >&5
19650fd6
AS
14031sed 's/^/| /' conftest.$ac_ext >&5
14032
d6e01aa5 14033 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 14034fi
d6e01aa5
KL
14035
14036rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14037 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14038LIBS=$ac_check_lib_save_LIBS
14039fi
d6e01aa5
KL
14040{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14041echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
14042if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
14043 HAVE_TIFF=yes
14044fi
14045
14046fi
73b77ee5 14047
c0d27fcc 14048
98418dba
CW
14049 fi
14050
14051 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 14052
c0d27fcc 14053cat >>confdefs.h <<\_ACEOF
98418dba 14054#define HAVE_TIFF 1
c0d27fcc 14055_ACEOF
98418dba
CW
14056
14057 fi
73b77ee5
GM
14058fi
14059
9aeb8aaa 14060### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 14061HAVE_GIF=no
9aeb8aaa
GM
14062if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
14063 if test "${ac_cv_header_gif_lib_h+set}" = set; then
d6e01aa5
KL
14064 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14065echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
14066if test "${ac_cv_header_gif_lib_h+set}" = set; then
14067 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14068fi
d6e01aa5
KL
14069{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14070echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 14071else
c0d27fcc 14072 # Is the header compilable?
d6e01aa5
KL
14073{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
14074echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 14075cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14076/* confdefs.h. */
14077_ACEOF
14078cat confdefs.h >>conftest.$ac_ext
14079cat >>conftest.$ac_ext <<_ACEOF
14080/* end confdefs.h. */
c0d27fcc
MR
14081$ac_includes_default
14082#include <gif_lib.h>
14083_ACEOF
14084rm -f conftest.$ac_objext
d6e01aa5
KL
14085if { (ac_try="$ac_compile"
14086case "(($ac_try" in
14087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14088 *) ac_try_echo=$ac_try;;
14089esac
14090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14091 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14092 ac_status=$?
edfaf76d
LK
14093 grep -v '^ *+' conftest.er1 >conftest.err
14094 rm -f conftest.er1
14095 cat conftest.err >&5
c0d27fcc 14096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14097 (exit $ac_status); } && {
14098 test -z "$ac_c_werror_flag" ||
14099 test ! -s conftest.err
14100 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14101 ac_header_compiler=yes
14102else
14103 echo "$as_me: failed program was:" >&5
19650fd6
AS
14104sed 's/^/| /' conftest.$ac_ext >&5
14105
d6e01aa5 14106 ac_header_compiler=no
c0d27fcc 14107fi
d6e01aa5
KL
14108
14109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14110{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14111echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14112
14113# Is the header present?
d6e01aa5
KL
14114{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
14115echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 14116cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14117/* confdefs.h. */
14118_ACEOF
14119cat confdefs.h >>conftest.$ac_ext
14120cat >>conftest.$ac_ext <<_ACEOF
14121/* end confdefs.h. */
98418dba
CW
14122#include <gif_lib.h>
14123_ACEOF
d6e01aa5
KL
14124if { (ac_try="$ac_cpp conftest.$ac_ext"
14125case "(($ac_try" in
14126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14127 *) ac_try_echo=$ac_try;;
14128esac
14129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14130 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14131 ac_status=$?
6bae0ccf 14132 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14133 rm -f conftest.er1
14134 cat conftest.err >&5
c0d27fcc 14135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14136 (exit $ac_status); } >/dev/null && {
14137 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14138 test ! -s conftest.err
14139 }; then
c0d27fcc 14140 ac_header_preproc=yes
98418dba
CW
14141else
14142 echo "$as_me: failed program was:" >&5
19650fd6
AS
14143sed 's/^/| /' conftest.$ac_ext >&5
14144
c0d27fcc 14145 ac_header_preproc=no
98418dba 14146fi
d6e01aa5 14147
98418dba 14148rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
14149{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14150echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14151
14152# So? What about this header?
edfaf76d
LK
14153case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14154 yes:no: )
c0d27fcc
MR
14155 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14156echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14157 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
14158echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
14159 ac_header_preproc=yes
19650fd6 14160 ;;
edfaf76d 14161 no:yes:* )
c0d27fcc
MR
14162 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
14163echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14164 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
14165echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
14166 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
14167echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
14168 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
14169echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14170 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 14171echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14172 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
14173echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 14174
19650fd6 14175 ;;
c0d27fcc 14176esac
d6e01aa5
KL
14177{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14178echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14179if test "${ac_cv_header_gif_lib_h+set}" = set; then
14180 echo $ECHO_N "(cached) $ECHO_C" >&6
14181else
14182 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 14183fi
d6e01aa5
KL
14184{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14185echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
14186
14187fi
98418dba
CW
14188if test $ac_cv_header_gif_lib_h = yes; then
14189 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14190# Earlier versions can crash Emacs.
63175cd2
GM
14191 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
14192echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
14193if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
503d2be0 14194 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14195else
503d2be0 14196 ac_check_lib_save_LIBS=$LIBS
63175cd2 14197LIBS="-lgif $LIBS"
503d2be0 14198cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14199/* confdefs.h. */
14200_ACEOF
14201cat confdefs.h >>conftest.$ac_ext
14202cat >>conftest.$ac_ext <<_ACEOF
14203/* end confdefs.h. */
73b77ee5 14204
d6e01aa5
KL
14205/* Override any GCC internal prototype to avoid an error.
14206 Use char because int might match the return type of a GCC
14207 builtin and then its argument prototype would still apply. */
98418dba
CW
14208#ifdef __cplusplus
14209extern "C"
14210#endif
98418dba 14211char EGifPutExtensionLast ();
503d2be0
AS
14212int
14213main ()
14214{
d6e01aa5 14215return EGifPutExtensionLast ();
503d2be0
AS
14216 ;
14217 return 0;
14218}
14219_ACEOF
14220rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14221if { (ac_try="$ac_link"
14222case "(($ac_try" in
14223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14224 *) ac_try_echo=$ac_try;;
14225esac
14226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14227 (eval "$ac_link") 2>conftest.er1
503d2be0 14228 ac_status=$?
edfaf76d
LK
14229 grep -v '^ *+' conftest.er1 >conftest.err
14230 rm -f conftest.er1
14231 cat conftest.err >&5
c0d27fcc 14232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14233 (exit $ac_status); } && {
14234 test -z "$ac_c_werror_flag" ||
14235 test ! -s conftest.err
14236 } && test -s conftest$ac_exeext &&
14237 $as_test_x conftest$ac_exeext; then
63175cd2 14238 ac_cv_lib_gif_EGifPutExtensionLast=yes
35996d22 14239else
98418dba 14240 echo "$as_me: failed program was:" >&5
19650fd6
AS
14241sed 's/^/| /' conftest.$ac_ext >&5
14242
63175cd2 14243 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 14244fi
d6e01aa5
KL
14245
14246rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14247 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14248LIBS=$ac_check_lib_save_LIBS
14249fi
63175cd2
GM
14250{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14251echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14252if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 14253 HAVE_GIF=yes
9aeb8aaa 14254else
63175cd2 14255 try_libungif=yes
98418dba
CW
14256fi
14257
14258fi
14259
c0d27fcc 14260
9aeb8aaa
GM
14261
14262 if test "$HAVE_GIF" = yes; then
63175cd2 14263 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
14264 fi
14265
63175cd2
GM
14266# If gif_lib.h but no libgif, try libungif.
14267 if test x"$try_libungif" = xyes; then
14268 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
14269echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
14270if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
9aeb8aaa
GM
14271 echo $ECHO_N "(cached) $ECHO_C" >&6
14272else
14273 ac_check_lib_save_LIBS=$LIBS
63175cd2 14274LIBS="-lungif $LIBS"
9aeb8aaa
GM
14275cat >conftest.$ac_ext <<_ACEOF
14276/* confdefs.h. */
14277_ACEOF
14278cat confdefs.h >>conftest.$ac_ext
14279cat >>conftest.$ac_ext <<_ACEOF
14280/* end confdefs.h. */
14281
14282/* Override any GCC internal prototype to avoid an error.
14283 Use char because int might match the return type of a GCC
14284 builtin and then its argument prototype would still apply. */
14285#ifdef __cplusplus
14286extern "C"
14287#endif
14288char EGifPutExtensionLast ();
14289int
14290main ()
14291{
14292return EGifPutExtensionLast ();
14293 ;
14294 return 0;
14295}
14296_ACEOF
14297rm -f conftest.$ac_objext conftest$ac_exeext
14298if { (ac_try="$ac_link"
14299case "(($ac_try" in
14300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14301 *) ac_try_echo=$ac_try;;
14302esac
14303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14304 (eval "$ac_link") 2>conftest.er1
14305 ac_status=$?
14306 grep -v '^ *+' conftest.er1 >conftest.err
14307 rm -f conftest.er1
14308 cat conftest.err >&5
14309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14310 (exit $ac_status); } && {
14311 test -z "$ac_c_werror_flag" ||
14312 test ! -s conftest.err
14313 } && test -s conftest$ac_exeext &&
14314 $as_test_x conftest$ac_exeext; then
63175cd2 14315 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa
GM
14316else
14317 echo "$as_me: failed program was:" >&5
14318sed 's/^/| /' conftest.$ac_ext >&5
14319
63175cd2 14320 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba
CW
14321fi
14322
9aeb8aaa
GM
14323rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14324 conftest$ac_exeext conftest.$ac_ext
14325LIBS=$ac_check_lib_save_LIBS
14326fi
63175cd2
GM
14327{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14328echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14329if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa 14330 HAVE_GIF=yes
98418dba
CW
14331fi
14332
c0d27fcc 14333
9aeb8aaa
GM
14334 if test "$HAVE_GIF" = yes; then
14335
14336cat >>confdefs.h <<\_ACEOF
63175cd2 14337#define LIBGIF -lungif
9aeb8aaa
GM
14338_ACEOF
14339
63175cd2 14340 ac_gif_lib_name="-lungif"
9aeb8aaa 14341 fi
98418dba
CW
14342 fi
14343
14344 if test "${HAVE_GIF}" = "yes"; then
b936fae4 14345
c0d27fcc 14346cat >>confdefs.h <<\_ACEOF
98418dba 14347#define HAVE_GIF 1
c0d27fcc 14348_ACEOF
98418dba
CW
14349
14350 fi
14351fi
14352
5afbeb22
JD
14353if test "${HAVE_X11}" = "yes"; then
14354 MISSING=""
14355 WITH_NO=""
14356 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14357 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14358 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14359 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14360 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14361 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14362 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14363 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14364 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14365 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14366
14367 if test "X${MISSING}" != X; then
c982cf7d 14368 { { echo "$as_me:$LINENO: error: The following required libraries were not found:
5afbeb22 14369 $MISSING
86e73516 14370Maybe some development libraries/packages are missing?
5afbeb22
JD
14371If you don't want to link with them give
14372 $WITH_NO
14373as options to configure" >&5
c982cf7d 14374echo "$as_me: error: The following required libraries were not found:
5afbeb22 14375 $MISSING
86e73516 14376Maybe some development libraries/packages are missing?
5afbeb22
JD
14377If you don't want to link with them give
14378 $WITH_NO
14379as options to configure" >&2;}
86e73516 14380 { (exit 1); exit 1; }; }
98418dba
CW
14381 fi
14382fi
14383
79011b82
NR
14384### Use -lgpm if available, unless `--with-gpm=no'.
14385HAVE_GPM=no
14386if test "${with_gpm}" != "no"; then
14387 if test "${ac_cv_header_gpm_h+set}" = set; then
14388 { echo "$as_me:$LINENO: checking for gpm.h" >&5
14389echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14390if test "${ac_cv_header_gpm_h+set}" = set; then
14391 echo $ECHO_N "(cached) $ECHO_C" >&6
14392fi
14393{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14394echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14395else
14396 # Is the header compilable?
14397{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
14398echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
14399cat >conftest.$ac_ext <<_ACEOF
14400/* confdefs.h. */
14401_ACEOF
14402cat confdefs.h >>conftest.$ac_ext
14403cat >>conftest.$ac_ext <<_ACEOF
14404/* end confdefs.h. */
14405$ac_includes_default
14406#include <gpm.h>
14407_ACEOF
14408rm -f conftest.$ac_objext
14409if { (ac_try="$ac_compile"
14410case "(($ac_try" in
14411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14412 *) ac_try_echo=$ac_try;;
14413esac
14414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14415 (eval "$ac_compile") 2>conftest.er1
14416 ac_status=$?
14417 grep -v '^ *+' conftest.er1 >conftest.err
14418 rm -f conftest.er1
14419 cat conftest.err >&5
14420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14421 (exit $ac_status); } && {
14422 test -z "$ac_c_werror_flag" ||
14423 test ! -s conftest.err
14424 } && test -s conftest.$ac_objext; then
14425 ac_header_compiler=yes
14426else
14427 echo "$as_me: failed program was:" >&5
14428sed 's/^/| /' conftest.$ac_ext >&5
14429
14430 ac_header_compiler=no
14431fi
14432
14433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14434{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14435echo "${ECHO_T}$ac_header_compiler" >&6; }
14436
14437# Is the header present?
14438{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
14439echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
14440cat >conftest.$ac_ext <<_ACEOF
14441/* confdefs.h. */
14442_ACEOF
14443cat confdefs.h >>conftest.$ac_ext
14444cat >>conftest.$ac_ext <<_ACEOF
14445/* end confdefs.h. */
14446#include <gpm.h>
14447_ACEOF
14448if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 2>conftest.er1
14455 ac_status=$?
14456 grep -v '^ *+' conftest.er1 >conftest.err
14457 rm -f conftest.er1
14458 cat conftest.err >&5
14459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14460 (exit $ac_status); } >/dev/null && {
14461 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14462 test ! -s conftest.err
14463 }; then
14464 ac_header_preproc=yes
14465else
14466 echo "$as_me: failed program was:" >&5
14467sed 's/^/| /' conftest.$ac_ext >&5
14468
14469 ac_header_preproc=no
14470fi
14471
14472rm -f conftest.err conftest.$ac_ext
14473{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14474echo "${ECHO_T}$ac_header_preproc" >&6; }
14475
14476# So? What about this header?
14477case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14478 yes:no: )
14479 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14480echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14481 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14482echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
14483 ac_header_preproc=yes
14484 ;;
14485 no:yes:* )
14486 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14487echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14488 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14489echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14490 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14491echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14492 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14493echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14494 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14495echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14496 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14497echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
14498
14499 ;;
14500esac
14501{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14502echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14503if test "${ac_cv_header_gpm_h+set}" = set; then
14504 echo $ECHO_N "(cached) $ECHO_C" >&6
14505else
14506 ac_cv_header_gpm_h=$ac_header_preproc
14507fi
14508{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14509echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14510
14511fi
14512if test $ac_cv_header_gpm_h = yes; then
14513 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14514echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
14515if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
14516 echo $ECHO_N "(cached) $ECHO_C" >&6
14517else
14518 ac_check_lib_save_LIBS=$LIBS
14519LIBS="-lgpm $LIBS"
14520cat >conftest.$ac_ext <<_ACEOF
14521/* confdefs.h. */
14522_ACEOF
14523cat confdefs.h >>conftest.$ac_ext
14524cat >>conftest.$ac_ext <<_ACEOF
14525/* end confdefs.h. */
14526
14527/* Override any GCC internal prototype to avoid an error.
14528 Use char because int might match the return type of a GCC
14529 builtin and then its argument prototype would still apply. */
14530#ifdef __cplusplus
14531extern "C"
14532#endif
14533char Gpm_Open ();
14534int
14535main ()
14536{
14537return Gpm_Open ();
14538 ;
14539 return 0;
14540}
14541_ACEOF
14542rm -f conftest.$ac_objext conftest$ac_exeext
14543if { (ac_try="$ac_link"
14544case "(($ac_try" in
14545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14546 *) ac_try_echo=$ac_try;;
14547esac
14548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14549 (eval "$ac_link") 2>conftest.er1
14550 ac_status=$?
14551 grep -v '^ *+' conftest.er1 >conftest.err
14552 rm -f conftest.er1
14553 cat conftest.err >&5
14554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14555 (exit $ac_status); } && {
14556 test -z "$ac_c_werror_flag" ||
14557 test ! -s conftest.err
14558 } && test -s conftest$ac_exeext &&
14559 $as_test_x conftest$ac_exeext; then
14560 ac_cv_lib_gpm_Gpm_Open=yes
14561else
14562 echo "$as_me: failed program was:" >&5
14563sed 's/^/| /' conftest.$ac_ext >&5
14564
14565 ac_cv_lib_gpm_Gpm_Open=no
14566fi
14567
14568rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14569 conftest$ac_exeext conftest.$ac_ext
14570LIBS=$ac_check_lib_save_LIBS
14571fi
14572{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14573echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
14574if test $ac_cv_lib_gpm_Gpm_Open = yes; then
14575 HAVE_GPM=yes
14576fi
14577
14578fi
14579
14580
14581fi
14582
14583if test "${HAVE_GPM}" = "yes"; then
14584
14585cat >>confdefs.h <<\_ACEOF
14586#define HAVE_GPM 1
14587_ACEOF
14588
14589fi
14590
cef11da2 14591if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
d6e01aa5
KL
14592 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14593echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14594if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14595 echo $ECHO_N "(cached) $ECHO_C" >&6
14596fi
d6e01aa5
KL
14597{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14598echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14599else
14600 # Is the header compilable?
d6e01aa5
KL
14601{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14602echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14603cat >conftest.$ac_ext <<_ACEOF
14604/* confdefs.h. */
14605_ACEOF
14606cat confdefs.h >>conftest.$ac_ext
14607cat >>conftest.$ac_ext <<_ACEOF
14608/* end confdefs.h. */
14609$ac_includes_default
14610#include <malloc/malloc.h>
14611_ACEOF
14612rm -f conftest.$ac_objext
d6e01aa5
KL
14613if { (ac_try="$ac_compile"
14614case "(($ac_try" in
14615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14616 *) ac_try_echo=$ac_try;;
14617esac
14618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14619 (eval "$ac_compile") 2>conftest.er1
cef11da2 14620 ac_status=$?
edfaf76d
LK
14621 grep -v '^ *+' conftest.er1 >conftest.err
14622 rm -f conftest.er1
14623 cat conftest.err >&5
cef11da2 14624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14625 (exit $ac_status); } && {
14626 test -z "$ac_c_werror_flag" ||
14627 test ! -s conftest.err
14628 } && test -s conftest.$ac_objext; then
cef11da2
ST
14629 ac_header_compiler=yes
14630else
14631 echo "$as_me: failed program was:" >&5
14632sed 's/^/| /' conftest.$ac_ext >&5
14633
d6e01aa5 14634 ac_header_compiler=no
cef11da2 14635fi
d6e01aa5
KL
14636
14637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14638{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14639echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14640
14641# Is the header present?
d6e01aa5
KL
14642{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14643echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14644cat >conftest.$ac_ext <<_ACEOF
14645/* confdefs.h. */
14646_ACEOF
14647cat confdefs.h >>conftest.$ac_ext
14648cat >>conftest.$ac_ext <<_ACEOF
14649/* end confdefs.h. */
14650#include <malloc/malloc.h>
14651_ACEOF
d6e01aa5
KL
14652if { (ac_try="$ac_cpp conftest.$ac_ext"
14653case "(($ac_try" in
14654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14655 *) ac_try_echo=$ac_try;;
14656esac
14657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14658 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14659 ac_status=$?
14660 grep -v '^ *+' conftest.er1 >conftest.err
14661 rm -f conftest.er1
14662 cat conftest.err >&5
14663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14664 (exit $ac_status); } >/dev/null && {
14665 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14666 test ! -s conftest.err
14667 }; then
cef11da2
ST
14668 ac_header_preproc=yes
14669else
14670 echo "$as_me: failed program was:" >&5
14671sed 's/^/| /' conftest.$ac_ext >&5
14672
14673 ac_header_preproc=no
14674fi
d6e01aa5 14675
cef11da2 14676rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
14677{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14678echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14679
14680# So? What about this header?
edfaf76d
LK
14681case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14682 yes:no: )
cef11da2
ST
14683 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14684echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14685 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14686echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
14687 ac_header_preproc=yes
cef11da2 14688 ;;
edfaf76d 14689 no:yes:* )
cef11da2
ST
14690 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14691echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14692 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14693echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14694 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14695echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14696 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14697echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
14698 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14699echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14700 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14701echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 14702
cef11da2
ST
14703 ;;
14704esac
d6e01aa5
KL
14705{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14706echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14707if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14708 echo $ECHO_N "(cached) $ECHO_C" >&6
14709else
14710 ac_cv_header_malloc_malloc_h=$ac_header_preproc
14711fi
d6e01aa5
KL
14712{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14713echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14714
14715fi
14716if test $ac_cv_header_malloc_malloc_h = yes; then
14717
14718cat >>confdefs.h <<\_ACEOF
14719#define HAVE_MALLOC_MALLOC_H 1
14720_ACEOF
14721
14722fi
14723
14724
14725
5d6da11e 14726### Use Mac OS X Carbon API to implement GUI.
e0f712ba 14727if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 14728
c0d27fcc 14729cat >>confdefs.h <<\_ACEOF
e0f712ba 14730#define HAVE_CARBON 1
c0d27fcc 14731_ACEOF
e0f712ba 14732
6a3a24fa
JD
14733 ## Specify the install directory
14734 carbon_appdir=
14735 if test "${carbon_appdir_x}" != ""; then
14736 case ${carbon_appdir_x} in
14737 y | ye | yes) carbon_appdir=/Applications ;;
14738 * ) carbon_appdir=${carbon_appdir_x} ;;
14739 esac
14740 fi
8f417b3b
AS
14741 # We also have mouse menus.
14742 HAVE_MENUS=yes
e0f712ba
AC
14743fi
14744
98418dba
CW
14745### Use session management (-lSM -lICE) if available
14746HAVE_X_SM=no
14747if test "${HAVE_X11}" = "yes"; then
c0d27fcc 14748 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
d6e01aa5
KL
14749 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14750echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
14751if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14752 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14753fi
d6e01aa5
KL
14754{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14755echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 14756else
c0d27fcc 14757 # Is the header compilable?
d6e01aa5
KL
14758{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
14759echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 14760cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14761/* confdefs.h. */
14762_ACEOF
14763cat confdefs.h >>conftest.$ac_ext
14764cat >>conftest.$ac_ext <<_ACEOF
14765/* end confdefs.h. */
c0d27fcc
MR
14766$ac_includes_default
14767#include <X11/SM/SMlib.h>
14768_ACEOF
14769rm -f conftest.$ac_objext
d6e01aa5
KL
14770if { (ac_try="$ac_compile"
14771case "(($ac_try" in
14772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14773 *) ac_try_echo=$ac_try;;
14774esac
14775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14776 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14777 ac_status=$?
edfaf76d
LK
14778 grep -v '^ *+' conftest.er1 >conftest.err
14779 rm -f conftest.er1
14780 cat conftest.err >&5
c0d27fcc 14781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14782 (exit $ac_status); } && {
14783 test -z "$ac_c_werror_flag" ||
14784 test ! -s conftest.err
14785 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14786 ac_header_compiler=yes
14787else
14788 echo "$as_me: failed program was:" >&5
19650fd6
AS
14789sed 's/^/| /' conftest.$ac_ext >&5
14790
d6e01aa5 14791 ac_header_compiler=no
c0d27fcc 14792fi
d6e01aa5
KL
14793
14794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14795{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14796echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14797
14798# Is the header present?
d6e01aa5
KL
14799{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
14800echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 14801cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14802/* confdefs.h. */
14803_ACEOF
14804cat confdefs.h >>conftest.$ac_ext
14805cat >>conftest.$ac_ext <<_ACEOF
14806/* end confdefs.h. */
98418dba
CW
14807#include <X11/SM/SMlib.h>
14808_ACEOF
d6e01aa5
KL
14809if { (ac_try="$ac_cpp conftest.$ac_ext"
14810case "(($ac_try" in
14811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14812 *) ac_try_echo=$ac_try;;
14813esac
14814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14815 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14816 ac_status=$?
6bae0ccf 14817 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14818 rm -f conftest.er1
14819 cat conftest.err >&5
c0d27fcc 14820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14821 (exit $ac_status); } >/dev/null && {
14822 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14823 test ! -s conftest.err
14824 }; then
c0d27fcc 14825 ac_header_preproc=yes
98418dba
CW
14826else
14827 echo "$as_me: failed program was:" >&5
19650fd6
AS
14828sed 's/^/| /' conftest.$ac_ext >&5
14829
c0d27fcc 14830 ac_header_preproc=no
98418dba 14831fi
d6e01aa5 14832
98418dba 14833rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
14834{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14835echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14836
14837# So? What about this header?
edfaf76d
LK
14838case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14839 yes:no: )
c0d27fcc
MR
14840 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14841echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14842 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
14843echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
14844 ac_header_preproc=yes
19650fd6 14845 ;;
edfaf76d 14846 no:yes:* )
c0d27fcc
MR
14847 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
14848echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14849 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
14850echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
14851 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
14852echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
14853 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
14854echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14855 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 14856echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14857 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
14858echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 14859
19650fd6 14860 ;;
c0d27fcc 14861esac
d6e01aa5
KL
14862{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14863echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14864if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14865 echo $ECHO_N "(cached) $ECHO_C" >&6
14866else
14867 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 14868fi
d6e01aa5
KL
14869{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14870echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
14871
14872fi
98418dba 14873if test $ac_cv_header_X11_SM_SMlib_h = yes; then
d6e01aa5
KL
14874 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
14875echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 14876if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 14877 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14878else
503d2be0 14879 ac_check_lib_save_LIBS=$LIBS
1660500f 14880LIBS="-lSM -lICE $LIBS"
503d2be0 14881cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14882/* confdefs.h. */
14883_ACEOF
14884cat confdefs.h >>conftest.$ac_ext
14885cat >>conftest.$ac_ext <<_ACEOF
14886/* end confdefs.h. */
503d2be0 14887
d6e01aa5
KL
14888/* Override any GCC internal prototype to avoid an error.
14889 Use char because int might match the return type of a GCC
14890 builtin and then its argument prototype would still apply. */
503d2be0
AS
14891#ifdef __cplusplus
14892extern "C"
14893#endif
98418dba 14894char SmcOpenConnection ();
503d2be0
AS
14895int
14896main ()
14897{
d6e01aa5 14898return SmcOpenConnection ();
503d2be0
AS
14899 ;
14900 return 0;
14901}
14902_ACEOF
14903rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14904if { (ac_try="$ac_link"
14905case "(($ac_try" in
14906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14907 *) ac_try_echo=$ac_try;;
14908esac
14909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14910 (eval "$ac_link") 2>conftest.er1
503d2be0 14911 ac_status=$?
edfaf76d
LK
14912 grep -v '^ *+' conftest.er1 >conftest.err
14913 rm -f conftest.er1
14914 cat conftest.err >&5
c0d27fcc 14915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14916 (exit $ac_status); } && {
14917 test -z "$ac_c_werror_flag" ||
14918 test ! -s conftest.err
14919 } && test -s conftest$ac_exeext &&
14920 $as_test_x conftest$ac_exeext; then
98418dba 14921 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
14922else
14923 echo "$as_me: failed program was:" >&5
19650fd6
AS
14924sed 's/^/| /' conftest.$ac_ext >&5
14925
d6e01aa5 14926 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 14927fi
d6e01aa5
KL
14928
14929rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14930 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14931LIBS=$ac_check_lib_save_LIBS
14932fi
d6e01aa5
KL
14933{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
14934echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
14935if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
14936 HAVE_X_SM=yes
73b77ee5
GM
14937fi
14938
73b77ee5 14939fi
73b77ee5 14940
c0d27fcc
MR
14941
14942
98418dba 14943 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 14944
c0d27fcc 14945cat >>confdefs.h <<\_ACEOF
98418dba 14946#define HAVE_X_SM 1
c0d27fcc 14947_ACEOF
73b77ee5 14948
98418dba
CW
14949 case "$LIBS" in
14950 *-lSM*) ;;
14951 *) LIBS="-lSM -lICE $LIBS" ;;
14952 esac
73b77ee5 14953 fi
98418dba 14954fi
73b77ee5 14955
98418dba 14956# If netdb.h doesn't declare h_errno, we must declare it by hand.
d6e01aa5
KL
14957{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
14958echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
14959if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
14960 echo $ECHO_N "(cached) $ECHO_C" >&6
14961else
14962 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14963/* confdefs.h. */
14964_ACEOF
14965cat confdefs.h >>conftest.$ac_ext
14966cat >>conftest.$ac_ext <<_ACEOF
14967/* end confdefs.h. */
98418dba 14968#include <netdb.h>
503d2be0
AS
14969int
14970main ()
14971{
98418dba 14972return h_errno;
503d2be0
AS
14973 ;
14974 return 0;
14975}
14976_ACEOF
14977rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14978if { (ac_try="$ac_link"
14979case "(($ac_try" in
14980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14981 *) ac_try_echo=$ac_try;;
14982esac
14983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14984 (eval "$ac_link") 2>conftest.er1
503d2be0 14985 ac_status=$?
edfaf76d
LK
14986 grep -v '^ *+' conftest.er1 >conftest.err
14987 rm -f conftest.er1
14988 cat conftest.err >&5
c0d27fcc 14989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14990 (exit $ac_status); } && {
14991 test -z "$ac_c_werror_flag" ||
14992 test ! -s conftest.err
14993 } && test -s conftest$ac_exeext &&
14994 $as_test_x conftest$ac_exeext; then
98418dba 14995 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 14996else
503d2be0 14997 echo "$as_me: failed program was:" >&5
19650fd6
AS
14998sed 's/^/| /' conftest.$ac_ext >&5
14999
d6e01aa5 15000 emacs_cv_netdb_declares_h_errno=no
73b77ee5 15001fi
d6e01aa5
KL
15002
15003rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15004 conftest$ac_exeext conftest.$ac_ext
98418dba 15005fi
d6e01aa5
KL
15006{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
15007echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 15008if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 15009
c0d27fcc 15010cat >>confdefs.h <<\_ACEOF
98418dba 15011#define HAVE_H_ERRNO 1
c0d27fcc 15012_ACEOF
73b77ee5 15013
98418dba
CW
15014fi
15015
15016# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15017# for constant arguments. Useless!
d6e01aa5
KL
15018{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
15019echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
15020if test "${ac_cv_working_alloca_h+set}" = set; then
15021 echo $ECHO_N "(cached) $ECHO_C" >&6
15022else
15023 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15024/* confdefs.h. */
15025_ACEOF
15026cat confdefs.h >>conftest.$ac_ext
15027cat >>conftest.$ac_ext <<_ACEOF
15028/* end confdefs.h. */
98418dba 15029#include <alloca.h>
503d2be0
AS
15030int
15031main ()
15032{
98418dba 15033char *p = (char *) alloca (2 * sizeof (int));
d6e01aa5 15034 if (p) return 0;
503d2be0
AS
15035 ;
15036 return 0;
15037}
15038_ACEOF
15039rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15040if { (ac_try="$ac_link"
15041case "(($ac_try" in
15042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15043 *) ac_try_echo=$ac_try;;
15044esac
15045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15046 (eval "$ac_link") 2>conftest.er1
503d2be0 15047 ac_status=$?
edfaf76d
LK
15048 grep -v '^ *+' conftest.er1 >conftest.err
15049 rm -f conftest.er1
15050 cat conftest.err >&5
c0d27fcc 15051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15052 (exit $ac_status); } && {
15053 test -z "$ac_c_werror_flag" ||
15054 test ! -s conftest.err
15055 } && test -s conftest$ac_exeext &&
15056 $as_test_x conftest$ac_exeext; then
98418dba 15057 ac_cv_working_alloca_h=yes
73b77ee5 15058else
503d2be0 15059 echo "$as_me: failed program was:" >&5
19650fd6
AS
15060sed 's/^/| /' conftest.$ac_ext >&5
15061
d6e01aa5 15062 ac_cv_working_alloca_h=no
73b77ee5 15063fi
d6e01aa5
KL
15064
15065rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15066 conftest$ac_exeext conftest.$ac_ext
98418dba 15067fi
d6e01aa5
KL
15068{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
15069echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 15070if test $ac_cv_working_alloca_h = yes; then
73b77ee5 15071
c0d27fcc 15072cat >>confdefs.h <<\_ACEOF
98418dba 15073#define HAVE_ALLOCA_H 1
c0d27fcc 15074_ACEOF
98418dba
CW
15075
15076fi
15077
d6e01aa5
KL
15078{ echo "$as_me:$LINENO: checking for alloca" >&5
15079echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
15080if test "${ac_cv_func_alloca_works+set}" = set; then
15081 echo $ECHO_N "(cached) $ECHO_C" >&6
15082else
503d2be0 15083 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15084/* confdefs.h. */
15085_ACEOF
15086cat confdefs.h >>conftest.$ac_ext
15087cat >>conftest.$ac_ext <<_ACEOF
15088/* end confdefs.h. */
98418dba
CW
15089#ifdef __GNUC__
15090# define alloca __builtin_alloca
15091#else
15092# ifdef _MSC_VER
15093# include <malloc.h>
15094# define alloca _alloca
15095# else
d6e01aa5 15096# ifdef HAVE_ALLOCA_H
98418dba
CW
15097# include <alloca.h>
15098# else
15099# ifdef _AIX
15100 #pragma alloca
15101# else
15102# ifndef alloca /* predefined by HP cc +Olibcalls */
15103char *alloca ();
15104# endif
15105# endif
15106# endif
15107# endif
15108#endif
15109
503d2be0
AS
15110int
15111main ()
15112{
98418dba 15113char *p = (char *) alloca (1);
d6e01aa5 15114 if (p) return 0;
503d2be0
AS
15115 ;
15116 return 0;
15117}
15118_ACEOF
15119rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15120if { (ac_try="$ac_link"
15121case "(($ac_try" in
15122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15123 *) ac_try_echo=$ac_try;;
15124esac
15125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15126 (eval "$ac_link") 2>conftest.er1
503d2be0 15127 ac_status=$?
edfaf76d
LK
15128 grep -v '^ *+' conftest.er1 >conftest.err
15129 rm -f conftest.er1
15130 cat conftest.err >&5
c0d27fcc 15131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15132 (exit $ac_status); } && {
15133 test -z "$ac_c_werror_flag" ||
15134 test ! -s conftest.err
15135 } && test -s conftest$ac_exeext &&
15136 $as_test_x conftest$ac_exeext; then
98418dba 15137 ac_cv_func_alloca_works=yes
ac95a621 15138else
503d2be0 15139 echo "$as_me: failed program was:" >&5
19650fd6
AS
15140sed 's/^/| /' conftest.$ac_ext >&5
15141
d6e01aa5 15142 ac_cv_func_alloca_works=no
ac95a621 15143fi
d6e01aa5
KL
15144
15145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15146 conftest$ac_exeext conftest.$ac_ext
98418dba 15147fi
d6e01aa5
KL
15148{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15149echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15150
98418dba
CW
15151if test $ac_cv_func_alloca_works = yes; then
15152
c0d27fcc 15153cat >>confdefs.h <<\_ACEOF
98418dba 15154#define HAVE_ALLOCA 1
c0d27fcc 15155_ACEOF
98418dba
CW
15156
15157else
15158 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15159# that cause trouble. Some versions do not even contain alloca or
15160# contain a buggy version. If you still want to use their alloca,
15161# use ar to extract alloca.o from them instead of compiling alloca.c.
15162
d6e01aa5 15163ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15164
c0d27fcc 15165cat >>confdefs.h <<\_ACEOF
98418dba 15166#define C_ALLOCA 1
c0d27fcc 15167_ACEOF
98418dba 15168
c0d27fcc 15169
d6e01aa5
KL
15170{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15171echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
15172if test "${ac_cv_os_cray+set}" = set; then
15173 echo $ECHO_N "(cached) $ECHO_C" >&6
15174else
15175 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15176/* confdefs.h. */
15177_ACEOF
15178cat confdefs.h >>conftest.$ac_ext
15179cat >>conftest.$ac_ext <<_ACEOF
15180/* end confdefs.h. */
d6e01aa5 15181#if defined CRAY && ! defined CRAY2
98418dba
CW
15182webecray
15183#else
15184wenotbecray
15185#endif
15186
15187_ACEOF
15188if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 15189 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
15190 ac_cv_os_cray=yes
15191else
15192 ac_cv_os_cray=no
15193fi
15194rm -f conftest*
ac95a621 15195
98418dba 15196fi
d6e01aa5
KL
15197{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
15198echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
15199if test $ac_cv_os_cray = yes; then
15200 for ac_func in _getb67 GETB67 getb67; do
15201 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
15202{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15203echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15204if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15205 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15206else
503d2be0 15207 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15208/* confdefs.h. */
15209_ACEOF
15210cat confdefs.h >>conftest.$ac_ext
15211cat >>conftest.$ac_ext <<_ACEOF
15212/* end confdefs.h. */
edfaf76d
LK
15213/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15214 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15215#define $ac_func innocuous_$ac_func
15216
73b77ee5 15217/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15218 which can conflict with char $ac_func (); below.
15219 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15220 <limits.h> exists even on freestanding compilers. */
edfaf76d 15221
19650fd6
AS
15222#ifdef __STDC__
15223# include <limits.h>
15224#else
15225# include <assert.h>
15226#endif
edfaf76d
LK
15227
15228#undef $ac_func
15229
d6e01aa5
KL
15230/* Override any GCC internal prototype to avoid an error.
15231 Use char because int might match the return type of a GCC
15232 builtin and then its argument prototype would still apply. */
503d2be0
AS
15233#ifdef __cplusplus
15234extern "C"
15235#endif
503d2be0 15236char $ac_func ();
73b77ee5
GM
15237/* The GNU C library defines this for functions which it implements
15238 to always fail with ENOSYS. Some functions are actually named
15239 something starting with __ and the normal name is an alias. */
d6e01aa5 15240#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 15241choke me
73b77ee5
GM
15242#endif
15243
19650fd6
AS
15244int
15245main ()
15246{
d6e01aa5 15247return $ac_func ();
503d2be0
AS
15248 ;
15249 return 0;
15250}
15251_ACEOF
15252rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15253if { (ac_try="$ac_link"
15254case "(($ac_try" in
15255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15256 *) ac_try_echo=$ac_try;;
15257esac
15258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15259 (eval "$ac_link") 2>conftest.er1
503d2be0 15260 ac_status=$?
edfaf76d
LK
15261 grep -v '^ *+' conftest.er1 >conftest.err
15262 rm -f conftest.er1
15263 cat conftest.err >&5
c0d27fcc 15264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15265 (exit $ac_status); } && {
15266 test -z "$ac_c_werror_flag" ||
15267 test ! -s conftest.err
15268 } && test -s conftest$ac_exeext &&
15269 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15270 eval "$as_ac_var=yes"
15271else
15272 echo "$as_me: failed program was:" >&5
19650fd6
AS
15273sed 's/^/| /' conftest.$ac_ext >&5
15274
d6e01aa5 15275 eval "$as_ac_var=no"
503d2be0 15276fi
d6e01aa5
KL
15277
15278rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15279 conftest$ac_exeext conftest.$ac_ext
503d2be0 15280fi
d6e01aa5
KL
15281ac_res=`eval echo '${'$as_ac_var'}'`
15282 { echo "$as_me:$LINENO: result: $ac_res" >&5
15283echo "${ECHO_T}$ac_res" >&6; }
503d2be0 15284if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15285
c0d27fcc 15286cat >>confdefs.h <<_ACEOF
98418dba 15287#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15288_ACEOF
98418dba
CW
15289
15290 break
73b77ee5 15291fi
73b77ee5 15292
98418dba 15293 done
73b77ee5
GM
15294fi
15295
d6e01aa5
KL
15296{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15297echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15298if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 15299 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15300else
15301 if test "$cross_compiling" = yes; then
15302 ac_cv_c_stack_direction=0
73b77ee5 15303else
503d2be0 15304 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15305/* confdefs.h. */
15306_ACEOF
15307cat confdefs.h >>conftest.$ac_ext
15308cat >>conftest.$ac_ext <<_ACEOF
15309/* end confdefs.h. */
d6e01aa5 15310$ac_includes_default
503d2be0 15311int
98418dba 15312find_stack_direction ()
503d2be0 15313{
98418dba
CW
15314 static char *addr = 0;
15315 auto char dummy;
15316 if (addr == 0)
15317 {
15318 addr = &dummy;
15319 return find_stack_direction ();
15320 }
73b77ee5 15321 else
98418dba
CW
15322 return (&dummy > addr) ? 1 : -1;
15323}
ba4481b5 15324
503d2be0
AS
15325int
15326main ()
15327{
d6e01aa5 15328 return find_stack_direction () < 0;
503d2be0
AS
15329}
15330_ACEOF
98418dba 15331rm -f conftest$ac_exeext
d6e01aa5
KL
15332if { (ac_try="$ac_link"
15333case "(($ac_try" in
15334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15335 *) ac_try_echo=$ac_try;;
15336esac
15337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15338 (eval "$ac_link") 2>&5
503d2be0 15339 ac_status=$?
c0d27fcc 15340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15341 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
15342 { (case "(($ac_try" in
15343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15344 *) ac_try_echo=$ac_try;;
15345esac
15346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15347 (eval "$ac_try") 2>&5
503d2be0 15348 ac_status=$?
c0d27fcc 15349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15350 (exit $ac_status); }; }; then
98418dba 15351 ac_cv_c_stack_direction=1
ba4481b5 15352else
98418dba
CW
15353 echo "$as_me: program exited with status $ac_status" >&5
15354echo "$as_me: failed program was:" >&5
19650fd6
AS
15355sed 's/^/| /' conftest.$ac_ext >&5
15356
c0d27fcc 15357( exit $ac_status )
98418dba 15358ac_cv_c_stack_direction=-1
ba4481b5 15359fi
d6e01aa5 15360rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15361fi
d6e01aa5
KL
15362
15363
98418dba 15364fi
d6e01aa5
KL
15365{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15366echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15367
c0d27fcc 15368cat >>confdefs.h <<_ACEOF
98418dba 15369#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15370_ACEOF
15371
ba4481b5 15372
ba4481b5
DL
15373fi
15374
c0d27fcc 15375
611adb3e
GM
15376if test x"$ac_cv_func_alloca_works" != xyes; then
15377 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
15378echo "$as_me: error: a system implementation of alloca is required " >&2;}
15379 { (exit 1); exit 1; }; }
15380fi
15381
98418dba
CW
15382# fmod, logb, and frexp are found in -lm on most systems.
15383# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15384
d6e01aa5
KL
15385{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15386echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15387if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 15388 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15389else
98418dba
CW
15390 ac_check_lib_save_LIBS=$LIBS
15391LIBS="-lm $LIBS"
15392cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15393/* confdefs.h. */
15394_ACEOF
15395cat confdefs.h >>conftest.$ac_ext
15396cat >>conftest.$ac_ext <<_ACEOF
15397/* end confdefs.h. */
ba4481b5 15398
d6e01aa5
KL
15399/* Override any GCC internal prototype to avoid an error.
15400 Use char because int might match the return type of a GCC
15401 builtin and then its argument prototype would still apply. */
98418dba
CW
15402#ifdef __cplusplus
15403extern "C"
15404#endif
98418dba 15405char sqrt ();
503d2be0
AS
15406int
15407main ()
15408{
d6e01aa5 15409return sqrt ();
503d2be0
AS
15410 ;
15411 return 0;
15412}
15413_ACEOF
15414rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15415if { (ac_try="$ac_link"
15416case "(($ac_try" in
15417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15418 *) ac_try_echo=$ac_try;;
15419esac
15420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15421 (eval "$ac_link") 2>conftest.er1
503d2be0 15422 ac_status=$?
edfaf76d
LK
15423 grep -v '^ *+' conftest.er1 >conftest.err
15424 rm -f conftest.er1
15425 cat conftest.err >&5
c0d27fcc 15426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15427 (exit $ac_status); } && {
15428 test -z "$ac_c_werror_flag" ||
15429 test ! -s conftest.err
15430 } && test -s conftest$ac_exeext &&
15431 $as_test_x conftest$ac_exeext; then
98418dba 15432 ac_cv_lib_m_sqrt=yes
ba4481b5 15433else
503d2be0 15434 echo "$as_me: failed program was:" >&5
19650fd6
AS
15435sed 's/^/| /' conftest.$ac_ext >&5
15436
d6e01aa5 15437 ac_cv_lib_m_sqrt=no
ba4481b5 15438fi
d6e01aa5
KL
15439
15440rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15441 conftest$ac_exeext conftest.$ac_ext
98418dba 15442LIBS=$ac_check_lib_save_LIBS
ba4481b5 15443fi
d6e01aa5
KL
15444{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15445echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 15446if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15447 cat >>confdefs.h <<_ACEOF
98418dba 15448#define HAVE_LIBM 1
c0d27fcc 15449_ACEOF
98418dba
CW
15450
15451 LIBS="-lm $LIBS"
ba4481b5 15452
ba4481b5
DL
15453fi
15454
c0d27fcc 15455
55597d70
DL
15456# Check for mail-locking functions in a "mail" library. Probably this should
15457# have the same check as for liblockfile below.
98418dba 15458
d6e01aa5
KL
15459{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15460echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15461if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 15462 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15463else
98418dba
CW
15464 ac_check_lib_save_LIBS=$LIBS
15465LIBS="-lmail $LIBS"
15466cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15467/* confdefs.h. */
15468_ACEOF
15469cat confdefs.h >>conftest.$ac_ext
15470cat >>conftest.$ac_ext <<_ACEOF
15471/* end confdefs.h. */
98418dba 15472
d6e01aa5
KL
15473/* Override any GCC internal prototype to avoid an error.
15474 Use char because int might match the return type of a GCC
15475 builtin and then its argument prototype would still apply. */
98418dba
CW
15476#ifdef __cplusplus
15477extern "C"
15478#endif
98418dba 15479char maillock ();
503d2be0
AS
15480int
15481main ()
15482{
d6e01aa5 15483return maillock ();
503d2be0
AS
15484 ;
15485 return 0;
15486}
15487_ACEOF
15488rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15489if { (ac_try="$ac_link"
15490case "(($ac_try" in
15491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15492 *) ac_try_echo=$ac_try;;
15493esac
15494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15495 (eval "$ac_link") 2>conftest.er1
503d2be0 15496 ac_status=$?
edfaf76d
LK
15497 grep -v '^ *+' conftest.er1 >conftest.err
15498 rm -f conftest.er1
15499 cat conftest.err >&5
c0d27fcc 15500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15501 (exit $ac_status); } && {
15502 test -z "$ac_c_werror_flag" ||
15503 test ! -s conftest.err
15504 } && test -s conftest$ac_exeext &&
15505 $as_test_x conftest$ac_exeext; then
98418dba 15506 ac_cv_lib_mail_maillock=yes
ba4481b5 15507else
503d2be0 15508 echo "$as_me: failed program was:" >&5
19650fd6
AS
15509sed 's/^/| /' conftest.$ac_ext >&5
15510
d6e01aa5 15511 ac_cv_lib_mail_maillock=no
ba4481b5 15512fi
d6e01aa5
KL
15513
15514rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15515 conftest$ac_exeext conftest.$ac_ext
98418dba 15516LIBS=$ac_check_lib_save_LIBS
ba4481b5 15517fi
d6e01aa5
KL
15518{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15519echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15520if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15521 cat >>confdefs.h <<_ACEOF
98418dba 15522#define HAVE_LIBMAIL 1
c0d27fcc 15523_ACEOF
ba4481b5 15524
98418dba 15525 LIBS="-lmail $LIBS"
ba4481b5 15526
98418dba 15527fi
ba4481b5 15528
c0d27fcc 15529
d6e01aa5
KL
15530{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15531echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15532if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15533 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15534else
503d2be0 15535 ac_check_lib_save_LIBS=$LIBS
98418dba 15536LIBS="-llockfile $LIBS"
503d2be0 15537cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15538/* confdefs.h. */
15539_ACEOF
15540cat confdefs.h >>conftest.$ac_ext
15541cat >>conftest.$ac_ext <<_ACEOF
15542/* end confdefs.h. */
503d2be0 15543
d6e01aa5
KL
15544/* Override any GCC internal prototype to avoid an error.
15545 Use char because int might match the return type of a GCC
15546 builtin and then its argument prototype would still apply. */
503d2be0
AS
15547#ifdef __cplusplus
15548extern "C"
15549#endif
98418dba 15550char maillock ();
503d2be0
AS
15551int
15552main ()
15553{
d6e01aa5 15554return maillock ();
503d2be0
AS
15555 ;
15556 return 0;
15557}
15558_ACEOF
15559rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15560if { (ac_try="$ac_link"
15561case "(($ac_try" in
15562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15563 *) ac_try_echo=$ac_try;;
15564esac
15565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15566 (eval "$ac_link") 2>conftest.er1
503d2be0 15567 ac_status=$?
edfaf76d
LK
15568 grep -v '^ *+' conftest.er1 >conftest.err
15569 rm -f conftest.er1
15570 cat conftest.err >&5
c0d27fcc 15571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15572 (exit $ac_status); } && {
15573 test -z "$ac_c_werror_flag" ||
15574 test ! -s conftest.err
15575 } && test -s conftest$ac_exeext &&
15576 $as_test_x conftest$ac_exeext; then
98418dba 15577 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
15578else
15579 echo "$as_me: failed program was:" >&5
19650fd6
AS
15580sed 's/^/| /' conftest.$ac_ext >&5
15581
d6e01aa5 15582 ac_cv_lib_lockfile_maillock=no
98418dba 15583fi
d6e01aa5
KL
15584
15585rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15586 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15587LIBS=$ac_check_lib_save_LIBS
15588fi
d6e01aa5
KL
15589{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
15590echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 15591if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 15592 cat >>confdefs.h <<_ACEOF
98418dba 15593#define HAVE_LIBLOCKFILE 1
c0d27fcc 15594_ACEOF
98418dba
CW
15595
15596 LIBS="-llockfile $LIBS"
15597
15598fi
15599
15600# If we have the shared liblockfile, assume we must use it for mail
15601# locking (e.g. Debian). If we couldn't link against liblockfile
15602# (no liblockfile.a installed), ensure that we don't need to.
15603if test "$ac_cv_lib_lockfile_maillock" = no; then
15604 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15605set dummy liblockfile.so; ac_word=$2
d6e01aa5
KL
15606{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15607echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
15608if test "${ac_cv_prog_liblockfile+set}" = set; then
15609 echo $ECHO_N "(cached) $ECHO_C" >&6
15610else
15611 if test -n "$liblockfile"; then
15612 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15613else
c0d27fcc 15614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
15615as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15616for as_dir in $as_dummy
c0d27fcc
MR
15617do
15618 IFS=$as_save_IFS
15619 test -z "$as_dir" && as_dir=.
15620 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 15621 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
15622 ac_cv_prog_liblockfile="yes"
15623 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15624 break 2
15625 fi
15626done
98418dba 15627done
d6e01aa5 15628IFS=$as_save_IFS
98418dba
CW
15629
15630 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 15631fi
503d2be0 15632fi
98418dba
CW
15633liblockfile=$ac_cv_prog_liblockfile
15634if test -n "$liblockfile"; then
d6e01aa5
KL
15635 { echo "$as_me:$LINENO: result: $liblockfile" >&5
15636echo "${ECHO_T}$liblockfile" >&6; }
98418dba 15637else
d6e01aa5
KL
15638 { echo "$as_me:$LINENO: result: no" >&5
15639echo "${ECHO_T}no" >&6; }
ba4481b5
DL
15640fi
15641
d6e01aa5 15642
98418dba 15643 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 15644 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
15645This probably means that movemail could lose mail.
15646There may be a \`development' package to install containing liblockfile." >&5
15647echo "$as_me: error: Shared liblockfile found but can't link against it.
15648This probably means that movemail could lose mail.
15649There may be a \`development' package to install containing liblockfile." >&2;}
15650 { (exit 1); exit 1; }; }
98418dba 15651 else :
55597d70 15652 fi
98418dba 15653fi
503d2be0 15654
98418dba
CW
15655for ac_func in touchlock
15656do
15657as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
15658{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15659echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15660if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15661 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 15662else
98418dba 15663 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15664/* confdefs.h. */
15665_ACEOF
15666cat confdefs.h >>conftest.$ac_ext
15667cat >>conftest.$ac_ext <<_ACEOF
15668/* end confdefs.h. */
edfaf76d
LK
15669/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15670 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15671#define $ac_func innocuous_$ac_func
15672
98418dba 15673/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15674 which can conflict with char $ac_func (); below.
15675 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15676 <limits.h> exists even on freestanding compilers. */
edfaf76d 15677
19650fd6
AS
15678#ifdef __STDC__
15679# include <limits.h>
15680#else
15681# include <assert.h>
15682#endif
edfaf76d
LK
15683
15684#undef $ac_func
15685
d6e01aa5
KL
15686/* Override any GCC internal prototype to avoid an error.
15687 Use char because int might match the return type of a GCC
15688 builtin and then its argument prototype would still apply. */
503d2be0
AS
15689#ifdef __cplusplus
15690extern "C"
15691#endif
98418dba 15692char $ac_func ();
98418dba
CW
15693/* The GNU C library defines this for functions which it implements
15694 to always fail with ENOSYS. Some functions are actually named
15695 something starting with __ and the normal name is an alias. */
d6e01aa5 15696#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15697choke me
cd958eb3
MB
15698#endif
15699
19650fd6
AS
15700int
15701main ()
15702{
d6e01aa5 15703return $ac_func ();
503d2be0
AS
15704 ;
15705 return 0;
15706}
15707_ACEOF
15708rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15709if { (ac_try="$ac_link"
15710case "(($ac_try" in
15711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15712 *) ac_try_echo=$ac_try;;
15713esac
15714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15715 (eval "$ac_link") 2>conftest.er1
503d2be0 15716 ac_status=$?
edfaf76d
LK
15717 grep -v '^ *+' conftest.er1 >conftest.err
15718 rm -f conftest.er1
15719 cat conftest.err >&5
c0d27fcc 15720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15721 (exit $ac_status); } && {
15722 test -z "$ac_c_werror_flag" ||
15723 test ! -s conftest.err
15724 } && test -s conftest$ac_exeext &&
15725 $as_test_x conftest$ac_exeext; then
98418dba 15726 eval "$as_ac_var=yes"
503d2be0
AS
15727else
15728 echo "$as_me: failed program was:" >&5
19650fd6
AS
15729sed 's/^/| /' conftest.$ac_ext >&5
15730
d6e01aa5 15731 eval "$as_ac_var=no"
503d2be0 15732fi
d6e01aa5
KL
15733
15734rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15735 conftest$ac_exeext conftest.$ac_ext
503d2be0 15736fi
d6e01aa5
KL
15737ac_res=`eval echo '${'$as_ac_var'}'`
15738 { echo "$as_me:$LINENO: result: $ac_res" >&5
15739echo "${ECHO_T}$ac_res" >&6; }
98418dba 15740if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15741 cat >>confdefs.h <<_ACEOF
98418dba 15742#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15743_ACEOF
457b792c 15744
457b792c 15745fi
98418dba 15746done
457b792c 15747
c0d27fcc 15748
98418dba
CW
15749for ac_header in maillock.h
15750do
15751as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
15752if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15753 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15754echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15755if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15756 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15757fi
d6e01aa5
KL
15758ac_res=`eval echo '${'$as_ac_Header'}'`
15759 { echo "$as_me:$LINENO: result: $ac_res" >&5
15760echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 15761else
c0d27fcc 15762 # Is the header compilable?
d6e01aa5
KL
15763{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15764echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15765cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15766/* confdefs.h. */
15767_ACEOF
15768cat confdefs.h >>conftest.$ac_ext
15769cat >>conftest.$ac_ext <<_ACEOF
15770/* end confdefs.h. */
c0d27fcc
MR
15771$ac_includes_default
15772#include <$ac_header>
15773_ACEOF
15774rm -f conftest.$ac_objext
d6e01aa5
KL
15775if { (ac_try="$ac_compile"
15776case "(($ac_try" in
15777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15778 *) ac_try_echo=$ac_try;;
15779esac
15780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15781 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15782 ac_status=$?
edfaf76d
LK
15783 grep -v '^ *+' conftest.er1 >conftest.err
15784 rm -f conftest.er1
15785 cat conftest.err >&5
c0d27fcc 15786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15787 (exit $ac_status); } && {
15788 test -z "$ac_c_werror_flag" ||
15789 test ! -s conftest.err
15790 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15791 ac_header_compiler=yes
15792else
15793 echo "$as_me: failed program was:" >&5
19650fd6
AS
15794sed 's/^/| /' conftest.$ac_ext >&5
15795
d6e01aa5 15796 ac_header_compiler=no
c0d27fcc 15797fi
d6e01aa5
KL
15798
15799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15800{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15801echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15802
15803# Is the header present?
d6e01aa5
KL
15804{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15805echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15806cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15807/* confdefs.h. */
15808_ACEOF
15809cat confdefs.h >>conftest.$ac_ext
15810cat >>conftest.$ac_ext <<_ACEOF
15811/* end confdefs.h. */
98418dba 15812#include <$ac_header>
503d2be0 15813_ACEOF
d6e01aa5
KL
15814if { (ac_try="$ac_cpp conftest.$ac_ext"
15815case "(($ac_try" in
15816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15817 *) ac_try_echo=$ac_try;;
15818esac
15819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15820 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15821 ac_status=$?
6bae0ccf 15822 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15823 rm -f conftest.er1
15824 cat conftest.err >&5
c0d27fcc 15825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15826 (exit $ac_status); } >/dev/null && {
15827 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15828 test ! -s conftest.err
15829 }; then
c0d27fcc 15830 ac_header_preproc=yes
98418dba
CW
15831else
15832 echo "$as_me: failed program was:" >&5
19650fd6
AS
15833sed 's/^/| /' conftest.$ac_ext >&5
15834
c0d27fcc 15835 ac_header_preproc=no
503d2be0 15836fi
d6e01aa5 15837
98418dba 15838rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
15839{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15840echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15841
15842# So? What about this header?
edfaf76d
LK
15843case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15844 yes:no: )
c0d27fcc
MR
15845 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15846echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15847 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15848echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15849 ac_header_preproc=yes
19650fd6 15850 ;;
edfaf76d 15851 no:yes:* )
c0d27fcc
MR
15852 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15853echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15854 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15855echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15856 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15857echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15858 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15859echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15860 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15861echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15862 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15863echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 15864
19650fd6 15865 ;;
c0d27fcc 15866esac
d6e01aa5
KL
15867{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15868echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15869if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15870 echo $ECHO_N "(cached) $ECHO_C" >&6
15871else
edfaf76d 15872 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 15873fi
d6e01aa5
KL
15874ac_res=`eval echo '${'$as_ac_Header'}'`
15875 { echo "$as_me:$LINENO: result: $ac_res" >&5
15876echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15877
15878fi
98418dba 15879if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15880 cat >>confdefs.h <<_ACEOF
98418dba 15881#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15882_ACEOF
48d4b120 15883
ba4481b5 15884fi
c0d27fcc 15885
98418dba
CW
15886done
15887
c0d27fcc
MR
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
22044edf
DL
15943
15944
c0d27fcc 15945
b0e44248
RB
15946
15947
973a76b1
DL
15948
15949
15950
cd958eb3 15951
25ca0bca 15952
ea92fc9f 15953
e2fcf543 15954
c0d27fcc
MR
15955
15956
98418dba 15957for ac_func in gethostname getdomainname dup2 \
e2fcf543 15958rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
bc3512d0 15959random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
98418dba 15960strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 15961utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
15962__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
15963sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 15964gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
4489ece2 15965memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
15966do
15967as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
15968{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15969echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15970if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15971 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15972else
503d2be0 15973 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15974/* confdefs.h. */
15975_ACEOF
15976cat confdefs.h >>conftest.$ac_ext
15977cat >>conftest.$ac_ext <<_ACEOF
15978/* end confdefs.h. */
edfaf76d
LK
15979/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15980 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15981#define $ac_func innocuous_$ac_func
15982
98418dba 15983/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15984 which can conflict with char $ac_func (); below.
15985 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15986 <limits.h> exists even on freestanding compilers. */
edfaf76d 15987
19650fd6
AS
15988#ifdef __STDC__
15989# include <limits.h>
15990#else
15991# include <assert.h>
15992#endif
edfaf76d
LK
15993
15994#undef $ac_func
15995
d6e01aa5
KL
15996/* Override any GCC internal prototype to avoid an error.
15997 Use char because int might match the return type of a GCC
15998 builtin and then its argument prototype would still apply. */
503d2be0
AS
15999#ifdef __cplusplus
16000extern "C"
16001#endif
98418dba 16002char $ac_func ();
98418dba
CW
16003/* The GNU C library defines this for functions which it implements
16004 to always fail with ENOSYS. Some functions are actually named
16005 something starting with __ and the normal name is an alias. */
d6e01aa5 16006#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16007choke me
98418dba
CW
16008#endif
16009
19650fd6
AS
16010int
16011main ()
16012{
d6e01aa5 16013return $ac_func ();
503d2be0
AS
16014 ;
16015 return 0;
16016}
16017_ACEOF
16018rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16019if { (ac_try="$ac_link"
16020case "(($ac_try" in
16021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16022 *) ac_try_echo=$ac_try;;
16023esac
16024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16025 (eval "$ac_link") 2>conftest.er1
503d2be0 16026 ac_status=$?
edfaf76d
LK
16027 grep -v '^ *+' conftest.er1 >conftest.err
16028 rm -f conftest.er1
16029 cat conftest.err >&5
c0d27fcc 16030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16031 (exit $ac_status); } && {
16032 test -z "$ac_c_werror_flag" ||
16033 test ! -s conftest.err
16034 } && test -s conftest$ac_exeext &&
16035 $as_test_x conftest$ac_exeext; then
98418dba 16036 eval "$as_ac_var=yes"
503d2be0
AS
16037else
16038 echo "$as_me: failed program was:" >&5
19650fd6
AS
16039sed 's/^/| /' conftest.$ac_ext >&5
16040
d6e01aa5 16041 eval "$as_ac_var=no"
503d2be0 16042fi
d6e01aa5
KL
16043
16044rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16045 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16046fi
d6e01aa5
KL
16047ac_res=`eval echo '${'$as_ac_var'}'`
16048 { echo "$as_me:$LINENO: result: $ac_res" >&5
16049echo "${ECHO_T}$ac_res" >&6; }
98418dba 16050if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16051 cat >>confdefs.h <<_ACEOF
98418dba 16052#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16053_ACEOF
ba4481b5 16054
ba4481b5 16055fi
98418dba 16056done
ba4481b5 16057
c0d27fcc
MR
16058
16059
98418dba
CW
16060for ac_header in sys/un.h
16061do
16062as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
16063if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16064 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16065echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16066if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 16067 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16068fi
d6e01aa5
KL
16069ac_res=`eval echo '${'$as_ac_Header'}'`
16070 { echo "$as_me:$LINENO: result: $ac_res" >&5
16071echo "${ECHO_T}$ac_res" >&6; }
98418dba 16072else
c0d27fcc 16073 # Is the header compilable?
d6e01aa5
KL
16074{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16075echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16076cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16077/* confdefs.h. */
16078_ACEOF
16079cat confdefs.h >>conftest.$ac_ext
16080cat >>conftest.$ac_ext <<_ACEOF
16081/* end confdefs.h. */
c0d27fcc
MR
16082$ac_includes_default
16083#include <$ac_header>
16084_ACEOF
16085rm -f conftest.$ac_objext
d6e01aa5
KL
16086if { (ac_try="$ac_compile"
16087case "(($ac_try" in
16088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16089 *) ac_try_echo=$ac_try;;
16090esac
16091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16092 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16093 ac_status=$?
edfaf76d
LK
16094 grep -v '^ *+' conftest.er1 >conftest.err
16095 rm -f conftest.er1
16096 cat conftest.err >&5
c0d27fcc 16097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16098 (exit $ac_status); } && {
16099 test -z "$ac_c_werror_flag" ||
16100 test ! -s conftest.err
16101 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16102 ac_header_compiler=yes
16103else
16104 echo "$as_me: failed program was:" >&5
19650fd6
AS
16105sed 's/^/| /' conftest.$ac_ext >&5
16106
d6e01aa5 16107 ac_header_compiler=no
c0d27fcc 16108fi
d6e01aa5
KL
16109
16110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16111{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16112echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16113
16114# Is the header present?
d6e01aa5
KL
16115{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16116echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16117cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16118/* confdefs.h. */
16119_ACEOF
16120cat confdefs.h >>conftest.$ac_ext
16121cat >>conftest.$ac_ext <<_ACEOF
16122/* end confdefs.h. */
98418dba 16123#include <$ac_header>
503d2be0 16124_ACEOF
d6e01aa5
KL
16125if { (ac_try="$ac_cpp conftest.$ac_ext"
16126case "(($ac_try" in
16127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16128 *) ac_try_echo=$ac_try;;
16129esac
16130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16131 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16132 ac_status=$?
6bae0ccf 16133 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16134 rm -f conftest.er1
16135 cat conftest.err >&5
c0d27fcc 16136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16137 (exit $ac_status); } >/dev/null && {
16138 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16139 test ! -s conftest.err
16140 }; then
c0d27fcc 16141 ac_header_preproc=yes
ba4481b5 16142else
503d2be0 16143 echo "$as_me: failed program was:" >&5
19650fd6
AS
16144sed 's/^/| /' conftest.$ac_ext >&5
16145
c0d27fcc 16146 ac_header_preproc=no
ba4481b5 16147fi
d6e01aa5 16148
503d2be0 16149rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
16150{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16151echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16152
16153# So? What about this header?
edfaf76d
LK
16154case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16155 yes:no: )
c0d27fcc
MR
16156 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16157echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16158 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16159echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16160 ac_header_preproc=yes
19650fd6 16161 ;;
edfaf76d 16162 no:yes:* )
c0d27fcc
MR
16163 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16164echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16165 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16166echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16167 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16168echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16169 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16170echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16171 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16172echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16173 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16174echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 16175
19650fd6 16176 ;;
c0d27fcc 16177esac
d6e01aa5
KL
16178{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16179echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16180if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16181 echo $ECHO_N "(cached) $ECHO_C" >&6
16182else
edfaf76d 16183 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16184fi
d6e01aa5
KL
16185ac_res=`eval echo '${'$as_ac_Header'}'`
16186 { echo "$as_me:$LINENO: result: $ac_res" >&5
16187echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16188
16189fi
925c2f3f 16190if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16191 cat >>confdefs.h <<_ACEOF
925c2f3f 16192#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16193_ACEOF
503d2be0 16194
925c2f3f 16195fi
c0d27fcc 16196
925c2f3f
EZ
16197done
16198
c0d27fcc
MR
16199
16200
16201
edfaf76d 16202
d6e01aa5
KL
16203
16204for ac_header in $ac_header_list
925c2f3f
EZ
16205do
16206as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
16207if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16208 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16209echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16210if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 16211 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16212fi
d6e01aa5
KL
16213ac_res=`eval echo '${'$as_ac_Header'}'`
16214 { echo "$as_me:$LINENO: result: $ac_res" >&5
16215echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 16216else
c0d27fcc 16217 # Is the header compilable?
d6e01aa5
KL
16218{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16219echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16220cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16221/* confdefs.h. */
16222_ACEOF
16223cat confdefs.h >>conftest.$ac_ext
16224cat >>conftest.$ac_ext <<_ACEOF
16225/* end confdefs.h. */
c0d27fcc
MR
16226$ac_includes_default
16227#include <$ac_header>
16228_ACEOF
16229rm -f conftest.$ac_objext
d6e01aa5
KL
16230if { (ac_try="$ac_compile"
16231case "(($ac_try" in
16232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16233 *) ac_try_echo=$ac_try;;
16234esac
16235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16236 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16237 ac_status=$?
edfaf76d
LK
16238 grep -v '^ *+' conftest.er1 >conftest.err
16239 rm -f conftest.er1
16240 cat conftest.err >&5
c0d27fcc 16241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16242 (exit $ac_status); } && {
16243 test -z "$ac_c_werror_flag" ||
16244 test ! -s conftest.err
16245 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16246 ac_header_compiler=yes
16247else
16248 echo "$as_me: failed program was:" >&5
19650fd6
AS
16249sed 's/^/| /' conftest.$ac_ext >&5
16250
d6e01aa5 16251 ac_header_compiler=no
c0d27fcc 16252fi
d6e01aa5
KL
16253
16254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16255{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16256echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16257
16258# Is the header present?
d6e01aa5
KL
16259{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16260echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16261cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16262/* confdefs.h. */
16263_ACEOF
16264cat confdefs.h >>conftest.$ac_ext
16265cat >>conftest.$ac_ext <<_ACEOF
16266/* end confdefs.h. */
98418dba 16267#include <$ac_header>
503d2be0 16268_ACEOF
d6e01aa5
KL
16269if { (ac_try="$ac_cpp conftest.$ac_ext"
16270case "(($ac_try" in
16271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16272 *) ac_try_echo=$ac_try;;
16273esac
16274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16275 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16276 ac_status=$?
6bae0ccf 16277 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16278 rm -f conftest.er1
16279 cat conftest.err >&5
c0d27fcc 16280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16281 (exit $ac_status); } >/dev/null && {
16282 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16283 test ! -s conftest.err
16284 }; then
c0d27fcc 16285 ac_header_preproc=yes
98418dba
CW
16286else
16287 echo "$as_me: failed program was:" >&5
19650fd6
AS
16288sed 's/^/| /' conftest.$ac_ext >&5
16289
c0d27fcc 16290 ac_header_preproc=no
98418dba 16291fi
d6e01aa5 16292
98418dba 16293rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
16294{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16295echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16296
16297# So? What about this header?
edfaf76d
LK
16298case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16299 yes:no: )
c0d27fcc
MR
16300 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16301echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16302 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16303echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16304 ac_header_preproc=yes
19650fd6 16305 ;;
edfaf76d 16306 no:yes:* )
c0d27fcc
MR
16307 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16308echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16309 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16310echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16311 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16312echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16313 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16314echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16315 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16316echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16317 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16318echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 16319
19650fd6 16320 ;;
c0d27fcc 16321esac
d6e01aa5
KL
16322{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16323echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16324if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16325 echo $ECHO_N "(cached) $ECHO_C" >&6
16326else
edfaf76d 16327 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16328fi
d6e01aa5
KL
16329ac_res=`eval echo '${'$as_ac_Header'}'`
16330 { echo "$as_me:$LINENO: result: $ac_res" >&5
16331echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16332
16333fi
98418dba 16334if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16335 cat >>confdefs.h <<_ACEOF
98418dba 16336#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16337_ACEOF
98418dba
CW
16338
16339fi
c0d27fcc 16340
98418dba
CW
16341done
16342
c0d27fcc 16343
d6e01aa5
KL
16344
16345
16346
16347
16348
16349
16350
16351for ac_func in $ac_func_list
98418dba
CW
16352do
16353as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
16354{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16355echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16356if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16357 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16358else
98418dba 16359 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16360/* confdefs.h. */
16361_ACEOF
16362cat confdefs.h >>conftest.$ac_ext
16363cat >>conftest.$ac_ext <<_ACEOF
16364/* end confdefs.h. */
edfaf76d
LK
16365/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16366 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16367#define $ac_func innocuous_$ac_func
16368
98418dba 16369/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16370 which can conflict with char $ac_func (); below.
16371 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16372 <limits.h> exists even on freestanding compilers. */
edfaf76d 16373
19650fd6
AS
16374#ifdef __STDC__
16375# include <limits.h>
16376#else
16377# include <assert.h>
16378#endif
edfaf76d
LK
16379
16380#undef $ac_func
16381
d6e01aa5
KL
16382/* Override any GCC internal prototype to avoid an error.
16383 Use char because int might match the return type of a GCC
16384 builtin and then its argument prototype would still apply. */
503d2be0
AS
16385#ifdef __cplusplus
16386extern "C"
16387#endif
98418dba 16388char $ac_func ();
98418dba
CW
16389/* The GNU C library defines this for functions which it implements
16390 to always fail with ENOSYS. Some functions are actually named
16391 something starting with __ and the normal name is an alias. */
d6e01aa5 16392#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16393choke me
98418dba
CW
16394#endif
16395
19650fd6
AS
16396int
16397main ()
16398{
d6e01aa5 16399return $ac_func ();
503d2be0
AS
16400 ;
16401 return 0;
16402}
16403_ACEOF
16404rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16405if { (ac_try="$ac_link"
16406case "(($ac_try" in
16407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16408 *) ac_try_echo=$ac_try;;
16409esac
16410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16411 (eval "$ac_link") 2>conftest.er1
503d2be0 16412 ac_status=$?
edfaf76d
LK
16413 grep -v '^ *+' conftest.er1 >conftest.err
16414 rm -f conftest.er1
16415 cat conftest.err >&5
c0d27fcc 16416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16417 (exit $ac_status); } && {
16418 test -z "$ac_c_werror_flag" ||
16419 test ! -s conftest.err
16420 } && test -s conftest$ac_exeext &&
16421 $as_test_x conftest$ac_exeext; then
98418dba 16422 eval "$as_ac_var=yes"
503d2be0
AS
16423else
16424 echo "$as_me: failed program was:" >&5
19650fd6
AS
16425sed 's/^/| /' conftest.$ac_ext >&5
16426
d6e01aa5 16427 eval "$as_ac_var=no"
503d2be0 16428fi
d6e01aa5
KL
16429
16430rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16431 conftest$ac_exeext conftest.$ac_ext
ffe36136 16432fi
d6e01aa5
KL
16433ac_res=`eval echo '${'$as_ac_var'}'`
16434 { echo "$as_me:$LINENO: result: $ac_res" >&5
16435echo "${ECHO_T}$ac_res" >&6; }
98418dba 16436if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16437 cat >>confdefs.h <<_ACEOF
98418dba 16438#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16439_ACEOF
ffe36136 16440
ba4481b5 16441fi
98418dba 16442done
ba4481b5 16443
d6e01aa5
KL
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460{ echo "$as_me:$LINENO: checking for working mktime" >&5
16461echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
16462if test "${ac_cv_func_working_mktime+set}" = set; then
16463 echo $ECHO_N "(cached) $ECHO_C" >&6
16464else
16465 if test "$cross_compiling" = yes; then
16466 ac_cv_func_working_mktime=no
16467else
16468 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16469/* confdefs.h. */
16470_ACEOF
16471cat confdefs.h >>conftest.$ac_ext
16472cat >>conftest.$ac_ext <<_ACEOF
16473/* end confdefs.h. */
98418dba 16474/* Test program from Paul Eggert and Tony Leneis. */
d6e01aa5 16475#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16476# include <sys/time.h>
16477# include <time.h>
16478#else
d6e01aa5 16479# ifdef HAVE_SYS_TIME_H
98418dba
CW
16480# include <sys/time.h>
16481# else
16482# include <time.h>
16483# endif
16484#endif
ba4481b5 16485
d6e01aa5 16486#include <stdlib.h>
edfaf76d 16487
d6e01aa5 16488#ifdef HAVE_UNISTD_H
98418dba
CW
16489# include <unistd.h>
16490#endif
ba4481b5 16491
d6e01aa5 16492#ifndef HAVE_ALARM
98418dba
CW
16493# define alarm(X) /* empty */
16494#endif
df645f7c 16495
98418dba
CW
16496/* Work around redefinition to rpl_putenv by other config tests. */
16497#undef putenv
df645f7c 16498
98418dba 16499static time_t time_t_max;
edfaf76d 16500static time_t time_t_min;
df645f7c 16501
98418dba 16502/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16503static char *tz_strings[] = {
16504 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16505 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16506};
16507#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16508
d6e01aa5 16509/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16510 Based on a problem report from Andreas Jaeger. */
d6e01aa5 16511static int
98418dba
CW
16512spring_forward_gap ()
16513{
16514 /* glibc (up to about 1998-10-07) failed this test. */
16515 struct tm tm;
16516
16517 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16518 instead of "TZ=America/Vancouver" in order to detect the bug even
16519 on systems that don't support the Olson extension, or don't have the
16520 full zoneinfo tables installed. */
16521 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16522
16523 tm.tm_year = 98;
16524 tm.tm_mon = 3;
16525 tm.tm_mday = 5;
16526 tm.tm_hour = 2;
16527 tm.tm_min = 0;
16528 tm.tm_sec = 0;
16529 tm.tm_isdst = -1;
d6e01aa5 16530 return mktime (&tm) != (time_t) -1;
98418dba
CW
16531}
16532
d6e01aa5 16533static int
edfaf76d 16534mktime_test1 (now)
98418dba
CW
16535 time_t now;
16536{
16537 struct tm *lt;
d6e01aa5 16538 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16539}
16540
d6e01aa5 16541static int
edfaf76d
LK
16542mktime_test (now)
16543 time_t now;
16544{
d6e01aa5
KL
16545 return (mktime_test1 (now)
16546 && mktime_test1 ((time_t) (time_t_max - now))
16547 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16548}
16549
d6e01aa5 16550static int
98418dba
CW
16551irix_6_4_bug ()
16552{
16553 /* Based on code from Ariel Faigon. */
16554 struct tm tm;
16555 tm.tm_year = 96;
16556 tm.tm_mon = 3;
16557 tm.tm_mday = 0;
16558 tm.tm_hour = 0;
16559 tm.tm_min = 0;
16560 tm.tm_sec = 0;
16561 tm.tm_isdst = -1;
16562 mktime (&tm);
d6e01aa5 16563 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16564}
16565
d6e01aa5 16566static int
98418dba
CW
16567bigtime_test (j)
16568 int j;
16569{
16570 struct tm tm;
16571 time_t now;
16572 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16573 now = mktime (&tm);
16574 if (now != (time_t) -1)
16575 {
16576 struct tm *lt = localtime (&now);
16577 if (! (lt
16578 && lt->tm_year == tm.tm_year
16579 && lt->tm_mon == tm.tm_mon
16580 && lt->tm_mday == tm.tm_mday
16581 && lt->tm_hour == tm.tm_hour
16582 && lt->tm_min == tm.tm_min
16583 && lt->tm_sec == tm.tm_sec
16584 && lt->tm_yday == tm.tm_yday
16585 && lt->tm_wday == tm.tm_wday
16586 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16587 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
d6e01aa5 16588 return 0;
98418dba 16589 }
d6e01aa5
KL
16590 return 1;
16591}
16592
16593static int
16594year_2050_test ()
16595{
16596 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16597 ignoring leap seconds. */
16598 unsigned long int answer = 2527315200UL;
16599
16600 struct tm tm;
16601 time_t t;
16602 tm.tm_year = 2050 - 1900;
16603 tm.tm_mon = 2 - 1;
16604 tm.tm_mday = 1;
16605 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16606 tm.tm_isdst = -1;
16607
16608 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16609 instead of "TZ=America/Vancouver" in order to detect the bug even
16610 on systems that don't support the Olson extension, or don't have the
16611 full zoneinfo tables installed. */
16612 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16613
16614 t = mktime (&tm);
16615
16616 /* Check that the result is either a failure, or close enough
16617 to the correct answer that we can assume the discrepancy is
16618 due to leap seconds. */
16619 return (t == (time_t) -1
16620 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
16621}
16622
16623int
16624main ()
16625{
16626 time_t t, delta;
16627 int i, j;
16628
16629 /* This test makes some buggy mktime implementations loop.
16630 Give up after 60 seconds; a mktime slower than that
16631 isn't worth using anyway. */
16632 alarm (60);
16633
16634 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
16635 continue;
16636 time_t_max--;
edfaf76d
LK
16637 if ((time_t) -1 < 0)
16638 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
16639 continue;
98418dba
CW
16640 delta = time_t_max / 997; /* a suitable prime number */
16641 for (i = 0; i < N_STRINGS; i++)
16642 {
16643 if (tz_strings[i])
16644 putenv (tz_strings[i]);
503d2be0 16645
98418dba 16646 for (t = 0; t <= time_t_max - delta; t += delta)
d6e01aa5
KL
16647 if (! mktime_test (t))
16648 return 1;
16649 if (! (mktime_test ((time_t) 1)
16650 && mktime_test ((time_t) (60 * 60))
16651 && mktime_test ((time_t) (60 * 60 * 24))))
16652 return 1;
98418dba
CW
16653
16654 for (j = 1; 0 < j; j *= 2)
d6e01aa5
KL
16655 if (! bigtime_test (j))
16656 return 1;
16657 if (! bigtime_test (j - 1))
16658 return 1;
98418dba 16659 }
d6e01aa5 16660 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
16661}
16662_ACEOF
98418dba 16663rm -f conftest$ac_exeext
d6e01aa5
KL
16664if { (ac_try="$ac_link"
16665case "(($ac_try" in
16666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16667 *) ac_try_echo=$ac_try;;
16668esac
16669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16670 (eval "$ac_link") 2>&5
503d2be0 16671 ac_status=$?
c0d27fcc 16672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
16674 { (case "(($ac_try" in
16675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16676 *) ac_try_echo=$ac_try;;
16677esac
16678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16679 (eval "$ac_try") 2>&5
503d2be0 16680 ac_status=$?
c0d27fcc 16681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16682 (exit $ac_status); }; }; then
98418dba 16683 ac_cv_func_working_mktime=yes
503d2be0 16684else
98418dba
CW
16685 echo "$as_me: program exited with status $ac_status" >&5
16686echo "$as_me: failed program was:" >&5
19650fd6
AS
16687sed 's/^/| /' conftest.$ac_ext >&5
16688
c0d27fcc 16689( exit $ac_status )
98418dba 16690ac_cv_func_working_mktime=no
503d2be0 16691fi
d6e01aa5 16692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 16693fi
d6e01aa5
KL
16694
16695
ba4481b5 16696fi
d6e01aa5
KL
16697{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
16698echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 16699if test $ac_cv_func_working_mktime = no; then
d6e01aa5 16700 case " $LIBOBJS " in
edfaf76d 16701 *" mktime.$ac_objext "* ) ;;
d6e01aa5
KL
16702 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
16703 ;;
edfaf76d
LK
16704esac
16705
ba4481b5
DL
16706fi
16707
98418dba 16708if test "$ac_cv_func_working_mktime" = no; then
b936fae4 16709
c0d27fcc 16710cat >>confdefs.h <<\_ACEOF
98418dba 16711#define BROKEN_MKTIME 1
c0d27fcc 16712_ACEOF
ba4481b5 16713
ba4481b5 16714fi
503d2be0 16715
98418dba
CW
16716ac_have_func=no # yes means we've found a way to get the load average.
16717
6bae0ccf
DL
16718# Make sure getloadavg.c is where it belongs, at configure-time.
16719test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
16720 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
16721echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
16722 { (exit 1); exit 1; }; }
16723
98418dba
CW
16724ac_save_LIBS=$LIBS
16725
16726# Check for getloadavg, but be sure not to touch the cache variable.
d6e01aa5
KL
16727({ echo "$as_me:$LINENO: checking for getloadavg" >&5
16728echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 16729if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 16730 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16731else
503d2be0 16732 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16733/* confdefs.h. */
16734_ACEOF
16735cat confdefs.h >>conftest.$ac_ext
16736cat >>conftest.$ac_ext <<_ACEOF
16737/* end confdefs.h. */
edfaf76d
LK
16738/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
16739 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16740#define getloadavg innocuous_getloadavg
16741
98418dba 16742/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16743 which can conflict with char getloadavg (); below.
16744 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16745 <limits.h> exists even on freestanding compilers. */
edfaf76d 16746
19650fd6
AS
16747#ifdef __STDC__
16748# include <limits.h>
16749#else
16750# include <assert.h>
16751#endif
edfaf76d
LK
16752
16753#undef getloadavg
16754
d6e01aa5
KL
16755/* Override any GCC internal prototype to avoid an error.
16756 Use char because int might match the return type of a GCC
16757 builtin and then its argument prototype would still apply. */
503d2be0
AS
16758#ifdef __cplusplus
16759extern "C"
16760#endif
98418dba 16761char getloadavg ();
98418dba
CW
16762/* The GNU C library defines this for functions which it implements
16763 to always fail with ENOSYS. Some functions are actually named
16764 something starting with __ and the normal name is an alias. */
d6e01aa5 16765#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 16766choke me
cd958eb3
MB
16767#endif
16768
19650fd6
AS
16769int
16770main ()
16771{
d6e01aa5 16772return getloadavg ();
503d2be0
AS
16773 ;
16774 return 0;
16775}
16776_ACEOF
16777rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16778if { (ac_try="$ac_link"
16779case "(($ac_try" in
16780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16781 *) ac_try_echo=$ac_try;;
16782esac
16783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16784 (eval "$ac_link") 2>conftest.er1
503d2be0 16785 ac_status=$?
edfaf76d
LK
16786 grep -v '^ *+' conftest.er1 >conftest.err
16787 rm -f conftest.er1
16788 cat conftest.err >&5
c0d27fcc 16789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16790 (exit $ac_status); } && {
16791 test -z "$ac_c_werror_flag" ||
16792 test ! -s conftest.err
16793 } && test -s conftest$ac_exeext &&
16794 $as_test_x conftest$ac_exeext; then
98418dba 16795 ac_cv_func_getloadavg=yes
503d2be0
AS
16796else
16797 echo "$as_me: failed program was:" >&5
19650fd6
AS
16798sed 's/^/| /' conftest.$ac_ext >&5
16799
d6e01aa5 16800 ac_cv_func_getloadavg=no
503d2be0 16801fi
d6e01aa5
KL
16802
16803rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16804 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16805fi
d6e01aa5
KL
16806{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
16807echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
16808if test $ac_cv_func_getloadavg = yes; then
16809 exit 0
16810else
16811 exit 1
ba4481b5 16812fi
98418dba 16813) && ac_have_func=yes
ba4481b5 16814
98418dba 16815# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 16816
98418dba
CW
16817for ac_func in pstat_getdynamic
16818do
16819as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
16820{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16821echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16822if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16823 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16824else
503d2be0 16825 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16826/* confdefs.h. */
16827_ACEOF
16828cat confdefs.h >>conftest.$ac_ext
16829cat >>conftest.$ac_ext <<_ACEOF
16830/* end confdefs.h. */
edfaf76d
LK
16831/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16832 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16833#define $ac_func innocuous_$ac_func
16834
98418dba 16835/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16836 which can conflict with char $ac_func (); below.
16837 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16838 <limits.h> exists even on freestanding compilers. */
edfaf76d 16839
19650fd6
AS
16840#ifdef __STDC__
16841# include <limits.h>
16842#else
16843# include <assert.h>
16844#endif
edfaf76d
LK
16845
16846#undef $ac_func
16847
d6e01aa5
KL
16848/* Override any GCC internal prototype to avoid an error.
16849 Use char because int might match the return type of a GCC
16850 builtin and then its argument prototype would still apply. */
503d2be0
AS
16851#ifdef __cplusplus
16852extern "C"
16853#endif
98418dba 16854char $ac_func ();
98418dba
CW
16855/* The GNU C library defines this for functions which it implements
16856 to always fail with ENOSYS. Some functions are actually named
16857 something starting with __ and the normal name is an alias. */
d6e01aa5 16858#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16859choke me
98418dba
CW
16860#endif
16861
19650fd6
AS
16862int
16863main ()
16864{
d6e01aa5 16865return $ac_func ();
98418dba
CW
16866 ;
16867 return 0;
16868}
f21fadcc 16869_ACEOF
98418dba 16870rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16871if { (ac_try="$ac_link"
16872case "(($ac_try" in
16873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16874 *) ac_try_echo=$ac_try;;
16875esac
16876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16877 (eval "$ac_link") 2>conftest.er1
f21fadcc 16878 ac_status=$?
edfaf76d
LK
16879 grep -v '^ *+' conftest.er1 >conftest.err
16880 rm -f conftest.er1
16881 cat conftest.err >&5
c0d27fcc 16882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16883 (exit $ac_status); } && {
16884 test -z "$ac_c_werror_flag" ||
16885 test ! -s conftest.err
16886 } && test -s conftest$ac_exeext &&
16887 $as_test_x conftest$ac_exeext; then
98418dba 16888 eval "$as_ac_var=yes"
f21fadcc
JD
16889else
16890 echo "$as_me: failed program was:" >&5
19650fd6
AS
16891sed 's/^/| /' conftest.$ac_ext >&5
16892
d6e01aa5 16893 eval "$as_ac_var=no"
f21fadcc 16894fi
d6e01aa5
KL
16895
16896rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16897 conftest$ac_exeext conftest.$ac_ext
f21fadcc 16898fi
d6e01aa5
KL
16899ac_res=`eval echo '${'$as_ac_var'}'`
16900 { echo "$as_me:$LINENO: result: $ac_res" >&5
16901echo "${ECHO_T}$ac_res" >&6; }
98418dba 16902if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16903 cat >>confdefs.h <<_ACEOF
98418dba 16904#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16905_ACEOF
98418dba
CW
16906
16907fi
16908done
16909
c0d27fcc 16910
98418dba
CW
16911# Solaris has libkstat which does not require root.
16912
d6e01aa5
KL
16913{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
16914echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 16915if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
16916 echo $ECHO_N "(cached) $ECHO_C" >&6
16917else
16918 ac_check_lib_save_LIBS=$LIBS
98418dba 16919LIBS="-lkstat $LIBS"
f21fadcc 16920cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16921/* confdefs.h. */
16922_ACEOF
16923cat confdefs.h >>conftest.$ac_ext
16924cat >>conftest.$ac_ext <<_ACEOF
16925/* end confdefs.h. */
f21fadcc 16926
d6e01aa5
KL
16927/* Override any GCC internal prototype to avoid an error.
16928 Use char because int might match the return type of a GCC
16929 builtin and then its argument prototype would still apply. */
f21fadcc
JD
16930#ifdef __cplusplus
16931extern "C"
16932#endif
98418dba 16933char kstat_open ();
f21fadcc
JD
16934int
16935main ()
16936{
d6e01aa5 16937return kstat_open ();
f21fadcc
JD
16938 ;
16939 return 0;
16940}
16941_ACEOF
16942rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
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
f21fadcc 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
d6e01aa5
KL
16955 (exit $ac_status); } && {
16956 test -z "$ac_c_werror_flag" ||
16957 test ! -s conftest.err
16958 } && test -s conftest$ac_exeext &&
16959 $as_test_x conftest$ac_exeext; then
98418dba 16960 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
16961else
16962 echo "$as_me: failed program was:" >&5
19650fd6
AS
16963sed 's/^/| /' conftest.$ac_ext >&5
16964
d6e01aa5 16965 ac_cv_lib_kstat_kstat_open=no
f21fadcc 16966fi
d6e01aa5
KL
16967
16968rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16969 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
16970LIBS=$ac_check_lib_save_LIBS
16971fi
d6e01aa5
KL
16972{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
16973echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 16974if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 16975 cat >>confdefs.h <<_ACEOF
98418dba 16976#define HAVE_LIBKSTAT 1
c0d27fcc 16977_ACEOF
f21fadcc 16978
98418dba 16979 LIBS="-lkstat $LIBS"
f21fadcc 16980
f21fadcc
JD
16981fi
16982
98418dba
CW
16983test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
16984
16985# Some systems with -lutil have (and need) -lkvm as well, some do not.
16986# On Solaris, -lkvm requires nlist from -lelf, so check that first
16987# to get the right answer into the cache.
16988# For kstat on solaris, we need libelf to force the definition of SVR4 below.
16989if test $ac_have_func = no; then
d6e01aa5
KL
16990 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
16991echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 16992if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 16993 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16994else
98418dba
CW
16995 ac_check_lib_save_LIBS=$LIBS
16996LIBS="-lelf $LIBS"
16997cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16998/* confdefs.h. */
16999_ACEOF
17000cat confdefs.h >>conftest.$ac_ext
17001cat >>conftest.$ac_ext <<_ACEOF
17002/* end confdefs.h. */
98418dba 17003
d6e01aa5
KL
17004/* Override any GCC internal prototype to avoid an error.
17005 Use char because int might match the return type of a GCC
17006 builtin and then its argument prototype would still apply. */
98418dba
CW
17007#ifdef __cplusplus
17008extern "C"
17009#endif
98418dba 17010char elf_begin ();
503d2be0
AS
17011int
17012main ()
17013{
d6e01aa5 17014return elf_begin ();
503d2be0
AS
17015 ;
17016 return 0;
17017}
17018_ACEOF
17019rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17020if { (ac_try="$ac_link"
17021case "(($ac_try" in
17022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17023 *) ac_try_echo=$ac_try;;
17024esac
17025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17026 (eval "$ac_link") 2>conftest.er1
503d2be0 17027 ac_status=$?
edfaf76d
LK
17028 grep -v '^ *+' conftest.er1 >conftest.err
17029 rm -f conftest.er1
17030 cat conftest.err >&5
c0d27fcc 17031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17032 (exit $ac_status); } && {
17033 test -z "$ac_c_werror_flag" ||
17034 test ! -s conftest.err
17035 } && test -s conftest$ac_exeext &&
17036 $as_test_x conftest$ac_exeext; then
98418dba 17037 ac_cv_lib_elf_elf_begin=yes
ba4481b5 17038else
503d2be0 17039 echo "$as_me: failed program was:" >&5
19650fd6
AS
17040sed 's/^/| /' conftest.$ac_ext >&5
17041
d6e01aa5 17042 ac_cv_lib_elf_elf_begin=no
ba4481b5 17043fi
d6e01aa5
KL
17044
17045rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17046 conftest$ac_exeext conftest.$ac_ext
98418dba 17047LIBS=$ac_check_lib_save_LIBS
ba4481b5 17048fi
d6e01aa5
KL
17049{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
17050echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
17051if test $ac_cv_lib_elf_elf_begin = yes; then
17052 LIBS="-lelf $LIBS"
ba4481b5
DL
17053fi
17054
98418dba
CW
17055fi
17056if test $ac_have_func = no; then
d6e01aa5
KL
17057 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
17058echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 17059if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 17060 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17061else
98418dba
CW
17062 ac_check_lib_save_LIBS=$LIBS
17063LIBS="-lkvm $LIBS"
17064cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17065/* confdefs.h. */
17066_ACEOF
17067cat confdefs.h >>conftest.$ac_ext
17068cat >>conftest.$ac_ext <<_ACEOF
17069/* end confdefs.h. */
98418dba 17070
d6e01aa5
KL
17071/* Override any GCC internal prototype to avoid an error.
17072 Use char because int might match the return type of a GCC
17073 builtin and then its argument prototype would still apply. */
98418dba
CW
17074#ifdef __cplusplus
17075extern "C"
17076#endif
98418dba 17077char kvm_open ();
503d2be0
AS
17078int
17079main ()
17080{
d6e01aa5 17081return kvm_open ();
503d2be0
AS
17082 ;
17083 return 0;
17084}
17085_ACEOF
17086rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17087if { (ac_try="$ac_link"
17088case "(($ac_try" in
17089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17090 *) ac_try_echo=$ac_try;;
17091esac
17092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17093 (eval "$ac_link") 2>conftest.er1
503d2be0 17094 ac_status=$?
edfaf76d
LK
17095 grep -v '^ *+' conftest.er1 >conftest.err
17096 rm -f conftest.er1
17097 cat conftest.err >&5
c0d27fcc 17098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17099 (exit $ac_status); } && {
17100 test -z "$ac_c_werror_flag" ||
17101 test ! -s conftest.err
17102 } && test -s conftest$ac_exeext &&
17103 $as_test_x conftest$ac_exeext; then
98418dba 17104 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
17105else
17106 echo "$as_me: failed program was:" >&5
19650fd6
AS
17107sed 's/^/| /' conftest.$ac_ext >&5
17108
d6e01aa5 17109 ac_cv_lib_kvm_kvm_open=no
503d2be0 17110fi
d6e01aa5
KL
17111
17112rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17113 conftest$ac_exeext conftest.$ac_ext
98418dba 17114LIBS=$ac_check_lib_save_LIBS
503d2be0 17115fi
d6e01aa5
KL
17116{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
17117echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
17118if test $ac_cv_lib_kvm_kvm_open = yes; then
17119 LIBS="-lkvm $LIBS"
ba4481b5
DL
17120fi
17121
98418dba 17122 # Check for the 4.4BSD definition of getloadavg.
d6e01aa5
KL
17123 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
17124echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 17125if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 17126 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17127else
98418dba
CW
17128 ac_check_lib_save_LIBS=$LIBS
17129LIBS="-lutil $LIBS"
17130cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17131/* confdefs.h. */
17132_ACEOF
17133cat confdefs.h >>conftest.$ac_ext
17134cat >>conftest.$ac_ext <<_ACEOF
17135/* end confdefs.h. */
98418dba 17136
d6e01aa5
KL
17137/* Override any GCC internal prototype to avoid an error.
17138 Use char because int might match the return type of a GCC
17139 builtin and then its argument prototype would still apply. */
98418dba
CW
17140#ifdef __cplusplus
17141extern "C"
17142#endif
98418dba 17143char getloadavg ();
503d2be0
AS
17144int
17145main ()
17146{
d6e01aa5 17147return getloadavg ();
503d2be0
AS
17148 ;
17149 return 0;
17150}
17151_ACEOF
17152rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17153if { (ac_try="$ac_link"
17154case "(($ac_try" in
17155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17156 *) ac_try_echo=$ac_try;;
17157esac
17158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17159 (eval "$ac_link") 2>conftest.er1
503d2be0 17160 ac_status=$?
edfaf76d
LK
17161 grep -v '^ *+' conftest.er1 >conftest.err
17162 rm -f conftest.er1
17163 cat conftest.err >&5
c0d27fcc 17164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17165 (exit $ac_status); } && {
17166 test -z "$ac_c_werror_flag" ||
17167 test ! -s conftest.err
17168 } && test -s conftest$ac_exeext &&
17169 $as_test_x conftest$ac_exeext; then
35996d22
AS
17170 ac_cv_lib_util_getloadavg=yes
17171else
503d2be0 17172 echo "$as_me: failed program was:" >&5
19650fd6
AS
17173sed 's/^/| /' conftest.$ac_ext >&5
17174
d6e01aa5 17175 ac_cv_lib_util_getloadavg=no
ba4481b5 17176fi
d6e01aa5
KL
17177
17178rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17179 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17180LIBS=$ac_check_lib_save_LIBS
17181fi
d6e01aa5
KL
17182{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
17183echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
17184if test $ac_cv_lib_util_getloadavg = yes; then
17185 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 17186fi
503d2be0 17187
98418dba 17188fi
ba4481b5 17189
98418dba
CW
17190if test $ac_have_func = no; then
17191 # There is a commonly available library for RS/6000 AIX.
17192 # Since it is not a standard part of AIX, it might be installed locally.
17193 ac_getloadavg_LIBS=$LIBS
17194 LIBS="-L/usr/local/lib $LIBS"
d6e01aa5
KL
17195 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
17196echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 17197if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 17198 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17199else
98418dba
CW
17200 ac_check_lib_save_LIBS=$LIBS
17201LIBS="-lgetloadavg $LIBS"
17202cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17203/* confdefs.h. */
17204_ACEOF
17205cat confdefs.h >>conftest.$ac_ext
17206cat >>conftest.$ac_ext <<_ACEOF
17207/* end confdefs.h. */
ba4481b5 17208
d6e01aa5
KL
17209/* Override any GCC internal prototype to avoid an error.
17210 Use char because int might match the return type of a GCC
17211 builtin and then its argument prototype would still apply. */
98418dba
CW
17212#ifdef __cplusplus
17213extern "C"
17214#endif
98418dba 17215char getloadavg ();
98418dba
CW
17216int
17217main ()
17218{
d6e01aa5 17219return getloadavg ();
98418dba
CW
17220 ;
17221 return 0;
17222}
503d2be0 17223_ACEOF
98418dba 17224rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17225if { (ac_try="$ac_link"
17226case "(($ac_try" in
17227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17228 *) ac_try_echo=$ac_try;;
17229esac
17230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17231 (eval "$ac_link") 2>conftest.er1
98418dba 17232 ac_status=$?
edfaf76d
LK
17233 grep -v '^ *+' conftest.er1 >conftest.err
17234 rm -f conftest.er1
17235 cat conftest.err >&5
c0d27fcc 17236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17237 (exit $ac_status); } && {
17238 test -z "$ac_c_werror_flag" ||
17239 test ! -s conftest.err
17240 } && test -s conftest$ac_exeext &&
17241 $as_test_x conftest$ac_exeext; then
98418dba 17242 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 17243else
98418dba 17244 echo "$as_me: failed program was:" >&5
19650fd6
AS
17245sed 's/^/| /' conftest.$ac_ext >&5
17246
d6e01aa5 17247 ac_cv_lib_getloadavg_getloadavg=no
98418dba 17248fi
d6e01aa5
KL
17249
17250rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17251 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17252LIBS=$ac_check_lib_save_LIBS
17253fi
d6e01aa5
KL
17254{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17255echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
17256if test $ac_cv_lib_getloadavg_getloadavg = yes; then
17257 LIBS="-lgetloadavg $LIBS"
17258else
17259 LIBS=$ac_getloadavg_LIBS
ba4481b5 17260fi
ba4481b5
DL
17261
17262fi
98418dba
CW
17263
17264# Make sure it is really in the library, if we think we found it,
17265# otherwise set up the replacement function.
17266
17267for ac_func in getloadavg
17268do
17269as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
17270{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17271echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17272if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17273 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17274else
503d2be0 17275 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17276/* confdefs.h. */
17277_ACEOF
17278cat confdefs.h >>conftest.$ac_ext
17279cat >>conftest.$ac_ext <<_ACEOF
17280/* end confdefs.h. */
edfaf76d
LK
17281/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17282 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17283#define $ac_func innocuous_$ac_func
17284
ba4481b5 17285/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17286 which can conflict with char $ac_func (); below.
17287 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17288 <limits.h> exists even on freestanding compilers. */
edfaf76d 17289
19650fd6
AS
17290#ifdef __STDC__
17291# include <limits.h>
17292#else
17293# include <assert.h>
17294#endif
edfaf76d
LK
17295
17296#undef $ac_func
17297
d6e01aa5
KL
17298/* Override any GCC internal prototype to avoid an error.
17299 Use char because int might match the return type of a GCC
17300 builtin and then its argument prototype would still apply. */
503d2be0
AS
17301#ifdef __cplusplus
17302extern "C"
17303#endif
503d2be0 17304char $ac_func ();
ba4481b5
DL
17305/* The GNU C library defines this for functions which it implements
17306 to always fail with ENOSYS. Some functions are actually named
17307 something starting with __ and the normal name is an alias. */
d6e01aa5 17308#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17309choke me
cd958eb3
MB
17310#endif
17311
19650fd6
AS
17312int
17313main ()
17314{
d6e01aa5 17315return $ac_func ();
503d2be0
AS
17316 ;
17317 return 0;
17318}
17319_ACEOF
17320rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17321if { (ac_try="$ac_link"
17322case "(($ac_try" in
17323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17324 *) ac_try_echo=$ac_try;;
17325esac
17326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17327 (eval "$ac_link") 2>conftest.er1
503d2be0 17328 ac_status=$?
edfaf76d
LK
17329 grep -v '^ *+' conftest.er1 >conftest.err
17330 rm -f conftest.er1
17331 cat conftest.err >&5
c0d27fcc 17332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17333 (exit $ac_status); } && {
17334 test -z "$ac_c_werror_flag" ||
17335 test ! -s conftest.err
17336 } && test -s conftest$ac_exeext &&
17337 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17338 eval "$as_ac_var=yes"
17339else
17340 echo "$as_me: failed program was:" >&5
19650fd6
AS
17341sed 's/^/| /' conftest.$ac_ext >&5
17342
d6e01aa5 17343 eval "$as_ac_var=no"
503d2be0 17344fi
d6e01aa5
KL
17345
17346rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17347 conftest$ac_exeext conftest.$ac_ext
503d2be0 17348fi
d6e01aa5
KL
17349ac_res=`eval echo '${'$as_ac_var'}'`
17350 { echo "$as_me:$LINENO: result: $ac_res" >&5
17351echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17352if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17353 cat >>confdefs.h <<_ACEOF
98418dba 17354#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17355_ACEOF
503d2be0 17356
98418dba 17357else
d6e01aa5 17358 case " $LIBOBJS " in
edfaf76d 17359 *" getloadavg.$ac_objext "* ) ;;
d6e01aa5
KL
17360 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17361 ;;
edfaf76d
LK
17362esac
17363
ba4481b5 17364
c0d27fcc 17365cat >>confdefs.h <<\_ACEOF
98418dba 17366#define C_GETLOADAVG 1
c0d27fcc 17367_ACEOF
ba4481b5 17368
98418dba
CW
17369# Figure out what our getloadavg.c needs.
17370ac_have_func=no
c0d27fcc 17371if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
d6e01aa5
KL
17372 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17373echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17374if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 17375 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17376fi
d6e01aa5
KL
17377{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17378echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17379else
c0d27fcc 17380 # Is the header compilable?
d6e01aa5
KL
17381{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17382echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17383cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17384/* confdefs.h. */
17385_ACEOF
17386cat confdefs.h >>conftest.$ac_ext
17387cat >>conftest.$ac_ext <<_ACEOF
17388/* end confdefs.h. */
c0d27fcc
MR
17389$ac_includes_default
17390#include <sys/dg_sys_info.h>
17391_ACEOF
17392rm -f conftest.$ac_objext
d6e01aa5
KL
17393if { (ac_try="$ac_compile"
17394case "(($ac_try" in
17395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17396 *) ac_try_echo=$ac_try;;
17397esac
17398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17399 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17400 ac_status=$?
edfaf76d
LK
17401 grep -v '^ *+' conftest.er1 >conftest.err
17402 rm -f conftest.er1
17403 cat conftest.err >&5
c0d27fcc 17404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17405 (exit $ac_status); } && {
17406 test -z "$ac_c_werror_flag" ||
17407 test ! -s conftest.err
17408 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17409 ac_header_compiler=yes
17410else
17411 echo "$as_me: failed program was:" >&5
19650fd6
AS
17412sed 's/^/| /' conftest.$ac_ext >&5
17413
d6e01aa5 17414 ac_header_compiler=no
c0d27fcc 17415fi
d6e01aa5
KL
17416
17417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17418{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17419echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17420
17421# Is the header present?
d6e01aa5
KL
17422{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17423echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17424cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17425/* confdefs.h. */
17426_ACEOF
17427cat confdefs.h >>conftest.$ac_ext
17428cat >>conftest.$ac_ext <<_ACEOF
17429/* end confdefs.h. */
98418dba
CW
17430#include <sys/dg_sys_info.h>
17431_ACEOF
d6e01aa5
KL
17432if { (ac_try="$ac_cpp conftest.$ac_ext"
17433case "(($ac_try" in
17434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17435 *) ac_try_echo=$ac_try;;
17436esac
17437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17438 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17439 ac_status=$?
6bae0ccf 17440 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17441 rm -f conftest.er1
17442 cat conftest.err >&5
c0d27fcc 17443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17444 (exit $ac_status); } >/dev/null && {
17445 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17446 test ! -s conftest.err
17447 }; then
c0d27fcc 17448 ac_header_preproc=yes
98418dba
CW
17449else
17450 echo "$as_me: failed program was:" >&5
19650fd6
AS
17451sed 's/^/| /' conftest.$ac_ext >&5
17452
c0d27fcc 17453 ac_header_preproc=no
ba4481b5 17454fi
d6e01aa5 17455
98418dba 17456rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
17457{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17458echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17459
17460# So? What about this header?
edfaf76d
LK
17461case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17462 yes:no: )
c0d27fcc
MR
17463 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17464echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17465 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17466echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
17467 ac_header_preproc=yes
19650fd6 17468 ;;
edfaf76d 17469 no:yes:* )
c0d27fcc
MR
17470 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17471echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17472 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17473echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17474 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17475echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17476 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17477echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17478 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17479echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17480 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17481echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17482
19650fd6 17483 ;;
c0d27fcc 17484esac
d6e01aa5
KL
17485{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17486echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17487if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17488 echo $ECHO_N "(cached) $ECHO_C" >&6
17489else
17490 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17491fi
d6e01aa5
KL
17492{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17493echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17494
17495fi
98418dba
CW
17496if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17497 ac_have_func=yes
ba4481b5 17498
c0d27fcc 17499cat >>confdefs.h <<\_ACEOF
98418dba 17500#define DGUX 1
c0d27fcc
MR
17501_ACEOF
17502
503d2be0 17503
d6e01aa5
KL
17504{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17505echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17506if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17507 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17508else
503d2be0 17509 ac_check_lib_save_LIBS=$LIBS
98418dba 17510LIBS="-ldgc $LIBS"
503d2be0 17511cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17512/* confdefs.h. */
17513_ACEOF
17514cat confdefs.h >>conftest.$ac_ext
17515cat >>conftest.$ac_ext <<_ACEOF
17516/* end confdefs.h. */
503d2be0 17517
d6e01aa5
KL
17518/* Override any GCC internal prototype to avoid an error.
17519 Use char because int might match the return type of a GCC
17520 builtin and then its argument prototype would still apply. */
503d2be0
AS
17521#ifdef __cplusplus
17522extern "C"
17523#endif
98418dba 17524char dg_sys_info ();
503d2be0
AS
17525int
17526main ()
17527{
d6e01aa5 17528return dg_sys_info ();
503d2be0
AS
17529 ;
17530 return 0;
17531}
17532_ACEOF
17533rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17534if { (ac_try="$ac_link"
17535case "(($ac_try" in
17536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17537 *) ac_try_echo=$ac_try;;
17538esac
17539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17540 (eval "$ac_link") 2>conftest.er1
503d2be0 17541 ac_status=$?
edfaf76d
LK
17542 grep -v '^ *+' conftest.er1 >conftest.err
17543 rm -f conftest.er1
17544 cat conftest.err >&5
c0d27fcc 17545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17546 (exit $ac_status); } && {
17547 test -z "$ac_c_werror_flag" ||
17548 test ! -s conftest.err
17549 } && test -s conftest$ac_exeext &&
17550 $as_test_x conftest$ac_exeext; then
98418dba 17551 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17552else
17553 echo "$as_me: failed program was:" >&5
19650fd6
AS
17554sed 's/^/| /' conftest.$ac_ext >&5
17555
d6e01aa5 17556 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17557fi
d6e01aa5
KL
17558
17559rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17560 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17561LIBS=$ac_check_lib_save_LIBS
17562fi
d6e01aa5
KL
17563{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17564echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17565if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17566 cat >>confdefs.h <<_ACEOF
98418dba 17567#define HAVE_LIBDGC 1
c0d27fcc 17568_ACEOF
ba4481b5 17569
98418dba 17570 LIBS="-ldgc $LIBS"
ba4481b5 17571
ba4481b5
DL
17572fi
17573
98418dba 17574fi
503d2be0 17575
c0d27fcc
MR
17576
17577
17578if test "${ac_cv_header_locale_h+set}" = set; then
d6e01aa5
KL
17579 { echo "$as_me:$LINENO: checking for locale.h" >&5
17580echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 17581if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 17582 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17583fi
d6e01aa5
KL
17584{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17585echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 17586else
c0d27fcc 17587 # Is the header compilable?
d6e01aa5
KL
17588{ echo "$as_me:$LINENO: checking locale.h usability" >&5
17589echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 17590cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17591/* confdefs.h. */
17592_ACEOF
17593cat confdefs.h >>conftest.$ac_ext
17594cat >>conftest.$ac_ext <<_ACEOF
17595/* end confdefs.h. */
c0d27fcc
MR
17596$ac_includes_default
17597#include <locale.h>
17598_ACEOF
17599rm -f conftest.$ac_objext
d6e01aa5
KL
17600if { (ac_try="$ac_compile"
17601case "(($ac_try" in
17602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17603 *) ac_try_echo=$ac_try;;
17604esac
17605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17606 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17607 ac_status=$?
edfaf76d
LK
17608 grep -v '^ *+' conftest.er1 >conftest.err
17609 rm -f conftest.er1
17610 cat conftest.err >&5
c0d27fcc 17611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17612 (exit $ac_status); } && {
17613 test -z "$ac_c_werror_flag" ||
17614 test ! -s conftest.err
17615 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17616 ac_header_compiler=yes
17617else
17618 echo "$as_me: failed program was:" >&5
19650fd6
AS
17619sed 's/^/| /' conftest.$ac_ext >&5
17620
d6e01aa5 17621 ac_header_compiler=no
c0d27fcc 17622fi
d6e01aa5
KL
17623
17624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17625{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17626echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17627
17628# Is the header present?
d6e01aa5
KL
17629{ echo "$as_me:$LINENO: checking locale.h presence" >&5
17630echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 17631cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17632/* confdefs.h. */
17633_ACEOF
17634cat confdefs.h >>conftest.$ac_ext
17635cat >>conftest.$ac_ext <<_ACEOF
17636/* end confdefs.h. */
98418dba 17637#include <locale.h>
503d2be0 17638_ACEOF
d6e01aa5
KL
17639if { (ac_try="$ac_cpp conftest.$ac_ext"
17640case "(($ac_try" in
17641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17642 *) ac_try_echo=$ac_try;;
17643esac
17644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17645 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17646 ac_status=$?
6bae0ccf 17647 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17648 rm -f conftest.er1
17649 cat conftest.err >&5
c0d27fcc 17650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17651 (exit $ac_status); } >/dev/null && {
17652 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17653 test ! -s conftest.err
17654 }; then
c0d27fcc 17655 ac_header_preproc=yes
98418dba
CW
17656else
17657 echo "$as_me: failed program was:" >&5
19650fd6
AS
17658sed 's/^/| /' conftest.$ac_ext >&5
17659
c0d27fcc 17660 ac_header_preproc=no
ba4481b5 17661fi
d6e01aa5 17662
98418dba 17663rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
17664{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17665echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17666
17667# So? What about this header?
edfaf76d
LK
17668case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17669 yes:no: )
c0d27fcc
MR
17670 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
17671echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17672 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
17673echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
17674 ac_header_preproc=yes
19650fd6 17675 ;;
edfaf76d 17676 no:yes:* )
c0d27fcc
MR
17677 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
17678echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17679 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
17680echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
17681 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
17682echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
17683 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
17684echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17685 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 17686echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17687 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
17688echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17689
19650fd6 17690 ;;
c0d27fcc 17691esac
d6e01aa5
KL
17692{ echo "$as_me:$LINENO: checking for locale.h" >&5
17693echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
17694if test "${ac_cv_header_locale_h+set}" = set; then
17695 echo $ECHO_N "(cached) $ECHO_C" >&6
17696else
17697 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 17698fi
d6e01aa5
KL
17699{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17700echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 17701
c0d27fcc
MR
17702fi
17703
17704
17705
98418dba 17706for ac_func in setlocale
ba4481b5 17707do
503d2be0 17708as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
17709{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17710echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17711if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17712 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17713else
503d2be0 17714 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17715/* confdefs.h. */
17716_ACEOF
17717cat confdefs.h >>conftest.$ac_ext
17718cat >>conftest.$ac_ext <<_ACEOF
17719/* end confdefs.h. */
edfaf76d
LK
17720/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17721 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17722#define $ac_func innocuous_$ac_func
17723
ba4481b5 17724/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17725 which can conflict with char $ac_func (); below.
17726 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17727 <limits.h> exists even on freestanding compilers. */
edfaf76d 17728
19650fd6
AS
17729#ifdef __STDC__
17730# include <limits.h>
17731#else
17732# include <assert.h>
17733#endif
edfaf76d
LK
17734
17735#undef $ac_func
17736
d6e01aa5
KL
17737/* Override any GCC internal prototype to avoid an error.
17738 Use char because int might match the return type of a GCC
17739 builtin and then its argument prototype would still apply. */
503d2be0
AS
17740#ifdef __cplusplus
17741extern "C"
17742#endif
503d2be0 17743char $ac_func ();
ba4481b5
DL
17744/* The GNU C library defines this for functions which it implements
17745 to always fail with ENOSYS. Some functions are actually named
17746 something starting with __ and the normal name is an alias. */
d6e01aa5 17747#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17748choke me
ba4481b5
DL
17749#endif
17750
19650fd6
AS
17751int
17752main ()
17753{
d6e01aa5 17754return $ac_func ();
503d2be0
AS
17755 ;
17756 return 0;
17757}
17758_ACEOF
17759rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17760if { (ac_try="$ac_link"
17761case "(($ac_try" in
17762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17763 *) ac_try_echo=$ac_try;;
17764esac
17765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17766 (eval "$ac_link") 2>conftest.er1
503d2be0 17767 ac_status=$?
edfaf76d
LK
17768 grep -v '^ *+' conftest.er1 >conftest.err
17769 rm -f conftest.er1
17770 cat conftest.err >&5
c0d27fcc 17771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17772 (exit $ac_status); } && {
17773 test -z "$ac_c_werror_flag" ||
17774 test ! -s conftest.err
17775 } && test -s conftest$ac_exeext &&
17776 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17777 eval "$as_ac_var=yes"
17778else
17779 echo "$as_me: failed program was:" >&5
19650fd6
AS
17780sed 's/^/| /' conftest.$ac_ext >&5
17781
d6e01aa5 17782 eval "$as_ac_var=no"
503d2be0 17783fi
d6e01aa5
KL
17784
17785rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17786 conftest$ac_exeext conftest.$ac_ext
503d2be0 17787fi
d6e01aa5
KL
17788ac_res=`eval echo '${'$as_ac_var'}'`
17789 { echo "$as_me:$LINENO: result: $ac_res" >&5
17790echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17791if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17792 cat >>confdefs.h <<_ACEOF
503d2be0 17793#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17794_ACEOF
ba4481b5 17795
ba4481b5
DL
17796fi
17797done
17798
c0d27fcc 17799
98418dba
CW
17800# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
17801# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
17802# Irix 4.0.5F has the header but not the library.
17803if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
17804 ac_have_func=yes
17805
c0d27fcc 17806cat >>confdefs.h <<\_ACEOF
98418dba 17807#define SVR4 1
c0d27fcc 17808_ACEOF
98418dba
CW
17809
17810fi
17811
17812if test $ac_have_func = no; then
c0d27fcc 17813 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
d6e01aa5
KL
17814 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17815echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 17816if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 17817 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17818fi
d6e01aa5
KL
17819{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17820echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 17821else
c0d27fcc 17822 # Is the header compilable?
d6e01aa5
KL
17823{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
17824echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17825cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17826/* confdefs.h. */
17827_ACEOF
17828cat confdefs.h >>conftest.$ac_ext
17829cat >>conftest.$ac_ext <<_ACEOF
17830/* end confdefs.h. */
c0d27fcc
MR
17831$ac_includes_default
17832#include <inq_stats/cpustats.h>
17833_ACEOF
17834rm -f conftest.$ac_objext
d6e01aa5
KL
17835if { (ac_try="$ac_compile"
17836case "(($ac_try" in
17837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17838 *) ac_try_echo=$ac_try;;
17839esac
17840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17841 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17842 ac_status=$?
edfaf76d
LK
17843 grep -v '^ *+' conftest.er1 >conftest.err
17844 rm -f conftest.er1
17845 cat conftest.err >&5
c0d27fcc 17846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17847 (exit $ac_status); } && {
17848 test -z "$ac_c_werror_flag" ||
17849 test ! -s conftest.err
17850 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17851 ac_header_compiler=yes
17852else
17853 echo "$as_me: failed program was:" >&5
19650fd6
AS
17854sed 's/^/| /' conftest.$ac_ext >&5
17855
d6e01aa5 17856 ac_header_compiler=no
c0d27fcc 17857fi
d6e01aa5
KL
17858
17859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17860{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17861echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17862
17863# Is the header present?
d6e01aa5
KL
17864{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
17865echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 17866cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17867/* confdefs.h. */
17868_ACEOF
17869cat confdefs.h >>conftest.$ac_ext
17870cat >>conftest.$ac_ext <<_ACEOF
17871/* end confdefs.h. */
98418dba 17872#include <inq_stats/cpustats.h>
503d2be0 17873_ACEOF
d6e01aa5
KL
17874if { (ac_try="$ac_cpp conftest.$ac_ext"
17875case "(($ac_try" in
17876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17877 *) ac_try_echo=$ac_try;;
17878esac
17879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17880 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17881 ac_status=$?
6bae0ccf 17882 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17883 rm -f conftest.er1
17884 cat conftest.err >&5
c0d27fcc 17885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17886 (exit $ac_status); } >/dev/null && {
17887 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17888 test ! -s conftest.err
17889 }; then
c0d27fcc 17890 ac_header_preproc=yes
503d2be0
AS
17891else
17892 echo "$as_me: failed program was:" >&5
19650fd6
AS
17893sed 's/^/| /' conftest.$ac_ext >&5
17894
c0d27fcc 17895 ac_header_preproc=no
ba4481b5 17896fi
d6e01aa5 17897
503d2be0 17898rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
17899{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17900echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17901
17902# So? What about this header?
edfaf76d
LK
17903case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17904 yes:no: )
c0d27fcc
MR
17905 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17906echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17907 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
17908echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
17909 ac_header_preproc=yes
19650fd6 17910 ;;
edfaf76d 17911 no:yes:* )
c0d27fcc
MR
17912 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
17913echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17914 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
17915echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
17916 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
17917echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
17918 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17919echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17920 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17921echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17922 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
17923echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17924
19650fd6 17925 ;;
c0d27fcc 17926esac
d6e01aa5
KL
17927{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17928echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17929if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
17930 echo $ECHO_N "(cached) $ECHO_C" >&6
17931else
17932 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 17933fi
d6e01aa5
KL
17934{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17935echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
17936
17937fi
98418dba
CW
17938if test $ac_cv_header_inq_stats_cpustats_h = yes; then
17939 ac_have_func=yes
ba4481b5 17940
c0d27fcc 17941cat >>confdefs.h <<\_ACEOF
98418dba 17942#define UMAX 1
c0d27fcc 17943_ACEOF
98418dba 17944
c0d27fcc
MR
17945
17946cat >>confdefs.h <<\_ACEOF
98418dba 17947#define UMAX4_3 1
c0d27fcc 17948_ACEOF
98418dba
CW
17949
17950fi
17951
c0d27fcc 17952
98418dba
CW
17953fi
17954
17955if test $ac_have_func = no; then
c0d27fcc 17956 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
d6e01aa5
KL
17957 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17958echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 17959if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 17960 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17961fi
d6e01aa5
KL
17962{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17963echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 17964else
c0d27fcc 17965 # Is the header compilable?
d6e01aa5
KL
17966{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
17967echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17968cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17969/* confdefs.h. */
17970_ACEOF
17971cat confdefs.h >>conftest.$ac_ext
17972cat >>conftest.$ac_ext <<_ACEOF
17973/* end confdefs.h. */
c0d27fcc
MR
17974$ac_includes_default
17975#include <sys/cpustats.h>
17976_ACEOF
17977rm -f conftest.$ac_objext
d6e01aa5
KL
17978if { (ac_try="$ac_compile"
17979case "(($ac_try" in
17980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17981 *) ac_try_echo=$ac_try;;
17982esac
17983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17984 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17985 ac_status=$?
edfaf76d
LK
17986 grep -v '^ *+' conftest.er1 >conftest.err
17987 rm -f conftest.er1
17988 cat conftest.err >&5
c0d27fcc 17989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17990 (exit $ac_status); } && {
17991 test -z "$ac_c_werror_flag" ||
17992 test ! -s conftest.err
17993 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17994 ac_header_compiler=yes
17995else
17996 echo "$as_me: failed program was:" >&5
19650fd6
AS
17997sed 's/^/| /' conftest.$ac_ext >&5
17998
d6e01aa5 17999 ac_header_compiler=no
c0d27fcc 18000fi
d6e01aa5
KL
18001
18002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18003{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18004echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18005
18006# Is the header present?
d6e01aa5
KL
18007{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
18008echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18009cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18010/* confdefs.h. */
18011_ACEOF
18012cat confdefs.h >>conftest.$ac_ext
18013cat >>conftest.$ac_ext <<_ACEOF
18014/* end confdefs.h. */
98418dba
CW
18015#include <sys/cpustats.h>
18016_ACEOF
d6e01aa5
KL
18017if { (ac_try="$ac_cpp conftest.$ac_ext"
18018case "(($ac_try" in
18019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18020 *) ac_try_echo=$ac_try;;
18021esac
18022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18023 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 18024 ac_status=$?
6bae0ccf 18025 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18026 rm -f conftest.er1
18027 cat conftest.err >&5
c0d27fcc 18028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18029 (exit $ac_status); } >/dev/null && {
18030 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18031 test ! -s conftest.err
18032 }; then
c0d27fcc 18033 ac_header_preproc=yes
98418dba
CW
18034else
18035 echo "$as_me: failed program was:" >&5
19650fd6
AS
18036sed 's/^/| /' conftest.$ac_ext >&5
18037
c0d27fcc 18038 ac_header_preproc=no
98418dba 18039fi
d6e01aa5 18040
98418dba 18041rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
18042{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18043echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18044
18045# So? What about this header?
edfaf76d
LK
18046case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18047 yes:no: )
c0d27fcc
MR
18048 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18049echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18050 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
18051echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
18052 ac_header_preproc=yes
19650fd6 18053 ;;
edfaf76d 18054 no:yes:* )
c0d27fcc
MR
18055 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
18056echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18057 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
18058echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
18059 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
18060echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
18061 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18062echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18063 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18064echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18065 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
18066echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 18067
19650fd6 18068 ;;
c0d27fcc 18069esac
d6e01aa5
KL
18070{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18071echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18072if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
18073 echo $ECHO_N "(cached) $ECHO_C" >&6
18074else
18075 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 18076fi
d6e01aa5
KL
18077{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18078echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
18079
18080fi
98418dba 18081if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 18082 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 18083#define UMAX 1
c0d27fcc 18084_ACEOF
ba4481b5 18085
98418dba
CW
18086fi
18087
c0d27fcc 18088
98418dba
CW
18089fi
18090
18091if test $ac_have_func = no; then
18092
18093for ac_header in mach/mach.h
2c9dccc9
PJ
18094do
18095as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
18096if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18097 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18098echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18099if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 18100 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18101fi
d6e01aa5
KL
18102ac_res=`eval echo '${'$as_ac_Header'}'`
18103 { echo "$as_me:$LINENO: result: $ac_res" >&5
18104echo "${ECHO_T}$ac_res" >&6; }
98418dba 18105else
c0d27fcc 18106 # Is the header compilable?
d6e01aa5
KL
18107{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18108echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18109cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18110/* confdefs.h. */
18111_ACEOF
18112cat confdefs.h >>conftest.$ac_ext
18113cat >>conftest.$ac_ext <<_ACEOF
18114/* end confdefs.h. */
c0d27fcc
MR
18115$ac_includes_default
18116#include <$ac_header>
18117_ACEOF
18118rm -f conftest.$ac_objext
d6e01aa5
KL
18119if { (ac_try="$ac_compile"
18120case "(($ac_try" in
18121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18122 *) ac_try_echo=$ac_try;;
18123esac
18124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18125 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18126 ac_status=$?
edfaf76d
LK
18127 grep -v '^ *+' conftest.er1 >conftest.err
18128 rm -f conftest.er1
18129 cat conftest.err >&5
c0d27fcc 18130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18131 (exit $ac_status); } && {
18132 test -z "$ac_c_werror_flag" ||
18133 test ! -s conftest.err
18134 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18135 ac_header_compiler=yes
18136else
18137 echo "$as_me: failed program was:" >&5
19650fd6
AS
18138sed 's/^/| /' conftest.$ac_ext >&5
18139
d6e01aa5 18140 ac_header_compiler=no
c0d27fcc 18141fi
d6e01aa5
KL
18142
18143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18144{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18145echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18146
18147# Is the header present?
d6e01aa5
KL
18148{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18149echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18150cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18151/* confdefs.h. */
18152_ACEOF
18153cat confdefs.h >>conftest.$ac_ext
18154cat >>conftest.$ac_ext <<_ACEOF
18155/* end confdefs.h. */
2c9dccc9
PJ
18156#include <$ac_header>
18157_ACEOF
d6e01aa5
KL
18158if { (ac_try="$ac_cpp conftest.$ac_ext"
18159case "(($ac_try" in
18160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18161 *) ac_try_echo=$ac_try;;
18162esac
18163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18164 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 18165 ac_status=$?
6bae0ccf 18166 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
18167 rm -f conftest.er1
18168 cat conftest.err >&5
c0d27fcc 18169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18170 (exit $ac_status); } >/dev/null && {
18171 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18172 test ! -s conftest.err
18173 }; then
c0d27fcc
MR
18174 ac_header_preproc=yes
18175else
18176 echo "$as_me: failed program was:" >&5
19650fd6
AS
18177sed 's/^/| /' conftest.$ac_ext >&5
18178
c0d27fcc
MR
18179 ac_header_preproc=no
18180fi
d6e01aa5 18181
c0d27fcc 18182rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
18183{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18184echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18185
18186# So? What about this header?
edfaf76d
LK
18187case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18188 yes:no: )
c0d27fcc
MR
18189 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18190echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18191 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18192echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18193 ac_header_preproc=yes
19650fd6 18194 ;;
edfaf76d 18195 no:yes:* )
c0d27fcc
MR
18196 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18197echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18198 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18199echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18200 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18201echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18202 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18203echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18204 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18205echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18206 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18207echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 18208
19650fd6 18209 ;;
c0d27fcc 18210esac
d6e01aa5
KL
18211{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18212echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18213if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18214 echo $ECHO_N "(cached) $ECHO_C" >&6
18215else
edfaf76d 18216 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 18217fi
d6e01aa5
KL
18218ac_res=`eval echo '${'$as_ac_Header'}'`
18219 { echo "$as_me:$LINENO: result: $ac_res" >&5
18220echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18221
18222fi
18223if test `eval echo '${'$as_ac_Header'}'` = yes; then
18224 cat >>confdefs.h <<_ACEOF
18225#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18226_ACEOF
18227
18228fi
18229
18230done
18231
18232fi
18233
18234
18235for ac_header in nlist.h
18236do
18237as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
18238if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18239 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18240echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18241if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18242 echo $ECHO_N "(cached) $ECHO_C" >&6
18243fi
d6e01aa5
KL
18244ac_res=`eval echo '${'$as_ac_Header'}'`
18245 { echo "$as_me:$LINENO: result: $ac_res" >&5
18246echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18247else
18248 # Is the header compilable?
d6e01aa5
KL
18249{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18250echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18251cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18252/* confdefs.h. */
18253_ACEOF
18254cat confdefs.h >>conftest.$ac_ext
18255cat >>conftest.$ac_ext <<_ACEOF
18256/* end confdefs.h. */
c0d27fcc
MR
18257$ac_includes_default
18258#include <$ac_header>
18259_ACEOF
18260rm -f conftest.$ac_objext
d6e01aa5
KL
18261if { (ac_try="$ac_compile"
18262case "(($ac_try" in
18263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18264 *) ac_try_echo=$ac_try;;
18265esac
18266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18267 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18268 ac_status=$?
edfaf76d
LK
18269 grep -v '^ *+' conftest.er1 >conftest.err
18270 rm -f conftest.er1
18271 cat conftest.err >&5
c0d27fcc 18272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18273 (exit $ac_status); } && {
18274 test -z "$ac_c_werror_flag" ||
18275 test ! -s conftest.err
18276 } && test -s conftest.$ac_objext; then
c0d27fcc 18277 ac_header_compiler=yes
2c9dccc9
PJ
18278else
18279 echo "$as_me: failed program was:" >&5
19650fd6
AS
18280sed 's/^/| /' conftest.$ac_ext >&5
18281
d6e01aa5 18282 ac_header_compiler=no
98418dba 18283fi
d6e01aa5
KL
18284
18285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18286{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18287echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18288
c0d27fcc 18289# Is the header present?
d6e01aa5
KL
18290{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18291echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18292cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18293/* confdefs.h. */
18294_ACEOF
18295cat confdefs.h >>conftest.$ac_ext
18296cat >>conftest.$ac_ext <<_ACEOF
18297/* end confdefs.h. */
503d2be0
AS
18298#include <$ac_header>
18299_ACEOF
d6e01aa5
KL
18300if { (ac_try="$ac_cpp conftest.$ac_ext"
18301case "(($ac_try" in
18302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18303 *) ac_try_echo=$ac_try;;
18304esac
18305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18306 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18307 ac_status=$?
6bae0ccf 18308 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18309 rm -f conftest.er1
18310 cat conftest.err >&5
c0d27fcc 18311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18312 (exit $ac_status); } >/dev/null && {
18313 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18314 test ! -s conftest.err
18315 }; then
c0d27fcc 18316 ac_header_preproc=yes
503d2be0
AS
18317else
18318 echo "$as_me: failed program was:" >&5
19650fd6
AS
18319sed 's/^/| /' conftest.$ac_ext >&5
18320
c0d27fcc 18321 ac_header_preproc=no
b5de8dc0 18322fi
d6e01aa5 18323
503d2be0 18324rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
18325{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18326echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18327
18328# So? What about this header?
edfaf76d
LK
18329case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18330 yes:no: )
c0d27fcc
MR
18331 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18332echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18333 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18334echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18335 ac_header_preproc=yes
19650fd6 18336 ;;
edfaf76d 18337 no:yes:* )
c0d27fcc
MR
18338 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18339echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18340 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18341echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18342 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18343echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18344 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18345echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18346 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18347echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18348 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18349echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 18350
19650fd6 18351 ;;
c0d27fcc 18352esac
d6e01aa5
KL
18353{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18354echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18355if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18356 echo $ECHO_N "(cached) $ECHO_C" >&6
18357else
edfaf76d 18358 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18359fi
d6e01aa5
KL
18360ac_res=`eval echo '${'$as_ac_Header'}'`
18361 { echo "$as_me:$LINENO: result: $ac_res" >&5
18362echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18363
18364fi
98418dba 18365if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18366 cat >>confdefs.h <<_ACEOF
98418dba 18367#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18368_ACEOF
d6e01aa5
KL
18369 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18370echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18371if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 18372 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18373else
503d2be0 18374 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18375/* confdefs.h. */
18376_ACEOF
18377cat confdefs.h >>conftest.$ac_ext
18378cat >>conftest.$ac_ext <<_ACEOF
18379/* end confdefs.h. */
98418dba 18380#include <nlist.h>
b5de8dc0 18381
503d2be0
AS
18382int
18383main ()
18384{
98418dba
CW
18385static struct nlist ac_aggr;
18386if (ac_aggr.n_un.n_name)
18387return 0;
503d2be0
AS
18388 ;
18389 return 0;
18390}
18391_ACEOF
98418dba 18392rm -f conftest.$ac_objext
d6e01aa5
KL
18393if { (ac_try="$ac_compile"
18394case "(($ac_try" in
18395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18396 *) ac_try_echo=$ac_try;;
18397esac
18398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18399 (eval "$ac_compile") 2>conftest.er1
503d2be0 18400 ac_status=$?
edfaf76d
LK
18401 grep -v '^ *+' conftest.er1 >conftest.err
18402 rm -f conftest.er1
18403 cat conftest.err >&5
c0d27fcc 18404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18405 (exit $ac_status); } && {
18406 test -z "$ac_c_werror_flag" ||
18407 test ! -s conftest.err
18408 } && test -s conftest.$ac_objext; then
edfaf76d 18409 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
18410else
18411 echo "$as_me: failed program was:" >&5
19650fd6
AS
18412sed 's/^/| /' conftest.$ac_ext >&5
18413
d6e01aa5 18414 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18415/* confdefs.h. */
18416_ACEOF
18417cat confdefs.h >>conftest.$ac_ext
18418cat >>conftest.$ac_ext <<_ACEOF
18419/* end confdefs.h. */
6bae0ccf
DL
18420#include <nlist.h>
18421
18422int
18423main ()
18424{
18425static struct nlist ac_aggr;
18426if (sizeof ac_aggr.n_un.n_name)
18427return 0;
18428 ;
18429 return 0;
18430}
18431_ACEOF
18432rm -f conftest.$ac_objext
d6e01aa5
KL
18433if { (ac_try="$ac_compile"
18434case "(($ac_try" in
18435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18436 *) ac_try_echo=$ac_try;;
18437esac
18438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18439 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18440 ac_status=$?
edfaf76d
LK
18441 grep -v '^ *+' conftest.er1 >conftest.err
18442 rm -f conftest.er1
18443 cat conftest.err >&5
6bae0ccf 18444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18445 (exit $ac_status); } && {
18446 test -z "$ac_c_werror_flag" ||
18447 test ! -s conftest.err
18448 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18449 ac_cv_member_struct_nlist_n_un_n_name=yes
18450else
18451 echo "$as_me: failed program was:" >&5
19650fd6
AS
18452sed 's/^/| /' conftest.$ac_ext >&5
18453
d6e01aa5 18454 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18455fi
d6e01aa5
KL
18456
18457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18458fi
d6e01aa5
KL
18459
18460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18461fi
d6e01aa5
KL
18462{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18463echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 18464if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18465
c0d27fcc 18466cat >>confdefs.h <<_ACEOF
98418dba 18467#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18468_ACEOF
b5de8dc0 18469
c0d27fcc
MR
18470
18471cat >>confdefs.h <<\_ACEOF
98418dba 18472#define NLIST_NAME_UNION 1
c0d27fcc 18473_ACEOF
b5de8dc0 18474
98418dba 18475fi
b5de8dc0 18476
c0d27fcc 18477
98418dba 18478fi
c0d27fcc 18479
98418dba 18480done
b5de8dc0 18481
98418dba
CW
18482fi
18483done
b5de8dc0 18484
c0d27fcc 18485
98418dba 18486# Some definitions of getloadavg require that the program be installed setgid.
d6e01aa5
KL
18487{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18488echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18489if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18490 echo $ECHO_N "(cached) $ECHO_C" >&6
18491else
18492 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18493/* confdefs.h. */
18494_ACEOF
18495cat confdefs.h >>conftest.$ac_ext
18496cat >>conftest.$ac_ext <<_ACEOF
18497/* end confdefs.h. */
6bae0ccf 18498#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18499#ifdef LDAV_PRIVILEGED
18500Yowza Am I SETGID yet
18501#endif
18502_ACEOF
18503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18504 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18505 ac_cv_func_getloadavg_setgid=yes
18506else
18507 ac_cv_func_getloadavg_setgid=no
18508fi
18509rm -f conftest*
b5de8dc0 18510
98418dba 18511fi
d6e01aa5
KL
18512{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18513echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18514if test $ac_cv_func_getloadavg_setgid = yes; then
18515 NEED_SETGID=true
b5de8dc0 18516
c0d27fcc 18517cat >>confdefs.h <<\_ACEOF
98418dba 18518#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18519_ACEOF
98418dba 18520
b5de8dc0 18521else
98418dba 18522 NEED_SETGID=false
b5de8dc0 18523fi
98418dba
CW
18524
18525if test $ac_cv_func_getloadavg_setgid = yes; then
d6e01aa5
KL
18526 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18527echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18528if test "${ac_cv_group_kmem+set}" = set; then
18529 echo $ECHO_N "(cached) $ECHO_C" >&6
18530else
18531 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18532 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18533 # If we got an error (system does not support symlinks), try without -L.
18534 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18535 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18536 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18537 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18538 / /s/.* //;p;'`
18539
b5de8dc0 18540fi
d6e01aa5
KL
18541{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18542echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18543 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18544fi
98418dba
CW
18545if test "x$ac_save_LIBS" = x; then
18546 GETLOADAVG_LIBS=$LIBS
18547else
18548 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18549fi
98418dba 18550LIBS=$ac_save_LIBS
b5de8dc0 18551
c0d27fcc
MR
18552
18553
d6e01aa5
KL
18554{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18555echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18556if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18557 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18558else
b936fae4 18559 while :; do
503d2be0 18560 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18561/* confdefs.h. */
18562_ACEOF
18563cat confdefs.h >>conftest.$ac_ext
18564cat >>conftest.$ac_ext <<_ACEOF
18565/* end confdefs.h. */
131e4133
MA
18566#include <sys/types.h> /* for off_t */
18567 #include <stdio.h>
503d2be0
AS
18568int
18569main ()
18570{
131e4133
MA
18571int (*fp) (FILE *, off_t, int) = fseeko;
18572 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
b936fae4
AS
18573 ;
18574 return 0;
18575}
18576_ACEOF
d6e01aa5
KL
18577rm -f conftest.$ac_objext conftest$ac_exeext
18578if { (ac_try="$ac_link"
18579case "(($ac_try" in
18580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18581 *) ac_try_echo=$ac_try;;
18582esac
18583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18584 (eval "$ac_link") 2>conftest.er1
b936fae4 18585 ac_status=$?
edfaf76d
LK
18586 grep -v '^ *+' conftest.er1 >conftest.err
18587 rm -f conftest.er1
18588 cat conftest.err >&5
c0d27fcc 18589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18590 (exit $ac_status); } && {
18591 test -z "$ac_c_werror_flag" ||
18592 test ! -s conftest.err
18593 } && test -s conftest$ac_exeext &&
18594 $as_test_x conftest$ac_exeext; then
18595 ac_cv_sys_largefile_source=no; break
b936fae4
AS
18596else
18597 echo "$as_me: failed program was:" >&5
19650fd6
AS
18598sed 's/^/| /' conftest.$ac_ext >&5
18599
d6e01aa5 18600
b936fae4 18601fi
d6e01aa5
KL
18602
18603rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18604 conftest$ac_exeext conftest.$ac_ext
b936fae4 18605 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18606/* confdefs.h. */
18607_ACEOF
18608cat confdefs.h >>conftest.$ac_ext
18609cat >>conftest.$ac_ext <<_ACEOF
18610/* end confdefs.h. */
b936fae4 18611#define _LARGEFILE_SOURCE 1
131e4133
MA
18612#include <sys/types.h> /* for off_t */
18613 #include <stdio.h>
b936fae4
AS
18614int
18615main ()
18616{
131e4133
MA
18617int (*fp) (FILE *, off_t, int) = fseeko;
18618 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
b936fae4
AS
18619 ;
18620 return 0;
18621}
18622_ACEOF
d6e01aa5
KL
18623rm -f conftest.$ac_objext conftest$ac_exeext
18624if { (ac_try="$ac_link"
18625case "(($ac_try" in
18626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18627 *) ac_try_echo=$ac_try;;
18628esac
18629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18630 (eval "$ac_link") 2>conftest.er1
b936fae4 18631 ac_status=$?
edfaf76d
LK
18632 grep -v '^ *+' conftest.er1 >conftest.err
18633 rm -f conftest.er1
18634 cat conftest.err >&5
c0d27fcc 18635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18636 (exit $ac_status); } && {
18637 test -z "$ac_c_werror_flag" ||
18638 test ! -s conftest.err
18639 } && test -s conftest$ac_exeext &&
18640 $as_test_x conftest$ac_exeext; then
b936fae4
AS
18641 ac_cv_sys_largefile_source=1; break
18642else
18643 echo "$as_me: failed program was:" >&5
19650fd6
AS
18644sed 's/^/| /' conftest.$ac_ext >&5
18645
d6e01aa5 18646
b936fae4 18647fi
d6e01aa5
KL
18648
18649rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18650 conftest$ac_exeext conftest.$ac_ext
18651 ac_cv_sys_largefile_source=unknown
b936fae4
AS
18652 break
18653done
18654fi
d6e01aa5
KL
18655{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18656echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
18657case $ac_cv_sys_largefile_source in #(
18658 no | unknown) ;;
18659 *)
c0d27fcc 18660cat >>confdefs.h <<_ACEOF
b936fae4 18661#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 18662_ACEOF
d6e01aa5
KL
18663;;
18664esac
b936fae4 18665rm -f conftest*
4c343001 18666
b936fae4
AS
18667# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18668# in glibc 2.1.3, but that breaks too many other things.
18669# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
d6e01aa5 18670if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 18671
c0d27fcc 18672cat >>confdefs.h <<\_ACEOF
b936fae4 18673#define HAVE_FSEEKO 1
c0d27fcc 18674_ACEOF
b936fae4 18675
4c343001
DL
18676fi
18677
c0d27fcc 18678
52dbaac8
PE
18679# Configure getopt.
18680# getopt.m4 serial 10
18681
18682# The getopt module assume you want GNU getopt, with getopt_long etc,
18683# rather than vanilla POSIX getopt. This means your your code should
18684# always include <getopt.h> for the getopt prototypes.
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696# Prerequisites of lib/getopt*.
18697
18698
18699
10a3b1a1 18700
52dbaac8
PE
18701 GETOPT_H=
18702
18703for ac_header in getopt.h
18704do
18705as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
18706if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18707 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18708echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18709if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18710 echo $ECHO_N "(cached) $ECHO_C" >&6
18711fi
d6e01aa5
KL
18712ac_res=`eval echo '${'$as_ac_Header'}'`
18713 { echo "$as_me:$LINENO: result: $ac_res" >&5
18714echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18715else
18716 # Is the header compilable?
d6e01aa5
KL
18717{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18718echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
18719cat >conftest.$ac_ext <<_ACEOF
18720/* confdefs.h. */
18721_ACEOF
18722cat confdefs.h >>conftest.$ac_ext
18723cat >>conftest.$ac_ext <<_ACEOF
18724/* end confdefs.h. */
18725$ac_includes_default
18726#include <$ac_header>
18727_ACEOF
18728rm -f conftest.$ac_objext
d6e01aa5
KL
18729if { (ac_try="$ac_compile"
18730case "(($ac_try" in
18731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18732 *) ac_try_echo=$ac_try;;
18733esac
18734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18735 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18736 ac_status=$?
18737 grep -v '^ *+' conftest.er1 >conftest.err
18738 rm -f conftest.er1
18739 cat conftest.err >&5
18740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18741 (exit $ac_status); } && {
18742 test -z "$ac_c_werror_flag" ||
18743 test ! -s conftest.err
18744 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18745 ac_header_compiler=yes
18746else
18747 echo "$as_me: failed program was:" >&5
18748sed 's/^/| /' conftest.$ac_ext >&5
18749
d6e01aa5 18750 ac_header_compiler=no
52dbaac8 18751fi
d6e01aa5
KL
18752
18753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18754{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18755echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
18756
18757# Is the header present?
d6e01aa5
KL
18758{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18759echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
18760cat >conftest.$ac_ext <<_ACEOF
18761/* confdefs.h. */
18762_ACEOF
18763cat confdefs.h >>conftest.$ac_ext
18764cat >>conftest.$ac_ext <<_ACEOF
18765/* end confdefs.h. */
18766#include <$ac_header>
18767_ACEOF
d6e01aa5
KL
18768if { (ac_try="$ac_cpp conftest.$ac_ext"
18769case "(($ac_try" in
18770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18771 *) ac_try_echo=$ac_try;;
18772esac
18773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18774 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
18775 ac_status=$?
18776 grep -v '^ *+' conftest.er1 >conftest.err
18777 rm -f conftest.er1
18778 cat conftest.err >&5
18779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18780 (exit $ac_status); } >/dev/null && {
18781 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18782 test ! -s conftest.err
18783 }; then
52dbaac8
PE
18784 ac_header_preproc=yes
18785else
18786 echo "$as_me: failed program was:" >&5
18787sed 's/^/| /' conftest.$ac_ext >&5
18788
18789 ac_header_preproc=no
18790fi
d6e01aa5 18791
52dbaac8 18792rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
18793{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18794echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
18795
18796# So? What about this header?
18797case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18798 yes:no: )
18799 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18800echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18801 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18802echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18803 ac_header_preproc=yes
18804 ;;
18805 no:yes:* )
18806 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18807echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18808 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18809echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18810 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18811echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18812 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18813echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18814 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18815echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18816 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18817echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 18818
52dbaac8
PE
18819 ;;
18820esac
d6e01aa5
KL
18821{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18822echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18823if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18824 echo $ECHO_N "(cached) $ECHO_C" >&6
18825else
18826 eval "$as_ac_Header=\$ac_header_preproc"
18827fi
d6e01aa5
KL
18828ac_res=`eval echo '${'$as_ac_Header'}'`
18829 { echo "$as_me:$LINENO: result: $ac_res" >&5
18830echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18831
18832fi
18833if test `eval echo '${'$as_ac_Header'}'` = yes; then
18834 cat >>confdefs.h <<_ACEOF
18835#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18836_ACEOF
18837
18838else
18839 GETOPT_H=getopt.h
18840fi
18841
18842done
18843
18844 if test -z "$GETOPT_H"; then
18845
18846for ac_func in getopt_long_only
18847do
18848as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
18849{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18850echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18851if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18852 echo $ECHO_N "(cached) $ECHO_C" >&6
18853else
18854 cat >conftest.$ac_ext <<_ACEOF
18855/* confdefs.h. */
18856_ACEOF
18857cat confdefs.h >>conftest.$ac_ext
18858cat >>conftest.$ac_ext <<_ACEOF
18859/* end confdefs.h. */
18860/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18861 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18862#define $ac_func innocuous_$ac_func
18863
18864/* System header to define __stub macros and hopefully few prototypes,
18865 which can conflict with char $ac_func (); below.
18866 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18867 <limits.h> exists even on freestanding compilers. */
18868
18869#ifdef __STDC__
18870# include <limits.h>
18871#else
18872# include <assert.h>
18873#endif
18874
18875#undef $ac_func
18876
d6e01aa5
KL
18877/* Override any GCC internal prototype to avoid an error.
18878 Use char because int might match the return type of a GCC
18879 builtin and then its argument prototype would still apply. */
52dbaac8
PE
18880#ifdef __cplusplus
18881extern "C"
52dbaac8 18882#endif
52dbaac8
PE
18883char $ac_func ();
18884/* The GNU C library defines this for functions which it implements
18885 to always fail with ENOSYS. Some functions are actually named
18886 something starting with __ and the normal name is an alias. */
d6e01aa5 18887#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 18888choke me
52dbaac8
PE
18889#endif
18890
18891int
18892main ()
18893{
d6e01aa5 18894return $ac_func ();
52dbaac8
PE
18895 ;
18896 return 0;
18897}
18898_ACEOF
18899rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
18900if { (ac_try="$ac_link"
18901case "(($ac_try" in
18902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18903 *) ac_try_echo=$ac_try;;
18904esac
18905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18906 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
18907 ac_status=$?
18908 grep -v '^ *+' conftest.er1 >conftest.err
18909 rm -f conftest.er1
18910 cat conftest.err >&5
18911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18912 (exit $ac_status); } && {
18913 test -z "$ac_c_werror_flag" ||
18914 test ! -s conftest.err
18915 } && test -s conftest$ac_exeext &&
18916 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
18917 eval "$as_ac_var=yes"
18918else
18919 echo "$as_me: failed program was:" >&5
18920sed 's/^/| /' conftest.$ac_ext >&5
18921
d6e01aa5 18922 eval "$as_ac_var=no"
52dbaac8 18923fi
d6e01aa5
KL
18924
18925rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
18926 conftest$ac_exeext conftest.$ac_ext
18927fi
d6e01aa5
KL
18928ac_res=`eval echo '${'$as_ac_var'}'`
18929 { echo "$as_me:$LINENO: result: $ac_res" >&5
18930echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18931if test `eval echo '${'$as_ac_var'}'` = yes; then
18932 cat >>confdefs.h <<_ACEOF
18933#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18934_ACEOF
18935
18936else
18937 GETOPT_H=getopt.h
18938fi
18939done
18940
18941 fi
18942
18943 if test -z "$GETOPT_H"; then
d6e01aa5
KL
18944 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
18945echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
18946if test "${ac_cv_have_decl_optreset+set}" = set; then
18947 echo $ECHO_N "(cached) $ECHO_C" >&6
18948else
18949 cat >conftest.$ac_ext <<_ACEOF
18950/* confdefs.h. */
18951_ACEOF
18952cat confdefs.h >>conftest.$ac_ext
18953cat >>conftest.$ac_ext <<_ACEOF
18954/* end confdefs.h. */
18955#include <getopt.h>
18956
18957int
18958main ()
18959{
18960#ifndef optreset
d6e01aa5 18961 (void) optreset;
52dbaac8
PE
18962#endif
18963
18964 ;
18965 return 0;
18966}
18967_ACEOF
18968rm -f conftest.$ac_objext
d6e01aa5
KL
18969if { (ac_try="$ac_compile"
18970case "(($ac_try" in
18971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18972 *) ac_try_echo=$ac_try;;
18973esac
18974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18975 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18976 ac_status=$?
18977 grep -v '^ *+' conftest.er1 >conftest.err
18978 rm -f conftest.er1
18979 cat conftest.err >&5
18980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18981 (exit $ac_status); } && {
18982 test -z "$ac_c_werror_flag" ||
18983 test ! -s conftest.err
18984 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18985 ac_cv_have_decl_optreset=yes
18986else
18987 echo "$as_me: failed program was:" >&5
18988sed 's/^/| /' conftest.$ac_ext >&5
18989
d6e01aa5 18990 ac_cv_have_decl_optreset=no
52dbaac8 18991fi
d6e01aa5
KL
18992
18993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 18994fi
d6e01aa5
KL
18995{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
18996echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
18997if test $ac_cv_have_decl_optreset = yes; then
18998 GETOPT_H=getopt.h
18999fi
19000
19001 fi
19002
19003 if test -z "$GETOPT_H"; then
d6e01aa5
KL
19004 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
19005echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
19006if test "${gl_cv_func_gnu_getopt+set}" = set; then
19007 echo $ECHO_N "(cached) $ECHO_C" >&6
19008else
19009 if test "$cross_compiling" = yes; then
d6e01aa5
KL
19010 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
19011echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
19012if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
19013 echo $ECHO_N "(cached) $ECHO_C" >&6
19014else
19015 cat >conftest.$ac_ext <<_ACEOF
19016/* confdefs.h. */
19017_ACEOF
19018cat confdefs.h >>conftest.$ac_ext
19019cat >>conftest.$ac_ext <<_ACEOF
19020/* end confdefs.h. */
19021#include <getopt.h>
19022
19023int
19024main ()
19025{
19026#ifndef getopt_clip
d6e01aa5 19027 (void) getopt_clip;
52dbaac8
PE
19028#endif
19029
19030 ;
19031 return 0;
19032}
19033_ACEOF
19034rm -f conftest.$ac_objext
d6e01aa5
KL
19035if { (ac_try="$ac_compile"
19036case "(($ac_try" in
19037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19038 *) ac_try_echo=$ac_try;;
19039esac
19040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19041 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19042 ac_status=$?
19043 grep -v '^ *+' conftest.er1 >conftest.err
19044 rm -f conftest.er1
19045 cat conftest.err >&5
19046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19047 (exit $ac_status); } && {
19048 test -z "$ac_c_werror_flag" ||
19049 test ! -s conftest.err
19050 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19051 ac_cv_have_decl_getopt_clip=yes
19052else
19053 echo "$as_me: failed program was:" >&5
19054sed 's/^/| /' conftest.$ac_ext >&5
19055
d6e01aa5 19056 ac_cv_have_decl_getopt_clip=no
52dbaac8 19057fi
d6e01aa5
KL
19058
19059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19060fi
d6e01aa5
KL
19061{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
19062echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
19063if test $ac_cv_have_decl_getopt_clip = yes; then
19064 gl_cv_func_gnu_getopt=no
19065else
19066 gl_cv_func_gnu_getopt=yes
19067fi
19068
19069else
19070 cat >conftest.$ac_ext <<_ACEOF
19071/* confdefs.h. */
19072_ACEOF
19073cat confdefs.h >>conftest.$ac_ext
19074cat >>conftest.$ac_ext <<_ACEOF
19075/* end confdefs.h. */
19076#include <getopt.h>
19077int
19078main ()
19079{
19080
19081 char *myargv[3];
19082 myargv[0] = "conftest";
19083 myargv[1] = "-+";
19084 myargv[2] = 0;
19085 return getopt (2, myargv, "+a") != '?';
19086
19087 ;
19088 return 0;
19089}
19090_ACEOF
19091rm -f conftest$ac_exeext
d6e01aa5
KL
19092if { (ac_try="$ac_link"
19093case "(($ac_try" in
19094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19095 *) ac_try_echo=$ac_try;;
19096esac
19097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19098 (eval "$ac_link") 2>&5
52dbaac8
PE
19099 ac_status=$?
19100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19101 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
19102 { (case "(($ac_try" in
19103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19104 *) ac_try_echo=$ac_try;;
19105esac
19106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19107 (eval "$ac_try") 2>&5
52dbaac8
PE
19108 ac_status=$?
19109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19110 (exit $ac_status); }; }; then
19111 gl_cv_func_gnu_getopt=yes
19112else
19113 echo "$as_me: program exited with status $ac_status" >&5
19114echo "$as_me: failed program was:" >&5
19115sed 's/^/| /' conftest.$ac_ext >&5
19116
19117( exit $ac_status )
19118gl_cv_func_gnu_getopt=no
19119fi
d6e01aa5 19120rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 19121fi
d6e01aa5
KL
19122
19123
52dbaac8 19124fi
d6e01aa5
KL
19125{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
19126echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
19127 if test "$gl_cv_func_gnu_getopt" = "no"; then
19128 GETOPT_H=getopt.h
19129 fi
19130 fi
19131
19132
19133
19134 if test -n "$GETOPT_H"; then
19135
19136
19137 GETOPT_H=getopt.h
19138
19139cat >>confdefs.h <<\_ACEOF
19140#define __GETOPT_PREFIX rpl_
19141_ACEOF
19142
19143
19144
19145 :
19146 GETOPTOBJS='getopt.o getopt1.o'
19147
19148fi
19149
19150
19151
19152
d6e01aa5
KL
19153{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
19154echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
19155if test "${ac_cv_func_getpgrp_void+set}" = set; then
19156 echo $ECHO_N "(cached) $ECHO_C" >&6
19157else
19158 # Use it with a single arg.
19159cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19160/* confdefs.h. */
19161_ACEOF
19162cat confdefs.h >>conftest.$ac_ext
19163cat >>conftest.$ac_ext <<_ACEOF
19164/* end confdefs.h. */
cd958eb3
MB
19165$ac_includes_default
19166int
19167main ()
19168{
19169getpgrp (0);
19170 ;
19171 return 0;
19172}
19173_ACEOF
19174rm -f conftest.$ac_objext
d6e01aa5
KL
19175if { (ac_try="$ac_compile"
19176case "(($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_compile") 2>conftest.er1
cd958eb3 19182 ac_status=$?
edfaf76d
LK
19183 grep -v '^ *+' conftest.er1 >conftest.err
19184 rm -f conftest.er1
19185 cat conftest.err >&5
cd958eb3 19186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19187 (exit $ac_status); } && {
19188 test -z "$ac_c_werror_flag" ||
19189 test ! -s conftest.err
19190 } && test -s conftest.$ac_objext; then
cd958eb3
MB
19191 ac_cv_func_getpgrp_void=no
19192else
19193 echo "$as_me: failed program was:" >&5
19650fd6
AS
19194sed 's/^/| /' conftest.$ac_ext >&5
19195
d6e01aa5 19196 ac_cv_func_getpgrp_void=yes
cd958eb3 19197fi
d6e01aa5
KL
19198
19199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
19200
19201fi
d6e01aa5
KL
19202{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
19203echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
19204if test $ac_cv_func_getpgrp_void = yes; then
19205
19206cat >>confdefs.h <<\_ACEOF
19207#define GETPGRP_VOID 1
19208_ACEOF
19209
19210fi
19211
19212
973a76b1
DL
19213
19214for ac_func in strftime
19215do
19216as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
19217{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19218echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19219if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
19220 echo $ECHO_N "(cached) $ECHO_C" >&6
19221else
19222 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19223/* confdefs.h. */
19224_ACEOF
19225cat confdefs.h >>conftest.$ac_ext
19226cat >>conftest.$ac_ext <<_ACEOF
19227/* end confdefs.h. */
edfaf76d
LK
19228/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19229 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19230#define $ac_func innocuous_$ac_func
19231
973a76b1 19232/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19233 which can conflict with char $ac_func (); below.
19234 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19235 <limits.h> exists even on freestanding compilers. */
edfaf76d 19236
19650fd6
AS
19237#ifdef __STDC__
19238# include <limits.h>
19239#else
19240# include <assert.h>
19241#endif
edfaf76d
LK
19242
19243#undef $ac_func
19244
d6e01aa5
KL
19245/* Override any GCC internal prototype to avoid an error.
19246 Use char because int might match the return type of a GCC
19247 builtin and then its argument prototype would still apply. */
973a76b1
DL
19248#ifdef __cplusplus
19249extern "C"
973a76b1 19250#endif
973a76b1
DL
19251char $ac_func ();
19252/* The GNU C library defines this for functions which it implements
19253 to always fail with ENOSYS. Some functions are actually named
19254 something starting with __ and the normal name is an alias. */
d6e01aa5 19255#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19256choke me
973a76b1
DL
19257#endif
19258
19650fd6
AS
19259int
19260main ()
19261{
d6e01aa5 19262return $ac_func ();
973a76b1
DL
19263 ;
19264 return 0;
19265}
19266_ACEOF
19267rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19268if { (ac_try="$ac_link"
19269case "(($ac_try" in
19270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19271 *) ac_try_echo=$ac_try;;
19272esac
19273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19274 (eval "$ac_link") 2>conftest.er1
973a76b1 19275 ac_status=$?
edfaf76d
LK
19276 grep -v '^ *+' conftest.er1 >conftest.err
19277 rm -f conftest.er1
19278 cat conftest.err >&5
973a76b1 19279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19280 (exit $ac_status); } && {
19281 test -z "$ac_c_werror_flag" ||
19282 test ! -s conftest.err
19283 } && test -s conftest$ac_exeext &&
19284 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19285 eval "$as_ac_var=yes"
19286else
19287 echo "$as_me: failed program was:" >&5
19650fd6
AS
19288sed 's/^/| /' conftest.$ac_ext >&5
19289
d6e01aa5 19290 eval "$as_ac_var=no"
973a76b1 19291fi
d6e01aa5
KL
19292
19293rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19294 conftest$ac_exeext conftest.$ac_ext
973a76b1 19295fi
d6e01aa5
KL
19296ac_res=`eval echo '${'$as_ac_var'}'`
19297 { echo "$as_me:$LINENO: result: $ac_res" >&5
19298echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
19299if test `eval echo '${'$as_ac_var'}'` = yes; then
19300 cat >>confdefs.h <<_ACEOF
19301#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19302_ACEOF
19303
19304else
19305 # strftime is in -lintl on SCO UNIX.
d6e01aa5
KL
19306{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19307echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
19308if test "${ac_cv_lib_intl_strftime+set}" = set; then
19309 echo $ECHO_N "(cached) $ECHO_C" >&6
19310else
19311 ac_check_lib_save_LIBS=$LIBS
19312LIBS="-lintl $LIBS"
19313cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19314/* confdefs.h. */
19315_ACEOF
19316cat confdefs.h >>conftest.$ac_ext
19317cat >>conftest.$ac_ext <<_ACEOF
19318/* end confdefs.h. */
973a76b1 19319
d6e01aa5
KL
19320/* Override any GCC internal prototype to avoid an error.
19321 Use char because int might match the return type of a GCC
19322 builtin and then its argument prototype would still apply. */
973a76b1
DL
19323#ifdef __cplusplus
19324extern "C"
19325#endif
973a76b1
DL
19326char strftime ();
19327int
19328main ()
19329{
d6e01aa5 19330return strftime ();
973a76b1
DL
19331 ;
19332 return 0;
19333}
19334_ACEOF
19335rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19336if { (ac_try="$ac_link"
19337case "(($ac_try" in
19338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19339 *) ac_try_echo=$ac_try;;
19340esac
19341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19342 (eval "$ac_link") 2>conftest.er1
973a76b1 19343 ac_status=$?
edfaf76d
LK
19344 grep -v '^ *+' conftest.er1 >conftest.err
19345 rm -f conftest.er1
19346 cat conftest.err >&5
973a76b1 19347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19348 (exit $ac_status); } && {
19349 test -z "$ac_c_werror_flag" ||
19350 test ! -s conftest.err
19351 } && test -s conftest$ac_exeext &&
19352 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19353 ac_cv_lib_intl_strftime=yes
19354else
19355 echo "$as_me: failed program was:" >&5
19650fd6
AS
19356sed 's/^/| /' conftest.$ac_ext >&5
19357
d6e01aa5 19358 ac_cv_lib_intl_strftime=no
973a76b1 19359fi
d6e01aa5
KL
19360
19361rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19362 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19363LIBS=$ac_check_lib_save_LIBS
19364fi
d6e01aa5
KL
19365{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19366echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
19367if test $ac_cv_lib_intl_strftime = yes; then
19368 cat >>confdefs.h <<\_ACEOF
19369#define HAVE_STRFTIME 1
19370_ACEOF
19371
19372LIBS="-lintl $LIBS"
19373fi
19374
19375fi
19376done
19377
19378
b936fae4
AS
19379# UNIX98 PTYs.
19380
19381for ac_func in grantpt
503d2be0
AS
19382do
19383as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
19384{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19385echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19386if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19387 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19388else
503d2be0 19389 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19390/* confdefs.h. */
19391_ACEOF
19392cat confdefs.h >>conftest.$ac_ext
19393cat >>conftest.$ac_ext <<_ACEOF
19394/* end confdefs.h. */
edfaf76d
LK
19395/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19396 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19397#define $ac_func innocuous_$ac_func
19398
503d2be0 19399/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19400 which can conflict with char $ac_func (); below.
19401 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19402 <limits.h> exists even on freestanding compilers. */
edfaf76d 19403
19650fd6
AS
19404#ifdef __STDC__
19405# include <limits.h>
19406#else
19407# include <assert.h>
19408#endif
edfaf76d
LK
19409
19410#undef $ac_func
19411
d6e01aa5
KL
19412/* Override any GCC internal prototype to avoid an error.
19413 Use char because int might match the return type of a GCC
19414 builtin and then its argument prototype would still apply. */
503d2be0
AS
19415#ifdef __cplusplus
19416extern "C"
19417#endif
503d2be0 19418char $ac_func ();
503d2be0
AS
19419/* The GNU C library defines this for functions which it implements
19420 to always fail with ENOSYS. Some functions are actually named
19421 something starting with __ and the normal name is an alias. */
d6e01aa5 19422#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19423choke me
503d2be0 19424#endif
4c343001 19425
19650fd6
AS
19426int
19427main ()
19428{
d6e01aa5 19429return $ac_func ();
503d2be0
AS
19430 ;
19431 return 0;
19432}
19433_ACEOF
19434rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19435if { (ac_try="$ac_link"
19436case "(($ac_try" in
19437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19438 *) ac_try_echo=$ac_try;;
19439esac
19440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19441 (eval "$ac_link") 2>conftest.er1
503d2be0 19442 ac_status=$?
edfaf76d
LK
19443 grep -v '^ *+' conftest.er1 >conftest.err
19444 rm -f conftest.er1
19445 cat conftest.err >&5
c0d27fcc 19446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19447 (exit $ac_status); } && {
19448 test -z "$ac_c_werror_flag" ||
19449 test ! -s conftest.err
19450 } && test -s conftest$ac_exeext &&
19451 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19452 eval "$as_ac_var=yes"
19453else
19454 echo "$as_me: failed program was:" >&5
19650fd6
AS
19455sed 's/^/| /' conftest.$ac_ext >&5
19456
d6e01aa5 19457 eval "$as_ac_var=no"
503d2be0 19458fi
d6e01aa5
KL
19459
19460rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19461 conftest$ac_exeext conftest.$ac_ext
503d2be0 19462fi
d6e01aa5
KL
19463ac_res=`eval echo '${'$as_ac_var'}'`
19464 { echo "$as_me:$LINENO: result: $ac_res" >&5
19465echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19466if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19467 cat >>confdefs.h <<_ACEOF
503d2be0 19468#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19469_ACEOF
4c343001
DL
19470
19471fi
503d2be0
AS
19472done
19473
c0d27fcc 19474
b936fae4 19475# PTY-related GNU extensions.
4c343001 19476
b936fae4
AS
19477for ac_func in getpt
19478do
19479as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
19480{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19481echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19482if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19483 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19484else
b936fae4 19485 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19486/* confdefs.h. */
19487_ACEOF
19488cat confdefs.h >>conftest.$ac_ext
19489cat >>conftest.$ac_ext <<_ACEOF
19490/* end confdefs.h. */
edfaf76d
LK
19491/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19492 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19493#define $ac_func innocuous_$ac_func
19494
087121cc 19495/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19496 which can conflict with char $ac_func (); below.
19497 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19498 <limits.h> exists even on freestanding compilers. */
edfaf76d 19499
19650fd6
AS
19500#ifdef __STDC__
19501# include <limits.h>
19502#else
19503# include <assert.h>
19504#endif
edfaf76d
LK
19505
19506#undef $ac_func
19507
d6e01aa5
KL
19508/* Override any GCC internal prototype to avoid an error.
19509 Use char because int might match the return type of a GCC
19510 builtin and then its argument prototype would still apply. */
503d2be0
AS
19511#ifdef __cplusplus
19512extern "C"
19513#endif
503d2be0 19514char $ac_func ();
087121cc
GM
19515/* The GNU C library defines this for functions which it implements
19516 to always fail with ENOSYS. Some functions are actually named
19517 something starting with __ and the normal name is an alias. */
d6e01aa5 19518#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19519choke me
087121cc
GM
19520#endif
19521
19650fd6
AS
19522int
19523main ()
19524{
d6e01aa5 19525return $ac_func ();
503d2be0
AS
19526 ;
19527 return 0;
19528}
19529_ACEOF
19530rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19531if { (ac_try="$ac_link"
19532case "(($ac_try" in
19533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19534 *) ac_try_echo=$ac_try;;
19535esac
19536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19537 (eval "$ac_link") 2>conftest.er1
503d2be0 19538 ac_status=$?
edfaf76d
LK
19539 grep -v '^ *+' conftest.er1 >conftest.err
19540 rm -f conftest.er1
19541 cat conftest.err >&5
c0d27fcc 19542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19543 (exit $ac_status); } && {
19544 test -z "$ac_c_werror_flag" ||
19545 test ! -s conftest.err
19546 } && test -s conftest$ac_exeext &&
19547 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19548 eval "$as_ac_var=yes"
19549else
19550 echo "$as_me: failed program was:" >&5
19650fd6
AS
19551sed 's/^/| /' conftest.$ac_ext >&5
19552
d6e01aa5 19553 eval "$as_ac_var=no"
503d2be0 19554fi
d6e01aa5
KL
19555
19556rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19557 conftest$ac_exeext conftest.$ac_ext
503d2be0 19558fi
d6e01aa5
KL
19559ac_res=`eval echo '${'$as_ac_var'}'`
19560 { echo "$as_me:$LINENO: result: $ac_res" >&5
19561echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19562if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19563 cat >>confdefs.h <<_ACEOF
503d2be0 19564#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19565_ACEOF
087121cc 19566
087121cc
GM
19567fi
19568done
19569
c0d27fcc 19570
ba4481b5
DL
19571# Check this now, so that we will NOT find the above functions in ncurses.
19572# That is because we have not set up to link ncurses in lib-src.
19573# It's better to believe a function is not available
19574# than to expect to find it in ncurses.
503d2be0 19575
d6e01aa5
KL
19576{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
19577echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
19578if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
19579 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19580else
503d2be0 19581 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19582LIBS="-lncurses $LIBS"
503d2be0 19583cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19584/* confdefs.h. */
19585_ACEOF
19586cat confdefs.h >>conftest.$ac_ext
19587cat >>conftest.$ac_ext <<_ACEOF
19588/* end confdefs.h. */
503d2be0 19589
d6e01aa5
KL
19590/* Override any GCC internal prototype to avoid an error.
19591 Use char because int might match the return type of a GCC
19592 builtin and then its argument prototype would still apply. */
503d2be0
AS
19593#ifdef __cplusplus
19594extern "C"
19595#endif
503d2be0
AS
19596char tparm ();
19597int
19598main ()
19599{
d6e01aa5 19600return tparm ();
503d2be0
AS
19601 ;
19602 return 0;
19603}
19604_ACEOF
19605rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19606if { (ac_try="$ac_link"
19607case "(($ac_try" in
19608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19609 *) ac_try_echo=$ac_try;;
19610esac
19611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19612 (eval "$ac_link") 2>conftest.er1
503d2be0 19613 ac_status=$?
edfaf76d
LK
19614 grep -v '^ *+' conftest.er1 >conftest.err
19615 rm -f conftest.er1
19616 cat conftest.err >&5
c0d27fcc 19617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19618 (exit $ac_status); } && {
19619 test -z "$ac_c_werror_flag" ||
19620 test ! -s conftest.err
19621 } && test -s conftest$ac_exeext &&
19622 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19623 ac_cv_lib_ncurses_tparm=yes
19624else
19625 echo "$as_me: failed program was:" >&5
19650fd6
AS
19626sed 's/^/| /' conftest.$ac_ext >&5
19627
d6e01aa5 19628 ac_cv_lib_ncurses_tparm=no
503d2be0 19629fi
d6e01aa5
KL
19630
19631rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19632 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19633LIBS=$ac_check_lib_save_LIBS
19634fi
d6e01aa5
KL
19635{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
19636echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 19637if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 19638 cat >>confdefs.h <<_ACEOF
503d2be0 19639#define HAVE_LIBNCURSES 1
c0d27fcc 19640_ACEOF
ba4481b5
DL
19641
19642 LIBS="-lncurses $LIBS"
19643
ba4481b5
DL
19644fi
19645
c0d27fcc 19646
bc3512d0
CY
19647# Do we have res_init, for detecting changes in /etc/resolv.conf?
19648
19649resolv=no
074767f2 19650cat >conftest.$ac_ext <<_ACEOF
bc3512d0
CY
19651/* confdefs.h. */
19652_ACEOF
19653cat confdefs.h >>conftest.$ac_ext
19654cat >>conftest.$ac_ext <<_ACEOF
19655/* end confdefs.h. */
074767f2
AS
19656#include <netinet/in.h>
19657#include <arpa/nameser.h>
19658#include <resolv.h>
bc3512d0
CY
19659int
19660main ()
19661{
074767f2 19662return res_init();
bc3512d0
CY
19663 ;
19664 return 0;
19665}
19666_ACEOF
19667rm -f conftest.$ac_objext conftest$ac_exeext
19668if { (ac_try="$ac_link"
19669case "(($ac_try" in
19670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19671 *) ac_try_echo=$ac_try;;
19672esac
19673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19674 (eval "$ac_link") 2>conftest.er1
19675 ac_status=$?
19676 grep -v '^ *+' conftest.er1 >conftest.err
19677 rm -f conftest.er1
19678 cat conftest.err >&5
19679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19680 (exit $ac_status); } && {
19681 test -z "$ac_c_werror_flag" ||
19682 test ! -s conftest.err
19683 } && test -s conftest$ac_exeext &&
19684 $as_test_x conftest$ac_exeext; then
074767f2 19685 have_res_init=yes
bc3512d0
CY
19686else
19687 echo "$as_me: failed program was:" >&5
19688sed 's/^/| /' conftest.$ac_ext >&5
19689
074767f2 19690 have_res_init=no
bc3512d0
CY
19691fi
19692
19693rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19694 conftest$ac_exeext conftest.$ac_ext
bc3512d0
CY
19695if test "$have_res_init" = no; then
19696 OLIBS="$LIBS"
19697 LIBS="$LIBS -lresolv"
19698 { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
19699echo $ECHO_N "checking for res_init with -lresolv... $ECHO_C" >&6; }
19700 cat >conftest.$ac_ext <<_ACEOF
19701/* confdefs.h. */
19702_ACEOF
19703cat confdefs.h >>conftest.$ac_ext
19704cat >>conftest.$ac_ext <<_ACEOF
19705/* end confdefs.h. */
19706#include <netinet/in.h>
19707#include <arpa/nameser.h>
19708#include <resolv.h>
19709int
19710main ()
19711{
074767f2 19712return res_init();
bc3512d0
CY
19713 ;
19714 return 0;
19715}
19716_ACEOF
19717rm -f conftest.$ac_objext conftest$ac_exeext
19718if { (ac_try="$ac_link"
19719case "(($ac_try" in
19720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19721 *) ac_try_echo=$ac_try;;
19722esac
19723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19724 (eval "$ac_link") 2>conftest.er1
19725 ac_status=$?
19726 grep -v '^ *+' conftest.er1 >conftest.err
19727 rm -f conftest.er1
19728 cat conftest.err >&5
19729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19730 (exit $ac_status); } && {
19731 test -z "$ac_c_werror_flag" ||
19732 test ! -s conftest.err
19733 } && test -s conftest$ac_exeext &&
19734 $as_test_x conftest$ac_exeext; then
19735 have_res_init=yes
19736else
19737 echo "$as_me: failed program was:" >&5
19738sed 's/^/| /' conftest.$ac_ext >&5
19739
19740 have_res_init=no
19741fi
19742
19743rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19744 conftest$ac_exeext conftest.$ac_ext
19745 { echo "$as_me:$LINENO: result: $have_res_init" >&5
19746echo "${ECHO_T}$have_res_init" >&6; }
19747 if test "$have_res_init" = yes ; then
19748 resolv=yes
19749 fi
19750 LIBS="$OLIBS"
19751fi
19752
19753if test "$have_res_init" = yes; then
19754
19755cat >>confdefs.h <<\_ACEOF
19756#define HAVE_RES_INIT 1
19757_ACEOF
19758
19759fi
19760
84e70f78
KR
19761# Do we need the Hesiod library to provide the support routines?
19762if test "$with_hesiod" = yes ; then
19763 # Don't set $LIBS here -- see comments above.
d6e01aa5
KL
19764 { echo "$as_me:$LINENO: checking for res_send" >&5
19765echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
19766if test "${ac_cv_func_res_send+set}" = set; then
19767 echo $ECHO_N "(cached) $ECHO_C" >&6
19768else
19769 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19770/* confdefs.h. */
19771_ACEOF
19772cat confdefs.h >>conftest.$ac_ext
19773cat >>conftest.$ac_ext <<_ACEOF
19774/* end confdefs.h. */
edfaf76d
LK
19775/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
19776 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19777#define res_send innocuous_res_send
19778
84e70f78 19779/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19780 which can conflict with char res_send (); below.
19781 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19782 <limits.h> exists even on freestanding compilers. */
edfaf76d 19783
19650fd6
AS
19784#ifdef __STDC__
19785# include <limits.h>
19786#else
19787# include <assert.h>
19788#endif
edfaf76d
LK
19789
19790#undef res_send
19791
d6e01aa5
KL
19792/* Override any GCC internal prototype to avoid an error.
19793 Use char because int might match the return type of a GCC
19794 builtin and then its argument prototype would still apply. */
84e70f78
KR
19795#ifdef __cplusplus
19796extern "C"
19797#endif
84e70f78 19798char res_send ();
84e70f78
KR
19799/* The GNU C library defines this for functions which it implements
19800 to always fail with ENOSYS. Some functions are actually named
19801 something starting with __ and the normal name is an alias. */
d6e01aa5 19802#if defined __stub_res_send || defined __stub___res_send
84e70f78 19803choke me
cd958eb3
MB
19804#endif
19805
19650fd6
AS
19806int
19807main ()
19808{
d6e01aa5 19809return res_send ();
84e70f78
KR
19810 ;
19811 return 0;
19812}
19813_ACEOF
19814rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19815if { (ac_try="$ac_link"
19816case "(($ac_try" in
19817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19818 *) ac_try_echo=$ac_try;;
19819esac
19820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19821 (eval "$ac_link") 2>conftest.er1
84e70f78 19822 ac_status=$?
edfaf76d
LK
19823 grep -v '^ *+' conftest.er1 >conftest.err
19824 rm -f conftest.er1
19825 cat conftest.err >&5
c0d27fcc 19826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19827 (exit $ac_status); } && {
19828 test -z "$ac_c_werror_flag" ||
19829 test ! -s conftest.err
19830 } && test -s conftest$ac_exeext &&
19831 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19832 ac_cv_func_res_send=yes
19833else
19834 echo "$as_me: failed program was:" >&5
19650fd6
AS
19835sed 's/^/| /' conftest.$ac_ext >&5
19836
d6e01aa5 19837 ac_cv_func_res_send=no
84e70f78 19838fi
d6e01aa5
KL
19839
19840rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19841 conftest$ac_exeext conftest.$ac_ext
84e70f78 19842fi
d6e01aa5
KL
19843{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
19844echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
19845if test $ac_cv_func_res_send = yes; then
19846 :
19847else
d6e01aa5
KL
19848 { echo "$as_me:$LINENO: checking for __res_send" >&5
19849echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
19850if test "${ac_cv_func___res_send+set}" = set; then
19851 echo $ECHO_N "(cached) $ECHO_C" >&6
19852else
19853 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19854/* confdefs.h. */
19855_ACEOF
19856cat confdefs.h >>conftest.$ac_ext
19857cat >>conftest.$ac_ext <<_ACEOF
19858/* end confdefs.h. */
edfaf76d
LK
19859/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
19860 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19861#define __res_send innocuous___res_send
19862
84e70f78 19863/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19864 which can conflict with char __res_send (); below.
19865 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19866 <limits.h> exists even on freestanding compilers. */
edfaf76d 19867
19650fd6
AS
19868#ifdef __STDC__
19869# include <limits.h>
19870#else
19871# include <assert.h>
19872#endif
edfaf76d
LK
19873
19874#undef __res_send
19875
d6e01aa5
KL
19876/* Override any GCC internal prototype to avoid an error.
19877 Use char because int might match the return type of a GCC
19878 builtin and then its argument prototype would still apply. */
84e70f78
KR
19879#ifdef __cplusplus
19880extern "C"
19881#endif
84e70f78 19882char __res_send ();
84e70f78
KR
19883/* The GNU C library defines this for functions which it implements
19884 to always fail with ENOSYS. Some functions are actually named
19885 something starting with __ and the normal name is an alias. */
d6e01aa5 19886#if defined __stub___res_send || defined __stub_____res_send
84e70f78 19887choke me
84e70f78
KR
19888#endif
19889
19650fd6
AS
19890int
19891main ()
19892{
d6e01aa5 19893return __res_send ();
84e70f78
KR
19894 ;
19895 return 0;
19896}
19897_ACEOF
19898rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19899if { (ac_try="$ac_link"
19900case "(($ac_try" in
19901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19902 *) ac_try_echo=$ac_try;;
19903esac
19904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19905 (eval "$ac_link") 2>conftest.er1
84e70f78 19906 ac_status=$?
edfaf76d
LK
19907 grep -v '^ *+' conftest.er1 >conftest.err
19908 rm -f conftest.er1
19909 cat conftest.err >&5
c0d27fcc 19910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19911 (exit $ac_status); } && {
19912 test -z "$ac_c_werror_flag" ||
19913 test ! -s conftest.err
19914 } && test -s conftest$ac_exeext &&
19915 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19916 ac_cv_func___res_send=yes
19917else
19918 echo "$as_me: failed program was:" >&5
19650fd6
AS
19919sed 's/^/| /' conftest.$ac_ext >&5
19920
d6e01aa5 19921 ac_cv_func___res_send=no
84e70f78 19922fi
d6e01aa5
KL
19923
19924rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19925 conftest$ac_exeext conftest.$ac_ext
84e70f78 19926fi
d6e01aa5
KL
19927{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
19928echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
19929if test $ac_cv_func___res_send = yes; then
19930 :
19931else
d6e01aa5
KL
19932 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
19933echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19934if test "${ac_cv_lib_resolv_res_send+set}" = set; then
19935 echo $ECHO_N "(cached) $ECHO_C" >&6
19936else
19937 ac_check_lib_save_LIBS=$LIBS
19938LIBS="-lresolv $LIBS"
19939cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19940/* confdefs.h. */
19941_ACEOF
19942cat confdefs.h >>conftest.$ac_ext
19943cat >>conftest.$ac_ext <<_ACEOF
19944/* end confdefs.h. */
84e70f78 19945
d6e01aa5
KL
19946/* Override any GCC internal prototype to avoid an error.
19947 Use char because int might match the return type of a GCC
19948 builtin and then its argument prototype would still apply. */
84e70f78
KR
19949#ifdef __cplusplus
19950extern "C"
19951#endif
84e70f78
KR
19952char res_send ();
19953int
19954main ()
19955{
d6e01aa5 19956return res_send ();
84e70f78
KR
19957 ;
19958 return 0;
19959}
19960_ACEOF
19961rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19962if { (ac_try="$ac_link"
19963case "(($ac_try" in
19964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19965 *) ac_try_echo=$ac_try;;
19966esac
19967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19968 (eval "$ac_link") 2>conftest.er1
84e70f78 19969 ac_status=$?
edfaf76d
LK
19970 grep -v '^ *+' conftest.er1 >conftest.err
19971 rm -f conftest.er1
19972 cat conftest.err >&5
c0d27fcc 19973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19974 (exit $ac_status); } && {
19975 test -z "$ac_c_werror_flag" ||
19976 test ! -s conftest.err
19977 } && test -s conftest$ac_exeext &&
19978 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19979 ac_cv_lib_resolv_res_send=yes
19980else
19981 echo "$as_me: failed program was:" >&5
19650fd6
AS
19982sed 's/^/| /' conftest.$ac_ext >&5
19983
d6e01aa5 19984 ac_cv_lib_resolv_res_send=no
84e70f78 19985fi
d6e01aa5
KL
19986
19987rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19988 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19989LIBS=$ac_check_lib_save_LIBS
19990fi
d6e01aa5
KL
19991{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
19992echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
19993if test $ac_cv_lib_resolv_res_send = yes; then
19994 resolv=yes
19995else
d6e01aa5
KL
19996 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
19997echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19998if test "${ac_cv_lib_resolv___res_send+set}" = set; then
19999 echo $ECHO_N "(cached) $ECHO_C" >&6
20000else
20001 ac_check_lib_save_LIBS=$LIBS
20002LIBS="-lresolv $LIBS"
20003cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20004/* confdefs.h. */
20005_ACEOF
20006cat confdefs.h >>conftest.$ac_ext
20007cat >>conftest.$ac_ext <<_ACEOF
20008/* end confdefs.h. */
84e70f78 20009
d6e01aa5
KL
20010/* Override any GCC internal prototype to avoid an error.
20011 Use char because int might match the return type of a GCC
20012 builtin and then its argument prototype would still apply. */
84e70f78
KR
20013#ifdef __cplusplus
20014extern "C"
20015#endif
84e70f78
KR
20016char __res_send ();
20017int
20018main ()
20019{
d6e01aa5 20020return __res_send ();
84e70f78
KR
20021 ;
20022 return 0;
20023}
20024_ACEOF
20025rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20026if { (ac_try="$ac_link"
20027case "(($ac_try" in
20028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20029 *) ac_try_echo=$ac_try;;
20030esac
20031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20032 (eval "$ac_link") 2>conftest.er1
84e70f78 20033 ac_status=$?
edfaf76d
LK
20034 grep -v '^ *+' conftest.er1 >conftest.err
20035 rm -f conftest.er1
20036 cat conftest.err >&5
c0d27fcc 20037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20038 (exit $ac_status); } && {
20039 test -z "$ac_c_werror_flag" ||
20040 test ! -s conftest.err
20041 } && test -s conftest$ac_exeext &&
20042 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20043 ac_cv_lib_resolv___res_send=yes
20044else
20045 echo "$as_me: failed program was:" >&5
19650fd6
AS
20046sed 's/^/| /' conftest.$ac_ext >&5
20047
d6e01aa5 20048 ac_cv_lib_resolv___res_send=no
84e70f78 20049fi
d6e01aa5
KL
20050
20051rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20052 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20053LIBS=$ac_check_lib_save_LIBS
20054fi
d6e01aa5
KL
20055{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
20056echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
20057if test $ac_cv_lib_resolv___res_send = yes; then
20058 resolv=yes
20059fi
20060
20061fi
20062
20063fi
20064
20065fi
20066
20067 if test "$resolv" = yes ; then
20068 RESOLVLIB=-lresolv
84e70f78
KR
20069 else
20070 RESOLVLIB=
20071 fi
d6e01aa5
KL
20072 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
20073echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
20074if test "${ac_cv_func_hes_getmailhost+set}" = set; then
20075 echo $ECHO_N "(cached) $ECHO_C" >&6
20076else
20077 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20078/* confdefs.h. */
20079_ACEOF
20080cat confdefs.h >>conftest.$ac_ext
20081cat >>conftest.$ac_ext <<_ACEOF
20082/* end confdefs.h. */
edfaf76d
LK
20083/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
20084 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20085#define hes_getmailhost innocuous_hes_getmailhost
20086
84e70f78 20087/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20088 which can conflict with char hes_getmailhost (); below.
20089 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20090 <limits.h> exists even on freestanding compilers. */
edfaf76d 20091
19650fd6
AS
20092#ifdef __STDC__
20093# include <limits.h>
20094#else
20095# include <assert.h>
20096#endif
edfaf76d
LK
20097
20098#undef hes_getmailhost
20099
d6e01aa5
KL
20100/* Override any GCC internal prototype to avoid an error.
20101 Use char because int might match the return type of a GCC
20102 builtin and then its argument prototype would still apply. */
84e70f78
KR
20103#ifdef __cplusplus
20104extern "C"
20105#endif
84e70f78 20106char hes_getmailhost ();
84e70f78
KR
20107/* The GNU C library defines this for functions which it implements
20108 to always fail with ENOSYS. Some functions are actually named
20109 something starting with __ and the normal name is an alias. */
d6e01aa5 20110#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 20111choke me
cd958eb3
MB
20112#endif
20113
19650fd6
AS
20114int
20115main ()
20116{
d6e01aa5 20117return hes_getmailhost ();
84e70f78
KR
20118 ;
20119 return 0;
20120}
20121_ACEOF
20122rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20123if { (ac_try="$ac_link"
20124case "(($ac_try" in
20125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20126 *) ac_try_echo=$ac_try;;
20127esac
20128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20129 (eval "$ac_link") 2>conftest.er1
84e70f78 20130 ac_status=$?
edfaf76d
LK
20131 grep -v '^ *+' conftest.er1 >conftest.err
20132 rm -f conftest.er1
20133 cat conftest.err >&5
c0d27fcc 20134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20135 (exit $ac_status); } && {
20136 test -z "$ac_c_werror_flag" ||
20137 test ! -s conftest.err
20138 } && test -s conftest$ac_exeext &&
20139 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20140 ac_cv_func_hes_getmailhost=yes
20141else
20142 echo "$as_me: failed program was:" >&5
19650fd6
AS
20143sed 's/^/| /' conftest.$ac_ext >&5
20144
d6e01aa5 20145 ac_cv_func_hes_getmailhost=no
84e70f78 20146fi
d6e01aa5
KL
20147
20148rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20149 conftest$ac_exeext conftest.$ac_ext
84e70f78 20150fi
d6e01aa5
KL
20151{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
20152echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
20153if test $ac_cv_func_hes_getmailhost = yes; then
20154 :
20155else
d6e01aa5
KL
20156 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
20157echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
20158if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
20159 echo $ECHO_N "(cached) $ECHO_C" >&6
20160else
20161 ac_check_lib_save_LIBS=$LIBS
20162LIBS="-lhesiod $RESOLVLIB $LIBS"
20163cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20164/* confdefs.h. */
20165_ACEOF
20166cat confdefs.h >>conftest.$ac_ext
20167cat >>conftest.$ac_ext <<_ACEOF
20168/* end confdefs.h. */
84e70f78 20169
d6e01aa5
KL
20170/* Override any GCC internal prototype to avoid an error.
20171 Use char because int might match the return type of a GCC
20172 builtin and then its argument prototype would still apply. */
84e70f78
KR
20173#ifdef __cplusplus
20174extern "C"
20175#endif
84e70f78
KR
20176char hes_getmailhost ();
20177int
20178main ()
20179{
d6e01aa5 20180return hes_getmailhost ();
84e70f78
KR
20181 ;
20182 return 0;
20183}
20184_ACEOF
20185rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20186if { (ac_try="$ac_link"
20187case "(($ac_try" in
20188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20189 *) ac_try_echo=$ac_try;;
20190esac
20191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20192 (eval "$ac_link") 2>conftest.er1
84e70f78 20193 ac_status=$?
edfaf76d
LK
20194 grep -v '^ *+' conftest.er1 >conftest.err
20195 rm -f conftest.er1
20196 cat conftest.err >&5
c0d27fcc 20197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20198 (exit $ac_status); } && {
20199 test -z "$ac_c_werror_flag" ||
20200 test ! -s conftest.err
20201 } && test -s conftest$ac_exeext &&
20202 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20203 ac_cv_lib_hesiod_hes_getmailhost=yes
20204else
20205 echo "$as_me: failed program was:" >&5
19650fd6
AS
20206sed 's/^/| /' conftest.$ac_ext >&5
20207
d6e01aa5 20208 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 20209fi
d6e01aa5
KL
20210
20211rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20212 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20213LIBS=$ac_check_lib_save_LIBS
20214fi
d6e01aa5
KL
20215{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
20216echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 20217if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 20218
c0d27fcc 20219cat >>confdefs.h <<\_ACEOF
84e70f78 20220#define HAVE_LIBHESIOD 1
c0d27fcc 20221_ACEOF
84e70f78
KR
20222
20223else
20224 :
20225fi
20226
20227fi
20228
20229fi
20230
bc3512d0
CY
20231# Do we need libresolv (due to res_init or Hesiod)?
20232if test "$resolv" = yes ; then
20233
20234cat >>confdefs.h <<\_ACEOF
20235#define HAVE_LIBRESOLV 1
20236_ACEOF
20237
20238fi
20239
a21616bd
KR
20240# These tell us which Kerberos-related libraries to use.
20241if test "${with_kerberos+set}" = set; then
503d2be0 20242
d6e01aa5
KL
20243{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
20244echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
20245if test "${ac_cv_lib_com_err_com_err+set}" = set; then
20246 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20247else
503d2be0 20248 ac_check_lib_save_LIBS=$LIBS
a21616bd 20249LIBS="-lcom_err $LIBS"
503d2be0 20250cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20251/* confdefs.h. */
20252_ACEOF
20253cat confdefs.h >>conftest.$ac_ext
20254cat >>conftest.$ac_ext <<_ACEOF
20255/* end confdefs.h. */
503d2be0 20256
d6e01aa5
KL
20257/* Override any GCC internal prototype to avoid an error.
20258 Use char because int might match the return type of a GCC
20259 builtin and then its argument prototype would still apply. */
503d2be0
AS
20260#ifdef __cplusplus
20261extern "C"
20262#endif
503d2be0
AS
20263char com_err ();
20264int
20265main ()
20266{
d6e01aa5 20267return com_err ();
503d2be0
AS
20268 ;
20269 return 0;
20270}
20271_ACEOF
20272rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20273if { (ac_try="$ac_link"
20274case "(($ac_try" in
20275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20276 *) ac_try_echo=$ac_try;;
20277esac
20278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20279 (eval "$ac_link") 2>conftest.er1
503d2be0 20280 ac_status=$?
edfaf76d
LK
20281 grep -v '^ *+' conftest.er1 >conftest.err
20282 rm -f conftest.er1
20283 cat conftest.err >&5
c0d27fcc 20284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20285 (exit $ac_status); } && {
20286 test -z "$ac_c_werror_flag" ||
20287 test ! -s conftest.err
20288 } && test -s conftest$ac_exeext &&
20289 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20290 ac_cv_lib_com_err_com_err=yes
20291else
20292 echo "$as_me: failed program was:" >&5
19650fd6
AS
20293sed 's/^/| /' conftest.$ac_ext >&5
20294
d6e01aa5 20295 ac_cv_lib_com_err_com_err=no
503d2be0 20296fi
d6e01aa5
KL
20297
20298rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20299 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20300LIBS=$ac_check_lib_save_LIBS
20301fi
d6e01aa5
KL
20302{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
20303echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 20304if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 20305 cat >>confdefs.h <<_ACEOF
503d2be0 20306#define HAVE_LIBCOM_ERR 1
c0d27fcc 20307_ACEOF
a21616bd
KR
20308
20309 LIBS="-lcom_err $LIBS"
20310
a21616bd
KR
20311fi
20312
c0d27fcc 20313
d6e01aa5
KL
20314{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
20315echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
20316if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
20317 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20318else
503d2be0 20319 ac_check_lib_save_LIBS=$LIBS
a21616bd 20320LIBS="-lk5crypto $LIBS"
503d2be0 20321cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20322/* confdefs.h. */
20323_ACEOF
20324cat confdefs.h >>conftest.$ac_ext
20325cat >>conftest.$ac_ext <<_ACEOF
20326/* end confdefs.h. */
503d2be0 20327
d6e01aa5
KL
20328/* Override any GCC internal prototype to avoid an error.
20329 Use char because int might match the return type of a GCC
20330 builtin and then its argument prototype would still apply. */
503d2be0
AS
20331#ifdef __cplusplus
20332extern "C"
20333#endif
503d2be0
AS
20334char mit_des_cbc_encrypt ();
20335int
20336main ()
20337{
d6e01aa5 20338return mit_des_cbc_encrypt ();
503d2be0
AS
20339 ;
20340 return 0;
20341}
20342_ACEOF
20343rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20344if { (ac_try="$ac_link"
20345case "(($ac_try" in
20346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20347 *) ac_try_echo=$ac_try;;
20348esac
20349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20350 (eval "$ac_link") 2>conftest.er1
503d2be0 20351 ac_status=$?
edfaf76d
LK
20352 grep -v '^ *+' conftest.er1 >conftest.err
20353 rm -f conftest.er1
20354 cat conftest.err >&5
c0d27fcc 20355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20356 (exit $ac_status); } && {
20357 test -z "$ac_c_werror_flag" ||
20358 test ! -s conftest.err
20359 } && test -s conftest$ac_exeext &&
20360 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20361 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
20362else
20363 echo "$as_me: failed program was:" >&5
19650fd6
AS
20364sed 's/^/| /' conftest.$ac_ext >&5
20365
d6e01aa5 20366 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 20367fi
d6e01aa5
KL
20368
20369rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20370 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20371LIBS=$ac_check_lib_save_LIBS
20372fi
d6e01aa5
KL
20373{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20374echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20375if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20376 cat >>confdefs.h <<_ACEOF
503d2be0 20377#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20378_ACEOF
a21616bd
KR
20379
20380 LIBS="-lk5crypto $LIBS"
20381
a21616bd
KR
20382fi
20383
c0d27fcc 20384
d6e01aa5
KL
20385{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20386echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
20387if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
20388 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20389else
503d2be0 20390 ac_check_lib_save_LIBS=$LIBS
a21616bd 20391LIBS="-lcrypto $LIBS"
503d2be0 20392cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20393/* confdefs.h. */
20394_ACEOF
20395cat confdefs.h >>conftest.$ac_ext
20396cat >>conftest.$ac_ext <<_ACEOF
20397/* end confdefs.h. */
503d2be0 20398
d6e01aa5
KL
20399/* Override any GCC internal prototype to avoid an error.
20400 Use char because int might match the return type of a GCC
20401 builtin and then its argument prototype would still apply. */
503d2be0
AS
20402#ifdef __cplusplus
20403extern "C"
20404#endif
503d2be0
AS
20405char mit_des_cbc_encrypt ();
20406int
20407main ()
20408{
d6e01aa5 20409return mit_des_cbc_encrypt ();
503d2be0
AS
20410 ;
20411 return 0;
20412}
20413_ACEOF
20414rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20415if { (ac_try="$ac_link"
20416case "(($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_link") 2>conftest.er1
503d2be0 20422 ac_status=$?
edfaf76d
LK
20423 grep -v '^ *+' conftest.er1 >conftest.err
20424 rm -f conftest.er1
20425 cat conftest.err >&5
c0d27fcc 20426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20427 (exit $ac_status); } && {
20428 test -z "$ac_c_werror_flag" ||
20429 test ! -s conftest.err
20430 } && test -s conftest$ac_exeext &&
20431 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20432 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20433else
20434 echo "$as_me: failed program was:" >&5
19650fd6
AS
20435sed 's/^/| /' conftest.$ac_ext >&5
20436
d6e01aa5 20437 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20438fi
d6e01aa5
KL
20439
20440rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20441 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20442LIBS=$ac_check_lib_save_LIBS
20443fi
d6e01aa5
KL
20444{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20445echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20446if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20447 cat >>confdefs.h <<_ACEOF
503d2be0 20448#define HAVE_LIBCRYPTO 1
c0d27fcc 20449_ACEOF
a21616bd
KR
20450
20451 LIBS="-lcrypto $LIBS"
20452
a21616bd
KR
20453fi
20454
c0d27fcc 20455
d6e01aa5
KL
20456{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20457echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
20458if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
20459 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20460else
503d2be0 20461 ac_check_lib_save_LIBS=$LIBS
a21616bd 20462LIBS="-lkrb5 $LIBS"
503d2be0 20463cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20464/* confdefs.h. */
20465_ACEOF
20466cat confdefs.h >>conftest.$ac_ext
20467cat >>conftest.$ac_ext <<_ACEOF
20468/* end confdefs.h. */
a21616bd 20469
d6e01aa5
KL
20470/* Override any GCC internal prototype to avoid an error.
20471 Use char because int might match the return type of a GCC
20472 builtin and then its argument prototype would still apply. */
503d2be0
AS
20473#ifdef __cplusplus
20474extern "C"
20475#endif
503d2be0
AS
20476char krb5_init_context ();
20477int
20478main ()
20479{
d6e01aa5 20480return krb5_init_context ();
503d2be0
AS
20481 ;
20482 return 0;
20483}
20484_ACEOF
20485rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20486if { (ac_try="$ac_link"
20487case "(($ac_try" in
20488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20489 *) ac_try_echo=$ac_try;;
20490esac
20491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20492 (eval "$ac_link") 2>conftest.er1
503d2be0 20493 ac_status=$?
edfaf76d
LK
20494 grep -v '^ *+' conftest.er1 >conftest.err
20495 rm -f conftest.er1
20496 cat conftest.err >&5
c0d27fcc 20497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20498 (exit $ac_status); } && {
20499 test -z "$ac_c_werror_flag" ||
20500 test ! -s conftest.err
20501 } && test -s conftest$ac_exeext &&
20502 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20503 ac_cv_lib_krb5_krb5_init_context=yes
20504else
20505 echo "$as_me: failed program was:" >&5
19650fd6
AS
20506sed 's/^/| /' conftest.$ac_ext >&5
20507
d6e01aa5 20508 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20509fi
d6e01aa5
KL
20510
20511rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20512 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20513LIBS=$ac_check_lib_save_LIBS
20514fi
d6e01aa5
KL
20515{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20516echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 20517if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20518 cat >>confdefs.h <<_ACEOF
503d2be0 20519#define HAVE_LIBKRB5 1
c0d27fcc 20520_ACEOF
a21616bd
KR
20521
20522 LIBS="-lkrb5 $LIBS"
20523
a21616bd
KR
20524fi
20525
20526 if test "${with_kerberos5+set}" != set; then
503d2be0 20527
d6e01aa5
KL
20528{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20529echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
20530if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
20531 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20532else
503d2be0 20533 ac_check_lib_save_LIBS=$LIBS
a21616bd 20534LIBS="-ldes425 $LIBS"
503d2be0 20535cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20536/* confdefs.h. */
20537_ACEOF
20538cat confdefs.h >>conftest.$ac_ext
20539cat >>conftest.$ac_ext <<_ACEOF
20540/* end confdefs.h. */
503d2be0 20541
d6e01aa5
KL
20542/* Override any GCC internal prototype to avoid an error.
20543 Use char because int might match the return type of a GCC
20544 builtin and then its argument prototype would still apply. */
503d2be0
AS
20545#ifdef __cplusplus
20546extern "C"
20547#endif
503d2be0
AS
20548char des_cbc_encrypt ();
20549int
20550main ()
20551{
d6e01aa5 20552return des_cbc_encrypt ();
503d2be0
AS
20553 ;
20554 return 0;
20555}
20556_ACEOF
20557rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20558if { (ac_try="$ac_link"
20559case "(($ac_try" in
20560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20561 *) ac_try_echo=$ac_try;;
20562esac
20563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20564 (eval "$ac_link") 2>conftest.er1
503d2be0 20565 ac_status=$?
edfaf76d
LK
20566 grep -v '^ *+' conftest.er1 >conftest.err
20567 rm -f conftest.er1
20568 cat conftest.err >&5
c0d27fcc 20569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20570 (exit $ac_status); } && {
20571 test -z "$ac_c_werror_flag" ||
20572 test ! -s conftest.err
20573 } && test -s conftest$ac_exeext &&
20574 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20575 ac_cv_lib_des425_des_cbc_encrypt=yes
20576else
20577 echo "$as_me: failed program was:" >&5
19650fd6
AS
20578sed 's/^/| /' conftest.$ac_ext >&5
20579
d6e01aa5 20580 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 20581fi
d6e01aa5
KL
20582
20583rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20584 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20585LIBS=$ac_check_lib_save_LIBS
20586fi
d6e01aa5
KL
20587{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
20588echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 20589if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 20590 cat >>confdefs.h <<_ACEOF
503d2be0 20591#define HAVE_LIBDES425 1
c0d27fcc 20592_ACEOF
a21616bd
KR
20593
20594 LIBS="-ldes425 $LIBS"
20595
20596else
503d2be0 20597
d6e01aa5
KL
20598{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
20599echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
20600if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
20601 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20602else
503d2be0 20603 ac_check_lib_save_LIBS=$LIBS
a21616bd 20604LIBS="-ldes $LIBS"
503d2be0 20605cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20606/* confdefs.h. */
20607_ACEOF
20608cat confdefs.h >>conftest.$ac_ext
20609cat >>conftest.$ac_ext <<_ACEOF
20610/* end confdefs.h. */
503d2be0 20611
d6e01aa5
KL
20612/* Override any GCC internal prototype to avoid an error.
20613 Use char because int might match the return type of a GCC
20614 builtin and then its argument prototype would still apply. */
503d2be0
AS
20615#ifdef __cplusplus
20616extern "C"
20617#endif
503d2be0
AS
20618char des_cbc_encrypt ();
20619int
20620main ()
20621{
d6e01aa5 20622return des_cbc_encrypt ();
503d2be0
AS
20623 ;
20624 return 0;
20625}
20626_ACEOF
20627rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20628if { (ac_try="$ac_link"
20629case "(($ac_try" in
20630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20631 *) ac_try_echo=$ac_try;;
20632esac
20633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20634 (eval "$ac_link") 2>conftest.er1
503d2be0 20635 ac_status=$?
edfaf76d
LK
20636 grep -v '^ *+' conftest.er1 >conftest.err
20637 rm -f conftest.er1
20638 cat conftest.err >&5
c0d27fcc 20639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20640 (exit $ac_status); } && {
20641 test -z "$ac_c_werror_flag" ||
20642 test ! -s conftest.err
20643 } && test -s conftest$ac_exeext &&
20644 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20645 ac_cv_lib_des_des_cbc_encrypt=yes
20646else
20647 echo "$as_me: failed program was:" >&5
19650fd6
AS
20648sed 's/^/| /' conftest.$ac_ext >&5
20649
d6e01aa5 20650 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 20651fi
d6e01aa5
KL
20652
20653rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20654 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20655LIBS=$ac_check_lib_save_LIBS
20656fi
d6e01aa5
KL
20657{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
20658echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 20659if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 20660 cat >>confdefs.h <<_ACEOF
503d2be0 20661#define HAVE_LIBDES 1
c0d27fcc 20662_ACEOF
a21616bd
KR
20663
20664 LIBS="-ldes $LIBS"
20665
a21616bd
KR
20666fi
20667
20668fi
20669
c0d27fcc 20670
d6e01aa5
KL
20671{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
20672echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
20673if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
20674 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20675else
503d2be0 20676 ac_check_lib_save_LIBS=$LIBS
a21616bd 20677LIBS="-lkrb4 $LIBS"
503d2be0 20678cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20679/* confdefs.h. */
20680_ACEOF
20681cat confdefs.h >>conftest.$ac_ext
20682cat >>conftest.$ac_ext <<_ACEOF
20683/* end confdefs.h. */
503d2be0 20684
d6e01aa5
KL
20685/* Override any GCC internal prototype to avoid an error.
20686 Use char because int might match the return type of a GCC
20687 builtin and then its argument prototype would still apply. */
503d2be0
AS
20688#ifdef __cplusplus
20689extern "C"
20690#endif
503d2be0
AS
20691char krb_get_cred ();
20692int
20693main ()
20694{
d6e01aa5 20695return krb_get_cred ();
503d2be0
AS
20696 ;
20697 return 0;
20698}
20699_ACEOF
20700rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20701if { (ac_try="$ac_link"
20702case "(($ac_try" in
20703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20704 *) ac_try_echo=$ac_try;;
20705esac
20706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20707 (eval "$ac_link") 2>conftest.er1
503d2be0 20708 ac_status=$?
edfaf76d
LK
20709 grep -v '^ *+' conftest.er1 >conftest.err
20710 rm -f conftest.er1
20711 cat conftest.err >&5
c0d27fcc 20712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20713 (exit $ac_status); } && {
20714 test -z "$ac_c_werror_flag" ||
20715 test ! -s conftest.err
20716 } && test -s conftest$ac_exeext &&
20717 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20718 ac_cv_lib_krb4_krb_get_cred=yes
20719else
20720 echo "$as_me: failed program was:" >&5
19650fd6
AS
20721sed 's/^/| /' conftest.$ac_ext >&5
20722
d6e01aa5 20723 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 20724fi
d6e01aa5
KL
20725
20726rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20727 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20728LIBS=$ac_check_lib_save_LIBS
20729fi
d6e01aa5
KL
20730{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
20731echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 20732if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 20733 cat >>confdefs.h <<_ACEOF
503d2be0 20734#define HAVE_LIBKRB4 1
c0d27fcc 20735_ACEOF
a21616bd
KR
20736
20737 LIBS="-lkrb4 $LIBS"
20738
20739else
503d2be0 20740
d6e01aa5
KL
20741{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
20742echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
20743if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
20744 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20745else
503d2be0 20746 ac_check_lib_save_LIBS=$LIBS
a21616bd 20747LIBS="-lkrb $LIBS"
503d2be0 20748cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20749/* confdefs.h. */
20750_ACEOF
20751cat confdefs.h >>conftest.$ac_ext
20752cat >>conftest.$ac_ext <<_ACEOF
20753/* end confdefs.h. */
503d2be0 20754
d6e01aa5
KL
20755/* Override any GCC internal prototype to avoid an error.
20756 Use char because int might match the return type of a GCC
20757 builtin and then its argument prototype would still apply. */
503d2be0
AS
20758#ifdef __cplusplus
20759extern "C"
20760#endif
503d2be0
AS
20761char krb_get_cred ();
20762int
20763main ()
20764{
d6e01aa5 20765return krb_get_cred ();
503d2be0
AS
20766 ;
20767 return 0;
20768}
20769_ACEOF
20770rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20771if { (ac_try="$ac_link"
20772case "(($ac_try" in
20773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20774 *) ac_try_echo=$ac_try;;
20775esac
20776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20777 (eval "$ac_link") 2>conftest.er1
503d2be0 20778 ac_status=$?
edfaf76d
LK
20779 grep -v '^ *+' conftest.er1 >conftest.err
20780 rm -f conftest.er1
20781 cat conftest.err >&5
c0d27fcc 20782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20783 (exit $ac_status); } && {
20784 test -z "$ac_c_werror_flag" ||
20785 test ! -s conftest.err
20786 } && test -s conftest$ac_exeext &&
20787 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20788 ac_cv_lib_krb_krb_get_cred=yes
20789else
20790 echo "$as_me: failed program was:" >&5
19650fd6
AS
20791sed 's/^/| /' conftest.$ac_ext >&5
20792
d6e01aa5 20793 ac_cv_lib_krb_krb_get_cred=no
503d2be0 20794fi
d6e01aa5
KL
20795
20796rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20797 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20798LIBS=$ac_check_lib_save_LIBS
20799fi
d6e01aa5
KL
20800{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
20801echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 20802if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 20803 cat >>confdefs.h <<_ACEOF
503d2be0 20804#define HAVE_LIBKRB 1
c0d27fcc 20805_ACEOF
a21616bd
KR
20806
20807 LIBS="-lkrb $LIBS"
20808
a21616bd
KR
20809fi
20810
20811fi
20812
20813 fi
20814
20815 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
20816
20817for ac_header in krb5.h
a21616bd 20818do
503d2be0 20819as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
20820if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20821 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20822echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20823if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20824 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20825fi
d6e01aa5
KL
20826ac_res=`eval echo '${'$as_ac_Header'}'`
20827 { echo "$as_me:$LINENO: result: $ac_res" >&5
20828echo "${ECHO_T}$ac_res" >&6; }
98418dba 20829else
c0d27fcc 20830 # Is the header compilable?
d6e01aa5
KL
20831{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20832echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20833cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20834/* confdefs.h. */
20835_ACEOF
20836cat confdefs.h >>conftest.$ac_ext
20837cat >>conftest.$ac_ext <<_ACEOF
20838/* end confdefs.h. */
c0d27fcc
MR
20839$ac_includes_default
20840#include <$ac_header>
20841_ACEOF
20842rm -f conftest.$ac_objext
d6e01aa5
KL
20843if { (ac_try="$ac_compile"
20844case "(($ac_try" in
20845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20846 *) ac_try_echo=$ac_try;;
20847esac
20848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20849 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20850 ac_status=$?
edfaf76d
LK
20851 grep -v '^ *+' conftest.er1 >conftest.err
20852 rm -f conftest.er1
20853 cat conftest.err >&5
c0d27fcc 20854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20855 (exit $ac_status); } && {
20856 test -z "$ac_c_werror_flag" ||
20857 test ! -s conftest.err
20858 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20859 ac_header_compiler=yes
20860else
20861 echo "$as_me: failed program was:" >&5
19650fd6
AS
20862sed 's/^/| /' conftest.$ac_ext >&5
20863
d6e01aa5 20864 ac_header_compiler=no
c0d27fcc 20865fi
d6e01aa5
KL
20866
20867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20868{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20869echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20870
20871# Is the header present?
d6e01aa5
KL
20872{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20873echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20874cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20875/* confdefs.h. */
20876_ACEOF
20877cat confdefs.h >>conftest.$ac_ext
20878cat >>conftest.$ac_ext <<_ACEOF
20879/* end confdefs.h. */
503d2be0
AS
20880#include <$ac_header>
20881_ACEOF
d6e01aa5
KL
20882if { (ac_try="$ac_cpp conftest.$ac_ext"
20883case "(($ac_try" in
20884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20885 *) ac_try_echo=$ac_try;;
20886esac
20887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20888 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20889 ac_status=$?
6bae0ccf 20890 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20891 rm -f conftest.er1
20892 cat conftest.err >&5
c0d27fcc 20893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20894 (exit $ac_status); } >/dev/null && {
20895 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20896 test ! -s conftest.err
20897 }; then
c0d27fcc 20898 ac_header_preproc=yes
503d2be0
AS
20899else
20900 echo "$as_me: failed program was:" >&5
19650fd6
AS
20901sed 's/^/| /' conftest.$ac_ext >&5
20902
c0d27fcc 20903 ac_header_preproc=no
a21616bd 20904fi
d6e01aa5 20905
503d2be0 20906rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
20907{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20908echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20909
20910# So? What about this header?
edfaf76d
LK
20911case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20912 yes:no: )
c0d27fcc
MR
20913 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20914echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20915 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20916echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20917 ac_header_preproc=yes
19650fd6 20918 ;;
edfaf76d 20919 no:yes:* )
c0d27fcc
MR
20920 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20921echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20922 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20923echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20924 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20925echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20926 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20927echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20928 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20929echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20930 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20931echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 20932
19650fd6 20933 ;;
c0d27fcc 20934esac
d6e01aa5
KL
20935{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20936echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20937if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20938 echo $ECHO_N "(cached) $ECHO_C" >&6
20939else
edfaf76d 20940 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20941fi
d6e01aa5
KL
20942ac_res=`eval echo '${'$as_ac_Header'}'`
20943 { echo "$as_me:$LINENO: result: $ac_res" >&5
20944echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20945
20946fi
503d2be0 20947if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20948 cat >>confdefs.h <<_ACEOF
503d2be0 20949#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20950_ACEOF
503d2be0 20951
a21616bd 20952fi
c0d27fcc 20953
a21616bd
KR
20954done
20955
20956 else
503d2be0
AS
20957
20958for ac_header in des.h
a21616bd 20959do
503d2be0 20960as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
20961if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20962 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20963echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20964if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20965 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20966fi
d6e01aa5
KL
20967ac_res=`eval echo '${'$as_ac_Header'}'`
20968 { echo "$as_me:$LINENO: result: $ac_res" >&5
20969echo "${ECHO_T}$ac_res" >&6; }
98418dba 20970else
c0d27fcc 20971 # Is the header compilable?
d6e01aa5
KL
20972{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20973echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20974cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20975/* confdefs.h. */
20976_ACEOF
20977cat confdefs.h >>conftest.$ac_ext
20978cat >>conftest.$ac_ext <<_ACEOF
20979/* end confdefs.h. */
c0d27fcc
MR
20980$ac_includes_default
20981#include <$ac_header>
20982_ACEOF
20983rm -f conftest.$ac_objext
d6e01aa5
KL
20984if { (ac_try="$ac_compile"
20985case "(($ac_try" in
20986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20987 *) ac_try_echo=$ac_try;;
20988esac
20989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20990 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20991 ac_status=$?
edfaf76d
LK
20992 grep -v '^ *+' conftest.er1 >conftest.err
20993 rm -f conftest.er1
20994 cat conftest.err >&5
c0d27fcc 20995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20996 (exit $ac_status); } && {
20997 test -z "$ac_c_werror_flag" ||
20998 test ! -s conftest.err
20999 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21000 ac_header_compiler=yes
21001else
21002 echo "$as_me: failed program was:" >&5
19650fd6
AS
21003sed 's/^/| /' conftest.$ac_ext >&5
21004
d6e01aa5 21005 ac_header_compiler=no
c0d27fcc 21006fi
d6e01aa5
KL
21007
21008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21009{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21010echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21011
21012# Is the header present?
d6e01aa5
KL
21013{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21014echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21015cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21016/* confdefs.h. */
21017_ACEOF
21018cat confdefs.h >>conftest.$ac_ext
21019cat >>conftest.$ac_ext <<_ACEOF
21020/* end confdefs.h. */
503d2be0
AS
21021#include <$ac_header>
21022_ACEOF
d6e01aa5
KL
21023if { (ac_try="$ac_cpp conftest.$ac_ext"
21024case "(($ac_try" in
21025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21026 *) ac_try_echo=$ac_try;;
21027esac
21028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21029 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21030 ac_status=$?
6bae0ccf 21031 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21032 rm -f conftest.er1
21033 cat conftest.err >&5
c0d27fcc 21034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21035 (exit $ac_status); } >/dev/null && {
21036 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21037 test ! -s conftest.err
21038 }; then
c0d27fcc 21039 ac_header_preproc=yes
503d2be0
AS
21040else
21041 echo "$as_me: failed program was:" >&5
19650fd6
AS
21042sed 's/^/| /' conftest.$ac_ext >&5
21043
c0d27fcc 21044 ac_header_preproc=no
a21616bd 21045fi
d6e01aa5 21046
503d2be0 21047rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21048{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21049echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21050
21051# So? What about this header?
edfaf76d
LK
21052case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21053 yes:no: )
c0d27fcc
MR
21054 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21055echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21056 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21057echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21058 ac_header_preproc=yes
19650fd6 21059 ;;
edfaf76d 21060 no:yes:* )
c0d27fcc
MR
21061 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21062echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21063 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21064echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21065 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21066echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21067 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21068echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21069 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21070echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21071 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21072echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21073
19650fd6 21074 ;;
c0d27fcc 21075esac
d6e01aa5
KL
21076{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21077echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21078if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21079 echo $ECHO_N "(cached) $ECHO_C" >&6
21080else
edfaf76d 21081 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21082fi
d6e01aa5
KL
21083ac_res=`eval echo '${'$as_ac_Header'}'`
21084 { echo "$as_me:$LINENO: result: $ac_res" >&5
21085echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21086
21087fi
503d2be0 21088if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21089 cat >>confdefs.h <<_ACEOF
503d2be0 21090#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21091_ACEOF
503d2be0 21092
a21616bd 21093else
503d2be0
AS
21094
21095for ac_header in kerberosIV/des.h
a21616bd 21096do
503d2be0 21097as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21098if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21099 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21100echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21101if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21102 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21103fi
d6e01aa5
KL
21104ac_res=`eval echo '${'$as_ac_Header'}'`
21105 { echo "$as_me:$LINENO: result: $ac_res" >&5
21106echo "${ECHO_T}$ac_res" >&6; }
98418dba 21107else
c0d27fcc 21108 # Is the header compilable?
d6e01aa5
KL
21109{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21110echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21111cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21112/* confdefs.h. */
21113_ACEOF
21114cat confdefs.h >>conftest.$ac_ext
21115cat >>conftest.$ac_ext <<_ACEOF
21116/* end confdefs.h. */
c0d27fcc
MR
21117$ac_includes_default
21118#include <$ac_header>
21119_ACEOF
21120rm -f conftest.$ac_objext
d6e01aa5
KL
21121if { (ac_try="$ac_compile"
21122case "(($ac_try" in
21123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21124 *) ac_try_echo=$ac_try;;
21125esac
21126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21127 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21128 ac_status=$?
edfaf76d
LK
21129 grep -v '^ *+' conftest.er1 >conftest.err
21130 rm -f conftest.er1
21131 cat conftest.err >&5
c0d27fcc 21132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21133 (exit $ac_status); } && {
21134 test -z "$ac_c_werror_flag" ||
21135 test ! -s conftest.err
21136 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21137 ac_header_compiler=yes
21138else
21139 echo "$as_me: failed program was:" >&5
19650fd6
AS
21140sed 's/^/| /' conftest.$ac_ext >&5
21141
d6e01aa5 21142 ac_header_compiler=no
c0d27fcc 21143fi
d6e01aa5
KL
21144
21145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21146{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21147echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21148
21149# Is the header present?
d6e01aa5
KL
21150{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21151echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21152cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21153/* confdefs.h. */
21154_ACEOF
21155cat confdefs.h >>conftest.$ac_ext
21156cat >>conftest.$ac_ext <<_ACEOF
21157/* end confdefs.h. */
503d2be0
AS
21158#include <$ac_header>
21159_ACEOF
d6e01aa5
KL
21160if { (ac_try="$ac_cpp conftest.$ac_ext"
21161case "(($ac_try" in
21162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21163 *) ac_try_echo=$ac_try;;
21164esac
21165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21166 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21167 ac_status=$?
6bae0ccf 21168 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21169 rm -f conftest.er1
21170 cat conftest.err >&5
c0d27fcc 21171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21172 (exit $ac_status); } >/dev/null && {
21173 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21174 test ! -s conftest.err
21175 }; then
c0d27fcc 21176 ac_header_preproc=yes
503d2be0
AS
21177else
21178 echo "$as_me: failed program was:" >&5
19650fd6
AS
21179sed 's/^/| /' conftest.$ac_ext >&5
21180
c0d27fcc 21181 ac_header_preproc=no
a21616bd 21182fi
d6e01aa5 21183
503d2be0 21184rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21185{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21186echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21187
21188# So? What about this header?
edfaf76d
LK
21189case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21190 yes:no: )
c0d27fcc
MR
21191 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21192echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21193 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21194echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21195 ac_header_preproc=yes
19650fd6 21196 ;;
edfaf76d 21197 no:yes:* )
c0d27fcc
MR
21198 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21199echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21200 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21201echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21202 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21203echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21204 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21205echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21206 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21207echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21208 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21209echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21210
19650fd6 21211 ;;
c0d27fcc 21212esac
d6e01aa5
KL
21213{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21214echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21215if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21216 echo $ECHO_N "(cached) $ECHO_C" >&6
21217else
edfaf76d 21218 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21219fi
d6e01aa5
KL
21220ac_res=`eval echo '${'$as_ac_Header'}'`
21221 { echo "$as_me:$LINENO: result: $ac_res" >&5
21222echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21223
21224fi
503d2be0 21225if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21226 cat >>confdefs.h <<_ACEOF
503d2be0 21227#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21228_ACEOF
503d2be0 21229
a21616bd 21230else
503d2be0
AS
21231
21232for ac_header in kerberos/des.h
a21616bd 21233do
503d2be0 21234as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21235if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21236 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21237echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21238if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21239 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21240fi
d6e01aa5
KL
21241ac_res=`eval echo '${'$as_ac_Header'}'`
21242 { echo "$as_me:$LINENO: result: $ac_res" >&5
21243echo "${ECHO_T}$ac_res" >&6; }
98418dba 21244else
c0d27fcc 21245 # Is the header compilable?
d6e01aa5
KL
21246{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21247echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21248cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21249/* confdefs.h. */
21250_ACEOF
21251cat confdefs.h >>conftest.$ac_ext
21252cat >>conftest.$ac_ext <<_ACEOF
21253/* end confdefs.h. */
c0d27fcc
MR
21254$ac_includes_default
21255#include <$ac_header>
21256_ACEOF
21257rm -f conftest.$ac_objext
d6e01aa5
KL
21258if { (ac_try="$ac_compile"
21259case "(($ac_try" in
21260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21261 *) ac_try_echo=$ac_try;;
21262esac
21263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21264 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21265 ac_status=$?
edfaf76d
LK
21266 grep -v '^ *+' conftest.er1 >conftest.err
21267 rm -f conftest.er1
21268 cat conftest.err >&5
c0d27fcc 21269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21270 (exit $ac_status); } && {
21271 test -z "$ac_c_werror_flag" ||
21272 test ! -s conftest.err
21273 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21274 ac_header_compiler=yes
21275else
21276 echo "$as_me: failed program was:" >&5
19650fd6
AS
21277sed 's/^/| /' conftest.$ac_ext >&5
21278
d6e01aa5 21279 ac_header_compiler=no
c0d27fcc 21280fi
d6e01aa5
KL
21281
21282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21283{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21284echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21285
21286# Is the header present?
d6e01aa5
KL
21287{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21288echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21289cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21290/* confdefs.h. */
21291_ACEOF
21292cat confdefs.h >>conftest.$ac_ext
21293cat >>conftest.$ac_ext <<_ACEOF
21294/* end confdefs.h. */
503d2be0
AS
21295#include <$ac_header>
21296_ACEOF
d6e01aa5
KL
21297if { (ac_try="$ac_cpp conftest.$ac_ext"
21298case "(($ac_try" in
21299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21300 *) ac_try_echo=$ac_try;;
21301esac
21302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21303 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21304 ac_status=$?
6bae0ccf 21305 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21306 rm -f conftest.er1
21307 cat conftest.err >&5
c0d27fcc 21308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21309 (exit $ac_status); } >/dev/null && {
21310 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21311 test ! -s conftest.err
21312 }; then
c0d27fcc 21313 ac_header_preproc=yes
503d2be0
AS
21314else
21315 echo "$as_me: failed program was:" >&5
19650fd6
AS
21316sed 's/^/| /' conftest.$ac_ext >&5
21317
c0d27fcc 21318 ac_header_preproc=no
a21616bd 21319fi
d6e01aa5 21320
503d2be0 21321rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21322{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21323echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21324
21325# So? What about this header?
edfaf76d
LK
21326case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21327 yes:no: )
c0d27fcc
MR
21328 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21329echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21330 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21331echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21332 ac_header_preproc=yes
19650fd6 21333 ;;
edfaf76d 21334 no:yes:* )
c0d27fcc
MR
21335 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21336echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21337 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21338echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21339 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21340echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21341 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21342echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21343 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21344echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21345 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21346echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21347
19650fd6 21348 ;;
c0d27fcc 21349esac
d6e01aa5
KL
21350{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21351echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21352if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21353 echo $ECHO_N "(cached) $ECHO_C" >&6
21354else
edfaf76d 21355 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21356fi
d6e01aa5
KL
21357ac_res=`eval echo '${'$as_ac_Header'}'`
21358 { echo "$as_me:$LINENO: result: $ac_res" >&5
21359echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21360
21361fi
503d2be0 21362if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21363 cat >>confdefs.h <<_ACEOF
503d2be0 21364#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21365_ACEOF
a21616bd
KR
21366
21367fi
c0d27fcc 21368
a21616bd
KR
21369done
21370
98418dba 21371fi
c0d27fcc 21372
925c2f3f
EZ
21373done
21374
98418dba 21375fi
c0d27fcc 21376
925c2f3f 21377done
98418dba 21378
c0d27fcc 21379
925c2f3f
EZ
21380for ac_header in krb.h
21381do
21382as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21383if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21384 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21385echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21386if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 21387 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21388fi
d6e01aa5
KL
21389ac_res=`eval echo '${'$as_ac_Header'}'`
21390 { echo "$as_me:$LINENO: result: $ac_res" >&5
21391echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21392else
21393 # Is the header compilable?
d6e01aa5
KL
21394{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21395echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21396cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21397/* confdefs.h. */
21398_ACEOF
21399cat confdefs.h >>conftest.$ac_ext
21400cat >>conftest.$ac_ext <<_ACEOF
21401/* end confdefs.h. */
c0d27fcc
MR
21402$ac_includes_default
21403#include <$ac_header>
21404_ACEOF
21405rm -f conftest.$ac_objext
d6e01aa5
KL
21406if { (ac_try="$ac_compile"
21407case "(($ac_try" in
21408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21409 *) ac_try_echo=$ac_try;;
21410esac
21411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21412 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21413 ac_status=$?
edfaf76d
LK
21414 grep -v '^ *+' conftest.er1 >conftest.err
21415 rm -f conftest.er1
21416 cat conftest.err >&5
c0d27fcc 21417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21418 (exit $ac_status); } && {
21419 test -z "$ac_c_werror_flag" ||
21420 test ! -s conftest.err
21421 } && test -s conftest.$ac_objext; then
c0d27fcc 21422 ac_header_compiler=yes
925c2f3f 21423else
c0d27fcc 21424 echo "$as_me: failed program was:" >&5
19650fd6
AS
21425sed 's/^/| /' conftest.$ac_ext >&5
21426
d6e01aa5 21427 ac_header_compiler=no
c0d27fcc 21428fi
d6e01aa5
KL
21429
21430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21431{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21432echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21433
21434# Is the header present?
d6e01aa5
KL
21435{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21436echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21437cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21438/* confdefs.h. */
21439_ACEOF
21440cat confdefs.h >>conftest.$ac_ext
21441cat >>conftest.$ac_ext <<_ACEOF
21442/* end confdefs.h. */
503d2be0
AS
21443#include <$ac_header>
21444_ACEOF
d6e01aa5
KL
21445if { (ac_try="$ac_cpp conftest.$ac_ext"
21446case "(($ac_try" in
21447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21448 *) ac_try_echo=$ac_try;;
21449esac
21450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21451 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21452 ac_status=$?
6bae0ccf 21453 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21454 rm -f conftest.er1
21455 cat conftest.err >&5
c0d27fcc 21456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21457 (exit $ac_status); } >/dev/null && {
21458 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21459 test ! -s conftest.err
21460 }; then
c0d27fcc 21461 ac_header_preproc=yes
503d2be0
AS
21462else
21463 echo "$as_me: failed program was:" >&5
19650fd6
AS
21464sed 's/^/| /' conftest.$ac_ext >&5
21465
c0d27fcc 21466 ac_header_preproc=no
a21616bd 21467fi
d6e01aa5 21468
503d2be0 21469rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21470{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21471echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21472
21473# So? What about this header?
edfaf76d
LK
21474case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21475 yes:no: )
c0d27fcc
MR
21476 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21477echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21478 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21479echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21480 ac_header_preproc=yes
19650fd6 21481 ;;
edfaf76d 21482 no:yes:* )
c0d27fcc
MR
21483 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21484echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21485 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21486echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21487 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21488echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21489 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21490echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21491 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21492echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21493 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21494echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21495
19650fd6 21496 ;;
c0d27fcc 21497esac
d6e01aa5
KL
21498{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21499echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21500if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21501 echo $ECHO_N "(cached) $ECHO_C" >&6
21502else
edfaf76d 21503 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21504fi
d6e01aa5
KL
21505ac_res=`eval echo '${'$as_ac_Header'}'`
21506 { echo "$as_me:$LINENO: result: $ac_res" >&5
21507echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21508
21509fi
503d2be0 21510if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21511 cat >>confdefs.h <<_ACEOF
503d2be0 21512#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21513_ACEOF
503d2be0 21514
a21616bd 21515else
503d2be0
AS
21516
21517for ac_header in kerberosIV/krb.h
a21616bd 21518do
503d2be0 21519as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21520if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21521 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21522echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21523if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21524 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21525fi
d6e01aa5
KL
21526ac_res=`eval echo '${'$as_ac_Header'}'`
21527 { echo "$as_me:$LINENO: result: $ac_res" >&5
21528echo "${ECHO_T}$ac_res" >&6; }
98418dba 21529else
c0d27fcc 21530 # Is the header compilable?
d6e01aa5
KL
21531{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21532echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21533cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21534/* confdefs.h. */
21535_ACEOF
21536cat confdefs.h >>conftest.$ac_ext
21537cat >>conftest.$ac_ext <<_ACEOF
21538/* end confdefs.h. */
c0d27fcc
MR
21539$ac_includes_default
21540#include <$ac_header>
21541_ACEOF
21542rm -f conftest.$ac_objext
d6e01aa5
KL
21543if { (ac_try="$ac_compile"
21544case "(($ac_try" in
21545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21546 *) ac_try_echo=$ac_try;;
21547esac
21548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21549 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21550 ac_status=$?
edfaf76d
LK
21551 grep -v '^ *+' conftest.er1 >conftest.err
21552 rm -f conftest.er1
21553 cat conftest.err >&5
c0d27fcc 21554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21555 (exit $ac_status); } && {
21556 test -z "$ac_c_werror_flag" ||
21557 test ! -s conftest.err
21558 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21559 ac_header_compiler=yes
21560else
21561 echo "$as_me: failed program was:" >&5
19650fd6
AS
21562sed 's/^/| /' conftest.$ac_ext >&5
21563
d6e01aa5 21564 ac_header_compiler=no
c0d27fcc 21565fi
d6e01aa5
KL
21566
21567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21568{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21569echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21570
21571# Is the header present?
d6e01aa5
KL
21572{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21573echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21574cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21575/* confdefs.h. */
21576_ACEOF
21577cat confdefs.h >>conftest.$ac_ext
21578cat >>conftest.$ac_ext <<_ACEOF
21579/* end confdefs.h. */
503d2be0
AS
21580#include <$ac_header>
21581_ACEOF
d6e01aa5
KL
21582if { (ac_try="$ac_cpp conftest.$ac_ext"
21583case "(($ac_try" in
21584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21585 *) ac_try_echo=$ac_try;;
21586esac
21587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21588 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21589 ac_status=$?
6bae0ccf 21590 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21591 rm -f conftest.er1
21592 cat conftest.err >&5
c0d27fcc 21593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21594 (exit $ac_status); } >/dev/null && {
21595 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21596 test ! -s conftest.err
21597 }; then
c0d27fcc 21598 ac_header_preproc=yes
503d2be0
AS
21599else
21600 echo "$as_me: failed program was:" >&5
19650fd6
AS
21601sed 's/^/| /' conftest.$ac_ext >&5
21602
c0d27fcc 21603 ac_header_preproc=no
a21616bd 21604fi
d6e01aa5 21605
503d2be0 21606rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21607{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21608echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21609
21610# So? What about this header?
edfaf76d
LK
21611case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21612 yes:no: )
c0d27fcc
MR
21613 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21614echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21615 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21616echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21617 ac_header_preproc=yes
19650fd6 21618 ;;
edfaf76d 21619 no:yes:* )
c0d27fcc
MR
21620 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21621echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21622 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21623echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21624 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21625echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21626 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21627echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21628 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21629echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21630 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21631echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21632
19650fd6 21633 ;;
c0d27fcc 21634esac
d6e01aa5
KL
21635{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21636echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21637if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21638 echo $ECHO_N "(cached) $ECHO_C" >&6
21639else
edfaf76d 21640 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21641fi
d6e01aa5
KL
21642ac_res=`eval echo '${'$as_ac_Header'}'`
21643 { echo "$as_me:$LINENO: result: $ac_res" >&5
21644echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21645
21646fi
503d2be0 21647if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21648 cat >>confdefs.h <<_ACEOF
503d2be0 21649#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21650_ACEOF
503d2be0 21651
a21616bd 21652else
503d2be0
AS
21653
21654for ac_header in kerberos/krb.h
a21616bd 21655do
503d2be0 21656as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21657if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21658 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21659echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21660if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21661 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21662fi
d6e01aa5
KL
21663ac_res=`eval echo '${'$as_ac_Header'}'`
21664 { echo "$as_me:$LINENO: result: $ac_res" >&5
21665echo "${ECHO_T}$ac_res" >&6; }
98418dba 21666else
c0d27fcc 21667 # Is the header compilable?
d6e01aa5
KL
21668{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21669echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21670cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21671/* confdefs.h. */
21672_ACEOF
21673cat confdefs.h >>conftest.$ac_ext
21674cat >>conftest.$ac_ext <<_ACEOF
21675/* end confdefs.h. */
c0d27fcc
MR
21676$ac_includes_default
21677#include <$ac_header>
21678_ACEOF
21679rm -f conftest.$ac_objext
d6e01aa5
KL
21680if { (ac_try="$ac_compile"
21681case "(($ac_try" in
21682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21683 *) ac_try_echo=$ac_try;;
21684esac
21685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21686 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21687 ac_status=$?
edfaf76d
LK
21688 grep -v '^ *+' conftest.er1 >conftest.err
21689 rm -f conftest.er1
21690 cat conftest.err >&5
c0d27fcc 21691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21692 (exit $ac_status); } && {
21693 test -z "$ac_c_werror_flag" ||
21694 test ! -s conftest.err
21695 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21696 ac_header_compiler=yes
21697else
21698 echo "$as_me: failed program was:" >&5
19650fd6
AS
21699sed 's/^/| /' conftest.$ac_ext >&5
21700
d6e01aa5 21701 ac_header_compiler=no
c0d27fcc 21702fi
d6e01aa5
KL
21703
21704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21705{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21706echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21707
21708# Is the header present?
d6e01aa5
KL
21709{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21710echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21711cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21712/* confdefs.h. */
21713_ACEOF
21714cat confdefs.h >>conftest.$ac_ext
21715cat >>conftest.$ac_ext <<_ACEOF
21716/* end confdefs.h. */
503d2be0
AS
21717#include <$ac_header>
21718_ACEOF
d6e01aa5
KL
21719if { (ac_try="$ac_cpp conftest.$ac_ext"
21720case "(($ac_try" in
21721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21722 *) ac_try_echo=$ac_try;;
21723esac
21724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21725 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21726 ac_status=$?
6bae0ccf 21727 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21728 rm -f conftest.er1
21729 cat conftest.err >&5
c0d27fcc 21730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21731 (exit $ac_status); } >/dev/null && {
21732 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21733 test ! -s conftest.err
21734 }; then
c0d27fcc 21735 ac_header_preproc=yes
503d2be0
AS
21736else
21737 echo "$as_me: failed program was:" >&5
19650fd6
AS
21738sed 's/^/| /' conftest.$ac_ext >&5
21739
c0d27fcc 21740 ac_header_preproc=no
a21616bd 21741fi
d6e01aa5 21742
503d2be0 21743rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21744{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21745echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
21746
21747# So? What about this header?
edfaf76d
LK
21748case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21749 yes:no: )
35996d22
AS
21750 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21751echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21752 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21753echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21754 ac_header_preproc=yes
19650fd6 21755 ;;
edfaf76d 21756 no:yes:* )
c0d27fcc
MR
21757 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21758echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21759 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21760echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21761 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21762echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21763 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21764echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21765 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21766echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21767 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21768echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21769
19650fd6 21770 ;;
c0d27fcc 21771esac
d6e01aa5
KL
21772{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21773echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21774if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21775 echo $ECHO_N "(cached) $ECHO_C" >&6
21776else
edfaf76d 21777 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21778fi
d6e01aa5
KL
21779ac_res=`eval echo '${'$as_ac_Header'}'`
21780 { echo "$as_me:$LINENO: result: $ac_res" >&5
21781echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21782
21783fi
503d2be0 21784if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21785 cat >>confdefs.h <<_ACEOF
503d2be0 21786#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21787_ACEOF
503d2be0 21788
a21616bd 21789fi
c0d27fcc 21790
a21616bd
KR
21791done
21792
21793fi
c0d27fcc 21794
a21616bd
KR
21795done
21796
21797fi
c0d27fcc 21798
a21616bd
KR
21799done
21800
21801 fi
503d2be0
AS
21802
21803for ac_header in com_err.h
a21616bd 21804do
503d2be0 21805as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21806if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21807 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21808echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21809if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21810 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21811fi
d6e01aa5
KL
21812ac_res=`eval echo '${'$as_ac_Header'}'`
21813 { echo "$as_me:$LINENO: result: $ac_res" >&5
21814echo "${ECHO_T}$ac_res" >&6; }
98418dba 21815else
c0d27fcc 21816 # Is the header compilable?
d6e01aa5
KL
21817{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21818echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21819cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21820/* confdefs.h. */
21821_ACEOF
21822cat confdefs.h >>conftest.$ac_ext
21823cat >>conftest.$ac_ext <<_ACEOF
21824/* end confdefs.h. */
c0d27fcc
MR
21825$ac_includes_default
21826#include <$ac_header>
21827_ACEOF
21828rm -f conftest.$ac_objext
d6e01aa5
KL
21829if { (ac_try="$ac_compile"
21830case "(($ac_try" in
21831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21832 *) ac_try_echo=$ac_try;;
21833esac
21834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21835 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
21836 ac_status=$?
21837 grep -v '^ *+' conftest.er1 >conftest.err
21838 rm -f conftest.er1
21839 cat conftest.err >&5
21840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21841 (exit $ac_status); } && {
21842 test -z "$ac_c_werror_flag" ||
21843 test ! -s conftest.err
21844 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21845 ac_header_compiler=yes
21846else
21847 echo "$as_me: failed program was:" >&5
19650fd6
AS
21848sed 's/^/| /' conftest.$ac_ext >&5
21849
d6e01aa5 21850 ac_header_compiler=no
c0d27fcc 21851fi
d6e01aa5
KL
21852
21853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21854{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21855echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21856
21857# Is the header present?
d6e01aa5
KL
21858{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21859echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21860cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21861/* confdefs.h. */
21862_ACEOF
21863cat confdefs.h >>conftest.$ac_ext
21864cat >>conftest.$ac_ext <<_ACEOF
21865/* end confdefs.h. */
503d2be0
AS
21866#include <$ac_header>
21867_ACEOF
d6e01aa5
KL
21868if { (ac_try="$ac_cpp conftest.$ac_ext"
21869case "(($ac_try" in
21870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21871 *) ac_try_echo=$ac_try;;
21872esac
21873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21874 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21875 ac_status=$?
6bae0ccf 21876 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21877 rm -f conftest.er1
21878 cat conftest.err >&5
c0d27fcc 21879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21880 (exit $ac_status); } >/dev/null && {
21881 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21882 test ! -s conftest.err
21883 }; then
c0d27fcc 21884 ac_header_preproc=yes
503d2be0
AS
21885else
21886 echo "$as_me: failed program was:" >&5
19650fd6
AS
21887sed 's/^/| /' conftest.$ac_ext >&5
21888
c0d27fcc 21889 ac_header_preproc=no
a21616bd 21890fi
d6e01aa5 21891
503d2be0 21892rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21893{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21894echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21895
21896# So? What about this header?
edfaf76d
LK
21897case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21898 yes:no: )
c0d27fcc
MR
21899 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21900echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21901 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21902echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21903 ac_header_preproc=yes
19650fd6 21904 ;;
edfaf76d 21905 no:yes:* )
c0d27fcc
MR
21906 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21907echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21908 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21909echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21910 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21911echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21912 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21913echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21914 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21915echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21916 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21917echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21918
19650fd6 21919 ;;
c0d27fcc 21920esac
d6e01aa5
KL
21921{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21922echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21923if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21924 echo $ECHO_N "(cached) $ECHO_C" >&6
21925else
edfaf76d 21926 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21927fi
d6e01aa5
KL
21928ac_res=`eval echo '${'$as_ac_Header'}'`
21929 { echo "$as_me:$LINENO: result: $ac_res" >&5
21930echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21931
21932fi
503d2be0 21933if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21934 cat >>confdefs.h <<_ACEOF
503d2be0 21935#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21936_ACEOF
503d2be0 21937
a21616bd 21938fi
c0d27fcc 21939
a21616bd
KR
21940done
21941
21942fi
21943
ba4481b5
DL
21944# Solaris requires -lintl if you want strerror (which calls dgettext)
21945# to return localized messages.
503d2be0 21946
d6e01aa5
KL
21947{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
21948echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
21949if test "${ac_cv_lib_intl_dgettext+set}" = set; then
21950 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21951else
503d2be0 21952 ac_check_lib_save_LIBS=$LIBS
ba4481b5 21953LIBS="-lintl $LIBS"
503d2be0 21954cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21955/* confdefs.h. */
21956_ACEOF
21957cat confdefs.h >>conftest.$ac_ext
21958cat >>conftest.$ac_ext <<_ACEOF
21959/* end confdefs.h. */
503d2be0 21960
d6e01aa5
KL
21961/* Override any GCC internal prototype to avoid an error.
21962 Use char because int might match the return type of a GCC
21963 builtin and then its argument prototype would still apply. */
503d2be0
AS
21964#ifdef __cplusplus
21965extern "C"
21966#endif
503d2be0
AS
21967char dgettext ();
21968int
21969main ()
21970{
d6e01aa5 21971return dgettext ();
503d2be0
AS
21972 ;
21973 return 0;
21974}
21975_ACEOF
21976rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
21977if { (ac_try="$ac_link"
21978case "(($ac_try" in
21979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21980 *) ac_try_echo=$ac_try;;
21981esac
21982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21983 (eval "$ac_link") 2>conftest.er1
503d2be0 21984 ac_status=$?
edfaf76d
LK
21985 grep -v '^ *+' conftest.er1 >conftest.err
21986 rm -f conftest.er1
21987 cat conftest.err >&5
c0d27fcc 21988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21989 (exit $ac_status); } && {
21990 test -z "$ac_c_werror_flag" ||
21991 test ! -s conftest.err
21992 } && test -s conftest$ac_exeext &&
21993 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21994 ac_cv_lib_intl_dgettext=yes
21995else
21996 echo "$as_me: failed program was:" >&5
19650fd6
AS
21997sed 's/^/| /' conftest.$ac_ext >&5
21998
d6e01aa5 21999 ac_cv_lib_intl_dgettext=no
503d2be0 22000fi
d6e01aa5
KL
22001
22002rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22003 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22004LIBS=$ac_check_lib_save_LIBS
22005fi
d6e01aa5
KL
22006{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
22007echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 22008if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 22009 cat >>confdefs.h <<_ACEOF
503d2be0 22010#define HAVE_LIBINTL 1
c0d27fcc 22011_ACEOF
ba4481b5
DL
22012
22013 LIBS="-lintl $LIBS"
22014
ba4481b5
DL
22015fi
22016
c0d27fcc 22017
d6e01aa5
KL
22018{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
22019echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
22020if test "${emacs_cv_localtime_cache+set}" = set; then
22021 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
22022else
22023 if test x$ac_cv_func_tzset = xyes; then
22024if test "$cross_compiling" = yes; then
22025 # If we have tzset, assume the worst when cross-compiling.
22026emacs_cv_localtime_cache=yes
22027else
503d2be0 22028 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22029/* confdefs.h. */
22030_ACEOF
22031cat confdefs.h >>conftest.$ac_ext
22032cat >>conftest.$ac_ext <<_ACEOF
22033/* end confdefs.h. */
ba4481b5 22034#include <time.h>
ba4481b5
DL
22035extern char **environ;
22036unset_TZ ()
22037{
22038 char **from, **to;
22039 for (to = from = environ; (*to = *from); from++)
22040 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
22041 to++;
22042}
22043char TZ_GMT0[] = "TZ=GMT0";
22044char TZ_PST8[] = "TZ=PST8";
22045main()
22046{
22047 time_t now = time ((time_t *) 0);
22048 int hour_GMT0, hour_unset;
22049 if (putenv (TZ_GMT0) != 0)
22050 exit (1);
22051 hour_GMT0 = localtime (&now)->tm_hour;
22052 unset_TZ ();
22053 hour_unset = localtime (&now)->tm_hour;
22054 if (putenv (TZ_PST8) != 0)
22055 exit (1);
22056 if (localtime (&now)->tm_hour == hour_GMT0)
22057 exit (1);
22058 unset_TZ ();
22059 if (localtime (&now)->tm_hour != hour_unset)
22060 exit (1);
22061 exit (0);
22062}
503d2be0
AS
22063_ACEOF
22064rm -f conftest$ac_exeext
d6e01aa5
KL
22065if { (ac_try="$ac_link"
22066case "(($ac_try" in
22067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22068 *) ac_try_echo=$ac_try;;
22069esac
22070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22071 (eval "$ac_link") 2>&5
503d2be0 22072 ac_status=$?
c0d27fcc 22073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22074 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
22075 { (case "(($ac_try" in
22076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22077 *) ac_try_echo=$ac_try;;
22078esac
22079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22080 (eval "$ac_try") 2>&5
503d2be0 22081 ac_status=$?
c0d27fcc 22082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22083 (exit $ac_status); }; }; then
ba4481b5
DL
22084 emacs_cv_localtime_cache=no
22085else
503d2be0
AS
22086 echo "$as_me: program exited with status $ac_status" >&5
22087echo "$as_me: failed program was:" >&5
19650fd6
AS
22088sed 's/^/| /' conftest.$ac_ext >&5
22089
c0d27fcc 22090( exit $ac_status )
503d2be0 22091emacs_cv_localtime_cache=yes
ba4481b5 22092fi
d6e01aa5 22093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 22094fi
d6e01aa5
KL
22095
22096
ba4481b5
DL
22097else
22098 # If we lack tzset, report that localtime does not cache TZ,
22099 # since we can't invalidate the cache if we don't have tzset.
22100 emacs_cv_localtime_cache=no
22101fi
22102fi
d6e01aa5
KL
22103{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
22104echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 22105if test $emacs_cv_localtime_cache = yes; then
b936fae4 22106
c0d27fcc 22107cat >>confdefs.h <<\_ACEOF
ba4481b5 22108#define LOCALTIME_CACHE 1
c0d27fcc 22109_ACEOF
ba4481b5
DL
22110
22111fi
22112
22113if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
22114
22115for ac_func in gettimeofday
48d4b120 22116do
503d2be0 22117as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
22118{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22119echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22120if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22121 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 22122else
503d2be0 22123 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22124/* confdefs.h. */
22125_ACEOF
22126cat confdefs.h >>conftest.$ac_ext
22127cat >>conftest.$ac_ext <<_ACEOF
22128/* end confdefs.h. */
edfaf76d
LK
22129/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22130 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22131#define $ac_func innocuous_$ac_func
22132
48d4b120 22133/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22134 which can conflict with char $ac_func (); below.
22135 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22136 <limits.h> exists even on freestanding compilers. */
edfaf76d 22137
19650fd6
AS
22138#ifdef __STDC__
22139# include <limits.h>
22140#else
22141# include <assert.h>
22142#endif
edfaf76d
LK
22143
22144#undef $ac_func
22145
d6e01aa5
KL
22146/* Override any GCC internal prototype to avoid an error.
22147 Use char because int might match the return type of a GCC
22148 builtin and then its argument prototype would still apply. */
503d2be0
AS
22149#ifdef __cplusplus
22150extern "C"
22151#endif
503d2be0 22152char $ac_func ();
48d4b120
DL
22153/* The GNU C library defines this for functions which it implements
22154 to always fail with ENOSYS. Some functions are actually named
22155 something starting with __ and the normal name is an alias. */
d6e01aa5 22156#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 22157choke me
cd958eb3
MB
22158#endif
22159
19650fd6
AS
22160int
22161main ()
22162{
d6e01aa5 22163return $ac_func ();
503d2be0
AS
22164 ;
22165 return 0;
22166}
22167_ACEOF
22168rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
22169if { (ac_try="$ac_link"
22170case "(($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_link") 2>conftest.er1
503d2be0 22176 ac_status=$?
edfaf76d
LK
22177 grep -v '^ *+' conftest.er1 >conftest.err
22178 rm -f conftest.er1
22179 cat conftest.err >&5
c0d27fcc 22180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22181 (exit $ac_status); } && {
22182 test -z "$ac_c_werror_flag" ||
22183 test ! -s conftest.err
22184 } && test -s conftest$ac_exeext &&
22185 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22186 eval "$as_ac_var=yes"
22187else
22188 echo "$as_me: failed program was:" >&5
19650fd6
AS
22189sed 's/^/| /' conftest.$ac_ext >&5
22190
d6e01aa5 22191 eval "$as_ac_var=no"
503d2be0 22192fi
d6e01aa5
KL
22193
22194rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22195 conftest$ac_exeext conftest.$ac_ext
503d2be0 22196fi
d6e01aa5
KL
22197ac_res=`eval echo '${'$as_ac_var'}'`
22198 { echo "$as_me:$LINENO: result: $ac_res" >&5
22199echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22200if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22201 cat >>confdefs.h <<_ACEOF
503d2be0 22202#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22203_ACEOF
48d4b120 22204
48d4b120
DL
22205fi
22206done
22207
b936fae4 22208 if test $ac_cv_func_gettimeofday = yes; then
d6e01aa5
KL
22209 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
22210echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
22211if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
22212 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22213else
503d2be0 22214 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22215/* confdefs.h. */
22216_ACEOF
22217cat confdefs.h >>conftest.$ac_ext
22218cat >>conftest.$ac_ext <<_ACEOF
22219/* end confdefs.h. */
ba4481b5 22220
a3f08d9e
DL
22221#ifdef TIME_WITH_SYS_TIME
22222#include <sys/time.h>
22223#include <time.h>
22224#else
22225#ifdef HAVE_SYS_TIME_H
22226#include <sys/time.h>
22227#else
22228#include <time.h>
22229#endif
22230#endif
503d2be0
AS
22231int
22232main ()
22233{
a3f08d9e 22234struct timeval time;
b936fae4 22235 gettimeofday (&time, 0);
503d2be0
AS
22236 ;
22237 return 0;
22238}
22239_ACEOF
22240rm -f conftest.$ac_objext
d6e01aa5
KL
22241if { (ac_try="$ac_compile"
22242case "(($ac_try" in
22243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22244 *) ac_try_echo=$ac_try;;
22245esac
22246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22247 (eval "$ac_compile") 2>conftest.er1
503d2be0 22248 ac_status=$?
edfaf76d
LK
22249 grep -v '^ *+' conftest.er1 >conftest.err
22250 rm -f conftest.er1
22251 cat conftest.err >&5
c0d27fcc 22252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22253 (exit $ac_status); } && {
22254 test -z "$ac_c_werror_flag" ||
22255 test ! -s conftest.err
22256 } && test -s conftest.$ac_objext; then
ba4481b5
DL
22257 emacs_cv_gettimeofday_two_arguments=yes
22258else
503d2be0 22259 echo "$as_me: failed program was:" >&5
19650fd6
AS
22260sed 's/^/| /' conftest.$ac_ext >&5
22261
d6e01aa5 22262 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 22263fi
d6e01aa5
KL
22264
22265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22266fi
d6e01aa5
KL
22267{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
22268echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
22269 if test $emacs_cv_gettimeofday_two_arguments = no; then
22270
c0d27fcc 22271cat >>confdefs.h <<\_ACEOF
ba4481b5 22272#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 22273_ACEOF
ba4481b5 22274
b936fae4 22275 fi
ba4481b5
DL
22276 fi
22277fi
22278
22279ok_so_far=yes
d6e01aa5
KL
22280{ echo "$as_me:$LINENO: checking for socket" >&5
22281echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
22282if test "${ac_cv_func_socket+set}" = set; then
22283 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22284else
503d2be0 22285 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22286/* confdefs.h. */
22287_ACEOF
22288cat confdefs.h >>conftest.$ac_ext
22289cat >>conftest.$ac_ext <<_ACEOF
22290/* end confdefs.h. */
edfaf76d
LK
22291/* Define socket to an innocuous variant, in case <limits.h> declares socket.
22292 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22293#define socket innocuous_socket
22294
ba4481b5 22295/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22296 which can conflict with char socket (); below.
22297 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22298 <limits.h> exists even on freestanding compilers. */
edfaf76d 22299
19650fd6
AS
22300#ifdef __STDC__
22301# include <limits.h>
22302#else
22303# include <assert.h>
22304#endif
edfaf76d
LK
22305
22306#undef socket
22307
d6e01aa5
KL
22308/* Override any GCC internal prototype to avoid an error.
22309 Use char because int might match the return type of a GCC
22310 builtin and then its argument prototype would still apply. */
503d2be0
AS
22311#ifdef __cplusplus
22312extern "C"
22313#endif
503d2be0 22314char socket ();
ba4481b5
DL
22315/* The GNU C library defines this for functions which it implements
22316 to always fail with ENOSYS. Some functions are actually named
22317 something starting with __ and the normal name is an alias. */
d6e01aa5 22318#if defined __stub_socket || defined __stub___socket
ba4481b5 22319choke me
cd958eb3
MB
22320#endif
22321
19650fd6
AS
22322int
22323main ()
22324{
d6e01aa5 22325return socket ();
503d2be0
AS
22326 ;
22327 return 0;
22328}
22329_ACEOF
22330rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
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
d6e01aa5
KL
22343 (exit $ac_status); } && {
22344 test -z "$ac_c_werror_flag" ||
22345 test ! -s conftest.err
22346 } && test -s conftest$ac_exeext &&
22347 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22348 ac_cv_func_socket=yes
22349else
22350 echo "$as_me: failed program was:" >&5
19650fd6
AS
22351sed 's/^/| /' conftest.$ac_ext >&5
22352
d6e01aa5 22353 ac_cv_func_socket=no
503d2be0 22354fi
d6e01aa5
KL
22355
22356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22357 conftest$ac_exeext conftest.$ac_ext
503d2be0 22358fi
d6e01aa5
KL
22359{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
22360echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 22361if test $ac_cv_func_socket = yes; then
ba4481b5
DL
22362 :
22363else
503d2be0 22364 ok_so_far=no
ba4481b5
DL
22365fi
22366
22367if test $ok_so_far = yes; then
c0d27fcc 22368 if test "${ac_cv_header_netinet_in_h+set}" = set; then
d6e01aa5
KL
22369 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22370echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
22371if test "${ac_cv_header_netinet_in_h+set}" = set; then
22372 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22373fi
d6e01aa5
KL
22374{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22375echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22376else
c0d27fcc 22377 # Is the header compilable?
d6e01aa5
KL
22378{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22379echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22380cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22381/* confdefs.h. */
22382_ACEOF
22383cat confdefs.h >>conftest.$ac_ext
22384cat >>conftest.$ac_ext <<_ACEOF
22385/* end confdefs.h. */
c0d27fcc
MR
22386$ac_includes_default
22387#include <netinet/in.h>
22388_ACEOF
22389rm -f conftest.$ac_objext
d6e01aa5
KL
22390if { (ac_try="$ac_compile"
22391case "(($ac_try" in
22392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22393 *) ac_try_echo=$ac_try;;
22394esac
22395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22396 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22397 ac_status=$?
edfaf76d
LK
22398 grep -v '^ *+' conftest.er1 >conftest.err
22399 rm -f conftest.er1
22400 cat conftest.err >&5
c0d27fcc 22401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22402 (exit $ac_status); } && {
22403 test -z "$ac_c_werror_flag" ||
22404 test ! -s conftest.err
22405 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22406 ac_header_compiler=yes
22407else
22408 echo "$as_me: failed program was:" >&5
19650fd6
AS
22409sed 's/^/| /' conftest.$ac_ext >&5
22410
d6e01aa5 22411 ac_header_compiler=no
c0d27fcc 22412fi
d6e01aa5
KL
22413
22414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22415{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22416echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22417
22418# Is the header present?
d6e01aa5
KL
22419{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22420echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22421cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22422/* confdefs.h. */
22423_ACEOF
22424cat confdefs.h >>conftest.$ac_ext
22425cat >>conftest.$ac_ext <<_ACEOF
22426/* end confdefs.h. */
ba4481b5 22427#include <netinet/in.h>
503d2be0 22428_ACEOF
d6e01aa5
KL
22429if { (ac_try="$ac_cpp conftest.$ac_ext"
22430case "(($ac_try" in
22431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22432 *) ac_try_echo=$ac_try;;
22433esac
22434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22435 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22436 ac_status=$?
6bae0ccf 22437 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22438 rm -f conftest.er1
22439 cat conftest.err >&5
c0d27fcc 22440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22441 (exit $ac_status); } >/dev/null && {
22442 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22443 test ! -s conftest.err
22444 }; then
c0d27fcc 22445 ac_header_preproc=yes
ba4481b5 22446else
503d2be0 22447 echo "$as_me: failed program was:" >&5
19650fd6
AS
22448sed 's/^/| /' conftest.$ac_ext >&5
22449
c0d27fcc 22450 ac_header_preproc=no
ba4481b5 22451fi
d6e01aa5 22452
503d2be0 22453rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
22454{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22455echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22456
22457# So? What about this header?
edfaf76d
LK
22458case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22459 yes:no: )
c0d27fcc
MR
22460 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22461echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22462 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22463echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
22464 ac_header_preproc=yes
19650fd6 22465 ;;
edfaf76d 22466 no:yes:* )
c0d27fcc
MR
22467 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22468echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22469 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22470echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22471 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22472echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22473 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22474echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22475 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22476echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22477 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22478echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22479
19650fd6 22480 ;;
c0d27fcc 22481esac
d6e01aa5
KL
22482{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22483echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22484if test "${ac_cv_header_netinet_in_h+set}" = set; then
22485 echo $ECHO_N "(cached) $ECHO_C" >&6
22486else
22487 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22488fi
d6e01aa5
KL
22489{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22490echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22491
22492fi
503d2be0 22493if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22494 :
22495else
503d2be0 22496 ok_so_far=no
ba4481b5
DL
22497fi
22498
c0d27fcc 22499
ba4481b5
DL
22500fi
22501if test $ok_so_far = yes; then
c0d27fcc 22502 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
d6e01aa5
KL
22503 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22504echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
22505if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22506 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22507fi
d6e01aa5
KL
22508{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22509echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22510else
c0d27fcc 22511 # Is the header compilable?
d6e01aa5
KL
22512{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
22513echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 22514cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22515/* confdefs.h. */
22516_ACEOF
22517cat confdefs.h >>conftest.$ac_ext
22518cat >>conftest.$ac_ext <<_ACEOF
22519/* end confdefs.h. */
c0d27fcc
MR
22520$ac_includes_default
22521#include <arpa/inet.h>
22522_ACEOF
22523rm -f conftest.$ac_objext
d6e01aa5
KL
22524if { (ac_try="$ac_compile"
22525case "(($ac_try" in
22526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22527 *) ac_try_echo=$ac_try;;
22528esac
22529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22530 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22531 ac_status=$?
edfaf76d
LK
22532 grep -v '^ *+' conftest.er1 >conftest.err
22533 rm -f conftest.er1
22534 cat conftest.err >&5
c0d27fcc 22535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22536 (exit $ac_status); } && {
22537 test -z "$ac_c_werror_flag" ||
22538 test ! -s conftest.err
22539 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22540 ac_header_compiler=yes
22541else
22542 echo "$as_me: failed program was:" >&5
19650fd6
AS
22543sed 's/^/| /' conftest.$ac_ext >&5
22544
d6e01aa5 22545 ac_header_compiler=no
c0d27fcc 22546fi
d6e01aa5
KL
22547
22548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22549{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22550echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22551
22552# Is the header present?
d6e01aa5
KL
22553{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
22554echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 22555cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22556/* confdefs.h. */
22557_ACEOF
22558cat confdefs.h >>conftest.$ac_ext
22559cat >>conftest.$ac_ext <<_ACEOF
22560/* end confdefs.h. */
ba4481b5 22561#include <arpa/inet.h>
503d2be0 22562_ACEOF
d6e01aa5
KL
22563if { (ac_try="$ac_cpp conftest.$ac_ext"
22564case "(($ac_try" in
22565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22566 *) ac_try_echo=$ac_try;;
22567esac
22568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22569 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22570 ac_status=$?
6bae0ccf 22571 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22572 rm -f conftest.er1
22573 cat conftest.err >&5
c0d27fcc 22574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22575 (exit $ac_status); } >/dev/null && {
22576 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22577 test ! -s conftest.err
22578 }; then
c0d27fcc 22579 ac_header_preproc=yes
ba4481b5 22580else
503d2be0 22581 echo "$as_me: failed program was:" >&5
19650fd6
AS
22582sed 's/^/| /' conftest.$ac_ext >&5
22583
c0d27fcc 22584 ac_header_preproc=no
ba4481b5 22585fi
d6e01aa5 22586
503d2be0 22587rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
22588{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22589echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22590
22591# So? What about this header?
edfaf76d
LK
22592case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22593 yes:no: )
c0d27fcc
MR
22594 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
22595echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22596 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
22597echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
22598 ac_header_preproc=yes
19650fd6 22599 ;;
edfaf76d 22600 no:yes:* )
c0d27fcc
MR
22601 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
22602echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22603 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
22604echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
22605 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
22606echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
22607 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
22608echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22609 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 22610echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22611 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
22612echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22613
19650fd6 22614 ;;
c0d27fcc 22615esac
d6e01aa5
KL
22616{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22617echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
22618if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22619 echo $ECHO_N "(cached) $ECHO_C" >&6
22620else
22621 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 22622fi
d6e01aa5
KL
22623{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22624echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
22625
22626fi
503d2be0 22627if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
22628 :
22629else
503d2be0 22630 ok_so_far=no
ba4481b5
DL
22631fi
22632
c0d27fcc 22633
ba4481b5
DL
22634fi
22635if test $ok_so_far = yes; then
b936fae4 22636
c0d27fcc 22637cat >>confdefs.h <<\_ACEOF
ba4481b5 22638#define HAVE_INET_SOCKETS 1
c0d27fcc 22639_ACEOF
ba4481b5
DL
22640
22641fi
22642
2d2b6695 22643
7862d3a8 22644for ac_header in sys/ioctl.h
2d2b6695
KS
22645do
22646as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
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
2d2b6695
KS
22651 echo $ECHO_N "(cached) $ECHO_C" >&6
22652fi
d6e01aa5
KL
22653ac_res=`eval echo '${'$as_ac_Header'}'`
22654 { echo "$as_me:$LINENO: result: $ac_res" >&5
22655echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22656else
22657 # Is the header compilable?
d6e01aa5
KL
22658{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22659echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 22660cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22661/* confdefs.h. */
22662_ACEOF
22663cat confdefs.h >>conftest.$ac_ext
22664cat >>conftest.$ac_ext <<_ACEOF
22665/* end confdefs.h. */
22666$ac_includes_default
22667#include <$ac_header>
22668_ACEOF
22669rm -f conftest.$ac_objext
d6e01aa5
KL
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
2d2b6695 22677 ac_status=$?
edfaf76d
LK
22678 grep -v '^ *+' conftest.er1 >conftest.err
22679 rm -f conftest.er1
22680 cat conftest.err >&5
2d2b6695 22681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22682 (exit $ac_status); } && {
22683 test -z "$ac_c_werror_flag" ||
22684 test ! -s conftest.err
22685 } && test -s conftest.$ac_objext; then
2d2b6695
KS
22686 ac_header_compiler=yes
22687else
22688 echo "$as_me: failed program was:" >&5
22689sed 's/^/| /' conftest.$ac_ext >&5
22690
d6e01aa5 22691 ac_header_compiler=no
2d2b6695 22692fi
d6e01aa5
KL
22693
22694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22695{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22696echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
22697
22698# Is the header present?
d6e01aa5
KL
22699{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22700echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 22701cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22702/* confdefs.h. */
22703_ACEOF
22704cat confdefs.h >>conftest.$ac_ext
22705cat >>conftest.$ac_ext <<_ACEOF
22706/* end confdefs.h. */
22707#include <$ac_header>
22708_ACEOF
d6e01aa5
KL
22709if { (ac_try="$ac_cpp conftest.$ac_ext"
22710case "(($ac_try" in
22711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22712 *) ac_try_echo=$ac_try;;
22713esac
22714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22715 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
22716 ac_status=$?
22717 grep -v '^ *+' conftest.er1 >conftest.err
22718 rm -f conftest.er1
22719 cat conftest.err >&5
22720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22721 (exit $ac_status); } >/dev/null && {
22722 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22723 test ! -s conftest.err
22724 }; then
2d2b6695
KS
22725 ac_header_preproc=yes
22726else
22727 echo "$as_me: failed program was:" >&5
22728sed 's/^/| /' conftest.$ac_ext >&5
22729
22730 ac_header_preproc=no
22731fi
d6e01aa5 22732
2d2b6695 22733rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
22734{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22735echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
22736
22737# So? What about this header?
edfaf76d
LK
22738case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22739 yes:no: )
2d2b6695
KS
22740 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22741echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22742 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22743echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22744 ac_header_preproc=yes
2d2b6695 22745 ;;
edfaf76d 22746 no:yes:* )
2d2b6695
KS
22747 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22748echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22749 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22750echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22751 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22752echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22753 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22754echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
22755 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22756echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22757 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22758echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22759
2d2b6695
KS
22760 ;;
22761esac
d6e01aa5
KL
22762{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22763echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22764if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
22765 echo $ECHO_N "(cached) $ECHO_C" >&6
22766else
edfaf76d 22767 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 22768fi
d6e01aa5
KL
22769ac_res=`eval echo '${'$as_ac_Header'}'`
22770 { echo "$as_me:$LINENO: result: $ac_res" >&5
22771echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22772
22773fi
22774if test `eval echo '${'$as_ac_Header'}'` = yes; then
22775 cat >>confdefs.h <<_ACEOF
22776#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22777_ACEOF
22778
22779fi
22780
22781done
22782
22783
ba4481b5 22784if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 22785
c0d27fcc 22786cat >>confdefs.h <<\_ACEOF
ba4481b5 22787#define HAVE_AIX_SMT_EXP 1
c0d27fcc 22788_ACEOF
ba4481b5
DL
22789
22790fi
22791
d6e01aa5
KL
22792{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
22793echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 22794if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
d6e01aa5
KL
22795 { echo "$as_me:$LINENO: result: yes" >&5
22796echo "${ECHO_T}yes" >&6; }
b936fae4 22797
c0d27fcc 22798cat >>confdefs.h <<\_ACEOF
3d9fec71 22799#define HAVE_DEV_PTMX 1
c0d27fcc 22800_ACEOF
3d9fec71
DL
22801
22802else
d6e01aa5
KL
22803 { echo "$as_me:$LINENO: result: no" >&5
22804echo "${ECHO_T}no" >&6; }
3d9fec71
DL
22805fi
22806
d6e01aa5
KL
22807{ echo "$as_me:$LINENO: checking for pid_t" >&5
22808echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
22809if test "${ac_cv_type_pid_t+set}" = set; then
22810 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 22811else
503d2be0 22812 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22813/* confdefs.h. */
22814_ACEOF
22815cat confdefs.h >>conftest.$ac_ext
22816cat >>conftest.$ac_ext <<_ACEOF
22817/* end confdefs.h. */
503d2be0 22818$ac_includes_default
d6e01aa5 22819typedef pid_t ac__type_new_;
503d2be0
AS
22820int
22821main ()
22822{
d6e01aa5 22823if ((ac__type_new_ *) 0)
503d2be0 22824 return 0;
d6e01aa5 22825if (sizeof (ac__type_new_))
503d2be0
AS
22826 return 0;
22827 ;
22828 return 0;
22829}
22830_ACEOF
22831rm -f conftest.$ac_objext
d6e01aa5
KL
22832if { (ac_try="$ac_compile"
22833case "(($ac_try" in
22834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22835 *) ac_try_echo=$ac_try;;
22836esac
22837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22838 (eval "$ac_compile") 2>conftest.er1
503d2be0 22839 ac_status=$?
edfaf76d
LK
22840 grep -v '^ *+' conftest.er1 >conftest.err
22841 rm -f conftest.er1
22842 cat conftest.err >&5
c0d27fcc 22843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22844 (exit $ac_status); } && {
22845 test -z "$ac_c_werror_flag" ||
22846 test ! -s conftest.err
22847 } && test -s conftest.$ac_objext; then
647847ea
DL
22848 ac_cv_type_pid_t=yes
22849else
503d2be0 22850 echo "$as_me: failed program was:" >&5
19650fd6
AS
22851sed 's/^/| /' conftest.$ac_ext >&5
22852
d6e01aa5 22853 ac_cv_type_pid_t=no
647847ea 22854fi
d6e01aa5
KL
22855
22856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 22857fi
d6e01aa5
KL
22858{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
22859echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
22860if test $ac_cv_type_pid_t = yes; then
22861 :
22862else
22863
c0d27fcc 22864cat >>confdefs.h <<_ACEOF
647847ea 22865#define pid_t int
c0d27fcc 22866_ACEOF
647847ea
DL
22867
22868fi
22869
c0d27fcc 22870
d6e01aa5 22871for ac_header in vfork.h
503d2be0
AS
22872do
22873as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
22874if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22875 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22876echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22877if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22878 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22879fi
d6e01aa5
KL
22880ac_res=`eval echo '${'$as_ac_Header'}'`
22881 { echo "$as_me:$LINENO: result: $ac_res" >&5
22882echo "${ECHO_T}$ac_res" >&6; }
98418dba 22883else
c0d27fcc 22884 # Is the header compilable?
d6e01aa5
KL
22885{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22886echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22887cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22888/* confdefs.h. */
22889_ACEOF
22890cat confdefs.h >>conftest.$ac_ext
22891cat >>conftest.$ac_ext <<_ACEOF
22892/* end confdefs.h. */
c0d27fcc
MR
22893$ac_includes_default
22894#include <$ac_header>
22895_ACEOF
22896rm -f conftest.$ac_objext
d6e01aa5
KL
22897if { (ac_try="$ac_compile"
22898case "(($ac_try" in
22899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22900 *) ac_try_echo=$ac_try;;
22901esac
22902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22903 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22904 ac_status=$?
edfaf76d
LK
22905 grep -v '^ *+' conftest.er1 >conftest.err
22906 rm -f conftest.er1
22907 cat conftest.err >&5
c0d27fcc 22908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22909 (exit $ac_status); } && {
22910 test -z "$ac_c_werror_flag" ||
22911 test ! -s conftest.err
22912 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22913 ac_header_compiler=yes
22914else
22915 echo "$as_me: failed program was:" >&5
19650fd6
AS
22916sed 's/^/| /' conftest.$ac_ext >&5
22917
d6e01aa5 22918 ac_header_compiler=no
c0d27fcc 22919fi
d6e01aa5
KL
22920
22921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22922{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22923echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22924
22925# Is the header present?
d6e01aa5
KL
22926{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22927echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22928cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22929/* confdefs.h. */
22930_ACEOF
22931cat confdefs.h >>conftest.$ac_ext
22932cat >>conftest.$ac_ext <<_ACEOF
22933/* end confdefs.h. */
503d2be0
AS
22934#include <$ac_header>
22935_ACEOF
d6e01aa5
KL
22936if { (ac_try="$ac_cpp conftest.$ac_ext"
22937case "(($ac_try" in
22938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22939 *) ac_try_echo=$ac_try;;
22940esac
22941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22942 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22943 ac_status=$?
6bae0ccf 22944 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22945 rm -f conftest.er1
22946 cat conftest.err >&5
c0d27fcc 22947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22948 (exit $ac_status); } >/dev/null && {
22949 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22950 test ! -s conftest.err
22951 }; then
c0d27fcc 22952 ac_header_preproc=yes
647847ea 22953else
503d2be0 22954 echo "$as_me: failed program was:" >&5
19650fd6
AS
22955sed 's/^/| /' conftest.$ac_ext >&5
22956
c0d27fcc 22957 ac_header_preproc=no
647847ea 22958fi
d6e01aa5 22959
503d2be0 22960rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
22961{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22962echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22963
22964# So? What about this header?
edfaf76d
LK
22965case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22966 yes:no: )
c0d27fcc
MR
22967 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22968echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22969 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22970echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22971 ac_header_preproc=yes
19650fd6 22972 ;;
edfaf76d 22973 no:yes:* )
c0d27fcc
MR
22974 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22975echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22976 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22977echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22978 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22979echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22980 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22981echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22982 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22983echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22984 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22985echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22986
19650fd6 22987 ;;
c0d27fcc 22988esac
d6e01aa5
KL
22989{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22990echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22991if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22992 echo $ECHO_N "(cached) $ECHO_C" >&6
22993else
edfaf76d 22994 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 22995fi
d6e01aa5
KL
22996ac_res=`eval echo '${'$as_ac_Header'}'`
22997 { echo "$as_me:$LINENO: result: $ac_res" >&5
22998echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22999
23000fi
503d2be0 23001if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23002 cat >>confdefs.h <<_ACEOF
503d2be0 23003#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23004_ACEOF
647847ea 23005
73b77ee5 23006fi
c0d27fcc 23007
503d2be0 23008done
73b77ee5 23009
c0d27fcc
MR
23010
23011
503d2be0
AS
23012for ac_func in fork vfork
23013do
23014as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
23015{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23016echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23017if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23018 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23019else
503d2be0 23020 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23021/* confdefs.h. */
23022_ACEOF
23023cat confdefs.h >>conftest.$ac_ext
23024cat >>conftest.$ac_ext <<_ACEOF
23025/* end confdefs.h. */
edfaf76d
LK
23026/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23027 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23028#define $ac_func innocuous_$ac_func
23029
fa0b693c 23030/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
23031 which can conflict with char $ac_func (); below.
23032 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23033 <limits.h> exists even on freestanding compilers. */
edfaf76d 23034
19650fd6
AS
23035#ifdef __STDC__
23036# include <limits.h>
23037#else
23038# include <assert.h>
23039#endif
edfaf76d
LK
23040
23041#undef $ac_func
23042
d6e01aa5
KL
23043/* Override any GCC internal prototype to avoid an error.
23044 Use char because int might match the return type of a GCC
23045 builtin and then its argument prototype would still apply. */
503d2be0
AS
23046#ifdef __cplusplus
23047extern "C"
23048#endif
503d2be0 23049char $ac_func ();
fa0b693c
GM
23050/* The GNU C library defines this for functions which it implements
23051 to always fail with ENOSYS. Some functions are actually named
23052 something starting with __ and the normal name is an alias. */
d6e01aa5 23053#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 23054choke me
fa0b693c
GM
23055#endif
23056
19650fd6
AS
23057int
23058main ()
23059{
d6e01aa5 23060return $ac_func ();
503d2be0
AS
23061 ;
23062 return 0;
23063}
23064_ACEOF
23065rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
23066if { (ac_try="$ac_link"
23067case "(($ac_try" in
23068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23069 *) ac_try_echo=$ac_try;;
23070esac
23071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23072 (eval "$ac_link") 2>conftest.er1
503d2be0 23073 ac_status=$?
edfaf76d
LK
23074 grep -v '^ *+' conftest.er1 >conftest.err
23075 rm -f conftest.er1
23076 cat conftest.err >&5
c0d27fcc 23077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23078 (exit $ac_status); } && {
23079 test -z "$ac_c_werror_flag" ||
23080 test ! -s conftest.err
23081 } && test -s conftest$ac_exeext &&
23082 $as_test_x conftest$ac_exeext; then
503d2be0
AS
23083 eval "$as_ac_var=yes"
23084else
23085 echo "$as_me: failed program was:" >&5
19650fd6
AS
23086sed 's/^/| /' conftest.$ac_ext >&5
23087
d6e01aa5 23088 eval "$as_ac_var=no"
503d2be0 23089fi
d6e01aa5
KL
23090
23091rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23092 conftest$ac_exeext conftest.$ac_ext
503d2be0 23093fi
d6e01aa5
KL
23094ac_res=`eval echo '${'$as_ac_var'}'`
23095 { echo "$as_me:$LINENO: result: $ac_res" >&5
23096echo "${ECHO_T}$ac_res" >&6; }
503d2be0 23097if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 23098 cat >>confdefs.h <<_ACEOF
503d2be0 23099#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 23100_ACEOF
503d2be0 23101
fa0b693c 23102fi
503d2be0 23103done
fa0b693c 23104
503d2be0 23105if test "x$ac_cv_func_fork" = xyes; then
d6e01aa5
KL
23106 { echo "$as_me:$LINENO: checking for working fork" >&5
23107echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
23108if test "${ac_cv_func_fork_works+set}" = set; then
23109 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23110else
503d2be0
AS
23111 if test "$cross_compiling" = yes; then
23112 ac_cv_func_fork_works=cross
23113else
23114 cat >conftest.$ac_ext <<_ACEOF
c3a63088
KL
23115/* confdefs.h. */
23116_ACEOF
23117cat confdefs.h >>conftest.$ac_ext
23118cat >>conftest.$ac_ext <<_ACEOF
23119/* end confdefs.h. */
23120$ac_includes_default
23121int
23122main ()
23123{
23124
23125 /* By Ruediger Kuhlmann. */
d6e01aa5 23126 return fork () < 0;
c3a63088
KL
23127
23128 ;
23129 return 0;
23130}
503d2be0
AS
23131_ACEOF
23132rm -f conftest$ac_exeext
d6e01aa5
KL
23133if { (ac_try="$ac_link"
23134case "(($ac_try" in
23135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23136 *) ac_try_echo=$ac_try;;
23137esac
23138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23139 (eval "$ac_link") 2>&5
503d2be0 23140 ac_status=$?
c0d27fcc 23141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23142 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
23143 { (case "(($ac_try" in
23144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23145 *) ac_try_echo=$ac_try;;
23146esac
23147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23148 (eval "$ac_try") 2>&5
503d2be0 23149 ac_status=$?
c0d27fcc 23150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23151 (exit $ac_status); }; }; then
23152 ac_cv_func_fork_works=yes
23153else
23154 echo "$as_me: program exited with status $ac_status" >&5
23155echo "$as_me: failed program was:" >&5
19650fd6
AS
23156sed 's/^/| /' conftest.$ac_ext >&5
23157
c0d27fcc 23158( exit $ac_status )
503d2be0
AS
23159ac_cv_func_fork_works=no
23160fi
d6e01aa5 23161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 23162fi
d6e01aa5
KL
23163
23164
503d2be0 23165fi
d6e01aa5
KL
23166{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
23167echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 23168
6bae0ccf
DL
23169else
23170 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
23171fi
23172if test "x$ac_cv_func_fork_works" = xcross; then
23173 case $host in
23174 *-*-amigaos* | *-*-msdosdjgpp*)
23175 # Override, as these systems have only a dummy fork() stub
23176 ac_cv_func_fork_works=no
23177 ;;
23178 *)
23179 ac_cv_func_fork_works=yes
23180 ;;
23181 esac
c0d27fcc
MR
23182 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23183echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 23184fi
73b77ee5 23185ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 23186if test "x$ac_cv_func_vfork" = xyes; then
d6e01aa5
KL
23187 { echo "$as_me:$LINENO: checking for working vfork" >&5
23188echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
23189if test "${ac_cv_func_vfork_works+set}" = set; then
23190 echo $ECHO_N "(cached) $ECHO_C" >&6
23191else
23192 if test "$cross_compiling" = yes; then
23193 ac_cv_func_vfork_works=cross
fa0b693c 23194else
503d2be0 23195 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23196/* confdefs.h. */
23197_ACEOF
23198cat confdefs.h >>conftest.$ac_ext
23199cat >>conftest.$ac_ext <<_ACEOF
23200/* end confdefs.h. */
73b77ee5 23201/* Thanks to Paul Eggert for this test. */
d6e01aa5 23202$ac_includes_default
19650fd6 23203#include <sys/wait.h>
d6e01aa5 23204#ifdef HAVE_VFORK_H
503d2be0 23205# include <vfork.h>
73b77ee5
GM
23206#endif
23207/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
23208 argument registers are propagated back to the parent. The compiler
23209 is told about this with #include <vfork.h>, but some compilers
23210 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
23211 static variable whose address is put into a register that is
23212 clobbered by the vfork. */
19650fd6 23213static void
fa0b693c 23214#ifdef __cplusplus
73b77ee5 23215sparc_address_test (int arg)
503d2be0 23216# else
73b77ee5 23217sparc_address_test (arg) int arg;
fa0b693c 23218#endif
fa0b693c 23219{
73b77ee5
GM
23220 static pid_t child;
23221 if (!child) {
23222 child = vfork ();
23223 if (child < 0) {
23224 perror ("vfork");
23225 _exit(2);
23226 }
23227 if (!child) {
23228 arg = getpid();
23229 write(-1, "", 0);
23230 _exit (arg);
23231 }
23232 }
23233}
503d2be0
AS
23234
23235int
23236main ()
23237{
73b77ee5
GM
23238 pid_t parent = getpid ();
23239 pid_t child;
fa0b693c 23240
19650fd6 23241 sparc_address_test (0);
fa0b693c 23242
73b77ee5 23243 child = vfork ();
fa0b693c 23244
73b77ee5 23245 if (child == 0) {
503d2be0
AS
23246 /* Here is another test for sparc vfork register problems. This
23247 test uses lots of local variables, at least as many local
23248 variables as main has allocated so far including compiler
23249 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
23250 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
23251 reuse the register of parent for one of the local variables,
23252 since it will think that parent can't possibly be used any more
23253 in this routine. Assigning to the local variable will thus
23254 munge parent in the parent process. */
73b77ee5
GM
23255 pid_t
23256 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23257 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23258 /* Convince the compiler that p..p7 are live; otherwise, it might
23259 use the same hardware register for all 8 local variables. */
23260 if (p != p1 || p != p2 || p != p3 || p != p4
23261 || p != p5 || p != p6 || p != p7)
23262 _exit(1);
fa0b693c 23263
503d2be0
AS
23264 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23265 from child file descriptors. If the child closes a descriptor
23266 before it execs or exits, this munges the parent's descriptor
23267 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
23268 _exit(close(fileno(stdout)) != 0);
23269 } else {
23270 int status;
23271 struct stat st;
23272
23273 while (wait(&status) != child)
23274 ;
d6e01aa5 23275 return (
73b77ee5
GM
23276 /* Was there some problem with vforking? */
23277 child < 0
23278
23279 /* Did the child fail? (This shouldn't happen.) */
23280 || status
23281
23282 /* Did the vfork/compiler bug occur? */
23283 || parent != getpid()
fa0b693c 23284
73b77ee5
GM
23285 /* Did the file descriptor bug occur? */
23286 || fstat(fileno(stdout), &st) != 0
23287 );
23288 }
23289}
503d2be0
AS
23290_ACEOF
23291rm -f conftest$ac_exeext
d6e01aa5
KL
23292if { (ac_try="$ac_link"
23293case "(($ac_try" in
23294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23295 *) ac_try_echo=$ac_try;;
23296esac
23297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23298 (eval "$ac_link") 2>&5
503d2be0 23299 ac_status=$?
c0d27fcc 23300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23301 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
23302 { (case "(($ac_try" in
23303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23304 *) ac_try_echo=$ac_try;;
23305esac
23306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23307 (eval "$ac_try") 2>&5
503d2be0 23308 ac_status=$?
c0d27fcc 23309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23310 (exit $ac_status); }; }; then
73b77ee5 23311 ac_cv_func_vfork_works=yes
fa0b693c 23312else
503d2be0
AS
23313 echo "$as_me: program exited with status $ac_status" >&5
23314echo "$as_me: failed program was:" >&5
19650fd6
AS
23315sed 's/^/| /' conftest.$ac_ext >&5
23316
c0d27fcc 23317( exit $ac_status )
503d2be0
AS
23318ac_cv_func_vfork_works=no
23319fi
d6e01aa5 23320rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 23321fi
d6e01aa5
KL
23322
23323
fa0b693c 23324fi
d6e01aa5
KL
23325{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
23326echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 23327
503d2be0
AS
23328fi;
23329if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 23330 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
23331 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23332echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
23333fi
23334
503d2be0
AS
23335if test "x$ac_cv_func_vfork_works" = xyes; then
23336
c0d27fcc 23337cat >>confdefs.h <<\_ACEOF
503d2be0 23338#define HAVE_WORKING_VFORK 1
c0d27fcc 23339_ACEOF
503d2be0
AS
23340
23341else
23342
c0d27fcc 23343cat >>confdefs.h <<\_ACEOF
73b77ee5 23344#define vfork fork
c0d27fcc 23345_ACEOF
fa0b693c
GM
23346
23347fi
503d2be0
AS
23348if test "x$ac_cv_func_fork_works" = xyes; then
23349
c0d27fcc 23350cat >>confdefs.h <<\_ACEOF
503d2be0 23351#define HAVE_WORKING_FORK 1
c0d27fcc 23352_ACEOF
fa0b693c 23353
503d2be0 23354fi
647847ea 23355
c0d27fcc 23356
d6e01aa5
KL
23357{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
23358echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
23359if test "${emacs_cv_langinfo_codeset+set}" = set; then
23360 echo $ECHO_N "(cached) $ECHO_C" >&6
23361else
23362 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23363/* confdefs.h. */
23364_ACEOF
23365cat confdefs.h >>conftest.$ac_ext
23366cat >>conftest.$ac_ext <<_ACEOF
23367/* end confdefs.h. */
6a3a24fa
JD
23368#include <langinfo.h>
23369int
23370main ()
23371{
23372char* cs = nl_langinfo(CODESET);
23373 ;
23374 return 0;
23375}
23376_ACEOF
23377rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
23378if { (ac_try="$ac_link"
23379case "(($ac_try" in
23380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23381 *) ac_try_echo=$ac_try;;
23382esac
23383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23384 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23385 ac_status=$?
edfaf76d
LK
23386 grep -v '^ *+' conftest.er1 >conftest.err
23387 rm -f conftest.er1
23388 cat conftest.err >&5
6a3a24fa 23389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23390 (exit $ac_status); } && {
23391 test -z "$ac_c_werror_flag" ||
23392 test ! -s conftest.err
23393 } && test -s conftest$ac_exeext &&
23394 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23395 emacs_cv_langinfo_codeset=yes
23396else
23397 echo "$as_me: failed program was:" >&5
19650fd6
AS
23398sed 's/^/| /' conftest.$ac_ext >&5
23399
d6e01aa5 23400 emacs_cv_langinfo_codeset=no
6a3a24fa 23401fi
d6e01aa5
KL
23402
23403rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23404 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23405
23406fi
d6e01aa5
KL
23407{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23408echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23409if test $emacs_cv_langinfo_codeset = yes; then
23410
23411cat >>confdefs.h <<\_ACEOF
23412#define HAVE_LANGINFO_CODESET 1
23413_ACEOF
23414
23415fi
23416
d6e01aa5
KL
23417{ echo "$as_me:$LINENO: checking for size_t" >&5
23418echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
23419if test "${ac_cv_type_size_t+set}" = set; then
23420 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23421else
503d2be0 23422 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23423/* confdefs.h. */
23424_ACEOF
23425cat confdefs.h >>conftest.$ac_ext
23426cat >>conftest.$ac_ext <<_ACEOF
23427/* end confdefs.h. */
503d2be0 23428$ac_includes_default
d6e01aa5 23429typedef size_t ac__type_new_;
503d2be0
AS
23430int
23431main ()
23432{
d6e01aa5 23433if ((ac__type_new_ *) 0)
503d2be0 23434 return 0;
d6e01aa5 23435if (sizeof (ac__type_new_))
503d2be0
AS
23436 return 0;
23437 ;
23438 return 0;
23439}
23440_ACEOF
23441rm -f conftest.$ac_objext
d6e01aa5
KL
23442if { (ac_try="$ac_compile"
23443case "(($ac_try" in
23444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23445 *) ac_try_echo=$ac_try;;
23446esac
23447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23448 (eval "$ac_compile") 2>conftest.er1
503d2be0 23449 ac_status=$?
edfaf76d
LK
23450 grep -v '^ *+' conftest.er1 >conftest.err
23451 rm -f conftest.er1
23452 cat conftest.err >&5
c0d27fcc 23453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23454 (exit $ac_status); } && {
23455 test -z "$ac_c_werror_flag" ||
23456 test ! -s conftest.err
23457 } && test -s conftest.$ac_objext; then
8730a8da
DL
23458 ac_cv_type_size_t=yes
23459else
503d2be0 23460 echo "$as_me: failed program was:" >&5
19650fd6
AS
23461sed 's/^/| /' conftest.$ac_ext >&5
23462
d6e01aa5 23463 ac_cv_type_size_t=no
8730a8da 23464fi
d6e01aa5
KL
23465
23466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23467fi
d6e01aa5
KL
23468{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23469echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23470if test $ac_cv_type_size_t = yes; then
503d2be0 23471
c0d27fcc
MR
23472cat >>confdefs.h <<_ACEOF
23473#define HAVE_SIZE_T 1
23474_ACEOF
23475
8730a8da
DL
23476
23477fi
23478
c0d27fcc 23479
d6e01aa5
KL
23480{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23481echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23482if test "${ac_cv_type_mbstate_t+set}" = set; then
23483 echo $ECHO_N "(cached) $ECHO_C" >&6
23484else
23485 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23486/* confdefs.h. */
23487_ACEOF
23488cat confdefs.h >>conftest.$ac_ext
23489cat >>conftest.$ac_ext <<_ACEOF
23490/* end confdefs.h. */
973a76b1
DL
23491$ac_includes_default
23492# include <wchar.h>
23493int
23494main ()
23495{
23496mbstate_t x; return sizeof x;
23497 ;
23498 return 0;
23499}
23500_ACEOF
23501rm -f conftest.$ac_objext
d6e01aa5
KL
23502if { (ac_try="$ac_compile"
23503case "(($ac_try" in
23504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23505 *) ac_try_echo=$ac_try;;
23506esac
23507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23508 (eval "$ac_compile") 2>conftest.er1
973a76b1 23509 ac_status=$?
edfaf76d
LK
23510 grep -v '^ *+' conftest.er1 >conftest.err
23511 rm -f conftest.er1
23512 cat conftest.err >&5
973a76b1 23513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23514 (exit $ac_status); } && {
23515 test -z "$ac_c_werror_flag" ||
23516 test ! -s conftest.err
23517 } && test -s conftest.$ac_objext; then
973a76b1
DL
23518 ac_cv_type_mbstate_t=yes
23519else
23520 echo "$as_me: failed program was:" >&5
19650fd6
AS
23521sed 's/^/| /' conftest.$ac_ext >&5
23522
d6e01aa5 23523 ac_cv_type_mbstate_t=no
973a76b1 23524fi
d6e01aa5
KL
23525
23526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 23527fi
d6e01aa5
KL
23528{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
23529echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
23530 if test $ac_cv_type_mbstate_t = yes; then
23531
23532cat >>confdefs.h <<\_ACEOF
23533#define HAVE_MBSTATE_T 1
23534_ACEOF
23535
23536 else
23537
23538cat >>confdefs.h <<\_ACEOF
23539#define mbstate_t int
23540_ACEOF
23541
23542 fi
23543
d6e01aa5
KL
23544{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
23545echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
23546if test "${emacs_cv_c_restrict+set}" = set; then
23547 echo $ECHO_N "(cached) $ECHO_C" >&6
23548else
23549 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23550/* confdefs.h. */
23551_ACEOF
23552cat confdefs.h >>conftest.$ac_ext
23553cat >>conftest.$ac_ext <<_ACEOF
23554/* end confdefs.h. */
22044edf
DL
23555void fred (int *restrict x);
23556int
23557main ()
23558{
b936fae4 23559
22044edf
DL
23560 ;
23561 return 0;
23562}
c0d27fcc 23563_ACEOF
22044edf 23564rm -f conftest.$ac_objext
d6e01aa5
KL
23565if { (ac_try="$ac_compile"
23566case "(($ac_try" in
23567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23568 *) ac_try_echo=$ac_try;;
23569esac
23570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23571 (eval "$ac_compile") 2>conftest.er1
22044edf 23572 ac_status=$?
edfaf76d
LK
23573 grep -v '^ *+' conftest.er1 >conftest.err
23574 rm -f conftest.er1
23575 cat conftest.err >&5
22044edf 23576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23577 (exit $ac_status); } && {
23578 test -z "$ac_c_werror_flag" ||
23579 test ! -s conftest.err
23580 } && test -s conftest.$ac_objext; then
22044edf
DL
23581 emacs_cv_c_restrict=yes
23582else
23583 echo "$as_me: failed program was:" >&5
19650fd6
AS
23584sed 's/^/| /' conftest.$ac_ext >&5
23585
d6e01aa5 23586 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23587/* confdefs.h. */
23588_ACEOF
23589cat confdefs.h >>conftest.$ac_ext
23590cat >>conftest.$ac_ext <<_ACEOF
23591/* end confdefs.h. */
22044edf
DL
23592void fred (int *__restrict x);
23593int
23594main ()
23595{
c0d27fcc 23596
22044edf
DL
23597 ;
23598 return 0;
23599}
c0d27fcc 23600_ACEOF
22044edf 23601rm -f conftest.$ac_objext
d6e01aa5
KL
23602if { (ac_try="$ac_compile"
23603case "(($ac_try" in
23604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23605 *) ac_try_echo=$ac_try;;
23606esac
23607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23608 (eval "$ac_compile") 2>conftest.er1
22044edf 23609 ac_status=$?
edfaf76d
LK
23610 grep -v '^ *+' conftest.er1 >conftest.err
23611 rm -f conftest.er1
23612 cat conftest.err >&5
22044edf 23613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23614 (exit $ac_status); } && {
23615 test -z "$ac_c_werror_flag" ||
23616 test ! -s conftest.err
23617 } && test -s conftest.$ac_objext; then
22044edf
DL
23618 emacs_cv_c_restrict=__restrict
23619else
23620 echo "$as_me: failed program was:" >&5
19650fd6
AS
23621sed 's/^/| /' conftest.$ac_ext >&5
23622
d6e01aa5 23623 emacs_cv_c_restrict=no
ba4481b5 23624fi
d6e01aa5
KL
23625
23626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23627fi
d6e01aa5
KL
23628
23629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23630fi
d6e01aa5
KL
23631{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
23632echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
23633case "$emacs_cv_c_restrict" in
23634 yes) emacs_restrict=restrict;;
23635 no) emacs_restrict="";;
23636 *) emacs_restrict="$emacs_cv_c_restrict";;
23637esac
23638if test "$emacs_restrict" != __restrict; then
b936fae4 23639
22044edf
DL
23640cat >>confdefs.h <<_ACEOF
23641#define __restrict $emacs_restrict
c0d27fcc 23642_ACEOF
ba4481b5
DL
23643
23644fi
ba4481b5 23645
d6e01aa5
KL
23646{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
23647echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
23648if test "${emacs_cv_c_restrict_arr+set}" = set; then
23649 echo $ECHO_N "(cached) $ECHO_C" >&6
23650else
23651 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23652/* confdefs.h. */
23653_ACEOF
23654cat confdefs.h >>conftest.$ac_ext
23655cat >>conftest.$ac_ext <<_ACEOF
23656/* end confdefs.h. */
22044edf
DL
23657void fred (int x[__restrict]);
23658int
23659main ()
23660{
b936fae4 23661
22044edf
DL
23662 ;
23663 return 0;
23664}
c0d27fcc 23665_ACEOF
22044edf 23666rm -f conftest.$ac_objext
d6e01aa5
KL
23667if { (ac_try="$ac_compile"
23668case "(($ac_try" in
23669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23670 *) ac_try_echo=$ac_try;;
23671esac
23672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23673 (eval "$ac_compile") 2>conftest.er1
22044edf 23674 ac_status=$?
edfaf76d
LK
23675 grep -v '^ *+' conftest.er1 >conftest.err
23676 rm -f conftest.er1
23677 cat conftest.err >&5
22044edf 23678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23679 (exit $ac_status); } && {
23680 test -z "$ac_c_werror_flag" ||
23681 test ! -s conftest.err
23682 } && test -s conftest.$ac_objext; then
22044edf
DL
23683 emacs_cv_c_restrict_arr=yes
23684else
23685 echo "$as_me: failed program was:" >&5
19650fd6
AS
23686sed 's/^/| /' conftest.$ac_ext >&5
23687
d6e01aa5 23688 emacs_cv_c_restrict_arr=no
ba4481b5 23689fi
d6e01aa5
KL
23690
23691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 23692fi
d6e01aa5
KL
23693{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
23694echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 23695if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 23696
c0d27fcc 23697cat >>confdefs.h <<\_ACEOF
22044edf 23698#define __restrict_arr __restrict
c0d27fcc 23699_ACEOF
ba4481b5 23700
ba4481b5
DL
23701fi
23702
c0d27fcc 23703
c0d27fcc 23704
22044edf
DL
23705# Set up the CFLAGS for real compilation, so we can substitute it.
23706CFLAGS="$REAL_CFLAGS"
23707CPPFLAGS="$REAL_CPPFLAGS"
23708
23709#### Find out which version of Emacs this is.
23710version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
23711 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
23712if test x"${version}" = x; then
23713 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
23714echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
23715 { (exit 1); exit 1; }; }
23716fi
23717
23718### Specify what sort of things we'll be editing into Makefile and config.h.
23719### Use configuration here uncanonicalized to avoid exceeding size limits.
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
6a3a24fa 23752
22044edf
DL
23753
23754
23755cat >>confdefs.h <<_ACEOF
23756#define EMACS_CONFIGURATION "${canonical}"
23757_ACEOF
23758
23759
23760cat >>confdefs.h <<_ACEOF
23761#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
23762_ACEOF
23763
23764
23765cat >>confdefs.h <<_ACEOF
23766#define config_machfile "${machfile}"
23767_ACEOF
23768
23769
23770cat >>confdefs.h <<_ACEOF
23771#define config_opsysfile "${opsysfile}"
23772_ACEOF
23773
23774
23775cat >>confdefs.h <<_ACEOF
23776#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
23777_ACEOF
23778
23779
23780cat >>confdefs.h <<_ACEOF
23781#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
23782_ACEOF
23783
23784
23785cat >>confdefs.h <<_ACEOF
23786#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
23787_ACEOF
23788
23789
23790cat >>confdefs.h <<_ACEOF
23791#define UNEXEC_SRC ${UNEXEC_SRC}
23792_ACEOF
23793
23794
23795if test "${HAVE_X_WINDOWS}" = "yes" ; then
23796
23797cat >>confdefs.h <<\_ACEOF
23798#define HAVE_X_WINDOWS 1
23799_ACEOF
23800
23801fi
23802if test "${USE_X_TOOLKIT}" != "none" ; then
23803
23804cat >>confdefs.h <<\_ACEOF
23805#define USE_X_TOOLKIT 1
23806_ACEOF
23807
23808fi
23809if test "${HAVE_X11}" = "yes" ; then
23810
23811cat >>confdefs.h <<\_ACEOF
23812#define HAVE_X11 1
23813_ACEOF
23814
23815fi
23816if test "${HAVE_XFREE386}" = "yes" ; then
23817
23818cat >>confdefs.h <<\_ACEOF
23819#define HAVE_XFREE386 1
23820_ACEOF
23821
23822fi
23823if test "${HAVE_MENUS}" = "yes" ; then
23824
23825cat >>confdefs.h <<\_ACEOF
23826#define HAVE_MENUS 1
23827_ACEOF
23828
23829fi
23830if test "${GNU_MALLOC}" = "yes" ; then
23831
23832cat >>confdefs.h <<\_ACEOF
23833#define GNU_MALLOC 1
23834_ACEOF
23835
23836fi
23837if test "${REL_ALLOC}" = "yes" ; then
23838
23839cat >>confdefs.h <<\_ACEOF
23840#define REL_ALLOC 1
23841_ACEOF
23842
23843fi
23844
23845
23846
c0d27fcc
MR
23847
23848
5afbeb22 23849
ba4481b5 23850#### Report on what we decided to do.
488dd4c4
JD
23851#### Report GTK as a toolkit, even if it doesn't use Xt.
23852#### It makes printing result more understandable as using GTK sets
23853#### toolkit_scroll_bars to yes by default.
23854if test "${HAVE_GTK}" = "yes"; then
23855 USE_X_TOOLKIT=GTK
23856fi
23857
ba4481b5
DL
23858echo "
23859Configured for \`${canonical}'.
23860
23861 Where should the build process find the source code? ${srcdir}
23862 What operating system and machine description files should Emacs use?
23863 \`${opsysfile}' and \`${machfile}'
23864 What compiler should emacs be built with? ${CC} ${CFLAGS}
23865 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 23866 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 23867 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 23868 What window system should Emacs use? ${window_system}
8e967cf7 23869 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
23870
23871if test -n "${x_includes}"; then
23872echo " Where do we find X Windows header files? ${x_includes}"
23873else
23874echo " Where do we find X Windows header files? Standard dirs"
23875fi
23876if test -n "${x_libraries}"; then
23877echo " Where do we find X Windows libraries? ${x_libraries}"
23878else
23879echo " Where do we find X Windows libraries? Standard dirs"
23880fi
23881
23882echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
23883echo " Does Emacs use -lXpm? ${HAVE_XPM}"
23884echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
23885echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 23886echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 23887echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 23888echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 23889echo " Does Emacs use -lgpm? ${HAVE_GPM}"
ba4481b5
DL
23890echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
23891echo
23892
d0098f13
JD
23893if test $USE_XASSERTS = yes; then
23894 echo " Compiling with asserts turned on."
d0098f13
JD
23895 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
23896 echo
23897fi
05cf15c6 23898
a2d3b5bd
JD
23899if test "$USE_X_TOOLKIT" = GTK; then
23900 case "$canonical" in
23901 *cygwin*)
23902 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
23903 will probably get a crash on startup. If this happens, please use another
23904 toolkit for Emacs. See etc/PROBLEMS for more information."
23905 ;;
23906 esac
23907fi
23908
05cf15c6 23909
f0e04acc
GM
23910if test "$HAVE_CARBON" = "yes"; then
23911 echo
23912 echo "Warning: The Mac Carbon port is currently unsupported and has
23913known problems. It is not recommended for use by non-developers.
23914Read the emacs-devel archives for more information."
23915 echo
23916fi
23917
131e4133
MA
23918if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
23919 echo "D-Bus integration has been tested for GNU/Linux only."
23920 echo
23921fi
23922
05cf15c6 23923
ba4481b5
DL
23924# Remove any trailing slashes in these variables.
23925test "${prefix}" != NONE &&
23926 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
23927test "${exec_prefix}" != NONE &&
23928 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
23929
d0e9bfd2
GM
23930## Check if the C preprocessor will convert `..' to `. .'. If so, set
23931## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
23932## from Makefile.c can correctly provide the arg `-traditional' to the
23933## C preprocessor.
23934
503d2be0 23935cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23936/* confdefs.h. */
23937_ACEOF
23938cat confdefs.h >>conftest.$ac_ext
23939cat >>conftest.$ac_ext <<_ACEOF
23940/* end confdefs.h. */
d0e9bfd2 23941yes..yes
503d2be0 23942_ACEOF
d0e9bfd2 23943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 23944 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
23945 CPP_NEED_TRADITIONAL=no
23946else
d0e9bfd2
GM
23947 CPP_NEED_TRADITIONAL=yes
23948fi
23949rm -f conftest*
23950
c0d27fcc 23951
f657c21b 23952ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile.c:src/Makefile.in lwlib/Makefile lisp/Makefile leim/Makefile"
d6e01aa5
KL
23953
23954ac_config_commands="$ac_config_commands default"
23955
503d2be0 23956cat >confcache <<\_ACEOF
ba4481b5
DL
23957# This file is a shell script that caches the results of configure
23958# tests run on this system so they can be shared between configure
503d2be0
AS
23959# scripts and configure runs, see configure's option --config-cache.
23960# It is not useful on other systems. If it contains results you don't
23961# want to keep, you may remove or edit it.
ba4481b5 23962#
503d2be0
AS
23963# config.status only pays attention to the cache file if you give it
23964# the --recheck option to rerun configure.
ba4481b5 23965#
6bae0ccf 23966# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
23967# loading this file, other *unset* `ac_cv_foo' will be assigned the
23968# following values.
23969
23970_ACEOF
23971
ba4481b5
DL
23972# The following way of writing the cache mishandles newlines in values,
23973# but we know of no workaround that is simple, portable, and efficient.
d6e01aa5 23974# So, we kill variables containing newlines.
ba4481b5
DL
23975# Ultrix sh set writes to stderr and can't be redirected directly,
23976# and sets the high bit in the cache file unless we assign to the vars.
d6e01aa5
KL
23977(
23978 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23979 eval ac_val=\$$ac_var
23980 case $ac_val in #(
23981 *${as_nl}*)
23982 case $ac_var in #(
23983 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23984echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23985 esac
23986 case $ac_var in #(
23987 _ | IFS | as_nl) ;; #(
23988 *) $as_unset $ac_var ;;
23989 esac ;;
23990 esac
23991 done
23992
503d2be0 23993 (set) 2>&1 |
d6e01aa5
KL
23994 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23995 *${as_nl}ac_space=\ *)
503d2be0
AS
23996 # `set' does not quote correctly, so add quotes (double-quote
23997 # substitution turns \\\\ into \\, and sed turns \\ into \).
23998 sed -n \
edfaf76d
LK
23999 "s/'/'\\\\''/g;
24000 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
d6e01aa5 24001 ;; #(
503d2be0
AS
24002 *)
24003 # `set' quotes correctly as required by POSIX, so do not add quotes.
d6e01aa5 24004 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 24005 ;;
d6e01aa5
KL
24006 esac |
24007 sort
24008) |
503d2be0 24009 sed '
d6e01aa5 24010 /^ac_cv_env_/b end
503d2be0 24011 t clear
d6e01aa5 24012 :clear
503d2be0
AS
24013 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24014 t end
d6e01aa5
KL
24015 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24016 :end' >>confcache
24017if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24018 if test -w "$cache_file"; then
24019 test "x$cache_file" != "x/dev/null" &&
24020 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24021echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 24022 cat confcache >$cache_file
ba4481b5 24023 else
d6e01aa5
KL
24024 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24025echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
24026 fi
24027fi
24028rm -f confcache
24029
ba4481b5
DL
24030test "x$prefix" = xNONE && prefix=$ac_default_prefix
24031# Let make expand exec_prefix.
24032test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24033
ba4481b5
DL
24034DEFS=-DHAVE_CONFIG_H
24035
6bae0ccf
DL
24036ac_libobjs=
24037ac_ltlibobjs=
24038for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24039 # 1. Remove the extension, and $U if already installed.
d6e01aa5
KL
24040 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24041 ac_i=`echo "$ac_i" | sed "$ac_script"`
24042 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24043 # will be set to the directory where LIBOBJS objects are built.
24044 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24045 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
24046done
24047LIBOBJS=$ac_libobjs
24048
24049LTLIBOBJS=$ac_ltlibobjs
24050
24051
c0d27fcc 24052
ba4481b5 24053: ${CONFIG_STATUS=./config.status}
503d2be0
AS
24054ac_clean_files_save=$ac_clean_files
24055ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 24056{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
24057echo "$as_me: creating $CONFIG_STATUS" >&6;}
24058cat >$CONFIG_STATUS <<_ACEOF
24059#! $SHELL
c0d27fcc 24060# Generated by $as_me.
ba4481b5 24061# Run this file to recreate the current configuration.
ba4481b5 24062# Compiler output produced by configure, useful for debugging
503d2be0 24063# configure, is in config.log if it exists.
ba4481b5 24064
503d2be0 24065debug=false
19650fd6
AS
24066ac_cs_recheck=false
24067ac_cs_silent=false
503d2be0 24068SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
24069_ACEOF
24070
24071cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
24072## --------------------- ##
24073## M4sh Initialization. ##
24074## --------------------- ##
24075
d6e01aa5
KL
24076# Be more Bourne compatible
24077DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
24078if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24079 emulate sh
24080 NULLCMD=:
6bae0ccf
DL
24081 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24082 # is contrary to our usage. Disable this feature.
24083 alias -g '${1+"$@"}'='"$@"'
d6e01aa5
KL
24084 setopt NO_GLOB_SUBST
24085else
24086 case `(set -o) 2>/dev/null` in
24087 *posix*) set -o posix ;;
24088esac
24089
24090fi
24091
24092
24093
24094
24095# PATH needs CR
24096# Avoid depending upon Character Ranges.
24097as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24098as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24099as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24100as_cr_digits='0123456789'
24101as_cr_alnum=$as_cr_Letters$as_cr_digits
24102
24103# The user is always right.
24104if test "${PATH_SEPARATOR+set}" != set; then
24105 echo "#! /bin/sh" >conf$$.sh
24106 echo "exit 0" >>conf$$.sh
24107 chmod +x conf$$.sh
24108 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24109 PATH_SEPARATOR=';'
24110 else
24111 PATH_SEPARATOR=:
24112 fi
24113 rm -f conf$$.sh
503d2be0
AS
24114fi
24115
c0d27fcc 24116# Support unset when possible.
edfaf76d 24117if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
24118 as_unset=unset
24119else
24120 as_unset=false
24121fi
24122
6bae0ccf 24123
d6e01aa5
KL
24124# IFS
24125# We need space, tab and new line, in precisely that order. Quoting is
24126# there to prevent editors from complaining about space-tab.
24127# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24128# splitting by setting IFS to empty value.)
24129as_nl='
24130'
24131IFS=" "" $as_nl"
24132
24133# Find who we are. Look in the path if we contain no directory separator.
24134case $0 in
24135 *[\\/]* ) as_myself=$0 ;;
24136 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24137for as_dir in $PATH
24138do
24139 IFS=$as_save_IFS
24140 test -z "$as_dir" && as_dir=.
24141 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24142done
24143IFS=$as_save_IFS
24144
24145 ;;
24146esac
24147# We did not find ourselves, most probably we were run as `sh COMMAND'
24148# in which case we are not to be found in the path.
24149if test "x$as_myself" = x; then
24150 as_myself=$0
24151fi
24152if test ! -f "$as_myself"; then
24153 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24154 { (exit 1); exit 1; }
24155fi
24156
6bae0ccf 24157# Work around bugs in pre-3.0 UWIN ksh.
d6e01aa5
KL
24158for as_var in ENV MAIL MAILPATH
24159do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24160done
6bae0ccf
DL
24161PS1='$ '
24162PS2='> '
24163PS4='+ '
24164
24165# NLS nuisances.
19650fd6
AS
24166for as_var in \
24167 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24168 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24169 LC_TELEPHONE LC_TIME
6bae0ccf 24170do
edfaf76d 24171 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
24172 eval $as_var=C; export $as_var
24173 else
d6e01aa5 24174 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
24175 fi
24176done
24177
24178# Required to use basename.
d6e01aa5
KL
24179if expr a : '\(a\)' >/dev/null 2>&1 &&
24180 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
24181 as_expr=expr
24182else
24183 as_expr=false
24184fi
24185
d6e01aa5 24186if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
24187 as_basename=basename
24188else
24189 as_basename=false
24190fi
c0d27fcc
MR
24191
24192
503d2be0 24193# Name of the executable.
d6e01aa5 24194as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
24195$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24196 X"$0" : 'X\(//\)$' \| \
d6e01aa5 24197 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 24198echo X/"$0" |
d6e01aa5
KL
24199 sed '/^.*\/\([^/][^/]*\)\/*$/{
24200 s//\1/
24201 q
24202 }
24203 /^X\/\(\/\/\)$/{
24204 s//\1/
24205 q
24206 }
24207 /^X\/\(\/\).*/{
24208 s//\1/
24209 q
24210 }
24211 s/.*/./; q'`
c0d27fcc 24212
d6e01aa5
KL
24213# CDPATH.
24214$as_unset CDPATH
c0d27fcc
MR
24215
24216
c0d27fcc 24217
c0d27fcc
MR
24218 as_lineno_1=$LINENO
24219 as_lineno_2=$LINENO
c0d27fcc 24220 test "x$as_lineno_1" != "x$as_lineno_2" &&
d6e01aa5 24221 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
24222
24223 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24224 # uniformly replaced by the line number. The first 'sed' inserts a
d6e01aa5
KL
24225 # line-number line after each line using $LINENO; the second 'sed'
24226 # does the real work. The second script uses 'N' to pair each
24227 # line-number line with the line containing $LINENO, and appends
24228 # trailing '-' during substitution so that $LINENO is not a special
24229 # case at line end.
c0d27fcc 24230 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
d6e01aa5
KL
24231 # scripts with optimization help from Paolo Bonzini. Blame Lee
24232 # E. McMahon (1931-1989) for sed's syntax. :-)
24233 sed -n '
24234 p
24235 /[$]LINENO/=
24236 ' <$as_myself |
c0d27fcc 24237 sed '
d6e01aa5
KL
24238 s/[$]LINENO.*/&-/
24239 t lineno
24240 b
24241 :lineno
c0d27fcc 24242 N
d6e01aa5
KL
24243 :loop
24244 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 24245 t loop
d6e01aa5 24246 s/-\n.*//
c0d27fcc 24247 ' >$as_me.lineno &&
d6e01aa5
KL
24248 chmod +x "$as_me.lineno" ||
24249 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
24250 { (exit 1); exit 1; }; }
24251
24252 # Don't try to exec as it changes $[0], causing all sort of problems
24253 # (the dirname of $[0] is not the place where we might find the
d6e01aa5
KL
24254 # original and so on. Autoconf is especially sensitive to this).
24255 . "./$as_me.lineno"
c0d27fcc
MR
24256 # Exit status is that of the last command.
24257 exit
24258}
24259
24260
d6e01aa5
KL
24261if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24262 as_dirname=dirname
24263else
24264 as_dirname=false
24265fi
24266
24267ECHO_C= ECHO_N= ECHO_T=
24268case `echo -n x` in
24269-n*)
24270 case `echo 'x\c'` in
24271 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24272 *) ECHO_C='\c';;
24273 esac;;
24274*)
24275 ECHO_N='-n';;
c0d27fcc 24276esac
503d2be0 24277
d6e01aa5
KL
24278if expr a : '\(a\)' >/dev/null 2>&1 &&
24279 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
24280 as_expr=expr
24281else
24282 as_expr=false
24283fi
24284
24285rm -f conf$$ conf$$.exe conf$$.file
d6e01aa5
KL
24286if test -d conf$$.dir; then
24287 rm -f conf$$.dir/conf$$.file
24288else
24289 rm -f conf$$.dir
24290 mkdir conf$$.dir
24291fi
503d2be0
AS
24292echo >conf$$.file
24293if ln -s conf$$.file conf$$ 2>/dev/null; then
d6e01aa5
KL
24294 as_ln_s='ln -s'
24295 # ... but there are two gotchas:
24296 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24297 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24298 # In both cases, we have to default to `cp -p'.
24299 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 24300 as_ln_s='cp -p'
503d2be0
AS
24301elif ln conf$$.file conf$$ 2>/dev/null; then
24302 as_ln_s=ln
24303else
24304 as_ln_s='cp -p'
24305fi
d6e01aa5
KL
24306rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24307rmdir conf$$.dir 2>/dev/null
503d2be0 24308
6bae0ccf
DL
24309if mkdir -p . 2>/dev/null; then
24310 as_mkdir_p=:
24311else
edfaf76d 24312 test -d ./-p && rmdir ./-p
6bae0ccf
DL
24313 as_mkdir_p=false
24314fi
24315
d6e01aa5
KL
24316if test -x / >/dev/null 2>&1; then
24317 as_test_x='test -x'
24318else
24319 if ls -dL / >/dev/null 2>&1; then
24320 as_ls_L_option=L
24321 else
24322 as_ls_L_option=
24323 fi
24324 as_test_x='
24325 eval sh -c '\''
24326 if test -d "$1"; then
24327 test -d "$1/.";
24328 else
24329 case $1 in
24330 -*)set "./$1";;
24331 esac;
24332 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24333 ???[sx]*):;;*)false;;esac;fi
24334 '\'' sh
24335 '
24336fi
24337as_executable_p=$as_test_x
503d2be0 24338
c0d27fcc 24339# Sed expression to map a string onto a valid CPP name.
edfaf76d 24340as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
24341
24342# Sed expression to map a string onto a valid variable name.
edfaf76d 24343as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 24344
503d2be0 24345
503d2be0
AS
24346exec 6>&1
24347
d6e01aa5 24348# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 24349# report actual input values of CONFIG_FILES etc. instead of their
d6e01aa5
KL
24350# values after options handling.
24351ac_log="
c0d27fcc 24352This file was extended by $as_me, which was
d6e01aa5 24353generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
24354
24355 CONFIG_FILES = $CONFIG_FILES
24356 CONFIG_HEADERS = $CONFIG_HEADERS
24357 CONFIG_LINKS = $CONFIG_LINKS
24358 CONFIG_COMMANDS = $CONFIG_COMMANDS
24359 $ $0 $@
24360
d6e01aa5
KL
24361on `(hostname || uname -n) 2>/dev/null | sed 1q`
24362"
24363
503d2be0
AS
24364_ACEOF
24365
d6e01aa5 24366cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24367# Files that config.status was made for.
d6e01aa5
KL
24368config_files="$ac_config_files"
24369config_headers="$ac_config_headers"
24370config_commands="$ac_config_commands"
503d2be0 24371
d6e01aa5 24372_ACEOF
503d2be0 24373
c0d27fcc 24374cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24375ac_cs_usage="\
24376\`$as_me' instantiates files from templates according to the
24377current configuration.
24378
24379Usage: $0 [OPTIONS] [FILE]...
24380
24381 -h, --help print this help, then exit
d6e01aa5 24382 -V, --version print version number and configuration settings, then exit
19650fd6 24383 -q, --quiet do not print progress messages
503d2be0
AS
24384 -d, --debug don't remove temporary files
24385 --recheck update $as_me by reconfiguring in the same conditions
24386 --file=FILE[:TEMPLATE]
edfaf76d 24387 instantiate the configuration file FILE
503d2be0 24388 --header=FILE[:TEMPLATE]
edfaf76d 24389 instantiate the configuration header FILE
503d2be0
AS
24390
24391Configuration files:
24392$config_files
24393
24394Configuration headers:
24395$config_headers
24396
24397Configuration commands:
24398$config_commands
24399
24400Report bugs to <bug-autoconf@gnu.org>."
503d2be0 24401
d6e01aa5 24402_ACEOF
c0d27fcc 24403cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
24404ac_cs_version="\\
24405config.status
d6e01aa5
KL
24406configured by $0, generated by GNU Autoconf 2.61,
24407 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24408
d6e01aa5 24409Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24410This config.status script is free software; the Free Software Foundation
24411gives unlimited permission to copy, distribute and modify it."
d6e01aa5
KL
24412
24413ac_pwd='$ac_pwd'
24414srcdir='$srcdir'
24415INSTALL='$INSTALL'
c0d27fcc 24416_ACEOF
503d2be0 24417
c0d27fcc 24418cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24419# If no file are specified by the user, then we need to provide default
24420# value. By we need to know if files were specified by the user.
24421ac_need_defaults=:
24422while test $# != 0
ba4481b5 24423do
503d2be0
AS
24424 case $1 in
24425 --*=*)
d6e01aa5
KL
24426 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24427 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24428 ac_shift=:
24429 ;;
d6e01aa5 24430 *)
6bae0ccf
DL
24431 ac_option=$1
24432 ac_optarg=$2
24433 ac_shift=shift
503d2be0 24434 ;;
503d2be0
AS
24435 esac
24436
6bae0ccf 24437 case $ac_option in
503d2be0 24438 # Handling of the options.
19650fd6
AS
24439 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24440 ac_cs_recheck=: ;;
d6e01aa5
KL
24441 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24442 echo "$ac_cs_version"; exit ;;
24443 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24444 debug=: ;;
24445 --file | --fil | --fi | --f )
6bae0ccf
DL
24446 $ac_shift
24447 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24448 ac_need_defaults=false;;
24449 --header | --heade | --head | --hea )
6bae0ccf
DL
24450 $ac_shift
24451 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24452 ac_need_defaults=false;;
d6e01aa5
KL
24453 --he | --h)
24454 # Conflict between --help and --header
24455 { echo "$as_me: error: ambiguous option: $1
24456Try \`$0 --help' for more information." >&2
24457 { (exit 1); exit 1; }; };;
24458 --help | --hel | -h )
24459 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24460 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24461 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24462 ac_cs_silent=: ;;
503d2be0
AS
24463
24464 # This is an error.
d6e01aa5
KL
24465 -*) { echo "$as_me: error: unrecognized option: $1
24466Try \`$0 --help' for more information." >&2
503d2be0
AS
24467 { (exit 1); exit 1; }; } ;;
24468
d6e01aa5
KL
24469 *) ac_config_targets="$ac_config_targets $1"
24470 ac_need_defaults=false ;;
503d2be0 24471
ba4481b5 24472 esac
503d2be0 24473 shift
ba4481b5
DL
24474done
24475
19650fd6
AS
24476ac_configure_extra_args=
24477
24478if $ac_cs_silent; then
24479 exec 6>/dev/null
24480 ac_configure_extra_args="$ac_configure_extra_args --silent"
24481fi
24482
24483_ACEOF
24484cat >>$CONFIG_STATUS <<_ACEOF
24485if \$ac_cs_recheck; then
d6e01aa5
KL
24486 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24487 CONFIG_SHELL=$SHELL
24488 export CONFIG_SHELL
24489 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
24490fi
24491
503d2be0 24492_ACEOF
d6e01aa5
KL
24493cat >>$CONFIG_STATUS <<\_ACEOF
24494exec 5>>config.log
24495{
24496 echo
24497 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24498## Running $as_me. ##
24499_ASBOX
24500 echo "$ac_log"
24501} >&5
ba4481b5 24502
d6e01aa5 24503_ACEOF
c0d27fcc 24504cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24505#
d6e01aa5 24506# INIT-COMMANDS
503d2be0 24507#
503d2be0
AS
24508GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
24509
c0d27fcc
MR
24510_ACEOF
24511
c0d27fcc 24512cat >>$CONFIG_STATUS <<\_ACEOF
d6e01aa5
KL
24513
24514# Handling of arguments.
503d2be0
AS
24515for ac_config_target in $ac_config_targets
24516do
d6e01aa5
KL
24517 case $ac_config_target in
24518 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
24519 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24520 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
24521 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
24522 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
24523 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
24524 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
24525 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
d6e01aa5 24526 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 24527 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
d6e01aa5 24528 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
d6e01aa5
KL
24529 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
24530 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24531
c0d27fcc 24532 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
24533echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24534 { (exit 1); exit 1; }; };;
24535 esac
ba4481b5 24536done
503d2be0 24537
d6e01aa5 24538
503d2be0
AS
24539# If the user did not use the arguments to specify the items to instantiate,
24540# then the envvar interface is used. Set only those that are not.
24541# We use the long form for the default assignment because of an extremely
24542# bizarre bug on SunOS 4.1.3.
24543if $ac_need_defaults; then
24544 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24545 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24546 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 24547fi
503d2be0 24548
19650fd6 24549# Have a temporary directory for convenience. Make it in the build tree
d6e01aa5 24550# simply because there is no reason against having it here, and in addition,
19650fd6 24551# creating and moving files from /tmp can sometimes cause problems.
d6e01aa5
KL
24552# Hook for its removal unless debugging.
24553# Note that there is a small window in which the directory will not be cleaned:
24554# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
24555$debug ||
24556{
d6e01aa5
KL
24557 tmp=
24558 trap 'exit_status=$?
24559 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24560' 0
503d2be0
AS
24561 trap '{ (exit 1); exit 1; }' 1 2 13 15
24562}
503d2be0 24563# Create a (secure) tmp directory for tmp files.
19650fd6 24564
503d2be0 24565{
d6e01aa5 24566 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
24567 test -n "$tmp" && test -d "$tmp"
24568} ||
24569{
d6e01aa5
KL
24570 tmp=./conf$$-$RANDOM
24571 (umask 077 && mkdir "$tmp")
503d2be0
AS
24572} ||
24573{
19650fd6 24574 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
24575 { (exit 1); exit 1; }
24576}
24577
503d2be0 24578#
d6e01aa5 24579# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
24580#
24581
24582# No need to generate the scripts if there are no CONFIG_FILES.
24583# This happens for instance when ./config.status config.h
d6e01aa5
KL
24584if test -n "$CONFIG_FILES"; then
24585
24586_ACEOF
24587
24588
24589
24590ac_delim='%!_!# '
24591for ac_last_try in false false false false false :; do
24592 cat >conf$$subs.sed <<_ACEOF
24593SHELL!$SHELL$ac_delim
24594PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24595PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24596PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24597PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24598PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24599PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24600exec_prefix!$exec_prefix$ac_delim
24601prefix!$prefix$ac_delim
24602program_transform_name!$program_transform_name$ac_delim
24603bindir!$bindir$ac_delim
24604sbindir!$sbindir$ac_delim
24605libexecdir!$libexecdir$ac_delim
24606datarootdir!$datarootdir$ac_delim
24607datadir!$datadir$ac_delim
24608sysconfdir!$sysconfdir$ac_delim
24609sharedstatedir!$sharedstatedir$ac_delim
24610localstatedir!$localstatedir$ac_delim
24611includedir!$includedir$ac_delim
24612oldincludedir!$oldincludedir$ac_delim
24613docdir!$docdir$ac_delim
24614infodir!$infodir$ac_delim
24615htmldir!$htmldir$ac_delim
24616dvidir!$dvidir$ac_delim
24617pdfdir!$pdfdir$ac_delim
24618psdir!$psdir$ac_delim
24619libdir!$libdir$ac_delim
24620localedir!$localedir$ac_delim
24621mandir!$mandir$ac_delim
24622DEFS!$DEFS$ac_delim
24623ECHO_C!$ECHO_C$ac_delim
24624ECHO_N!$ECHO_N$ac_delim
24625ECHO_T!$ECHO_T$ac_delim
24626LIBS!$LIBS$ac_delim
24627build_alias!$build_alias$ac_delim
24628host_alias!$host_alias$ac_delim
24629target_alias!$target_alias$ac_delim
24630MAINT!$MAINT$ac_delim
24631build!$build$ac_delim
24632build_cpu!$build_cpu$ac_delim
24633build_vendor!$build_vendor$ac_delim
24634build_os!$build_os$ac_delim
24635host!$host$ac_delim
24636host_cpu!$host_cpu$ac_delim
24637host_vendor!$host_vendor$ac_delim
24638host_os!$host_os$ac_delim
24639CC!$CC$ac_delim
24640CFLAGS!$CFLAGS$ac_delim
24641LDFLAGS!$LDFLAGS$ac_delim
24642CPPFLAGS!$CPPFLAGS$ac_delim
24643ac_ct_CC!$ac_ct_CC$ac_delim
24644EXEEXT!$EXEEXT$ac_delim
24645OBJEXT!$OBJEXT$ac_delim
24646CPP!$CPP$ac_delim
24647GREP!$GREP$ac_delim
24648EGREP!$EGREP$ac_delim
24649LN_S!$LN_S$ac_delim
24650INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24651INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24652INSTALL_DATA!$INSTALL_DATA$ac_delim
24653RANLIB!$RANLIB$ac_delim
24654INSTALL_INFO!$INSTALL_INFO$ac_delim
24655GZIP_PROG!$GZIP_PROG$ac_delim
c982cf7d 24656MAKEINFO!$MAKEINFO$ac_delim
d6e01aa5
KL
24657LIBSOUND!$LIBSOUND$ac_delim
24658PKG_CONFIG!$PKG_CONFIG$ac_delim
24659ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
24660ALSA_LIBS!$ALSA_LIBS$ac_delim
24661CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
24662SET_MAKE!$SET_MAKE$ac_delim
24663XMKMF!$XMKMF$ac_delim
cfe440b8 24664HAVE_XSERVER!$HAVE_XSERVER$ac_delim
0cfc0546
GM
24665RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
24666RSVG_LIBS!$RSVG_LIBS$ac_delim
d6e01aa5
KL
24667GTK_CFLAGS!$GTK_CFLAGS$ac_delim
24668GTK_LIBS!$GTK_LIBS$ac_delim
131e4133
MA
24669DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
24670DBUS_LIBS!$DBUS_LIBS$ac_delim
24671DBUS_INFO!$DBUS_INFO$ac_delim
9d89ffd0
JD
24672XFT_CFLAGS!$XFT_CFLAGS$ac_delim
24673XFT_LIBS!$XFT_LIBS$ac_delim
d6e01aa5
KL
24674ALLOCA!$ALLOCA$ac_delim
24675liblockfile!$liblockfile$ac_delim
24676LIBOBJS!$LIBOBJS$ac_delim
24677NEED_SETGID!$NEED_SETGID$ac_delim
24678KMEM_GROUP!$KMEM_GROUP$ac_delim
24679GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
24680GETOPT_H!$GETOPT_H$ac_delim
24681GETOPTOBJS!$GETOPTOBJS$ac_delim
24682version!$version$ac_delim
24683configuration!$configuration$ac_delim
24684canonical!$canonical$ac_delim
24685srcdir!$srcdir$ac_delim
24686lispdir!$lispdir$ac_delim
24687locallisppath!$locallisppath$ac_delim
24688lisppath!$lisppath$ac_delim
24689x_default_search_path!$x_default_search_path$ac_delim
d6e01aa5
KL
24690_ACEOF
24691
24692 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24693 break
24694 elif $ac_last_try; then
24695 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24696echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24697 { (exit 1); exit 1; }; }
24698 else
24699 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 24700 fi
d6e01aa5
KL
24701done
24702
24703ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24704if test -n "$ac_eof"; then
24705 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24706 ac_eof=`expr $ac_eof + 1`
24707fi
24708
24709cat >>$CONFIG_STATUS <<_ACEOF
24710cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24711/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24712_ACEOF
24713sed '
24714s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24715s/^/s,@/; s/!/@,|#_!!_#|/
24716:n
24717t n
24718s/'"$ac_delim"'$/,g/; t
24719s/$/\\/; p
24720N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24721' >>$CONFIG_STATUS <conf$$subs.sed
24722rm -f conf$$subs.sed
24723cat >>$CONFIG_STATUS <<_ACEOF
24724CEOF$ac_eof
24725_ACEOF
24726
ba4481b5 24727
d6e01aa5
KL
24728ac_delim='%!_!# '
24729for ac_last_try in false false false false false :; do
24730 cat >conf$$subs.sed <<_ACEOF
131e4133
MA
24731etcdir!$etcdir$ac_delim
24732archlibdir!$archlibdir$ac_delim
24733bitmapdir!$bitmapdir$ac_delim
c982cf7d 24734gamedir!$gamedir$ac_delim
0cfc0546
GM
24735gameuser!$gameuser$ac_delim
24736c_switch_system!$c_switch_system$ac_delim
cfe440b8 24737c_switch_machine!$c_switch_machine$ac_delim
9d89ffd0
JD
24738LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
24739LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
d6e01aa5
KL
24740C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
24741X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
24742machfile!$machfile$ac_delim
24743opsysfile!$opsysfile$ac_delim
24744carbon_appdir!$carbon_appdir$ac_delim
24745LTLIBOBJS!$LTLIBOBJS$ac_delim
c0d27fcc 24746_ACEOF
d6e01aa5 24747
131e4133 24748 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 15; then
d6e01aa5
KL
24749 break
24750 elif $ac_last_try; then
24751 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24752echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24753 { (exit 1); exit 1; }; }
24754 else
24755 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24756 fi
24757done
24758
24759ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24760if test -n "$ac_eof"; then
24761 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24762 ac_eof=`expr $ac_eof + 1`
24763fi
24764
24765cat >>$CONFIG_STATUS <<_ACEOF
24766cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24767/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24768_ACEOF
24769sed '
24770s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24771s/^/s,@/; s/!/@,|#_!!_#|/
24772:n
24773t n
24774s/'"$ac_delim"'$/,g/; t
24775s/$/\\/; p
24776N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24777' >>$CONFIG_STATUS <conf$$subs.sed
24778rm -f conf$$subs.sed
24779cat >>$CONFIG_STATUS <<_ACEOF
24780:end
24781s/|#_!!_#|//g
24782CEOF$ac_eof
24783_ACEOF
24784
24785
24786# VPATH may cause trouble with some makes, so we remove $(srcdir),
24787# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24788# trailing colons and then remove the whole line if VPATH becomes empty
24789# (actually we leave an empty line to preserve line numbers).
24790if test "x$srcdir" = x.; then
24791 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24792s/:*\$(srcdir):*/:/
24793s/:*\${srcdir}:*/:/
24794s/:*@srcdir@:*/:/
24795s/^\([^=]*=[ ]*\):*/\1/
24796s/:*$//
24797s/^[^=]*=[ ]*$//
24798}'
24799fi
24800
c0d27fcc 24801cat >>$CONFIG_STATUS <<\_ACEOF
d6e01aa5
KL
24802fi # test -n "$CONFIG_FILES"
24803
24804
24805for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
24806do
24807 case $ac_tag in
24808 :[FHLC]) ac_mode=$ac_tag; continue;;
24809 esac
24810 case $ac_mode$ac_tag in
24811 :[FHL]*:*);;
24812 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24813echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24814 { (exit 1); exit 1; }; };;
24815 :[FH]-) ac_tag=-:-;;
24816 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
ba4481b5 24817 esac
d6e01aa5
KL
24818 ac_save_IFS=$IFS
24819 IFS=:
24820 set x $ac_tag
24821 IFS=$ac_save_IFS
24822 shift
24823 ac_file=$1
24824 shift
24825
24826 case $ac_mode in
24827 :L) ac_source=$1;;
24828 :[FH])
24829 ac_file_inputs=
24830 for ac_f
24831 do
24832 case $ac_f in
24833 -) ac_f="$tmp/stdin";;
24834 *) # Look for the file first in the build tree, then in the source tree
24835 # (if the path is not absolute). The absolute path cannot be DOS-style,
24836 # because $ac_f cannot contain `:'.
24837 test -f "$ac_f" ||
24838 case $ac_f in
24839 [\\/$]*) false;;
24840 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24841 esac ||
24842 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24843echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24844 { (exit 1); exit 1; }; };;
24845 esac
24846 ac_file_inputs="$ac_file_inputs $ac_f"
24847 done
ba4481b5 24848
d6e01aa5
KL
24849 # Let's still pretend it is `configure' which instantiates (i.e., don't
24850 # use $as_me), people would be surprised to read:
24851 # /* config.h. Generated by config.status. */
24852 configure_input="Generated from "`IFS=:
24853 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24854 if test x"$ac_file" != x-; then
24855 configure_input="$ac_file. $configure_input"
24856 { echo "$as_me:$LINENO: creating $ac_file" >&5
24857echo "$as_me: creating $ac_file" >&6;}
24858 fi
24859
24860 case $ac_tag in
24861 *:-:* | *:-) cat >"$tmp/stdin";;
24862 esac
24863 ;;
ba4481b5
DL
24864 esac
24865
d6e01aa5 24866 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 24867$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24868 X"$ac_file" : 'X\(//\)[^/]' \| \
24869 X"$ac_file" : 'X\(//\)$' \| \
d6e01aa5 24870 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 24871echo X"$ac_file" |
d6e01aa5
KL
24872 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24873 s//\1/
24874 q
24875 }
24876 /^X\(\/\/\)[^/].*/{
24877 s//\1/
24878 q
24879 }
24880 /^X\(\/\/\)$/{
24881 s//\1/
24882 q
24883 }
24884 /^X\(\/\).*/{
24885 s//\1/
24886 q
24887 }
24888 s/.*/./; q'`
24889 { as_dir="$ac_dir"
24890 case $as_dir in #(
24891 -*) as_dir=./$as_dir;;
24892 esac
24893 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 24894 as_dirs=
d6e01aa5
KL
24895 while :; do
24896 case $as_dir in #(
24897 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24898 *) as_qdir=$as_dir;;
24899 esac
24900 as_dirs="'$as_qdir' $as_dirs"
24901 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 24902$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24903 X"$as_dir" : 'X\(//\)[^/]' \| \
24904 X"$as_dir" : 'X\(//\)$' \| \
d6e01aa5 24905 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 24906echo X"$as_dir" |
d6e01aa5
KL
24907 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24908 s//\1/
24909 q
24910 }
24911 /^X\(\/\/\)[^/].*/{
24912 s//\1/
24913 q
24914 }
24915 /^X\(\/\/\)$/{
24916 s//\1/
24917 q
24918 }
24919 /^X\(\/\).*/{
24920 s//\1/
24921 q
24922 }
24923 s/.*/./; q'`
24924 test -d "$as_dir" && break
6bae0ccf 24925 done
d6e01aa5
KL
24926 test -z "$as_dirs" || eval "mkdir $as_dirs"
24927 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24928echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 24929 { (exit 1); exit 1; }; }; }
c0d27fcc 24930 ac_builddir=.
98418dba 24931
d6e01aa5
KL
24932case "$ac_dir" in
24933.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24934*)
c0d27fcc 24935 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
d6e01aa5
KL
24936 # A ".." for each directory in $ac_dir_suffix.
24937 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24938 case $ac_top_builddir_sub in
24939 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24940 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24941 esac ;;
24942esac
24943ac_abs_top_builddir=$ac_pwd
24944ac_abs_builddir=$ac_pwd$ac_dir_suffix
24945# for backward compatibility:
24946ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
24947
24948case $srcdir in
d6e01aa5 24949 .) # We are building in place.
c0d27fcc 24950 ac_srcdir=.
d6e01aa5
KL
24951 ac_top_srcdir=$ac_top_builddir_sub
24952 ac_abs_top_srcdir=$ac_pwd ;;
24953 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 24954 ac_srcdir=$srcdir$ac_dir_suffix;
d6e01aa5
KL
24955 ac_top_srcdir=$srcdir
24956 ac_abs_top_srcdir=$srcdir ;;
24957 *) # Relative name.
24958 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24959 ac_top_srcdir=$ac_top_build_prefix$srcdir
24960 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 24961esac
d6e01aa5 24962ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 24963
c0d27fcc 24964
d6e01aa5
KL
24965 case $ac_mode in
24966 :F)
24967 #
24968 # CONFIG_FILE
24969 #
ba4481b5 24970
503d2be0
AS
24971 case $INSTALL in
24972 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
d6e01aa5 24973 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 24974 esac
d6e01aa5 24975_ACEOF
ba4481b5 24976
d6e01aa5
KL
24977cat >>$CONFIG_STATUS <<\_ACEOF
24978# If the template does not know about datarootdir, expand it.
24979# FIXME: This hack should be removed a few years after 2.60.
24980ac_datarootdir_hack=; ac_datarootdir_seen=
8ae52ca6 24981
d6e01aa5
KL
24982case `sed -n '/datarootdir/ {
24983 p
24984 q
24985}
24986/@datadir@/p
24987/@docdir@/p
24988/@infodir@/p
24989/@localedir@/p
24990/@mandir@/p
24991' $ac_file_inputs` in
24992*datarootdir*) ac_datarootdir_seen=yes;;
24993*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24994 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24995echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
24996_ACEOF
24997cat >>$CONFIG_STATUS <<_ACEOF
24998 ac_datarootdir_hack='
24999 s&@datadir@&$datadir&g
25000 s&@docdir@&$docdir&g
25001 s&@infodir@&$infodir&g
25002 s&@localedir@&$localedir&g
25003 s&@mandir@&$mandir&g
25004 s&\\\${datarootdir}&$datarootdir&g' ;;
25005esac
c0d27fcc 25006_ACEOF
d6e01aa5
KL
25007
25008# Neutralize VPATH when `$srcdir' = `.'.
25009# Shell code in configure.ac might set extrasub.
25010# FIXME: do we really want to maintain this feature?
c0d27fcc 25011cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
25012 sed "$ac_vpsub
25013$extrasub
c0d27fcc
MR
25014_ACEOF
25015cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
25016:t
25017/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
d6e01aa5
KL
25018s&@configure_input@&$configure_input&;t t
25019s&@top_builddir@&$ac_top_builddir_sub&;t t
25020s&@srcdir@&$ac_srcdir&;t t
25021s&@abs_srcdir@&$ac_abs_srcdir&;t t
25022s&@top_srcdir@&$ac_top_srcdir&;t t
25023s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25024s&@builddir@&$ac_builddir&;t t
25025s&@abs_builddir@&$ac_abs_builddir&;t t
25026s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25027s&@INSTALL@&$ac_INSTALL&;t t
25028$ac_datarootdir_hack
25029" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
25030
25031test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25032 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25033 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25034 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25035which seems to be undefined. Please make sure it is defined." >&5
25036echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25037which seems to be undefined. Please make sure it is defined." >&2;}
25038
25039 rm -f "$tmp/stdin"
503d2be0 25040 case $ac_file in
d6e01aa5
KL
25041 -) cat "$tmp/out"; rm -f "$tmp/out";;
25042 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 25043 esac
d6e01aa5
KL
25044 ;;
25045 :H)
25046 #
25047 # CONFIG_HEADER
25048 #
25049_ACEOF
25050
25051# Transform confdefs.h into a sed script `conftest.defines', that
25052# substitutes the proper values into config.h.in to produce config.h.
25053rm -f conftest.defines conftest.tail
25054# First, append a space to every undef/define line, to ease matching.
25055echo 's/$/ /' >conftest.defines
25056# Then, protect against being on the right side of a sed subst, or in
25057# an unquoted here document, in config.status. If some macros were
25058# called several times there might be several #defines for the same
25059# symbol, which is useless. But do not sort them, since the last
25060# AC_DEFINE must be honored.
25061ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25062# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25063# NAME is the cpp macro being defined, VALUE is the value it is being given.
25064# PARAMS is the parameter list in the macro definition--in most cases, it's
25065# just an empty string.
25066ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25067ac_dB='\\)[ (].*,\\1define\\2'
25068ac_dC=' '
25069ac_dD=' ,'
25070
25071uniq confdefs.h |
25072 sed -n '
25073 t rset
25074 :rset
25075 s/^[ ]*#[ ]*define[ ][ ]*//
25076 t ok
25077 d
25078 :ok
25079 s/[\\&,]/\\&/g
25080 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25081 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25082 ' >>conftest.defines
25083
25084# Remove the space that was appended to ease matching.
25085# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
25086# example, in the case of _POSIX_SOURCE, which is predefined and required
25087# on some systems where configure will not decide to define it.
d6e01aa5
KL
25088# (The regexp can be short, since the line contains either #define or #undef.)
25089echo 's/ $//
25090s,^[ #]*u.*,/* & */,' >>conftest.defines
25091
25092# Break up conftest.defines:
25093ac_max_sed_lines=50
25094
25095# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25096# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25097# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25098# et cetera.
25099ac_in='$ac_file_inputs'
25100ac_out='"$tmp/out1"'
25101ac_nxt='"$tmp/out2"'
25102
25103while :
503d2be0 25104do
d6e01aa5
KL
25105 # Write a here document:
25106 cat >>$CONFIG_STATUS <<_ACEOF
25107 # First, check the format of the line:
25108 cat >"\$tmp/defines.sed" <<\\CEOF
25109/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25110/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25111b
25112:def
25113_ACEOF
25114 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 25115 echo 'CEOF
d6e01aa5
KL
25116 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25117 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25118 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25119 grep . conftest.tail >/dev/null || break
503d2be0
AS
25120 rm -f conftest.defines
25121 mv conftest.tail conftest.defines
25122done
d6e01aa5 25123rm -f conftest.defines conftest.tail
503d2be0 25124
d6e01aa5 25125echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 25126cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 25127 if test x"$ac_file" != x-; then
d6e01aa5
KL
25128 echo "/* $configure_input */" >"$tmp/config.h"
25129 cat "$ac_result" >>"$tmp/config.h"
25130 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 25131 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
25132echo "$as_me: $ac_file is unchanged" >&6;}
25133 else
503d2be0 25134 rm -f $ac_file
d6e01aa5 25135 mv "$tmp/config.h" $ac_file
ba4481b5 25136 fi
503d2be0 25137 else
d6e01aa5
KL
25138 echo "/* $configure_input */"
25139 cat "$ac_result"
ba4481b5 25140 fi
d6e01aa5
KL
25141 rm -f "$tmp/out12"
25142 ;;
edfaf76d 25143
d6e01aa5
KL
25144 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
25145echo "$as_me: executing $ac_file commands" >&6;}
25146 ;;
25147 esac
ba4481b5 25148
c0d27fcc 25149
d6e01aa5
KL
25150 case $ac_file$ac_mode in
25151 "default":C)
ba4481b5
DL
25152
25153### Make the necessary directories, if they don't exist.
25154for dir in etc lisp ; do
25155 test -d ${dir} || mkdir ${dir}
25156done
25157
25158# Build src/Makefile from ${srcdir}/src/Makefile.c
25159# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
25160# This must be done after src/config.h is built, since we rely on that file.
25161
25162# Now get this: Some word that is part of the ${srcdir} directory name
25163# or the ${configuration} value might, just might, happen to be an
25164# identifier like `sun4' or `i386' or something, and be predefined by
25165# the C preprocessor to some helpful value like 1, or maybe the empty
25166# string. Needless to say consequent macro substitutions are less
25167# than conducive to the makefile finding the correct directory.
25168undefs="`echo $top_srcdir $configuration $canonical |
25169sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
25170 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
25171`"
25172
25173echo creating src/epaths.h
4aa6b955 25174${MAKE-make} epaths-force
ba4481b5 25175
1c203d4c
DL
25176# As of 2000-11-19, newest development versions of GNU cpp preprocess
25177# `..' to `. .' unless invoked with -traditional
25178
d0e9bfd2 25179if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
25180 CPPFLAGS="$CPPFLAGS -traditional"
25181fi
25182
ba4481b5
DL
25183echo creating lib-src/Makefile
25184( cd lib-src
25185 rm -f junk.c junk1.c junk2.c
25186 sed -e '/start of cpp stuff/q' \
25187 < Makefile.c > junk1.c
25188 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25189 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25190 < Makefile.c > junk.c
503d2be0 25191 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25192 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25193 cat junk1.c junk2.c > Makefile.new
25194 rm -f junk.c junk1.c junk2.c
25195 chmod 444 Makefile.new
25196 mv -f Makefile.new Makefile
25197)
25198
25199echo creating src/Makefile
25200( cd src
25201 rm -f junk.c junk1.c junk2.c
25202 sed -e '/start of cpp stuff/q' \
25203 < Makefile.c > junk1.c
25204 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25205 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25206 < Makefile.c > junk.c
503d2be0 25207 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25208 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25209 cat junk1.c junk2.c > Makefile.new
25210 rm -f junk.c junk1.c junk2.c
25211 chmod 444 Makefile.new
25212 mv -f Makefile.new Makefile
25213)
25214
503d2be0 25215if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 25216 echo creating src/.gdbinit
503d2be0 25217 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
25218fi
25219
25220# This is how we know whether to re-run configure in certain cases.
25221touch src/config.stamp
25222
503d2be0 25223 ;;
d6e01aa5 25224
503d2be0 25225 esac
d6e01aa5 25226done # for ac_tag
503d2be0 25227
ba4481b5 25228
503d2be0 25229{ (exit 0); exit 0; }
c0d27fcc 25230_ACEOF
ba4481b5 25231chmod +x $CONFIG_STATUS
503d2be0
AS
25232ac_clean_files=$ac_clean_files_save
25233
c0d27fcc 25234
503d2be0
AS
25235# configure is writing to config.log, and then calls config.status.
25236# config.status does its own redirection, appending to config.log.
25237# Unfortunately, on DOS this fails, as config.log is still kept open
25238# by configure, so config.status won't be able to write to it; its
25239# output is simply discarded. So we exec the FD to /dev/null,
25240# effectively closing config.log, so it can be properly (re)opened and
25241# appended to by config.status. When coming back to configure, we
25242# need to make the FD available again.
25243if test "$no_create" != yes; then
25244 ac_cs_success=:
19650fd6
AS
25245 ac_config_status_args=
25246 test "$silent" = yes &&
25247 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 25248 exec 5>/dev/null
19650fd6 25249 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
25250 exec 5>>config.log
25251 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25252 # would make configure fail if this is the last instruction.
25253 $ac_cs_success || { (exit 1); exit 1; }
25254fi
f5f47add 25255
c0d27fcc 25256